This file contains 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 print_sum(v: Vec<i32>) { | |
println!("{}", v[0] + v[1]); | |
// v is dropped and deallocated here | |
} | |
fn main() { | |
let mut v = Vec::new(); // creating the resource | |
for i in 1..1000 { | |
v.push(i); | |
} |
This file contains 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
var highlight = "NAME GOES HERE"; | |
(function() { | |
"use strict"; | |
var rows = document.getElementsByClassName("st_team"); | |
var found; | |
for(var i = 1; i < rows.length - 3; i++) |
This file contains 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
from tornado.httpclient import AsyncHTTPClient | |
import tornado.gen | |
import tornado.ioloop | |
import timeit | |
@tornado.gen.coroutine | |
def make_request(index): | |
client = AsyncHTTPClient() | |
print(index, 'started') | |
response = yield client.fetch('http://google.com', raise_error=False) |
This file contains 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> | |
void report_error(char *s) | |
{ | |
printf("syntax error: expected %s\n", s); | |
} |
This file contains 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 <math.h> | |
#define F(x) (f(x)-g(x)) | |
#define F1(x) (f1(x)-g1(x)) | |
typedef double (*func)(double); | |
double root(func f, func g, func f1, func g1, double a, double b, double eps1) |
NewerOlder