Deadlock and Starvation in Chash

George John
Updated on 22-Jun-2020 10:52:20

2K+ Views

Deadlock occurs when a resource is locked by a thread and is required by another thread at the same time. This problem occur frequenty in a multiprocessing system.It can occur when two or more threads wait for a resource that belon to another thread. Here is an example −Thread OneThread TwoTakes Lock PTakes Lock QRequests Lock QRequests Lock PThread One will not get Lock Q since it belongs to Thread Two. In the same way, Thread Two won’t get Lock P since its original owner is Thread One.Deadlocks can also be a three-way deadlock that occurs if three threads and ... Read More

Synchronization of ArrayList in Chash

Ankith Reddy
Updated on 22-Jun-2020 10:52:04

351 Views

Use the ArrayList.Synchronized Method in C# for synchronization of ArrayList in C#.Let us see an example to lock the collection using SyncRoot property in C# −ArrayList arr = new ArrayList(); lock(arr.SyncRoot) {    foreach (object ele in arr) {    } }The following is the complete example to check the synchronization status of ArrayList −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       ArrayList arr1 = new ArrayList();       arr1.Add("One");       arr1.Add("Two");       arr1.Add("Three");       arr1.Add("Four");       arr1.Add("Five");     ... Read More

Restrictions on Rows and Columns in MySQL Queries without Table List

vanithasree
Updated on 22-Jun-2020 10:51:26

132 Views

The restriction on MySQL query having a notable list is that it can return, as a result, exactly one row but that result can contain multiple columns.Examplemysql> Select 65/NULL,65+NULL,65*NULL,65-NULL,65%NULL; +------------+--------------+-------------+-------------+---------+ | 65/NULL    | 65+NULL      | 65*NULL     | 65-NULL     | 65%NULL | +------------+--------------+-------------+-------------+---------+ |       NULL |         NULL |        NULL |        NULL |    NULL | +------------+--------------+-------------+-------------+---------+ 1 row in set (0.00 sec)In the above example, we can see that MySQL returns only one row with five columns, having the result of five expressions, as a result when we do not have any table list in the statement.

Execution Time of SQL Query in HANA Studio

John SAP
Updated on 22-Jun-2020 10:49:45

812 Views

When a SQL query is executed, you can see the confirmation that the query is executed in time duration and also with server processing time. In this scenario, you can see the time taken by SAP HANA processor to create a new table in the HANA database as below −“Statement 'Create Table Demo_HANA ( ID INTEGER, NAME VARCHAR(10), PRIMARY KEY (ID) )' successfully executed in 3 ms 117 µs  (server processing time − 2 ms 458 µs) - Rows Affected − 0”

Create Table SQL Query in SAP HANA

John SAP
Updated on 22-Jun-2020 10:48:44

9K+ Views

In below SQL query, you can see a create table command in SQL editor to create a new table with name-“Demo_HANA” in schema name AA_HANA11 with column names- ID and NAME and corresponding data types. In the below example, we have defined ID as “Primary Key” which means it is unique and not null.Create Table Demo_HANA (    ID INTEGER,    NAME VARCHAR(10),    PRIMARY KEY (ID) );

SAP HANA Database Functions in HANA Cockpit

John SAP
Updated on 22-Jun-2020 10:47:44

573 Views

If you open SAP HANA cockpit, you can see different database functions in the HANA system − https://best:4303/sap/hana/admin/cockpit

Significance of MySQL Prompt Change in Multiple-line Queries

V Jyothi
Updated on 22-Jun-2020 10:47:10

93 Views

After writing the first line of multiple-line queries, MySQL changes promptly from ‘mysql>’ to ‘→’. It is significant because with the help of it we got an indication that MySQL has not seen a complete statement yet and is waiting for the rest. Consider the example below,mysql> Select *     -> from     -> stock_item;We know that after writing the first line i.e. ‘Select *’ Mysql changes its prompts which means that yet the state has not been completed. After the semicolon, MySQL considers the statement completed and throws the output.

Viewing Data in a Table in SAP HANA Database

John SAP
Updated on 22-Jun-2020 10:45:47

2K+ Views

When the data is entered, you can see the data in this row-based table by going to the Data Preview option. To see the data, right-click on table name → Open Data PreviewWhen you run Data Preview of a table, you can see full data under the Raw Data tab. You can also view distinct values and perform some analysis.

Using DSN Name with Remote Source in SAP HANA

John SAP
Updated on 22-Jun-2020 10:44:33

412 Views

In below SQL statement you have to define orcl_DSN_Name −CREATE REMOTE SOURCE Source_Name ADAPTER “odbc” CONFIGURATION FILE ‘property_orcl.ini’ CONFIGURATION ‘DSN=oral_DSN_Name’ WITH CREDENTIAL TYPE ‘PASSWORD’ USING ‘user=username;password=password′;In this SQL statement- can be as per remote data source and take these values- TDODBC, HIVEODBC, ASEODBC, IQODBC and ODBC.In above statement, is used to specify the connection information for data source where you need to mention the DSN name for your ODBC remote source system. You have to create a System DSN/User DSN to access the data source using ODBC connection. To create an ODBC DSN in system, you need to ... Read More

Align Elements Using the CSS Float Property

varma
Updated on 22-Jun-2020 10:34:45

205 Views

To align elements using the float property in CSS, you can try to run the following code −ExampleLive Demo                    .demo {             float: right;             width: 200px;             border: 1px dashed blue;             padding: 5px;          }                     Heading                This is demo text and right aligned.           Output

Advertisements