Skip to content

Instantly share code, notes, and snippets.

View Aracturat's full-sized avatar
🎯
Focusing

Nikolay Dozmorov Aracturat

🎯
Focusing
  • Novosibirsk
View GitHub Profile
export class Row extends BasePageObject {
@selector('#element')
public rowElement: Element;
public clickCheckboxes() { }
}
export class List extends BasePageObject {
@Aracturat
Aracturat / functionToSQL.ts
Last active November 8, 2017 14:53
Function To SQL
import * as ts from 'typescript';
class Test {
public ParamString: string;
public ParamInt: number;
public ParamString2: string;
}
class Collection<T> {
@Aracturat
Aracturat / ts
Created August 4, 2017 18:33
Function to SQL
import { debug } from 'util';
import * as ts from 'typescript';
function getArrowFunction(func: Function): ts.ArrowFunction {
let src = ts.createSourceFile("test.ts", func.toString(), ts.ScriptTarget.ES2016, false);
var expr = <ts.ExpressionStatement> src.statements[0];
return <ts.ArrowFunction> expr.expression;
}
function toSql(expr: ts.Node): string {
// ==UserScript==
// @name Add statistics to Memrise
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.memrise.com/home/
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Deutsche letters
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Change letters to umlaut letters
// @author Nikolay Dozmorov
// @match http://*/*
// @match https://*/*
// @grant none
// ==/UserScript==
For[i = 1, i <= pointNumber - 1, i++,
x[[i + 1]] = x[[i]] + v[[i]] * dt + 1 / 8 * (5 * a[[i]] - a[[i - 1]]) * dt^2;
a[[i + 1]] = -dU[x[[i + 1]]] / m / 836700;
v[[i + 1]] = v[[i]] + 1 / 8 * (3 * a[[i + 1]] + 6 * a[[i]] - a[[i - 1]]) * dt;
]
void MainWindow::updateView()
{
for (int x = 0; x < world -> getHeight(); x++)
{
for(int y = 0; y < world -> getWidth(); y++)
{
if (world -> getStatusOfCell(x, y)) {
pushButton[x*world->getHeight() + y]->setGeometry(x*BUTTON_HEIGHT, y*BUTTON_WIDTH, std::rand() % BUTTON_HEIGHT, std::rand() % BUTTON_WIDTH);
QString r = QString::number(std::rand() % 256, 16);
using System;
using System.Threading;
namespace DelegateTest
{
class Algorithm
{
public int Key { get; set; }
}
#include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
double polynom(double x, double a[], int n)
{
double p_val = 0; // p_val не очень говорящее название переменной. Лучше написать что-то типа sum