首页 文章 精选 留言 我的

精选列表

搜索[自动装配],共10000篇文章
优秀的个人博客,低调大师

前端js判断访问站点设备(手机还是PC)实现自动跳转代码

网上搜集的 不知道实用不 先收藏了 <script type="text/javascript"> var commonURL = 'http://www.jsdaima.com/'; function mobile_device_detect(url){ var thisOS=navigator.platform; var os=new Array("iPhone","iPod","iPad","android","Nokia","SymbianOS","Symbian","Windows Phone","Phone","Linux armv71","MAUI","UNTRUSTED/1.0","Windows CE","BlackBerry","IEMobile"); for(var i=0;i<os.length;i++){ if(thisOS.match(os[i])){ window.location=url; } } if(navigator.platform.indexOf('iPad') != -1){ window.location=url; } var check = navigator.appVersion; if( check.match(/linux/i) ){ if(check.match(/mobile/i) || check.match(/X11/i)) { window.location=url; } } Array.prototype.in_array = function(e){ for(i=0;i<this.length;i++){ if(this[i] == e) return true; } return false; } } mobile_device_detect("跳转地址");/*指定跳转地址*/ </script> 本文转自 gutaotao1989 51CTO博客,原文链接:http://blog.51cto.com/taoyouth/1727148

优秀的个人博客,低调大师

关于项目自动化测试架构的改良计划 - DataProviderEngine架构

为了基于上文我们的xml文件的架构,对其进行解析,我自己写了一个DataProviderEngine作为解析xml文件的引擎,它主要的架构如下图: 具体细节如下,为了节省时间,我直接复制我的英文邮件内容了: Step 1: The XMLReader read the raw test suite xml file (now we adopt the xml file ,since it is not binary file and easy to edit and version control) Step 2: After reading ,XMLReader store the xml string into a string variable named “ originalXmlString “, this is our starting point. Step 3: The XIncludeConverter read the originalXmlString ,and resolve the XInclude namespace ,when it resolve this file ,it will replace all the <xi:include href> element with the actual xml fragments one by one. Step 4: After replacing all <xi:include> ,XIncludeConverter will store the new xml string into string variable named “convertedXmlString”. Step 5: The XMLManipulator read the convertedXmlString ,and remove all the user configuration part from such as <add_elements>,<update_elements>,<remove_elements> ,since these information is used for letting test case end user configure how to operate the base data to meet special requirements,so these part shouldn’t exist in final data. Step 6:After removing all config elements ,The XMLManipulator store the xml string into a new string variable named “ removeAllConfXmlString” Step 7:Since the configuration information are removed in Step 5-6 ,but they still exist in original xml string ,so XMLModifyInfoExtractor read all the <add_elements>,<update_elements>,<remove_elements> part from original xml string ,and smartly match which corresponding testcase data it will operate . Step 8:After analyzing all the user modification requirement ,the XMLModifyInfoExtractor store these modification info into 3 arraylists , addElementInfoList,updateElementInfoList,removeElementInfoList. Step 9:Now it is time to begin modifying the xml ,so the XMLManipulator read the “removeAllConfXmlString” in Step 6 . Step 10:Then XMLManipulator use all the modification info in Step 8 ,and do modification operation one by one : addElementToXML() ,updateElementFromXML(),removeElementFromXML() Step 11: after finish all the modification ,XMLManipulator store the final xml string into string variable named “modifiedXmlString” Step 12: Finally it convert the xml formatted string to a jsonobject and it now can be used as a data provider which can be consumed in each test case. 本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/1221708,如需转载请自行联系原作者

优秀的个人博客,低调大师

深度学习:人工智能在自动驾驶中的核心应用

从始于60年代的《星际迷航》系列,再到《钢铁侠》系列、《I, robot》以及黑客帝国等等,人工智能在多数公众面前的呈现多多少少都有些科幻成分。不过近些年,人工智能技术在现实生活中的飞速发展使得公众的关注点明显聚焦在了技术产业中。 去年,AlphaGo以4:1赢下李世石的世纪大战在让2016年成为人工智能元年的同时,也让公众对人工智能在现实场景中的应用有了更多的期待。事实上,上述场景早在50年代便已有了相关的实践。1959年,美国研究者Samuel便设计了一个下棋程序,这个程序可以在不断的对弈中改善自己的棋艺,也就是具备了一定的“学习能力”。4年后,这个程序战胜了研究者本人,又过了3年,这个程序战胜了美国一个保持8年之久的常胜不败的冠军。 近60年之后,AlphaGo能够赢下比赛的重要原因除了强大的计算性能外,也得益于它使用了大量围棋

优秀的个人博客,低调大师

Android中MediaPlayer播放音乐时自动中断的解决办法

今天尝试在一个有SurfaceView持续绘图的程序里加入背景音乐,遇到一个故障: 音乐播10几秒就中止了,此后再无声响。 尝试更换为其他mp3文件,无果。 尝试将播放操作由子线程转到主线程,依然不行,故障相同。 尝试注释掉除了“super.onCreate(savedInstanceState);”之外的所有执行代码,连布局都不设了,总算是行了,可以正常播放了,但总不能光黑屏放音乐吧,那还有个鸟用啊~ 再尝试将MediaPlayer由临时变量设为Activity的成员变量,问题解决。 猜想可能是因为MediaPlayer是临时变量,结果就被垃圾回收器随便收走了……杯具啊 本文转自斯克迪亚博客园博客,原文链接:http://www.cnblogs.com/SkyD/archive/2010/12/20/1910971.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

阿里云大数据利器之-RDS迁移到Maxcompute实现自动分区

当前,很多用户的业务数据存放在传统关系型数据库上,例如阿里云的RDS,做业务读写操作。当数据量非常大的时候,此时传统关系型数据库会显得有些吃力,那么会经常有将mysql数据库的数据迁移到[大数据处理平台-大数据计算服务(Maxcompute,原ODPS)( https://www.aliyun.com/product/odps?spm=5176.doc27800.765261.309.dcjpg2),利用其强大的存储和计算能力进行各种查询计算,结果再回流到RDS。 一般情况下,业务数据是按日期来区分的,有的静态数据可能是按照区域或者地域来区分,在Maxcompute中数据可以按照分区来存放,可以简单理解为一份数据放在不同的子目录下,子目录的名称以日期来命名。那么在RDS数据迁移到Maxcompute上的过程中,很多用

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册