What do you want to save?
Add Code snippet
New code examples
-
C# 2022-02-13 22:05:03
c# type conversion
// --------------------- TYPE CONVERSION --------------------- // // Implicit conversion float varFloat = 12.7f; double varDouble = varFloat; // converts float => double // Explicit conversion (casting) double varDouble = 2.3; int varInt = (int) ... Add solution -
Javascript 2022-02-12 03:45:21
javascript convert number from thousands to k and millions to m
// converts number to string representation with K and M. // toFixed(d) returns a string that has exactly 'd' digits // after the decimal place, rounding if necessary. function numFormatter(num) { if(num > 999 && num < 1000000){ ... Add solution -
C# 2022-02-06 00:50:41
encrypption in C# console using mod of 26
namespace CaesarCipher { class Program { static void Main(string[] args) { // Determining if user wants to encrypt or decrypt. Console.WriteLine("Chose One: Encrypt / Decrypt"); string encryptDecrypt = Console.ReadL... Add solution -
Javascript 2022-02-01 12:06:57
8.3.1. Common Array Methods // sort Examples (.sort)
//The general syntax for this method is: arrayName.sort() /*This method arranges the elements of an array into increasing order. For strings, this means alphabetical order. HOWEVER, the results are not always what we expect.*/ let letters = ['f', 'c',... Add solution -
Other 2022-01-28 19:41:03
Export Sqlite Database as csv in android
public boolean exportDatabase() { DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault()); /**First of all we check if the external storage of the device is available for writing. * Remember that the ext... Add solution -
C++ 2022-01-27 19:21:07
visual studio 2019 read and write text file c++
#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ fstream newfile; newfile.open("tpoint.txt",ios::out); // open a file to perform write operation using file object if(newfile.is... Add solution -
Javascript 2021-11-18 23:38:13
mutable array methods in javascript
/* array literal */ var aData = []; /* object constructur */ function Person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; this.fullname = function() { return (this.firstname + " " + this.lastname); };... Add solution