Search Results

Search found 12674 results on 507 pages for 'programming competitions'.

Page 176/507 | < Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >

  • If-statement with logical OR

    - by exiter2000
    public class Test{ public static void main(String args[]){ int a = 0; int b = 1; int c = 10; if ( a == 0 || b++ == c ){ a = b + c; }else{ b = a + c; } System.out.println("a: " + a + ",b: " + b + ",c: " + c); } } Ok, this is Java code and the output is a: 11,b: 1,c: 10 And I believe the C acts same as Java in this case That is because second condition(b++ == c) would never executed if the first condition is true in 'OR' operator. There is a "NAME" for this. I just don't remember what it is. Does anyone know what this is called?? Thanks in advance

    Read the article

  • How can programmers get the quiet working environment they need? [closed]

    - by Richard
    We have an open plan office with all our programmers, web designers and client service team. Problem is my programmer team has to put up with dance music and wailing guitars all day due to the fact that designers and client services team think this makes the office a better environment. When I turn it off (by blocking the streaming of music on the router, he-he-he) they complain that its so quiet and dull. How do I explain to them that programmers need a calm quiet environment without coming across like a really annoying geek? Any other thoughts or ideas appreciated.

    Read the article

  • MySQL: Get only count of result set.

    - by Varun
    I am using MVC with PHP/MySQL. Suppose I am using 10 functions with different queries for fetching details from the database. But at other times I may want to get only the count of the result that will be returned by the query. What is the standard way to handle such situation. Should I write 10 more functions which duplicate almost whole query and return only the count. Or Should I always return the count also with the result set Or I can pass a flag to indicate that the function should return count only, and then based on the flag I will dynamically generate the (select part of) query. Or Is there a better way?

    Read the article

  • How to add site search function to website using XHTML/HTML?

    - by felixd68
    I really want to learn how to make my own search engine for my site. I have the defined buttons and labels, but it doesn't search. I can't figure out the HTML or XHTML code for actually searching the site. This is the code I have so far: <p class="search"> <label>SEARCH</label> <input name="search" type="text" class="txt" /> <input name="search-btn" type="submit" class="btn" value="SEARCH" /> </p> Thanks!

    Read the article

  • What is your company's stance on Developers using Laptops?

    - by codepunk
    I am a developer and my company is moving towards a "no laptop" policy in fear of them being lost or stolen and source code being compromised. Now I don't work for NASA, the military or anything labeled Top Secret but our code is very important to our business nonetheless (as all source code would be). I'll be honest, I disagree with this policy against laptops and wanted to see what others think. I'd like to know: What is your team/company's stance on laptops Your company's size and/or field (small, medium or large, Fortune 500, etc). Whether you've had to take any extra precautions (signing any additional legal, ensure your hard drive is encrypted, etc). Thanks!

    Read the article

  • Are raw C++ pointers first class objects?

    - by Shailesh Kumar
    According to Wikipedia: An object is first-class when it: can be stored in variables and data structures can be passed as a parameter to a subroutine can be returned as the result of a subroutine can be constructed at runtime has intrinsic identity (independent of any given name) Somebody had once told me that raw pointers are not first class objects while smart pointers like std::auto_ptr are. But to me, a raw pointer (to an object or to a function) in C++ does seem to me to satisfy the conditions stated above to qualify as a first class object. Am I missing something?

    Read the article

  • design pattern tools to use?

    - by ajsie
    i have noticed that every area has some tools you can use to make things easier. eg. css = dreamweaver doctrine/propel = orm designer // you dont have to hardcore code schemas manually and remembering all the syntax/variables mysql = mysql workbench // the same etc. in this way you get aided and dont have to type things the hard way, and can learn the structure, but then use GUI tools to help you develop faster. now i'm learning design patterns (singleton, factory, command, memento etc) and im wondering if there are some kind of tools you can use that will help you develop faster. i dont know exactly what tools i'm trying to find, just helping me when coding with design patterns (schema drawings? references?) are there any?

    Read the article

  • What coding standards do you follow?

    - by Mark Szymanski
    I was just curious what coding standards people followed. I for one use the following: Brackets ALWAYS go on the next line. For instance: int main() { //Blah... } I never use code folding. (Yes my IDE's do support it (Xcode and Eclipse). Put related functions/methods single-spaced, otherwise double space. Here is an example: int foo = 0; printf("%d",foo); those are related while these are not: printf("Hello, World!"); return(0); I don't put else statements on the same line as the closing bracket for the preceding if statement. Most of the time in Java if a program needs multiple try catch statements I will just put the whole thing in one try catch.

    Read the article

  • How do you manage tasks within your work?

    - by Michael
    Just wondering how you all manage your workload effectively when there's a lot of your plate? What do you do to break it down into bite-size chunks and how do you track progress of each task? Do you find TDD helps to focus your attention of getting areas of functionality complete before moving onto the next one? I quite often find myself getting a bit overwhelmed when I have an involving task on the go (even if it can be broken down into lots of small chunks), even though I know I'm more than capable of doing the work. We have a kind of agile approach Interested to hear how everyone manages things effectively.

    Read the article

  • simple question on C

    - by lego69
    I have this snippet of the code char *str = “123”; if(str[0] == 1) printf("Hello\n"); why I can't receive my Hello thanks in advance! how exactly compiler does this comparison if(str[0] == 1)?

    Read the article

  • C++ Program Flow: Sockets in an Object and the Main Function

    - by jfm429
    I have a rather tricky problem regarding C++ program flow using sockets. Basically what I have is this: a simple command-line socket server program that listens on a socket and accepts one connection at a time. When that connection is lost it opens up for further connections. That socket communication system is contained in a class. The class is fully capable of receiving the connections and mirroring the data received to the client. However, the class uses UNIX sockets, which are not object-oriented. My problem is that in my main() function, I have one line - the one that creates an instance of that object. The object then initializes and waits. But as soon as a connection is gained, the object's initialization function returns, and when that happens, the program quits. How do I somehow wait until this object is deleted before the program quits? Summary: main() creates instance of object Object listens Connection received Object's initialization function returns main() exits (!) What I want is for main() to somehow delay until that object is finished with what it's doing (aka it will delete itself) before it quits. Any thoughts?

    Read the article

  • Distributing iPhone App to developers in your team through iTunes

    - by Rudiger
    Hi everyone, Was wondering if you can distribute your App to other developers in your team through iTunes. I guess you would upload the App as a beta version through iTunes Connect and anyone with a provisioned iPhone would receive the update. I didn't think it was possible but someone told me they were sure you could. If this is not possible are there any other benefits of a company standard enrolment besides being able to add other people so they can get the same resources? Thanks

    Read the article

  • Career Path Choices (Education)

    - by sandy101
    I am in the final year of bca from md university. I am not sure with my career and very confused with the question of should I do MCA or MBA? Can any one help me on this question? I want to know the options available to me, and I also want to know the various colleges which provide MCA and what are the further prospects thereafter!

    Read the article

  • what to do with a flawed C++ skills test

    - by Mike Landis
    In the following gcc.gnu.org post, Nathan Myers says that a C++ skills test at SANS Consulting Services contained three errors in nine questions: Looking around, one of fthe first on-line C++ skills tests I ran across was: http://www.geekinterview.com/question_details/13090 I looked at question 1... find(int x,int y) { return ((x<y)?0:(x-y)):} call find(a,find(a,b)) use to find (a) maximum of a,b (b) minimum of a,b (c) positive difference of a,b (d) sum of a,b ... immediately wondering why would anyone write anything so obtuse. Getting past the absurdity, I didn't really like any of the answers, immediately eliminating (a) and (b) because you can get back zero (which is neither a nor b) in a variety of circumstances. Sum or difference seemed more likely, except that you could also get zero regardless of the magnitudes of a and b. So... I put Matlab to work (code below) and found: when either a or b is negative you get zero; when b a you get a; otherwise you get b, so the answer is (b) min(a,b), if a and b are positive, though strictly speaking the answer should be none of the above because there are no range restrictions on either variable. That forces test takers into a dilemma - choose the best available answer and be wrong in 3 of 4 quadrants, or don't answer, leaving the door open to the conclusion that the grader thinks you couldn't figure it out. The solution for test givers is to fix the test, but in the interim, what's the right course of action for test takers? Complain about the questions? function z = findfunc(x,y) for i=1:length(x) if x(i) < y(i) z(i) = 0; else z(i) = x(i) - y(i); end end end function [b,d1,z] = plotstuff() k = 50; a = [-k:1:k]; b = (2*k+1) * rand(length(a),1) - k; d1 = findfunc(a,b); z = findfunc(a,d1); plot( a, b, 'r.', a, d1, 'g-', a, z, 'b-'); end

    Read the article

  • What language/compiler for native running of application in any windows(XP/Vista/7) platform?

    - by Xinxua
    Hi, I want to develop an application that runs on any windows platform (XP, Vista, 7) but does not require a dependency like .NET Framework or JVM. I have given the other requirements below: Runs in any windows platform Must have GUI libraries to create windows/primitive controls I also want the output file size of the application to be minimal (So cannot include .net frameword etc in the exe file) Any suggestions for this requirement?

    Read the article

  • Do you think the AI industry will ever come back?

    - by Isaiah
    I just spent some time reading about the collapse of the AI industry and realized a lot of the reason it failed was because technology was slow to catch up with their theories on when it would be available. I also read that it is believed computers that will be able to emulate human synapses may be made round 2015-2025. It's 2010 now and were getting pretty close to that time frame. I was wondering if anyone thinks that the AI industry will return as the technology lands? And if so, will it change the language market? Could Lisp like languages suddenly experience a burst of growth if it does? Idk I just thought it was interesting thinking about it.

    Read the article

  • Optional structural typing possibilty in C++ or anyother language?

    - by ambhai
    In C++ how to tell compiler that Ogre::Vector3 IS_SAME_AS SomeOtherLIB::Vector3 ? I feel that.. in languages like c++ which are not structural typed but there are cases when it makes sense. Normally as game developer when working with 4+ libraries that provide sort or their own Vector3 implementation. The code is littered with ToOgre, ToThis, ToThat conversion function. Thats a lot of Float3 copying around which should not happen on first place. Is in C++ or any other languages where we dont have to convert (copying) from one type to another which is essentially the samething. But any solution in C++ as most of the good gamedevs libs are for c/c++.

    Read the article

< Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >