Search Results

Search found 87959 results on 3519 pages for 'code golf'.

Page 22/3519 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • PHP code to convert text blocks indented by four spaces into a <pre><code> block [Markdown]

    - by Alfonso
    Hi, I'm not very good at PHP and would like to have a PHP function which turns this (text block indented by four spaces): printf("goodbye world!"); /* his suicide note was in C */ Into this: <pre><code> printf("goodbye world!"); /* his suicide note was in C */</code></pre> This is what Markdown does. I found this PHP port of Markdown (see function doCodeBlocks()), but I don't want to use the entire Markdown file, I just want this one function. Can someone provide me with the minimal PHP code required to get this to work? So I can do this: <?php echo markdownPre('Here goes some code: var x = 1, y = 2; alert(x + y); That should be a pre block.'); ?>

    Read the article

  • IntelliSense has forgotten my code snippets!

    - by David
    Hi all I have a stack of code snippets imported into Visual Studio. Just recently, they have stopped displaying in Intellisense. If the keyboard shortcut doesn't bring up anything else on IntelliSense, then I can tab and the code snippet is inserted just fine. However, if the keyboard shortcut for the snippet happens to also bring up other items in IntelliSense, tabbing will select the first of those items, so I actually can't use the code snippet at all! Does anyone have any ideas why IntelliSense would be unable to list my code snippet shortcuts? I started using ReSharper recently, but that wouldn't be the problem surely?! Thanks for your help David

    Read the article

  • Agile and code release

    - by ring bearer
    Do you know of any agile process that is created for code releases? One of the main theme of agile is frequent releases and each company/client would have their own test/approval processes that control code releases. Most of the time these slow down the pace of "frequent releases" Currently we have a proprietary tool based workflow. The team who needs a code promotion needs to create a promotion request to one of the final UAT servers. Once this is complete, and once tests are done, certain customers, technical/non-technical managers need to approve, then it goes in to production deploy stage. Meanwhile no sprint planning meeting or anything of that sort. What is the code release process (Which is agile) that has worked for you?

    Read the article

  • Generating C code from a Matlab-Simulink model for DSP C6748

    - by Juanma
    I'm trying to generate C code from a Matlab-Simulink simple model (eg.: sine wave generator with a DAC at the output). This code must be executed with Code Composer Studio for TMS320C6748 DSP (Texas Instrument C6748). Specifically, for the development board OMAP-L138 ZOOM ™EVM DEVELOPMENT KIT. For this, I am using the following versions: Simulink (Version 7.7 - R2011a) Embedded Coder (Version 6.0 - R2011a) Code Composer Studio v3.3 I tried several options (with generic modules in Simulink and programming the C6748 timers, configuring a module "Target Preferences" with "OMAP_L138/C6748 EVM"...) but it isn't working. Is it possible to implement this idea? Is there an example working? Thanks

    Read the article

  • ASP.NET Error when referencing a code-behind variable

    - by mattgcon
    I have an aspx page that is supposed to reference a code-behind variable but I am receiving an error of "The name [variable] does not exist in the current context" Here is the aspx code <%@ Control Language="C#" AutoEventWireup="true" Inherits="IPAM.Website.Controls.controls_event_header" Codebehind="event_header.ascx.cs" %> <%# strEventLink %> <h3><%# strEventDate %></h3> <%# strLinks %> Here is part of the aspx.cs code declaring those variables: public string strEventLink = ""; public string strEventDate; public string strLinks = ""; Here is the part of the aspx.cs code where it sets those variables: strEventLink = "<h2>" + parent.Name + "</h2>"; strLinks += "<p><font size=\"+1\"><a href=\"" + Page.ResolveUrl("~" + strScheduleLink) + "\"><b>" + strScheduleLinkText + "</b></a></font></p>\n"; strEventDate = ei.DateSpan; Please help me with this problem

    Read the article

  • code formatter for grails and Groovy?

    - by Jared
    I'm currently using a basic text editor to write my grails code. Does anyone know of a program that will automatically format code with indentation similar to indent does for C? I'd rather use a commandline program to do this but can use an IDE to format my code if that's the only option.

    Read the article

  • How can CruiseControl.Net fail a build based on changing metrics?

    - by skolima
    I would like CruiseControl.Net to fail a build when some code metrics change in a 'wrong' direction, i.e. code coverage decreases or Gendarme defect count increases. The Gendarme metrics are already tracked in report.xml file (because they are presented on web dashboard graphs), the code coverage is only reported on build status page (and saved in build report xml). How can I achieve this?

    Read the article

  • Why do I get Code Analysis CA1062 on an out parameter in this code?

    - by brickner
    I have a very simple code (simplified from the original code - so I know it's not a very clever code) that when I compile in Visual Studio 2010 with Code Analysis gives me warning CA1062: Validate arguments of public methods. public class Foo { protected static void Bar(out int[] x) { x = new int[1]; for (int i = 0; i != 1; ++i) x[i] = 1; } } The warning I get: CA1062 : Microsoft.Design : In externally visible method 'Foo.Bar(out int[])', validate local variable '(*x)', which was reassigned from parameter 'x', before using it. I don't understand why do I get this warning and how can I resolve it without suppressing it? Can new return null? Is this a Visual Studio 2010 bug?

    Read the article

  • Testing your code before releasing to QA

    - by user279521
    I have heard developers say that people who write code should not be the ones testing it. I am looking for peoples experience in this situation. Many times I have done my share of development, then released to the QA dept and had the code sent back to me becuase some aspect of the application was broken due to my coding, regardless of how much I had tested it prior to QA release. Does anyone on this board have a process to follow, that enables them to throughly test their code before releasing to QA?

    Read the article

  • Code coverage in Win32 app

    - by graham.reeds
    We are just about to start a new project. The Proof of Concept (PoC) for this project was done simply using Win32. The plan is/was to flesh out the PoC, tidy the uglier parts and meet the requirements set by the project owners. One of the requirements for the actual project is 100% code coverage but I can see problems ahead: How can I acheive 100% code coverage with Win32 - the message pump will be exceptionally difficult to test effectively?! I could compile to a DLL but won't there be code in the main app that won't be under coverage? I am thinking of dropping the Win32 code and moving to MFC - at least then a lot of the boiler plate stuff will be hidden from view (and therefore coverage). Any thoughts on the problem?

    Read the article

  • Unreachable code detected by using const variables

    - by Anton Roth
    I have following code: private const FlyCapture2Managed.PixelFormat f7PF = FlyCapture2Managed.PixelFormat.PixelFormatMono16; public PGRCamera(ExamForm input, bool red, int flags, int drawWidth, int drawHeight) { if (f7PF == FlyCapture2Managed.PixelFormat.PixelFormatMono8) { bpp = 8; // unreachable warning } else if (f7PF == FlyCapture2Managed.PixelFormat.PixelFormatMono16){ bpp = 16; } else { MessageBox.Show("Camera misconfigured"); // unreachable warning } } I understand that this code is unreachable, but I don't want that message to appear, since it's a configuration on compilation which just needs a change in the constant to test different settings, and the bits per pixel (bpp) change depending on the pixel format. Is there a good way to have just one variable being constant, deriving the other from it, but not resulting in an unreachable code warning? Note that I need both values, on start of the camera it needs to be configured to the proper Pixel Format, and my image understanding code needs to know how many bits the image is in. So, is there a good workaround, or do I just live with this warning?

    Read the article

  • Code reading: where can i read great, modern, and well-documented C++ code?

    - by baol
    Reading code is one of the best ways to learn new idioms, tricks, and techniques. Sadly it's very common to find badly written C++ code. Some use C++ as it was C, others as if it was Java, some just shoot in their feet. I believe gtkmm is a good example of C++ design, but a binding could not be the better code to read (you need to know the C library behind that). Boost libraries (at least the one I read) tend to be less readable than I'd like. Can you mention open source projects (or other projects which source is freely readable) that are good example of readable, modern, well-documented, and auto-contained, C++ code to learn from? (I believe that one project per answer will be better, and I'd include the motivation that led you to selecting that one.)

    Read the article

  • How to run java code using Java code?

    - by Nitz
    Hey Guys i want to do basically two things 1)I want to know is there any way that i can run the java code, using some java code. 2 ) and if it is possible then , and whatever the out put is then it should get that out put [ maybe output or error or exception ] and show on my screen, so i need to get that also. I know this is possible bcz one of my senior had done that..but i don't know how? May be with using the java's inbuilt classes. Note: user will write the code in some text file and then i will store that file content in some variable and then may be run that code.

    Read the article

  • Invoke Blue Screen of Death using Managed Code

    - by Matthew Ruston
    Just curious here: is it possible to invoke a Windows Blue Screen of Death using .net managed code under Windows XP/Vista? And if it is possible, what could the example code be? Just for the record, this is not for any malicious purpose, I am just wondering what kind of code it would take to actually kill the operating system as specified.

    Read the article

  • Disable Code analysis warnings .NET

    - by acidzombie24
    In visual studios i can run code analysis on my .NET project. I am running basic correctness and have 85 warnings. Which is a little much. Also majority of them are in external code. How do i disable specific warnings so i can focus on the more important warnings? I tried the below but it does not recognize code analysis warnings. (I first tried w/o the CA) #pragma warning disable CA1820 CA1065 CA2100

    Read the article

  • Source code annotation tool

    - by RoToRa
    I'm looking for a tool with which I can annotate source code. I have some 3rd party source code (JavaScript) I need to understand and I don't want to change it (add inline comments) so that line numbers can stay intact (for communication with others), I can avoid accidentally changing something and my annotations stand out compared to the authors comments. Normally I would print the whole thing out an scribble on it, but the code is too long for that and I need to share it per email. I would be great if one could do some like that including being able to create "links" between so places in the code, possibly even visually with a lines or arrows.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >