Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Two versions of binary search -- one recursive, one iterative -- for an array of strings.
Both assume that your array index fits within an integer.
0
1026
posted 12 years ago by rtperson
Shows the load of the cpu graphically in ssh (note you must install htop first)
0
779
posted 12 years ago by klovera
This is a function that receives a string as an argument (along with other config optional arguments) and locates all keywords (words that appear most) from that string, returning the keywords as an array or as a string separated by commas. The funct...
2
3184
posted 12 years ago by TimoZachi
If you a flick a web app past the bottom or top of the page, the page itself gets elastically tugged away from the URL bar or the button bar (or the bottom/top of the screen if it's in full-screen mode).
This behavior is another giveaway that your...
0
774
posted 12 years ago by timothypwalter
Django's middleware for global app login. With this middleware you don't have to decorate views by login_required decorator.
0
828
posted 12 years ago by lukasvinclav
I create this script which let me add the gitk in the Programming Application menu in my gnome this way I don't need to open a shell and go to the repository base to view the rep tree
0
829
posted 12 years ago by ferro
Simple jQuery accordion function for jQuery version 1.7.1 and above.
3
968
posted 12 years ago by digitalclubb
Grab jQuery library from Google's CDN this way its faster, burns Google's bandwidth and not yours. Also users will have this cached if other sites are using it as well.
Downside of course is Google's servers do go down. This script will check if...
1
873
posted 12 years ago by cyberpunkstudio
Displays the attribute label and value by using the attribute code.
This works on the Product Detail page in Magento.
1
938
posted 12 years ago by axertion
update your catalog.xml in your app/design/default/THEMENAME/layout/catalog.xml with this XML definition to remove the category filters from the left-layered navigation in Magento.
0
969
posted 12 years ago by axertion
Select wp_users and wp_posts to retrieve data from both tables in order to display post title, post date, author name with gravatar (gravatar isn't listed in this code)
Note: probably not idea solution, but it's one of many fixes
0
835
posted 12 years ago by ninacess
Again, A-B-C. All the Behaviour garbage that "Add Service Reference" inserts for the TCP binding is unnecessary, especially if the Operation Contract is only for simple value types.
0
931
posted 12 years ago by rengber
ABC - Address Binding Contract
Note that the Service Name and Contract must match a real live type (case Sensitive)
Binding name is also case sensitive.
0
930
posted 12 years ago by rengber