Elmagnifico's Blog

云深不知归处

LeetCode Solution(Easy.21-24)

c/c++,python,for work

21.Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 21.Climbi...

LeetCode Solution(Easy.17-20)

c/c++,python,for work

17.Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 i...

LeetCode Solution(Easy.13-16)

c/c++,python,for work

13.Number of 1 Bits Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11’ has binary r...

LeetCode Solution(Easy.9-12)

c/c++,python,for work

9.Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return ...

LeetCode Solution(Easy.5-8)

c/c++,python,for work

5.Move Zeroes Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], aft...

Shadowsocks与git的代理设置

proxy,SocksCap64,pac

代理、翻墙 前言 回到家了,突然发现csdn的blog、github、百度云盘(移动端能打开)都被封掉了 新疆真是个蛋疼的地方啊,没办法只好用代理了 goagent、GEA 最初翻墙用的是自由门,不过据说自由门不是很安全,而且还传递各种反动内容 后来发现了goagent其实也就是GEA,只用登陆注册好之后,在本地更新一下,填好自己的appid,浏览器设置好,就能翻墙 看标清视频...

树莓派启动那些事(六)

linux启动,systemd,unit,target

环境 system:2015-09-24-raspbian-jessie RaspberryPi:Raspberry Pi 2 树莓派启动的相关问题 树莓派启动的相关问题,会从config.txt一直介绍到linux如何启动,启动流程分析,自启动脚本实现。 linux的启动分析 linux内核启动 systemd Systemd的主要目的就是减少系统引导时间和计算开销。Sys...

LeetCode Solution(Easy.1-4)

c/c++,python,for work

前言 第一次做leetcode,先用c或者是c++写一遍解决算法(哪个方便用哪个),再用Python写一遍,正好练习一下Python。(我也是醉了一个在线oj,竟然还有上锁的题目,而且还要交钱了才能看) 1.Nim Game You are playing the following Nim Game with your friend: There is a heap of stone...

树莓派启动那些事(五)

linux启动,init,runlevel,shell

环境 system:2015-09-24-raspbian-jessie RaspberryPi:Raspberry Pi 2 树莓派启动的相关问题 树莓派启动的相关问题,会从config.txt一直介绍到linux如何启动,启动流程分析,自启动脚本实现。 linux的启动分析 linux内核启动 前言 由于raspbian是基于debian,那么其系统内核启动流程也是一样的...

树莓派启动那些事(四)

boot,启动,ARM,虚拟文件系统

环境 system:2015-09-24-raspbian-jessie RaspberryPi:Raspberry Pi 2 树莓派启动的相关问题 树莓派启动的相关问题,会从config.txt一直介绍到linux如何启动,启动流程分析,自启动脚本实现。 要想理解树莓派系统的运行机制,得先来看看树莓派是如何启动的 boot 树莓派的boot及其他github http...