[ubuntu]How to install gcc-3.4 in ubuntu

2016-2-18 写技术

wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4-base_3.4.6-6ubuntu3_amd64.deb dpkg --force-depends -i gcc-3.4-base_3.4.6-6ubuntu3_amd64.deb wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4_3.4.6-6ubuntu3_amd64.deb dpkg --force-depends -i gcc-...

阅读全文>>

标签: ubuntu

评论(0) 浏览(1790)

[php]An example of excel output

2016-2-18 写技术

<?php header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=Export_test.xls"); $tab="\t"; $br="\n"; $head="NO.".$tab."Message".$br; echo $head.$br; echo "test321318312".$tab; echo "string1"; echo $br; echo "330181199006061234".$tab...

阅读全文>>

标签: php

评论(0) 浏览(1504)

[C]比最简单的程序更简单的C程序

2016-2-2 写技术

在C语言里面,你以为"Hello world"真的就是最简单的程序了么? Anycle来告诉你,还有比“Hello world”更简单的C语言程序,我们直接上代码: void main(){} 哈哈,看到没,简单吧,没有头文件,没有任何输入,没有任何输出,没有任何动作。 gcc 编译后只有8K左右。

阅读全文>>

标签: C

评论(0) 浏览(1495)

[C]gettimeofday()

2016-2-2 写技术

#include <stdio.h> #include <sys/time.h> #include <string.h> void test_gettimeofday(){ struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); printf("tv.tv_sec = %d , tv.tv_usec = %d \n", tv.tv_sec, tv.tv_usec); prin...

阅读全文>>

标签: C

评论(0) 浏览(1511)

[C]strtok()

2016-2-2 写技术

#include <stdio.h> #include <string.h> void main(){ char str[] = "i am nicholas"; char *ret = NULL; ret = strtok(str, " "); printf("ret:%s\n", ret); while(ret = strtok(NULL, " ")){ printf("ret:%s\n", ret); } }

阅读全文>>

标签: C

评论(0) 浏览(1447)

[C]Why function getenv() return a minus value

2016-2-2 写技术

In the case include no stdlib.h file, the function getenv() return a minus value. #include <stdio.h> #include <stdlib.h> void main(){ int rc; char *env = NULL; env = getenv("LIB"); printf("&env = %d \n", env); if(env){ printf("config home:%d\n", env); } ...

阅读全文>>

标签: C

评论(0) 浏览(1570)

[C]GetEnvironmentVariable function

2016-2-1 写技术

Retrieves the contents of the specified variable from the environment block of the calling process. Syntax: DWORD WINAPI GetEnvironmentVariable(   _In_opt_  LPCTSTR lpName,   _Out_opt_ LPTSTR  lpBuffer,   _In_      DWORD   nSize ); Parameters...

阅读全文>>

标签: C

评论(1) 浏览(1638)

[ubuntu]How to install and config samba in ubuntu

2016-2-1 写技术

1、使用下列命令安装samba sudo apt-get install samba sudo apt-get install smbfs Or: sudo apt-get install samba samba-common 2、创建一个文件夹 mkdir ~/UbuntuShare sudo chmod 777 ~/UbuntuShare 3、添加一个用户 sudo useradd ShareUseName 4、配置samba ①备份一下配置文件 sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak ②...

阅读全文>>

标签: ubuntu

评论(0) 浏览(1450)

[JS]一段特别代码分分钟让设备死机

2016-1-22 写技术

<html> <body> <script> var total=""; var i=1; while(i++){ total = total+i.toString(); history.pushState(0,0,total); } </script> </body> </html>

阅读全文>>

标签: JS

评论(0) 浏览(1532)

[php]PHP中数组的复制

2016-1-20 写技术

在PHP中有一个数组 $a=array("a","b","c"); 另有一个数组 $b=array(); 如果你这样传值: $b=$a; 这其实是传的指针,当a改变,b也会跟着变。 正确的做法: foreach($a as $ele){ $b[] = $ele; }

阅读全文>>

标签: php

评论(0) 浏览(3674)

Powered by anycle 湘ICP备15001973号-1