Skip to content

Instantly share code, notes, and snippets.

View sin2akshay's full-sized avatar
💻
Coding

Akshay Kumar sin2akshay

💻
Coding
View GitHub Profile
@sin2akshay
sin2akshay / cs_dataset-sp.cs
Last active April 24, 2018 12:32 — forked from appforest/cs_dataset-sp
C# - Calling a SQL Server Stored Procedure. Using a dataset to get the data.
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
@sin2akshay
sin2akshay / RunDebugMethod.cs
Created May 11, 2018 12:59 — forked from dguder/RunDebugMethod.cs
Runs a service from console for debugging
// 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.
@sin2akshay
sin2akshay / CP1.md
Created July 15, 2018 14:17 — forked from sharmaeklavya2/CP1.md
Getting started with Competitive Programming

Starting out with Competitive Programming

(This guide is meant for beginners. If you have solved 100+ problems and are looking for guidance on how to solve problems involving algorithms and data structures, this document is not for you.)

Competitive Programming is an interesting activity which mixes problem solving with programming. It is not only enjoyable but also very demanded in placements. Competitive programming will make you very good at writing efficient programs quickly.

@sin2akshay
sin2akshay / Github Emojis.md
Last active August 11, 2018 20:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

Core SQL

Challenge Rating

This goal will likely be within your ZPD if you...

  • Are familiar with basic command line operations
  • Are interested in learning about writing SQL queries
  • Are interested in learning how to install postgres & use the psql command line tool.