demo

Possible to mirror iPhone/iPad screen on a monitor without jailbreaking?

强颜欢笑 提交于 2019-11-28 06:03:57
I have been looking for a way to show the iPhone screen (not the simulator) on a monitor or projector for demo purposes. Previous SO post suggested jailbreak ( Veency , iDemo/DemoGod , screensplitr ) or simulator. Release notes iOS 3.2 (External Display Support) and iOS 4.0 (Inherited Improvements) mentions that it should be possible to connect external displays to iOS 4.0 devices. Is it now possible to demo an iPhone device on a monitor without using the simulator, or are the release notes about other improvements? Anyone tried to display an iOS 4.0 device on a projector or monitor? Update 22

正则表达式纯数字校验 JS

邮差的信 提交于 2019-11-28 05:38:53
正则表达式纯数字校验 直接看代码测试 通过: <!DOCTYPE html> <html> <head> <title>Demo Example</title> <script type="text/javascript" src="jquery-1.12.0.min.js"></script> <script type="text/javascript" src="jx.core.js"></script> <script type="text/javascript" src="demo.js"></script> <link rel="stylesheet" type="text/css" href="demo.css"/> </head> <body> 金额: <input id="not_digit"></input> <input type="button" id="btn" value="点我"/> </body> </html> JS实现: $(function(){ $('#btn').click(function(){ var val =$('#not_digit').val(); var patrn = /^[0-9]*$/; if (!patrn.test(val)) { alert('包含不是数字的字符'); } }); }) 给大家发福了

What is memoization good for and is it really all that helpful?

亡梦爱人 提交于 2019-11-28 04:57:13
There are a few automatic memoization libraries available on the internet for various different languages; but without knowing what they are for, where to use them, and how they work, it can be difficult to see their value. What are some convincing arguments for using memoization, and what problem domain does memoization especially shine in? Information for the uninformed would be especially appreciated here. The popular factorial answer here is something of a toy answer. Yes, memoization is useful for repeated invocations of that function, but the relationship is trivial — in the "print

volume rendering (using glsl) with ray casting algorithm

无人久伴 提交于 2019-11-28 04:34:38
I am learning volume rendering using ray casting algorithm. I have found a good demo and tuturial in here . but the problem is that I have a ATI graphic card instead of nVidia which make me can't using the cg shader in the demo, so I want to change the cg shader to glsl shader. I have gone through the red book (7 edition) of OpenGL, but not familiar with glsl and cg. does anyone can help me change the cg shader in the demo to glsl? or is there any materials to the simplest demo of volume rendering using ray casting (of course in glsl). here is the cg shader of the demo. and it can work on my

Tools to support live coding as in Bret Victor's “Inventing on Principle” talk

放肆的年华 提交于 2019-11-28 02:40:00
I've watched an already well known video where Bret Victor, former Apple UI designer shows amazing demos with immediate updates of running code after changing literally one symbol in source code. To make my question clear to those who haven't seen or don't have time to watch the video: I want to use a tool like that to write my own software. Is the tool he was demonstrating available, or are there other similar tools? It doesn't matter which languages/environments, I just want to have my code running and then change a line in source and immediately see the results updated without restarting it

一个简单多线程购票Demo

限于喜欢 提交于 2019-11-27 07:38:12
package thread; public class Test02 { //定义初始票数 public static int chepiao = 20; public static void main(String[] args) {     Test02 t = new Test02(); //匿名类创建线程 Thread t1 = new Thread() { @Override public void run() {               //加同步锁 synchronized(Test02.class) {                    //卖完就停止 if(chepiao<=0) { return; } // TODO Auto-generated method stub try { t.jianfa(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } super.run(); } } };           //启动30个线程 for(int i = 1;i<30;i++) { new Thread(t1).start(); } } //票数-1 public synchronized void jianfa()

What is memoization good for and is it really all that helpful?

孤人 提交于 2019-11-27 00:43:28
问题 There are a few automatic memoization libraries available on the internet for various different languages; but without knowing what they are for, where to use them, and how they work, it can be difficult to see their value. What are some convincing arguments for using memoization, and what problem domain does memoization especially shine in? Information for the uninformed would be especially appreciated here. 回答1: The popular factorial answer here is something of a toy answer. Yes,

volume rendering (using glsl) with ray casting algorithm

对着背影说爱祢 提交于 2019-11-27 00:30:44
问题 I am learning volume rendering using ray casting algorithm. I have found a good demo and tuturial in here. but the problem is that I have a ATI graphic card instead of nVidia which make me can't using the cg shader in the demo, so I want to change the cg shader to glsl shader. I have gone through the red book (7 edition) of OpenGL, but not familiar with glsl and cg. does anyone can help me change the cg shader in the demo to glsl? or is there any materials to the simplest demo of volume