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
'use strict'; | |
const fs = require('fs'); | |
const xml2js = require('xml2js'); | |
const request = require('request') | |
const parser = xml2js.Parser(); | |
const { v4: uuidv4 } = require('uuid'); | |
const download = (url, path, callback) => { | |
request.head(url, (err, res, body) => { |
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
//Here's a lock free stack I made (ripped off from Herb) using c++20 atomic shared_ptr, maybe it gives you some ideas: | |
template <typename T> | |
class LockFreeStack { | |
struct Node { | |
T t; | |
shared_ptr<Node> next; | |
}; | |
atomic<shared_ptr<Node>> head; |
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
/* | |
This is a version (aka dlmalloc) of malloc/free/realloc written by | |
Doug Lea and released to the public domain, as explained at | |
http://creativecommons.org/licenses/publicdomain. Send questions, | |
comments, complaints, performance data, etc to [email protected] | |
* Version 2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee) | |
Note: There may be an updated version of this malloc obtainable at | |
ftp://gee.cs.oswego.edu/pub/misc/malloc.c |
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
//Conway's Game of Life | |
// The universe of Conway's Game of Life is an infinite, two-dimensional orthogonal grid of cells, each of which is in one of two possible states: alive or dead. Every cell interacts with its eight neighbors, which are the cells that are horizontally, vertically, or diagonally adjacent (upper left, top, upper right, right, lower right, bottom, bottom left, left). At each step in time, the following transitions occur: | |
// Any live cell with fewer than two live neighbors dies due to under-population. | |
// Any live cell with two or three live neighbors lives on to the next generation (no change). | |
// Any live cell with more than three live neighbors dies due to overpopulation. | |
// Any dead cell with exactly three live neighbors becomes a live cell by reproduction. | |
// The initial pattern constitutes the seed if the system (starts it off). The first generation is created by applying the above rules simultaneously to every cell in the seed; births and deaths occur simultaneously, and the discrete |
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 <signal.h> | |
#include <syslog.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> |
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 <dirent.h> | |
#include <iterator> | |
#include <cstdlib> | |
#include <cstring> | |
#include <sstream> | |
#include <iostream> | |
#include <stdlib.h> | |
#include <string> | |
#include <sys/stat.h> | |
#include <syslog.h> |
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 <windows.h> | |
void GenerateKey(int vk, BOOL bExtended); | |
int main() | |
{ | |
GenerateKey('A', FALSE); | |
GenerateKey(VK_CAPITAL, TRUE); | |
GenerateKey('A', FALSE); |
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
/* | |
Copyright (c) Microsoft Corporation | |
The following code example exercises the Windows Firewall profile; displays the current profile, turns off the firewall, | |
turns on the firewall, and adds an application. | |
*/ | |
#include <windows.h> | |
#include <crtdbg.h> | |
#include <netfw.h> |
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
/** | |
* | |
* MOVED TO: https://github.com/iFind/html5MultidimensionalStorage | |
* | |
* This methods extends the default HTML5 Storage object and add support | |
* to set and get multidimensional data | |
* | |
* @example Storage.setObj('users.albums.sexPistols',"blah"); | |
* @example Storage.setObj('users.albums.sexPistols',{ sid : "My Way", nancy : "Bitch" }); | |
* @example Storage.setObj('users.albums.sexPistols.sid',"Other songs"); |
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 | |
public function get_dir(Request $request) | |
{ | |
$root = base_path() . DIRECTORY_SEPARATOR; | |
// "C:\Users\fizikci\Desktop\dev\la1\" | |
$postDir = rawurldecode(base_path($request->get('dir'))); |
NewerOlder