Monthly Archives: July 2015

URI Online Judge Solution |1038 Snack

Here I tried to write everything in standard C++

 

c++ precision

C++ precision example:

In this link everything explained clearly….You can check

http://ltcpp.blogspot.com/2012/07/input-output-io-in-c.html

And basically if we want to make just like C in C++ fixed value after decimal point then it can be like this

In C:

In C++:

Both C and C++ will give the same result output:3.55

Odd Even in Bash/Shell Scripting

I tried it so many times but it didn’t gave the solution but the code I have found on the net and I understood where my problem was

caution: Don’t forget to give space after if eg. if [ ] and symbols eg. [ $remainder = 0 ]

and don’t forget to style after then eg.

then
echo “$number is evern”
else
echo “$number is odd”

if you don’t do all of the above mentioned system will give various errors.

XML

XML is a language to describe the data

 

I have practiced here

Just like the example here:

Root element is a must have element…

Element vs Attribute:
The way can be followed

or like this

It’s better to avoid attributes in XML ..It’s better for HTML but in XML it better to use as elements or subchild what you say….It’s not stricted like html that where to use Attribute and where to use as element

Sometimes in XML we have to use attributes for metadata identify the xml

 

XML namespaces: Various method can be followed

Same Table name can conflict in XML:

like this

with this

two are diffent meaning but name is same so it can be conflict

solution is to using prefix before the name:

just like this

So it will never be conflict 🙂

XML Namespcaes – xmlns attribute

it can also write like this:

Default Namespaces:

xmlns=”zakiliveURL”

The XML that is carrying HTML table

The XML that is carrying egg white:

Namespcaes in real life uses: here XSLT used XSLT is stands for XML Transformaion which transform XML documents into other formats like XHTML

 

Android A to Z

Here i am going to describe all the basic to advanced android experience I have learned …I have nfolowed tutorialspoint.com and lynda.com mainly…Sharing is carin..By sharing here it will be clear to mine also 🙂

 

Application Component

Activities -Dictate the UI and handle the user interaction
Services-The background processing associated with application
Boradcast Receivers – They handle communication between android os and applications
Content Providers – The handle data and database management issues

Activiity can implemented as subclass of activity as follows:

public class MainActivity extends Activity{

}

Services can be implemented as follows:
A service is implemented as a subclass of service class as follows:

public class MyService extends Service{

}

Broadcast receiver is implemeted like this:
Broadcast receiver is implemented as Broadcast receiver class and each message is broadcasted as an intent object

public class MyReceiverNew extends BroadcastReceiver{
}

Content Providers requests is handled by the methods of ContentResolver class

public class MyContentProvider extends ContentProvider{

}

There are some additional components
Fragments-behaviour of UI in an activity
Views – UI elements that are drawn onscreen including buttons, lists, forms etc.
Layout – View hierarchies that control screen format and appearance of the views

Intents – Message wiring components together

Resources – External elements, such as strings, constants and drawable pictures.

Manifest – Configuration file for the application

Performed the Hello World named example with Android Studio….By File>New Project

Need to Finish this  Chapter from  -> Android Resource

-Need to complete the basic android chapters to Advanced topics
– then Need to read some tutorials like Android Navigation and SQL Database from tutorialspoint.
– But first of all need to clear all the basics of java OOP

করে করে এগোতে হবে…সেটা না পারলে দেখে দেখে বুঝে নিয়ে এগোতে হবে পরে সময় পেলে আবার করে করে এগোতে হবে কিন্তু বসে থাকা যাবে না কনফিডেন্স গ্রো করতে হলে অনুশীলন বা চর্চার কোনো বিকল্প নাই।

C++,JAVA,PHP etc in one Eclipse IDE

Help>Install New Software>Select Luna From Drop Down Box>Select Programming Languages from Arrow>Then Select your desired Dev Language..

CPU Scheduling: Round Robin Algorithm