码迷,mamicode.com
首页 > 其他好文
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW _TASK flag.
在Activity中使用startActivity()方法不会有任何限制,因为Activity重载了Context的startActivity()方法。但是如果是在其他地方(如Widget或Service、BroadcastReceiver中)使用startActivity()方法,就会报错:and...
分类:其他好文   时间:2015-07-11 09:02:09    阅读次数:158
PDO
mysql当在查询语句中对该字段值加上单引号和不加查询耗时相差百倍!PDO指南 翻译 http://www.oschina.net/translate/php-pdo-how-tosetAttribute(PDO::ATTR_EMULATE_PREPARES, false); 指得是 数据库服务器 ...
分类:其他好文   时间:2015-07-11 08:59:41    阅读次数:124
Search Insert Position
https://leetcode.com/problems/search-insert-position/1 class Solution {2 public:3 int searchInsert(vector& nums, int target) {4 int index=...
分类:其他好文   时间:2015-07-11 08:59:09    阅读次数:103
debian软件安装基础(同tomcat案件)
基本介绍笔者是一个Linux盲。一旦只在虚拟机上载通过Ubantu-图形版本,我看着接口、打了几场比赛卸载的光盘上。往下看,在过去的几天。试想想,在Linux关于建设nexus(mavenPW)玩。由于几乎没有事先Linux经历,中碰到非常多问题。也学到了不少知识,可是最大的收货是让我知道了Linu...
分类:其他好文   时间:2015-07-11 08:58:13    阅读次数:204
socket中的option
/// Set an option on the socket./*** This function is used to set an option on the socket.** @param option The new option value to be set on the socke...
分类:其他好文   时间:2015-07-11 09:00:34    阅读次数:317
[SCOI2005][BZOJ1085] 骑士精神
1085: [SCOI2005]骑士精神Time Limit:10 SecMemory Limit:162 MBSubmit:1112Solved:604[Submit][Status][Discuss]Description在一个5×5的棋盘上有12个白色的骑士和12个黑色的骑士, 且有一个空位。...
分类:其他好文   时间:2015-07-11 08:58:23    阅读次数:142
5:Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:其他好文   时间:2015-07-11 09:00:02    阅读次数:101
BZOJ1084 最大子矩阵
Description这里有一个n*m的矩阵,请你选出其中k个子矩阵,使得这个k个子矩阵分值之和最大。注意:选出的k个子矩阵不能相互重叠。Input第一行为n,m,k(1≤n≤100,1≤m≤2,1≤k≤10),接下来n行描述矩阵每行中的每个元素的分值(每个元素的分值的绝对值不超过32767)。Ou...
分类:其他好文   时间:2015-07-11 08:57:40    阅读次数:123
Remove Duplicates from Sorted List
https://leetcode.com/problems/remove-duplicates-from-sorted-list/ 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int va...
分类:其他好文   时间:2015-07-11 08:58:58    阅读次数:94
tomcat开始批量——setclasspath.bat
除了上述两批,另一个重要的脚本,那是,setclasspath.bat。它主要负责查找、检查JAVA_HOME和JRE_HOME两个变量。*********************************************************************************...
分类:其他好文   时间:2015-07-11 08:57:19    阅读次数:126
第一章 flex单词计数程序
学习Flex&Bison目标, 读懂SQLite中SQL解析部分代码Flex&Bison简介Flex做词法分析Bison做语法分析第一个Flex程序, wc.fl, 单词计数程序%{int chars = 0;int words = 0;int lines = 0;%}%%[a-zA-Z]+ { w...
分类:其他好文   时间:2015-07-11 08:59:05    阅读次数:122
38>>int main( int argc, char **argv)
1、参数(有时参数是void)argc是程序运行时参数个数argv是存储参数的数组,可以用char* argv[],也可以用char **argv。例如编译一个hello.c的程序 1 #include 2 int main(int argc,char *argv[]) 3 { 4 printf("...
分类:其他好文   时间:2015-07-11 08:58:05    阅读次数:139
Xcode中CLLocation的初步使用-地理编码
地理编码,顾名思义是应用于定位功能,下面简单介绍下CLLocation中的地理编码:界面:代码: 1 #import "HMViewController.h" 2 #import 3 4 @interface HMViewController () 5 @property (nonat...
分类:其他好文   时间:2015-07-11 08:56:09    阅读次数:142
leetcode 235: Lowest Common Ancestor of a Binary Search Tree
leetcode 235: Lowest Common Ancestor of a Binary Search Tree...
分类:其他好文   时间:2015-07-11 07:54:07    阅读次数:130
LeetCode "Lowest Common Ancestor of a BST"
First please note, it is BST. So it is about value compare.class Solution {public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, Tree...
分类:其他好文   时间:2015-07-11 07:53:00    阅读次数:132
232. Implement Queue using Stacks
Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o...
分类:其他好文   时间:2015-07-11 07:54:35    阅读次数:116
231. Power of Two
Given an integer, write a function to determine if it is a power of two.Credits:Special thanks to@jianchao.li.fighterfor adding this problem and creat...
分类:其他好文   时间:2015-07-11 07:52:24    阅读次数:109
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!