A summary of today's interview

今天下午去了B公司的宣讲会。 先说下背景。起先是不知道有面试的,以为会像其他校招一样,走个过场,宣传加简历一投,就OK。 可是B公司来头挺大。宣讲完毕后,还有笔试+面试。因为我根本就没有准备,答得很不好,面试也有点想到啥说啥的感觉。下面具体来讲下笔试和面试。 笔试 笔试的题不难,CS的基础课程知识偏多,++i, i++区别,几种常见数据结构特点,还有经典的从浏览器输入网址到看到页面发生了什么,数据库sql语句,烧绳子的智力题,简单的php知识点,二分法判断数字是否存在于数组,等。 基础很重要,数据结构,数据库,这都是很基本的。 编程题做的一塌糊涂。二分法属于很简单的算法了,可是我不撸代码好多天,这种简单的算法都没有写上。 SQL语句自认为逻辑清晰,可是,等提到面试再说。 数据结构也是描述得很笼统。栈后进先出,队列先进先出,链表元素顺序与存储位置无关,树分层。 写上这些太简单...
Continue reading...

Recursively download whole Ftp Directories

How to recursively download all files in a directory, with keeping the ftp’s directory structure? First, I want to use python spider to do this. Python script parse links and download links. But it will be some complicated, you need to judge which link is available. I googled a lot of pages, and never found a simple way to do this. Until I met one page, it said that wget can do this, an...
Continue reading...

CSV文件编码问题

csv文件全称为Comma-separated values,在用Excel处理csv文件时,经常会遇到一些棘手的编码问题。本文从查看csv文件和制作csv文件两个方面讨论。 查看csv文件 下面是用Python把数据写入csv文件的代码。 with open(file_name,'wb') as f: writer = csv.writer(f) writer.writerows(data_list) 如果用记事本打开写入后的csv文件,得到的是以逗号为分隔符的raw data,如果某个字段的数据过长,整体的浏览体验很差。 为更好地查看和处理这些数据,我们用excel打开,结果英文显示正常,中文显示不正常: 出现这种问题的原因是Python写入的文件默认为UTF-8编码,而Excel在打开csv文件时并不会以UTF-8编码解析,所以显示不正常。这里提...
Continue reading...

用原生php还是用框架

We assume that Core PHP means solving a Mathematical problem by using paper and pen. Frame work means solving Mathematical problem by using a calculator. Core PHP-Solving Mathematical Problem Only some students can achieve results by using paper and pen as same as in PHP. Only a few of the developers can write the code in an easy way and reliable format. Framework - Solving Mathem...
Continue reading...

Install php 5.6 by yum on centos7

1.Install EPEL rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm 2.Install REMI rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 3.Enabling the Repo We need to make sure the repo is enabled and select which version you want to install. We need to head over to /etc/yum.repos.d you should inside see a file called remi.repo. Open the f...
Continue reading...

Install laravel on centos7

1.Requirement PHP >= 5.6.4 Install PHP 5.6 by yum on CentOS7 Mbstring PHP Extension yum install php-mbstring Others yum install php-xml 2.Install Composer php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196a...
Continue reading...

Run java in shell

Run java code in shell is simple. Before start, please make sure you has installed jdk. In CentOS7, run command below(here is 1.8.0): # yum install java-1.8.0-devel Then, Let’s begin. Create new file named Box.class and add below code: public class Box { public static void main(String[] args){ System.out.println("Hello, world !"); } } Run ...
Continue reading...

Draw a pie chart by d3.js v4

Code <canvas width="300" height="300" id="pad"></canvas> <script type="text/javascript"> var data = [1, 1, 2, 3, 5, 8, 13]; var canvas = document.getElementById("pad"), context = canvas.getContext("2d"); var width = canvas.width, height = canvas.height, radius = Math.min(width, height) / 2; var colors = function(){ return "hsl(" + Math.random() * 360 + ",...
Continue reading...

Vs2015 setup fix

When Install visual studio 2015, an error occurred: To fix this, follow steps below: click close or restart button uninstall MS VC++ 2015 Redistributables in Programs and Features download and install this file: Visual C++ Redistributable for Visual Studio 2015 restart the Visual Studio 2015 installation Install will be success. This passage is made by kyshel, Hope it’s useful ...
Continue reading...

July 2016 summary

Wow, time passes so fast~ July is complicated. All kinds of final exam, I spent much time on it. Even in review period, I have a mind that I want to write a book about Information Theory and Coding. Then, it comes out this: itc - online read Soon, I designed a system called sams. sams - see detail code It means Student Attendance Management System. Not very difficult, I just make...
Continue reading...
Page 4 of 5