Skip to content

Instantly share code, notes, and snippets.

View nguthiru's full-sized avatar
💭
Bored

Edwin Ndiritu nguthiru

💭
Bored
  • WordandLearn
View GitHub Profile
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
public class SpaceAnimationMain {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("Space Animation");
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.util.Calendar;
public class WallClockAnimation extends JPanel {
private static final int WIDTH = 400;
private static final int HEIGHT = 400;
private static final int CLOCK_RADIUS = 150;
private double scaleFactor = 1.0;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
public class SpaceAnimationMain {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("Space Animation");
@nguthiru
nguthiru / data_cache.dart
Last active March 27, 2023 07:37
Dart HTTP base package with caching
import 'dart:convert';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:soul_date/services/network.dart';
import '../constants/constants.dart';
class DataCache {
static final DataCache _instance = DataCache._internal();
factory DataCache() => _instance;