自己写的小例子,就是把本地的txt文件转换为JSON格式输出。
data source
简单的1-10存一个文件, A-J 存一个文件
import json
book = 'C:\Python27\\book.txt'
date = 'C:\Python27\date.txt'
book_list = []
date_list = []
with open(book) ...
分类:
编程语言 时间:
2014-10-29 09:15:08
阅读次数:
245
我们先说overload 重载。
在Java中,支持重载,重载的意思是能够定义有相同方法名的方法,传入方法中的参数个数,或者参数类型不同。比如:
int mymethod(int a, int b)
int mymethod(int num)
float mymethod(int a, float b)
float mymethod(float var1, int var2)
in...
分类:
编程语言 时间:
2014-10-28 09:26:54
阅读次数:
293
Front-end Job Interview QuestionsThis repo contains a number of front-end interview questions that can be used when vetting potential candidates. It i...
分类:
其他好文 时间:
2014-10-26 18:24:28
阅读次数:
354
package com.alibaba.interview;import java.util.Random;/** * @Author: weblee * @Email: likaiweb@163.com * @Blog: http://www.cnblogs.com/lkzf/ * @Time: ...
分类:
编程语言 时间:
2014-10-25 17:16:55
阅读次数:
296
1.Primacyandrecency:Peoplemostrememberthefirstandlastthingstooccur,andbarelythemiddle.Whenschedulinganinterview,askwhattimestheemployerisinterviewingandtrytobefirstorlast.2.Ifyouworkinabarorincustomerserviceofanykind……Putamirrorbehindyouatthecounter.Thisw..
分类:
其他好文 时间:
2014-10-24 11:11:47
阅读次数:
374
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
Show Tags
Have you been asked this question in an interview?
...
分类:
其他好文 时间:
2014-10-23 17:47:23
阅读次数:
229
A while back, I posted a list ofASP.NET Interview Questions.Conventional wisdomwas split, with about half the folks saying I was nuts and that it was ...
分类:
Web程序 时间:
2014-10-20 09:54:40
阅读次数:
385
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Finally, you come to the interview room. You know that a Microsoft interviewer is in the room though the door is lo...
分类:
其他好文 时间:
2014-10-20 00:32:35
阅读次数:
291
package interview_10_10;import org.junit.Test;public class T1 { /** * 如果系统要使用超大整数(超过long长度范围),请你设计一个数据结构来存储这种超大型数字以及设计一种算法来实现超大整数加法运算)。 */ ...
分类:
编程语言 时间:
2014-10-10 19:54:34
阅读次数:
446
Polymorphism is often referred to as the third pillar of object-oriented programming, after encapsulation and inheritance. It has two distinct aspects:
At run time, objects of a derived class may...
分类:
其他好文 时间:
2014-10-10 14:05:54
阅读次数:
158