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
<?php | |
/** | |
* Function: convert_number | |
* | |
* Description: | |
* Converts a given integer (in range [0..1T-1], inclusive) into | |
* alphabetical format ("one", "two", etc.) | |
* | |
* @int | |
* |
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
addEventListener('fetch', event => { | |
event.respondWith(fetchAndCheckPassword(event.request)) | |
}) | |
async function fetchAndCheckPassword(req) { | |
if (req.method == "POST") { | |
try { | |
const post = await req.formData(); | |
const pwd = post.get('password') | |
const enc = new TextEncoder("utf-8").encode(pwd) |
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
<?php | |
function toBangla ($str) | |
{ | |
$convert = array ( | |
'0' => '০', | |
'1' => '১', | |
'2' => '২', | |
'3' => '৩', | |
'4' => '৪', | |
'5' => '৫', |
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 toBangla (str) | |
{ | |
//check if the `str` is not string | |
if(!isNaN(str)){ | |
//if not string make it string forcefully | |
str = String(str); | |
} | |
//start try catch block | |
try { |
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
// similar behavior as an HTTP redirect | |
window.location.replace("http://sidanmor.com"); | |
// similar behavior as clicking on a link | |
window.location.href = "http://sidanmor.com"; | |
//get value of a input item(of a id) using raw js | |
document.getElementById('inputID').value; | |
//get value of a input item(of a name) using raw js |
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
#symfony -> database | |
php app/console doctrine:schema:update --force | |
#database -> symfony | |
php app/console doctrine:mapping:import --force ApplicationBundle xml && php app/console doctrine:mapping:convert --force annotation ./src && php app/console doctrine:generate:entities ApplicationBundle | |
# db to doctrine xml | |
php app/console doctrine:mapping:import ApplicationBundle xml --filter="InvProducts" | |
#xml to doctrine entity |
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
<?php | |
$repository = $this->getDoctrine()->getManager()->getRepository('ApplicationBundle:AccWorkloadEntry'); | |
$query = $repository->createQueryBuilder('c')->where("c.companyId = ".$this->CompanyID); | |
$query->andWhere("c.status ='1'"); | |
$query->andWhere("c.reportDate between '".$dateFrom ."' and '".$dateTo."'"); |
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
# | |
# Licensed to JumpMind Inc under one or more contributor | |
# license agreements. See the NOTICE file distributed | |
# with this work for additional information regarding | |
# copyright ownership. JumpMind Inc licenses this file | |
# to you under the GNU General Public License, version 3.0 (GPLv3) | |
# (the "License"); you may not use this file except in compliance | |
# with the License. | |
# | |
# You should have received a copy of the GNU General Public License, |
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
<html> | |
<head> | |
<style> | |
#loading { | |
display:none; | |
position:absolute; | |
left:0; | |
top:0; |