搜索到与相关的文章
编程技术

Stack and heap allocation in C

#include#include/**strisaliteral.Soitisallocatedinreadonlysegment.ItisOKtoreturn*it.Butthedatapointedbythepointercan'tbemodified.*/char*static_pointer_return(){char*str="world";returnstr;}/**Nevertoreturnapointe

系统 2019-08-29 22:19:35 2037

编程技术

设计模式之--命令模式

命令模式的意图一是将一个请求封装为一个对象,从而使你可用不同的请求对客户进行参数化;二是对请求排队或记录请求日志,以及支持可撤消的操作。简略图如下:命令模式通过对命令的封装,将命令的请求(调用者Invoker)和执行(接收者Receiver)进行了责任分离,委派给不同的对象,不仅使得调用者和执行者之间实现了解耦(命令的请求方就不需要知道接收方的接口,也不需要知道命令是如何执行的具体情况),还使得可以记录命令的执行记录,添加执行日志,使得命令的控制、执行、取

系统 2019-08-29 22:14:04 2037

编程技术

Cas(07)——建立使用Cas进行单点登录的应用

建立使用Cas进行单点登录的应用目录1.1加入cas-client-core-xxx.jar到classpath1.2配置Filter1.2.1AuthenticationFilter1.2.2TicketValidationFilter1.2.3HttpServletRequestWrapperFilter1.2.4AssertionThreadLocalFilter1.2.5基于Spring的Filter配置1.3添加证书到信任库根据之前的描述我们知道

系统 2019-08-29 22:12:02 2037

各行各业

Timue 1795

#include#include#include#includeusingnamespacestd;structhusband_st{stringbuy_name;intbuy_amount;}*husband_t;husband_stmem[1001];intmain(){intM,N,amount,count=0,remain,temp_remain,first_guy,second_guy;

系统 2019-08-12 09:27:41 2037

各行各业

2007-3-2 19:00:00 一段设置8253芯片的程序

在linux内核中有这样的一段程序,查了资料才看懂的,赶快就记下来了:使用的是GNUas汇编语言:(这个汇编真的很烦人)movb$0x36,%al;movl$0x43,$edx;outb%al,%dx;movb$latch,%eax;movl$0x40,$edx;outb%al,%dx;movb%al,%ah;outb%al,%dx;上面的一段程序的前三句是选择计数器0工作于方式3,二进制计数方式;(0x43是端口地址,0x36转换成二进制是0011011

系统 2019-08-12 09:27:15 2037

各行各业

UESTC 1237 质因子分解

水题一枚。。#include#include#include#include#include#includeusingnamespacestd;intisprime(intb,intn){inti;for(i=b;i<=sqrt(n);i++){if(n%i==0)returni;}return1;}intres[10005];intmain(){in

系统 2019-08-12 09:26:56 2037

各行各业

[Selenium]Turn Page By Scroll Bar

Description:Needtoturnpagebyoperatingscrollbarandfindouttheelementinthecurrentpage.PreviouspagewillnotexistinDOMstructurewhenturningpage.Solution:Getthetotalheight,buttonheight,scrollbarheightCalculatetotalmoveheight,totalMoveHeig

系统 2019-08-12 09:26:48 2037

各行各业

编译Zabbix

顺便了解了Apache、PHP,收获还是很多的:http://os.51cto.com/art/201103/251698.htm这篇文章太关键了,手把手教我们安装,但是要配合这个:http://blog.chinaunix.net/uid-26922865-id-3305978.html来安装PHP安装Apache要用这个:http://blog.csdn.net/yaday/article/details/7535818安装PHP用这个:http://

系统 2019-08-12 09:26:40 2037

编程技术

hdu1195 Open the Lock (DFS)

ProblemDescriptionNowanemergenttaskforyouistoopenapasswordlock.Thepasswordisconsistedoffourdigits.Eachdigitisnumberedfrom1to9.Eachtime,youcanaddorminus1toanydigit.Whenadd1to'9',thedigitwillchangetobe'1'andwhenminus1to'1',thedigitw

系统 2019-08-12 01:32:16 2037