随笔分类 - python
摘要:就是几个动物,自动排列生成什么的class Animal(object): def __init__(self,name,weight): self.name = name self.weight = weight def eat(self): self.weight +=1 def spea...
阅读全文
摘要:1.python 的安装网上很多关于django跟python 开发的资料,这块我正在实习准备用这个两个合起来搞一个基于web 的东西出来现在开始学习,写点东西记录一下心得。开发环境是windows的,所以我们到python官网下载64位的windows操作系统的安装包:https://www.py...
阅读全文
摘要:上面是没有调用cleaned_data的提交结果,可见模版直接把form里面的整个标签都接收过来了下面是调用cleaned_data 的结果django 的表单,提交上来之后是这样的:#coding: gb2312from django import formsclass ContactForm(f...
阅读全文
摘要:后面还有一个问题,是我把txt生成了,但是网页没有返回我还不知道,现在怎么直接返回txt并且展示出来txt 的内容,希望大牛不吝赐教首先有一个问题django1.7之前,这样用:HttpResponse(simplejson.dumps({“status”: ‘200’, “message”:u’登...
阅读全文
摘要:上面是没有调用cleaned_data的提交结果,可见模版直接把form里面的整个标签都接收过来了下面是调用cleaned_data 的结果django 的表单,提交上来之后是这样的:#coding: gb2312from django import formsclass ContactForm(f...
阅读全文
摘要:String to Integer (atoi)Total Accepted:52232Total Submissions:401038My Submissions Implement atoi to convert a string to an integer.Hint: Carefully co...
阅读全文
摘要:大牛没有能做出来的题,我们要好好做一做 Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This prob...
阅读全文
摘要:Easy OpenCL with Python 原文 http://www.drdobbs.com/open-source/easy-opencl-with-python/240162614 OpenCL与python联合工作:与CUDA的前景分析http://www.opengpu.org/...
阅读全文
摘要:就是几个动物,自动排列生成什么的class Animal(object): def __init__(self,name,weight): self.name = name self.weight = weight def eat(self): self.weight +=1 def spea...
阅读全文
摘要:Symmetric Tree Total Accepted: 61440 Total Submissions: 194643 My Submissions Given a binary tree, check whether it is a mirror...
阅读全文
摘要:Add Binary Total Accepted: 46815 Total Submissions: 189215 My Submissions Given two binary strings, return their sum (also a bin...
阅读全文
摘要:Write a function to find the longest common prefix string amongst an array of strings.我的解决方案:class Solution {public: string longestCommonPrefix(vec...
阅读全文
浙公网安备 33010602011771号