What is the difference between the following two lines?
num = 4
num == 4
Given the following code:
git push -u github master | |
is way better than | |
git push github master. | |
-u allows you to push your master branch to github with more ease in the future: | |
from then on, just type | |
git push | |
and as long as you're on your master branch, it will automatically push your master branch to github! |
#include <stdio.h> | |
int main(void) | |
{ | |
int arr[] = {45, 69, 27, 3, 99, -1, 0, 948, 34, 46}; | |
int size = 0; | |
size = sizeof(arr) / sizeof(int); | |
printf("Size: %d.", size); |
def power(x, n): | |
if (n): | |
return x * power(x, n - 1) | |
else: | |
return 1 | |
def power1(x, n): | |
if (not n): #0th power | |
return 1 | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
bool isPal(int num); | |
bool isPal(int num) | |
{ | |
vector<int> val; |
#include <stdio.h> | |
//define a struct to contain variables and function pointers, much like a class | |
typedef struct ex { | |
//declare some variables | |
int x; | |
//declare some methods (aka, function pointers) | |
void (*const p)(void); //let p be a constant pointer | |
void (*const setX)(struct ex *, int); //must pass self-referential pointer to imitate class scope |
#!/usr/bin/env python3 | |
from collections import namedtuple | |
import csv | |
import datetime | |
import os | |
import subprocess | |
import time | |
WindowInfo = namedtuple("WindowInfo", ["window_name", "window_class"]) |
from faker import Faker | |
import pandas as pd | |
user_factory = Faker() | |
user_factory.seed(1000) | |
def get_fake_user(): | |
global user_factory | |