Javascript Cheatsheet – Documentation and Code Snippets
Javascript is a scripting language, created to run in the Internet browser but later used in all places!. Javascript is always shortened as js or JS. Javascript Syntax 🔗 Variables 🔗 // declare a variable var ourName; // store values myNumber = 5; myString = "myVar"; // declare variables with the assignment operator var myNum = 0; // add, subtract, multiply and divide numbers myVar = 5 + 10; // 15 myVar = 12 - 6; // 6 myVar = 13 * 13; // 169 myVar = 16 / 2; // 8 // increment and decrement numbers i++; // the equivalent of i = i + 1 i--; // the equivalent of i = i - 1; // decimals var ourDecimal = 5.
How to Convert Arabic Numbers to Hindi Excel ?
if you want to convert numeric numbers (1234567890) to Arabic numbers (Hindi)(١٢٣٤٥٦٧٨٩٠) select the area of cells that you want to change press ctrl + 1 for format cell go to custom and type this code: [$-2060000]0 Note: Hindi numbers are ١٢٣٤٥٦٧٨٩٠ but we generally call them Arabic numbers which is not correct.
How to show hidden files in Finder in MacOS ?
Unveiling the Hidden: How to Show Hidden Files in macOS Finder Ever misplaced a file or folder in your Mac and suspect it might be hidden? Fear not! macOS hides certain system files by default, but you can easily reveal them with a few simple tricks. Here are three methods to show hidden files in your Finder: Method 1: Using the Keyboard Shortcut (Simple & Quick) 🔗 Open any Finder window.
How to create a Sliding Notification in Your Android App?
This guide will walk you through creating a custom notification that slides up from the bottom of the screen in your Android application. 1. Designing the Notification Layout (XML) 🔗 We’ll define a background drawable for the notification using an XML file named popup_background.xml. The code creates a rectangular shape with rounded corners, a solid color fill, and a black border. <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#C999" /> <corners android:topLeftRadius="10sp" android:topRightRadius="10sp"/> <stroke android:color="#000000" android:width="1sp"/> </shape> Next, we’ll create the layout for the notification itself (e.
How to put a Button at the bottom of the screen ? - Android Development
the whole gravity / layout_gravity is a bit confusing, so here is a snippet: <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" android:gravity="center_horizontal|bottom"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" Back " android:id="@+id/btn_back"/> </LinearLayout> The line of code that makes the button at the bottom is android:gravity="center_horizontal|bottom".
How to change text size in Android app development : Kotlin & Flutter
Text size plays a crucial role in user experience, especially on mobile devices. This tutorial will guide you on implementing text size adjustments in both Android (using Kotlin) and Flutter applications. Understanding Text Size Options 🔗 Default System Settings: Both Android and iOS allow users to adjust the overall font size in their system settings. Your app should respect these settings by default. In-App Adjustments: You can provide additional control within your app for users to further personalize the text size.
Android Emulator Avd Notes
to create a test project 🔗 android update test-project -m ./path/main_project/ -p ./path/test_project/ to launch emulator 🔗 emulator -avd ADB server & list attached devices 🔗 adb devices adb start-server
Intelligent Failure
Intelligent failure is when you learn from your failures. So you do not fail again in the same trap. make sure to analyse the system and detect the failure cause, modify the system so the failure does not occur again. This appraoch is perfect for all system that need to be versatile in the future. This appraoch is used in technology-development and self-improvement.
How Do I Reduce a PDFs Size Manually?
Adobe Acrobat Pro 🔗 If you have Adobe Acrobat installed on your computer, there’s a tool within the application called PDF Optimizer. This is one of the best and easiest ways to reduce a PDF document size. Open your PDF file in Acrobat, click Tools > Optimize PDF. A toolbar with a few options will appear just above the PDF. Click Reduce File Size, and choose to reduce a single or multiple files.
How Do I Compress a .JPEG File ?
Use A Web App 🔗 Navigate to compressor.io or squoosh.app and upload the image to compress it for free. Then downlad the compressed / optimized version of the image. Use FFMpeg on Terminal / CLI 🔗 Open terminal in Mac OS or Any Linux distribution (Ubuntu, Elementary, ..) and use this command. ffmpeg -i input-image.jpeg -q:v 10 output-image.jpg -y make sure to replace input-image.jpeg with your image. And rename output-image.