03 2018 档案

018 4Sum 四个数的和
摘要:给定一个含有 n 个整数的数组 S,数列 S 中是否存在元素 a,b,c 和 d 使 a + b + c + d = target ?请在数组中找出所有满足各元素相加等于特定值的不重复组合。注意:解决方案集不能包含重复的四元组合。例如,给定数组 S = [1, 0, -1, 0, -2, 2],并且 阅读全文

posted @ 2018-03-31 23:48 lina2014 阅读(126) 评论(0) 推荐(0)

017 Letter Combinations of a Phone Number 电话号码的字母组合
摘要:给定一个数字字符串,返回数字所有可能表示的字母组合。 输入:数字字符串 "23"输出:["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]. 详见:https://leetcode.com/problems/letter-combination 阅读全文

posted @ 2018-03-31 22:20 lina2014 阅读(150) 评论(0) 推荐(0)

014 Longest Common Prefix 查找字符串数组中最长的公共前缀字符串
摘要:编写一个函数来查找字符串数组中最长的公共前缀字符串。 详见:https://leetcode.com/problems/longest-common-prefix/description/ 实现语言:Java 参考:https://www.cnblogs.com/grandyang/p/460692 阅读全文

posted @ 2018-03-31 22:16 lina2014 阅读(198) 评论(0) 推荐(0)

013 Roman to Integer 罗马数字转整数
摘要:给定一个罗马数字,将其转换成整数。 返回的结果要求在 1 到 3999 的范围内。 详见:https://leetcode.com/problems/roman-to-integer/description/ class Solution { public: int romanToInt(strin 阅读全文

posted @ 2018-03-31 21:34 lina2014 阅读(142) 评论(0) 推荐(0)

012 Integer to Roman 整数转换成罗马数字
摘要:给定一个整数,将其转为罗马数字。输入保证在 1 到 3999 之间。 详见:https://leetcode.com/problems/integer-to-roman/description/ class Solution { public: string intToRoman(int num) 阅读全文

posted @ 2018-03-31 17:54 lina2014 阅读(146) 评论(0) 推荐(0)

011 Container With Most Water 盛最多水的容器
摘要:给定 n 个非负整数 a1,a2,…,an,每个数代表坐标中的一个点 (i, ai) 。画 n 条垂直线,使得垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 详见:https://leetcode.com/prob 阅读全文

posted @ 2018-03-31 17:32 lina2014 阅读(265) 评论(0) 推荐(0)

010 Regular Expression Matching 正则表达式匹配
摘要:Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element. 阅读全文

posted @ 2018-03-31 16:36 lina2014 阅读(88) 评论(0) 推荐(0)

007 Reverse Integer 旋转整数
摘要:Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output 阅读全文

posted @ 2018-03-31 14:33 lina2014 阅读(109) 评论(0) 推荐(0)

006 ZigZag Conversion
摘要:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文

posted @ 2018-03-31 13:50 lina2014 阅读(141) 评论(0) 推荐(0)

005 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.Example:Input: "babad"Output: "bab" 阅读全文

posted @ 2018-03-31 11:54 lina2014 阅读(135) 评论(0) 推荐(0)

003 Longest Substring Without Repeating Characters 最长不重复子串
摘要:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length 阅读全文

posted @ 2018-03-31 11:52 lina2014 阅读(143) 评论(0) 推荐(0)

002 Add Two Numbers 链表上的两数相加
摘要:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文

posted @ 2018-03-31 11:50 lina2014 阅读(158) 评论(0) 推荐(0)

洗牌算法
摘要:洗牌可以抽象为:给定一组排列,输出该排列的一个随机组合 算法一: 实现语言:Java 阅读全文

posted @ 2018-03-30 22:44 lina2014 阅读(146) 评论(0) 推荐(0)

完美洗牌算法
摘要:有一个长度为2n的数组{a1,a2,a3,...,an,b1,b2,b3,...,bn},希望排序后变成{a1,b1,a2,b2,a3,b3,...,an,bn},请考虑有没有时间复杂度为O(n)而空间复杂度为O(1)的解法。 阅读全文

posted @ 2018-03-30 22:10 lina2014 阅读(163) 评论(0) 推荐(0)

两个线程分别打印 1- 100,A 打印偶数, B打印奇数
摘要:package com.demo.thread; public class PrintNumber { private static Object lock = new Object(); private static int i = 1; private static int wait = 1; private static final int TOTAL =... 阅读全文

posted @ 2018-03-29 21:40 lina2014 阅读(357) 评论(0) 推荐(0)

一个链表,奇数位升序偶数位降序,让链表变成升序的
摘要:题目描述:一个链表,奇数位升序偶数位降序,让链表变成升序的。比如:1 8 3 6 5 4 7 2 9,最后输出1 2 3 4 5 6 7 8 9。分析:这道题可以分成三步:首先根据奇数位和偶数位拆分成两个链表。然后对偶数链表进行反转。最后将两个有序链表进行合并。 阅读全文

posted @ 2018-03-26 18:07 lina2014 阅读(1120) 评论(0) 推荐(0)

LeetCode 046 Permutations 全排列
摘要:Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1, 阅读全文

posted @ 2018-03-26 17:31 lina2014 阅读(288) 评论(0) 推荐(0)

LeetCode 128 Longest Consecutive Sequence 一个无序整数数组中找到最长连续序列
摘要:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest 阅读全文

posted @ 2018-03-26 17:07 lina2014 阅读(229) 评论(0) 推荐(0)

LeetCode 024 Swap Nodes in Pairs 交换链表中相邻的两个节点
摘要:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg 阅读全文

posted @ 2018-03-26 16:42 lina2014 阅读(108) 评论(0) 推荐(0)

模板实现一个栈(内部使用动态申请的数组作为存储结构)
摘要:1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 template 8 class Stack 9 { 10 public: 11 Stack(){} 12 ~Stack(){} 13 bool empty()const; 14 void push(T value);... 阅读全文

posted @ 2018-03-22 19:00 lina2014 阅读(154) 评论(0) 推荐(0)

004 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 sho 阅读全文

posted @ 2018-03-21 18:56 lina2014 阅读(161) 评论(0) 推荐(0)

静态链接与动态链接
摘要:静态链接是指把要调用的函数或者过程直接链接到可执行文件中,成为可执行文件的一部分。也就是函数和过程的代码就在程序的可执行文件中,可执行文件包含了运行时所需的全部代码。 动态链接是指所调用的函数代码并没有被拷贝到应用程序的可执行文件中去,而是仅仅在其中加入了所调用函数的描述信息,往往是一些重定位信息。 阅读全文

posted @ 2018-03-21 10:56 lina2014 阅读(215) 评论(0) 推荐(0)

sizeof和strlen的区别
摘要:1、sizeof是操作符,而strlen是库函数; 2、sizeof的参数可以为任意变量或类型,而strlen必须以char*做参数,且字符串必须以‘/0’结尾; 3、数组名用作sizeof参数时不会退化,而用作strlen参数时就会退化成指针; 4、大部分编译器在编译期计算sizeof的值,所以其 阅读全文

posted @ 2018-03-21 00:09 lina2014 阅读(159) 评论(0) 推荐(0)

const和define的区别
摘要:C++中不但可以用define定义常量还可以用const定义常量,它们的区别如下: 1、编译器处理方式不同 define宏是在预处理阶段展开。 const常量是运行阶段使用。2、类型和安全检查不同 define宏没有类型,不做任何类型检查,仅仅是展开。 const常量有具体的类型,在编译阶段会执行类 阅读全文

posted @ 2018-03-20 11:30 lina2014 阅读(1017) 评论(0) 推荐(0)

内存碎片
摘要:内存碎片通常分为内部碎片和外部碎片: 1、内部碎片是由于采用固定大小的内存分区,当一个进程不能完全使用分给它的固定内存区域时就产生了内部碎片,通常内部碎片难以完全避免。 2、外部碎片是由于某些未分配的连续内存区域太小,以至于不能满足任意进程的内存分配请求,从而不能被进程利用的内存区域。 段页式内存分 阅读全文

posted @ 2018-03-18 15:49 lina2014 阅读(173) 评论(0) 推荐(0)

MySQL存储引擎InnoDB,MyISAM
摘要:MySQL存储引擎InnoDB,MyISAM1、区别:(1)InnoDB支持事务,MyISAM不支持,对于InnoDB每一条SQL语言都默认封装成事务,自动提交,这样会影响速度,所以最好把多条SQL语句放在begin和commit之间,组成一个事务;(2)InnoDB支持外键,而MyISAM不支持。 阅读全文

posted @ 2018-03-17 18:43 lina2014 阅读(156) 评论(1) 推荐(0)

SQL注入
摘要:SQL Injection是指通过把SQL命令插入到Web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令。具体来说,它是利用现有应用程序,将恶意的SQL命令注入到后台数据库引擎执行的能力,它可以通过在Web表单中输入恶意SQL语句得到一个存在安全漏洞的网站上的数据库 阅读全文

posted @ 2018-03-17 16:59 lina2014 阅读(129) 评论(0) 推荐(0)

LeetCode 21 Merge Two Sorted Lists 合并两个有序链表
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:I 阅读全文

posted @ 2018-03-17 16:01 lina2014 阅读(98) 评论(0) 推荐(0)

LeetCode 088 Merge Sorted Array 合并两个有序数组
摘要:Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that 阅读全文

posted @ 2018-03-16 18:31 lina2014 阅读(135) 评论(0) 推荐(0)

链表
摘要:1、单链表的建立 1 #include<iostream> 2 3 using namespace std; 4 5 class ListNode 6 { 7 public: 8 int val; 9 ListNode *next; 10 ListNode(){} 11 ListNode(int x 阅读全文

posted @ 2018-03-15 22:23 lina2014 阅读(168) 评论(0) 推荐(0)

LeetCode 208 Implement Trie (Prefix Tree) 字典树(前缀树)
摘要:Implement a trie with insert, search, and startsWith methods.Note:You may assume that all inputs are consist of lowercase letters a-z. 阅读全文

posted @ 2018-03-15 17:26 lina2014 阅读(139) 评论(0) 推荐(0)

LeetCode 101 Symmetric Tree 判断一颗二叉树是否是镜像二叉树
摘要:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetr 阅读全文

posted @ 2018-03-15 11:22 lina2014 阅读(113) 评论(0) 推荐(0)

二叉树
摘要:1、二叉树的遍历 (1)递归遍历 Java实现: C++实现: 1 #include<iostream> 2 3 using namespace std; 4 5 class TreeNode 6 { 7 public: 8 int data; 9 TreeNode *left; 10 TreeNo 阅读全文

posted @ 2018-03-14 23:49 lina2014 阅读(215) 评论(0) 推荐(0)

strcpy、strncpy、strlen、memcpy、memset、strcat、strncat、strcmp、strncmp,strchr
摘要:1、strcpy 2、strncpy 3、strlen (1)非递归实现 (2)递归实现 4、memcpy memcpy 和 strncpy 最大的区别是 memcpy不会遇到 '\0' 结束拷贝 。 (1)version1(不能解决数据区重叠问题): (2)version2(解决了数据区重叠问题) 阅读全文

posted @ 2018-03-14 20:07 lina2014 阅读(425) 评论(0) 推荐(0)

指针和引用的区别
摘要:1、指针是存放变量地址的一个变量,指向内存的一个存储单元,在逻辑上是独立的,可以被改变,包括其所指向的地址的改变和其指向的地址中所存放的数据的改变。引用是其所引用的变量的一个别名,与其所引用的变量实质上是同一个东西,在逻辑上不是独立的,它的存在具有依附性,所以引用必须在一开始就被初始化,而且其引用的 阅读全文

posted @ 2018-03-14 12:37 lina2014 阅读(124) 评论(0) 推荐(0)

new与malloc区别
摘要:1、new分配内存时会按照数据类型计算需要分配内存的大小,malloc分配内存时是按照指定的大小分配的;2、new不仅分配一段内存,而且会调用构造函数,malloc不会调用构造函数;之前看到过一个题说int* p = new int与int* p = new int()的区别,因为int属于C++内 阅读全文

posted @ 2018-03-12 23:39 lina2014 阅读(165) 评论(0) 推荐(0)

016 3Sum Closest 最接近的三数之和
摘要: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. 阅读全文

posted @ 2018-03-11 21:39 lina2014 阅读(121) 评论(0) 推荐(0)

排序算法
摘要:排序算法总结:插入排序:直接插入排序,二分(折半)插入排序,希尔排序交换排序:冒泡排序,快速排序选择排序:简单选择排序,堆排序归并排序基数排序计数排序 1、插入排序 (1)直接插入排序 Java实现: package com.mian.sort; public class InsertSort { 阅读全文

posted @ 2018-03-11 11:56 lina2014 阅读(200) 评论(0) 推荐(0)

面试题—小算法20题
摘要:1、IP转换成整数及整数转换成IP Java实现: package com.mian.demo; public class IpToInt { public static void main(String[] args) { String ip="192.168.12.90"; int ipInt= 阅读全文

posted @ 2018-03-10 23:30 lina2014 阅读(287) 评论(0) 推荐(0)

008 String to Integer (atoi) 字符串转换为整数
摘要:详见:https://leetcode.com/problems/string-to-integer-atoi/description/ 实现语言:Java 实现语言:C++ 参考:http://www.cnblogs.com/grandyang/p/4125537.html 阅读全文

posted @ 2018-03-10 21:26 lina2014 阅读(120) 评论(0) 推荐(0)

LeetCode 233 Number of Digit One 某一范围内的整数包含1的数量
摘要:Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6 阅读全文

posted @ 2018-03-10 20:27 lina2014 阅读(139) 评论(0) 推荐(0)

KMP算法
摘要:给定一个主串(以 S 代替)和模式串(以 P 代替),要求找出 P 在 S 中出现的位置,此即串的模式匹配问题。 1、暴力匹配,时间复杂度为 O(nm),其中 n 为 S 的长度,m 为 P 的长度。 2、KMP算法 KMP算法的时间复杂度还是很稳定的。平均时间复杂度为 Θ(m+n)。最好时间复杂度 阅读全文

posted @ 2018-03-10 16:03 lina2014 阅读(150) 评论(0) 推荐(0)

009 Palindrome Number 判断一个正整数是否是回文数
摘要:详见:https://leetcode.com/problems/palindrome-number/description/ 实现语言:Java 方法一: 方法二: 实现语言:C++ 方法一: 方法二: 阅读全文

posted @ 2018-03-10 15:36 lina2014 阅读(151) 评论(0) 推荐(0)

LeetCode 260 Single Number III 数组中除了两个数外,其他的数都出现了两次,找出这两个只出现一次的数
摘要:Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文

posted @ 2018-03-09 22:45 lina2014 阅读(157) 评论(0) 推荐(0)

LeetCode 137 Single Number II 数组中除了一个数外,其他的数都出现了三次,找出这个只出现一次的数
摘要:Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note:Your algorithm sho 阅读全文

posted @ 2018-03-09 22:40 lina2014 阅读(144) 评论(0) 推荐(0)

LeetCode 136 Single Number 数组中除一个数外其他数都出现两次,找出只出现一次的数
摘要:Given an array of integers, every element appears twice except for one. Find that single one. 阅读全文

posted @ 2018-03-09 22:18 lina2014 阅读(97) 评论(0) 推荐(0)

LeetCode 179 Largest Number 把数组排成最大的数
摘要:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed nu 阅读全文

posted @ 2018-03-09 20:32 lina2014 阅读(143) 评论(0) 推荐(0)

LeetCode 225 Implement Stack using Queues 用队列实现栈
摘要:1、两个队列实现,始终保持一个队列为空即可 2、一个队列实现栈 阅读全文

posted @ 2018-03-09 16:49 lina2014 阅读(123) 评论(0) 推荐(0)

LeetCode 232 Implement Queue using Stacks 两个栈实现队列
摘要:1 class MyQueue { 2 public: 3 /** Initialize your data structure here. */ 4 MyQueue() { 5 6 } 7 8 /** Push element x to the back of queue. */ 9 void push(in... 阅读全文

posted @ 2018-03-09 16:24 lina2014 阅读(133) 评论(0) 推荐(0)

LeetCode 583 Delete Operation for Two Strings 删除两个字符串的不同部分使两个字符串相同,求删除的步数
摘要:Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one cha 阅读全文

posted @ 2018-03-09 14:07 lina2014 阅读(129) 评论(0) 推荐(0)

LeetCode 230 Kth Smallest Element in a BST 二叉搜索树中的第K个元素
摘要:1、非递归解法 2、递归解法 阅读全文

posted @ 2018-03-09 12:00 lina2014 阅读(112) 评论(0) 推荐(0)

LeetCode 236 Lowest Common Ancestor of a Binary Tree 二叉树两个子节点的最低公共父节点
摘要:1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), left(NULL), right(N... 阅读全文

posted @ 2018-03-09 10:49 lina2014 阅读(107) 评论(0) 推荐(0)

LeetCode 148 Sort List 链表上的归并排序和快速排序
摘要:Sort a linked list in O(n log n) time using constant space complexity. 单链表排序 快排 & 归并排序 (1)归并排序 (2)快速排序 ①.使第一个节点为中心点;②.创建2个指针(first,second),first指向头结点, 阅读全文

posted @ 2018-03-08 19:06 lina2014 阅读(176) 评论(0) 推荐(0)

LeetCode 069 Sqrt(x) 求平方根
摘要:Implement int sqrt(int x).Compute and return the square root of x.x is guaranteed to be a non-negative integer.Example 1:Input: 4Output: 2Example 2:In 阅读全文

posted @ 2018-03-07 23:26 lina2014 阅读(127) 评论(0) 推荐(0)

面试题—小算法30题
摘要:1、和为S的连续正数序列 Java实现: package com.mian.algorithm; import java.util.ArrayList; public class FindContinuousSequence { public static void main(String[] ar 阅读全文

posted @ 2018-03-07 22:57 lina2014 阅读(510) 评论(0) 推荐(0)

性能测试指标
摘要:性能测试监控关键指标说明: ①. 资源指标 CPU使用率:指用户进程与系统进程消耗的CPU时间百分比,长时间情况下,一般可接受上限不超过85%。 内存利用率:内存利用率=(1-空闲内存/总内存大小)*100%,一般至少有10%可用内存,内存使用率可接受上限为85%。 磁盘I/O: 磁盘主要用于存取数 阅读全文

posted @ 2018-03-07 19:56 lina2014 阅读(177) 评论(0) 推荐(0)

测试用例设计
摘要:1、登录功能测试用例设计 (1)界面测试(UI Test)①、布局是否合理,2个Testbox 和一个按钮是否对齐;②、Testbox和按钮的长度,高度是否复合要求;③、界面的设计风格是否与UI的设计风格统一;④、界面中的文字简洁易懂,没有错别字。 (2)功能测试(Function Test)①、什 阅读全文

posted @ 2018-03-07 16:02 lina2014 阅读(468) 评论(0) 推荐(0)

测试理论
摘要:1、软件测试在规定条件下对程序进行操作,以发现错误,对软件质量进行评估,包括对软件形成过程的文档、数据以及程序进行测试。 2、软件质量软件特性的总和,软件满足规定或潜在用户需求的能力 3、软件测试与质量保证软件测试只是质量保证工作中的一个环节,软件质量保证与软件测试是软件质量工程的两个不同层面的工作 阅读全文

posted @ 2018-03-07 10:05 lina2014 阅读(480) 评论(0) 推荐(0)

count(1), count(*), count(col) 的区别
摘要:1、count(1)和count(*)都是统计表的总行数,两者执行结果相同。表没有主键或者唯一键索引时,两者都进行全表扫描;表上主键或者唯一键索引时,使用主键或者唯一键索引。 2、count(col)则是统计col列中不为空的总行数,如果该列存在索引,自动使用索引,否则否则全表扫描。 3、总结:(1 阅读全文

posted @ 2018-03-06 09:22 lina2014 阅读(445) 评论(0) 推荐(0)

HTTP状态码
摘要:状态代码由三位数字组成,第一个数字定义了响应的类别,且有五种可能取值:1xx:提示信息2xx:成功3xx:重定向4xx:客户端错误5xx:服务器错误100:continue继续101:切换协议200:OK成功201:已创建。成功请求并创建了新的资源,且其 URI 已经随Location 头信息返回2 阅读全文

posted @ 2018-03-05 19:13 lina2014 阅读(116) 评论(0) 推荐(0)

DNS原理
摘要:1、域名 域名是一种为了识别主机名称和机构名的具有分层的名称,比如在域名neu.edu.cn中,neu是主机名,edu和cn是不同层次下的域名。域名和IP地址都可以唯一对应一台主机,DNS协议的作用就是将自身具有意义的域名转换成不容易记住的IP地址。 域名的层次域名系统的最高层次是根域名,然后是顶级 阅读全文

posted @ 2018-03-05 17:17 lina2014 阅读(243) 评论(0) 推荐(0)

父类指针访问子类成员变量
摘要:1、父类指针获取子类成员变量 2、类型转换 阅读全文

posted @ 2018-03-05 10:51 lina2014 阅读(2685) 评论(0) 推荐(1)

LeetCode 146 LRU Cache 最近最少使用页面置换算法
摘要:实现一个LRU缓存器,最近最少使用页面置换算法。缓存器主要有两个成员函数,get和set,其中get函数是通过输入key来获得value,如果成功获得后,这对(key, value)升至缓存器中最常用的位置(顶部),如果key不存在,则返回-1。set函数是插入一对新的(key, value),如果 阅读全文

posted @ 2018-03-04 16:07 lina2014 阅读(359) 评论(0) 推荐(0)

死锁
摘要:死锁是指两个或两个以上进程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去。 原因:系统资源不足;进程运行推进的顺序不合适;系统资源分配不当。 必要条件:互斥条件:进程在某一时间内独占资源。请求与保持条件:一个进程因请求资源而阻塞时,对已获得的资源保持不放。不可 阅读全文

posted @ 2018-03-04 15:36 lina2014 阅读(185) 评论(0) 推荐(0)

get和post的区别
摘要:GET和POST是HTTP协议中定义的两种发送请求的方法。HTTP是基于TCP/IP的关于数据如何在网络中通信的协议。GET和POST本质上就是TCP链接,并无差别。但是由于HTTP的规范和浏览器/服务器的限制,导致他们在应用过程中体现出一些不同:①、GET是从指定的服务器中获取数据;POST是提交 阅读全文

posted @ 2018-03-04 15:31 lina2014 阅读(128) 评论(0) 推荐(0)

进程间的通信方式
摘要:1、管道管道是一种半双工的通信方式,数据只能单向流动,传递的是无格式字节流,缓冲区大小有限。而且只能在具有亲缘关系的进程间使用。进程的亲缘关系通常是指父子进程关系。 2、命名管道有名管道也是半双工的通信方式,但是它允许无亲缘关系进程间的通信。 3、信号量信号量是一个计数器,可以用来控制多个进程对共享 阅读全文

posted @ 2018-03-04 15:06 lina2014 阅读(242) 评论(0) 推荐(0)

一个程序从开始运行到结束的完整过程
摘要:源程序是指未经编译的,按照一定的程序设计语言规范书写的,人类可读的文本文件,源程序就是所写好的代码。 可执行程序,即常说的.exe程序,可以执行程序,完成计算机功能。在C语言中,.c文件就是所谓的源文件。 源程序到可执行程序的过程。在这个过程中,会发生如下的变化: .c文件生成.obj文件的过程,称 阅读全文

posted @ 2018-03-04 14:13 lina2014 阅读(8404) 评论(2) 推荐(0)

进程与线程的区别与联系
摘要:定义:进程是具有一定独立功能的程序关于某个数据集合上的一次运行活动,进程是系统进行资源分配和调度的一个独立单位。线程是CPU调度和分派的基本单位,它是比进程更小的能独立运行的基本单位.线程自己基本上不拥有系统资源,只拥有一点在运行中必不可少的资源(如程序计数器,一组寄存器和栈),但是它可与同属一个进 阅读全文

posted @ 2018-03-04 11:51 lina2014 阅读(195) 评论(0) 推荐(0)

文件系统
摘要:文件系统的架构层次包括:用户层、虚拟文件系统层、文件系统层、缓存层、块设备层、磁盘驱动层和磁盘物理层。 1、用户层 最上面用户层是日常使用的各种用户应用程序,需要的接口主要是文件的创建、删除、打开、关闭、写、读等。 2、虚拟文件系统层VFS Linux操作系统分为用户态和内核态,当用户态请求硬件资源 阅读全文

posted @ 2018-03-04 11:03 lina2014 阅读(175) 评论(0) 推荐(0)

面试题—小算法50题
摘要:1、递归算法判断一个数组是否是递增数组 Java实现: package com.mian.algorithm; public class ArrayIsIncrement { public static void main(String[] args) { ArrayIsIncrement arra 阅读全文

posted @ 2018-03-02 23:31 lina2014 阅读(403) 评论(0) 推荐(0)

MySql优化策略
摘要:MySql优化主要分为以下四大方面:设计:存储引擎,字段类型,范式与逆范式;功能:索引,缓存,分区分表;架构:主从复制,读写分离,负载均衡;合理SQL:测试,经验。 1、存储引擎 在创建表的时候使用sql语句,Create table tableName () engine=myisam|innod 阅读全文

posted @ 2018-03-01 16:23 lina2014 阅读(216) 评论(0) 推荐(0)

数据库事务的四个特性(ACID)、事务的隔离级别
摘要:事务是一个不可分割的最小逻辑工作单元。 事务具有四个特征:原子性( Atomicity )、一致性( Consistency )、隔离性( Isolation )和持久性( Durability )。原子性:整个事务中的所有操作要么全部提交成功,要么全部失败回滚,对于一个事务来说,不可能只执行其中的 阅读全文

posted @ 2018-03-01 15:18 lina2014 阅读(178) 评论(0) 推荐(0)

导航