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
https://support.brother.com/g/b/manualtop.aspx?c=us&lang=en&prod=p710bteus | |
https://stackoverflow.com/questions/55398308/virtual-esc-pos-printer | |
https://www.brother-usa.com/products/ptp710bt# | |
https://developerprogram.brother-usa.com/ | |
https://www.youtube.com/watch?v=5tGvXEmaJx8 | |
https://www.brother.co.jp/eng/dev/index.aspx#model | |
https://support.brother.com/g/b/manualtop.aspx?c=us&lang=en&prod=lpql700eus - potencjalnie tańsza drukareczka | |
https://github.com/ka2n/ptouchgo/blob/4d620fb30196322ca1318e6de8efa55b0cf5657f/ptouch.go - stałe z p710BT w go |
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
@GetMapping("/{id}/attachments/{filename:.+}") | |
public FileSystemResource getFile( | |
@PathVariable("id") Long id, | |
@PathVariable("filename") String filename, | |
HttpServletResponse response | |
) throws IOException { | |
response.setHeader("Content-Disposition", "attachment; filename=" + filename); | |
response.setHeader("Content-Type", "application/octet-stream"); | |
return new FileSystemResource(service.getFile(id, filename)); | |
} |
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
{ | |
"threadName": "http-nio-8080-exec-8", | |
"threadId": 38, | |
"blockedTime": -1, | |
"blockedCount": 2, | |
"waitedTime": -1, | |
"waitedCount": 19, | |
"lockName": "java.util.concurrent.CountDownLatch$Sync@48ed118d", |
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
package pl.japila.scalania.s99 | |
object S99_P17 { | |
def split[T](n: Int, ts: Seq[T]): (Seq[T], Seq[T]) = { | |
def go(left: Seq[T], right: Seq[T], n: Int): (Seq[T], Seq[T]) = right match { | |
case Nil => (left, right) | |
case h :: tail if n > 0 => go(left :+ h, tail, n - 1) | |
case _ => (left, right) | |
} |
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
def randomSelect[T](n: Int, ts: Seq[T]): Seq[T] = | |
(0 until n).foldLeft( Seq[T]() )((r, _) => (r :+ ts(Random.nextInt(ts.size)))) |
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
object S99_P18 { | |
def slice[T](from: Int, to: Int, ts: Seq[T]): Seq[T] = ts.drop(from).take(to - from) | |
} |
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
object S99_P17 { | |
def split[T](n: Int, ts: Seq[T]): (Seq[T], Seq[T]) = ts.splitAt(n) | |
} |