sequence

Accessing sequence created in oracle database from php script.

I have created sequence in database like, CREATE SEQUENCE seq INCREMENT BY 1; How can i assign the current value of seq in $t; <?php $t=?; ?> ...

How to use existing Oracle sequence to generate id in hibernate?

I have legacy oracle db with a sequence named 'PRODUCT_ID_SEQ'. And here the mapping of Product class for which I need generate correct ids: public class Product { @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "etailerRaw_seq") @SequenceGenerator(name = "etailerRaw_seq", ...

Adobe Batch Sequence

How do I invoke an Adobe Batch Sequence (.sequ file extension) from a command prompt or desktop icon? ...

What algorithm to use to segment a sequence of numbers into n subsets, to minimize the standard deviation of the sum of the numbers in each subset

I'm looking for an algorithm to segment a sequence of positive numbers into n subsequences, such that the standard deviation of the sum of the numbers in each subset is minimized. The ordering of the numbers in each subsequence needs to be the same as the ordering in the original sequence For example: Suppose I have a sequence {1,1,...

Is "Export Movie" as PNG Sequence for movies with actionscript animation possible in Flash CS4?

Hello All, I was wondering if there is any way to use the "Export Movie" as "PNG Sequence" to work for movies where objects are animated with actionscript. Exporting like this works just dandy for normal animations, but it doesn't work for my current project. Basically I am creating images using mathematics and I want to be able to expo...

postgresql nextval question on sequences

Hi, I am trying to work with postgresql 'nextval' in PHP. How can I fill in the parenthesis in the third line in order to replace TXN_ID with the value of nextval('schemadb.audit_txn_seq')? $DB->query("SELECT nextval('schemadb.audit_txn_seq')"); $DB->query('SET CONSTRAINTS ALL DEFERRED'); $DB->query('SELECT schemadb.undo_transaction(TX...

How do I play a specific range of a UIImageView animation sequence array?

Hi, I have a question regarding a png, animated image sequence. I am loading images from 1 - 35 into a layer and I am initializing the layer with the 1st image using - initWithImage. I have several buttons that want to be able to play different ranges of the image sequence array. Is there a way to play only the images from 1 - 10? I...

Is VBO effective for drawing 2D animation-sequence-sprites in iPhone's MBX chip?

VBO is effective complex geometric 3D object. But I think plain DrawArray with transformed vertices/texcoords are better for 2D animation sequence sprites. Because there are a only 4 vertices for a box. With VBO, those vertices duplicated for each texcoords, and draw function should be called many times. But with DrawArray, just pushes...

Hibernate and strange behavior with DB2 sequences

I am using Hibernate with Spring and DB2. I am using sequences to generate primary key for entities. All entities use the same sequence HIBERNATE_SEQUENCE, which is the hibernate default. The problem is that values that end up into primary keys are about 10 times higher than those returned by the HIBERNATE_SEQUENCE. For example this si...

generate sequence with all permutations

How can I generate the shortest sequence with contains all possible permutations? Example: For length 2 the answer is 121, because this list contains 12 and 21, which are all possible permutations. For length 3 the answer is 123121321, because this list contains all possible permutations: 123, 231, 312, 121 (invalid), 213, 132, 321. E...

Howto set sequence as default value via pgAdmin?

Hi, I have a posgreSQL database and I am using pgAdmin III to work with it.I created a sequence called primaryKeySequence. Now I want to use this sequence as the default value for a primary key field in a table. I tried to insert nextval('primaryKeySequence'); into the default value textfield in pgAdmin. When I click the 'OK'-butt...

Firebird sequence-backed ID shorthand

What do others do to simplify the creation of simple, serial surrogate keys populated by a SEQUENCE (a.k.a. GENERATOR) in Firebird >= 2.1? I finc the process comparatively arduous: For example, in PostgreSQL, I simply type: pg> CREATE TABLE tbl ( > id SERIAL NOT NULL PRIMARY KEY, > ... In MySQL, I simply type: my> CREATE TABL...

How to convert sequence of numbers in an array to range of numbers

In javascript how to convert sequence of numbers in an array to range of numbers? eg. [2,3,4,5,10,18,19,20] to [2-5,10,18-20] ...

How do I map XML sequences to Excel columns?

I'm new to XML. What I have is a load of XML from Adobe Illustrator which I'm trying to map excel data onto. I have sequences in the original data which look like this <Market_Pie> <datanumDataColumns="5"> <values> <row> <valuekey="name"></value> <value>503.931</value> <value>268.301</value> <value>285.561</value> <value>152.037</value>...

R only: Frequencies of all subsequences of size 3 in a given 0-1 sequnce?

Given data s<-c(1,0,0,0,1,0,0,0,0,0,1,1,1,0,0) I can count 1s and 0s with table or ftable ftable(s,row.vars =1:1) and the totals of 11s,01s,10s,00s occurred in s with table(s[-length(s)],s[-1]). What would be the clever way to count occurrences of 111s, 011s, ..., 100s, 000s? Ideally, I want a table of counts x like 0 ...

How to locate a sequence of values (specifically, bytes) within a larger collection in .NET.

I need to parse the bytes from a file so that I only take the data after a certain sequence of bytes has been identified. For example, if the sequence is simply 0xFF (one byte), then I can use LINQ on the collection: byte[] allBytes = new byte[] {0x00, 0xFF, 0x01}; var importantBytes = allBytes.SkipWhile(byte b => b != 0xFF); // importa...

Using a sequence on an existing table

I've got a table that people have been inserting into getting the primary key by doing a SELECT max(id)+1 from table_a; I want to add some records to that table using a INSERT INTO table_a SELECT ... FROM table_b, table_c ... simple SQL script, and I'm wondering how to generate the primary keys. My first thought was to create a temp...

Which Oracle table uses a sequence?

Having a sequence, I need to find out which table.column gets its values. As far as I know, Oracle doesn't keep track of this relationship. So, looking up for the sequence in source code would be the only way. Is that right? Anyone knows of some way to find out this sequence-table relationship? ...

UUID performance in MySQL?

We're considering using UUID values as primary keys for our MySQL database. The data being inserted is generated from dozens, hundreds, or even thousands of remote computers and being inserted at a rate of 100-40,000 inserts per second, and we'll never do any updates. The database itself will typically get to around 50M records before w...

MySQL id sequence

Is this a correct way for id generation in MySQL ? INSERT INTO Picture (PictureId,First_pick,Title,Description,File_Name,Is_Vertical)VALUES ((SELECT max(pictureid)+1 FROM Picture),0,?,?,?,?) I mean if it is guaranted that PictureId will be unique when this query is run by many threads ? I can't modify table structure. Should I...