这篇博客的目的是为了提醒自己,以后笔试一定得及时交啊?!!!!
阿里笔试的最后一个题,我顺手就写python实现,代码如下,不知道对不对,反正当时好几个数据都过了。
不过,反正没交上去,那个题填代码的地方是空的,对错都没用了。先记下,改天细究:
def largest_common(query, text, is_first_same):
if (len(query) == 0 or...
分类:
编程语言 时间:
2014-08-29 21:26:08
阅读次数:
297
# Definition for singly-linked list.class ListNode: def __init__(self, x): self.val = x self.next = Noneclass Solution: # @return ...
分类:
其他好文 时间:
2014-08-29 19:40:58
阅读次数:
164
1.to_proc
class Array
def to_proc
proc { |receiver| receiver.send *self }
end
end
[ 'Hello', 'Goodbye' ].map &[ :+, ' BeiJing!' ]
#=> ["Hello BeiJing!", "Goodbye BeiJing!"]
recei...
分类:
其他好文 时间:
2014-08-29 18:18:48
阅读次数:
165
# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Noneclas...
分类:
其他好文 时间:
2014-08-29 17:36:18
阅读次数:
135
class Solution: # @param matrix, a list of lists of integers # RETURN NOTHING, MODIFY matrix IN PLACE. def setZeroes(self, matrix): di...
分类:
其他好文 时间:
2014-08-29 16:00:48
阅读次数:
203
#?-*-?coding:?cp936?-*-
#jk409?于2014-8-27用python2.7编写的批量复制文件和修改虚拟机配置文件的脚本
import?os,os.path,shutil
import?re,time
class?main:
????def?__init__(self,name,drive,...
分类:
编程语言 时间:
2014-08-29 11:18:48
阅读次数:
251
scipy在misc的pilutil.py中def fromimage(im, flatten=0)函数中,# workaround for crash in PIL, see #1613.im.convert('L')上面是之前的代码,当图片模式是二值模式时,此处会出错,因为im.convert(...
分类:
编程语言 时间:
2014-08-29 10:33:57
阅读次数:
204
class Solution: # @param matrix, a list of lists of integers # @param target, an integer # @return a boolean def searchMatrix(self, matrix...
分类:
编程语言 时间:
2014-08-28 11:24:19
阅读次数:
216
第一步:出现如下图所示的应用名称默认为空.或者下拉框中无default应用可选(下拉框出现的workspace是流程管理应用,非项目应用).第二部:到安装目录下看看\apache-tomcat-5.5.20\webapps下是否存在default文件夹.如果不存在,就到其他电脑上复制相同版本的def...
分类:
其他好文 时间:
2014-08-28 09:36:19
阅读次数:
734
# -*- coding: utf-8 -*-
from Tkinter import *
def btn_click():
b2['text'] = 'clicked'
evalue = e.get()
print 'btn Click and Entry value is %s' % evalue
def btn_click_bind(event):
pr...
分类:
编程语言 时间:
2014-08-28 00:59:58
阅读次数:
269