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

4
votes
1answer
51 views

Parse prospero-Parameters

Prospero is a URI Scheme. There you have fields and values. Would you guys check this code and give common suggestions or even testcases for junit-Tests? Sorry Docu is in German. ...
6
votes
2answers
320 views

Parallel “wget” in Java

Purpose: write Java program that downloads a list of URLs specified on commandline in parallel (simultaneously), reporting download completion every second. My solution follows below, please point ...
1
vote
0answers
34 views

Using URLs and RegEx for web scraper from a dictionary [closed]

I have dozens of functions which GET/POST to some URLs and extract data using RegEx. The URLs and regular expressions were hard-coded earlier but now I moved all of them to a dictionary. I then saw ...
3
votes
2answers
69 views

Create nice url with diactrics removal

Please review my class. It uses iconv() (it's probably not the best solution however I haven't found any better alternative to change unknown characters). ...
3
votes
2answers
53 views

Pagination filtering

I want to check if there is page variable (in URL) and if it is, if it's correct - it cannot be number 1 because this is default page and it should be valid int ...
8
votes
2answers
244 views

Serializing JSON data coming from two URLs in the same object

I have two URLs (urlA and urlB) and both the URL gives me a JSON response back in the same JSON format. Below is my JSON string ...
3
votes
1answer
42 views

Showing the domain of a URL

I have such a method which takes a URL, such as http://twitter.com/ttt or twitter.com/dasd, and should show its domain with http: http://twitter.com and name twitter ...
6
votes
2answers
78 views

Simple python script to shorten URLs in specified text files

A recent question inspired me to write a script for this task: Shorten URLs in specified text files using googleapis.com Handle multiple URLs, whether on the same line or multiple lines The ...
11
votes
2answers
611 views

PHP URL Shortener

I just developed a URL shortener. index.php: ...
6
votes
1answer
166 views

Git commit-msg URL shortener

I have just written my first git hook script. It is very simple that simply finds any URLs in the commit message and uses the Google URL shortener to rewrite the URL nicely. it is located here. I ...
5
votes
1answer
136 views

Generating the pretty bit at the end of a URL

I'm having a dip into F# and am attempting not to write it like it's C#. One area that bothers me is using members of System.String. These often need to be chained ...
5
votes
3answers
138 views

Cleaner or better readability in URL composition

I have a URL that is hardcoded via a config which I extract into a config: ...
3
votes
2answers
162 views

Load images, manipulate DOM, store/retrieve data using localStorage

I wrote a little code sample which: load images manipulate DOM (replace images) store/retrieve related data using localStorage ...
0
votes
2answers
121 views

Add a set of querystring params to a URL

Example cases: Need to add x=1, y=2 and querystring variables to the following URLs: ...
2
votes
0answers
56 views

Resolve (domainless) machine name from DNS alias

So I have a URI with a DNS alias, and I need to I need to dynamically replace the alias with the actual machine. I started out with this: ...
1
vote
1answer
87 views

Split download file buffer by any number of threads

This is my first attempt at splitting the download buffer into several threads by the number provided. I want to improve on performance and better implementation approach. ...
1
vote
1answer
59 views

Making a URL by prioritizing the keys if multiple keys are present efficiently

I recently started using the Builder pattern in one of my projects. Below is my builder class - ...
7
votes
5answers
298 views

How can I better my URL checker program?

I made a LinkChecker program which checks URLs from a text file and outputs status into another file like this: ...
1
vote
1answer
83 views

Getting information from URL efficiently

I wrote a dirty and ugly code to show in console how many bugs are left until the release of elementary codename Isis. The code works but it's pretty inefficient. What it does is: downloads the ...
10
votes
2answers
587 views

Spliterator implementation

I'm trying to post a little tutorial on the new Spliterator class. There are many tutorials these days on using stream starting from a standard Java collection, but ...
4
votes
2answers
64 views

Download URL from clipboard

This is a Python script I made to download a URL from the clipboard. When a new URL is copied to a clipboard it adds the URL to a download queue, then on a separate thread it downloads the URL to a ...
6
votes
2answers
50 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
80 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
41 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 ...
2
votes
0answers
67 views

Persistable specifications in symfony

I'm creating an app where the user will be able to create HTTP request matchers. So the RequestMatchers will match HTTP method, path, query parameters, etc., for ...
3
votes
1answer
61 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
427 views

Binding click event and avoid duplicate code in jquery

Please refer below code ...
5
votes
2answers
261 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
105 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
5k 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
96 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
2k views

Add query string to a URL

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

Finding PHP URL

I've made a Regex to find any URL on site, which uses PHP: ...
3
votes
2answers
1k 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
83 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 ...
3
votes
1answer
924 views

Send email if URL is down for 2 times only

we want to check if URL is down or not. But sometimes, environment is down for maintenance for 3-4 hours and we don't want to keep sending emails during that time. I have written a shell script for ...
5
votes
2answers
1k 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
141 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
348 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
260 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
121 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
285 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
537 views

Script taking too long for curl request

The below script takes the list of provided URLs and scrapes the present links in each URL and for each scraped link Facebook ...
1
vote
1answer
465 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
1k views

Using if/else by checking page URL

You can place the script where you want the content to be checked and loaded in your design. urlCheck is the name given to the function. You can change it, and ...
3
votes
2answers
89 views

Changing URLs into HTML links

This method changes all URLs in the string into an HTML link. The goal is to not mutate the string passed in, which I believe is a good practice. The new_string ...
3
votes
1answer
502 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
1k 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
2k views

Getting country based on IP

I'm using Struts2 and Google App Engine. Below is my program for getting the country based on the IP of the visitor of the website. In my Struts2 action: ...
1
vote
1answer
209 views

URL and source page scraper

The code does seem a bit repetitive in places such as the parenturlscraper module and the childurlscraper module. Does anyone ...