jasonseney


Member since 10/07/2008

Name: Jason

Location: nyc

Website: http://jasonseney.com

17 snippets

24 profile views

3 Comment(s) Posted

View their favorites

Profile

All time reputation: 65

Achievement

first submission:submitting first snipplet

jasonseney's Recent Snippets



« Prev 1 Next »
  1. FAV

    Convert Image Format and Preserve Names

    Will find all __TIF__ files and create new __JPG__ files of the same file name. - 97% quality - Resize _down only_ to `1024x1280`
    Bash 5 views posted 8 years ago jasonseney
  2. FAV

    Safe Script Load

    Safely loads a javascript file asynchronously Example: (function() { __safeLoadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", function() { alert(jQuery); }); })();
    JavaScript 3 views posted 8 years ago jasonseney
  3. FAV

    Get the Host Name in ASP.NET C#

    Will return the host name that the site is running on. Example: `http://mysite.com` or `http://myspecialsite.com:102`
    C# 14 views posted 8 years ago jasonseney
  4. FAV

    Javascript DOM - getElementsByClassName

    Similar to [Get Elements by Class Name]( http://snipplr.com/view/1696/get-elements-by-class-name/), but with optional "tag" parameter. Performance is increased by first retrieving the desired tag if available.
    JavaScript 6 views posted 9 years ago jasonseney
  5. FAV

    Javascript DOM - Create Element

    Basic create element and append it too another element.
    JavaScript 6 views posted 9 years ago jasonseney
  6. FAV

    Loop on jQuery object and return value

    Returning a boolean inside of jQuery's $.each() function will only break the loop. To get a return value, you can convert the jQuery object to array and use a regular for loop in javascript.
    JavaScript 4 views posted 10 years ago jasonseney
  7. FAV

    C# Strip XML/HTML from string

    [Credit - Sam Allen, Dot Net Perls](http://dotnetperls.com/remove-html-tags)
    C# saved by 8 people 17 views posted 10 years ago jasonseney
  8. FAV

    C# Truncate String Text

    C# saved by 1 person 8 views posted 10 years ago jasonseney
  9. FAV

    Batch resize in DOS batch file with imagemagick

    DOS Batch saved by 12 people 10 views posted 10 years ago jasonseney
  10. FAV

    C# Call Web Service and Get String Result

    Basic example of calling a web service from code using GET. You can pass parameters in as query vars. Assumes return type of service is "String". Example return xml: <?xml> <string>US</string> @SNIPPLR TEAM: Please let me put xml at...
    C# saved by 3 people 24 views posted 10 years ago jasonseney
  11. FAV

    Convert ASP.NET PlaceHolder to HTML tag with attributes

    ## Markup ## _Using square [ ] brackets for compatibility with Snipplr comment form_ [asp:PlaceHolder ID="StuffHolder" runat="server" ] <p>Some stuff in here</p> [/asp:PlaceHolder] ## Code Behind ## HtmlAttr[] attribu...
    C# saved by 9 people 11 views posted 10 years ago jasonseney
  12. FAV

    Javascript check for undefined or null object/variable

    Based on some comments in [StackOverflow Question](http://stackoverflow.com/questions/95875/javascript-check-to-see-if-a-variable-is-an-object "How to check if a variable is an object")
    JavaScript saved by 3 people 19 views posted 10 years ago jasonseney
  13. FAV

    Check For Console object in web browser with JavaScript

    JavaScript saved by 4 people 11 views posted 10 years ago jasonseney
  14. FAV

    Format URLs in string to HTML Links in C#

    Will return a string that has any matched URLs wrapped in `<a>` tags. Example: `"This is a link to http://foobar.com . Please visit !"` Becomes: `"This is a link to <a href='http://foobar.com'>http://foobar.com</a> . Please visit!"` Note: Op...
    C# saved by 18 people 28 views posted 10 years ago jasonseney
  15. FAV

    Create basic XmlDocument from Scratch

    Example uses an object from 3rd party API. Needed to turn it into xml for returning from a webservice.
    C# 4 views posted 10 years ago jasonseney
  16. FAV

    ASP:DropDownList US States (Abbreviated)

    View version with full names here: [Dropdown-states](http://snipplr.com/view/4042/dropdown-states/ "View full names version")
    ASP saved by 12 people 17 views posted 11 years ago jasonseney
  17. FAV

    Sprintf in Javascript (string format)

    Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
    JavaScript saved by 8 people 10 views posted 11 years ago jasonseney
« Prev 1 Next »