Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
kvs@lair tmp:> cat t.c | |
#include <stdio.h> | |
int | |
main() | |
{ | |
char *p = "aaa"; | |
if (p = NULL) { | |
printf("WHAT?\n"); |
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
// compiles with gcc 4.7+: | |
// g++ -Wall -W -g -std=c++11 test.cpp -o /tmp/test | |
// | |
// ... and clang 3.0+: | |
// clang++ -W -g -std=c++11 test.cpp -o /tmp/test | |
#include <iostream> | |
#include <typeinfo> | |
template<class T, class U> | |
auto mul(T x, U y) -> decltype(x*y) |
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 <iostream> | |
#include <limits> | |
int | |
main() | |
{ | |
std::cout << std::numeric_limits<double>::epsilon() << std::endl; | |
std::cout << std::numeric_limits<float>::epsilon() << std::endl; | |
return 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
library(gmp) | |
p <- 1 | |
while (T) { | |
p <- nextprime(p) | |
if (p > 1000000) { | |
break | |
} | |
cat(sprintf("%s\n", p)) | |
} |
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 <iostream> | |
// Base of a recursion | |
void | |
print() | |
{ | |
std::cout << std::endl; | |
} | |
// Function to print any type without type specifiers |
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
Dear viewer of this gist! If you want to download this lectures from narod.ru site be cautious | |
since Yandex (owner of the narod.ru service) will try to install it's toolbar and mess up with | |
default page and search engine in your browser. Just stay alert and be sure not to agree on any | |
actions without reading super carefully all messages and fully understanding what you are doing! | |
http://narod.ru/disk/42530443001.0e30311d03988b1441af1a230ff75381/cs229-lecture01.mp4.html | |
http://narod.ru/disk/42549950001.df5ca2ad03acfb8966c5355a4fe3ed5a/cs229-lecture02.mp4.html | |
http://narod.ru/disk/42546357001.d1f9995700adac70e00559a6452511a1/cs229-lecture03.mp4.html | |
http://narod.ru/disk/42542436001.cedbbb61da74f59b5b60b4dc20a1d3d9/cs229-lecture04.mp4.html | |
http://narod.ru/disk/42538713001.ed1c3af0e4ce66cdd579043713a57007/cs229-lecture05.mp4.html |
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
-module(fib_gen). | |
-export([generator/0]). | |
generator() -> | |
receive | |
{A, B} -> | |
NewA = B, | |
NewB = A + B, | |
self() ! {NewA, NewB} | |
after 0 -> |
NewerOlder