What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-04 18:30:17
python replace string in file
# Read in the file with open('file.txt', 'r') as file : filedata = file.read() # Replace the target string filedata = filedata.replace('ram', 'abcd') # Write the file out again with open('file.txt', 'w') as file: file.write(filedata) Add solution -
Javascript 2022-02-04 04:30:19
javascript change comma to dot
tt = tt.replace(/,/g, '.') Add solution -
Python 2022-02-02 23:36:59
convert integer to binary in python
# Python program to convert decimal to binary # Function to convert Decimal number # to Binary number def decimalToBinary(n): return bin(n).replace("0b", "") # Driver code if __name__ == '__main__': print... Add solution -
Javascript 2022-02-02 21:40:59
js replace all symbols in string
function replaceAll(str, find, replace) { var escapedFind=find.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); return str.replace(new RegExp(escapedFind, 'g'), replace); } //usage example var sentence="How many shots did Bill t... Add solution -
Javascript 2022-02-02 20:50:14
how to convert div to image in jquery
<html><head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html... Add solution -
Javascript 2022-02-02 08:55:31
express get all endpoints
const routes = {} function routerRecursion(middleware, pointer, currentName) { if (middleware.route) { // routes registered directly on the app if (!Array.isArray(pointer['routes'])) { pointer['routes'] = [] } const routeObj = { ... Add solution
Best helpers
Ranking is empty