Skip to content

Instantly share code, notes, and snippets.

View mohessaid's full-sized avatar
🏗️
Working on Ta9in

Mohammed Essaid MEZERREG mohessaid

🏗️
Working on Ta9in
View GitHub Profile
@mohessaid
mohessaid / switch.js
Created February 1, 2019 21:36
The switch statement quirck
var a = 'a';
var b = 'b';
switch(a,b){
case 'a', 'b':
console.log('first case');
break;
case 'z', 'd':
console.log('second case');
break;
@mohessaid
mohessaid / externallib.php
Created August 23, 2017 14:47
Moodle check_user_existance
/**
* Return description of check_user_existance paramters.
*
* @return external_function_paramaters
* @since Moodle 3.2
*/
public static function check_user_existence_parameters(){
return new external_function_parameters(
array(
Get exchange rate as JSONP via YQL.
YQL Console: http://developer.yahoo.com/yql/console
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name'
Example code:
<script type="text/javascript">