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
[HttpGet("UserSalary/{userId}")] | |
public IEnumerable<UserSalary> GetUserSalary(int userId) | |
{ | |
return _ef.UserSalary.Where((u) => u.UserId == userId).ToList<UserSalary>(); | |
} | |
//With dapper, it works | |
[HttpGet("UserSalary/{userId}")] | |
public IEnumerable<UserSalary> GetUserSalary(int userId) |
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
[ | |
{ | |
name: 'Afghanistan', | |
alpha2Code: 'AF', | |
alpha3Code: 'AFG', | |
callingCodes: [ '93' ], | |
flag: 'https://restcountries.com/data/afg.svg' | |
}, | |
{ | |
name: 'Albania', |
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
function main(input) { | |
let arr = [], g; | |
input.split("\n").forEach(function(item) { | |
arr.push(item.split(" ").map(i => parseInt(i))); | |
}); | |
arr[2].sort(function(a, b) { | |
return a - b; | |
}); | |
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
(function(){ | |
var _ = {}; | |
_.now = Date.now || function(){ | |
return new Date().getTime(); | |
}; | |
// Returns a function, that, when invoked, will only be triggered at most once | |
// during a given window of time. Normally, the throttled function will run | |
// as much as it can, without ever going more than once per `wait` duration; |
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
function exportToCsv(filename, rows) { | |
var processRow = function (row) { | |
var finalVal = ''; | |
for (var j = 0; j < row.length; j++) { | |
var innerValue = row[j] === null ? '' : row[j].toString(); | |
if (row[j] instanceof Date) { | |
innerValue = row[j].toLocaleString(); | |
}; | |
var result = innerValue.replace(/"/g, '""'); | |
if (result.search(/("|,|\n)/g) >= 0) |
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
directive('btnLoading',function () { | |
return { | |
link:function (scope, element, attrs) { | |
scope.$watch( | |
function () { | |
return scope.$eval(attrs.btnLoading); | |
}, | |
function (value) { | |
if(value) { | |
if (!attrs.hasOwnProperty('ngDisabled')) { |
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
#include <cstdio> | |
#include <iostream> | |
#define MAX 10 | |
using namespace std; | |
//function prototype | |
void sortBubble(int arr[], int n); | |
void swap(int *a, int *b); |
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
public function getAvailableSlotOnDay($provider_id, $facility_id, $sdate, $slot_type) | |
{ | |
$data = array(); | |
if ($sdate == null) { | |
$sdate = Date::now()->toDateString(); | |
} | |
// current time | |
$current_time = Time::now()->toDateTimeString(); | |
Log::debug("Current Time : {$current_time}"); |
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
public function getAvailableSlotByDay($provider_id, $facility_id, $sdate, $slot_type) | |
{ | |
$data = array(); | |
$day = $this->getDayIndex($sdate); | |
$date = new Date($sdate); | |
//$events_start = $date->toDateTimeString(); | |
//$events_end = $date->addDays(1)->toDateTimeString(); |
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
// Patient cancel their tele-app | |
$notificationManager->addTemplate('cancelTeleAppointmentByPatient', [ | |
'title' => 'Cancelled Tele Appointment', | |
'body' => 'Tele event has been cancelled.', | |
'smsbody' => 'Tele event has been cancelled.' | |
]); | |
// drugAlert | |
$notificationManager->addTemplate('drugAlert', [ |
NewerOlder