Search Results

Search found 3195 results on 128 pages for 'tip and tricks'.

Page 50/128 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Recognizing when to use the mod operator

    - by Will
    I have a quick question about the mod operator. I know what it does; it calculates the remainder of a division. My question is, how can I identify a situation where I would need to use the mod operator? I know I can use the mod operator to see whether a number is even or odd and prime or composite, but that's about it. I don't often think in terms of remainders. I'm sure the mod operator is useful and I would like to learn to take advantage of it. I just have problems identifying where the mod operator is applicable. In various programming situations, it is difficult for me to see a problem and realize "hey! the remainder of division would work here!" Any tips or strategies? Thanks

    Read the article

  • A Book about Productivity for programmers

    - by dole doug
    I just find this video about productivity for programmers by peepcode and I'm thinking to download and see it. Besides that, I have to tell you that I prefer to read a book and take notices about it, rather than seeing a video. So, my question is: can you recommend me a good book about productivity for programmers with tips, advices, best practice, et? ps: I'm new into this work field(because I'm still a student).

    Read the article

  • Do you have any favorite ergonomic exercise or habit?

    - by melaos
    I've read somewhere that ergonomic problems accounts for 70% of injury... And i don't want to be one of those guys who think, ahh it's just a slight sore, and go on and discover that i have CTS and have to operate on my hands!!! So are the any good ergo habits that you follow religiously each day? Or some cool tools that would send any ergo issue to a cold hell and force it to stay there. So we can program hopefully until we're old and wicked.

    Read the article

  • XCode Intellisense Question

    - by Cody C
    I've always seem to work around this lack of knowledge but I thought I would ask the community. I hope this question will make sense. In XCode, when I call a function that has several parameter the intellisense pops up. When I hit TAB the first time, it takes me directly to the first parameter. How do I get to the next parameter easily. If I hit TAB again, it puts an actual TAB in the line. For the last month I've been using arrow keys but I figured there must be a keyboard shortcut.

    Read the article

  • Fast modulo 3 or division algorithm?

    - by aaa
    Hello is there a fast algorithm, similar to power of 2, which can be used with 3, i.e. n%3. Perhaps something that uses the fact that if sum of digits is divisible by three, then the number is also divisible. This leads to a next question. What is the fast way to add digits in a number? I.e. 37 - 3 +7 - 10 I am looking for something that does not have conditionals as those tend to inhibit vectorization thanks

    Read the article

  • TextMate tips for Rails Development

    - by Ganesh Shankar
    Working on Rails code for a bit has started me on the spiral into obsessively customising my dev environment (I say obsessive as at the last Rails meetup I went to there was some guy who was raving about shaving milliseconds off each line of code and therefore upto half an hour a day... I hope I don't become that guy...) I spend most of my time in TextMate so it seemed like a great place to start the optimising... So far I've added a few TextMate bundles like Git Bundle, Project Plus and the theme from Railscasts. I've noticed some of the other TextMate users I've come into contact with using heaps of nifty keyboard shortcuts and other plugins to help make their dev environment more friendly. Looking around the net, I was a bit overwhelmed by the amount of shortcuts and plugins available... So I was hoping to hear from other Rails developers out there: What are some good keyboard shortcuts and plugins that I should be aware of for TextMate with specific reference to Rails Development? I've read this question on SO: http://stackoverflow.com/questions/99807/what-are-some-useful-textmate-shortcuts but I was wondering if there was something a bit more specific to Rails development.

    Read the article

  • Hidden features of WPF and XAML?

    - by Sauron
    Here is a large number of hidden features discussed for variety of languages. Now I am curious about some hidden features of XAML and WPF? One I have found is the header click event of a ListView <ListView x:Name='lv' Height="150" GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"> The GridViewColumnHeader.Click property is not listed. Some of relevant features so far: Multibinding combined with StringFormat TargetNullValue to bindings TextTrimming property Markup extensions Adding Aero effect to Window Advanced "caption" properties XAML Converters See also: Hidden features of C# Hidden features of Python Hidden features of ASP.NET Hidden features of Perl Hidden features of Java Hidden features of VB.NET Hidden features of PHP Hidden features of Ruby Hidden features of C And So On........

    Read the article

  • How to automatically fix MISSING reference in a dll when a referenced library is broken in VB6?

    - by systempuntoout
    What do you do when you break compatibility on a common library used by many other libraries? What i usually do is: For every dll that reference the broken one Checkout dll Checkout vbp project Open vpb project with VB6 Ide Click on References button Uncheck MISSING reference and OK Click on References button Check references and OK Click on Make dll Close project This can be a pita activity, when you have many Dll to recompile and it can be error prone because you could miss some Dll (anyway we have continuous integration that alert this cases). What's your best practice to handle this scenario?

    Read the article

  • Are there any "undocumented features" in Silverlight?

    - by Sorskoot
    I was wondering if there are any features in Silverlight 2 or 3 that aren't documented or are hidden very deep in the framework? Stuff that can be very helpful in some cases, but can be a pain to find. Are there any "hidden" gems? I'm thinking about stuff you normaly don't find in tutorials and in demos. For example, finding information about the operating system the Silverlight Application is running on thru the System.OperatingSystem class.

    Read the article

  • learning to type - tips for programmers?

    - by OrbMan
    After hunting and pecking for about 35 years, I have decided to learn to type. I am learning QWERTY and have learned about 2/3 of the letters so far. While learning, I have noticed how asymmeterical the keyboard is, which really bothers me. (I will probably switch to a symmetrical keyboard eventually, but for now am trying to do everything as standard and "correct" as possible.) Although I am not there yet in my lessons, it seems that many of the keys I am going to use as a C# web developer are supposed to be typed by the pinky of my right hand. Are there any typing patterns you have developed that are more ergonomic (or faster) when typing large volumes of code rife with braces, colons, semi-colons and quotes? Or, should I just accept the fact that every other key is going to be hit with my right pinky? It is not that speed is such a huge concern, as much as that it seems so inefficient to rely on one finger so much... As an example, some of the conventions I use as a hunt and pecker, like typing open and close braces right away with my index and middle finger, and then hitting the left arrow key to fill in the inner content, don't seem to work as well with just a pinky. What are some typing patterns using a standard QWERTY keyboard that work really well for you as a programmer?

    Read the article

  • Manage a `visited` links history in browsers

    - by osgx
    Hello Can I edit the browser's visited links history? How can I dump full list of visited sites, or list of pages from some site? I'm interested in the solution for the most popular browsers: IE7-8, Firefox3, Safari4, Chrome3, Opera9.50+ The best will be solution, which can be scripted in JS+CSS. But plugins or instructions for managing visited links history will be good. Thanks

    Read the article

  • Cross Join 'n' times a table

    - by SDReyes
    It is possible to write a generic function/procedure/select/somethingElse to cross-join a table against himself 'n' times? (yes, 'n' is a given parameter : ) How would you do it? Example Having this table: Value ------- 1 2 3 cross join it 2 times, would return: Value | Value ------------------ 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3

    Read the article

  • What are some typing patterns using a standard QWERTY keyboard that work well for you as a programme

    - by OrbMan
    After hunting and pecking for about 35 years, I have decided to learn to type. I am learning QWERTY and have learned about 2/3 of the letters so far. While learning, I have noticed how asymmeterical the keyboard is, which really bothers me. (I will probably switch to a symmetrical keyboard eventually, but for now am trying to do everything as standard and "correct" as possible.) Although I am not there yet in my lessons, it seems that many of the keys I am going to use as a C# web developer are supposed to be typed by the pinky of my right hand. Are there any typing patterns you have developed that are more ergonomic (or faster) when typing large volumes of code rife with braces, colons, semi-colons and quotes? Or, should I just accept the fact that every other key is going to be hit with my right pinky? It is not that speed is such a huge concern, as much as that it seems so inefficient to rely on one finger so much... As an example, some of the conventions I use as a hunt and pecker, like typing open and close braces right away with my index and middle finger, and then hitting the left arrow key to fill in the inner content, don't seem to work as well with just a pinky. What are some typing patterns using a standard QWERTY keyboard that work really well for you as a programmer? Update: US layout and I use home row Update 2: Despite my best efforts to the contrary, people are interpreting this questionas "how do I learn to type" or "what keyboard should I use". Take it as a given, that I will learn to type, and that I will be doing so on a standard QWERTY layout keyboard, not DVORAK. I am interested in aquiring a skill that will be useful wherever I go.

    Read the article

  • Ruby: change each value in a hash with something like #collect for arrays?

    - by Adam Nonymous
    Hi! I'd like to replace each value in a hash with value.some_method. For example in a simple hash {"a" = "b", "c" = "d"} every value should be .upcase-d so it looks like {"a" = "B", "c" = "D"}. I tried #collect and #map but always just get arrays back. Is there an 'elegant' way to do this? Thanks in advance, Adam Nonymous UPDATE: Damn, I forgot: The hash is in an instance variable which should not be changed. I need a new hash with the changed values, but would prefer not to define that variable explicitly and then loop over the hash filling it. Something like new_hash = hash.magic {...} ;)

    Read the article

  • about ruby range?

    - by why_
    like this range = (0..10) how can I get number like this: 0 5 10 plus five every time but less than 10 if range = (0..20) then i should get this: 0 5 10 15 20

    Read the article

  • What are some programming questions (or mistakes) you get wrong only as you get better?

    - by BlueRaja
    In programming, as many professions, there are mistakes you'll make now that you may not have made as a beginner. For instance, consider pointers: In C++, is there any difference between arrays and pointers? The beginner will say yes, they are two completely different concepts, and treat them as such. The intermediate programmer (having learned that arrays are pointers internally) will tell you no, they are the same thing, and may miss some crucial bugs by interchanging them all willy-nilly. The expert, however, will again say they are different things (ex. see here or here). What other questions/mistakes are like this?

    Read the article

  • C++: select argmax over vector of classes w.r.t. arbitrary expression

    - by karpathy
    Hello, I have trouble describing my problem so I'll give an example: I have a class description that has a couple of variables in it, for example: class A{ float a, b, c, d; } Now, I maintain a vector<A> that contains many of these classes. What I need to do very very often is to find the object inside this vector that satisfies that one of it's parameters is maximal w.r.t to the others. i.e code looks something like: int maxi=-1; float maxa=-1000; for(int i=0;i<vec.size();i++){ res= vec[i].a; if(res > maxa) { maxa= res; maxi=i; } } return vec[maxi]; However, sometimes I need to find class with maximal a, sometimes with maximal b, sometimes the class with maximal 0.8*a + 0.2*b, sometimes I want a maximal a*VAR + b, where VAR is some variable that is assigned in front, etc. In other words, I need to evaluate an expression for every class, and take the max. I find myself copy-pasting this everywhere, and only changing the single line that defines res. What makes it even more complicated is that even the name of the vector changes. Sometimes it's vec, sometimes it can be something else. I have many vectors that contain A's. This could be changed if this makes the problem too hard. Is there some nice way to avoid this insanity in C++? What's the neatest way to handle this? Thank you!

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >