problem with random int (Qt)

I use the active Frame with dynamic content

and want to show every 30 seconds of random values

the data is within a list

and that's how I get the random ints

srand((uint) QTime::currentTime().msec());
int max = myList.size();
int min = 1;
int r = (qrand() % (max - min) + 1) + min;

It works very well - I can go to myList.at(r-1) and use the content in my SceneCover

only problem is: whenever I have restart my app.

I get random values in the same order

I have read use srand to an initial value value before you help get the random values in a different order.

but does not work

no idea what I am doing wrong?

THX

Hello!
I think qrand() demands qsrand(). srand's C function.
It must be called once on every thread where the qrand() is used.

Tags: BlackBerry Developers

Similar Questions

  • I have problems with random blue screens - 1st BC Code - of the suggestions?

    I have problems with random blue screens - 1st BC code - all others are zeros.  6_1_7601 OS version, produced 768_1.  Any suggestions?  My computer is a model of HP P7-1235.

    Thank you.

    The minidump files showed two errors blue screen, an error KMODE_EXCEPTION_NOT_HANDLED (1e) referring to the amdxhc.sys and an error SYSTEM_SERVICE_EXCEPTION (3B) referring to the usbfilter.sys:

    Bugcheck 1E, {0, 0, 0, 0}

    WARNING: Unable to verify timestamp for amdxhc.sys
    ERROR: Module load completed but symbols can be loaded for amdxhc.sys

    Bugcheck 3B {c0000005, fffff8000f4770c5, fffff880085feb10, 0}

    WARNING: Unable to verify timestamp for usbfilter.sys
    ERROR: Module load completed but symbols can be loaded for usbfilter.sys

    The amdxhc.sys is the AMD USB 3.0 driver and the usbfilter.sys is the AMD USB filter driver.

    The amdxhc.sys is dated January 3, 2012 and the usbfilter.sys is dated November 16, 2011.

    Two of these drivers should be updated to the latest version to ensure compatibility with the motherboard and between them.

    HP has an available Update for AMD USB 3.0 driver but I do not see an AMD USB filter driver available for your computer updated.

    I might suggest to try to get the package of motherboard chipset from AMD for versions newer and compatible to the two pilots.

    You can try the "AMD Chipset drivers' starting from the following link which should update the two drivers.

    http://support.AMD.com/us/gpudownload/Windows/pages/raid_windows.aspx#2

    I recommend to create a System Restore Point before installing the new motherboard drivers.

  • Problems with random numbers

    I want to create a variable, xSpeed, which has an equal chance to be 10-10 or 0. Here's what I have so far:

    xRandom = random (3);
    If (xRandom < = 1) {}
    xSpeed = 10;
    } ElseIf (xRandom < = 2) {}
    xSpeed = - 10;
    } else {}
    xSpeed = 0;
    }


    So, there should be an equal chance to put xSpeed as 10, -10, or 0 to right? Instead I think it's always 10 or - 10.

    If I change to xRandom = random (3); for xRandom = random (4); then each value has an equal chance to be implemented. But this should be the case for the random (3) surely?!

    Also, if I change to xRandom = random (3); for xRandom = Math.random (3); then xSpeed always seems to end up like 10. What is with that? What difference does add math do?

    I must be missing something important about the functioning of random() because it isn't making any sense to me: (.)

    Perfect. Thank you very much

  • Problems with AE CC15 tasks performed on a Render Farm

    Hello

    We use Thinkbox date limit to submit work to our 30 node makes firm and have problems with random nodes (nodes each time) never solve their tasks. We must then manually stop the task and submit again to make it start happening. Sometimes it hang on 0% for several minutes but suddenly to 100 percent and show the work as complete. However, when we check the folder, there are several missing frames. I spent a whole day with Thinkbox support on this issue and they have come to the conclusion that it is a matter outside the deadline; then told me that I would like to contact Adobe support. I have several screenshots, of employment and newspapers of the slave, as well as the thread of emails and messages from command line with strange of Thinkbox for reference results if these will help. Here is a screenshot of some render nodes that since nearly 14 hours at 0%. Thank you.

    Screen Shot 2016-02-05 at 11.00.24 AM.jpg

    I saw this problem too.   I found that this does not happen if I keep the deadline for a task by machine.  But who does not profit from our hearts very well.  I also found that the nodes have tried automatic backup of the AE file at the same time, causing conflicts.  I ended up going in each launch of AE node and disable the AutoSave every minute 20 and "save when the queue starts.   I also disabled the preference of cache disk rendering nodes because I think it does a thorough check of all resources related to the AE file which was very demanding on our network and NAS all nodes of marketing.  I think that some nodes are time and only covers do not update the cache and I did not want to used the cached data anyway.

    We usually work with OpenEXRs at the entrances and exits on our jobs and are running AE 2015 13.7.2.

    Are you running any 3rd party filter?

  • Using an IP191 monitor, have random horizontal stripes on the screen - have no problems with other browsers. also no problem with FF on the other PCs on the family

    Using an IP191 monitor, have random horizontal stripes on the screen - have no problems with other browsers. also no problem with FF on the other PCs on the family.

    These "streaks" seem to be the domain of the high frequency analysis; they can be eliminated by scrolling upwards or downwards.

    Hello, maybe it's a problem with hardware acceleration - try updating your graphic driver, or in case this does not solve the problem, or there is no new version available at the time, disable hardware acceleration in the firefox menu

    > options > advanced > General.

  • Problem with the generation of multi-sinus wavefrom of random phase using PXI-5412

    Hello

    I am trying to generate random phase multi-sine waveform using the PXI-5412 14 bits 100 M/s AWG on LabVIEW8.0.

    The version of LabVIEW8.0 for the PXI-5412 comes with a sample VI on multi-tone waveform generation. When I tried with a different combination of frequency and amplitude, there is no problem with the sample VI.

    Because I need the phase to be random for each frequency component, I had tore the tone cluster containing 3 elements, i.e. frequency, amplitude and phase, which feeds the generator of signals, and rebundle the cluster with elements of reading a CSV file by using a loop, a fixed value amplititude and a number of random phase of the frequency generated by a random number (formula lournies elements (: pi - 2pi x r). When the waveform multi-sinusoidale generated on the PXI-5112 100 MHz Digital Oscilloscope, it was pointed out that the waveform would change with the tested frequency range.  However, the amplitude of the wave is always ~1.4V (guess that's always default to 1 V x sqrt (2)).  There is no question also when testing the same combination of frequency and amplitude by using sample VI without modification.

    Please find attached the VI of the sample, snatching up to the version and the CSV file I used. Is there something wrong with the table 1 d of the cluster of 3 elements that I built and assembled causing the signal generator to ignore the value of input amplitude and, possibly, the input value of the same phase (as it seems that the amplititude is always set to the default)?

    The other question that I found on the two sample VI and ripped version is on the news of sampling.  The waveforms appear on digital Oscilloscope PXI-5112 always default to 10 cycles no matter how changed the sampling frequency and the number of samples.  For example, if the frequency is 10 Hz, sampling frequency is 1000 Hz, and I put the number of samples to 10000.  I'm supposed to get 10000/100 = 100 cycles.  However, I could see 10 cycles no matter how, I changed.  What should be the correct way to change the number of cycles?

    Really appreiciate your help and advice. Thank you.

    1 phase unit is in degrees (-180 to 180), no - pi pi.
    2 standardize Waveform.vi always normalize your amplitude of the signal. You can remove it to use your desired amplitue, but must make sure that it is not above 5412 spec.

  • What is the PROBLEM with Acrobat (randomly drops text)

    I'm at the end of my rope

    with Acrobat CS3. He distills randomly my specifications with all para

    graphs are missing here and there. Sometimes I can restart and get all of the document to print, but once again today, I have a contract which

    not print completely even after a reboot of the entire system.

    Trying to distill in Word 2003. Short documents on a page are generally good, even if I had problems with a few lines of text missing on invoices that I print on Excel. But this 5-page contract gives me headaches... I'll have to resort to printing and scanning the doc from back in the distillation in the form of a chart in PDF format, or copy and paste all in QuarkXpress, which has a PDF Distiller that is 100% reliable. I wish I could use THAT Distiller with Word! I can't stand it. Why Acrobat distiller cannot distill with reliable documents? A contract is a serious thing... missing paragraphs can mean serious legal trouble!

    I need an alternative, unless there is a fix for this problem.

    Mark, it could be that you need to install the MS Hotfix listed here:

    http://support.Microsoft.com/kb/952909/en-us

  • Problem with string to Int conversion

    Dear friends,

    Problem with string to Int conversion

    I'll have a column where most of the values is digital. Only 4 values are not numeric.

    I have replaced the non-numeric values to numeric in order to maintain the data type.

    Grade.Grade DEAL WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade OTHER END"

    This is the result as inactive

    Grade

    _0_

    _1_

    _10_

    _11_

    _12_

    _13_

    _14_

    15

    _16_

    _17_

    _18_

    _19_

    _2_

    _20_

    _21_

    _22_

    _23_

    _24_

    _3_

    _4_

    _5_

    _6_

    _7_

    _8_

    _9_

    Discount
    -            -            -

    Now I want to convert this value in digital and do some math

    So I changed the formula as below

    Cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an INT. ELSE")


    Now I get the following error
    View display error
    Driver Odbc _ returned an error (SQLExecDirectW). _
    Error details
    Error codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 17001] Oracle error code: 1722, message: ORA-01722: invalid number in the OIC calling OCIStmtFetch. [nQSError: 17012] In bulk fetch failed. _ (HY000)
    SQL issued: SELECT cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an int. ELSE") seen'Human Capital' 0 - Costing Manpower WHERE LENGTH (Grade.Grade CASE WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN "E4" THEN "23 ' ELSE Grade.Grade END) > 0 ORDER BY saw_0_

    Discount





    Could someone help me

    Concerning

    Mustafa

    Published by: Musnet on June 29, 2010 05:42

    Published by: Musnet on June 29, 2010 06:48

    Are you sure you don't have another non-digital value in your column. I want to get this filter temporarily just to check if your plaster works or not. If it works, then you can remove this filter.

  • I have a problem when using Google Maps, at a certain point my custards computer window and says there is a problem with the display drivers and he recovered, but it is not. Problem does not occur with Int Explorrer, so I don't think it's the computer

    When using google maps via Firefox, after asking a place which is not the General section of North America who comes up regularly, the firefox screen becomes white with a narrow banner at the top. A message appears in the lower right corner that says something on display drivers having had a problem, but now have been recovered. However, the display is not recover and the message of the banner is that Firefox is not responding. When I go to restart Firefox if I'm about to restore, the page is still frozen.
    I don't think there is a problem with my computer because it doesn't happen if I used to go to google maps, then G-cards works normally.
    This phenomenon didn't happen before the last update Google or Firefox. I used Fiefox for some years and also Google Maps on previous computers and on this one and not had it before.
    It is a relatively young computer (Asus EeSlate 121) less than a year. I have used Firefox since I bought it and until recently had no problem with Google Maps.

    I solved it myself, after the 'note' that was FF/Mozilla, just as I finished my message, commenting on what it was that my system was, I wnnt back to check my plug-ins, etc. I downloaded the latest Java, the TWO 32-bit AND 64-bit versions and latest Firefox.
    Now everything works.
    Thank you
    B.

  • Hello, I have problems with Creative Cloud Packager. I bought this product yesterday and since then I can not download completely all components. 59% or 65% of the download I get the message: "connect to the internet and try again." I am connected to Inte

    Hello, I have problems with Creative Cloud Packager. I bought this product yesterday and since then I can not download completely all components. 59% or 65% of the download I get the message: "connect to the internet and try again." I am connected to the internet through Ethernet, I checked my connections through various steps recommended buy Adobe to see if my connection is correct and he is!, so why I can't complete the download process. I feel frustrated because I have clients awaiting results of my work that I can do right now. I have read all the information on the Adobe pages but nothing shows that can help solve my problem also the way things are described sometimes seem complicated and exotic as; not everything I understand particularly when it comes to some technical descriptions or abbreviations. I would be grateful someone help and advice on this topic. Thank you Nina

    Hi Nina,

    This link might help: cloud creative activation and troubleshooting of sign-in

    Kind regards

    Sheena

  • Problem with Integrated Weblogic Server in JDeveloper

    Hello

    I use JDeveloper version: 11.1.1.7

    I am facing problem with the Weblogic Server integrated into JDeveloper.

    When I start the server, the log shows as follows:

    Using the 7101 port *.

    D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin\startWebLogic.cmd

    [waiting for the server to complete its initialization...]

    .

    .

    Memory of JAVA arguments: - Xms768m-Xmx768m - XX: CompileThreshold = 8000 - XX: PermSize = 128 m - XX: MaxPermSize = 512 m

    .

    Start mode of WLS = development

    .

    CLASSPATH=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM\lib\sdoapi.jar;D:\fmwps6\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;D:\fmwps6\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\fmwps6\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Java\JDK16~1.0_5\lib\tools.jar;D:\fmwps6\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\fmwps6\WLSERV~1.3\server\lib\weblogic.jar;D:\fmwps6\modules\features\weblogic.server.modules_10.3.5.0.jar;D:\fmwps6\WLSERV~1.3\server\lib\webservices.jar;D:\fmwps6\modules\ORGAPA~1.1/lib/ant-all.jar;D:\fmwps6\modules\NETSFA~1.0_ 1/lib/Ant-contrib.jar;D:\fmwps6\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;D:\fmwps6\WLSERV~1.3\common\derby\lib\derbyclient.jar;D:\fmwps6\WLSERV~1.3\server\lib\xqrl.jar;;D:\ fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM\config;D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM\lib\stringtemplate-2.3b6.jar

    .

    PATH=D:\fmwps6\patch_wls1035\profiles\default\native;D:\fmwps6\patch_jdev1111\profiles\default\native;D:\fmwps6\WLSERV~1.3\server\native\win\x64;D:\fmwps6\WLSERV~1.3\server\bin;D:\fmwps6\modules\ORGAPA~1.1\bin;D:\Java\JDK16~1.0_5\jre\bin;D:\Java\JDK16~1.0_5\bin; C:\Program Files\Common Files\Microsoft Shared live; C:\Program Files (x 86) \Common Files\Microsoft Shared live; C:\oraclexe\app\oracle\product\11.2.0\server\bin;;D:\ ADE\bin; C:\Windows\System32; C:\Windows; C:\windows\System32\Wbem; C:\windows\System32\WindowsPowerShell\v1.0\; C:\Program Widcomm logiciels\. C:\Program Widcomm Software\syswow64;D:\Java\jdk1.6.0_51\bin;D:\Softwares\apache-ant-1.7.1\bin. C:\Program Files (x 86) \Windows Live\Shared;D:\fmwps6\WLSERV~1.3\server\native\win\x64\oci920_8

    .

    ***************************************************

    * To start WebLogic Server, use a username and *.

    * password assigned to an administrator-level user.  For *.

    * server administration, using the WebLogic Server *.

    * the http://hostname:port\console console *.

    ***************************************************

    from weblogic with the Java version:

    Java version "1.6.0_51".

    Java (TM) SE Runtime Environment (build 1.6.0_51 - b31)

    Java for 64-bit Server VM (build 20, 51 - b02, mixed mode)

    WLS starting with line:

    "D:\Java\JDK16~1.0_5\bin\java-client-Xms768m-Xmx768m - XX: CompileThreshold = 8000 - XX: PermSize = 128 m - XX: MaxPermSize = 512m-Dweblogic.Name=DefaultServer-Djava.security.policy=D:\fmwps6\WLSERV~1.3\server\lib\weblogic.policy - agentlib: jdwp = transport = dt_socket, server = o, address =-Djavax.net.ssl.trustStore=D:\fmwps6\wlserver_10.3\server\lib\DemoTrust.jks 49879 - Dhttp.proxyHost = www-proxy.idc.oracle.com-Dhttp.proxyPort=80"-Dhttp.nonProxyHosts = localhost | 127.0.0.1 | rnaguban - in '-Dhttps.proxyHost = www-proxy.idc.oracle.com-Dhttps.proxyPort=80 "-Dhttps.nonProxyHosts = localhost | 127.0.0.1 | rnaguban -»-Doracle.jdeveloper.adrs=true-Dweblogic.nodemanager.ServiceEnabled=true-Duim.home=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM-Dweblogic.log.Log4jLoggingEnabled_uim=true-Dlog4j.configuration_ = UIM loggingconfig.xml-Duim.logging.watchdog.timer=5000-Djava.io.tmpdir=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM\tmp-Dweblogic.management.discover.retries=6-DtestConfig.home=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\UIM\testConfig-Dsun.lang.ClassLoader.allowArraySyntax=true - XX : - UseSSE42Intrinsics - DUSE_JAAS = faux - Djps.policystore.hybrid.mode=false-Djps.combiner.optimize.lazyeval=true-Djps.combiner.optimize=true-Djps.authz=ACC - Xverify : aucun-da-Dplatform.home=D:\fmwps6\WLSERV~1.3-Dwls.home=D:\fmwps6\WLSERV~1.3\server-Dweblogic.home=D:\fmwps6\WLSERV~1.3\server-Djps.app.credential.overwrite.allowed=true-Dcommon.components.home=D:\fmwps6\ORACLE~1-Djrf.version=11.1.1-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger-Ddomain.home=D:\fmwps6\JDEVEL~1\SYSTEM~ 1.93\DEFAUL ~ 1- Djrockit.optfile=D:\fmwps6\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt-Doracle.server.config.dir=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\servers\DefaultServer-Doracle.domain.config.dir=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1-Digf.arisidbeans.carmlloc=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\carml-Digf.arisidstack.home=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\arisidprovider-Doracle.security.jps.config=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\fmwconfig\jps-config.xml-Doracle.deployed.app.dir=D:\fmwps6\ JDEVEL~1\SYSTEM~1.93\DEFAUL~1\servers\DefaultServer\ tmp\_WL_user-Doracle.deployed.app.ext=\--Dweblogic.alternateTypesDirectory=D:\fmwps6\ORACLE~1\modules\oracle.ossoiap_11.1.1,D:\fmwps6\ORACLE~1\modules\oracle.oamprovider_11.1.1,D:\fmwps6\ORACLE~1\modules\oracle.jps_11.1.1-Djava.protocol.handler.pkgs=oracle.mds.net.protocol-Dweblogic.jdbc.remoteEnabled=false-Dwsm.repository.path=D:\fmwps6\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\oracle\store\gmds-Dweblogic.management.discover=true-Dwlw.iterativeDev=-Dwlw.testConsole=-Dwlw.logErrorsToConsole=-Dweblogic.ext.dirs=D:\fmwps6\patch_wls1035\profiles\default\sysext_manifest_classpath;D:\fmwps6\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic. Server

    Listening to dt_socket to address transport: 49879

    The debugger is connected to the local process.

    < 16 August 2013 19:19:43 IST > < Info > < security > < BEA-090905 > < disabling CryptoJ JCE provider auto-intégrité for better startup performance. To allow this control, enter - Dweblogic.security.allowCryptoJDefaultJCEVerification = true >

    < 16 August 2013 19:19:43 IST > < Info > < security > < BEA-090906 > < change the default Random Number Generator in RSA CryptoJ of ECDRBG to FIPS186PRNG. To disable this change, specify - Dweblogic.security.allowCryptoJDefaultPRNG = true >

    < 16 August 2013 19:19:44 IST > < Info > < WebLogicServer > < BEA-000377 > < since Java hotspot 64-bit Server VM WebLogic Server Version 20, 51 - b02 Sun Microsystems Inc. >

    < 16 August 2013 19:19:44 IST > < Info > < management > < BEA-141107 > < Version: WebLogic Server temporary fix for BUG13114768 Sat Jan 21 16:14:44 IST 2012

    WebLogic Server 10.3.5.0 Fri Apr 1 20:20:06 PDT 1398638 2011 >

    < 16 August 2013 19:19:47 IST > < opinion > < WebLogicServer > < BEA-000365 > < server status changed initially >

    < 16 August 2013 19:19:47 IST > < Info > < WorkManager > < BEA-002900 > < self-adjusting Initializing of thread pool >

    < 16 August 2013 19:19:47 IST > < opinion > < LoggingService > < BEA-320400 > < D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log log file will be rotated. Reopen the log file if stopped tailings. This can happen on some platforms such as Windows. >

    < 16 August 2013 19:19:47 IST > < opinion > < LoggingService > < BEA-320401 > < log file was shot in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log00115. Log messages will continue to be logged in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log. >

    < 16 August 2013 19:19:47 IST > < opinion > < Log Management > < BEA-170019 > < D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log server log file is opened. All events in the log server-side will be written to this file. >

    < 16 August 2013 19:19:56 IST > < opinion > < security > < BEA-090082 > < security initialization using security realm myrealm. >

    < 16 August 2013 19:20 IST > < opinion > < LoggingService > < BEA-320400 > < D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\access.log log file will be rotated. Reopen the log file if stopped tailings. This can happen on some platforms such as Windows. >

    < 16 August 2013 19:20 IST > < opinion > < LoggingService > < BEA-320401 > < log file was shot in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\access.log00066. Log messages will continue to be logged in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\access.log. >

    August 16, 2013 19:20:05 oracle.ods.virtualization.engine.util.VDELogger info

    INFO: Sent Notification of mapping object config reloaded

    August 16, 2013 19:20:05 oracle.ods.virtualization.engine.util.VDELogger info

    INFO: Sent Notification of mapping object config reloaded

    < 16 August 2013 19:20:18 IST > < opinion > < WebLogicServer > < BEA-000365 > < server changed to STANDBY status >

    < 16 August 2013 19:20:18 IST > < opinion > < WebLogicServer > < BEA-000365 > < server status changed initially >

    < 16 August 2013 19:20:20 IST > < WARNING > < JDBC > < BEA-001552 > < data source for logging last resource (LLR) InventoryTxDataSource does not work when it is a participant in a global transaction that spans several WebLogic Server instances because JDBC remote support is disabled. LLR will work in one configurations. >

    < 16 August 2013 19:20:22 IST > < WARNING > < JDBC > < BEA-001110 > < no table test didn't put in place for the pool "SDM-commsRepository" Connections will be tested. >

    < 16 August 2013 19:20:39 IST > < WARNING > < security > < BEA-090668 > < ignored the role 'Admin' resource deployment ' type = < url >, application is DMS Application #11.1.1.1.0, contextPath = / dms, uri = / ">".

    < 16 August 2013 19:20:58 IST > < WARNING > < J2EE > < BEA-160195 > < application version of the lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored, because the application UIMCMWSAdapter is not versioned. >

    < 16 August 2013 19:21:11 IST > < WARNING > < J2EE > < BEA-160195 > < application version of the lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the oracle.communications.inventory application is not versioned. >

    < TableBuilder > < _buildSchema > metric "webcache:request_filter_denied_stats" table has no key column.  It will not be seen.

    < TableBuilder > < _buildSchema > metric table "reports: Reports_Server_Information ' has no key column.  It will not be seen.

    < TableBuilder > < _buildSchema > metric table "reports: Reports_Server_Performance ' has no key column.  It will not be seen.

    < TableBuilder > < _buildSchema > metric table "reports: Reports_Server_Response ' has no key column.  It will not be seen.

    < TableBuilder > < _buildSchema > metric table "reports: Reports_Servlet_Response ' has no key column.  It will not be seen.

    < TableBuilder > < _buildSchema > metric table "reports: Remote_Bridge_Elements ' has no key column.  It will not be seen.

    < ConfigurationUtil > < getProperties > was not able to load runtime - poms.properties

    < 16 August 2013 19:21:52 IST > < error > < Net > < BEA-000903 > < could not communicate with the proxy: www-proxy.idc.oracle.com/80. Try to login www.terracotta.org/80 now.

    java.net.UnknownHostException: www-proxy.idc.oracle.com

    at java.net.Inet6AddressImpl.lookupAllHostAddr (Native Method)

    in java.net.InetAddress$ 1.lookupAllHostAddr(InetAddress.java:876)

    at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1229)

    at java.net.InetAddress.getAllByName0(InetAddress.java:1180)

    at java.net.InetAddress.getAllByName(InetAddress.java:1110)

    Truncated. check the log file full stacktrace

    >

    < 16 August 2013 19:21:53 IST > < error > < Net > < BEA-000903 > < could not communicate with the proxy: www-proxy.idc.oracle.com/80. Try to login svn.terracotta.org/80 now.

    java.net.UnknownHostException: www-proxy.idc.oracle.com

    at java.net.InetAddress.getAllByName0(InetAddress.java:1184)

    at java.net.InetAddress.getAllByName(InetAddress.java:1110)

    at java.net.InetAddress.getAllByName(InetAddress.java:1046)

    at weblogic.net.http.HttpClient.openServer(HttpClient.java:309)

    at weblogic.net.http.HttpClient.openServer(HttpClient.java:414)

    Truncated. check the log file full stacktrace

    >

    < LoggerHelper > < Journal > cannot map non-serializable type "interface oracle.adf.mbean.share.config.runtime.resourcebundle.BundleListType" to open MBean Type for mbean interface oracle.adf.mbean.share.config.runtime.resourcebundle.AdfResourceBundleConfigMXBean, attribute BundleList.

    < AdfDiagnosticsJarsVersionDumpImpl > < dumpVersionInfo > version jars discharge path: D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\oracle.communications.inventory-Versions.csv

    < FeatureUtils > < _resolveFeatures > Ignoring feature-dependency on the function "AdfDvtCommon".  There is no such feature.

    ATTENTION: From post-deployment of ADF library jar on WebLogic Server. "Provider-lazy-inited" init-param missing LibraryFilter? Ignore this warning if the ADFJspResourceProvider is not used.

    On the road: ADF library non-ADFJspResourceProvider after deployment

    Finishing: ADF library non-ADFJspResourceProvider after deployment (millis): 223

    < 16 August 2013 19:22:08 IST > < opinion > < LoggingService > < BEA-320400 > < D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log log file will be rotated. Reopen the log file if stopped tailings. This can happen on some platforms such as Windows. >

    < 16 August 2013 19:22:08 IST > < opinion > < LoggingService > < BEA-320401 > < log file was shot in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log00118. Log messages will continue to be logged in D:\fmwps6\jdeveloper\system11.1.1.7.40.64.93\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log. >

    < 16 August 2013 19:22:08 IST > < opinion > < Log Management > < BEA-170027 > < server has established the connection with the Service of diagnosis level domain successfully. >

    < 16 August 2013 19:22:09 IST > < opinion > < WebLogicServer > < BEA-000365 > < server status changed to ADMIN >

    < 16 August 2013 19:22:09 IST > < opinion > < WebLogicServer > < BEA-000365 > < Server State has changed for RESUMING >

    < 16 August 2013 19:22:09 IST > < opinion > < Server > < BEA-002613 > < Channel "Default" is now listening on 14.96.8.250:7101 for iiop, t3, ldap, snmp, http protocols. >

    < 16 August 2013 19:22:09 IST > < opinion > < WebLogicServer > < BEA-000331 > < started WebLogic Admin Server "DefaultServer" domain "DefaultDomain" running in development Mode >

    < 16 August 2013 19:22:09 IST > < opinion > < WebLogicServer > < BEA-000365 > < Server State has changed in the RACE >

    < 16 August 2013 19:22:09 IST > < opinion > < WebLogicServer > < BEA-000360 > < server started operation >

    But it does not list the server while deploying the application.

    I don't see the problem to my office network. But I have this problem when I work from my home.

    Ideally, it should show the following lines after the server is started:

    DefaultServer startup time: 195467 ms.

    DefaultServer began.

    This is not the case if I start the server without network.

    How can I solve this problem?

    Thank you

    Ravi

    I see some message on a proxy. Have you checked that you can use the proxy on your network?

    If this isn't the case, you must disable the proxy.

    Timo

  • problems with actionscript 3.0

    Hey im having some problems with my blackjack game. The problem is that the program will not pit the first function and it goes directly to the next function. Can someone help me find the error?

    import flash.display.MovieClip;

    Stop();

    var cardArray:Array = new Array (kort1, kort2, kort3);
    var knapp:MovieClip = new stortrivas;
    addChild (knapp);
    Knapp.Width = 100;
    Knapp.Height = 50;
    Knapp.x = 100;
    Knapp.y = 200;
    knapp.addEventListener (MouseEvent.CLICK, spelare);

    function spelare(e:MouseEvent):void {}


    z = 0;

    for (var k: int = 0; k < 2; k ++) {}
    var pickCard1 = cardArray [int (Math.random () * cardArray.length)];
    var card1:MovieClip = new pickCard1();
    addChild (card1);
    card1.x = 250;
    card1.y = 300;

    If (k < 2) {}
    for (var n: int = 0; n < 2; n ++) {}
    card1.x = 250 + z;
    card1.y = 300;
    z = z + 50;

    }

    }
    }
    }
    knapp.removeEventListener (MouseEvent.CLICK, spelare);
    knapp.addEventListener (MouseEvent.CLICK, dealer);
    function dealer(e:MouseEvent):void {}
    z = 0;

    for (var i: int = 0; i < 2; i ++) {}
    var pickCard = cardArray [int (Math.random () * cardArray.length)];
    var map: MovieClip = new pickCard();
    addChild (card);
    Card.x = 250;
    Card.y = 100;

    If (I < 2) {}
    for (var j: int = 0; j < 2; j ++) {}
    Card.x = 250 + z;
    Card.y = 100;
    z = z + 50;

    }


    }
    }
    }

    There is no listener function that calls spelare().  immediately after the creation of a listener that calls spelare(), move you.

  • Problem with the rendering of JProgressBar in JTable

    I have some problems with the rendering of JProgressBar in JTable. In the case of several lines, when a progress bar is updated, and its text is changing, then he painted all the progress bars in this column.

    Here is my code I used to create the table:
    --------------------------------------------------------------------------------------
    JTable convertTable = new JTable(convertTableModel) {
    
                public Component prepareRenderer(TableCellRenderer renderer,
                        int rowIndex, int vColIndex) {
                    Component c = null;
                    if (renderer != null) {
                        c = super.prepareRenderer(renderer, rowIndex, vColIndex);
    
                        if (vColIndex == INDEX_CONVERT_STATUS) {
                            //System.out.println("c = "+c.getClass());
                            if(c instanceof JProgressBar) {
                                //System.out.println("inside = ");
                                c.setBackground(Color.BLUE);
                            }
                        }
                    }
                    return c;
                }
    
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    if (mColIndex == INDEX_CONVERT_SELECT) {
                        return true;
                    } else if (mColIndex == INDEX_CONVERT_STATUS) {
                        return false;
                    } else {
                        return false;
                    }
                }
    
                /*
                 * JTable uses this method to determine the default renderer/
                 * editor for each cell.  If we didn't implement this method,
                 * then the last column would contain text ("true"/"false"),
                 * rather than a check box.
                 */
                public Class getColumnClass(int c) {
                    if (getValueAt(0, c) != null) {
                        return getValueAt(0, c).getClass();
                    }
                    return null;
                }
            };
    --------------------------------------------------------------------------------------

    Then I applied on this table rendering engine

    ---------------------------------------------------------------------------------------
    // Applying JProgressBar Renderer for convert table
            TableColumn col = convertTable.getColumnModel().getColumn(INDEX_CONVERT_STATUS);
            ProgressBarRenderer progressBarRenderer = new ProgressBarRenderer();
            col.setCellRenderer(progressBarRenderer);
    ---------------------------------------------------------------------------------------

    Class code ProgressBarRenderer is as follows:
    ---------------------------------------------------------------------------------------
    public class ProgressBarRenderer extends JProgressBar implements TableCellRenderer {
    
        private Hashtable ht = new Hashtable();
    
        public ProgressBarRenderer() {
            super(0);
            this.setMinimum(0);
            this.setMaximum(100);
            this.setStringPainted(true);
            this.setBorderPainted(true);
    
            UIDefaults defaults = UIManager.getDefaults();
            Font font = new Font("Arial", Font.BOLD, 12);
            defaults.put("ProgressBar.font", font);
        }
    
        public void setRowEnabled(int row, boolean enabled) {
            ht.put(row, enabled);
        }
    
        public void setForeground(Color c, int row) {
            //System.out.println("setString ht = " + ht.size() + "  row= " + row + "  Selected= " + (Boolean) ht.get(row) + " color= " + c);
            if (ht.isEmpty()) {
                this.setForeground(c);
            } else if (ht.size() == 1) {
                this.setForeground(c);
            } else if ((Boolean) ht.get(row)) {
                this.setForeground(c);            
            } else {
                this.setForeground(c);
            }
        }
    
        public void setString(String s, int row) {
    
            //System.out.println("setString ht = " + ht.size() + "  row= " + row + " text= " + s);
            if (ht.isEmpty()) {
                this.setString(s);
            } else if (ht.size() == 1) {
                this.setString(s);
            } else if ((Boolean) ht.get(row)) {
                this.setString(s);
            } else {
                this.setString(s);
            }
    
        }
    
        @Override
        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            
            //System.out.println("getTableCellRendererComponent = " + table);
            //System.out.println("Renderer ht = " + ht.size() + "  row= " + row + "  Selected= " + (Boolean) ht.get(row));
            
            if (ht.isEmpty()) {
                return this;
            } else if (ht.size() == 1) {
                return this;
            } else if ((Boolean) ht.get(row)) {
                return this;
            } else {
                return null;
            }
        }
    }
    ---------------------------------------------------------------------------------------

    I add the next line and rendered the progress column is follows:
       convertTableModel.addRow(new Vector());
       ((ProgressBarRenderer) convertTable.getCellRenderer(row, INDEX_CONVERT_STATUS)).setRowEnabled(row, false);
    ---------------------------------------------------------------------------------------

    When I add the first row, it works fine, but when I add the second row, he painted the entire column.

    Naturally, you will have problems if you set a string or a color of a table cell value when the class of the column is declared as integer. As I have already said, you need to spend some time with the tutorials.

    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Random;
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.TableCellRenderer;
    
    public class ProgressBarTableCellRendererExample {
    
      Random random = new Random();
      JTable table;
    
      public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
    
          public void run() {
            new ProgressBarTableCellRendererExample().makeUI();
          }
        });
      }
    
      public void makeUI() {
        table = new JTable(10, 1) {
    
          @Override
          public boolean isCellEditable(int row, int column) {
            return false;
          }
        };
        for (int i = 0; i < table.getRowCount(); i++) {
          table.setValueAt(0, i, 0);
        }
        table.getColumnModel().getColumn(0).
                setCellRenderer(new ProgressBarTableCellRenderer());
    
        JButton button = new JButton("Increment");
        button.addActionListener(new ActionListener() {
    
          public void actionPerformed(ActionEvent e) {
            increment();
          }
        });
    
        JFrame frame = new JFrame();
        frame.add(new JScrollPane(table), BorderLayout.CENTER);
        frame.add(button, BorderLayout.SOUTH);
    
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 400);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      }
    
      private void increment() {
        for (int i = 0; i < table.getRowCount(); i++) {
          Object value = table.getValueAt(i, 0);
          if (value instanceof Integer) {
            Integer oldValue = (Integer) table.getValueAt(i, 0);
            int newValue = Math.min(100, oldValue + random.nextInt(25));
            switch (newValue) {
              case 13: // and its multiples
              case 26:
              case 39:
              case 52:
              case 65:
              case 78:
              case 91:
                table.setValueAt("Failed", i, 0);
                break;
              case 100:
                table.setValueAt("Completed", i, 0);
                break;
              default:
                table.setValueAt(newValue, i, 0);
            }
          }
        }
      }
    
      private class ProgressBarTableCellRenderer
              extends JProgressBar implements TableCellRenderer {
    
        private TableCellRenderer stringRenderer =
                new DefaultTableCellRenderer();
    
        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus,
                int row, int column) {
          if (value instanceof Integer) {
            setValue((Integer) value);
            return this;
          } else {
            return stringRenderer.getTableCellRendererComponent(table,
                    value, isSelected, hasFocus, row, column);
          }
        }
        // Override void validate(), invalidate(), revalidate(), repaint()
        // and all overloads of firePropertyChange(...) as no-ops
        // for efficiency
      }
    }
    

    DB

  • Problem with allocating memory collection arraycollection by AddItem

    I have a strange problem with the AddItem method.

    I made a new item with this code:

    ------

    for (var u: int = 0; u < 41; u ++) {}
    Page = new PageToSave();
    project.addPage (page as PageToSave);
    }

    -----

    the project is a distance of class projectblueprint:

    package marcoDoItBetter.utils
    {
    Import mx.collections.ArrayCollection;
    public class ProjectBlueprint
    {
    private var _pages:ArrayCollection;

    public void addPage(page:PageToSave):void
    {
    This._pages. AddItem (page);
    }

    }

    }

    ----

    PageToSave is a class that extends the object.

    When we create the element using the addPages (so with in the collection _pages arraycollection's addItem) programmatically, we have this result using the term Inspector in debug mode.

    It is on the output of the debugger:

    pageList = mx.collections.ArrayCollection (@105cf341)
    [inherited] =
    [0] = marcoDoItBetter.utils.PageToSave (@113cb461)
    [1] = marcoDoItBetter.utils.PageToSave (@113cb401)
    [2] = marcoDoItBetter.utils.PageToSave (@113cb3a1)
    [3] = marcoDoItBetter.utils.PageToSave (@113cb341)
    [4] = marcoDoItBetter.utils.PageToSave (@113cb2e1)
    [5] = marcoDoItBetter.utils.PageToSave (@113cb281) < -.
    [6] = marcoDoItBetter.utils.PageToSave (@113cb221)
    [7] = marcoDoItBetter.utils.PageToSave (@113cb1c1)
    [8] = marcoDoItBetter.utils.PageToSave (@113cb161)
    [9] = marcoDoItBetter.utils.PageToSave (@113cb101)
    [10] = marcoDoItBetter.utils.PageToSave (@113cb0a1)
    [11] = marcoDoItBetter.utils.PageToSave (@113cb041)
    [12] = marcoDoItBetter.utils.PageToSave (@1140dfa1)
    [13] = marcoDoItBetter.utils.PageToSave (@1140df41)
    [14] = marcoDoItBetter.utils.PageToSave (@1140dee1)
    [15] = marcoDoItBetter.utils.PageToSave (@1140de81)
    [16] = marcoDoItBetter.utils.PageToSave (@1140de21)
    [17] = marcoDoItBetter.utils.PageToSave (@1140ddc1)
    [18] = marcoDoItBetter.utils.PageToSave (@1140dd61)
    [19] = marcoDoItBetter.utils.PageToSave (@1140dd01)
    [20] = marcoDoItBetter.utils.PageToSave (@1140dca1)
    [21] = marcoDoItBetter.utils.PageToSave (@1140dc41)
    [22] = marcoDoItBetter.utils.PageToSave (@113cb281) < -.
    [23] = marcoDoItBetter.utils.PageToSave (@1140db81)
    [24] = marcoDoItBetter.utils.PageToSave (@1140db21)
    [25] = marcoDoItBetter.utils.PageToSave (@1140dac1)
    [26] = marcoDoItBetter.utils.PageToSave (@1140da61)
    [27] = marcoDoItBetter.utils.PageToSave (@1140da01)
    [28] = marcoDoItBetter.utils.PageToSave (@1140d9a1)
    [29] = marcoDoItBetter.utils.PageToSave (@1140 d 941)
    [30] = marcoDoItBetter.utils.PageToSave (@1140d8e1)
    [31] = marcoDoItBetter.utils.PageToSave (@1140 d 881)
    [32] = marcoDoItBetter.utils.PageToSave (@1140 d 821)
    [33] = marcoDoItBetter.utils.PageToSave (@1140d7c1)
    [34] = marcoDoItBetter.utils.PageToSave (@1140 d 761)
    [35] = marcoDoItBetter.utils.PageToSave (@1140 d 701)
    [36] = marcoDoItBetter.utils.PageToSave (@1140d6a1)
    [37] = marcoDoItBetter.utils.PageToSave (@1140 d 641)
    [38] = marcoDoItBetter.utils.PageToSave (@1140 d 221)
    [39] = marcoDoItBetter.utils.PageToSave (@1140d5e1)
    [40] = marcoDoItBetter.utils.PageToSave (@1140 d 461)
    source = Array (@1140c9a9)

    as you can see the [5] and the [22] PageToSave id internal flex (or instances of the class has the same address listing.

    "I don't know the exact name of it). It happens totally randomly.

    sometimes fine, sometimes there's more than a duplicate with random address referencing the game.

    I don't want duplicated instances, but I want independent authorities.

    I tried to change addItem with

    This._pages.addItemAt (page, 0);

    Same result.

    I also tried pagina = null before the statement new but same result

    ------

    for (var u: int = 0; u < 41; u ++) {}
    Page = new PageToSave();
    project.addPage (page as PageToSave);

    Page = null;
    }

    -----

    is a garbage collector from?

    How can we solve this problem?

    Thank you

    Hello

    From the looks of it, looks like a bug.

    Are you defining filters or performs a sort on the ArrayCollection collection? Or it's just a pure naked collection instance ArrayCollection.

    Have you tried addItemAt() and got the same result?

    Mike

  • Problem with removeEventListener

    Hello

    I have a code:

    package 
    {
         import adobe.utils.CustomActions;
         import flash.display.MovieClip;
         import flash.events.MouseEvent;
         import flash.text.TextField;
         import flash.events.*;
         import flash.utils.getTimer;
    
    
         public class MyMatching extends MovieClip
         {
              public var play_btn:MyButton = new MyButton();//creating new object play_btn
              public var xIconsContainer=100;//all icons start to draw from this x
              public var yIconsContainer=100;//all icons start to draw from this y
              
              private var iconsVertical=2;//icons columns
              private var iconsHorizontal=2;//icons rows
              
              private var firstIcon;//player click to first icon
              private var secondIcon;//player click to second icon
              
              private var deletedIcons;//if firstIcon==secondIcon we will delete 2 icons
              
              //private var myTimer:MyTimer;
              public var startTime:int = getTimer();
              public var timeString:String;
              
              private var playerScoreSum:int;//sum of all players points
              private var playerScorePreview:TextField;//showing players points to the window
              private var matchPoints:int = 20;//if player match 2 icons we add 20 points to his playerScoreSum
              private var missPoints:int = 1;//if miss we delete 1 points from playerScoreSum
              
              //constructor
              public function MyMatching():void
              {
                   welcomeScreen();
                   deletedIcons = 0;
                   playerScoreSum = 0;
              }
              
              public function welcomeScreen():void
              {
                   gotoAndStop('WelcomeScreen');
                   play_btn.x=210;
                   play_btn.y=300;
                   play_btn.visible=true;
                   addChild(play_btn);//draw play_btn object
                   play_btn.addEventListener(MouseEvent.CLICK, goToLevel_1);//added event for the play_btn object
              }
              
              
              public function startingStopwatch():void
              {
                   addEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopingStopwatch():void
              {
                   removeEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopwatch(event:Event) 
              {
                   var timePassed:int = getTimer()-startTime;
                   var seconds:int = Math.floor(timePassed/1000);
                   var minutes:int = Math.floor(seconds/60);
                   seconds -= minutes*60;
                   timeString = minutes + ":" + String(seconds + 100).substr(1, 2);
                   stopwatch_txt.text = timeString;
              }
              
              
              public function goToLevel_1(event:MouseEvent)
              {
                   play_btn.visible=false;
                   gotoAndStop('Level_1');
                   
                   startingStopwatch();
                   
                   var iconsArray:Array = new Array();//creating new object iconsArray
                   for (var i:int; i < iconsVertical*iconsHorizontal/2; i++)
                   {
                        iconsArray.push(i);
                        iconsArray.push(i);
                   }
                   trace(iconsArray);
                   
                   //added timer to the screen
                   //myTimer = new MyTimer();
                   //addChild(myTimer);
                   
                   
                   
                   //added score to the sceen
                   playerScorePreview = new TextField();
                   playerScorePreview.text = String(playerScoreSum);
                   playerScorePreview.x=200;
                   playerScorePreview.y=0;
                   addChild(playerScorePreview);
                   
                   for (var x:int = 0; x < iconsVertical; x++)
                   {
                        for (var y:int = 0; y < iconsHorizontal; y++)
                        {
                             var iconsList:Icon = new Icon();
                             addChild(iconsList);
                             iconsList.stop();
                             iconsList.x=x*51+xIconsContainer;
                             iconsList.y=y*51+yIconsContainer;
                             var myRandom:int=Math.floor(Math.random()*iconsArray.length);//creates a random number that will be related to an index of the array named "iconsArray"
                             //var showIcon;//cast as whatever type of element the array is holding
                             iconsList.showIcon=iconsArray[myRandom];//assigns the randomly selected element of iconsArray to the variable showIcon
                             iconsArray.splice(myRandom,1);//removes the randomly selected element (now showIcon) from the array (not the last one, the random one) //we use the splice command to remove number from the array so that it won’t be used again
                             //iconsList.gotoAndStop(iconsList.showIcon+2);//showIcon+2 would be the next frame in the timeline after the frame for the random item deleted, so that code is essentially moving in the timeline to the frame just after the frame for the item that was removed from the array
                             trace(myRandom);
                             iconsList.addEventListener(MouseEvent.CLICK, clickToIcon);
                             deletedIcons++;//when we draw icons we every time add +2 icons to our deletedIcons variable, in future we will deleted 2 icons from this variable if firstIcon==secondIcon
                        }
                   }
                   trace("*************************random finished ******************************");
              }
              
              
              
              
              public function clickToIcon(event:MouseEvent)
              {
                   var thisIcon:Icon = (event.currentTarget as Icon);//what icon player clicked...
                   trace(thisIcon.showIcon);//trace clicked icon to the output pannel
                   if (firstIcon==null)
                   {
                        firstIcon=thisIcon;
                        firstIcon.gotoAndStop(thisIcon.showIcon + 2);
                   } 
                   else if (firstIcon == thisIcon)
                   {
                        firstIcon.gotoAndStop(1);
                        firstIcon=null;
                   } 
                   else if (secondIcon==null)
                   {
                        secondIcon=thisIcon;
                        secondIcon.gotoAndStop(thisIcon.showIcon + 2);
                        
                        if (firstIcon.showIcon==secondIcon.showIcon)
                        {
                             playerScoreSum += matchPoints;// +20 points for playerScoreSum
                             playerScorePreview.text = String(playerScoreSum);
                             
                             removeChild(firstIcon);
                             removeChild(secondIcon);
                             deletedIcons -= 2;
                             if (deletedIcons == 0)
                             {
                                  //myTimer.Stop();//stoping timer, so now we know how time player spend to playing the level 1
                                  stopingStopwatch();
                                  stopwatch_txt.text = timeString;//why i don't see time?
                                  gotoAndStop('GameoverScreen');//if player match all icons we go to GameoverScreen                              
                             }
                        }
                        else
                        {
                             playerScoreSum -= missPoints;// -1 point from playerScoreSum
                             playerScorePreview.text = String(playerScoreSum);
                        }
                   }
                   else
                   {
                        firstIcon.gotoAndStop(1);
                        secondIcon.gotoAndStop(1);
                        firstIcon = null;
                        secondIcon = null;
                   }
              }
              
         }
    
    }
    

    There is problem with my clock.

    Code for timer:

    public var startTime:int = getTimer();
              public var timeString:String;
    

    public function startingStopwatch():void
              {
                   addEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopingStopwatch():void
              {
                   removeEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopwatch(event:Event) 
              {
                   var timePassed:int = getTimer()-startTime;
                   var seconds:int = Math.floor(timePassed/1000);
                   var minutes:int = Math.floor(seconds/60);
                   seconds -= minutes*60;
                   timeString = minutes + ":" + String(seconds + 100).substr(1, 2);
                   stopwatch_txt.text = timeString;
              }
    

    When I come to the 'goToLevel_1' function I start funciton "startingStopwatch()";

    So all work I see my stopwatching... time goes...

    Then when I go to a gameover screen I don't see a timer:

    if (deletedIcons == 0)
                             {
                                  //myTimer.Stop();//stoping timer, so now we know how time player spend to playing the level 1
                                  stopingStopwatch();
                                  stopwatch_txt.text = timeString;//why i don't see time?
                                  gotoAndStop('GameoverScreen');//if player match all icons we go to GameoverScreen                              
                             }
    

    Why his arrival?

    And another question:

    When I click to play_btn I see error in the output window:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to MyMatching / stopwatch)

    How can I solve this problem?

    Thank you.

    1009 error indicates that one of the objects targeted by your code is out of reach, and I suspect that this means your textfield stopwatch_txt.  This may mean that the object...

    n ' is not in the display list
    n ' is not have an instance name (or the name of the instance is misspelled)
    n ' is not in the frame where this code tries to talk to her
    -is animated in place, but is not assigned the name of the instances of each keyframe for her
    -is one of the two or more keyframes consecutive same objects with different names assigned.

    If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

Maybe you are looking for

  • How can I disable the microphone?

    While dance video coverage on my iPad Air, I need to hear the music so I can perform the dance, but I don't want the music in my video. How can I turn off the microphone so I can use the music without registration in my video?

  • Qosmio G20 beep a screen much and dimming - why?

    Sometimes my Qosmio G20 begins beeping very much and reduce the brightness on the screen.This happens while it is running on the current and with the option of putting to the highest level.Simoultanesly there is some blue lights above the keyboard th

  • Two monitors ThinkCentre M32

    Help please! Starting a new job and I was wondering if the Lenovo Thinkcentre M32 is capable of having two monitors. Or how to know. And if yes what cords do I use? Thank you

  • Walkman problem

    I updated the Walkman recently and after the update whenever I'm listening to music the walkman should pause randomly or there is no sound for a second while a song is being played. Please HELP

  • How to add a tail to the end of a text in photoshop?

    How to add a tail to the end of a text in photoshop?