Now, in this section, we will see how we can use the Motorola M6800 Microprocessor to add multi-Byte numbers.AddingMulti-Byte NumberIn this example, we are using 4-Byte numbers (56 2F 7A 89)16 and (21 FB A9 AF)16In the memory, at first, we are storing the Byte counts, and then the numbers (from least significant Bytes to Most significant Bytes) in different segments. So after storing the data, the memory structure will be looking like thisAddressValue5000H04H...5050H89H5051H7AH5052H2FH5053H56H...5070HAFH5071HA9H5072HFBH5073H21H...Now, we are writing a program to add these two 4-Byte number and store the result at location 5090H onwards.Program CLC LDX#$5050 ... Read More
JSON stands for Javascript object notation. Most of the when dealing with APIs or any other services the data is returned in JSON format and we need to convert it to usable and supporte language formats.Foundation framework of iOS provides a class JSONSerialization to convert JSON into supported formats like Dictionary, strings, Bool etc.The JSONSerialization class provides a method jsonObject(with:options:) that parses json and returns Any as result, and an error if the data cannot be parsed.// Example JSON: /* { "age": 42.0, "name": { "firstName": “tut” } } */Let’s see this with help ... Read More
The !important rule provides a way to make your CSS cascade. It also includes the rules that are to be applied always. A rule having a !important property will always be applied, no matter where that rule appears in the CSS document.ExampleFor example, in the following style sheet, the paragraph text will be black, even though the first style property applied is red: ExampleIf you want to make sure that a property always applied, you would add the !important property to the tag. Therefore, to make the paragraph text always red, you should write it as follows :Live ... Read More
Set the month format as MMMM, while including the date-time format in SimpleDateFormat object.Firstly, set the date objectDate dt = new Date();Now, set the format for date-timeSimpleDateFormat dateFormat = new SimpleDateFormat("EEEE MMMM dd yyyy kk:mm:ss");Display the date with the format you wantdateFormat.format(dt)The following is an exampleExample Live Demoimport java.text.SimpleDateFormat; import java.util.Date; public class Demo { public static void main(String[] argv) throws Exception { Date dt = new Date(); SimpleDateFormat dateFormat; dateFormat = new SimpleDateFormat("EEEE MMMM dd yyyy kk:mm:ss"); System.out.println(dateFormat.format(dt)); } }OutputThursday November 22 2018 11:45:14
The Calendar.after() method returns whether this Calendar's time is after the time represented by the specified Object.First, let us set a date which is after (future date) the current dateCalendar afterDate = Calendar.getInstance(); afterDate.set(Calendar.YEAR, 2025); afterDate.set(Calendar.MONTH, 05); afterDate.set(Calendar.DATE, 30);Here is our date, which is 11-22-2018Calendar currentDate = Calendar.getInstance();Now, use the after() method to compare both the dates as shown in the following exampleExample Live Demoimport java.util.Calendar; public class Demo { public static void main(String[] args) { Calendar afterDate = Calendar.getInstance(); afterDate.set(Calendar.YEAR, 2025); afterDate.set(Calendar.MONTH, 05); afterDate.set(Calendar.DATE, 30); ... Read More
Great leaders and entrepreneurs from Bill Gates to Steve Jobs, from Winston Churchill to Mahatma Gandhi had the courage to dream something. Every great movement in history has the dream and vision of these personalities recorded.Dreams can be understood as aspirations and ambitions of a person to achieve a target or a goal in life for at an individual level or for a social cause. To achieve success in true spirit in your life, dreams play a very significant role. It can be understood by the following points -Give Momentum To the LifeDreams help an individual get a purpose in ... Read More
When developing API based web applications we definitely need to interect with Multiple web services and URLs. The url may contain special character, search terms, queries, headers and many other things depending on the service we need. That’s why we need to have some kind of encoding so that the URL we are creating and the URL being called are same.To achieve the same with Objective C we can use −#import "NSString+URLEncoding.h" @implementation NSString (URLEncoding) -(NSString *)urlEncodeUsingEncoding:(NSStringEncoding)encoding { return (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef)@"!*'\"();:@&=+$, /?%#[]% ", CFStringConvertNSStringEncodingToEncoding(encoding)); } @endAnother way to achieve URL encoding in Objective C is ... Read More
There are times we would like to close our application due to some reason, for example if there is no internet connection and you’d like to kill the app, or any other reason according to the application. Though apple prefers not quitting the application, hence it is not supported in any of the applications.The only way to logically kill an iOS application is by pressing the home button. As soon as the home button is pressed, and the application exits the memory is freed up and cleaned.Still there are other ways to quit an application.exit − this command may be ... Read More
The Calendar.before() method returns whether this Calendar's time is before the time represented by the specified Object.First, let us set a date which is in the past (past date)Calendar beforeDate = Calendar.getInstance(); beforeDate.set(Calendar.YEAR, 2010); beforeDate.set(Calendar.MONTH, 05); beforeDate.set(Calendar.DATE, 30);Here is our date, which is 11-22-2018Calendar currentDate = Calendar.getInstance();Now, use the before() method to compare both the dates as shown in the following exampleExample Live Demoimport java.util.Calendar; public class Demo { public static void main(String[] args) { Calendar beforeDate = Calendar.getInstance(); beforeDate.set(Calendar.YEAR, 2010); beforeDate.set(Calendar.MONTH, 05); beforeDate.set(Calendar.DATE, 30); ... Read More
Intel 8085 is an 8-bit microprocessor which has 16 address line for 16-bit address of a memory location. 8 higher order address bits are transferred through 8 bit lines out of this 16 address line while remaining lower order 8 bits of the address are sent through another 8 lines multiplexed with the 8-bit data lines. ALE (Address Enable Latch) is the control signal which is nothing but a positive going pulse generated when a new operation is started by microprocessor. So when pulse goes high means ALE=1, it makes address bus enable and when ALE=0, means low pulse makes ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP