Skip to content

Instantly share code, notes, and snippets.

View mushfiqweb's full-sized avatar

Mushfiqur Rahman mushfiqweb

View GitHub Profile
getData = (startDate, endDate, selectedView = 'daily') => {
// startDate = yestarday
// endDate = yestarday
let query = `{$and:[ {BuildingID: '${selfObj.state.BuildingId}'},
{Type:'daily'},
{StartDate:{$gte:new Date('${startDate}')}},
{EndDate:{$lte:new Date('${endDate}')}}]}`;
// console.log(query);
let apiHandler = new ApiHandler(SettingStore.getNosqlUrl(), SettingStore.getAppKey(), SettingStore.getKey());
(function () {
// NOTE
// Backdated / legacy browsers might cause issues on development build
if (typeof __DEV__ == 'undefined') {
window.__DEV__ = true;
}
var version = typeof __VERSION__ == 'undefined' ? '' : __VERSION__;
@mushfiqweb
mushfiqweb / getUsers.js
Last active June 4, 2020 13:13
getUsers.js for Mubin MIYA
getUsers = () => {
let userAPIHandler = new ApiHandler(SettingStore.getNosqlUrl(), SettingStore.getAppKey(), SettingStore.getKey());
let getUserQuery = [];
// let buildingId = '4fa0b1e3176d4d079679af46dee55bc7'; //199 Bay Street, only this building has three users, other one has only 1
let buildingId = this.state.BuildingId;
getUserQuery.push(JSON.stringify({ $match: { PropertyBuilding: { $regex: `${buildingId}` } } }));
userAPIHandler.aggregate(JSON.stringify(getUserQuery), "User System", function (userApiResponse) {
stark = "Jarvis"
def stark.suit
puts "IronMan"
end
class A
puts "A class is an object"
end
# outputs A class is an object
ticket = Object.new
def ticket.date
'1903-01-02'
end
def ticket.venue
'Town Hall'
end
@mushfiqweb
mushfiqweb / icon-lock.css
Last active October 14, 2019 12:57
Create An Icon Input Element Using HTML And CSS. See the full article on https://mushfiqweb.com/create-icon-input-element-using-html-css/
.icon-lock {
width: 15px;
height: 15px;
background: url("lock.svg") no-repeat;
background-size: contain;
}
@mushfiqweb
mushfiqweb / icon-container.css
Last active October 14, 2019 12:57
Create An Icon Input Element Using HTML And CSS. See the full article on https://mushfiqweb.com/create-icon-input-element-using-html-css/
.icon-container {
position: absolute;
top: 8px;
padding: 10px 0 0 10px;
transition: 0.3s;
color: #373737;
border-right: 1px solid #E6E6E6;
width: 23px;
height: 23px;
}
@mushfiqweb
mushfiqweb / icon-input.css
Last active October 14, 2019 12:57
Create An Icon Input Element Using HTML And CSS. See the full article on https://mushfiqweb.com/create-icon-input-element-using-html-css/
.icon-input {
width: 100%;
border: 1px solid #E6E6E6;
margin: 8px 0;
outline: none;
padding: 8px 0px 8px 35px;
transition: 0.3s;
}
@mushfiqweb
mushfiqweb / icon-input-container.css
Last active October 14, 2019 12:57
Create An Icon Input Element Using HTML And CSS. See the full article on https://mushfiqweb.com/create-icon-input-element-using-html-css/
.icon-input-container {
position: relative;
}