What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-18 01:25:19
reverse string efficient in cpp without using function
#include <iostream> using namespace std; int main() { char str[] = "Reverseme"; char reverse[50]; int i=-1; int j=0; /*Count the length, until it each at the end of string.*/ while(str[++i]!='\0'); ... Add solution -
Python 2021-10-26 10:04:15
how to iterate wordcount in python spark
import sys from pyspark import SparkContext, SparkConf if __name__ == "__main__": # create Spark context with necessary configuration sc = SparkContext("local","PySpark Word Count Exmaple") # read data from text fi... Add solution -
Java 2021-10-12 04:54:05
path matcher java
Tells you if a file matches your pattern FileSystem fileSystem = FileSystems.getDefault(); PathMatcher pathMatcher = fileSystem.getPathMatcher("glob:**/testFile.?"); Path path = Paths.get("D:/cp/testFile.t"); System.out.println(... Add solution -
Python 2021-09-03 19:17:02
open textfile separated by whitespaces python
numbers = [] #Open the file with open('file.txt') as fp: #Iterate through each line for line in fp: numbers.extend( #Append the list of numbers to the result array [int(item) #Convert each number to an integer fo... Add solution