vendredi 20 avril 2018

Solution: How to accept decimals in an EditText in Android

  Aucun commentaire

A lot developers are searching for a clean way to accept decimal numbers in EditText in Android, but it's so simple.

Try to add the following line in your EditText xml file:

That's it.

Read More

mardi 6 mars 2018

Install MySQL and PHPMyAdmin on Ubuntu 16.04

  Aucun commentaire


In todays lesson, we will share with you a few lines of code that let you install mysql and phpmyadmin without any problems on Ubuntu 16.04.

First let's you must have apache server and php preinstalled on your server.
[Check how to install Apache2 & PHP].

After having requirements installed, run the following command :
$sudo apt-get update

Then let's install mysql server with the command below:
$sudo apt-get install mysql-server

After the installation completed, run the command :
$sudo apt-get install phpmyadmin

NB :
 - When you will be prompted to select a web server to configure, hit the space bar to select Apache2 and Enter to confirm and continue
 - On the next screen, select YES to configure a database for phpMyAdmin with dbconfig-common
 - Set the password of phpmyadmin.
 - Go to http://your_server_ip/phpmyadmin

Read More

samedi 3 février 2018

How to access to RaspberryPi from your computer?

  Aucun commentaire


I'm going to show you "How to access to RaspberryPi from your computer", using VNC, that stands for Virtual Network Computing : which is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer.

Note : Your RaspberryPi and your computer must be connected to the same network.

First we must enable VNC, by running the commands below in the terminal:
sudo apt-get update
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer

After executing the second command:

Select Menu > Preferences > Raspberry Pi Configuration > Interfaces.

Once the VNC is enabled, in your computer ( Windows, Linux or Mac), download and install VNC Viewer :

After downloading and installing VNC Viewer on your computer, go and click on "New Connection", and enter the local IP address of your RaspberryPi, and your RaspberryPi login, then click on OK to start your session.

If you don't know your raspberryPi local IP adresse, open the RaspberryPi terminal and type the command below:
Then, you will see an address that starts with "192.168...".

Read More

dimanche 28 janvier 2018

How to connect BlueStacks to Android Studio ?

  Aucun commentaire


Todays question is

"How to connect BlueStacks to Android Studio ?".

The question is very simple, just follow these steps:

  1. Close Android Studio.
  2. Open BlueStacks
  3. Open Android Studio and Run.

Optional: If you want to check if the Android Studio
  1. Open the Terminal
  2. Navigate to sdk/platform-tools folder
  3. Run the command : ./adb devices

Read More

samedi 23 décembre 2017

Android - How to disable the case clock screen?

  Aucun commentaire

How to disable the clock screen when the case is covering phone?

Go to your phone Settings -> Accessibility -> Leather case function
Then disable the option "Leather case function".

That's it!

Read More

vendredi 21 juillet 2017

How to generate a C# entity of an SQL Server table

  Aucun commentaire

Hey, wassuuuuuuup 😆😆😝😝

Here is a trick for generating a C# entity of an SQL Server table.

For doing this, just execute the following SQL script... Don't forget to replace TableName in red with the name of the table...

declare @TableName sysname = 'TableName'
declare @Result varchar(max) = 'public class ' + @TableName + '
select @Result = @Result + '
    public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
        replace(, ' ', '_') ColumnName,
        column_id ColumnId,
            when 'bigint' then 'long'
            when 'binary' then 'byte[]'
            when 'bit' then 'bool'
            when 'char' then 'string'
            when 'date' then 'DateTime'
            when 'datetime' then 'DateTime'
            when 'datetime2' then 'DateTime'
            when 'datetimeoffset' then 'DateTimeOffset'
            when 'decimal' then 'decimal'
            when 'float' then 'float'
            when 'image' then 'byte[]'
            when 'int' then 'int'
            when 'money' then 'decimal'
            when 'nchar' then 'string'
            when 'ntext' then 'string'
            when 'numeric' then 'decimal'
            when 'nvarchar' then 'string'
            when 'real' then 'double'
            when 'smalldatetime' then 'DateTime'
            when 'smallint' then 'short'
            when 'smallmoney' then 'decimal'
            when 'text' then 'string'
            when 'time' then 'TimeSpan'
            when 'timestamp' then 'DateTime'
            when 'tinyint' then 'byte'
            when 'uniqueidentifier' then 'Guid'
            when 'varbinary' then 'byte[]'
            when 'varchar' then 'string'
            else 'UNKNOWN_' +
        end ColumnType,
            when col.is_nullable = 1 and in ('bigint', 'bit', 'date', 'datetime', 'datetime2', 'datetimeoffset', 'decimal', 'float', 'int', 'money', 'numeric', 'real', 'smalldatetime', 'smallint', 'smallmoney', 'time', 'tinyint', 'uniqueidentifier')
            then '?'
            else ''
        end NullableSign
    from sys.columns col
        join sys.types typ on
            col.system_type_id = typ.system_type_id AND col.user_type_id = typ.user_type_id
    where object_id = object_id(@TableName)
) t
order by ColumnId
set @Result = @Result  + '
print @Result

Original Source :

Read More

vendredi 14 juillet 2017

[06/2017] Bookmark of the Month

  Aucun commentaire
Read More