Skip to content

Instantly share code, notes, and snippets.

View heanzyzabala's full-sized avatar
🇵🇭

Heanzy Zabala heanzyzabala

🇵🇭
  • Manila, Philippines
View GitHub Profile
plugins {
id 'org.hibernate.build.maven-repo-auth' version '3.0.3'
}
apply plugin: 'org.hibernate.build.maven-repo-auth'
repositories {
maven {
name = 'maven-repo-public'
url 'https://repo.company.ph/repository/maven-repo-public/'
user=username
pass=password
@heanzyzabala
heanzyzabala / pom.xml
Last active September 12, 2020 13:27
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<repositories>
<repository>
...
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
@heanzyzabala
heanzyzabala / pom.xml
Last active September 12, 2020 13:11
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<repositories>
<repository>
<id>maven-repo-public</id>
<url>https://repo.company.ph/repository/maven-repo-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
repositories {
maven {
url 'https://repo.company.ph/repository/maven-repo-public/'
credentials {
username = project.properties.user
password = project.properties.pass
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>maven-repo-public</id>
<username>username</username>
<password>password</password>
</server>
</servers>
</settings>
String result = "";
if(n == 0) return result;
if(n == majorSymbolValue - 1) {
return minorSymbol + majorSymbol;
}
for(int i=0; i < n; i++) {
if(n == nextMajorSymbolValue - (int) (nextMajorSymbolValue / 100.0) * 10 + 1) {
return result += minorSymbol + nextMajorSymbol;
}
if(n >= majorSymbolValue) {
public class MySingleton
{
public static MySingleton mySingleton;
public static synchronized MySingleton getInstance(String tname) {
if(mySingleton == null) {
System.out.println("Thread " + tname + " Singleton class is null, instantiate and return the instance");
mySingleton = new MySingleton();
}
else {
class TextBoxWithMessage
{
private TextBox textbox;
private String message;
public TextBoxWithError(TextBox textbox, String message) {
this.textbox = textbox;
this.message = message;
}