Search Results

Search found 91526 results on 3662 pages for 'clean code'.

Page 32/3662 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Source Code to Image Converter

    - by Alix Axel
    I want to display some dozens of highlighted snippets (of code) on a presentation, I though of pasting the relevant snippets in a editor, capturing the screen and cropping the image to the code. Is there an easier way to do this? An editor? Maybe a Pastie-like website that can export direclty to PNG? Thanks in advance!

    Read the article

  • Create, sort, and print a list of 100 random ints in the fewest chars of code

    - by TheSoftwareJedi
    What is the least amount of code you can write to create, sort (ascending), and print a list of 100 random positive integers? By least amount of code I mean characters contained in the entire source file, so get to minifying. I'm interested in seeing the answers using any and all programming languages. Let's try to keep one answer per language, edit the previous to correct or simplify. If you can't edit, comment?

    Read the article

  • Code Colorer Being Used

    - by Sarfraz
    Hello, I visited this site and i really liked the code colorer used by it (apart from that CSS3 article on speech bubbles). I went through the source code of that page but could not find which syntax highlighter is being used there. Does any one have an idea?

    Read the article

  • Protecing Code and Licencing

    - by Phil Jackson
    Hi, I have been creating a cross browser compatible ( = ie 6 + standards complaint browsers ) Online Instant Messenger What I would like to know is what licensing would I need to protect my code? how would i go about getting a license and where from? My code is in PHP, and jQuery. Regards, Phil

    Read the article

  • VB6 - View Code will not display code

    - by zSysop
    Hi all, This is probably a really dumb question but i'll ask anyway. I was wondering if there was any reason as to why a form wouldn't display its code when i click "view code" from the right click context menu in vb6? It was working awhile ago so i'm kind of stumped. Thanks

    Read the article

  • Documenting auto-generated code

    - by Diadistis
    Hello, I use code-generation for my data access layer and Doxygen for documentation. My problem is that I can't add Xml comments on the generated classes since they will be overwritten as soon as I re-generate the code. To be more precise I can add Xml comments to my custom methods (which are in a separate file as partial classes) but I can't do it on data properties. Any suggestions?

    Read the article

  • Using VS Code Snippets with Resharper

    - by devoured elysium
    I am trying to use Code Contract's Code Snippets but since I turned Resharper back on it doesn't recognize them. On the other hand, it is recognizing some snippets I've implemented myself in the past. Any ideia of what might be the problem? I'm specifically trying to use cr and ce, which I think, don't collide with any other snippets (at least from what I see in the intellisense). I'm using R# 5 with VS 2010 Thanks

    Read the article

  • Can i Convert VB code to C++ code

    - by shubu
    Can I convert my VB code to C++? How can I do it? This is my VB code: Dim OpenFileDialog1 As New OpenFileDialog With OpenFileDialog1 .CheckFileExists = True .ShowReadOnly = False .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg" .FilterIndex = 2 If .ShowDialog = DialogResult.OK Then ' Load the specified file into a PictureBox control. PictureBox1.Image = Image.FromFile(.FileName) End If End With

    Read the article

  • What is a good program for storing “chunks” of commonly used source code

    - by Rob Wiley
    I've looked at CodeLocker (poorly styled and relatively unflexible, but free) and Source Code Library (Overzone software - very nicely styled, looks flexible, but very expensive - $80). Ideally, I'm looking for a relatively simple, inexpensive program (not an online website) that I can save text data (source code) with a title and keywords, maybe even a description. It would also have some type of search functionality.

    Read the article

  • AndroMDA maven code generation and JPA Annotations

    - by ArsenioM
    I am using the AndroMDA plugin for maven to generate code from an uml diagram made in MagicDraw. When the code is generated, AndroMDA desings the JPA annotation for the persitence layer. I think that at the compilation process AndroMDA uses Naming Strategies to determine the Table and Column names for the DataBase. I want to determine how AndroMDA desings this JPA annotations, because I need to display this DataBase names based on the UML entity and atributtes names. I was regarding if there is an API of AndroMDA that I could use to do this by giving it the uml diagram. Or at least, to know the Naming Strategies used by AndroMDA to achive that. AndroMDA at the compilation process design the JPA annotations for the Entities, Attributes, etc that are written in my java classes under a series of rules that exist within the EJB3 cartridge of AndroMDA. (The further Database is created using those JPA annotations). I want to create a program that returns me the same Table and Attributes names wrote on the JPA annotations, by giving it the .xml file of the uml diagram of a project. I was hoping that I could take advantage of the EJB3 cartridge to generate those Tables and Attribute names with my program. One way could be using an API of AndroMDA that do this(if it exits), or at least, by implementing the same rules used by the EJB3 cartridge for that matter. To be more illustrative, For example: If in my uml model I have an Entity called “CompanyGroup”, AndroMDA would generate the following code for the class definition: @javax.persistence.Entity @javax.persistence.Table(name = "COMPANY_GR") Public class CompanyGroup implements java.io.Serializable, Comparable< CompanyGroup This is just an example (not a real case), but nevertheless, the way how AndroMDA do the translation from “CompanyGroup” to “COMPANY_GR” has to be specified somewhere. Hope this explanation is useful enough. Thanks.

    Read the article

  • Code Golf: Easter Spiral

    - by friol
    What's more appropriate than a Spiral for Easter Code Golf sessions? Well, I guess almost anything. The Challenge The shortest code by character count to display a nice ASCII Spiral made of asterisks ('*'). Input is a single number, R, that will be the x-size of the Spiral. The other dimension (y) is always R-2. The program can assume R to be always odd and = 5. Some examples: Input 7 Output ******* * * * *** * * * * ***** * Input 9 Output ********* * * * ***** * * * * * * *** * * * * * ******* * Input 11 Output *********** * * * ******* * * * * * * * *** * * * * * * * * ***** * * * * * ********* * Code count includes input/output (i.e., full program). Any language is permitted. My easily beatable 303 chars long Python example: import sys; d=int(sys.argv[1]); a=[d*[' '] for i in range(d-2)]; r=[0,-1,0,1]; x=d-1;y=x-2;z=0;pz=d-2;v=2; while d>2: while v>0: while pz>0: a[y][x]='*'; pz-=1; if pz>0: x+=r[z]; y+=r[(z+1)%4]; z=(z+1)%4; pz=d; v-=1; v=2;d-=2;pz=d; for w in a: print ''.join(w); Now, enter the Spiral...

    Read the article

  • how to push a string address to stack with assembly, machine code

    - by Yigit
    Hi all, I am changing minesweeper.exe in order to have an understanding of how code injection works. Simply, I want the minesweeper to show a message box before starting. So, I find a "cave" in the executable and then define the string to show in messagebox and call the messagebox. Additionally of course, I have to change the value at module entry point of the executable and first direct it to my additional code, then continue its own code. So at the cave what I do; "hello starbuck",0 push 0 //arg4 of MessageBoxW function push the address of my string //arg3, must be title push the address of my string //arg2, must be the message push 0 //arg1 call MessageBoxW ... Now since the memory addresses of codes in the executable change everytime it is loaded in the memory, for calling the MessageBoxW function, I give the offset of the address where MessageBoxW is defined in Import Address Table. For instance, if MessageBoxW is defined at address1 in the IAT and the instruction just after call MessageBoxW is at address2 instead of writing call MessageBoxW, I write call address2 - address1. So my question is, how do I do it for pushing the string's address to the stack? For example, if I do these changes via ollydbg, I give the immediate address of "hello starbuck" for pushing and it works. But after reloading the executable or starting it outside of ollydbg, it naturally fails, since the immediate addresses change. Thanks in advance, Yigit.

    Read the article

  • NetBeans parameter fill after code completion

    - by byte
    This is a particularly annoying problem I'm having, and I can't be the only one to have issue with it. In NetBeans, when you type part of a method, then hit CTRL-SPACE, it displays the code-completion popup, whereupon you can hit tab to finish out the word. This is great, and pretty much how all IDE's operate. Example: Thread.sl < CTRL-SPACE Thread.sleep Yay! Problem is that in this context, once you type in a paren, it auto-fills the parameters for the method with their default names, and inserts a closing paren (regardless of whether you have disabled the option to automatically close them on the preferences page for code completion). This behavior is NOT present if you had manually typed out the full name. How is this helpful to anyone? You've got to type over it your actual variable that you will be passing, and NetBeans gives you no option to prevent the closing paren on code-completion. Does anyone have a way to solve this issue, without having to dive into the netbeans source and build it just for this minor of an issue?

    Read the article

  • How can I run an app's source code that I got from the Android source code?

    - by Wesley
    For all of you android devs out there that have the Android simulator running on your comp, you know that there are a few built in apps that are already 'installed' on your phone. I had an idea for an app that would utilize a function that is already being done in the spare parts app. I went on to the android developer site, dug through the source code files, and found the spare parts app, and am now trying to set it up so that running it from eclipse on my machine actually runs the app in the simulator. In other words, I want to be able to make changes to and adjust some of the things in that app for my own needs. But it won't compile, because of a number of different errors. How do I get that source code running on my local machine? Is there some special trick that I just dont know about? I thought that if I could get the source code than the rest would be easy, but it isn't being too easy. Any help here would be appreciated!!

    Read the article

  • TypeScript - separating code output

    - by Andrea Baccega
    i'm trying typescript and I find it very useful. I've a quite large project and i was considering rewriting it using typescript. The main problem here is the following: file A.ts: class A extends B { // A stuff } file B.ts: class B { // B stuff } If I compile A.ts with this command: tsc --out compiledA.js A.ts I'll get error from the compiler cause he doesn't know how to threat the "B" after extends. So, a "solution" would be including in A.ts (as first line of code): /// <reference path="./B.ts" /> Compiling again A.ts with the same command tsc --out compiledA.js A.ts Will result in compiledA.js containing both B.ts and A.ts code. ( which could be very nice ) In my case, I only need to compile the A.ts code in the compiledA.js file and I don't want the B.ts stuff to be in there. Indeed, what I want is: tsc --out A.js A.ts = compile only the A.ts stuff tsc --out B.js B.ts = compile only the B.ts stuff I can do it by removing the "extends" keyword but doing that I'll loose most of the typescript goodness. Can someone telll me if there's a way to do this ?

    Read the article

  • Linq to SQL code generator features

    - by Anders Abel
    I'm very fond of Linq to SQL and the programming model it encourages. I think that in many cases when you are in control of both the database schema and the code it is not worth the effort to have different relational and object models for the data. Working with Linq to SQL makes it simple to have type safe data access from .NET, using the partial extension methods to implement business rules. Unfortunately I do not like the dbml designer due to the lack of a schema refresh function. So far I have used SqlMetal, but that lacks the customization options of the dbml designer. Because of that I've started working on a tool which regenerates the whole code file like SqlMetal, but has the ability to do the customizations that are available in the dbml designer (and maybe more in the future). The customizations will be described in an xml file which only contains those parts that shouldn't have default values. This should keep the xml file size down as well as the maintenance burden of it. To help me focus on the right features, I would like to know: What would be your favourite feature in a linq to sql code generator?

    Read the article

  • Code Coverage tool for BlackBerry

    - by Skrud
    I'm looking for a code coverage tool that I can use with a BlackBerry application. I'm using J2ME-Unit for Unit Testing and I want to see how much of my code is being covered by my tests. I've tried using Cobertura for J2ME but after days of wrestling with it I failed to get any results from it. (I believe that the instrumentation is un-done by the RAPC compilation). And despite this message, the project seems to be dead. I've looked at JInjector but the project seems very incomplete. There is little (if any) documentation and although it claims to be able to work with BlackBerry projects, I haven't seen any places where it has been used for that purpose. I've played with the project quite a bit but to no avail. I've also tried the "Coverage" view in the BlackBerry JDE, even though I use Eclipse for development. The view stays permanently blank, regardless of clicking "Refresh" and running the application from the JDE. I've looked at most of the tools on this SO thread, but they won't work with J2ME/BlackBerry projects. Has anyone had any success with any code coverage tools on the BlackBerry? If so, what tools have you used? How have you used them? If anyone has managed to get JInjector or Cobertura for J2ME to work with a BlackBerry project, what did you have to do to get it working?

    Read the article

  • Problem writing a snippet containing Emacs Lisp code

    - by user388346
    Hi all, I've been trying to make use of a cool feature of YASnippet: write snippets containing embedded Emacs Lisp code. There is a snippet for rst-mode that surrounds the entered text with "=" that is as long as the text such as in ==== Text ==== Based on this snippet, I decided to slightly modify it (with Elisp) so that it comments out these three lines depending on the major mode you are in (I thought that such a snippet would be useful to organize the source code). So I wrote this: ${1:`(insert comment-start)`} ${2:$(make-string (string-width text) ?\-)} $1 ${2:Text} $1 ${2:$(make-string (string-width text) ?\-)} $0 This code works relatively well except for one problem: the indentation of these three lines gets mixed up, depending on the major mode I'm in (e.g., in emacs-lisp-mode, the second and the third lines move more to the right than the first line). I think the source of the problem might have something to do with what comes after the string ${1: on the first line. If I add a character, I have no problem (i.e., all three lines are correctly aligned at the end of the snippet expansion). If I add a single space after this string, the misalignment problem still continues though. So my question is: do you know of any way of rewriting this snippet so that this misalignment does not arise? Do you know what's the source of this behaviour? Cheers,

    Read the article

  • How to Inject code in c# method calls from a separate app

    - by Fusspawn
    I was curious if anyone knew of a way of monitoring a .Net application's runtime info (what method is being called and such) and injecting extra code to be run on certain methods from a separate running process. say i have two applications: app1.exe that for simplicity's sake could be class Program { static void Main(string[] args) { while(true){ Somefunc(); } } static void Somefunc() { Console.WriteLine("Hello World"); } } and I have a second application that I wish to be able to detect when Somefunc() from application 1 is running and inject its own code, class Program { static void Main(string[] args) { while(true){ if(App1.SomeFuncIsCalled) InjectCode(); } } static void InjectCode() { App1.Console.WriteLine("Hello World Injected"); } } So The result would be Application one would show Hello World Hello World Injected I understand its not going to be this simple ( By a long shot ) but I have no idea if it's even possible and if it is where to even start. Any suggestions ? I've seen similar done in java, But never in c#. EDIT: To clarify, the usage of this would be to add a plugin system to a .Net based game that I do not have access to the source code of.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >