YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
3
Task/Pinstripe-Display/Befunge/pinstripe-display.bf
Normal file
3
Task/Pinstripe-Display/Befunge/pinstripe-display.bf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
"%":*3-"`"8*>4/::8%00p8/10p4*\55+"1P",,v
|
||||
,:.\.5vv-g025:\-1_$$55+,\:v1+*8g01g00_@>
|
||||
024,+5<>/2%.1+\:>^<:\0:\-1_$20g1-:20p^1p
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/*Abhishek Ghosh, 6th November 2013, Rotterdam*/
|
||||
#include<graphics.h>
|
||||
#include<conio.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
# Project : Pinstripe/Display
|
||||
# Date : 2018/01/13
|
||||
# Author : Gal Zsolt (~ CalmoSoft ~)
|
||||
# Email : <calmosoft@gmail.com>
|
||||
|
||||
load "guilib.ring"
|
||||
|
||||
|
|
|
|||
37
Task/Pinstripe-Display/Scala/pinstripe-display.scala
Normal file
37
Task/Pinstripe-Display/Scala/pinstripe-display.scala
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import java.awt._
|
||||
|
||||
import javax.swing._
|
||||
|
||||
object PinstripeDisplay extends App {
|
||||
|
||||
SwingUtilities.invokeLater(() =>
|
||||
new JFrame("Pinstripe") {
|
||||
|
||||
class Pinstripe_Display extends JPanel {
|
||||
|
||||
override def paintComponent(g: Graphics): Unit = {
|
||||
val bands = 4
|
||||
|
||||
super.paintComponent(g)
|
||||
for (b <- 1 to bands) {
|
||||
var colIndex = 0
|
||||
for (x <- 0 until getWidth by b) {
|
||||
g.setColor(if (colIndex % 2 == 0) Color.white
|
||||
else Color.black)
|
||||
g.fillRect(x, (b - 1) * (getHeight / bands), x + b, b * (getHeight / bands))
|
||||
colIndex += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setPreferredSize(new Dimension(900, 600))
|
||||
}
|
||||
|
||||
add(new Pinstripe_Display, BorderLayout.CENTER)
|
||||
pack()
|
||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE)
|
||||
setLocationRelativeTo(null)
|
||||
setVisible(true)
|
||||
})
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue