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> | |
| // Modifies array! | |
| int numberOfTimes(int array[], int n) { | |
| int count = 0; | |
| int flag = 0; | |
| int sizeCounter = 0; | |
| while (true) { | |
| for (int i = 0; i < n - 1; ++i) { | |
| if (array[i] <= array[i + 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 com.github.coderodde.rodioning; | |
| import java.io.IOException; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import javax.websocket.CloseReason; | |
| import javax.websocket.Endpoint; | |
| import javax.websocket.EndpointConfig; | |
| import javax.websocket.Session; |
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
| board = [ | |
| [8, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 3, 6, 0, 0, 0, 0, 0], | |
| [0, 7, 0, 0, 9, 0, 2, 0, 0], | |
| [0, 5, 0, 0, 0, 7, 0, 0, 0], | |
| [0, 0, 0, 0, 4, 5, 7, 0, 0], | |
| [0, 0, 0, 1, 0, 0, 0, 3, 0], | |
| [0, 0, 1, 0, 0, 0, 0, 6, 8], | |
| [0, 0, 8, 5, 0, 0, 0, 1, 0], | |
| [0, 9, 0, 0, 0, 0, 4, 0, 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
| import java.util.Iterator; | |
| import java.util.NoSuchElementException; | |
| public final class PlateNumberIterable implements Iterable<String> { | |
| @Override | |
| public Iterator<String> iterator() { | |
| return new PlateNumberIterator(); | |
| } | |
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.net.URI; | |
| import java.net.URISyntaxException; | |
| import java.time.Duration; | |
| import redis.clients.jedis.Jedis; | |
| import redis.clients.jedis.JedisPool; | |
| import redis.clients.jedis.JedisPoolConfig; | |
| public class Main { | |
| 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
| package net.coderodde.datamining.lottery; | |
| import java.util.ArrayDeque; | |
| import java.util.ArrayList; | |
| import java.util.Deque; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.SortedMap; | |
| import java.util.TreeMap; |
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
| function ArrayRangeException(message) { | |
| this.message = message; | |
| this.getMessage = function() { return this.message; } | |
| } | |
| function RangeCheck(arrayLength, fromIndex, toIndex) { | |
| if (fromIndex < 0) { | |
| throw new ArrayRangeException("'fromIndex' is negative: " + fromIndex); | |
| } | |
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 net.coderodde.util; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.Comparator; | |
| import java.util.List; | |
| import java.util.Objects; | |
| public class CoderoddeArrays { |
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
| <html> | |
| <body> | |
| <div id="output"> | |
| </div> | |
| <script> | |
| function NodeSet() { | |
| this.array = []; | |
| } |
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
| <form enctype="multipart/form-data"> | |
| <input type="file"/> | |
| </form> | |
| <button onclick="yeah()">update avatar</button> | |
| <script> | |
| function yeah() { | |
| var formData = new FormData(); | |
| formData.append("fileName", get_file_or_something().name); | |
| formData.append(cropped_image); | |
| } |