码迷,mamicode.com
首页 > 其他好文
解释器模式
1,现在很多杀毒软件,采用了解释器模式,就减速升级的次数,从而提高了用户体验了,当有一种新的病毒的时候不需要升级客户端,而是服务器直接发送命令(命令模式),然后客户端进行解析命令,就用到了解释器模式,还有我们的编译器也是这种模式 2,代码 // 解释器模式.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include us...
分类:其他好文   时间:2014-12-26 21:43:48    阅读次数:181
1412251902-蓝桥杯-基础练习 字母图形
基础练习 字母图形   时间限制:1.0s   内存限制:256.0MB        问题描述 利用字母可以组成一些美丽的图形,下面给出了一个例子: ABCDEFG BABCDEF CBABCDE DCBABCD EDCBABC 这是一个5行7列的图形,请找出这个图形的规律,并输出一个n行m列的图形。 输入格式 ...
分类:其他好文   时间:2014-12-26 21:43:55    阅读次数:185
leetcode:Valid Palindrome
一、     题目 题目给出一个字符串,求出它是否为回文字符串,其中只有字母和数字是有效字符,其他的字符可以忽略。 例如:"Aman, a plan, a canal: Panama" 是回文字符串. "race a car" is not a palindrome.不是回文字符串 二、     分析 看到这个题目我首先想到的是使用两个数组将有效字符串保存,其中一个正序一个逆序,然后做比...
分类:其他好文   时间:2014-12-26 21:44:07    阅读次数:152
12月水题集锦
hdu 1040(本来想练个冒泡手速,竟然超时,果断sort。。。。) #include #include using namespace std; int str[1000],n; #define forxunhuan for(int i=0;i<n;i++) int main(){ int t; scanf("%d",&t); while(t--){ scanf("%d...
分类:其他好文   时间:2014-12-26 21:44:06    阅读次数:203
ACdreamOJ 1116 斐波那契数列+hash计算后缀
http://acdream.info/problem?pid=1116 Problem Description give you a string, please output the result of the following function mod 1000000007 n is the length of the string f() is the funct...
分类:其他好文   时间:2014-12-26 21:44:24    阅读次数:218
Question2Answer页脚版权链接修改
找到/qa-include/qa-theme-base.php文件,对下面函数进行修改即可。                 function attribution()                 {                         // Hi there. I'd really appreciate you displaying this li...
分类:其他好文   时间:2014-12-26 21:44:20    阅读次数:4534
Question2Answer的统计添加
第一步、上http://www.cnzz.com网站,注册账号,然后填写你的网站信息,获取到它的脚本。 第二步、复制它的脚本到你的网页的脚本中。例如: 找到/qa-include/qa-theme-base.php文件,对下面函数进行修改即可。                 function attribution()                 {...
分类:其他好文   时间:2014-12-26 21:41:28    阅读次数:159
我的编程之路点滴记录(五)
html5 要火了吗?        随着微信越来越火的趋势,微信朋友圈似乎给h5带来了新一轮的春天,特别是不久前h5标准的定稿。很多人开始奔走相告:前端要火了,h5的春天来了。作为一个入门级别的程序员,我不敢过早的断言到底 web app  和 native app 最终谁会胜利,因为我还没有那个资格。仅仅从自己的一些观察和体会说一下。        移动互联貌似从08年左右开始火起来,到目...
分类:其他好文   时间:2014-12-26 21:41:05    阅读次数:122
[LeetCode]96.Unique Binary Search Trees
【题目】 Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 ...
分类:其他好文   时间:2014-12-26 21:41:23    阅读次数:162
一些汇编指令(基于8086)
回头看了下汇编,简单总结一些备忘,大部分内容在《王爽汇编语言第二版》中有更为详细的介绍,建议下载,比起某些教授抄书出版的内容,王爽先生的文章何止优秀百倍mov(1)数据送寄存器;(2)寄存器送寄存器;(3)内存单元送寄存器;注意:1.内存不能送内存2.内存不能送段寄存器;例:将al中的数据送入内存单...
分类:其他好文   时间:2014-12-26 21:41:19    阅读次数:128
设置和获取cookie
function setCookie(name,value){ document.cookie = name + "=" + encodeURI(value);}function getCookie(name){ var str = document.cookie; if(!str || str.i...
分类:其他好文   时间:2014-12-26 21:41:30    阅读次数:180
Centos服务器搭建(5)——安装ngnix
首先已经安装完JDK1.下载nginx-1.6.2.tar.gz2.安装前确保已经安装了g++、gcc、openssl-devel、pcre-devel和zlib-devel软件[root@iZ2873rjubzZ ~]# yum install gcc-c++ [root@iZ2873rjubzZ...
分类:其他好文   时间:2014-12-26 21:38:08    阅读次数:134
RPi Debian Auto Login
This guide will show you how to login to a Debian image and start LXDE by simply powering the Pi on.Method 1: Auto Login:In Terminal:sudo nano /etc/in...
分类:其他好文   时间:2014-12-26 21:38:48    阅读次数:218
使用Word2007发布cnblogs文章
使用word发布博客文章不仅编辑方便,图片可以自动上传,也方便修改和备份。 cnblogs的设置步骤: 左上角按钮->发布->博客 博客服务商选"其他" API选择MetaWebLog 博客文章URL在你博客的设置里面找。 在最下方 注册成功后就可以使用了~
分类:其他好文   时间:2014-12-26 21:37:23    阅读次数:148
Surrounded Regions
该题目主要考察了堆栈和深度优先搜索的知识点。在递归深度太深导致运行出错是,可以采用栈保存结果,减小递归的深度。详细代码如下:class Solution {public: stack> data; void solve(vector> &board) { if(board...
分类:其他好文   时间:2014-12-26 21:38:20    阅读次数:129
UICollectionView基础
UICollectionView基础初始化部分:UICollectionViewFlowLayout *flowLayout= [[UICollectionViewFlowLayout alloc]init];self.myCollectionView = [[UICollectionView al...
分类:其他好文   时间:2014-12-26 21:36:51    阅读次数:192
Gradle Goodness: Skip Building Project Dependencies
If we use Gradle in a multi-module project we can define project dependencies between modules. Gradle uses the information from the project dependenci...
分类:其他好文   时间:2014-12-26 21:36:13    阅读次数:106
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!