Parsing fix xml and mapping fields to column names - fix-protocol

I have some FIX reference data and I want to map fields to column names.
For example,
8=FIX.4.29=46535=d34=249=CX52=20131209-11:54:48.79556=ICAP67=182=900320=91322=77c945fd-f4b2-4c64-80db 912b6f7af287323=4393=900146=1311=515243309=TE0101S14E0060XXB305=H9801=I9802=EUI9803=S1 SUB 10Y9804=EUR9805=Y9806=Y9889=N9887=09807=259878=259879=3509906=259880=259881=3509907=259810=Y9811=0.259910=-19812=BPS9813=N9814=2I667EAA09815=201409209816=109851=609852=ITRX9853=N9883=IDB9884=A9896=Y9899=N9903=N9914=N9876=N9905=N10=140
If I were to paste this data into the parser I want to be able to insert the value for say tag 9802 to a row within a specific column.
Is there an easy way to do this?

Related

Using MYSQLI to select rows in which part of a column matches part of an input

I have a database in which one of the columns contains a series of information 'tags' about the row that are stored as a comma-separated list (a string) of dynamic length. I am using mysqli within PHP, and I want to select rows in which any of these items match any of the items in an input string.
For example, there could be a row describing an apple, containing the tags: "tasty, red, fruit, sour, sweet, green." I want this to show up as a result in a query like: "SELECT * FROM table WHERE info tags IN ('blue', 'red', 'yellow')", because it has at least one item ("red") overlapping. Kind of like "array_intersect" in PHP.
I think I could use IN if each row had only one tag, and I could use LIKE if I used only one input tag, but both are of dynamic length. I know I can loop over all the input tags, but I was hoping to put this in a single query. Is that possible? If not, can I use a different structure to store the tags in the database to make this possible (something other than a comma separated string)?
I think the best would be to create tags table (id + label) then separate "table_tags" table which holds table_id and tag_id.
that means using JOINS to get the final result.
another (but lazy) solution would be to prefix and suffix tags with commas so the full column contains something like:
,tasty,red,fruit,sour,sweet,green,
and you can do a LIKE search without being worried about overlapping words (i.e red vs bored) and still get a proper match by using LIKE '%,WORD,%'

Adding rows to matlab table

I have a table named patients in matlab that I created from reading an excel file using the readtable command. Now I would like to add a new row to this table programmatically. I have attempted the following:
patients.LastName{end+1} = 'Stewart';
While this does add a value at the correct spot in the table, it gives a generic name to my row. My RowNames property in this instance is important.
How do I add a new row to my table in Matlab and give it a name, then populate it's contents?
This is because all other entries except Last Name are empty. But no worries. In order to assign specific Rownames, please use the following statement. Lets suppose you want to assign last names as row names of the table.
patients.Properties.RowNames = patients.LastName;

FileMaker - Getting Data From Another Table with Multiple Field Restrictions

I can't think of a better title, so feel free to make a suggestion once you understand the issue.
I was given a table to work with that I need to call from another table:
Name
Month
Type
Value
For each record in the main table I need to pull one "Value" that corresponds to it. What it is will be determined by all three of the other fields. So for example, if a record in the main table is:
Name:
Google
Date:
3\17\2016
Type:
M
Then I need to pull the value for the record in the other table where the Name is "Google", the month is "3", and the type is "M".
I was able to do this successfully (if slowly) using an ExecuteSQL command in a calculation field, with a ton of nested If statements for the names (I have yet to figure out how to input the record's data directly into the ExecuteSQL statement, it breaks when I try). I would prefer to just grab the data directly. I can't switch over to the other layout because I need to see all of the records at once. I can't do a simple relationship because there isn't a real relationship, it's like there are three foreign keys working in tandem and I only know how to use one to call the data.
Any idea on how to do this more simplistically?
Some ideas I've had but not sure if it will work:
Using a calculation field as a related field to dynamically point to the row by code (concatenate the three relevant fields into a type of code). Not sure if you can connect two tables by a calculation field.
Doing that same thing when calling the data into the table in the first place, adding a code to create a single primary key.
Here are my relationships:
I can't do a simple relationship because there isn't a real
relationship, it's like there are three foreign keys working in tandem
and I only know how to use one to call the data.
Simply define a relationship with three predicates - i.e. three pairs of match fields.

Spring 3 multiple values in checkbox tag

I have a database table which does not contain a primary id and I need to delete rows using two values in a table so that the row is unique.
For each result row displayed on the jsp I have a checkbox for it.
I need to find out if I can do something like this where I post two arraylists via spring form tags?
<form:checkbox path="valuesList1" value="${object.value1}" path="valuesList2" value="${object.value2}"/>
Thank you very much.
This is not supported, however you can combine your values into one using special separator, e.g. ":::" and then split them back in your controller.

I want to Dynamically access SQLite result set?

I want to dynamically access SQLite result set. Since webworks/javascript doesnt support "PRAGMA table_info(table_name); I am saving all newly created tables information in a single two column table called schema. schema has two columns, table_name and column_name.
So I created a function to access table data dynamically. I use the item=results.rows.item(i) and than access row data with item.column.
column is a variable that is assigned the value from schema, representing the column_name. When I alert(column) I get the correct column_name, but when I used item.column my results are "undefined".
any advice on how to resolve this matter.
If I understand you correctly, column is a variable that holds the value of a column name, and you want to access that column from the results item. If that's the case, then this might help:
//Assuming "var column" has already been defined,
//and given the value of the column name to be accessed in the results item.//
var item = results.rows.item(i);
var columnValue = item[column];
I struggled with this too, and this is what I found/use. You put in brackets the variable containing the column name, and that's how you access it.
EDIT: This is obviously Javascript stuff, and what I used for accessing SQLite in PhoneGap. Hopefully it helps.