Tumgik
jiangsheng · 1 year
Text
Querying Wikipedia data using SPARQL
Recently I have been working on a trainer for a football manager game.  The game has a player database, when a player retires, another with the same last name would respawn in some other club. When you play the game for many seasons, the player database becomes gradually out of date. Fan patches are created but due to the amount of work involved (check the team roster for every minor team in…
View On WordPress
0 notes
jiangsheng · 1 year
Text
Today’s phishing email (Subject Re: Contract Lease Agreement)
The email body is as the following <your email id>  has recieved a file to your onedrive “2023 Contract Agreement .xlsx“ When and where did this happen Date:4/13/2023 4:50:56 p.m. Browser: Chrome Operating System: Windows 10 You are receiving this information because someone shared a file to your OneDrive.See details in the attached file. I have marked red flags with red background. 1 Microsoft…
View On WordPress
0 notes
jiangsheng · 1 year
Text
Extend a webbrowser control using ICustomQueryInterface
Begin ChatGPT generated response To extend a WebBrowser control using ICustomQueryInterface, you can create a new class that implements the ICustomQueryInterface interface and then use the SetSite method of the WebBrowser control to set the new class as the site for the control. Here are the steps you can follow: Create a new class that implements the ICustomQueryInterface interface. The…
View On WordPress
0 notes
jiangsheng · 2 years
Text
Bypassing Factory Reset Production on Microsoft Lumia 640
Bypassing Factory Reset Production on Microsoft Lumia 640
The problem: Recently I had to factory reset my Lumia 640 with Windows 10 Build 14393. However the factory reset protection cannot be turned off in settings. I proceeded with a factory reset, then I am greeted with the reset protection notification screen (no surprise) As the back end service for Windows Mobile has ended, I cannot turn off the protection by logging into my Microsoft Account…
Tumblr media
View On WordPress
2 notes · View notes
jiangsheng · 3 years
Text
New web serer hijacker HttpResetModule.dll
Today a friend’s server was hacked. The web site displays normally if visited directly. The content is highjacked when visit from a Baidu Search result, similar to what user 41nbow experienced at https://www.freebuf.com/articles/web/222060.html. A file system wide search for recent changed files shows that %windir%\system32\inetsrv\config\applicationHost.config file was recently updated. New…
View On WordPress
0 notes
jiangsheng · 3 years
Text
Better Late Than Never
Better Late Than Never
This post originally appeared on Joycode on Sept 17 2004. 在文件选择对话框和浏览器中都可以显示文件夹视图,但是有时需要对显示的方式进行控制,例如在文件选择对话框初始化时设置显示方式为详细资料视图或者缩略图视图,有的时候需要用程序来选择一些项目,例如在文件选择对话框中添加全选按钮,或者打开文件所在文件夹并且选中指定文件。 我在大约一年之前的一个Post(http://blog.joycode.com/jiangsheng/archive/2003/11/09/6152.aspx)中提及到这个问题,搞定了之后一直忘记公布答案了,今天在CSDN社区看到别人问的类似问题才想起自己已经解决了,所以现在拿出来分享…… 关于如何设置文件夹视图的显示方式的问题,Paul…
View On WordPress
0 notes
jiangsheng · 3 years
Text
Converting generic OopFactory.X12 structures to typed counterparts
Converting generic OopFactory.X12 structures to typed counterparts
OopFactory.X12 can parse EDI messages into segments and loops. However despite typed segments and loops exist, the parser does not generate them in the object model.  The unit test only use them when generating EDI messages. The typed segments and loops are aggregative objects that do not contain their own data members besides the contained untyped objects. Which means if I replace the contained…
View On WordPress
0 notes
jiangsheng · 3 years
Text
How To Determine When a Page Is Done Printing in WebBrowser Control
How To Determine When a Page Is Done Printing in WebBrowser Control
Note this post is originally written in 2012. It was lost when moving my web site from Windows Live Space to WordPress. I found a dead link to my web site on Stackoverflow and found an archive from archive.org. So here it is the old article, with dead link updated of course. The printing from a WebBrowser control can be customized by using custom headers and footers (…
View On WordPress
0 notes
jiangsheng · 3 years
Text
Troubleshooting a memory leak
Troubleshooting a memory leak
Got called into a memory leak troubleshooting. The application was leaking memory at 1mb per second. In memory profiler, most of the growing memory are used by byte[] and RuntimeMethodHandle (growing at around a million per minute). Initially I thought it is a disposing problem, but the memory occupied by disposable objects does not increase over time. Looking at the RuntimeMethodHandle…
View On WordPress
0 notes
jiangsheng · 3 years
Text
Icepocalypse 2021 冰狱 2021
Icepocalypse 2021 冰狱 2021
this is my dairy about the winter storm occurred in Feb 2021. 这是我2021年二月冬季风暴的日记 Feb 13 Sat. 27-30F. Stockpile food (glad I did it). Heard ice building on roads, so instead I shopped on foot. Almost fell because of invisible ice. Feb 14 Sun. 12-30F Stay home. Freeze warning, keep water dropping. Listened to police radio for a while and heard nothing but crashes. Person is bleeding on Colorado…
Tumblr media
View On WordPress
1 note · View note
jiangsheng · 3 years
Text
微软拼音卡顿的问题
微软拼音最近每次激活的时候都要卡上个几分钟。而且不是一个程序只卡一次,中英文切换之后还会继续卡。 用了Process Monitor跟踪了一下,发现每次切换中英文的时候,微软拼音都会在%appdata%\Microsoft\InputMethod\Chs下面创建一个名字为UDPXXXX(这里XXXX是16进制数字).tmp的文件,我这个目录下有六万五千多个这样的文件。从命名风格来看,很明显是在调用GetTempFileName,而这个函数有65535个文件的限制,第65536次调用会失败,应该是微软拼音没有处理好调用这个函数失败的情况,就卡住了。 目前的绕过这个问题的方法是把 del %appdata%\Microsoft\InputMethod\Chs\*.tmp…
View On WordPress
0 notes
jiangsheng · 4 years
Text
Today's fake email of the day
Today’s fake email of the day
Today’s fake email of the day
Hi Dear,
How are you doing hope you are fine and OK?
I was just going through the Internet search when I found your email address
…….
So you care about an article titled “ Trap CtrlAltDel; Hide Application in Task List on Win2000/XP” in 2020 and downloaded its source code, but still don’t know my name?
Also when I read the message header (it is…
View On WordPress
0 notes
jiangsheng · 4 years
Text
Finding the right ruby version
Finding the right ruby version
I am installing eHMP on Centos 7. Centos 7 has ruby 2.0 out of box, thus the install
chef-client -o workstation –config ~/Projects/vistacore/.chef/knife.rb
fails with
rb-notify version 0.10.0 needs Ruby 2.2.2 or newer
Following the instructions at https://noobient.com/2019/02/12/installing-rvm-and-ruby-on-centos-7/ I got ruby 2.7 installed. However
sudo chef-client -o workstation –config…
View On WordPress
0 notes
jiangsheng · 5 years
Text
Fix sphinxcontrib-googleanalytics on Sphinx 1.8
Fix sphinxcontrib-googleanalytics on Sphinx 1.8
The Google Analytics extension from
python -m pip install  sphinxcontrib-googleanalytics
does not work on Sphinx 1.8. When I run it, I get the following error
Could not import extension sphinxcontrib.googleanalytics (exception: cannot import name ‘ExtensionError’ from ‘sphinx.application’ (c:\python37\lib\site-packages\sphinx\application.py))
Fix is to change…
View On WordPress
0 notes
jiangsheng · 6 years
Text
Blinking wifi icon and black screen on Surface 2
Blinking wifi icon and black screen on Surface 2
This is the second time I run into this problem after a Windows Update. First time was halfway through last year’s Microsoft MVP Summit and I had to Remote Desktop to my home machine with a spare android tablet and Bluetooth keyboard/mouse to get access to Visual Studio.  Good that the summit wifi was amazing but a Surface 2 with touch cover was way easier to carry around than the combination of…
View On WordPress
0 notes
jiangsheng · 6 years
Text
如何在64位win10的VS2017环境下搭建汇编环境
用户AcmeContracted安装masm32失败,所以想知道是否能集成masm64到Visual Studio 2017中。
VS里面masm不是单独的,是C++工具集的一部分,而在VS2017里C++工具集不是默认安装的,所以要先安装C++工具集。
安装完之后创建个C++的Win32命令项目,然后在解决方案浏览器里选中项目节点,右键,选择Build Dependencies->Build Customisations,在弹出的对话框里选中masm,然后选择OK。这会使得你的项目里的新asm文件使用ml或者ml64编译(具体使用哪个取决于你的项目当前编译配置是32位还是64位)。
另外VS里面新建文件的选择里没有asm文件的模板,随便选个纯文本格式(.h,cpp,.txt,.html都行)的来替代,建完了把扩展名改成asm,然后在解决方案浏览器里右键点文件打开文件属性对话框,把项目类…
View On WordPress
0 notes
jiangsheng · 6 years
Text
Can we run 32 bit and 64 bit code in the same process?
Can we run 32 bit and 64 bit code in the same process?
User redstone001 wants to know if it is possible to run 32 bit and 64 bit code in the same process – maybe in a different thread?
As Betteridge’s law of headlines say, any news ending with a question mark can be answered with the word no. But this isn’t news, so … the answer is … yeah? Kind of.
The way that Windows implements a 32 bit emulator(e.g. making  Program Files (x86) appear as Program…
View On WordPress
0 notes