windows-7

Prevent EXE being copied to another PC - keep some info inside EXE file (e.g. some flag)

牧云@^-^@ 提交于 2019-12-13 05:48:17
问题 I want to prevent executable being copied to another PC and thus i need to somehow save information inside my EXE file about that it was already used somewhere else on another PC. Can i embed small piece of information like user's hard drive number into my EXE file so this information would be available when this EXE is copied to another PC? I thought maybe there is a way to read and write to some resource file embedded in an EXE file but i presume that resource file is read only and if so is

Windows 7 Taskbar Progress Bar in Java

南笙酒味 提交于 2019-12-13 05:18:01
问题 I'd like to know if it is possible to make a progress bar displayed on the taskbar like Windows Explorer does when there's a file operation going on? I saw many examples, but they all involved C#. SWT won't cut it. 回答1: this is now possible using SWT please review the code example: org.eclipse.swt.snippets.Snippet336 回答2: This example will do the job: Task bar: Code: import org.bridj.Platform; import org.bridj.Pointer; import org.bridj.cpp.com.COMRuntime; import org.bridj.cpp.com.shell

SQL server 2008 R2, select one value of a column for each distinct value of another column

拥有回忆 提交于 2019-12-13 05:13:57
问题 On SQL server 2008 R2, I would like to select one value of a column for each distinct value of another column. e.g. name id_num Tom 53 Tom 60 Tom 27 Jane 16 Jane 16 Bill 97 Bill 83 I need to get one id_num for each distinct name, such as name id_num Tom 27 Jane 16 Bill 97 For each name, the id_num can be randomly picked up (not required to be max or min) as long as it is associated with the name. For example, for Bill, I can pick up 97 or 83. Either one is ok. I do know how to write the SQL

Using DrawThemeTextEx in C#?

限于喜欢 提交于 2019-12-13 05:06:54
问题 I am creating a label control which can be used on Aero Glass and I want the text to glow "the Vista way". There is a WinAPI function called ' DrawThemeTextEx ' but I don't know how to use it and searching didn't give many results. I found this message but it doesn't tell you much : http://www.codeproject.com/Messages/3273238/Text-on-Aero-Glass-that-has-Painted-Layer-how.aspx Does anyone know how to use ' DrawThemeTextEx ' in .NET ? 回答1: Right, so what's missing from the code in that link is

How do I find where java is downloaded on a windows 7 computer [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-13 05:01:45
问题 This question already has answers here : How do I find where JDK is installed on my windows machine? (22 answers) Closed 5 years ago . I am Wondering how to find where java has downloaded on my windows 7 computer. I need to find it so I can make a 'JAVA_HOME'. 回答1: Go to this location,if it exists,in your Windows 7 PC :- C:\Program Files\Java\jdk1.8.0\bin\javac.exe // 64 bit system compatible JDK OR C:\Program Files(x86)\Java\jdk1.8.0\bin\javac.exe //32 bit system comaptible JDK If this

Windows 7 Logon Programmatically

≡放荡痞女 提交于 2019-12-13 04:59:19
问题 I am doing a R&D of my project. My project is about detecting a human using proximity sensor and return true or false to my system. If true my windows machine should logon automatically. If false no action should occur. I can able to get true or false status based on user verification. But now i just want to logon Windows 7 machine automatically.., I just want to know the procedure of how to do Windows 7 logon programmatically.. Any services can be written to achieve this..? or any suggestion

C# application publish - errors on different systems

喜你入骨 提交于 2019-12-13 04:41:42
问题 I've made an application in C# . it's a WPF application with SDF DB. I have VS2008 express. I published my application (with SQL-CE dll) and installed it on my computer (I have windows XP) and on another WinXP computer and it worked fine. I sent the same files to 2 people with windows 7. the first one couldn't install the application - she got an error message like "cannot download the application [...] missing required files [...]". the second one (window 7 with 64 bit) installed it but she

Python wmi c.Win32_PerfFormattedData_PerfOS_Processor win7 error

柔情痞子 提交于 2019-12-13 04:08:33
问题 >>> for i in c.Win32_PerfFormattedData_PerfOS_Processor(): ... print i ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\work\pythonsv\vendor\wmi.py", line 1029, in __getattr__ return getattr (self._namespace, attribute) File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 496, in __getattr__ raise AttributeError, "%s.%s" % (self._username_, attr) AttributeError: <unknown>.Win32_PerfFormattedData_PerfOS_Processor Anyone could explain this

Nested QVector pointer memory handling

别等时光非礼了梦想. 提交于 2019-12-13 03:51:02
问题 I've inherited a substantial Qt5 project, where the accumulative memory leakage is becoming a serious issue. (Yes, memory leakage should rarely be tolerated but with real life budget and time constraints...). This GUI reads image data into objects of a voxel class, to be displayed graphically. The data comes either from file or buffer (if acquired live) and is stored as a nest qvector, ie: QVector < QVector <Voxel *> > cVoxel; When an image is read from file, cVoxel is initialized using

Git commands not in context menu for Document Library

前提是你 提交于 2019-12-13 03:44:54
问题 I'm using Git version 1.9.5.msysgit.1 and Win 7 Enterprise. When I navigate to the folder C:\Users\[userid]\Documents\Visual Studio 2013\Projects using a regular sequence of folder jumps starting from C: , then right-click in the folder window, I get all the usual Git context menu commands, e.g. Git Bash. However, when I go to the same folder starting from the Document Library, either from the Start Menu or clicking in the Libraries on the left side of the folder window, the Git context menu