directory

How to read Import Directory Table in C

别来无恙 提交于 2020-06-07 17:59:23
问题 I'm trying to build a PE viewer in C++ and it seems to crash if i try to output the names of the libraries in the Import Directory Table. It seems that I am not getting the correct pointers for the DLLs that are used by the program. HANDLE handle = CreateFile("messagebox.exe",GENERIC_READ,0,0,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,0); DWORD size = GetFileSize(handle,NULL); PVOID virtualpointer = VirtualAlloc(NULL,size,MEM_COMMIT,PAGE_READWRITE); state = ReadFile(handle,virtualpointer,size,

How to read Import Directory Table in C

与世无争的帅哥 提交于 2020-06-07 17:55:17
问题 I'm trying to build a PE viewer in C++ and it seems to crash if i try to output the names of the libraries in the Import Directory Table. It seems that I am not getting the correct pointers for the DLLs that are used by the program. HANDLE handle = CreateFile("messagebox.exe",GENERIC_READ,0,0,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,0); DWORD size = GetFileSize(handle,NULL); PVOID virtualpointer = VirtualAlloc(NULL,size,MEM_COMMIT,PAGE_READWRITE); state = ReadFile(handle,virtualpointer,size,

access files and folders in executable jars

馋奶兔 提交于 2020-06-01 08:13:19
问题 I am facing the following problem: I use Eclipse for my Java projects and there I have the following structure: --> src --> package1 .... --> package2 ... -->dataFolder --> Folder1 --> file1.xml --> Folder2 file2.xml In my java project I parse all files in the dataFolder directory. This is no problem because I can just use the root directory of the eclipse project, like this: File dataStoreFolder = new File("dataFolder"); Some parsing...... But when I export my project as an executable jar

Simple Android Directory picker - How?

拜拜、爱过 提交于 2020-05-24 21:13:05
问题 I have just started coding in Android Studio and feeling Awesome..!! How can I write a code for a 'Directory Picker'. i.e., When a button is clicked, a simple Dialog/Activity screen which can show list of directories. Also, want to store all the files in that directory in to an Array variable. (Once OK button is clicked). PS: I have searched here and found some cool 'File choose' but m looking for Directory Chooser..! Thanks in advance. 回答1: Try to use Intent.ACTION_OPEN_DOCUMENT_TREE if

URL Encoding with Underscores in a Directory Name?

感情迁移 提交于 2020-05-12 20:33:53
问题 We've run into an odd argument where I work, and I may be wrong on this, so this is why I am asking. Our software outputs a directory to an Apache server that replaces an underscore with a %5F in the name of the directory. For instance if the name of the directory was listed as a string in our software it would be: "andy_test", but then when the software outputs the directory to the Apache server, it would become "andy%5Ftest". Unfortunately, when you access the url on the server it ends up

URL Encoding with Underscores in a Directory Name?

房东的猫 提交于 2020-05-12 20:30:17
问题 We've run into an odd argument where I work, and I may be wrong on this, so this is why I am asking. Our software outputs a directory to an Apache server that replaces an underscore with a %5F in the name of the directory. For instance if the name of the directory was listed as a string in our software it would be: "andy_test", but then when the software outputs the directory to the Apache server, it would become "andy%5Ftest". Unfortunately, when you access the url on the server it ends up

How do I iterate through a directory in Common Lisp?

女生的网名这么多〃 提交于 2020-05-10 03:44:08
问题 I'm using OpenMCL on Darwin, and I'd like to do something like: (loop for f in (directory "somedir") collect (some-per-file-processing f)) But I can't get directory to return anything other than NIL , and I can't seem to find any good explanation online (other than "its different for each system"). Any pointers? 回答1: Does your pathname specification contain a wildcard? Common Lisp's pathname stuff is somewhat hard to grasp at first - at least for me it was... As the CLHS states on the

How can you upload directory using node.js?

若如初见. 提交于 2020-04-30 07:45:51
问题 I'm new to node and want to upload directory using node.js. Can anybody please help? Thank You If it's possible how? and if not then why? 回答1: you can upload only files. however there are workarounds,you can covert the folder to a zip file (client side), it really depends here on your case. upload the zip file then unzip it in the server you can use google to find out how to do every step of those. 回答2: You can use use any Folder uploading library like https://github.com/blueimp/jQuery-File

External CSS images won't load

為{幸葍}努か 提交于 2020-04-19 05:47:49
问题 Good day. My structure is like this: / index.html style/ main.css images/ test/ test.html /style/main.css says something like this: body { background-image: url('/images/SomeImage.png'); background-color: #000; } /index.html has a link to this CSS file, but, as the title says, no image will load. But it's connected though, cause the background is actually black, so the rest of the style (but images) does work. Also, if I write the same style internally into /index.html the background will

How to read all files in one folder and apply a function over them in python?

谁说我不能喝 提交于 2020-04-17 04:06:09
问题 I would like to run a function over all files in one folder and create new files out of them. I have put the code for one file bellow. I would appreciate it if you kindly help me. def newfield2(infile,outfile): output = ["%s\t%s" %(item.strip(),2) for item in infile] outfile.write("\n".join(output)) outfile.close() return outfile infile = open("E:/SAGA/data/2006last/325125401.all","r") outfile = open("E:/SAGA/data/2006last/325125401_edit.all","r") I would like to change all the files in the