B3rX3rk3R INDE:X
2013년 8월 26일 월요일
2013년 8월 20일 화요일
change the resolution CentOS in VMware
# vi /etc/grub.conf
go to your kernel
title OS (kernel version)
root
kernel /boot/vmlinuz-kernel ~~ quiet vga=code
initrd
0x333 : 1024x768 16 bits
0x341 : 1024x768 32 bits
0x334 : 1152x864 16bit
0x342 : 1152x864 32bit
0x362 : 1280x720 8 bits
0x363 : 1280x720 16 bits
0x364 : 1280x720 32 bits
0x377 : 1280x768 8 bits
0x378 : 1280x768 16 bits
0x379 : 1280x768 32 bits
0x368 : 1280x800 8 bits
0x369 : 1280x800 16 bits
0x36A : 1280x800 32 bits
0x335 : 1280x960 16 bits
0x343 : 1280x960 32 bits
0x336 : 1280x1024 16 bits
0x344 : 1280x1024 32 bits
0x34A : 1366x768 8 bits
0x34B : 1366x768 16 bits
0x34C : 1366x768 32 bits
0x36B : 1440x900 8 bits
0x36C : 1440x900 16 bits
0x36D : 1440x900 32 bits
0x337 : 1400x1050 16 bits
0x345 : 1400x1050 32 bits
0x34D : 1680x1050 8 bits
0x34E : 1680x1050 16 bits
0x34F : 1680x1050 32 bits
0x338 : 1600x1200 16 bits
0x346 : 1600x1200 32 bits
0x339 : 1792x1344 16 bits
0x347 : 1792x1344 32 bits
0x33A : 1856x1392 16 bits
0x348 : 1856x1392 32 bits
0x365 : 1920x1080 8 bits
0x366 : 1920x1080 16 bits
0x367 : 1920x1080 32 bits
0x350 : 1920x1200 8 bits
0x351 : 1920x1200 16 bits
0x352 : 1920x1200 32 bits
0x33B : 1920x1440 16 bits
0x349 : 1920x1440 32 bits
0x353: 2048x1536 8 bits
0x354: 2048x1536 16 bits
0x355: 2048x1536 32 bits
if u write "vga=ask" when u boot, select the resolution
go to your kernel
title OS (kernel version)
root
kernel /boot/vmlinuz-kernel ~~ quiet vga=code
initrd
0x333 : 1024x768 16 bits
0x341 : 1024x768 32 bits
0x334 : 1152x864 16bit
0x342 : 1152x864 32bit
0x362 : 1280x720 8 bits
0x363 : 1280x720 16 bits
0x364 : 1280x720 32 bits
0x377 : 1280x768 8 bits
0x378 : 1280x768 16 bits
0x379 : 1280x768 32 bits
0x368 : 1280x800 8 bits
0x369 : 1280x800 16 bits
0x36A : 1280x800 32 bits
0x335 : 1280x960 16 bits
0x343 : 1280x960 32 bits
0x336 : 1280x1024 16 bits
0x344 : 1280x1024 32 bits
0x34A : 1366x768 8 bits
0x34B : 1366x768 16 bits
0x34C : 1366x768 32 bits
0x36B : 1440x900 8 bits
0x36C : 1440x900 16 bits
0x36D : 1440x900 32 bits
0x337 : 1400x1050 16 bits
0x345 : 1400x1050 32 bits
0x34D : 1680x1050 8 bits
0x34E : 1680x1050 16 bits
0x34F : 1680x1050 32 bits
0x338 : 1600x1200 16 bits
0x346 : 1600x1200 32 bits
0x339 : 1792x1344 16 bits
0x347 : 1792x1344 32 bits
0x33A : 1856x1392 16 bits
0x348 : 1856x1392 32 bits
0x365 : 1920x1080 8 bits
0x366 : 1920x1080 16 bits
0x367 : 1920x1080 32 bits
0x350 : 1920x1200 8 bits
0x351 : 1920x1200 16 bits
0x352 : 1920x1200 32 bits
0x33B : 1920x1440 16 bits
0x349 : 1920x1440 32 bits
0x353: 2048x1536 8 bits
0x354: 2048x1536 16 bits
0x355: 2048x1536 32 bits
if u write "vga=ask" when u boot, select the resolution
2013년 8월 17일 토요일
rotating spiral in matrix by python
X,Y = map(int,raw_input().split(' '))
lis = [[-1 for i in xrange(Y)] for j in xrange(X)]
x,y = 0,0
dx,dy = 0,1
count = 0
while lis[x][y] == -1:
lis[x][y] = count
count+=1
x,y = x+dx,y+dy
if x in [-1,X] or y in [-1,Y] or lis[x][y] != -1:
x,y = x-dx,y-dy
dx,dy = dy,-dx
x,y = x+dx,y+dy
for L in lis:
for val in L:
print '%3d'%val,
print
>> 6 6
0 1 2 3 4 5
19 20 21 22 23 6
18 31 32 33 24 7
17 30 35 34 25 8
16 29 28 27 26 9
15 14 13 12 11 10
have fun.
2013년 8월 9일 금요일
피드 구독하기:
글 (Atom)