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
function setup() { | |
x = $("#myContainer").width(); /* myContainerı istediğinle değiştir */ | |
y = $("#myContainer").height(); /* bunuda */ | |
var mycanvas = createCanvas(x, y); | |
mycanvas.parent("myContainer"); /* id ile seçiyor classla değil */ | |
fill("#FF9F1C"); | |
/*istersen gölge ekle */ | |
// drawingContext.shadowOffsetX = 1; | |
// drawingContext.shadowOffsetY = -1; |
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
// ▄▄▄▄ █ ██ ███▄ █ ▓█████ ██▓ ▄▄▄ ███▄ █ | |
// ▓█████▄ ██ ▓██▒ ██ ▀█ █ ▓█ ▀ ▓██▒ ▒████▄ ██ ▀█ █ | |
// ▒██▒ ▄██▓██ ▒██░ ▓██ ▀█ ██▒▒███ ▒██░ ▒██ ▀█▄ ▓██ ▀█ ██▒ | |
// ▒██░█▀ ▓▓█ ░██░ ▓██▒ ▐▌██▒▒▓█ ▄ ▒██░ ░██▄▄▄▄██ ▓██▒ ▐▌██▒ | |
// ░▓█ ▀█▓▒▒█████▓ ▒██░ ▓██░░▒████▒ ░██████▒▓█ ▓██▒▒██░ ▓██░ | |
// ░▒▓███▀▒░▒▓▒ ▒ ▒ ░ ▒░ ▒ ▒ ░░ ▒░ ░ ░ ▒░▓ ░▒▒ ▓▒█░░ ▒░ ▒ ▒ | |
// ▒░▒ ░ ░░▒░ ░ ░ ░ ░░ ░ ▒░ ░ ░ ░ ░ ░ ▒ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ | |
// ░ ░ ░░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ | |
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ | |
// ░ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// A system of particles that respond to Attraction / Repulsion Forces. | |
var particles = []; | |
function setup() { | |
x = $("#myContainer").width(); /* myContainerı istediğinle değiştir */ | |
y = $("#myContainer").height(); /* bunuda */ | |
var mycanvas = createCanvas(x, y); | |
mycanvas.parent("myContainer"); /* id ile seçiyor classla değil */ |
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 request = require("request"); | |
var moment = require("moment"); | |
var fs = require("fs"); | |
var sonuclar = []; | |
fs.unlink('deneme.txt', (err) => { | |
if (err) throw err; | |
console.log('successfully deleted denem.txt'); | |
}); | |
var day = moment("1996-11-16"); |
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
//http://stackoverflow.com/a/966938 | |
function createArray(length) { | |
var arr = new Array(length || 0), | |
i = length; | |
if (arguments.length > 1) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
while(i--) arr[length-1 - i] = createArray.apply(this, args); | |
} |
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
function getRandomString(n) { | |
var n = n || 9; | |
var letters = '0123456789ABCÇDEFGĞHİIJKLMNOÖPRSŞTUÜVYZabcçdefgğhıijklmnoöprsştuüvyz'.split(''); | |
var returnString = ""; | |
for (var i = 0; i < n; i++) { | |
returnString += letters[~~(Math.random() * letters.length)]; | |
} | |
return returnString; | |
} |
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
let filledArr = (len) => { | |
let arr = new Uint8Array(len); | |
while (--len >= 0) { | |
arr[len] = Math.random() * 255; | |
} | |
return arr; | |
} | |
console.time("this"); | |
let arr = filledArr(1e5); |
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 app = new PIXI.Application(innerWidth, innerHeight, { backgroundColor: 0x1099bb, antialias: true }); | |
document.getElementById("myContainer").appendChild(app.view); | |
var container = new PIXI.Container(); | |
var graphics = new PIXI.Container(); | |
app.stage.addChild(graphics); | |
/* |
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
let fs = require("fs"); | |
let wr = fs.createWriteStream("./humans"); | |
let stream = require("stream"); | |
Number.prototype.toHex = function(digits = 2) { | |
let l = this.valueOf().toString(16); | |
if (digits - l.length <= 0) { | |
return l | |
} else { | |
return Array((digits - l.length) + 1).join("0") + l | |
} |
OlderNewer