based on Python concept of dictionary type, provides access to assocc array
dictionary slownik;
dictionary *wikipedia=new dictionary;
const express=require('express'); | |
const johnnyFive=require("johnny-five"); | |
const app=express(); | |
const port=3000; | |
const board=new johnnyFive.Board({port:"COM8"}); | |
class AnubisLightsControll{ | |
constructor(name,pin){ | |
this.pin=pin; | |
this.name=name; |
/* | |
ipac-maco.js | |
Sett Sarverott | |
2020 | |
*/ | |
function ipacCoding(ipAddress){ | |
//console.log(ipAddress); | |
var cryptoip=[]; | |
ipAddress.split(".").forEach(function(data){ |
#ifndef DATE_H | |
#define DATE_H | |
/* Sarverott 2020 */ | |
//#include <iostream> | |
//using namespace std; | |
class date{ | |
public: | |
int year=0; |
#ifndef TIME_H | |
#define TIME_H | |
/* Sarverott 2020 */ | |
//#include <iostream> | |
//using namespace std; | |
class time{ | |
private: | |
int hour=0; |
#ifndef CHAR_STRING | |
#define CHAR_STRING | |
/* Sarverott 2020 */ | |
class charString{ | |
public: | |
static char* leftTrim(char* input, char trimmer=' '){ | |
int index=0; | |
int cutFlag=0; | |
bool cutting=false; | |
char* output=new char(); |
/* | |
Sett Sarverott | |
core-sheme.js | |
summer 2019 | |
*/ | |
class Core{ | |
constructor(opts={}){ | |
this.opts=this.defaults(opts); | |
this.init(); |
const tcpServer=require("./tcp-server.js"); | |
var server=new tcpServer(80); | |
server.setupServeListener(function(){ | |
console.log("START SERVER on port "+this.port); | |
}); | |
server.setupConnectListener(function(conn){ | |
console.log("client connected!!! "+conn.remoteAddress); | |
}); | |
server.setupDataProcessor(function(data, conn){ | |
console.log(data); |
/* | |
USAGE: | |
*/ | |
const tcpClient=require("./tcp-client.js"); | |
var request=new tcpClient("192.168.0.1", 80); | |
request.setupConnectListener(function(){ | |
console.log('connected to server!'); | |
}); | |
request.setupDataListener(function(data){ | |
console.log(data); |
class DNA{ | |
constructor(mode, config){ | |
this.aminoAcidsArray=this.generateRandomDNA(config.len); | |
break; | |
} | |
generateRandomDNA(chainLength=20, allows=["A","C","G","T"]){ | |
var tmp=[]; | |
for(var i=0;i<chainLength;i++){ | |
tmp.push(allows[Math.floor(Math.random()*allows.length)]); | |
} |