Syndicate content

Pages with category Development

  • Today I ran in a little bit of a problem with an new Cassandra node installation.

    After the node was created, I ran nodetool and got this:

     $ bin/nodetool status
    Datacenter: dc1
    ===============
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    --  Address    Load       Tokens       Owns (effective)  Host ID   Rack
    UN  127.0.0.1  219.83 KiB 256          0.0%              73bd8721  rack1

    It took me a little while to find out that the problem was the IP address. Although it clearly says 127.0.0.1 here, the cassandra.yaml configuration file had localhost.

    I edited the ...

  • Once in a while I check how the compilers are behaving in such and such situations to make sure that when I wrote code it gets properly optimized. Today I was surprised as I tried to put a break point of a variable and it looked like the compiler wasn't using it. Indeed, the optimizer 100% removed the variable from the final code. Quite interesting since trying to reverse engineer this assembly language would probably end up using a goto statement... (ouch!)

    The code goes more or less like this:

    [toc hidden:1]
  • Today I was trying to create a table in a post and just could not get the cell padding I wanted. Without the padding the data is all cramped together which did not look the way I wanted (see Alexis Wilke Accounts.)

    I knew I had the following entry in my CSS but did not think it was stronger than the table cellpadding and cellspacing specifications because I thought it worked for me before!

    * {
      margin: 0;
      padding: 0;
    }

    I was wrong, that definition applies to the td with a greater constrained. So I had to add another entry. I solved the problem using a td definition like this:

    
    
  • I had a problem with jQuery and was wondering what could be wrong. Looking around for a solution, it was clear that Internet Explorer is the problem. Not the other way around (As usual.) The thing is that the function works, just not in realtime.

    So... I have a Terms and Conditions flag, when you click it, I want to enable the Submit button in the form (by default the button is disabled.)

    So I have a function something like this:

    var valid = function check_valid() {
      // compute valid
      var valid = ...;
      // assume valid === true if button should be enabled
    
    
  • I use Drupal for most of my sites. I use it in many different ways and it has been working real good for me.

    On one of the sites, I use the ThemeKey module to select a different theme once you are logged in. This means, when I want to switch themes, that one theme selected for logged in users sticks, whether you disable it or not, it remains selected by the system.

    And?

    Well... one thing sticks from themes, their .info file. You just cannot refresh the cache properly unless you disable the theme, then re-enable it. (By the way, when disabled, don't go to the Blocks administration screen ...

  • Often, when one writes a game, one wants a specific resolution to make sure that the game works as expected. Zoomed out textures may not look as nice and the speed could be affected too (drawing 1280x1024 pixels instead of 640x480 is more than 4x higher and all video boards won't be as fast as required in this case). Under MS-Windows you can ask the system to change resolution (size & depth) with a call to ChangeDisplaySettings().

  • Today I wanted to check whether a table existed in a MS-Access database from a macro define in a MS-Access module.

    The test opens the specified database (databaseName) and from that object checks wether a table definition exists (name). I wonder whether there would be a better way to go through the list of items and just know whether an item with that name exists or not instead of generating an error (because the underlaying system will anyway search that list of items for the name, although it may be faster this way in visual basic.)

    There is the function I wrote (sample usage: if ...

  • MS-Access has forms, but no real means to know whether a form exists. It looks like you could go through the list of forms (Forms.item(i)) but I'm not too sure that would work in all circumstances.

    Instead, I used code I found on another site which runs a system command to determine whether a form is currently attached to a window (has a state other than zero.)

    The code looks like this:

    IsLoaded = False
    If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
        If Forms(strFormName).CurrentView <> 0 Then
            IsLoaded = True
        End If
    End If

    The first ...

  • When creating objects (commonly called JavaScript classes) in your JavaScript code, you want to use the prototype. This is the only clean way of doing it. In JavaScript, you can create objects on the fly, but those are not considered safe.

    Quick and Dirty

    The quick way is to create an object directly. This works, but it has potential problems with used against a powerful optimized such as the Google Closure Compiler.

    All the Quick and Dirty examples can make use of this in their myFunc examples. However, the closure compiler will warning about all of them because it doesn't know for ...

  • Today I finally solved a problem that was bothering me for a while. A Drupal site I installed for a friend of mine would not accept the Clean URL set. This is when the URL does not need to include the rather ugly ?q=<path>.

    The more I was looking into it and the more it looked like the problem was coming from the Apache installation.

    [toc hidden:1]
Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.