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 | |
| namespace Test\Bundle\Entity; | |
| use Doctrine\ORM\EntityRepository; | |
| /** | |
| * AdvBaseRepository | |
| * | |
| * This class was generated by the Doctrine ORM. Add your own custom |
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 | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |
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> | |
| #include <stdlib.h> | |
| int main() | |
| { | |
| int d = 0; | |
| char ch, file_name[525]; | |
| FILE *fp; | |
| printf("Enter the name of file you wish to see\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
| var fs = require('fs'); | |
| var path = process.argv.slice(2).pop(); | |
| var start = new Date(); | |
| var readStream = fs.createReadStream(path); | |
| readStream | |
| .on('data', function (chunk) { | |
| }) | |
| .on('end', function () { | |
| var end = new Date(); |
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
| /* | |
| A demo of reading the entire contents of a file. Other than | |
| "echoing" the contents of the file to the console this program | |
| does do anything useful. | |
| The program assumes we have a file called test.dat in the same | |
| directory as the executible. | |
| M. Kesson | |
| 4.12.03 |
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
| /* | |
| from https://stackoverflow.com/questions/14514201/how-to-read-a-binary-file-in-go | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| ) |
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
| const express = require('express') | |
| const app = express() | |
| app.use(express.static('./folder')); | |
| app.listen(3000, function () { | |
| console.log('Example app listening on port 3000!') | |
| }) |
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
| var http = require("http"); | |
| var server = http.createServer(function(request, response) { | |
| console.log(request.headers); | |
| console.log(request.method); | |
| console.log(request.url); | |
| var body = []; | |
| request.on('data', function(chunk) { | |
| body.push(chunk); | |
| }).on('end', function() { |
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
| var primes = []; | |
| for(var i = 3; i < 10; i++){ | |
| var noFactor = true; | |
| //console.log('i = ', i); | |
| for(var factor = 2; factor < i; factor++){ | |
| //console.log('factor = ', factor); | |
| // check whether it has factor | |
| if(i % factor == 0){ | |
| noFactor = false; | |
| break; |
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
| sudo npm install node-gyp -g | |
| sudo npm install sqlite3 | |
| cd node_modules/sqlite3 | |
| sudo node-gyp configure --module_name=node_sqlite3 --module_path=../lib/binding/electron-v1.8-darwin-x64 | |
| sudo node-gyp rebuild --target=1.8.1 --arch=x64 --target_platform=darwin --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/electron-v1.8-darwin-x64 | |
| #ref | |
| #https://stackoverflow.com/questions/38716594/electron-app-cant-find-sqlite3-module | |
| #https://stackoverflow.com/questions/32406397/using-nodejs-plugins-in-elelectron/32415283 | |
| #https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md |