|
请问这是什么压缩算法?
Decode 是解码或者解压缩吧 |
|
|
|
[求助]如何实现WinHex的这个功能?
这是我写英雄无敌4修改器部分代码: HeroInfo.WinHand := FindWindow('Heroes4', 'Heroes 4'); If HeroInfo.WinHand = 0 Then Begin ShowMessage('没有找到游戏窗口!!'); Exit; End; HeroInfo.ThreadId := GetWindowThreadProcessId(HeroInfo.WinHand, @HeroInfo.pId); If HeroInfo.ThreadId = 0 Then Begin ShowMessage('没有找到游戏窗口!!'); Exit; End; //HeroInfo.hProcess := OpenProcess(PROCESS_ALL_ACCESS, true, HeroInfo.pId); HeroInfo.hProcess := OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_QUERY_INFORMATION, false, HeroInfo.pId); If HeroInfo.hProcess = 0 Then Begin ShowMessage('没有找到游戏窗口!!'); Exit; End; GetSystemInfo(SysInfo); PMemoAddr := SysInfo.lpMinimumApplicationAddress; MaxMemoAddr := DWORD(SysInfo.lpMaximumApplicationAddress); ProgressBar1.Visible := True; ProgressBar1.Min := 1; ProgressBar1.Max := Trunc((DWord(SysInfo.lpMaximumApplicationAddress) - DWord(SysInfo.lpMinimumApplicationAddress)) / $10000); Try While true Do Begin VirtualQueryEx(HeroInfo.hProcess, PMemoAddr, MBI, SizeOf(MBI)); nSize := MBI.RegionSize; If MBI.State = MEM_COMMIT Then Begin FreeMem(DataBuffer); GetMem(DataBuffer, nSize); ReadProcessMemory(HeroInfo.hProcess, PMemoAddr, DataBuffer, nSize, lpNumberOfBytesRead); j := Trunc(lpNumberOfBytesRead / 4); ResultFind := False; ProgressBar1.Position := Trunc((DWord(DWORD(PMemoAddr)) - DWord(SysInfo.lpMinimumApplicationAddress)) / $10000); Application.ProcessMessages; For i := 1 To j Do Begin // If (i Shr 10) Shl 10 = i Then // Begin // ProgressBar1.Position := Trunc((DWord(DWORD(PMemoAddr)) - DWord(SysInfo.lpMinimumApplicationAddress) + i * 4) / $10000); // Application.ProcessMessages; // End; If DataBuffer^[i] = SearchDate1 Then //检查经验值 If DataBuffer^[i + Trunc(AddInfo.Offset4 / 4)] = SearchDate2 Then //检查剩余魔法点 If DataBuffer^[i + Trunc(AddInfo.Offset5 / 4)] = SearchDate3 Then //检查英雄等级 Begin //检查辅助技能 CopyMemory(@Skill2Info, @DataBuffer^[i + Trunc(AddInfo.Offset2 / 4)], SizeOf(TSkill2Info)); For K := 1 To 36 Do If Skill2Info.Integer[k] > 4 Then Break; If K = 37 Then //循环正常结束,没有执行过Break Begin Inc(ResultCount); If ResultCount > 1 Then Break; EditExp.Text := IntToHex(DWORD(PMemoAddr) + i * 4, 8); End; End; End; End; If ResultCount > 1 Then Break; MemoAddr := DWORD(PMemoAddr) + nSize; If MemoAddr >= MaxMemoAddr Then Break; PMemoAddr := Pointer(MemoAddr); End; Except End; FreeMem(DataBuffer); CloseHandle(HeroInfo.hProcess); HeroInfo.hProcess := 0; If ResultCount = 0 Then Begin EditExp.Text := ''; ShowMessage('没有找到游戏数据,请检查查询条件!!'); End Else If ResultCount = 1 Then Begin Button1Click(Application); //ShowMessage('找到一个合适的结果!!') End Else ShowMessage('找到游戏数据太多,去玩一会再试!!'); |
|
[推荐]VB编写病毒的大体方法
任务管理器 ~~~~~~~~~~~~ 在任务管理器列表中禁止病毒本身被列出,可以通过编程来实现。 用代码 App.TaskVisible = false 就可以实现; 这最多是任务栏吧 |
|
一个简单的自杀代码
翻译成Delphi,没有成功,不过看原理就等同于写一个delme.bat的批处理。 Program Project1; Uses windows, shlobj, shellapi; Function SelfDelete: Boolean; Var sei: PShellExecuteInfo; szModule, szComspec, szParams: Array[0..MAX_PATH] Of char; // get file path names: Begin If ((GetModuleFileName(0, szModule, MAX_PATH) <> 0) And (GetShortPathName(szModule, szModule, MAX_PATH) <> 0) And (GetEnvironmentVariable('COMSPEC', szComspec, MAX_PATH) <> 0)) Then Begin // set command shell parameters lstrcpy(szParams, ' / c del'); lstrcat(szParams, szModule); lstrcat(szParams, ' > nul'); // set struct members New(sei); sei^.cbSize := SizeOf(TShellExecuteInfoA); sei^.Wnd := 0; sei^.lpVerb := 'Open'; sei^.lpFile := szComspec; sei^.lpParameters := szParams; sei^.lpDirectory := 0; sei^.nShow := SW_HIDE; sei^.fMask := SEE_MASK_NOCLOSEPROCESS; // increase resource allocation to program SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS); SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); // invoke command shell If (ShellExecuteEx(sei)) Then Begin // suppress command shell process until program exits SetPriorityClass(sei^.hProcess, IDLE_PRIORITY_CLASS); SetProcessPriorityBoost(sei^.hProcess, True); // notify explorer shell of deletion SHChangeNotify(SHCNE_DELETE, SHCNF_PATH, @szModule, 0); Result := True; End End Else // if error, normalize allocation Begin SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL); Result := False; End; End; Begin SelfDelete End. |
|
定期替换文件[Delhpi源代码]
timer+copyfile |
|
|
|
怎么改也编译通不过?
奇怪 if Char(Value[i]) = Char('1') then if Value[i] = Char('1') then if Value[i] = '1' then 这三种方法我都编译过去(D9),是不是你的Delphi设置问题 |
|
[转帖+请教]一道题
今天上班啥都没干 就研究这个问题,除了穷举(也不简单)没想到其他办法。 |
|
|
|
|
|
逻辑推理中猜数问题的研究
逻辑推理中猜数问题的研究 上海复旦大学附属中学 张宁 【目的和思路】 研究典型的“思维嵌套”问题――猜数问题,从问题的本质入手分析,避免了表面上的“思维嵌套”,使得解决问题的效率大幅度上升。 【制作过程】 首先对问题的原形产生了浓厚的兴趣,经过一系列深入的思考,将描述性的解决过程表达为严格的数学证明,同时也发现了问题可以继续推广,结合计算机来辅助研究,将问题两次推广,并最终较为圆满地解决了问题。 【科学性】 采用了严格的数学方法,经过详细的讨论得出了一系列结论。 【先进性】 采用初等数学的手段来研究一个规模化的逻辑推理问题,采用的证明方法也具有相当的创造性。 【实用性】 这类问题在数理逻辑和计算机科学中有较大的意义,这种解决逻辑推理问题的新思路,将会对这一类问题的解决产生影响。 【创新点】 摒弃了考虑逻辑推理问题的常规思路,从“思维嵌套”问题的本质入手分析,并证明了数个重要结论,并且在证明过程中,采用了多元数组及分组等概念来描述推理过程中的情形,并采用记号将抽象的推理过程用数学加以证明,在理论上有一个飞跃。 在逻辑推理中有一类比较特殊的问题――“思维嵌套”问题,即在C的脑海中要考虑B是如何思考A的想法。这种问题通常非常抽象,考虑情况又十分繁多,思想过程极其复杂,用一般方法分析效果极差。 一、问题原形 一位逻辑学教授有三名善于推理且精于心算的学生A,B和C。有一天教授给他们三人出了一道题:教授在每个人的脑门上贴了一张纸条并告诉他们,每个人的纸条都写了一个大于0的整数,且某两个数的和等于第三个。于是,每个学生都能看见贴在另外两个同学头上的整数,但却看不见自己的数。 教授轮流向A,B和C发问:是否能够猜出自己头上的数。经过若干次的提问之后,当教授再次询问某人时,他突然露出了得意的笑容,把贴在自己头上的那个数准确无误地报了出来。 我们的问题就是:证明是否有人能够猜出自己头上的数,若有人能够猜出,则计算最早在第几次提问时有人先猜出头上的数。 我们先分析一个简单的例子,观察每个人是如何进行推理的。 假设A,B和C三人,头上的数分别是l,2和3。 l. 先问A 这时,A能看见B,C两人头上的数分别是2,3。A会发现自己头上只可能为3+2=5,或者3-2=1。可到底是l还是5,A无法判断,所以只能回答“不能”。 2.再问B B会发现自己头上只可能为3+1=4,或者3-1=2。可到底是2还是4,B只能从A的回答中入手分析:(以下为B脑中的分析) 如果自己头上是2。则A能看见B,C两人头上的数分别是2,3,A会发现自己头上只可能为3+2=5,或者3- 2=1。到底是l还是5,A无法判断,只能回答“不能”。这与A实际的回答相同,并不矛盾,所以B无法排除这种情况。 如果自己头上是4。则A能看见B,C两人头上的数分别是4,3,A会发现自己头上只可能为4+3=7,或者4-3=1。到底是l还是7,A无法判断,只能回答“不能”。这也与A实际的回答相同,并不矛盾,所以B也无法排除这种情况。 B无法判断,只能回答“不能”。 3.再问C C会发现自己头上只可能为2+1=3,或者2-1=l。可到底是l还是3.C只能从A或B的回答中入手分析:(以下为C脑中的分析) 如果自己头上是1。 A会发现自己头上只可能为2+l=3,或者2-1=1。可到底是l还是3,是无法判断的,只能回答“不能”。这与A实际的回答相同,并不矛盾。 B会发现自己头上只可能为1+1=2(因为B头上是大于0的整数,所以B头上不能是1-l=0)。B应回答“能”。但这与B实际的回答矛盾。C能以此排除头上是1这种情况。 继续分析C头上是3这种情况,会发现毫无矛盾(与实际情况相符)。 C将准确判断头上的数是3,所以回答“能”。所以在第三次提问时有人猜出头上的数。 我们从每个人的角度出发,分析了头上数是l,2和3的情况。这种方法也是我们解决简单的逻辑推理问题所采用的普遍做法。但如果将问题的规模变大,会发现问题的复杂程度会急剧上升,几乎是多一次推理,问题的复杂度就要变大一倍。 靠如此烦琐的推理是不能很好解决问题的。原因在于有大量的“思维嵌套”。即:在C的脑海中要考虑B是如何思考A的想法。此外,这种方法不能够推导出有普遍意义的结论。让我们换一种思路来解决问题。 下面我们用第一位、第二位、第三位学生分别表示A,B,C三人。 经推论,无论三个数如何变化,无论从谁开始提问,必然是头上数最大的人最先猜出自己头上的数。 由上述结论,对于,(a1,a2,a3,k)可以定义f(a1,a2,a3,k)的递推式: 当k=1时 当a2=a3时,f(a1,a2,a3,1)=1 当a2>a3时,f(a1,a2,a3,1)=f(a2-a3,a2,a3,2)+2 当a2<a3时,f(a1,a2,a3,1)=f(a3-a2,a2,a3,3)+1 当k=2时 当a1=a3时,f(a1,a2,a3,2)=2 当a2>a3时,f(a1,a2,a3,2)=f(a1,a1-a3,a3,1)+1 当a2<a3时,f(a1,a2,a3,2)=f(a1,a3-a1,a3,3)+2 当k=3时 当a1=a2时,f(a1,a2,a3,3)=3 当a1>a2时,f(al,a2,a3,3)=f(a1,a2,a1-a2,1)+2 当al<a2时,f(a1,a2,a3,3)=f(a1,a2,a2-a1,2)+1 由于我们只考虑(a1,a2,a3,k)∈= S3,因此k可由a1,a2,a3三个数直接确定,因此f(a1,a2,a3,k)可以简化为f(a1,a2,a3)。 利用上面的公式,通过计算机编程来辅助解决问题。 由于建立了线性的递推关系,因此避免了问题规模随着提问次数呈指数型增长,有效地解决了问题,其解决方法是建立在对问题的深入分析之上的。现在让我们总结解决问题中思路的主线: 提炼重要的前提条件→考虑何种情形为“终结情形” →对非“终结情形"建立推理的等价关系→考虑何种情形能归结到“终结情形”→分情况讨论并加以证明→得出结论并改写等价关系→得出公式。 整个过程是从分析问题的本质入手,而非一味单纯地从每个人思想出发,并推导出普遍意义的结论。从全局的角度分析问题,避免了最烦琐的“思维嵌套",并且使得问题规模从指数型转变为线性。 二、第一种推广 一位逻辑学教授有n(n≥3)名非常善于推理且精于心算的学生。有一天,教授给他们出了一道题:教授在每个人脑门上贴了一张纸条并告诉他们,每个人的纸条上都写了一个大于0的整数,且某个数等于其余n-1个数的和。于是,每个学生都能看见贴在另外n-1个同学头上的整数,但却看不见自己的数。 教授轮流向学生发问:是否能够猜出自己头上的数。经过若干次的提问之后,当教授再次询问某人时,此人突然露出了得意的笑容,把贴在自己头上的那个数准确无误地报了出来。 我们的问题就是:证明是否有人能够猜出自己头上的数,若有人能够猜出,则计算最早在第几次提问时有人先猜出头上的数,分析整个推理的过程,并总结出结论。 经推论,无论n个数如何变化,无论从谁开始提问,必然是头上数最大的人最先猜出自己头上的数。 由上述结论,对于(a1,a2…,an,k),可以定义f((a1,a2…,an,k)的递推式: 当2W-M≤0时,f((a1,a2…,an,k)=k, 当2W-M>O时 设ai’=ai,其中,i≠k,ak’=2W-M 当v<k时,f(a1,a2…,an,k)=f(a1’,a2’…,an’,v)+k-v 当v>k时,f(a1,a2…,an,k)=f(a1’,a2’…,an’,v)+n-k+v 由于我们只考虑(a1,a2…,an,k)∈=S3,因此k可由n个数直接确定,因此f(a1,a2…,an,k)可以简化为f(a1,a2…,an)。 利用上面的公式,通过计算机编程来辅助解决问题。 至此,第一种推广情形就解决了。可以发现n=3时情形的证明,对解决一般情形提供了很好的对比,使得我们能够较为轻松地解决问题,这其实也是建立在对n=3时的情形的分析之上的。 三、第二种推广 一位逻辑学教授有n(n≥3)名非常善于推理且精于心算的学生。有一天,教授给他们出了一道题:教授在每个人脑门上贴了一张纸条并告诉他们,每个人的纸条上都写了一个大于0的整数,并将他们分成了两组(一组学生有m人,(m≥n/2),且学生并不知道如何分组),且两组学生头上数的和相等。于是,每个学生都能看见贴在另外n一1个同学头上的整数,但却看不见自己的数。 教授轮流向学生发问:是否能够猜出自己头上的数。经过若干次的提问之后,当教授再次询问某人时,此人突然露出了得意的笑容,把贴在自己头上的那个数准确无误地报了出来。 我们的问题就是:证明是否有人能够猜出自己头上的数,若有人能够猜出,则计算最早在第几次提问时有人先猜出头上的数。 由于当n=3时,m只可能为2,即为问题原形,而对于m=n-1,即第一种推广情形。因此只讨论n>3,m<n-1时的情形。 对于每个人判断自己头上的数,依据分组情况不同,头上的数就可能不同。 对(A1,A2,…,An,k),第k位学生可以看见除自己外所有学生头上的数,并假设在某种分组情况下,可以计算出与自己不同组的学生头上数的和,由题目条件“两组学生头上数的和相等”,可以计算出自己头上的数。由于有Cmn种分组情况,因此相对应头上的数有Cmn种(其中可能也包括了一部分重复的数及非正整数)。 经推论,不存在情况使得没有人能够猜出头上的可能,且推理时四个数始终在减小,因此经过有限次推理之后,必然达到“终结情形”。 而对于第一种推广情形,即n=4,m=3,必然有人能猜出自己头上的数。因此n=4时的一切情况,必然有人能猜出自己头上的数。 由于现在的推理在加强判定的情况下,依然可能出现多种考虑情况。所以推理已不是线性的推理,整个推理过程将成为树状结构。 由于分组情况繁多,而且判定方式也比较复杂,因此这时计算f(A1,A2,…,An,k)的值已经非人力能够解决,但是可以利用上述证明的结论,依靠计算机强大的计算功能辅助解决问题。 |
|
看来大家都喜欢智力题啊,我出个稍微难一点的吧
M先生说:我不知道a和b的值 S先生说:我也不知道,而且一开始我就知道你不知道 我感觉这个问题有问题 a*b=M a+b=S S先生不肯能知道M先生不知道这a,b两数,S完全可以表达成两个素数相加 |
|
怎么通过流传数据?
TmemoryStream 在Create后好像要先设置Buffer大小 |
|
在window2k&XP下屏蔽Ctrl+Alt+del VC版本
严重怀疑用的是Hook |
|
有这样的IP嗅探工具没有?
通过HUB还可以,交换机都不行,如果不是同在一个局域网,就更别指望了 |
|
见意开个灌水区
支持这个想法 |
|
test
teat again |
|
[讨论]一道小学奥赛题
这是我找到的一个答案: 17是由8A*2得到,8A可由4B*2得到,4B可由2C*2得到,2C可由1D*2得到,要想最少按一次黄键,ABCD分别取8421。 11是由5E*2得到,5E可由2F*2得到,2F可由1G*2得到,要想最少按一次黄键,EFG分别取684。 14是由7H*2得到,7H可由3I*2得到,3I可由1J*2得到,要想最少按一次黄键,HJI分别取268。 18是由9K*2得到,9K可由4L*2得到,4L可由2M*2得到,2M可由1N*2得到,要想最少按一次黄键,KLMN分别取6842。 12是由6O*2得到,6O可由3P*2得到,3P可由1Q*2得到,要想最少按一次黄键,OPQ分别取426。 而16直接由8*2得到。 综上所述,最少需要按5次黄键可得到17。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值