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

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 1996

编程技术

在Button任意位置加图片效果

通常情况会想到drawableLeft,drawableTop,drawableRight,drawableBotton,这样是可以做,但只能在四个位置。下面这种办法可以实现任意位置:importandroid.app.Activity;importandroid.graphics.drawable.Drawable;importandroid.os.Bundle;importandroid.text.Html;importandroid.text.Spa

系统 2019-08-29 22:18:06 1996

编程技术

设计模式 (四)创建者模式(Builder)

创建者模式主要是为了所谓的高聚合,解耦合,遇到多种配件于一身的情况的时候,放在实体类里面不合适,放在工厂类也不合适,所以就添加了一个创建者类,专门对相应的零件进行组装,如同汽车了N中配件,同时要是各种配件互相联系的话也在这个Builder里面一并做了。明天准备去爬山,这个原理图就再补上吧:今天把uml补上了,不过对于uml初学的我就乱乱的先随便画一个吧,等以后慢慢入门了在斟酌里面的错误和细节:下面是我自己攒出来的例子(回来的时候着急,把书忘教室了,不知道书

系统 2019-08-12 09:30:33 1996

编程技术

将CLOB转换成String

/***//***将CLOB转成String,静态方法*@paramclob字段*@return内容字串,如果出现错误,返回*/publicfinalstaticStringclob2String(CLOBclob)...{if(clob==)...{return;}StringBuffersb=newStringBuffer(65535);//64KReaderclobStream=;try...{clobStream=clob.getCharacter

系统 2019-08-12 09:30:01 1996

编程技术

总结一下维护了一年的一个软件系统的软件体系(

这个软件架构使用的mvc架构包括使用自身一套页面逻辑,标签类型比较简单,包括逻辑判断标签、页面赋值标签和循环list对象取值标签。在执行完页面请求返回的页面没有规定,可以是jsp,也可以是html页面,使用上一篇提到的Common对象跳转页面,方法为:common.showPage("page")方法,因为没有该框架的这部分源代码,只能大概推测,这个方法是读入页面,并将执行页面含有的逻辑标签和赋值,一个方法可以多次使用该方法,最后的执行结果是多个页面顺次显

系统 2019-08-12 09:29:58 1996

编程技术

magento左栏添加筛选Filtering options on Left

Tomakesidebarappearonadesiredcategoryandcontainadesiredattribute,youmustfollownext3simplesteps:1)Makethedesiredcategory“anchor”:Gototheadminpanel->Catalog->ManageCategories.Ontheleft,clickonthecategorythatyouwanttomakefilterable.O

系统 2019-08-12 09:29:48 1996

各行各业

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 1996

各行各业

map/reduce多个field组合排序

年初领导让做一个检索热词的干预,也就是将统计用户搜索热词的结果,人工的指定其在排行榜中的位置。当然这任务比较恶心,咱只是个出来混饭碗的民工,不出格的事儿也可以忍了说技术。工作流程是收集用户的搜索日志,统计每个keyword在一天之中被搜索的次数,根据每个keyword的统计历史,使用数学方差得出它近期热度的评分,然后降序排序给出结果列表。(如果做的更细致可以在计算前加入语义分析的部分,这样能更好的分析出刚刚流行的网络用语,我没有做那么深,这里暂时不表)现在

系统 2019-08-12 09:27:35 1996

各行各业

[UVA] 10167 - Birthday Cake

ProblemG.BirthdayCakeBackgroundLucyandLilyaretwins.Todayistheirbirthday.Motherbuysabirthdaycakeforthem.NowweputthecakeontoaDescartescoordinate.Itscenterisat(0,0),andthecake'slengthofradiusis100.Thereare2N(Nisainteger,1<=N<=50)cher

系统 2019-08-12 09:27:32 1996

各行各业

1056. Mice and Rice (25)

时间限制30ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueMiceandRiceisthenameofaprogrammingcontestinwhicheachprogrammermustwriteapieceofcodetocontrolthemovementsofamouseinagivenmap.Thegoalofeachmouseistoeatasmuchriceaspossibleinordert

系统 2019-08-12 09:27:30 1996