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
| public class BubbleSort { | |
| public static void main(String[] args) { | |
| int[] numbers = {544, 1, 12, 7, 449, 99, 66, 32, 43, 17, 19, 999}; | |
| sort(numbers); | |
| } | |
| public static void sort(int[] numbers) { | |
| boolean sortAgain = false; |
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
| public static class DpiScale | |
| { | |
| private static readonly float WindowsDefaultDpi = 96.0f; | |
| private enum Axis {X, Y}; | |
| private static float GetScaleForAxis(Axis axis) | |
| { | |
| var axisProperty = axis == Axis.X ? "DpiX" : "Dpi"; | |
| var dpiProperty = typeof(SystemParameters).GetProperty(axisProperty, BindingFlags.NonPublic | BindingFlags.Static); | |
| var deviceDpi = (int)dpiProperty.GetValue(null, null); |
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/sh | |
| echo '### Commit if static analysis pass' | |
| IFS=$'\n' | |
| staged_files=($(git diff --staged --name-only --no-color)) | |
| if [ ${#staged_files[@]} -eq 0 ]; then | |
| echo "### No staged files, exiting" | |
| exit 1 | |
| else | |
| echo '### Running static analysis on staged files' |
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 os | |
| import svtplay_dl | |
| import re | |
| import feedparser | |
| __author__ = 'oakninja' | |
| def lines(file_name): | |
| home = os.path.expanduser("~") |