What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-06 11:21:02
big database file into database php
<?php // Name of the file $filename = 'churc.sql'; // MySQL host $mysql_host = 'localhost'; // MySQL username $mysql_username = 'root'; // MySQL password $mysql_password = ''; // Database name $mysql_database = 'dump'; // Connect to MySQL server mysq... Add solution -
Javascript 2021-09-03 12:57:01
javascript display 2 number after comma
var num = Number(0.005) // The Number() only visualizes the type and is not needed var roundedString = num.toFixed(2); var rounded = Number(roundedString); // toFixed() returns a string (often suitable for printing already) Add solution -
Python 2021-08-30 14:00:02
python matrix calculation
# A basic code for matrix input from user R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) # Initialize matrix matrix = [] print("Enter the entries rowwise:") # For use... Add solution -
Other 2021-08-30 05:45:01
maximum element in a window of size k
#include <bits/stdc++.h> using namespace std; // A Dequeue (Double ended queue) based method for printing maximum element of // all subarrays of size k void printKMax(int arr[], int n, int k) { // Create a Double Ended Queue, Qi that will s... Add solution -
Shell/Bash 2021-08-30 03:08:02
bash print keys of awk array
# Example usage for printing keys: awk '{ a[$1]=$2 } END { for (key in a) { print key } }' input_file # Where: # - The above statement prints all keys in the awk array/dictionary # made from the input_file # - a[$1] is an array/dictionary in which the fi... Add solution -
Shell/Bash 2021-08-28 14:09:02
awk: can't read value of a; it's an array name.
# Example usage for printing keys: awk '{ a[$1]=$2 } END { for (key in a) { print key } }' input_file # Where: # - The above statement prints all keys in the awk array/dictionary # made from the input_file # - a[$1] is an array/dictionary in which the fi... Add solution -
Shell/Bash 2021-08-26 12:37:02
macbook current path
# pwd stands for print working directory pwd Add solution