Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
It’s pretty straightforward, we loop the existing Views of the ScrollableView and copy each View, replacing the one to be change, to a new array. Then we tell the ScrollableView to use our new Views-array for it’s Views.
I hope this helps someon...
0
744
posted 13 years ago by chlab
We create a View with a background color, put a semi-transparent TabbedBar with empty button names on top of it, then add another layer of fully visible labels spaced to fit the TabbedBar beneath it. Everything is then wrapped in one View, which you...
0
802
posted 13 years ago by chlab
C#
TruncateOnWordBoundary - a useful extension method for cutting a string short, but not in the middle of a word.
Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary f...
1
1349
posted 13 years ago by stewartrae
Sets the current element of a dropdown to the default option.
<select>
<option>Afrikaans</option>
<option>English</option>
</select>
0
694
posted 13 years ago by sanbor
After being tasked with creating inputs like those on the twitter homepage I came up with this inline label system that uses jquery to control the labels (in the vase of the example it fase and slides them).
The code is in three parts. First, the...
0
866
posted 13 years ago by FatFolderDesigner
.net 3.0+, To create stability in your code, you must check all inputs into a method to make sure they are valid . Often people overlook this step because of laziness, or because they aren't convinced that exceptions and assertions are actually in pl...
0
881
posted 13 years ago by bryanlyman
Inspired: http://evan-roth.com/personal-internet-cache-archive/
In the "style=" you can adjust the "height: ??px" according to the quantity of items in your cache.
0
755
posted 13 years ago by valessiobrito
If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.
0
766
posted 13 years ago by vagrantradio
ssh localhost -CgL 8080(your computer IP address or name):80
0
914
posted 13 years ago by inreflection7