`
junfeng_feng
  • 浏览: 18447 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
#coding=gbk import os #operating system import sys #system import copy from pprint import pprint #perfect print from operator import attrgetter a = [1, 2, 3, 4, 5] b = [6, 7, 8, 9, 10] #python使用引用计数 c = a print c #[1, 2, 3, 4, 5] c[0] = -1 print c #[-1, 2, 3, 4, 5] print a #[-1, 2, 3, 4, 5] a[0 ...
服务器: /* *run command: * g++ server.cpp -o server && ./server */ #ifndef SERVER #define SERVER #include<arpa/inet.h> #include<assert.h> #include<stdio.h> #include<stdlib.h> #include<pthread.h> #include<errno.h> #include<assert.h> #include<st ...
-module(exam). -compile(export_all). %1杨辉三角 start(N) when is_integer(N) -> print(N,1,1). %C表示行数 %LC表示C对应的list print(N,1,_) -> io:format("~p~n",[[1]]), print(N,2,1); print(N,2,_) -> io:format("~p~n",[[1,1]]), print(N,3,[1,1]); %Lc_ ...
//字符串同素:包含相同的char,以及char出现的次数 #include <iostream> #include <stdio.h> #include <map> #include <assert.h> #include <string.h> #include "boost/smart_ptr.hpp" using namespace std; const int CHAR_NUMBER = 256;//答题的时候,好像写成255了 bool get(char* str,int* arr) { ...
写下书单,感叹自己大学前三年的孤陋,惋惜没有好好利用时间看看技术书籍,只会看课本学习老师教过的内容。很是惭愧,在下面的书单之前我没有额外看过除课本以外的任何技术书籍。在此特别感谢zcj,是他让我看到了我和他的差距,看到了他书桌上的计算机经典的书籍,我一下无地自容。下面所列均为计算机经典,希望在大四这一年看下这些书为时不晚! 1.《C++ 编程思想》 作为我的第一本课外书籍,不得不说我选对了,这个被侯捷先生归类为“C++四库全书”,看过这本书之后,我才知道自己之前以为掌握C++是多么幼稚的观点,也就是我是只“井底之蛙”。 2.《Java编程思想》 虽然作为我第二本买来的经典书籍,可以直到研 ...
/* * mergesort_unrecursive.cpp * * Created on: Dec 14, 2011 * Author: junfeng * //从分治策略的机制入手,容易消除归并排序算法中的递归,事实上, //算法Mergesort的递归过程只是将待排序列 集合一分为二,直到待排序列集合 //只剩下一个元素为止,然后不断合并两个排好序的数组段。按此机制,可以首先 //将数组a中相邻元素两两配对。用合并算法将它们排序,构成n/2组长度为2的排好 //序的子数组段,然后再将它们 排序成长度为4的排好序的子数组段,如此继续下去, //直至 ...
#include<stdio.h> #include<string> #include<stdlib.h> using std::string; string BigINTtoBinary(string n) { string result=""; string temp="temp"; while(temp.length()>0) { temp=""; int i=0; char ch; while(i<n.length()) { ch=n[i]- ...
#include<iostream> #include<cstring> using namespace std; void arrange(char* src,char* des,int n) { if(n==strlen(src)) { for(int i=0;i<n;i++) cout<<des[i]; cout<<endl; } else { for(int i=0;i<strlen(src);i++) { if(i>0&&src[i ...
//链表 随机指针 复制 #include<iostream> #include<ctime> #include<vector> #include<cstdlib> using namespace std; class CNode { public: int value; CNode* next; CNode* rand; CNode(int v); ~CNode(); }; CNode::CNode(int v):value(v),next(0),rand(0){} CNode::~CNode ...
#coding=utf-8 import urllib import time import re import threading import string import urllib2 import chardet import MySQLdb import base64 import os import sys from pyquery import PyQuery reload(sys) sys.setdefaultencoding("utf-8") #新闻最早时间 earliestTime = "2010-06-0 ...
Global site tag (gtag.js) - Google Analytics