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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
#include <sys/wait.h> | |
#define NUM_EXCHANGES 10000 | |
int main() { | |
int parent_to_child[2], child_to_parent[2]; |
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.lang.reflect.Array; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.Predicate; | |
public class EECS3101W25_Lab2 { |
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 java.util.Scanner; | |
public class Week1Exercises { | |
/* C-1.16 | |
* Write a short program that takes as input three integers, a, b, and c, from the Java | |
* console and determines if they can be used in a correct arithmetic formula (in the | |
* given order), like “a+b = c,” “a = b−c,” or “a ∗ b = c.” | |
*/ | |
public static void main(String[] args) { |
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
// you can also use imports, for example: | |
// import java.util.*; | |
// you can write to stdout for debugging purposes, e.g. | |
// System.out.println("this is a debug message"); | |
import java.util.Arrays; | |
class Solution { | |
public int solution(int[] A){ |
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
// you can also use imports, for example: | |
// import java.util.*; | |
// you can write to stdout for debugging purposes, e.g. | |
// System.out.println("this is a debug message"); | |
class Solution { | |
public int solution(int N) { | |
int longest = 0, countZero = 0, currentIndex = 0, start, end; | |
String bs = Integer.toBinaryString(N); |
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
=match(F2,indirect("sheet7!W2:W"),0) <- og formula, Natasha's | |
if searchKey:[F2 person's role] matches with range[sheet7 column for that lesson], search type 0 (exact match with range not sorted) | |
=match(Training Role, Assignments.[Administraton lesson 1].column, not sorted) | |
=match(D3, hlookup(F1, indirect("Assignments!A1:BD2"),2,FALSE),0) <- my formula | |
- how to get the hlookup to return a cell reference or address instead of the value? | |
- Once cell reference returned, can use cell() to get the associated column, and supply that column as the search range for match | |
=cell("column",ref) |
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
{ | |
"name": "react-bootstrap", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"@testing-library/jest-dom": "^5.16.4", | |
"@testing-library/react": "^13.3.0", | |
"@testing-library/user-event": "^13.5.0", | |
"react": "^18.2.0", | |
"react-dom": "^18.2.0", |
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 Clock extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {date: new Date()}; //add date property in constructor | |
} | |
componentDidMount() { //called when mounting (after component rendered to DOM) | |
this.timerID = setInterval( //create a timer that "ticks" every second (is a class field just like this.state and this.props) | |
() => this.tick(), //call tick method | |
1000 //wait one second |
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 Car extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { //add states just like class properties (except that keys do not have to be strings) | |
brand: "Ford", | |
model: "Mustang", | |
color: "red", | |
year: 1964 | |
}; | |
} |
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
//Q1 | |
let city, country, location; | |
//Q2 | |
city = 'Toronto'; | |
country = 'Canada'; | |
//Q3 | |
location = city + ', ' + country; |
NewerOlder