Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -1,2 +1,2 @@
|
|||
Fileappend, Hallo World!, print.txt
|
||||
Fileappend, Hello World!, print.txt
|
||||
Run, print "print.txt"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
int main(){
|
||||
std::ofstream lprFile;
|
||||
lprFile.open( "/dev/lp0" );
|
||||
lprFile << "Hello World\n";
|
||||
lprFile << "Hello World!\n";
|
||||
lprFile.close();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
SET PRINT ON
|
||||
SET CONSOLE OFF
|
||||
? "Hello World!"
|
||||
SET PRINT OFF
|
||||
SET CONSOLE ON
|
||||
|
|
@ -14,5 +14,5 @@ func main() {
|
|||
|
||||
defer lp0.Close()
|
||||
|
||||
fmt.Fprintln(lp0, "Hello world!")
|
||||
fmt.Fprintln(lp0, "Hello World!")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
new File('/dev/lp0').write('Hello World\n')
|
||||
new File('/dev/lp0').write('Hello World!\n')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
// This example runs on Node.js
|
||||
var fs = require('fs');
|
||||
// Assuming lp is at /dev/lp0
|
||||
var lp = fs.openSync('/dev/lp0', 'w');
|
||||
fs.writeSync(lp, 'Hello, world!\n');
|
||||
fs.close(lp);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
document.write("Hello World!");
|
||||
print(); //Opens a dialog.
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
given open '>', '/dev/lp0' {
|
||||
.say('Hello, World!');
|
||||
given open '/dev/lp0', :w { # Open the device for writing as the default
|
||||
.say('Hello World!'); # Send it the string
|
||||
.close;
|
||||
# ^ The prefix "." says "use the default device here"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import java.awt.print.PrinterException
|
||||
import javax.swing.JTextPane
|
||||
|
||||
object LinePrinter0 extends App {
|
||||
val show = false
|
||||
val text = """Hello, World! in printing."""
|
||||
try // Default Helvetica, 12p
|
||||
new JTextPane() { setText(text) }.print(null, null, show, null, null, show)
|
||||
catch {
|
||||
case ex: PrinterException => ex.getMessage()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
object LinePrinter extends App {
|
||||
import java.io.{ FileWriter, IOException }
|
||||
{
|
||||
val lp0 = new FileWriter("/dev/lp0")
|
||||
lp0.write("Hello, world!")
|
||||
lp0.close()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue