zeroclipboard

spring中classpath与classpath*区别

安稳与你 提交于 2019-12-02 23:35:23
Spring可以通过指定classpath*:与classpath:前缀加路径的方式从classpath加载文件,如bean的定义文件.classpath*:的出现是为了从多个jar文件中加载相同的文件.classpath:只能加载找到的第一个文件. 比如 resource1.jar中的package 'com.test.rs' 有一个 'jarAppcontext.xml' 文件,内容如下: <bean name="ProcessorImplA" class="com.test.spring.di.ProcessorImplA" /> resource2.jar中的package 'com.test.rs' 也有一个 'jarAppcontext.xml' 文件,内容如下: <bean id="ProcessorImplB" class="com.test.spring.di.ProcessorImplB" /> public InputStream getInputStream() throws IOException { InputStream is = this .servletContext.getResourceAsStream( this .path); if (is == null ) { throw new FileNotFoundException(

Copy text to clipboard using Zero Clipboard in asp.net

浪子不回头ぞ 提交于 2019-12-01 18:06:27
I am trying to use Zero * Clipboard * to copy text from Textbox to Clipboard when client clicks a Button . I am trying this for many days but no luck to make this work. In Scenario, i have one Textbox which render data from the Database . I have one Button which when client clicks should copy text of the Textbox . I have tried following but its not working. Some help will be appreciated. <script type="text/javascript" src="/Scripts/ZeroClipboard.js"></script> <script type="text/javascript"> ZeroClipboard.setMoviePath('/Scripts/ZeroClipboard.swf'); </script> <script> function test() {

Android 自适应不同分辨率屏幕

时光怂恿深爱的人放手 提交于 2019-11-30 16:27:18
前几天,面试的时候,有问道关于如何自适应不同分辨率屏幕的问题。当时也是一知半解,今天索性看了很多资料,好好的总结了下。 首先解释几个基本的概念: in:表示英寸,是屏幕的物理尺寸。每英寸等于2.54厘米。例如,形容手机屏幕大小,经常说,3.2(英)寸、3.5(英)寸、4(英)寸就是指这个单位。这些尺寸是屏幕的对角线长度。如果手机的屏幕是3.2英寸,表示手机的屏幕(可视区域)对角线长度是3.2*2.54 = 8.128厘米。 px:表示屏幕实际的象素。例如,320*480的屏幕在横向有320个象素,在纵向有480个象素。 dip或dp(与密度无关的像素):这个和设备硬件有关,为了支持WVGA、HVGA和QVGA推荐使用这个。一种基于屏幕密度的抽象单位。设置一些view的宽高可以用这个,一般情况下,在不同分辨率,都不会有缩放的感觉。如果用px的话,320px占满HVGA的宽度,到WVGA上就只能占一半不到的屏幕了,那一定不是你想要的。 sp: 除了与密度无关外,还与scale无关 主要处理字体的大小。 density:屏幕密度,每英寸有多少个像素显示点,与分辨率是两个概念 VGA:480*640 Low:120 Medium:240 High:480 方便记忆的法子:QVGA即"Quarter VGA"。顾名思义即VGA的四分之一尺寸 HVGA 即“Half VGA”

How to programmatically copy asynchronous dependent content to the clipboard following a click?

孤街浪徒 提交于 2019-11-29 03:49:39
I'm trying to programmatically use the execCommand in Chrome (Build 43) to copy the result of an asynchronous JSONP request to the clipboard. Here is a snippet of the logic : loadContent() function loadContent(callback) { $.getJSON('http://www.randomtext.me/api/lorem/p-5/10-20?&callback=myFunc',function(result){ console.log('result=',result.text_out); $("#container").html(result.text_out); if (callback) { callback(); } }); } function copyAjax() { loadContent(copy); } function copy() { var copyDivText = $('#container').text(); console.log('copyDivText=',copyDivText); executeCopy(copyDivText); }

Selecting text in mobile Safari on iPhone

為{幸葍}努か 提交于 2019-11-28 17:05:52
I'm trying to make it easy for an iphone user to copy some text to the clipboard in mobile safari. As in the usual "touch-hold-copy". There is a specific bit of text I want to a user to copy. I have full choice of the html markup in which to wrap the text. How can I make it easy, rather than abitrary? For instance: Is there a way to "select all" the text upon touch-down using javascript? Then a user could just continue to touch-hold and then choose copy? Is there a way to bring up the "select all" option? Like you can when typing in a text box? After which they can choose copy? If there's no

深入分析Java ClassLoader原理

痴心易碎 提交于 2019-11-28 10:28:08
一、什么是ClassLoader? 大家都知道,当我们写好一个Java程序之后,不是管是CS还是 BS应用,都是由若干个.class文件组织而成的一个完整的Java应用程序,当程序在运行时,即会调用该程序的一个入口函数来调用系统的相关功能,而这些功能都被封装在不同的class文件当中,所以经常要从这个class文件中要调用另外一个class文件中的方法,如果另外一个文件不存在的,则会引发系统异常。而程序在启动的时候,并不会一次性加载程序所要用的所有class文件,而是根据程序的需要,通过Java的类加载机制(ClassLoader)来动态加载某个class文件到内存当中的,从而只有class文件被载入到了内存之后,才能被其它class所引用。所以 ClassLoader就是用来动态加载class文件到内存当中用的。 二、Java默认提供的三个ClassLoader BootStrap ClassLoader :称为启动类加载器,是Java类加载层次中最顶层的类加载器, 负责加载JDK中的核心类库,如:rt.jar、resources.jar、charsets.jar等 ,可通过如下程序获得该类加载器从哪些地方加载了相关的jar或class文件: [java] view plain copy <EMBED id=ZeroClipboardMovie_1 height=18 name

How to actually use ZeroClipboard in jQuery?

依然范特西╮ 提交于 2019-11-27 23:41:43
问题 I just can't get this thing. How is ZeroClipboard supposed to work? Why does it need to move the flash-element over the copied text? I've read this thing: http://code.google.com/p/zeroclipboard/wiki/Instructions Can someone provide me a short snippet, which makes it possible to copy a text in variable to users clipboard, when user clicks a link. Is this even possible? I don't care, if it doesn't work on all browsers (IE6 for example). I'm using jQuery. 回答1: The "minimal example" code given on

How to programmatically copy asynchronous dependent content to the clipboard following a click?

浪子不回头ぞ 提交于 2019-11-27 17:51:33
问题 I'm trying to programmatically use the execCommand in Chrome (Build 43) to copy the result of an asynchronous JSONP request to the clipboard. Here is a snippet of the logic : loadContent() function loadContent(callback) { $.getJSON('http://www.randomtext.me/api/lorem/p-5/10-20?&callback=myFunc',function(result){ console.log('result=',result.text_out); $("#container").html(result.text_out); if (callback) { callback(); } }); } function copyAjax() { loadContent(copy); } function copy() { var

HTML5 alternative to flash-based ZeroClipboard for safe copying of data to clipboard?

拥有回忆 提交于 2019-11-27 11:31:58
With flash on the way out in many environments (iPhone, Android, IE10, etc...), is there any new solution forthcoming in any browsers that will allow a safe copy of information to the clipboard without flash installed? I've been using ZeroClipboard so far, but I'm worried about more viewers that don't have flash and this functionality is going to be broken and I'd love to not depend on Flash whenever possible. Beau Bouchard The reasoning is that automatic copying to clipboard can be very dangerous, thus most browsers (except IE)* make it difficult unless you use flash. Much like your

Selecting text in mobile Safari on iPhone

旧街凉风 提交于 2019-11-27 10:10:52
问题 I'm trying to make it easy for an iphone user to copy some text to the clipboard in mobile safari. As in the usual "touch-hold-copy". There is a specific bit of text I want to a user to copy. I have full choice of the html markup in which to wrap the text. How can I make it easy, rather than abitrary? For instance: Is there a way to "select all" the text upon touch-down using javascript? Then a user could just continue to touch-hold and then choose copy? Is there a way to bring up the "select