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
/** | |
* @toanalien | |
*/ | |
var net = require('net'); | |
var server = net.createServer(); | |
var sockets = []; | |
server.on('connection', function(socket) { | |
console.log('got a new connection'); |
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> | |
int main() | |
{ | |
unsigned long int x,z,i,j , n, max; | |
while (scanf("%lu %lu", &x, &z) == 2) | |
{ | |
if (x > z) | |
{ | |
i = z; |
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> | |
int main() | |
{ | |
int z = 123456; | |
while (z/10 !=0) | |
{ | |
printf("%d", z%10); | |
z = (z-z%10)/10; | |
} | |
printf("%d", z); |
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> | |
int flip_number(int n) | |
{ | |
int temp = 0; | |
while (n/10 !=0) | |
{ | |
temp += n%10; | |
temp*=10; | |
n = (n-n%10)/10; | |
} |
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> | |
#include <string.h> | |
/** | |
* Return an array of size *returnSize. | |
* Note: The returned array must be malloced, assume caller calls free(). | |
*/ | |
int slip_num(int num) | |
{ |
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
function joinRoom(socket, room) { | |
socket.join(room); | |
currentRoom[socket.id] = room; | |
socket.emit('joinResult', {room: room}); | |
socket.broadcast.to(room).emit('message', {text: nickNames[socket.id] + 'has joined ' + room + '.'}); | |
var usersInRoom = io.sockets.clients(room); | |
if (usersInRoom.length > 1) { | |
var usersInRoomSummary = 'Users currently in ' + room + ': '; | |
for (var index in usersInRoom) { | |
var userSocketId = usersInRoom[index].id; |
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 <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
ifstream cinFile; | |
ofstream coutFile; | |
int n, a, b, c, somon, bien = 0; |
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 <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
fstream f, f_out; | |
int n, a, b, c, somon, bien = 0; |
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 <iostream> | |
#include <fstream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
fstream f, f_out; | |
int n, b, c, somon; |
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
Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-08-19 14:56 SE Asia Standard Time | |
Nmap scan report for mainserver.wi-mesh.com (10.0.0.1) | |
Host is up (0.0020s latency). | |
MAC Address: 00:25:90:CA:9B:66 (Super Micro Computer) | |
Nmap scan report for vpn1.wi-mesh.com (10.0.0.2) | |
Host is up (0.0010s latency). | |
MAC Address: 00:25:90:CA:9B:56 (Super Micro Computer) | |
Nmap scan report for vpn2.wi-mesh.com (10.0.0.3) | |
Host is up (0.0020s latency). | |
MAC Address: 0C:C4:7A:0F:33:B2 (Super Micro Computer) |