Skip to content

Instantly share code, notes, and snippets.

View sphingu's full-sized avatar
:dependabot:
Focusing

Sumit Hingu sphingu

:dependabot:
Focusing
View GitHub Profile
@sphingu
sphingu / WebBrowser.cs
Last active October 12, 2022 13:04
Using WebBrowser in WPF
----------------------------------------------------
// Using WebBrowser for Crowling in WPF
----------------------------------------------------
<WebBrowser Cursor="Arrow" Name="MyBrowser" LoadCompleted="MyBrowser_OnLoadCompleted" />
----------------------------------------------------
// useful methods of WebBrowser
----------------------------------------------------
MyBrowser.Navigate(new Uri("http://google.com"));
private void MyBrowser_OnLoadCompleted(object sender,NavigationEventArgs e)
@sphingu
sphingu / shortcuts.md
Last active December 28, 2021 07:18
WINDOW TERMINAL
ctrl + shift + = => new pan on side
ctrl + shift + - => new pan on bottom
ctrl + shift + w => close pan

alt + arrow => move focus pan
alt + shift + arrow => resize pan

ctrl + , => open settings
ctrl + shift + p =&gt; command pattele
@sphingu
sphingu / VIM-Notes.md
Last active December 27, 2021 15:19
Mastering the vi and Vim Editors on the Linux, Unix, Mac, and Windows Operating Systems

Essential Navigation Commands

:q - quit :q! - force quit

:wq - write & quit

:23 - go to line No. 23

:$ - go to last line

@sphingu
sphingu / info.md
Last active October 29, 2021 18:41
About OpenID Connect and OAuth
@sphingu
sphingu / MVC_InterView_Questions.md
Created June 19, 2013 09:18
MVC Interview Questions

Interview Question


1.In which assembly is the MVC framework defined? System.Web.Mvc

2.What is ViewData, ViewBag and TempData?

  MVC offers Three options for passing data from controller to View and  in next request. 
ViewData & ViewBag are almost similar.
  	Short life means value becomes null when redirection occurs.
		It’s a communication mechanism within the server call.
Difference between ViewBag & ViewData:
@sphingu
sphingu / PositiveInteger.js
Created June 18, 2013 13:46
Only Positive Integer allow in Textbox using JQuery
$(".positive-integer").numeric({ decimal: false, negative: false }, function () { alert("Positive integers only"); this.value = ""; this.focus(); });
@sphingu
sphingu / Dynamic_Load_On_Scroll_Jquery.html
Created June 20, 2013 12:37
Loading content on scroll to bottom on page using Jquery
<html>
<head>
<title>Scroll to bottom Detection</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
var count=0;
$(document).ready(function(){
SetValues();
$(window).scroll(function(){
//Will check if the user has reached bottom of a PAGE
@sphingu
sphingu / sublime
Last active March 11, 2018 18:25
Sublime Things
SELECTION
---------
Ctrl + D : select a Word
Ctrl + L : select Line
Ctrl + M : Select whole bracket code
Ctrl + Shift + P : Command Patelle
Ctrl + P : list all files
1) SideBarEnhancements
@sphingu
sphingu / shortcuts
Last active March 11, 2018 05:42
Elementary OS Shortcuts
⌘+Space App Launcher
Alt+Tab Window Switcher
⇧+Alt+Tab Switch Windows Backwards
⌘+W Window Overview
⌘+A Window Overview (Across All Workspaces)
⌘+Left/Right Switch Workspace
⌘+S Workspace Overview
⌘+0 New Workspace
⇧+⌘+Left/Right Move Window with Workspace
Ctrl+⌘+Left/Right Snap Window to Half of Workspace
@sphingu
sphingu / EnumExtensions.cs
Last active February 16, 2016 11:31
Enum Extension
[Flags]
public enum Status
{
Success = 1<<0, //1
Fail = 1<<1, //2
Unknown = 1<<2, //4
isNotFail = Success | Unknown
}
public static bool HasFlag(this int status, int flag)