随笔分类 - Python/Ruby/Node.js/Perl

摘要:npm 是node.js提供的包管理工具# 安装指定名字的包 会下载到当前目录下 node_modules/npm install npm install @ # 按版本号安装npm install @ # 按发布tagnpm install @">=" # 按版本范围npm install

阅读全文

posted @ 2012-08-14 23:24

bluefrog

阅读(3207)

评论(0)

推荐(0) 编辑

摘要:tag2txt 只生成单个html文档,比较合适写一些api或接口的文档,如果做大项目文档还是想使用sphinx安装(需要安装python和easy_install)easy_install sphinx生成一个项目(按向导进行)sphinx-quickstart生成的文件&目录-rw-r--r-- 1 bluefrog bluefrog 7670 2012-05-28 16:32 conf.py-rw-r--r-- 1 bluefrog bluefrog 417 2012-05-28 16:32 index.rst-rw-r--r-- 1 bluefrog bluefrog 5092

阅读全文

posted @ 2012-05-28 16:49

bluefrog

阅读(2104)

评论(0)

推荐(0) 编辑

摘要:Javascripthtml.erbhtml

posted @ 2012-05-26 23:10

bluefrog

阅读(344)

评论(0)

推荐(0) 编辑

摘要:载入模板文件# 载入app/views//edit.html.erbrender :editrender :action => :editrender 'edit'render 'edit.html.erb'render :action => 'edit'render :action => 'edit.html.erb'# 载入app/views/books/edit.html.erbrender 'books/edit'render 'book

阅读全文

posted @ 2012-05-25 23:25

bluefrog

阅读(2664)

评论(0)

推荐(0) 编辑

摘要:sudo gem install wxruby测试是否安装成功:bluefrog@bluefrog-laptop:~/code/ruby$ irbirb(main):001:0> require "wx"LoadError: no such file to load -- wx from (irb):1:in `require' from (irb):1 from :0irb(main):002:0> 如果出现以上问题请先require "rubygems"irb(main):002:0> require "rubyg

阅读全文

posted @ 2012-05-17 23:54

bluefrog

阅读(583)

评论(0)

推荐(0) 编辑

摘要:一直想知道python里有没有类似php中的 $classname->$method() 或call_user_func今天有时间查了一下,示例代码如下:classname.py1 #!/usr/bin/python2 3 class classname:4 def mod1(self):5 pass6 7 def echo(self):8 print "test"test.py 1 #!/usr/bin/python 2 3 def test(): 4 clsname = "classname" 5 method = "ech...

阅读全文

posted @ 2012-05-11 17:33

bluefrog

阅读(10272)

评论(0)

推荐(1) 编辑

摘要:sinatra 是ruby的一个web框架http://www.sinatrarb.com/安装(可以使用taobao的镜像)gem install sinatrahello world# hello.rb require 'sinatra' get '/' do 'Hello world!' end启动ruby -rubygems first.rb查看localhost:4567

阅读全文

posted @ 2011-12-27 01:21

bluefrog

阅读(331)

评论(0)

推荐(0) 编辑

摘要:直接调用模板from pyramid.renderers import render_to_responsedef sample_view(request): return render_to_response('templates/foo.pt', {'foo':1, 'bar':2}, request=request)Response输出from pyramid.renderers import renderfrom pyramid.response import Re...

阅读全文

posted @ 2011-10-26 23:49

bluefrog

阅读(1548)

评论(1)

推荐(0) 编辑

摘要:输出jsonfrom pyramid.view import view_config@view_config(renderer='json')def hello_world(request): return {'content':'Hello!'}或config.add_view('myproject.views.my_view', renderer='json')默认的render(string)from pyramid.response import Responsefrom pyramid.view impo

阅读全文

posted @ 2011-10-23 23:34

bluefrog

阅读(2220)

评论(0)

推荐(0) 编辑

摘要:Defining a View Callable as a Functionfrom pyramid.response import Responsedef hello_world(request): return Response('Hello world!')Defining a View Callable as a Classfrom pyramid.response import Responseclass MyView(object): def __init__(self, request): self.request = request def __...

阅读全文

posted @ 2011-10-21 00:10

bluefrog

阅读(2127)

评论(0)

推荐(1) 编辑

摘要:模式1: main中add_viewprojectname/__init__.py main方法中加入from views import myviewconfig.add_route('myroute', '/prefix/{one}/{two}')config.add_view(myview, route_name='myroute')projectname/views.py中加入方法from pyramid.response import Responsedef myview(request): return Response(request

阅读全文

posted @ 2011-10-20 00:07

bluefrog

阅读(2169)

评论(0)

推荐(1) 编辑

摘要:创建项目使用pyramid_starter模板paster create -t pyramid_starter projectname使用pyramid_projectnamealchemy模板paster create -t pyramid_routesalchemy projectname两种项目模板有一些文件不相同,具体的深入学习以后再说运行测试用例cd projectname./setup.py test -q运行项目paster serve development.iniStarting server in PID 3983.serving on 0.0.0.0:6543 view

阅读全文

posted @ 2011-10-17 23:32

bluefrog

阅读(745)

评论(0)

推荐(0) 编辑

摘要:安装easy_install pyramid异常情况:安装的时候要求zope.interface 3.80以上easy_install zope.interfacehello world 1 from paste.httpserver import serve 2 from pyramid.config import Configurator 3 from pyramid.response import Response 4 from pyramid.view import view_config 5 6 @view_config(name='hello',request_me

阅读全文

posted @ 2011-09-29 17:17

bluefrog

阅读(745)

评论(3)

推荐(0) 编辑

摘要:视图HelloworldCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->from django.http import HttpResponsedef hello(request): return HttpResponse("Hello world")路由文件urls.pyCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.C

阅读全文

posted @ 2010-12-31 06:03

bluefrog

阅读(234)

评论(0)

推荐(0) 编辑

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->svn地址 http://code.djangoproject.com/svn/django/trunk开始一个项目Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->django-admin.py startproject mysite生成的目录

阅读全文

posted @ 2010-12-31 05:50

bluefrog

阅读(316)

评论(0)

推荐(0) 编辑

python node.js ruby_Python/Ruby/Node.js/Perl - 随笔分类 - bluefrog - 博客园相关推荐

  1. 人工智能python框架_Python 与 AI 智能框架 - 随笔分类 - Hopesun - 博客园

    摘要:ODOO模块网 :http://www.odoomk.com/partner 官方用户手册:https://www.odoo.com/documentation/user/13.0/zh_CN/ ...

  2. python爬虫难度排行_【Python爬虫】爬了七天七夜,终于爬出了博客园粉丝数排行榜!...

    [Python爬虫]爬了七天七夜,终于爬出了博客园粉丝数排行榜! 文章发出不到30分钟就被首页下架了,默哀-- 起因 为了督促自己更加积极地写博客,我希望有一个排名系统能让我看到自己的进步.但是博客园 ...

  3. python自动输入账号密码_Python如何基于selenium实现自动登录博客园

    这篇文章主要介绍了Python如何基于selenium实现自动登录博客园,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 需要做的准备: 本文章是使用 ...

  4. python读取数据库数据、并保存为docx_Python - 爬取博客园某一目录下的随笔 - 保存为docx...

    1 #coding:utf-8 2 importrequests3 from bs4 importBeautifulSoup4 importMySQLdb5 6 7 defget_html(url): ...

  5. python基础论文_Python基础 - 文章分类 - rwwh - 博客园

    文章分类 - Python基础 摘要:参考 https://www.cnblogs.com/yuanchenqi/articles/5722574.html https://www.cnblogs.c ...

  6. python防止源码泄露_ctf常见源码泄露 - Lmg66 - 博客园

    前言 在ctf中发现很多源码泄露的题,总结一下,对于网站的搭建要注意删除备份文件,和一些工具的使用如git,svn等等的规范使用,避免备份文件出现在公网 SVN源码泄露 原理 SVN(subversi ...

  7. python调试蓝牙适配器_蓝牙调试 - 小蜗牛叽咕往前 - 博客园

    1 设置 USB转TTL-蓝牙模块 vcc-vcc gnd-gnd rx-rx  (你没看错我也没打错 就是这个) tx-tx 两种进入设置模式 1 先按住蓝牙按键 然后上电 进入2秒一闪  (不要使 ...

  8. python猴子分桃_猴子分桃 - Ryan in C++ - 博客园

    猴子分桃的故事大体有两种描述: 描述 1 :五只猴子分桃.半夜,第一只猴子先起来,它把桃分成了个数相等的五堆,多出一只:于是,它吃掉了一个,拿走了一堆.第二只猴子起来一看,只有四堆桃,于是把四堆合在一 ...

  9. python拍七游戏代码_拍七数字游戏 - Johannes-Jensen - 博客园

    最近写作业时,老师留了一道关于拍七数字游戏的题,"拍7游戏"规则是:一堆人围成一圈,开始时,任意指定一人说出数字"1"后,一圈人按顺时针方向,每人按整数由小到大 ...

  10. 【Python爬虫】爬了七天七夜,终于爬出了博客园粉丝数排行榜!

    文章发出不到30分钟就被首页下架了,默哀-- 起因 为了督促自己更加积极地写博客,我希望有一个排名系统能让我看到自己的进步.但是博客园对用户的排名体系相对是比较少的,主要是推荐博客排行和积分排行:但它 ...

最新文章

  1. P2261 [CQOI2007]余数求和
  2. Windows自动启动程序的十大藏身之所(转载)
  3. CVPR 2022 | 阿里达摩院新技术,美体塑形一键就成
  4. Qt/E中的键盘设备管理
  5. 【NLP】ALBERT:更轻更快的NLP预训练模型
  6. go mysql 数据 json,golang查询数据返回json
  7. 手机协处理器java,HBase1.x实战:协处理器Java开发实例--ObserverCoprocessor
  8. 计算机解译地学应用效果,不同的遥感解译方法在地表覆盖分类信息提取中的应用研究...
  9. bootstrap基础学习十篇
  10. 这些 iOS 面试基础题目,你都深入了解吗?
  11. f2fs学习四: f2fs文件系统挂载
  12. 保存网页图片的八种方法
  13. 搜狗推送接口-搜狗推送口子
  14. 可行性分析与需求分析
  15. 服务器关机 正在注销,Win7系统关机一直卡在正在注销如何解决
  16. LS1046A平台 网卡混杂模式,无法收到DMAC不是自己的包
  17. 东方影都2003_东方影都旅游攻略|电影博物馆amp;外景街最in玩法,get了吗?
  18. matlab 错误使用*
  19. 去中心化交易系统开发
  20. java文件中搜索的快捷键_MyEclipse中的查找快捷键

热门文章

  1. tp5 给图片加水印
  2. How to cover an IE windowed control (Select Box, ActiveX Object, etc.) with a DHTML layer.
  3. STM32:利用VM8978和I2S实现录音的频率分析
  4. 德玛西亚服务器显示排队,英雄联盟排队怎么进入-英雄联盟:激斗峡谷(国际服 LOL:Wild Rift)问答专区-OurPlay...
  5. 怎么区分zh和ch_怎样区分zh,ch,sh与z,c,s
  6. appium+python 自动化测试:解决安卓系统双击问题——获取微信聊天内容
  7. rx全家桶使用博客网址
  8. Oracle的sqlnet.ora文件配置
  9. vue中element中的input框和laod中防抖和节流结合使用(性能优化)使用lodash相关方法
  10. 360锁屏壁纸超级好看,于是想保存下来。