One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/*----- Find host name from IP address -----*/ | |
#include <stdio.h> | |
#include <netdb.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
int main(int argc, char* argv[]){ | |
struct hostent* hent; // host structure |
#include <stdio.h> | |
float H(int); // Histogram data function | |
int value = 0; // color value [0-255] used in result | |
int result[255]; // store the ranges | |
int max_recursion = 8; // 8 recursion as mentioned in paper 2^8 = 256 intervals | |
/** | |
* Find intermediate cut C for which sum(H[start-C]) is equal to sum(H[C-end]) | |
* for a given range |
ffmpeg -i input.mp4 -vf "fps=30" -loop 0 output.gif |
// Source: https://medium.com/@amatewasu/how-to-record-a-canvas-element-d4d0826d3591 | |
const canvas = document.getElementsByTagName('canvas')[0] | |
const videoStream = canvas.captureStream(30) | |
const mediaRecorder = new MediaRecorder(videoStream) | |
var chunks = [] | |
mediaRecorder.ondataavailable = function (e) { | |
chunks.push(e.data) | |
} | |
var video = document.createElement('video') |
performance | |
.getEntries() | |
.filter(({entryType}) => entryType === "resource") | |
.map(p => p.name) | |
.filter(domain => !domain.match(new RegExp(`^${window.location.origin}`))) |
npm i -g pm2
pm2 start --no-daemon npm -- start
// For: https://www.reddit.com/r/webdev/comments/1frg8r2/i_built_a_website_that_will_be_won_by_the_first/ | |
// Writeup: https://medium.com/@ankurparihar/count-to-million-challange-javascript-2c1b534c2040 | |
var WebSocketClient = require('websocket').client; | |
var client = new WebSocketClient(); | |
client.on('connectFailed', function(error) { | |
console.log('Connect Error: ' + error.toString()); | |
}); |
function findString(length=1) { | |
// const num1 = String(Math.floor(Math.random() * Math.pow(10, length))); | |
const string1 = new Array(length).fill(Math.floor(Math.random() * 10)).join(""); | |
const string2 = new Array(length).fill("a").join(""); | |
const string3 = new Array(length).fill("a").join(""); | |
console.log(string1 , string2, string3) | |
// create 100000 strings, with only the last string being the matching one |