Search Results

Search found 88955 results on 3559 pages for 'code wizard'.

Page 55/3559 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Which is more effective in coding? Reducing line of code and execution of code?

    - by Ayyappan.Anbalagan
    I have this doubt many years. I am wring some code to achieve some functionality. For example I am writing 20 lines of code to achieve the functionality and my co worker writing the code for the same functionality with just 5 lines. Since he used some looping statement to achieve that, but that code will execute around 30 to 50 times. So which is best way of coding? As per my knowledge I always try to reduce coding length as much I can.

    Read the article

  • Cloud Sample Code on OTN

    - by Oliver Steinmeier
    In recent months our blog has covered many aspects of the overall Oracle Cloud platform, whether it's PaaS (Java Cloud Service, Database Cloud Service) or SaaS (Sales Cloud Application Composer). Teams within Oracle have been busy building demos and proof-of-concept applications using the same technologies, and we have now started posting some of these as code samples on the Oracle Technology Network (OTN).  The zip files include both the source code and helpful information to get you started using the code.  Everything is covered under a BSD license.  In future blog posts we will dive deeper into some of these applications. Do you have any ideas or requests for sample code you would like us to create to help you with your work?  Hit the comments and let us know! 

    Read the article

  • JEditorPane Code Completion (Part 3)

    - by Geertjan
    The final step is to put an object into the Lookup on key listening in each of the JEditorPanes, e.g., a "City" object for the CityEditorPane and a "Country" object for the CountryEditorPane. Then, within the CompletionProviders, only add items to the CompletionResultSet if the object of interest is in the Lookup. The result is that you can then have different code completions in different JEditorPanes, as shown below: I've also included the Tools | Options | Editor | Code Completion tab, so that the code completion can be customized. The full source code for the example is here: java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/misc/CustomerApp

    Read the article

  • Don't Copy This Code

    Normally, when we release source code we're hoping that other people will build on it and improve it. Today's release of Jarlsberg , a small yet full-featured microblogging...

    Read the article

  • What are the design principles that promote testable code? (designing testable code vs driving design through tests)

    - by bot
    Most of the projects that I work on consider development and unit testing in isolation which makes writing unit tests at a later instance a nightmare. My objective is to keep testing in mind during the high level and low level design phases itself. I want to know if there are any well defined design principles that promote testable code. One such principle that I have come to understand recently is Dependency Inversion through Dependency injection and Inversion of Control. I have read that there is something known as SOLID. I want to understand if following the SOLID principles indirectly results in code that is easily testable? If not, are there any well-defined design principles that promote testable code? I am aware that there is something known as Test Driven Development. Although, I am more interested in designing code with testing in mind during the design phase itself rather than driving design through tests. I hope this makes sense. One more question related to this topic is whether it's alright to re-factor an existing product/project and make changes to code and design for the purpose of being able to write a unit test case for each module?

    Read the article

  • How to separate and maintain customer specific code

    - by WYSIWYG
    I am implementing customer specific code and currently following simple approach like if (cusomterId == 23) do it. I want to separate out all the customer related code in separate place. But I have following problems. In code is in 1. Stored procs 2. Plain old classes. 3. Controllers 4. Views I came up with two solutions. First is to create table CustomerFunctionlity with columns CustomerId, FunctionalityName, method/Proc, inputs/outputs With this table I can simply check if exists, execute given function. Another way is creating a factory which returns customer related object for an interface. I am writting small end to end customer specific functionalities. How can I write maintenable code. Thanks

    Read the article

  • Is testable code actually more stable? [closed]

    - by Xodarap
    A google scholar search turns up numerous papers on testability, including models for computing testability, recommendations for how ones code can be more testable, etc. They all come with the assertion that more testable code is more stable, however I can't find any studies which actually demonstrate this. I tried looking for studies evaluating the effect of testable code vs. quality, however the closest I can find is Improving the Testability of Object Oriented Systems, which discusses the relationship between design flaws and testability. Is testable code is actually more stable? And why, or why not? Please back up your answers with references or evidence to back up your claim.

    Read the article

  • Using macro to check null values [migrated]

    - by poliron
    My C code contains many functions with pointers to different structs as parameteres which shouldn't be NULL pointers. To make my code more readable, I decided to replace this code: if(arg1==NULL || arg2==NULL || arg3==NULL...) { return SOME_ERROR; } With that macro: NULL_CHECK(arg1,arg2,...) How should I write it, if the number of args is unknown and they can point to different structs?(I work in C99)

    Read the article

  • Rails: Multi-Step New User Signup Form (FSM?)

    - by neezer
    I've read the "Create Multi-Step Wizard" in Advanced Rails Recipes. I've also read and re-read the documentation for the updated FSM I'm using called Workflow, and looked here and here. The Advanced Rails Recipe focuses on records (quizzes) that already exist, and doesn't cover creating new ones. The Workflow docs don't cover any code for controllers or views, so I've no idea what to do with all this model magic, and the last two links barely touch on implementation either. From the aforementioned resources, I have a good understanding of what a FSM in Rails is and how to play with it in the console or IRB, but I've got very little direction or understanding how to implement one into my Rails app. What I would like is this: a simple, multi-step user signup process. Step 1: User enters in their critical details (with validations). Step 2: User enters in their search criteria, for their profile (with validations). Step 3: User agrees to the Terms of Service (with validations). Step 4: User is greeted by a confirmation page, including a link that takes them to their newly created account. I'd also like full navigation between the steps and full capture (saves to the database) with each transition. Can someone please give me a clear implementation of something similar to this? I would LOVE an example app that includes a multi-step signup process where I can look at the code (FULL source code--models AND controllers and views) under the hood, but I've been unable to find anything like that. Any guidance would be appreciated! EDIT: Please help make this a Railscast! Ryan B. (a.k.a. Superman), if you're reading this, we need you! http://feedback.railscasts.com/forums/77-episode-suggestions/suggestions/35553-multi-step-forms-and-wizards

    Read the article

  • How can I determine whether or not to add project items using IWizard?

    - by taarskog
    Hi, I am generating entity wrappers in VS2010 based on dynamic objects in a CRM system. In addition to the entity code, I want to add an EntityBase of which all entities inherit from. If the file exists in the project from before, it should not be added. I am using an IWizard implementation to give the generator the object names etc. Is it possible in the IWizard implementation to determine whether or not to add an item if it exists in the project from before? How do I get a hold of the project handle and its items in or before the ShouldAddProjectItem method? My code so far (not completed): public class EntityWizardImplementation : IWizard { public void BeforeOpeningFile(ProjectItem projectItem) { //Note: Nothing here. } public void ProjectFinishedGenerating(Project project) { //Note: Nothing here. } public void ProjectItemFinishedGenerating(ProjectItem projectItem) { //Note: Nothing here. } public void RunFinished() { //Note: Nothing here. } public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) { try { var window = new WizardWindow(); // Replace parameters gathered from the wizard replacementsDictionary.Add("$crmEntity$", window.CrmEntity); replacementsDictionary.Add("$crmOrganization$", window.CrmOrganization); replacementsDictionary.Add("$crmMetadataServiceUrl$", window.CrmMetadataUrl); window.Close(); } catch (SoapException se) { MessageBox.Show(se.ToString()); } catch (Exception e) { MessageBox.Show(e.ToString()); } } public bool ShouldAddProjectItem(string filePath) { // This is where I assume it is correct to handle the preexisting file. return true; } }

    Read the article

  • Absent Code attribute in method that is not native or abstract

    - by kerry
    I got the following, quite puzzling error today when running a unit test: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/http/Cookie A google search found this post, which explains that it is caused by having an interface in the classpath, and not an actual implementation. In this case it’s the java-ee interface. To fix this I added the jetty servlet api implementation to my pom: jetty javax.servlet test Piece of cake. I have run in to this before, so I figured I would capture the fix here in case I run in to it again.

    Read the article

  • Problems upgrading VB.Net 2008 project into VS2010

    - by Brett Rigby
    Hi there, I have been upgrading several different VS2008 projects into VS2010 and have found a problem with VB.Net projects when they are converted. Once converted, the .vbproj files have changed from this in VS2008: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CustomerManager.xml</DocumentationFile> <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors> </PropertyGroup> To this in VS2010: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CustomerManager.xml</DocumentationFile> <NoWarn>42353,42354,42355</NoWarn> <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors> </PropertyGroup> The main difference, is that in the VS2010 version, the 42353,42354,42355 value has been added; Inside the IDE, this manifests itself as the following setting in the Project Properties | Compile section as: "Function returning intrinsic value type without return value" = None This isn't a problem when building code inside Visual Studio 2010, but when trying to build the code through our continuous integration scripts, it fails with the following errors: [msbuild] vbc : Command line error BC2026: warning number '42353' for the option 'nowarn' is either not configurable or not valid [msbuild] vbc : Command line error BC2026: warning number '42354' for the option 'nowarn' is either not configurable or not valid [msbuild] vbc : Command line error BC2026: warning number '42355' for the option 'nowarn' is either not configurable or not valid I couldn't find anything on Google for these messages, which is strange, as I am trying to find out why this is happening. Any suggestions as to why Visual Studio 2010's conversion wizard is doing this?

    Read the article

  • Are there code signing certificates cheaper than US$99 per year? [closed]

    - by gerryLowry
    K Software discounts Comodo code signing certificates to US$99 per year. In the past, I've seen Commodo code signing certificates for US$80. I'm excluding CAcert which AFAIK are FREE but are not covered by browsers like Internet Explorer AFAIK. QUESTION: What is the best price per year for a code signing certificate? Thank you ~~ gerry (lowry) Edit: **THIS SHOULD NOT HAVE BEEN CLOSED** from the FAQ: http://stackoverflow.com/faq ---------------------------- What kind of questions can I ask here? Programming questions, of course! As long as your question is: * detailed and specific <====== YES! * written clearly and simply <====== YES! * of interest to other programmers <====== YES! I've been programming for over 40 years. http://gerrylowryprogrammer.com/ I've taught computer programming at the community college level. I'm a Star level contributer to forums.asp.net. http://forums.asp.net/members/gerrylowry.aspx IMO, I've a very good idea what is of interest to other programmers. MORE INFORMATION http://en.wikipedia.org/wiki/Code_signing http://msdn.microsoft.com/en-us/library/ms537361%28VS.85%29.aspx also: via Google: code signing Ensuring the integrity of code and executables that one distributes is just as much about programming as is knowing how to flip bits in assembler, use delegates in C#, and use the BDD context/specification still of "test first testing".

    Read the article

  • Why is my code signing (MS authenticode) verification failing?

    - by Tim
    I posted this question and have a freshly minted code signing cert from Thawte. I followed the instructions (or so I thought) and the code signing claims to be done right, however when I try to verify the tool shows an error. I have no idea what it means and no idea how to fix this. Any comments would be appreciated. Command line to sign exe: signtool sign /f mdt.pfx /p password /t http://timestamp.verisign.com/scripts/timstamp.dll test.exe Results: The following certificate was selected: Issued to: [my company] Issued by: Thawte Code Signing CA Expires: 4/23/2011 7:59:59 PM SHA1 hash: 7D1A42364765F8969E83BC00AB77F901118F3601 Done Adding Additional Store Attempting to sign: test.exe Successfully signed and timestamped: test.exe Number of files successfully Signed: 1 Number of warnings: 0 Number of errors: 0 Note that there are no errors or warnings. Now, when I try to verify imagine my surprise: signtool verify /v test.exe results in: Verifying: test.exe SHA1 hash of file: 490BA0656517D3A322D19F432F1C6D40695CAD22 Signing Certificate Chain: Issued to: Thawte Premium Server CA Issued by: Thawte Premium Server CA Expires: 12/31/2020 7:59:59 PM SHA1 hash: 627F8D7827656399D27D7F9044C9FEB3F33EFA9A Issued to: Thawte Code Signing CA Issued by: Thawte Premium Server CA Expires: 8/5/2013 7:59:59 PM SHA1 hash: A706BA1ECAB6A2AB18699FC0D7DD8C7DE36F290F Issued to: [my company] Issued by: Thawte Code Signing CA Expires: 4/23/2011 7:59:59 PM SHA1 hash: 7D1A42364765F8969E83BC00AB77F901118F3601 The signature is timestamped: 4/27/2010 10:19:19 AM Timestamp Verified by: Issued to: Thawte Timestamping CA Issued by: Thawte Timestamping CA Expires: 12/31/2020 7:59:59 PM SHA1 hash: BE36A4562FB2EE05DBB3D32323ADF445084ED656 Issued to: VeriSign Time Stamping Services CA Issued by: Thawte Timestamping CA Expires: 12/3/2013 7:59:59 PM SHA1 hash: F46AC0C6EFBB8C6A14F55F09E2D37DF4C0DE012D Issued to: VeriSign Time Stamping Services Signer - G2 Issued by: VeriSign Time Stamping Services CA Expires: 6/14/2012 7:59:59 PM SHA1 hash: ADA8AAA643FF7DC38DD40FA4C97AD559FF4846DE Number of files successfully Verified: 0 Number of warnings: 0 Number of errors: 1

    Read the article

  • What does the status code of the Perl interpreter mean?

    - by futureelite7
    Hi, This might sound slightly confusing, but please bear with me. I'm trying to execute a copy of the Perl interpreter using Java's Runtime.exec(). However, it returned error code 9. After running the file a few times, the perl interpreter mysteriously started to return code 253 with no changes in my command at all. What does code 253 / code 9 mean? A google search for perl interpreter's exit codes turned up nothing. Where can I find a list of exit codes for the Perl interpreter? Thanks!

    Read the article

  • How can I use Code Contracts in a C++/CLI project?

    - by Daniel Wolf
    I recently stumbled upon Code Contracts and have started using them in my C# projects. However, I also have a number of projects written in C++/CLI. For C# and VB, Code Contracts offer a handy configuration panel in the project properties dialog. For a C++/CLI project, there is no such panel. From the documentation, I got the impression that adding Code Contracts support to a C++/CLI project should be a simple matter of calling some external tools as part of the build process (namely ccrefgen.exe, cccheck.exe, and ccrewrite.exe). However, the number of command line options and restrictions concerning the call sequence have me somewhat intimidated. Can anybody point me to a simple way to run the Code Contracts tools as an automated part of the build process in Visual Studio?

    Read the article

  • How to add Transactions with a DataSet created using the Add Connection Wizard?

    - by RoguePlanetoid
    I have a DataSet that I have added to my project where I can Insert and Add records using the Add Query function in Visual Studio 2010, however I want to add transactions to this, I have found a few examples but cannot seem to find one that works with these. I know I need to use the SQLClient.SQLTransaction Class somehow. I used the Add New Data Source Wizard and added the Tables/View/Functions I need, I just need an example using this process such as How to get the DataConnection my DataSet has used. Assuming all options have been set in the wizard and I am only using the pre-defined adapters and options asked for in this wizard, how to I add the Transaction logic to my Database. For example I have a DataSet called ProductDataSet with the XSD created for this, I have then added my Stock table as a Datasource and Added an AddStock method with a wizard, this also if a new item calls an AddItem method, if either of these fails I want to rollback the AddItem and AddStock in this case.

    Read the article

  • How should I move my code from dev to production?

    - by Teddy
    I have created a PHP web-application. I have 3 environments: DEV, TEST, PROD. What's a good tool / business practice for me to move my PHP web-application code from DEV to TEST to the PROD environment? Realizing that my TEST environment still only connects to my TEST database; whereas, I need to PROD environment to connect to my PROD database. So the code is mostly the same, except that I need to change my TEST code once moved into PROD to connect to the PROD database and not TEST database. I've heard of people taking down Apache in such away that it doesn't allow new connections and once all the existing connections are idle it simply brings down the web server. Then people manually copy the code and then manually update the config files of the PHP application to also point to the PROD instance. That seems terribly dangerous. Does a best practice exists?

    Read the article

  • PHP: How should I move my code from dev to production?

    - by Teddy
    I have created a PHP web-application. I have 3 environments: DEV, TEST, PROD. What's a good tool / business practice for me to move my PHP web-application code from DEV to TEST to the PROD environment? Realizing that my TEST environment still only connects to my TEST database; whereas, I need to PROD environment to connect to my PROD database. So the code is mostly the same, except that I need to change my TEST code once moved into PROD to connect to the PROD database and not TEST database. I've heard of people taking down Apache in such away that it doesn't allow new connections and once all the existing connections are idle it simply brings down the web server. Then people manually copy the code and then manually update the config files of the PHP application to also point to the PROD instance. That seems terribly dangerous. Does a best practice exists?

    Read the article

  • Can I make Visual Studio's code completion window more like Eclipse (Java)?

    - by Matt
    Is it possible to make Visual Studio 2010's code completion window more like that of Eclipse (Java)? In particular, I'd love the code completion window to give me a variable's type, and a method's return type and expected parameters, without needing to hover the highlight over that particular variable/method. VS's code completion's little icons that indicate if something is a property, method etc are useful, but they just aren't enough.

    Read the article

  • WCF code generation for large/complex schema (HR-XML/OAGIS) - is there an alternative?

    - by Sasha Borodin
    Hello, and thank you for reading. I am implementing a WCF Service based on a predefined specification (HR-XML 3.0). As such, I am starting with the schema, and working my way back to code. There are a number of large Schema documents (which import yet more Schema documents) related to my implementation, provided by this specification. I am able to generate code using xsd.exe, by supplying the "main" and "supporting" xsd files as arguments. But there are several issues, and I am wondering if this is the right approach. there are litterally hundreds of classes - the code file is half a meg in size duplicate classes (ex. Type, Type1 - which both represent the same type) there are classes declared as inheriting from a base class, but that base class is not generated/defined I understand that there are limitations to the types of Schema supported by svcutil.exe/xsd.exe when targeting the DataContractSerializer and even XmlSerializer. My question is two-fold: Are code generation "issues" fairly common when dealing with larger, modular xsd files? Has anyone had success with generating data contracts from OAGIS or HR-XML schema? Given the above issues, are there better approaches to this task, avoiding generating code and working with concrete objects? Does it make better sence to read and compose a SOAP message directly, while still taking advantage of the rest of the WCF framework? I understand that I am loosing the convenience of working with .NET objects, and the framekwork-provided (de)serialization; given these losses, would it still be advantageous to base my Service on WCF? Is there some "middle ground" between working with .NET types and pure XML? Thank you very much! -Sasha Borodin DFWHC.org

    Read the article

  • Google code: what kind of license should I use?

    - by Dran Dane
    Hello I would like to store my code on a repository such as Google Code. What kind of license should I use? I don't want to block me. My code may be open source and reused by others but I want to be able to reuse it in any open source project or not, and gainful project or not. Thank you.

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >