All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

Login


All New

All gists

Recently created
Least recently created
Recently updated
Least recently updated
kristofer's Avatar

kristofer / ArrayList class

0 likes
0 forks
1 files
Last active 1741098222

Java ArrayLists: A Dynamic Alternative to Arrays

While Java arrays are powerful, they have a significant complication: their size is fixed once created. Enter ArrayLists - a more flexible, dynamic alternative that automatically grows and shrinks as needed. ArrayLists are part of Java's Collections Framework and offer enhanced functionality for managing groups of objects.

What Is an ArrayList?

An ArrayList is a resizable array implementation of the List interface. Unlike regular arrays, ArrayLists can dynamically change in size during program execution. They store objects rather than primitive types, though Java's autoboxing feature allows them to work seamlessly with primitives too.

ArrayList vs. Array

kristofer's Avatar

kristofer / IntroJavaArrays

0 likes
0 forks
1 files
Last active 1741098232

Java Arrays: An Introduction for Beginners

Arrays are one of the most fundamental data structures in Java programming. They allow you to store multiple values of the same type under a single variable name, making your code more organized and efficient. This introduction will help you understand what arrays are, how they work, and how to use them effectively in your Java programs.

What Is an Array?

An array is a container that holds a fixed number of values of a single type. Think of an array as a row of boxes, where each box can store one item. All items in an array must be of the same data type - whether that's integers, floating-point numbers, characters, or even objects.

Why Use Arrays?

RazTechPro's Avatar

RazTechPro / IntroToAgileAtZipcode

0 likes
0 forks
1 files
Last active 1740270271
Intro to Agile At Zipcode

Introduction to Agile at Zipcode Wilmington

What is Agile?

Agile software development is an umbrella term for a set of frameworks and practices based on the values and principles expressed in the Manifesto for Agile Software Development.

The focus is on the engineers doing the work and the manner in which they work together to deliver working software.

At Zipcode Wilmington, Agile is the marriage of ProDev and Java/Data programs.

kristofer's Avatar

kristofer / Simple Text Edit Python

0 likes
0 forks
1 files
Last active 1739984695
Python simple text edit using Tkinter
1 import tkinter as tk
2 from tkinter.filedialog import askopenfilename, asksaveasfilename
3
4 def open_file():
5 """Open a file for editing."""
6 filepath = askopenfilename(
7 filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")]
8 )
9 if not filepath:
10 return
kristofer's Avatar

kristofer / Digital Clock Py GUI

0 likes
0 forks
1 files
Last active 1739983954
1 from tkinter import Label, Tk
2 import time
3
4 # need to `brew install python-tk`
5 # to setup a mac for tkinter
6 #
7
8 app_window = Tk()
9 app_window.title("Digital Clock")
10 app_window.geometry("420x150")
kristofer's Avatar

kristofer / qrcodepy.md

0 likes
0 forks
1 files
Last active 1739983053

pip install pyqrcode

How to create a QR Code with Python:

import pyqrcode 
from pyqrcode import QRCode 
  
# String (URL) to make into QR code 
s = "https://zipcodewilmington.com"
kristofer's Avatar

kristofer / Python Alarm

0 likes
0 forks
1 files
Last active 1739982656
1 from datetime import datetime
2 from playsound import playsound
3 alarm_time = input("Enter the time of alarm to be set:HH:MM:SS\n")
4 alarm_hour=alarm_time[0:2]
5 alarm_minute=alarm_time[3:5]
6 alarm_seconds=alarm_time[6:8]
7 alarm_period = alarm_time[9:11].upper()
8 print("Setting up alarm..")
9 while True:
10 now = datetime.now()
kristofer's Avatar

kristofer / Acronym Python

0 likes
0 forks
1 files
Last active 1739982535
user_input = str(input("Enter a Phrase: "))
text = user_input.split()
a = " "
for i in text:
    a = a+str(i[0]).upper()
print(a)
kristofer's Avatar

kristofer / Acronym Python

0 likes
0 forks
1 files
Last active 1739982565
user_input = str(input("Enter a Phrase: "))
text = user_input.split()
a = " "
for i in text:
    a = a+str(i[0]).upper()
print(a)
kristofer's Avatar

kristofer / Linear Search Java

0 likes
0 forks
1 files
Last active 1739971512
public class LinearSearch {
    // Method that performs linear search
    public static int linearSearch(int[] array, int target) {
        // Iterate through each element in the array
        for (int i = 0; i < array.length; i++) {
            // If current element matches target, return its index
            if (array[i] == target) {
                return i;
            }
Newer Older

Powered by Opengist ⋅ Load: 142ms⋅

English
Čeština Deutsch English Español Français Magyar Português Русский 中文 繁體中文