How to read a DEX file data from a vending machine using a programming language - cryptocurrency

I have a vending machine that generates DEX files realtime and it has all the transaction details. I need to convert these files to human readable form using a programming language.
I would like to know how to do this ?

Related

Auto-detect language of file

Is there a way to auto-detect the language that a file is written in or a way to say "this file is 20% C, 30% python, 50% shell." There must be some way because Github's remote server seems to autodetect languages. Also, if the file is a hybrid of languages, what is the de-facto way to set the file extension so that it represents those languages that are in the file. Maybe files have to all be homogeneous in regards to language. I am still learning. Additionally, is there a way to autodetect bytes of a codebase on a remote site like Github. So basically like Github's bar for languages except the bar shows how many bytes the project is taking up.
The file command on Linux does a reasonable job of guessing the language of a file, but basically it's just looking at the first characters of a file and comparing them to known situations: "if the file starts with blah-blah-blah it is probably thus-and-so".
As far as the file containing "20% C, 30% Python, etc" -- what would you do with such a file if you had one? Neither the C compiler nor the Python compiler would be happy with it.
I think Github uses file extensions to decide what language a code is written in.
As for auto-detecting file extension using the language, I suppose you could create a classification model.
You will have to create a large dataset with many files in different languages and their corresponding labels (language name). Then feed that training data to a neural network (maybe RNN-LSTM) to train the model. Then use that model on new data to predict language based on code.
I have never done something like this. But it would be a fun project.

File Operation issue while porting to Altera NIOS II

I've recently started porting the C implementation of my project to the NIOS II system and I seem to have hit a snag. My original implementation uses file operations (fopen, fscanf, fgets,etc.). However I'm using the University Program IP Core and therefore have to use the HAL functions provided by Altera.
So the question is, will I have to rewrite the portions where I read in formatted text and read byte by byte and then format? Or is it possible to keep my current code?
PS
I am using Quartus II 13.0 with Eclipse Build Tools and my development board is the Altera DE1.
The only solution I could think of is to save my whole text file into an array and then change the formatted file operations to their string counterparts, however this would probably take up a lot of space. I don't think using an OS on the NIOS II is an option for me either.

How do I write Arduino readings to a file on the computer?

I want to write Arduino's data readings to a file locally on the computer. I MUST do this in C for a specific reason. Also, I am working in Windows 7 not Linux.
I couldn't find any useful codes on the internet that satisfies my requirement. Can anyone help?
You should think about Processing it uses the same IDE as the Arduino. It has common libraries for sending data back and forth between the Arduino and host PC. Where Processing is built on Java, its code that you write looks just like that of the Arduino's C++

OpenCV pretrained classifiers for face detection xml files

I am currently working on a face detection project using C language. I have studied abut different algorithms that openCV used for object and face detection. I noticed they have pre-trained data but they are stored in xml files. Will it be possible to read these xml files using C language so I can use it with my face detection program written on C?

USB modem device software in cisco routers using C

HI all,
I am a final year computer science student; my project for final year is to develop a software using C or Tcl, for a CISCO router. In the latest series of routers, cisco has given a USB port for mass storage.
Now I want that if I plug-in a wireless modem like Idea netsetter (a modem available in India with this name), the router should connect to the internet.
Tell me any basic ideas regarding this project. Also, if there is any other language in which it can be developed more easily, please suggest.
When you say "develop a software using C or Tcl, for a CISCO router", do you mean that you are writing a custom firmware from scratch? Or are you wanting to write some sort of plug-in or application that interfaces with the existing firmware?
In either case, I would recommend that you first consult the documentation you have for the router. See what kind of API and driver support you have for the C and TCL languages. If one language looks like it is better supported than the other, then you will likely have an easier time using that language.
In my experiences, it is typically easier to do systems-level programming in C than in TCL. Most embedded systems assume that you are going to work in C and provide C-language interfaces to system functions. You didn't mention anything about the router model, so I can't say anything too specific.

Resources