Skip to content

Instantly share code, notes, and snippets.

View montreal91's full-sized avatar
💭
Set your status

Alexander Nefedov montreal91

💭
Set your status
  • Belgrade, Serbia
View GitHub Profile
@montreal91
montreal91 / scons_debug.txt
Last active February 23, 2018 06:02
SCons debug file
DEBUG:root:trying to find VC 14.1
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
DEBUG:root:found VC 14.1
DEBUG:root:trying to find VC 14.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
DEBUG:root:found VC 14.0
DEBUG:root:trying to find VC 14.0Exp
DEBUG:root:find_vc_dir(): no VC registry key 'Microsoft\\VCExpress\\14.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 14.0Exp
DEBUG:root:trying to find VC 12.0
@montreal91
montreal91 / series.sql
Last active March 13, 2017 20:12
Select final series for club
SELECT *
FROM playoff_series
WHERE user_pk = :userpk
AND season_n = :season
AND (
top_seed_pk = :club_pk OR low_seed_pk = :club_pk
)
AND round_n = (
SELECT Max(round_n)
FROM playoff_series
@montreal91
montreal91 / from_statement.py
Last active February 17, 2017 07:26
Awesome sqlalchemy example
class User(db.Model):
id = db.Column(...)
username = db.Column(...)
session.query(User).filter(text("id<:value and name=:name")).params(value=224, name='fred').order_by(User.id).one()
// Returns <User(name='fred', fullname='Fred Flinstone', password='blah')>
sudo apt-get remove geany
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
geany-common
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
geany geany-plugin-scope geany-plugins-common
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
if __name__ == '__main__':
import time
last_time = time.time()
tick = 1
time_since_last_update = 0
while True:
new_time = time.time()
dt = new_time - last_time
time_since_last_update += dt
last_time = new_time
var point_x = {
coord_x : 0,
coord_y : 0,
PrintCoordinates : function() {
console.log(this.coord_x, this.coord_y);
}
}
@montreal91
montreal91 / hw.dart
Created July 23, 2016 07:19
hello world with dart
import 'dart:html';
add_my_div() {
DivElement div = querySelector("#dumb-id");
div.text = "This is my div!";
DivElement div2 = new DivElement();
div2.text = "<b>This is my inner div!</b>";
div.children.add(div2);
}
SELECT to_char(d_pay, 'MM'), sum(n_sum)
FROM payment
WHERE to_char(d_pay, 'yyyy') = '2008'
GROUP BY to_char(d_pay, 'MM')
SELECT to_char(d_computation, 'MM'), sum(n_difference_hot + n_difference_cold)
FROM computation
GROUP BY to_char(d_computation, 'MM')
ORDER BY to_char(d_computation, 'MM')
@montreal91
montreal91 / main.c
Created May 8, 2016 11:48
linked_list
//---------------------------------------------------------------------------
// #include <iostream.h>
// #include <vcl.h>
#pragma hdrstop
#include <stdio.h>
// #include <windows.h>
#include <time.h>
#include <stdlib.h>
#include <math.h>
// #include <list>
/.
/usr
/usr/src
/usr/src/gtest
/usr/src/gtest/src
/usr/src/gtest/src/gtest-port.cc
/usr/src/gtest/src/gtest-typed-test.cc
/usr/src/gtest/src/gtest-internal-inl.h
/usr/src/gtest/src/gtest_main.cc
/usr/src/gtest/src/gtest-test-part.cc