Sockets .. IO controlling TCP frame length and number of packets

Here's the deal, I'm trying to develop a proxy for this application, an application wich is registred and can only be used from a specific host. I want to do it from another location, so I am writing a proxy.
This should be trivial. But it has proven not to be!
1. I am using java.net.Socet and ServerSocket
2. I am using DataInput/OutputStream writeByte/readByte
3. flushing after each byte OR not, same result
It is not working, I GET the data just fine, and transmit it just fine, but the server doesnt respond.
With a network sniffer, the only difference I can see is that with the original application (C++) only ONE TCP packet is transmitted over the network length = 52
With my proxy TWO TCP packets is transmitted first LEN=1 and second LEN=51 for a grand total of the exact data ..
So all other things being equal, im thinking that this must be my issue!
Anyway I can deal with this ?
Any ideas welcome!
ps. tried .setBuffer .noTcpDelay etc. and gotten the same results .... perhaps nio gives more options ?
Thanks.

Your network "sniffer" operates at a lower level than you application. The differences in Ethernet frame that you are detecting with the network sniffer should not change the behavior of your TCP/IP application because, at the sockets programming level, the TCP stream has no boundaries.
I have noticed the behavior in Java that you mention. I think I have seen it in the implementation of java.io.DataOutputStream.writeBytes(String), where they write the bytes one-byte-at-a-time and your get this side-effect. The source for that method looks like:
    public final void writeBytes(String s) throws IOException {
        int len = s.length();
        for (int i = 0 ; i < len ; i++) {
            out.write((byte)s.charAt(i));
        incCount(len);
    }What happens is that in that first call to out.write(), the something decides to send the one byte right away, and only on the second and third bytes does something (not sure if it is Java or TCP/IP) see that it is piling up and attempt to bunch up the bytes into a single frame.
If you, the the Java programmer, wanted to avoid this, you would have to avoid all use of writeBytes(String s) and convert your String's to byte arrays explicitly, and then only call write(byte[] b, int off, int len), but all this should change it what you see in your network sniffer, not how the application behaves.

Similar Messages

  • IMAQdr - Frame, trigger and grab control.

    Ok, so I have DALSA camera connected to my PC and the connection works fine. Im trying to figure out how to control the frame, trigger and grab attribiutes. My camera is comptaible with LabView. I checked some VIs in the Find Example section but these are too complicated for me. Any help would be appreciate.
    Kind Regards,
    Peter 

    Here is something to get you started. Let me know if it helps.
    Attachments:
    IMAQdx.png ‏21 KB

  • Sockets, multicast/broadcast, UDP, TCP, SO_REUSEADDR, SO_REUSEPORT and SO_EXCLUSIVEADDRUSE

    EDIT: the topic was moved to https://social.msdn.microsoft.com/Forums/vstudio/en-US/6b0fbcbc-1139-4d7a-a62a-a5b16a6e0229/sockets-multicastbroadcast-udp-tcp-soreuseaddr-soreuseport-and-soexclusiveaddruse?forum=wcf .
    Hello,
    in the project Dao (https://github.com/daokoder/dao) we got stuck upon a problem with a wrapper interface for bind(), which should be multiplatform (work on all Windows versions from XP higher and also on BSDs and also other POSIX systems) and offer the
    following two options:
    1) A safe bind of one socket, one address (specific or wildcard) and one port such that no other process (disregarding the user the process runs under and disregarding user privileges) could be successful with a call to bind() on the same socket with the
    same address and the same port.
    2) A bind with allowing multicast/broadcast, reuse of address, port and all these disregarding the state of the socket (e.g. TIME_WAIT) and disregarding the type of connection (UDP, TCP). In other words, the behavior should be the same a the behavior of
    BSD sockets in all cases and under all conditions.
    The main differences between BSD and Windows are conveniently described on http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t . According to that, one would say that a solution:
    1) For BSD "0" and for Windows "SO_EXCLUSIVEADDRUSE"
    2) For BSD "SO_REUSEPORT | SO_REUSEADDR" and for Windows "SO_REUSEADDR"
    is enough. But it's not true. For example due to Enhanced Socket Security and their behavior described in the table http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx (after first call to bind() with wildcard address and SO_REUSEADDR
    set, a second call to bind() with non-wildcard address and SO_REUSEADDR set will fail with error WSAEACCES).
    A solution might be to gather all the needed information (like user id, if there are any processes using that particular socket and if a call to connect() was already issued in case of TCP) and according to this information use the right mix of options SO_REUSEADDR,
    SO_EXCLUSIVEADDRUSE and others if needed. We didn't find though enough documentation about where to get all the needed information. Note that this solution would need an atomic query on socket (for all the information) in conjunction with a call to bind().
    Another solution could be to call bind() with different flags and decide upon the return error codes. This is though a nasty hack we would like to avoid.
    The question for you is, if you happen to know about any better solution than the ones mentioned above. There is a public discussion about this problem starting with comment https://github.com/daokoder/dao/issues/243#issuecomment-60434078 .
    Thank you in advance!

    Hi dao_lang_rulezz,
    Thanks for posting in the TechNet Forum.
    As my point of viewer, this requirement is related to program developing issue.
    This forum is related to Windows 8.1 Client.
    To receive better support, it is recommend to ask in corresponding developing forum.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • How can i dynamically varie the location and number of major grids in XY graph.

    Hi All,
        I'm supposed to plot some statistics in X-Y graph with x-axis scaled on time stamps. The plot generated has only one  major grid. Can I have a control over the location and number of major grids dynamically?
    Thanks,
    Saravanan.T 

    Hi Saravanan,
    use a property node "X scale.Range.Increment" to set the spacing of the major grid...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Frame drivers - control of frame?

    I have a frame driver which calls a form. The form is based on a procedure.
    From within the procedure I call the frame driver again.
    In Webdb22 I was able to control the frame names, and targets, and thus could get the 2nd call of the frame driver to display in the same place the when called the 2nd time as the first.
    In Portal30 I don't see a way to set frame names for frame drivers.
    1) is there a way that I can name the frames?
    2) if not, how can I call the frame driver from PL/SQL with one of the standard targets (_blank, _parent, etc.).
    Thanks,
    Bob

    Stephanie,
    Frame Driver can be used without rendering it as portlet. I am giving you a simple example:
    Say you have four charts:
    1) Chart_1, 2) Chart_2, 3) Chart_3, 4) Chart_4
    You can create a frame driver "Chart_Frame" as:
    Select 'Chart 1' Chart, 'Schema1.chart_1.show' url from dual
    union
    Select 'Chart 2' Chart, 'Schema1.chart_1.show' url from dual
    union
    Select 'Chart 3' Chart, 'Schema1.chart_1.show' url from dual
    union
    Select 'Chart 4' Chart, 'Schema1.chart_1.show' url from dual
    Now create a site "Site1".
    Add an item of type "URL" with url as: http://machine name:port/pls/portal dad/schema1.Chart_Frame.show
    You can set "Link That Displays Item In New Browser Window"
    I hope you can use it like this.
    Thanx,
    Chetan

  • Establishing a socket connection between a .swf file and a socket-test program (TCP/IP builder - Windows), in AS3.

    I have an issue with a college project I'm working on.
    Using Actionscript 3, I made a simple .swf program, an animated, interactive smiley, that 'reacts' to number inputs in a input-box.
    For the sake of the project, I now need to make the framework for establishing a socket connection with the smiley .swf, and another program.
    This is where I encounter issues. I have very little knowledge of AS3 programming, so I'm not certain how to establish the connection - what's required code-wise for it, that is.
    To test the connection, I'm attempting to use the "TCP/IP builder" program from windows, which lets me set up a server socket. I need to program the .swf file into a client - to recognize it, connect to it, then be able to receive data (so that the data can then be used to have the smiley 'react' to it - like how it does now with the input-box, only 'automatically' as it gets the data rather than by manual input).
    My attempts at coding it are as follows, using a tutorial (linked HERE):
    //SOCKET STUFF GOES HERE
        var socket:XMLSocket;        
        stage.addEventListener(MouseEvent.CLICK, doConnect); 
    // This one connects to local, port 9001, and applies event listeners
        function doConnect(evt:MouseEvent):void 
        stage.removeEventListener(MouseEvent.CLICK, doConnect); 
        socket = new XMLSocket("127.0.0.1", 9001);   
        socket.addEventListener(Event.CONNECT, onConnect); 
        socket.addEventListener(IOErrorEvent.IO_ERROR, onError); 
    // This traces the connection (lets us see it happened, or failed)
        function onConnect(evt:Event):void 
            trace("Connected"); 
            socket.removeEventListener(Event.CONNECT, onConnect); 
            socket.removeEventListener(IOErrorEvent.IO_ERROR, onError); 
            socket.addEventListener(DataEvent.DATA, onDataReceived); 
            socket.addEventListener(Event.CLOSE, onSocketClose);             
            stage.addEventListener(KeyboardEvent.KEY_UP, keyUp); 
        function onError(evt:IOErrorEvent):void 
            trace("Connect failed"); 
            socket.removeEventListener(Event.CONNECT, onConnect); 
            socket.removeEventListener(IOErrorEvent.IO_ERROR, onError); 
            stage.addEventListener(MouseEvent.CLICK, doConnect); 
    // Here, the flash tracks what keyboard button is pressed.
    // If 'q' is pressed, the connection ends.
            function keyUp(evt:KeyboardEvent):void 
            if (evt.keyCode == 81) // the key code for q is 81 
                socket.send("exit"); 
            else 
                socket.send(evt.keyCode); 
    // This one should handle the data we get from the server.
            function onDataReceived(evt:DataEvent):void 
            try { 
                trace("From Server:",  evt.data ); 
            catch (e:Error) { 
                trace('error'); 
        function onSocketClose(evt:Event):void 
            trace("Connection Closed"); 
            stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp); 
            socket.removeEventListener(Event.CLOSE, onSocketClose); 
            socket.removeEventListener(DataEvent.DATA, onDataReceived);
    Trying to connect to the socket gives me either no result (other than a 'connection failed' message when I click the .swf), or the following error:
    Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///C|/Users/Marko/Desktop/Završni/Flash%20documents/Smiley%5FTCP%5FIP%5Fv4.swf cannot load data from 127.0.0.1:9001.
        at Smiley_TCP_IP_v4_fla::MainTimeline/doConnect()[Smiley_TCP_IP_v4_fla.MainTimeline::frame1:12] 

    Tried adding that particular integer code, ended up with either errors ("use of unspecified variable" and "implicit coercion") , or no effect whatsoever (despite tracing it).
    Noticed as well that the earlier socket code had the following for byte reading:
    "sock.bytesAvailable > 0" (reads any positive number)
    ...rather than your new:
    "sock.bytesAvailable != 0" (reads any negative/positive number)
    Any difference as far as stability/avoiding bugs goes?
    So then, I tried something different: Have the program turn the "msg" string variable, into a "sentnumber" number variable. This seemed to work nicely, tracing a NaN for text (expected), or tracing the number of an actual number.
    I also did a few alterations to the input box - it now no longer needs the 'enter' key to do the calculation, it updates the animation after any key release.
    With all this considered and the requirements of the project, I now have a few goals I want to achieve for the client, in the following order of priority:
    1) Have the "sentnumber" number variable be recognized by the inputbox layer, so that it puts it into the input box. So in effect, it goes: Connect -> Send data that is number (NaN's ignored) -> number put into input box -> key press on client makes animation react. I optionally might need a way to limit the number of digits that the animation reacts to (right now it uses 1-3 digit numbers, so if I get sent a huge number, it might cause issues).
    - If the NaN can't be ignored (breaks the math/calculus code or some other crash), I need some way of 'restricting' the data it reads to not include NaN's that might be sent.
    - Or for simplicity, should I just detect the traced "NaN" output, reacting by setting the number variable to be "0" in such cases?
    2) After achieving 1), I'll need to have the process be automatic - not requiring a keyboard presses from the client, but happening instantly once the data is sent during a working connection.
    - Can this be done by copying the huge amounts of math/calculus code from the inputbox layer, into the socket layer, right under where I create the "sentnumber" variable, and modifying it delicately?
    3) The connection still has some usability and user issues - since the connection happens only once, on frame 1, it only connects if I already have a listening server when I run the client, and client can't re-connect if the server socket doesn't restart itself.
    I believe to do this, I need to make the connection happen on demand, rather than once at the start.
    For the project's requirement, I also need to allow client users to define the IP / port it's going to connect to (since the only alternative so far is editing the client in flash pro).
    In other words, I need to make a "Connect" button and two textboxes (for IP and port, respectively), which do the following:
    - On pressing "Connect", the button sets whatever is in the text boxes as the address of the IP and port the socket will connect to, then connects to that address without issues (or with a error message if it can't due to wrong IP/port).
    - The connection needs to work for non-local addresses. Not sure if it can yet.
    - On re-pressing connect, the previous socket is closed, then creates a new socket (with new IP/port, if that was altered)
    It seems like making the button should be as simple as putting the existing socket code under the function of a button, but it also seems like it's going to cause issues similar to the 'looping frames' error.
    4) Optional addition: Have a scrolling textbox like the AIR server has, to track what the connection is doing on-the-fly.
    The end result would be a client that allows user to input IP/Port, connects on button press (optionally tracking/display what the socket is doing via scrollbox), automatically alters the smiley based on what numbers are sent whilst the connection lasts, and on subsequent button presses, makes a new connection after closing off the previous one.
    Dropbox link to new client version:
    https://www.dropbox.com/s/ybaa8zi4i6d7u6a/Smiley_TCP_IP_v7.fla?dl=0
    So, starting from 1), can I, and how can I, get the number variable recognized by "inputbox" layer's code? It keeps giving me 'unrecognized variable' errors.

  • QE : TCP link and number of so.

    Hello,
    I would like to clear up a technical point :
    Say there is an soA in a server partition.
    Say there is one client who access soA by using soA.Methode().
    1. How many TCP link will be established ?
    2. What if the is now an soB ?
    3. What if so aren't in the same partition ?
    4. In other words, my question is : Does number of TCP link depend
    on number of so , number of partiton, ... ? What is the rule ?
    5. How can I be sure of the answer on UNIX plateform (AIX 4.2) ?
    (is "netstat" tool OK ?)
    Any feedback would be helpfull,
    Thanks.
    Jean-Baptiste BRIAUD software engineer
    mailto:[email protected]
    http://www.sema.com
    SEMA GROUP France
    16 rue barbes
    92120 montrouge
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hello,
    I would like to clear up a technical point :
    Say there is an soA in a server partition.
    Say there is one client who access soA by using soA.Methode().
    1. How many TCP link will be established ?
    2. What if the is now an soB ?
    3. What if so aren't in the same partition ?
    4. In other words, my question is : Does number of TCP link depend
    on number of so , number of partiton, ... ? What is the rule ?
    5. How can I be sure of the answer on UNIX plateform (AIX 4.2) ?
    (is "netstat" tool OK ?)
    Any feedback would be helpfull,
    Thanks.
    Jean-Baptiste BRIAUD software engineer
    mailto:[email protected]
    http://www.sema.com
    SEMA GROUP France
    16 rue barbes
    92120 montrouge
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • TCP Segmentation Offload and Jumbo Frames.

    I have VmWare-OpenSolaris and VMXNET3 network card.
    Can i enable subj?
    #:> ifconfig vmxnet3s mtu 5000
    ifconfig: setifmtu: SIOCSLIFMTU: vmxnet3s0: Invalid argument

    Hi sdavids5670
    Did you ever find a proper fix to your issue? was updating the N1Kv a solution?
    I have exactly the same symptoms with a N1Kv [4.2(1)SV2(1.1a)], F5 (ASM), vmxnet3 guests, however I'm failing all RDP (win2k8r2) and SSH large packets (redhat); the rest of my traffic appears fine. This only occurs when the F5 resides on the same VEM or VMware host as you have seen. My packet captures are similar.
    My work around is two fold. Firstly create rules to isolate the F5 onto hosts where guests are not utilising it and secondly, disable TCP offloading (I use IPv4 only). Neither of these are solutions.
    I have not tried a non-F5 trunk (ie, perhaps a CSR1000v) to replicate this without the F5.
    I suspected that the onbox / offbox issue was something specific about the logic of the VEM installed on the host (that's how I justified it to myself) rather than VEM->VEM traffic. It appears that only vEth -> vEth traffic on the same VEM is the issue. Also, I can only replicate this when one of the vEth ports is a trunk. I have yet to be able to replicate this if both are access port-groups (vEths).
    I have yet to log a TAC as I wanted to perform testing to exclude the F5.
    Thought that I would just ask....
    Cheers
    David

  • Can I control the spacing before and after a signature?

    When using the Mail app, can I control the spacing before and after a signature? It seems like the app adds space, but it doesn't add the same amount every time.
    Thanks.
    Greg

    The only way I can think of to maintain equla spacing between the text ov vartying lengths and the vertical lines is to put each icon/text pair in it's own frame fitted to content, make each vertical line a separate object, then select them all and distribute the spacing.

  • Jumping frame counter and thumbnail offsets in PE3

    I've been creating thumbnail offsets for my DVD markers in PE3 by subtracting the DVD marker placement from the current frame counter. One was off by two frames, and I couldn't figure out why, until I stepped frame-by-frame. The frame counter jumps from 00;31;59;29 to 00;32;00;02! Why is this? The first number is where the DVD marker and transition are, but I've never seen this before.
    Also, is there an easier way to compute the thumbnail offsets than doing the math? I know you can slide the offset with the mouse, but that's rather small and difficult to control. Is there a way to tell it to "use the current frame"?
    Thanks,
    John S.

    Steve,
    Thanks for the reply.
    No, my source video is all dv-avi over firewire from a minidv camcorder. If the transfer hiccupped and dropped two frames, could that be the cause? I figured PE would count the frames and do its own numbering, rather than rely on the data encoded in the dv-avi.
    Your method #1 is what I meant by "doing the math", since the timecode of the dvd marker has to be subtracted from the timecode of the frame to get the offset. That is of course absolutely precise -- provided the timecode in PS isn't missing any frames! And dragging as in #2 can get tedious when the offset is minutes long. Not that I'm averse to some math, but I was just wondering if there was some way of putting in the current frame directly.
    Thanks,
    John S.

  • Frame 9 solution for table column + side head does not work in Frame 10 and 11

    In Frame 9 structured (DITA) we could force Frame to record the actual widths of table columns in the DITA XML.  Frame 9 would respect the widths when opening the file.  This was particularly useful for forcing tables to be wide -- to go across the column and the side head -- and for the columns to never resize. 
    In Frame 9 this was done by commenting out the line
    "writer use proportional widths;" 
    like this
    "/* writer use proportional widths; */"
    in the topic.rules.text" file located in
    "...\FrameMaker9\Structure\xml\DITA\app\DITA-Topic-FM"
    This no longer works in Frame10 and Frame 11.  Even though the same line is commented out in all the "NAME.rules.txt" files in all the subdirectories of
        "...\AdobeFrameMaker11\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker11\Structure\xml\DITA\app"  
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA\app"  .
    Commenting out the line does force Frame 10 and 11 to record  the absolute column width (2.357" etc.) in the DITA XML.
    However, on Open,  Frame 10 and 11 force the table to fit in the column, not the column and sidehead. That is they behave as though they were still using proportional column widths.  It seems the original values (as inserted by Frame 10 and 11 before closing!) are recalculated on Open, thereby mimicking the default proportional width behavior.  
    For example, this on Save then Close from Frame 10 or 11
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.796in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.852in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "1.179in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "2.152in" colsep = "0"/>
    goes to this on Open then Save: 
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.351in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.393in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "0.887in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "1.618in" colsep = "0"/>
    Any help at all would be appreciated!  
    We have 8,000 to 10,000 pages to PDF in the next few days and about 33% of those pages are messed up tables!
    Message was edited by: borealforest

    Hi...
    Unfortunately, I don't have any insight into the default DITA table handling in FM10 or FM11 .. so can't give you the answer you're looking for. Since both FM10 and FM11 offer ExtendScript, you could write a script (or have one written) that processes all of your files to reset the table widths. Or, perhaps the best short term solution may be to reinstall FM9 to get the job done, then spend more time later to figure out a better solution.
    One alternative would be for you to use DITA-FMx, which supports the table/@pgwide attribute for controlling which tables span the page and which don't. Since your tables probably don't make use of this attribute, it won't help in the near term, but might make sense going forward.
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • How can I control the space before and after text in a table

    Hello
    I have a series of icons with descriptions, these are lined up with icons on the top row and description text in the bottom row. Each icon and description is divided by a stapled line.
    The text is of varying width, therefore the column width must also wary. However I would like to make the space before and after the text equal in all instances (See image).
    If there is anyone that can tell me how to do this with tables or any other tools I would be very thankful.

    The only way I can think of to maintain equla spacing between the text ov vartying lengths and the vertical lines is to put each icon/text pair in it's own frame fitted to content, make each vertical line a separate object, then select them all and distribute the spacing.

  • Difference between datatype NUMBER and NUMBER(38)

    Difference between datatype NUMBER and NUMBER(38)

    From
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330
    NUMBER Datatype
    The NUMBER datatype stores zero as well as positive and negative fixed numbers with absolute values from 1.0 x 10-130 to (but not including) 1.0 x 10126. If you specify an arithmetic expression whose value has an absolute value greater than or equal to 1.0 x 10126, then Oracle returns an error. Each NUMBER value requires from 1 to 22 bytes.
    Specify a fixed-point number using the following form:
    NUMBER(p,s)
    where:
    p is the precision, or the total number of significant decimal digits, where the most significant digit is the left-most nonzero digit, and the least significant digit is the right-most known digit. Oracle guarantees the portability of numbers with precision of up to 20 base-100 digits, which is equivalent to 39 or 40 decimal digits depending on the position of the decimal point.
    s is the scale, or the number of digits from the decimal point to the least significant digit. The scale can range from -84 to 127.
    Positive scale is the number of significant digits to the right of the decimal point to and including the least significant digit.
    Negative scale is the number of significant digits to the left of the decimal point, to but not including the least significant digit. For negative scale the least significant digit is on the left side of the decimal point, because the actual data is rounded to the specified number of places to the left of the decimal point. For example, a specification of (10,-2) means to round to hundreds.
    Scale can be greater than precision, most commonly when e notation is used. When scale is greater than precision, the precision specifies the maximum number of significant digits to the right of the decimal point. For example, a column defined as NUMBER(4,5) requires a zero for the first digit after the decimal point and rounds all values past the fifth digit after the decimal point.
    It is good practice to specify the scale and precision of a fixed-point number column for extra integrity checking on input. Specifying scale and precision does not force all values to a fixed length. If a value exceeds the precision, then Oracle returns an error. If a value exceeds the scale, then Oracle rounds it.
    Specify an integer using the following form:
    NUMBER(p)
    This represents a fixed-point number with precision p and scale 0 and is equivalent to NUMBER(p,0).
    Specify a floating-point number using the following form:
    NUMBER
    The absence of precision and scale designators specifies the maximum range and precision for an Oracle number.
    And
    2
    NUMBER[(precision [, scale]])
    Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127
    Sybrand Bakker
    Senior Oracle DBA

  • Getting audio file properties (length and size)

    Hi,
    when I load a screen I have two labels. One should display me the audio file length (in seconds) and the other the size (in MB).
    But I cant get it to work. The labels just show me '(null)' all the time.
    What am I missing here?
    @interface AudioViewController : UIViewController {
    NSString *size;
    NSString *length;
    IBOutlet UILabel *audioSize;
    IBOutlet UILabel *audioLength;
    -(UInt32)audioFileSize: (AudioFileID)fileDescriptor
    //Get file size
    UInt64 outDataSize = 0;
    UInt32 thePropSize = sizeof(UInt64);
    OSStatus result = AudioFileGetProperty(fileDescriptor, kAudioFilePropertyAudioDataByteCount, &thePropSize, &outDataSize);
    if(result != 0) NSLog(@"cannot find file size");
    NSLog(@"file size: %@", result);
    return (UInt32)outDataSize;
    //Get file length
    NSTimeInterval seconds;
    UInt32 propertySize = sizeof(seconds);
    OSStatus err = AudioFileGetProperty(fileDescriptor, kAudioFilePropertyEstimatedDuration, &propertySize, &seconds);
    if(err != 0) NSLog(@"cannot find file length");
    NSLog(@"file length: %f", seconds);
    size = [NSString stringWithFormat:@"%i", outDataSize];
    length = [NSString stringWithFormat:@"%f", seconds];
    - (void)viewWillAppear: (BOOL)animated {
    audioSize.text = [NSString stringWithFormat: @"%@", size];
    audioLength.text = [NSString stringWithFormat: @"%@", length];
    Thanks for your help!

    you should not attach sounds to timelines if you want precise control of your sounds, and use actionscript. 
    that said, your sound will play if you assign its sync property to event, instead of stream.

  • HD, Frame Rates and standards

    Hi All,
    I am sure I am trying to oversimplify a more complicated problem but i am hoping the answer is simple..
    We are working on a project that will be delivered in HD And SD Formats and used in the UK (PAL).
    Some of the assets we have received to use are in 29.97 frame rates and anything we create will be 25fps frame rates.
    The question is what do we build a project in - ideally we would build all in 25fps rate as the end result will be this and won't cause any problems when producing final formats. However the existing assets that are 29.97fps are rostrum rotations so any drop frames or rate changes become obviously jerky straight away.
    We could build all at 29.97fps but when we come to create SD formats we are going to end up using NTSC DVD settings which is a lesser resolution and may not play on certain DVD Players.. And if we transfer at the end to 25fps we are still going to see jerkiness?
    Hope this makes sense and anyones help would be most appreciated? Am i missing something fundamental..
    thanks in advance to all.. we have so much work to do and need to start it but if we start down the wrong route i fear we would have to start again!..
    Cheers
    Rob

    you might try converting the 29.97 to 25 in compressor. drop in the 29.97 footage and select what you want it to be. turn frame controls on and select so source footage plays at 25 fps. It should remap the frame count into the new frame count. obviously your duration will change. if you use an audio pass thru setting, make sure you enable audio rather than pass through or your sync will be amiss.

Maybe you are looking for