What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-02 21:05:02
Inserting HTML elements with JavaScript
function create(htmlStr) { var frag = document.createDocumentFragment(), temp = document.createElement('div'); temp.innerHTML = htmlStr; while (temp.firstChild) { frag.appendChild(temp.firstChild); } return frag; } var... Add solution -
Python 2022-02-02 17:46:23
colab import python file
from google.colab import files files.upload() # run the above code and click on the enabled "Choose Files" button import pandas as pd df = pd.read_csv('your uploades file name.csv') # df is a changable variable df.head() # shows first 5 rows Add solution -
Javascript 2022-02-02 17:36:14
get uploaded file name in js
$('input[type="file"]').change(function(e) { var fileName = e.target.files[0].name; $(e.target).parent('div').find('.form-file-text').html(fileName) // Inside find search element where the name should display (by Id Or Class)... Add solution -
Python 2022-02-02 04:52:24
update csv file in python using pandas
I was able to get the desired data frame. import pandas as pd import numpy as np df1 = pd.read_csv('\\dir\\test1.csv', index_col=0) df2 = pd.read_csv('\\dir\\test2.csv', index_col=0) new_index = list(set(list(df1.index.values)+list(df2.index.values))) ... Add solution -
Python 2022-02-02 02:45:51
record audio with processing python
from sys import byteorder from array import array from struct import pack import pyaudio import wave THRESHOLD = 500 CHUNK_SIZE = 1024 FORMAT = pyaudio.paInt16 RATE = 44100 def is_silent(snd_data): "Returns 'True' if below the 'silent' thresho... Add solution -
SQL 2022-02-01 08:21:25
oracle trigger after logon on database
CREATE OR REPLACE TRIGGER my_schema.trigger_name AFTER LOGON ON DATABASE BEGIN INSERT INTO my_log_table VALUES (USER AS CONNECTED_USER, sys_context('USERENV', 'SESSIONID') AS SESSION_ID, substr(sys_context('USERENV', 'OS_USER'), 1,... Add solution