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---------------- 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"?> ------------------------------------------------------------------------------- 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 myhelloDBfetchServices(helloDBfetch): step4. create server code: helloDBserver.py ---------------------------------------------------------------------------- from ZSI.ServiceContainer import AsServer -------------------------------------------------------------------------------- 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 4月22日 转:情诗执子之手,与子偕老 转: 某mm骂他男友,都不带脏字 (看了狂晕!)你这个: 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、平结 4月2日 America Potato Salad / 美式土豆沙拉第一次在沃尔玛买的,发现非常好吃,于是自己找食谱做着试了试。除了土豆关键几个调料是mayonnaise即是所谓的马友酱,就是国内汉堡上涂得那个白色的酱。还有切碎了的腌黄瓜最好是甜味的,如果买不到自己加糖也可以,英文是sweet pickle relish。然后就是盐。其他配菜如芹菜青椒洋葱鸡蛋,没有也无所谓,但盐之类的要酌量减少。平时用的普通玻璃杯基本是2cup。下面是完整的菜谱: ----------must have| 必须材料------------
---------optional material | 可选配菜---------
--------optional seasonings | 可选调料--------------
DIRECTIONS | 做法
3月28日 windows下导出的收藏夹bookmark.htm导入linux下的firefox中后中文显示乱码用gedit打开在windows导出来的IE收藏夹bookmark.htm,另存为UTF-8编码即可,然后用firefox书签导入功能就没有问题了! ------------------------------------- 用firefox打开win导出的ie收藏夹bookmark.htm,然后“页面另存为”,然后用firefox书签导入功能就可以了! ubuntu英文环境下对windows的txt显示乱码的解决办法Gedit中文显示设置
上面这个方法需要将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 UbuntuI 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)
6. Add the following line right before exit 0 at the end of the file - Vino server runs when gdm starts up
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
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
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. sudo dpkg-reconfigure xserver-xorg 3. Just press Enter through every screen. 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 templateu.s passport/visa/greencard photoshop 制作照片模板
出自:
说实话,我试了一下,虽然网页上说明很详细,但是我是半天没搞定,放在这里当备用:)
photoshop make U.S. passport/visa/greencard photo yourselfphotoshop 自制 美国签证/护照/绿卡 照片
转载自:
==============================================
Making Your Own Passport Photos by TrinchThis 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
可制作美国护照/签证/绿卡照片
上载你的白色底板照片,看到照片显示在网页上后,按网站说明在照片上拖拽方框,下载制作好的照片。
免费的,我试过了,在这里存档以备将来用:)
|
|
|