Search Results

Search found 1806 results on 73 pages for 'opinion'.

Page 43/73 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Counting down to zero in contrast to counting up to length - 1

    - by Helper Method
    Is it recommended to count in small loops (where possible) down from length - 1 to zero instead of counting up to length - 1? 1.) Counting down for (int i = a.length - 1; i >= 0; i--) { if (a[i] == key) return i; } 2.) Counting up for (int i = 0; i < a.length; i++) { if (a[i] == key) return i; } The first one is slightly faster that the second one (because comparing to zero is faster) but is a little more error-prone in my opinion. Besides, the first one could maybe not be optimized by future improvements of the JVM. Any ideas on that?

    Read the article

  • Cucumber vs. built-in testing? [Rails]

    - by yuval
    I asked a question about different testing frameworks yesterday. This question can be found here. Now that I have a better understanding of the different frameworks, I have a very simple question: With a basic understanding, but very limited experience with writing tests with rails' built in testing framework (basic assertions), would it be okay for me to jump directly to testing with RSpec, Webrat, and Cucumber? Thank you! As a side note: yes, this is an opinion based question, but I feel that the input received to this question is valuable enough to the community to keep this question open. Thanks.

    Read the article

  • Activation rectangle

    - by Knowing me knowing you
    Making UML sequence diagram in VS 2010RC I've observed that there is no activation rectangle in first object. Is this correct? Not according to my tutor and I have to quote him: "Finally, you have no activation rectangle for the userInterface instance, so the initial message could never have been sent." But I'm thinking that if guys from VS did that it must/should be correct. Another thing he is picking me at is and I'm quoting him: "In class diagram the generalisation arrow heads should be open triangles." In my opinion there isn't strictly said that they must be open triangles especially when software lets you choose their form. Looking forward to hear your opinions. Thanks for answers.

    Read the article

  • Efficiency of Java code with primitive types

    - by super89
    Hello! I want to ask which piece of code is more efficient in Java? Code 1: void f() { for(int i = 0 ; i < 99999;i++) { for(int j = 0 ; j < 99999;j++) { //Some operations } } } Code 2: void f() { int i,j; for(i = 0 ; i < 99999;i++) { for(j = 0 ; j < 99999;j++) { //Some operations } } } My teacher said that second is better, but I can't agree that opinion.

    Read the article

  • Unix Interview Question [closed]

    - by Rachel
    I am giving some interviews right now and recently I was asked this questions in Interview and I was not sure of the answer, in your opinion are this kind of questions worthwhile for Interview process and if yes than how would you go about approaching this kind of questions. How to get number of files in directory without using wc ? How to get all files in descending order on size ? What is the significance of ? in file searching ? Would appreciate if you can provide answers for this questions so that I could learn something about them as I am not sure for this questions.

    Read the article

  • Does anyone change the Visual Studio default bracing style in C# - Is there a standard?

    - by El Ronnoco
    I find the default bracing style a bit wasteful on line count eg... function foo() { if (...) { ... } else { ... } } would, if I was writing in JavaScript for example be written like... function foo() { if (...) { ... } else { ... } } ...which I understand may also not be to peoples' tastes. But the question(s) is/are do you turn off the VS formatting style and use your own rules? What is the opinion of this in the industry when many people are working on the same code-base? Is it better just to stick to the default just for simplicity/uniformity?

    Read the article

  • Ruby vs Lua as scripting language for C++

    - by bl00dshooter
    I am currently building a game server (not an engine), and I want it to be extendable, like a plugin system. The solution I found is to use a scripting language. So far, so good. I'm not sure if I should use Ruby or Lua. Lua is easier to embed, but Ruby has a larger library, and better syntax (in my opinion). The problem is, there is no easy way I found to use Ruby as scripting language with C++, whereas it's very easy with Lua. Toughs about this? Suggestions for using Ruby as scripting language (I tried SWIG, but it isn't nearly as neat as using Lua)? Thanks.

    Read the article

  • Is a sharepoint developer technically "equipped" to do custom app dev and vise-versa?

    - by Amir
    This may be an opinion based question, but it's something that I wanted to ask (even if it does end up getting closed or deleted). I do custom app dev (asp.net/aspMVC) and have absolutely no knowledge about sharepoint and was wondering: If you have a "rock solid" custom app dev, asp.net/aspMVC web developer can he jump into sharepoint development fairly easily? What about the other way around? Does a seasoned sharepoint developer have the "chops" to do custom app dev using asp.net/aspMVC? By no means do I want to offend any sharepoint developers or any custom app dev developers. I'm merely trying to see how much knowledge you can take with you when going from one type of development to another.

    Read the article

  • What's your motivation to help others at stackoverflow?

    - by Bernhard V
    Hi! I gotta say that this site is really great because it helped me a lot at my job. I'm mostly the one asking the questions rather than answering it. Now I'd like to know what's your motivation to help others of whom you only know their nicknames? Because contrary to other communities on the Internet, this site lacks things like a message board where you can talk about all things in life or a function for private messaging. And in my opinion these two things normally help in building kind of a "social" environment. Also stackoverflow has probably lot's of users and is therefore not that tight-knitted. Maybe you can share some your thoughts with me.

    Read the article

  • Building Cocoa UIs for OS X with C# and Mono

    - by Antony Perkov
    Has anyone spent any time comparing the various Objective C bridges and associated Cocoa wrappers for Mono? I want to port an existing C# application to run on OS X. Ideally I'd run the application on Mono, and build a native Cocoa UI for it. I'm wondering which bridge would be the best choice. In case it's useful to anyone, here are some links to bridges I've found so far: CocoSharp - distributed with Mono on OS X - www.cocoa-sharp.com Monobjc - better documentation than the others (in my opinion) - www.mono-project.com/CocoaSharp and www.monobjc.net NObjective - (apparently) faster than the others - code.google.com/p/nobjective MObjc / MCocoa - code.google.com/p/mobjc and code.google.com/p/mcocoa ObjC# - www.mono-project.com/ObjCSharp

    Read the article

  • Are frameworks using byte-code generation creating leaky abstractions?

    - by Gabriel Šcerbák
    My point is, if you don't understand the abstraction of a framework, you can still decompile it and understand it, because you know the language e.g. Java. However, when byte-code generation happens, you have to understand even a lower level - JVM level byte-codes. I am really affraid of using any of such frameworks, which are many. Most of the time I think the reason for byte-code generation is simply lack of language features such as metaprogramming. Do you agree? What is your opinion and argument? How do you take over the problem with leaky abstractions in those frameworks?

    Read the article

  • Do you chat online for work purposes?

    - by JBB
    I've worked with folks who are chatting online with their peers, constantly batting around ideas. I've also worked with folks who adamantly refuse and think it's a waste of time. Are online live chatting forums of particular use to you? Why or why not? Internal to your company, or external and world-wide? Does your employer encourage or discourage their use? Update: I see some people are voting this question down, yet so far all the answers have been positive, if with some reservations. If someone has a strong negative opinion (I hate online chatting and think it should be banned etc.) I'd really like to hear why.

    Read the article

  • Great computer-science speeches

    - by sub
    I've looked into some questions here where the "best" programming books are listed and then thought why there isn't a question concerning speeches yet. I think that speeches or presentations from developers or even creators of programming languages which were or are heavily used at some point are particulary interesting. One of my favorite speeches was recommended to me by someone here on SO: The future of C# I also like Guido van Rossum's speeches but he sometimes seems pretty nervous. Another in my opinion good presentation would be the Google tech talk about Go. Which (recorded) programming presentations/speeches are worth watching? edit: Made this a community wiki as the answer would probably be a pretty long list.

    Read the article

  • acl9 and devise don't seem to work well together

    - by Nik
    I have a user model which is access controlled by ACL9 in userscontroller: ACL9 related stuff before_filter :load_user, :only = [:show] access_control do allow :owner, :of = :user, :to = [:show] end def load_user user = User.find(params[:id]) end in ApplicaitonController I have a rescue_from 'Acl9::AccessDenied', :with = :access_denied def access_denied authenticate_user! # a method from Devise end it is no problem to type in url for sign in page http://localhost:3000/users/sign_in but it is a problem when for example I type in the user page first, which I am to expect to be redirected to sign in page automatically thru the logic above http://localhost:3000/users/1 #= infinite redirect hell. it tries to redirect back to users/1 again(!?) instead of directing to users/sign_in Does anyone have an opinion as to what might be going wrong? Thanks!

    Read the article

  • Is it possible to take a screenshot of a web page with Javascript or HTML5/Canvas?

    - by Ryan Kearney
    Is there a way I could insert some code into a page that would take a screenshot of what the user sees in the browser window, then upload that image via a web form of some sort? I'm working on a clone of a pay-to-use service that lets you install a widget on a web page which in turn allows viewers to report bugs in the sites layout. Currently they use a Java applet to take the screenshot, which, in my opinion, is probably the worst way to go about it (aside from requiring the user to install a plugin) Is there a javascript/flash/other alternative? Thanks

    Read the article

  • Best way to check for null values in Java?

    - by Arty-fishL
    I need to check whether the function of an object returns true or false in Java, but that object may be null, so obviously then the function would throw a NullPointerException. This means I need to check if the object is null before checking the value of the function. What is the best way to go about this? I've listed some methods I considered, I just want to know the most sensible one, the one that is best programming practice for Java (opinion?). // method 1 if (foo != null) { if (foo.bar()) { etc... } } // method 2 if (foo != null ? foo.bar() : false) { etc... } // method 3 try { if (foo.bar()) { etc... } } catch (NullPointerException e) { } // method 4 // would this work all the time, would it still call foo.bar()? if (foo != null && foo.bar()) { etc... }

    Read the article

  • What are the virtues of using XML comments in .NET?

    - by Michal Czardybon
    I can't understand the virtues of using XML comments. I know they can be converted into nice documentation external to the code, but the same can be achieved with the much more concise DOxygen syntax. In my opinion the XML comments are wrong, because: They obfuscate the comments and the code in general. (They are more difficult to read by humans). Less code can be viewed on a single screen, because "summary" and "/summary" take additional lines. They suggest that all method parameters have to be commented, whereas 90% of them are obvious and SHOULD be left not commented. The only problem I have with this is that my point of view seems to be in minority. Why?

    Read the article

  • ASP.NET MVC - Alternative to Role Provider?

    - by ebb
    Hey there, I'm trying to avoid the use of the Role Provider and Membership Provider since its way too clumsy in my opinion, and therefore I'm trying to making my own "version" which is less clumsy and more manageable/flexible. Now is my question.. is there an alternative to the Role Provider which is decent? (I know that I can do custom Role provier, membership provider etc.) By more manageable/flexible I mean that I'm limited to use the Roles static class and not implement directly into my service layer which interact with the database context, instead I'm bound to use the Roles static class which has its own database context etc, also the table names is awful.. Thanks in advance.

    Read the article

  • What good timesheet should and shouldn't have for a small (non programming) 50 people company?

    - by MadBoy
    I'm sure most people here had to fill at least one time sheet in their life that made their life miserable, hell it's even the worst time taker ever especially after you have to fill it in hurry. I will be developing some simple TimeSheet application for a small company of 50 people (non programming related, it's actually 4 companies working together) and would like it to be user friendly and as less disturbing as possible. So what in your opinion makes it a good timesheet (lack of it doesn't count :p), what data it should store? Should be only hours per day with possibility to choose project, company and simple overview what you have worked on like: Day 1, 3:00, 'Company 1', 'Project5', 'Name', Short Overview Day 1, 5:00, 'Company 2', 'Project6', 'Name', Short Overview Or should it gather more data? Would it be realy bad if it were an WinForms application considering that I don't know ASP.NET or any other web based language? I would be deploying it using ClickOnce or so.

    Read the article

  • Is php fileinfo sufficient to prevent upload of malicious files?

    - by Scarface
    Hey guys, I have searched around a bit, and have not really found a professional type response to how to have secure fileupload capability so I wanted to get the opinion of some of the experts on this site. I am currently allowing upload of mp3s and images, and while I am pretty confident in preventing xss and injection attacks on my site, I am not really familiar with fileupload security. I basically just use php fileinfo and check an array of accepted filetypes against the filetype. For images, there is the getimagesize function and some additional checks. As far as storing them, I just have a folder within my directory, because I want the users to be able to use the files. If anyone could give me some tips I would really appreciate it.

    Read the article

  • WPF. How do I create many LIstViews with the same look.

    - by Erik Z
    I've defined a listview in my recent project and realized that I will be using more listviews looking exactly the same and having the same solumns. Since I'm new to WPF am I curious of teh best way to do this. Is it to create a usercontrol? Use styles? I've tried to use styles but it didnt work the way I was hoping. I tried to set the "View" property using style, like this. <Style x:Key="ListViewStyle" TargetType="{x:Type ListView}"> <Setter Property="View"> <ListView.View> <GridView> But it didnt work so I'm asking for your opinion?! Thanks.

    Read the article

  • Is ActiveMQ unreliable?

    - by user122991
    Hello, We have been using ActiveMQ 5.2 in our distributed enterprise application for about 3 months. During that time, we have experienced debilitating failures at least twice weekly. In particular, we see: 1) Topic publisher has its connection arbitrarily closed and experiences EOF on attempt to publish. Note well that this issue is not a function of some timeout. It does not correlate reliably with any inactivity. 2) Queue listeners never receive message. Message simply sits on Queue. 2) is much rarer (hardly ever) than 1). In both cases, the failures are highly intermittent-- they cannot be reliably reproduced through any testing usage pattern. Also, there are no errors or warning in the AMQ logs. Have others experienced similar problems? Is there an opinion that some other JMS provider is more reliable? thanks, Joe

    Read the article

  • Why no ArgumentEmptyException in .NET ?

    - by Andrei Rinea
    I am beginning to think I am doing something wrong. I mean they did place System.String.IsNullOrWhitespace finally but no ArgumentEmptyException class. public FilterItem(string name, IEnumerable<string> extensions) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException("name"); } if (extensions == null) { throw new ArgumentNullException("extensions"); } if (extensions.Count() == 0) { throw new ArgumentOutOfRangeException("extensions"); } this.Name = name; this.Extensions = extensions; } throwing an ArgumentOutOfRangeException feels unnatural. Also an instance of ArgumentException is too general in my opinion. It's easy to me to create a new exception class call it this way and have it over with. What bugs me is that it's not in the BCL/FCL and I am beginning to think there's a good reason not to have it. Should there be one?

    Read the article

  • iPhone and Vertex Buffer Objects

    - by dancer
    I've just started playing around with opengl es on the iphone the past couple of weeks and i'm looking at refactoring some of my code to use Vertex Buffer Objects(VBO). Before I do though I would like to make sure it'll be worth it. The problem is that afaik the only reason you create VBO's is to shift a chunk of data onto the graphics card so that it doesn't need to be retrieved from system ram when it's used. The iPhone however does not have any dedicated ram that I'm aware of so i'm struggling to see why I would benefit at all from using VBO's. I have seen talk around the internet with conflicting opinions and apple certainly want dev's to use it so there's probably still a reason to use them but just wanted to see if anyone on SO had an opinion to add.

    Read the article

  • Hibernate doesn't generate cascade

    - by Shervin
    Hi. I have a set hibernate.hbm2ddl.auto to create so that Hibernate creates the tables in mysql for me. However, it doesn't seem that hibernate correctly adds Cascade on the references in the table. It does however work when I for instance delete a row, and I have a delete cascade as hibernate annotation. So I guess that means that Hibernate reads the annoation on runtime, and perform cascading manually? Is that normal behavior? For instance: @Entity class Report { @OneToOne(cascade = CascadeType.ALL) public File getPdf() { return pdf; } } Here I have set cascade to ALL. However, when running show create table Report Report | CREATE TABLE `Report` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `pdf_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK91B14154FDE6543A` (`pdf_id`), CONSTRAINT `FK91B14154FDE6543A` FOREIGN KEY (`pdf_id`) REFERENCES `File` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | It doesn't say anything about cascading other then the foreign key. In my opinion, it should have added the ON DELETE CASCADE ON DELETE UPDATE

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >