What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-10 20:17:02
override interface method with different parameters java
public interface Order { public boolean greaterThan(Order other); } public class AirCraft implements Order { private String make; private int numSeats; public AirCraft(String make, int numSeats) { this.make = make; this.numS... Add solution -
Dart 2021-09-10 15:36:02
get current line number dart flutter
int get lineNumber { try { final re = RegExp(r'^#1[ \t]+.+:(?<line>[0-9]+):[0-9]+\)$', multiLine: true); final match = re.firstMatch(StackTrace.current.toString()); return (match == null) ? -1 : int.parse(match.namedG... Add solution -
C# 2021-09-10 12:15:03
10 random numbers unity
void Start(){ //having an int Array of 10 members int [] numbers = new int[10]; //using a string variable to keep record of the used numbers string usedNumbers ="-"; //cycle to get 10 random numbers for (int i = 0 ; i<10; i++) {... Add solution -
Javascript 2021-09-09 17:42:01
Number To words jq
//HTML Start <input type="number" id="number" placeholder="Number..."> <h5 class="result"></h5> //HTML End $("input#number").keyup(function(){ var number = $(this).val(); var word... Add solution -
Java 2021-09-09 09:47:02
how to calculate min, max and average and write the output into into a text file in java
package TrialPrograms; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.In... Add solution -
Other 2021-09-09 09:26:01
separate info, error logs using logback grails
// File: grails-app/conf/logback-grails.groovy import grails.util.BuildSettings import grails.util.Environment import org.springframework.boot.ApplicationPid import java.nio.charset.Charset // Log information about the configuration. statusListener(OnC... Add solution -
Java 2021-09-08 16:43:02
springboot add to collection firebase
// Assuming that you have the google sdk setup correctly package za.co.migal.service; import com.google.api.core.ApiFuture; import com.google.cloud.firestore.DocumentReference; import com.google.cloud.firestore.Firestore; import com.google.firebase.cloud... Add solution -
Java 2021-09-08 06:59:02
how to validate information against the database in java
public boolean regFamily(FamilyAccount myFam, Customer myCust) throws Exception { int fid = 0; try { String selectStatement2 = "SELECT * from familyok.user where nric = ? and familyid is NOT NULL "; PreparedStatement p... Add solution