Search Results

Search found 12772 results on 511 pages for 'the little schemer'.

Page 150/511 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • What is the most annoying ignorance you've had in programming?

    - by someone
    What was an annoying programming situation you had that a little bit of knowledge could've solved? That after you struggled with something tedious/annoying/frustrating, you learned one small thing and said "oh, I could've done that?!"? My example - I once suffered through an entire tedious semester of HTML in Notepad... only to discover Notepad++ (and DreamWeaver, IDEs, etc.) a couple of days after submitting the final project.

    Read the article

  • How deep are your unit tests?

    - by John Nolan
    The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill? My question is to what level of granularity do you write you unit tests at? ..and is there a case of testing too much?

    Read the article

  • Code generator tool to generate a property and backing field

    - by MattSlay
    I'm working in VS2008 and C#, and I'm looking for a (free) code generator tool to generate a property with getter and setter, as well as the backing private field to go with. The template thingy in VS does not make the field to go with it. Just looking for something a little bit better. I once saw a web site where you could build this code, then cust-and-paste it from the web page to your code.

    Read the article

  • I am unsure of how to access a persistence entity from a JSP page?

    - by pharma_joe
    Hi, I am just learning Java EE, I have created a Persistence entity for a User object, which is stored in the database. I am now trying to create a JSP page that will allow a client to enter a new User object into the System. I am unsure of how the JSP page interacts with the User facade, the tutorials are confusing me a little. This is the code for the facade: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Add User to System</title> </head> <body> <h2>Add User</h2> <h3>Please fill out the details to add a user to the system</h3> <form action=""> <label>Email:</label> <input type="text" name="email"><br /> <label>Password:</label> <input type="password" name="name"><br /> <label>Name:</label> <input type="text" name="name"><br /> <label>Address:</label> <input type="text" name="address"><br /> <label>Type:</label> <select name="type"> <option>Administrator</option> <option>Member</option> </select><br /> <input type="submit" value="Add" name="add"/> <input type="reset" value="clear" /> </form> </body> This is the code I have to add a new User object within the User facade class: @Stateless public class CinemaUserFacade { @PersistenceContext(unitName = "MonashCinema-warPU") private EntityManager em; public void create(CinemaUser cinemaUser) { em.persist(cinemaUser); } I am finding it a little difficult to get my head around the whole MVC thing, getting there but would appreciate it if someone could turn the light on for me!

    Read the article

  • Lightweight Java reporting engine

    - by tuler
    I'm looking for a lightweight java reporting engine to be embedded in an applet application. My first option was Jasper Reports, but the jar is over 2Mb, a little too heavy (and too bloated) for my needs. I don't know if there is modular jasper distribution, with funcionalities split in several jars (like html rendering, pdf, excel, compilation, runtime, etc). I need to preview the report using Swing and print it. PDF export is a plus.

    Read the article

  • Suggestions/pointers for Post/Get to an .ASP (or .ASPX) page from a desktop app

    - by Clay Nichols
    I'm planning to have a desktop app interact with some .ASP or .ASPX pages on a server. I've only done a little bit with .asp pages and I'm thinking I'd just Post or Get a URL with some variables: MySite.com/Functions.asp?FunctionName=?Paramater1=somevalue?Parameter2=... I'm wondering if there is any better way to go about this? Am I missing something? Is there perhaps a better way to go about this?

    Read the article

  • java: converting part of a ByteBuffer to a string

    - by Jason S
    I have a ByteBuffer containing bytes that were derived by String.getBytes(charsetName), where "containing" means that the string comprises the entire sequence of bytes between the ByteBuffer's position() and limit(). What's the best way for me to get the string back? (assuming I know the encoding charset) Is there anything better than the following (which seems a little clunky) byte[] ba = new byte[bbuf.remaining()]; bbuf.get(ba); try { String s = new String(ba, charsetName); } catch (UnsupportedEncodingException e) { /* take appropriate action */ }

    Read the article

  • PHP using Declare ? What is a tick?

    - by ArneRie
    Iam a little bit confused by php function declare. What exactly is an single tick, i thought 1 tick = one line of code? But if i use: function myfunc() { print "Tick"; } register_tick_function("myfunc"); declare(ticks=1) { echo 'foo!bar'; } The script prints : "Tick" 2 Times??

    Read the article

  • What does plus sign does here in string?

    - by Thanga
    I would like to know, what is the difference between two statements, these may be simple String ss="myname"; char[] charArray = ss.toCharArray(); for ( char character : charArray ) { System.out.println( +character );//Statements are here what does plus refers here: System.out.println( character ); //Statements are here: } I got the output for the code no errors but little doubt on how it works? What happens here? If you would down vote let me know the reason please , Thanks in advance

    Read the article

  • The single most useful Emacs feature

    - by Readonly
    My primary editor is Emacs, but my usage habits and knowledge of features has barely changed over the last few years. What are the Emacs features that you use on a daily basis? Are there any little-known Emacs features that you find very useful? Edit: Made this into the recommended poll format...please put one feature per answer from now on.

    Read the article

  • Javascript: 'this' changes when assigning a property?

    - by Pickels
    I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled. var ControlTypes = { TextBox: function () { console.log(this); this.Name = "TextBox"; console.log(this); } } ControlTypes.TextBox(); Firebug gives the following result: Object {} Object { Name="TextBox"} The first object is ControlTypes and the second one is Textbox. Could anybody explain the behavior behind this?

    Read the article

  • accessing SQL syntax reference in mysql workbench

    - by dcompiled
    Finding it a little bit tedious migrating to the new Mysql Workbench (5.2.22) even though it has many more features than the older GUI tools. Right now I'm confused why I can't find an SQL reference when I open the Doc Library. Is there a way to access this info within the workbench, I'd prefer not to have to open a browser to access reference info on the web.

    Read the article

  • Beginning python for the web

    - by Josh K
    I'm looking for a nice tutorial or framework for developing Python written web applications. I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically.

    Read the article

  • Does a good programmer need to have good spatial sense?

    - by lisa1234
    Do you need to have good spatial sense to be a good programmer? I have next to nothing of it (I think it has to do with the differing vision of my eyes). I've already coded quite little things but wonder if this interferes with the ability to 'imagine' the assembly of the code in case of a more complex program? Sorry for my english, I'm Austrian and not so used to write in English.. Thanks for your ansers..

    Read the article

  • Using [self method] or @selector(method)?

    - by fuzzygoat
    Can anyone enlighten me as to the differences between the two statements below. [self playButtonSound]; AND: [self performSelector:@selector(playButtonSound)]; I am just asking as I had some old code that used @selector, now with a little more knowledge I can't think why I did not use [self playButtonSound] instead, they both seem to do the same as written here. gary

    Read the article

  • Missing part of the image when taking screenshot while supporting Retina Display

    - by Spaft
    I'm currently working on enabling support for retina display for my game. In the game, we have a feature that the user can take screenshot. We are using these part of code we found online a while ago and it's working fine when we are not supporting retina display: CCDirector* director = [CCDirector sharedDirector]; CGSize size = [director winSizeInPixels]; //Create buffer for pixels GLuint bufferLength = size.width * size.height * 4; GLubyte* buffer = (GLubyte*)malloc(bufferLength); //Read Pixels from OpenGL glReadPixels(0, 100, size.width, size.height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); //Make data provider with data. CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer, bufferLength, NULL); //Configure image int bitsPerComponent = 8; int bitsPerPixel = 32; int bytesPerRow = 4 * size.width; CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; CGImageRef iref = CGImageCreate(size.width, size.height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent); uint32_t* pixels = (uint32_t*)malloc(bufferLength); CGContextRef context = CGBitmapContextCreate(pixels, size.width, size.height, 8, size.width * 4, CGImageGetColorSpace(iref), kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGContextTranslateCTM(context, 0, size.height); CGContextScaleCTM(context, 1.0f, -1.0f); switch (director.deviceOrientation) { case CCDeviceOrientationPortrait: break; case CCDeviceOrientationPortraitUpsideDown: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(180)); CGContextTranslateCTM(context, -size.width, -size.height); break; case CCDeviceOrientationLandscapeLeft: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(-90)); CGContextTranslateCTM(context, -size.width, 0); break; case CCDeviceOrientationLandscapeRight: CGContextRotateCTM(context, CC_DEGREES_TO_RADIANS(90)); CGContextTranslateCTM(context, size.width * 0.5f, -size.height); break; } CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, size.width, size.height), iref); UIImage *outputImage = [UIImage imageWithCGImage:CGBitmapContextCreateImage(context)]; //Dealloc CGDataProviderRelease(provider); CGImageRelease(iref); CGContextRelease(context); free(buffer); free(pixels); return outputImage; But when we enabled retina display in cocos 0.99.5. This functionality is a little messed up since it will miss a little left part of the image while the high is still correct. So I'm wondering if there is anything wrong with the code or am I doing anything wrong here? Thank you in advance for any reply!

    Read the article

  • jQuery Selectable only select 1 and get a value?

    - by jphenow
    This might seem like an odd request but I'd like to use jQuery's Selectable tool to only select one item at a time and I'd like it to show me a value I'll have within each tag. At the very least I want the contents of that selection. Has anyone tried to do this? For some reason these little things seem to not be all that easily findable in their API for it.

    Read the article

  • What's the point of the javascript navigator.javaEnabled function?

    - by den shade
    The navigator object has a javaEnabled function that indicates if the browser has javascript support. This seems to be a little odd: If JS is indeed enabled the function will return true, well obviously. If JS is disabled it will return <nothing since it is never run, javaScript is disabled. I must be missing something here, or is it really that useless this function?

    Read the article

  • have an array of struct in wsdl + php without using NSoap

    - by Shadi
    Hi, I want to have an array of struct (an array of books with their specifications like publication, ISBN number, ...). in wsdl and php. I have searched a little and I have found files that uses Nusoap, However, I dont want to use NuSoap. Is there any solution? I would appreciate if you help me in writing the related wsdl, client and server (php) files. Thank you so much. Best, shadi.

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >