Saturday, January 31, 2015

Simple AS3 Collision Detection Using the AS3 hitTestObject Method

In this tutorial, were going to learn how to create basic AS3 collision detection using the AS3 hitTestObject() method of the MovieClip class. Collision detection refers to the process of checking whether 2 or more objects are hitting each other - if parts or the whole of each object are occupying the same space on the stage (i.e. if they are overlapping). For this exercise, well put two square shaped MovieClip instances on the stage and make one of them draggable. When the user drags and then drops that instance, Flash will check whether the user moved it to a new location where it is now hitting the other instance.

Lets begin.

  1. Create a new Flash ActionScript 3 document.
  2. Draw a square shape on the stage and convert it into a Movie Clip symbol.
  3. Put a total of 2 instances of this Movie Clip symbol on the stage.
  4. In the Properties Inspector, give one of them an instance name of square1_mc, and give the other one an instance name of square2_mc.
  5. Create a new layer for the ActionScript.
  6. Bring up the Actions panel and add the following code:
square1_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);
stage.addEventListener(MouseEvent.MOUSE_UP, drop);

function drag(e:MouseEvent):void
{
e.target.startDrag();
}

function drop(e:MouseEvent):void
{
stopDrag();
if (square1_mc.hitTestObject(square2_mc))
{
trace("Collision detected!");
}
else
{
trace("No collision.");
}
}
When you test the movie, you should be able to drag and drop the square1_mc MovieClip instance. And when you drop it, Flash will check whether its hitting the other MovieClip instance or not. If they are hitting, you will see a message in the Output window that says: Collision detected! If they are not hitting, the message you will see is: No collision.

Heres the same code for our simple AS3 collision detection using the AS3 hitTestObject() method, but with comments:
/*You can use the AS3 hitTestObject() method of the MovieClip class
to test whether 2 objects are hitting each other. Hitting refers
to whenever objects collide or overlap on the stage.

Example:
mc1.hitTestObject(mc2);

The example above tests whether mc1 and mc2 are overlapping.
This statement returns a boolean value - true if the objects
are hitting and false if they are not. You can use this method
in an if statement condition.

In this example, we should have 2 MovieClip instances on the stage -
square1_mc and square2_mc.
We are going to make the square1_mc MovieClip
draggable. And when the user drops it, Flash will
check whether square1_mc and square2_mc are hitting.*/

/*Add the MOUSE_DOWN event listener to the MovieClip
instance that we would like to make draggable.*/
square1_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);

/*Add the MOUSE_UP event listener to the stage.*/
stage.addEventListener(MouseEvent.MOUSE_UP, drop);

/*This event listener function will make the first
MovieClip instance draggable.*/
function drag(e:MouseEvent):void
{
e.target.startDrag();
}

/*This event listener function disables the dragging.
It also checks whether the MovieClip instance being dragged
overlaps with the other MovieClip instance after
it was dropped.*/
function drop(e:MouseEvent):void
{
/*Drops the MovieClip thats currently being dragged.*/
stopDrag();

/*This if statement uses the AS3 hitTestObject() method to check
whether the first MovieClip instance is hitting the
second one.*/
if (square1_mc.hitTestObject(square2_mc))
{
/*Flash outputs this message if they are
hitting each other.*/
trace("Collision detected!");
}
else
{
/*Flash outputs this message if they are
NOT hitting each other.*/
trace("No collision.");
}
}
And that concludes this tutorial on creating simple AS3 collision detection using the AS3 hitTestObject() method.
Read more »

Friday, January 30, 2015

Why use PowerPoint 2010 to insert videos

If youve ever inserted videos in your PowerPoint, you must have felt the pain when your friends or audience reported that video didnt play in the slide show you shared on email. Those who are well versed with PowerPoint know that video files are always linked. This means that PowerPoint always play the video file from the path it was lying when it was inserted. Smart PowerPoint users have been following the practice of keeping the PowerPoint file and videos in a common folder, zip it and share the zip file on email. This way the video inserted always refer to the path of the folder.

Lately, PowerPoint users have started using online PowerPoint sharing websites to share their presentations. Tools like authorSTREAM Desktop, which automatically ship video/audio along with PowerPoint file to their servers make sure that the online version of PowerPoint (Flash output) plays the video and audio. However, original PPT if downloaded, still fails to play the video inserted.

PowerPoint users have always longed for video embedding feature, similar to audio embedding. Finally, Microsoft has fixed the video insertion issue in PowerPoint 2010. With PowerPoint 2010, you need not to worry about the video file path or annoying "Cannot find the specified file.." errors at audience end.

Embed video files in PowerPoint 2010

In PowerPoint 2010, videos inserted from hard-disk are embedded directly into the presentation unless you deliberately choose to link. You just need to insert videos and forget about the rest. PowerPoint 2010 has also got some nifty features of optimizing and editing videos inserted.

Compatibility and Optimization of the file size

As the video files are contained in PowerPoint itself so PowerPoint size can be a major issue when it comes to sharing on the web. Also the non availability of video codec at audience end can be an issue. Optimize Media Compatibility feature of PowerPoint 2010 and Compress Media button takes care of codec and file size issues. Click optimize media compatibility on the backstage to get rid of codec issues. The compress media button available on backstage compresses the media file(s) thus reducing the total size of the PowerPoint file.

Video editing in PowerPoint 2010

PowerPoint 2010 provides many ways and means to edit the video. You can recolor videos, change brightness and contrast, set the bookmarks, change the shape and design of the video inserted. You can also trim unwanted portions of a video which you dont want to show up in the slide show.


Simply insert a video, and select the “Trim Video” option on the Playback tab. Set the “Start Time” and “End Time” either from the time-line or enter the values in respective text boxes. Trimming helps you crop unwanted stuff from the video.

Trim video


So now no more zip folders, no more video file missing errors. No matter how you insert, whats the file size, what video codec you used, with PowerPoint 2010, your videos are gonna play everywhere for sure.

PowerPoint 2010 also lets you insert Flash embeds of video sharing websites like YouTube, Vimeo. Such embeds just store the reference of path and player they are hosted on and require Internet connection to play during sideshow.
Read more »

Thursday, January 29, 2015

Creating a Flex AIR Screenshot app Part 11

In todays tutorial well add some options to set export directory in our application.

What were going to add is the "Export destination" option. It basically consists of a label and a HGroup with a text input and a button in it. The text input field cannot be edited by the user, and displays the directory, where the final files are going to be saved. By pressing the "browse" button, the user calls out a window, which lets him select a folder, and the text field updates (the value also saves locally).

Create theese elements, set the text inputs text value boudn to pref_destination and the buttons click event handler to screenshotDestination():

<s:Label styleName="descriptionText2">Export destination:</s:Label>
<s:HGroup width="310">
<s:TextInput editable="false" width="100%" toolTip="Destination" text="{pref_destination}" />
<s:Button label="Browse" click="screenshotDestination();" />
</s:HGroup>

Now well add an option to create a folder automatically in the destination and put all the exported images inside of it. Well add a checkbox that the user can toggle and choose whether he wants the folder to be created, or just store the exported images in the selected destination. Set the checkboxs id to folderCheckbox and selected property bound to pref_folder (use two-way binding). Create a text input field and, most importantly, set its enabled property bound to the selected property of folderCheckbox.

<s:CheckBox id="folderCheckbox" label="Create new folder with exported images" styleName="descriptionText2" selected="@{pref_folder}" />
<s:TextInput id="folderField" width="100%" toolTip="Folder name" maxChars="200" enabled="{folderCheckbox.selected}"/>

You may have already noticed that I set the styleName property of several elements to descriptionText2 in the code above. Set every elements styleName that is displayed in the screenshotsettings page and displays any text to descriptionText2:

<s:NavigatorContent id="screenshotsettings">
<s:VGroup width="100%" horizontalAlign="center" paddingTop="20">
<s:Label styleName="descriptionText2">Select screenshot screen sizes:</s:Label>
<s:SkinnableContainer backgroundColor="#999999" width="310" height="18" >
<s:CheckBox toolTip="Use this screen size" x="4" id="set1checkbox" />
<s:Label id="contSize" styleName="settingText" x="22" y="3" />
</s:SkinnableContainer>
<custom:ScreenSetting id="set2" />
<custom:ScreenSetting id="set3" />
<custom:ScreenSetting id="set4" />
<custom:ScreenSetting id="set5" />
<custom:ScreenSetting id="set6" />
<custom:ScreenSetting id="set7" />

<s:Label/>

<s:Label styleName="descriptionText2">Export as:</s:Label>
<s:HGroup>
<s:RadioButton id="screenRadioJPEG" label="JPEG" groupName="screenshotFormat" change="formatChange(JPEG);" styleName="descriptionText2" />
<s:RadioButton id="screenRadioPNG" label="PNG" groupName="screenshotFormat" change="formatChange(PNG);" styleName="descriptionText2" />
</s:HGroup>
<s:Label styleName="descriptionText2">Quality:</s:Label>
<s:HSlider id="screenQualitySlider" width="310" minimum="1" maximum="100" liveDragging="true" enabled="{pref_format==JPEG}" value="@{pref_quality}" />

<s:Label/>

<s:Label styleName="descriptionText2">Export destination:</s:Label>
<s:HGroup width="310">
<s:TextInput editable="false" width="100%" toolTip="Destination" text="{pref_destination}" />
<s:Button label="Browse" click="screenshotDestination();" />
</s:HGroup>
<s:CheckBox id="folderCheckbox" label="Create new folder with exported images" styleName="descriptionText2" selected="@{pref_folder}" />
<s:TextInput id="folderField" width="100%" toolTip="Folder name" maxChars="200" enabled="{folderCheckbox.selected}"/>
<s:HGroup>
<s:Button label="Back" click="screenshotBack();" />
<s:Button label="Export" click="startExportScreenshot();" />
</s:HGroup>
</s:VGroup>
</s:NavigatorContent>

The style is basically a white text, but smaller than descriptionText:

<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

.descriptionText{
fontSize: 24;
color: #fff;
}

.descriptionText2{
fontSize: 16;
color: #fff;
}

.settingText{
fontSize: 16;
color: #fff;
}

#headStep{
fontSize: 30;
fontWeight: bold;
color: #ffffbb;
}

#headDesc{
fontSize: 30;
color: #ffffff;
}
</fx:Style>

Since we added some space-taking content, increase the applications height value to 600:

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:custom="*"
xmlns:mx="library://ns.adobe.com/flex/mx" showStatusBar="false"
width="550" height="600" creationComplete="init();">

Now declare 2 variables - pref_folder and pref_destination:

[Bindable]
private var pref_folder:Boolean;
[Bindable]
private var pref_destination:String;

Edit init() function to set the default values for these variables. The folders default value is true, the destination is File.documentsDirectory.nativePath. Apply these values to pref_folder and pref_destination after that:

private function init():void {
//preferences.data.firsttime = null;

// Set preferences if loaded for the first time
if (preferences.data.firsttime == null) {
preferences.data.firsttime = true;
preferences.data.screensizes = [
{ checked:true },
{ checked:true, w:1280, h:1024 },
{ checked:true, w:1280, h:800 },
{ checked:true, w:1024, h:768 },
{ checked:false, w:"", h:"" },
{ checked:false, w:"", h:"" },
{ checked:false, w:"", h:"" } ];
preferences.data.format = "JPEG";
preferences.data.quality = 100;
preferences.data.folder = true;
preferences.data.destination = File.documentsDirectory.nativePath;
preferences.flush();
}

// Set preferences loaded from local storage
pref_screensizes = preferences.data.screensizes;
pref_format = preferences.data.format;
pref_quality = preferences.data.quality;
pref_folder = preferences.data.folder;
pref_destination = preferences.data.destination;

addEventListener(FlexNativeWindowBoundsEvent.WINDOW_RESIZE, onResize);
}

Once again, were adding more preferences, so remember to set firsttime to null for the first time running this code.

Lets add that screenshotDestination function. The user browses for a directory and pref_destination is set to the selected directorys nativePath:

private function screenshotDestination():void {
var newDestination:File = new File(pref_destination);
newDestination.browseForDirectory("Select directory");
newDestination.addEventListener(Event.SELECT, destinationSelect);

function destinationSelect(evt:Event):void {
pref_destination = newDestination.nativePath;
}
}

Add 2 lines to update preferences with the new folder and destination values and save them in saveScreenshotSettings():

private function saveScreenshotSettings():void {
pref_screensizes[0].checked = set1checkbox.selected;

for (var i:int = 0; i < screenSettings.length; i++) {
pref_screensizes[i + 1].checked = screenSettings[i].checked;
pref_screensizes[i + 1].w = screenSettings[i].w;
pref_screensizes[i + 1].h = screenSettings[i].h;
}

if (screenRadioJPEG.selected == true) {
pref_format == "JPEG";
} else {
pref_format == "PNG";
}

preferences.data.screensizes = pref_screensizes;
preferences.data.format = pref_format;
preferences.data.quality = pref_quality;
preferences.data.folder = pref_folder;
preferences.data.destination = pref_destination;
preferences.flush();
}

Thats all for today.

Full code:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:custom="*"
xmlns:mx="library://ns.adobe.com/flex/mx" showStatusBar="false"
width="550" height="600" creationComplete="init();">


<fx:Declarations>
<mx:ArrayCollection id="headerTitles">
<fx:Object step="Step one:" description="load a web page." />
<fx:Object step="Loading..." description="please wait." />
<fx:Object step="Step two:" description="set your export preferences." />
<fx:Object step="Step two:" description="select the area you wish to crop." />
<fx:Object step="Step three:" description="set your export preferences for the cropped image." />
<fx:Object step="Final step:" description="please wait while your images are being expored." />
</mx:ArrayCollection>
</fx:Declarations>

<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

.descriptionText{
fontSize: 24;
color: #fff;
}

.descriptionText2{
fontSize: 16;
color: #fff;
}

.settingText{
fontSize: 16;
color: #fff;
}

#headStep{
fontSize: 30;
fontWeight: bold;
color: #ffffbb;
}

#headDesc{
fontSize: 30;
color: #ffffff;
}
</fx:Style>

<fx:Script>
<![CDATA[
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.filesystem.File;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import mx.controls.HTML;
import mx.core.FlexHTMLLoader;
import mx.events.FlexNativeWindowBoundsEvent;
import mx.controls.Alert;
import mx.graphics.codec.JPEGEncoder;
import mx.graphics.codec.PNGEncoder;
import mx.graphics.ImageSnapshot;
import spark.primitives.BitmapImage;

[Bindable]
private var urlString:String;
[Bindable]
private var canSelect:Boolean = true;
private var tempHTML:HTML = new HTML();

private var preferences:SharedObject = SharedObject.getLocal("kirshotPreferences");
[Bindable]
private var pref_screensizes:Array;
[Bindable]
private var pref_format:String;
[Bindable]
private var pref_quality:int;
[Bindable]
private var pref_folder:Boolean;
[Bindable]
private var pref_destination:String;

private var screenSettings:Array;

private function init():void {
//preferences.data.firsttime = null;

// Set preferences if loaded for the first time
if (preferences.data.firsttime == null) {
preferences.data.firsttime = true;
preferences.data.screensizes = [
{ checked:true },
{ checked:true, w:1280, h:1024 },
{ checked:true, w:1280, h:800 },
{ checked:true, w:1024, h:768 },
{ checked:false, w:"", h:"" },
{ checked:false, w:"", h:"" },
{ checked:false, w:"", h:"" } ];
preferences.data.format = "JPEG";
preferences.data.quality = 100;
preferences.data.folder = true;
preferences.data.destination = File.documentsDirectory.nativePath;
preferences.flush();
}

// Set preferences loaded from local storage
pref_screensizes = preferences.data.screensizes;
pref_format = preferences.data.format;
pref_quality = preferences.data.quality;
pref_folder = preferences.data.folder;
pref_destination = preferences.data.destination;

addEventListener(FlexNativeWindowBoundsEvent.WINDOW_RESIZE, onResize);
}

private function doBrowse():void{
var file:File = new File();
file.addEventListener(Event.SELECT, browseSelect);
file.browseForOpen("Load a webpage");

function browseSelect(evt:Event):void {
urlInput.text = file.nativePath;
}
}

private function goCrop():void {
stack.selectedChild = crop;
urlString = urlInput.text;
}

private function goScreenshot():void {
stack.selectedChild = screenshotloading;
urlString = urlInput.text;

addElement(tempHTML);
tempHTML.visible = false;
tempHTML.addEventListener(Event.COMPLETE, onTempLoad);
tempHTML.htmlLoader.load(new URLRequest(urlString));
}

private function onTempLoad(evt:Event):void {
stack.selectedChild = screenshotsettings;
}

private function cancelLoading():void {
tempHTML.removeEventListener(Event.COMPLETE, onTempLoad);
tempHTML.cancelLoad();
screenshotBack();
}

private function screenshotBack():void {
saveScreenshotSettings()
stack.selectedChild = loadpage;
removeElement(tempHTML);
}

private function changeState():void {
if (stack.selectedChild == loadpage) {
contentBox.setStyle("horizontalAlign", "center");
urlInput.text = urlString;
}
if (stack.selectedChild == crop) {
maximize();
canSelect = true;
contentBox.setStyle("horizontalAlign", "left");
cropHTML.htmlLoader.load(new URLRequest(urlString));
cropHTML.width = contentBox.width;
cropHTML.height = contentBox.height - 24;
cropStatus.text = "Loading";
cropStatus.setStyle("color", "#ffff00");
cropHTML.addEventListener(Event.COMPLETE, onCropLoad);
}
if (stack.selectedChild == screenshotsettings) {
screenSettings = [set2, set3, set4, set5, set6, set7];
contSize.text = "Full size (" + tempHTML.contentWidth + "x" + tempHTML.contentHeight + ")";
loadScreenshotSettings();
}
}

private function loadScreenshotSettings():void {
set1checkbox.selected = pref_screensizes[0].checked;

for (var i:int = 0; i < screenSettings.length; i++) {
screenSettings[i].checked = pref_screensizes[i + 1].checked;
screenSettings[i].w = pref_screensizes[i + 1].w;
screenSettings[i].h = pref_screensizes[i + 1].h;
}

if (pref_format == "JPEG") {
screenRadioJPEG.selected = true;
} else {
screenRadioPNG.selected = true;
}
}

private function saveScreenshotSettings():void {
pref_screensizes[0].checked = set1checkbox.selected;

for (var i:int = 0; i < screenSettings.length; i++) {
pref_screensizes[i + 1].checked = screenSettings[i].checked;
pref_screensizes[i + 1].w = screenSettings[i].w;
pref_screensizes[i + 1].h = screenSettings[i].h;
}

if (screenRadioJPEG.selected == true) {
pref_format == "JPEG";
} else {
pref_format == "PNG";
}

preferences.data.screensizes = pref_screensizes;
preferences.data.format = pref_format;
preferences.data.quality = pref_quality;
preferences.data.folder = pref_folder;
preferences.data.destination = pref_destination;
preferences.flush();
}

private function formatChange(newformat:String):void {
pref_format = newformat;
}

private function startExportScreenshot():void {
var canExport:Boolean = true;

for (var i:int = 0; i < screenSettings.length; i++) {
if (screenSettings[i].checked && ((screenSettings[i].w == "" || screenSettings[i].w == 0) || (screenSettings[i].h == "" || screenSettings[i].h == 0))) {
canExport = false;
}
}

if (canExport) {
Alert.show("Successful export");
}else {
Alert.show("One or more selected screen sizes are not entered or are invalid!", "Oops...");
}
}

private function screenshotDestination():void {
var newDestination:File = new File(pref_destination);
newDestination.browseForDirectory("Select directory");
newDestination.addEventListener(Event.SELECT, destinationSelect);

function destinationSelect(evt:Event):void {
pref_destination = newDestination.nativePath;
}
}

private function onCropLoad(evt:Event):void {
cropStatus.text = "Loaded";
cropStatus.setStyle("color", "#ffffff");
}

private function onResize(evt:Event):void {
if (stack.selectedChild == crop) {
cropHTML.width = contentBox.width;
cropHTML.height = contentBox.height - 24;
}
}
]]>
</fx:Script>

<s:VGroup width="100%" height="100%" gap="0">
<mx:HBox backgroundColor="#333333" height="46" width="100%" paddingTop="10" paddingLeft="10">
<s:Label id="headStep" text="{headerTitles.getItemAt(stack.selectedIndex).step}" />
<s:Label id="headDesc" text="{headerTitles.getItemAt(stack.selectedIndex).description}" />
</mx:HBox>
<mx:Box backgroundColor="#666666" width="100%" height="100%" id="contentBox" horizontalAlign="center">
<mx:ViewStack id="stack" change="changeState();">
<s:NavigatorContent id="loadpage">
<s:VGroup width="100%" horizontalAlign="center" paddingTop="20">
<s:Label styleName="descriptionText">Enter the link to the page:</s:Label>
<s:HGroup>
<s:TextInput width="250" id="urlInput" text="http://" /><s:Button label="Browse local..." click="doBrowse();" />
</s:HGroup>
<s:HGroup>
<custom:ImageButton img="@Embed(../lib/b_screenshot.png)" over="@Embed(../lib/b_screenshot_over.png)" toolTip="Take screenshots" click="goScreenshot();" buttonMode="true" enabled="{urlInput.text!=}" />
<custom:ImageButton img="@Embed(../lib/b_cut.png)" over="@Embed(../lib/b_cut_over.png)" toolTip="Crop area" click="goCrop();" buttonMode="true" enabled="{urlInput.text!=}" />
</s:HGroup>
</s:VGroup>
</s:NavigatorContent>

<s:NavigatorContent id="screenshotloading">
<s:VGroup width="100%" horizontalAlign="center" paddingTop="20">
<s:Label styleName="descriptionText">The page is being loaded...</s:Label>
<s:Button label="Cancel" click="cancelLoading();" />
</s:VGroup>
</s:NavigatorContent>

<s:NavigatorContent id="screenshotsettings">
<s:VGroup width="100%" horizontalAlign="center" paddingTop="20">
<s:Label styleName="descriptionText2">Select screenshot screen sizes:</s:Label>
<s:SkinnableContainer backgroundColor="#999999" width="310" height="18" >
<s:CheckBox toolTip="Use this screen size" x="4" id="set1checkbox" />
<s:Label id="contSize" styleName="settingText" x="22" y="3" />
</s:SkinnableContainer>
<custom:ScreenSetting id="set2" />
<custom:ScreenSetting id="set3" />
<custom:ScreenSetting id="set4" />
<custom:ScreenSetting id="set5" />
<custom:ScreenSetting id="set6" />
<custom:ScreenSetting id="set7" />

<s:Label/>

<s:Label styleName="descriptionText2">Export as:</s:Label>
<s:HGroup>
<s:RadioButton id="screenRadioJPEG" label="JPEG" groupName="screenshotFormat" change="formatChange(JPEG);" styleName="descriptionText2" />
<s:RadioButton id="screenRadioPNG" label="PNG" groupName="screenshotFormat" change="formatChange(PNG);" styleName="descriptionText2" />
</s:HGroup>
<s:Label styleName="descriptionText2">Quality:</s:Label>
<s:HSlider id="screenQualitySlider" width="310" minimum="1" maximum="100" liveDragging="true" enabled="{pref_format==JPEG}" value="@{pref_quality}" />

<s:Label/>

<s:Label styleName="descriptionText2">Export destination:</s:Label>
<s:HGroup width="310">
<s:TextInput editable="false" width="100%" toolTip="Destination" text="{pref_destination}" />
<s:Button label="Browse" click="screenshotDestination();" />
</s:HGroup>
<s:CheckBox id="folderCheckbox" label="Create new folder with exported images" styleName="descriptionText2" selected="@{pref_folder}" />
<s:TextInput id="folderField" width="100%" toolTip="Folder name" maxChars="200" enabled="{folderCheckbox.selected}"/>
<s:HGroup>
<s:Button label="Back" click="screenshotBack();" />
<s:Button label="Export" click="startExportScreenshot();" />
</s:HGroup>
</s:VGroup>
</s:NavigatorContent>

<s:NavigatorContent id="crop">
<s:VGroup width="100%" height="100%" gap="0">
<mx:HBox backgroundColor="#999999" width="100%" height="24" verticalScrollPolicy="off" verticalAlign="middle" paddingLeft="2">
<s:Button label="Back" click="{cropHTML.htmlLoader.loadString(); stack.selectedChild = loadpage;}" />
<s:Button label="Export selection" enabled="false" />
<s:Label id="cropStatus" />
<s:Label text="{urlString}" />
</mx:HBox>
<mx:HTML id="cropHTML" horizontalScrollPolicy="on" verticalScrollPolicy="on" />
</s:VGroup>
</s:NavigatorContent>

<s:NavigatorContent id="cropsettings">

</s:NavigatorContent>

<s:NavigatorContent id="export">

</s:NavigatorContent>
</mx:ViewStack>
</mx:Box>
</s:VGroup>

</s:WindowedApplication>

Thanks for reading!
Read more »

Wednesday, January 28, 2015

How to remove your password pattern lock and gmail in i8150 Galaxy Wonder

Hi there,

It is another day another tutorial to you my followers :). This one is for Samsung Galaxy i8150. Well Samsung is one easiest phone to perform a hard reset. Every procedure has the same combination.

As ive always say always back up your data, if possible before doing a hard reset if you data is important. Because that my responsibility, I only tutorial. Ok. Without further ado. Check out the procedure below.

Just follow the instruction below.

1. Press and hold VOLUME UP + Home Button + Power Button.
2. As soon as the SAMSUNG logo appear unhold the POWER Button ONLY, keep holding VOLUME UP and HOME Button


3. An Android Logo Will Appear, press the MENU button and the lights will DIM. Just wait until Android System Recovery will appear


4. Select wipe data/factory reset, to navigate Press the VOLUME rocker, To Select Press the HOME Button.
5. Then finally reboot your phone.

NOTE: If the password or pattern lock is not removed after hard resetting try wiping the cache first in the android system recovery, then perform hard reset.

I hope you like this tutorial. A simple thank you in the comment box will suffice. Stay tuned for more tutorial and firmwares to be uploaded.
Read more »

Tuesday, January 27, 2015

KirSQLite Flex AIR Database Manager Part 9

In this tutorial we are going to add the ability to add new tables to a database, and to drop tables.

Find the VGroup that our Tree object is located in. Add a HGroup above the Tre with two buttons in it, labeled "New table" and "Drop table". Set their click event handlers to newTable() and dropTable(). Set their enabled properties to {table.selectedItems.length>0} and {isTableSelected}.

Set the id of our table to tableTree.

<s:VGroup width="200" height="100%" gap="0">
<s:HGroup>
<s:Button label="New table" click="newTable();" enabled="{tableTree.selectedItems.length>0}"/>
<s:Button label="Drop table" click="dropTable();" enabled="{isTableSelected}" />
</s:HGroup>
<mx:Tree id="tableTree" width="100%" height="100%" dataProvider="{dbData}" showRoot="false" labelField="@label" itemClick="tableSelect(event);"/>
</s:VGroup>

Well need to declare two variables - selectedDatabase and isTableSelected.

private var selectedDatabase:String = "";
[Bindable]
private var isTableSelected:Boolean = false;

The selectedDatabase variable must contain the name of the current database ("main", or "db"+index).

Go to tableSelect() function. Add another if statement that executes code if the selected item in the tree is a branch. Inside of the statement, set isTableSelected to false, and add code that sets selectedDatabase to the proper value, based on the "numid" attribute of the selected database.

In the second if statement, set isTableSelected to false and selectedDatabase to "databaseName" attribute of the selected tree item.

private function tableSelect(evt:Event):void {
if (evt.currentTarget.selectedItem.@isBranch) {
isTableSelected = false;
var dataname:String;
if (evt.currentTarget.selectedItem.@numid == 1) dataname = "main";
if (evt.currentTarget.selectedItem.@numid > 1) dataname = "db" + evt.currentTarget.selectedItem.@numid;
selectedDatabase = dataname;
}
if (evt.currentTarget.selectedItem.@isBranch == false) {
isTableSelected = true;
selectedDatabase = evt.currentTarget.selectedItem.@databaseName;
tableData = new ArrayCollection([]);
var newColumns:Array = [checkboxColumn];
connection.loadSchema(SQLTableSchema, evt.currentTarget.selectedItem.@label, evt.currentTarget.selectedItem.@databaseName);
var schema:SQLSchemaResult = connection.getSchemaResult();
for (var i:int = 0; i < schema.tables[0].columns.length; i++) {
var aColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn(schema.tables[0].columns[i].name);
newColumns.push(aColumn);
}
tableGrid.columns = newColumns;
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "SELECT * FROM " + evt.currentTarget.selectedItem.@databaseName + "." + evt.currentTarget.selectedItem.@label;
stat.execute(-1, new Responder(tableSuccess, tableError));
}
function tableSuccess(evt:SQLResult):void {
if (evt.data != null) {
for (var item:Object in evt.data) {
var obj:Object = new Object();
for (var value:Object in evt.data[item]) {
obj[value] = evt.data[item][value];
}
tableData.addItem(obj);
}
}
}
function tableError(evt:SQLError):void {
Alert.show("Unable to read table data.", "Error");
}
}

Go to loadDataSchema() and set isTableSelected to false:

private function loadDataSchema(name:String):void {
if (name != "") {
connection.loadSchema(null, null, name, true, new Responder(schemaSuccess, schemaError));
function schemaSuccess(evt:SQLSchemaResult):void {
// Schema found! Now parsing:
var result:SQLSchemaResult = evt;
// Adding tables:
var nid:Number = (name=="main")?(1):(Number(name.replace("db", "")));
var dataNode:XMLList = dbData.db.(@numid == nid);
dataNode.setChildren(<placeholder/>);
delete dataNode.placeholder;
for (var i:int = 0; i < result.tables.length; i++) {
var newTable:XML = new XML(<tb/>);
newTable.@label = result.tables[i].name;
newTable.@isBranch = false;
newTable.@databaseName = name;
dataNode.appendChild(newTable);
}
}
function schemaError(evt:SQLError):void {
// Alert.show("Database is empty");
}
isTableSelected = false;
}
}

Now that the values of these two variables are set properly, we can use them to create and drop tables.

First create the newTable() function. Here, we will call out a pop up window called newTableWindow, where the user will be able to enter the name for the new table:

private function newTable():void {
PopUpManager.addPopUp(newTableWindow, this);
PopUpManager.centerPopUp(newTableWindow);
newTableWindow.title = "Create new table";
}

The newTableWindow object is a TitleWindow that is declared in the Declarations tags. Set its close event listener to closeNewTableWindow(), set showCloseButton to true, and inside of the TitleWindow add a TextInput with an id "newTableName" and button with a click event handler "createNewTable()":

<mx:TitleWindow id="newTableWindow" title="Create new table" close="closeNewTableWindow();" showCloseButton="true">
<s:VGroup>
<s:HGroup width="100%" verticalAlign="middle">
<s:Label>Table name: </s:Label>
<s:TextInput id="newTableName" />
</s:HGroup>
<s:Button click="createNewTable();" label="Create" width="100%" />
</s:VGroup>
</mx:TitleWindow>

The closeNewTableWindow() closes the window:

private function closeNewTableWindow():void{
PopUpManager.removePopUp(newTableWindow);
}

The createNewTable() function creates a new SQLStatement object with a query built using our existing data. It is important that we set both success and error event handlers using a responder for this query, and display the error details to the user if an error occured. If everything went smoothly, close the window and call loadDataSchema():

private function createNewTable():void {
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "CREATE TABLE IF NOT EXISTS " + selectedDatabase + "." + newTableName.text + "(id INTEGER PRIMARY KEY AUTOINCREMENT, blankColumn TEXT)";
stat.execute( -1, new Responder(newTableSuccess, newTableError));
function newTableSuccess(evt:SQLResult):void {
closeNewTableWindow();
loadDataSchema(selectedDatabase);
}
function newTableError(evt:SQLError):void {
Alert.show("ERROR:" + evt.details, "Error");
}
}

The Drop Table feature is more simple. First we throw out an Alert, asking the user if he is sure that he wants to remove the table. If the answer is YES, we create a new SQLStatement that drops the table. Once again, if there was an error - tell the user the details of the error. Otherwise, call loadDataSchema():

private function dropTable():void {
Alert.show("Are you sure you want to completely delete this table?", "Drop table?", Alert.YES | Alert.NO, null, dropConfirm);
function dropConfirm(evt:CloseEvent):void {
if (evt.detail == Alert.YES) {
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "DROP TABLE " + selectedDatabase + "." + tableTree.selectedItem.@label;
stat.execute( -1, new Responder(dropTableSuccess, dropTableError));
}
}
function dropTableSuccess(evt:SQLResult):void {
loadDataSchema(selectedDatabase);
}
function dropTableError(evt:SQLError):void {
Alert.show("ERROR:" + evt.details, "Error");
}
}

Full code:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" showStatusBar="false">

<s:menu>
<mx:FlexNativeMenu dataProvider="{windowMenu}" showRoot="false" labelField="@label" keyEquivalentField="@key" itemClick="menuSelect(event);" />
</s:menu>

<fx:Declarations>
<fx:XML id="windowMenu">
<root>
<menuitem label="Database">
<menuitem id="newdb" label="New" key="n" controlKey="true" />
<menuitem id="opendb" label="Open" key="o" controlKey="true" />
<menuitem label="Save" key="s" controlKey="true" />
<menuitem label="Save As.." key="s" controlKey="true" shiftKey="true" />
</menuitem>
<menuitem label="Table">
<menuitem label="Add" key="t" controlKey="true" />
<menuitem label="Edit" key="e" controlKey="true" />
<menuitem label="Delete"/>
</menuitem>
</root>
</fx:XML>
<fx:XMLList id="dbData">
</fx:XMLList>
<mx:ArrayCollection id="tableData">
</mx:ArrayCollection>
<mx:AdvancedDataGridColumn id="checkboxColumn" headerText=" " width="30" sortable="false" draggable="false" resizable="false" editable="false">
<mx:itemRenderer>
<fx:Component>
<mx:Box width="30" horizontalAlign="center">
<mx:CheckBox selected="@{data.sel}" />
</mx:Box>
</fx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
<mx:TitleWindow id="newTableWindow" title="Create new table" close="closeNewTableWindow();" showCloseButton="true">
<s:VGroup>
<s:HGroup width="100%" verticalAlign="middle">
<s:Label>Table name: </s:Label>
<s:TextInput id="newTableName" />
</s:HGroup>
<s:Button click="createNewTable();" label="Create" width="100%" />
</s:VGroup>
</mx:TitleWindow>
</fx:Declarations>

<fx:Script>
<![CDATA[
import flash.data.SQLConnection;
import flash.data.SQLResult;
import flash.data.SQLSchema;
import flash.data.SQLSchemaResult;
import flash.data.SQLStatement;
import flash.errors.SQLError;
import flash.events.Event;
import flash.events.SQLEvent;
import flash.filesystem.File;
import flash.net.FileFilter;
import flash.net.Responder;
import mx.collections.ArrayCollection;
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
import mx.controls.Alert;
import mx.events.CloseEvent;
import mx.events.FlexNativeMenuEvent;
import mx.managers.PopUpManager;

private var connection:SQLConnection = new SQLConnection();
private var selectedDatabase:String = "";
[Bindable]
private var isTableSelected:Boolean = false;

private function selectAllChange(evt:Event):void {
var i:int;
if (evt.currentTarget.selected) {
for (i = 0; i < tableData.length; i++) {
tableData[i].sel = true;
}
} else
if (!evt.currentTarget.selected) {
for (i = 0; i < tableData.length; i++) {
tableData[i].sel = false;
}
}
tableGrid.invalidateDisplayList();
tableGrid.invalidateList();
}

private function menuSelect(evt:FlexNativeMenuEvent):void {
(evt.item.@id == "newdb")?(newDatabase()):(void);
(evt.item.@id == "opendb")?(openDatabase()):(void);
}

private function newDatabase():void {
var file:File = File.desktopDirectory.resolvePath("Untitled");
file.addEventListener(Event.SELECT, newSelect);
file.browseForSave("Choose where to save the database");
var newDB:XML;
var statement:SQLStatement = new SQLStatement();
function newSelect(evt:Event):void {
if (file.exists) {
Alert.show("File already exists, cannot overwrite.", "Nope");
return;
}
file.nativePath += ".db";
var n:String = parseDatabase(file);
loadDataSchema(n);
}
}

private function openDatabase():void {
var file:File = new File();
file.browseForOpen("Open database", [new FileFilter("Databases", "*.db"), new FileFilter("All files", "*")]);
file.addEventListener(Event.SELECT, openSelect);

function openSelect(evt:Event):void {
var n:String = parseDatabase(file, true);
loadDataSchema(n);
}
}

private function loadDataSchema(name:String):void {
if (name != "") {
connection.loadSchema(null, null, name, true, new Responder(schemaSuccess, schemaError));
function schemaSuccess(evt:SQLSchemaResult):void {
// Schema found! Now parsing:
var result:SQLSchemaResult = evt;
// Adding tables:
var nid:Number = (name=="main")?(1):(Number(name.replace("db", "")));
var dataNode:XMLList = dbData.db.(@numid == nid);
dataNode.setChildren(<placeholder/>);
delete dataNode.placeholder;
for (var i:int = 0; i < result.tables.length; i++) {
var newTable:XML = new XML(<tb/>);
newTable.@label = result.tables[i].name;
newTable.@isBranch = false;
newTable.@databaseName = name;
dataNode.appendChild(newTable);
}
}
function schemaError(evt:SQLError):void {
// Alert.show("Database is empty");
}
isTableSelected = false;
}
}

private function parseDatabase(file:File, needCheck:Boolean = false):String {
var ret:String = "";
if (!needCheck || file.exists) {
if(!needCheck || notAlreadyOpen(file)){
var newDB:XML;
if (dbData.db.length() == 0) {
connection.open(file);
dbData = new XMLList(<root></root>);
newDB = <db/>
newDB.@label = file.name;
newDB.@numid = 1;
newDB.@isBranch = true;
newDB.@path = file.nativePath;
dbData[0].appendChild(newDB);
ret = "main";
}else
if (dbData.db.length() > 0) {
var newnum:int = dbData.db.length() + 1;
connection.attach("db"+newnum.toString(), file);
newDB = <db/>
newDB.@label = file.name;
newDB.@numid = newnum.toString();
newDB.@isBranch = true;
newDB.@path = file.nativePath;
dbData[0].appendChild(newDB);
ret = "db" + newnum.toString();
}}else {
Alert.show("Database already opened.", "Error");
}
}else {
Alert.show("File not found.", "Error");
}
return ret;
}

private function notAlreadyOpen(file:File):Boolean{
var r:Boolean = true;
for (var i:int = 0; i < dbData.db.length(); i++) {
if (file.nativePath == dbData.db[i].@path) {
r = false;
}
}
return r;
}

private function tableSelect(evt:Event):void {
if (evt.currentTarget.selectedItem.@isBranch) {
isTableSelected = false;
var dataname:String;
if (evt.currentTarget.selectedItem.@numid == 1) dataname = "main";
if (evt.currentTarget.selectedItem.@numid > 1) dataname = "db" + evt.currentTarget.selectedItem.@numid;
selectedDatabase = dataname;
}
if (evt.currentTarget.selectedItem.@isBranch == false) {
isTableSelected = true;
selectedDatabase = evt.currentTarget.selectedItem.@databaseName;
tableData = new ArrayCollection([]);
var newColumns:Array = [checkboxColumn];
connection.loadSchema(SQLTableSchema, evt.currentTarget.selectedItem.@label, evt.currentTarget.selectedItem.@databaseName);
var schema:SQLSchemaResult = connection.getSchemaResult();
for (var i:int = 0; i < schema.tables[0].columns.length; i++) {
var aColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn(schema.tables[0].columns[i].name);
newColumns.push(aColumn);
}
tableGrid.columns = newColumns;
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "SELECT * FROM " + evt.currentTarget.selectedItem.@databaseName + "." + evt.currentTarget.selectedItem.@label;
stat.execute(-1, new Responder(tableSuccess, tableError));
}
function tableSuccess(evt:SQLResult):void {
if (evt.data != null) {
for (var item:Object in evt.data) {
var obj:Object = new Object();
for (var value:Object in evt.data[item]) {
obj[value] = evt.data[item][value];
}
tableData.addItem(obj);
}
}
}
function tableError(evt:SQLError):void {
Alert.show("Unable to read table data.", "Error");
}
}

private function newTable():void {
PopUpManager.addPopUp(newTableWindow, this);
PopUpManager.centerPopUp(newTableWindow);
newTableWindow.title = "Create new table";
}

private function dropTable():void {
Alert.show("Are you sure you want to completely delete this table?", "Drop table?", Alert.YES | Alert.NO, null, dropConfirm);
function dropConfirm(evt:CloseEvent):void {
if (evt.detail == Alert.YES) {
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "DROP TABLE " + selectedDatabase + "." + tableTree.selectedItem.@label;
stat.execute( -1, new Responder(dropTableSuccess, dropTableError));
}
}
function dropTableSuccess(evt:SQLResult):void {
loadDataSchema(selectedDatabase);
}
function dropTableError(evt:SQLError):void {
Alert.show("ERROR:" + evt.details, "Error");
}
}

private function closeNewTableWindow():void{
PopUpManager.removePopUp(newTableWindow);
}

private function createNewTable():void {
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "CREATE TABLE IF NOT EXISTS " + selectedDatabase + "." + newTableName.text + "(id INTEGER PRIMARY KEY AUTOINCREMENT, blankColumn TEXT)";
stat.execute( -1, new Responder(newTableSuccess, newTableError));
function newTableSuccess(evt:SQLResult):void {
closeNewTableWindow();
loadDataSchema(selectedDatabase);
}
function newTableError(evt:SQLError):void {
Alert.show("ERROR:" + evt.details, "Error");
}
}
]]>
</fx:Script>

<s:HGroup gap="0" width="100%" height="100%">
<s:VGroup width="200" height="100%" gap="0">
<s:HGroup>
<s:Button label="New table" click="newTable();" enabled="{tableTree.selectedItems.length>0}"/>
<s:Button label="Drop table" click="dropTable();" enabled="{isTableSelected}" />
</s:HGroup>
<mx:Tree id="tableTree" width="100%" height="100%" dataProvider="{dbData}" showRoot="false" labelField="@label" itemClick="tableSelect(event);"/>
</s:VGroup>
<s:VGroup width="100%" height="100%" gap="0">
<mx:TabNavigator width="100%" height="100%" paddingTop="0">
<s:NavigatorContent label="Table contents">
<s:VGroup width="100%" height="100%" gap="0">
<mx:HBox width="100%" height="30" paddingLeft="8" paddingTop="6">
<mx:CheckBox label="Select all" change="selectAllChange(event);" />
<s:Button label="Delete selected"/>
</mx:HBox>
<mx:AdvancedDataGrid id="tableGrid" width="100%" height="100%" dataProvider="{tableData}" editable="true">
<mx:columns>
<mx:AdvancedDataGridColumn dataField="" headerText="Data" editable="false" />
</mx:columns>
</mx:AdvancedDataGrid>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent label="Edit columns">

</s:NavigatorContent>
<s:NavigatorContent label="Query">

</s:NavigatorContent>
</mx:TabNavigator>
</s:VGroup>
</s:HGroup>

</s:WindowedApplication>

Thanks for reading!
Read more »

Monday, January 26, 2015

The best minds of my generation are thinking about how to make people click ads and thats ok

"The best minds of my generation are thinking about how to make people click ads. That sucks." - Jeff Hammerbacher
There is a meme going around that too many programmers are wasting their careers working on meaningless software: they spend all their time trying to get people to click on ads, they arent tackling the important stuff, and they arent solving the biggest problems of today. Its as if all programmers should drop what they are doing and instead try to cure cancer, end world hunger, and generally save the world.

Im going to call bullshit.

First of all, dont knock ads--or, to be more accurate, dont not knock making money. The most well intentioned company in the world cant accomplish any of its lofty goals if it has no money, and for many companies, ads are the best way to earn that money.

For example, you are probably one of the billion plus people who search Google over 100 billion times per month (!) to help plan your day, learn new information, and answer questions. Its hard to imagine life without it.
Google also builds maps, video, email, phones, and even more recently, they are trying to provide Internet access for everyone in the world, define what it means to be a healthy human, and to create self-driving cars. And all of this is powered by ads: more than 90% of Googles revenue comes from advertising.

If you kept in touch with your friends and family, read the news, or even followed a link to this blog post, it was probably through Twitter or Facebook. Twitter has played a part in starting revolutions in several countries; so has Facebook. In fact, almost everyone with Internet access has been touched by Facebook (they have 1.32 billion active monthly users) and for those without Internet access, Facebook is trying to help. And just like Google, 90% of Twitters revenue and nearly 90% of Facebooks revenue comes from ads.

Many talented engineers spent enormous amounts of time at these companies getting you to click on those ads. The result, Id argue, has been remarkably world changing: three companies, driven primarily by ad clicks, have connected us to information and to each other like never before. Its almost as if Adam Smith was on to something with the whole invisible hand idea.

But this debate isnt really about ads. Im guessing what people are actually upset about is that so many talented developers are working on products that are not "important". That is, they are building software for their own personal amusement or financial gain instead of working for the benefit of us all.

Well, heres a question: how do we determine which companies or ideas will most benefit the world?

In a remarkable talk called The Importance of Mathematics, Timothy Gowers tackles this same question with regards to mathematics:


Gowers claims that most mathematicians are drawn to intellectually interesting problems rather than practical ones. In fact, he talks about the famous Cambridge mathematician G. H. Hardy, who was "perfectly content, indeed almost proud, that his chosen field, Number Theory, had no applications, either then or in the foreseeable future. For him, the main criterion of mathematical worth was beauty."

Many mathematicians prefer problems that are beautiful to those that are useful. Despite that, mathematics has been the basis for countless discoveries of immense practical value: physicists, chemists, engineers, programmers, and countless others use math on a daily basis to build all the tools and technology of modern society. Even Number Theory, which seems entirely like math for maths sake, turns out to have many practical applications, including RSA encryption, the basis of all Internet security, and the reason you can use passwords, credit card numbers, and exchange other information online securely. Hardy wouldve been disappointed.
Gowers diagram of math knowledge: there is no way to separate the "useful" and the "useless"
Math is deeply interconnected and unpredictable: there is simply no way to know which parts of it will turn out to be important in the real world and which parts wont. The world of companies and products is similar: there is simply no way to know what companies or ideas will end up being a huge benefit to the world and which ones wont.

For example, it wouldve been hard to argue an algorithm inspired by citation analysis could change the world so profoundly--even Larry Page was not convinced as, in the late 90s, he offered to sell the company to Excite for just $1.6M (today, Google is worth around $400B). Many people would scoff at the idea of starting a company to share podcasts, but this is actually the origin of Twitter. As many as 50% of all scientific discoveries may happen by accident and many of the most world-changing ones were not the result of an explicit effort to save humanity (examples). Even the porn industry has had a profound impact on technology. You never know what will change the world.

There is an old Soviet joke my dad used to tell:

Stalin asks his staff, "how many movies do we make per year?"
"100 movies, Comrade Stalin."
"And how many of them turn out good?"
"10, Comrade Stalin."
"Alright, next year, only make the 10 good ones."

Of course, this isnt a justification to blindly build dumb crap, JerkTech, or anything actively harmful. This is not an excuse to work on projects you dont care about nor a reason to put up with Dilbert-like jobs. This post is a call for moderation: it would be impractical for everyone to try to work on projects that obviously change the world; it would be misguided to abandon all projects that change the world, but not obviously.

If youve got the passion and the skills to cure cancer or take on world hunger, then by all means, do it. But if you dont--and many people dont--its perfectly fine to work on something else youre passionate about. If you can build something people want, you have a chance to make the world a better place. Even if it involves ads.

Read more »

Sunday, January 25, 2015

PhoenixSuit Allwinner Tablets Flashing Tools Tutorials

PhoenixSuit 

Allwinner A2X And A3X Flashing Tools andStep by Step  Tutorial with Images.  

tablet firmware update tool 

how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools


PhoenixSuit is specific flashing tool for Allwinner A2X and A3X CPU based tablets. However you can use this flashing tool with Allwinner A10 and Allwinner A13 but Livesuit flashing tool is always recommended for Allwinner A10 and Allwinner A13 Tablets



How to flash Allwinner tablets with Phoenix Suit Flashing Tool ?




Download and install  Phoenix Suit . On first run it will be in Chinese language but after installation its in English do not panic .


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Click on Highlighted option and wait for next installation window.


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

 Let it run and install this driver software anyway .


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Device driver installation wizard will run click on next


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools


 PhoenixSuit will complete installation process and Google Universal driver will be installed on computer.

how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools



Now Click on PhoenixSuit icon on desktop.

how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Turn off your tablet , hold Volume Down button , insert cable and press volume button about 10 times . Tablet will be connect to PhoenixSuit . 

how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools


Click on Image to select desired Firmware.

how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Select Firmware .img file  and click on upgrade. 


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Firmware up gradation or restoration  will began . 



how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

Select "YES" to enter format upgrade mode. Click yes again on next window. 


how to flash allwinner tablet Allwinner A20 , A31, A31S flashing tools

A green flashing bar will be start from 0 to 100 . 
you are done. Flashing Allwinner tablet procedure is complete now. Your tablet will be reboot . 
1st reboot will take 3-5 minutes. Do not panic. 

Other Tablet Flashing Tutorials :-

Livesuit flashing tools and tutorials .
How to flash Allwinner tablet with SD Card.
Rockchip Tablet flashing tools and tutorials .
How to flash Rockchip tablets with SD Card .
Action Chip Tablet flashing tools and tutorials .
Basic learning Tablet Flashing .



Read more »

Saturday, January 24, 2015

POLYPAD 100 Rockchip Android Tablet Pc Firmware

POLYPAD 100 

Android 2.1 

Android Tablet PC Firmware Rockchip 

How to Reset a Android Tablet?

Wiki

Read article about Rockchip CPU on Wikipedia

Polypad 100 Tablets Reviews:

PolyPad tablets are products of Turkish base company called Herpa International Trade Ltd. Polypad 100 came to in the category of basic android tablet pc .800 mhz processor play 720p video smoothly . Battery time is good enough as company claimed 12 hours stand by , video 5 hours , music 8 hours , reading 10 hours. 10 hours reading time make polypad 100 good digital reader. games and apps are available for polypad . Polypad 100 tablets are best quality at best price also best technical service providers. 

Tablet Specifications:


LCD                
7"  TFT  Resistive Touch Screen
Screen Resolution 
800x480 Pix
Processor 
800 mhz  
Chipset / Boxchip
 Rockchip
RAM
256 SDR 
Built in Memory
4 GB
External Memory
Support Micro Card  (Max 32GB)
Wifi
802.11 b/g/n  supported
Blue tooth
   N/A
Sim
   N/A
Camera
      N/A                                    
HDMI 
Available , Usb 2.0, HDMI (Mini C) 
Speaker
Built IN 0.7W
Weight
1.21lbs
Android Version
2.1



Tablet PC common problems /Restore options . 

The following firmware , ROM file will be used  when your Android tablet having  various problems . 
1. Forgotten Pattern Lock . 
2.Too many pattern attempts / Reset user lock.
3.  Tablets PC stuck on Gmail account.
4. Android Tablets PC stuck on Android logo.
5. Tablet Android  hang on start up / Multiple errors generating by OS. 
6. Android Market  having problems or generating errors. 
7.Upgrading to new Android OS.
you can use this Android Tablet firmware,  ROM to reset your Android China tablets to generic firmwares or upgrades . Make sure to charge battery . Power failure during flashing may result dead or broken tablets.
Note : Flashing generic tablet firmware should be last option.

How to Reset a Android Tablet Tutorials :

Guide to resetPOLYPad Tablets
Read Before : Flashing Tutorial for Rockchip 
Download Flashing Instructions : PDF

Drivers for Rockchip Tablets:

Download Drivers for Rockchip tablets

Flashing Tools:

Download: RKbatch Tool

Recommended  Tools:

you can also use:Android Tools for Rockchip Tablets


Downloads: 


DOWNLOAD STOCK FIRMWARE
Read more »

Friday, January 23, 2015

Create Interactive PowerPoint Presentations with inter slide hyperlinks and action buttons

By using inter slide hyperlinks and action buttons in PowerPoint you can turn your presentations into interactive games or quizzes quite easily. No doubt that such PowerPoint presentations are more engaging.


Dont you think students will find presentations below more interesting?


Tip: Click on shoes


See more presentations by TechGuy

How to insert inter slide hyperlinks in PowerPoint 2007?

Create a hyperlink to a slide in the current presentation

Select the text you want to represent the hyperlink, right click on it, click hyperlink option. Under Link to, click Place in This Document or

1. Select the text or object that you want to represent the hyperlink.
2. Click on Insert tab
3. Click Hyperlink button.
3. Under Link to, click Place in This Document.
4. Link to a slide in the current presentation, Select the slide you want
to go to.



Same way action action buttons can be inserted from Shapes button under Insert tab.


Read more »

Thursday, January 22, 2015

Hard Reset ARCHOS 101 Platinum Android Tablets

How to Hard Reset ARCHOS 101 Platinum  Android Tablet Pc



What is Hard Reset ?

hard reset is also called Factory reset. When you restore your Android device to state when it  left the factory or first time the Smartphones or Tablets turns on . Hard Reset erase all user setting,contents (i.e games,contacts,messages,apps preference setting ,bookmarks,third party apps as well .) So if youre enough lucky then you can make  backup of all your data before hard reset .In most cases user data lost. Different Android Devices have different method for Hard Reset

When Hard Reset is Necessary for Smartphones or Tablets ?

1. Forgotten Pattern Lock on Android Tablets or Smartphones
2.Too many pattern attempts / Reset user lock.
3. Tablets PC,Smartphones stuck on Gmail account.
4. Android Tablet PC stuck / freeze on Android logo.
5. Tablet Android or Smartphones hang on start-up / Multiple errors generating by OS
6. Android market having problems or generating errors. 
7.Upgrading to new Android version.
 Make sure to charge battery upto 60%.

How to Hard Reset ARCHOS 101 Platinum  Android tablet pc ?


  • Turn off Archos tablet pc completely.
  • Press and hold volume UP(+) button.
  • Insert DC Charger to Tablet pc.
  • Wait for Recovery mode to appeared.
  • Release the button.
  • With the help of Volume buttons go to Factory reset/Wipe data.
  • Press power button to select factory reset. 
you are done.

Related Posts.

How to hard reset Scroll Basic Plus tablets.
How to hard reset Vox Mid V91 Tablets
Hard Reset Mediacom Smartpad 715i Tablets.
Hard Reset Coby Kyros Mid 7010 WC Tablets
Hard Reset Samsung Galaxy Tab 2 P5100 Tablets
Hard Reset Acer Iconia A500 Tablets
Hard Reset Symphony w20 Tablets
Hard Reset Archos 101 Titanium Tablets
Read more »