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 -
C 2021-09-10 01:49:02
printing a string in stdout in c using pointers
/** * PRINTS A STRING TO STDOUT USING PUTS() * Desc: Prints a string on stdout */ #include <stdio.h> /** * _puts - Reads string pointers * @i: counter var * @s: string read */ void _puts(char *s) { int i = 0; while (s[i]) ... 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 -
Javascript 2021-09-08 01:17:02
write bytes64 in json python
from base64 import b64encode from json import dumps ENCODING = 'utf-8' IMAGE_NAME = 'spam.jpg' JSON_NAME = 'output.json' # first: reading the binary stuff # note the 'rb' flag # result: bytes with open(IMAGE_NAME, 'rb') as open_file: byte_content = ... Add solution -
Javascript 2021-09-07 16:59:02
how to right plain text format file in node js
var fs = require('fs') var logger = fs.createWriteStream('log.txt', { flags: 'a' // 'a' means appending (old data will be preserved) }) logger.write('some data') // append string to your file logger.write('more data') // again logger.write('and more') ... Add solution -
Java 2021-09-06 18:15:02
calculate average java
Just some minor modification to your code will do (with some var renaming for clarity) : double sum = 0; //average will have decimal point for(int i=0; i < args.length; i++){ //parse string to double, note that this might fail if you encounter a n... Add solution -
Shell/Bash 2021-09-06 14:34:01
bash ls exclude substring
# Note: there isn't an ls command specifically, BUT: # you could use the 'find' command instead # syntax ("!" is the entry for not) find *</path/to/folder> ! -name '*<substring to exclude>' # example find /jacquesk/home/RandomFiles... Add solution
Best helpers
A. Pettit
+5
Moo-Juice
+5
Jeff Ava
+5
Pharma
+5
Seige
+5
Parallax
+5
PixelZerg
+5
Akiman Barwa
+5
Andrew Lowe
+5
JohnDoe
+5
Meaning
+5
Mahnaz
+5
Silver Rain
+5
Tralston
+5
Rahul Ramesh
+5
Jcjr
+5
Thruston
+5
Alec Cook
+5
Catimann
+5
PeterBocan
+5