码迷,mamicode.com
首页 >  
搜索关键字:find locate where whereis linux    ( 196677个结果
《Cracking the Coding Interview》——第17章:普通题——题目8
2014-04-28 23:35题目:最大子数组和问题。解法:O(n)解法。代码: 1 // 17.8 Find the consecutive subarray with maximum sum in an array. 2 // O(n) online algorithm. 3 #include...
分类:其他好文   时间:2014-04-29 16:35:28    阅读次数:429
ahjesus SSHkey登陆linux服务器,无需密码,ubuntu
cd ~/.ssh/如果目录不存在就新建一个 mkdir ~/.ssh制作公匙 ssh-keygen -t rsa默认会生成id_rsa.pub的公匙将公匙推送到指定的服务器 scp id_rsa.pub username@server:~/.ssh/id_rsa.pub登录到服务器 ssh use...
分类:系统相关   时间:2014-04-29 16:01:32    阅读次数:625
《Cracking the Coding Interview》——第17章:普通题——题目9
2014-04-28 23:52题目:设计算法,找出一本书中某个单词的出现频率。解法:数就行了。代码: 1 // 17.9 Given a book, find out the occurrences of any given words in it. 2 // Answer: 3 // 1....
分类:其他好文   时间:2014-04-29 16:00:32    阅读次数:388
ahjesus linux连接阿里云ubuntu服务器并更改默认账号和密码,以及创建子账户
先确保本地Linux服务器SSH服务开启,如果没有开启直接执行指令:service sshd start然后我们使用ssh指令进行远程登陆ssh username@ip-address输入passwd指令修改旧密码修改默认账号rootvi /etc/passwd按i键进入编辑状态修改第1行第1个ro...
分类:系统相关   时间:2014-04-29 15:51:22    阅读次数:586
如何使用 pyinstaller 对py脚本进行打包?
需求1:打包成Linux上可执行程序a. 先下载pyinstaller程序,我当前下载的是PyInstaller-2.1的版本进行如下操作:pythoner@pythoner-virtual-machine:~/PyInstaller-2.1$ sudo python2.7 setup.py ins...
分类:其他好文   时间:2014-04-29 15:48:16    阅读次数:501
生产环境中的PHP WEB 简单架构
使用三台虚拟机器, Ubuntu1(nginx) 192.168.226.128 Ubuntu2(php-fpm+memcached)192.168.226.132 CentOS(MySQL)192.169.226.130PHP 框架使用CakePHP,这个是很常用的MVC 框架,基于事件的分...
分类:Web程序   时间:2014-04-29 15:24:41    阅读次数:477
《Cracking the Coding Interview》——第17章:普通题——题目12
2014-04-29 00:04题目:给定一个整数数组,找出所有加起来为指定和的数对。解法1:可以用哈希表保存数组元素,做到O(n)时间的算法。代码: 1 // 17.12 Given an array of integers and target value, find all pairs in ...
分类:其他好文   时间:2014-04-29 15:08:13    阅读次数:469
《Cracking the Coding Interview》——第18章:难题——题目7
2014-04-29 03:05题目:给定一个词典,其中某些词可能能够通过词典里其他的词拼接而成。找出这样的组合词里最长的一个。解法:Leetcode上有Word Break这道题,和这题基本思路一致。代码: 1 // 18.7 Given a list of words, find out the...
分类:其他好文   时间:2014-04-29 14:30:17    阅读次数:493
《Cracking the Coding Interview》——第18章:难题——题目6
2014-04-29 02:27题目:找出10亿个数中最小的100万个数,假设内存可以装得下。解法1:内存可以装得下?可以用快速选择算法得到无序的结果。时间复杂度总体是O(n)级别,但是常系数不小。代码: 1 // 18.6 Find the smallest one million number....
分类:其他好文   时间:2014-04-29 14:27:13    阅读次数:665
备忘-linux文件系统结构
用apache的时候总是要进入/var/www, 用久了开始好奇这些个目录都是派什么用处的,简单整理了一下/bin 存放二进制命令文件,这个目录下面不允许存在子目录/boot bootloader的静态文件,当然OS的文件也必须在这里/dev 设备文件,MAKEDEV命令可以创建设备/etc 特定主...
分类:系统相关   时间:2014-04-29 13:37:58    阅读次数:675
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!