Working with NIO and non-NIO sockets

Hello,
Trying to write a network manager kind of program where the client initiates a number of connections to different servers. Need to manage these connections through the life time of the session ( time the client is connected to the server). The client connections originate from a single machine, the servers are geographically distributed and about 1 to 5 connections between each client and server.
I have tried and example NIO client/server application and it works fine. I have tried the KnockKnock client/server example it works. But when I try to use the NIO client with the multithreaded knockknock server, the socket connection goes through okay. However the data written to socket channel on the client(NIO) side doesn't seem to reach the server(non-NIO). I can't change the servers since they already exist in the field. I am just trying to write the manager application to manage them.
Basically I am trying to avoid writing a multithreaded socket connection management program.
Thanks for any input.

Not the greatest NIO code. The author seems unaware that closing a channel also cancels all its selection keys so he laboriously programs both operations every time he needs to close the channel. His discussion of OP_CONNECT makes little sense: the important point is that OP_CONNECT is only used in the connection phase and OP_WRITE is only used in the connected phase.
His code registers the channel for OP_WRITE as soon as the connection completes, when there is no pending data to write. This will just cause the selector to spin uselessly doing nothing. The channel should be registered with zero interest-ops and OP_WRITE should be registered when there is something to write, i.e. during the send() operation; and it should be deregistered when the write has completed successfully and there is no more data to write.

Similar Messages

  • Lucreate not working with ZFS and non-global zones

    I replied to this thread: Re: lucreate and non-global zones as to not duplicate content, but for some reason it was locked. So I'll post here... I'm experiencing the exact same issue on my system. Below is the lucreate and zfs list output.
    # lucreate -n patch20130408
    Creating Live Upgrade boot environment...
    Analyzing system configuration.
    No name for current boot environment.
    INFORMATION: The current boot environment is not named - assigning name <s10s_u10wos_17b>.
    Current boot environment is named <s10s_u10wos_17b>.
    Creating initial configuration for primary boot environment <s10s_u10wos_17b>.
    INFORMATION: No BEs are configured on this system.
    The device </dev/dsk/c1t0d0s0> is not a root device for any boot environment; cannot get BE ID.
    PBE configuration successful: PBE name <s10s_u10wos_17b> PBE Boot Device </dev/dsk/c1t0d0s0>.
    Updating boot environment description database on all BEs.
    Updating system configuration files.
    Creating configuration for boot environment <patch20130408>.
    Source boot environment is <s10s_u10wos_17b>.
    Creating file systems on boot environment <patch20130408>.
    Populating file systems on boot environment <patch20130408>.
    Temporarily mounting zones in PBE <s10s_u10wos_17b>.
    Analyzing zones.
    WARNING: Directory </zones/APP> zone <global> lies on a filesystem shared between BEs, remapping path to </zones/APP-patch20130408>.
    WARNING: Device <tank/zones/APP> is shared between BEs, remapping to <tank/zones/APP-patch20130408>.
    WARNING: Directory </zones/DB> zone <global> lies on a filesystem shared between BEs, remapping path to </zones/DB-patch20130408>.
    WARNING: Device <tank/zones/DB> is shared between BEs, remapping to <tank/zones/DB-patch20130408>.
    Duplicating ZFS datasets from PBE to ABE.
    Creating snapshot for <rpool/ROOT/s10s_u10wos_17b> on <rpool/ROOT/s10s_u10wos_17b@patch20130408>.
    Creating clone for <rpool/ROOT/s10s_u10wos_17b@patch20130408> on <rpool/ROOT/patch20130408>.
    Creating snapshot for <rpool/ROOT/s10s_u10wos_17b/var> on <rpool/ROOT/s10s_u10wos_17b/var@patch20130408>.
    Creating clone for <rpool/ROOT/s10s_u10wos_17b/var@patch20130408> on <rpool/ROOT/patch20130408/var>.
    Creating snapshot for <tank/zones/DB> on <tank/zones/DB@patch20130408>.
    Creating clone for <tank/zones/DB@patch20130408> on <tank/zones/DB-patch20130408>.
    Creating snapshot for <tank/zones/APP> on <tank/zones/APP@patch20130408>.
    Creating clone for <tank/zones/APP@patch20130408> on <tank/zones/APP-patch20130408>.
    Mounting ABE <patch20130408>.
    Generating file list.
    Finalizing ABE.
    Fixing zonepaths in ABE.
    Unmounting ABE <patch20130408>.
    Fixing properties on ZFS datasets in ABE.
    Reverting state of zones in PBE <s10s_u10wos_17b>.
    Making boot environment <patch20130408> bootable.
    Population of boot environment <patch20130408> successful.
    Creation of boot environment <patch20130408> successful.
    # zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    rpool 16.6G 257G 106K /rpool
    rpool/ROOT 4.47G 257G 31K legacy
    rpool/ROOT/s10s_u10wos_17b 4.34G 257G 4.23G /
    rpool/ROOT/s10s_u10wos_17b@patch20130408 3.12M - 4.23G -
    rpool/ROOT/s10s_u10wos_17b/var 113M 257G 112M /var
    rpool/ROOT/s10s_u10wos_17b/var@patch20130408 864K - 110M -
    rpool/ROOT/patch20130408 134M 257G 4.22G /.alt.patch20130408
    rpool/ROOT/patch20130408/var 26.0M 257G 118M /.alt.patch20130408/var
    rpool/dump 1.55G 257G 1.50G -
    rpool/export 63K 257G 32K /export
    rpool/export/home 31K 257G 31K /export/home
    rpool/h 2.27G 257G 2.27G /h
    rpool/security1 28.4M 257G 28.4M /security1
    rpool/swap 8.25G 257G 8.00G -
    tank 12.9G 261G 31K /tank
    tank/swap 8.25G 261G 8.00G -
    tank/zones 4.69G 261G 36K /zones
    tank/zones/DB 1.30G 261G 1.30G /zones/DB
    tank/zones/DB@patch20130408 1.75M - 1.30G -
    tank/zones/DB-patch20130408 22.3M 261G 1.30G /.alt.patch20130408/zones/DB-patch20130408
    tank/zones/APP 3.34G 261G 3.34G /zones/APP
    tank/zones/APP@patch20130408 2.39M - 3.34G -
    tank/zones/APP-patch20130408 27.3M 261G 3.33G /.alt.patch20130408/zones/APP-patch20130408

    I replied to this thread: Re: lucreate and non-global zones as to not duplicate content, but for some reason it was locked. So I'll post here...The thread was locked because you were not replying to it.
    You were hijacking that other person's discussion from 2012 to ask your own new post.
    You have now properly asked your question and people can pay attention to you and not confuse you with that other person.

  • Working with Confirmed and Non Confirmed Dimensions

    The actual need for my situation is I have two facts F1 and F2 and Four Dimensions D1, D2, D3, D4
    D1 is a confirmed Dimension
    D2, D3 are joined to F1 and D4 to F2 according to the star schema . I need a report which has D1, D2, D3, D4 , F1. Is this possible ?
    Method applied : I added a new logical table source to F1 and pointed it to F2. I pulled in all the required dimensions and created a new logical folder with F1, D1,D2,D3,d4 . I created a logical join from D4 to F1 in BMM layer . The rest of dimensions are already connected to F1.
    Now when i run the report the i get null values when i pull in D4 and F1 which is logically correct but when i try to run the report D1,D2,D3,D4,F1 it returns an error ? Should i need to include even F2 in my report ?

    I actually have an out of box RPD which has defined hierarchies only for certain dimensions. Is it a good practice to define hierarchies for all the dimensions ?
    can't we establish the report D1,D2,D3,D4,F1 without the hierarchies ?
    For the present RPD we have hierarchy defined only for D3 . Reports running on the present subject areas are working perfectly fine even without the hierarchies. Only when i am trying to span across different subject areas i get errors.
    Could you throw more light on the difference it would make if i defined hierarchies for all the dimensions.

  • Re: Working with Confirmed and Non Confirmed Dimensions

    I want to make a report with columns from Lot_D, Lot_Grade_D dimensions and measures from Lot_Quantity_F and Stock_F facts, did the following steps but unable to get the required result
    - two facts Stock_F and Lot_Quantity_F, Lot_D dimension is conformed whereas Lot_Grade_D is connected with Lot_Quantity_F only.
    - made the joins on physical layer between Stock_F and Lot_D and than among Lot_Quantity_F, Lot_D and Lot_Grade_D.
    - dragged all the four objects in BMM (now four BMM objects with relevant source in physical)
    - created level-based hierarchies for Lot_D and Lot_Grade_D in BMM
    - set the Stock_F measure column under Levels tab to Total level for Lot_Grade_D dimension
    - set the Logical Level in the Content tab of Stock_F to Detail level for Lot_D dimension
    - set the Logical Level in the Content tab of Lot_Quantity_F to Detail level for Lot_D and Lot_Grade_D dimensions
    - dragged all the BMM objects in presentation layer
    created the report based on flat dimensions (not Hierarchical dimensions)
    Looking for a quick response
    regards
    Farooq

    Follow The Below Steps
    1) Add the Stcok_F and LOT_Q_F as LTS in BMM .
    2) Join this LTS to both the dimensnons Lot_d and Lot_Grade_D
    3)Open the Stock_F in LTS and go to Content tab.Set the Lot_Grade_d to total and Lot_d to Detail
    4)Open the LOT_Q_F LTS and set the levels to detail.
    5)Open the Individual columns coming from Stock_F and set the level for lot_grade_d to Detail.

  • Wierdness with NIO socket on Solaris 2.10 part I

    i tried the following NioClient and MockServer, and saw some weird behavior.
    1. If i run both the client and server on the same machine on Windows, the client connects to the server, queries the instrument and gets the list of instruments back.
    2. if i run both client and server on the same Solaris 2.10 box, the NioClient doesn't get anything back from the MockServer, not even an ACCEPT
    3. if i run the client and the server on different solaris 2.10 machines, they work fine.
    have anyone seen this before? can sometone sheds some lights?
    import java.net.*;
    import java.io.*;
    public class MockServer
         public static int counter = 2;
        public static void main(String[] args) throws IOException {
             int portNumber = Integer.parseInt(args[0]);
            ServerSocket serverSocket = null;
            try {
                serverSocket = new ServerSocket(portNumber);
            } catch (IOException e) {
                System.err.println("Could not listen on port: " + portNumber);
                System.exit(1);
             System.out.println ("Listening on socket " + portNumber);
            do {             
                 Socket clientSocket = null;
                 try {
                     clientSocket = serverSocket.accept();
                     System.out.println ("starting a new client....");
                     MyThread mt = new MyThread (clientSocket);
                     mt.run ();
                 } catch (IOException e) {
                     System.err.println("Accept failed.");
                     System.exit(1);
            while (true);
    class MyThread
         private final Socket clientSocket;
         MyThread (Socket clientSocket)
              this.clientSocket = clientSocket;
         public void run ()
            new Thread (new Runnable () {
                     public void run ()
                          try
                               boolean instrumentquery = false;
                               PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
                               BufferedReader in = new BufferedReader(
                                           new InputStreamReader(
                                           clientSocket.getInputStream()));
                               String inputLine;                          
                               String successoutputLine =
                                    "<?xml version=\"1.0\" encoding=\"UTF-8\"?><return><returncode>success</returncode><detail>everything is good</detail></return>";
                               String failoutputLine =
                                    "<?xml version=\"1.0\" encoding=\"UTF-8\"?><return><returncode>failure</returncode><detail>something is not good</detail></return>";
                               String instrumentsoutput =
                                    "<?xml version=\"1.0\" encoding=\"UTF-8\"?><instruments><instrument><contract>usg-505Y</contract><cusip>12131121</cusip><deactivated>false</deactivated><halted>false</halted></instrument><instrument><contract>usg-305Y</contract><cusip>121312342</cusip><deactivated>false</deactivated><halted>false</halted></instrument></instruments>";
                               while ((inputLine = in.readLine()) != null) {
                                    System.out.println ("Receiving the following" + inputLine);
                                    if (inputLine.contains("queryInstrument")) instrumentquery = true;
                                    if (inputLine.contains("</a>"))
                                         if (instrumentquery)
                                              instrumentquery = false;
                                              System.out.println ("Sending " + instrumentsoutput);
                                              out.println (instrumentsoutput);
                                         else
                                              if ((MockServer.counter % 2) == 0)
                                                   System.out.println ("Sending " + successoutputLine);
                                                   out.println(successoutputLine);
                                              else
                                                   System.out.println ("Sending " + failoutputLine);
                                                   out.println(failoutputLine);
                                              MockServer.counter++;
                               out.close();
                               in.close();
                               clientSocket.close();}
                          catch (Exception ex)
                 }).start (); }
    }please see topic "wierdness with NIO socket on Solaris 2.10 part II" for the NioClient code as the maximum per topic is 5000.

    code for NioClient.java
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import java.nio.ByteBuffer;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.nio.channels.spi.SelectorProvider;
    import java.util.*;
    public class NioClient implements Runnable {
    private InetAddress hostAddress;
    private int port;
    private Selector selector;
    private ByteBuffer readBuffer = ByteBuffer.allocate(8192);
    private List pendingChanges = new LinkedList();
    private Map pendingData = new HashMap();
    private Map rspHandlers = Collections.synchronizedMap(new HashMap());
    public NioClient(InetAddress hostAddress, int port) throws IOException {
    this.hostAddress = hostAddress;
    this.port = port;
    this.selector = this.initSelector();
    public void send(byte[] data, RspHandler handler) throws IOException {
    SocketChannel socket = this.initiateConnection();
    this.rspHandlers.put(socket, handler);
    synchronized (this.pendingData) {
    List queue = (List) this.pendingData.get(socket);
    if (queue == null) {
    queue = new ArrayList();
    this.pendingData.put(socket, queue);
    queue.add(ByteBuffer.wrap(data));
    this.selector.wakeup();
    public void run() {
    while (true) {
    try {
    synchronized (this.pendingChanges) {
    Iterator changes = this.pendingChanges.iterator();
    while (changes.hasNext()) {
    ChangeRequest change = (ChangeRequest) changes.next();
    switch (change.type) {
    case ChangeRequest.CHANGEOPS:
    SelectionKey key = change.socket
    .keyFor(this.selector);
    key.interestOps(change.ops);
    break;
    case ChangeRequest.REGISTER:
    change.socket.register(this.selector, change.ops);
    break;
    this.pendingChanges.clear();
    this.selector.select();
    Iterator selectedKeys = this.selector.selectedKeys().iterator();
    while (selectedKeys.hasNext()) {
    SelectionKey key = (SelectionKey) selectedKeys.next();
    selectedKeys.remove();
    if (!key.isValid()) {
    continue;
    if (key.isConnectable()) {
    this.finishConnection(key);
    } else if (key.isReadable()) {
    this.read(key);
    } else if (key.isWritable()) {
    this.write(key);
    } catch (Exception e) {
    e.printStackTrace();
    private void read(SelectionKey key) throws IOException {
    SocketChannel socketChannel = (SocketChannel) key.channel();
    this.readBuffer.clear();
    int numRead;
    try {
    numRead = socketChannel.read(this.readBuffer);
    } catch (IOException e) {
    key.cancel();
    socketChannel.close();
    return;
    if (numRead == -1) {
    key.channel().close();
    key.cancel();
    return;
    this.handleResponse(socketChannel, this.readBuffer.array(), numRead);
    private void handleResponse(SocketChannel socketChannel, byte[] data,
    int numRead) throws IOException {
    byte[] rspData = new byte[numRead];
    System.arraycopy(data, 0, rspData, 0, numRead);
    RspHandler handler = (RspHandler) this.rspHandlers.get(socketChannel);
    if (handler.handleResponse(rspData)) {
    socketChannel.close();
    socketChannel.keyFor(this.selector).cancel();
    private void write(SelectionKey key) throws IOException {
    SocketChannel socketChannel = (SocketChannel) key.channel();
    synchronized (this.pendingData) {
    List queue = (List) this.pendingData.get(socketChannel);
    while (!queue.isEmpty()) {
    ByteBuffer buf = (ByteBuffer) queue.get(0);
    socketChannel.write(buf);
    if (buf.remaining() > 0) {
    break;
    queue.remove(0);
    if (queue.isEmpty()) {
    key.interestOps(SelectionKey.OP_READ);
    private void finishConnection(SelectionKey key) throws IOException {
    SocketChannel socketChannel = (SocketChannel) key.channel();
    try {
    socketChannel.finishConnect();
    } catch (IOException e) {
    System.out.println(e);
    key.cancel();
    return;
    key.interestOps(SelectionKey.OP_WRITE);
    private SocketChannel initiateConnection() throws IOException {
    SocketChannel socketChannel = SocketChannel.open();
    socketChannel.configureBlocking(false);
    socketChannel
    .connect(new InetSocketAddress(this.hostAddress, this.port));
    synchronized (this.pendingChanges) {
    this.pendingChanges.add(new ChangeRequest(socketChannel,
    ChangeRequest.REGISTER, SelectionKey.OP_CONNECT));
    return socketChannel;
    private Selector initSelector() throws IOException {
    return SelectorProvider.provider().openSelector();
    public static void main(String[] args) {
    try {
    System.out.println ("the host name is " + args[0]);
    NioClient client = new NioClient(
    InetAddress.getByName(args[0]), 4444);
    Thread t = new Thread(client);
    t.setDaemon(true);
    t.start();
    RspHandler handler = new RspHandler();
    client.send(
    "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a><queryInstrument/></a>\n"
    .getBytes(), handler);
    handler.waitForResponse();
    } catch (Exception e) {
    e.printStackTrace();
    }

  • [svn:bz-trunk] 16395: Bug: #2621264 [Regression] Small messages not working with NIO-HTTP endpoints in LCSD/trunk.

    Revision: 16395
    Revision: 16395
    Author:   [email protected]
    Date:     2010-06-02 05:00:56 -0700 (Wed, 02 Jun 2010)
    Log Message:
    Bug: #2621264 Small messages not working with NIO-HTTP endpoints in LCSD/trunk.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: This is the BlazeDS side of the fix. This wasn't a regression, it probably never worked correctly. So, in the scenario where there's a Producer and a Consumer, and Producer sends a message for the Consumer, there are 2 messages from the server. The ACK message for Producer's send, and the actual message Consumer receives. I found that the ACK message was in small form, but the actual message was not in streaming messages. This was because we never really tried to convert streamed messages into small messages before.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/StreamingAMFEndpoint.java
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/StreamingHTTPEndpoint.java

  • Dear Apple's people, please note that "Lightning to 30 pin Adapter" don't work with iPhone5 and iPhone5s "Base Dock"  !!!!

    Dear Apple's people, please note that "Lightning to 30 pin Adapter" don't work with iPhone5 and iPhone5s "Base Dock"  !!!!

    Ho comprato un adattatore originale Apple "lighitning to 30 pin adapter" per poter usare i mei vecchi cavi dell'iPhone4 con il nuovo iPhone5.
    Se collego l'adattatore (con il vecchio cavo delliPhone4) direttamente all'iPhone5 , tutto funziona.
    Ma se collego l'adattatore (con il vecchio cavo delliPhone4) all'iPhone5 tramite la "base dock" , l'adattatore non viene riconosciuto e non funziona.
    Pensando che l'adattatore fosse rotto, ho riprovato con altri identici adattatori originali, ma il risultatato è lo stesso.
    Quindi penso che potrebbe essere un errore di progettazione della base dock che supporta unicamente la connessione diretta tramite un cavo lighning e non supporta la connessione se in mezzo c'è l'adattatore !!

  • Internal table with Dynamic and Non dynamic fileds

    Hi Experts,
    How to get the internal table with Dynamic and Non-Dynamic Fields.
    Could u please help me.
    Thanks,
    Varun

    Hi,
       Execute the below sample code or analyze it there is appropriate description provided.
    *& Report  ZTEST_PRM_DYN_ALV
    REPORT  ZTEST_PRM_DYN_ALV.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
    <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
    it_fldcat type lvc_t_fcat.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_flds(5) type c.
    selection-screen end of block b1.
    start-of-selection.
    *build the dynamic internal table
    perform build_dyn_itab.
    *write 5 records to the alv grid
    do 5 times.
    perform build_report.
    enddo.
    *call the alv grid.
    perform call_alv.
    *Build_dyn_itab
    form build_dyn_itab.
    data: new_table type ref to data,
    new_line type ref to data,
    wa_it_fldcat type lvc_s_fcat.
    *Create fields .
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = 'name1'.
    wa_it_fldcat-datatype = 'mara-matnr'.
    wa_it_fldcat-intlen = 5.
    append wa_it_fldcat to it_fldcat .
    *clear wa_it_fldcat.
    wa_it_fldcat-fieldname = sy-index.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 5.
    append wa_it_fldcat to it_fldcat .
    do p_flds times.
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = sy-index.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    append wa_it_fldcat to it_fldcat .
    enddo.
    *Create dynamic internal table and assign to FS
    call method cl_alv_table_create=>create_dynamic_table
    exporting
    it_fieldcatalog = it_fldcat
    importing
    ep_table = new_table.
    assign new_table->* to <dyn_table>.
    *Create dynamic work area and assign to FS
    create data new_line like line of <dyn_table>.
    assign new_line->* to <dyn_wa>.
    endform.
    *Form build_report
    form build_report.
    data: fieldname(20) type c.
    data: fieldvalue(5) type c.
    data: index(3) type c.
    field-symbols: <fs1>.
    do p_flds times.
    index = sy-index.
    *Set up fieldvalue
    concatenate 'FLD' index into
    fieldvalue.
    condense fieldvalue no-gaps.
    assign component index of structure <dyn_wa> to <fs1>.
    <fs1> = fieldvalue.
    enddo.
    *Append to the dynamic internal table
    append <dyn_wa> to <dyn_table>.
    endform.
    *CALL_ALV
    form call_alv.
    data: wa_cat like line of alv_fldcat.
    *clear wa_cat.
    wa_cat-fieldname = 'matnr'.
    wa_cat-seltext_s = sy-index.
    wa_cat-outputlen = '10'.
    append wa_cat to alv_fldcat.
    do p_flds times.
    clear wa_cat.
    wa_cat-fieldname = sy-index.
    wa_cat-seltext_s = sy-index.
    wa_cat-outputlen = '6'.
    append wa_cat to alv_fldcat.
    enddo.
    *Call ABAP List Viewer (ALV)
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    it_fieldcat = alv_fldcat
    tables
    t_outtab = <dyn_table>.
    endform.
    Hope this will help, reward if found usefull.
    Cheers,
    Ram.

  • NXT Flatten to String Not Working with Clusters and Arrays

    Hello,
    My name is Joshua and I am from the FIRST Tech Challenge Team 4318, Green Machine. We are trying to write a program that will write to a configuration file and read it back. The idea is that we will be able to write to a config file from our computer that will be read by our autonomous program when it runs. This will define what the autonomous program does.
    The easiest way to do this seems to be flattening a data structure to a string, saving it to a file, and then reading back and unflattening it. The issue is that the flatten to string and unflatten from string VIs don't seem to work with arrays and clusters on the NXT. It does work when running on the computer. We've tried arrays, clusters, clusters in arrays and arrays in clusters, none seem to work. Thinking it was something to do with reading the string from a file, we tried bypassing the file functionality, still not working. It does work with basic data types though, such as strings and numbers.
    No error is thrown from what we can tell. All you get is a blank data structure out of the unflatten VI.
    The program attached is a test program I've been working on to get this functionality to work. It will display the hex content of what is going into the file, coming out of the file, and then the resulting data from the unflatten string, as well as any errors that have been thrown. The data type we are using simulates what we would like to store. There is also a file length in and out counter. The out file is a little larger because the NXT write file VI adds a new line character on to the end (thus the use of the strip white space VI). This character was corrupting even basic data types saved to file.
    I would like to know if there is a problem with what we are doing, or if it is simply not possible to flatten arrays on the NXT. Please ask if you have any questions about the code. Thank you in advanced!
    Joshua
    Attachments:
    ReadableTest.vi ‏20 KB

    Hi jfireball,
    This is a very interesting situation. Take a look at what kbbersch said. I also urge you to post in the FTC Forums. You posted your question to the general LabVIEW forums, but by posting to the FTC Forums, you will have access to others that are using the NXT hardware.
    David B.
    Applications Engineer
    National Instruments

  • User Contributed Tips, PowerBook G3 Working with Power and Battery, PB G3

    *The following User Contributed Tips are located in the PowerBook G3 > Working with Power and Battery on a PowerBook G3 forum:*
    None at this time.
    *The following related tips are located in other areas of Apple Discussions:*
    neuroanatomist - Apple notebook batteries – maintenance and troubleshooting
    http://discussions.apple.com/thread.jspa?threadID=1764220
    Publish date: Oct 23, 2008
    See Also User Tips Library

    No it hasn't. What kind of battery does it use?
    The power battery is dead as well (not charging nor powering the pb)

  • FaceTime no longer working with Yosemite and IOS 8.1

    I have used FaceTime flawlessly for some time with no issue.
    After I upgraded to Yosemite on my MacBookAir and IOS8.1 on 5S and iPad air, I've had a problem connecting.
    When I get a call, all the devices ring (as they should) but it will not connect on the first device I pick up on.  It says connecting
    but all the other devices keep ringing and finally it says I have a missed call.  The connection does not happen.  If I turn off
    all devices except one, it will work...... do we have a bug here??

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Hi ron1098,
    Try my application Dates to iCal. it runs on the Mac, but you can sync the calendar to your iOS device.
    See more about Dates to iCal here. It is £4 shareware with a 2 week demo.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Support Communities Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Handoff not working with Yosemite and iOS 8

    I have three Macbook Pros in my household.  Two are mid 2012 models and the other a late 2012 model.  Each is supposed to support the handoff feature of Yosemite and ios8.  Everything seems to work properly between my daughter's late 2012 MBP and her iPhone 6.  But on the other two MBPs in our family the continuity feature does not work on either of them.  Receiving and sending calls works fine.  But the continuity does not work even though all three MBPs and all three iPhone 6 are on the same wifi network.
    I've tried all the suggestions that I could find.  Toggling off and on the various settings on the MBPs and the iPhones.
    John

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.  Will Time Capsule work with this and how?

    I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.
    1. Will Time Capsule work with this and how?
    2. Can my printer USB be plugged in and then shared between the devices?
    3. Can I create a network and how?
    4.  What happend when a visitor logs onto my existing wireless router?
    I'm new to Macs (well a returning user having started with Mac Plus!!) and not very technical.  Any help / advice will be much appreciated.
    Ray

    The key to what you seem to want to do is to be able to get Apple's Time Capsule router to "join" the network that your Conceptronic router.  I believe that works with some third-party routers, but I've never seen a list of those that work in such a configuration and I have no experience with Conceptronic equipment.
    You might be better off with a Network-Attached Storage (NAS) device instead of a Time Capsule.

  • I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    velma Monreal wrote:
    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
    Yes you can. In iPhoto create a Album with the photos you want in it. You can drag them from your Events folder. In iTunes with your iPad connected go to Photos by cliking on your iPad. You can then select the album or events you want.

  • Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click w

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

Maybe you are looking for

  • Need help to choose a DAQ for simultaneous sampling

    We need to choose a DAQ for simultaneous sampling. The restrictions are: a) 2 channels b) The signals on both channels are not continuous. A valid input on the channels is signaled by a falling edge in a third line that can be used as a trigger. c) T

  • How can I creat a dynamic chart legend?

    Will,I want to show multi hosts' dynamic CPU performance (the host ip can be changed).I use those code below for a test: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" backgroundColor="0xFFFFFF" initialize="init()">    

  • Help - How to compress a 4x3 project shot as wide screen

    Hello everyone,  I've shot a short promo on my old PD150 which is naturally a 4x3 format.  However, I use the camera setting that adds a crop top and bottom to make it 16x9.  I import it to final cut pro and cut it as a 16 x 9 sequence. It works fine

  • Low Bandwidth

    Hi, I have cisco 2950 24 port switch and Cisco pix 506E firewall. here are my network design swtich -- port 2/3 Vlan 2(public Vlan) rest of the port on Vlan 5(private Vlan) Internet pipe(1 mbps brustable to 10MB) connected to port 2(public VLAN) Pix

  • Unable to install VIA 4in1

    Hey everyone, I just purchased a 2nd hand mainboard (MSI KT3 Ultra Series, MS-6380E v1.X) but unfortunately I cannot install the chipset drivers from the cd as I do not have the series number required. So I downloaded the 4 in 1 VIA download from MSI