This file contains hidden or 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
| #!/bin/bash | |
| echo ".....Let's Install Lamp Stack (Apache, MySql and PHP)....." | |
| echo "Installing in progress step 1 of 4" | |
| echo "Updating the repo..." | |
| sudo apt -y update | |
| clear | |
| echo "Installing in progress step 2 of 4" | |
| sudo apt install -y apache2 |
This file contains hidden or 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 <iostream> | |
| class Rectangle { | |
| private: | |
| double length; | |
| double width; | |
| bool error; | |
| public: |
This file contains hidden or 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
| package com.company; | |
| import java.util.Scanner; | |
| class Rectangle { | |
| private double length; | |
| private double width; | |
| private boolean error; |
This file contains hidden or 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 <iostream> | |
| #include <string> | |
| class Laptop { | |
| private: | |
| std::string brand, model; | |
| int serial, ram; | |
| float price, processorSpeed, screenSize; | |
| public: | |
| const std::string &getBrand() const { |
This file contains hidden or 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
| def _to_lower(text: str) -> str: | |
| upper = "" | |
| for i in text: | |
| if 65 <= ord(i) <= 90: | |
| upper += chr(ord(i) + 32) | |
| else: | |
| upper += i | |
| return upper |
This file contains hidden or 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
| import 'dart:async'; | |
| Future longRunningOperation() async { | |
| for (int i = 0; i < 5; i++) { | |
| await Future.delayed(Duration(seconds: 1)); | |
| print("index: $i"); | |
| } | |
| } | |
| main() { |
This file contains hidden or 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
| // | |
| // Created by lablnet on 10/14/20. | |
| // | |
| #include <iostream> | |
| // we can use C++ vector to make it dynamic size but that was not requirement. | |
| struct Weather { | |
| float totalRainFall[6]; | |
| float temp[6]; | |
| float lowTemp[6]; |
This file contains hidden or 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
| class Range: | |
| def __init__(self, start, stop=None, step=1): | |
| if step == 0: | |
| raise ValueError("Step can not be zero.") | |
| if stop is None: | |
| start, stop = 0, start | |
| # calculate the effective length once | |
| self.length = max(0, ((stop - start) + (step - 1)) // step) |
This file contains hidden or 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
| INTEGER, PLUS, MINUS, MULTIPLY, DIV, EOF = 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIV', 'EOF' | |
| class Token(): | |
| def __init__(self, type, value): | |
| self.type = type | |
| self.value = value | |
| def __str__(self): | |
| return 'Token({type}, {value})'.format( |
This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerName git.muhammadumerfarooq.com | |
| <Proxy *> | |
| Order allow,deny | |
| Allow from all | |
| </Proxy> | |
| SetEnv proxy-sendcl | |
| ProxyPreserveHost On | |
| ProxyPass /git http://127.0.0.1:3000/ |