segdeha


Member since 06/04/2009

5 snippets

2 profile views

View their favorites

Profile

All time reputation: 9

Achievement

first submission:submitting first snipplet

segdeha's Recent Snippets



« Prev 1 Next »
  1. FAV

    cookie_encode & cookie_decode

    This is a great way to save complex objects as cookie values. You can't just json_encode because commas are not legal in cookie values. Remember not to use this for anything too big because cookies have a 4KB limit.
    PHP saved by 1 person 1 views posted 10 years ago segdeha
  2. FAV

    Truncate a string to a set length, breaking at word boundaries

    JavaScript saved by 1 person 4 views posted 10 years ago segdeha
  3. FAV

    Dynamically expand a textarea based on the amount of text

    JavaScript 4 views posted 10 years ago segdeha
  4. FAV

    Array.prototype.sliceTo

    Adds a method to the Array object that lets you slice the array down to everything before the given value.
    JavaScript 1 views posted 10 years ago segdeha
  5. FAV

    When to use the prototype of a Function

    Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.
    JavaScript 3 views posted 10 years ago segdeha
« Prev 1 Next »