note icon indicating copy to clipboard operation
note copied to clipboard

知识代码笔记

Results 54 note issues
Sort by recently updated
recently updated
newest added

``` 69.147.76.173 flickr.com 69.147.76.173 www.flickr.com 206.190.57.60 m.flickr.com 206.190.57.61 secure.flickr.com 66.196.66.213 api.flickr.com 98.139.199.205 up.flickr.com ```

``` #!/usr/bin/expect set server [lindex $argv 0]; set timeout 3 spawn ssh daihui.gu@$server expect "passphrase" send "mypassword\r" interact ```

Linux

所用单片机均是 51,参加学校智能车大赛的代码。分两个代码: ### 代码一 ``` #include "reg52.h" #define uint unsigned int #define uchar unsigned char uchar num[] ={0x03,0x9f,0x25,0x0d,0x99,0x49,0x41,0x1f,0x01,0x09}; sbit p1_0=P1^0; //D2,低有效 sbit p1_1=P1^1; //D3,低有效 sbit p1_2=P1^2; // sbit p1_3=P1^3; //...

``` public static void main(String[] args) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Class cache = Integer.class.getDeclaredClasses ()[0]; Field c = cache.getDeclaredField ("cache"); c.setAccessible (true); Integer[] array = (Integer[]) c.get (cache);...

tomcat 自带验证,可设置指定路径需要验证,/*表示项目所有路径,在web.xml下加上以下配置就行了,简单方便。另需在conf/tomcat-user.xml中添加用户名密码。 ``` Security Constraint RES /* tomcat BASIC My RES ```

Other

``` package test; import java.util.HashMap; import java.util.Map; public class Sizeof { private static final Runtime s_runtime = Runtime.getRuntime(); public static void main(String[] args) throws Exception { // Warm up all...

插件完成的功能是选择项目,右键包含插件选项,点击具体选项时进行一些操作。 下面列出几个简单的代码编写点。 ### 1、编写plugin.xml ``` // 以additions区分 // 此处可有多个action ``` ### 2、实现`run`和`selectionChanged` 在`info.yhzhtk.popup.actions.ExportAction` 中已自动生成了`run`和`selectionChanged`,需要实现具体方法,调用显示对话框完成指定事件。 ``` /** * @see IActionDelegate#run(IAction) */ public void run(IAction action) { ExportDialog dlg = new ExportDialog(shell,...

Other

以下代码是新建一个love.txt,然后输入内容是: ``` Girl: I LOVE YOU! ``` 最后将love.txt删除。 将以下代码拷贝到一个txt文件,并将后缀修改为.vbs,保存打开即可。注,vbs仅windows下有效。 ``` set fso=createobject("scripting.filesystemobject") set ws=wscript.createobject("wscript.shell") fso.createtextfile("love.txt") ws.run("love.txt") wscript.sleep 500 ws.sendkeys("G") wscript.sleep 100 ws.sendkeys("i") wscript.sleep 100 ws.sendkeys("r") wscript.sleep 100 ws.sendkeys("l") wscript.sleep 100...

Other

之前玩过一下ARTK_MMD,现在记录一下。 ARTK_MMD 是日本人基于ARToolKit做的一个虚拟现实。之前有玩过ARTK_MMD,用摄像头照在一张有特殊marker的纸上,初音就会在上面跳舞,马上就把现实虚拟出了一个初音。 **安装使用** http://lazynight.me/2702.html **用到的库:** ARToolKit 2.72.1 http://www.hitl.washington.edu/artoolkit/download/ GLUT for Win32 version 3.7.6 http://www.xmission.com/~nate/glut.html Bullet Physics SDK 2.75 RC6 http://www.bulletphysics.com/ **使用详细说明(翻译至日文):** **工作环境** - Windows XP 32位, OpenGL的3D显示 **如何使用** -...

Other

以前修改的一个打包工具,在此记录一下。待有用之时借鉴 _windows 批处理运行命令_ ``` FOR /F "delims=, tokens=1,2" %%k in (path.txt) DO FOR /F "delims=, tokens=1-26" %%A in (devices.txt) do ant -f source\build.xml -DinPath=%%k,-DoutPath=%%l,-Dcategory=%%A,-Dcateid=%%B,-Dimgname=%%C,-Dimgsize=%%D,-Dimgnumber=%%E,-Dupmessage=%%F,-Dupnumber=%%G,-Dprice=%%H,-DsendNum=%%I,-Durl1=%%J,-Durl2=%%K,-Durl3=%%L,-Durl4=%%M ``` _build.xml文件_ ``` Clean ok! size...

Other