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 channelDaysSchedule() { | |
$record= DB::table('gracenote'); //use select to limit data | |
$reco=$record->get(); | |
$response = [ | |
'success' => true, | |
'date'=>date("Y-m-d"), | |
// 'count' => $reco->count(), | |
'data' => $reco, | |
'message' => 'Schedule data for 3 days found', |
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 getdataforselect2(Request $request){ | |
if ($request->ajax()) { | |
$term = trim($request->term); | |
$posts = DB::table('channels')->select('id','name as text') | |
->where('name', 'LIKE', '%' . $term. '%') | |
->orderBy('name', 'asc')->simplePaginate(10); | |
$morePages=true; |
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
Choose text box and type "Amiri" in the font section. | |
If you want to know if urdu font is available in the google fonts or not, copy choti ye "ی" | |
And look for if the fonts come up, sometimefont won'tshow, just click on the font name and go toglyph section and see if font exist there |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<link href="https://s3.amazonaws.com/cdn.keyos.com/html5/videojs/7.5.4/video-js.min.css" rel="stylesheet"> | |
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 | |
namespace App\Http\Controllers\Admin; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use App\Models\Zipcode; | |
use Illuminate\Support\Facades\DB; | |
class TurfController extends Controller | |
{ |
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
//.env | |
JWT_SECRET={{mysecret}} |
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
const Allstudentsaag = await Attendance.aggregate( | |
[ { $match : { "subject" : "chem" } } , | |
{ $project : { _id: 0,email:1, professorclass : 1 , | |
numberofstudent: { $cond: { if: { $isArray: "$professorclass" }, | |
then: { $size: "$professorclass" }, else: "NA"} }}},]); | |
//In attendance collection Find the subject=chem ,only show email and professorclass field | |
if professorclass is an array then show the size of the array if it's empty so N/A. | |
Show the size in a fieldname called numberofstudent | |
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
{ | |
"_id": { | |
"$oid": "5e68c7eaa0887971ea6ef54c" | |
}, | |
"professorclass": [ | |
{ | |
"_id": { | |
"$oid": "5e678d257cd5a55f2188f02f" | |
}, | |
"attendance_status": "SES", |
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
//A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. | |
//For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has binary representation 10100 and contains one binary gap of length 1. The number 15 has binary representation 1111 and has no binary gaps. The number 32 has binary representation 100000 and has no binary gaps. | |
//solution 1 | |
function solution(N) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
return Math.max(0,...(N >>> 0) | |
.toString(2) |
NewerOlder