Posts

How to check whether a character is an alphabet or not in C program

To do this get the character as input from a  variable and check the condition whether it is greater or equal from 'a' to 'z' and 'A' to 'Z'. Let's see a scenario where we can use it. Twin glitter doors are a type of bus door systems. This kind of door system for buses is suitable for city-bus entrance and exit doorways. In many of the buses, the door is automatically locked when no one gets into the bus. HIGHLIGHT automobile is the best manufacturer for such type of doors. To survive in the market they must implement some locking and unlocking mechanism. So they have decided to change the mechanism for unlocking the door. They allow the passenger to unlock the door by pressing any alphabets in the virtual keyboard. The door will unlock if and only if the passenger presses any alphabet. Write a C program to implement the above scenario. Test Case Input 1 A Output 1 Welcome! Happy Journey. Input 2 5 Output 2 Sorry! You ...

Android O to Be Revealed on Monday, in Total Solar Eclipse

Image
Android O to Be Revealed on Monday, the Day of the US Total Solar Eclipse There have been a lot of rumours surrounding what Google would name Android O. The company has used dessert names in its Android version nomenclature in the past, and it isn't expected to break that tradition this year. Many are hedging their bets on Android Oreo (Oatmeal Cookie,Octopus, and Orange are other contenders), and, a Google+ teaser posted for the Monday announcement may have inadvertently confirmed this. Notably, the Eclipse doesn't appear to make any visible hints as to the name, beyond the word 'sweet' - reinforcing the plausibility of a continued dessert naming scheme. If true, this wouldn't be the first time that Google has partnered with a major brand - it had associated with Nestle for Android 4.4 KitKat. This time around, it may tie up with Nabisco.

Call a function based on the onchange-event

Image
StackOverflow Question:My Answer I have been used addEventListener in change state so that it will easy to call two different functions by select tag HTML. Check the link given below. <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">     <title></title>   </head>   <body>     <h1 id="eg"></h1>     <select id = "nextGeneration"  >   <option value="1">1</option>   <option value="2">2</option>     </select>     <script type="text/javascript">     document.getElementById("nextGeneration").addEventListener("change", function(){     if(document.getElementById("nextGeneration").value == "1")     {       F1();     }     else if (document.getE...

Get value of variable from function for use in another function (JavaScript)

Answer for this question <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">     <title></title>   </head>   <body>     <h1 id="eg"></h1>     <button type="button" name="button" onclick="firstFunc()">Click me</button>     <button type="button" name="button" onclick="secondFunc()">Click me</button>     <script type="text/javascript">     var x = 0;     function firstFunc(){         x = 1     }     function secondFunc(){         alert(x);     }     </script>   </body> </html> Comment whether this answer is correct or not.

Calling Multiple function in javascript

Image
Is it possible to call two or multiple functions in javascript ???? Let's see on this blog, First Method The most common way to call multiple functions through on-click in  HTML  such as <input type="text" name="" value="" onclick="fun1();fun2()"> In on-click it should be separated by ; By using this we can call n number of function in javascript.Let's see an example code. <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">     <title></title>   </head>   <body>     <h1 id="eg"></h1>         <button type="button" name="button" onclick="function1();function2()">Click me</button>     <script type="text/javascript">       function function1()       {         alert("hi");   ...

Xiaomi Redmi Note 5A

Image
Redmi Note 5A is going to be launch on August 21,2017 in china. The Redmi Note 5A has been tipped to come with a 13-megapixel rear camera and a 5-megapixel camera at front for taking selfies. The handset is expected to run Android 7.1.1 Nougat out-of-the-box. The Redmi Note 5 is expected to come with 16Gb built-in storage and feature a 3790mAh battery but the pared-down ‘5A’ variant is expected to house a 3080mAh battery. Redmi Note 5A has been tipped to measure 153×76.2×7.59mm and weigh 150 grams. The smartphone will be made available in the black, rose gold, gold, white, blue, red, pink, gray and silver coloured variants. Previous leaks attribute the Xiaomi Redmi Note 5A to be priced at around 1,000 Yuan (approximately Rs 9,500). There is no information about the phone’s India launch as yet.

Moto G 4th edition

Image
                       The Motorola Moto G4 Plus is powered by 1.5GHz octa-core Qualcomm Snapdragon 617 processor and it comes with 2GB of RAM. The phone packs 16GB of internal storage that can be expanded up to 128GB via a microSD card. As far as the cameras are concerned, the Motorola Moto G4 Plus packs a 16-megapixel primary camera on the rear and a 5-megapixel front shooter for selfies.                         The Motorola Moto G4 Plus runs Android 6.0.1 and is powered by a 3000mAh non removable battery. It measures 153.00 x 76.60 x 7.90 (height x width x thickness) and weigh 155.00 grams. The Motorola Moto G4 Plus is a dual SIM (GSM and GSM) smartphone that accepts Micro-SIM and Micro-SIM. Connectivity options include Wi-Fi, GPS, Bluetooth, USB OTG, FM, 3G ...

Fibonacci Modified

I just solved a problem in HackerRank in Dynamic programming,so  that i want to share with you all. Problem Statement Direct Link: Click here I solved in python 3 and I hope it will be helpful to you. Program Code: t1, t2, n = map(int, input().split()) #get the input values while n>2: temp = t2 t2 = t1 + t2**2#logic n -= 1 t1 = temp print(t2) Output: 0 1 10 84266613096281243382112

HackerRank-Beautiful Days at the Movies

I just solved this problem in python,so that i want to share with you. Problem: Lily likes to play games with integers and their reversals . For some integer , we define to be the reversal of all digits in . For example, , , and . Logan wants to go to the movies with Lily on some day satisfying , but he knows she only goes to the movies on days she considers to be beautiful . Lily considers a day to be beautiful if the absolute value of the difference between and is evenly divisible by . Given , , and , count and print the number of beautiful days when Logan and Lily can go to the movies. Input Format A single line of three space-separated integers describing the respective values of , , and . Constraints Output Format Print the number of beautiful days in the inclusive range between and . Sample Input 20 23 6   Sample Output 2   Explanation Logan wants to go to the movies on days , , , and . We perfor...