Convert Decimal to Octal

Ankith Reddy
Updated on 26-Jun-2020 06:05:00

18K+ Views

Decimal system is most familiar number system to the general public. It is base 10 which has only 10 symbols − 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Whereas octal system is one of the number systems to represent numbers. It is base 8 which has only 8 symbols − 0, 1, 2, 3, 4, 5, 6, and 7.Conversion from Decimal to Octal number systemThere are various direct or indirect methods to convert a decimal number into octal number. In an indirect method, you need to convert a decimal number into other number system (e.g., binary ... Read More

Display HTML in TextView in Android

George John
Updated on 26-Jun-2020 05:51:31

6K+ Views

In Some situations, we should need to show HTML as text in android. Here is the simple solution to show HTML in TextView in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; import android.support.v4.text.HtmlCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    String htmlText = "What is Android?" + "Android is an open source and Linux-based ... Read More

Difference Between Gravity and Layout Gravity in Android

Ankith Reddy
Updated on 26-Jun-2020 05:48:05

1K+ Views

Android supports both gravity and layout_gravity. Gravity adjusts view position. Using gravity we can do alignment of view as shown below.In the above code Textview going to set in middle of parent layout.Properties of GravityCenter − it going to put view in center of parent layout.Right − it going to put view in right of parent layout.Left − it going to put view in left of parent layout.End − it going to put view in end position of parent layout.Start − it going to put view in start position of parent layout.Top − It going to put view in Top ... Read More

Display Astrological Sign for Given Date of Birth in Java

karthikeya Boyini
Updated on 26-Jun-2020 05:42:05

7K+ Views

Each date of birth corresponds to a given Zodiac sign. A table that demonstrates these signs and their corresponding dates is given below −Zodiac SignDateAriesMarch 21 - April 19TaurusApril 20 - May 20GeminiMay 21 - June 20CancerJune 21 - July 22LeoJuly 23 - August 22VirgoAugust 23 - September 22LibraSeptember 23 - October 22ScorpioOctober 23 - November 21SagittariusNovember 22 - December 21CapricornDecember 22 - January 19AquariusJanuary 20 - February 18PiscesFebruary 19 - March 20A program that displays the Astrological sign or Zodiac sign for a given date of birth is given as follows.Example Live Demopublic class Example {    public static void ... Read More

Create Notification with NotificationCompat Builder in Android

George John
Updated on 26-Jun-2020 05:38:04

4K+ Views

Before getting into NotificationCompact.Builder, we should know what is a notification in android. Notification is just like as a message showing system on the action bar. just like missed call notification as shown belowThis example demonstrates how to integrate Android Notification.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project, and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.annotation.SuppressLint; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import ... Read More

Design Custom Toast Message in Android

Arjun Thakur
Updated on 26-Jun-2020 05:26:43

1K+ Views

Before getting into Custom Toast, we should know about what is toast. Toast is used to display message on current screen for sometime. After some time it doing to disappear. In this example we can learn how to customize toast message.This example demonstrate about how to create custom toast message in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.               Step 3 − Add the following ... Read More

Pass Drop Down Box Data to Python CGI Script

Rajendra Dharmkar
Updated on 25-Jun-2020 21:12:50

561 Views

Passing Drop Down Box Data to CGI ProgramDrop Down Box is used when we have many options available but only one or two will be selected.Here is example HTML code for a form with one drop down box − Maths Physics The result of this code is the following form − SubmitBelow is dropdown.py script to handle input given by web browser.#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form ... Read More

Connect SAP Server to Java Application Using SAP JCO

Prabhas
Updated on 25-Jun-2020 21:09:32

2K+ Views

I would suggest you to use below instead of JCO_AHOST and JCO_SYSNR:Use JCO_R3NAME with system ID of the target hostUse JCO_MSHOST with message server host name or IP addressUse JCO_MSSERV with message server port numberUse JCO_GROUP with the name of the logon groupYou can refer to below link to check a working example:https://sourceforge.net/p/rcer/git/ci/master/tree/net.sf.rcer.conn

Handling String Localization Hardcoding Issues in ERP Systems

SAP ABAP Expert
Updated on 25-Jun-2020 20:54:53

271 Views

This can be handled by keeping value same and just change meaning as below:'Y'(Yes) or 'N'(No)Should be like this for German-'Y'(Ja) or 'N'(Nein)

Add Milliseconds to Date in SAP HANA

Anil SAP Gupta
Updated on 25-Jun-2020 20:53:10

761 Views

Try using ADD_SECONDS function as below:SELECT ADD_SECONDS (TO_TIMESTAMP('2017-07-15 02:17:15'), 0.1) FROM TESTThis will add seconds as fraction value as requested. Below is syntax and example:ADD_SECONDS SyntaxADD_SECONDS (t, n)DescriptionComputes the time t plus n seconds.Example:SELECT ADD_SECONDS (TO_TIMESTAMP ('2012-01-01 23:30:45'), 60*30) "add seconds" FROM DUMMY; add seconds2012-01-02 00:00:45.0To know more about ADD_SECONDS function, you can also refer this link:datetime function in SAP HANATo know more about SQL functions in SAP HANA system, you can also refer our HANA tutorial:SAP HANA SQL FunctionsRead More

Advertisements