Skip to content

Instantly share code, notes, and snippets.

#include "Rectangle.h"
#include "iostream"
using namespace std;
void main()
{
cout<< "Welcome! This will give you information of a given rectangle or square.\nJust follow the instructions and you will see."<<endl;
double width, height;
cout << "Enter the width" << endl;
cin>>width;
String one = "One";
if(userInput == one)
{
return true;
}
return false;
Assume userInput is a string input by the user (That is "One"). This will return false, while
@BenMcH
BenMcH / P.java
Last active January 3, 2016 18:09
public class P {
static boolean p(long a){
if(a<2)return false;
long i = 2;
for(;i*i<=a;i+=2){
if(a%i==0)return false;
if(i<5)i--;
}
return true;
}
#include <iostream>
#include "Vector2.h"
int main(){
Vector2 vec(2,4);
vec.printVector();
system("pause");
return 0;
}

ChromeDriver Linux Installation

  1. wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
  2. $ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
  3. sudo apt update
  4. sudo apt install unzip google-chrome-stable
  5. Navigate to the ChromeDriver page and choose the latest version (2.37 at the time of writing this)
  6. Copy the link for the linux download
  7. wget http://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip
  8. unzip chromedriver_linux64.zip
package main
import "io/ioutil"
import "regexp"
import "log"
import "strings"
import "encoding/json"
func main() {
size := 4
mapping := make(map[string]int)