This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <unistd.h> | |
#include <string.h> | |
#define BUF_SIZE 1000000 | |
int main(int argc, char *argv[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let stack: &mut ~[~int] = &mut ~[]; | |
stack.push(~0); | |
stack.push(~0); | |
stack.push(~0); | |
stack.push(~0); | |
stack.push(~0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
{ | |
private object _lock = new object(); | |
public void foo() | |
{ | |
lock(_lock) | |
{ | |
do_something(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Reflection; | |
using System.IO; | |
namespace HMMTagger | |
{ | |
class Tuple<T1, T2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Finds a solution for a specific 16-piece edge matching puzzle. | |
* Yields the following output: | |
* | |
* Success in 827772 comparisons! | |
* 0: Piece 1, Rot 2 | |
* 1: Piece 9, Rot 2 | |
* 2: Piece 15, Rot 2 | |
* 3: Piece 5, Rot 1 | |
* 4: Piece 6, Rot 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Drawing.Printing; | |
using System.ComponentModel; | |
using WebKit.Interop; | |
using System.Drawing; | |
using System.Windows.Forms; | |
namespace WebKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void PrintHack() | |
{ | |
PrintDocument doc = new PrintDocument(); | |
doc.DocumentName = this.DocumentTitle; | |
doc.DefaultPageSettings = PageSettings; | |
doc.OriginAtMargins = true; | |
PrintManager pm = new PrintManager(doc, this, true); | |
pm.Print(); | |
doc.Print(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Author: Peter Nelson / @_peterdn - controllers\url.php | |
* The main controller for the site. */ | |
class Url extends Controller | |
{ | |
public function Url() | |
{ | |
parent::Controller(); | |
$this->load->helper("url"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Author: Peter Nelson / @_peterdn - A simple SL control that copies text | |
to the user's clipboard. Currently used in my URL (not-so) shortener | |
at http://u.peterdn.com, on supported clients. --> | |
<UserControl x:Class="UrlShortenerTextBox.UrlShortenerTextBox" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" |