NVNCBL Blog

  • Simple List Reordering Technique

    At some point in our programming careers, we've had to reorder server-side (probably database driven) lists. For example, allowing users to set the specific sequence that image thumbnails are displayed on the front-end of a photo album.

    For "move-item-forwards" functionality, the logic may look like:

    move_item_up( index ){
      Store the element at index 3 to a temporary variable.
      Set the value of index 3 to the value of index 4.
      Set the value of index 4 to the temporary variable's value.
    }

    The "technique" comes into play now, when you have to do the "move-item-backwards" functionality.

    Instead of:

    move_item_back( 4 );

    Simply use:

    move_item_up( 3 );

    Moving an item backwards in a list is the same as moving the previous item forwards. This technique is rather simple and perhaps painfully obvious to some, though it may be useful to others.

  • Start Your Days Right, Invest in a Coffee Maker

    [singlepic id=21 w=150 h=150 float=right] I was not much of a coffee drinker before college.  In senior year, after only having coffee when I needed to be up late studying, I purchased this coffee maker for my room.  Well, it was actually a Christmas present for my parents, but as it turns out, neither of them are regular drinkers.

    One of the features I like is its ability to brew at a preset time.  For example, during the week, I wake up to the smell of coffee, brewed automatically at 8:00am.  Continue reading

  • When Wizards Get in the Way

    Many of Microsoft's development products, when given an SQL query, will try to perform all sorts of analysis and breakdowns on the query -- usually in an attempt to visualize what's going on.  When the queries become too complex (as the tend to be), they just can't be parsed and visualized.  Furthermore, when the successful parsing of a query is critical to one of their "wizards", your report creation process can be brought to a standstill.

    [singlepic id=23 w=125 h=94 float=left]Queries that have a few levels of subquery nesting, or that have UNIONs, for example, will sometimes break parsing.

    So, if you don't want your development tools (such as Visual Studio) to get in the way of completing a report wizard, put your SQL query in a stored procedure.  This way, your tools won't be concerned with the nitty gritty details of your query.  You can still pass @variables to the query, and you can make changes to the query without stepping into your designer's .rdlc files.

  • Magento Platform Revisited

    It's been almost three weeks now since I've started learning the Magento ecommerce platform.  With an impressive array of features, like product comparisons and a web services API, the platform sounds promising.  I had hoped that by the time I'd revisit this topic, I'd be able to say I've successfully implemented the software.  Instead I'm having trouble setting up my product catalog (it involves importing).  And how can I forget to mention the overall issue of speed?

    Let's start at the beginning, at installation.  Your web server likely has capable hardware, so you need to be sure that your software configuration meets requirements.  Luckily the host I'm on was set up just fine the way it was.  Obviously you need to download the software - I chose to download the Full Release (version 1.1.8 at the time).  Continue reading

  • CSS Neatness Technique

    [singlepic id=15 w=80 h=80 float=right] We've all seen long and unmanageable CSS files, sometimes hundreds or even thousands of lines long.  Finding the exact declaration you're looking for can be a royal pain in the arse.  It's worse when style declarations for a particular element can be found more than once in a file, such as when the coder wants to separate structural styling from say typography styling.

    Continue reading

  • iPhone Wordpress App

    I had known for a while that there was an iPhone application for Wordpress but for the longest time I couldn't get it to work properly. Thankfully, we have Google as a resource, and a little querying quickly led me to a solution.

    This is a problem that is likely to affect shared hosting. You have to add the following lines to your .htaccess file (or create an .htaccess file with these lines):

    Continue reading

  • PHP HTTP Class 2

    Revisiting the topic of my previous post, I've played around some more with this PHP HTTP Class. This morning, I've figured out how to send files over HTTP (actually HTTPS, but it works the same way). If you've looked through the author's test scripts, you see that for file uploads, the provided example is:

    $arguments["PostFiles"] = array(
    	"userfile" => array(
    		"Data" => "This is just a plain text attachment file.",
    		"Name" => "attachment.txt",
    		"Content-Type" => "automatic/name",
    	),
    	"anotherfile" => array(
    		"FileName" => "test_http_post.php",
    		"Content-Type" => "automatic/name",
    	)
    );
    

    Continue reading

  • PHP HTTP Class

    I've found a great PHP script that can essentially turn a web server into a virtual browser.  The script is small and lightweight compared to existing solutions (just 62KB) and it isn't dependent on anything else.  I needed it for sending/receiving data through POST (because GET is easy), and more importantly, doing it over SSL.  I still need to figure out how to upload files through this, but I don't think it should be too big of an issue.  I'm sure it's just a matter of encoding.

    Continue reading

  • Magento - eCommerce Platform for Growth

    One of our clients is using an in-house system for maintaining product catalogs, customers, inventory, shopping carts, etc.  Being an in-house system, it isn't very scaleable and changes to the system take a long time to implement.  So for them, we are going to be installing and setting up Magento.

    Now I've only just started to become familiar with the platform.  I should also mention that I have no experience working with other eCommerce platforms like OSCommerce or anything, but the talk-of-the-town is that Magento blows everything else out of the water.  More importantly, based on what I've read in their comprehensive User Guide, the software can handle (1) everything our client needs, (2) everything they've requested, and (3) everything our client hasn't even thought of yet.

    Continue reading

Items 46 to 54 of 59 total

Page:
  1. 1
  2. ...
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7

About NVNCBL

Quick Support