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
| is_in_git_repo() { | |
| git rev-parse HEAD > /dev/null 2>&1 | |
| } | |
| fzf-down() { | |
| fzf --multi --ansi --reverse --keep-right --no-sort --height 100% "$@" --border | |
| } | |
| _gf() { | |
| is_in_git_repo || return |
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
| # Fuzzy find jira ticket numbers | |
| # https://github.com/keepcosmos/terjira required | |
| _jira_ticket() { | |
| is_in_git_repo || return | |
| local USER='PSH' | |
| local JIRA_TICKET_REGEX='KNUTH-\w*' | |
| jira issue jql "status = 'In Implementation' AND assignee = $USER AND type in ('Technical Task', 'Sub Bug')" | grep $JIRA_TICKET_REGEX | sed 's/│//g' | sed 's/In Implementation//' | fzf-down --layout reverse --info inline --preview "echo {} | grep -o '$JIRA_TICKET_REGEX' | xargs jira issue" --preview-window down:80% | grep -o $JIRA_TICKET_REGEX | |
| } | |
| is_in_git_repo() { |
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 dynamisch; | |
| public class LaengsteAufsteigendeTeilfolge { | |
| public static void main(String args[]) { | |
| LaengsteAufsteigendeTeilfolge l = new LaengsteAufsteigendeTeilfolge(); | |
| int[] liste = {3, 5, 76, 1, 45, 2, 31, 89, 90, 0, 4, 12, 23, 47, 95, 21, 67, 8, 13, 11, 5, 145, 132, 77}; | |
| int[] liste2 = {3, 4, -1, 0, 6, 2, 3}; | |
| int[] folge = new int[liste.length]; |
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 backtracking; | |
| public class HausVomNikolaus { | |
| int counter = 1; | |
| public void solve(int[] vec, int stufe) { | |
| for (int i = 1; i <= 5; i++) { | |
| vec[stufe] = i; | |
| if(movePossible(vec, stufe)){ |
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 backtracking; | |
| public class Kartenfaerben { | |
| public boolean solve(int[][] karte, int[] faerbung, int farben, int stufe) { | |
| for (int i = 0; i < karte.length; i++) { | |
| if (karte[stufe][i] == 1 && faerbung[i] == 0) { | |
| for (int farbe = 1; farbe <= farben; farbe++) { | |
| faerbung[i] = farbe; |
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 backtracking; | |
| /** | |
| * Created by Phil on 01.07.2017. | |
| */ | |
| public class Fotoproblem { | |
| int[] dx = {1, -1, 0, 0}; | |
| int[] dy = {0, 0, -1, 1}; |
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 backtracking; | |
| /** | |
| * Created by Phil on 30.06.2017. | |
| */ | |
| public class Dameproblem { | |
| public int count = 0; | |
| public boolean isCandidate(int[][] brett, int zeile, int spalte){ |