Symbol table in flex/bison - hash

Does anyone know how to use the symbol table in Flex / Bison? I'm preparing a college exam but I can not understand the subject ...I've already tried searching on the internet but I find nothing that is well written.

Related

Talend Cloud Studio : Issue with look up mapping

Good day,
I’m new with Talend Cloud Studio and I’m getting stuck with the job I’m working on.
Context:
My company uses an API directory (Genesys). So far, we use a .csv file to insert / update contacts. This file is generated from a database extract.
We want to automatize this process with a Talend Job.
(A) is my Contacts database extract.
(B) is my API (feeded from A) and used as look up component.
Because there is not a unique field that we can use like a proper foreign key between (A) and (B), we map most of (A) fields to (B)’s so input datas can be « filtered » and redirected to two disctincs output « Inserted » and « Updated ».
Please find my schema attached
My issue is the following : I know for a fact that 9 rows should be considered as "to be inserted" and one row should be considered as "to be updated",yet, every output are considered as « inserted » (aka new contacts in the directory) and not « updated ».
Please find my result attached
If anyone as any clue about what’s happening or need more details, feel free to ask me !
Thanks by advance for your help.
Regards

Constrain a column across tables

I'm using Postgres to store formulae and elements of formulae across two tables. Basically, you have something like:
Elements Table
symbol
content
pi
3.1.45
lune
42
Formula Table
symbol
content
area
pi*r^2
rugsize
area*lune
So, formulae can use elements but also other formulae in their content field. For this reason (and for general reduction of confusion) I would like to make symbol unique across both tables.
I can, of course, in the code that's doing the insertion, look up the entries before adding them and refuse to add a duplicate symbol. (I probably will do this, but I don't want the database reliant on that.) I could also require a tag within the formula table to specify when it's using another formula:
symbol
content
rugsize
f(area)*lune
I'm not crazy about that since it puts a burden on the user to remember that, or on the coder to secretly add and remove the "f()".
Everything I found on Stack and elsewhere went the other way: Forcing a column value to be present in another table, except for one suggestion that the unique items be kept in a separate table.
symbol
area
lune
pi
rugsize
And then...actually, I'm still not sure how that would work at the DB level.
So, is there a way to do this with constraints or foreign keys, or must I write a trigger for each table to look into the other table?
Addition: I've simplified here greatly but the elements table is much more complex than I'm showing and has little in common with the formulae table.
Edited to add the above addition and to try to fix the one-column "symbol" table which looks fine in the editing preview but does not format correctly on the actual page.

Ignore row if duplicate at CSV import

I was wondering if it possible? If a row for some reason cannot be imported
ex. duplicate primary key, wrong input type etc etc can it be ignored and move to the next row?
I'm getting this
ERROR: duplicate key value violates unique constraint "team_pkey"
DETAIL: Key (team)=(DEN) already exists.
CONTEXT: COPY team, line 23: "DEN,Denver,Rockets,A"
There's a lot of mistakes in the file and its a pretty big one, so is it possible to ignore the rows that can't be inserted?
A solution that handles the duplicate key issue is described in To ignore duplicate keys during 'copy from' in postgresql - in short using an unconstrained temp table and select distinct on uniquefield into the destination table.
Another way would involve using pgLoader. Unfortunately the documentation seems to have disappeared from the website, but there are several tutorial article on the author's site. It has rich functionality to help you read data with issues, and can do things like store rejected lines in a separate file, transform fields and so on.
Something that may not be obvious immediately: pgLoader version 2 is written in Python, version 3 is written in Lisp. Both can be obtained from the GitHub page.

Entity Framework - Using stored procedure which return same column names from different entities

I have tables named Contact and Address and both of them have "ModifiedDate" column. I have written the CUD operations using Stored procedures. However, when It came to SELECT stored procedure in which I needed to return all the contacts with their addresses, I got an error.
System.Data.EntityCommandExecutionException:
The data reader is incompatible with
the specified
'AddressBookModel.SelectAllContactsWithAddresses_Result2'.
A member of the type, 'ModifiedDate1',
does not have a corresponding column
in the data reader with the same name.
I ended up changing the stored procedure to return different aliases for those column name and more unfortunately, I needed to change the properties in the entities in the model as well to match the selected column. I wrote a blog post about this here. I know I could have separate select SPs (and separate function imports) for both the entities but this is just one situation and can happen in other cases as well where same columns names might get returned from a complex query from multiple tables in a SP. Could anybody provide any direction on this?
I posted the same question in the MS forums for EF here (sorry for the cross posting) and the moderator confirmed that this is a bug in EF and asked me to create a bug in the Microsoft Connect and the bug Id is 597376 and here is the link for the same.
from Lingzhi Sun
MSFT, Moderator
Support in Forum>
Hello, After some research and test,
> I can repro this issue at my side.
> It can be a limitation of EF when
> handling stored procedure return
> values. I would recommend you open a
> ticket at Microsoft Connect to report
> this issue to the product team. If
> it is convenient, please share us with
> the ticket link here to benefit more
> community members.

sp_trace_setfilter column datatypes

Anyone know where i can find a list of the columns for setting the trace filter, i know the system id number as i got this off of MSDN but i need the list with all of the data types but i cant seem to find it anywhere...
They are listed in the BooksOnline on the sp_ trace_setevent page:
link