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 filewalker(dir, done) { | |
let results = []; | |
fs.readdir(dir, function (err, list) { | |
if (err) return done(err); | |
var pending = list.length; | |
if (!pending) return done(null, results); |
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
app.post('/find', async (req, res) => { | |
var lokiDbRef = new Loki(`${DB_PATH}/${DB_NAME}`, { persistenceMethod: 'fs' }); | |
var col = await loadCollection(COLLECTION_NAME, lokiDbRef); | |
var result = col.find({ isActive: true }); | |
res.send({ 'success': true, 'data': result, 'length': col.find({ isActive: true }).length }); | |
}) |
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> | |
@media print { | |
body * { | |
visibility: hidden; | |
} | |
#section-to-print, #section-to-print * { | |
visibility: visible; | |
} |
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 | |
$number = $_GET['q']; | |
$no = round($number); | |
$point = round($number - $no, 2) * 100; | |
$hundred = null; | |
$digits_1 = strlen($no); | |
$i = 0; | |
$str = array(); | |
$words = array('0' => '', '1' => 'One', '2' => 'Two', | |
'3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', |
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
#include<stdio.h> | |
#include<conio.h> | |
main() | |
{ | |
int a[10][10],b[10][10]; | |
int n,i,k,j; | |
printf("Enter the number of vertices\n"); | |
scanf("%d",&n); | |
printf("Enter the adjacency matrix\n"); | |
for(i=0;i<n;i++) |
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
1)Give the Output | |
#include<stdio.h> | |
main() | |
{ | |
char s[ ]="man"; | |
int i; | |
for(i=0;s[ i ];i++) | |
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); | |
} | |
mmmm |
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
#include<stdio.h> | |
main() | |
{ | |
int m,n,m1,n1,i,j,k,a[10][10],b[10][10],r[10][10]; | |
printf("\nEnter the first matrix row & coloumn size:"); | |
scanf("%d%d",&m,&n); | |
printf("Enter the matrix element:"); | |
i=0; | |
r1:if(i<m) | |
{ |
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
//http://polynomialtimes.com/algorithms/decrease-and-conquer/fake-coin-algorithm/ | |
#include<stdio.h> | |
#include<conio.h> | |
char a[10],c1[10],c2[10],c3[10]; | |
int w[10],n,i,m,sum1=0,sum2=0,sum3=0,tot,k,b[10],c[10],d[10],k1=0,k2=0,k3=0; | |
void min(int f[],int k,char r[]) | |
{ | |
for( i=0;i<k-1;i++) | |
{ | |
if(f[i]>f[i+1]) |
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
#include<stdio.h> | |
#include<conio.h> | |
int a[10][10],count=0;visited[10],n; | |
void dfs(int v) | |
{ | |
int i; | |
visited[v]=1; | |
for(i=0;i<n;i++) | |
{ | |
if(a[v][i]&&!visited[i]){ |
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
#include<stdio.h> | |
#include<conio.h> | |
int n,a[10][10],visited[10],q[10],f=0,r=-1,x[10]; | |
void bfs(int v) | |
{ | |
int i; | |
for(i=0;i<n;i++) | |
{ | |
if(a[v][i]&&!visited[i]){ |
OlderNewer