Search Results

Search found 9416 results on 377 pages for 'dont repeat yourself'.

Page 14/377 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Pascal's repeat... until vs. C's do... while

    - by Bob
    In C there is a do while loop and pascal's (almost) equivalent is the repeat until loop, but there is a small difference between the two, while both structures will iterate at least once and check whether they need to do the loop again only in the end, in pascal you write the condition that need to met to terminate the loop (REPEAT UNTIL something) in C you write the condition that need to be met to continue the loop (DO WHILE something). Is there a reason why there is this difference or is it just an arbitrary decision?

    Read the article

  • PRISM : « la chasse est lancée » contre l'auteur des fuites, nouvelles révélations sur la manière dont la NSA s'intéresse aux communications chiffrées

    Le projet PRISM autorise les fédéraux américains à fouiller nos données stockées en ligne un ancien employé aux renseignements le dévoileSe basant sur des fuites d'un ancien employé au renseignement américain, l'éditorial américain Washington Post a révélé que l'agence de sécurité nationale américaine (NSA) et le FBI avaient accès aux bases de données de neuf poids lourds sur internet, parmi lesquels Facebook, Google ou même encore plus récemment Apple. Le projet, au nom de code PRISM, mis en place depuis 2007, permet aux deux agences de fouiller les données clients de ces entreprises sans aucune ordonnance préalable de la justice.

    Read the article

  • How to override the new limited keyboard repeat rate limit?

    - by Olivier Pons
    I may be an alien around here, but here's my problem: the speed limit on old Ubuntu releases (= before 11) was very very fast. It was really great for me. Now, on Ubuntu 11, they may have thought: "who will ever want that speed? Nobody! So let's put the maximum speed to a lower limit". It's so stupid that they tried to narrow down the speed to some other famous OS. If Linux is more powerful, why remove some of its power? I don't get that. So is there any way to override that speed limit and get my keyboard as fast as it is on other previous versions?

    Read the article

  • Image SEO - always repeat main keyword in alt text?

    - by Marcus Edensky
    I'm working on an Easter Island website and I'm currently redesigning my image system. Virtually all my photos are of Easter Island. My question is, should I always include the keywords "Easter Island" for Google to easier understand that my photos are from Easter Island, or is it sufficient that the "Easter Island" keywords are in the domain, as well as in all other pages of the site? For example, Alt text 1: "Moai statues at volcano Rano Raraku at Easter Island (Rapa Nui)" or Alt text 2: "Moai statues at volcano Rano Raraku" Would example 1 be considered keyword stuffing by Google

    Read the article

  • What are the dos and dont's when leaving a job? [closed]

    - by john ryan
    I'm going to resign from my current employer (manufacturing sector), where I've been working for 2.6 years as an IT Application Developer. It's the first company I've worked in after I graduated from college. I don't have any problem with the company, I just realized that I want to learn new technologies and get out of my comfort zone and move to the IT industry. I already got a job offer from another company. My IT manager has told me that I am one of the best players in our group, that our group is enough to support our company and that it would be unacceptable if anyone of us resigned. They will counter the offer, but I'm set on leaving. My problem is that I don't know what are the essential dos and don'ts when resigning from a current employer. For example I'm expecting a lot of inquiries on why I'm leaving from people in the company, what do I need to say?

    Read the article

  • Is it OK to repeat code for unit tests?

    - by Pete
    I wrote some sorting algorithms for a class assignment and I also wrote a few tests to make sure the algorithms were implemented correctly. My tests are only like 10 lines long and there are 3 of them but only 1 line changes between the 3 so there is a lot of repeated code. Is it better to refactor this code into another method that is then called from each test? Wouldn't I then need to write another test to test the refactoring? Some of the variables can even be moved up to the class level. Should testing classes and methods follow the same rules as regular classes/methods? Here's an example: [TestMethod] public void MergeSortAssertArrayIsSorted() { int[] a = new int[1000]; Random rand = new Random(DateTime.Now.Millisecond); for(int i = 0; i < a.Length; i++) { a[i] = rand.Next(Int16.MaxValue); } int[] b = new int[1000]; a.CopyTo(b, 0); List<int> temp = b.ToList(); temp.Sort(); b = temp.ToArray(); MergeSort merge = new MergeSort(); merge.mergeSort(a, 0, a.Length - 1); CollectionAssert.AreEqual(a, b); } [TestMethod] public void InsertionSortAssertArrayIsSorted() { int[] a = new int[1000]; Random rand = new Random(DateTime.Now.Millisecond); for (int i = 0; i < a.Length; i++) { a[i] = rand.Next(Int16.MaxValue); } int[] b = new int[1000]; a.CopyTo(b, 0); List<int> temp = b.ToList(); temp.Sort(); b = temp.ToArray(); InsertionSort merge = new InsertionSort(); merge.insertionSort(a); CollectionAssert.AreEqual(a, b); }

    Read the article

  • Tester/Doer pattern: Assume the caller conforms to the pattern or be defensive and repeat the check?

    - by Daniel Hilgarth
    Assume a simple class that implements the Tester/Doer pattern: public class FooCommandHandler : ICommandHandler { public bool CanHandle(object command) { return command is FooCommand; } public void Handle(object command) { var fooCommand = (FooCommand)command; // Do something with fooCommand } } Now, if someone doesn't conform to the pattern and calls Handle without verifying the command via CanHandle, the code in Handle throws an exception. However, depending on the actual implementation of Handle this can be a whole range of different exceptions. The following implementation would check CanHandle again in Handle and throw a descriptive exception: public void Handle(object command) { if(!CanHandle(command)) throw new TesterDoerPatternUsageViolationException("Please call CanHandle first"); // actual implementation of handling the command. } This has the advantage that the exception is very descriptive. It has the disadvantage that CanHandle is called twice for "good" clients. Is there a consensus on which variation should be used?

    Read the article

  • La FAQ Perl/Tk, 80 réponses à vos questions dont 13 mises à jour, avec un moteur de recherche intégré

    Salut,Comme on peut le constater, Perl manque malheureusement de cours sur le net en rapport avec la création d'interfaces graphique via Tk. Il existe néanmoins quelques cours sur developpez.com dans la partie coursNoter qu'il est vraiment possible de créer très facilement de très bonnes interfaces graphiques en Perl, et je souhaite d'ailleurs créer une FAQ pour l'occasion, mais je voudrais d'abord connaitre l'avis des Perlistes du forum.Maintenant que la FAQ Perl/Tk est présente, n'hésitez pas à faire des suggestions de questions que vous souhaitez voir pouvant aider les perléens.Vous pouvez tous participer à son évolution.Merci...

    Read the article

  • C Programming arrays, I dont understand how I would go about making this program, If anyone can just guide me through the basic outline please :) [on hold]

    - by Rashmi Kohli
    Problem The temperature of a car engine has been measured, from real-world experiments, as shown in the table and graph below: Time (min) Temperature (oC) 0 20 1 36 2 61 3 68 4 77 5 110 Use linear regression to find the engine’s temperature at 1.5 minutes, 4.3 minutes, and any other time specified by the user. Background In engineering, many times we measure several data points in an experiment, but then we need to predict a value that we have not measured which lies between two measured values, such as the problem statement above. If the relation between the measured parameters seems to be roughly linear, then we can use linear regression to find the relationship between those parameters. In the graph of the problem statement above, the relation seems to be roughly linear. Hence, we can apply linear regression to the above problem. Assuming y {y0, y1, …yn-1} has a linear relation with x {x0, x1, … xn-1}, we can say that: y = mx+b where m and b can be found with linear regression as follows: For the problem in this lab, using linear regression gives us the following line (in blue) compared to the measured curve (in red). As you can see, there is usually a difference between the measured values and the estimated (predicted) values. What linear regression does is to minimize those differences and still give us a straight line (blue). Other methods, such as non-linear regression, are also possible to achieve higher accuracy and better curve fitting. Requirements Your program should first print the table of the temperatures similar to the way it’s printed in the problem statement. It should then calculate the temperature at minute 1.5 and 4.3 and show the answers to the user. Next, it should prompt the user to enter a time in minutes (or -1 to quit), and after reading the user’s specified time it should give the value of the engine’s temperature at that time. It should then go back to the prompt. Hints •Use a one dimensional array to store the temperature values given in the problem statement. •Use functions to separate tasks such as calculating m, calculating b, calculating the temperature at a given time, printing the prompt, etc. You can then give your algorithm as well as you pseudo code per function, as opposed to one large algorithm diagram or one large sequence of pseudo code.

    Read the article

  • Microsoft publie le Patch Tuesday du mois de mars, qui corrige sept failles de sécurité dont 2 critiques dans Visual Studio

    Le Patch Tuesday concerne aussi Windows 8 Consumer Preview et apporte plusieurs correctifs de bogues à l'OS Mise à jour du 15/03/2012 Le Patch Tuesday publié mardi dernier par Microsoft apporte quelques correctifs à Windows 8 Consumer Preview. Ces mises à jour intègrent 8 correctifs pour des bugs dans l'OS. Le premier concerne une mise à jour de compatibilité des applications. Le second corrige un problème dans « Broker Infrastructure Service », pouvant conduire au ralentissement des connexions. Un Patch corrige deux bugs dans IE10, pouvant conduire à une fuite de mémoire. Les autres correctifs améliorent la préc...

    Read the article

  • Does running Nexuiz gives extra pressure on Processor if you dont have external Graphics card?

    - by Curious Apprentice
    Its a rather stupid question, though I want to be sure. Does having a external graphics card can lower the stress over the processor? what kind of graphics card Ubuntu supports ? Well I'm planning to buy a graphics card for Windows 7 as I have started learning Adobe Premiere Pro. Which G card should I buy? Do i consider the card or the availability of the card drivers for Ubuntu Linux ? If I install a Graphics card and does not install its drivers can I left it unused on Ubuntu ? I don't think theres a much need for G card on Ubuntu Though.

    Read the article

  • Sortie de Micro Focus Rumba 9.0 : l'émulateur de terminal offre trois types d'UI pour les applications mainframe, dont celle de l'iPad

    Micro Focus Rumba disponible dans sa version 9.0 La suite d'émulation de terminal propose trois interfaces pour les applications mainframe Micro Focus, éditeur de solutions de gestion, de test et de modernisation d'applications d'entreprise, vient de présenter les principales nouveautés apportées par la version 9 de sa suite d'émulation de terminal Rumba. [IMG]http://ftp-developpez.com/gordon-fowler/Micro%20Focus%20Rumba%20iPad.jpg[/IMG] Rumba version iPad Rumba, dans sa version 9.0, propose dorénavant trois interfaces afin d'émuler les applications mainframe : l'interface Desktop à laquelle...

    Read the article

  • How come ASUS sells Ubuntu installed 1225Cs, when we dont have drivers for gma3600?

    - by sumit_gt
    I recently purchased a ASUS 1225C cedar trail netbook. It didn't come preinstalled with Ubuntu like it comes in some markets. I installed Ubuntu 12.04 LTS on it. While Ubuntu works just fine, I am bothered by the lack of proper graphics support because of intel gma 3600. I am aware that this is not a problem of Ubuntu. My question is this: How does ASUS manage to sell these netbooks in other markets with Ubuntu preinstalled? How does ASUS manage to get everything to work? And if they can, why aren't I able to do the same? link: For more on Asus 1225C As you can see, they show Ubuntu working perfectly in the screenshots. Is this false advertising?

    Read the article

  • Apple ne payera aucun impôt au Royaume-Uni sur 2012, en France les géants de l'IT ne payeraient que 1 % de l'impôt dont ils devraient s'acquitter

    Apple ne payera pas d'impôt au Royaume-Uni sur 2012 En France les géants de l'IT payent 1 % de ce qu'ils devraient d'après le Conseil National du NumériqueDans la continuité des débats sur l'optimisation fiscale (ou « évasion » selon les points de vue), une information risque de faire grincer quelques dents supplémentaires un peu partout en Europe. Apple n'a payé aucun impôt sur les sociétés cette année (exercice 2012) au Royaume-Uni.Comme d'habitude, les mécanismes de transfert de bénéfices via des jeux de filiales basées dans des paradis fiscaux et de facturation de droits d'exploitation de propriétés intellectuelles sont montrés du doigt...

    Read the article

  • I want to play mp3 in rythmbox but it says python v2 plugins requires mpeg-1 layer mp3 decoder but i dont have internet on that computer,

    - by Ubuntu_lover
    Because i use internet from usb device which supports only on windows, and when I downloaded offline files from packages.ubuntu.com and linuxappsfinder.com and tried to install them in ubuntu, i just double clicked on such file(whose format extension was .deb), then it opened in ubuntu software center but said, dependency is not supported, How can i install softwares and plugins or codecs in ubuntu, without internet? I tried to make file through terminal using zipped files, (tar.bz2), but said something xml not found.

    Read the article

  • JSF ui:repeat and f:ajax giving wrong value for h:inputText after rerender.

    - by Andrew
    I have a list of questions and I can display them ok using a ui:repeat, but after clicking the Edit button the rerendered inputText is given the wrong question.id. For some reason, if you click Edit on the first item, the inputText value assigned is that of the second item in the list, even though other outputs (other than the h:inputText element) are correct. <h:form id="questionnaireForm"> <ui:repeat value="#{ProjectManager.currentProject.preQuestions}" var="question" varStatus="current" id="preQuestionsRepeat"> <div> <ui:fragment rendered="#{!question.editing}"> <f:ajax render="@form"> <p>#{question.id} #{question.questionText}</p> <h:inputText value="#{question.id}"/> <h:commandLink styleClass="link" action="#{question.setEditing}" value="Edit"> </h:commandLink> </f:ajax> </ui:fragment> </div> <div> <ui:fragment rendered="#{question.editing}"> <f:ajax render="@form"> <p>#{question.id} #{question.questionText}</p> <h:inputText value="#{question.id}"/> </f:ajax> </ui:fragment> </div> </ui:repeat> </h:form> Obviously I don't really want to edit the id. I just want the correct question.something to show up in my inputText :-) Perhaps I'm not using correctly? It seems fine according to my reading so far. Many thanks for your assistance.

    Read the article

  • Why does p:panelGrid not work with ui:repeat?

    - by CycDemo
    If I use as below, I get no error, no output. Why does p:panelGrid not work with ui:repeat? Note : I don't want to use c:forEach because of the I already face a lot of JSF issue. <p:panelGrid> <ui:repeat value="#{MyBean.dataList}" var="data"> <p:row> <p:column> <h:outputText value="#{data.name}"/> </p:column> <p:column> <h:outputText value="#{data.description}"/> </p:column> </p:row> </ui:repeat> </p:panelGrid> MyBean.java public List<Data> getDataList(){ List<Data> result = new ArrayList<Data>(); result.add(new Data("Name 1", "Description 1")); result.add(new Data("Name 2", "Description 2")); result.add(new Data("Name 3", "Description 3")); result.add(new Data("Name 4", "Description 4")); return result; } Expected output with primefaces

    Read the article

  • How to close all tabs in Safari using AppleScript?

    - by Form
    I have made a very simple AppleScript to close all tabs in Safari. The problem is, it works, but not completely. Here's the code: tell application "Safari" repeat with aWindow in windows repeat with aTab in tabs of aWindow aTab close end repeat end repeat end tell I've also tried this script: tell application "Safari" repeat with i from 0 to the number of items in windows set aWindow to item i of windows repeat with j from 0 to the number of tabs in aWindow set aTab to item j of tabs of aWindow aTab close end repeat end repeat end tell ... but it does not work either. I tried that on my system (MacBook Pro jan 2008), as well as on a Mac Pro G5 under Tiger and the script fails on both, albeit with a much less descriptive error on Tiger. The problem is that only a couple of tabs are closed. Running the script a few times closes a few tab each time until none is left, but always fails with the same error after closing a few tabs. Under Leopard I get an out of bounds error. Since I am using fast enumeration (not using "repeat from 0 to number of items in windows") I don't see how I can get an out of bounds error with this... My goal is to use the Cocoa Scripting Bridge to close tabs in Safari from my Objective-C Cocoa application but the Scripting Bridge fails in the same manner. The non-deletable tabs show as NULL in the Xcode debugger, while the other tabs are valid objects from which I can get values back (such as their title). In fact I tried with the Scripting Bridge first then told myself why not try this directly in AppleScript and I was surprised to see the same results. I must have a glaring omission or something in there... (seems like a bug in Safari AppleScript support to me... :S) I've used repeat loops and Obj-C 2.0 fast enumeration to iterate through collections before with zero problems, so I really don't see what's wrong here. Anyone can help? Thanks in advance!

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >