Published in Level Up Coding·PinnedMember-only10 Python Hacks in 30 Seconds1. Checking All Element The Same in A List def all_equal(lst): """ It returns True if all the elements in the list are equal, and False otherwise :param lst: The list to check :return: True or False """ return lst[1:] == lst[:-1] all_equal([1, 2, 3, 4, 5, 6]) # False all_equal([1, 1, 1, 1]) # True 2. Checking All Element Unique in A List def all_unique(lst): """…Python4 min readPython4 min read
17 hours agoMember-only71 Linux Commands For Platform EngineeringThis article aims to explain and demo 71 frequently used commands for platform engineering. Checkout if you missed any in your toolbox. Let’s dive in… 1. ls — list directory contents $ ls $ Desktop Documents Downloads Music Pictures Public Templates Videos 2. cd — change directory #change to Desktop directory $ cd Desktop #change to parent directory $ cd .. 3. pwd — print name of current/working directoryLinux6 min readLinux6 min read
Published in Level Up Coding·1 day agoMember-onlyA Step-By-Step Guide to Crack Wifi Password with PythonThis article aims to guide curious ones like you, techy or non-techy gaining easy wifi access anywhere you go with python. Let’s dive in… 1. Dependency pywifi pywifi provides a cross-platform Python module for manipulating wireless interfaces. Easy to use; Supports Windows and Linux. 2. Construct a wifi dictionary Including numbers (0–9), letters (a-z, A-Z), special characters (!@#$%^&*()_+=-) …Wifi3 min readWifi3 min read
2 days agoMember-onlyC 8 Tips & Tricks in 1 MinuteLet’s dive in… use #define /* Defining a macro called `MAX` that is equal to `100`. */ #define MAX 100 /* Defining a macro called `MAX` that takes two arguments, `a` and `b`, and returns the larger of the two. */ #define MAX(a, b) ((a) > (b) ? (a) : (b)) /* Defining a macro…Coding2 min readCoding2 min read
4 days agoStart Uber Now – More Ways to Get That Money! ?This article aims to inform you with a few tips and tricks on how to gain more benefits as a Uber driver, about the fun, the flexibility and very importantly the earnings and savings. Background on what Uber is and how it works Uber is a ridesharing app that connects riders with drivers. Riders can use the app to…Uber3 min readUber3 min read
5 days agoMember-onlyLinked List and Bidirectional Linked List in C with Struct and PointerLet’s dive in… Linked List #include <stdio.h> #include <stdlib.h> #include <string.h> struct node { int data; struct node *next; }; int main() { struct node *head = NULL; struct node *current = NULL; /* Allocating memory for the head node. */ head = (struct node *)malloc(sizeof(struct node)); if (head == NULL) { return (1); } /* Initializing the…Coding3 min readCoding3 min read
6 days agoMember-only10 SQL Hacks in 30 SecondsLet’s dive in… 1. Column operations SELECT MAX(column_name) FROM hacks -- find the maximum value in a column SELECT MIN(column_name) FROM hacks -- find the minimum value in a column SELECT SUM(column_name) FROM hacks -- find the sum of all values in a column SELECT AVG(column_name) FROM hacks -- find the average of all values in…Sql3 min readSql3 min read
Published in Level Up Coding·6 days agoMember-only10 Design Patterns in 5 Minutes1. Singleton Singleton is a creational design pattern, which ensures that only one object of its kind exists and provides a single point of access to it for any other code. class Singleton { private static instance: Singleton; private constructor() {} static getInstance() { if (!Singleton.instance)…Design Patterns4 min readDesign Patterns4 min read
Nov 22Member-only10 Kotlin Hacks in 30 SecondsLet’s dive in… 1. Different/Common Element in Two List /* Find Elements in One List but Not in Another */ val list1 = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) val list2 = listOf(1, 2, 3) val list3 = list1.filter { it !in list2 } /* Find Elements in Both Lists */ val list3 = list1.filter { it…Coding4 min readCoding4 min read
Nov 22Member-only10 Java Hacks in 30 SecondsLet’s dive in… Let’s import the dependencies first import java.net.URL; import java.nio.file.Files; import java.nio.file.Paths; import java.text.MessageFormat; import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; …Java2 min readJava2 min read