This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Common method for Getting data as Datatable with connection string | |
/// </summary> | |
/// <param name="ConnectionString"></param> | |
/// <param name="CmdText"></param> | |
/// <param name="TableName">Table Name</param> | |
/// <returns></returns> | |
public DataTable GetDataTable(string ConnectionString, string CmdText,string TableName) | |
{ | |
DB2Connection Con; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Transfer file from one Folder to other | |
/// </summary> | |
/// <param name="path">Path to Target Folder</param> | |
/// <param name="FileName">Full Path to Source File</param> | |
public void TransFileToSpecifiedFolder(string path, string FileName) | |
{ | |
//Deleting file from destination folder if it exists, else exception occurs | |
string path2 = path + "\\" + Path.GetFileName(FileName); | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string CS = ConfigurationManager.ConnectionStrings["test_connectionString"].ConnectionString; | |
using (SqlConnection con = new SqlConnection(CS)) | |
{ | |
SqlDataAdapter da = new SqlDataAdapter("testProcedure3", con); // Using a Store Procedure. | |
//SqlDataAdapter da = new SqlDataAdapter("SELECT 'this is a test text' as test", con); To use a hard coded query. | |
da.SelectCommand.CommandType = CommandType.StoredProcedure; // Comment if using hard coded query. | |
DataSet ds = new DataSet(); // Definition: Memory representation of the database. | |
da.SelectCommand.Parameters.AddWithValue("@ggg", 95); // Repeat for each parameter present in the Store Procedure. | |
da.Fill(ds); // Fill the dataset with the query data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/questions/13402003/how-to-populate-a-datatable-from-a-stored-procedure | |
//For SQL | |
DataTable table = new DataTable(); | |
using(var con = new SqlConnection(ConfigurationManager.ConnectionStrings["DB"].ConnectionString)) | |
using(var cmd = new SqlCommand("usp_GetABCD", con)) | |
using(var da = new SqlDataAdapter(cmd)) | |
{ | |
cmd.CommandType = CommandType.StoredProcedure; | |
da.Fill(table); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/kdow/WeRateDogs/blob/master/wrangle_act.ipynb | |
https://github.com/nikg41/WeRateDogs/blob/master/act_report.ipynb | |
https://github.com/RedRock42/Udacity-Nanodegree-Portfolio/blob/master/P4.Wrangling%20%26%20Analyzing%20Twitter%20Data/Wrangle%20Act.ipynb | |
https://github.com/spinks/WeRateDogs/blob/master/wrangle_act.ipynb | |
https://github.com/nathan-booth/weratedogs/blob/master/wrangle_act.ipynb | |
https://github.com/OrangeWong/WeRateDogs/blob/master/wrangle_act.ipynb | |
https://github.com/nikhil16-bhaskar/WeRateDogs/blob/master/Wrangling_act.ipynb | |
https://github.com/sridharvaranasi/Twitter-WeRateDogs-DataWrangling-Project-Using-Python [Very bad report] | |
https://github.com/anoru/Wrangling-Data-WeRateDogs [Detailed Report, Good Visualization] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.ObjectModel; | |
class MainClass { | |
public static void Main (string[] args) { | |
Console.WriteLine ("Hello World"); | |
Collection<int> intCollection = new Collection<int>(); | |
intCollection.Add(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The main entry point for the process | |
static void Main() | |
{ | |
#if (!DEBUG) | |
System.ServiceProcess.ServiceBase[] ServicesToRun; | |
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() }; | |
System.ServiceProcess.ServiceBase.Run(ServicesToRun); | |
#else | |
// Debug code: this allows the process to run as a non-service. | |
// It will kick off the service start point, but never kill it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
a := strings.Fields(s) | |
m := make(map[string]int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
a, b := 0, 1 | |
return func() int { | |
a, b = b, a+b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Windows Service with Timer - https://www.aspsnippets.com/Articles/Simple-Windows-Service-that-runs-periodically-and-once-a-day-at-specific-time-using-C-and-VBNet.aspx | |
2. Demo VS Setup Project - https://www.codeproject.com/Articles/12548/Visual-Studio-Windows-Application-Setup-Project | |
3. Setup Project with Windows Service - https://www.codeproject.com/Articles/568476/Creating-an-MSI-Setup-Package-for-Csharp-Windows | |
4. Setup Project with Windows Service - http://cherupally.blogspot.com/2009/09/how-to-create-setup-project-to-install.html | |
5. https://www.c-sharpcorner.com/UploadFile/b7531b/create-simple-window-service-and-setup-project-with-installa/ | |
https://dzone.com/articles/create-windows-services-in-c | |
>>https://docs.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer#adding-features-to-the-service |
OlderNewer