现在位置: 首页 > ssldsl521miao发表的所有文章
  • 11月
  • 12日
综合 ⁄ 共 5958字 评论关闭
转载自: http://terrylee.me/blog/post/2011/02/12/php-extension-part1.aspx 一. 摘要 PHP Extension是扩展PHP的主要手段,如数据库访问,序列化,或者远程过程调用,使用过PHP的人,其实都使用过PHP Extension,PHP里面很多的函数也是通过扩展实现的,而在PHP源码中包含了几十个扩展,PECL仓库中也提供了上百个扩展,所以只要使用 PHP开发,就不可避免的要开发PHP Extension。本文会用图文并茂的方式一步一步为大家介绍如何开发一个PHP Extension。 开发环境:Ubuntu 10.10,PHP 5.3.5,有一个可运行PHP的Web服务器(Nginx或A......
阅读全文
  • 02月
  • 25日
综合 ⁄ 共 695字 评论关闭
题目链接~~> 做题感悟:其实有些题看着不好搞,但是只要你狠下心,有那种不搞定它不罢休的精神,那什么题也不算题了,自己完全搞定和百度看题解完全不一样的感觉。 解题思路:开始我把所有和都存下来,每一个点都从前往后找最优值,很明显超时。           动态方程:dp[ i ] = max( dp[ i -1 ] ,dp[ i - 2 ] + t  ) ( t 是输入的第 i 个数)。 代码: #include<stdio.h> #include<iostream> #include<map> #include<string> #include<string.h> #include<stdlib.h> #include<math.h>......
阅读全文
  • 02月
  • 17日
综合 ⁄ 共 3322字 评论关闭
Polygon Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4975   Accepted: 2090 Description Polygon is a game for one player that starts on a polygon with N vertices, like the one in Figure 1, where N=4. Each vertex is labelled with an integer and each edge is labelled with either the symbol + (addition) or the symbol * (product). The edges are numbered from 1 to N. On the first move, one of the edges is removed. Subsequent moves involve the following steps: �pick a......
阅读全文
  • 11月
  • 01日
综合 ⁄ 共 727字 评论关闭
PreTranslateMessage PreTranslateMessage是消息在送给TranslateMessage函数之前被调用的,绝大多数本窗口的消息都要通过这里,比较常用,当你需要在MFC之前处理某些消息时,常常要在这里添加代码.  MFC消息控制流最具特色的地方是CWnd类的虚拟函数PreTranslateMessage(),通过重载这个函数,我们可以改变MFC的消息控制流程,甚至可以作一个全新的控制流出来。只有穿过消息队列的消息才受PreTranslateMessage()影响,采用SendMessage()或其他类似的方式向窗口直接发送的而不经过消息队列的消息根本不会理睬PreTranslateMessage......
阅读全文
  • 10月
  • 02日
数据库 ⁄ 共 856字 评论关闭
一、ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务。 cd $ORACLE_HOME cd network/admin 目录下listener.ora 文件配置不正确。 listener.ora应该配置如下: # listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.108)(PORT = 1521))     ) ......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 429字 评论关闭
1、查看当前使用的数据库(只有管理员有该数据字典) SQL> select name from v$database; 2、使用SPOOL命令可以把命令行的查询了结果输出到文件中 SQL> spool test.txt append 这里是查询语句 SQL> spool off 结果就出现在oracle安装路径的product\11.2.0\dbhome_1\BIN目录下 3、执行磁盘上的sql文件命令 SQL> @ d:/crebas.sql 4、使用ttitle和btitle设置页眉页脚 ttitle '页眉' btitle'页脚' select * from test; ttitle off btitle off 5、设置和清除列格式 column name format a10 clear columns 6、创......
阅读全文
  • 05月
  • 21日
综合 ⁄ 共 3934字 评论关闭
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="City"> <typeAlias alias="City" type="com.cgnw.sns.dbaccess.domain.City" /> <resultMap class="City" id="CityMap"> <result property="cityCd" column="city_cd" /> <result property="stateCd" column="state_cd" /> <result property="cityName" column="city_name" /> <result property="cityClass" column="city_class"......
阅读全文
  • 05月
  • 19日
综合 ⁄ 共 2535字 评论关闭
  用VC++ 进行Windows Shell 扩展编成               由ccc编译   序言:        看过一些对windows 外壳的扩展程序,在使用上一般都是直接利用windows的外壳API做一些工作,因为外壳操作需要一些比较专业的知识,因此,大部分编程人员特别是使用集成编程环境的程序人员对windows shell的扩展编程不很了解,也缺乏这方面的资料。        在做过一些程序之后,感觉到使用windows shell的扩展编程可以使程序与操作系统的结合更加紧密,就好像应用程序已经融入到操作系统之中一样。在使用windows shell扩张编程工具的过程中深切体会到......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 5728字 评论关闭
//头文件//main.h#define CM_FILE_SAVEAS    9072#define CM_FILE_EXIT    9071#define CM_FILE_OPEN    9070#define CM_ABOUT           9069//主程序文件//main.c/*****************************************************/#include <windows.h>#pragma hdrstop#include "Main.h" static char g_szClassName[] = "MyWindowClass";static HINSTANCE g_hInst = NULL; #define IDC_MAIN_TEXT   1001 BOOL LoadFile(HWND hEdit, LPSTR pszFileName){   HANDLE hFile;   BOOL bSuccess = FALSE;    hFile = CreateFile(pszFileNa......
阅读全文
  • 02月
  • 20日
综合 ⁄ 共 3524字 评论关闭
Paper: http://blog.csdn.net/lansatiankongxxc/article/details/23826557 Code: http://www.eecs.berkeley.edu/~yang/software/l1benchmark/ Fast l-1 Minimization Algorithms: Homotopy and Augmented Lagrangian Method -- Implementation from Fixed-Point MPUs to Many-Core CPUs/GPUsAllen Y. Yang, Arvind Ganesh, Zihan Zhou,  Andrew Wagner, Victor Shia, Shankar Sastry, and Yi Ma © Copyright Notice: It is important that you read and understand the copyright of the following software packages a......
阅读全文
  • 01月
  • 17日
综合 ⁄ 共 1269字 评论关闭
【问题描述】 一矩形阵列由数字0到9组成,数字1到9代表细胞,细胞的定义为沿细胞数字上下左右还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数。 【输入格式】 第一行为两整数m,n(m行,n列) 从第行开始是一个m*n的矩阵 【输出格式】 只有一行为矩阵中的细胞个数。 【输入样例】 4 10 0234500067 1034560500 2045600671 0000000089 【输出样例】 4 算法步骤: 1、从文件中读入m*n矩阵,将其转换为0、1矩阵存入a数组中; 2、沿a数组矩阵从上到下,从左到右,找到遇到的第一个细胞;将细胞的位置入队q,并沿其上、下、左、右四个......
阅读全文
  • 11月
  • 28日
综合 ⁄ 共 1496字 评论关闭
protected void onNewIntent (Intent intent) Since: API Level 1 This is called for activities that set launchMode to "singleTop" in their package, or if a client used theFLAG_ACTIVITY_SINGLE_TOP flag when calling startActivity(Intent). In either case, when the activity is re-launched while at the top of the activity stack instead of a new instance of the activity being started, onNewIntent() will be called on the existing instance with the Intent that was used to re-launch it. An activity ......
阅读全文