Over the top professionals at your service!
30
Apr

In cocos2d x for windows ccmenu is almost same as that in normal cocos2d.

Here is a sample code. We can add two items in the menu:menuItem1 and menuItem2.

CCMenuItemSprite menuItem1 = CCMenuItemSprite.itemFromNormalSprite(in1, in2, this, new SEL_MenuHandler(informationAction));

CCMenuItemSprite menuItem2 = CCMenuItemSprite.itemFromNormalSprite(in3, in4, this, new SEL_MenuHandler(buttonAction));

In the above code, in1 and in3 are normal sprites and in2 and in4 are selected sprite.Next parameter this is the target. and buttonAction and the informationAction are touch functions.

CCMenu menu1 = CCMenu.menuWithItems(menuItem1, menuItem2);

Now we create the ccmenu menu1 with the above menuItems.

 

 

 

30
Apr

A CheckBox is used for checking or unchecking an option. A CheckBox can be dragged into the XIB window from the object library.

Sending actions from a CheckBox:

Connect the ‘send action’ property from the property list of the CheckBox to an IBAction.

-(IBAction)perform-action:(id)sender{

NSButton *nb = (id)sender;

NSString *titlename =[nb title];//titlename of the checkbox

NSString *boxvalue = [nb stringValue];//boxvalue will be "1" if box is unmarked and will be "0" if box is marked.

}

30
Apr

Data binding is a DHTML feature that lets you easily bind individual elements in your document to data from another source, such as a database or comma-delimited text file. When the document is loaded, the data is automatically retrieved from the source and formatted and displayed within the element.

One practical way to use data binding is to automatically and dynamically generate tables in your document. You can do this by binding a table element to a data source. When the document is viewed, a new row is created in the table for each record retrieved from the source, and the cells of each row are filled with text and data from the fields of the record. Because this generation is dynamic, the user can view the page while new rows are created in the table. Additionally, once all the table data is present, you can manipulate (sort or filter) the data without requiring the server to send additional data. The table is simply regenerated, using the previously retrieved data to fill the new rows and cells of the table.

To provide data binding in your documents, you must add a data source object (DSO) to your document. This invisible object is simply an ActiveX control or Java applet that knows how to communicate with the data source.

30
Apr

Import the following:system,microsoft.phone.task.

WebBrowserTask web=new WebBrowserTask();

Web.Uri=new Uri("http:.....",UriKind Absolute);

Web.show();

30
Apr

Code:

SMS Compose Task  x=new  SMS Compose Task();

x.To="recipient number"

x.Body="text"

x.Show();

30
Apr

A ComboBox allows you to either enter text  or click the attached arrow at the right of the combo box and select from a displayed list of items. It can be dragged into the xib window from the object library.

setting the string of a combobox using code:

[combo_box setStringValue:@"default"];

sending actions from the comboBox:

Take property list. Then connect the property ‘send action’ to an IBAction to accept events from the comboBox.

-(IBAction)select_board_nd_laserspeed:(id)sender

{

NSComboBox *cb = (id)sender;

NSString *currentstring;

currentstring =    [cb stringValue] ;

}

30
Apr

HTML5 removes the need for JavaScript solutions. If a particular input should be “selected,” or focused, by default, we can now utilize the autofocus attribute.

<input type="text" name="someInput" placeholder="Douglas Quaid" required autofocus>  

30
Apr

The researchers at the NanoRobotics Laboratory   in Canada, are putting swarms of bacteria to work, using them to perform micro-manipulations and even propel microrobots.

The researchers want to use flagellated bacteria to carry drugs into tumors, act as sensing agents for detecting pathogens, and operate micro-factories that could perform pharmacological and genetic tests.They also want to use the bacteria as micro-workers for building things. Things like a tiny step pyramid.

The bacteria, of a type known as magnetotactic, contain structures called magnetosomes, which function as a compass. In the presence of a magnetic field, the magnetosomes induce a torque on the bacteria, making them swim according to the direction of the field. Place a magnetic field pointing right and the bacteria will move right. Switch the field to point left and the bacteria will follow suit.

30
Apr
	<!DOCTYPE html>
	  <html lang="en">
	<head>
	    <meta charset="utf-8">
	    <title>untitled</title>
	</head>
	<body>
	    <h2> To-Do List </h2>
	     <ul contenteditable="true">
	        <li> Break mechanical cab driver. </li>
	        <li> Drive to abandoned factory
	        <li> Watch video of self </li>
	     </ul>
	</body>
	</html>

30
Apr

The new version of Mac OS ie Lion OS has reversed the scroll direction. It is useful only if we are using a touchpad. Scrolling with mouse in a different manner than we are used to is difficult. It is easy to restore the scroll direction to that of the scrollbar.

Open system preferences> select mouse> Uncheck ‘Move content in the direction of finger movement.

, , ,