Skip to content

Instantly share code, notes, and snippets.

View msisaifu's full-sized avatar
🏠
Working from home

Mohammad Saiful Islam msisaifu

🏠
Working from home
  • dev @kws3
  • Chittagong,Bangladesh
View GitHub Profile
@msisaifu
msisaifu / app.js
Created February 7, 2023 16:44
Airwrk Live Coding Problem
function checkPalindrome(str) {
let tempStr = str;
let j = 0;
for (let i = tempStr.length - 1; i >= 0; i--, j++) {
if (tempStr[i] !== str[j]) {
return false;
}
}
return true;
}
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "students";
$table_name = 'student_info';
$inserted = false;
$something_wrong = false;
$id = $_GET['id'];
$rows = null;
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "students";
$table_name = 'student_info';
$inserted = false;
$something_wrong = false;
$id = $_GET['id'];
$rows = null;
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "students";
$table_name = 'student_info';
$inserted = false;
$something_wrong = false;
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "students";
$table_name = 'student_info';
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
class KitchenRenovationCalculator {
// ********************************************************************
// ***** For demo purposes here the price and factor are hardcoded *****
// ***** Once complete the functions SetFactor and setPrices will add all of those dynamically from your end *****
// ********************************************************************
setFactor(factors) { }
setPrices(prices) { }
<script context="module" lang="ts">
/**
* @type {import('@sveltejs/kit').Load}
*/
const posts = import.meta.glob('./contents/*.svx')
let body = []
for (const path in posts) {
body.push(posts[path]().then(({metadata}) => metadata))
<?php
class Crud {
public $person = [];
function create($array){
array_push($this->person,$array);
}
function read($id){
$index = $this->searchIndex($id);
<?php
class Crud {
public $person = [];
function create($name){
array_push($this->person, $name);
}
function read($id){
echo "index number: {$id} {$this->person[$id]}";
function reverseCase($str) {
print strtolower($str) ^ strtoupper($str) ^ $str;
}
reverseCase('hello Bangladesh');