码迷,mamicode.com
首页 > 其他好文
没有任何技术含量的一片日志
前几天需要写一个servlet,单纯的接受xml数据并存储到数据库中,数据库用的是: sqlserver 然后问题来了 java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver:······类似如此的...
分类:其他好文   时间:2015-05-04 12:09:46    阅读次数:140
冒泡事件极其阻止方法
<div onclick="a()"> ?? ??<div onclick="b()"> ?? ???<a id="a" href="" onclick="c()">点击我</a> ?? ??</div> ?? ?</div> 当点击“点击我”按钮的时候,会依次执行 方法 c(),b(),a()方...
分类:其他好文   时间:2015-05-04 12:09:07    阅读次数:116
Delegate 与 Notification
Delegate 是协议的一种,顾名思义,就是委托他人帮自己去做什么事。也就是当自己做什么事情不方便的时候,就可以建立一个委托,这样就可以委托他人帮自己去实现什么方法。 我简单的总结了一下自己用到的委托的作用有两个,一个是传值,一个是传事件。 1.所谓传值经常用在b类要把自己的一个数据或者对象传给a类,让a类去展示或者处理。(切分紧耦合,和代码分块的时候经常用) 2.所谓传事件就是a类发...
分类:其他好文   时间:2015-05-04 12:06:38    阅读次数:120
LeetCode 16 3Sum Closest 找出最接近指定target的三个数的和
题目: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would hav...
分类:其他好文   时间:2015-05-04 12:07:06    阅读次数:183
使用AVFoundation完成二维码扫描
其中有几点需要注意的 1.应该使用异步线程来配置那几个属性,这样可以防止阻塞主线程加载UI。 2.output的rectOfInterst是感应区域,就是说,在这个区域内才有扫描效果。但是由于摄像头的关系,这个rect的x和y是反着的,width和height也是反着的,就是说,这里的x坐标对应着正常情况下的y坐标,这里的宽度对应着正常情况下的高度。 3.sessionPreset属性是用来...
分类:其他好文   时间:2015-05-04 12:05:44    阅读次数:92
sphinx与coreseek
Sphinx 1 下载sphinx  http://sphinxsearch.com/ 2 编译安装 tar -zxvf sphinx.tar.gz ./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql make && make install Sphinx中重要的三个命令,(Sphinx安...
分类:其他好文   时间:2015-05-04 12:06:17    阅读次数:938
__weak与__block修饰符到底有什么区别
API Reference对__block变量修饰符有如下几处解释://A powerful feature of blocks is that they can modify variables in the same lexical scope. You signal that a block can modify a variable using the __block storage typ...
分类:其他好文   时间:2015-05-04 12:07:38    阅读次数:135
APK反编译去广告大揭秘
具体步骤: 1.下载 apktool 下载地址:https://code.google.com/p/android-apktool/downloads/list 2.通过apktool 反编译apk。命令行中输入以下命令:apktool.bat d -f aaa.apk(apk路径) 反编译APK文件 3.开始修改XML布局文件 首先,我们进入反编译后的文件夹,以我的为例 进入 C:\apk\com.youmi.android.sample\res\layout 目录下 用记事本打开...
分类:其他好文   时间:2015-05-04 12:05:34    阅读次数:110
leetcode-Balanced Binary Tree
题目描述 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node n...
分类:其他好文   时间:2015-05-04 12:06:20    阅读次数:96
创意时钟
今天上网看到的创意时钟 代码如下: <embed height="120" width="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http:...
分类:其他好文   时间:2015-05-04 12:05:58    阅读次数:175
leetcode || 141、Linked List Cycle
problem: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? Hide Tags  Linked List Two Pointers ...
分类:其他好文   时间:2015-05-04 12:05:09    阅读次数:148
Centos6使用latex
首先安装latex: # yum install tetex 然后就可以使用了,参考http://stackoverflow.com/questions/1017055/get-started-with-latex-on-linux 我安装之后没有xdvi,只有一个xdvipdfvm,这个可以生成pdf,直接使用pdflatex也可已生成pdf。 之后,安装个editor更方便。可...
分类:其他好文   时间:2015-05-04 12:03:12    阅读次数:124
JXUFE_上海邀请赛选拔赛
总的说一下这次的情况,这次的状态不太好,期间各种小错误卡好久,freopen()不能用,也是醉了,A题题目描述有问题,就不说了,B题少考虑一种情况,G题把Yes输成YES,I题思路一直有啊,但当时一直混混沌沌的,代码写不出来,J题少写了个break,这么多低级错误,害我卡了好久,还好最后一小时的时候感觉渐渐回来了,一个个的BUG调出来了 比赛的时候卡水题真的是巨影响心情的 链接:http://...
分类:其他好文   时间:2015-05-04 12:03:50    阅读次数:114
高精度计算-大整数加减法
问题描述求两个不超过 200 位的非负整数的和。 输入数据 有两行,每行是一个不超过 200 位的非负整数,没有多余的前导 0。 输出要求 一行,即相加后的结果。结果里不能有多余的前导 0,即如果结果是 342,那么就不能 输出为 0342。输入样例 22222222222222222222 33333333333333333333 输出样例 Output Sample: 555...
分类:其他好文   时间:2015-05-04 12:01:52    阅读次数:126
Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 这是一道非常经典的题。这题更通用的形式是,给定...
分类:其他好文   时间:2015-05-04 12:00:57    阅读次数:100
华为应聘测试题目——找零钱(递归解决)
找零钱 描述: 我们知道人民币有1、2、5、10、20、50、100这几种面值。现在给你n(1≤n≤250)元,让你计算换成用上面这些面额表示 且总数不超过100张,共有几种。比如4元,能用4张1元、2张1元和1张2元、2张2元,三种表示方法。 题目类别: 循环 难度: 初级 分数:   运...
分类:其他好文   时间:2015-05-04 12:00:47    阅读次数:493
const 常见用法
??  const用法主要是防止定义的对象再次被修改,定义对象变量时要初始化变量   下面我就介绍一下几种常见的用法 1.用于定义常量变量,这样这个变量在后面就不可以再被修改  const int Val = 10;  //Val = 20; //错误,不可被修改   2. 保护传参时参数不被修改,如果使用引用传递参数或按地址传递参数给一个函数,在这个函数里这个参数的值若被修...
分类:其他好文   时间:2015-05-04 12:03:05    阅读次数:96
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!