ITeye博客

PPJAVA 之家

ppjava · 共 69 篇文章

如何在 ubuntu 上使用命令配置无线网卡(2)

cat /etc/network/interfaces auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp wpa-ssid N001 wpa-psk xxxxx

2014-08-06 15:00 · linux · 评论(0)

如何在 ubuntu 上使用命令配置无线网卡

http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=186240 iwlist wlan0 scan ##列出有效的无线网络 iwconfig wlan0 essid <wireless network name> ## 连接没有设密码的无线网络 iwconfg wlan0 essid <wireless network name> key <password> ##连接有密码的无线网络 ifconfig wlan0 up ## 转用无线网卡 dhclient wlan0 or dhcpcd wlan0 ## 让无线自动获得IP.

2014-08-06 12:06 · linux · 评论(0)

用route命令添加永久路由

使用双网卡,同时使用2个网关的时候就需要加一条静态路由了。当然还有很多时候会需要加路由。 一:使用 route 命令添加 使用route 命令添加的路由,机器重启或者网卡重启后路由就失效了,方法: //添加到主机的路由 # route add –host 192.168.1.11 dev eth0 # route add –host 192.168.1.12 gw 192.168.1.1 //添加到网络的路由 # route add –net 192.168.1.11 netmask 255.255.255.0 eth0 # route add –net 192.168.1.11 netma…

2014-08-06 12:04 · linux · 评论(0)

Openssl生成根证书、服务器证书并签核证书

http://blog.csdn.net/gloomuu/article/details/4456501 Step 1. Create key (password protected) openssl genrsa -out prvtkey.pem 1024/2038 (with out password protected) openssl genrsa -des3 -out prvtkey.pem 1024/2048 (password protected) 这个命令会生成一个1024/2048位的密钥。 Step 2. Create certification request open…

2014-08-06 09:42 · linux · 摘录 · 评论(0)

用Iptables 限制网速

1.配置iptables转发(略) 2.限速脚本 vi /root/xiansu.sh #!/bin/bash 限制 60/s 相当于 7KB/s /sbin/iptables -F FORWARD #限制网段 for ((i = 1; i < 253; i++)) do /sbin/iptables -A FORWARD -s 192.168.2.$i -m limit \ --limit 60/s -j ACCEPT /sbin/iptables -A FORWARD -s 192.168.2.$i -j DROP done #限制单个ip /sbin/iptables -A FORWA…

2013-12-25 17:14 · linux · 摘录 · 评论(0)

linux 搜索一个字符串再哪个文件中

Finding all files containing a text string in linux http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-in-linux find / -type f -exec grep -H 'text-to-find-here' {} \;

2013-12-08 10:19 · 评论(0)

服务器软件的App store

http://bitnami.com/stacks Bitnami is an app store for server software. Install your favorite applications in your own servers or run them in the cloud . Select one app to get started or learn more about what makes Bitnami special.

2013-12-08 10:17 · 评论(0)

IE不刷新页面怎么办

Select Tools >> Internet Options . Click the Settings button in Browsing History . Select the Every time I visit the webpage radio button. Click OK to close the Settings dialog. Click OK to close the Internet Options dialog.

2012-12-13 16:06 · javascript · css · 评论(0)

Android 照相机转到真确的方向

private void setRightCameraOrientation(int cameraId, Camera mCamera) { CameraInfo info = new android.hardware.Camera.CameraInfo(); Camera.getCameraInfo(cameraId, info); int rotation = this.getWindowManager().getDefaultDisplay() .getRotation(); int degrees = 0; switch (rotation) { case Surface.ROTAT…

2012-09-26 10:56 · google · 评论(1)

Android 跳到一个新的Activity

button.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { // Starting Another Activity Intent intent = new Intent(TestActivity.this , T2Activity.class); //EditText editText = (EditText) findViewById(R.id.edit_message); //String message = editText.getText().toString();…

2012-09-21 16:31 · 评论(0)

Android 代码生成界面Sample

package com.example; import com.example.hyptest.R; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.LinearLayout; pu…

2012-09-21 16:30 · 评论(1)

windows 下 php5.4的安装记录

1. 必须下载 VC9 x86 Thread Safe 只有这个版本才包含 php5apache2_2.dll 文件 下面是简单的配置信息: LoadModule php5_module "C:/work/php-5.4.7/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/work/php-5.4.7"

2012-09-20 15:27 · 评论(0)

【Android】文件读写操作(含SDCard的读写)

http://blog.csdn.net/kesenhoo/article/details/6531194 在AndroidManifest文件下添加SDCard的读写权限 <!-- 在SDCard中创建与删除文件权限 --> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> <!-- 往SDCard写入数据权限 --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 2.文件操作的…

2012-09-12 16:03 · 评论(0)

openssl生成pem

openssl生成pem(转) 使用OpenSSL生成证书 首先得安装OpenSSL软件包openssl,安装了这个软件包之后,我们可以做这些事情: o Creation of RSA, DH and DSA Key Parameters # 创建密钥 key o Creation of X.509 Certificates, CSRs and CRLs # 创建证书 o Calculation of Message Digests # o Encryption and Decryption with Ciphers # 加密、解密 o SSL/TLS Client and Server T…

2012-08-24 16:00 · 评论(0)

scilab 微积分的应用

scilab 微积分的应用 1:scilab 计算微分的指令是diff(); diff每对函数微分一次,矩阵内数值减少一; 例如:x=1:10; y=x^3; diff(y) //(y(x+1)-y(x))/1;因此,在作微分时需要修正。 diff(y,2) diff(y,3) 2:积分 integrate('待积分式子','变数',积分下界,积分上界) 例如:integrate('exp(-s)','s',0,4) 3:integrate 求解不连续函数的积分 格式:integrate('if..then...else...end','变数',下界,上界) 例如:integrate('if…

2012-08-12 10:17 · 评论(0)