- 博客(9)
- 资源 (13)
- 收藏
- 关注
转载 generator 生成杨辉三角
摘录自廖雪峰 python3 生成器 generator和函数的执行流程不一样。函数是顺序执行,遇到return语句或者最后一行函数语句就返回。而变成generator的函数,在每次调用next()的时候执行,遇到yield语句返回,再次执行时从上次返回的yield语句处继续执行。 看到一个比较巧妙的办法def triangles(): nlist=[1] while True:
2016-03-31 18:58:30 1333
原创 C++ DLL
DLL生成与使用生成vs下直接配置为生成DLLdll导出函数//头文件定义#ifdef _YOUR_DLL_PREPROCESS#define _YOUR_DLL_API __declspec(dllexport)#else#define _YOUR_DLL_API __declspec(dllimport)#pragma comment(lib, "your_dll.lib")#
2016-03-29 14:02:52 452
转载 HTTP Header 详解
原文链接找不到了,给个转载的链接HTTP Headerw3c官网Header Field DefinitionsHTTP(HyperTextTransferProtocol)即超文本传输协议,目前网页传输的的通用协议。HTTP协议采用了请求/响应模型,浏览器或其他客户端发出请求,服务器给与响应。就整个网络资源传输而言,包括message-header和message-body两部分。首
2016-03-28 18:01:56 371
原创 archlinux 入坑记
其实已经写了两次,但是remarkble保存的时候总是坑,索性卸载,转投retext.(atom安装太慢)安装前在vmware上尝试了下,但实际安装过程中还是问题不断。分区 cfdisk比parted更好用mirrorlist 使用163 mirrorsfstab校验 自动生成fstab自后校验,我没用看,导致安装之后重启找不到引导grub-install 安装grub的时候最后指定
2016-03-27 21:29:03 673
原创 Recursion 8.3
Write a method that returns all subsets of a set.// =====================================================================================//// Filename: 8_3.cpp//// Description: a method
2016-03-22 09:15:58 327
原创 Recursion 8.4
Write a method to compute all permutations of a string.// =====================================================================================//// Filename: 8_4.cpp//// Description: a m
2016-03-22 09:13:07 293
原创 Recursion 8.5
Implement an algorithm to print all valid (e.g., properly opened and closed) combinations of n-pairs // =====================================================================================////
2016-03-22 09:10:40 340
翻译 gdb Missing separate debuginfos
转自stackoverflow debuginfo-install is a command of yum-utils, soyum install yum-utilsdebuginfo-install glibcif the warning’s still there, edit /etc/yum.repos.d/CentOS-Debuginfo.repo, set enabled=1
2016-03-21 11:58:46 359
转载 字符串分割
#include <cstring>#include <iostream>int main() { char input[100] = "A bird came down the walk"; char *token = std::strtok(input, " "); while (token != NULL) { std::cout << token
2016-03-11 23:03:02 267
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人