How to insert the “logical and” (&) to MySQL database?
You may try to escape the “&” character, but it doesn’t work.
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Analysis The following cases should be considered for this problem: 1. null or empty string 2. white spaces 3. +/- … Read more
Problem: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c) … Read more
Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. Analysis The key to solve this problem is defining a Comparator first to sort the arraylist of Intevals. Java Solution public List<Interval> merge(List<Interval> intervals) { if(intervals == null || intervals.size()<=1){ return intervals; } Collections.sort(intervals, Comparator.comparing((Interval itl)->itl.start)); List<Interval> result … Read more
Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype should be: bool isMatch(const char *s, const char *p) Some examples: isMatch(“aa”,”a”) return false isMatch(“aa”,”aa”) return true isMatch(“aaa”,”aa”) … Read more
How to insert the “logical and” (&) to MySQL database?
You may try to escape the “&” character, but it doesn’t work.
III. Related work
This paper is a summary of facts about different processors. Wikipedia has collected many individual concepts of computer architecture and various concepts of Intel and AMD processors can be found. For example, AMD timeline, Intel processor microarchitecture, etc.
II. Extensive analysis and discussion
AMD versus Intel: Successes and pitfalls of their processor architectures
Warning: This article is boring if you are not interested in computer architecture design. But if you are taking Computer Architecture class, this can be a very good study guide for you.
最近更新: 2013å¹´12月17æ—¥ Moto G 11月底在北美低调上市,8Gå’Œ16G售价分别为179美元和199美元,分别有美国版和全çƒç‰ˆæœ¬ï¼Œå·®åˆ«åœ¨äºŽåŒ—美版多了一个GSM频段。如æ¤äº²æ°‘çš„ä»·æ ¼è®©å®ƒä¸€ä¸¾æˆä¸ºä½Žç«¯æ™ºèƒ½æœºå¸‚åœºçš„æ–°å® ï¼Œå…³äºŽMotoG会å¦åœ¨ä¸å›½å¤§é™†ä¸Šå¸‚,Google官方称,由于ä¸å›½å¤§é™†æ— 法使用GoogleæœåŠ¡ï¼Œå› æ¤MotoGä¸ä¼šåœ¨å¤§é™†ä¸Šå¸‚。待第一批åƒèžƒèŸ¹çš„人拿到真机,æ‰å‘现北美版MotoGå…¨çƒç‰ˆå†…ç½®è¯è¨€åªæœ‰å››ç§ï¼ŒåŒ…括英文,西ç牙è¯ï¼Œæ³•è¯å’Œè‘¡è„牙è¯ã€‚è¿™æ— å¼‚äºŽä¸€ç›†å†·æ°´æµ‡åœ¨å¿ƒå¤´ï¼Œå¦‚ä½•æ‹¥æœ‰ä¸æ–‡ç‰ˆMotoG呢? 首先有人想到让Antroid自动å‡çº§æ›´æ–°è¯è¨€åŒ…,MotoG自带Antroid 4.3 Jelly Bean系统,如果系统å‡çº§åˆ°Antroid 4.4 Kitkat,MotoG是å¦å°±èƒ½è‡ªåŠ¨æ‹¥æœ‰å®Œæ•´è¯è¨€åŒ…了呢?事实è¯æ˜Žï¼Œè¯è¨€é—®é¢˜çš„关键在于北美版MotoGçš„Stock Romä¸åŒï¼Œæ‰€ä»¥è¦åœ¨åŒ—ç¾Žç‰ˆå¢žåŠ ä¸æ–‡è¯è¨€ï¼Œåªå‰©ä¸‹åˆ·æœºä¸€æ¡è·¯äº†ï¼Œ 所幸早å‰åœ¨è‹±å›½ä¸Šå¸‚çš„MotoG拥有完整è¯è¨€åŒ…,所以我们åªè¦å®‰è£…上英国版的Stock Rom就能使用ä¸æ–‡äº†ã€‚下é¢æˆ‘们就æ¥çœ‹ä¸€ä¸‹ä¸€ä¸ªå°ç™½çš„三æ¥èµ°åˆ·æœºæ”»ç•¥ã€‚ ç¬¬ä¸€æ¥ Â è§£é”手机 在这一æ¥ï¼Œä½ 需è¦ä¸€ä¸ªmotorola 或者google的账户。 首先进入Moto官网手机解é”页é¢ã€‚ 第一页是Motorolaçš„è¦å‘Šï¼Œä¸€æ—¦è§£é”ï¼Œä½ å°†ä¸å†æ‹¥æœ‰Motorolaçš„ä¿ä¿®ï¼Œæ— 所ç•æƒ§åœ°æŒ‰ä¸‹â€œNEXTâ€ï¼Œé€šè¿‡google或motorola账户登录,接下æ¥å°±æ˜¯è§£é”了。作为一个å°ç™½ï¼Œæˆ‘肯定ä¸ä¼šæœ‰Antroid SDKå’ŒMotorola USB Driverï¼Œæ ¹æ®éœ€è¦é€‰æ‹©Windows, MAC OS或者Linux系统的版本进行下载。解压缩和安装完毕åŽï¼Œæ‰“å¼€command prompt(Windows)或者terminal(MAC OS),到已解压缩的Antroid sdk目录下,进入/sdk/platforms-tools/,确认fastboot这个文件在当å‰æ–‡ä»¶å¤¹ä¸ã€‚ 拿出MotoG,é‡å¯è¿›å…¥fastboot模å¼ï¼ˆå…ˆå…³æœºï¼Œç„¶åŽé•¿æŒ‰è§£é”键和调低音é‡çš„按钮),进入fastboot模å¼åŽï¼Œè¿žæŽ¥ç”µè„‘和手机。 在prompt或termial输入 $ fastboot oem get_unlock_data å±å¹•ä¼šè¿”回一串五行的unlock key,å¤åˆ¶è¿™æ®µkey, 注æ„ä¸è¦åŒ…å«ç©ºæ ¼æˆ–者(bootloader),粘贴到之å‰moto网页的输入æ ,按下 Can my device be unlocked? 如果手机ä¸èƒ½è¢«è§£é”,网页底部会显示 REQUEST UNLOCK KEY, æŒ‰ä¸‹é‚£ä¸ªæŒ‰é’®ï¼Œä½ çš„é‚®ç®±10秒钟åŽä¼šæ”¶åˆ°ä¸€ä¸²unlock key。 然åŽåœ¨å‘½ä»¤è¡Œè¾“入: $ fastboot oem get_unlock_data 把get_unlock_data替æ¢æˆé‚®ä»¶æ”¶åˆ°çš„key,敲人回车åŽï¼Œæ‰‹æœºå°±å·²æˆåŠŸè§£é”,é‡å¯åŽæ‰‹æœºä¼šæ˜¾ç¤º ç¬¬äºŒæ¥ … Read more
There are two sorted arrays A and B 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)). Java Solution This problem can be converted to the problem of finding kth element, k is (A’s length + B’ Length)/2. If any of … Read more
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. Java Solution 1 – DFS HashMap<Node, Node> map = new HashMap<>(); public Node cloneGraph(Node node) { map.put(node, new Node(node.val, new ArrayList<>())); for(Node neighbor: node.neighbors){ if(map.containsKey(neighbor)){ map.get(node).neighbors.add(map.get(neighbor)); }else{ map.get(node).neighbors.add(cloneGraph(neighbor)); } } return map.get(node); }HashMap<Node, Node> map … Read more
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that only one letter can be changed at a time and each intermediate word must exist in the dictionary. For example, given: start = “hit” end = “cog” dict = [“hot”,”dot”,”dog”,”lot”,”log”] One shortest transformation … Read more
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. For example: [“2”, “1”, “+”, “3”, “*”] -> ((2 + 1) * 3) -> 9 [“4”, “13”, “5”, “/”, “+”] -> (4 + (13 / 5)) -> 6 … Read more
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. Java Solution 1 We can solve this problem by doing the following steps: copy every node, i.e., duplicate every node, and insert it … Read more
LeetCode – Reverse Integer: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 1. Naive Method We can convert the integer to a string/char array, reverse the order, and convert the string/char array back to an integer. However, this will require extra space for the string. It … Read more