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 | |
// add hook | |
add_filter( 'wp_nav_menu_objects', 'my_wp_nav_menu_objects_sub_menu', 10, 2 ); | |
// filter_hook function to react on sub_menu flag | |
function my_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) { | |
if ( isset( $args->sub_menu ) ) { | |
$root_id = 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
// Code goes here | |
'use strict'; | |
// Define the `MyApp` module | |
var app = angular.module('MyApp', []); | |
app.controller("CityController", function($scope,$filter) { | |
$scope.Init = function(){ |
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
// ==UserScript== | |
// @name Set Busbd Home | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *.busbd.com.bd* | |
// @grant none | |
// ==/UserScript== |
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
var tdlist = jQuery("tr td:nth-child(3)"); | |
tdlist.each(function() { | |
//console.log($( this ).text().trim().replace(',','')/2.5); | |
//console.log($( this ).next().text()); | |
if($( this ).next().text()==$( this ).text().trim().replace(',','')){ | |
$( this ).next().css("background-color", "green"); | |
}else{ | |
console.log($( this ).next().text()/$( this ).text().trim().replace(',','')); | |
} | |
}); |
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
using System; | |
namespace AIUB_SESOURCE_MANAGEMENT | |
{ | |
abstract class Equipment | |
{ | |
string Light; | |
string fan; | |
string ac; | |
string chair; |
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
//https://stackoverflow.com/questions/18299806/how-to-check-file-mime-type-with-javascript-before-upload/29672957#29672957 | |
// Return the first few bytes of the file as a hex string | |
function getBLOBFileHeader(url, blob, callback) { | |
var fileReader = new FileReader(); | |
fileReader.onloadend = function (e) { | |
var arr = (new Uint8Array(e.target.result)).subarray(0, 4); | |
var header = ""; | |
for (var i = 0; i < arr.length; i++) { | |
header += pad(arr[i].toString(16), 2); |