See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
/* https://www.hackerrank.com/challenges/apple-and-orange/problem */ | |
// using filter | |
function countApplesAndOranges(s, t, a, b, apples, oranges) { | |
console.log(apples.filter(d => s - a <= d && d <= t - a).length); | |
console.log(oranges.filter(d => s - b <= d && d <= t - b).length); | |
} | |
/* https://www.hackerrank.com/challenges/grading/problem */ | |
function gradingStudents(grades) { | |
// Write your code here | |
for(let i=0; i< grades.length; i++){ | |
if(grades[i] >= 38 && grades[i]%5 >2) { | |
grades[i] = grades[i] + (5 - grades[i]%5) | |
} | |
} | |
return grades |
/* https://www.hackerrank.com/challenges/kangaroo/problem */ | |
function kangaroo(x1, v1, x2, v2) { | |
const numberOfJump = (x2-x1)/(v2-v1) | |
if(v2 >= v1){ | |
return "NO" | |
} else if (x1 < x2 && v1 > v2) { | |
if(Number.isInteger(numberOfJump)){ | |
return "YES" | |
}else{ | |
return "NO" |
/* https://www.hackerrank.com/challenges/breaking-best-and-worst-records/problem */ | |
function breakingRecords(scores) { | |
let lowestCount = 0 | |
let highestCount = 0 | |
let lowest = scores[0] | |
let highest = scores[0] | |
for(let i=1; i< scores.length; i++){ | |
if(scores[i]>highest){ | |
highestCount +=1 |
/* https://www.hackerrank.com/challenges/sock-merchant */ | |
let pairs = 0 | |
const unpaired = new Set() | |
for (const color of arr) | |
if (unpaired.has(color)) { | |
pairs++ | |
unpaired.delete(color) | |
} else unpaired.add(color) |
// | |
// ScoreTableViewController.swift | |
// geoapp | |
// | |
// Created by nguyen thanh vy on 25/04/2020. | |
// Copyright Β© 2020 team geo app. All rights reserved. | |
// | |
import UIKit | |
import Firebase |
People
![]() :bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
Function | Shortcut |
---|---|
New Tab | β + T |
Close Tab or Window | β + W (same as many mac apps) |
Go to Tab | β + Number Key (ie: β2 is 2nd tab) |
Go to Split Pane by Direction | β + Option + Arrow Key |
Cycle iTerm Windows | β + backtick (true of all mac apps and works with desktops/mission control) |
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/main_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<ScrollView |