Archive | Programming

[Java] Inner Class

Inner class is declared in class 1 other class. VD class is declared in class Inner Outer Outer methods in class can declare objects of class Inner normally. However these methods in other classes par with class must declare Import Outer Outer class or declare as follows: Outer.Inner out = new Outer().new Inner(); Code illustrations:

[Java] Take the time in Java – Time in Java

In programming much as we need to calculate the running time of the program or the duration of a task is to methodically handled more efficiently. Java gives us some time taking the following system:

[Android] Color of Button Android – Button color Android

To set the color for Button you can use android:background=”color code” Button's VD: android:background=”#F00″ => me red. However with this method when clicking the button we will not see the reaction it seemed Button should not click. To fix this do the following: Step 1: Create color.xml file in the folder res / values ​​with the following content (this file in order to […]

[Android] Spinner in Android

spinner allows us to have 1 available picker like this: To be able to set the values ​​for spinner I have 2 how to perform the preset value in the file res / values ​​/ strings.xml or placed directly in your * .java. First we do 1 the simple interface. * .xml file can then look in the Graphics tab cal following form (bad breath but after run […]

[Android] The background color of the layout Android – Set background color of layout Android

To set the background color for the layout you just add the command line: android:background=”color code”

[C / C ] Sleep function in C / C – Function Sleep in C/C

Ham sleep(int n) used to generate 1 period “Sleeping” program (n seconds). To use it we declare library unistd.h.

[Ubuntu] Record a video screen on Linux with SimpleScreenRecorder – Record Screen on Linux with SimpleScreenRecorder

Before his usual recordMyDesktop to video record the action on screen, but due to a pulp machine should not be able to record audio, if the audio recording will be very shocked and spoil the image of the video. And so I try to find a software that can meet is easy to use and lighter, and finally find SimpleScreenRecorder Features […]

[Java] In some format in Java – Formatting Numeric Print Output in Java

In Java offers 2 format printing method gives us the printf and format and 2 This method has similar functions. With the 1 variables can be formatted in different ways it with. VD Another thing is that you can print format according to the French system, separating the integer part and the decimal part of the real number in the decimal […]

[C/C Linux] Programming C with palette in linux – Programming C in linux with color

An example opening nhá: A little fuller: If you are interested in more then here.

[C / C ] Text color in Dev-C – How do change color of text in Dev C

To write letters colored in Dev-C ++ you only need to use the system(“color xy”); Where x is the background color, y is the text color: But on the way back with an error if the entire set different color font color will be there, ie the colored letters that we finally put color. To fix it you have to learn and know the function (using the library […]