Tag Archives: snippet

(C#) Download text or bytes via HTTP

Downloads contents as a byte array or string, depending on need.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment

(JavaScript) Setting, getting and deleting cookies using Javascript

 

Posted in JavaScript | Also tagged , , , | Leave a comment

(C#) Windows Forms Keyboard Shortcut on Control

Easily create Windows Forms Shortcuts with this class. For example: A shortcut to catch pasting via Ctrl + V. Shortcut sc = new Shortcut(this, new Action(() =>  MessageBox.Show(“Data pasted!”))); sc.Keys.Add(Keys.ControlKey); sc.Keys.Add(Keys.V);

Posted in C# | Also tagged , , , , , , , | Leave a comment

(C) HTTP POST from Arduino (WiFly Library)

This snippet will send an HTTP POST from an Arduino using the WiFly library. The library is in early alpha, and is a port from the ethernet shield library. The code here should work with either. The critical part is the size of the data to send, and the line-breaks in the right places.

Posted in C | Also tagged , , , , , , , | Leave a comment

(PHP) Download file

Posted in PHP | Also tagged , , | Leave a comment

(PHP) Login Class

Posted in PHP | Also tagged , , | Leave a comment

(Haskell) Pi Approximation

GHC already has `pi’ built in, but I wanted to compare values. `(this snippet) == pi’ returns `True’.

Posted in Haskell | Also tagged , , , , | Leave a comment

(Haskell) Towers of Hanoi

Posted in Haskell | Also tagged , , , , | Leave a comment

(CSS) Linear Gradient

Posted in Uncategorized | Also tagged , , | Leave a comment

(ActionScript) AS2 trace all items within Object

Posted in ActionScript | Also tagged , , | Leave a comment