Programming

What’s TideSDK? TideSDK is the new standard for creating beautiful and unique desktop apps using your web development skills. You can build muti-platform desktop applications with HTML5, CSS3 and JavaScript in TideSDK. TideSDK can support Python, Ruby and PHP now. Download TideSDK and other software TideSDK 1.3.1 Beta TideSDK Developer 1.4.2 Install TideSDK Extract TideSDK 1.3.1 to Windows 7/8/8.1: C:\ProgramData\TideSDK Windows XP: C:\Documents and Settings\All Users\Application Data\TideSDK Ubuntu: ~/.tidesdk **Mac OS X: **~/Library/Application\ Support/TideSDK
In some cases, we have to convert the String variable into a Byte array format, for example, JCE encryption. However, how do we convert a Byte[] array to a String afterward? Simple toString() function like the following code is not a working property. It will not display the original text but the byte value. String s = bytes.toString(); In order to convert the Byte array into String format correctly, we have to explicitly create a String object and assign the Byte array to it.
Download PHP Windows downloads of PHP are available here. If you are not sure of which version to get, check out this Stack Overflow page. I used the VC11 thread-safe PHP 5.5.0 download. Install PHP Once you’ve downloaded the installer, run it and install PHP in C:php (or wherever you like, but remember that the path should not contain spaces). Choose your webserver (or none if you don’t have a webserver installed) and select any additional components as needed, including PEAR.
Project file (.pro) Add the following line to your .pro file QT += sql Header #include <QtSql/QSqlDatabase> #include <QtSql/QSqlError> class DatabaseManager { public: DatabaseManager(); ~DatabaseManager(); public: bool openDB(); bool deleteDB(); QSqlError lastError(); private: QSqlDatabase db; }; Source bool DatabaseManager::openDB() { // Find QSLite driver db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("database_name_here"); // Open databasee return db.open(); } QSqlError DatabaseManager::lastError() { // If opening database has failed user can ask // error description by QSqlError::text() return db.lastError(); } bool DatabaseManager::deleteDB() { // Close database db.close(); return QFile::remove("database_name_here"); } Execute a query QSqlQuery query; // Create a new table query.exec("CREATE TABLE filelist(fullpath VARCHAR PRIMARY KEY, timestamp VARCHAR)"); // Prepare file Information to insert QFileInfo currentFile = ...; QString filepath = currentFile.absoluteFilePath(); QString timestamp = currentFile.lastModified().date().toString("yyyy-MM"); // Insert a record to the database query.exec("INSERT INTO filelist VALUES('" + filepath + "', '" + timestamp + "')"); // You can also insert a record as following query.prepare("INSERT INTO filelist VALUES(?, ?)"); query.addBindValue(filepath); query.addBindValue(timestamp); query.exec(); query.exec("DROP TABLE filelist");
Excel stores a date internally as a number of days since January 1, 1900. For example: “June 9th, 2011 10:30 AM” would be stored as “40703.4375”. 40703 is the number of full days since 01/01/1900 and 0.4375 represents the time (10.5/24 = 0.4375). When you process dates read from an Excel spreadsheet (e.g. using PHPExcel) you often want to convert them into a UNIX timestamp i.e. a number of seconds elapsed since midnight of January 1, 1970 UTC.
Welcome to the first windows tutorial. In this tutorial, I’ll give you the basic information on how to code in windows and we’ll go over a few important details first. The basic windows program has two important functions inside. The first one is the event handler(I’ll talk about this one later on) and the second one is the main function(WinMain from now on). WinMain is similar to DOS’ main function, in fact, WinMain is called from the DOS main function but in windows, we don’t have access to the DOS main; everything is covered up by windows. Windows introduces us to messages. A message could be easily described as a pile of data that gets sent to the event handler which then tells the window what to do. A message’s name is prefixed with WM(stands for Windows Message as you might have guessed?). There are a whole lot of messages that a window can handle, however, we’ll only need a few of them. You can use these messages in many ways. For example, the message WM_CREATE, can be used for initialization purposes, it gets sent to the window when it’s created, and WM_PAINT is used when you want to draw something on the screen, and so on, you get the image. Most of the messages get sent to the window automatically, as example when you move your mouse around you send a message to windows, and any other things such as that send messages to windows. You can also send a message to your window yourself, but you’ll probably never need to.
To access CodeIgniter’s native resources within your library use the get_instance() function. This function returns the CodeIgniter super object. Normally from within your controller functions, you will call any of the available CodeIgniter functions using the $this construct: $this->load->helper('url'); $this->load->library('session'); $this, however, only works directly within your controllers, your models, or your views. If you would like to use CodeIgniter’s classes from within your own custom classes you can do so as follows:
The passage is telling you how to rename the file name automatically by WordPress (without using any plugins). Warning: To apply this hack, you’ll have to edit one of WordPress’s core files. Keep in mind that it is never recommended. This hack should be redone if you upgrade WordPress. open the wp-admin/includes/files.php file, and go to line 324 (approximately here). You’ll see the following: $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); Change it as follows: