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
if (!(person is null)) { | |
throw new ArgumentNullException(nameof(person)); | |
} | |
if (person is null == false) { | |
throw new ArgumentNullException(nameof(person)); | |
} |
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
if (person is null) { | |
throw new ArgumentNullException(nameof(person)); | |
} |
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
if (person == null) { | |
throw new ArgumentNullException(nameof(person)); | |
} |
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 Person | |
{ | |
public string FirstName { get; private set; } | |
public string LastName { get; private set; } | |
public Person(string firstName, string lastName) => (FirstName, LastName) = (firstName, lastName); | |
public static bool operator ==(Person a, Person b) | |
{ |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
var person1 = new Person("Jonas", "Lomholdt"); | |
var personN = new Person("Jonas", "Lomholdt"); | |
var person2 = new Person("Mike", "Tyson"); | |
Person person3 = null; | |
// Show that comparing instances is working |
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
<Project> | |
<Target Name="VSTestIfTestProject"> | |
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" /> | |
</Target> | |
</Project> |
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
# remap prefix from 'C-b' to 'C-a' | |
# unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
###################### | |
### DESIGN CHANGES ### | |
###################### | |
# panes |
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 | |
# Current path | |
current_path="$(tmux display-message -p -F "#{pane_current_path}")" | |
# get the current branch | |
function get_branch { | |
value=$(cd $current_path; git rev-parse --abbrev-ref HEAD) | |
echo $value | |
} |
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
set -g status-right '#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)' |
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
<?php | |
function array_key_exists_recursive($key, $arr) | |
{ | |
if (array_key_exists($key, $arr)) { | |
return true; | |
} | |
foreach ($arr as $currentKey => $value) { | |
if (is_array($value)) { | |
return array_key_exists_recursive($key, $value); |