??xml version="1.0" encoding="utf-8" standalone="yes"?>
—-解压文g
tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2
–程序移C个合适的位置
sudo mv phantomjs-1.9.7-linux-x86_64 /usr/local/src/phantomjs
—-创徏软链接到环境变量中。这样可以直接在shell中用phantomjs命o(h)
sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
—-(g)查是否正常工?/p>
phantomjs –version
如果你看到当前版本号Q即表示正常工作?jin)?br />
--------------------------------------------------
Windows下安?/strong>
W一步:(x)下蝲?jin)PhantomJS后,把压~包里的文g夹解压到D盘,重命名文件夹为phantomjsQ然后在windows中添加环境变?D:\phantomjs到Path中。在q里先不用关?j)phantomjs文g夹下的内宏V?br />
md C:\temp
SET tmp=c:\temp
cd "c:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLServer\MSSQL\Binn\"
DQSInstaller.exe
As I said before, communication between Flash Player and its container has been made extremely easy. The new class that makes this process so easy is the ExternalInterface. We will begin in the ActionScript. First, we need to import this new class so we can use it (as2 only, in as3 it will work without the import):
import flash.external.ExternalInterface;
Next, we have to register any function we want to make available externally:
ExternalInterface.addCallback("addText", addText);
Basically, the code above will allow us to call the addText function (which I will show in a minute) from the C# application.
The addText function is as below. Basically, it takes a string input and appends it to a text box
function addText(val:String):void { inTxt.appendText(val + "\n"); // append text recieved from c# }
That’s it from the ActionScript side. Now all we need to do is call the function from C#. First, I add an instance of the Flash Player ActiveX control to my form and load the SWF we created in the form’s constructor:
private AxShockwaveFlash player; public DemoForm () { ... player.LoadMovie(0, Application.StartupPath + "\\EITest.swf"); player.Play(); ... }
Next, all we have to do is call the externalized method when desired. In my case, it is in response to the user clicking the send button:
private void sendBtn_Click(object sender, EventArgs e) { player.CallFunction("" + outTxt.Text + ""); }
Again, you will need to use the ExternalInterface in the ActionScript:
function send(evt : Event):void { ExternalInterface.call("sendText", outTxt.text); // function to call and it's parameters outTxt.text = ""; // reset text box }
As you can see, I am calling a method sendText and passing the input string as a parameter. Now to receive the message in C#, we first have to subscribe to the FlashCall event. You can do this in the constructor or from the activex properties panel on events tab.
Now the call made in ActionScript will be received in the request property of the event argument. For my particular call, the XML will look like this:
<invoke name="sendText" returntype="xml"> <arguments> <string>some text message here</string> </arguments> </invoke>
So now all we have to do is parse the XML in the event handler and invoke the C# function locally:
private void player_FlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e) { // message is in xml format so we need to parse it XmlDocument document = new XmlDocument(); document.LoadXml(e.request); // get attributes to see which command flash is trying to call XmlAttributeCollection attributes = document.FirstChild.Attributes; String command = attributes.Item(0).InnerText; // get parameters XmlNodeList list = document.GetElementsByTagName("arguments"); // Interpret command switch (command) { case "sendText" : resultTxt.Text = list[0].InnerText; break; case "Some_Other_Command" : break; } }
卛_上WorkingDir: {app}。见inno setup FAQ.
使用WebProxyc,该类I间?using System.net;
WebProxy proxyObject = new WebProxy("代理服务器IP和端口(例如Qhttp://proxyserver:80/Q?amp;quot;,true);
WebRequest req = WebRequest.Create("http://www.contoso.com"); //使用WebRequest上网
req.Proxy = proxyObject; //讄代理
Jpxx.forceLogout()Ҏ(gu)通过AJAX技术来强制注销用户Q即调用session.invalidate()Ҏ(gu)?
转蝲:http://www.jpxx.org/?tid=54Deployment failure on Tomcat 6.x. Could not copy all resources to E:\apache-tomcat-6.0.16\webapps\HebbnWebServices. If a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment at E:\apache-tomcat-6.0.16\webapps\HebbnWebServices
再次炚w|按钮时׃(x)提示如下Q?/p>
Undeployment Failure could not be redeployed because it could not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running,which has locked one or more files.
to correct the deployment you will need to stop the server and then redeploy the project before restarting the server.
解决的办法就是在Eclipse中把目中引用的jar文g重新加一遍就行了(jin)Q基本原因就是以前的jar文g不存在了(jin)Q但是项目信息中q有Q即目?classpath文g中还有不存在的jar文g引用?/p>
可以右键炚w目名Uͼ选择Properties,选择Java Build Path,选择Libraries,把所有项目中的jar都removeQ然后再?add jars"Q把目中的jar文g都加q来Q再ơ部|就正常?jin)?/p>
转自:http://blog.csdn.net/peihexian/archive/2008/06/18/2561816.aspx
ie7昄出来的checkbox居然是未选中的但是alert出来的却是trueQ而FF一切正?br />
后来查了(jin)半天资料说是ie昄的时候只对状态改变比较敏?br />
Ҏ(gu)
var echkbox=document.createElement("input");
echkbox.setAttribute("type","checkbox");
echkbox.setAttribute("id","inputid");
echkbox.setAttribute("name","inputname");
echkbox.setAttribute("value","inputvalue");
var addhere=document.getElementById("someElementId");
addhere.appendChild(echkbox);
echkbox.setAttribute("checked","checked");
alert(document.getElementById("inputid").checked);
一切ok
radio同样是这U情c(din)?/font>
Z(jin)防止~存Q可以在面的顶端添?/span> response.expires = -1
使用java提供的方法,?/span>jsp或?/span>servlet中都可以 <% response.setheader("pragma","no-cache");
response.setheader("cache-control","no-cache"); response.setdateheader("expires", 0);
%>
使用NET?/span>CS面?/span>page load中把q句加上!
context.response.cache.setcacheability(httpcacheability.nocache);
使用html标记Q如下面Q?/span> <head> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0">
</head>