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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use IO::Socket; | |
sub random_name { | |
my @name=("Somsak","Somsee","Somchai","Sommay","Somrede","Sommud","Sombut","Somluk","Somji","Somga","Somtom","Sommanod","Som","Somsed","Somkaru"); | |
my $random=$name[rand(@name)]; | |
return $random; | |
} |
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
#include <stdio.h> | |
int main() { | |
int a=0,i=2; | |
int test[4][2]; | |
a+=i; | |
test[0][0]=a; | |
test[0][1]=i; | |
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
#!/usr/bin/python | |
num = raw_input("") | |
min = 1000000000 | |
max = 0 | |
for i in range(0,int(num)): | |
input = raw_input("") | |
input = input.split(" ") |
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
#include <stdio.h> | |
int main() { | |
float fsum1, fsum2; | |
double dsum1, dsum2; | |
int i,n; | |
printf ("%5s%11s%11s%11s%11s%15s%15s\n","N","Float S1","Float S2","Double S1","Double S2","Error S1","Error S2"); | |
for (n=1000;n<=10000;n+=1000) { | |
fsum1=fsum2=dsum1=dsum2=0; |
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
#include <iostream> | |
#include <string> | |
#include <cstring> | |
using namespace std; | |
//reverse string | |
string bt_reverse(string input) { | |
return string(input.rbegin(),input.rend()); | |
} |
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
#include <iostream> | |
#define OVERFLOW 2 | |
#define ROW b_len | |
#define COL a_len+b_len+OVERFLOW | |
using namespace std; | |
string add (string &s1, string &s2){ | |
int carry=0,sum,i; |
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
import ucigame.*; | |
public class Pong extends Ucigame | |
{ | |
Sprite ball; | |
Sprite paddle; | |
boolean checkDrag; | |
public void setup() | |
{ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int cmp_array(const void *a, const void *b) { | |
int *aa=(int *)a; | |
int *bb=(int *)b; | |
return aa[0] - bb[0]; | |
} | |
int main() { |
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
#include <stdio.h> | |
#include <math.h> | |
const double ROOT3 = 1.73205080756887729352744634150587236694280525381; | |
double f(double x) { | |
return (x*x - 3); | |
} | |
double df(double x) { |
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://sourceforge.net/projects/pywin32/ | |
http://pyserial.sourceforge.net/ | |
http://www.wxpython.org/download.php#stable | |
http://www2.fibo.kmutt.ac.th/fiboweb/2013/index.php/th/th-research/fibo-opensource-th/menu-open-fibopylibs-th |
OlderNewer