Search Results

Search found 113970 results on 4559 pages for 'source code control'.

Page 167/4559 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • Try/Catch or test parameters

    - by Ondra Morský
    I was recently on a job interview and I was given a task to write simple method in C# to calculate when the trains meet. The code was simple mathematical equation. What I did was that I checked all the parameters on the beginning of the method to make sure, that the code will not fail. My question is: Is it better to check the parameters, or use try/catch? Here are my thoughts: Try/catch is shorter Try/catch will work always even if you forget about some condition Catch is slow in .NET Testing parameters is probably cleaner code (Exceptions should be exceptional) Testing parameters gives you more control over return values I would prefer testing parameters in methods longer than +/- 10 lines, but what do you think about using try/catch in simple methods just like this – i.e. return (a*b)/(c+d); There are many similar questions on stackexchnage, but I am interested in this particular scenario.

    Read the article

  • What is Google's repository like?

    - by Ricket
    I heard Google has a giant private (internal) repository of all of their code and their employees have access to it so that when they are developing things they don't have to reinvent the wheel. I'd like to know more about it! Is there anyone here from Google that can describe it in a bit more detail, or do you know a bit more about it? I'm interested in knowing mainly about how it's organized and how they can make it easy for an employee to find something in such a giant codebase as it must be.

    Read the article

  • Which Git-based MIS to track workflow like Trac/Redmine but on console minimastically?

    - by hhh
    Definitions MIS = management information system Some list about console based solutions here and some GUI-hacks here. Been fed up to install all those dependencies and no make -files with GUI -things so which console-based MIS would you suggest for a game-development team with graphical -repo, animation -repo, code -repo, stories -repo, etc ? P.s. I do use Git -submodules and the reason for repo -fragmentation is due to roles and size, certain repos such as graphic -repos tend to be quite large so better to keep them separate. Perhaps useful to readers interested about this http://stackoverflow.com/questions/5881578/trac-vs-redmine https://github.com/jchris/sofa

    Read the article

  • New code release today - 2011.1.4.2

    - by Steve Tunstall
    Wow, two blog entries in the same day! When I wrote the large 'Quota' blog entry below, I did not realize there would be a micro-code update going out the same evening. So here it is. Code 2011.1.4.2 has just been released. You can get the readme file for it here: https://wikis.oracle.com/display/FishWorks/ak-2011.04.24.4.2+Release+Notes Download it, of course, through the MOS website. It looks like it fixes a pretty nasty bug. Get it if you think it applies to you. Unless you have a great reason NOT to upgrade, I would strongly advise you to upgrade to 2011.1.4.2. Why? Because the readme file says they STRONGLY RECOMMEND YOU ALL UPGRADE TO THIS CODE IMMEDIATELY using LOTS OF CAPITAL LETTERS. That's good enough for me. Be sure to run the health check like the readme tells you to. 

    Read the article

  • Using T[1] instead of T for functions overloaded for T(&)[N]

    - by Abyx
    The asio::buffer function has (void*, size_t) and (PodType(&)[N]) overloads. I didn't want to write ugly C-style (&x, sizeof(x)) code, so I wrote this: SomePacket packet[1]; // SomePacket is POD read(socket, asio::buffer(packet)); foo = packet->foo; But that packet-> looks kinda weird - the packet is an array after all. (And packet[0]. doesn't look better.) Now, I think if it was a good idea to write such code. Maybe I should stick to unsafe C-style code with void* and sizeof? Upd: here is another example, for writing a packet: SomePacket packet[1]; // SomePacket is POD packet->id = SomePacket::ID; packet->foo = foo; write(socket, asio::buffer(packet));

    Read the article

  • Layering Design Pattern in Java clean code style

    - by zeraDev
    As a Java developer, I am developing trying to use the clean code rules. But in my team we are facing a concrete problem: We have a business layer offering a service called "createObject", this service makes a lot of operation which can result to problem. E.g: parentObjectDontExist, objectAlreadyExist, dontHaveAuthorizationToCreate, operationFailed... and we want the UI using this service to display different information messages depending which error occurred. In old java dev, we should have create all signed exception type and throw it in createObject. As Clean code says, it is forbidden to use Exception for business logic AND signed exceptions are evil... Why not...But i don't know how to solved this problem and i don't want to use return code. How do you do? Thanks for youre experience return.

    Read the article

  • Writing and Understanding code

    - by Kitex
    I can write code. I can read code but I can't implement good code. How to develop deep understanding of any framework or stuff that we are working on? Is it looking into documentation and working on it? I have seen in this form that people that have great understanding of things they are working on. How is this possible? How to not scrape on the surface only? How to manage time vs learning vs productivity?

    Read the article

  • Encouraging business and team members to write more code

    - by Aliixx
    I am really interested to hear any ideas or working practices that can be adopted to encourage our team of developers to write more code. A little background here is involves a team of varying disciplines, experience and qualities and the nature of the work has a large focus on bug fixes and business logic / data validation over writing lots of new greenfield code or even refactoring. We are attempting to move to a more Agile philosophy and really what would be great is to hear any ideas that can be sold to the team and / or the business with the aim of: Writing more new code to improve experience, abilities and increase exposure to newer and emerging patterns and practices. Energizing the effort of the team and inspire. Encouraging wider input of new ideas, patterns and practices from the team as a whole. I would be very interested (and grateful) to hear any ideas or examples of ideas that can help here. Thanks!

    Read the article

  • sum with matlab code

    - by user27089
    i need help it is only put sum in a code line if you can understand in below i have a code in this line below -> X(i,k+1) = X(i,k) + (( X(j,k)-X(i,k))); i want to change it as: X(i,k+1) = X(i,k) + sum(( X(j,k)-X(i,k))); briefly how can I put sum on the code line clear;rand('state', 1); global xLocation; N = 4; xLocation = rand(N,1); t=2;k=1;X=[N,t]; for i=1:N X(i,1)=xLocation(i); end while( k < t ) for i = 1 : N for j = 1 : N X(i,k+1) = X(i,k) + (( X(j,k)-X(i,k))); end end k = k + 1; end

    Read the article

  • datacenter network change control best practices

    - by jpolache
    I have been tasked with compiling a list of possible network equipment changes at a data center. The task includes tagging which changes need change control and which don't. Does anyone know of a "best practices" list that I can start from? The methods for doing change control at this data center are well established. The list would be of specific configuration items that should or should not be included in the change control process, of example; static route entries switch port assignments firewall rule additions/changes etc.

    Read the article

  • Catalyst Control Center removal

    - by Allan
    I've recently tested a graphics card on a machine that required different drivers than my onboard integrated graphics, so I had catalyst control center installed. After I pulled out the graphics card and went back to using the onboard graphics, I deleted the catalyst center through control panel - programs.. which was fine. But apparently it didn't really remove it. it doesn't show up under programs anymore but when I reboot windows I get an error saying "The catalyst Control Center is not supported by the driver version of your enabled graphics adapter" and its still in the process bar... how do I permanently remove it?

    Read the article

  • Remote screen control software (such as VNC) with permission mechanism

    - by xuhdev
    Does anyone know a kind of software that allows controlling of other computer, but the server can configure permission control? For example, the server can define five users, one of them can control, but the other four of them can only view. Also, file transfer support is required. I've tried TightVNC, it works fine with anything else, but it just does not support user permission control. RAdmin can serve this job, but I wish to find some software which is free. Thank you!

    Read the article

  • What does CONTROL mean in the context of the Certificate

    - by Ram
    Hi Everyone, I am trying to implement encryption in sql server 2005 through Certificate and Symmetric Key and i came to know that the application user should have the following access in order to Encrypt and Decrypt Data 1) CONTROL permission on Certificate and 2) REFERENCES on the Symmetric Key (Let me know if i am wrong) Now my concern is what does CONTROL mean in the context of Certificate? If my User1 has Control permission on my certificate Cert1 What all can he do, Is there a way to restrict him further, but user1 still be able to Encrypt\Decrypt the data I could not find any good practice doc for certificate and key management so can some one advice the good practice for this Thanks, Ram

    Read the article

  • Excel: Find a specific cell and paste the value from a control cell into it

    - by G-Edinburgh
    I have two columns one containing the room number, e.g. B-CL102, the other containing a varying integer. I want to enter a different, manually determined, integer in a third column. Whether by macro or native Excel, is there a way to use two control cells at the top of the sheet, type the room number into one and the different integer matching that room into another. I have minimal experience with macros essentially just the basics. I tried to use a V-Lookup formula to look at the two control cells (Range) and then fill in the new column, however I don't know how to then fix that value so that it doesn't change when I change the values in the control cells.

    Read the article

  • Why does Java tell me my applet contains both signed and unsigned code?

    - by JohnCooperNZ
    My signed Java applet has been running fine until Java update 19. Now some but not all of our users on Java Update 19 report a java security message stating that our applet contains both signed and unsigned code. The process for creating our applet is as follows: 1: Clean and Build the applet project in Netbeans IDE. 2: Open the Applet jar file in WinRAR and add the required mysql JDBC driver .class files to the jar file. 3: Sign the applet jar file. Can someone please tell me how to determine what code is signed and what code is not signed in our applet? Is there a better way to include the mysql JDBC driver jar file in our applet other than copying the jar file contents into our applet jar file? Thanks

    Read the article

  • microphone volume control from javascript

    - by paleozogt
    I'd like to be able to control the system microphone volume from the browser. I know that the microphone can be recorded from using Flash or Silverlight, but these don't allow control of the microphone volume. (Flash has Microphone.gain, but as its just a software multiplier, it doesn't help when the system mic volume is muted or too loud.) I've heard that HTML5 will have some sort of microphone access, but whether it will allow volume control is unclear to me. At any rate, I don't think any browsers support it yet. Are there any plugins that would allow volume control? The old Google Gears project has some AudioApi docs, though these don't seem to have made it into the actual plugin. There's also the Google Talk plugin- it seems to do some kind of gain control, but its unclear if there's an api to the plugin. Perhaps there's a draft HTML5 implementation plugin for microphone access (like indexeddb, for example)?

    Read the article

  • Android Compound Control internal click events

    - by Simon
    Hi, I'm writing a custom compound control that extends RelativeLayout. Inside this component, there is an ImageView. I add a OnClickListener to this ImageView to animate it when the user clicks on it. But when I am in an activity using this control and I add a OnClickListener on the control, this listener is never called. It only works when I remove the other listener I have on the ImageView. Does anybody knows how to "propagate" the event to the other listeners when I catch it inside the control? Thanks! PS: I would also like to know if there is an existing control that looks like the icons on the Android desktop. Like an icon with text underneath.

    Read the article

  • My MS Access control displays no text for appended items following an append query

    - by Zaid
    The control in question is part of a datasheet-style subform that feeds off a multi-field combo-box. The control is bound to the first field of the combo box, an ID field which is hidden from view (column width set to zero). Consequently, the second field (Code) is displayed in the control when an item is selected from the combo box. I'm using a form button action to append values to this datasheet. It seems that because I need to INSERT ID values in, the control is unable to display the corresponding Code value. Nothing is visible, unless I go manually into the combo box and select an item from it. How can I get the control to display the Code value?

    Read the article

  • Silverlight like login/register control in WPF

    - by user293545
    If you have created a silverlight business application you will see that in the top righthand corner on the menu is a login hyperlink. Pressing it opens up a childwindow that displays a login control, within that control is another hyperlink that says "Register" if you press it, it flips the control 180 degrees around from the login control to the register control. I really like this type of animation and want to do something similar in WPF for a project I am working on. However I am not sure how to do it, has anyone done this or knows where I can find some more information on how to achieve it? Thank you

    Read the article

  • why licenced code is packed and then is reviewable using Disassembler at the same time ?

    - by Asad Butt
    Is it legal / ethical to copy code for any reason, or utilize it (like code review) from the .Net framework or any other .Net based API using Reflector or similar tools ? If it is, what advantages do Microsoft and other licence based softwares have for packing there code ? If it is not, Why can we use ILDasm and Reflector ? Another way of saying this is Why to pack it up if it is fine to review it ? probably I am missing some bits in the question, any one who feels, could ask this question in a better way, is most welcome to edit. Thanks

    Read the article

  • Minimum Acceptable Code Coverage Numbers in the real world.

    - by Pita.O
    Hi, I am in the middle of putting together some guidelines around code coverage and I want to specify a number that really makes sense. It's easy to repeat the 100% mantra that I see all over the internet without considering the cost benefit analysis and when diminishing returns actually sets in. I solicit comments from persons who have actually reported code coverage on real-life, medium/large-sized projects. What percentages were you seeing? How much is too much? I really want some balance (in figures) that will help developers produce hight quality code. Is 65% coverage too low to expect? Is 80% too high?

    Read the article

  • Control.EndInvoke resets call stack for exception

    - by Brian Rasmussen
    I don't do a lot of Windows GUI programming, so this may all be common knowledge to people more familiar with WinForms than I am. Unfortunately I have not been able to find any resources to explain the issue, I encountered today during debugging. If we call EndInvoke on an async delegate. We will get any exception thrown during execution of the method re-thrown. The call stack will reflect the original source of the exception. However, if we do something similar on a Windows.Forms.Control, the implementation of Control.EndInvoke resets the call stack. This can be observed by a simple test or by looking at the code in Reflector. The relevant code excerpt from EndInvoke is here: if (entry.exception != null) { throw entry.exception; } I understand that Begin/EndInvoke on Control and async delegates are different, but I would have expected similar behavior on Control.EndInvoke. Is there any reason Control doesn't do whatever it is async delegates do to preserve the original call stack?

    Read the article

  • Is it possible to get code coverage data for a GWT web app running tests from the web browser?

    - by jeff
    I am not sure if this is possible but I would like some way to get code coverage information for tests that are written in Quick Test for our GWT based web app. It does not seem like there is any solution because the Quick Test Pro tests are testing against the GWT compiled app and not the original java code in which the app was written. I suppose I could get coverage data on the javascript that the GWT compiler creates, but there would be no way for me (that I know of) to map this information back to the original java code. Is there some way to do this?

    Read the article

  • ResolveURL not resolving in a user control

    - by WebJunk
    I'm trying to use ResolveUrl() to set some paths in the code behind of a custom ASP.NET user control. The user control contains a navigation menu. I'm loading it on a page that's loading a master page. When I call ResolveUrl("~") in my user control it returns "~" instead of the root of the site. When I call it in a page I get the root path as expected. I've stepped through with the debugger and confirmed, ResolveUrl("~") returns "~" in my user control code behind. Is there some other way I should be calling the function in my user control code behind to get the root path of the site?

    Read the article

  • How to return focus from GridView or DataGrid to other control on the page

    - by Senthilkumar
    I Want to know how to focus to control after completing tab navigation for the grid view. I have certain controls in my page and GridView/DataGrid as last control, when I navigate (Tab key navigation) on my page. I can navigate from first control to GridView but when I finish all editable items in grid the tab control goes to browser address bar. I need this should focus to again first control on the page. My question is how can I do this? If it is an ordinary controls then I can use (on key down) attribute of the same.. here how can I get access to the last row's last column on the grid view.

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >