Skip to content

Instantly share code, notes, and snippets.

View mherman22's full-sized avatar
:octocat:
Try again and again and again

Herman Muhereza mherman22

:octocat:
Try again and again and again
View GitHub Profile
@mherman22
mherman22 / procedure.txt
Created March 17, 2023 12:21
procedure
Mar 17, 2023 2:57:42 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring DispatcherServlet 'openmrs'
WARN - OpenmrsJspServlet.rescanTldsIfNeeded(56) |2023-03-17T14:57:47,693| Rescanning TLDs
Mar 17, 2023 2:57:50 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 17, 2023 3:08:29 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring StaticDispatcherServlet 'openmrs_static_content'
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:55,763| Reading from demo.liquibasechangelog
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:56,036| Successfully acquired change log lock
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:57,041| Table procedure_tbl created
import 'package:flutter/material.dart';
class CreateProfilePage extends StatefulWidget {
const CreateProfilePage({super.key});
@override
State<CreateProfilePage> createState() => _CreateProfilePageState();
}
class _CreateProfilePageState extends State<CreateProfilePage> {
@mherman22
mherman22 / dbdeserialising.java
Created March 10, 2022 12:32
just for keeps
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
public class JsonToDatabase {
@mherman22
mherman22 / WatchFolder.java
Created March 9, 2022 13:29
this class monitors a folder and in particular it monitors the info file. In the infoReading() Method, the data inside the info file is read into a json object whenever the there is a change to the file
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
@Entity
@Table(name = "project")
public class InfoFile {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long infoFile_id;
private String batchErrorstate;
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
import static java.nio.file.LinkOption.*;
import java.nio.file.attribute.*;
import java.io.*;
import java.util.*;
/**
* watching a directory for changes to files.
*/
@mherman22
mherman22 / Merging PR for 2 branches
Created October 18, 2021 14:14 — forked from alopresto/Merging PR for 2 branches
Instructions to merge pull requests for multiple branches (master, support, etc.)
#Steps to merge/close pull requests with two main branches
As NiFi now has a 1.0 (master) and 0.x (support) branch, pull requests (PR) must be applied to both. Here is a step-by-step guide for committers to ensure this occurs for all PRs.
1. Check out the latest master
``` $ git checkout master
$ git pull upstream master
```
2. Check out the PR (example #327). This will be in `detached-HEAD` state. (Note: You may need to edit the `.git/config` file to add the `fetch` lines [below](#fetch))
@mherman22
mherman22 / Update-branch.md
Created October 18, 2021 12:29 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

package myJourney;
import java.util.Scanner;
public class NumberElement {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a Number : ");
package myJourney;
import java.text.NumberFormat;
import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
final byte MONTHS_IN_A_YEAR = 12;
final byte PERCENT = 100;