I'm trying to void bits of my data

I'm working with the Dijkstra algorithm looking at the connection of nodes, well I need to know how to void a line segment, or segments, that are formed by two nodes, however leave the nodes them self intact. How can I do that? My data is given in the form, From(node)  To(node)  Cost(some value). And here is the code it self:
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.StringTokenizer;
import weiss.nonstandard.PairingHeap;
// Used to signal violations of preconditions for
// various shortest path algorithms.
class GraphException extends RuntimeException
    public GraphException( String name )
        super( name );
// Represents an edge in the graph.
class Edge
    public Vertex     dest;   // Second vertex in Edge
    public double     cost;   // Edge cost
    public Edge( Vertex d, double c )
        dest = d;
        cost = c;
// Represents an entry in the priority queue for Dijkstra's algorithm.
class Path implements Comparable<Path>
    public Vertex     dest;   // w
    public double     cost;   // d(w)
    public Path( Vertex d, double c )
        dest = d;
        cost = c;
    public int compareTo( Path rhs )
        double otherCost = rhs.cost;
        return cost < otherCost ? -1 : cost > otherCost ? 1 : 0;
// Represents a vertex in the graph.
class Vertex
    public String     name;   // Vertex name
    public List<Edge> adj;    // Adjacent vertices
    public double     dist;   // Cost
    public Vertex     prev;   // Previous vertex on shortest path
    public int        scratch;// Extra variable used in algorithm
    public Vertex( String nm )
      { name = nm; adj = new LinkedList<Edge>( ); reset( ); }
    public void reset( )
      { dist = Graph.INFINITY; prev = null; pos = null; scratch = 0; }   
    public PairingHeap.Position<Path> pos;  // Used for dijkstra2 (Chapter 23)
// Graph class: evaluate shortest paths.
// CONSTRUCTION: with no parameters.
// ******************PUBLIC OPERATIONS**********************
// void addEdge( String v, String w, double cvw )
//                              --> Add additional edge
// void printPath( String w )   --> Print path after alg is run
// void unweighted( String s )  --> Single-source unweighted
// void dijkstra( String s )    --> Single-source weighted
// void negative( String s )    --> Single-source negative weighted
// void acyclic( String s )     --> Single-source acyclic
// ******************ERRORS*********************************
// Some error checking is performed to make sure graph is ok,
// and to make sure graph satisfies properties needed by each
// algorithm.  Exceptions are thrown if errors are detected.
public class Graph
    public static final double INFINITY = Double.MAX_VALUE;
    private Map<String,Vertex> vertexMap = new HashMap<String,Vertex>( );
     * Add a new edge to the graph.
    public void addEdge( String sourceName, String destName, double cost )
        Vertex v = getVertex( sourceName );
        Vertex w = getVertex( destName );
        v.adj.add( new Edge( w, cost ) );
     * Driver routine to handle unreachables and print total cost.
     * It calls recursive routine to print shortest path to
     * destNode after a shortest path algorithm has run.
    public void printPath( String destName )
        Vertex w = vertexMap.get( destName );
        if( w == null )
            throw new NoSuchElementException( "Destination vertex not found" );
        else if( w.dist == INFINITY )
            System.out.println( destName + " is unreachable" );
        else
            System.out.print( "(Cost is: " + w.dist + ") " );
            printPath( w );
            System.out.println( );
     * If vertexName is not present, add it to vertexMap.
     * In either case, return the Vertex.
    private Vertex getVertex( String vertexName )
        Vertex v = vertexMap.get( vertexName );
        if( v == null )
            v = new Vertex( vertexName );
            vertexMap.put( vertexName, v );
        return v;
     * Recursive routine to print shortest path to dest
     * after running shortest path algorithm. The path
     * is known to exist.
    private void printPath( Vertex dest )
        if( dest.prev != null )
            printPath( dest.prev );
            System.out.print( " to " );
        System.out.print( dest.name );
     * Initializes the vertex output info prior to running
     * any shortest path algorithm.
    private void clearAll( )
        for( Vertex v : vertexMap.values( ) )
            v.reset( );
     * Single-source unweighted shortest-path algorithm.
    public void unweighted( String startName )
        clearAll( );
        Vertex start = vertexMap.get( startName );
        if( start == null )
            throw new NoSuchElementException( "Start vertex not found" );
        Queue<Vertex> q = new LinkedList<Vertex>( );
        q.add( start ); start.dist = 0;
        while( !q.isEmpty( ) )
            Vertex v = q.remove( );
            for( Edge e : v.adj )
                Vertex w = e.dest;
                if( w.dist == INFINITY )
                    w.dist = v.dist + 1;
                    w.prev = v;
                    q.add( w );
     * Single-source weighted shortest-path algorithm.
    public void dijkstra( String startName )
        PriorityQueue<Path> pq = new PriorityQueue<Path>( );
        Vertex start = vertexMap.get( startName );
        if( start == null )
            throw new NoSuchElementException( "Start vertex not found" );
        clearAll( );
        pq.add( new Path( start, 0 ) ); start.dist = 0;
        int nodesSeen = 0;
        while( !pq.isEmpty( ) && nodesSeen < vertexMap.size( ) )
            Path vrec = pq.remove( );
            Vertex v = vrec.dest;
            if( v.scratch != 0 )  // already processed v
                continue;
            v.scratch = 1;
            nodesSeen++;
            for( Edge e : v.adj )
                Vertex w = e.dest;
                double cvw = e.cost;
                if( cvw < 0 )
                    throw new GraphException( "Graph has negative edges" );
                if( w.dist > v.dist + cvw )
                    w.dist = v.dist +cvw;
                    w.prev = v;
                    pq.add( new Path( w, w.dist ) );
     * Single-source weighted shortest-path algorithm using pairing heaps.
    public void dijkstra2( String startName )
        PairingHeap<Path> pq = new PairingHeap<Path>( );
        Vertex start = vertexMap.get( startName );
        if( start == null )
            throw new NoSuchElementException( "Start vertex not found" );
        clearAll( );
        start.pos = pq.insert( new Path( start, 0 ) ); start.dist = 0;
        while ( !pq.isEmpty( ) )
            Path vrec = pq.deleteMin( );
            Vertex v = vrec.dest;
            for( Edge e : v.adj )
                Vertex w = e.dest;
                double cvw = e.cost;
                if( cvw < 0 )
                    throw new GraphException( "Graph has negative edges" );
                if( w.dist > v.dist + cvw )
                    w.dist = v.dist + cvw;
                    w.prev = v;
                    Path newVal = new Path( w, w.dist );                   
                    if( w.pos == null )
                        w.pos = pq.insert( newVal );
                    else
                        pq.decreaseKey( w.pos, newVal );
     * Single-source negative-weighted shortest-path algorithm.
    public void negative( String startName )
        clearAll( );
        Vertex start = vertexMap.get( startName );
        if( start == null )
            throw new NoSuchElementException( "Start vertex not found" );
        Queue<Vertex> q = new LinkedList<Vertex>( );
        q.add( start ); start.dist = 0; start.scratch++;
        while( !q.isEmpty( ) )
            Vertex v = q.remove( );
            if( v.scratch++ > 2 * vertexMap.size( ) )
                throw new GraphException( "Negative cycle detected" );
            for( Edge e : v.adj )
                Vertex w = e.dest;
                double cvw = e.cost;
                if( w.dist > v.dist + cvw )
                    w.dist = v.dist + cvw;
                    w.prev = v;
                      // Enqueue only if not already on the queue
                    if( w.scratch++ % 2 == 0 )
                        q.add( w );
                    else
                        w.scratch--;  // undo the enqueue increment   
     * Single-source negative-weighted acyclic-graph shortest-path algorithm.
    public void acyclic( String startName )
        Vertex start = vertexMap.get( startName );
        if( start == null )
            throw new NoSuchElementException( "Start vertex not found" );
        clearAll( );
        Queue<Vertex> q = new LinkedList<Vertex>( );
        start.dist = 0;
          // Compute the indegrees
          Collection<Vertex> vertexSet = vertexMap.values( );
        for( Vertex v : vertexSet )
            for( Edge e : v.adj )
                e.dest.scratch++;
          // Enqueue vertices of indegree zero
        for( Vertex v : vertexSet )
            if( v.scratch == 0 )
                q.add( v );
        int iterations;
        for( iterations = 0; !q.isEmpty( ); iterations++ )
            Vertex v = q.remove( );
            for( Edge e : v.adj )
                Vertex w = e.dest;
                double cvw = e.cost;
                if( --w.scratch == 0 )
                    q.add( w );
                if( v.dist == INFINITY )
                    continue;   
                if( w.dist > v.dist + cvw )
                    w.dist = v.dist + cvw;
                    w.prev = v;
        if( iterations != vertexMap.size( ) )
            throw new GraphException( "Graph has a cycle!" );
     * Process a request; return false if end of file.
    public static boolean processRequest( BufferedReader in, Graph g )
        String startName = null;
        String destName = null;
        String alg = null;
        try
            System.out.print( "Enter start node:" );
            if( ( startName = in.readLine( ) ) == null )
                return false;
            System.out.print( "Enter destination node:" );
            if( ( destName = in.readLine( ) ) == null )
                return false;
            System.out.print( " Enter algorithm (u, d, n, a ): " );  
            if( ( alg = in.readLine( ) ) == null )
                return false;
            if( alg.equals( "u" ) )
                g.unweighted( startName );
            else if( alg.equals( "d" ) )   
                g.dijkstra( startName );
                g.printPath( destName );
                g.dijkstra2( startName );
            else if( alg.equals( "n" ) )
                g.negative( startName );
            else if( alg.equals( "a" ) )
                g.acyclic( startName );
            g.printPath( destName );
        catch( IOException e )
          { System.err.println( e ); }
        catch( NoSuchElementException e )
          { System.err.println( e ); }         
        catch( GraphException e )
          { System.err.println( e ); }
        return true;
     * A main routine that:
     * 1. Reads a file containing edges (supplied as a command-line parameter);
     * 2. Forms the graph;
     * 3. Repeatedly prompts for two vertices and
     *    runs the shortest path algorithm.
     * The data file is a sequence of lines of the format
     *    source destination.
    public static void main( String [ ] args )
        Graph g = new Graph( );
        try
            FileReader fin = new FileReader( args[0] );
            BufferedReader graphFile = new BufferedReader( fin );
            // Read the edges and insert
            String line;
            while( ( line = graphFile.readLine( ) ) != null )
                StringTokenizer st = new StringTokenizer( line );
                try
                    if( st.countTokens( ) != 3 )
                        System.err.println( "Skipping ill-formatted line " + line );
                        continue;
                    String source  = st.nextToken( );
                    String dest    = st.nextToken( );
                    double    cost    = Double.parseDouble( st.nextToken( ) );
                    g.addEdge( source, dest, cost );
                catch( NumberFormatException e )
                  { System.err.println( "Skipping ill-formatted line " + line + " because countTokens = " + st.countTokens()); }      
         catch( IOException e )
           { System.err.println( e ); }
         System.out.println( "File read..." );
         System.out.println( g.vertexMap.size( ) + " vertices" );
         BufferedReader in = new BufferedReader( new InputStreamReader( System.in ) );
         while( processRequest( in, g ) )
}Edited by: whatzzupboy on Mar 17, 2008 3:34 PM

Settings > Mail, Contacts, Calendars > tap email account name > Mail Days to Sync > Increase the time
If there are no settings similar to this in the Settings app, then you won't be able to change it.

Similar Messages

  • Running iMessages. crashes on startup. I've tried the 32 bit toggle, and still crashes. Any solutions

    running iMessages. crashes on startup. I've tried the 32 bit toggle, and still crashes. Any solutions

    HI,
    If you have the Download .dmg you could try to reinstall it.
    The computer will need a restart afterwards.
    At this point the app still may not work properly but you should be able to access the Uninstall option in the Messages menu to get back to iChat.
    The Messages Download was removed yesterday.
    8:26 PM      Tuesday; June 12, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.7.4),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Trying to add month with a Date

    Hi All,
    I am trying to add month with a date. it will take the earlier month and add one month . Here is my code
    declare @CollectionDate date='10-30-2014'
    select @CollectionDate
    ;WITH CTemp AS (
    SELECT TransactionDate=CAST(@CollectionDate AS DATE) ,RemainingTransaction=1
    UNION all
    SELECT TransactionDate=DATEADD(MONTH,1,CONVERT(date, CONVERT(varchar(4), YEAR(TransactionDate))
    +'-'+CONVERT(varchar(2),MONTH(TransactionDate))
    +'-'+ CONVERT(varchar(2),DATEPART(day, @CollectionDate)))),
    RemainingTransaction+1
    FROM CTemp
    WHERE RemainingTransaction < 9
    select * from CTemp
    When I am giving date 10-28-2014 then it is working fine. But when the date is 10-31-2014 then it shows me the error
    Msg 241, Level 16, State 1, Line 3
    Conversion failed when converting date and/or time from character string.
    I can undestand it is for the month of February but how do I overcome it?
    Can anyone help me on this?
    Thanks in advance!!
    Niladri Biswas

    Try the below:
    --To find the last day of the month, use the below:
    declare @CollectionDate date='10-30-2014'
    select @CollectionDate
    ;WITH CTemp AS (
    SELECT TransactionDate=CAST(@CollectionDate AS DATE) ,RemainingTransaction=1
    UNION all
    SELECT TransactionDate=cast(DATEADD(day,-1,DATEADD(month,MONTH(Transactiondate)-1,DATEADD(year,YEAR(TransactionDate)-1900,0))) as DATE),
    RemainingTransaction+1
    FROM CTemp
    WHERE RemainingTransaction < 9
    select * from CTemp
    --Just to add a month, use the below
    declare @CollectionDate date='10-30-2014'
    select @CollectionDate
    ;WITH CTemp AS (
    SELECT TransactionDate=CAST(@CollectionDate AS DATE) ,RemainingTransaction=1
    UNION all
    SELECT TransactionDate=DATEADD(month,-1,TransactionDate),
    RemainingTransaction+1
    FROM CTemp
    WHERE RemainingTransaction < 9
    select * from CTemp
    EDIT: You may change -1 to 1 if you want the future months.(I am bit confused whether you are looking for previous months or future months.)

  • JTable - trying to delete a row of data using an Abstract TableModel

    Hi Guys,
    I am trying to delete a row of data on a JTable. What I am trying to accomplish is to highlight the row by a mouseclick,
    then from the menu bar I am having the user select a "delete row" option. I am working with an abstract
    Table Model with a deleteRow method. I know I am doing something wrong in this method but I'm not sure what... it is not deleting nor dynamically reflecting the deleted row of data on the JTable gui:
    P.S. I am using a Vector of Vectors to store the data
    Here are snippets of my main class and Abstract Table Model :
    Main Class
    Table definition and mouse listener:
    usermodel = new DataFileTableModel("UserCtl.dat") ;
    userTable = new JTable();
    userTable.setModel(usermodel);
    userTable.createDefaultColumnsFromModel();
    userTable.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent evt) {
    upoint = evt.getPoint();
    rowToBeDeleted = userTable.rowAtPoint(upoint);
    Menu Selection which calls the deleteRow Method in the model:
    deleteitem = new JMenuItem("Delete Row",'D');
    editmenu.add(deleteitem) ;
    deleteitem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int delresp = JOptionPane.showConfirmDialog(null,"Are you sure you wish to delete this row ?",null, JOptionPane.YES_NO_OPTION) ;
    switch(delresp) {
    case JOptionPane.NO_OPTION:
    return;
    case JOptionPane.YES_OPTION:
    switch (tabnum)
    case 0:
    usermodel.deleteRow(rowToBeDeleted);
    break ;
    Here is my Abstract Table Model... the deleteRow method is at the bottom:
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.util.*;
    public class DataFileTableModel extends AbstractTableModel {
    protected Vector data;
    protected Vector columnNames ;
    protected String datafile;
    public DataFileTableModel(String f){
    datafile = f;
    initVectors();
    public void initVectors() {
    String aLine ;
    data = new Vector();
    columnNames = new Vector();
    try {
    FileInputStream fin = new FileInputStream(datafile);
    BufferedReader br = new BufferedReader(new InputStreamReader(fin));
    // extract column names
    StringTokenizer st1 =
    new StringTokenizer(br.readLine(), "|");
    while(st1.hasMoreTokens())
    columnNames.addElement(st1.nextToken());
    // extract data
    while ((aLine = br.readLine()) != null) {
    StringTokenizer st2 =
    new StringTokenizer(aLine, "|");
    while(st2.hasMoreTokens())
    data.addElement(st2.nextToken());
    br.close();
    catch (Exception e) {
    e.printStackTrace();
    public int getRowCount() {
    return data.size() / getColumnCount();
    public int getColumnCount(){
    return columnNames.size();
    public String getColumnName(int columnIndex) {
    String colName = "";
    if (columnIndex <= getColumnCount())
    colName = (String)columnNames.elementAt(columnIndex);
    return colName;
    public Class getColumnClass(int columnIndex){
    return String.class;
    public boolean isCellEditable(int rowIndex, int columnIndex) {
    return true;
    public Object getValueAt(int rowIndex, int columnIndex) {
    return (String)data.elementAt( (rowIndex * getColumnCount()) + columnIndex);
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    data.setElementAt(aValue, (rowIndex * getColumnCount())+columnIndex) ;
    fireTableCellUpdated(rowIndex, columnIndex);
    public void addRow(Object[] aRow) {
    for (int i=0; i < aRow.length; i++)
    data.add(aRow);
    int size = getRowCount();
    fireTableRowsInserted(size-1,size-1);
    public void deleteRow(int rowNo)
         if (rowNo < 0 || rowNo >= getRowCount())
         return;
         int colCount = getColumnCount();
         int index = colCount * rowNo;
         System.out.println("in deleteRow Row = " + rowNo);
         System.out.println("colCount = " + colCount);
         System.out.println("index = " + index) ;
         for (int d = index; d <= colCount; d++)
         data.remove(d) ;
         fireTableRowsDeleted(rowNo,rowNo) ;

    Hi,
    I can see one obvious problem. Your method to delete contains
    for (int d = index; d <= colCount; d++)
    data.remove(d) ;
    which I think should be
    for (int d = index; d <= colCount; d++)
    data.remove(index) ;
    because every time you remove the value at 'index' it replaces it with the value at 'index+1'.
    I'm not sure that this is the only problem but ...
    Roger

  • How can I find out the date of a movie I am trying to pre-order if the date is not available/showing in the "manage pre-order" section?

    How can I find out the date of a movie I am trying to pre-order if the date is not available/showing in the "manage pre-order" section?

    Thanks so much for your reply King_Penguin. No, sadly there is not indication of the expected release date on the film, it's no where to be found. I have also tried to look in other places online, but no luck. I guess your latter statement jives more with my situation, that  being the studio/rights-holder hasn't feel inclined to provide the date.

  • For unknown reasons iTunes will no longer open.  I have an HP laptop running windows 7 with Kaspersky protection.  It worked fine before but now won't open.  I tried downloading the most recent up-date and it will still not open.  Any suggestions?

    For unknown reasons iTunes will no longer open.  I have an HP laptop running windows 7 with Kaspersky protection.  It worked fine before but now won't open.  I tried downloading the most recent up-date and it will still not open.  Any suggestions?

    thrillhousecody
    Thanks for the reply with additional information.
    Recent history for Premiere Elements points to the program having problems when more than 1 video card/graphics card is
    being used by the computer on which Premiere Elements is running. This observation may seem contra indicated by the fact
    that you say that the program did work well about 2 years ago in the same setup. But other factors may have set in with regard
    to drivers, drivers versions, and driver conflicts. But this factor, does need to be ruled in or out.
    Can you disable one or the other card to determine the impact of this on your problem?
    But, of prime concern with regard to video card/graphics card is the use of a NVIDIA GeForce card with Premiere Elements 10.
    Even if your NVIDIA GeForce were the only card, Premiere Elements 10 will not work properly unless the NVIDIA GeForce driver
    version is rolled back to about May 2013. This may be one of the major factors here.
    a. Device Manager/Display Adapters and find out Driver Version and Driver Date
    b. Read the background information for the Premiere Elements 10/NVIDIA GeForce issue
    ATR Premiere Elements Troubleshooting: PE10: NVIDIA Video Card Driver Roll Back
    Also see the Announcement at the top of this forum regarding the matter - also with full details of the situation and how to fix with the
    driver version roll back.
    Please review and consider and then we can decide what next.
    Thanks.
    ATR
    Add On...This NVIDIA GeForce situation is specific for Premiere Elements 10. You should not expect to see the problem for
    later versions of Premiere Elements.

  • My iPhone was stolen. I just got a new one and am trying to backup my contacts and data from iCloud. How do you do that?

    my iPhone was stolen. I just got a new one and am trying to backup my contacts and data from iCloud. How do you do that?

    If your backup is in iCloud, and your new iPhone is already set up, go to Settings>General>Reset, tap Erase All Content and Settings, then go throught the setup screens on the iPhone and when given the option, choose Restore from iCloud Backup and follow the prompts.  (If it isn't set up yet, just choose this option when setting it up.)
    Be sure your iPhone it connected to wifi and your charger while it is restoring the backup.

  • I've jail break Iphone 3GS. i tried to restore setting (erasing all data and media) without connecting to computer/itunes. When it starts it freezes by showing apple logo only. what is the solution.

    i've jail break Iphone 3GS. i tried to restore setting (erasing all data and media) without connecting to computer/itunes. When it starts it freezes by showing apple logo only. what is the solution. please help me out. Here i don't have iphone service center too.

    Although not illegal, Apple discourages a user from modifying the iPhone OS in any manner, including "jailbreaking".  Apple feels so strongly about this that discussing methods to assist a user trying to either jailbreak or "unjailbreak" an iPhone are prohibited.

  • Listing order and dates of my photos have all changed and now it is a mess in my photo library! I tried to list them again by date, but it didn't fix the problem. What to do?

    Listing order and dates of my photos have all changed and now it is a mess in my photo library! I tried to list them again by date, but it didn't fix the problem. What to do?

    If your preferences keep getting messed up try this:   make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    Happy Holidays

  • Why wont google chrome let me play you tube videos as all I get is a black scfeen with no control iocons??? ps help I've  but made n o diff. tried clearing cashe's  and browsing data but made no diff grrr

    why wont google chrome let me play you tube videos as all I get is a black scfeen with no control iocons??? ps help I've  but made n o diff. tried clearing cashe's  and browsing data but made no diff grrr

        Check  whether you are currently  in  YouTube HTML 5 trial?
         http://www.youtube.com/html5
        At the bottom  left of the page  uncheck the box for
       "You are currently in the HTML5 trial".

  • I am trying to write a double buffered data acquisition program using MFC and a callback function.

    i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?

    What DAQ board are you using? When you installed NI-DAQ you should have selected to install the support files for VC++. Then there will be several examples on how to do double buffered data acquisition.
    If you have already installed NI-DAQ 6.8 or higher and did not select to include the support files, you can run the NI-DAQ setup program and just add them. If you are using an older version, you will have to uninstall and reinstall.
    Once you have the support files, follow this path to the examples.
    >>Program Files>>National Instruments>>NI-DAQ>>Examaples>>Visual C>>
    If you are doing digital acquistion, goto the di folder, if you are doing analog acquisition goto the ai folder.
    As for the callback function, you can use the NI-DAQ function Config_DAQ_
    Event_Message with DAQEvent Type = 1, where N would equal half your buffer.
    Brian

  • Trying to subtract days from a date

    Im trying to subtract days from a date.
    When i use this query:
    select sysdate-:p21_DAYS_OLD from dual;
    it displays the correct date but not in the correct format. It is displaying 12-AUG-09 instead of 08/12/2009.
    I tried this query but i get the ORA-01722: invalid number error.
    select to_char(sysdate,'MM/DD/YYYY')-(:p21_DAYS_OLD) from dual;
    Can someone help me please?
    Deanna

    Dclipse03 wrote:
    Im trying to subtract days from a date.
    When i use this query:
    select sysdate-:p21_DAYS_OLD from dual;Just set the NLS_DATE_FORMAT parameter for your session and execute the above query.
    ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY'
    /

  • The last update failed on my window 7 pc, resulting in me having to try it manually download and install, this also failed leaving my I tunes not working, I tried restore back to a safer date, but every time it tried to update it failed. eventually i

    The last update failed on
    my window 7 home prermium pc, resulting in me having to try it manually download and install,
    this also failed leaving my I tunes not working, I tried restore back to a
    safer date, but every time it tried to update it failed. eventually it told me
    to delete and reinstall, this fails due to the apple mobile device service
    failing to start, and asking me if I have sufficient privileges to start system
    service, I have tried all suggestions on iTunes page, ie delete everything to
    do with apple, and start as administrator, nothing works, help please

    I too have tried the latest iTunes (12.1.1.4) in Win7. I did a search for latent drivers as you noted but found none. I am glad it worked for you - I'm still no-joy at this point. I'm able to install AMDS over and over again, without issue - it just doesn't start then iTunes launch fails with Error 7. I have to manually remove it.
    I am able to connect my iPhone via USB cable and access my photo storage on the phone. I am just not able to install iTunes anymore. I have attempted resolution to this issue for almost two months now. Until that time, I was content with what was installed. It was only when the proverbial update box appeared that I attempted to 'update' my iTunes. WHAT A MISTAKE putting blind faith into an Apple request to update. I SUGGEST NOT TO UPDATE YOUR ITUNES IF IT IS RUNNING PROPERLY!
    I realize now, once again I might add, my reliance on software provided by others. It's like anything else, I shouldn't rely on just one method for anything. Time to search for a more pleasant alternative than Apple. Truly, when it worked, it was good at its job, but now that I am wasting time I am looking seriously at upgrading to another type of smartphone and media management software. Way too much trouble for anything as simple as this should be. I wonder, is this a result of another feud with Microsoft?

  • How to scale 32-bit signed integer data to floating-p​oint voltage when acquring data in DAQmx by PXI4472?

    I acquired data in DAQmx by PXI4472. For the high speed data logger, I used "DAQmx Read" to read unscaled 32-bit signed integer data.
    Now, my question is how to scale 32-bit signed integer data to floating-point voltage?
    I think that it's (20/(2**24))*I32 because the voltage range of PXI4472 is -10 to +10 and its resolution is 24 bits. But I cann't get correct voltage by that formula.

    While you could hard code the scaling factor, it will be more flexible if you retrieve the scaling coefficients from the driver. To do this, you need to use the Analog Input>>General Properties>>Advanced>>Device Scaling Coefficients>>Device Scaling Coefficients properties under the DAQmx Channel Property Node. Look at the documentation for this property to see how it can be used to create a polynomial equation for scaling to volts.
    Since you are creating a data logging solution, you may want to consider using a compressed data stream from the driver instead of the I32 data type. This will allow you to read the data back as a stream of u8's instead. Since the PXI-4472 is 24 bits, you will only have to write 3 bytes to disk for each sample instead of 4. You can check out the following examples for how to create an application using this compressed data stream. It also shows how to use the scaling coefficients to transform the unscaled data back to voltage values.

  • I'm trying to lean my ipad of data back to original status but my passwords don't work

    I'm trying to clean my ipad of data back to original status but my passwords don't work

    What exactly are you attempting to accomplish?
    It sounds like you want to restore your iPad to factory settings.
    You'll need your Apple ID and password associated with the data on the iPad to do any restores.

Maybe you are looking for

  • HT1414 Hi team, my iPhone 3gs has no service

    Hi team, my iPhone 3gs has no service. How I can resolve this problem

  • I updated my macbook air software and somehow my startup disk is full.

    I have about 50Gigs of "other". How do I fix this. The "other" are not things that belong to me as I do not store anything on my macbook... As a result I keep getting "startup disk full" error messages and I cannot download the newest update or the n

  • My profile for my line has changed

    Hi, So i had fibre optic fitted from talktalk on 29th feb in the uk and when i first got it speeds were great in the 35 meg region, but now it's dropped to around 30.08 megs ,we had a faulty oven in the house that would trip the power could that be w

  • How can a Java server receive a text message?

    Through what mechanism can a Java server receive an incoming text message sent to a particular phone number? How would the server associate itself with that phone number, and what physical devices and APIs would be involved in processing the text mes

  • JSR 168 consumer vs iPlanet 4.1

    Hi, Does anyone have experience with implementation of JSR 168 consumer in iPlanet 4.1? Is it supported by Plumtree? Thanks Tomas