Tuesday, 14 February 2017
CMD code that use to secure your file/folder with password and hide from others.
Posted by
devraj chavda,
on
07:00
Hello friends,today i sharing a CMD code that use to secure your file/folder with password, and also you can hide file/folder from others.
In this chapter i show how to create .bat file with code. but try this it on your own risk be careful. try demo with another folder and data before hide or protect original data.
If you lost your CMD file you will loss your data.
Let's Start:
Step1: Open Notepad and Write below code.
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%== Type your password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
PAUSE
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
Step 2: Now Save file that shown below image:
Select Save as type : All Files(*.*) Then save it.
In this chapter i show how to create .bat file with code. but try this it on your own risk be careful. try demo with another folder and data before hide or protect original data.
If you lost your CMD file you will loss your data.
Let's Start:
Step1: Open Notepad and Write below code.
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%== Type your password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
PAUSE
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
Step 2: Now Save file that shown below image:
Select Save as type : All Files(*.*) Then save it.
Now run your locker.bat file. in this example Password is Type your password.
Thursday, 27 August 2015
Android Basic Question Book
Posted by
devraj chavda,
on
05:51
Hello,
Dear All,
Before the question phase i want to share a bite of tips that help you at interview time:
Golden tips for a successful interview:
. Keep smiley face and occasion.
. Be clear and loud voice.
. Asks them to give the same answer.
. The answer was short and to the point.
. Do not give the wrong answer quickly.
. Try to think about the correct answer.
. Give a convincing answer.
- Interview fun experiences
Some candidates during interviews loose (nervous) is going to be. The text is also aimed at them specifically.
What about the future that will consist Remove. Keep in mind, healthy and occasion. Maintain your natural and naturalness.
What to speak with the elders of the house that is the conversation. So it's a pleasure, enthusiasm and pomp give interviews. Leave everything else to God. It is with you and have faith that He cares for you.
I hope,this chapter will help you.
All the very Best ... !!!!
Dear All,
Before the question phase i want to share a bite of tips that help you at interview time:
Golden tips for a successful interview:
. Keep smiley face and occasion.
. Be clear and loud voice.
. Asks them to give the same answer.
. The answer was short and to the point.
. Do not give the wrong answer quickly.
. Try to think about the correct answer.
. Give a convincing answer.
- Interview fun experiences
Some candidates during interviews loose (nervous) is going to be. The text is also aimed at them specifically.
What about the future that will consist Remove. Keep in mind, healthy and occasion. Maintain your natural and naturalness.
What to speak with the elders of the house that is the conversation. So it's a pleasure, enthusiasm and pomp give interviews. Leave everything else to God. It is with you and have faith that He cares for you.
I hope,this chapter will help you.
All the very Best ... !!!!
Android Basic QA Book part:1
1) What is Android?
Answer: Android is an open-source
operating system that is used in mobiles, tablets,
televisions, wearable device etc.
2) Who is the founder of Android
OS? witch year?
Answer: October 2003 by Andy Rubin.
3) Explain .apk extension.
Answer: APK stands for Application Package. The .apk It refers to a file type having compressed information of application code and resource files with AndroidManifest.xml file.
Answer: APK stands for Application Package. The .apk It refers to a file type having compressed information of application code and resource files with AndroidManifest.xml file.
4) Witch language is used to
develop Android?
Answer: Android is developed using Java language.
5) Explain primary components used in Android
architecture?
Answer: The Android is used four essential that are (1) Linux Kernel (2) Set of libraries (3) Android Framework (4) Android Applications.
6) Explain AIDL?
Answer: AIDL
stands for Android Interface Definition Language. its offers to define the client’s interface requirements &
service to communicate at same level with help of inter process communications.
7) List the data types supported in AIDL?
Answer: AIDL supports all type of native java type and data types Like string, list, map etc.
8) How to android track
applications?
Answer: It is done by assigning each application with a unique Linux User ID.
9) What are the advantages of android?
Answer: Open-source: It means no licence, distribution and development fee.
Platform-independent: It
supports windows, mac and linux platforms.
Highly optimized Virtual Machine: Android uses highly optimized virtual machine for mobile devices,
called DVM (Dalvik Virtual Machine).
Supports various technologies: It supports audio,video,camera, Bluetooth, wifi, speech, EDGE, Scanner
etc. technologies.
10) Write code names of android?
Answer:
1. Aestro
2. Blender
3. Cupcake
4. Donut
5. Eclair
6. Froyo
7. Gingerbread
8. Honycomb
9. Ice Cream
Sandwitch
10. Jelly Bean
11. Kitkat
12. Lolipop
13. Marshmallow 6.0 August 17, 2015;
11) Does android support
other language than java?
Answer: Yes, android developed in C/C++ also using android NDK (Native Development Kit).
12) What are the core building
blocks of android?
Answer: The core building blocks of android are:
Activity, View, Intent, Service, Content
Provider,
Fragments, and AndroidManifest.xml etc.
13) What is activity?
Answer: Activity is a pre-defined class, and also is a Java code
that supports a frame or screen or UI.
14) What is AAPT?
Answer: AAPT is
stand for android asset packaging tool. It handles the android packaging process.
15) Write step of life cycle methods of
android activity?
Answer : There are 7 life-cycle methods of activity.
1. onCreate()
2. onStart()
3. onResume()
4. onPause()
5. onStop()
6. onRestart()
7. onDestroy()
16) What is intent and use of intent?
Answer: Intent is a information that is passed to the components. It is used to launch an activity, display a web page, send sms, create call, send email etc.
17) How many types of intent?
Answer: There are two types of intents in android:
1. Implicit Intent
2. Explicit Intent
18)
What
is implicit intent in android?
Answer: Implicit intent is used to allows
to component from another app.
e.g. To know location of other users.
19) What is explicit intent in
android?
Answer: Explicit intent is used to start
an component in your own app.
e.g. Start new Activity.
20) What is the name of database
used in android?
Answer: SQLite: An open
source and lightweight relational database for
mobile devices.
21) What is fragment?
Answer: Fragment is a part
of Activity. That allow to display multiple screens on single activity.
22) What is NDK?
Answer:NDK
stands for Native Development Kit. We develop a part of app using native language such as C/C++ to boost
the performance. it should be used with android SDK(Software Development Kit).
23) What is ADB?
Answer: ADB
stands for Android Debug Bridge. It is a command line tool that is used
to communicate with the emulator instance.
24) What is ANR?
Answer: ANR
stands for Application Not Responding. It is a dialog box that appears if the application is no longer responding more
then 10 seconds.
25) What is SDK?
Answer: SDK is a Software Development Kit that enables developers to create applications for the Android
platform.
Thank you
Friday, 19 June 2015
Custom Listview in android -2
Posted by
devraj chavda,
on
00:20
In this chapter we learn how to implement custom Listview in android.Listview is one of the most popular controls, It can be used in many different forms and can be customized to suitable of app requirement.In this tutorial, I will demonstrate you how you can bind a simple array of Strings with ListView.
May You Want To See Another Examples Of How To Create Simple Listview Part-1 and Part-2.
Customlistview with same image Part-1.
In this example we set a different image for all list items.
Let's go for coding:
CREATE NEW ANDROID PROJECT
We need for this example:
1) activity_main.xml (...res/layout/ )
2) mylist.xml (...res/layout/ )
3) MainActivity.java
4) CustomListAdapter.java
Step 1: Write code into activity_main.xml
This is a main activity where we put list view.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
Step 2: Write code into mylist..xml
Created custom view for listview to show with image and text in list view.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="5dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:padding="2dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000aa" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
Step 3: Write code into MainActivity.java
package dev.androidapplink.customlistviewapp_2;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends Activity {
// create variable
ListView list;
//define string for List item(s)
String[] itemname = { "pic1", "pic2", "pic3", "pic4", "pic5", "pic6",
"pic7", "pic8" };
//set image according to list item(s) from drawable
Integer[] imgid = { R.drawable.pic1, R.drawable.pic2, R.drawable.pic3,
R.drawable.pic4, R.drawable.pic5, R.drawable.pic6, R.drawable.pic7,
R.drawable.pic8, };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//create adapter and bind item name with image id
CustomListAdapter adapter = new CustomListAdapter(this, itemname, imgid);
list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter);
//implement on item click listener to show toast on click but you can put here your operation as your requirement of app
list.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
String Slecteditem = itemname[+position];
// make your operation here i make toast.
Toast.makeText(getApplicationContext(), Slecteditem,
Toast.LENGTH_SHORT).show();
}
});
}
}
Step 4: Write code into CustomListAdapter.java
CustomListAdapter.java is a custom list adapter class which provides data to list view.
package dev.androidapplink.customlistviewapp_2;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class CustomListAdapter extends ArrayAdapter<String> {
private final Activity context;
private final String[] itemname;
private final Integer[] imgid;
public CustomListAdapter(Activity context, String[] itemname,
Integer[] imgid) {
super(context, R.layout.mylist, itemname);
// TODO Auto-generated constructor stub
this.context = context;
this.itemname = itemname;
this.imgid = imgid;
}
public View getView(int position, View view, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View rowView = inflater.inflate(R.layout.mylist, null, true);
TextView txtTitle = (TextView) rowView.findViewById(R.id.item);
ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
TextView extratxt = (TextView) rowView.findViewById(R.id.textView1);
txtTitle.setText(itemname[position]);
imageView.setImageResource(imgid[position]);
extratxt.setText("Description " + itemname[position]);
return rowView;
};
}
May You Want To See Another Examples Of How To Create Simple Listview Part-1 and Part-2.
Customlistview with same image Part-1.
In this example we set a different image for all list items.
Let's go for coding:
CREATE NEW ANDROID PROJECT
We need for this example:
1) activity_main.xml (...res/layout/ )
2) mylist.xml (...res/layout/ )
3) MainActivity.java
4) CustomListAdapter.java
Step 1: Write code into activity_main.xml
This is a main activity where we put list view.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
Step 2: Write code into mylist..xml
Created custom view for listview to show with image and text in list view.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="5dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:padding="2dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000aa" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
Step 3: Write code into MainActivity.java
package dev.androidapplink.customlistviewapp_2;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends Activity {
// create variable
ListView list;
//define string for List item(s)
String[] itemname = { "pic1", "pic2", "pic3", "pic4", "pic5", "pic6",
"pic7", "pic8" };
//set image according to list item(s) from drawable
Integer[] imgid = { R.drawable.pic1, R.drawable.pic2, R.drawable.pic3,
R.drawable.pic4, R.drawable.pic5, R.drawable.pic6, R.drawable.pic7,
R.drawable.pic8, };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//create adapter and bind item name with image id
CustomListAdapter adapter = new CustomListAdapter(this, itemname, imgid);
list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter);
//implement on item click listener to show toast on click but you can put here your operation as your requirement of app
list.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
String Slecteditem = itemname[+position];
// make your operation here i make toast.
Toast.makeText(getApplicationContext(), Slecteditem,
Toast.LENGTH_SHORT).show();
}
});
}
}
Step 4: Write code into CustomListAdapter.java
CustomListAdapter.java is a custom list adapter class which provides data to list view.
package dev.androidapplink.customlistviewapp_2;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class CustomListAdapter extends ArrayAdapter<String> {
private final Activity context;
private final String[] itemname;
private final Integer[] imgid;
public CustomListAdapter(Activity context, String[] itemname,
Integer[] imgid) {
super(context, R.layout.mylist, itemname);
// TODO Auto-generated constructor stub
this.context = context;
this.itemname = itemname;
this.imgid = imgid;
}
public View getView(int position, View view, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View rowView = inflater.inflate(R.layout.mylist, null, true);
TextView txtTitle = (TextView) rowView.findViewById(R.id.item);
ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
TextView extratxt = (TextView) rowView.findViewById(R.id.textView1);
txtTitle.setText(itemname[position]);
imageView.setImageResource(imgid[position]);
extratxt.setText("Description " + itemname[position]);
return rowView;
};
}
Step 5: Now Run Your Project:
Thursday, 18 June 2015
Custom Listview in android-1
Posted by
devraj chavda,
on
23:18
In this chapter we learn how to implement custom Listview in android.Listview is one of the most popular controls, It can be used in many different forms and can be customized to suitable of app requirement.In this tutorial, I will demonstrate you how you can bind a simple array of Strings with ListView.
May You Want To See Another Examples Of How To Create Simple Listview Part-1 and Part-2.
Customlistview with Different image Part-2.
In this example we set a same image for all list items.
Let's go for coding:
CREATE NEW ANDROID PROJECT
We need for this example:
1) activity_main.xml (...res/layout/ )
2) mylist.xml (...res/layout/ )
3) MainActivity.java
Step 1: Write code into activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Step 2: Write code into mylist.xml
Created custom view for list view to show with image and text in list view.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="4dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="4dp"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/Itemname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:textSize="18sp" />
</LinearLayout>
Step 3: Write code into MainActivity.java
package dev.androidapplink.customlistviewapp;
import android.os.Bundle;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
public class MainActivity extends ListActivity {
//define string for List item(s)
String[] itemname = { "Android", ".NET", "JAVA", "FireFox",
"SQlite", "Orecale", "xmp", "Database" };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Bind custom list view by using ArrayAdapter
this.setListAdapter(new ArrayAdapter<String>(this, R.layout.mylist,
R.id.Itemname, itemname));
}
}
May You Want To See Another Examples Of How To Create Simple Listview Part-1 and Part-2.
Customlistview with Different image Part-2.
In this example we set a same image for all list items.
Let's go for coding:
CREATE NEW ANDROID PROJECT
We need for this example:
1) activity_main.xml (...res/layout/ )
2) mylist.xml (...res/layout/ )
3) MainActivity.java
Step 1: Write code into activity_main.xml
This is a main activity where we put list view.
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Step 2: Write code into mylist.xml
Created custom view for list view to show with image and text in list view.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="4dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="4dp"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/Itemname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:textSize="18sp" />
</LinearLayout>
Step 3: Write code into MainActivity.java
package dev.androidapplink.customlistviewapp;
import android.os.Bundle;
import android.app.ListActivity;
import android.widget.ArrayAdapter;
public class MainActivity extends ListActivity {
//define string for List item(s)
String[] itemname = { "Android", ".NET", "JAVA", "FireFox",
"SQlite", "Orecale", "xmp", "Database" };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Bind custom list view by using ArrayAdapter
this.setListAdapter(new ArrayAdapter<String>(this, R.layout.mylist,
R.id.Itemname, itemname));
}
}
Step 4: Now Run Your Project:
Download project:
Subscribe to:
Posts
(
Atom
)
check current state
(8)
android basic
(7)
Layout background
(6)
Network & Connectivity
(4)
Toast
(4)
XML
(4)
listview
(4)
Animation XML
(3)
Menu
(3)
web browser
(3)
Alert box
(2)
Calculator
(2)
Mobile data connection
(2)
Spinner
(2)
ToggleButton
(2)
Transparetn background
(2)
hello world
(2)
seekbar
(2)
set color
(2)
webview
(2)
wifi manager
(2)
Android interview Question
(1)
App uninstall
(1)
Battery
(1)
Bluetooth
(1)
CMD
(1)
CheckBox
(1)
Drag and Drop
(1)
Emi Loan
(1)
Flightmode or Airplane mode
(1)
Full screen
(1)
Maths
(1)
PopUp
(1)
SDcard
(1)
Sensor
(1)
Slider
(1)
Sound
(1)
Splash screen
(1)
Torch flash light
(1)
Transparent color
(1)
android architecture & fundamental
(1)
android folder and package
(1)
call
(1)
contact
(1)
converter
(1)
dialer
(1)
internet
(1)
screen brightness
(1)
sms
(1)
storage info
(1)
time
(1)
unite converter
(1)
Follow me | Share |
---|---|
Follow @devraj205027 | Tweet |