Skip to content

Instantly share code, notes, and snippets.

@vintesh
vintesh / iterm-profile.json
Created February 23, 2021 16:31
Profile Preferences
{
"Ansi 1 Color" : {
"Green Component" : 0,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0
},
"Tags" : [
],
"Ansi 12 Color" : {

Grid Generator

  • Fix the Errors in the code, if any.
  • Give two InputBoxes, for Rows & Columns, create the Grid based on the numbers of the input boxes.
  • Grid Elements should consist of Square Boxes
  • Use a Button & Click Event to Generate the Grid.
  • Given Grid is able to fit into the Page, make it center align in Page.

Bonus

@vintesh
vintesh / Number Validator
Last active April 19, 2017 18:45
Number validations - String Inputs - Typescript
export class NumberValidators {
/**
* Only works for Integer & Positive Number
* @param val String containing number like "$1,123,123"" or "1234" or "1,213" etc
*/
static IsPositiveNumber(val: string): boolean {
return !GeneralValidators.GetNumberFromString(val) ? false : true;
}
@vintesh
vintesh / Parse-Cordova-Camera-PNG-File-Create.js
Last active December 22, 2016 07:04 — forked from cfjedimaster/gist:5971113
Parse.com - Cordova - Camera Plugin - Read File - Save to server in PNG/JPG format.
function gotPic(data) {
window.resolveLocalFileSystemURI(data, function(entry) {
var reader = new FileReader();
reader.onloadend = function(evt) {
var byteArray = new Uint8Array(evt.target.result);
var output = new Array( byteArray.length );
var i = 0;
@vintesh
vintesh / FileReadCordova
Last active November 9, 2015 09:58
PhoneGap/Cordova File Read - DirectoryEntry
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
function(fileSystem) {
window.resolveLocalFileSystemURL(DIR_PATH,
function(directoryEntry) {
console.log('Directory Entry Log - ', directoryEntry);
directoryEntry.getFile(FILE_NAME, { create: true, exclusive: false },
function(fileEntry) {
fileEntry.file(
@vintesh
vintesh / Twilio SMS Send - RAW AJAX or POST REQUEST
Last active April 24, 2020 16:53
Twilio - SMS - How To - POST - jQuery - Javascript - Using AJAX/POST
$.ajax({
type: "POST",
username: "ACCOUNT_SID",
password: "AUTH_TOKEN",
url: "https://api.twilio.com/2010-04-01/Accounts/[ACCOUNT_SID]/Messages.json",
data: {
"To" : "+911234567890",
"From" : "+11234567890",
"Body" : "From jQuery AJAX"
},
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *in,*out;
char c;
short flag=0,i=0;
const char *outPath="C:\\tc\\bin\\out.txt";
clrscr();
in = fopen("C:\\tc\\bin\\src.txt","r");