Posted in Programming by Mr. Novocain on August 5, 2010 at 07:15

chanSaver

Are you interested in Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide)?

Download

Save images from your favorite chan imageboards.
Tested and working on 4chan and 2chan.

Just enter thread URL and it will create a directory with the name of that thread, then start leeching all of the images.

(more…)

Incoming search terms for the article:

 
 
Posted in Programming by Mr. Novocain on at 07:04

Linked List in C#

Are you interested in Cheap PHP + MySQL Ebook!?

This is my class for C# linked lists. Simple as that.

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5.  
  6. namespace nsLinkedList
  7. {
  8.     public class LinkedList
  9.     {
  10.         public string line;
  11.  
  12.         public LinkedList prev = null;
  13.         public LinkedList next = null;
  14.     }
  15.  
  16.     public class LinkedListFuncs
  17.     {
  18.         public LinkedList Push(string line, LinkedList list)
  19.         {
  20.             LinkedList temp = new LinkedList();
  21.             temp.line = line;
  22.             temp.prev = null;
  23.             temp.next = null;
  24.  
  25.             if (list == null)
  26.                 return temp;
  27.  
  28.             LinkedList tmppek = list;
  29.  
  30.             while (tmppek.next != null)
  31.                 tmppek = tmppek.next;
  32.  
  33.             tmppek.next = temp;
  34.             temp.prev = tmppek;
  35.  
  36.             return list;
  37.         }
  38.  
  39.         public bool Replace(string oldstr, string newstr, LinkedList list)
  40.         {
  41.             LinkedList tmppek = list;
  42.  
  43.             while (tmppek != null)
  44.             {
  45.                 if (tmppek.line == oldstr)
  46.                     break;
  47.                 tmppek = tmppek.next;
  48.             }
  49.  
  50.             if (tmppek != null)
  51.             {
  52.                 tmppek.line = newstr;
  53.                 return true;
  54.             }
  55.  
  56.             return false;
  57.         }
  58.  
  59.         public LinkedList Remove(LinkedList remove, LinkedList list)
  60.         {
  61.             LinkedList tmppek = list;
  62.  
  63.             while (tmppek != remove)
  64.                 tmppek = tmppek.next;
  65.  
  66.             if (tmppek.prev == null)
  67.             {
  68.                 list = list.next;
  69.                 list.prev = null;
  70.             }
  71.             else if (tmppek.next == null)
  72.             {
  73.                 tmppek.prev.next = null;
  74.             }
  75.             else
  76.             {
  77.                 tmppek.prev.next = tmppek.next;
  78.                 tmppek.next.prev = tmppek.prev;
  79.             }
  80.  
  81.             tmppek = null;
  82.  
  83.             return list;
  84.         }
  85.  
  86.         public LinkedList Free(LinkedList list)
  87.         {
  88.             if (list == null)
  89.                 return null;
  90.  
  91.             LinkedList tmppek = list;
  92.  
  93.             while (tmppek.next != null)
  94.             {
  95.                 tmppek.prev = null;
  96.                 tmppek = tmppek.next;
  97.             }
  98.  
  99.             tmppek = null;
  100.             list = null;
  101.  
  102.             return list;
  103.         }
  104.  
  105.         public LinkedList Find(string findstr, LinkedList list)
  106.         {
  107.             LinkedList tmppek = list;
  108.  
  109.             while (tmppek != null)
  110.             {
  111.                 if (tmppek.line == findstr)
  112.                     return tmppek;
  113.                 tmppek = tmppek.next;
  114.             }
  115.  
  116.             return null;
  117.         }
  118.     }
  119. }

Incoming search terms for the article: