Soft&Skills

MathType (Equation 公式编辑器) How-To

2012-09-28. Category & Tags: Soft&Skills Soft&Skills

How to use mathtype:

1. Let there be green. #

run !)MathTypePortable.exe and click the left button “安装”.

give any require a “pass”. wait 10 sec.

done, you could close the window now.

2. run the main executable MathType.exe. enjoy! #

 

 

PS:

1. you could paste your latex equation text directly into MathType’s window.

2. you could get the latex text by copying. (need to config Preferences -> Cut and Copy Preferences first).

...

客户端+Gamil的发信地址的问题

2012-09-25. Category & Tags: Soft&Skills Soft&Skills

我有俩Gmail的邮箱, A和B。

在thunderbird里面选择A发送时,收到者看到的是B发送的。

感觉是TB的问题,各种找设置,无果。bug?升级,没用。

使用gmail的C邮箱发信测试,没问题。

难道是因为我配置TB的时候的顺序问题?但这个测试耗费时间太长,太麻烦。

突然想起还有一个可能,gmail的设置。

我在A的google账户配置中,默认使用B帐号发信,测试,果然是因为这个设置。

结论:如果B帐号允许A帐号以B的身份(地址)发信,且在A中默认使用B发信,则客户端的发信地址A会被google的服务器替换为B。这样,发信时看不出问题,但是收信者看到的是B地址。

Matlab In Case Of

2012-08-31. Category & Tags: Soft&Skills Soft&Skills

1. matlab中gradient函数求f=2x2+3y3的梯度的实例 #

http://www.zdh1909.com/html/matlab/9930.html

matlab中gradient函数求f=2x2+3y3的梯度的实例如下:

在上MATLAB课的时候,有学生问怎么用gradient函数求f=2x2+3y3的梯度啊,不懂得怎么写格式,试了很多次都不行.解答如下:
在MATALB中,求梯度只能是求数值梯度,所以必须将函数f离散化,用差分代替微分,精度取决于差分步长,因为现在计算机速度足够快,所以差分可以取得足够小,也不影响计算速度和计算精度.方法如下:
>>X=-6:0.6:6;   %计算区间是[-6 6],步长0.6
>>Y=X;
>>[x,y]=meshgrid(X,Y)    %生成计算网格
>>f=2.*x.^2+3.*y.^3      %计算网格结点上的函数值
>>[Dx,Dy]=gradient(f)    %用数值方法求函数梯度
>>quiver(X,Y,Dx,Dy)    %用矢量绘图函数绘出梯度矢量大小分布
>>hold on
>>contour(X,Y,f)    %与梯度值对应,绘出原函数的等值线图

 2. Using errorbar() with semilogy() in MATLAB? #

http://stackoverflow.com/questions/3550241/using-errorbar-with-semilogy-in-matlab

h = errorbar(x,y,ebar); set(get(h,'Parent'), 'XScale', 'log') `</pre>  
or  
<pre>`ax = axes(); errorbar(ax, x,y,ebar); set(ax, 'XScale', 'log');

3. Multi y axis #

[http://stackoverflow.com/questions/6573862/matlab-two-y-axis-with-the-same-x-axis](http://stackoverflow.com/questions/6573862/matlab-two-y-axis-with-the-same-x-axis)

计算机领域学习路线图 roadmap

2012-07-09. Category & Tags: Leading, Soft&amp;Skills Leading, Soft&amp;Skills

1. 计算机领域学习路线图 #

from: http://goo.gl/RZtPC

![http://ocw.mit.edu/images/logo-ocw-home_new.gif](http://ocw.mit.edu/images/logo-ocw-home_new.gif)

目标 #

帮助计算机领域的初学者, 从零开始, 一步步成为一个靠谱的计算机领域的专家. 这里面只包含偏软件的部分.

我们需要达成以下目标:

  • 了解计算机领域的基础知识. 对背景的了解是基础.
  • 拥有计算机科学家的思维和解决问题的能力
  • 能编程! 编程是我们解决问题的主要方式.
  • 使用开源系统, 加入到开源社区中去

计算机基础课程学习 #

想要学习计算机领域的基础知识, 我选择使用mit公开课里面的内容. 下面我挑了一些必读课程:

入门课程.

可做和必做事项 #

下面我整理了一些必须做和可做的事情, 我觉得它们对于提高实力非常重要.

开源社区

  • 安装和使用linux, 在linux上面做开发

    ...

Mysql in Case of

2012-05-19. Category & Tags: Soft&amp;Skills Soft&amp;Skills

Add / Create a User: #

CREATE USER &lt;userName&gt;@localhost IDENTIFIED BY "&lt;newPassWd&gt;"; CREATE DATABASE &lt;newDbName&gt; DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON &lt;newDbName&gt;.* TO &lt;userName&gt;@localhost;

Super PRIVILEGES:

GRANT ALL <span style="text-decoration: underline;">PRIVILEGES</span> ON *.* TO &lt;userName&gt;@localhost WITH GRANT OPTION;

Revoke:

REVOKE INSERT ON *.* FROM &lt;userName&gt;@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM &lt;userName&gt;@localhost;

 

Reset the password: #

SET PASSWORD FOR &lt;userName&gt;@localhost = PASSWORD('&lt;newPassWd&gt;');

reset root password: http://goo.gl/jGXR6

...

Wireshark How-to

2012-05-16. Category & Tags: Soft&amp;Skills Soft&amp;Skills

see also tcpdump

Install Wireshark #

sudo add-apt-repository ppa:wireshark-dev/stable
sudo apt update
sudo apt install wireshark

Config For Non-Root (Normal) Users #

for 1 user #

chgrp ats /usr/bin/dumpcap
chmod 4750 /usr/bin/dumpcap # chmod u+s

for a user group #

groupadd wireshark
usermod -a -G wireshark userName1
chgrp wireshark /usr/bin/dumpcap
chmod 4750 /usr/bin/dumpcap

ref:

http://anonscm.debian.org/viewvc/collab-maint/ext-maint/wireshark/trunk/debian/README.Debian?view=markup

NFS How-To

2012-05-11. Category & Tags: Soft&amp;Skills Soft&amp;Skills, NFS, NFSD

Update: 2017-01-06
Warn 1: for non-English, use samba/sshfs instead. unless win has NFS v4 or above which can solve non-UTF8 problems.
Warn 2: svchost consumes 1.5GB ram, don’t know why.

See Also Links
SSHFS/SFTP
CIFS/SMB/Samba

OBS #

Combining simlink (ln -s) with NFS may cause weird file path problems. We tried to have a link at NFS to Dropbox in nfs, also tried to have a link at home to mount point at /mnt. Both caused some minor path and file issues, but no series problems.

...

How To Set Up PC as a Router / Bridge in Different OS's

2012-04-24. Category & Tags: Soft&amp;Skills Soft&amp;Skills

See also: /iptables

FreeBsd 7 Local Router (Like a Switch ???) #

(local only, no NAT)
vim /etc/rc.conf

ifconfig_em0="inet 10.0.0.12 netmask 255.255.255.0"
ifconfig_em1="inet 10.0.1.13 netmask 255.255.255.0"

notice: will get route problem if using the same net-addr.

  • permanent
# vim /etc/sysctl.conf
net.inet.ip.forwarding=1
# reboot
  • temp
sysctl net.inet.ip.forwarding=1
# or
echo 1 > /proc/sys/net/ipv4/ip_forward

// problem: ping test: could get reply since icmp packet 113. where are the first 112 packets???

FreeBsd 7 Bridge #

ref: shaper freeBsd-v7 : bridge

...

mod_apache_snmp, net-SNMP (给apache2添加SNMP支持)

2012-04-18. Category & Tags: Leading, Soft&amp;Skills Leading, Soft&amp;Skills

Tested on platform: #

  • vmware

  • Linux ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux

  • DISTRIB_ID=Ubuntu; DISTRIB_RELEASE=10.04; DISTRIB_DESCRIPTION=“Ubuntu 10.04.4 LTS”

  • httpd-2.0.64.tar.bz2; net-snmp-5.4.4; mod_ap2_snmp_1.04.

  • sudo -s;

  • apt-get remove lamp-server^ snmpd # if you have already installed apache or snmp-server.

Just do it: #

http://mod-apache-snmp.sourceforge.net/english/docs.htm

(below is a summary)

1) Install Apache Web Server with DSO support enabled.

./configure --enable-so; make; make install

2) Unzip NET-SNMP sources.

...