I am using the ACE data mining package https://dtai.cs.kuleuven.be/ACE/doc/ACEuser-1.2.16.pdf which uses inductive logic programming.
I am using WARMR to find frequent queries.
In the manual it has a command 'generate_arff' but this command does not seem to be in my version.(Windows). By typing help into ACE it lists the command 'generate_arff/2' but the help does not give any indication what the arguments should be (Presumably an input file and an output file) I have not been able to guess how this works. Anyone know how to do this?
generate_arff('my_program.freq_queries.out','my_program.arff').
This does not work in windows for some reason, but works in Linux
Related
I am wondering if it is possible to accomplish the following, given some context and example.
I have files in "Server\Share\Folder\File##.ext"
Sometimes the "File##.ext" can be "File01.ext" through "File20.ext", and other times it may be "File01.ext" through "File40.ext"
Sometimes there are less of these files, sometimes there are more.
I want a batch file to take the files from "Server\Share\Folder\File##.ext" and move them to "Server\Share\OtherFolder\File##.ext". I know I can accomplish this easily with:
copy /y "Server\Share\Folder\File01.ext" "Server\Share\OtherFolder\File01.ext"
Then just add another line for each extra "File02.ext, File03.ext, etc., but I am wondering if it is possible to make it so that any file that resembles "File##.ext" can be included, so that no matter how many ## I have, it always works without issue.
Thanks in advance for any and all advice!
EDIT
Someone mentioned using Wildcards, but my question with that is - lets say those files are File01.ext through File05.ext, will it match what it finds to the newly moved file? Like will it find File01 from File?? on the source and Make it File01 from File?? at the destination?
You can accomplish this task with a FORloop program in batch-file.
You can also loop through the Commands using : and variable name.
Combining these two would help you get what you want.
We can help you with Ideas and little bit of the coding. But the Efforts must be done by you. So U can learn programming better
I want to create a simple work log program/script with very basic function. Basically when I run it I want it to prompt me with an input windows. When I write the input it prints it into a .txt file with the current date and time.
Input : <text here>
and the output would look something like this in a .txt file.
<HH:MM:SS YYYY:MM:DD> | <text here>
What programming language is "easiest" for this kind of a program ?
With regards,
H
Ok, well I think your question is going to be a bit difficult to answer head on. How about asking yourself what language you do know. If you don't know any, then take the problem you are trying to solve each step at a time with documentation that your comfortable with. Do you want a program that strictly uses the command line? Or do you want a program with a GUI? That being said, I preferably would recommend Java because I think the syntax is more clear to me, but someone might recommend, say language X because they might know a few easier tricks. So my advice is, do some more research into a programming language and come back with more of a precise question that relates to the results your looking for.
I am working on reverse engineering and i wanted to give my own file path without using open dialog box like writing a fixed file path and read a file from that every time the software start.i tried to give the file name in a .data section of the software but it retrieve only the hex number not the string.
Is there any way hooking windows API for file open?or any way to write in memory and to read it every time the software starts?Any advice or direction would be greatly appreciated.
I think that what you may be looking for is "intercepting system call", quick google search came up with this link:
http://jbremer.org/intercepting-system-calls-on-x86_64-windows/ so it should be possible and not too difficult.
Basically if you manage to intercept a call to GetOpenFileName and replace it with custom implementation you should be able to do what you want (that is put hardcoded file path to appropriate buffer in LPOPENFILENAME structure)
As for your attempt to modify compiled code (I assume that what you are referring as reverse engineering is disassembling and modifying binaries) it should be possible to do, but it will require deep knowledge of windows binary architecture and assembly language.
I want to read a txt file in autocad and plot them (line/polyline).
it may looks like
1 x11 y11 z11.......x14, y14,z14 % polyline 1
..
n xn1 yn1 zn1.......xn4, yn4,zn4 % polyline n
I want to know what is best and easy way to do this. What programming language I should use.
What are useful links or is there somework already done in this direction.
Best regards,
No programming language required! Just create a text file and type AutoCAD commands in the file the same way you would at the AutoCAD command prompt. Save the file with the .scr extension and you can either drag the file onto the AutoCAD window, or use the script command in AutoCAD to find and run the command script.
More info: http://www.upfrontezine.com/tailor/tailor19.htm
I actually use Python to generate these command scripts. With the power of a modern language, and throwing in some AutoLisp, you can do surprisingly sophisticated things. I've used this to model a complex steel tower for a cablestay bridge, and for testing model geometry for Larsa modeling.
There are few ways you can do it.
Simple solution
Script file
Creating a script file is easier and quicker
http://docs.autodesk.com/MAP/2010/ENU/AutoCAD%20Map%203D%202010%20User%20Documentation/HTML%20Help/files/WS1a9193826455f5ff47b7aa4b11fbe75ecf1-65dc.htm
AutoLISP automation
This is also easier and quicker plenty of online resources available.
http://www.pixelgraphicsinc.com/AutoLisp_Tutorial01.html
Best but complicated solution
.NET C# plugin
This is the best option as it lets you do more than basic things.
If you like to do coding. This is fun. you can create a plugin using .NET C# and read the txt file to create the line segments.
Let me know how you go.
You can use ObjectARX in C# as well as C++.
C# will be a better choice.
Just read your text file using StreamReader using C# System.IO library.
Create a array of points specified in text file.
Finally create the Polyline using given points and Using Transient in ObjectARX you can display the Polyline.
Sadly, a project that I have been working on lately has a large amount of copy-and-paste code, even within single files. Are there any tools or techniques that can detect duplication or near-duplication within a single file? I have Beyond Compare 3 and it works well for comparing separate files, but I am at a loss for comparing single files.
Thanks in advance.
Edit:
Thanks for all the great tools! I'll definitely check them out.
This project is an ASP.NET/C# project, but I work with a variety of languages including Java; I'm interested in what tools are best (for any language) to remove duplication.
Check out Atomiq. It finds code that is duplicate that is prime for extracting to one location.
http://www.getatomiq.com/
If you're using Eclipse, you can use the copy paste detector (CPD) https://olex.openlogic.com/packages/cpd.
You don't say what language you are using, which is going to affect what tools you can use.
For Python there is CloneDigger. It also supports Java but I have not tried that. It can find code duplication both with a single file and between files, and gives you the result as a diff-like report in HTML.
See SD CloneDR, a tool for detecting copy-paste-edit code within and across multiple files. It detects exact copyies, copies that have been reformatted, and near-miss copies with different identifiers, literals, and even different seqeunces of statements.
The CloneDR handles many languages, including Java (1.4,1.5,1.6) and C# especially up to C#4.0. You can see sample clone detection reports at the website, also including one for C#.
Resharper does this automagically - it suggests when it thinks code should be extracted into a method, and will do the extraction for you
Check out PMD , once you have configured it (which is tad simple) you can run its copy paste detector to find duplicate code.
One with some Office skills can do following sequence in 1 minute:
use ordinary formatter to unify the code style, preferably without line wrapping
feed the code text into Microsoft Excel as a single column
search and replace all dual spaces with single one and do other replacements
sort column
At this point the keywords for duplicates will be already well detected. But to go further
add comparator formula to 2nd column and counter to 3rd
copy and paste values again, sort and see the most repetitive lines
There is an analysis tool, called Simian, which I haven't yet tried. Supposedly it can be run on any kind of text and point out duplicated items. It can be used via a command line interface.
Another option similar to those above, but with a different tool chain: https://www.npmjs.com/package/jscpd