自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

limwz的专栏

limwz的博客

  • 博客(46)
  • 收藏
  • 关注

原创 入门蓝牙耳机推荐

蓝牙耳机分为有线和真无线两种。有线蓝牙耳机虽然用蓝牙连接手机、电脑等音源设备,但是两个耳机之间还是需要用线相连;真无线蓝牙耳机的两个耳机之间也不用线相连。充满创作欲望的我竟然拿起了画笔,笔……Nice ,给自己个赞,猜猜我画的是哪个牌子的耳机?下面推荐的耳机都属于真无线蓝牙耳机,大家选购蓝牙耳机时,一般对耳机的续航、音质、佩戴舒适度、连接稳定性、综合体验等方面最为关心,下面也从...

2019-08-20 16:31:55 2081

原创 微信小程序框架

关于小程序的生命周期,可以分为两个部分来理解:应用生命周期和页面生命周期。其中应用的生命周期是这样一个流程:1、用户首次打开小程序,触发 onLaunch(全局只触发一次)。2、小程序初始化完成后,触发onShow方法,监听小程序显示。3、小程序从前台进入后台,触发 onHide方法。4、小程序从后台进入前台显示,触发 onShow方法。5、小程序后台运行一定时间,或系统资源占用过高,会被销毁。 ...

2018-12-25 10:38:45 574

原创 python xlog代码赏析

import osimport sysimport timefrom datetime import datetimeimport tracebackimport threadingimport jsonimport shutilimport typesreload(sys)sys.setdefaultencoding('utf8')CRITICAL = 50FAT...

2018-12-25 10:29:24 537

原创 技能图标赏析

玩过魔兽争霸的同学,都非常了解游戏中各种各样的技能,每个技能都对应一个图标。下面整理了一些图标。 

2018-12-25 10:23:31 2520

原创 ios多线程开发注意点一

之前一直在纠结于队列 和线程关系,实际上在ios 开发中,这二者之间的关系相当微妙,除了一个特殊情况(主队列和主线程的关系),它二者之间是相互独立的,其实只要记住一个要点就可以了,主队列是一个特殊的队列,首先,它是一个串行队列,其次,它自始至终占用一个特殊的线程--主线程,而主线程,自始至终仅被主队列占用,其他任何队列,不管并行还是串行,都不能占用主线程,除去这个奇葩之外,任意队列不管是系统的还是...

2018-12-25 10:09:34 248

原创 php学习路线记录

1.熟悉html、js,了解css即可。用时:五天内PHP有很多现成的模板,后台可用m-ui,laravel项目可以用laravel-admin。css会用就行,大部分效果都有现成代码,直接复制即可。2.熟悉PHP基本语法。用时:三天内3.熟悉PHP环境的搭建4.熟悉mysql的常用语句(记个大概就行,实际开发时,可看文档)5.熟悉PHP原生项目开发流程,如用户登录、注册、购物车等常用模...

2018-12-25 10:01:54 227

原创 什么是 Android?

Android 是一个开源的,基于 Linux 的移动设备操作系统,如智能手机和平板电脑。Android 是由谷歌及其他公司带领的开放手机联盟开发的。 Android 提供了一个统一的应用程序开发方法,这意味着开发人员只需要为 Android 进行开发,这样他们的应用程序就能够运行在不同搭载 Android 的移动设备上。谷歌在2007年发布了第一个测试版本的 Android 软件开发...

2018-11-16 10:17:14 659

转载 shell从函数文件中调用函数

碰到一个shell中函数调用的小问题,记录一下。shell中函数有三种调用方式,一种是在文件前面定义函数,然后在下面直接调用;一种是通过载入shell,在shell中直接调用;第三种是将函数写入文件,然后在其他shell中调用函数。这里写一下关于第三种方法的例子:[plain] view plaincopyis_it_a_direct

2015-05-14 18:02:54 617

原创 linux密码加密方式与暴力破解代码

在linux中,使用命令sudo cat /etc/shadow在输出中找到包含自己用户名的一行。第一个:和第二个冒号之间的内容,便是密码使用crypt加密后的字符窜。秘钥salt为包含三个$的最短字符窜。crypt函数原型如下:char* crypt(const char* key,const char* salt);key是加密的明文。salt是秘钥。下面是破解代码,假

2015-04-04 12:05:37 1432

转载 iptables详解

一:前言防火墙,其实说白了讲,就是用于实现Linux下访问控制的功能的,它分为硬件的或者软件的防火墙两种。无论是在哪个网络中,防火墙工作的地方一定是在网络的边缘。而我们的任务就是需要去定义到底防火墙如何工作,这就是防火墙的策略,规则,以达到让它对出入网络的IP、数据进行检测。目前市面上比较常见的有3、4层的防火墙,叫网络层的防火墙,还有7层的防火墙,其实是代理层的网关。

2015-01-05 09:27:02 380

原创 ubuntu 安装 nfs

#sudo apt-get install nfs-kernel-server修改配置文件/etc/exports,加入 insecure 选项/home/float  *(insecure,rw,async,no_root_squash)* :允许所有的网段访问rw :读写权限sync:资料同步写入内在和硬盘no_root_squash:nfs客户端共

2015-01-01 16:08:46 345

原创 leetcode之Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for each

2014-12-06 15:49:04 331

原创 leetcode之Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to

2014-12-06 15:14:16 286

原创 leetcode之Candy

There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least on

2014-12-06 14:57:46 340

原创 leetcode之Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2014-12-06 14:41:50 323

原创 leetcode之Single Number II

问题描述如下:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement i

2014-12-06 14:39:09 302

原创 leetcode之Copy List with Random Pointer

问题描述如下: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.问题链接cpp代码如下:cla

2014-12-06 14:25:58 314

原创 leetcode之Word Break

问题描述如下:Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",d

2014-12-06 10:49:34 302

原创 leetcode之Word Break II

问题描述如下:Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example,

2014-12-06 10:43:16 357

原创 leetcode之Linked List Cycle

问题描述如下:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?问题链接cpp代码如下:class Solution {public: bool hasCycle(ListNode *he

2014-12-06 10:25:10 288

原创 leetcode之Linked List Cycle II

问题描述如下:Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?问题链接cpp代码如下:class Solution

2014-12-06 10:21:42 259

原创 leetcode之Reorder List

问题描述如下:Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, r

2014-12-06 10:15:48 269

原创 leetcode之Binary Tree Preorder Traversal

问题描述如下:Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Rec

2014-12-06 10:01:11 242

原创 leetcode之Binary Tree Postorder Traversal

问题描述如下:Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Re

2014-12-06 09:55:41 270

原创 leetcode之LRU Cache

问题描述如下:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) o

2014-12-06 09:47:36 330

原创 leetcode之Insertion Sort List

问题描述如下:Sort a linked list using insertion sort.问题链接cpp代码如下:class Solution {public: ListNode *insertionSortList(ListNode *head) { if(head==NULL||head->next==NULL)return head;

2014-12-05 09:52:14 235

原创 leetcode之Sort List

问题描述如下:Sort a linked list in O(n log n) time using constant space complexity.问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接 问题链接cpp代码如下:class Solution {public: ListNode

2014-12-05 09:33:36 305

原创 leetcode之Max Points on a Line

问题描述如下:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.问题链接cpp代码如下:class Solution {public: int maxPoints(vector &points) { i

2014-12-04 15:22:21 286

原创 leetcode之Evaluate Reverse Polish Notation

问题描述如下:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples:

2014-12-04 14:14:56 268

原创 leetcode之Reverse Words in a String

问题描述如下:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:Wha

2014-12-04 13:58:57 299

原创 leetcode之Find Minimum in Rotated Sorted Array

问题描述如下:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplica

2014-12-03 15:48:18 246

原创 leetcode之Find Minimum in Rotated Sorted Array II

问题描述如下:Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at

2014-12-03 15:43:09 273

原创 leetcode之Min Stack

问题描述如下:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.

2014-12-03 15:16:52 246

原创 leetcode之Intersection of Two Linked Lists

问题描述如下:Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘

2014-12-03 14:24:43 300

原创 Unix中的进程

每个进程都有一个非负整数表示的唯一进程ID。

2014-10-20 14:37:40 384

原创 非阻塞I/O

低速系统调用是可能会使进程永远ze se

2014-10-14 10:30:58 382

原创 进程间通信之匿名管道和命名管道

匿名管道,只能用于具有亲缘关系的进程见进行通信。#include#include#includeint main(){ int n=100; int fd[2]; pid_t pid; char line[1024]=""; if(pipe(fd)<0){ printf("error\n"); return -1;

2014-09-22 14:14:21 361

原创 一个简单地内存池

#includeusing namespace std;class MemPool{private: typedef struct Node{ void* data; Node* next; }Node; Node* nodesHead_; Node* firstFree_; Node* usedNodes_; void* data; int

2014-09-21 15:22:02 285

原创 简单实现dijstra算法和floyd算法并打印所有最短路径

#include#include#include#include#include#include#includeusing namespace std;typedef struct Edge{ int pos;//该边终点的下标 int weight; Edge* next; Edge(int p,int w):pos(p),weight(w),

2014-09-12 18:05:42 567

原创 简单实现BST以及简单工厂模式进行测试

#include#include#include#include#includeusing namespace std;typedef struct TreeNode{ int data; TreeNode* left; TreeNode* right; TreeNode(int t):data(t),left(NULL),right(NULL){}

2014-09-12 15:24:12 640

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除