Search:

Type: Posts; User: penagate

Page 1 of 12 1 2 3 4

Search: Search took 1.52 seconds; generated 40 minute(s) ago.

  1. Re: [RESOLVED] Webpage works in IE/FF but doesn't work in Chrome/Edge

    That nested try/catch can be avoided:


    if (window.XMLHttpRequest) {
    // XMLHttpRequest code here
    }
    else if (window.ActiveXObject) {
    // Non-standard code here
    }
    else {
  2. Replies
    35
    Views
    4,618

    Re: Any converts to Linux?

    This is completely wrong. On what basis would you say a native code application is more secure than a properly sandboxed web application?

    The current state of affairs may not be ideal, but it...
  3. Replies
    35
    Views
    4,618

    Re: Any converts to Linux?

    I used various RHEL derivatives as my primary desktop for many years (Fedora, CentOS, Scientific). Now I use a MacBook, with Scientific Linux 7 VMs for development. Every now and then I dig up...
  4. Replies
    12
    Views
    5,950

    Re: JQuery - Get Item in Array by Attribute

    If number of drivers is not many (<500, say) then KISS



    // If 'drivers' is an array containing Driver instances
    function get_driver_firstlast(first, last) {
    for (var i = 0; i <...
  5. Re: Question regarding file size output by GCC and G++

    Lots of loaded language there. gcc is fine. You are using a non-native port of GNU. The native compiler will always produce a tighter binary.
    Anyway, try UPX.
  6. Thread: Farewell?

    by penagate
    Replies
    98
    Views
    23,895

    Re: Farewell?

    Hey Woss, I guess all communities change over time but it definitely doesn't feel the way it used to on here.

    I think the bulletin board format is getting a bit long in the tooth now, but I...
  7. Re: An observation about many of the technical forums and thread visibility.

    Well, this is a bit off the original topic of removing the default age restriction (which I'm all in favour of) but VBF does need to evolve.

    There are too many sections on the front page. It is...
  8. Replies
    2
    Views
    2,797

    Re: how to center single div element

    I use display:flex for almost everything now. It is quite versatile.


    <!DOCTYPE html>
    <html>
    <style>
    body {
    width: 100vw;
    height: 100vh;
    display: flex;
  9. Re: An observation about many of the technical forums and thread visibility.

    I remember suggesting cutting down the number of sections years ago but the list has only grown since then.
  10. Replies
    3
    Views
    7,712

    Re: Undo and Redo Button.

    Thread moved from the C/C++ forum
  11. Replies
    6
    Views
    1,822

    Re: dynamic creation of text box

    In terms of the document tree, the div element can't be placed within the canvas. Visually, you could place it above the canvas by giving it 'position:absolute' with 'left' and 'top' values. You...
  12. Replies
    2
    Views
    1,662

    Re: Remove Style Section as string

    If you need the information in the response, then change the mechanism that generates it so that there is no HTML. The easiest format to work with is JSON. IIS lets you set custom error pages for...
  13. Re: PHP's eval() construct safety question

    Not really... as long as your validation is OK.
    The reason eval is discouraged in web-facing code is because it adds a large attack surface which can be exposed if there is any kind of bug in your...
  14. Thread: New Monitor

    by penagate
    Replies
    15
    Views
    2,398

    Poll: Re: New Monitor

    Right now, 15" with a 2880x1800 resolution.
    Before I left Oz, I had a 27" monitor which actually had a lower resolution (2560x1440). Next one will probably be a 4k or 5k screen.
  15. Replies
    3
    Views
    1,945

    Re: JavaScript Array From Striing

    If you can't use JSON.parse

    x.slice(1,-1).split(',').map(Number)

    or

    x.match(/\d+/g).map(Number)
  16. Replies
    19
    Views
    2,087

    Re: Appendicitis sucks

    Not good mate. Glad to hear you're OK.
  17. Re: [RESOLVED] How to add radio buttons to OOP classes/ arrays

    Use a checkbox instead of a radio
  18. Replies
    5
    Views
    1,781

    Re: Concatenating two strings and a variable

    Yeah, that's better. I took your question title literally.

    More general tips (probably not applicable to your project right now): If you're not actually printing or formatting numbers, the other...
  19. Re: Contest 8 - Roman Numeral Converter - Discussion Thread

    Oh right, sorry. I saw that, but wasn't sure if everyone else could.
  20. Replies
    5
    Views
    1,781

    Re: Concatenating two strings and a variable

    char String1[] = "s_rgbn[";
    char String2[] = "]";
    int Variable1 = 133;

    char buf[strlen(String1) + strlen(String2) + 10];
    sprintf(buf, "%s%d%s", String1, Variable1, String2);
  21. Re: Contest 8 - Roman Numeral Converter - Discussion Thread

    It'd be good to have the source of each submission published, I think.

    Maybe allow JavaScript entries next time too? Easy to test.
  22. Replies
    4
    Views
    2,015

    Re: vbforums.com very slow response

    Right now this site is really very slow, so I benchmarked a few page loads (with browser cache disabled) to try to track down the problem.

    Unfortunately there is no single culprit, but there are a...
  23. Thread: Terrible Code

    by penagate
    Replies
    39
    Views
    4,950

    Re: Terrible Code

    I'd enjoy that site if it were still just snippets of w.t.f. code with brief commentary. At some point the posts evolved into dramatic, nerdy epics and advertisements. And the blog format with its...
  24. Thread: Terrible Code

    by penagate
    Replies
    39
    Views
    4,950

    Re: Terrible Code

    I think forums are now a bit passé in general. There is more traffic on structured Q&A sites like Stack Overflow and sites with structured comments like Reddit (vBulletin has a 'threaded' view, but...
  25. Contest 8, Roman Numeral Converter - Penagate

    Just for giggles, here's my less-than-serious entry. It's more of a demonstration of how concise one can be using an atypical language (it's q). I should be embarrassed if it is chosen above any of...
  26. Re: Contest 8 - Roman Numeral Converter - Discussion Thread

    Are you awarding a winner for each language? If not, on what bases will you compare a solution in language $x to one in language $y?

    Can I submit a solution in an exotic language that you haven't...
  27. Re: Promises, promises...I'm Unloading

    I'm afraid I've no idea about promises (I sometimes make them, but only before breaking them) but one alternative to the beforeunload event is to use the History API:...
  28. Replies
    1,154
    Views
    386,773

    Re: [RESOLVED] artificial intelligence

    Fairly similar...
  29. Re: 7 Things You Didn’t Know About Facebook From Mark Zuckerberg’s Q&A

    Are you sure they weren't trying to get in touch with each other? :-)
  30. Replies
    12
    Views
    4,869

    Re: Learning and doing Visual C++

    That book will be written in Objective C. (edit: OK, it might contain some English too.)
    C++, Objective C, and C# are three totally different languages. The only thing they share in common is a...
  31. Thread: penagate

    by penagate
    Replies
    9
    Views
    1,584

    Re: penagate

    I actually came back to see if anything had changed, and saw my name was still on the list! You just can't get rid of me!
  32. Thread: penagate

    by penagate
    Replies
    9
    Views
    1,584

    Re: penagate

    As long as there's no milk or sugar, and if there were some buttered scones on offer, I could be tempted.

    Excuse me while I feed the cat.
  33. Re: Problem understanding how an array is initialized

    pi is a PI structure at pcon->argpi[1][0]
    ppi I assume points to argpi[1][4]
    So *ppi = pi is copying the structure at index 0 to index 4.

    The assignment of ppi appears to be here:

    ppi =...
  34. Replies
    3
    Views
    1,037

    Re: Wide Screens get made with PHP code tags

    hello!

    It's because overflow's set on pre.bbcode_code but the width is not defined on [php] elements.
    On [html] elements, width is constrained to 650px in the element's style attribute (although...
  35. Re: [JavaScript] Loop through each element with the same class name

    Bit late, but in case anyone else is reading this: getElementsByClassName


    var elems = document.getElementsByClassName('myClass');
    for (var i = 0; i < elems.length; ++i)...
  36. Re: Problem understanding how an array is initialized

    The line *ppi=pi does not create a pointer. It is assigning to the address pointed to by ppi.
    Pointers are 'created' using the address-of operator &.
    This might help:

    int numbers[4] =...
  37. Re: How to use transition for multiple div elements?

    I'm not exactly sure what you mean by 'automatically hover'.
    You've defined a hover state on the item, and a hover state on the anchor within it.
    Perhaps you just want to change:

    #item a:hover...
  38. Replies
    2
    Views
    1,703

    Re: What to load new JS with AJAX calls

    Lots of ways.

    I load source files, and inject them into the HEAD element of the page:

    var script = document.createElement('script');
    script.src = uri;
    script.async = false;...
  39. Replies
    2
    Views
    2,052

    Re: How do you make animations with HTML5?

    There are a few libraries. I use Velocity, which fast and doesn't require jQuery.
  40. Re: cloning a branch of DOM tree with JavaScript

    Use cloneNode
    To perform a recursive copy (copying all descendants of the node as well), pass a single argument of 'true'.

    var newClone = templateTableRow.cloneNode(true)

    On jQuery, I'd...
Results 1 to 40 of 452
Page 1 of 12 1 2 3 4



Click Here to Expand Forum to Full Width