Ronnie Diaz

  • Concatenate string in Objective-C

    Unfortunately, this is not as straight forward as it seems it should be. This really comes down to roughly two approaches in my opinion: stringByAppendingString approach: strigWithFormat approach: References StackOverflow, http://stackoverflow.com/questions/510269/how-do-i-concatenate-strings-in-objective-c cocoadevcentral.com, “Learn Objective-C”, http://cocoadevcentral.com/d/learn_objectivec/ Continue reading

  • Convert Video to and from Adobe Flash .FLV format

    The first three tools are Windows specific, with the last being cross-platform and especially necessary for linux users. Super11 Link: http://www.videohelp.com/tools/SUPER Not well known, but very robust software with good features and overall good functionality. Riva FLV Encoder Link: http://rivavx.com/?encoder… Continue reading

  • How to Create secure relational databases in SQL

    The first step to a secure DB, is a well structured DB and the application layers that access it. Take the following example of a table containing factories and the robots they produce. FACTORYNAME ROBOTNAME FACTORY1 Ron FACTORY1 John FACTORY2… Continue reading

  • C# Nested Repeaters ASP .Net

    Nested repeaters are a very common topic in ASP .Net so I thought it would be a good subject to write on, especially considering the number of solutions that exist when you Google “nested repeaters” that offer plug-and-play answers, but… Continue reading

  • Show Dialog Message Box in Objective-C Cocoa

    There are a few ways to achieve this in Objective-C/Cocoa, and I found NSAlert to be the simplest base class for this purpose. See example below of a small Utility class with this functionality. Util.h Util.m References iphonedevsdk.com, http://www.iphonedevsdk.com/forum/iphone-sdk-development/8478-simple-message-box-popup.html blogspot.com,… Continue reading

  • View PDF in Objective-C Cocoa on Mac OS X using PDFKit

    The code below has been tested and works clean on the latest version of Mac OS X 10.5 Leopard. Since it applies to native Mac OS X, and not iOS, porting this to work on iPhone/iPad is a bit different,… Continue reading

  • C++ concatenate strings with stream or sprint

    There are many different ways to achieve this, but in my opinion the best method for something this commonly used is a solution that does not require additional external dependencies.. However, see reference at the bottom of this post for… Continue reading

  • C++ rand generates the same number with srand time

    Random number generation in C++ in the standard libraries is generally done using “ctime” (time.h) and “cstdlib” (stdlib.h). If you are experiencing an issue where calling rand() keeps generating the same number due to similar seeds, simply call it multiple… Continue reading

  • C++ Simple Class Implementation using Header

    (The following example project was created using Microsoft Visual Studio 2008 Win32 Console Application) example header (“robot.h”): class implementation of header (“robot.cpp”): class usage example (“main.cpp”): Continue reading

  • OrderBy Column Name as String using Linq C# .Net Dynamic Sorting of Anonymous Types

    If you’re familiar with Linq, you have undoubtedly used the popular “OrderBy” extension method. Unfortunately, this method does not accept a string value with the column name. To resolve, you can add the following small class or just the method… Continue reading