This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# https://softinstigate.atlassian.net/wiki/pages/viewpage.action?pageId=11567174= | |
files = { | |
'file': open("helloworld.mp3", 'rb') | |
} | |
values={ | |
'properties':'"filename":"helloworld.mp3"') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<svg width="960" height="500"></svg> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var jsonData = JSON.stringify([{ | |
"starttime": "2010-10-07T15:56:23.477Z", | |
"functionid": "476", | |
"userid": "roney" | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
(function () { | |
var onMessage = function (data) { | |
// Do something with the message data | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
import { CommonUtilsProvider } from '../../providers/common-utils/common-utils'; | |
import { CommonVariablesProvider } from '../../providers/common-variables/common-variables' | |
/* | |
* Common Services Provider | |
* @author Alfred Francis | |
* @date 10/06/2017 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
import * as CryptoJS from 'crypto-js'; | |
import {CommonVariablesProvider} from '../common-variables/common-variables' | |
import { ToastController, Toast } from 'ionic-angular'; | |
import { AlertController, Alert } from 'ionic-angular'; | |
/* | |
* Common Utilities provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postFeedback(feedback){ | |
return new Promise( | |
(resolve,reject)=>{ | |
let headers = new Headers( | |
{ | |
'Content-Type': 'application/json' | |
} | |
) | |
let options = new RequestOptions( | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"cCode": "IL", "dialCode": "+972", "cName": "Israel", "ccyName": "New Israeli Sheqel", "ccyCode": "ILS"}, {"cCode": "AF", "dialCode": "+93", "cName": "Afghanistan", "ccyName": "Afghani", "ccyCode": "AFN"}, {"cCode": "AL", "dialCode": "+355", "cName": "Albania", "ccyName": "Lek", "ccyCode": "ALL"}, {"cCode": "DZ", "dialCode": "+213", "cName": "Algeria", "ccyName": "Algerian Dinar", "ccyCode": "DZD"}, {"cCode": "AS", "dialCode": "+1 684", "cName": "AmericanSamoa", "ccyName": "US Dollar", "ccyCode": "USD"}, {"cCode": "AD", "dialCode": "+376", "cName": "Andorra", "ccyName": "Euro", "ccyCode": "EUR"}, {"cCode": "AO", "dialCode": "+244", "cName": "Angola", "ccyName": "Kwanza", "ccyCode": "AOA"}, {"cCode": "AI", "dialCode": "+1 264", "cName": "Anguilla", "ccyName": "East Caribbean Dollar", "ccyCode": "XCD"}, {"cCode": "AG", "dialCode": "+1268", "cName": "Antigua and Barbuda", "ccyName": "East Caribbean Dollar", "ccyCode": "XCD"}, {"cCode": "AR", "dialCode": "+54", "cName": "Argentina", "ccyName": "Argentine Peso", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
persist(key,value){ | |
/* | |
* Store user information in sessionStorage | |
* @param {string} key - key name | |
* @param {json} value - value | |
* @return {} | |
*/ | |
if(typeof value == "object"){ | |
return sessionStorage.setItem(key,JSON.stringify(value)) | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup as bs | |
class Wikipedia(): | |
def getTitles(self,query,num=4): | |
url="https://en.wikipedia.org/w/api.php?action=query&list=search&srnamespace=0&format=json&srlimit={}&srsearch={}&srprop=".format(num,query) | |
data = requests.get(url) | |
if data.json().get("query").get("searchinfo").get("totalhits") > 0: | |
titles = [ title.get("title") for title in data.json().get("query").get("search")] | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"cn":"Israel","cyn":"New Israeli Sheqel","ccc":"ILS"},{"cn":"Afghanistan","cyn":"Afghani","ccc":"AFN"},{"cn":"Albania","cyn":"Lek","ccc":"ALL"},{"cn":"Algeria","cyn":"Algerian Dinar","ccc":"DZD"},{"cn":"AmericanSamoa","cyn":"US Dollar","ccc":"USD"},{"cn":"Andorra","cyn":"Euro","ccc":"EUR"},{"cn":"Angola","cyn":"Kwanza","ccc":"AOA"},{"cn":"Anguilla","cyn":"East Caribbean Dollar","ccc":"XCD"},{"cn":"Antigua and Barbuda","cyn":"East Caribbean Dollar","ccc":"XCD"},{"cn":"Argentina","cyn":"Argentine Peso","ccc":"ARS"},{"cn":"Armenia","cyn":"Armenian Dram","ccc":"AMD"},{"cn":"Aruba","cyn":"Aruban Florin","ccc":"AWG"},{"cn":"Australia","cyn":"Australian Dollar","ccc":"AUD"},{"cn":"Austria","cyn":"Euro","ccc":"EUR"},{"cn":"Azerbaijan","cyn":"Azerbaijanian Manat","ccc":"AZN"},{"cn":"Bahamas","cyn":"Bahamian Dollar","ccc":"BSD"},{"cn":"Bahrain","cyn":"Bahraini Dinar","ccc":"BHD"},{"cn":"Bangladesh","cyn":"Taka","ccc":"BDT"},{"cn":"Barbados","cyn":"Barbados Dollar","ccc":"BBD"},{"cn":"Belarus","ccc":"BYR"},{"cn":"Belg |