A few couple week’s ago a wondering what’s is the different making WAP (Web Application Project) and WSP (Website Project) in VS2010
And i got an interesting answer after i search in google a few minute ago, here’s the link Web Application Project VS Web Site an interesting reference if we confuse choosing the right project type 😀
Update my Blog with some C Programming
Ok, to busy in live, and i don’t have time to update my blog 🙁
So, today i got some exam with C Programming and turn out bad
here some code i work on in the exam, a little bit messy code 🙂
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #include <stdio.h> void main() { int xn, yn, i, j, x[4], y[4], done = 0, jalan, gerakan[100], jml = 0, temp; scanf("%d %d", &xn, &yn); int papan[xn][yn]; for(i = 0; i < 4;i++) { scanf("%d %d", &x[i], &y[i]); } scanf("%d", &jalan); i = 0; while(jalan > 0) { temp = (jalan/10)*10; gerakan[i] = jalan - temp; jalan = temp/10; jml++; i++; } for(i = 0;i < yn;i++ ) { for(j = 0; j < xn; j++) { papan[j][i] = 0; } } for(i = jml-1; i >= 0;i--) { if(gerakan[i] == 1) { if((x[0] + 1) < xn) { x[3] = x[2]; x[2] = x[1]; x[1] = x[0]; y[3] = y[2]; y[2] = y[1]; y[1] = y[0]; x[0]++; } } else if(gerakan[i] == 2) { if((y[0] + 1) < yn) { x[3] = x[2]; x[2] = x[1]; x[1] = x[0]; y[3] = y[2]; y[2] = y[1]; y[1] = y[0]; y[0]++; } } else if(gerakan[i] == 3) { if((x[0] - 1) >= 0) { x[3] = x[2]; x[2] = x[1]; x[1] = x[0]; y[3] = y[2]; y[2] = y[1]; y[1] = y[0]; x[0]--; } } else if(gerakan[i] == 4) { if((y[0] - 1) >= 0) { x[3] = x[2]; x[2] = x[1]; x[1] = x[0]; y[3] = y[2]; y[2] = y[1]; y[1] = y[0]; y[0]--; } } } printf("\n"); for(i = 0; i < 4; i++) { papan[x[i]][y[i]] = 1; } for(i = 0;i < yn;i++ ) { for(j = 0; j < xn; j++) { printf("%d ", papan[j][i]); } printf("\n"); } } |
So first input the size of the matrix x X y
and then put the snake coordinate x y
put the snake body coordinate
and the last one is for the tail
and then put some integer value from 1 to 4
the rule is 1 to go right, 2 to go down, 3 to go left, and 4 to go up
I hope this helpful to who ever read this 😀
Vacation to Belitung Indonesia
Here’s some picture from my vacation to belitung





My Bad
I forgot to update my site, my bad.
Math With Latex and PMath
Today i’m trying wordpress plugin for math, so here some example :
Using latex
Using pmath
[pmath size=16]\alpha, \theta, \upsilon, \beta, \vartheta, \pi, \phi, \gamma, \iota, \varpi, \varphi, \delta[/pmath]
[pmath size=16]\kappa, \rho, \chi, \epsilon, \lambda, \varrho, \psi, \varepsilon, \mu, \sigma, \omega, \zeta [/pmath]
[pmath size=16]\nu, \varsigma, \eta, \xi, \tau, \Gamma, \Lambda, \Sigma, \Psi, \Delta, \Xi, \Upsilon, \Omega, \Theta, \Pi, \Phi[/pmath]
[pmath size=16]P(\overline{x} – z_{\alpha/2} * {\sigma/\sqrt{n}} < \mu < \overline{x} + z_{\alpha/2} * {\sigma/\sqrt{n}})[/pmath] [pmath size=16](\overline{x} - t_{\alpha/2, n-1} * {S/\sqrt{n}} , \overline{x} + t_{\alpha/2, n-1} * {S/\sqrt{n}})[/pmath] [pmath size=16]n = (2z_{\alpha/2} * {\sigma/w})[/pmath]
