Skip to content

Instantly share code, notes, and snippets.

"""
Module for executing asynchronous and synchronous tasks in a topological order
based on their dependencies. It uses Python's asyncio for asynchronous tasks and
a custom thread pool executor for synchronous tasks. The results of the tasks
are stored in a nested dictionary structure based on keys specified via
decorators.
Fran Aguilera
06/07/24
"""
@Falven
Falven / Bulk Insert Code
Created August 14, 2012 21:13
Sql Bulk Insert
void BulkInsertFile(string fileName, string tableName)
{
FileInfo info = new FileInfo(fileName);
string name = info.Name;
string shareDirectory = ""; //the path of the share: \\servername\shareName\
string serverDirectory = ""; //the local path of the share on the server: C:\shareName\
File.Copy(fileName, shareDirectory + name);
// or you could call your method to parse the file and write it to the share directory.
function CustomDate() { }
CustomDate.prototype = new Date();
CustomDate.prototype.constructor = CustomDate;
CustomDate.prototype.getDay = function() {
return ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][super.getDay()];
}