现在位置: 首页 > SheapeOppogue发表的所有文章
  • 08月
  • 19日
综合 ⁄ 共 921字 评论关闭
题目链接:hdu 5106 Bits Problem 题目大意:给定n和r,要求算出[0,r)之间所有n-onebit数的和。 解题思路:数位dp,一个ct表示个数,dp表示和,然后就剩下普通的数位dp了。不过貌似正解是o(n)的算法,但是n才 1000,用o(n^2)的复杂度也是够的。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; const int mod = 1000000007; const int maxn = 1005; int n; char s[maxn]; ll bit[maxn], dp[maxn][maxn], ct[maxn][maxn]; int solve () { me......
阅读全文
  • 08月
  • 07日
综合 ⁄ 共 1607字 评论关闭
为什么编译和运行时都不能检测到这个问题呢. 为什么一个空指针还能够调用对象的成员函数呢? 我们要看看汇编代码. MyClass::Foo() 其实是一个全局函数, 在符号表中的名字是 "_ZN7MyClass2FooEv". 所以调用时并不需要通过对象指针. 不过在调用这个函数时,会传递对象指针进去. 函数的定义: .globl _ZN7MyClass3FooEv .type _ZN7MyClass3FooEv, @function _ZN7MyClass3FooEv: .LFB1442: pushl %ebp .LCFI4: movl %esp, %ebp .LCFI5: subl $8, %esp .LCFI6: subl $8, %esp ......
阅读全文
  • 08月
  • 06日
综合 ⁄ 共 9379字 评论关闭
转自:http://blog.codingmylife.com/?p=119   设置:工具>导入和导出设置>导入选定的环境>.......   <UserSettings> <ApplicationIdentity version="9.0"/> <ToolsOptions> <ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> </ToolsOptions> <Category name="Database Tools" RegisteredName="Database Tools"> <Category name="T-SQL Editor" RegisteredName="T-SQL Editor"/> </Category> <Category name="Environme......
阅读全文
  • 03月
  • 28日
编程语言 ⁄ 共 19667字 评论关闭
Translate Into English Coffee & Tea   网站首页 千一产品 技术文档 热点专题 电子书籍 实用工具 网站推荐 更多... 文章信息 作者:vkvi 来源:千一网络 时间:2007-11-19 站内推荐 ASP.NET 动态数据教程 ASP.NET 中的 AJAX ASP......
阅读全文
  • 03月
  • 14日
综合 ⁄ 共 1580字 评论关闭
// Render Multiple URLs to file var RenderUrlsToFile, arrayOfUrls, system; system = require("system"); /* Render given urls @param array of URLs to render @param callbackPerUrl Function called after finishing each URL, including the last URL @param callbackFinal Function called after finishing everything */ RenderUrlsToFile = function(urls, callbackPerUrl, callbackFinal) { var getFilename, next, page, retrieve, urlIndex, webpage; urlIndex = 0; webpage = require("webpage")......
阅读全文
  • 09月
  • 23日
算法 ⁄ 共 1561字 评论关闭
题目链接:   poj 1330 题目大意:   给出你一棵树,最后一行询问顶点a和顶点b的最近公共祖先 解题思路:   Tarjan离线查找最近公共祖先:                  搜到新的顶点,此顶点的临时祖先就是上一层的顶点                  直到搜到叶子就开始回溯,回溯的时候                  从这点出发搜过的顶点的临时祖先合并为这个顶点的上一层顶点 代码: //Final LCA离线算法求最近公共祖先 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <algorithm> #include <vector> #defi......
阅读全文
  • 05月
  • 15日
综合 ⁄ 共 1474字 评论关闭
一、基本概念: “忽如一夜春风来,千树万树梨花开”,近来RSS的概念已然流行开来,那么,什么才是RSS呢?怎样才能实现RSS的功能呢?以下是手艺人对RSS的理解。 RSS的概念: 以下是某知名网站对RSS的标准描述:RSS是站点用来和其他站点之间共享内容的一种简易方式(也叫聚合内容),通常被用于新闻和其他按顺序排列的网站,例如Blog。一段项目的介绍可能包含新闻的全部介绍等。或者仅仅是额外的内容或者简短的介绍。这些项目的链接通常都能链接到全部的内容。网络用户可以在客户端借助于支持RSS的新闻聚合工具软件,在不打开网站内容......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 1295字 评论关闭
偶然在网上搜索了一下这个程序,发现还不是很好找到容易看的答案,自己写了一个贴上了,已测试。     #include <stdio.h> typedef struct node_s{ int data; struct node_s *next; }node_t; node_t * list_create(int array[],int n) { node_t * head = NULL; node_t * p = NULL; node_t *pre; int i; printf("%s %d n=%d/n",__FUNCTION__,__LINE__,n); if(n==0) return NULL; head = (node_t *)malloc(sizeof(node_t)); head->data = array[0]; head->next = NULL; pre = head; for(i=1;i<n;i++) ......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 8620字 评论关闭
CentOS7下安装MySQL5.6.22(当前最新版本:2015-01-17) 转载请注明出处:jiq•钦's technical Blog 一  安装环境 (1)CentOS版本:CentOS-7 查看方法: [root@bogon 桌面]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) 来源:官网下载 下载地址:http://www.centos.org/ (2)MySQL版本:MySQL-5.6.22 来源:官网下载 下载地址:https://edelivery.oracle.com/EPD/Search/handle_go 或者http://pan.baidu.com/s/1dDu6n9R 名称:MySQL Database 5.6.22 RPM for Oracle Linux / RHEL 7 x86 (64bit) 二  安装方式选......
阅读全文
  • 04月
  • 05日
综合 ⁄ 共 449字 评论关闭
火狐浏览器默认情况下是不带flash_player的,因此有flash的网页打开就会提示安装flash_player插件,这里给大家说明一下如何安装install_flash_player_10_linux.tar.gz 这个格式的flash_player。 先根据火狐的提示,去ADOBE的网站下载install_flash_player_10_linux.tar.gz 进去install_flash_player_10_linux.tar.gz所在的目录,下面开始解压和安装。 tar -zxvf install_flash_player_10_linux.tar.gz libflashplayer.so cp libflashplayer.so /usr/lib/mozilla/plugins    \*此目录可能根据火狐不同的版本有所不同,大家可以先去l......
阅读全文
  • 03月
  • 16日
综合 ⁄ 共 4348字 评论关闭
1.textsearch.h /* Super fast linear text search algorithms: searchi = search ignore case search = search case sensitive searchiw = search ignore case words only (e.g. words delimited by whitespace only, not words within words) searchw() = search case sensitive words only All functions return the number of matches for keyword in buffer, or -1 on error. by James Buchanan No license ristrictions on this code. Email: jamesb@northnet.com.au */ #ifndef __TEXTSEARCH_H #define __TEXT......
阅读全文
         在您的日常工作中,三维场景是否已经跳跃入眼?         三维GIS 是否已经出现在您的生活中?         其应用是否已经开始渗入您的工作中?         其直观逼真的表达和展现形式是不是让您觉得周围越来越多人开始关注三维GIS?         但是,您是否清楚,三维数据的制作与生产却会花费较大的人力、财力和时间投入。如何基于二维GIS 数据实现三维快速建模与设计成为一个迫切需要解决的问题。所以,“创造鲜活的三维数字城市”,将是您创建属于自己的三维GIS 的开始。         那Esri 可以告诉您:“CityEngine 是三维城市建......
阅读全文