What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-07 21:32:08
aprire e scrivere un file in c#
try { //Pass the filepath and filename to the StreamWriter Constructor StreamWriter sw = new StreamWriter("C:\\Test.txt"); //Write a line of text sw.WriteLine("Hello World!!"); //Write a second line of text sw.W... Add solution -
Java 2021-10-09 04:10:06
jdbc create a delete statement
//STEP 1. Import required packages import java.sql.*; public class JDBCExample { // JDBC driver name and database URL static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; static final String DB_URL = "jdbc:mysql://localhos... Add solution -
Python 2021-09-22 11:46:02
python file open try except error
try: # Dangerous stuff except ValueError: # If you use try, at least 1 except block is mandatory! # Handle it somehow / ignore except (BadThingError, HorrbileThingError) as e: # Hande it differently except: # This will catch every exception. els... Add solution -
Python 2021-09-17 21:09:02
editing specific line in text file in python
# with is like your try .. finally block in this case with open('stats.txt', 'r') as file: # read a list of lines into data data = file.readlines() print data print "Your name: " + data[0] # now change the 2nd line, note that you have ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5