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
# pip install neo4j-driver | |
from timeit import default_timer | |
from neo4j import GraphDatabase, basic_auth | |
# http://localhost:7474/browser/ | |
# cypher-shell | |
# export the DB: | |
# systemctl stop neo4j |
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> | |
using namespace std; | |
//TODO: functii (cu si fara globale) | |
//TODO: verificare remiza inainte de a se umple tabla | |
//TODO: verificare mutare valida (in interiorul campului de joc) | |
//TODO: verificare mutare valida (pozitia in campul de joc e libera) | |
//TODO: optimizare verificare castigator pe diagonale intr-o singura conditie (hint: elementul din centru) |
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 <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#define ERR(s, f) do { perror(s); if(f) exit(1); } while(0) | |
const char *resp200 = "HTTP/1.1 200 OK\r\n" | |
"Content-Type: text/html; charset=utf-8\r\n\r\n" | |
"<!DOCTYPE html><html><head><meta charset=\"utf8\">" |
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
#ifndef HTTPREQUESTHANDLER_H | |
#define HTTPREQUESTHANDLER_H | |
#include <QObject> | |
#include "httprequest.h" | |
#include "httpresponse.h" | |
class HTTPRequestHandler : public QObject | |
{ |
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 "foo.h" | |
#include <QThread> | |
#include <QDebug> | |
Foo::Foo(int d, QObject *parent) : | |
QObject(parent), data(d) | |
{ | |
} |
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 | |
class Foo{ | |
public $foo = TRUE; | |
} | |
class Factory{ | |
public static function create($Product){ | |
return new $Product; | |
} |
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 <vector> | |
#include <iostream> | |
template <typename T> | |
std::vector<T> qs(std::vector<T> v){ | |
std::vector<T> smaller, greater; | |
T pivot; | |
if(!v.size()){ | |
return smaller; |
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
import Data.List | |
doubleMe x = x + x | |
doubleUs x y = doubleMe x + doubleMe y | |
doubleSmallNumber x = | |
if x > 100 | |
then x | |
else | |
doubleMe x |
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> | |
int main(){ | |
const int FOO = 24; | |
int bar = 42; | |
bar++; | |
printf("%i %i\n", FOO, bar); | |
} |
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> | |
int main(){ | |
int bar = 42; | |
const int *foo = &bar; | |
foo = (int*)45; | |
printf("foo: %d\n", foo); | |
} |
NewerOlder