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 | |
... |
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 ~ ls -l ✓ 12:09:46 | |
total 4 | |
drwx------ 5 alfredo staff 170 May 25 09:44 Applications | |
-rw-r--r-- 1 alfredo staff 1803 Oct 21 11:38 CCP-Dev-openrc.sh | |
drwx------+ 13 alfredo staff 442 Nov 4 12:09 Desktop | |
drwx------+ 16 alfredo staff 544 Nov 4 09:13 Documents | |
drwx------+ 10 alfredo staff 340 Nov 4 10:39 Downloads | |
drwx------+ 72 alfredo staff 2448 Oct 12 00:09 Library | |
drwx------+ 6 alfredo staff 204 Jul 4 00:37 Movies | |
drwx------+ 6 alfredo staff 204 Jun 16 23:06 Music |