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 <iostream> | |
| #include <string> | |
| #include <sstream> | |
| template <class T> | |
| void readInto(T *var, const std::string &inputMessage, const std::string &errorMessage) { | |
| std::string input; | |
| while (true) { | |
| std::cout << inputMessage; |
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 <iostream> | |
| using namespace std; | |
| int main() { | |
| int unos; | |
| cout<<"Unesi broj u intervalu <2,10>: "; | |
| cin>>unos; | |
| while(unos<=2 || unos>=10) { |
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 <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <algorithm> | |
| std::vector<std::string> nkd; | |
| int k, n; | |
| int main() | |
| { |
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
| /** | |
| * Creates a new matrix without specified rows & columns. | |
| * | |
| * @param deletedRows rows to exclude from submatrix. | |
| * @param deletedColumns columns to exclude from submatrix. | |
| * @return defined submatrix. | |
| */ | |
| def submatrix(deletedRows: Array[Int], deletedColumns: Array[Int]): MatrixF = { | |
| val result = Array.ofDim[Float](rowCount - deletedRows.count(rowCount >= _), columnCount - deletedColumns.count(columnCount >= _)) | |
| data.indices.filterNot(deletedRows contains _ + 1).zipWithIndex.foreach { case (row, i) => |
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
| inline fun <reified T> Array<Array<T>>.transpose(): Array<Array<T>> { | |
| return Array(this[0].size) { i -> Array (this.size) { j -> this[j][i]} } | |
| } |
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
| /* | |
| * MIT License | |
| * Copyright 2018 Tin Svagelj (a.k.a. Caellian) <tin.svagelj.email@gmail.com> | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
| * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| * | |
| * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the |
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
| hr.caellian:kboardfix: | |
| name: kBoardFix | |
| description: Small fix script for keyboard layout. | |
| script: | |
| pre-mount: fix/fixKeyboard.py | |
| org.x:xorg: | |
| name: Xorg | |
| description: The X.Org project provides an open source implementation of the X Window System. | |
| website: https://www.x.org/wiki/ |
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
| // This class would be understandable if the #call() method wasn't instantly called by the only method actually using it... | |
| public interface ICrashReportDetail<V> extends Callable<V> {} |
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 [ "$EUID" -ne 0 ] | |
| then | |
| echo -e "\033[0;33mWARNING:\033[0m This script requires root privileges!" | |
| fi | |
| if [ $# -ne 2 ] | |
| then | |
| echo -e "\033[0;31mERROR:\033[0m Image name and/or drive not given in arguments!" | |
| echo "Usage:" | |
| echo -e "\t\033[1;31mbackup <image name> <drive>\033[0m" |
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
| /* | |
| * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. | |
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
| * | |
| * This code is free software; you can redistribute it and/or modify it | |
| * under the terms of the GNU General Public License version 2 only, as | |
| * published by the Free Software Foundation. Oracle designates this | |
| * particular file as subject to the "Classpath" exception as provided | |
| * by Oracle in the LICENSE file that accompanied this code. | |
| * |