Meeting 11: Unterschied zwischen den Versionen

Aus Java Student User Group Austria - Java + JVM in Wien Österreich / Vienna Austria
Wechseln zu: Navigation, Suche
(ywGMHyvghDBN)
K (Schützte „Meeting 11“: Wiederkehrender Vandalismus (‎[edit=autoconfirmed] (unbeschränkt) ‎[move=autoconfirmed] (unbeschränkt)))
 
(63 dazwischenliegende Versionen von 55 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
I think the crux of the problem lies in the unnadstenridg of the term  reference , and I think this answer on the SO thread linked above hits on this nicely: The crux of the matter is that the word reference in the expression  pass by reference  means something completely different from the usual mening of the word reference in Java.Usually in Java reference means a a reference to an object. But the technical terms pass by reference/value from programming language theory is talking about a reference to the memory cell holding the variable, which is someting completely different. In C++, a reference to a value and the physical memory address of that value are the same thing (well, due to the OS managing memory, it's actually a virtual memory address, but let's ignore that). In Java, a reference to a value (i.e. object) and the physical memory address are NOT the same thing, since the VM moves objects around during its operation. Instead, a reference is a symbol managed on the VMs symbol table, and is updated with a new address whenever the object is moved around in memory. For obvious reasons, Java doesn't allow direct access to physical addresses. The following example demonstrates:#include void foo(int &x) {  printf( Foo before: %d @ %p\n , x, &x);  x = 20;  printf( Foo after: %d @ %p\n , x, &x);}void bar(int *x) {  printf( Bar before: %d @ %p\n , *x, x);  *x = 30;  printf( Bar after: %d @ %p\n , *x, x);}void baz(int *x) {  printf( Baz before: %d @ %p\n , *x, x);  int y = 40;  x = y;  printf( Baz after: %d @ %p\n , *x, x);}int main() {  int x = 10;  printf( Initial: %d @ %p\n , x, &x);  foo(x);  printf( Main after foo: %d @ %p\n , x, &x);  bar(&x);  printf( Main after bar: %d @ %p\n , x, &x);  baz(&x);  printf( Main after baz: %d @ %p\n , x, &x);  return 0;}Output:Initial: 10 @ 0x7fffe99c981cFoo before: 10 @ 0x7fffe99c981cFoo after: 20 @ 0x7fffe99c981cMain after foo: 20 @ 0x7fffe99c981cBar before: 20 @ 0x7fffe99c981cBar after: 30 @ 0x7fffe99c981cMain after bar: 30 @ 0x7fffe99c981cBaz before: 30 @ 0x7fffe99c981cBaz after: 40 @ 0x7fffe99c97fcMain after baz: 30 @ 0x7fffe99c981cAt this point it should be clear that the way I've defined the method  baz  above is how Java performs method calls for non-primitives. All such method calls pass only references to objects, but any changes to the references themselves (not the values they refer to!) remain within the scope of the callee. This subtle distinction means that the call is technically by value, even though we're providing only references as parameters.
+
'''When''': Monday, February 23rd, 2009 - 19:00 (end approx. 21:00)
 +
 
 +
'''Where''': [http://www.wegweiser.ac.at/tuwien/hoersaal/F4.html Freihaus HS4]
 +
 
 +
 
 +
''TeX ... sooner or later you will have to know it ;)''
 +
 
 +
Download the [[Media:JSUG-11th-Main.pdf|introduction slides]] (pdf, 53KB).
 +
 
 +
 
 +
__TOC__
 +
 
 +
=TeX Day=
 +
 
 +
Special event dealing with TeX basics because of the DANTE conference which will be in the same week (Wednesday 25th to Friday 27th February) at the Vienna University of Technology (EI10).
 +
 
 +
 
 +
'''Lottery'''
 +
 
 +
There will be a "gewinnspiel" at the end of the evening where you can '''win''' a special LaTeX related thingy -but only if you have carefully payed attention to the presentations :)
 +
 
 +
The price was: Two examples of the very nice book "LaTeX - Einführung in das Textsatzsystem" (http://www.rrzn.uni-hannover.de/buch.html?&titel=latex).
 +
 
 +
''Many thanks to the [[Bild:Zid logo.png]] ([http://www.zid.tuwien.ac.at/ Zentraler Informatik Dienst]) for this sponsoring.''
 +
 
 +
=Presentations=
 +
 
 +
==TeX, LaTeX und der ganze Rest==
 +
 
 +
Download the [[Media:JSUG-Tex Latex und der Rest-Norbert Preining.pdf|slides]] (pdf, 1.9MB).
 +
 
 +
Overview, History and TeXLive crashcourse by [http://www.logic.at/staff/preining/ Norbert Preining] (lecturer at the Vienna University Of Technology).
 +
 
 +
 
 +
==LaTeX Quickintro==
 +
 
 +
Download the [[Media:JSUG-TexDay Introduction-Christoph Pickl.pdf|slides]] (pdf, 1.2MB).
 +
 
 +
A short introduction for non-LaTeXperts by [[Benutzer:Christoph.pickl|Christoph Pickl]].
 +
 
 +
 
 +
===What's happening in the background?===
 +
 
 +
Second part of Norbert's presentation: Overview of the process of generating a dvi/pdf with all other filetypes involved.
 +
 
 +
 
 +
==Layouting with the memoir class==
 +
 
 +
Download the [[Media:JSUG-Slides Memoir-Martin Schuerrer.pdf|slides]] (pdf, 133KB).
 +
 
 +
 
 +
How to transform a [http://schuerrer.org/article_original.pdf plain LaTeX document] into a [http://schuerrer.org/article.pdf nice memoir enhanced document] by [[Benutzer:MSch|Martin Schürrer]].
 +
 
 +
Lookup the TeX sources at: [http://github.com/MSch/memoir-article-demo/tree/master http://github.com/MSch/memoir-article-demo]
 +
 
 +
 
 +
==Producing HTML and Slides with LaTeX==
 +
 
 +
Download the [[Media:JSUG-TexDay-Christoph Pickl.pdf|slides]] (pdf, 477KB).<br />
 +
Download the [[Media:JSUG-TexDay Beamer Sources-Christoph Pickl.zip|beamer TeX sources]] (zip, 306KB).
 +
 
 +
Second part of Christoph's presentation: HTML-output with <code>htlatex</code> and producing slides with the <code>beamer</code> class.
 +
 
 +
 
 +
= Links =
 +
 
 +
* http://cms.dante.de/dante2009 ... DANTE TeX days
 +
* http://tobi.oetiker.ch/lshort/lshort.pdf ... The Not So Short Introduction to LaTeX2e
 +
* http://web.student.tuwien.ac.at/~e0525580/rsrc/Christoph_Pickl-Latex_Schnelleinstieg.pdf ... The maybe too short introduction to LaTeX
 +
* http://www.ctan.org/tex-archive/macros/latex/contrib/memoir/memman.pdf ... Memoir Class manual
 +
* http://www.dante.de/faq/de-tex-faq/html/de-tex-faq.html ... FAQ about TeX and DANTE
 +
* http://www.haptonstahl.org/latex/index.php ... Crash Course in LaTeX
 +
* http://www.tuwien.ac.at/dienstleister/pr_und_kommunikation/publishing_web_print/corporate_design/schriftart/latex/ ... TU Wien LaTeX Fonts
 +
 
 +
[[Category:Meeting]]

Aktuelle Version vom 18. März 2013, 07:51 Uhr

When: Monday, February 23rd, 2009 - 19:00 (end approx. 21:00)

Where: Freihaus HS4


TeX ... sooner or later you will have to know it ;)

Download the introduction slides (pdf, 53KB).


TeX Day

Special event dealing with TeX basics because of the DANTE conference which will be in the same week (Wednesday 25th to Friday 27th February) at the Vienna University of Technology (EI10).


Lottery

There will be a "gewinnspiel" at the end of the evening where you can win a special LaTeX related thingy -but only if you have carefully payed attention to the presentations :)

The price was: Two examples of the very nice book "LaTeX - Einführung in das Textsatzsystem" (http://www.rrzn.uni-hannover.de/buch.html?&titel=latex).

Many thanks to the Zid logo.png (Zentraler Informatik Dienst) for this sponsoring.

Presentations

TeX, LaTeX und der ganze Rest

Download the slides (pdf, 1.9MB).

Overview, History and TeXLive crashcourse by Norbert Preining (lecturer at the Vienna University Of Technology).


LaTeX Quickintro

Download the slides (pdf, 1.2MB).

A short introduction for non-LaTeXperts by Christoph Pickl.


What's happening in the background?

Second part of Norbert's presentation: Overview of the process of generating a dvi/pdf with all other filetypes involved.


Layouting with the memoir class

Download the slides (pdf, 133KB).


How to transform a plain LaTeX document into a nice memoir enhanced document by Martin Schürrer.

Lookup the TeX sources at: http://github.com/MSch/memoir-article-demo


Producing HTML and Slides with LaTeX

Download the slides (pdf, 477KB).
Download the beamer TeX sources (zip, 306KB).

Second part of Christoph's presentation: HTML-output with htlatex and producing slides with the beamer class.


Links