Skip to content

Instantly share code, notes, and snippets.

@harshityadav95
harshityadav95 / urls.py
Created August 13, 2017 16:58
urls.py in django project
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
@harshityadav95
harshityadav95 / code.cs
Created July 9, 2017 12:13
REST in c#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Xml;
@harshityadav95
harshityadav95 / code.cs
Last active December 12, 2020 14:33
Encryption in c#
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace After024
{
internal class Program
@harshityadav95
harshityadav95 / code.cs
Created July 8, 2017 20:36
Thread Pool in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace After017
{
class Program
@harshityadav95
harshityadav95 / code.cs
Created July 8, 2017 20:06
Code Reflection in C#
using System;
using System.Reflection;
namespace After004
{
internal class Program
{
private static void Main(string[] args)
{
// without reflection
@harshityadav95
harshityadav95 / login left align
Created July 8, 2017 18:08
HTML code to align login box to the left
<div class="BookingTicketsLogin">
<div class="LoginBlockTop">
<div class="LoginBlock_TopLeft"></div>
<div class="LoginBlock_TopMid"></div>
<div class="LoginBlock_TopRight"></div>
</div>
<div class="LoginBlock">
<div class="LoginBlockDiv">
<h3>Login</h3><br>
<font style="color: red;"></font>
@harshityadav95
harshityadav95 / code.cs
Created July 7, 2017 19:53
C# classes and Inheritance
using System;
namespace After002
{
internal class Program
{
private static void Main(string[] args)
{
var animals = new IAnimal[] {new Monkey(), new Dog()};
foreach (var animal in animals)
@harshityadav95
harshityadav95 / code.cs
Created July 7, 2017 19:52
C# classes and Structures
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
namespace After001
{
internal class Program
{
private static void Main(string[] args)
{