Berkeley DB C++ application on floating index

IM using Berkeley DB C++ API 6.0 on OSX. My application creates a database with the following tables:

Primary table: (int, myStruct)-> myStruct is a buffer.

Secondary index: (float, myStruct)-> float key is information that I collect in a buffer with the following reminder myStruct.

int meanExtractor(Db *sdbp, const Dbt *pkey, const Dbt *pdata, Dbt *skey) { Dbt data = *pdata; feature<float> f; restoreDescriptor(f, data); void* mean = malloc( sizeof(float) ); memcpy( mean, &f.mean, sizeof(float) ); skey->set_data(mean); skey->set_size(sizeof(float)); skey->set_flags( DB_DBT_APPMALLOC ); return 0; } 

When I iterate over the secondary index and the print key/data pairs, the float keys are well stored. My problem is that I can not query this table. I would like to run this SQL query for example:

SELECT * FROM secondary index WHERE keys > 1.5 && keys < 3.4 

My table is filled with 50000 keys between 0.001 and 49,999. The thing is when I use this method, for example:

I assume the Db and the table are already opened float i = 0.05; Dbt key = Dbt(&i, sizeof(float)); Dbc* dbc; db->cursor( txn, &dbc, 0 ); int ret; ret = dbc->get( key, &vald, DB_SET_RANGE)); 

Its retrieved this key: 0,275. It must recover 0.05 (because if there is) or at least 0.051. And for any other float value in the key of Dbt, it gives me some stupid values. If I set the DB_SET flag, he finds no key. My idea was to set the cursor to the most touch is greater than or equal to my key, then iterate with the indicator DB_NEXT until I reach the end of my stove.

It must come from the BerkeleyDB search algorithm, but I've seen some (useful but not enough) examples to do exactly what I need, but with the Java API, so this proves that it's possible to do...

I'm pretty stuck with this one, so if anyone has had this problem before, thx for helping me. I put my code elsewhere if necessary.

Hello

Because the default byte comparison does not reflect the sort order of float numbers, you have the bt_compare function for your secondary database? According to your description, your query relies on the correct number of float sort order, so I think you must define a custom function bt_compare.

Also, as you do not exact search and just go search, DBC-> get (DB_SET) does not work for you. I think you should use the DB_SET_RANGE flag to get the point nearest(just >=).  You can see the documentation of DBC (or CBD in C++) for more information.

Kind regards

Winter, Oracle Berkeley DB

Tags: Database

Similar Questions

  • Indexing for two audiences


    Hi all

    I need an application with the index into two parts (Manager and general) application pages and tasks differ for about 30% of the index entries. Thanks for all the ideas.

    Of webhelp, can you publish two indexes and let the user choose an index to display? If not, here are two methods, I think. If you have not had other experiences, which of these do you prefer?

    Method 1: Separate the 30% (part of the application). Works, but long.

    Add students (Manager)

    Add (general) students

    Method 2: Split the 30% of the section of the user. Easier to display in form of list, but not useful when searching.

    Task Manager (see also General tasks):

    Add students

    Add teachers

    transfer students

    (etc.)

    General tasks (see also the Task Manager):

    Add students

    Edit students

    transfer students

    Thank you!

    Hello

    There are a few approaches you might consider here. Unfortunately, my crystal ball is on the fritz and my psychic skills are practically non-existent. It is therefore impossible for me to check the particular version of RoboHelp, you could use. I'll assume so just 11 version because it is the current shipping version.

    Recent versions of RoboHelp make it really easy to create and maintain more than one index. The following assumes that you have created more than one index.

    You can create multiple outputs, with each output using its own index. Simply, you duplicate an exit in the recipe box single Source layout as many times as you need. Then you configure each output to use the desired index. After having generated, you end up with several sets of WebHelp files which should be published in different folders on your server. The end user must have the correct link to open the set created for them.

    The latest two or three versions of RoboHelp offer a feature called 'Dynamic content from the user-centric' or DUCC. It is also known under the name of the categories of content. So with this approach, you use a single recipe in your pod single Source Layouts. You set more than one category and you make the category assignment of a unique index.

    After you generate and publish, the end user is able to see other categories, but they make the choice that applies to them.

    See you soon... Rick

  • in comparing the index and a table between instances PK

    Aloha!

    I'll compare the indices and the PK's (Constraint) of 3 instances.

    This table of s/n/s best use? The comparison is made on a specific schema only.

    Please be kind enough to write the script that I need or tables.

    PS
    Which is better dba_ind_columns or dba_objects?

    BR,
    Hades

    Published by: TheHades0210 on December 2, 2012 21:58

    TheHades0210 wrote:
    Hello

    Thank you for these elaborate explanation. I just want to know why under dba_ind_Columns INDEX_NAME, some of the names of the characters $ and #. Is it system generated index?

    very probably are generated, the system but not necessarily.

    If so, what application generates this index?

    I don't know what applications are installed in your DB.
    No objects appear spontaneously.
    Someone has published the DDL that created.

  • ITS Search Application: you are not authorized for this page.

    Hi all

    I'm working on implementing Secure Enterprise Search. I have install the connectivity between PeopleSoft and SES have deployed research definitions and created indexes.
    For example, I have deployed and build and find the HC_HR_COMPANY_DIRECTORY1 of PeopleSoft HCM 9.1 definition.
    When I use the research of the Application of the banner of PeopleSoft to perform a search on a key word, it returns results.
    Now when I click on the link to the result it opens a new window with the error, you are not authorized for this page.

    The url, it tries to open is
    http://myserver/PSP/PS/employee/HRMS/c/c/HR_SRCH_GLOBAL.HR_SRCH_CD.GBL?page=HR_SRCH_CD & action = U & EmplId = K0LB07 & EMPL_RCD = 0 & SESLanguageCd = ENG

    You will notice that the url contains/c/c/that causes the error.
    When a remove here form the url manually, it works fine and I can navigate to the relevant page.

    I saw that the stream has published in ITS contains c/HR_SRCH_GLOBAL.HR_SRCH_CD. GBL? Page = HR_SRCH_CD & etc.
    When you hover over a result link it executes javascript
    OpenCrefInUniNav (' c/HR_SRCH_GLOBAL.HR_SRCH_CD.) GBL? Page = HR_SRCH_CD & Action = U & EMPLID = K0LB07 & EMPL_RCD = 0 & SESLanguageCd = ENG ')
    This prefaced the url with 6 separate parts by / in the base url http://myserver/psp/ps/EMPLOYEE/HRMS/c/ PeopleSoft
    I found this JavaScript function in the HTML PT_COMMON object.

    I don't know that the PT_COMMON.js should not be setting place, so the question should be somewhere in the engine of the application that creates the index feed to HER.
    If the application of create index engine add the c / to the url when you publish the food?

    I run on PeopleTools 8.52.09 and PeopleSoft HCM 9.1 FP2 review Recut.

    Someone at - it an idea how to solve this problem of double/c/c /?

    Concerning

    Halin

    Can make sure you that the local node by default, Portal node (HRMS) Portal and content URL is configured correctly they should end with /psp/ and /psc/

  • How to anchor the floating tools palette in InDesign CS6 for Mac? Normal way does not work

    In all my applications except InDesign CS6 (Mac) CS, I can anchor the Tools window alongside the main components content as any other window: drag it to the edge and just timely, it highlights where it will be anchored with a blue outline and docks when let you go.

    I can't find a way to do this in InDesign CS6 (Version 8.0, Mac), however. Unlike all the other windows, it never offers the possibility to berth, regardless of where I hang out. The only options in the toolbar without a vertical line, two lines and a horizontal line. I also looked in Preferences > Interface and the only options refer to the "floating toolbar" and give the same vertical line, two lines and a horizontal line options as the tool bar itself.

    I see no possibility to stop it floating. I tried on a variety of window > reorder parameters and with window > Framework Application both checked and unchecked, and nothing works. I do switch to position in a corner, but it is not dock and does not stop floating.

    It is not just the inconsistency and the nuisance of him sitting on top the documents and does not move with the rest of the window that is the problem: I'm on a Mac (Lion) and the floating toolbar breaks a normal function of the useful operating system. In all applications except InDesign, when I press F3, the current window shrinks down and I see all the other open windows, organized by application, with each application icon, floating on the top. In InDesign CS6, it is the tool floating bar, not in the main window, which is shrinking. The InDesign main window stays where he is, sat awkwardly between icons and my other windows, in the way of other windows - effectively making it impossible to use F3 to move to an other another window without having to InDesign.

    Here is a screenshot that I found online (it looks like the Windows of CS6 version?) where the toolbar is docked: no close icon, slots perfectly alongside aspects of content, not regarded as a separate window by the operating system.

    http://photos.pcpro.co.uk/images/front_picture_library_PC_Pro/dir_354/it_photo_177415_52.jpg

    I can't find Mac screenshots where it is moored - in most, it is awkwardly floating above the left rule.

    Its a strange bug, but I found a work around.
    If anchor you another pallet (info, layers etc...) to the left, you can anchor the toolbar on the left of this palette. You can then detach the pallet and the toolbar will remain anchored.

  • Months of searching for numbers on the sheet

    Hello all and thanks in advance.

    I have tabs at the top. DATA (sheet 1), JAN (sheet 2), FEB (record 3), etc. until the end of the year.

    Data sheet will be the months on the left now I want care to go to the form to correct month and takes the total of the column relative to the other leaves and place in the correct cell line. (I've been copy paste, but I know there is an easier way to do this, so I turn to the people who know the numbers unlike my lack of knowledge.)

    On the leaves of the month, I would also like to highlight the line that are sat and Sun.

    Thanks again everyone for their help.

    Rich

    In the material master

    Hi, NN,.

    You will have a Table for each month. Each Table must have a different name. Your summary table lists more than 12 months, then I would say the table name from each month is named with the name of the month AND the year.

    The monthly tables may appear on separate sheets, or the same sheet. The key, as far as the formulae are concerned, is that each Table can be identified by its name.

    The following example includes only the table for April 2016, named "APR 2016", I assumed that the total line will be row 33 on each table of data collection, but wrote the formula to allow the placement of the line totals in other places. The lines for most of the actual days have been hidden and has not been designated, as these labels have no role in the operation of the formula.

    The TOTALS is defined as a footer line. The formula, in the columns showing a value is SUM (a) where 'a' is the letter of the column to be added. (The two values of zero have been entered manually for example).

    The table has a unique formula, entered in cell B3 and filled with right and until the last line for which there is a Table whose name corresponds to the label in column A. For example, the formula has been met only 3 online.

    B3: = INDEX (APRIL 2016: $A$ 1: $ 33, MATCH $N ("TOTALS", APRIL 2016: $A, 0), GAME ($ 1 B, APRIL 2016: $1: $1.0),)

    Syntax:

    INSTRUCTION (range,-l'index of the line, column-index, index of the surface)

    range: all of the cells in the source table

    the index of the line: the number of the start line to get the value. This is provided by the first statement of the GAME.

    the index of the column: the number of the column from which to get the value. This is provided by the second statement to MATCH.

    the index of the surface: omis. By default, 1. There is only 1 area of application of this INDEX, all of the source table.

    MATCH (image search-search for, - where - method)

    EQUIV function returns the position in the list of the search for value.

    First case:

    search for: TOTALS text

    search - where: column A of table source

    method): 0 means finding the exact value.

    Second case:

    search for: the text contained in the cell of line 1 of the specified column. That form is completed on the right, the increments of the column by one for each stage.

    search - where: line 1 of table source

    method): 0 means finding the exact value.

    The formula should be changed for each new line. Three references to "APR 2016" should be changed to match the name of the table to collect this row grand totals. Once edited in column A, the formula can be filled right and automatically adapts to his new position.

    Note: The duration value in column F of the table of the month wouldn't transfer and keep the same formula in column C of the summary table. Any attempt to restore the format to match your example resulted in a triangle of error.

    Kind regards

    Barry

  • Notes in Z330?

    Is it possible to add notes in liquid Z330 without having to install the application Notes?

    I am not your model, but on older models of Acer, there was an application called Notes Float

    Acer float allows you to open an application like "floating" window, which can be moved on the screen. You can add up to four applications of float for the floating menu. You can change your float menu by tapping the settings icon and Add/Remove apps from float.

    Float applications include: float browser, buttons float, Float, Float Camera calculator, Dialer float, cards float, float Notes, stopwatch float and float text. Widgets can also be added to the floating menu by clicking on the Widgets tab.

  • Error on blue screen and missing or invalid or component file causing Windows crash.

    Original title: missing or invalid files or components.

    Missing or not valid file or item causing windows/internet to freeze and crash. A BSOD (blue screen) shows a second and the computer restarts back on the desktop with no other problems. This happens only when I open/close a video too fast or I use some (L100 - 30 Hercules) aircraft in FS9. All other devices work fine. I sent an error report to Microsoft tonight when this happened. It conrcerned 2 files in C:\ Docs & Setting\All Users\Application data\Microsoft\Search\Data\Applications\Projects\System Index\System... (couldn't do the rest, but we had to do with the XML extension..) I am using Windows XP Pro with Service pack 3 and all updates.

    Is there a simple solution for this? I don't want to reinstall XP if I don't have, as my drive my being corrupt. I'm not sure. I also used some older programs that I have used for years that run fine on XP but will not work in Windows 7 even with Virtual XP Mode installed.

    Hello Joel S

    I had already tried this and it was not a hardware failure. I ran chkdsk and the player revealed a good with no bad sectors. I also use Belarc COMPUTER management systems that manages the health of smart HDs (HDs most have this 'Intelligent' ability). The problem was some legacy software that I thought that I had taken when I did a removal of the program. He left 5 pieces of something that is called «online...» "I found it using Malwarebytes, and he was buried deep in the registry. The program was "Cliffs of Dover" a stream online to run the program. Once you have downloaded the game was the only way to use it online, which took 20-30 minutes to load and once loaded would break your system if you have tried to play. Shame, it's a beautiful CFS, but way to buggy.

    In any case, removed from the basket with Malwarebytes and every thing works fine. No more accidents.

    Derek

  • EPMA planning deployment of app error

    Hello Experts,

    I'm trying to deploy an EPMA planning via the workspace. E.M.P. version is 11.1.2.3

    Here is the error which is to throw any deployment (with selection options - "Refresh the contour", "Creating security filters" and "Full deployment"):

    Creation of security... filters: Index: 1, size: 1, an Exception occurred in the Application deployment. : Index: 1, size: 1

    Any idea of what needs to be exact, which means that this error/exception?

    Kind regards
    Santy.

    I think there is problem with the creation of filters for a disabled users. She succeed after the deletion of this user.

    Kind regards

    Santy.

  • Problem when droping temporary tablespace

    After changing the temporary tablespace default temp for TEMP3, when I try to drop the TEMP tablespace hangs until I have terminate with CTRL + C.

    The reason is there sessions using TEMP that will not disconnect.

    I guess connections SYSAUX will leave if I close SGD, but what of the APPLICATION of substantive processes? I can't stop this instance for such a stupid task.

    Looking at the LAST_ETL_TIME and the STATUS of the RCGB bg process, I realized that they are ASSETS since the database started upward, 21/09/2012.

    Any ideas?

    Thank you.

    Col tablespace format a10

    Col username format a6

    Col osuser format a6

    Pass program format a27

    SELECT a.INST_ID, b.tablespace, b.segfile #, b.segblk #, b.blocks, a.sid, a.serial #, a.username, a.osuser, a.program, b.segtype, to_char (a.logon_time, ' dd/mm/yy HH24') logon_time, a.status, a.last_call_et

    GV $ session has, gv$ sort_usage b

    WHERE a.saddr = b.session_addr

    ORDER BY 1, 2, 3, 4, 5, 6;

    INST_ID SELECT TABLESPACE SEGFILE # SEGBLK # BLOCK SID, SERIAL # USERNA OSUSER PROGRAM SEGTYPE LOGON_TIME STATUS LAST_CALL_ET

    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------ ------ --------------------------- --------- -------------- -------- ------------

    1 oracle TEMP 201 2766464 128 640 31865 SYSMAN SGD INDEX 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2856192 128 640 31865 SYSMAN GIVEN WHO 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2865664 128 695 45433 SYSMAN SGD INDEX 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2865792 128 695 45433 SYSMAN GIVEN WHO 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2865920 128 695 45433 SYSMAN GIVEN WHO 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2866048 128 695 45433 SYSMAN SGD INDEX 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2894976 128 640 31865 SYSMAN GIVEN WHO 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2895104 128 695 45433 SYSMAN GIVEN WHO 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2895232 128 695 45433 SYSMAN SGD INDEX 16/10/13 10:50 22 INACTIVE

    1 oracle TEMP 201 2895360 128 640 31865 SYSMAN SGD INDEX 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2895488 128 640 31865 SYSMAN SGD INDEX 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2895616 128 640 31865 SYSMAN GIVEN WHO 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2895744 128 640 31865 SYSMAN GIVEN WHO 16/10/13 10:50 56 INACTIVE

    1 oracle TEMP 201 2933120 128 695 45433 SYSMAN GIVEN WHO 16/10/13 10:50 22 INACTIVE

    1 TEMP3 203 136192 128 392 8811 WEB_ES person don't httpd@weblxfe03 (V1 - V3 TNS) DATA 04/04/14 15:00 IDLE 0

    DC81

    Oracle TEMP 201 490368 128 337 55503 SYSMAN 2 the WHO DATA 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 628992 128 337 55503 SYSMAN 2 SGD INDEX 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 640768 128 337 55503 SYSMAN 2 SGD INDEX 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 701056 128 337 55503 SYSMAN 2 SGD INDEX 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 744064 128 337 55503 SYSMAN 2 the WHO DATA 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 757760 128 337 55503 SYSMAN 2 the WHO DATA 16/10/13 10:49 52 INACTIVE

    Oracle TEMP 201 762752 128 337 55503 SYSMAN 2 the WHO DATA 16/10/13 10:49 52 INACTIVE

    2 TEMP 201 3033728 128 55 1 oracle [email protected] (Application) DATA 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3033984 128 55 1 oracle [email protected] (Application) of the INDEX 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3034368 128 55 1 oracle [email protected] (Application) DATA 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3048448 128 55 1 oracle [email protected] (Application) of the INDEX 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3048576 128 55 1 oracle [email protected] (Application) DATA 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3048704 128 55 1 oracle [email protected] (Application) DATA 21/09/12 09:51 48402541 ACTIVE

    2 TEMP 201 3048832 128 55 1 oracle [email protected] (Application) of the INDEX 21/09/12 09:51 48402541 ACTIVE

    3 oracle TEMP 201 3033728 128 55 52181 SYSMAN GIVEN WHO 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3033984 128 55 52181 SYSMAN SGD INDEX 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3034368 128 55 52181 SYSMAN GIVEN WHO 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3048448 128 55 52181 SYSMAN SGD INDEX 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3048576 128 55 52181 SYSMAN GIVEN WHO 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3048704 128 55 52181 SYSMAN GIVEN WHO 16/10/13 10:49 25 INACTIVE

    3 oracle TEMP 201 3048832 128 55 52181 SYSMAN SGD INDEX 16/10/13 10:49 25 INACTIVE

    3 TEMP3 203 239616 128 286 50245 WEB_ES person don't httpd@weblxfe21 (V1 - V3 TNS) DATA 04/04/14 15:03 IDLE 0

    DC81

    37 selected lines.

    # Note: 'oracle2.local' is the host name and domain.

    Here is the solution: http://danielrobertosoto.blogspot.com.ar/2014/04/11gr2-result-cache-feature.html

  • How does am sharing happens in the env cluster

    can someone indicate topics... Thank you.

    In general, the links ADF layer creates a JboDataControl object and stores it in the HTTP session. (This is not stored directly in the HttpSession, but in a container called DataControl Frame object. We're going for simplicity to skip those details). The HTTP session is replicated to another server in the cluster (which is done by the WLS cluster) and the JboDataControl is replicated as part of session replication. The JboDataControl contains an instance of a class of SessionCookie (there is a related class of the ADF, do not be fooled by its name and get an association wrong with HTTP cookies, which have nothing to do here). The SessionCookie contains the ID of the State AM passive of the instance of AOS, which was used by the DataControl last time. When comes the next HTTP request (it can happen on the same server or on a secondary server in the cluster, where the HTTP session is replicated), the JboDataControl allocates an instance AM pool (which could be an arbitrary instance of AM to the pool) and activates its State according to the ID of the report of the SessionCookie (using the passive of the passivation AM store state).

    Necessary AOS configuration to be configured to make "Tipping Transaction State on managed Release" so that this mechanism to work. This indicates the instance AM doing passivation of mandatory State at the end of each request. This must be done so that the application of ADF activate State AM on the other server in the cluster, if the failure of the principal server and the next request arrives on the secondary server. This mandatory passivation puts considerable achievements to the application. On the other hand, if the application is not clustered, passivation State AM happen only when a particular instance of AM of the pool is recycled in another user session. The performance overhead is the trade-off between the clusters and applications ADF nonclustered indexes.

    Dimitar

  • JavaFX2.1 - TableView - a TableView content can be exported to Excel

    Hi all

    I'm new to JavaFx scene, I have a desktop application that uses several of various sizes and values make. When the user closes down the display of the table in question, they asked that the exit of the tableview exported to a csv file in a specified location. I tried various searches but am yet to see examples of if this is still possible in javafx.

    Could someone advise if you are able to export content from a TableView to Excel? Pointers would be greatly appreciated.

    Thank you.

    Here's an example of how export to a csv file:

    import javafx.beans.property.SimpleStringProperty;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.geometry.Insets;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.layout.VBox;
    import javafx.scene.text.Font;
    import javafx.stage.Stage;
    import javafx.beans.value.*;
    import javafx.beans.*;
    import javafx.beans.property.*;
    import javafx.collections.*;
    
    import java.io.*;
    
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.event.EventType;
    import javafx.scene.effect.InnerShadow;
    import javafx.scene.input.MouseEvent;
    
    public class Tbview extends Application {
    
        private IntegerProperty index = new SimpleIntegerProperty();
    
        public final Integer getIndex() {
            return index.get();
        }
    
        public final void setIndex(Integer value) {
            index.set(value);
        }
    
        public IntegerProperty indexProperty() {
            return index;
        }
    
        public static class Person {
    
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private final SimpleStringProperty email;
    
            private Person(String fName, String lName, String email) {
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.email = new SimpleStringProperty(email);
            }
    
            public String getFirstName() {
                return firstName.get();
            }
    
            public void setFirstName(String fName) {
                firstName.set(fName);
            }
    
            public String getLastName() {
                return lastName.get();
            }
    
            public void setLastName(String fName) {
                lastName.set(fName);
            }
    
            public String getEmail() {
                return email.get();
            }
    
            public void setEmail(String fName) {
                email.set(fName);
            }
        }
        private TableView table = new TableView();
        private final ObservableList data =
                FXCollections.observableArrayList(
                new Person("Isabella", "Johnson", "[email protected]"),
                new Person("Ethan", "Williams", "[email protected]"),
                new Person("Emma", "Jones", "[email protected]"),
                new Person("Isabella", "Johnson", "[email protected]"),
                new Person("Ethan", "Williams", "[email protected]"),
                new Person("Emma", "Jones", "[email protected]"),
                new Person("Isabella", "Johnson", "[email protected]"),
                new Person("Ethan", "Williams", "[email protected]"),
                new Person("Emma", "Jones", "[email protected]"),
                new Person("Isabella", "Johnson", "[email protected]"),
                new Person("Ethan", "Williams", "[email protected]"),
                new Person("Emma", "Jones", "[email protected]"),
                new Person("Michael", "Brown", "[email protected]"));
    
        public static void main(String[] args) {
            launch(args);
        }
    
        @Override
        public void start(Stage stage) {
            Scene scene = new Scene(new Group());
            stage.setTitle("Table View Sample");
            stage.setWidth(400);
            stage.setHeight(500);
    
            final Label label = new Label("Address Book");
            label.setFont(new Font("Arial", 20));
    
            final TableColumn firstNameCol = new TableColumn("First Name");
            firstNameCol.setCellValueFactory(
                    new PropertyValueFactory("firstName"));
    
            firstNameCol.setSortable(false);
    
            firstNameCol.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler() {
    
                public void handle(MouseEvent event) {
    
                    System.out.println("First name col is pressed");
    
                }
            });
    
            TableColumn lastNameCol = new TableColumn("Last Name");
            lastNameCol.setCellValueFactory(
                    new PropertyValueFactory("lastName"));
            lastNameCol.setSortable(false);
            TableColumn emailCol = new TableColumn("Email");
            emailCol.setMinWidth(200);
            emailCol.setCellValueFactory(
                    new PropertyValueFactory("email"));
            emailCol.setSortable(false);
            table.setItems(data);
            table.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
            table.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    
            indexProperty().addListener(new ChangeListener() {
    
                @Override
                public void changed(ObservableValue o, Object oldVal,
                        Object newVal) {
                    table.getSelectionModel().select(index.get());
    
                }
            });
    
            // table.getSelectionModel().sel.s.select(1, lastNameCol);
    
            final VBox vbox = new VBox();
            vbox.setSpacing(5);
    
            table.onScrollProperty().addListener(new ChangeListener() {
    
                @Override
                public void changed(ObservableValue observable, Object oldvalue, Object newValue) {
                    System.out.println("scror bar " + oldvalue);
    
                }
            });
    
            table.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
            table.getSelectionModel().setCellSelectionEnabled(true);
    
            table.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
    
                @Override
                public void changed(ObservableValue observable, Object oldvalue, Object newValue) {
                    for (TablePosition t : (ObservableList) table.getSelectionModel().getSelectedCells()) {
                        System.out.println(t.getColumn());
                    }
                }
            });
    
            // table.getSelectionModel().setCellSelectionEnabled(true);
    
            final Button export = new Button("Export to Excel");
            export.setOnAction(new EventHandler() {
    
                @Override
                public void handle(ActionEvent e)  {
                  try {
                    writeExcel();
                  }
                  catch (Exception ex) {
                ex.printStackTrace();
            }
    
                }
                //
            });
    
            vbox.getChildren().addAll(label, table, export);
    
            vbox.setPadding(new Insets(10, 0, 0, 10));
    
            ((Group) scene.getRoot()).getChildren().addAll(vbox);
            scene.getStylesheets().add(getClass().getResource("stylesheet.css").toExternalForm());
            stage.setScene(scene);
            stage.show();
        }
    
        public void writeExcel() throws Exception {
            Writer writer = null;
            try {
                File file = new File("C:\\Person.csv.");
                writer = new BufferedWriter(new FileWriter(file));
                for (Person person : data) {
    
                    String text = person.getFirstName() + "," + person.getLastName() + "," + person.getEmail() + "\n";
    
                    writer.write(text);
                }
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            finally {
    
                writer.flush();
                 writer.close();
            }
        }
    }
    
  • The implementation of data mining

    I have installed Oracle EBS R12. (Inventory and purchase module)

    I want to know how to incorporate techniques of exploration data in it?

    Hi Naeem,
    Data mining is fully integrated to the db.
    So you can extend applications easily using pl/sql and sql operations (see the Documentation of the API Data Mining).
    http://www.Oracle.com/technetwork/database/options/ODM/ODM-documentation-170506.html
    Data mining has been integrated into some existing Oracle Applications as part of the base product.
    For example, take a look at the Application of Capital Management human Oracle:
    http://www.Oracle.com/us/products/applications/fusion/HCM/index.html
    You just need to review guidelines on how what form of client extensions are allowed for a given Application to Oracle.
    I suggest you contact the Oracle Support.
    Thank you, Mark

  • free to the extent

    Hi all

    In my PROD so many times I found that the size of a tablespace tatol remains, that's fair enough but the largest availabe pieces is very less and because it happens that a transaction fails and gives an error in the log file of the alerts as:

    ORA-1654: impossible to expand the applications of the index. RCV_RECEIVING_SUB_LED_N3 by 27310 in tablespace GLD

    and as a solution, I need to resize database / add datafile and problem solved.

    But before the Add/resize datafile when I checked the database of free space and the largest track is:

    Select nom_tablespace,
    Sum(bytes/1024/1024) Total_free_space,
    Max(bytes/1024/1024) largest_free_extent
    from dba_free_space
    where nom_tablespace = 'GLD '.
    Group by TABLESPACE_NAME;

    NOM_TABLESPACE TOTAL_FREE_SPACE LARGEST_FREE_EXTENT
    ---------------------------- ------------------------ ------------------------
    GLD 5516.0546875 9.765625


    I have thin 5516 MB of free space is fair enough for the TSS. but still I get the error to TBS for this.

    can any body give an idea what wrong with this.

    Thanks in ADV!

    Sorry guys, I post in the wrong category

    Published by: user9141007 on December 21, 2010 01:14

    Salvation;

    "" I belive you can get more qucik response on Forum home ' database ' Database - general as I mention before

    In any case I suggest you check below:

    Script for extended report and contiguous free space [ID 162994.1]
    How to perform a Checkup on the database [ID 122669.1]

    Respect of
    HELIOS

  • Convert MS ACCESS to APEX

    Hi all

    I was wondering if it is possible to convert an existing MS ACCESS application to an APEX app:

    (1) is it possible to convert the tables
    (2) is it possible to convert forms

    Thanks in advance,

    Greetz,

    Matt

    Hello

    Here are two links that could
    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/tutorial-090294.html
    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/MiG-index-095631.html

    Kind regards
    Jari

Maybe you are looking for