Unexpected behavior of class constructor

Hello world

I came across an unexpected behavior with definitions of AS3 classes this morning. To tell him quickly, I can't create an instance of a class inside the same methods of the class. Too bad.

Here is an example:

package {}

import flash.display.MovieClip;

import flash.events.Event;

SerializableAttribute public class Test extends MovieClip {}

private var _double:Boolean;

_T:test private var;

public void Test(double:Boolean_=_true):void { }

This ._double = double;

trace ("new test (" + the ._double + ")" ");

this.addEventListener (Event.ADDED_TO_STAGE, this ._onAddedToStage);

          }

private void _onAddedToStage(pEvt:Event) { }

    

this.removeEventListener (Event.ADDED_TO_STAGE, this ._onAddedToStage);

trace ("creating a double?");

If (this ._double) { }

                    trace ("yes");

this ._t = new Test (false);

} else {}

                    trace("no");

               }

          }

     }

}

What I'm trying to do seems a bit strange: when an instance is created, it generates a new one in him passing a parameter to stop treated duplication, so I shouldn't have infinite loop like that. Moinde I had a beautiful #2136 error when running (data not valid in the file SWF?):

New Test (true)

creating a double?

Yes

: Error #2136: blah blah blah

Can someone explain to me what is happening here? I would like to understand the sub-process that prevents from doing.

Thanks for the reply,

Fran_cois

Hello

I changed your code in Test.as:

package
{
import flash.display.MovieClip;
import flash.events.Event;
SerializableAttribute public class Test extends MovieClip
{
private var _double:Boolean;
private var _t:Test;

public void Test(double:Boolean_=_true):void
{
This ._double = double;
trace ("new test (" + the ._double + ")" ");
this.addEventListener (Event.ADDED_TO_STAGE, this ._onAddedToStage);

}
private void _onAddedToStage(pEvt:Event)
{
this.removeEventListener (Event.ADDED_TO_STAGE, this ._onAddedToStage);

trace ("create a double?");

If (this ._double)
{
trace ("Yes");
This ._t = new Test (false);
addChild (this._t);                      It's the new line!

}
on the other
{
trace ("no");
}
}
}
}

and then used this class not as a document, as a class in the fla file:

var ttt:Test = new Test();
addChild (ttt);

So, it does not work as expected...

Tags: Adobe Animate

Similar Questions

  • Unexpected behavior with the Option "record in the result.

    Hello

    I have unexpected behavior with the Option "record in the result.

    I have a few steps in the subsequence 'X', this subsequence passes a Boolean parameter. According to the value of the parameter I change the "Recorgind results" Option to report it or not. The thing is that if 'result Recorgind' set at race time I modofy by changing the value of Step.ResultRecordingOption to "Enable" and "Disable", the step is not reported until the same sous-suite 'X' is called for the second time (without changing the parameter passed).

    For example: (Preconditon: result Recorgind Option of all value sous-suite x are defined as Disable)

    1 CallSubsequenceX(Parameter: Enable)

    2 CallSubsequenceX(Parameter: Enable)

    3 CallSubsequenceX(Parameter: Disable)

    4 CallSubsequenceX(Parameter: Disable)

    Expected result:

    1. measures have been reported.

    2. measures have been reported.

    3. measures have not been reported.

    4. measures have not been reported.

    Result:

    1. measures would not same value Step.ResultRecordingOption has been changed to 'enable '. (Not Ok)

    2. measures have been reported. (Ok)

    3. measures reported same value Step.ResultRecordingOption has been changed to 'disable '. (Not Ok)

    4. measures have not been reported. (Ok)

    I use TestStand 2013 (5.1.0.226)

    Thanks in advance.

    -Josymar.

    Hi josymar_guzman,

    I just review the sequence and indeed we´re experience unexpected behavior with the Step.ResultRecordingOption callback. By a reason when you run the callback in the expression before each step section, the statement runs only until the next sequence is called, which is not what we want.

    To avoid this, you can place a statement before each step of the sequence, so you can change the State of the Option "record result" for the sequence running (and it is only the following). You can try something like this

    where the expression of the statement will be the recall "RunState.NextStep.ResultRecordingOption is YourCondition". With this, we guarantee that the results of the next step will be saved or not. I also remove the expression in the expression prior to each step section, because the condition is now on the statement before each step.

    I tried and it works fine. I´ll set the sequence that you share with me, with the changes. I hope this will help you and solve your problem.

  • Results of increasing frequency generated unexpected behavior of the signal

    I'm generating a composite using a sawtooth wave, square, signal that produces the desired signal as shown on the left. Unfortunately, when the increase of the frequency beyond 1 Hz, I get undesirable results as shown on the right.

            

    I tried to edit the news of sampling with no luck. I have also tried different methods to produce the desired signal. I noticed that before one of partial components of the final signal enters a relay, the increase of the frequency doesn't create unexpected results. Although, after its passage through a relay, the error starts happening. It seems that the relay is not suitable for higher frequencies, but I can't fix this unexpected behavior.

    Frequency of 1 Hz:

    Frequency of 3 Hz:

    Another method that I tried was to use the "simulate arbitrary signals," even if I was unable to find a way to increase the frequency of the signal that results.

    In addition, the signal has this grainy nature that I would like to make it smooth and continuous. Is this possible? I would like finally to reach a frequency of a few kiloHertz.

    I have attached the VI.

    Any help would be greatly appreciated. Thank you.

    The problem has to do with the size of the block and when the relay actually sees the saw tooth cross the threshold.

    Solve it, to perform a point-by-point check and build our waveform personalized to each iteration.

  • Oracle text index - unexpected behavior

    We have a SEARCH_TABLE (in Oracle 12.1.0.1.0) with a couple of files (actually about 10,000,000 records):

    ID ADDRESS

    1     | WIMPEL | 57. 9733BK | GRONINGEN |

    2     | JOHAN WILSSTRAAT | 7 ||| 1333PV | ALMERE |

    3     | ABRAHAM KUYPERHOF | 10. 8091XN | WEZEP |


    To support research on the table addresses, we apply an Oracle text index:

    create index ST_CTX1 on SEARCH_TABLE (address)

    indexType is ctxsys.context

    parameters ("DATASTORE CTXSYS. DEFAULT_DATASTORE');


    Our research focuses on whole words (without jokers). When searching through the data, it usually comes back with the correct results.


    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'GRÖNING') > 0

    ;

    Returns nothing, that is correct. Once the search argument 'GRÖNING' is replaced by 'GRONINGEN', ID 1 is correctly selected. According to this behavior, the following query returns no records:

    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'ABR & KUYPERHOF') > 0

    ;


    Surprisingly, however, the following query returns record ID 3:

    SELECT THE ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, ' A & KUYPERHOF ') > 0

    ;

    (Even if data does not contain the complete word 'A'). This unexpected behavior only seems to occur when you use "A" as the initial character.

    The following query (with the search starting with the character 'J' argument) returns no data. Which is the expected behavior.

    SELECT the ID

    OF SEARCH_TABLE

    WHERE CONTAINS (ADDRESS, 'J & WILSSTRAAT') > 0

    ;

    Anyone has an idea why the text index returns with A situations? Any ideas on how to solve this problem are appreciated.

    Mark

    According to the list of empty words by default in 11.2, the letters a, d, i, s, and t are listed, so would be removed from the wanted list of tokens.  Thus, 'A & WILSSTRAAT' becomes '& WILSTRAAT' and search text line with a single word.  'j' is not an empty word, so it is considered to be a token is valid and is not in your tables.  Look in CTXSYS. CTX_STOPWORDS to see what you have.

  • The abstract class constructor

    Hello

    I can write a constructor for the abstract class, but I can't create the object. So, what's the point of this?

    Please guide me.

    Ankur Raiyani wrote:
    Hello

    I can write a constructor for the abstract class, but I can't create the object. So, what's the point of this?

    Abstract class can have instance variables. To initialize the instance variables of the class super (abstract class) of upper class, we use the constructor in the upper class (abstract class).

    Super() can be used here. For example,.

    public abstract class ClassA {
         int a;
         ClassA(int x) {
              a = x;
         }
    }
    
    public class ClassB extends ClassA {
         int b;
         ClassB(int x, int y) {
              super(x);
              b =y;
         }
    }
    

    Published by: Ram on July 29, 2011 16:03

    Published by: Ram on July 29, 2011 16:04

  • Pass parameters to the Java class constructor in the Task Scheduler

    Hi all

    I wrote a Java (MySechudler) class that extends from 'SchedulerBaseTask '. This class is configured to run in "IOM-Task Scheduler", and within this class, I update the table in a database.
    The connection string to the database is considered to be a parameter to the constructor of the class 'MySechudler '.

    If I hard code the connection string and use a default constructor, it works well, but if I use a parameterized constructor, and try to pass the attribute, it will give an exception. I am doing wrong?

    If someone can tell me, how can I pass the value to my class of Java through "IOM Task Scheduler?

    HERE
    Thirlk

    private String getAttributeWithDefaultValue (String s, String s1) {}
    String s2 = getAttribute (s);
    If (s2 == null: s2.equals("")) {}
    return of s1;
    } else {}
    return s2;
    }
    }

    public void init() {}
    dataProvider = getDataBase();
    String uid = getAttributeWithDefaultValue("Attribute_Name",_"").trim();
    }

    Place this code in your task scheduler class and pass through Task Scheduler attribute setting such as:
    Value name

    User name attribute ID

  • Unexpected behavior in the curve route 2 generated by script

    All,

    As part of a larger 'application', we generate a number of curves of time vs measurand of our test data.  We are now trying to add several additional graphs of this type, but this time, including signals (curves) on each of the additional graphics, and charts must be created exclusively by a script.  The results are shown in the attached file ("desired output_script generated 2-curve plot.jpg").  However, after you run the script attached ("of report generation Script_2 Curves.PDF"), it seems that there is no displayed curves on the graph resulting, as indicated in the attached file ("real output_script generated 2-curve intrigue, jpg").

    Most of the code to create the chart was captured using the method of 'ctrl-A' on the "Curve and definition of the axis" dialog box after you manually configure the desired graphic.  After the transfer of the captured code to the script, additional lines were added to create the various objects (axes, curves, etc.) and the new objects (since the final graph will be generated 'from') scratch.  I used this method before with great success.

    This problem seems similar to what I had already met (and published information on) trying to add a constant (horizontal line) of a measurand existing against time graph.  Because of this similarity and the resolution of the previous question, I added the PicDefByIdent = 1 directive in scripts, but the results of same behavior if this directive (and the definition of the associated "name-based" curve) is included.  In addition, PicUpdate is called at the end of the script.

    We use DIAdem 11.3 (with TDM Service Pack 1).

    Any assistance anyone can provide this number will be greatly appreciated.

    Kind regards

    Bill Evans

    720-988-3436.

    Bill,

    I'm looking into your question and he's looking for a little, but I have a few things to try now.

    First of all, once you run the script, could you try to refresh the screen to report? PicUpdate should take care of this, but it does not hurt to be excluded as a possibility.

    Secondly, I found this example on our site on the creation of a new chart and plotting to it: https://decibel.ni.com/content/docs/DOC-3994

    And one thing I notice from this example, it's that they give the channels with D2CChnXName and D2CChnYName rather than D2ChnX and D2ChnY, so here's an example of what their definitions of strings like:

    D2CChnXName = EXAMPLE/Time"."
    D2CChnYName = ' EXAMPLE/speed '.

    I suggest to change this in your own code and see if it makes a difference. It is possible that setting the variables 'name' instead of just the X and the Y will solve the problem.

    If these steps do not resolve the problem, do not hesitate to post back and I'll be happy to work on the issue more in depth and help that understand you why this does not work.

  • Unexpected behavior with several structures of events manages the event itself.

    Hi, does anyone have an explanation of the following behavior?

    After 'Boolean 2' is enabled and then disabled the program "freezes". You can always pause the program but nothing does.
    For example, by pressing one of the file, Edit, View, project, Operate, tools, Windows, help or any other object inside the VI.

    This happens if I have two event structures who want to handle the same event, even if the flat sequence should be allowed only one run.

    This isn't a bug.

    Structures of the event should be used to handle different events. Given that you have entered your Boolean event in the two structures of the event, the event gets queued both when it occurs. This means one or the other be expected to manage the event and will, by default, lock the application. In the scale-measure of LabVIEW architectures, usually there is a structure of single event that handles all the events and then sends messages to the coast to the rest of the application to manage these events.

    There is a "Table locking" checkbox in the event dialog box which is by default enabled, but you should leave it on because it leads to bad practices otherwise.

  • Unexpected behavior of the chain of worksheet to the array function

    Hello

    I found a few quirks in LabVIEW 2011 I don't understand. In the vi attached, I provide a one-dimensional spreadsheet string separated by spaces. I use the string of worksheet to the array function to convert this spreadsheet string into an array of strings.

    I came across problems when I wanted to specify a space as the delimiter character.

    The conversion works as expected, if I do not specify a delimiter (i.e., the default tab delimiter is used). But if I specify the delimiter, only the first element of the string of spreadsheet is converted. I don't understand this behavior.

    Thanks for your help.

    Peter

    What a shame... Thanks for your time and this thin.

    Peter

  • UDPDatagramConnection unexpected behavior when receiving packets from datagrams

    I have problems with the UDPDatagramConnection class and hope that the community could direct me to a solution. I almost got run and it works for awhile, but then everything hangs, and I'm not sure that understand why (even if I have a theory that I would communicate and see if that makes sense). Here are some details on the implementation.

    -L' goal:

    Create a Midlet BlackBerry client that communicates with my .NET Server through UDP sockets. I already have a client functional .NET that communicates with the server, so server disorders are not probable.

    SerializableAttribute public class UDPRepeaterCommunicationLayerClass extends CBaseMessageWrappingClass implements CommunicationInterface
    {
    ...

    private UDPDatagramConnection m_receiveSocket = null;
    private UDPDatagramConnection m_sendSocket = null;
    Private Thread m_UDPreceiveThread = null;
    private String m_connectAddress;

    ...

    UDPRepeaterCommunicationLayerClass (String dAddress, UnsolicitatedDisconnectNoticeable dDelegate, JitteringThresholdReachedDelegatable

    dJitterDelegate, Boolean isServer) throws IOException
    {
    Super (7);
    m_messagesToProcess = new Vector();
    m_pendingACK = new Hashtable();
    m_connectAddress = dAddress;
    m_isServer = isServer;
    m_unsolicitedDisconnectToCall = dDelegate;
    m_jitteringFallbackToCall = dJitterDelegate;
            ConstructSocket (m_connectAddress);
    }

    The connector is correctly created here...

    I have create one to receive (that I have problems with) and one for sending so that I've not done with
    problems of shared resources (such as using the same buffer and having to synchronize methods to send and receive)
    While the receiver one block - which would have resulted in a deadlock...

    private void ConstructSocket (String dAddress)
    {
    Try
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("checking if the coverage is sufficient.");
    If (!.) CoverageInfo.isOutOfCoverage ())
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("cover enough.");
    If (dAddress is nothing)
    {
    dAddress = UDPRepeaterCommunicationLayerClass.m_protocol + ":/ / localhost:7180;» "7181 /";
    Simulator: 19780/rim.net.gprs
    For T-Mobile: 19780/internet3.voicestream.com
    For ATT: 19780/proxy
    dAddress = UDPRepeaterCommunicationLayerClass.m_protocol + "://" + UDPRepeaterCommunicationLayerClass.m_ipAddress + ":" 7180;
    }
    If (PhoneInputMidlet.m_debug) System.out.println ("Open Connector" + dAddress);
    m_connectorReceiveAddress = dAddress + ";". " 3000 ";
    m_connectorReceiveAddress train with String "" datagram://192.168.1.102:7180; ". 3000 ".
    m_connectorSendAddress = dAddress;
                    m_receiveSocket = (UDPDatagramConnection) Connector.open (m_connectorReceiveAddress, Connector.READ_WRITE, true);
    m_sendSocket = (UDPDatagramConnection) Connector.open (m_connectorSendAddress, Connector.READ_WRITE, true);
    m_address = m_receiveSocket.getLocalAddress () + ":" + String.valueOf (m_receiveSocket.getLocalPort ());
    If (PhoneInputMidlet.m_debug) System.out.println ("obtained connector address:" + m_address);
    SetMaxPacketSize (kDefaultMaxPacketSize);
    }
    on the other
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("coverage is not sufficient.");
    }
    }
    catch (IOException e) {}
    }

    Later in the code, I call StartReceiveThread to start my receiver thread... Which works very well...

    ' Public Sub StartReceiveThread (CommunicationInterface dCommIntf, MessageProcessable dDelegate)
    {
    CUDPReceiverThread dThreadObj = new CUDPReceiverThread (this);
    m_UDPreceiveThread = new Thread (dThreadObj);
    m_UDPreceiveThread.setpriority (thread. MAX_PRIORITY);   I tried to not change the priority here too...
    m_UDPreceiveThread.start ();
    Super. StartReceiveThread (dCommIntf, dDelegate);
    SetMaxPacketSize (GetMaxPacketSize ());
    }

    It is the functional real entry point of my thread of reception. Note that I'm giving as I should
    While other threads have CPU...

    Private Sub UDPReceiveThreadEntryPoint() throws IOException
    {
    SetMaxPacketSize (GetMaxPacketSize ());
    While (m_UDPreceiveThread! = null)
    {
                DoOneReceiveCycle();
    Thread.Yield ();
    }
    }

    This is where I expect the problem to be. I walk in here without problems, I get even packets that are received successfully
    and through my quality control (checking, checking the size compared to a value of size passed in a header). But then,.
    everything stops even if my server is still bombing the client with packets. This isn't what I expect.
    I have expect only not to block (even if it's a call blocking), the method of reception provided there is always incoming UDP packets.

    The server will never send a package that is greater than GetMaxPacketSize() which respects the limits of the carrier (coming to)
    1428 bytes). See code.

    Private boolean DoOneReceiveCycle() throws IOException
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("entering DoOneReceiveCycle");
    gotOne Boolean = false;
    Try
    {
    If (m_receiveSocket! = null)
    {
    Datagram dDatagram = m_receiveSocket.newDatagram (GetMaxPacketSize ());
                    dDatagram.reset ();
                    Byte [] dBuffer = new byte [GetMaxPacketSize ()];
                    dDatagram.setData (dBuffer, 0, GetMaxPacketSize());
    If (PhoneInputMidlet.m_debug) System.out.println ("Calling receive...");
                    m_receiveSocket.receive (dDatagram);
    If (PhoneInputMidlet.m_debug) System.out.println ("made reception (obtained with" + dDatagram.getData () .length + "bytes) ');
    System.arraycopy (dDatagram.GetData (), dBuffer, 0, 0, dDatagram.getData () .length);
    int nBytesRec = dDatagram.getData () .length;
    m_bytesUsed += nBytesRec;
    CTransportHeader dHeader = new CTransportHeader (dBuffer);
    CommSucceeded();
    If (dHeader! = null)
    {
    int dLength = dHeader.m_packetSize;
    gotOne = true;
    Try
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("Performing quality control on packet");
    PerformQualityControl (nBytesRec, dHeader, dBuffer);
    If (PhoneInputMidlet.m_debug) System.out.println ("processing package (quality control succeeded)" ");
    ProcessReceivedDatagram (dDatagram, dBuffer, dLength);
    CommSucceeded();
    }
    catch (CQualityAssuranceException e)
    {
    System.out.println (try ());
    System.out.println (e.getMessage ());
    }
    catch (e NegativeArraySizeException)
    {
    System.out.println (try ());
    System.out.println (e.getMessage ());
    gotOne = false;
    }
    }
    }
    on the other
    {
    If (PhoneInputMidlet.m_debug) System.out.println ("cannot call receive on a socket that is closed.");
    }
    }
    catch (InterruptedIOException (e)
    {
    System.out.println (try ());
    System.out.println (e.getMessage ());
    }
    catch (System.Exception e)
    {
    System.out.println (try ());
    System.out.println (e.getMessage ());
    If (PermanentCommProblems())
    {
    If (m_receiveSocket! = null)
    {
    We had trouble with this datagram and taking... We'll reset everything since then...
    m_receiveSocket.close ();
    m_receiveSocket = (UDPDatagramConnection) Connector.open (m_connectorReceiveAddress, Connector.READ_WRITE, true);
    }
    }
    }
    If (PhoneInputMidlet.m_debug) System.out.println ("output DoOneReceiveCycle");
    Return gotOne;
    }

    -The prayer:

    Anyone an idea what I am doing wrong? The only assumption that I have is that the threading in java, is cooperative and non-preemptive. And, therefore, it may not receive a performance inside the call blocking. The result in an impasse which sucks all CPU away from my main thread which is necessary to analyze the messages that are received and send support delivery receipts. If this is the case, I am in a bad place. If this isn't the case, please let me know, and I hope that you can report to a part of the solution to get this puppy running.

    Thank you!

    For the record, here are my findings regarding this problem.

    (1) receive, by definition a blocking call, does NOT have in-house Thread.yield (). Which, alone, is enough to starve other threads in the CPU and provided the watchdog available on BlackBerry, it is a serious gap in architecture not to do.

    (2) performance, efficiency and performance more... The model available for the thread BlackBerry java is cooperative (non-preemptive). Accordingly, in my code, I only had one call yield() and it wasn't enough. When I started putting yield() calls everywhere, the problem disappeared. As a by-product of this conclusion, I extrapolate that the java VM does not give internally in most (maybe all) of his calls (even the call blocking the reception). This is a disaster, I think, in terms of acrobatics that we must cross in order to bypass this aspect.

    (3) in order to bypass the hungry from my other son at the time received nothing, I had to periodically send an empty datagram (since we can't even define a timeout). The ATT in the world will be happy about this since I use the bandwidth in order to work around a design flaw (providing them with $$$).

    If someone is able to confirm my findings, I'd appreciate it. Thank you.

  • undefined reference to the own class constructor

    I have some material in my project subfolders and use include it with the full path to add:

    #include 
    

    It compiles fine, but when I try to create the object I get this error:

    undefined reference to `DataServiceConfig::DataServiceConfig(QObject*)'
    

    what I am doing wrong?

    Usually, this happens when you have this in your include file:

    class MyClass

    {

    public:

    MyClass(MyThing*);

    private:

    MyThing * m_thing;

    };

    but this isn't in your MyClass.cpp:

    MyClass::MyClass (MyThing * thing):

    m_thing (Thing)

    {

    }

    In other words, you have the statement - so things that use your class compile - but you do not have the implementation, the linker complains that it can't find it.

    Stuart

  • List of contacts an unexpected behavior. Help, please!

    Hi guys,.
    I'm having a little problem with pulling down the contact information from the address book (including date of birth).
    Every time I pull the contact information, date of birth comes back corrupted. I wrote a small test program to illustrate.

    I use JRE 5.0.0.14 and 9700 with OS 5.0.0.334 Simulator

    public TestAppScreen()
    {
    call the constructor of the screen
    Super();
        
    Name of string [];
    long date of birth = 0;
    SimpleDateFormat sdFormat;
    Contact list list = null;
    List of contacts contacts = null;
    Calendar myCalender = Calendar.GetInstance ();
               
    myCalender.set (Calendar.YEAR, 1982);
    myCalender.set (Calendar.MONTH, Calendar.NOVEMBER);
    myCalender.set (Calendar.DAY_OF_MONTH, 15);
            
    Add a new contact to the address book
    try {}
    contacts = (ContactList) PIM.getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_WRITE);
    } catch (PIMException e) {}
    System.out.println (e.getMessage ());
    }
    Contact = contacts.createContact ();
    name = String [new contacts.stringArraySize (Contact.NAME)];
    name [contact.NAME_GIVEN] = "SomeFirstName";
    name [contact.NAME_FAMILY] = "SomeLastName";
    contact.addDate (Contact.BIRTHDAY, Contact.ATTR_NONE, myCalender.getTime () .getTime ());

    try {}
    (contacts.importContact (contact)) .commit ();
    } catch (PIMException e) {}
    System.out.println (e.getMessage ());
    }

    Retrieve the contact
    try {}
    list = (ContactList) PIM.getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_ONLY);
    Enumeration contactEnum = list.items ();
    {while (contactEnum.hasMoreElements ())}
    Contact contactTemp = (Contact) contactEnum.nextElement ();
    name = (contactTemp.getStringArray (Contact.NAME, 0));
    Date of birth = contactTemp.getDate (Contact.BIRTHDAY, 0);
    }
    } catch (Exception e) {}
    System.out.println (e.getMessage ());
    }
            
    sdFormat = new SimpleDateFormat ("MMM DD, yyyy hh." "") "'SSS');

    Add (new RichTextField ("name:" + name [Contact.NAME_GIVEN] + "" + name [Contact.NAME_FAMILY]));
    Add (new RichTextField ("birth date:"+ sdFormat.formatLocal (birthdate) '));
    Add (new RichTextField ("originalCalInMillisec:" + myCalender.getTime () .getTime ()));
    Add (new RichTextField ("birthdateCalInMillisec:" + date of birth));
    }

    Here is my result:

    name: SomeFirstName SomeLastName

    Date of birth: 14 November 1982 19:00:00.000

    originalCalInMillisec: 406227608000

    birthdateCalInMillisec: 406166400000

    Date of birth is wrong

    Am I missing something? I'm about to pull out my hair.

    Any help would be greatly appreciated.

    What is the difference between the time that you set, and what you got back?

    If it's basically the difference between the hour GMT (time zone 0) and your time zone (GMT - 6 hours where I am, for example), then it is probably a problem with the time zones.

    I ran into the issue before the implementation of the RIM of the PIM database.  You book a date, and then bring it back, and it is now offset by the time zone difference.

    Seems to me that you have a difference of 5 hours, which would be time GMT-5 or right side?

    Here is an excerpt of code that we use to set the date for the PIM mess.

        public long localTimeAdjust(long date)
        {
            Calendar cal = Calendar.getInstance();
            cal.setTime(new Date(date));
    
            TimeZone zone = TimeZone.getDefault();
    
            int offset = zone.getOffset(1, // AD
                                        cal.get(Calendar.YEAR),
                                        cal.get(Calendar.MONTH),
                                        cal.get(Calendar.DAY_OF_MONTH),
                                        cal.get(Calendar.DAY_OF_WEEK),
                                        cal.get(Calendar.MILLISECOND));
    
            return offset;
    
        }
    
  • Button blackBerry Smartphones BB Curve 8320 unexpected behavior

    Hi community

    I now own a BB Curve 8320, which arrived March 7 th 2010 with OS v4.2.

    Having previously & successfully upgraded the OS on my BB 8310 curve which has an expensive screen problem, I downloaded OS v4.5 for BB Curve 8320.

    I used this download: 8320EastAsia_PBr4.5.0_rel108_PL2.7.0.78_A4.5.0.81_Voda_Australia

    Everthing seems to work very well; the OS upgrade completed successfully and before & after reloading the data from Outlook I could access the menu via the Menu button & do what I needed.

    However, after some time of operation (i.e. on 1 or more hours), random unit see the menu when I press the Menu key and I can't answer calls by pressing the Green Telephone button.

    Instead, this key and a few others will produce strange characters (e.g., Yi) in applications that can accept text, or does nothing.

    I tried to help me with this problem by making a following and after:

    Battery grips.
    Hold the alt key, then press and hold SHIFT to the right, then press DELETE.
    Reload the OS after the failure with JL_Cmder v1.9.1

    I have read on this forum or on crackberry that I should consider the moisture under the keyboard and then proceeds to remove the battery and SIM and SD card then proceeds to the hair dryer the unit for a short period.

    RESULT = everything works again for a short while (a few hours), then it will repeat the above behavior.

    I'm a bit there is a simple fix of BB Curve 8320 or setting changes that I'm missing.

    The 8310 has been solid on the performance... and honestly that miss me.

    Please put me out of my misery.

    Who is blessed,

    Hello community,

    After trying my own idea and add some silica GEL for the bowl to rice taking into my BB Curve 8320 & leaving for 2 days, I took out the camera fed up and had a brainwave.

    I occurred to me that since this routine 'your BB dry' had not given a complete solution, while it was time to open the unit and correct what was going on inside.

    So... on March 15, I found a local repair shop, said the problem, as well as to what this forum (thanks JSanders) suggest that he was wrong and ignored the diagnostic charge.

    Finally, there is some minor corrosion under the keyboard, which he corrected and cleaned up.
    I asked the tech if I took the phone to him at the time, and he said yes, that I didn't have to worry.

    So now, I have a BB Curve 8320 with interchangeable spare parts of my BB Curve 8310.

    CONCLUSION.

    I think that rice and the desiccant, drying methods are best used to DELAY the progression of moisture damage.

    However, if this does not solve the problem... then you must go into the unit. (i.e. you or a tech)

    Don't get too long..time is essential due to the miniaturization of circuit traces are very small and corrosion can quickly make the device unusable.

    Who is blessed,
    2121311berry

  • unexpected behavior with vpn, clientless ssl and smart tunnels on ASA 5510

    Hi there, hope someone can help

    I am able to set up a smart tunnel for an application and everything works fine, however...

    Without smart tunnel, the user must navigate the portal interface (because of how he encapsulates urls and basically acts as a proxy), it is too beautiful and good and expected behavior. If a user does not enter a URL in the portal URL entry (only enters the normal address bar) she takes them outside the clientless ssl vpn portal.

    Now too the point to start a smart tunnel, URL, the user types in the normal address bar is not encapsulated in the device URL, although they are still placed through our network (and note, the intelligent application of tunnel is not the browser, which is be IE). How can I know it? sites that would be blocked by a web filter are blocked with smart on but not PVD tunnels with smart tunnel.

    I need to know if this is intended behavior or not and how and why this is happening?

    Thanks in advance

    In my view, this is how it works. If you are referring to this doc:

    https://supportforums.Cisco.com/docs/doc-6172

    Smart tunnel is functioning all or nothing. Which means once you turn it on for a specific process or a specific bookmark, all your traffic for this process (and the browser you are using to open the SSL Clientless session ) will pass through the ASA.

    Example: Enable option ST for a process or bookmark #1 (which connected IE used to login). Opening a separate instance of the IE browser will be all traffic through the ASA, tunnel, if the new browser window belongs to the same process. All tabs on the movement of this browser browser will be smart tunnel, even to Favorites (ie. #2 favorite) are not specifically the chip in the tunnel. You must use a different browser (ie. (FireFox) in this case, if you want some of your traffic (ie. #2 favorite) is not to be smart tunnelees.

    I hope this helps.

  • DBMS_STATS, unexpected behavior?

    Hello

    I was doing an exercise to create migrated/chained rows for a table (ROW_CHAIN_MIG). [using 11.2.0.1]

    After inserting/updating of the lines in the table, I tried collecting statistics for the table to check the USER_TABLES. CHAIN_CNT

    using the DBMS_STATS. GATHER_TABLE_STATS as:

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

    SQL > exec dbms_stats.gather_table_stats (-)

    > ownname = > 'SYS '.

    (> tabname = > 'ROW_CHAIN_MIG');

    SQL > select chain_cnt from user_tables where table_name = 'ROW_CHAIN_MIG ';

    CHAIN_CNT

    ----------

    0

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

    But he returns to zero count for the chained rows.

    When I did an ANALYZE TABLE... CALCULATE STATISTICS, he returned 3 as number of chained rows

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

    SQL > analyze table row_chain_mig where compute statistics;

    SQL > select chain_cnt from user_tables where table_name = 'ROW_CHAIN_MIG ';

    CHAIN_CNT

    ----------

    3

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

    Is this expected behavior of the DBMS_STATS. GATHER_TABLE_STATS? (i.e. it does not collect statistics CHAIN_CNT)

    My understanding is DBMS_STATS to collect all the statistics gathered by ANALYZE & vbLf & stats no longer needed by the CBO.

    OR was it there something missing from the DBMS_STATS this stat (CHAIN_CNT) has been missed.

    TIA.

    The analyze command should not be used to collect optimizer statistics, but, as you noted, it will capture the chain_cnt (which does not differentiate between migrated lines, lines chained and lines chained 'intra-block' (i.e. the lines containing more than 255 columns) while dbms_stats.does do not attempt to capture a chain_cnt.) It is the expected behavior.

    Unfortunately (or not, depending on your point of view) the optimizer will use the chain_cnt in his calculations, if you use analyze to set.  Of course, there are other differences between the dbms_stats and analyze versions of stats - so plans can change between the two even if you have not all chained rows.

    See: analyse dbms_stats chain_cnt | Search results | Oracle scratchpad for a few comments - you need to follow a few links in the result list.

    Concerning

    Jonathan Lewis

Maybe you are looking for

  • With the help of HTTP PUT

    Hi all!  I am using HTTP PUT in labview 2014 to send a command to remote device ethernet to activate a beep.  I can successfully send the command and get the buzzer to turn on using a tool like PostMan (google tool App), however, when I try to do in

  • White light internet Wrt1900ac Charlotte

    Hello, I perform certain factory system reset on my router, and when I tried to complete the installation I am stuck on detect Internet step. I have reset my modem also tried with another router and it's works fine, but my wrt1900ac detects the conne

  • UniBlue RegistryBooster is good to use?

    UniBlue and Microsoft...? Hello. I bought UniBlue RegistryBooster and do not have problems... However, reading some of the Q / A on the forums about the SW, I sent an emailfor UniBlue to have confirming them their relationship with Microsoft. The ans

  • Get the message: "You must use this file" when trying to compress the files saved on the desktop

    Original title: to compress my files that I have saved on my desktop. I get this error after I do a right-click and "send to" compress a file... "you must use this folder. So, what should I do?

  • Wireless network connection error

    I went recently suppliers for my internet but for the habit of my computer allows me to connect to the network now. I have troubleshooted the problem a million times and he told me always that 'problems found', is that windows is unable to connect to