What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-04 06:40:03
Write a simple java swing application that will display rectangle graphics as shown in the picture below:
import javax.swing.JApplet; /** * A RandomStringsApplet displays 25 copies of a string, using random colors, * fonts, and positions for the copies. The message can be specified as the * value of an applet param with name "message." If no p... Add solution -
Java 2022-02-13 15:45:32
random string generator java
public static String getRandomString(int size) { // The string that we will return String rand = ""; // The chars that are used to generate the random string String chars = "1234567890-=!@#$%^&*()_+qwertyuiop[]\\QWERTYUIOP{}|asd... Add solution -
Java 2022-02-01 07:55:30
set top corner of shape radius programmatically android
GradientDrawable shape = new GradientDrawable(); shape.setCornerRadius( 8 ); // add some color // You can add your random color generator here // and set color if (i % 2 == 0) { shape.setColor(Color.RED); } else { shape.setColor(Color.BLUE); ... Add solution -
Javascript 2021-11-19 20:56:26
random photo generator
//generate random photos. Change the dimensions to what you need (500/300) and add to random counter as needed. https://picsum.photos/500/300?random=1 https://picsum.photos/500/300?random=2 https://picsum.photos/500/300?random=3 https://picsum.photos/500/... Add solution -
C++ 2021-11-11 10:42:07
implementing a scrabble in C++
//board.cpp #include "board.h" CBoard::CBoard() { xmax = ymax = 15; firstword = FALSE; //create the initial tile set and put them in the tilebag list char tile_letters[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q',... Add solution -
Java 2021-11-08 13:56:16
java non blocking notifier
import java.util.concurrent.CompletableFuture; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; public class GetTaskNotificationWithoutBlocking { public static void main(String... argv) throws Exception { Exampl... Add solution -
C 2021-11-01 23:31:06
c how to encrypt and decrypt
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 100 int main() { int switcho; do { printf("Criptare random: 1\nCriptare avendo valore: 2\nDecriptare: 3\nSalvati: 4\n\nScegliere: "); scanf("%d&q... Add solution -
Java 2021-10-23 23:24:07
java generate secure random password
public class PasswordUtils { static char[] SYMBOLS = "^$*.[]{}()?-\"!@#%&/\\,><':;|_~`".toCharArray(); static char[] LOWERCASE = "abcdefghijklmnopqrstuvwxyz".toCharArray(); static char[] UPPERCASE = "AB... Add solution