Memory Layout of C Programs

Nishtha Thakur
Updated on 30-Jul-2019 22:30:25
The memory layout for C programs is like below. There are few levels. These are −Stack SegmentHeap SegmentText SegmentData segmentNow let us see what are the functionalities of these sections.Sr.NoSections & Description1StackThe process Stack contains the temporary data such as method/function parameters, return address and local variables. It is an area of memory allotted for automatic variables and function parameters. It also stores a return address while executing function calls. Stack uses LIFO (Last- In-First-Out) mechanism for storing local or automatic variables, function parameters and storing next address or return address. The return address refers to the address to return ... Read More

Time Functions in Python?

Chandu yadav
Updated on 30-Jul-2019 22:30:25
Python provides library to read, represent and reset the time information in many ways by using “time” module. Date, time and date time are an object in Python, so whenever we do any operation on them, we actually manipulate objects not strings or timestamps.In this section we’re going to discuss the “time” module which allows us to handle various operations on time.The time module follows the “EPOCH” convention which refers to the point where the time starts. In Unix system “EPOCH” time started from 1 January, 12:00 am, 1970 to year 2038.To determine the EPOCH time value on your system, ... Read More

Who is the best VoIP provider in the USA?

Siddhu K
Updated on 30-Jul-2019 22:30:25
When we look for any service, we will gather the information about the product -- whether it gives value for the price, after-sales service and other customers' reviews about the product.When we take all these into consideration, the best Voice over Internet Protocol (VoIP) in the USA is AT & T. My sister and all my cousins are using it for a long time and they say, it is very reliable and service is also very good.

8085 program to add three 16 bit numbers stored in registers

Arjun Thakur
Updated on 30-Jul-2019 22:30:25
In this program we will see how to add three 16-bit numbers stored in register pairs.Problem StatementWrite 8085 Assembly language program to add three 16-bit numbers stored in register pair BC, DE and HL. Store the result at DE register pair.DiscussionIn this program we are storing the 16-bit numbers into BC, DE and HL pair. We have DAD D instruction which helps to add HL and DE register pair, and store the result into HL pair. After that copy BC to DE, then again perform DAD D to add them. Finally using XCHG we are storing them into DE register ... Read More

How to use Radar Chart graph in android?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25
This example demonstrates How to use Radar chart graph 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 − Open build.gradle(module level) and add library dependency.apply plugin: 'com.android.application' android {    packagingOptions {       exclude 'META-INF/proguard/androidx-annotations.pro'    }    packagingOptions {       exclude 'META-INF/DEPENDENCIES'       exclude 'META-INF/LICENSE'       exclude 'META-INF/LICENSE.txt'       exclude 'META-INF/license.txt'       exclude 'META-INF/NOTICE'       exclude 'META-INF/NOTICE.txt'       exclude 'META-INF/notice.txt'       ... Read More

How to delete documents from a collection in MongoDB?

Daniol Thomas
Updated on 30-Jul-2019 22:30:25
To delete the documents from a collection in MongoDB, you need to use remove() method. The syntax is as follows:db.yourCollectionName.remove(yourDeleteValue);Here, let us create a collection with some documents. The query is as follows:>db.deleteDocuments.insert({"UserId":1, "UserName":"Bob", "UserTechnicalSubject":"Introducti on to PL/SQL"}); WriteResult({ "nInserted" : 1 }) >db.deleteDocuments.insert({"UserId":2, "UserName":"Carol", "UserTechnicalSubject":"Introduction to MongoDB"}); WriteResult({ "nInserted" : 1 }) >db.deleteDocuments.insert({"UserId":3, "UserName":"John", "UserTechnicalSubject":"Introduction to MySQL"}); WriteResult({ "nInserted" : 1 }) >db.deleteDocuments.insert({"UserId":4, "UserName":"Maxwell", "UserTechnicalSubject":"Introduction to SQL Server"}); WriteResult({ "nInserted" : 1 })You can display all documents from the collection we created above with the help of find() command. The query is as follows:> db.deleteDocuments.find().pretty();The following ... Read More

What is a scriptlet in JSP and what is its syntax?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25
A scriptlet can contain any number of JAVA language statements, variable or method declarations, or expressions that are valid in the page scripting language.Following is the syntax of Scriptlet −You can write the XML equivalent of the above syntax as follows − code fragment Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is the simple and first example for JSP −           Hello World               Hello World!      

How to insert images in Database using JDBC?

Nancy Den
Updated on 30-Jul-2019 22:30:25
The setBinaryStream() method of the PreparedStatement interface accepts an integer representing the index of the parameter and an InputStream object and sets the parameter to the given InputStream object. Whenever you need to send very large binary value you can use this method.And SQL databases provide a datatype named Blob (Binary Large Object) in this you can store large binary data like images.Storing image using JDBCIf you need to store an image in a database using the JDBC program create a table with a Blob datatype as shown below:CREATE TABLE Tutorial(Name VARCHAR(255), Type INT NOT NULL, Logo BLOB);Now, using JDBC, connect ... Read More

LocalDateTime getDayOfWeek() method in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25
The day of the week for a particular LocalDateTime can be obtained using the getDayOfWeek() method in the LocalDateTime class in Java. This method requires no parameters and it returns the day of the week.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { public static void main(String[] args) { LocalDateTime ldt = LocalDateTime.parse("2019-02-18T11:30:15"); System.out.println("The LocalDateTime is: " + ldt); System.out.println("The day of the week is: " + ldt.getDayOfWeek()); } ... Read More

LongStream summaryStatistics() method in Java

Smita Kapse
Updated on 30-Jul-2019 22:30:25
The summaryStatistics() method in the LongStream class in Java returns a LongSummaryStatistics describing various summary data about the elements of this stream.The syntax is as follows −LongSummaryStatistics summaryStatistics()Here, LongSummaryStatistics is a state object for collecting statistics such as count, min, max, etc.To use the LongStream class in Java, import the following packageimport java.util.stream.LongStream;Create LongStream and add some elements −LongStream longStream = LongStream.of(30000L, 15000L, 20000l, 25000l, 30000l);Now, get the statistics −LongSummaryStatistics info = longStream.summaryStatistics(); The following is an example to implement LongStream summaryStatistics() method in Java −Example Live Demoimport java.util.stream.LongStream; import java.util.LongSummaryStatistics; public class Demo { public static ... Read More
Advertisements