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.Arrays; | |
| public class MergeSort { | |
| public static void main(String[] args) { | |
| int[] numbers = {-10, 2, 100, 43 ,4, 0, 1}; | |
| System.out.println(Arrays.toString(numbers)); | |
| int[] sorted = mergeSort(numbers); | |
| System.out.println(Arrays.toString(sorted)); |
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.io.*; | |
| import java.util.*; | |
| public class IceCreamParlor{ | |
| public static void main(String[] args) throws IOException { | |
| try { | |
| BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
| int t = Integer.parseInt(br.readLine().trim()); | |
| for(int i=0; i<t; 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
| import java.util.Arrays; | |
| import java.util.Comparator; | |
| class ArrangeToGreater{ | |
| private static Integer[] numbers = {5, 2, 1, 9, 50, 56}; | |
| public static void main(String[] args){ | |
| Arrays.sort(numbers, new Comparator<Integer>() { | |
| @Override | |
| public int compare(Integer l, Integer r) { |
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
| <%@ page import="blog.Post" %> | |
| <%@ page import="blog.Tag" %> | |
| <div class="fieldcontain ${hasErrors(bean: post, field: 'title', 'error')} "> | |
| <label for="title"> | |
| <g:message code="post.title.label" default="Title" /> | |
| </label> | |
| <g:textField name="title" value="${post.title}" /> | |
| </div> |
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 blog | |
| class Tag { | |
| String name | |
| Date dateCreated | |
| Date lastUpdated | |
| static belongsTo = Post | |
| static hasMany = [posts: Post] |
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 blog | |
| class Post { | |
| String title | |
| String content | |
| Date dateCreated | |
| Date lastUpdated | |
| static hasMany = [tags: Tag] |
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
| find . -type f -name '*.svg' -exec mogrify -density 500 -resize 20% -background none -fill rgba(0,0,0,0) -opaque black -format png {} \; | |
| find . -type f -name '*.html' -exec sed -i '' -e 's/svg/png/g' {} \; |
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
| alfredo@Kurisu ~ chmod 600 test.txt ✓ 13:30:07 | |
| alfredo@Kurisu ~ ll ✓ 13:30:08 | |
| total 4.0K | |
| ... | |
| -rw------- 1 alfredo staff 0 Nov 4 12:49 test.txt | |
| ... | |
| alfredo@Kurisu ~ cat test.txt ✓ 13:30:08 ✓ 13:30:12 | |
| alfredo@Kurisu ~ ✓ 13:30:12 |
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
| alfredo@Kurisu ~ chmod a-r test.txt ✓ 12:56:31 | |
| alfredo@Kurisu ~ ll ✓ 12:56:33 | |
| total 4.0K | |
| ... | |
| --w------- 1 alfredo staff 0 Nov 4 12:49 test.txt | |
| ... | |
| alfredo@Kurisu ~ cat test.txt ✓ 12:59:12 | |
| cat: test.txt: Permission denied |
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
| alfredo@Kurisu ~ touch test.txt ✓ 12:49:42 | |
| alfredo@Kurisu ~ ls -l 2 ↵ 12:49:49 | |
| total 4 | |
| ... | |
| -rw-r--r-- 1 alfredo staff 0 Nov 4 12:49 test.txt | |
| ... |