打包软件install shield如何建立快捷图标与执行文件关联 50C

打包软件install shield如何建立快捷图标与执行文件关联,我打包出来的桌面快捷图标与其他的图标不一样
1:无法执行程序。。。。
2:鼠标右键我的图标查看“目标”“目标位置都是灰色的”,正常的应该油路径信息,而我没有,个人推断是快捷图标与执行文件没产生关联

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
使用的C#,如何用install shield打包数据库同所做软件成为一个安装包
是这样的,我做了一个小软件,有保存查询功能,所以就用了SQL server数据库, 连接数据库的字符串是直接在vs2015里“代码写的”,现在打包出来本机电脑可正常运行,但是问题来了: 1:此软件安装到其他电脑上因为没有SQLserver所以无法载入读取数据文件 2:就算安装有SQLserver的电脑,因为连接数据库的字符串不同导致连接失败 3:数据库分离出来的文件无法自动加载到安装在电脑上的数据库当中(这个是我尝试在另一台电脑上重新安装SQLSERVEER,把服务名,密码,用户设置成和我本机一样,就算能成功连接数据库,也得手动附加我的数据库文件) {注意:所安装所有电脑都是杜绝联网了,所以不要给我说网络服务器什么的,多谢多谢,现在脑子也现装不下那么大知识量} 以上问题通过搜索找到了一些解决方案,但都不很理想 1:电脑上没SQLserver的重新给他安装一个,但是一个SQLserver好几个G,安装速度也比较慢,而且对于不懂的人来说,sqlserver的单独安装无疑是增加使用成本,更要命的是,就算人家折腾出来安装起,服务器名字、用户名、密码八成是不一样的,连接字符串又是VS代码里写好的,改都改不了 2:关于连接字符串,网上提出了XML配置文件,将连接字符串写入XML配置文件中,后期就算打包了,也可以通过配置文件进行修改连接字符串,这个方法我还在学习实验中(刚接触配置文件,别喷我....),暂时还没实现功能,但是我又预感这东西可以,但是问题就是不太智能,有没有方法自动读取数据库的服务名呢............
installshield打包脚本语言中如何实现xml文件node节点属性的动态修改
installshield打包脚本语言中如何实现xml文件node节点属性的动态修改,如下图多个node节点中的url中的IP地址如何用打包脚本语言实现动态修改?(installshield自带的脚本语言),各位大侠请多指教,急,急,急!! ![图片说明](https://img-ask.csdn.net/upload/201704/01/1491009077_570541.jpg)
Shadow 的正确实现
Problem Description Somewhere in the universe, Orez is a planet which has highly developed civilization and advanced technology. But unfortunately, a supernova which is near to Orez blossomed and emitted an extraordinary radiation that may danger the civilization in Orez. There is a great fleet of spaceship in the planet. The fleet has ONE battle-cruiser and several fighters. A fighter can make a sphere magnetic shield which the radiation can’t pass through. When the fleet is in the space, the battle-cruiser and the magnetic shields can make shadows on the ground if the radiation comes. When the radiation hit the planet, people in Orez will be destroyed except they go into the shadow of the fleet. So we want to know the area of the safety shadow. To simplify this problem, you can consider that: the ground is an infinity plane, the radiation is parallel light, a fighter is a point, and the battle-cruiser is a 3D convex hull. Input The input consists of multiply test cases. For each case, the first line contains five integers: N, M, Dx, Dy and Dz. N is the number of fighters. M points in/on the battle-cruiser will be given later. The convex hull of these M points is the shape of the battle-cruiser. (Dx, Dy, Dz) is the direction vector of the radiation. Dz is negative. Each of the next N lines contains four integers Xi, Yi, Zi and Pi , representing a fighter. (Xi, Yi, Zi) is the coordinate of the fighter (also the center of the sphere shield made by the fighter). Pi is the radius of the shield. Each of the next M lines contains three integers Xi, Yi and Zi. (Xi, Yi Zi) is a point in/on the battle-cruiser. All the Xi, Yi are in the range of [0, 100]; all the Zi are in the range of [20,100]; 0< Pi <= 20; N+M<=500, and the ground is the plane Z=0. Please note that several fighters may stay at the same position, and a fighter can stay inside or on the cruiser. The input ends with 0 0 0 0 0. Output For each case, print the area of shadow in a line. The result should be rounded to 4 digits after the decimal point. Sample Input 2 4 1 1 -1 25 22 30 14 24 32 27 15 32 40 21 21 30 21 20 21 22 20 30 22 0 0 0 0 0 Sample Output 1539.3185
Shadow 具体怎么写
Problem Description Somewhere in the universe, Orez is a planet which has highly developed civilization and advanced technology. But unfortunately, a supernova which is near to Orez blossomed and emitted an extraordinary radiation that may danger the civilization in Orez. There is a great fleet of spaceship in the planet. The fleet has ONE battle-cruiser and several fighters. A fighter can make a sphere magnetic shield which the radiation can’t pass through. When the fleet is in the space, the battle-cruiser and the magnetic shields can make shadows on the ground if the radiation comes. When the radiation hit the planet, people in Orez will be destroyed except they go into the shadow of the fleet. So we want to know the area of the safety shadow. To simplify this problem, you can consider that: the ground is an infinity plane, the radiation is parallel light, a fighter is a point, and the battle-cruiser is a 3D convex hull. Input The input consists of multiply test cases. For each case, the first line contains five integers: N, M, Dx, Dy and Dz. N is the number of fighters. M points in/on the battle-cruiser will be given later. The convex hull of these M points is the shape of the battle-cruiser. (Dx, Dy, Dz) is the direction vector of the radiation. Dz is negative. Each of the next N lines contains four integers Xi, Yi, Zi and Pi , representing a fighter. (Xi, Yi, Zi) is the coordinate of the fighter (also the center of the sphere shield made by the fighter). Pi is the radius of the shield. Each of the next M lines contains three integers Xi, Yi and Zi. (Xi, Yi Zi) is a point in/on the battle-cruiser. All the Xi, Yi are in the range of [0, 100]; all the Zi are in the range of [20,100]; 0< Pi <= 20; N+M<=500, and the ground is the plane Z=0. Please note that several fighters may stay at the same position, and a fighter can stay inside or on the cruiser. The input ends with 0 0 0 0 0. Output For each case, print the area of shadow in a line. The result should be rounded to 4 digits after the decimal point. Sample Input 2 4 1 1 -1 25 22 30 14 24 32 27 15 32 40 21 21 30 21 20 21 22 20 30 22 0 0 0 0 0 Sample Output 1539.3185
Disconnect 怎么才能解决
Problem Description An enemy state of our country is occupying an island of ours. They take lots of warships around the island. Communications among the warships are transited by wireless signal, but we have to separate the warships so that at least ONE pair of warships cannot communicate with each other. For that purpose, we create a kind of Wireless Signal Shielding Device (WSSD) that WSSD can shield the wireless signal in its shielding circle with radius R. The factories could produce enough WSSDs and our patrol team discovered a lot of places that could be installed with WSSDs. In order to separate the warships, we need to know the minimum value of radius R, smaller R is better because of the cost of manufacture. Please notice that because of the inflection of wireless signal, two warships can communicate with each other even there is no sight view between them. Input The input contains multiply test cases. The first line of each test case consists of two integers, n, m (0 < n, m <= 10000), which are the number of places where we can install WSSDs and the number of warships. Each of the next n lines contains two integers, indicating the coordinate of the place where we can install WSSDs. The next m lines indicate the coordinates of warships. The last test case is followed by a single line with two zeros which should not be processed. Please notice that all the values of coordinates are between -10000 to 10000, and no two coordinates have the same value. Output Output the minimum R with two fractional digits. Sample Input 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 0 0 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 -9 0 0 0 Sample Output 0.71 8.00
InstallShield打包过程中添加redistributables
为什么这个只有installed locally啊,想把.net 4.5和sql server打包进去 ![图片说明](https://img-ask.csdn.net/upload/201703/10/1489119506_56936.jpg) ![图片说明](https://img-ask.csdn.net/upload/201703/10/1489119520_509255.jpg)
Disconnect 的程序的编写机制是什么
Problem Description An enemy state of our country is occupying an island of ours. They take lots of warships around the island. Communications among the warships are transited by wireless signal, but we have to separate the warships so that at least ONE pair of warships cannot communicate with each other. For that purpose, we create a kind of Wireless Signal Shielding Device (WSSD) that WSSD can shield the wireless signal in its shielding circle with radius R. The factories could produce enough WSSDs and our patrol team discovered a lot of places that could be installed with WSSDs. In order to separate the warships, we need to know the minimum value of radius R, smaller R is better because of the cost of manufacture. Please notice that because of the inflection of wireless signal, two warships can communicate with each other even there is no sight view between them. Input The input contains multiply test cases. The first line of each test case consists of two integers, n, m (0 < n, m <= 10000), which are the number of places where we can install WSSDs and the number of warships. Each of the next n lines contains two integers, indicating the coordinate of the place where we can install WSSDs. The next m lines indicate the coordinates of warships. The last test case is followed by a single line with two zeros which should not be processed. Please notice that all the values of coordinates are between -10000 to 10000, and no two coordinates have the same value. Output Output the minimum R with two fractional digits. Sample Input 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 0 0 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 -9 0 0 0 Sample Output 0.71 8.00
一个连线的计算问题,用的方法
Problem Description An enemy state of our country is occupying an island of ours. They take lots of warships around the island. Communications among the warships are transited by wireless signal, but we have to separate the warships so that at least ONE pair of warships cannot communicate with each other. For that purpose, we create a kind of Wireless Signal Shielding Device (WSSD) that WSSD can shield the wireless signal in its shielding circle with radius R. The factories could produce enough WSSDs and our patrol team discovered a lot of places that could be installed with WSSDs. In order to separate the warships, we need to know the minimum value of radius R, smaller R is better because of the cost of manufacture. Please notice that because of the inflection of wireless signal, two warships can communicate with each other even there is no sight view between them. Input The input contains multiply test cases. The first line of each test case consists of two integers, n, m (0 < n, m <= 10000), which are the number of places where we can install WSSDs and the number of warships. Each of the next n lines contains two integers, indicating the coordinate of the place where we can install WSSDs. The next m lines indicate the coordinates of warships. The last test case is followed by a single line with two zeros which should not be processed. Please notice that all the values of coordinates are between -10000 to 10000, and no two coordinates have the same value. Output Output the minimum R with two fractional digits. Sample Input 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 0 0 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 -9 0 0 0 Sample Output 0.71 8.00
矩阵的连接状态用C语言实现谢谢
Problem Description An enemy state of our country is occupying an island of ours. They take lots of warships around the island. Communications among the warships are transited by wireless signal, but we have to separate the warships so that at least ONE pair of warships cannot communicate with each other. For that purpose, we create a kind of Wireless Signal Shielding Device (WSSD) that WSSD can shield the wireless signal in its shielding circle with radius R. The factories could produce enough WSSDs and our patrol team discovered a lot of places that could be installed with WSSDs. In order to separate the warships, we need to know the minimum value of radius R, smaller R is better because of the cost of manufacture. Please notice that because of the inflection of wireless signal, two warships can communicate with each other even there is no sight view between them. Input The input contains multiply test cases. The first line of each test case consists of two integers, n, m (0 < n, m <= 10000), which are the number of places where we can install WSSDs and the number of warships. Each of the next n lines contains two integers, indicating the coordinate of the place where we can install WSSDs. The next m lines indicate the coordinates of warships. The last test case is followed by a single line with two zeros which should not be processed. Please notice that all the values of coordinates are between -10000 to 10000, and no two coordinates have the same value. Output Output the minimum R with two fractional digits. Sample Input 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 0 0 4 3 -1 0 1 0 0 1 0 -1 10 0 9 0 -9 0 0 0 Sample Output 0.71 8.00
求java代码生成svg文件的思路
我这个svg图片是路标导航图,这种话路标导航可能有上万张,所以只能用代码去生成这个svg图片,可是有没有正确的思路。 这是其中一张svg文件的xml <?xml version="1.0" encoding="GBK"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="basic" id="svg" x="0px" y="0px" width="225px" height="560px" xml:space="preserve" preserveAspectRatio="xMidYMid meet" zoomAndPan="magnify" contentScriptType="application/ecmascript" contentStyleType="text/css"> <defs> <g id="ARROW_LANE"> <polygon fill="#FCFFFF" points="8.019,25 0,12.911 5.443,12.911 5.443,0 10.525,0 10.525,12.911 16,12.911 "/> </g> <g id="BIF_A_R.ARROW_LANE"> <polygon fill="#FCFFFF" points="20,20 5.416,17.04 9.364,13.083 0,3.695 3.687,0 13.05,9.388 17.021,5.407 "/> </g> <g id="ARROW_DIRECTION_SE"> <polygon fill="#14171C" points="20,20 5.416,17.04 9.364,13.083 0,3.695 3.687,0 13.05,9.388 17.021,5.407 "/> </g> <g id="BIF_A_L.ARROW_LANE"> <polygon fill="#FCFFFF" points="0,20 14.584,17.04 10.636,13.083 20,3.695 16.313,0 6.95,9.388 2.979,5.407 "/> </g> <g id="ICON_EMERGENCY"> <rect fill="#004C91" width="15" height="15"/> <path fill="#FCFFFF" d="M2.209,13.758V1.242h2.665v4.926h5.253V1.242h2.664v12.516h-2.664V8.285H4.874 v5.473H2.209z"/> </g> <g id="ICON_AIRPORT"> <rect fill="#FCFFFF" stroke="#14171C" width="15" height="15" stroke-width="1"/> <path fill="#14171C" d="M3.53,7.11L2.033,5.661L1.578,5.619l0.446,1.924L1.578,9.394L2.033,9.36L3.53,8.031l4.075,0.36 l-2.833,4.753l1.192-0.192l2.152-2.544l1.655-1.955c0,0,3.649,0.059,3.649-0.946c0-1.003-3.596-0.903-3.596-0.903L5.965,2.064 L5.057,1.856l2.549,4.773L3.53,7.11z"/> </g> <g id="ICON_RENTALCAR"> <rect fill="#14171C" width="15" height="15" stroke="#FCFFFF" stroke-width="1.0"/> <path fill="#FCFFFF" d="M2.372,13.636h1.422v-1.099H2.372V13.636z M11.229,13.636h1.424v-1.099h-1.424V13.636z M5.22,4.514 c0.977,0,1.389-0.845,1.389-0.845s0.549-0.313,1.066-0.313c0.402,0,0.936,0.323,0.926,0.313C8.577,3.646,9.067,3.165,9.067,3.165 L9.452,3.55c0,0,0.369-0.353,0.369-0.368c0-0.017,0.381,0.38,0.381,0.38l0.381-0.38l0.357,0.356l0.77-0.771l-0.635-0.635H6.58 c0,0-0.424-0.769-1.345-0.769c-1.13,0-1.594,0.956-1.594,1.635C3.642,3.677,4.244,4.514,5.22,4.514z M4.569,2.486 c0.25,0,0.452,0.203,0.452,0.452c0,0.25-0.202,0.453-0.452,0.453S4.116,3.188,4.116,2.938C4.116,2.689,4.319,2.486,4.569,2.486z M12.305,8.321c0,0-0.436-1.167-0.752-1.938c-0.318-0.771-0.951-0.812-0.951-0.812l-6.117,0.05c-0.73,0-0.969,0.633-0.969,0.633 l-0.83,2.066c-0.662,0.1-0.821,0.851-0.821,0.851v2.888h11.27c0,0,0-2.532,0-2.888C13.135,8.658,12.305,8.321,12.305,8.321z M4.18,6.502c0.059-0.178,0.257-0.178,0.257-0.178s5.929,0.02,6.146,0.02c0.219,0,0.258,0.257,0.258,0.257l0.652,1.721H3.468 C3.468,8.321,4.12,6.68,4.18,6.502z M3.479,11.043c-0.529,0-0.958-0.429-0.958-0.958S2.95,9.127,3.479,9.127 s0.958,0.429,0.958,0.958S4.008,11.043,3.479,11.043z M11.521,11.043c-0.529,0-0.958-0.429-0.958-0.958s0.429-0.958,0.958-0.958 s0.958,0.429,0.958,0.958S12.05,11.043,11.521,11.043z"/> </g> <g id="ICON_PARKING"> <rect fill="#004C91" width="15" height="15"/> <path fill="#FCFFFF" d="M3.964,13.106V2.353h2.994c1.117,0,1.846,0.051,2.189,0.153C9.694,2.673,10.145,3.028,10.5,3.57 c0.357,0.543,0.535,1.242,0.535,2.098c0,0.778-0.154,1.429-0.461,1.954C10.268,8.148,9.883,8.519,9.422,8.73 c-0.461,0.213-1.254,0.32-2.379,0.32H5.821v4.056H3.964z M5.821,4.172V7.23h1.033c0.691,0,1.162-0.047,1.412-0.14 C8.514,6.999,8.719,6.83,8.877,6.588c0.158-0.244,0.238-0.541,0.238-0.895c0-0.357-0.082-0.658-0.246-0.903 C8.706,4.544,8.502,4.38,8.262,4.298C8.02,4.214,7.51,4.172,6.73,4.172H5.821z"/> </g> <g id="EXIT_BACKGROUND"> <rect fill="#FCFFFF" width="54" height="16" rx="8" ry="8" stroke="#14171C" stroke-width="1.5"/> <path fill="#14171C" d="M6.119,13.494H9.4V2.685H7.878L6.119,13.494z M14.151,3.528c0,0,0.397,0.434,0.88,0.984 c-0.699,0.464-1.578,1.172-2.308,2.385l-0.686-4.213h-1.521v10.809h3.281c0,0-0.174-5.548,2.048-8.034 c0.374,0.444,0.7,0.858,0.847,1.101c0.391-1.125,1.539-2.861,2.346-3.326C15.801,3.186,14.151,3.528,14.151,3.528z"/> </g> <g id="SHIELD_RT1"> <rect width="30" height="15" x="0" y="0" fill="#249140" stroke="#fcffff" stroke-width="1.5" rx="2" ry="2"/> </g> <g id="SHIELD_RT2"> <rect width="30" height="15" x="0" y="0" fill="#004C91" stroke="#fcffff" stroke-width="1.5" rx="2" ry="2"/> </g> <g id="SHIELD_RT3"> <rect width="30" height="15" x="0" y="0" fill="#C71712" stroke="#14171C" stroke-width="1.5" rx="2" ry="2"/> </g> <g id="SHIELD_RT4"> <rect width="30" height="15" x="0" y="0" fill="#FCB821" stroke="#14171C" stroke-width="1.5" rx="2" ry="2"/> </g> </defs> <g id="NON_REPLACEMENT_ICONS" transform="translate(0, 500)"> <rect width="220" height="60" rx="2" fill="#C0C0C0"/> <use x="5" y="5" xlink:href="#ARROW_LANE" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <use x="5" y="35" xlink:href="#BIF_A_L.ARROW_LANE" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <use x="30" y="5" xlink:href="#BIF_A_R.ARROW_LANE" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <use x="30" y="35" xlink:href="#ARROW_DIRECTION_SE" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <use x="55" y="5" xlink:href="#EXIT_BACKGROUND" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <g id="EXAMPLE_SHIELD_RT1" transform="translate(115,5)"> <use xlink:href="#SHIELD_RT1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <text transform="translate(15,11)" fill="#FCFFFF" font-family="ArialNarrow" text-anchor="middle" font-size="10">E-RN</text> </g> <g id="EXAMPLE_SHIELD_RT2" transform="translate(150,5)"> <use xlink:href="#SHIELD_RT2" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <text transform="translate(15,11)" fill="#FCFFFF" font-family="ArialNarrow" text-anchor="middle" font-size="10">A-RN</text> </g> <g id="EXAMPLE_SHIELD_RT3" transform="translate(115,25)"> <use xlink:href="#SHIELD_RT3" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <text transform="translate(15,11)" fill="#FCFFFF" font-family="ArialNarrow" text-anchor="middle" font-size="10">N-RN</text> </g> <g id="EXAMPLE_SHIELD_RT4" transform="translate(150,25)"> <use xlink:href="#SHIELD_RT4" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"></use> <text transform="translate(15,11)" fill="#14171C" font-family="ArialNarrow" text-anchor="middle" font-size="10">C-RN</text> </g> </g> </svg> 这是svg样式图 ![图片说明](https://img-ask.csdn.net/upload/201510/19/1445233111_585455.png)
arduino mega 2560+ SD shield +vc0706 TTL摄像头模组 “camera not found”找不到摄像头是什么问题?
mega 2560的板子参考Adafruit vc0706类库的snapshot例程 想实现摄像头拍照并储存在sd卡这一功能 camera接serial1,sd卡接线cs-53,sck-52, mosi-51, miso-50 运行程序,报错“camera not found” 代码部分: ``` // This is a basic snapshot sketch using the VC0706 library. // On start, the Arduino will find the camera and SD card and // then snap a photo, saving it to the SD card. // Public domain. // If using an Arduino Mega (1280, 2560 or ADK) in conjunction // with an SD card shield designed for conventional Arduinos // (Uno, etc.), it's necessary to edit the library file: // libraries/SD/utility/Sd2Card.h // Look for this line: // #define MEGA_SOFT_SPI 0 // change to: // #define MEGA_SOFT_SPI 1 // This is NOT required if using an SD card breakout interfaced // directly to the SPI bus of the Mega (pins 50-53), or if using // a non-Mega, Uno-style board. #include <Adafruit_VC0706.h> #include <SPI.h> #include <SD.h> // comment out this line if using Arduino V23 or earlier #include <SoftwareSerial.h> // uncomment this line if using Arduino V23 or earlier // #include <NewSoftSerial.h> // SD card chip select line varies among boards/shields: // Adafruit SD shields and modules: pin 10 // Arduino Ethernet shield: pin 4 // Sparkfun SD shield: pin 8 // Arduino Mega w/hardware SPI: pin 53 // Teensy 2.0: pin 0 // Teensy++ 2.0: pin 20 #define chipSelect 53 // Pins for camera connection are configurable. // With the Arduino Uno, etc., most pins can be used, except for // those already in use for the SD card (10 through 13 plus // chipSelect, if other than pin 10). // With the Arduino Mega, the choices are a bit more involved: // 1) You can still use SoftwareSerial and connect the camera to // a variety of pins...BUT the selection is limited. The TX // pin from the camera (RX on the Arduino, and the first // argument to SoftwareSerial()) MUST be one of: 62, 63, 64, // 65, 66, 67, 68, or 69. If MEGA_SOFT_SPI is set (and using // a conventional Arduino SD shield), pins 50, 51, 52 and 53 // are also available. The RX pin from the camera (TX on // Arduino, second argument to SoftwareSerial()) can be any // pin, again excepting those used by the SD card. // 2) You can use any of the additional three hardware UARTs on // the Mega board (labeled as RX1/TX1, RX2/TX2, RX3,TX3), // but must specifically use the two pins defined by that // UART; they are not configurable. In this case, pass the // desired Serial object (rather than a SoftwareSerial // object) to the VC0706 constructor. // Using SoftwareSerial (Arduino 1.0+) or NewSoftSerial (Arduino 0023 & prior): #if ARDUINO >= 100 // On Uno: camera TX connected to pin 2, camera RX to pin 3: //SoftwareSerial cameraconnection = SoftwareSerial(2, 3); // On Mega: camera TX connected to pin 69 (A15), camera RX to pin 3: //SoftwareSerial cameraconnection = SoftwareSerial(69, 3); #else NewSoftSerial cameraconnection = NewSoftSerial(2, 3); #endif //Adafruit_VC0706 cam = Adafruit_VC0706(&cameraconnection); // Using hardware serial on Mega: camera TX conn. to RX1, // camera RX to TX1, no SoftwareSerial object is required: Adafruit_VC0706 cam = Adafruit_VC0706(&Serial1); void setup() { // When using hardware SPI, the SS pin MUST be set to an // output (even if not connected or used). If left as a // floating input w/SPI on, this can cause lockuppage. #if !defined(SOFTWARE_SPI) #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) if(chipSelect != 53) pinMode(53, OUTPUT); // SS on Mega #else if(chipSelect != 10) pinMode(10, OUTPUT); // SS on Uno, etc. #endif #endif Serial1.begin(38400); //vc0706默认波特率38400我没改 Serial.begin(9600); Serial.println("VC0706 Camera snapshot test"); // see if the card is present and can be initialized: if (!SD.begin(chipSelect)) { Serial.println("Card failed, or not present"); // don't do anything more: return; } // Try to locate the camera if (cam.begin()) { Serial.println("Camera Found:"); } else { Serial.println("No camera found?"); return; } // Print out the camera version information (optional) char *reply = cam.getVersion(); if (reply == 0) { Serial.print("Failed to get version"); } else { Serial.println("-----------------"); Serial.print(reply); Serial.println("-----------------"); } // Set the picture size - you can choose one of 640x480, 320x240 or 160x120 // Remember that bigger pictures take longer to transmit! cam.setImageSize(VC0706_640x480); // biggest //cam.setImageSize(VC0706_320x240); // medium //cam.setImageSize(VC0706_160x120); // small // You can read the size back from the camera (optional, but maybe useful?) uint8_t imgsize = cam.getImageSize(); Serial.print("Image size: "); if (imgsize == VC0706_640x480) Serial.println("640x480"); if (imgsize == VC0706_320x240) Serial.println("320x240"); if (imgsize == VC0706_160x120) Serial.println("160x120"); Serial.println("Snap in 3 secs..."); delay(3000); if (! cam.takePicture()) Serial.println("Failed to snap!"); else Serial.println("Picture taken!"); // Create an image with the name IMAGExx.JPG char filename[13]; strcpy(filename, "IMAGE00.JPG"); for (int i = 0; i < 100; i++) { filename[5] = '0' + i/10; filename[6] = '0' + i%10; // create if does not exist, do not open existing, write, sync after write if (! SD.exists(filename)) { break; } } // Open the file for writing File imgFile = SD.open(filename, FILE_WRITE); // Get the size of the image (frame) taken uint16_t jpglen = cam.frameLength(); Serial.print("Storing "); Serial.print(jpglen, DEC); Serial.print(" byte image."); int32_t time = millis(); pinMode(8, OUTPUT); // Read all the data up to # bytes! byte wCount = 0; // For counting # of writes while (jpglen > 0) { // read 32 bytes at a time; uint8_t *buffer; uint8_t bytesToRead = min(32, jpglen); // change 32 to 64 for a speedup but may not work with all setups! buffer = cam.readPicture(bytesToRead); imgFile.write(buffer, bytesToRead); if(++wCount >= 64) { // Every 2K, give a little feedback so it doesn't appear locked up Serial.print('.'); wCount = 0; } //Serial.print("Read "); Serial.print(bytesToRead, DEC); Serial.println(" bytes"); jpglen -= bytesToRead; } imgFile.close(); time = millis() - time; Serial.println("done!"); Serial.print(time); Serial.println(" ms elapsed"); } void loop() { } ``` 求各位大佬看下什么问题
Attack
Today is the 10th Annual of “September 11 attacks”, the Al Qaeda is about to attack American again. However, American is protected by a high wall this time, which can be treating as a segment with length N. Al Qaeda has a super weapon, every second it can attack a continuous range of the wall. American deployed N energy shield. Each one defends one unit length of the wall. However, after the shield defends one attack, it needs t seconds to cool down. If the shield defends an attack at kth second, it can’t defend any attack between (k+1)th second and (k+t-1)th second, inclusive. The shield will defend automatically when it is under attack if it is ready. During the war, it is very important to understand the situation of both self and the enemy. So the commanders of American want to know how much time some part of the wall is successfully attacked. Successfully attacked means that the attack is not defended by the shield. InputThe beginning of the data is an integer T (T ≤ 20), the number of test case. The first line of each test case is three integers, N, Q, t, the length of the wall, the number of attacks and queries, and the time each shield needs to cool down. The next Q lines each describe one attack or one query. It may be one of the following formats 1. Attack si ti Al Qaeda attack the wall from si to ti, inclusive. 1 ≤ si ≤ ti ≤ N 2. Query p How many times the pth unit have been successfully attacked. 1 ≤ p ≤ N The kth attack happened at the kth second. Queries don’t take time. 1 ≤ N, Q ≤ 20000 1 ≤ t ≤ 50 OutputFor the ith case, output one line “Case i: ” at first. Then for each query, output one line containing one integer, the number of time the pth unit was successfully attacked when asked. Sample Input2 3 7 2 Attack 1 2 Query 2 Attack 2 3 Query 2 Attack 1 3 Query 1 Query 3 9 7 3 Attack 5 5 Attack 4 6 Attack 3 7 Attack 2 8 Attack 1 9 Query 5 Query 3 Sample OutputCase 1: 0 1 0 1 Case 2: 3 2
Space AI Bombs
Description The time is year 3000. Human beings have settled on planets in many solar systems and have a star war with an alien species called Romulans. The human scientists design a new weapon called AI bomb which is capable of space travel across the vast space. Before launching the weapons, humans send probes to collect Romulan's defense parameters. The data shows that Romulans have set up shields in the routes to their home worlds. Fortunately, some secret information reveals that the shield can be penetrated using an ion beam with a particular range of frequency. It is possible to pass the shield if an AI bomb emits an ion beam within that frequency. Now,human scientists have plotted an interstellar map between several human planets and Romulan planets. The map is a directed graph like Figure 4. In the figure, human planets are drawn in boxes (denoted as Hx) and Romulan worlds are drawn in triangles (denoted as Rx), where x is an integer number. A shield is drawn as a circle in the figure (denoted as Sx). Since humans only know where the shields are but do not know the frequency of each shield, they decide to launch a large number of AI bombs. Each bomb is configured to emit an ion beam at a particular frequency at first. Once an AI bomb passes a shield, it will modulate its frequency to a different value by increasing or decreasing a predefined value. For example, in Figure 4, an AI bomb B1 is launched from H3 with initial frequency 150 and an interval (+/-) 100. So, when B1 penetrates shield S5, it may modulate its frequency to 50, 250, or keep its previous frequency 150. After that, the bomb can choose any routes available in the star map. In the example, the bomb B1 is possible to reach Romulan homeworld R9 by penetrating S5 with the original frequency 150 and then passing S4 by changing its frequency to 250 and keeping frequency 250 to pass S5 again and by changing its frequency to 350 in order to penetrate S7 and then finally nuking Romulan planet R9. Unfortunately, Romulans knows what humans are planning. Their spies got the map and the bomb parameters. Of course, Romulans have shield parameters at hand.They want to know if there are any AI bombs which can reach their homeworlds under current shield settings. Please note that human AI bombs can choose any route to travel. If an AI bomb has any chance to reach a Romulan's home world, then the bomb must be reported. Please write a program for the Romulan to defend vicious humans. To simplify the problem, we restrict the frequency values between 0 and 1000. When a bomb's new frequency is outside the range, the new frequency is invalid. Input The test data begins with a number n in a line which is the number of test cases. In each test case, it begins with two numbers v and e in a line where v is the number of vertices (including human planets, Romulan planets, and shields) and e is the number of directed edges, 2<= v <= 100000 and 2 <= e <= 500000. For convenience, the vertices are indexed starting with 1. Next, a line beginning with 'human m' tells that there are m human planets. Following the string are m integers, which are the indices of human planets. Same as above, a string 'romulan k' is used to tell the vertex indices of Romulan's planets. A string 'shield x' begins the shield parameters, where x is the number of shields. Each shield parameter is described by (s l u), where s is the shield's index, l is the lower bound of the range, and u is the upper bound of the range. The values of l and u is between 0 and 1000. A string 'edge u' begins the directed edge data, where u is the number of edges.Each edge is described by (s d), where s is the index of the source vertex and d is the index of end vertex. A string 'bomb p' begins with the data of deployed AI bombs, where p is the number of bombs and 1 <= p <= 10000. Each bomb is described by (h f i), where h is the index of a vertex (i.e., a human planets where the bomb is located), f is the initial frequency,and i is the interval to be increased/decreased. Output Please output the number of bombs that can possibly reach any of the Romulan homeworlds in one line for each test case. Note that, a bomb may be able to reach more than one Romulan planets. In that case, it is still counted as 1. Sample Input 1 9 9 human 3 1 2 3 romulan 2 8 9 shield 4 4 200 400 5 100 300 6 100 200 7 350 500 edge 9 1 6 6 8 2 4 4 6 4 5 5 4 3 5 5 7 7 9 bomb 2 3 150 100 2 250 50 Sample Output 2
请问有没有人遇到SetLayeredWindowAttributes的LWA_COLORKEY之后窗口刷新率由144变为60这个问题?
创建分层窗口之后。 SetLayeredWindowAttributes(hwnd, RGB(0,0,0), 0, LWA_COLORKEY)窗口刷新率由144变为60。 但是如果用SetLayeredWindowAttributes(hwnd, 0, 255,LWA_ALPHA);则窗口的刷新率还是144.但是就不能有透明背景了,背景就是一片大黑。 这两个连着一起使用SetLayeredWindowAttributes(hwnd,RGB(0,0,0), 255, LWA_COLORKEY|LWA_ALPHA))也会变成60。 一个先用,一个后用也会变成60。 发现只要使用了LWA_COLORKEY就会改变刷新率到60。 在测试中又发现如果把窗口改的极小,大概是800*600的样子,设置LWA_COLORKEY就不会改变刷新率,还是144。 由于本人144的显示器,60hz刷新率着实令人蛋疼! 这个问题搞了十几天了,都没解决,希望各位大神能帮帮忙。 也许这对你们来说是一个小问题,但是这个问题对于小白的我真的很伤,有能绕过SetLayeredWindowAttributes,直接在DX中实现透明背景的方案也是可以的。 ## 小白新号没有C币,只能表示万分感谢,默默祝福好人一生平安,全家幸福。 以下是全部代码,是以方框的移动速度来测试刷新率的。 ``` #include <windows.h> #include <d3d9.h> #include <d3dx9.h> #pragma comment(lib,"d3d9.lib") #pragma comment(lib,"d3dx9.lib") HWND hzwindowhwnd; IDirect3D9Ex *pd3d = NULL; LPDIRECT3DDEVICE9EX pdevice = NULL; ID3DXLine* pd3dline = NULL; D3DPRESENT_PARAMETERS d3dpp; D3DDISPLAYMODEEX d3ddpl; void initd3d() { Direct3DCreate9Ex(D3D_SDK_VERSION, &pd3d); ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_COPY; d3ddpl.Width = 1778; d3ddpl.Height = 1000; d3ddpl.RefreshRate = 0; d3ddpl.Format = D3DFMT_A8R8G8B8; d3ddpl.Size = sizeof(D3DDISPLAYMODEEX); d3ddpl.ScanLineOrdering = D3DSCANLINEORDERING_PROGRESSIVE; pd3d->CreateDeviceEx(0, D3DDEVTYPE_HAL, hzwindowhwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, NULL, &pdevice); D3DXCreateLine(pdevice, &pd3dline); pd3dline->SetWidth(2); return; } void drawbox(float x, float y, float width, float height) { D3DXVECTOR2 points[5]; points[0] = D3DXVECTOR2(x, y); points[1] = D3DXVECTOR2(x + width, y); points[2] = D3DXVECTOR2(x + width, y + height); points[3] = D3DXVECTOR2(x, y + height); points[4] = D3DXVECTOR2(x, y); pd3dline->Draw(points, 5, D3DCOLOR_ARGB(255, 255, 97, 0)); return; } LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg == 2) { CloseHandle(th2); pd3dline->Release(); pdevice->Release(); pd3d->Release(); PostQuitMessage(0); return 0; }; return DefWindowProc(hwnd, uMsg, wParam, lParam); } void begincreatewindows() { WNDCLASSEXW chuankoucs; chuankoucs.cbClsExtra = 0; chuankoucs.cbSize = sizeof(WNDCLASSEXA); chuankoucs.cbWndExtra = 0; chuankoucs.hbrBackground = (HBRUSH)GetStockObject(5); chuankoucs.hCursor = 0; chuankoucs.hIcon = LoadIcon(0, IDI_SHIELD); chuankoucs.hIconSm = LoadIcon(0, IDC_WAIT); chuankoucs.hInstance = 0; chuankoucs.lpfnWndProc = WindowProc; chuankoucs.lpszClassName = L"begindraw"; chuankoucs.lpszMenuName = 0; chuankoucs.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS; RegisterClassExW(&chuankoucs); hzwindowhwnd = CreateWindowExW(WS_EX_LAYERED|WS_EX_TRANSPARENT, chuankoucs.lpszClassName, L"Pertect", WS_POPUP, 39, 37, 1778, 1000, 0, 0, 0, 0); //这里不管怎么设置,只要设置了LWA_COLORKEY就会变成60hz. SetLayeredWindowAttributes(hzwindowhwnd, RGB(0,0,255), 0, LWA_COLORKEY); SetLayeredWindowAttributes(hzwindowhwnd, 0, 255, LWA_ALPHA); //这样也会变60hz; SetLayeredWindowAttributes(hzwindowhwnd, RGB(0,0,0), 255, LWA_COLORKEY|LWA_ALPHA); //如果只设置LWA_ALPHA,却还是144;但是就不能有透明背景了,背景就是一片大黑; SetLayeredWindowAttributes(hzwindowhwnd, 0, 255, LWA_ALPHA); ShowWindow(hzwindowhwnd, SW_SHOW); UpdateWindow(hzwindowhwnd); return; } int main() { begincreatewindows(); initd3d(); float a = 0; int i(0); while (i<500) { pdevice->Clear(0, 0, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,255),1, 0); pdevice->BeginScene(); a = a + 1; drawbox(1 + a *2, 1 + a, 100, 52); pdevice->EndScene(); pdevice->PresentEx(0, 0, 0, 0,0); i++; } MessageBoxExW(0, 0, 0, 0, 0); MSG msg; while (GetMessage(&msg, nullptr, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return (int)msg.wParam; } ```
js设置div可以拖动之后 div里面的input无法输入
本问题的解决方法:根据鼠标点击的标签名判断是否可以拖动。谢谢各位!另外还找到一种不太好的方法,就是给input加上一个默认的焦点,即使用$(input).focus(),有用但,不够灵活。 ``` document.getElementById("log_window").onmousedown = function (e) { var obj = document.elementFromPoint(event.clientX, event.clientY); if (obj.tagName.toLowerCase() === 'input' || obj.tagName.toLowerCase() === 'textarea') { return false; } getObject(this, e || event); }; ``` 大概代码如下: ``` <style type="text/css"> #div_add { HEIGHT: 796px; WIDTH: 1420px; background-color:#000; position:absolute; top:0; left:0; z-index:2; opacity:0.1; filter: alpha(opacity=10); display:none; } #log_window { BORDER-LEFT-WIDTH: 1px; CURSOR: default; FONT-SIZE: 9pt; HEIGHT: 200px; BORDER-RIGHT-WIDTH: 1px; WIDTH: 550px; BORDER-BOTTOM-WIDTH: 1px; POSITION: absolute; LEFT: 435px; Z-INDEX: 10002; TOP: 123px; BORDER-TOP-WIDTH: 1px; display:none; background-color:#ffffff; }</style> ``` ``` <div id="div_add"></div> <div id="log_window" style="width:550px;height:200px;top:123px;left:435px;"></div> ``` ``` <script> function shield(){ var html=''; html+='<input id="ipt_qty" value="" type= "text" />'; $('#log_window').html(html); } //下面是设置div可以拖动,现在不可以输入,屏蔽之后input可以输入 var o,X, Y; function getObject(obj, e) { o = obj; document.all ? o.setCapture() : window.captureEvents(Event.MOUSEMOVE); X = e.clientX - parseInt(o.style.left); Y = e.clientY - parseInt(o.style.top); } document.getElementById("log_window").onmousedown = function (e) { getObject(this, e || event); }; document.onmousemove = function (dis) { if (!o) { return; } if (!dis) { dis = event; } o.style.left = dis.clientX - X + "px"; o.style.top = dis.clientY - Y + "px"; }; document.onmouseup = function () { if (!o) { return; } document.all ? o.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP) o = ''; }; </script> ``` 这个代码需要在IE下运行。这只是我的部分代码,还有很多代码感觉贴出来没有用。大概都是这样的。在网上找到一个方法,就是设置拖拽以后给input加一个焦点,这样是可以输入的,但是鼠标无论放在哪个位置拖动整个div都跟着拖动,还有按钮button的点击样式和经过样式都没有了,怎么写才可以像平时打开的网页一样只可以拖动标题那一栏啊。 还有input框用js写的onblur验证都没有触发。
Shadow
问题描述 : Somewhere in the universe, Orez is a planet which has highly developed civilization and advanced technology. But unfortunately, a supernova which is near to Orez blossomed and emitted an extraordinary radiation that may danger the civilization in Orez. There is a great fleet of spaceship in the planet. The fleet has ONE battle-cruiser and several fighters. A fighter can make a sphere magnetic shield which the radiation can’t pass through. When the fleet is in the space, the battle-cruiser and the magnetic shields can make shadows on the ground if the radiation comes. When the radiation hit the planet, people in Orez will be destroyed except they go into the shadow of the fleet. So we want to know the area of the safety shadow. To simplify this problem, you can consider that: the ground is an infinity plane, the radiation is parallel light, a fighter is a point, and the battle-cruiser is a 3D convex hull. 输入: The input consists of multiply test cases. For each case, the first line contains five integers: N, M, Dx, Dy and Dz. N is the number of fighters. M points in/on the battle-cruiser will be given later. The convex hull of these M points is the shape of the battle-cruiser. (Dx, Dy, Dz) is the direction vector of the radiation. Dz is negative. Each of the next N lines contains four integers Xi, Yi, Zi and Pi , representing a fighter. (Xi, Yi, Zi) is the coordinate of the fighter (also the center of the sphere shield made by the fighter). Pi is the radius of the shield. Each of the next M lines contains three integers Xi, Yi and Zi. (Xi, Yi Zi) is a point in/on the battle-cruiser. All the Xi, Yi are in the range of [0, 100]; all the Zi are in the range of [20,100]; 0< Pi <= 20; N+M<=500, and the ground is the plane Z=0. Please note that several fighters may stay at the same position, and a fighter can stay inside or on the cruiser. The input ends with 0 0 0 0 0. 输出: The input consists of multiply test cases. For each case, the first line contains five integers: N, M, Dx, Dy and Dz. N is the number of fighters. M points in/on the battle-cruiser will be given later. The convex hull of these M points is the shape of the battle-cruiser. (Dx, Dy, Dz) is the direction vector of the radiation. Dz is negative. Each of the next N lines contains four integers Xi, Yi, Zi and Pi , representing a fighter. (Xi, Yi, Zi) is the coordinate of the fighter (also the center of the sphere shield made by the fighter). Pi is the radius of the shield. Each of the next M lines contains three integers Xi, Yi and Zi. (Xi, Yi Zi) is a point in/on the battle-cruiser. All the Xi, Yi are in the range of [0, 100]; all the Zi are in the range of [20,100]; 0< Pi <= 20; N+M<=500, and the ground is the plane Z=0. Please note that several fighters may stay at the same position, and a fighter can stay inside or on the cruiser. The input ends with 0 0 0 0 0. 样例输入: 2 4 1 1 -1 25 22 30 14 24 32 27 15 32 40 21 21 30 21 20 21 22 20 30 22 0 0 0 0 0 样例输出: 1539.3185
Wine Trading in Gergovia
Description As you may know from the comic “Asterix and the Chieftain’s Shield”, Gergovia consists of one street, and every inhabitant of the city is a wine salesman. You wonder how this economy works? Simple enough: everyone buys wine from other inhabitants of the city. Every day each inhabitant decides how much wine he wants to buy or sell. Interestingly, demand and supply is always the same, so that each inhabitant gets what he wants. There is one problem, however: Transporting wine from one house to another results in work. Since all wines are equally good, the inhabitants of Gergovia don’t care which persons they are doing trade with, they are only interested in selling or buying a specific amount of wine. They are clever enough to figure out a way of trading so that the overall amount of work needed for transports is minimized. In this problem you are asked to reconstruct the trading during one day in Gergovia. For simplicity we will assume that the houses are built along a straight line with equal distance between adjacent houses. Transporting one bottle of wine from one house to an adjacent house results in one unit of work. Input The input consists of several test cases. Each test case starts with the number of inhabitants n (2 ≤ n ≤ 100000). The following line contains n integers ai (−1000 ≤ ai ≤ 1000). If ai ≥ 0, it means that the inhabitant living in the ith house wants to buy ai bottles of wine, otherwise if ai < 0, he wants to sell −ai bottles of wine. You may assume that the numbers ai sum up to 0. The last test case is followed by a line containing 0. Output For each test case print the minimum amount of work units needed so that every inhabitant has his demand fulfilled. You may assume that this number fits into a signed 64-bit integer (in C/C++ you can use the data type “long long” or “__int64”, in JAVA the data type “long”). Sample Input 5 5 -4 1 -3 1 6 -1000 -1000 -1000 1000 1000 1000 0 Sample Output 9 9000
写了个可拖动的div,每次刷新页面之后点击都会突然跳动到最左边
本问题解决方法: 根据各位提出的解决方法和思路,发现确实是那个百分比问题(left:30%;),第一次拖动div的时候它还是30%,拖动一次之后就变成了px了,所以做了以下改动: 判断是否是带有%的left样式,然后再做计算,至于为什么改成0.7(70%)而不是0.3(30%)就把跳动最小化,我也是不懂的。。。。感谢各位 ``` var o,X, Y; function getObject(obj, e) { o = obj; document.all ? o.setCapture() : window.captureEvents(Event.MOUSEMOVE); if (o.style.left.indexOf("%") >0) { X = e.clientX - 0.7 * e.clientX } else { X = e.clientX - parseInt(o.style.left); } Y = e.clientY - parseInt(o.style.top); } ``` 以下是原问题: 据说是定位问题,但技术不到位,不懂怎样解决。怎样修改我的代码拖动的时候才不会突然跳到一个位置呢?求大佬 大姐大帮忙。 主要代码如下: ``` <style type="text/css"> #div_add { HEIGHT: 796px; WIDTH: 1420px; background-color:#000; position:absolute; top:0; left:0; z-index:2; opacity:0; filter: alpha(opacity=0); display:none; } #log_window { BORDER-LEFT-WIDTH: 1px; CURSOR: default; FONT-SIZE: 9pt; HEIGHT: auto; BORDER-RIGHT-WIDTH: 1px; WIDTH: 550px; BORDER-BOTTOM-WIDTH: 1px; POSITION: absolute; LEFT: 30%; Z-INDEX: 10002; TOP: 123px; BORDER-TOP-WIDTH: 1px; display:none; background-color:#ffffff; } </style> <div id="div_add"></div> <div id="log_window" style="width:550px;height:200px;top:123px;left:30%;"></div> <script> //点击按钮弹出div层 function shield() { var html=''; html+='<table><tr><td>'; html+='<input id="ipt" />'; html+='</td></tr></table>'; $('#log_window').html(html); } //设置为可拖动的div var o,X, Y; function getObject(obj, e) { o = obj; document.all ? o.setCapture() : window.captureEvents(Event.MOUSEMOVE); X = e.clientX - parseInt(o.style.left); Y = e.clientY - parseInt(o.style.top); } document.getElementById("log_window").onmousedown = function (e) { var obj = document.elementFromPoint(event.clientX, event.clientY); if (obj.tagName.toLowerCase() === 'input' || obj.tagName.toLowerCase() === 'textarea' || obj.tagName.toLowerCase() === 'td') { return false; } getObject(this, e || event); }; document.onmousemove = function (dis) { if (!o) { return; } if (!dis) { dis = event; } o.style.left = dis.clientX - X + "px"; o.style.top = dis.clientY - Y + "px"; }; document.onmouseup = function () { if (!o) { return; } document.all ? o.releaseCapture() : window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP) o = ''; }; </script> ```
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
漫话:什么是平衡(AVL)树?这应该是把AVL树讲的最好的文章了
这篇文章通过对话的形式,由浅入深带你读懂 AVL 树,看完让你保证理解 AVL 树的各种操作,如果觉得不错,别吝啬你的赞哦。 1、若它的左子树不为空,则左子树上所有的节点值都小于它的根节点值。 2、若它的右子树不为空,则右子树上所有的节点值均大于它的根节点值。 3、它的左右子树也分别可以充当为二叉查找树。 例如: 例如,我现在想要查找数值为14的节点。由于二叉查找树的特性,我们可...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
开源并不是你认为的那些事
点击上方蓝字 关注我们开源之道导读所以 ————想要理清开源是什么?先要厘清开源不是什么,名正言顺是句中国的古代成语,概念本身的理解非常之重要。大部分生物多样性的起源,...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
《C++ Primer》学习笔记(六):C++模块设计——函数
专栏C++学习笔记 《C++ Primer》学习笔记/习题答案 总目录 https://blog.csdn.net/TeFuirnever/article/details/100700212 —————————————————————————————————————————————————————— 《C++ Primer》习题参考答案:第6章 - C++模块设计——函数 文章目录专栏C+...
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法不过,当我看了源代码之后这程序不到50
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
MySQL数据库总结
文章目录一、数据库简介二、MySQL数据类型(5.5版本)三、Sql语句(1)Sql语句简介(2)数据定义语言DDLcreate,alter,drop(3)数据操纵语言DMLupdate,insert,delete(4)数据控制语言DCLgrant,revoke(5)数据查询语言DQLselect(6)分组查询与分页查询group by,limit四、完整性约束(单表)五、多表查询六、MySQL数
相关热词 c# 二进制截断字符串 c#实现窗体设计器 c#检测是否为微信 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片
立即提问