Skip to content

Instantly share code, notes, and snippets.

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

Muhammad Umer Farooq lablnet

🏠
Working from home
View GitHub Profile
@lablnet
lablnet / reverse_number.cpp
Last active March 27, 2019 02:40
C++ program to reverse the input number by for, while and do while loop
//By Muhammad Umer Farooq
#include <iostream>
namespace ReverseNumber
{
int rem = 0; int rev = 0;
int for_loop(int n)
{
for (n; n != 0; n /= 10) { // for (n; n > 0; n /= 10), for (;n != 0; n /= 10)
rem = n % 10;
@lablnet
lablnet / flood.html
Created April 6, 2019 07:15
An example script to show flood with wordPress website(where no captcha)
<!DOCTYPE HTML>
<html>
<head>
<title>Flood</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<div>
<span id='status'></span>
</div>
@lablnet
lablnet / program.cpp
Created June 9, 2019 06:05
C++ program to fine negative values from array A and B, then put in to Array C in that order C = {9, B, A, 12}
#include <iostream>
using namespace std;
int main()
{
//Default size of array
const int m = 8;
//Loop variables and count to store values in C array
int i, j, k,t = 1;
@lablnet
lablnet / auth.html
Created September 1, 2019 05:18
Cordova auth
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Google OAuth with PhoneGap</title>
</head>
<body>
<?php
if (isset($_POST['submit'])) {
$text = (null !== empty(trim($_POST['text']))) ? stripslashes(trim(htmlentities(htmlspecialchars(strip_tags($_POST['text']), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8'))) : '';
if ('' !== $text) {
$spilt = explode(' ', $text);
echo "<strong>Counts:</strong><br/ >";
foreach (array_unique($spilt) as $key => $value) {
$count = substr_count($text, $value);
echo "<b>$value:</b> <i>$count</i> <br>";
@lablnet
lablnet / prime_number.c++
Created March 12, 2020 14:29
C++ prime find prime number using exhaustive enumeration
#include <iostream>
using namespace std;
namespace lablnet {
bool is_prime(int n)
{
bool isPrime = true;
for (int i = n - 1; i >= 2; i--)
{
if (n % i == 0)
//usr/bin/g++
#include <iostream>
int main() {
const int S = 5, M = 6, max = 1000;
int subjects[S][M], avg[S], sum = 0;
char students[S][max];
// Read the mark for students.
for (int i = 0; i < S; i++) {
1 Ali 230
5 Bilal 255
6 Pasha 430
#include<iostream>
#include<fstream>
using namespace std;
// define a structure to store student data
struct student {
int sapid;
char name[30];
float marks;
void getData(); // get student data from user
void displayData(); // display data
@lablnet
lablnet / prime.cpp
Created July 20, 2020 10:54
Prime Number
#include <iostream>
#include <chrono>
using namespace std;
bool isPrime(long long int);
int main(){
long long int n=0;
cout<<"Enter number"<<endl;
cin>>n;
auto start=chrono::high_resolution_clock::now();