Joern:how to use ast's csv file to make cpg's csv file by joern? - neo4j

As we all know,joern can easily analysis project written by c/c++,and it will generate CPG(code property graph).
Now I hava 2 csv file(nodes.csv and rels.csv),the 2 csv file can build AST(abstract syntax code)by neo4j and it can be shown in neo4j.But AST is not enough for me,what i need is CPG.How could i use the 2 csv file to build a CPG and show it in neo4j.I wanna to know how to use joern to make my ast'csv file become cpg'csv file.Or you hava other ways to make me do this.
I relly need your help,please.Thank you very much.

Related

tool to convert avpr file to avdl file

Avro's IDL page documents that avro-tools.jar has an idl command converting an avdl file to an avpr file. Is there a way to go in the other direction, from an avpr file to an avdl file?
I was unable to find any documentation on this matter but given that the two formats appear to contain the same data with different syntax, it should be possible to convert both ways.
I have written a java util to create a IDL from a bunch of avro schemas, part of spf4j-avro for more detail see. Makes schemas a lot more readable...

How to print out ASCII to a separate file.

I am trying to print data using
*EL PRINT
to a separate file other that jobname.dat file.
Is there any way to do this?
PS: I know how to export the data from the odb file.
Thanks
As far as I know you can't reroute that kind of input-file keyword output request to a different file. I've listed some alternatives below:
As you mention, you can script it using the Abaqus/Python API.
You can manually print results to a file of your choosing from the Viewer.
You can access the results file for postprocessing using a Fortran or C++ program (search for ABQMAIN).
You can access results and write them to a file of your choosing during the analysis using the Fortran subroutine URDFIL.

How to create Trailer Record in Flat File using SSIS

I am looking for some help on how to create a trailer record in a flat file using SSIS, I have create a SSIS package that creates a custom header and loads other record from the database into the flat file, it is a fixed width flat file. Now at the end of the file I want to create a Trailer Record along with some static text and Record count. I tried looking on to google but could not get any good example. Any help is much appreciated.
Use a Script Task. Take the file path of the fixed width flat file that you have obtained as a input variable. Once withing the script task use the .Net coding to append the data that you need. I have written a post on it - https://karbimantras.wordpress.com/2016/08/12/adding-record-count-to-flat-file/

Running spss syntax file on multiple data files automatically

I have a spss syntax file that I need to run on multiple files each in a different directory with the same name as the file, and I am trying to too do this automatically. So far I have tried doing it with syntax code and am trying to avoid doing python is spss, but all I have been able to get is the code bellow which does not work.
VECTOR v = key.
LOOP #i = 1 to 41.
GET
FILE=CONCAT('C:\Users\myDir\otherDir\anotherDir\output\',v(#i),'\',v(#i),'.sav').
DATASET NAME Data#i WINDOW=FRONT.
*Do stuff to the opened file
END LOOP.
EXE.
key is the only column in a file that contains all the names of the files.
I am having trouble debugging since I don't know how to print to the screen if it is possible. So my question is: is there a way to get the code above to work, or another option that accomplishes the same thing?
You can't use an expression like that on a GET command. There are two choices. Use the macro language to put this together (see DEFINE in the Command Syntax Reference via the Help menu) or use the SPSSINC PROCESS FILES extension command or your own Python code to select the files with a wildcard.
The extension command or a Python program require the free Python Essentials available from the SPSS Community website or available with your Statistics version.

How to read a CSV file using iOS

I have to develop an iOS application that can read the data from a CSV file hosted on a domain. Is there any standard APIs that can help me to do this? I don't need to download but just read the file because the file will be updated for every two mins.
I recommend Dave DeLong's CHCSVParser library for parsing.
You will have to download the file, that is the only way to get it from the remote host to your device. A CSV File is a text file with data separated by a comma(','). Download the file from the the remote host, read the file line by line, split the line string that was read from the file;
For example:
1,2,3,4,1,2,3 ...Line 1
Split using ',' as a delimiter and add the split values into an array, the result will be:
array_line_one = {1,2,3,4,1,2,3};

Resources