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 -
Shell/Bash 2022-03-04 06:00:01
how to create git repository for vim
$ cd $ mv .vimrc .vim/vimrc $ echo "runtime vimrc" > .vimrc $ cd .vim $ git init $ echo "This is my Vim config." > README $ git add * $ git commit -m "My Vim config is versioned." $ git remote add origin https://github.... Add solution -
Objective-C 2022-03-03 11:45:10
objective c encrypt decrypt string
NSString *const IV = @"AEE0515D0B08A4E4"; NSString *const KEY = @"9336565521E5F082BB5929E8E033BC69"; #import "SecurityUtils.h" @implementation SecurityUtils + (NSString *)encrypt:(NSString *)plainText error:(NSError **... Add solution -
Swift 2022-03-03 04:35:24
swift copy video from photo library
import UIKit public protocol VideoPickerDelegate: class { func didSelect(url: URL?) } open class VideoPicker: NSObject { private let pickerController: UIImagePickerController private weak var presentationController: UIViewController? pr... Add solution -
Dart 2022-03-03 02:10:01
Flutter make widget based on dio
import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; Future<Album> fetchAlbum() async { final response = await http.get('https://jsonplaceholder.typicode.com/albums/1'... Add solution -
Javascript 2022-03-02 21:40:01
react native google places autocomplete
function initialize() { var options = { types: ['(cities)'], componentRestrictions: {country: "us"} }; var input = document.getElementById('searchTextField'); var autocomplete = new google.maps.places.Autocomplete(input, options); } Add solution -
Shell/Bash 2022-03-02 15:20:25
initialize a repo and push to github
git init git add . git commit -m "First commit" git remote add origin <remote repository URL> git remote -v git branch -M main git push -u origin main 1- # Create a new repository on GitHub. To avoid errors, do not initialize the new repo... Add solution