周末看见人家买宽面,突然想吃杂酱面,于是嚷着要老公做给我吃。老公对做菜简直就是一点天赋都没有,吃过无数遍也不知道里面有些什么东西,于是陪他到菜市场挑原料:
杂酱面
5 12 月, 2007[转载]妇产科男医生如此对待流产的少女
21 11 月, 2007OPENS YOUR DOOR TO THE WORLD: YOUR-FREEDOM
20 11 月, 2007Are you trapped behind a firewall or a filtering web proxy and cannot access some or many web pages or use an application you would like to use or play a game you would like to play? Is your Internet connection being censored and you would like to stick censorship where the sun doesn’t shine? Would you prefer to stay anonymous, that your IP address is not logged with every access to someone’s web page? Then look no further, you’ve found the solution!
The Your Freedom services makes accessible what is unaccessible to you, and it hides your network address from those who don’t need to know. Just download our client application and install or just run it on your PC; it turns your own PC into an uncensored, anonymous web proxy and an uncensored, anonymous SOCKS proxy that your applications can use, and if that’s not enough it can even get you connected to the Internet just as if you were using an unrestricted DSL or cable connection — just like the firewall suddenly went boom! You can even make your PC accessible from the Internet if you like. Nearly all applications work with Your Freedom, and so far no-one has managed to block our service completely and permanently without blocking your Internet access entirely.
Every day, more than 10,000 people in over 140 countries use our service, some because their government would rather not have them exercise their human rights, some because their school or university feels they are not mature enough to decide for themselves whether playing the odd game interferes with their studies or not, others because they don’t want traceable IP addresses in every logfile. There are probably as many good reasons to use Your Freedom as there are restrictive firewalls in the world!
Your first step to an unrestricted Internet access is to register on this web page — all you need to provide is a contactable email address and a username and a password, nothing else is required. Then download the client application (available for Windows, Mac OS X, Linux and everything else that can run Java apps) and run it — the wizard will guide you though configuring it properly. Then configure your applications to use your own PC as web or SOCKS proxy or use our transparent OpenVPN mode.
C#右击菜单动态设置问题的解决
20 11 月, 2007对于C# TreeView中需要动态在不同结点上显示不同的菜单时,如果在MouseUp事件中判断鼠标选中的结点然后再设置TreeView.ContextMenuStrip时,必须得用Show方法才能显示出菜单,结果会引起鼠标事件不正常。解决办法是在创建TreeNode时直接设置TreeNode.ContextMenuStrip而不是在MouseUp中判断并设置TreeView.ContextMenuStrip,连MouseUp事件都可以省了。
调节眼睛肌体活动——电脑护眼器
16 11 月, 2007我站在中石油48元之颠(转载)
14 11 月, 2007我站在中石油48元之颠
眼含热泪向山下俯瞰
看那高高耸立的井塔
看那黑色石油井喷的壮观
看那井架旁忙碌的股民
看那庄家骗钱后得意的笑颜
我站在中石油48元之颠
感叹那董事长要回报祖国股民的肺腑之言
虽说港股发行只有一元
那也是肥水没流外人田
因为大陆和香港的股民都是兄弟姐妹,血脉相连
我站在中石油48元之颠
回味着那铺天盖地各类媒体的宣传
那是世界最大市值的公司
亚洲企业最挣钱
那是我们共和国的娇子
垄断着国民经济的命脉——不可再生的石油资源
我站在中石油48元之颠
看周围同命相连的伙伴
是他们以活命养家的血汗钱
铸就了世界市值最大的航空母舰
虽说无限风光在险峰
但谁也不愿一直在这里站岗值班
我站在中石油48元之颠
眼望天空发出最后的呐喊
什么时候让我回家
什么时候让我下山
我—要—回—家
我—要—下—山
TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES
9 11 月, 2007INFORMATION
To configure Internet Explorer to print web pages which have background colors and images, you need to enable the setting Print Background Colors and Images. This allows background colors and images to print when you print a web page.
TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES
If you are a user you should follow the manual steps in the section below.
If you are a system administrator and wish to set this option directly in the Windows registry, follow the steps below:
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Symprex cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. You use it at your own risk.
Open the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
Set the string value Print_Background to yes(on) or no(off).
MANUALLY TURN ON OR TURN OFF PRINT BACKGROUND COLORS AND IMAGES
Follow these steps to turn on or turn off Print Background Colors and Images:
Step | Mouse actions | Keyboard actions |
---|---|---|
1 | On the Internet Explorer menu bar:
|
On the Internet Explorer menu bar:
|
2 | In the Internet Options dialog box:
|
In the Internet Options dialog box:
|
3 | On the Advanced tab, under Settings: Printing:
|
On the Advanced tab, under Settings: Printing:
|
4 | To save your settings and close the dialog box:
|
To save your settings and close the dialog box:
|
Internet Options: Advanced tab: Print background colors and images:
Original link: Symprex
打开Internet选项和发送到邮件实现
9 11 月, 2007近段有个任务需要使用C#的WebBrowser控件实现页面的浏览,都比较简单。麻烦的是想在自定义的菜单上实现打开“Internet 选项”对话框和实现“发送页面到电子邮件”功能,在网上搜罗了大半天,试了好多办法,总算实现了。
打开Internet选项使用inetcpl.cpl的LaunchInternetControlPanel API函数,在C#中的声明方法是:
[DllImport("inetcpl.cpl")]
private static extern long LaunchInternetControlPanel(IntPtr hWnd);
调用的方法是:
LaunchInternetControlPanel(this.Handle);
要实现象在资源管理器中右击一个文件发送到邮件接收者的方法是使用MAPI32.DLL的MAPISendMail API函数,使用这个方法可以把当前显示的页面以附件方式发送给邮件接收者,但象IE中“Send Page By E-Mail”的功能直接把当前页面以HTML内容方式发送还有没有实现。
关于MAPISendMail API函数的使用在The Code Project有两个链接:MFC/C++ C#/.NET,本站提供从这两个链接下载到的源码:MFC/C++ C#/.NET,仅供参考,版权归原作者所有。
从网页上下载控件及调用手记
6 11 月, 2007使用《转载: 从网页上下载控件时制作CAB包的方法》试了一下调用自定义组件,并没有成功,后来又找到了微软网站上的相关文档(链接),总算搞定了一个最简单的,在这里标记一下。
首先用VC创建一个ATL组件,实例以下方法:
STDMETHODIMP CTest::MsgBox(BSTR strMsg)
{
USES_CONVERSION;
MessageBox(NULL, OLE2T(strMsg), _T("What?"), MB_OK);
return S_OK;
}
然后选择ReleaseMinSize编译模式编译成DLL,以WebObj.dll为例。
创建以下的WebObj.inf文件:
; INF file for WebObj.DLL
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
WebObj.dll=WebObj.dll
[WebObj.dll]
file-win32-x86=thiscab
clsid={62129ACE-3FDC-461E-B216-6EEC6FBA18AC}
FileVersion=1,0,0,1
RegisterServer=yes
; end of INF file
用IExpress创建WebObj.cab包,按WebObj.dll,WebObj.inf顺序加入到cab中并输出。
将WebObj.cab和test.html拷到C:\Inetpub\wwwroot目录(前提是安装了IIS),test.html的内容:
<html>
<head>
<OBJECT classid=clsid:62129ACE-3FDC-461E-B216-6EEC6FBA18AC codebase="WebObj.cab#version=1,0,0,1" id=Test1></OBJECT>
</head>
<script>
</script>
<body>
Test web object <input type="button" value="Test" onclick="Test1.MsgBox(‘Hello’)">
</body>
</html>
打开IE输入“http://localhost/test.html”,提示下载WebObj.cab,安装后点“Test”按钮,成功显示“Hello”提示框,完成!
转载: 从网页上下载控件时制作CAB包的方法
6 11 月, 2007第一步:创建一个inf文件:
INF文件是一个文本文件,指定运行控件所需要下载或者呈交的文件(比如DLL或者其它OCX)。
一个INF文件就捆绑了CAB压缩文件所有的必须文件。缺省情况下,
与现有硬盘中文件版本号相同的文件不被下载。
要了解有关INF文件及其选项(包括如何创建独立于平台的INF文件)的详细情况,
请参考平台软件开发工具包(Platform SDK,)的设置和系统管理服务(Setup and System Management Services)
部分的\Setup API\Overview\INF Files目录下的内容。
下面就以我自己写的一个videoweb.dll为例子。在videoweb.dll中使用到:tdiio.dll,encoder.dll,decoder.dll,tdiio.ini,user.ini,
camer.ini,drivo.ini.
video.inf的例子:
;inf file for videoweb.dll
[version]
signature=$CHICAGO$
[DestinationDirs]
DLLSysCopy=11
IniWinCopy=25
[DefaultInstall]
CopyFiles=DllSysCopy,IniWinCopy
AddReg=videoReg
[DllSysCopy]
tdiio.dll
Decoder.dll
VideoWeb.dll
[IniWinCopy]
camer.ini
user.ini
xvidMP4.ini
[videoReg]
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC},"",
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Control
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Implemented Categories
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\InprocServer32,"", %REG_SZ%,"%11%\VideoWeb.dll"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\InprocServer32,"ThreadingModel",%REG-SZ%,"Apartment"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\MiscStatus,"",%REG_SZ%,"0"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\MiscStatus\1,"",%REG_SZ%,"131473"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\ProgID,"",%REG_SZ%,"VideoWeb.1.1"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Programmable
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\ToolboxBitmap32,"",%REG_SZ%,"%11%\VideoWeb.dll,102"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\TypeLib,"",%REG_SZ%,"{FC4352CB-BB55-498C-BB21-E4BAE2FC2584}"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\Version,"",%REG_SZ%,"1.0"
HKCR,CLSID\{4BDA0AA3-2164-44B7-8A88-208A145F51DC}\VersionIndependentProgID,""
,%REG_SZ%,"VideoWeb.1"
;end of INF file
DestinationDirs:
指的是装载目录或者文件的地址: 11 指定为系统目录 WINDOWS/SYSTEM 或者 WINNT/SYSTEM32;10 规定为窗口目录、WINDOWS或者WINNT。
videoReg:如果是自己写的控件:可以在本地先用regsvr32 xxx.dll注册后,从注册表中找到上面的注册信息。
当然以上仅仅是在internet上分发软件时一个很简单的inf文件,还有更复杂的inf文件。请看SDK。 第二步:把video.inf, tdiio.dll,encoder.dll,decoder.dll,tdiio.ini,user.ini,
camer.ini,drivo.ini.放在一个文件夹中。
第三步:开始制作cab文件,我是用IExpress工具制作的(该工具在winnt\system32目录下面)。
1:选择创建新的自解压指令文件。
2:选择仅创建压缩文件(ActiveX安装)
3:点击添加把你要供别人下载的文件添加
4:点击浏览输入*.cab文件的存放地址(包含文件名)
5:就随便了
好了制作完成。
现在在你的网页中使用该控件,当别人访问你的网页时,如果他的机子上没有你的控件,浏览器就会自动下载安装。因为你的控件可能没有获得签名
因此得在你的浏览器中把浏览器的安全级别降低。在internet 工具中选择安全,选择自定义。找到下载未签名的ActiveX控件。选择其下面的提示或者启用。
在网页中插入:
<OBJECT classid=clsid:4BDA0AA3-2164-44B7-8A88-208A145F51DC
codebase="video.cab#version=2,0,0,1"
id=Video1 style="HEIGHT: 507px; WIDTH: 718px"></OBJECT>
该句.
注意:得把*.cab 文件你和的网页放在同一目录下。或者在codebase中指定*.cab的路径。