A Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

learn more… | top users | synonyms

6
votes
2answers
34 views

Refactor module for calls to internal image service

Looking for help refactoring the following code to follow a Functional Programming paradigm. The first function builds a configuration object with default settings and optional presets, while the ...
3
votes
2answers
44 views

Adding time offsets to create future dates

How can I shorten this (working) code to create future dates in ruby for use as params in URLs? I'm doing: ...
5
votes
1answer
36 views

Loading car photo's

I have been developing a small application for a client which combines two arrays together and then creates a URL and then loads the images on the same page from the given URL. I'd like you to look ...
3
votes
1answer
51 views

Return current URL

I was unable to find how to get current URL so here's what I've made. Brief tests didn't reveal anything bad. Your thoughts, educated opinions, suggestions, and comment on potential bugs or ...
4
votes
1answer
96 views

Binding click event and avoid duplicate code in jquery

Please refer below code ...
5
votes
2answers
134 views

Removing everything after a certain character

I was just writing code, and wanted to make a piece that removes everything after the character ? if it's found within the URL. ...
3
votes
1answer
76 views

Finding e-commerce site of the product URL given and see if it is supported

I am building a Python app in which user can maintain wishlist of the products. I only support few e-commerce sites and do not support country specific sites (e.g I may support amazon.com but not ...
0
votes
2answers
744 views

Remove a parameter and its value from URL's query string

I'm coding an algorithm to remove a parameter (let's call it foo) from URL strings. Of course, after the foo parameter removal, ...
4
votes
1answer
79 views

Ad page optimization?

Any suggestions on how to shorten this would be greatly appreciated. This code takes three parameters through the URL and displays a page with targeted ads. I especially need help on how to cut down ...
0
votes
2answers
577 views

Add query string to a URL

I have written this code which adds a querystring to a URL: ...
2
votes
1answer
58 views

Finding PHP URL

I've made a Regex to find any URL on site, which uses PHP: ...
3
votes
2answers
339 views

Multiple serial URL requests in Objective-C / iOS

I want to check the existence of various API endpoints by doing serial URL request. If the first one fails, I want to try the second one, if the second fails I want to try the third one, etc. Here is ...
0
votes
1answer
57 views

Reading and writing an unknown character into an appropriately named file

I would like to refactor this code a bit further and make it better and more generic. As of right now, it is doing what I want it to do (reading a list of URL's, splitting the query and the ampersand ...
5
votes
2answers
765 views

What do you think of my regex for URL validation?

I would like you to review my regex. It's suppose to recognize common URLs like: ...
2
votes
3answers
132 views

Shortening my questions code

Is there any other way to shorten this code without sacrificing readability? I am fairly new to C#, let alone programming, and I wanted to know if this is as short as this code can possibly become. ...
1
vote
1answer
157 views

Opening a list of URLs and splitting the queries into different files

I recently made a program in Python to open a list of URLs and split the queries into different files. I want to make this code more generic and simple. I am open to suggestions. ...
1
vote
1answer
131 views

A (comprehensive) URI parser for Python

For a code challenge, I'm trying to write a comprehensive URI parser in Python that handles both URIs with authority paths (ex: URLs such as ...
4
votes
1answer
109 views

URL percent encoding function

I wrote a custom URL encoding function and I'd like to run it past a few other experienced C developers. I have tested it on a few strings, and it has worked on all of them. This is to be run on ...
0
votes
1answer
181 views

Am I sufficiently cleaning incoming $_GET parameters, especially in the array?

I'm trying to clean some incoming $_GET parameters. I've not done this before, so I'd love feedback. I'm especially concerned with the array. While all the other ...
1
vote
1answer
283 views

Replace URL parameters with Ruby

I have a method to replace URL parameters in an URL. It receives url as mandatory parameter and prefix and/or hash as optional parameters. Examples: ...
1
vote
1answer
502 views

JavaScript:: using IF..ELSE by checking page URL

This question has already been answered for registration, participation is to improve functionality and knowledge. Thanks. ...
0
votes
0answers
132 views

Fetch images from an array of URLs and upload to S3 [on hold]

I'm uploading arrays of image URLs to save to S3. The code works, but it is not executing asynchronously. Time stamping to the console appears to show that first all the images are fetched and ...
3
votes
1answer
350 views

URL decode function optimization

I have the following mockup that I need some feedback on how I might improve the url_decode function to make it faster and use less memory. There are a couple of ...
2
votes
2answers
796 views

Truncate port number from absolute Uri

We had a requirement to remove the port number from the Request.Url.AbsoluteUr i.e Actual: ...
3
votes
2answers
1k views

Getting Country Based on IP - Java

Im using Struts2, Google App Engine. Below is my program for getting the country based on IP of the visitor of the website. In my Struts2 action: ...
3
votes
2answers
115 views

How should I present long string literals (URLs) in Python?

I have a web scraping application that contains long string literals for the URLs. What would be the best way to present them (keeping in mind that I would like to adhere to PEP-8. ...
6
votes
1answer
59 views

Image-downloader/wallpaper setter

I'm making an image-downloading app that sets the image as the device wallpaper. For this I used the class: ImageDownloader.java This class has a function which ...
1
vote
3answers
208 views

PHP creating slugify (clean URL) links in simple way?

I think this is the simplest way to slugify urls. You have any contra-indication? ...
1
vote
1answer
737 views

HTTP URL validating

What do you think about this? ...
6
votes
1answer
180 views

Canonicalize URLs for static website

I want to "canonicalize" URLs for my static (files and folders) website. The 'Aims' describes what I want to accomplish. The 'Code' gives my current .htaccess. ...
2
votes
1answer
2k views

Routing in MVC with PHP

I am in the progress of creating a MVC structured website. I've opted to make my own instead of using pre-constructed MVC systems as a way to teach myself better coding and understand how applications ...
3
votes
2answers
1k views

Joining url path components intelligently

I'm a little frustrated with the state of url parsing in python, although I sympathize with the challenges. Today I just needed a tool to join path parts and normalize slashes without accidentally ...
2
votes
1answer
224 views

Parse in currency rates of major cities

Background: I'm creating a website that parses in currency rates of the three major cities listed below in the $cities array. I'll explain my code as I go along. ...