相信积累的力量

摘要: 第2章 Unicode char c = 'A'; char a[]= "Hello!"; c语言中的宽字符类型wchar_t,在WCHAR.H中定义 typedef unsigned short wchar_t; wchar_t c = 'A';占两个字节0x0041,小端序:0x41, 0x00 阅读全文
posted @ 2023-05-17 15:40 ThreeF 阅读(11) 评论(0) 推荐(0) 编辑
摘要: hello world print("hello world") 阅读全文
posted @ 2023-05-17 11:31 ThreeF 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 解决方法 阅读全文
posted @ 2023-05-17 08:58 ThreeF 阅读(21) 评论(0) 推荐(0) 编辑
摘要: ubuntu% cat hello.c #include <stdio.h> #include <lua.h> #include <lualib.h> #include <lauxlib.h> static int hello(lua_State *L){ printf("hello\n"); re 阅读全文
posted @ 2022-09-23 12:22 ThreeF 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 选择器 el.getElementById('id') el.getElementsByTagName('li') 返回伪数组 el.getElementsByClassName('classname') 返回伪数组 el.querySelector('selector') 返回第一个元素对象 el 阅读全文
posted @ 2022-09-15 21:31 ThreeF 阅读(37) 评论(0) 推荐(0) 编辑
摘要: ubuntu% curl -R -O http://www.lua.org/ftp/lua-5.4.4.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Le 阅读全文
posted @ 2022-09-13 12:21 ThreeF 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 21 examples 阅读全文
posted @ 2022-09-07 13:43 ThreeF 阅读(8) 评论(0) 推荐(0) 编辑
摘要: linux vscode安装cmake tool 阅读全文
posted @ 2022-08-10 14:23 ThreeF 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 加上 html,body { height:100%; } .box { height:50%; } 阅读全文
posted @ 2022-06-25 07:46 ThreeF 阅读(66) 评论(0) 推荐(0) 编辑
摘要: display:none;不占位置 visibility:hidden;占位置 阅读全文
posted @ 2022-06-25 07:39 ThreeF 阅读(15) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-12-07 11:59 ThreeF 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-12-06 23:14 ThreeF 阅读(0) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/cangyingzhijia/article/details/12586317使用情景:当类对象被 shared_ptr 管理时,需要在类自己定义的函数里把当前类对象作为参数传给其他函数时,这时需要传递一个 shared_ptr ,否则就不能保持 shared_ptr 管理这个类对象的语义(因为有一个 raw pointer 指向这个类对象,而 shared_ptr 对类对象的这个引用没有计数,很有可能 shared_ptr 已经把类对象资源释放了,而那个调用函数还在使用类对象——显然,这肯定会产生错误)。很好奇这个模板类的实现。先看看怎么使用:对一个 阅读全文
posted @ 2014-03-31 13:31 ThreeF 阅读(194) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-03-28 12:59 ThreeF 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-02-19 12:27 ThreeF 阅读(4) 评论(0) 推荐(0) 编辑
摘要: http://flask.pocoo.org/docs/patterns/viewdecorators/View Decorators¶Python has a really interesting feature called function decorators. This allow some really neat things for web applications. Because each view in Flask is a function decorators can be used to inject additional functionality to 阅读全文
posted @ 2014-02-16 20:05 ThreeF 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: http://www.chinaz.com/program/2011/0503/176896.shtml在数据库中,字符型的数据是最多的,可以占到整个数据库的80%以上。为此正确处理字符型的数据,对于提高数据库的性能有很大的作用。在字符型数据中,用的最多的就是Char与Varchar两种类型。前面的是固定长度,而后面的是可变长度。现在我们需要考虑的是,在什么情况下使用Char字符型数据,什么情况下采用Varchar字符型数据。在这部分内容中,我就跟大家来探讨一下这个话题。一、VARCHAR与CHAR字符型数据的差异在MySQL数据库中,用的最多的字符型数据类型就是Varchar和Char.。这 阅读全文
posted @ 2014-02-12 14:39 ThreeF 阅读(404) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/5870188/does-flask-support-regular-expressions-in-its-url-routingEven though Armin beat me to the punch with an accepted answer I thought I'd show an abbreviated example of how I implemented a regex matcher in Flask just in case anyone wants a working example o 阅读全文
posted @ 2014-02-10 17:38 ThreeF 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 原文The 30 CSS Selectors you Must Memorize由 Jeffrey Way 发表于 2011 年 6 月,介绍了 30 种最常用的 CSS 选择器用法,多加了一种,变成了牢记 31 种选择器用法。其他 CSS3 选择器用法请查看CSS3 selectors explained这篇文章,此外,W3C CSS3 选择器官方文档Selectors Level 3 W3C Recommendation 29 September 2011记录在这里留待有疑问的时候查看。1.** { margin: 0; padding: 0;}星号选择器用于选取页面中的所有元素,可用.. 阅读全文
posted @ 2014-02-10 12:26 ThreeF 阅读(654) 评论(0) 推荐(0) 编辑
摘要: Foreword¶Read this before you get started with Flask. This hopefully answers some questions about the purpose and goals of the project, and when you should or should not be using it.What does “micro” mean?¶“Micro” does not mean that your whole web application has to fit into a single Pytho 阅读全文
posted @ 2014-02-07 18:19 ThreeF 阅读(255) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/9906144/python-decorate-a-class-by-defining-the-decorator-as-a-classApart from the question whether class decorators are the right solution to your problem:in Python 2.6 and higher, there are class decorators with the @-syntax, so you can write:@addIDclassFoo:passi 阅读全文
posted @ 2014-02-07 14:25 ThreeF 阅读(551) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-02-06 21:53 ThreeF 阅读(1) 评论(0) 推荐(0) 编辑
摘要: Cyclic imports terminate, but you need to be careful not to use the cyclically-imported modules during module initialization.Consider the following files:a.py:print"a in"import sysprint"b imported: %s"%("b"in sys.modules,)import bprint"a out"b.py:print"b 阅读全文
posted @ 2014-02-06 20:23 ThreeF 阅读(944) 评论(0) 推荐(0) 编辑
摘要: 目录http://kb.cnblogs.com/page/130672/ 高级编程语言的发展历程(一)创始纪 高级编程语言的发展历程(二)虚拟机的前世今生 高级编程语言的发展历程(三)FORTRAN 语言是怎么来的 高级编程语言的发展历程(四)LISP 和 AI 的青梅竹马 A 高级编程语言的发展历程(五)LISP 和 AI 的青梅竹马 B 高级编程语言的发展历程(六)SCHEME 语言是怎么来的 高级编程语言的发展历程(七) LISP 语言前传 原文标题:高级语言是怎么来的 高级编程语言的发展历程(一)创始纪 2009-5-13 原文链接 终于放暑假了,有心情来八卦... 阅读全文
posted @ 2014-02-06 16:59 ThreeF 阅读(588) 评论(0) 推荐(0) 编辑
摘要: http://www.4pang.com/2010/08/20/4%E8%83%96%E5%AD%A6python-%EF%BC%8D-__getattr__-%E5%92%8C-__getattribute__-%E6%96%B9%E6%B3%95%E7%9A%84%E5%8C%BA%E5%88%AB.htmlpython 再访问属性的方法上定义了__getattr__() 和 __getattribute__() 2种方法,其区别非常细微,但非常重要。如果某个类定义了__getattribute__()方法,在每次引用属性或方法名称时Python 都调用它(特殊方法名称除外,因为那样将会导 阅读全文
posted @ 2014-02-06 16:14 ThreeF 阅读(450) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-02-06 14:26 ThreeF 阅读(0) 评论(0) 推荐(0) 编辑
摘要: Flask-LoginFlask-Login provides user session management for Flask. It handles the common tasks of logging in, logging out, and remembering your users’ sessions over extended periods of time.It will:Store the active user’s ID in the session, and let you log them in and out easily.Let you restrict vie 阅读全文
posted @ 2014-01-27 22:52 ThreeF 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: 一、cookie机制和session机制的区别具体来说cookie机制采用的是在客户端保持状态的方案,而session机制采用的是在服务器端保持状态的方案。同时我们也看到,由于才服务器端保持状态的方案在客户端也需要保存一个标识,所以session机制可能需要借助于cookie机制来达到保存标识的目的,但实际上还有其他选择二、会话cookie和持久cookie的区别如果不设置过期时间,则表示这个cookie生命周期为浏览器会话期间,只要关闭浏览器窗口,cookie就消失了。这种生命期为浏览会话期的cookie被称为会话cookie。会话cookie一般不保存在硬盘上而是保存在内存里。如果设置了过 阅读全文
posted @ 2014-01-27 14:56 ThreeF 阅读(341) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/xd502djj/archive/2010/08/08/1795263.html随着时间的飞逝,随着岁月的流失。从世界上第一台计算机ENIAC诞生至今,已经有将近半个世纪了。经过这半个世纪的语言发展,我们所接触的语言基本上都是高级语言了。这篇文章主要对现在比较主流的WEB开发语言,做一个简单的对比。JAVA简介: Java是由Sun Microsystems公司于1995年5月推出的Java程序设计语言(以下简称Java语言)和Java平台的总称。用Java实现的HotJava浏览器(支持Java applet)显示了Java的魅力:跨平台、动态的 阅读全文
posted @ 2014-01-24 10:08 ThreeF 阅读(7630) 评论(0) 推荐(0) 编辑
摘要: API¶This part of the documentation covers all the interfaces of Flask. For parts where Flask depends on external libraries, we document the most important right here and provide links to the canonical documentation.Application Object¶class flask.Flask(import_name, static_path=None, static_ 阅读全文
posted @ 2014-01-22 10:58 ThreeF 阅读(2264) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/yanxiaoqing/article/details/7029451sqlite3 新建数据库 django创建项目后需要修改配置文件 修改数据库配置 使用sqlite3 数据库是最简单的了 其他数据库还要安装驱动什么的 本着快速体验到django的原创 先用sqlite3作为数据库 其实django支持许多数据库 可以无缝切换 到时候修改一下数据库配置就好了 不需要在开始的时候就在这个上面浪费很多时间 博主就是 使用sqlite3做数据库 对应的配置是这样的 settings.py DATABASES = { 'default': 阅读全文
posted @ 2014-01-20 22:22 ThreeF 阅读(604) 评论(0) 推荐(0) 编辑
摘要: http://www.tutorialspoint.com/sqlite/sqlite_installation.htmThe SQLite is famous for its great feature zero-configuration, which means no complex setup or administration is needed. This chapter will take you through the process of setting up SQLite on Windows, Linux and Mac OS X.Install SQLite On Wi 阅读全文
posted @ 2014-01-20 22:06 ThreeF 阅读(330) 评论(0) 推荐(0) 编辑
摘要: Python第三方模块中一般会自带setup.py文件,在Windows环境下,我们只需要使用命令cd c:\Temp\foopython setup.py install两个命令就可以完成第三方模块的安装了。第一个cd命令将当前目前切换到待安装的第三方模块的目录下(这里假设第三方模块解压后的目录为c:\Temp\foo),第二个命令就执行安装了。安装的过程中可能会出现“ImportError: No module named setuptools”的错误提示,这是新手很常遇见的错误提示。不用担心,这是因为Windows环境下Python默认是没有安装setuptools这个模块的,这也是一个 阅读全文
posted @ 2014-01-20 20:55 ThreeF 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Deterministic Finite AutomataA Deterministic Finite Automaton is used to perform lexical analysis for the parser.As the name implies, deterministic finite automata are deterministic. This means that from any given state there is only one path for any given input. In other words, there is no ambiguit 阅读全文
posted @ 2014-01-19 16:55 ThreeF 阅读(583) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/money_bear/article/details/11730729在stackoverflow上面看到一个关于Python中装饰器问题的回复,瞬间觉得作者简直是神人啊。原文地址:http://stackoverflow.com/questions/739654/how-can-i-make-a-chain-of-function-decorators-in-python这么好的一段东西,实在是忍不住拿过来翻译一下,有删改:Python's functions are objects函数是一个对象To understand decorator 阅读全文
posted @ 2014-01-19 14:54 ThreeF 阅读(958) 评论(0) 推荐(0) 编辑
摘要: Python标准库13 循环器 (itertools)作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!在循环对象和函数对象中,我们了解了循环器(iterator)的功能。循环器是对象的容器,包含有多个对象。通过调用循环器的next()方法 (__next__()方法,在Python 3.x中),循环器将依次返回一个对象。直到所有的对象遍历穷尽,循环器将举出StopIteration错误。在for i in iterator结构中,循环器每次返回的对象将赋予给i,直到循环结束。使用iter()内置函数,我们可以将诸如表、字典等容 阅读全文
posted @ 2014-01-11 21:25 ThreeF 阅读(476) 评论(0) 推荐(0) 编辑
摘要: Python深入06 Python的内存管理作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!语言的内存管理是语言设计的一个重要方面。它是决定语言性能的重要因素。无论是C语言的手工管理,还是Java的垃圾回收,都成为语言最重要的特征。这里以Python语言为例子,说明一门动态类型的、面向对象的语言的内存管理方式。对象的内存使用赋值语句是语言最常见的功能了。但即使是最简单的赋值语句,也可以很有内涵。Python的赋值语句就很值得研究。a = 1整数1为一个对象。而a是一个引用。利用赋值语句,引用a指向对象1。Python是动态类型 阅读全文
posted @ 2014-01-11 21:15 ThreeF 阅读(903) 评论(0) 推荐(0) 编辑
摘要: Linux文本流作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!文件用于数据的存储,相当于一个个存储数据的房子。我们之前说,所谓的数据是0或者1的序列,但严格来说,Linux以字节(byte)来作为数据的单位,也就是说这个序列每八位(bit)为一个单位(八位二进制对应的十进制范围为0到255)。使用ASCII编码,可以将这样一个字节转换成为字符。所以,在Linux中,我们所说的数据,完全可以用字符表达出来,也就是说文本(text)的形式。实际上,如果以bit为单位处理字符的话,机器会更容易读懂和传输,效率会更高。但为什么Lin 阅读全文
posted @ 2014-01-11 20:57 ThreeF 阅读(580) 评论(0) 推荐(0) 编辑
摘要: Skew heapFrom Wikipedia, the free encyclopediaAskew heap(orself-adjusting heap) is aheapdata structureimplemented as abinary tree. Skew heaps are advantageous because of their ability to merge more quickly than binary heaps. In contrast withbinary heaps, there are no structural constraints, so there 阅读全文
posted @ 2014-01-11 20:47 ThreeF 阅读(948) 评论(0) 推荐(0) 编辑
摘要: Python标准库04 文件管理 (部分os包,shutil包)作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!我们可以通过操作系统的命令来管理文件,如同我们在linux文件管理相关命令中看到的那样。另一方面,python标准库则允许我们在python内部管理文件。相同的目的,我们就有了两条不同的途径实现。在python内部实现的优势在于你可以同时利用python语言,并配合其他python工具,比如正则表达式工具。但操作系统同样可以通过shell编程,来整合linux文件管理命令,shell也拥有自己的正则表达式工具。pyt 阅读全文
posted @ 2014-01-11 20:45 ThreeF 阅读(1567) 评论(0) 推荐(0) 编辑

相信积累的力量