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
max_predicate = lambda a, b: a > b | |
def heap_swap(heap, a, b): | |
""" | |
Swaps two elements in array | |
""" | |
t = heap[a] | |
heap[a] = heap[b] | |
heap[b] = t |
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 twig = require('twig').twig; | |
twig({ | |
path: 'tpl.twig', | |
load: function(tpl) { | |
console.log(tpl.render({text: 'Hello, world'})); | |
}, | |
error: function(err) { | |
console.log(':('); | |
} |
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
// nw.js project building script | |
//////////////////////////////////////////////////////////////////////////////////// | |
var BUILD_DIR = './build'; | |
var BUILD_CACHE_DIR = './build_cache'; | |
var PLATFORMS = ['osx64', 'win32', 'linux32', 'linux64']; | |
var NW_VERSION = 'latest'; | |
var BUILD_TYPE = 'versioned'; | |
//////////////////////////////////////////////////////////////////////////////////// |
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 "audioanalyzer.h" | |
AudioAnalyzer::AudioAnalyzer(QObject *parent) : QObject(parent) { | |
this->file = new QFile("c:\\Users\\User\\audioData.txt"); | |
if(this->file->open(QFile::WriteOnly | QFile::Truncate)) { | |
this->txtStream = new QTextStream(this->file); | |
} | |
} | |
void AudioAnalyzer::analyze(const QAudioBuffer &buf) |
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
#!/bin/bash | |
CONTAINER_NAME="onlyoffice_communityserver_1" | |
ONLYOFFICE_HOME="/var/www/onlyoffice" | |
ONLYOFFICE_DATA="$ONLYOFFICE_HOME/server_data" | |
ONLYOFFICE_BACKUP="$ONLYOFFICE_HOME/server_backup" | |
DATE=`date +%F-%H-%M-%S` |