Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Create namespace in JavaScript

A namespace (sometimes also called a name scope) is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An identifier defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace. Languages that support namespaces specify the rules that determine to which namespace an identifier (not its def...

5,593 0       JAVASCRIPT EXAMPLE NAMESPACE


  Make a directory using C++ for windows

If you want to create a folder at windows using c++/cpp language, there is an easy way for make a folder. You can do it just including the <windows.h> header file. To make a folder at C:\ drive named "deadman"#include<windows.h>int main(){   CreateDirectory ("C:\\deadman", NULL);   return 0;}If you want to delete a fodler from the C:\ directory.#include<windows.h>int main(){   RemoveDirectory("C:\\deadman");   return 0;}Also you can use the system command from c++ to create or delete a fodler. for examplesystem("mkdi...

16,831 1       WINDOWS C++ EXAMPLE DIRECTORY CREATEDIRECTORY


  Finding selected checkbox items in a JSF dataTable

This is one of those problems that I couldn’t find a complete example for when I needed it, so hopefully this will save somebody else the extra time it took me to piece it together.We frequently need to have data tables in our UI, and allow the user to select a subset of those items for action. In JavaServer Faces, this means having a DataTable, each row having its own checkbox. But when the action is triggered, how to we find which items the user has selected.The first step is to add a boolean property to your objects that can represent the selection. If you have a lot objects in your ...

14,666 1       EXAMPLE JAVASERVER FACES JSF DATATABLE CHECKBOX


  â€œBuild something people want” is not enough

Most people take “Build something people want” to mean “Pick a problem to solve and solve it well.” This is not sufficient to build a world changing company.“Why now?” is the question entrepreneurs really need to answer. “Why now” encompasses two important and closely related concepts:Why have previous attempts at this idea failed?What enabling factors have emerged that enable you to succeed today?The world is full of smart people who have the same ideaThere are a lot of smart people out there. At least five of them have already tried to solve th...

1,866 0       EXAMPLE USER REQUIREMENT USER FRIENDLY PEOPLE NEEDS


  Learn Emacs: Keyboard Macros

An emacs keyboard macro is just a recording of user input into emacs, which means that most anything you can do in emacs can be recorded as a macro. Read that again. Pretty powerful.Here’s how it works. To start recording, typeC-x (and input the commands in your macro. Then typeC-x )to stop recording. Then typeC-x eto apply the macro once, orC-u 0 C-x eto apply the macro until the bell rings or end of buffer is reachedKeep in mind that you must not ring the bell when defining a keyboard macro (by accident, or with C-g). If you do, you’ll have to start all over defining your keybo...

3,779 0       CODE EXAMPLE MACRO EMAC


  mysql – connection example

Mysql is a database, and to gain access to the data within C++ you will need to be able to “talk” to the database via queries (just like on the mysql command line interface e.g. select * from tablename), the connection process is very similar to the command line interface you will need to supply connection details as in hostname (localhost normally), username, password, database to use and also there are other details that you can pass e.g port number more information can be gained from the MYSQL API pagesTo start with I created a struct that will hold the username, host etc detail...

4,753 0       MYSQL C++ CONNECTION DATABASE EXAMPLE


  The 10 Greatest Hacks of My Life

My co-founder and I briefly considered applying to YCombinator for the Winter 2012 session. We eventually decided to bootstrap Curvio initially, and raise a seed round on our own after we launch (so far so good!). But looking over the YC application, one question intrigued me:Please tell us about the time you, tansey, most successfully hacked some (non-computer) system to your advantage.Now, there are a lot of ways to interpret this. A mechanical interpretation would be about how you used some physical object in an extraordinary way to solve a challenge. Shifting to a more ...

3,375 0       EXAMPLE HACK MOST IMPORTANT CURVIO


  A Tiny MySQL++ Tutorial; C++ and MySQL; MySQL++ Example

I wrote a post about how to install MySQL++ and I thought I will write a quick tutorial on how to use it too.This is a very basic MySQL++ program and it’s very self explanatory:#include <mysql++.h>#include <stdlib.h> using namespace std;using namespace mysqlpp; int main() { try { Connection conn(false); conn.connect("DB NAME", "DB HOST probably localhost", "DB USER", "DB PASS"); Query query = conn.query(); } catch (BadQuery er) { // handle any connection or // query errors that may come up cerr << "Error: " << er...

17,952 4       EXAMPLE C++ MYSQL++ INSERT API