Search Results

Search found 250905 results on 10037 pages for 'overflow'.

Page 25/10037 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Is there a Markdown editor for Dojo

    - by Emilien
    Is there a good Markdown editor for Dojo? I have seen Control.TextArea (based on Prototype) and Stack Overflow's reverse-engineered version of WMD (seems to rely on jQuery) but I'd rather use a Dojo-based tool, as my site already uses this framework. Does such a tool exist? Googling for dojo markdown editor doesn't seem to return any useful results, apart from a Google Summer of Code 2008 student blogging that he's working on it...

    Read the article

  • GCC, -O2, and bitfields - is this a bug or a feature?

    - by Rooke
    Today I discovered alarming behavior when experimenting with bit fields. For the sake of discussion and simplicity, here's an example program: #include <stdio.h> struct Node { int a:16 __attribute__ ((packed)); int b:16 __attribute__ ((packed)); unsigned int c:27 __attribute__ ((packed)); unsigned int d:3 __attribute__ ((packed)); unsigned int e:2 __attribute__ ((packed)); }; int main (int argc, char *argv[]) { Node n; n.a = 12345; n.b = -23456; n.c = 0x7ffffff; n.d = 0x7; n.e = 0x3; printf("3-bit field cast to int: %d\n",(int)n.d); n.d++; printf("3-bit field cast to int: %d\n",(int)n.d); } The program is purposely causing the 3-bit bit-field to overflow. Here's the (correct) output when compiled using "g++ -O0": 3-bit field cast to int: 7 3-bit field cast to int: 0 Here's the output when compiled using "g++ -O2" (and -O3): 3-bit field cast to int: 7 3-bit field cast to int: 8 Checking the assembly of the latter example, I found this: movl $7, %esi movl $.LC1, %edi xorl %eax, %eax call printf movl $8, %esi movl $.LC1, %edi xorl %eax, %eax call printf xorl %eax, %eax addq $8, %rsp The optimizations have just inserted "8", assuming 7+1=8 when in fact the number overflows and is zero. Fortunately the code I care about doesn't overflow as far as I know, but this situation scares me - is this a known bug, a feature, or is this expected behavior? When can I expect gcc to be right about this? Edit (re: signed/unsigned) : It's being treated as unsigned because it's declared as unsigned. Declaring it as int you get the output (with O0): 3-bit field cast to int: -1 3-bit field cast to int: 0 An even funnier thing happens with -O2 in this case: 3-bit field cast to int: 7 3-bit field cast to int: 8 I admit that attribute is a fishy thing to use; in this case it's a difference in optimization settings I'm concerned about.

    Read the article

  • How to style a code block to make all the colours look pretty like my IDE and here in stackoverflow?

    - by BritishDeveloper
    When putting code samples in my blog I would like the code to have all the appropriate colours. How can I do that? Basically if I write: foreach (ListItem item in items) { item.Text = "something"; } I want it to appear in the correct colours like it does in my Visual Studio or here at stack*overflow*. I'm bored of styling the colours of each key word manually. Is there a pre-existing javascript library I can use?

    Read the article

  • Disadvantages of scanf

    - by karthi-27
    Hi all, I want to know the disadvantage of the scanf.In many of a sites I have read that using scanf will cause buffer overflow some times.What is the reason for that , and is there any other drawbacks with scanf .

    Read the article

  • Subroutine & GoTo design

    - by sub
    I have a strange question concerning subroutines: As I'm creating a minimal language and I don't want to add high-level loops like while or for I was planning on just adding gotos to keep it Turing-Complete. Now I thought, eww - gotos - I wouldn't want to program in that language if I had to use gotos so often. So I thought about adding subroutines instead. I see the difference as the following: gotos Go to (captain obvious) a previously defined point and continue executing the program from there. Leads to hardly understandable and buggy code, I think that's a fact. subroutines Similiar: You define their starting point somewhere, as you call them the program jumps there - but the subroutine can go back to the point it was called from with return. Okay. Why didn't I just add the more function-like, nice looking subroutines? Because: In order to make return work if I call subroutines from within subroutines from within other subroutines, I'd have to use a stack containing the point where the currently running subroutine came from at top. That would then mean that I would, if I create loops using the subroutines, end up with an extremely memory-eating, overflowing stack with return locations. Not good. Don't think of my subroutines as functions. They are just gotos that return to the point they were called from, they don't actually give back values like the return x; statement in nearly all today's languages. Now to my actual questions: How can I solve the above problem with the stack overflow on loops with subroutines? Do I have to add a separate goto language construct without the return option? Assembler doesn't have loops but as I have seen myJumpPoint:, jnz, jz, retn. That means to me that there must also be a stack containing all the return locations. Am I right with that? What about long running loops then? Don't they overflow the stack/eat memory then? Am I getting the retn symbol in assembler totally wrong? If yes, please explain it to me.

    Read the article

  • Iframe always showing scroll bars in IE7

    - by Martin Bacon
    Hi everyone, Having an annoying issue in IE7. I have a website where, at the bottom of every page theres an Iframe, and for the life of me I cannot get the scroll bars to hide. This is only in IE7, every other browser I have tested is fine. I have scrolling="no" and set overflow:hidden; still not working though. If anyones got anything they could suggest I'd be very greatful http://www.keyscape.co.uk is the site Cheers Martin

    Read the article

  • Simple 3x3 matrix inverse code (C++)

    - by batty
    What's the easiest way to compute a 3x3 matrix inverse? I'm just looking for a short code snippet that'll do the trick for non-singular matrices, possibly using Cramer's rule. It doesn't need to be highly optimized. I'd prefer simplicity over speed. I'd rather not link in additional libraries. Primarily I was hoping to have this on Stack Overflow so that I wouldn't have to hunt around for it or rewrite from scratch again next time.

    Read the article

  • Previous power of 2

    - by Horacio
    There is a lot of information on how to find the next power of 2 of a given value (see refs) but I cannot find any to get the previous power of two. The only way I find so far is to keep a table with all power of two up to 2^64 and make a simple lookup. Acius' Snippets gamedev Bit Twiddling Hacks Stack Overflow

    Read the article

  • Groupon.com clones?

    - by ffffff
    I want to create a site that is groupon.com clone. Does anyone know interesting clones of the Groupon.com web site model? ex) StackOverflow clone = http://meta.stackoverflow.com/questions/2267/stack-overflow-clones

    Read the article

  • CSS to show all textarea Content in HTML for Printing?

    - by viatropos
    What settings do I need to make it so when a user presses "print" in the browser, using a print.css stylesheet, the textareas display all their content (dynamic height) in the printed version, without using javascript? I have tried this: textarea { overflow: visible; float: none !important; height: auto !important; } ... but it doesn't work. Any ideas?

    Read the article

  • Simple wordpress Registration

    - by andrew
    I am looking for a wordpress plugin which simplifies the registration process by allowing users to sign up on the spot without having to be sent an email? It would be good if you could also pass a redirect_to parameter in the url like you can for the login. Note:Some thoughtless person migrated this question over to super user where it was closed. I believe this question fits the criteria allowable for stack overflow.

    Read the article

  • Bitwise Operations -- Arithmetic Operations..

    - by RBA
    Hi, Can you please explain the below lines, with some good examples. A left arithmetic shift by n is equivalent to multiplying by 2n (provided the value does not overflow), while a right arithmetic shift by n of a two's complement value is equivalent to dividing by 2n(2 to the power n) and rounding toward negative infinity. If the binary number is treated as ones' complement, then the same right-shift operation results in division by 2n and rounding toward zero. Thankx..

    Read the article

  • How to scroll text in Python/Curses subwindow?

    - by lecodesportif
    In my Python script which uses Curses, I have a subwin to which some text is assigned. Because the text length may be longer than the window size, the text should be scrollable. It doesn't seem that there is any CSS-"overflow" like attribute for Curses windows. The Python/Curses docs are also rather cryptic on this aspect. Does anybody here have an idea how I can code a scrollable Curses subwindow using Python and actually scroll through it? \edit: more precise question

    Read the article

  • 3d symmetry search algorithm

    - by aaa
    this may be more appropriate for math overflow, but nevertheless: Given 3d structure (for example molecule), what is a good approach/algorithm to find symmetry (rotational/reflection/inversion/etc.)? I came up with brute force naive algorithm, but it seems there should be better approach. I am not so much interested in genetic algorithms as I would like best symmetry rather then almost the best symmetry link to website/paper would be great. thanks

    Read the article

  • ASP SQL Error Handling

    - by J Harley
    Hello, I am using Classic asp and SQL Server 2005. This is code that works (Provided by another member of Stack Overflow): sqlStr = "USE "&databaseNameRecordSet.Fields.Item("name")&";SELECT permission_name FROM fn_my_permissions(null, 'database')" This code checks what permissions I have on a given database - the problem being - if I dont have permission it throws an error and doesn't continue to draw the rest of my page. Anyone got any ideas on remedying this? Many Thanks, Joel

    Read the article

  • Dynamic FIFO queue

    - by sam
    Create a 4K buffer for storing 4 independent FIFO (first-in/first-out) queues of single byte character data. The organization of the FIFO should be as efficient as possible for storing the 4 queues to support dynamic (not fixed) queue size, insuring that no queue will overflow any other queue and given that it is unknown which queues may have the least # of elements and which queues may have the most # of elements.

    Read the article

  • Is Programming Right for me?

    - by L1th1um
    I'm interested in programming, but it seems to me that I can't get into it. Every time I've tried to learn a language and stuff by looking through tutorials or books I'd never get past the part where I use the syntax to make something. And by interest, I mean that I read stack overflow a lot, coding horror, and stuff but the actual coding part is hard for me to get into. Did anybody start this way? How did you get past this block?

    Read the article

  • Wrapping content in td

    - by Hulk
    This following code is used to wrap up the contents within the textarea <td> <textarea rows = "8" cols = "18" border ="1" class="input" style="border: none;overflow:visible;width:100%;" maxlength="5">'+col_det[data]+'</textarea> </td> How to implement the same for a tag i.e, the conetnt within td tag should be wrapped <td>%s</td>,(sum variable) Thanks..

    Read the article

  • Should a Stack have a maximum size?

    - by Sotirios Delimanolis
    I'm practicing my knowledge of ADTs by implementing some data structures, even if most already exist. With Stacks, a lot of books and other documentation I've read talk about the stack throwing an error when you try to add an element but the stack is full. In a java implementation (or any other), should I specifically keep track of a maximum stack size (from constructor), check to see if that size is reached, and throw an overflow exception if it is? Or is not such a big deal?

    Read the article

  • Parsing a UTF-16 encoded xml file in ruby

    - by Matthew Toohey
    Hello I've been trying to parse a UTF-16 encoded xml file in Ruby (1.8.7), and I can't seem to find how to do it by searching (google and stack overflow) Here's the xml file url: http://www.abc.net.au/triplej/feeds/playout/triplejsydneyplayout.xml?_5366 Getting the xml string from Net::HTTP and passing it to REXML, then calling logger.info xmlDoc.inspect produces: <UNDEFINED> ... </> Any ideas? Cheers

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >