Skip to content

Instantly share code, notes, and snippets.

View sherazlodhi's full-sized avatar

Muhammad Sheraz Lodhi sherazlodhi

View GitHub Profile
"""
Routes and views for the flask app.
"""
from datetime import datetime
from flask import render_template, jsonify
from FlaskWebProject1 import app
from flask import request
import stripe
charges = Stripe::Charge.list({limit: 100})
charges.auto_paging_each do |charge|
# Do something with customer
puts "Charge ID => #{charge.id} \t Charge Amount => #{charge.amount}"
end
@sherazlodhi
sherazlodhi / delete.cs
Last active June 20, 2018 06:07
Delete All Empty folders sharepoint
List < SPFolder > emptyDirectories = new List < SPFolder > ();
public void DeleteEmpty() {
string spsiteURL = "";
string listName = "";
using(SPSite site = new SPSite(spsiteURL) {
using(SPWeb web = site.OpenWeb())
if (web != null)
{
"name": "dialogflowFirebaseFulfillment",
"description": "This is the default fulfillment for a Dialogflow agents using Cloud Functions for Firebase",
"version": "0.0.1",
"private": true,
"license": "Apache Version 2.0",
"author": "Google Inc.",
"engines": {
"node": "~6.0"
},
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
const { BrowseCarousel,RichResponse,BrowseCarouselItem,Button,BasicCard } = require('actions-on-google');
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
// Copyright 2017-2018, Google, Inc.
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
const {
dialogflow,
BasicCard,
"use strict";
class Rectangle {
constructor(length,width) {
this.length = length;
this.width = width;
}
area() {
console.log(this.width * this.length);
class Student(){
constructor(id,name){
this.id =id;
this.name = name;
}
static totalMarks(marks1,marks2,marks3,marks4){
return marks1+marks2+marks3+marks4;
}
}
var Student = class {
constructor (id,name){
this.id = id;
this.name = name;
}
}