Skip to content

Instantly share code, notes, and snippets.

View wakoliVotes's full-sized avatar
"FreeSpirit"

Votes Wakoli wakoliVotes

"FreeSpirit"
View GitHub Profile
@wakoliVotes
wakoliVotes / BottomNavigation.kt
Created February 22, 2023 10:43
Bottom Navigation for Jetpack Compose
// Bottom navigation bar with icons for home, about us, settings and profile
Spacer(modifier = Modifier.height(20.dp))
BottomNavigation(
backgroundColor = Color.White,
modifier = Modifier
.fillMaxWidth()
.height(56.dp)
) {
BottomNavigationItem(
anaconda-client @ file:///C:/ci/anaconda-client_1635342725944/work
anaconda-navigator==2.1.1
appdirs==1.4.4
argh==0.26.2
backports.weakref==1.0.post1
beautifulsoup4 @ file:///tmp/build/80754af9/beautifulsoup4_1631874778482/work
conda==4.12.0
conda-build==3.21.6
conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work
conda-verify==3.4.2
#include <stdio.h>
int main()
{
// Declaring variables
int Qty, disc = 0;
float rate, totalExp;
// Getting input values and storing them
// Illustrating garbage value in C Programming language
#include <stdio.h>
int main()
{
// Declaring the variable num
int num;
// Using printf function to display num
@wakoliVotes
wakoliVotes / AddTwoNumbers.java
Created April 5, 2022 20:20
Adds numbers by taking input from 2 EditTexts and displays result in TextView
package com.example.addtwonumbers;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
// Use parseInt to convert the entered string to integer
var x = parseInt(prompt("Enter First Number: "));
import networkx as nx
import matplotlib.pyplot as plt
# Created empty Graph G
G = nx.Graph()
# Adding Edges to "G" using add_edge
G.add_edge(1, 2, weight = 12.5)
G.add_edge(3, 2, weight = 50.0)
G.add_edge(1, 3, weight = 17)
# Implementation of the FIFO Property using Python Queues
# Class definition
class QueueData:
# An empty queue that will store the elements
def __init__(self):
self.data = []
# enqueue() method
# Adding the first element e to the queue
def enqueue(self, e):
# Create the Class
class founderInfo:
def __init__(self, firstName, secondName, age, annualSalary, status):
self.firstName = firstName
self.secondName = secondName
self.age = age
self.annualSalary = annualSalary
self.status = status
@wakoliVotes
wakoliVotes / DalvikARTComparison.csv
Last active February 19, 2022 00:35
Android Runtimes
Dalvik Virtual Machine Android Run Time(ART)
Faster Booting time Rebooting is significantly longer
Cache builds up overtime The cache is built during the first boot
Uses Just-In-Time(JIT) compiler Uses Ahead-Of-Time(AOT) compiler
Occupies less space due to JIT Consumes a lot of storage space internally due to AOT
Works best for small storage devices Works best for Large storage devices
Longer app loading time Extremely Faster and smoother load time and lower processor use
Apps lagging due to garbage collector pauses and JIT Reduced apps lagging and better user experience
Lower installation time as compilation is done later Longer as compilation is done at installation
DVM converts bytecode every time app is launched ART converts just once at app installation.