oracle sqldeveloper – how can enable, disable constraints if the table has partitions by reference?

j & # 39; uses oracle12C as a database and using get_ddl to get ddl of database objects. Now, I have two tables Table 1 and Table 2 and Table1 has partition, Table2 uses the main constraint of Table1 as a reference constraint and also uses PARTITIONED BY REFERENCE.For example: –

TABLE1 is: –

create table parent_emp(
empno      number  primary key,
job        varchar2(20),
sal        number(7,2),
deptno     number(2)
partition by list(job)
( partition p_job_dba values ('DBA'),
  partition p_job_mgr values ('MGR'),
 partition p_job_vp  values ('VP')


TABLE2 is: –

    "ENAME" VARCHAR2(10), 

My problem is that I want to disable the activation constraints of table1 and table2, but when I run the script, I get a tracking error.

  1. alter table parent_emp disable the constraint SYS_C0010720 cascade;

it is used to disable the primary key of Table1 but generating the following error: –

02297. 00000 - "cannot disable constraint (%s.%s) - dependencies exist"
*Cause:    an alter table disable constraint failed becuase the table has
           foriegn keys that are dpendent on this constraint.
*Action:   Either disable the foreign key constraints or use disable cascade

I understand this, so I tried to disable the constraint of table2 and execute the following query.

  1. alter table reference_emp disable FK_EMPNO constraint cascading;

but that gives me the following error: –

alter table reference_emp disable constraint FK_EMPNO cascade
Error report:
SQL Error: ORA-14650: operation not supported for reference-partitioned tables

Please suggest me how can I disable, activate the constraints.

mysql – How to check the existence of a value between two columns of the same table

I have a table bills having columns id, starting_bl_no, ending_bl_no.

How can I verify that a new invoice number is already entered in the table?

id    starting_bl_no    ending_bl_no    
 1     100              140  
 2     357              500  
 3     150              190

Note: ie, if the entry is 102 I should go back exists. Or if the entry is 145 should return does not exist

algorithms – Binary search symbols table

Hi, I am trying to learn myself from algorithms (Sedgewick) and I have encountered the following problem:

3.1.15: Assume that searches are 1,000 times more frequent 
than insertions for a BinarySearchST client. Estimate the 
percentage of the total time that is devoted to insertions, 
when the number of searches is 10^3, 10^6, and 10^9.

As stated in the problem Searches (S) = 1000 * Inserts (I)

  • $ S = 10 ^ 3 to I = 1 $
  • $ S = 10 ^ 6 to I = 10 ^ 3 $
  • $ S = 10 ^ 9 to I = 10 ^ 6 $

At this stage of the book, we use simple tables and linked lists to save the symbol table (inefficient hash maps, trees, etc.). This would mean that the searches take ~ log2 (N) times and the insertions take ~ N / 2 times (assuming a uniform distribution on which the inserts are placed).

Am I right to calculate the percentage of insertion into the search time would be approximately:

$ frac {Inserts times N / 2} {Searches times log_2 (N)} $

Using $ Searches = 10 ^ 3 times inserts $ this reduces to

$ frac {N / 2} {(10 ^ 3 times log_2 (N)} $

This would mean that the percentage strongly depends on the initial size of the symbol table and that it is not a constant percentage that we can use to answer the question.

Any suggestions on what I'm saying, should I assume the initial size of the table?

c ++ – Is it safe to access the table beyond the limits?

In a game engine, there are many structures such as

typedef struct {
  uint32_t w;
  uint32_t h;
  uint32_t pixels(1);
} bitmap_t;

who are allocating as

bitmap_t *bm = malloc(sizeof(bitmap_t) + w*h*sizeof(uint32_t));

There are several reasons to allocate critical performance structures in this way:

  1. Only malloc is faster.
  2. Pixel access does not require any reference deletion, so this trick saves time and creates a registry because all bitmap data is now accessible via a single pointer.
  3. No pointer means less memory to allocate and access.
  4. More friendly for the cache: our examples of initial pixels above would already be in the cache, having accessed w and h, so it lacks one less.

Now, what does the C / C ++ standard say about accessing the bm-> pixel array after it's officially ended? Will the compiler assume that in bm-> pixels (index), the index variable will never be greater than 1 or that the standard explicitly allows access beyond the bounds?

What happens if bitmap_t is declared as

typedef struct {
  uint32_t w;
  uint32_t h;
  uint32_t pixels(0x7fffffff);
} bitmap_t;

then mallocé as

bitmap_t *bm = malloc(sizeof(uint32_t)*2 + w*h*sizeof(uint32_t));

Would the compiler now assume that it could access any value inside the pixel array without causing segfault?

For the moment, there has been no crash or unexpected edge effect, but is this code portable and will it work in any compiler / system combinations? 39, operating / processor?

Typical early response to such questions: yes, everyone knows that such a code is not the most beautiful in the world or anything that these "good software design" books and your CS teacher teach and people are angry trying to decipher his behavior. But, to paraphrase the famous quote: C / C ++ programs are not designed to be read by people, but rather for the processor to run as quickly as possible. And the video game code in general is not designed to be run by several generations of developers and does not really need to be reliable, such as banking and health software. Otherwise we would use higher level languages.

Lists – Side-by-side dynamic menu that looks like a table

I've seen a rather unusual UI design element that looks like an array and each cell is selectable. Usually, the first cell that you select in the first column changes the list in the next column and in the same way with the next column.

I looked for a selected table, an array of radio buttons, and so on.

Sorry, no code, even if it is implied that some codes update the following columns.

I expect it to behave essentially like a table of radio buttons, but "radio button table" does not produce the user interface element that I have seen before.

How to change the height of the rows of a table in Google Slides?

You can do this by using the slider and dragging the border lines of a cell.


As stated on the official Google support page:

Resize a row or column

  1. On your computer, open a document or presentation.
  2. In your table, move your cursor over the gridlines of a row or column.
  3. When your cursor becomes a double-sided arrow, click and drag until the line or column is the size you want.

Make all rows and columns the same size

  1. On your computer, open a document or presentation.
  2. Right-click on a table.
  3. Click on Distribute rows or Distribute columns.

Extra tip: The minimization of a line is limited by the font size.
This means that one row of fonts of size 48 can not be "collapsed" as much as another with fonts of size 10.

ajax – Table in custom format + empty values ​​in format_state

In a custom form, I created a table item:

  // Table results.
  $form('table') = (
    '#type' => 'table',
    '#header' => $header,
    '#rows' => $rows,
    '#attributes' => ('id' => 'table-results'),
    '#empty' => t('No results.'),
    '#prefix' => '
', '#suffix' => '
' );

This table is ajaxified and updated when I click on a specific button.

I need to get the output HTML code from this table in another function. If I use a dpm ($ form_state-> getValue ('table')); I receive an empty board. However, the other values ​​(of the other fields) are accessible in the $ form_state.

// My second function
public function secondfunction(array $form, FormStateInterface $form_state) {
  dpm($form_state->getValue('table')); // -> empty value...
  dpm($form_state->getValue('textfield')); // I get a value

What do I change in my code to solve this problem?

usability – How to manage filtering on the columns of a table?

I'm currently working on a fairly complex (and complicated, I admit) picture in terms of filtering. One of the filtering options allows the user to filter an item displayed as a column and I try to find the least confusing / shocking way to update the table.

It's hard to describe with words, I'll be honest so here's a GIF showing the functionality.

enter the description of the image here

I've added blocks to hide data, so do not pay attention to floating gray boxes :).


Currently, only the items selected for this filter are displayed in the table and the others are deleted. This has advantages that the user does not have to see or think about information that he does not care about, but that he then has to readjust to what is actually a "new" table. The other option is to gray out the unselected columns so that the information is still there but developed.

Which method of the above, or another, if you have any ideas, is it likely to confuse the user the least?

Can I have multiple lines with in a table

I've read recently that a table can have multiple lines of < th > and pass the validity. I have a narrow table and I need to < th > on several lines. When I test with NVDA, it reads all < th > in the column and then the data cell. Would not that be confusing for the user?

Creating a new event in Google Calendar from a table on another website

So let's say I have a schedule in a table (HTML table) on another website. Is there a tool that can extract content from this table (date, time, title of the event), and then use this information to create a new event in my Google Calendar?