C code to implement Postfix Expression Tree

Senin, 31 Maret 2014

/* C program to implement postfix expression tree and calculating its value */

#include<stdio.h>
#include<conio.h>
#include<alloc.h>
#include<stdlib.h>
#include<string.h>

struct tree
{
    char data;
    struct tree *left,*right;
};

int top=-1;
struct tree *stack[20];
struct tree *node;

void push(struct tree* node)
{
    stack[++top]=node;
}

struct tree * pop()
{
    return(stack[top--]);
}

/* Calculating the value of postfix expression using recursion */

int cal(struct tree *node)
{
    int ch;
    ch=check(node->data);
    if(ch==1)
    return node->data-48;
    else if(ch==2)
    {
        if(node->data==+)
            return cal(node->left)+cal(node->right);
        if(node->data==-)
            return cal(node->left)-cal(node->right);
        if(node->data==*)
            return cal(node->left)*cal(node->right);
        if(node->data==/)
            return cal(node->left)/cal(node->right);
    }
}

/* Displaying all node in order */

void inorder(struct tree *node)
{
    if(node!=NULL)
    {
    inorder(node->left);
    printf("%c",node->data);
    inorder(node->right);
    }
}

/* Checking operator and operands */

int check(char ch)
{
if(ch==+||ch==-||ch==/||ch==*)
return 2;
else
return 1;
}

/* making simple operand node and pushing into stack */

void operand(char b)
{
    node=(struct tree*)malloc(sizeof(struct tree));
    node->data=b;
    node->left=NULL;
    node->right=NULL;
    push(node);
}

/* making operator node than pop-up two nodes from stack and adding into operator node and finally push node into stack  */

void operators(char a)
{
    node=(struct tree*)malloc(sizeof(struct tree));
    node->data=a;
    node->right=pop();
    node->left=pop();
    push(node);
}

void main()
{
    int i,p,k,ans;
    char s[20];
    clrscr();
    printf("Enter the expression in postfix form
");
    fflush(stdin);
    gets(s);
    k=strlen(s);
    i=0;
    for(i=0;s[i]!=
Read More..

Implement drag and drop movable PopupWindow

Minggu, 30 Maret 2014

This example implement OnTouchListener() for PopupWindow to detect user action of drag-and-drop, to move PopupWindow.

movable PopupWindow
Movable PopupWindow

package com.example.androidpopupwindow;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.PopupWindow;
import android.widget.Spinner;
import android.app.Activity;

public class MainActivity extends Activity {

String[] DayOfWeek = {"Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

final Button btnOpenPopup = (Button) findViewById(R.id.openpopup);
btnOpenPopup.setOnClickListener(new Button.OnClickListener() {

@Override
public void onClick(View arg0) {
LayoutInflater layoutInflater =
(LayoutInflater)getBaseContext()
.getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.popup, null);
final PopupWindow popupWindow = new PopupWindow(
popupView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);

Spinner popupSpinner = (Spinner)popupView.findViewById(R.id.popupspinner);

ArrayAdapter<String> adapter =
new ArrayAdapter<String>(MainActivity.this,
android.R.layout.simple_spinner_item, DayOfWeek);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
popupSpinner.setAdapter(adapter);

btnDismiss.setOnClickListener(new Button.OnClickListener(){

@Override
public void onClick(View v) {
popupWindow.dismiss();
}});

popupWindow.showAsDropDown(btnOpenPopup, 50, -30);

popupView.setOnTouchListener(new OnTouchListener() {
int orgX, orgY;
int offsetX, offsetY;

@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
orgX = (int) event.getX();
orgY = (int) event.getY();
break;
case MotionEvent.ACTION_MOVE:
offsetX = (int)event.getRawX() - orgX;
offsetY = (int)event.getRawY() - orgY;
popupWindow.update(offsetX, offsetY, -1, -1, true);
break;
}
return true;
}});
}

});
}

}

For other files, such as layout, customborder.xml...etc, refer to last exercise "PopupWindow with transparent background" and "Create background of Popup Window with custom shape".

download filesDownload the files.



Related: Interactive resizable PopupWindow

Read More..

Tools App Quarantine Pro ROOT FREEZE 2 3 Android

Sabtu, 29 Maret 2014

App Quarantine Pro ROOT/FREEZE 2.3 (Android)

App Quarantine Pro ROOT/FREEZE 2.3 (Android)
Requirements: Android 2.2+

App Quarantine Pro ROOT/FREEZE 2.3 (Android) Overview: The ultimate tool to FREEZE unwanted apps on your droid! Quickly get rid of the overrated BLOAT that is added by your phone manufacturer or network provider!
The ultimate tool to FREEZE unwanted apps on your droid! Quickly get rid of the overrated BLOAT that is added by your phone manufacturer or network provider!
But the app is not only useful to block system apps: APP QUARANTINE is here to replace your TASK MANAGER as well. Without draining any battery you can quickly disable apps that you dont need very often and with the homescreen WIDGET you get them back in action with a fingertip.
For experienced users there are even more options like disabling system services or automatically freezing unwanted apps after flashing a new CUSTOM ROM.
This is the PRO version of APP QUARANTINE which is even more kick ass! You can filter apps by their permissions and put them together in groups. In the homescreen widget you can disable multiple apps at the same time without a hassle, or you can toggle only selected apps from a group.
If you love using this app just as much as I love developing it then let me know and give me your feedback! Im always looking forward to receive more comments and ratings in the Market and read YOUR OPINION in my BLOG or on GOOGLE PLUS!
Attention: This app will only works on devices with ROOT access!

Whats in App Quarantine Pro ROOT/FREEZE 2.3 (Android):
2.3
  • Galaxy Note: fixed restore issue(reboot required)
  • automatically turn USB debugging mode on/off (when AdbToggle is installed)
  • fixed detection when quarantined apps are updated
  • click an app to see more details, go to Google Play page or App settings
  • more optimizations and bug fixes
App Quarantine Pro ROOT/FREEZE 2.3 (Android) screenshot:
App Quarantine Pro ROOT/FREEZE 2.3 (Android)
App Quarantine Pro ROOT/FREEZE 2.3 (Android)

Code:
https://play.google.com/store/apps/details?id=com.ramdroid.appquarantinepro 

Download App Quarantine Pro ROOT/FREEZE 2.3 (Android)

Code:
http://rapidgator.net/file/4711668/App.Quarantine.Pro.ROOT.FREEZE.2.3.Android.zip.html 
http://bitshare.com/files/5lekrwx8/App.Quarantine.Pro.ROOT.FREEZE.2.3.Android.zip.html 
http://ul.to/zkdlphfl/App.Quarantine.Pro.ROOT.FREEZE.2.3.Android.zip 
http://jumbofiles.com/db54zth7lsjd 
Read More..

Calibre Library 3 12 v3 12 Android Apk App

Selasa, 25 Maret 2014



Browse and download your e-books on the go.

Requires SDCARD for cache and e-book storage.

Pair with Nook, FBReader or another e-book reading application for a complete solution. This is not an e-book reader app.

If your Calibre server is visible on the Internet, you can even use your phones data plan to download books. If your phone has wireless, you can download books from within your own lan regardless.

Please note - this will only display formats offered by Calibres OPDS interface, which does not appear to include .lit files.

From some of the latest comments Id say someone is planning to release a competing product and trashing mine in comments. Ive had no reports through Google of any crashes and I respond to any issues via email very quickly. In fact, Ive had NO emails saying people have problems in a very long time, despite the user base continuing to grow.

Whats in this version:
-Now works without crashing on a rooted Nook Touch!

Download Instructions:
http://www.MegaShare.com/3515121

Mirrors:
http://www.filesonic.com/file/1696192774

Newer PostOlder PostHome0 Responses For : Leave a Reply

Search This BlogLoading... #uds-searchControl .gs-result .gs-title, #uds-searchControl .gs-result .gs-title
Read More..

PocketBand Uloops Pro v3 0 2 APK FULL VERSION

Senin, 24 Maret 2014

PocketBand Uloops Pro v3.0.2 APK FULL VERSION

PocketBand Uloops Pro v3.0.2 APK FULL VERSION
Req: Android 2.0+ Android Apss


PocketBand Uloops Pro v3.0.2 APK FULL VERSION.. A whole music studio in your pocket! Full featured sequencer with social aspects
Build high quality tracks as a sequence of loops, mixing synths, drums, audio recordings, analog modulators and arpeggiators. Apply Fx to channels and export to mp3 or ringtones. Also publish, play and collaborate in our community.. the useful in android... PocketBand Uloops Pro v3.0.2 APK official release in android .. make your own band !

PocketBand Uloops Pro v3.0.2 APK FULL VERSION Features:
  • 12-channels mixer with effects, 3-band parametric equalizer and automated PAN/VOL for each track.
  • Channel FX: delay, flanger, chorus, reverb, phaser, distortion, compressor and others.
  • Mastering Toolbox.

PocketBand Uloops Pro v3.0.2 APK FULL VERSION Devices:
  • Polyphonic synthesizer: 125 instruments. Automated VCF Cutoff, VCF Res and LFO.
  • Drum Machine: 35 drumkits (17 components with independent volume, pitch, pan and reverb).
  • Recorder: Use built-in mic for live audio recording.
  • Modulator: Analog-like modular synthesizer patched up as an interesting oscillation lab.
  • Arpeggiator: Make interesting music pattern with a full parameterizable algorithm.

Downoad PocketBand Uloops Pro v3.0.2 APK FULL VERSION
Read More..

Financial Calculators Pro v1 4 0 apk

Minggu, 23 Maret 2014


One app serves most of your finance calculation needs !


Financial Calculators Pro v1.4.0market.android.com.financial.calculator.pro
The application includes the following common used financial calculators.
 ✯ TVM Calculator
 ✯ Currency Converter
 ✯  Loan Calculator
 ✯  Compound Interest Calculator
 ✯  Retirement/401k Calculator
 ✯  Credit Card Pay Off Calculator

 ✯  Tip Calculator
 ✯  Regular Calculator
 ✯  Annual Percentage Rate (APR) Calculator
 ✯  Return on Investment (ROI) Calculator
 ✯  Auto Loan Calculator
 ✯  Credit Card Minimum Payment
 ✯  Discount and Tax Calculator
 ✯  IRR NPV Calculator

Required Android O/S : 1.6+

Screenshots :
 
 
 
 

Download : 300Kb APK


Read More..

Go!Chat Facebook Pro apk v4 3 5 Download Android

Per scaricare le applicazioni da filesonic bisogna cliccare su slow download e aspettare circa 30 secondi , dopodichè inserire il codice riportato sulla figura e clicca AVVIA DOWNLOAD . Se volete scaricare più rom senza aspettare molto tempo dovete spegnere il modem e riaccenderlo in modo da cambiare ip oppure usare un proxy . Altrimenti dovete aspettare circa 15 min
Read More..

Alabama Smith HD 1 0 v1 0 Android Apk Game

Sabtu, 22 Maret 2014

Alabama Smith HD v1.0

--HD Version For Tablets Only--

Join a quest to find an artifact that will allow you to travel through time!

Alabama Smith is young, dashing and intelligent. Hes also a brilliant student of archeology, so when his professor needs to find an artifact that allows a person to travel through time, he turns to our whip-smart hero for help. Join Alabama and the professors daughter, Anastasia, as they travel to modern Pompeii on a mind-bending seek-and-find quest!
At first, youll help Alabama search for the relic, and then youll step into the role of Anastasia as she races to save her friend from the eruption of Mount Vesuvius. Jump back and forth between the past and the present to solve elaborate puzzles and prepare for shocking twists and turns in this story of double-crosses and intrigue. Photorealistic visuals and atmospheric audio make this already captivating adventure all the more compelling!
GAME FEATURES:
◇ 17 chapters
◇ 20 mini-games
◇ Casual and Expert modes
◇ Hundreds of hidden objects
◇ Learn-as-you-play tutorial

-Released By The Market Militia-

Download:
http://www.filesonic.com/file/1832110654/MarketMilitiaPompeiihd.apk

Read More..

Chm Reader X 1 3 110821 apk

Jumat, 21 Maret 2014



A light weight yet faster CHM Reader. 


Chm Reader X 1.3.110821 

Features : 
  • Better performances using highly optimized CHM parsing engine.
  • Better compatibility with ill-formatted CHM document. It can open some file which couldnt be opened by other readers.
  •  Content tree support.
  • Full screen support.
  • Keep reading position, zoom level between different read sessions.
  • Support CHM, HTML, Image files.
  • Use volume down/up to turn pages
Required Android O/S : 2.1 +

Screenshots : 
 
 

Download : 109Kb APK


Read More..

Battery Repair Doctor Boost v1 5 6 apk

Kamis, 20 Maret 2014


The only app that is able to carry out a process of maintenance and repair of our device’s battery !


Battery Repair (Doctor Boost) v1.5.6 market.android.com.batteryrepair
Battery Repair is THE ONLY APP that is able to carry out a process of maintenance and repair of our device’s battery.
This app is brand new in Android Market for it is totally different from the present utilities.
Battery Repair carries out a maintenance process which is INDEPENDENT from the recharging one. The battery is “re-calibrate” and optimized.

Whats in this version :  (UDATED:November 4, 2011)
  • Now AWESOME.
  • Added TEMPERATURE monitor.
  • Added VOLTAGE monitor.
  • Enjoy your new battery.
The App also carries out an optimized recharging process which is concurrent with the maintenance process and which guarantees a longer time of capacity, in order to get a 2 from 8 hours increase. These are empirical data, based on several tests which have made carried out with the aforementioned app.

Required Android O/S : 2.2+


Screenshots :
 
 

Download : 1Mb APK


Read More..

Download ROOT TOOLBOX PRO 1 6 8 APK Full Version

Rabu, 19 Maret 2014

Download ROOT TOOLBOX PRO 1.6.8 APK Full Version

ROOT TOOLBOX PRO 1.6.8 APK Full Version
Req: Android 2.1+ Android Apk Free


ROOT TOOLBOX PRO 1.6.8 APK Free Download ! Root Toolbox a Pro version ! this is so amazing version release!

ROOT TOOLBOX PRO 1.6.8 APK Full Version Features:
  • Reboot/Recovery/Bootloader/HotBoot/Download-Mode
  • SetAPN/Backup/Restore
  • Wipe Delvik
  • Wipe Battery Stats
  • Remount System
  • Backup/Restor/Flash/Erase Recovery
  • Fix permissions
  • Launch Hidden Menu
  • Fix Market Links
  • Sim Settings
  • Update Busybox
  • CM7 Themes
  • Restart Status Bar
  • Dual Mount Sdcard + EXT
  • System App Remover/Backup/Restore
  • Enable/Disable Boot Animation
  • Read Logcat
  • Display Device Information
  • Download Update.zip To Change Sdcard Read Speed
  • Wipe All Webview Cache
  • MD5 Sum Fixer
  • Package Manager
  • Debug Message
  • Install Non-Market App

ROOT TOOLBOX PRO 1.6.8 APK Full Version Updates:
  • Remove install DSP Manager
  • Removed Flash Light
  • Removed SU Update.zip
  • Updated flash image binary
  • Fixed ICS Sounds
  • Fixed update notification

Get Now!

Download ROOT TOOLBOX PRO 1.6.8 APK Full Version
Read More..

Hills of Glory WWII v1 0 apk download full android

Selasa, 18 Maret 2014

Per scaricare le applicazioni da filesonic bisogna cliccare su slow download e aspettare circa 30 secondi , dopodichè inserire il codice riportato sulla figura e clicca AVVIA DOWNLOAD . Se volete scaricare più rom senza aspettare molto tempo dovete spegnere il modem e riaccenderlo in modo da cambiare ip oppure usare un proxy . Altrimenti dovete aspettare circa 15 min
Read More..

WebSharing FileMedia Sync v1 6 1 apk


Transfer and view files, music, photos, and videos from your phone over Wi-Fi !



WebSharing FileMedia Sync v1.6.1 market.android.com.websharing.r1
Transfer files over Wi-Fi between your phone and computer.
Features : 
✯ Bulk upload/download: transfer entire folders/albums
✯ Stream music to computers
✯ View photos/videos
✯ WebDAV Server (Beta feature: must enable in settings)

Required Android O/S : 1.5+

Screenshots :
 
 


Download : 2Mb APK


Read More..