info

PhotoPicker discovery error: Error Domain=PlugInKit Code=13

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to display an image from the photo library in a UIImageView The full error is: 2017-06-09 21:55:59.063307+0200 firstapp2.0[12873:1120778] PhotoPicker discovery error: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled} My code is included below: import UIKit class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigationControllerDelegate{ @IBOutlet weak var pic: UIImageView! @IBOutlet weak var text: UILabel! var chosenImage : UIImage! override func viewDidLoad() {

Add / delete / retrieve information from a PDF using a custom property

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Sorry for the unclear question yesterday i post. I want to store 2 strings(string1 and string2) in the custom property,so that the string is with the pdf.I have the string already, but i do not know how to store it under the custom property area. The custom property area refers to FILE--->Properties---->Custom ---->Custom properties , which got "Name" and "Value" in pairs. I want the string1 stores in the "Value" and string2 stores in the "Name". Later, I want to retrieve/delete the strings in the custom property area. May I ask how to

Ipython kernel error after uninstalling anaconda

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm on ubuntu 14.04. I was running anaconda and I used the conda command (as per this post ) to make both python 2 and python 3 available in ipython notebooks. But I just uninstalled anaconda and installed ipython, jupyter and notebook individually inside a virtualenv. Now when I try to create a new notebook I get the following error. As you can see in the last line, it seems to still be referring to the kernel created with anaconda which obviously doesn't exist anymore since I uninstalled anaconda. Can someone please help me with that issue

browsermob in JAVA with Selenium doesn't work, different errors for browsers

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I using Java with selenium and I want to use browsermob: I using same code for different browsers e.g. firefox: BrowserMobProxyServer proxyServer = new BrowserMobProxyServer(); proxyServer.start(); proxyServer.setHarCaptureTypes(CaptureType.getAllContentCaptureTypes()); proxyServer.enableHarCaptureTypes(CaptureType.REQUEST_CONTENT, CaptureType.RESPONSE_CONTENT); Proxy proxy = ClientUtil.createSeleniumProxy(proxyServer); DesiredCapabilities dccFirefox = DesiredCapabilities.firefox(); dccFirefox.setCapability(CapabilityType.PROXY, proxy); this

Step by step instruction to install Rust and Cargo for mingw with Msys2?

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to install Rust on Cygwin but failed to be able link with mingw. Now I am trying to install it with Msys2. I already installed Msys2 and Mingw. I tried to follow this wiki page but I got lost at number 2: Download and install Rust+Cargo using the installer but be sure to disable the Linker and platform libraries option. Is it referring to the "rustup-init.exe" on the install page ? Should I double click to run this file or run it from Msys2? I tried to run from Msys2 and got the options: 1) Proceed with installation (default) 2)

JAVA企业级应用TOMCAT实战

大兔子大兔子 提交于 2019-12-03 08:11:45
1. Tomcat简介 Tomcat是Apache软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,由Apache、Sun和其他一些公司及个人共同开发而成。 Tomcat服务器是一个免费的开放源代码的 Web应用服务器 ,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP程序的首选。 Tomcat和Nginx、Apache(httpd)、lighttpd等Web服务器一样,具有处理HTML页面的功能,另外它还是一个Servlet和JSP容器,独立的Servlet容器是Tomcat的默认模式。不过,Tomcat处理静态HTML的能力不如Nginx/Apache服务器。 对比php软件,区别? 目前Tomcat最新版本为9.0。Java容器还有resin、weblogic等。 2. Tomcat安装 2.1 软件准备 JDK下载: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Tomcat下载: http://tomcat.apache.org/ 2.2 部署java环境 [root@tomcat ~]# cd /application/tools/ [root

订单表优化方案

别等时光非礼了梦想. 提交于 2019-12-03 07:59:45
目录 1 背景 2 常用思路 2.1 单表分区 2.2 大表分表 2.3 业务分库 2.4 读写分离和集群 2.5 热点缓存 2.6 用ES代替DB 3 订单表优化方案 3.1 业务分析 3.2 分区方案(order_sku/order_product_attr/order_sku_epay) 3.2 历史表+分区方案(order_info) 附录 1 背景 随着用户不断下单,DB订单表和订单附属表的单表记录数过大,影响到前端和管理系统拉取订单列表的性能。单表最大多少行合适与具体业务有关,难以下定论,但一般推荐不要超过1千万行,之后单表的性能下降会比较明显。 本文档整理了数据库大表优化的一些常用思路的原理,最后针对订单表提出优化方案。 2 常用思路 单表分区 大表分表 业务分库 读写分离和集群 热点缓存 用ES代替DB 2.1 单表分区 什么是分区? 就是将一张表的单个大文件,按一定逻辑拆分成多个物理的区块文件。对于应用程序来说,还是一张整表;但底层实际上是由多个物理区块组成。目前主流的DB如Oracle、MySql等都有成熟的方案支持分区 MySql支持哪些分区类型? range分区:根据key的范围来分区,比如日志表,可以按天或按月分区 list分区:根据key的枚举值分区,比如以订单状态为key,待付款、待发货、待收货等分别建立一个分区 hash分区:给定分区数

Kea DHCP MySQL

孤街醉人 提交于 2019-12-03 07:51:14
1. 简介 kea是下一代的dhcp技术,也是ISC开发的。它支持ipv4和ipv6的地址分配,并且还可以支持动态dns更新。kea从2014年初开始研发,也算是比较新的技术了,并且现在也在更新中。 kea 现在工作中遇到一些问题。新到货的服务器要配置带外ip,之前使用老的DHCP方法根据mac地址绑定IP,但是这样做总感觉不太好。 第一、每个机房都有一个配置文件,管理起来不方便; 第二、当我需要查询绑定的结果时,查询起来也不方便; 第三、配置文件毕竟是文件格式,安全性不太好保障。 因为遇到了上面的种种问题,我就想,有没有什么方法可以把mac与ip的记录放到数据库中。这样更安全可靠好管理,然后在凯哥的指点下,学会了kea这个dhcp服务。 感觉非常好,唯一不足的就是有些很实用的功能需要花钱购买,还贵,还是dollar。 1.1 支持的平台 根据官方的说法,他支持的平台比较多,例如Red Hat Enterprise Linux, CentOS, Fedora 和 FreeBSD等。现在比较新的Kea版本是Kea 1.4.0 。在很多系统上测试都没问题。并且centos上安装epel源,可以直接yum安装kea(yum install kea),只不过版本比较低。 2. 安装 这里的安装过程,我就按照我的方法来讲了,有兴趣多了解的同学可以去官网查看。 2.1 安装数据库 [root

JBoss AS 7 auto deploy plugin cannot connect to localhost:8080

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have configured the plugin in maven as shown below: <plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.0.2.Final</version> <configuration> <hostname>localhost</hostname> <port>8080</port> <filename>target/TestApp.war</filename> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> I then trigger it using maven using mvn -U clean install package It does build and everything works fine but fails when it

Scala spark, listbuffer is empty

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In this piece of code in comment 1 length of listbuffer items is shown correctly, but in the 2nd comment code never executes. Why it is occurs? val conf = new SparkConf().setAppName("app").setMaster("local") val sc = new SparkContext(conf) var wktReader: WKTReader = new WKTReader(); val dataSet = sc.textFile("dataSet.txt") val items = new ListBuffer[String]() dataSet.foreach { e => items += e println("len = " + items.length) //1. here length is ok } println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") items.foreach { x => print(x)} //2. this code