executable

How to read content of .EXE file in Java

匆匆过客 提交于 2019-12-22 17:39:18
问题 What are the possible options and the most appropiate for reading an executable file in Java. I want produce the hexadecimal representation of an .exe file. Im thinking of reading the file in binary and then doing the conversion. But how can i read the .exe? 回答1: 1) read the file in as bytes. use BufferedInputStream( new FileInputStream( new File("bin.exe") ) ) 2) convert each byte to hex format. static final String HEXES = "0123456789ABCDEF"; public static String getHex( byte [] raw ) { if (

How to read content of .EXE file in Java

倾然丶 夕夏残阳落幕 提交于 2019-12-22 17:38:28
问题 What are the possible options and the most appropiate for reading an executable file in Java. I want produce the hexadecimal representation of an .exe file. Im thinking of reading the file in binary and then doing the conversion. But how can i read the .exe? 回答1: 1) read the file in as bytes. use BufferedInputStream( new FileInputStream( new File("bin.exe") ) ) 2) convert each byte to hex format. static final String HEXES = "0123456789ABCDEF"; public static String getHex( byte [] raw ) { if (

Is there a way to control a third-party EXE file from VB.NET?

℡╲_俬逩灬. 提交于 2019-12-22 15:35:11
问题 My goal is to control an application from VB.NET. There is no API, and I do not have the source, only the compiled EXE file. Is there a way to find the opened application, find a button within the application, click a button and know it was clicked? Is there a way to read the contents of a textbox within the application? 回答1: Yes, with Windows Vista (or Windows 7, or Windows Server 2003 and later) there are "UI Automation" APIs. There are managed options; System.Windows.Automation is one,

How can I change the default .exe icon in Visual Studio 2012 (C++)

百般思念 提交于 2019-12-22 09:58:12
问题 I was wondering if there was a way to change the default icon that VS2012 makes when I compile my app. Just for those wondering, I am trying to change the .exe program's icon, not the window icon at the top left of the window and on the start menu. I already know how to do that. I have been Google-ing this for ever and it always shows up how to change the window icon, not the actual file's icon. Thanks in advance!!! EDIT: This is what I want to do... I want to replace this... with this... ]

How can I generate an ELF file with GCC?

会有一股神秘感。 提交于 2019-12-22 06:56:47
问题 I am writing C and C++ code on Linux OS and I am using GCC. After finishing my code, I would like to generate an ELF file. I just can generate "a.out" file and I don't need it. How can I get ELF file ? ELF file occurs as a result of what ? or Is it possible to generate this file with this program ? 回答1: The compiler (i.e. gcc or g++ ) will invoke the linker ( ld ) which produces an ELF executable. In practice, you will use a builder program (like make ) to drive gcc commands. See this answer.

py2exe the following modules appear to be missing

 ̄綄美尐妖づ 提交于 2019-12-22 05:04:20
问题 As the title says, when I'm trying to use py2exe to create a Windows executable file, I get this error: The following modules appear to be missing ['Carbon', 'Carbon.Files', 'ElementC14N', 'OpenSSL.SSL', '_frozen_importlib', '_imp', '_scproxy', '_sysconfigdata', 'backports.ssl_match_hostname', 'builtins', 'certifi', 'charade.universaldetector', 'configparser', 'datrie', 'genshi.core', 'html', 'html.entities', 'html.parser', 'http', 'http.client', 'http.cookies', 'http.server', 'importlib

Host executables on GitHub?

旧巷老猫 提交于 2019-12-22 01:37:30
问题 I want to distribute executables along with my source. My source is all hosted tidily on GitHub. Is it possible to add executables and installers to my GitHub project page without adding them to my git repository? Note, for some reason GitHub discontinued this feature. See Answer by Justin Dearing below. 回答1: You cannot host executables on github. You can now use releases. 回答2: You can use GitHub's Releases for that. 来源: https://stackoverflow.com/questions/3928362/host-executables-on-github

Is tooling available to 'assemble' WebAssembly to x86-64 native code?

廉价感情. 提交于 2019-12-21 17:15:36
问题 I am guessing that a Wasm binary is usually JIT-compiled to native code, but given a Wasm source, is there a tool to see the actual generated x86-64 machine code? Or asked in a different way, is there a tool that consumes Wasm and outputs native code? 回答1: The online WasmExplorer compiles C code to both WebAssembly and FireFox x86, using the SpiderMonkey compiler. Given the following simple function: int testFunction(int* input, int length) { int sum = 0; for (int i = 0; i < length; ++i) {

Executing python script in android terminal emulator

我只是一个虾纸丫 提交于 2019-12-21 13:00:47
问题 I installed python 2.7 in my Android device and I tried executing a python script by typing the command in terminal emulator. The problem is that although I use the full path for python the following error appears: link_image[1997]: failed to link ./python CANNOT LINK EXECUTABLE. I tried to add environment variables in ./~bashrc but I didn't make it. Any idea ? 回答1: OK it is solved. I followed these steps (http://code.google.com/p/python-for-android/wiki/RunPythonFromShell) but first I had to

How to make a shell script run in Mac when double clicking it?

人盡茶涼 提交于 2019-12-21 11:45:12
问题 I have created a shell script to run a jar file in Mac : #!/bin/sh java -Xmx512m -jar test.jar; I have renamed this script " app.command " to run directly when double clicking it. And i have applied " chmod +x " command to it to have executable permissions. Now when double clicking this script, i get " Unable to access jarfile test.jar " while when running this script through Terminal, the jar runs fine ! Anyone can help me how to make this script run when double click it in Mac ? 回答1: If you