Skip to content

Instantly share code, notes, and snippets.

View hancheester's full-sized avatar
👨‍💻
Coding

Han Chee Tan hancheester

👨‍💻
Coding
View GitHub Profile
/*
A function to verify Google reCAPTCHA (server side integration)
*/
protected bool VerifyRecaptcha()
{
var values = new Dictionary<string, string>
{
{ "secret", ConfigurationManager.AppSettings["recaptcha:SecretKey"] },
{ "response", HttpContext.Request["g-recaptcha-response"] },
{ "remoteip", HttpContext.Request.UserHostAddress },
/*
Function to show component border together with component name. It is useful for AngularJS component-based application design.
*/
(function () {
'use strict';
var app = angular.module('app');
app.run(function () {
-- To get a list of databases.
select name from sys.databases;
-- To display all tables in a database.
select TABLE_NAME
from YourDatabase.INFORMATION_SCHEMA.TABLES
where TABLE_TYPE = 'BASE TABLE'