Libraryless. Click here for Pure Java version (1462L/11K/33K).
1 | !752 |
2 | |
3 | |
4 | static String programID; |
5 | static boolean test; |
6 | |
7 | psvm {
|
8 | String name = args[0]; // put file name here |
9 | if (args.length > 1 && args[1].equals("test"))
|
10 | test = true; |
11 | name = new File(name).getAbsolutePath(); |
12 | byte[] data = loadBinaryFile(name); |
13 | if (data == null) |
14 | System.out.println("File not found: " + name);
|
15 | else |
16 | if (test) |
17 | print(binaryUrlencode(data)); |
18 | else |
19 | uploadData("data-uploader " + programID, "Data file " + name + " from " + computerID(), data);
|
20 | } |
Began life as a copy of #1000743
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000755 |
| Snippet name: | Upload binary data to TinyBrain |
| Eternal ID of this version: | #1000755/1 |
| Text MD5: | 0962860ef083629d55a8751d766cdfa1 |
| Transpilation MD5: | 8c8b46c308f02240f6aba9445ebbfccb |
| Author: | stefan |
| Category: | |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-16 01:16:44 |
| Source code size: | 550 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 942 / 1496 |
| Referenced in: | [show references] |