Create a Complex Number in Python

Malhar Lathkar
Updated on 24-Feb-2020 10:04:52

216 Views

Complex number is made up of real and imaginary parts. Real part is a float number, and imaginary part is any float number multiplied by square root of -1 which is defined as j.>>> no=5+6j >>> no.real 5.0 >>> no.imag 6.0 >>> type(no) The resulting object is of complex data type. Python library also has complex() function, which forms object from two float arguments>>> no=complex(5,6) >>> no (5+6j) >>> no.real 5.0 >>> no.imag 6.0 >>> type(no)

Convert Object to String Representation in Python

Malhar Lathkar
Updated on 24-Feb-2020 09:54:15

293 Views

Most commonly used str() function from Python library returns a string representation of object.>>> no=100 >>> str(no) '100' >>> L1=[1,2,3,4] >>> str(L1) '[1, 2, 3, 4]' >>> d={'a': 1, 'b': 2, 'c': 3, 'd': 4} >>> str(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}"However, repr() returns a default and unambiguous representation of the object, where as str() gives an informal representation that may be readable but may not be always unambiguous.>>> str(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}" >>> repr(d) "{'a': 1, 'b': 2, 'c': 3, 'd': 4}" >>> repr(L1) '[1, 2, 3, 4]' >>> repr(no) '100'

Create a JAR File

usharani
Updated on 24-Feb-2020 09:39:53

24K+ Views

You can create a JAR file using the following command.jar cf jar-file input-file(s)  You can also create JAR files using IDE’s. To create a JAR file using eclipse follow the procedure given below.Open the Jar File wizardThe Jar File wizard can be used to export the content of a project into a jar file. To bring up the Jar File wizard −In the Package Explorer select the items that you want to export. If you want to export all the classes and resources in the project just select the project.Click on the File menu and select Export.In the filter text box ... Read More

HANA Modeling Objects and Content Folder in SAP HANA Studio

John SAP
Updated on 24-Feb-2020 09:37:05

975 Views

In SAP HANA Studio, Content folder contains all the design time repository objects. In this folder, all objects created in HANA system are managed under packages. To create a new object, you have to first select a Package.In a package you have different HANA Modeling Views- Attribute Views, Analytic Views, Calculation Views and Analytic Privileges. Each of the object type is managed in different folder in a package.

Different Objects Inside a Package in SAP HANA

John SAP
Updated on 24-Feb-2020 09:36:24

268 Views

Following objects are available in a Package under Content tab in HANA system −Attribute ViewsAnalytic ViewsCalculation ViewsAnalytic PrivilegeStored ProceduresSub-PackagesDecision Tables

Difference between SYS_BIC and SYS_BI Schema in SAP HANA

John SAP
Updated on 24-Feb-2020 09:29:09

3K+ Views

_SYS_BIC schema in SAP HANA database is used to store column views of all the activated objects in HANA repository.  When an object is created and activated (HANA Modeling views, Stored Procedures), run time objects are saved under _SYS_BIC/Column views in database.These column views are used by front-end tools like BusinessObjects to get the data in a query._SYS_BI:This schema in HANA system stores table created for variables, time dimension- Gregorian, Fiscal and schema and content mapping tables.

Use of SYS_REPO in SAP HANA Database

John SAP
Updated on 24-Feb-2020 09:26:06

2K+ Views

In SAP HANA system _SYS_REPO user is required to create run time objects that are saved in HANA database under _SYS_BIC schema. When you activate modeling views in HANA, SYS REPO provides the read access to users on these modeling views. That is why it is required to grant _SYS_REPO with SELECT with GRANT privilege to user schemas.GRANT SELECT ON SCHEMA "SCHEMA_NAME" TO _SYS_REPO WITH GRANT OPTIONThis is required when you use objects of a table/view of a schema to build HANA Modeling Views. You need to grant _SYS_REPO the SELECT WITH GRANT privilege on this schema.Read More

SAP Interfaces Error: Completion Code 2, Reason 2161 (MQJMS2002)

Monica Mona
Updated on 24-Feb-2020 09:22:46

226 Views

As per my understanding,  the only way to get the MQ jar files or the MQ C/C++ library files onto a system is by installing any of the below:Using WebSphere MQ product orUsing WebSphere MQ Client SupportPacsYou can find jar file under WebSphere MQ V7.0 Clients SupportPacks. The install files are commonly available under java/lib directory.You can try installing jar files from Fix Central. Go to Fix Central and enter "Java" in the Text search box.https://www-945.ibm.com/support/fixcentral/swg/identifyFixes?query.parent=ibm~WebSphere&query.product=ibm~WebSphere~WebSphere%20MQ&query.release=9.0&query.platform=AllThe name of the file to be downloaded is in this format:-[IBM|WS]-MQ-Install-Java-All.jar.For example, for MQ V9.0:9.0.0.0-IBM-MQ-Install-Java-All.jar.You have the following files that can be moved to ... Read More

Java Memory Model

Alankritha Ammu
Updated on 24-Feb-2020 09:21:54

3K+ Views

Java memory model is divided between Thread Stacks (One for each thread) and a heap area.Thread Stack: It is a thread specific memory area and contains local variables, methods call information etc. JVM stacks could be of fixed size or variable size. If computation in a thread exceeds its stack size limit then JVM throws StackOverflowError and exits.HeapIt contains all the objects created during application lifecycle. The heap is created when the virtual machine starts up. Garbage collector reclaims heap storage for objects and objects are never explicitly deallocated. The JVM is not using any automatic storage management system, and ... Read More

Adding a New Remote Data Source in SAP HANA SDA

John SAP
Updated on 24-Feb-2020 09:20:07

431 Views

Select the system that you want to access as Remote Data Source and enter the authentication details. You have to enter the Connection Properties and Credentials for remote system.On right hand side, you have option to Test the Connection or you can also run to create the data source.

Advertisements