Search Results

Search found 18 results on 1 pages for 'd ethier'.

Page 1/1 | 1 

  • Equivalents to Z80 DJNZ instruction on other architectures?

    - by Justin Ethier
    First a little background. The z80 CPU has an instruction called DJNZ which can be used in a similar manner as a for loop. Basically DJNZ decrements the B register and jumps to a label if not zero. For example: ld b,96 ; erase all of the line disp_version_erase_loop: call _vputblank ; erase pixels at cursor (uses b reg) djnz disp_version_erase_loop ; loop Of course you can do the same thing using regular comparison and jump instructions, but often it is handy to use the single instruction. With that out of the way, my question is, do other CPU architectures include a similar control instruction?

    Read the article

  • Nested Functions in C - Best Practices

    - by Justin Ethier
    I just realized a function may be defined inside another function in C: void main(){ int foo(){ return 2; }; printf("%d\n", foo()); } Besides being a neat trick, the useful thing about this is that the inner function is private to the outer function. But... is that a good enough reason to do this in a "real-world" application? What are the best practices for using this syntax?

    Read the article

  • jQuery UI Datepicker on a qTip

    - by Justin Ethier
    I am trying to display a qTip containing a jQuery UI datepicker control (the version bundled with jQuery UI). However the datepicker's calendar opens behind the qTip. I tried manually setting the calendar's z-order from firebug, which does allow the calendar to open in front of the qTip. However, in this case clicking on the calendar has the effect of closing the qTip as (I assume) it is part of the page's content. I am still working through this but wanted to ask - has anyone run into this problem before? Any possible workarounds to get the datepicker to work?

    Read the article

  • What features would you like to see removed from C++?

    - by Justin Ethier
    This question was inspired by what-features-would-you-like-to-see-added-to-c. anBasically, C++ is a great general-purpose language. But perhaps too general and feature-rich... multiple inheritance, operator overloading, manual memory management, templates, smart pointers, virtual destructors, legacy frameworks (think MFC), and I could just go on. Is there any one feature / aspect of C++ that you would like taken away, to make our lives easier as C++ developers? One feature per answer, please.

    Read the article

  • Segmentation fault when accessing a PHP page

    - by Justin Ethier
    Sometimes when one of our Apache web servers is restarted, we experience segmentation faults when any PHP page is subsequently accessed. The following line is printed in the httpd error_log: [Wed Jun 16 10:59:33 2010] [notice] child pid 31513 exit signal Segmentation fault (11) There will be one of these lines for each PHP page that is accessed. This appears to happen randomly - the "workaround" to-date is to restart httpd, which eventually fixes the problem (almost always after a single restart). Although we only see this happen rarely, it still happens frequently enough to be of concern. So my question is, why is this happening in the first place? Is this a known bug with the version of Apache / PHP / Linux / etc that we are using? Any ideas? The environment is: Fedora 11 Apache 2.2.15 (Default settings) PHP 5.2.13 I can provide more information if that would help narrow things down, since this error message is rather generic... Any help is appreciated.

    Read the article

  • Porting a PowerBuilder Application to .NET

    - by Justin Ethier
    Does anyone have any advice for migrating a PowerBuilder 10 business application to .NET? My company is considering migrating a legacy PB application to .NET (C#) and I am just wondering if anyone has any experience - good or bad - that you would like to share. The application is rather large with 10 PBL libraries, some PFC as well as custom frameworks. There are a large number of DLL calls being made as well. Finally, it uses a Microsoft SQL Server database. We have discussed porting the "core" application code to .NET and then porting more advanced functionality across as-needed.

    Read the article

  • Are there equivalents to Ruby's method_missing in other languages?

    - by Justin Ethier
    In Ruby, objects have a handy method called method_missing which allows one to handle method calls for methods that have not even been (explicitly) defined: Invoked by Ruby when obj is sent a message it cannot handle. symbol is the symbol for the method called, and args are any arguments that were passed to it. By default, the interpreter raises an error when this method is called. However, it is possible to override the method to provide more dynamic behavior. The example below creates a class Roman, which responds to methods with names consisting of roman numerals, returning the corresponding integer values. class Roman def romanToInt(str) # ... end def method_missing(methId) str = methId.id2name romanToInt(str) end end r = Roman.new r.iv #=> 4 r.xxiii #=> 23 r.mm #=> 2000 For example, Ruby on Rails uses this to allow calls to methods such as find_by_my_column_name. My question is, what other languages support an equivalent to method_missing, and how do you implement the equivalent in your code?

    Read the article

  • Features to remove from C++

    - by Justin Ethier
    This question was inspired by What features would you like to see added to C++? (also see What features do you miss in C++?). C++ is a great general-purpose language, but perhaps too general and feature-rich: multiple inheritance, operator overloading, manual memory management, templates, smart pointers, virtual destructors, legacy frameworks (think MFC), and I could go on. Is there any one feature or aspect of C++ that you would like removed to make our lives easier as C++ developers? One feature per answer, please.

    Read the article

1