very 的个人资料VERY--我最喜欢的英文单词,极限的感觉! 红...照片日志列表更多 工具 帮助

日志


6月26日

编译Python源文件,error: missing Python.h, limits.h stdio.h ...

前两天装一个python软件库 (4suite),ubuntu 8操作系统,需要自己编译源文件,结果编译的时候总是报错,缺少一堆库文件,解决如下:

operating system: ubuntu 8

python 2.5.2

--------------install error: missing Python.h----------------
To install python headers, you need the python2.5-dev package:

command:

sudo apt-get install python2.5-dev

---------------install error: missing limits.h  stdio.h .…..-------------------------------------------

install libc6-dev package   for c headers

command:

sudo apt-get install libc6-dev

5月27日

use python zsi to create and publish a web service (rpc-encoded)

I successfully published the web service in ubunbu 8 (remote) and vista64 (local) and invoked them for testing.

python 2.5, zsi 2.1 (other zsi version may be different)

step1. create helloDBfetch.wsdl, it is almost as same as hello wold.

-------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/helloDBfetch/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloDBfetch" targetNamespace="http://www.example.org/helloDBfetch/">
  <wsdl:message name="helloDbfetchRequest">
    <wsdl:part name="fetchDataReturn" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="helloDbfetchResponse">
    <wsdl:part name="helloDbfetchResponse" type="xsd:string"/>
  </wsdl:message>
  <wsdl:portType name="helloDBfetch">
    <wsdl:operation name="helloDbfetch">
      <wsdl:input message="tns:helloDbfetchRequest"/>
      <wsdl:output message="tns:helloDbfetchResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="helloDBfetchSOAP" type="tns:helloDBfetch">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="helloDbfetch">
      <soap:operation soapAction="http://www.example.org/helloDBfetch/NewOperation"/>
      <wsdl:input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.example.org/helloDBfetch/" use="encoded"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.example.org/helloDBfetch/" use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="helloDBfetch">
    <wsdl:port binding="tns:helloDBfetchSOAP" name="helloDBfetchSOAP">
      <soap:address location="http://localhost:8080/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

-------------------------------------------------------------------------------

step2. run wsdl2py helloDBfetch.wsdl, generated 3 .py files (helloDBfetch_client.py, helloDBfetch_server.py, helloDBfetch_types.py), I put them under a folder called helloDBfetch, and also create a empty __init__.py in the folder to make it a package.

step3. create service implementation code: helloDBimpl.py

-------------------------------------------------------------------------

# make sure the path to helloDBfetch_server.py is correct, and import it

from helloDBfetch.helloDBfetch_server import * 

from ZSI.ServiceContainer import AsServer # have to import this
# class name can be anything, but has to be sub class of helloDBfetch, which is defined in helloDBfetch_server.py

class myhelloDBfetchServices(helloDBfetch): 
    # Make WSDL available for HTTP GET
    _wsdl = "".join(open("helloDBfetch.wsdl").readlines())
    def soap_helloDbfetch(self,ps, **kw): #rewrite the soap_helloDbfetch method of helloDBfetch of helloDBfetch_server.py
        try:#use the method from class helloDBfetch in helloDBfetch_server.py
            request, response = helloDBfetch.soap_helloDbfetch(self, ps, **kw)
#_helloDbfetchResponse and _fetchDataReturn are defined in the helloDBfetch_server.py  
         response._helloDbfetchResponse="Hello "+request._fetchDataReturn
        except Exception, e:
            print str(e)
        return request, response 
--------------------------------------------------------------------------

step4. create server code: helloDBserver.py

----------------------------------------------------------------------------

from ZSI.ServiceContainer import AsServer
from helloDBimpl import myhelloDBfetchServices #have to import the service class you defined
from ZSI import dispatch
if __name__ == "__main__":
    port = 8080
#service name has to be as same as the class name in helloDBimpl.py
    AsServer(port,(myhelloDBfetchServices('helloDBfetch'),))

--------------------------------------------------------------------------------

testing: local in vista64

run the helloDBserver.py

you can open a browser check the wsdl file: http://localhost:8080/helloDBfetch?wsdl

to invoke this web service, I use SoapUI (a free GUI service client, you can download it for free: http://www.soapui.org/), then just open the soapUI and create a new project, type in the project name and the URL of the wsdl file, it will generate a sample request for you, double click the sample request, in the popup window you will see the soap message, just replace the ? with any string you want, e.g. lalal, click the send arrow button, you will see the returned string is “hello lalal” inside the soap message.

*****************************

testing: remote in ubuntu 8

upload all files in your ubuntu machine: helloDBfetch.wsdl, helloDBimpl.py, helloDBserver.py and the whole fold: helloDBfetch

run helloDBserver.py in ubuntu 8

the URL of the wsdl is : http://yourUbuntuComputerIP:8080/helloDBfetch?wsdl

still use SoapUI to invoke it, but the URL should changed to the new one, another thing is the generated wsdl file in the binding/location=…., it give the machine name, other than the real ip, in localhost, it does not matter, but remotely invoke the web service, you have to change the endpoint of the request in soapUI to the real ip of ubuntu machine other than the machine name, otherwise soapUi can not find your ubuntu machine. I do not know how to make it automatically use ip in the wsdl, so I have to manually change it when I use soapUI invoke it.

+++++++++++++++++++++++++++++++++++

one wired thing I find is, in the helloDBimpl.py, the last line of code

return response | this works in the ubuntu 8

return request, response | this works in vista64

otherwise it returns error:

#return response, in vista, error: 'helloDbfetchResponse' object is not iterable
#return request, response, in ubuntu, error: type object tuple has no typecode

4月22日

转:情诗

执子之手,与子偕老
    天地合,乃敢与君绝
    愿得一心人,白首不相离
    结发为夫妻,恩爱两不疑
    青青子衿,悠悠我心
    思君令人老,轩车来何迟
    潘岳悼亡犹费词
    天不绝人愿,故使侬见郎
    红豆生南国,春来发几枝
   昔日芙蓉花,今成断根草
   与君初相识,犹如故人归
   看花满眼泪,不共楚王言
   薛涛笺上十离诗
   至高至明日月,至亲至疏夫妻
   易求无价宝,难得有心郎
   唯将终夜长开眼,报答平生未展眉
  从此无心爱良夜,任他明月下西楼
  星沉海底当窗见,雨过河源隔座看
  三生杜牧、十里扬州,前事休说
  衣带渐宽终不悔,为伊消得人憔悴
  落花人独立,微雨燕双飞
  伤情处、高城望断,灯火已黄昏
  枝上柳绵吹又少,天涯何处无芳草
  零落成泥碾作尘,只有香如故
  风住尘香花已尽
  一杯愁绪,几年离索
  那人却在、灯火阑珊处
  断肠词
  问世问、情是何物,直教生死相许
  断肠人在天涯
  窈窕淑女,君子好逑

转: 某mm骂他男友,都不带脏字 (看了狂晕!)

你这个:
进化不完全的生命体,基因突变的外星人,
幼稚园程度的高中生,先天蒙古症的青蛙头,
圣母峰雪人的弃婴,化粪池堵塞的凶手,
非洲人搞上黑猪的後裔,阴阳失调的黑猩猩,
被诺亚方舟压过的河马,新火山喷发口,
超大无耻传声扩音喇叭,爱斯基摩人的耻辱,
和蟑螂共存活的超个体,生命力腐烂的半植物,
会发出臭味的垃圾人,"唾弃"名词的源头,
每天退化三次的恐龙,人类历史上最强的废材,
上帝失手摔下来的旧洗衣机,能思考的无脑袋生物,
损毁亚洲同胞名声的祸害,祖先为之蒙羞的子孙,
沉积千年的腐植质,科学家也不敢研究的原始物种,
宇宙毁灭必备的原料,连半兽人都瞧不起你的半兽人,
10倍石油浓度的沉积原料,被毁容的麦当劳叔叔,
像你这种可恶的家伙 只能演电视剧里的一陀粪,
比不上路边被狗过洒尿的口香糖,
连如花都美你10倍以上,
找女朋友得去动物园甚至要离开地球,
想要自杀只会有人劝你不要留下屍体以免污染环境,
你摸过的键盘上连阿米吧原虫都活不下去,
喷出来的口水比sars还致命,
装可爱的话可以瞬间解决人口膨胀的问题,
帅的话人类就只得用无性生殖,
白痴可以当你的老师,智障都可以教你说人话,
只要你抬头臭氧层就会破洞
要移民火星是为了要离开你,
如果你的丑陋可以发电的话全世界的核电厂都可以停摆,
去打仗的话子弹飞弹会忍不住向你飞,
手榴弹看到你会自爆,
别人要开飞机去撞双子星才行而你只要跳伞就有同样的威力,
你去过的名胜全部变古迹,你去过的古迹会变成历史,
18辈子都没干好事才会认识你,连丢进太阳都嫌不够环保

【转】K2LD Architects的温馨自然风格

由K2LD在Westwood(不知道哪里的Westwood)设计的一套公寓,在设计上,主要用比较少的家私和自然的颜色去创造出温馨的格调。室内的灯光营造得非常到位和漂亮,使处在里面每个人都能感觉到浪漫和平静的氛围。
1space

2space 

由此看出灯光的确是晚上营造气氛的重要元素,除了色温亮度还有位置都需要讲究。

现代的简约,由笔直的线条勾勒出的空间感。

【转】意大利DOC Mobili家居的睡房概念

 

 

简洁的睡房,优雅的气息,唯美的空间。其实有时睡房无需要装横得太复杂,一天下来的劳累或许只需要一个让自己的心灵能够沉淀下来的睡房而已。 一道有自己喜欢颜色或图案的主背场,有质感的家具,再加上上等的床褥及其他摆设,一切皆需要协调,颜色以及质感搭配好就已经突显效果了。
1
真正的私家园景,为了衬托房间的风格,就一个裸树也够孤独的。
2 
3 
4
5

这个不错....

6

7

4月21日

windows & ubuntu 双操作系统中文文件名乱码

安装双操作系统win和ubuntu后,如果从ubuntu登入,ubuntu能自动识别WIN的分区。但是Ubuntu默认的locale是UTF8, 所以WIN分区里的文件名全是显示问号或者是其它乱码。要想正确显示,就要修改一下/etc/fstab文件。在hda1,hda5,hda6等这几行里的 Default 后边加上‘,utf8′.不要将引号也加上啊,呵呵。重启机器看一下,应 该能正确显示了。

4月18日

【转】图解领带的打法10种

http://user.qzone.qq.com/330942377/blog/1239715800

 

男士必看,女士更要看

1、平结
平结为最多男士选用的领结打法之一,几乎适用于各种材质的领带。
要诀:领结下方所形成的凹洞需让两边均匀且对衬。

2、交叉结
  这是对于单色素雅质料且较薄领带适合选用的领结,对于喜欢展现流行感的男士不妨多加使用“交叉结”。

3、双环结
  一条质地细致的领带再搭配上双环结颇能营造时尚感,适合年轻的上班族选用。
该领结完成的特色就是第一圈会稍露出于第二圈之外,可别刻意给盖住了。

4、 温莎结
  温莎结适合用于宽领型的衬衫,该领结应多往横向发展。
应避免材质过厚的领带,领结也勿打得过大。

5、双交叉结
  这样的领结很容易让人有种高雅且隆重的感觉,适合正式之活动场合选用。
该领结应多运用在素色且丝质领带上,若搭配大翻领的衬衫不但适合且有种尊贵感。

6、亚伯特王子结
  适用於浪漫扣领及尖领系列衬衫  
搭配浪漫质料柔软的细款领带  
正确打法是在宽边先预留较长的空间  
并在绕第二圈时尽量贴合在一起  
即可完成此一完美结型

7、四手结(单结)
  是所有领结中最容易上手的,适用於各种款式的浪漫系列衬衫及领带

8、浪漫结
  浪漫是一种完美的结型  
故适合用於各种浪漫系列的领口及衬衫  
完成後将领结下方之宽边压以绉摺可缩小其结型  
窄边亦可将它往左右移动使其小部份出现於宽边领带旁

9、简式结(马车夫结)
  适用於质料较厚的领带  
最适合打在标准式及扣式领口之衬衫  
将其宽边以180度由上往下翻转  
并将折叠处隐藏於後方  
待完成後可再调整其领带长度  
是最常见的一种结形

10、十字结(半温莎结)
  此款结型十分优雅及罕见  
其打法亦较复杂  
使用细款领带较容易上手  
最适合搭配在浪漫的尖领及标准式领口系列衬

4月2日

America Potato Salad / 美式土豆沙拉

第一次在沃尔玛买的,发现非常好吃,于是自己找食谱做着试了试。除了土豆关键几个调料是mayonnaise即是所谓的马友酱,就是国内汉堡上涂得那个白色的酱。还有切碎了的腌黄瓜最好是甜味的,如果买不到自己加糖也可以,英文是sweet pickle relish。然后就是盐。其他配菜如芹菜青椒洋葱鸡蛋,没有也无所谓,但盐之类的要酌量减少。平时用的普通玻璃杯基本是2cup。下面是完整的菜谱:

----------must have| 必须材料------------

  • 3 pounds potatoes | 大概3斤土豆,必须
  • 1 cup sweet pickle relish | 1/2 cup 切碎的甜味腌黄瓜,必须
  • 1 cup mayonnaise | 1/2 cup 马友酱,必须
  • 2 teaspoon  salt | 2勺盐,必须

---------optional material | 可选配菜---------

  • 3 eggs | 3个鸡蛋
  • 1 cup chopped celery | 1cup芹菜切碎
  • 1/2 cup chopped Red/green Bell Pepper | 1/2 cup 红或者绿大灯笼辣椒
  • 1/2 cup chopped onion | 1/2 cup 洋葱切碎

--------optional seasonings | 可选调料--------------

  • 1 tablespoon prepared mustard | 一大勺芥末
  • ground black pepper to taste | 少许胡椒粉
  • 3 tablespoons Cider Vinegar or lemon juici| 3 大勺白醋或柠檬汁
  • 1/2 teaspoon Celery Seed  | 1/2 芹菜籽
  • 2 tablespoons chopped Fresh Flat-Leaf Parsley | 2大勺香菜末
  • 3 Green Onions/chives, thinly sliced | 3 根切碎的葱或小葱
  • 1/4 teaspoon garlic powder | 1/4 勺干蒜粉
  • 1 teaspoon Paprika | 1勺红辣椒面(这种辣椒特别红但是不辣,以自己口味加,没有也无所谓)

DIRECTIONS | 做法

  1. Bring a large pot of salted water to a boil. Add potatoes and cook until tender but still firm, about 15 minutes. Drain, cool, peel and chop. | 盐水煮土豆,煮熟但没面掉前取出削皮切小1公分块
  2. Place eggs in a saucepan and cover with cold water. Bring water to a boil; cover, remove from heat, and let eggs stand in hot water for 10 to 12 minutes. Remove from hot water, cool, peel and chop. | 鸡蛋连壳煮熟,去壳,切碎
  3. In a large bowl, combine the potatoes, eggs, with everything other than paprika. Mix together well, garnish with paprika on top and refrigerate until chilled. | 混合所有的材料除了红辣椒面,搅匀,撒上红辣椒面,即可吃,冷藏一阵味道更好(不是冰冻)。

 

image

3月28日

windows下导出的收藏夹bookmark.htm导入linux下的firefox中后中文显示乱码

用gedit打开在windows导出来的IE收藏夹bookmark.htm,另存为UTF-8编码即可,然后用firefox书签导入功能就没有问题了!

-------------------------------------

firefox打开win导出的ie收藏夹bookmark.htm,然后“页面另存为”,然后用firefox书签导入功能就可以了!
原因很简单,firefox另存的时候自动把编码换为utf-8了,所以成功

ubuntu英文环境下对windows的txt显示乱码的解决办法

Gedit中文显示设置
在Applications菜单上点右键,选择Edit Menu.在Main Menu的对话框中勾选System Tools--Configuration Editor,并从Applications菜单中开启。
依次开启 /apps/gedit-2/preferences/encodings/双击右侧auto_detected,在弹出对话框中点选Add,添加Values值为GB2312,确定后选中,点选Up按钮将其移至第一位。

 

上面这个方法需要将GBK置顶才能用gedit带开gbk格式文档,但是这样会把其他格式的文档处理成乱码,一个比较友好的方法是,在打开文件时,在Charater Coding下拉菜单里选择"Add or Remove...",然后添加GBK或GB18030

3月27日

vnc remote desktop to ubuntu without login

转贴:

http://jakeyoon.com/2008/11/19/enable-vino-vnc-server-for-login-manager-gdm-in-ubuntu/

ubuntu 8.04 comes with vnc remote desktop, but user has to login then the vnc service starts. if anyone remotely reboots then remote desktop doesn’t work anymore. Here is the way to use remote desktop (ubuntu 8 built in vnc) without user login.

不需要用户登录就可以使用ubuntu8自带的远程桌面程序vnc,避免了每次远程重启机子后远程桌面程序vnc无法使用的情况。

====================================================

 

Enable Vino VNC Server for Login Manager (GDM) in Ubuntu

I have been a big fan for Remote Desktop in Windows XP/Server/Vista platform because you get a native display resolution of your client monitor and file/printer share is supported; however, for Windows 2000 or linux distributions, I do not have the option.  There is an alternate option for Windows 2000 or linux distribution which is VNC.

For Windows platform, it looks like RealVNC and UltraVNC are the most popular ones while linux has many different VNC servers.

In this example, I would like to introduce a way to enable a built-in Vino VNC server for Ubuntu distribution.

1. After logging into Ubuntu, open up Remote Desktop option (System -> Preferences -> Remote Desktop)

2. Check “Allow other users to view your desktop” and “Allow other users to control your desktop” - this is to let others, others would be me in my case, take control of this machine

3. Uncheck “Ask you for confirmation” - when VNC is connected, VNC server will ask for a confirmation to local user.  In my case, this machine will not have a local logged user since it does not have a monitor

4. If possible, assign a password - Having a password should be better than not having one even though VNC still lacks encryption and strong authentication

At this point, VNC server is just enabled with some settings; however, Vino server does not start until a user logs in.  This means that Vino server is not running at User Login screen - where a user types username and password.  In my case, this was not feasible since the machine will not have a monitor (nor keyboard/mouse).

5. Edit /etc/gdm/Init/Default - this gets run when gdm starts (at Login Screen)

emacs /etc/gdm/Init/Default

6. Add the following line right before exit 0 at the end of the file - Vino server runs when gdm starts up

/usr/lib/vino/vino-server &

Vino server starts up when gdm starts up; however, when username and password is typed in, gdm kill this vino-server meaning VNC connection will be terminated.  To prevent this,

7. Edit /etc/gdm/gdm.conf with your favorite text editor

emacs /etc/gdm/gdm.conf

8. Find a commented option KillInitClients=true.  Uncomment it and change it to false and save it. - this prevents vino-server from being killed right after login

KillInitClients=false

Now, you should be able to connect to the machine using VNC

3月16日

转:connect projector from ubuntu/ 从ubuntu连接投影仪

转贴:http://www.alterego7.com/2008/04/getting-projectors-to-work-in-ubuntu.html

1. Connect the projector to your laptop.
2. Do this in command line.

sudo dpkg-reconfigure xserver-xorg

3. Just press Enter through every screen.
4. Restart X for the changes to take effect by pressing CTRL + ALT + BACKSPACE.
5. Log in again as you always do.
6. And finally, the projector will automagically display your Ubuntu desktop and you can show off your desktop effects to your co-workers.

3月12日

转载:若爱只是擦肩而过

转载:http://user.qzone.qq.com/69919076?ptlang=2052

=======================若爱只是擦肩而过================================

 

因为爱过,所以不会成敌人;因为伤过,所以不会做朋友。    


   如果,前世的五百次回眸才换来今生的擦肩而过,那想来已经很幸福了──其实,擦肩而过,也是一种很深的缘分。佛说:五百次的回眸才能换来今生的擦肩而过。可以一秒钟遇到一个人,一分钟认识一个人,一个小时喜欢上一个人,一天时间爱上一个人,但是却有可能要用一辈子去忘记一个人。    
   当她不爱你的时候,无论过去她是否爱过还是后来忘了,又或者是从未爱过,当你无法再成为她心里的那个人的时候,她的心便不会记得你。请不要在你不开心时去打搅她,她那儿绝对不是你此刻应该的去处。请不要与她讲你的琐事,她无暇更是没有兴趣去了解你、你的生活。即使讲了,她也很快会忘记的。没有爱,你注定挤不进她的生命。请不要在她的面前流眼泪,她无法给予你照顾和关心,至多只是一点同情。只有爱你的人,才会真正的去珍惜你,而不是,旁观的同情和怜悯。    
   当她不爱你的时候,你的爱便是她的负担。请不要去计算自己的付出,不要希望有什么回报。你用心,她无心。爱着不爱自己的人,本身便是没有回报的。不要计较对与错,这样会快乐些。请不要失去自信,因为爱一个人,并非她的优秀,而只是一种感觉。她让你有这样的感觉,于是你爱她。同样,她不爱你,也并非你不优秀。优秀,不是爱的理由。还有那么多爱自己的人,淡淡地微笑一下,也是异样甜美的。    
   当她不爱你的时候,也一定要祝福她。有了爱,便不该有恨,因为曾经有爱,有爱的日子里是快乐的,有缘在一起也是快乐,有过快乐有过爱,就不会再有恨。她失去的是一个爱她的人,而你失去了一个不爱你的人,却得到了一个重新生活、重新去爱的机会。请你深深呼吸,一生的路上,铺满了爱的花蕾,总有那么一朵属于你,花儿虽多,却没有重复的一朵,这是生生世世早已经注定的。    
   当她不爱你的时候,就是你从他生活中消失的时候,第一时间离开她,骄傲地过属于自己的生活。同时,你也希望她能幸福快乐,找到属于她的未来。轻轻拥抱一下回忆里的温暖,轻柔地凝视凋谢的温柔。无论结果怎样都会破坏了曾经的美感。干干净净地离开,也许若干年后的某个午后,阳光下的她眯起双眼会记起某个美好的瞬间,会心一笑。种种怀念,值了。    
   爱不一定要永远。曾经拥有的也许会是你一生最美好的回忆。。爱过知情重,醉过知酒浓。关于爱的记忆,应该好好收藏,只是今后的幸福,要各自去寻找。    
爱是一种感觉,不爱也是一种感觉,而往往难以抉择的是心中的感觉到底是爱还是不爱。原来握在手里的,不一定就是你们真正拥有的;你们所拥有的,也不一定就是你们真正铭刻在心的。人生很多时候需要自觉的放弃,因为拥有的时候,你们也许正在失去,而放弃的时候,你们也许又在重新获得。    
   明白的人懂得放弃,真情的人懂得牺牲,幸福的人懂得超脱。对不爱自己的人,最需要的是理解、放弃和祝福。过多的自作多情是在乞求对方的施舍。爱与被爱,都是让人幸福的事情。不要让这些变成痛苦。既然你们已经经历了,多年以后,偶尔想起,希望都是美好的回忆。活的自信些,开心些,把最美的微笑留给伤你最深的人,聪明的人知道自己要快乐。

3月7日

ubuntu 8.04 无线网络

缘起:
系统是ubuntu 8.04. 事情的起因是因为好奇,按了小黑(thinkpad t61)的 fn+f5 按键,而且是按了好多下因为刚开始没注意到有什么变化,后来发现蓝牙大概是隔三下就开/关,随后发现糟糕的事情是无线网络突然不可用了。在怎么按 fn+f5都不管用,随后乱按了其他键搞的一会休眠一会锁屏幕。没办法就用鼠标点击右上角那个网络图标,右键弹出菜单中enable wireless 消失,只剩了enable networking.左键弹出菜单中只剩了manual configuration. 更惨一点的是不知道怎么鼠标右键点了其中某个菜单项,于是这个网络图标也消失了:((怎么也找不回来

解决:
只好关机,我机子装有双操作系统,进入windows发现无线网络没问题,开始感觉好一点。重新起动进入ubuntu,无线网络还是不工作,但是那个网络图标倒是又出来了,哈哈:))然后是在另一台计算机上同时搜索各种解决办法,边搜边试,整整一个晚上到天亮,不知试了多少种方法,恶梦一般,苦。。。虽然写在这里看起来很简单。。。:((
在我几乎已经决定放弃,打算看看能不能修复或者重装ubuntu,天也开始亮时,突然终于搞定,如下:
-----------------------------------------------------
在console中输入:
gksudo gedit /etc/network/interfaces
输入你的用户密码后,进入文件编辑,清空所有的内容只留下:
auto lo
iface lo inet loopback
文件存盘,退出编辑状态
在console中输入:
sudo /etc/init.d/networking restart
这时候左键点那个网络图标会发现所有的可搜索到的网络都出现了,选择一个网络连接,搞定!!!
========================================================
在实验过程中发现的其他有用的相关,列出备用:
sudo vi ibm-wireless.sh
其中有关于控制fn+f5 键如何开关蓝牙和无线网络,自己会改的话可以定制功能键

acpi 包中有各种笔记本的功能键支持,可以用apt-get安或查看

sudo lshw -C network
显示所有的网卡

iwconfig
显示无线网络连接

sudo ifconfig eth0 up
sudo ifconfig wlan0 up
启动相应的网络

启动图形界面软件比如gedit,最好用gksudo, gksu,如果用sudo有时会出毛病,我的gedit就因此好多次都打不开





2月6日

u.s passport/visa/greencard photo template

u.s passport/visa/greencard photoshop 制作照片模板
出自:
 
说实话,我试了一下,虽然网页上说明很详细,但是我是半天没搞定,放在这里当备用:)
 
 

photoshop make U.S. passport/visa/greencard photo yourself

photoshop 自制 美国签证/护照/绿卡 照片
转载自:
==============================================
 
Making Your Own Passport Photos
by Trinch

This tutorial will show you how to take, format, and prepare your own passport photos. Rather than repeating what is already provided, please see the guidelines provided by the US Department of State. These will provide you with information regarding proper lighting, exposure, composition, and size. If you live in another country, please check for guidelines at your passport issuing authority as they will likely differ. For example, in Canada the final size can be as large as 70mm by 50mm, however, it appears as though they require a photo from a professional although that is not absolutely clear. Enough of this, let's get one with the process as it pertains to US requirements.

The original photo


Once you have taken your photo and are happy with the expression and lighting, it's time to make sure the sizes are correct. In the guidelines, it says that the trimmed photo must measure 2 inches by 2 inches and the distance from the chin to the top of the hair must be between 1 inch and 1 3/8 inch. So the first thing to do is to measure the distance between the chin and the top of the head. This is done with the measuring tool.

Select the Measure Tool


We're going to use Photoshop's Measure Tool to measure the distance of interest. The measure tool is hidden under the eye dropper. Click-and-hold on the eye dropper to reveal a pop-out menu and select the ruler at the bottom. Or, press Shift+I on your keyboard to cycle through the icons until the measure icon ruler appears.

Measure the distance from the chin to the top of the head


Using the Measure Tool, draw a line from the chin to the top of the head. (HINT: Holding the shift key while dragging the line will force it to either vertical or horizontal) In the title bar, you will notice three values. The angle "A", the vertical distance "D1", and the horizontal distance "D2". We are interested in the vertical distance which, in this case, is 582 pixels. Now it's time for some math. The distance should be between 1 and 1-3/8 inch, I will use 1.1 inches. Now divide the 582 pixels by 1.1 inches to determine you DPI. In this case, we get 529 DPI (I'll use 530 for simplicity). Since the final photo will be 2"x2", the size of the image will be 1060 pixels by 1060 pixels. (TIP: Many commercial printers will actually increase the size of you picture slightly so that the image bleeds to the edge of the print. If you set the distance to 1-3/8 inch you risk going over the allowed size when printing.)

Cropping to the right size


Choose the marquee select tool from the toolbar. Once the tool is selected, you will see a drop down menu in the title bar allowing you to select a style. Select the Fixed Size option and set the width and height options to 1060 pixels by 1060 pixels (use the values you calculated in the previous step). Then position the box so that the subject's nose is in the center. This will ensure that the eyes are within 1-1/8 to 1-3/8 inches from the bottom. Once the square is positioned, hit CTRL-C to copy the image.

Creating a 4x6 template


In the File menu, select New and set the Preset Size to 4x6 and the Resolution to 530 DPI (use your value), then click OK. This will open a new document with the correct aspect ratio to print a 4x6 and the correct resolution to ensure the photos will be the correct size.

Paste your passport photos to the template


Hit CTRL-V (or select paste from the top menu) to place the photo onto the template. Move the photo to the top. Repeat for the second photo and move it to the bottom. As I mentioned before, commercial printing services may slightly resize your image so make sure the images are not on the edge. You may loose part of it. You are now ready to save the file and sent it to the printer.

The final product


Once you get the photo printed use a trimmer to cut the images to 2"x2" and submit them with your passport application. I printed mine on a Kodak Instant print machine, but if you have a good enough photo printer at home, you could probably use that. Check the State Department website for digital printing information.


U.S. passport/ visa/greencard photo site--FREE!!

 
 
 
directly upload your photo, then follow the instruction, then download the correct photos
 
可制作美国护照/签证/绿卡照片
上载你的白色底板照片,看到照片显示在网页上后,按网站说明在照片上拖拽方框,下载制作好的照片。
免费的,我试过了,在这里存档以备将来用:)