This file contains 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
enum Suit { | |
case Clubs, Diamonds, Hearts, Spades | |
} | |
enum Rank { | |
case Jack, Queen, King, Ace | |
case Num(Int) | |
} | |
struct Card { |
This file contains 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 Foo { | |
public static void main(String[] args) { | |
String x = "This is weird: \u0022\u003B\u0069\u006E\u0074\u0020\u0079\u003D\u0031\u002F\u0030\u003B\u0078\u003D\u0022???"; | |
System.out.println("x = " + x); | |
} | |
} |
This file contains 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
<?php | |
$file = '/path/to/file.png'; | |
$filename = basename($file); | |
$upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
if (!$upload_file['error']) { | |
$wp_filetype = wp_check_filetype($filename, null ); | |
$attachment = array( | |
'post_mime_type' => $wp_filetype['type'], | |
'post_parent' => $parent_post_id, |