Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to create a Python dictionary from text file?
Assuming a following text file (dict.txt) is present1 aaa2 bbb3 cccFollowing Python code reads the file using open() function. Each line as string is split at space character. First component is used as key and second as valued = {} with open("dict.txt") as f: for line in f: (key, val) = line.split() d[int(key)] = val print (d)The output shows contents of file in dictionary form{1: 'aaa', 2: 'bbb', 3: 'ccc'}
Read MorePublishing data to SAP HANA database using Information Composer
Once data is published to HANA database, you cannot rename the table. In this case, you have to delete the table from Schema in HANA database.
Read MoreWhat is possible key/value delimiter in Python dictionary?
You can use any hashable object like int, string, etc as a key in a python dict. You need to separate it from the value using the ':' delimiter. The value can be any type of object. Consecutive key value pairs must be separated by a comma.
Read MoreWhat are the differences between struct and class in C++?
The members and base classes of a struct are public by default, while in class, they default to private. Struct and class are otherwise functionally equivalent.They are however used in different places due to semantics. a struct is more like a data structure that is used to represent data. class, on the other hand, is more of a functionality inclined construct. It mimics the way things are and work.
Read MoreHow do Python dictionary hash lookups work?
Dicts are hash tables. No tree searching is used. Looking up a key is a nearly constant time(Amortized constant) operation, regardless of the size of the dict. It creates the hash of the key, then proceeds to find the location associated with the hashed value. If a collision listed address is encountered, it starts the collision resolution algorithm to find the actual value.This causes dictionaries to take up more space as they are sparse.
Read MoreMeaning of Activation mode "Activate and ignore the inconsistencies in affected objects" in SAP HANA
This activation mode supports activating the selected objects even if it results in inconsistent affected objects. For example, if you choose to activate an object A that is used by B and C, and it causes inconsistencies in B and C but you can choose to go ahead with the activation of A.
Read MoreDefault Activation Mode in SAP HANA Modeler Perspective
The default activation mode is “Activate and ignore the inconsistencies in affected objects”.
Read MoreUsing Auto Documentation feature in SAP HANA Modeler Perspective
In SAP HANA Modeler Perspective, you can Auto Documentation feature to capture the details of an information model or a package in a single document. This helps you view the necessary details from the document, instead of referring to multiple table.
Read MoreDifference between 'struct' and 'typedef struct' in C++?
In C++, there is no difference between 'struct' and 'typedef struct' because, in C++, all struct/union/enum/class declarations act like they are implicitly typedef'ed, as long as the name is not hidden by another declaration with the same name.Though there is one subtle difference that typedefs cannot be forward declared. So for the typedef option, you must include the file containing the typedef before it is used anywhere.
Read MoreGetting error while using schema in SAP HANA Modeling
When you use object of a schema to build HANA modeling views then it’s necessary to grant _SYS_REPO the SELECT WITH GRANT privilege on this schema. You need to execute the following:GRANT SELECT ON SCHEMA "" TO _SYS_REPO WITH GRANT OPTIONTo use tables from one Schema to create views we should provide access on the Schema to the default user who runs all the Views in HANA Modeling._SYS_REPO user is responsible for activating models and creating the required runtime objects from them. This is the reason you need to provide user _SYS_REPO to select objects in tables and views in ...
Read More