Code (débutant) demande avis

Bonjour à tous,
Je propose au yeux des anciens un petit exercice que je me suis imposé ...
vos avis, remarques ... tout m'intéresse.
Description de la manip:
Je génère 1000 nombres aléatoires, fourchette de [0 .. 9].
Le but de ce VI : Quel est le nombre qui a été généré le plus souvent ?
en A: j'initialise un Tableau de 10 éléments (à 0)
en B: le générateur
en C: J'utilise chaque nb généré comme un index,
         et pour chaque nombre généré, avec cet index, j'incrémente l'élement correspondant du Tableau.
         Ici, une question ... y a-t-il d'autres façons d'incrémenter un élément dans un Tableau ?
en D: Je recherche l'élement le plus grand du Tableau.
         Le code de "D" me "plait" assez bien.
         J'utiliser un noeud de rétroaction avec son terminal "enable/disable".
         Impossible d'utiliser un registre à décalage, celui-ci ne ne proposant pas de fonction "enable/disable"
         Ca fonctionne tip-top (en termes de résultats) ,mais le résultat c'est une chose... et faire du beau code, c'est autre chose.
Le résultat final se trouve dans "nb max".
<EDIT>
En fait non, le résultat final c'est l'index de ce nombre maximum dans le tableau.
mais le time-out du forum ne me permettra pas d'ajouter le (petit) code manquant.
Sans avis "extérieurs", difficile d'avancer.
remarques, conseils, critiques ... je prends tout.
Un grand merci à tous.

Rodéric,
j'ai fait la comparaison. Création / initialisation d'un Tableau de 10 éléments. ( 10e7 fois et mesure du temps)
au dessus   : avec une boucle For et indexation
en dessous : avec la fonction Initialize array
Je ne comprends pas, vous parliez de performances supérieures avec "boucle For + indexation"
Quelque chose doit certainement m'avoir échappé, car ici, je remarque l'inverse.
au dessus   : avec une boucle For et indexation : 460ms
en dessous : avec la fonction Initialize array : 38ms
(comprends pas !)

Similar Messages

  • My iPod iTunes thing is be a pain in the you know what and won't let download anything cause my account verified thing keeps popping up and I put my security code in but it won't work and I have my iTunes redeem card and it wo t let me use it.please help

    My iPod iTunes thing is be a pain in the you know what and won't let download anything cause my account verified thing keeps popping up and I put my security code in but it won't work and I have my iTunes redeem card and it wo t let me use it.please help

    Maybe heresince yu proviced little informatin about what security code yu are talking about.
    iTunes Store: My credit card's security code or zip code does not match my bank's records
    Contact iTunes:
    Apple - Support - iTunes - Contact Us

  • TS2380 It's says I have error code (13014) but I cant open iTunes or get on the internet

    It's says I have error code (13014) but I cant open iTunes or get on the internet

    "Extended" network means your phone is picking up towers from another carrier that Sprint has an agreement with. Long story short, Sprint does not have adquate coverage in the area where you are located when you see "extended".

  • Show counts where an account has a code(s) but not other code(s) on it

    Hi I'm fairly new to PowerPivot so I'm sure one of the experts has a good answer for this.
    We have customer accounts that have service codes attached to them…i.e customer 123 could have service code 1,2,3,4,5 etc..
    What I want to do is show counts where a customer has service code(s) but doesn't have other code(s).
    For example, maybe I want to show how many active customers have service code 1 but don't have service code 4 and 5.
    Is there a simple way I can do this?
    Also I want to create this to allow for the user to choose which codes to select to compare.
    I tried using slicers but that doesn’t seem like an option.
    This should be easy to figure out I would think but I’m struggling.
    Anyone have a recommendation to point me in the right direction?
    Thanks

    Apologies, I do not have a copy of 2010 on my computer, but here are all of the formulae:
    IncludeCount:=CALCULATE(
        COUNTROWS( VALUES( CustomerCodes[customer] ) )
        , USERELATIONSHIP( CustomerCodes[service code], IncludeCode[Include] )
    ExcludeCount:=CALCULATE( 
        COUNTROWS( VALUES( CustomerCodes[customer] ) )
        , USERELATIONSHIP( CustomerCodes[service code], ExcludeCode[Exclude] )
    Include1:=IF( [IncludeCount] - [ExcludeCount] > 0, 1, 0 )
    CustomerCount:=SUMX(
        VALUES( CustomerCodes[customer] )
        , [Include1]
    And here are the tables I've got:
    CustomerCodes:
    customer
    service code
    1
    1
    1
    2
    1
    3
    1
    4
    2
    1
    2
    3
    3
    4
    3
    5
    3
    6
    4
    6
    IncludeCode
    Include
    1
    2
    3
    4
    5
    6
    ExcludeCode
    Exclude
    1
    2
    3
    4
    5
    6
    Relationships
    Active
    Table
    Related Lookup Table
    No
    CustomerCodes [service code]
    IncludeCode [Include]
    No
    CustomerCodes [service code]
    ExcludeCode [Exclude]
    This should be everything you need to recreate exactly what I've done and then apply it to your model.

  • IWEB google adsense widget tell's me i haven't a account, so i can't inplement my adsence code. But i do haven a account! What to do?

    Using Iweb! google adsense widget tell's me i haven't a account, so i can't inplement my adsence code. But i do haven a account! What to do?

    Yes well it will, because a lot of the widgets used in iWeb had information that was stored on the MobileMe servers and now MobileMe has gone, so has that info on the servers.
    All you'll need to do is go directly to Google and set up an account there yourself and then copy and paste the resultant code into an ordinary html snippet in iWeb and then click Apply and it should work again.
    There have also been lots of posts on this very same subject, so you should perhaps have searched this forum first before posting.

  • HT1212 My Iphone 4 has been stuck on a loading symbol for a week now, I've plugged it into the computer but can't do anything still because it says I need to put my pass-code in, but I can't the screen is on loading still! Any ideas on how to fix this pro

    My Iphone 4 has been stuck on a loading symbol for a week now, I've plugged it into the computer but can't do anything still because it says I need to put my pass-code in, but I can't the screen is on loading still! Any ideas on how to fix this problem?

    On the new laptop, launch iTunes. From the menu bar click Store / Authorize This Computer.
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer

  • HT201328 I have iphone 4 with virgin mobile canada, virgin provided me SIM unlock code online, but i don't know how to use that code to unlock my phone. Can anyone help me in this?

    I have iphone 4 with virgin mobile canada, virgin provided me SIM unlock code online, but i don't know how to use that code to unlock my phone. Can anyone help me in this?

    That's not how unlocking an iPhone works.
    The carrier the phone is locked to submits a request to Apple, wh updates their database. When that is complete, you restore the phone with iTunes to process the unlock.

  • I have used Illustrator CS3 on my two try or three previous computers. Now I try to install Illustrator CS3 on a my new (4 weeks old) computer. Adobe does not allow me, but demands me to proof myself being an owner of Illustrator CS2 or older. I don't man

    I have used Illustrator CS3 on my two try or three previous computers. Now I try to install Illustrator CS3 on a my new (4 weeks old) computer. Adobe does not allow me, but demands me to proof myself being an owner of Illustrator CS2 or older. I don't manage to speak English on phone, bad hearing, to fast spoken, odd expressions.What can I do? Is there a possibility to write a complain?

    You can use online chat to talk with Adobe.  For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you

    Hi folks, can someone help me with my redemption code?
    have a creative cloud id made last week.
    but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me???
    Thank you

    I have a fully companies annual subscription of 69.99 a month.
    but I can only download the 30-day trial versions.
    and if I want to put on them completely firedamp should I enter a redemption code. could it be that the code later emailed word?
    Met vriendelijke groet,
    Dave Dros
    Van: "hans-g." <[email protected]<mailto:[email protected]>>
    Beantwoorden - Aan: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Datum: dinsdag 21 oktober 2014 10:03
    Aan: iMac <[email protected]<mailto:[email protected]>>
    Onderwerp:  Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you
    Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you
    created by hans-g.<https://forums.adobe.com/people/hans-g.> in Adobe Creative Cloud - View the full discussion<https://forums.adobe.com/message/6850359#6850359>

  • SECURITY CODE INVALID/ BUT IT ISNT

    WHEN I TRY TO DL APPS, ERROR MESSAGE "SECURITY CODE INVALID"   BUT IT IS NOT. IT WORKED BEFORE

    I, too, am having this problem! It's really quite frustrating! This is the second time this has happened to me too.

  • TS3694 My iPad says it has to restore to update, but it will not.  It is caught in a cycle of not being able to restore but needed to restore.  I keep getting error code 3014 but I can not figure out what this means!

    My iPad says it has to restore to update, but it will not.  It is caught in a cycle of not being able to restore but needed to restore.  I keep getting error code 3014 but I can not figure out what this means! nor can I do anything about it!  So Frutrated!

    Also...
    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    But... if the Device has been Modified... this will Not necessarily work.

  • Mise à jour de créative cloud pour le bureau Code erreur : 50 Demandez de l'aide Que faire ?

    Echec de la mise à jour de créative cloud pour le bureau Code erreur : 50 Demandez de l'aide Que faire ?

    "Failed to install" | Creative Cloud Desktop : https://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html

  • For Cisco SPA112: can I make dial plan that can use 6 digit number without having to dial the area code 00357 but not for 0030?

    Cisco SPA112:
    Can I make dial plan that can use 6 digit numbers without having to dial the area code 00357 but also being able to dial 0030xxxxxxxxxx numbers?

    If you include a country number, you have to drop the initial 0 from the area code. eg +31 10 2345 6789 instead of +31 (0)10 2345 6789

  • Good afternoon, I'm normally the security code disabled but yesterday as he visits I enabled it and put my usual code but my iphone 4S version 5.1.1 and says it is wrong now only ever asks me to connect to itunes or me allows you to enter the code again.

    Good afternoon, I'm normally the security code disabled but yesterday as he visits I enabled it and put my usual code but my iphone 4S version 5.1.1 and says it is wrong now only ever asks me to connect to itunes or me allows you to enter the code again.
    can you tell me how can I fix it? thank you

    DO as the manual says to do and restore your iphone

  • My bluetooth keyboard (Macnus 3.0) is recognised by my iMac but will  not pair?  I have paired it with my iPad using code 8310 but it still will not pair with my iMac.  Can someone help please?

    My bluetooth keyboard (Macnus brand - bought recently in Thailand)(similar to Mac small keyboard) will pair with my iPad using code 8310,and is recognized by my iMac but will not pair?
    There are very scant instructions with the keyboard and no mention of any code (the code was prompted by my iPad).
    I have followed the instructions but it still will not pair with my iMac!
    Can anyone help please?
    My iMac is 20 inch  Mid 2007 OSX10.9.1 4GB RAM

    Hi All, thank you for you suggestions.  I have been unable to find any website for the maker, but have looked at several Thai/cambodian sites incl <http://www.buycoms.com/Article/8435/index.asp>  which mentions the keyboard being suitable for tablet or windows.  No mention of iMac!  although the box is branded to indicate Mac compatable.
    I'm thinking that maybe it just will not pair with an iMac.
    Ill keep looking for the maker website, which might come on later in the future? maybe?
    thanks again.

Maybe you are looking for

  • [SOLVED]overriding VO's SQL query in an application module

    Hi, can anybody help me in searching examples of everriding some aspects of VO in an application module. As i learned we can override, for example the "WHERE" clause of an VO's SQL query in different application modules, using as i supply the addWher

  • Free Items as Sample for Demonstration

    Hi All, How to create an order for Free of Cost item which is to be dispatched as Sample for Demonstration purpose. This time we are creating it from ZOR2 but not finding it convinient. Thanks Ankit Airun

  • Log out of a secured realm?

    I am hosting a website on my server and have protected a folder using the Realms feature. I am successfully able to add users and log in, but have not found a way to log out. It seems that the only way for the user to log out is to quit his/her brows

  • [SOLVED]Pacman don't want to update on Bash!

    Hello, I got a strange problem by updating my system. When I give the update command in a GNOME terminal Pacman gives the following: :: Synchronizing package databases... error: failed retrieving file 'core.db.tar.gz' from ftp.belnet.be : Not logged

  • How do I extract xml from web service

    I am using a web service to send a soap envelope to a third party and I need to troubleshoot the data being sent. How do get the code to show me the xml it sending in the soap envelope?