it seems that labs with a PREPARE section stop at the first advance mouse or escape a - arithmetics - finite maths
linux32 Jbeta and J701a 2011/1/17 Björn Helgason <[email protected]>: > I ran through all the labs and quite a lot of them run without problems. > > I would recommend that those who do not be kept in separate directories wit > the same name as they are now with a suffix like nyf (not yet fixed) and > then gradually moved over as they become fixed. > > That way those new to J could avoid them until they are fixed. > > I send here the log of my tests. > > Only once did I need to restart J and once did J also stop on its own. > > Only labs that have problems are listed here below and some comments along > the way. > > ---------------------------------------- > A J Introduction > > ── ((3) 1 of 5) Simple plot ───────────────────────────────── > The square function (*:) applied to a list x may be plotted > against its argument as follows: > ) > require'plot graph' > not found: C:/j701/bin/graph > |file name error: script > | 0!:0 y[4!:55<'y' > > --------------------------- > ── ((6) 4 of 9) Derivatives and Integrals ─────────────────── > The derivative of a polynomial is obtained by multiplying > each monomial by its exponent, and reducing the exponent by > 1. > > Equivalently, the coefficients of the derivative of c p. x > are obtained by multiplying c by the exponents i.#c, and > dropping the first item. > ) > c > 1 3 3 1 > i.#c > 0 1 2 3 > c * i. # c > 0 3 6 3 > der=:}. c * i. # c NB. Coefficients of derivative > der > 3 6 3 > require 'plot graph' > not found: C:/j701/bin/graph > |file name error: script > | 0!:0 y[4!:55<'y' > > ---------------------- > changed to A Taste of J (1) > > Did not play > Tried esc a several times > > ── ((14) 8 of 8) Introduction (ctd) ───────────────────────── > This is the end of the lab. > ) > > End of lab > > End of lab > > End of lab > > End of lab > > End of lab > > End of lab > > ----------------------- > changed to other labs but always got end of lab > > ----------- > Then tried to hit the run button and now something happened > It was not intuitive but ok > > ------------ > > Now the lab name and selection disappeared butthe lab is there > I did not need to hit run to get the first lab going and the name stayed on > ------------------ > I am only testing the operation of the labs and not reading what they say > this time of round > ----------- > An Introductory Course in J > ── ((2) 10 of 12) Examples (ctd) > ─────────────────────────────────────────────── > We will display a 3D view of the array, with coloring to indicate > the nonzero values. > > Each cube is a 0-cell of the array. > > If OpenGL is not available, just step to the next section. > ) > not found: C:/j701/bin/gl3 > showm m;'' > |value error: gscubeface > | cubenormals=.gsunitnormal cubefaces=.0.03 gscubeface'' > > ------------ > ── ((2) 11 of 12) Examples (ctd) > ─────────────────────────────────────────────── > We draw a box to illustrate a 1-cell. > > The 1-cell is a strip of 10 cubes. The other 1-cells are in lines parallel > to the one indicated. > > The language facilities of J make it easy to refer to cells. So, in this > array it will be easy to execute operations within horizontal strips, and > slightly less easy to operate on, say, vertical strips. > ) > showm m;_0.3 _0.3 _0.3 ,: 9.3 0.3 0.3 > |value error: gscubeface > | cubenormals=.gsunitnormal cubefaces=.0.03 gscubeface'' > > ------------------- > ── ((2) 12 of 12) Examples (ctd) > ─────────────────────────────────────────────── > We draw a box to illustrate a 2-cell. > > The 1-cell is a plane of 100 cubes. The other 2-cells are in planes > parallel > to the one indicated. > > The language facilities of J make it easy to refer to cells. So, in this > array it will be easy to execute operations within properly oriented planes. > ) > showm m;_0.3 _0.3 _0.3 ,: 9.3 9.3 0.3 > |value error: gscubeface > | cubenormals=.gsunitnormal cubefaces=.0.03 gscubeface'' > > -------------- > An excelent lab > Most seem to work and even some errors explained > There are some additional files and scripts missing > and probably should be fixed. > > ---------------- > Object Oriented Programming > ------------- > No labs installed. Do pacman studio/labs install and try again. Labs are > interactive tutorials and are a good way to learn J. Labs are not always > current with the latest system and may run with minor errors that can be > ignored. > ───────────────────────────────────────────────────────────── > Lab: Object Oriented Programming > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 70) Overview ─────────────────────────────────────── > This lab is about Object Oriented Programming. > > It covers OOP ideas and terminology and shows how to do it. > ) > > *** event handler error > ev_labrun_click 0 > |value error: wdforms > | fms=. wdforms'' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 8 > jdata > > ----------------- > could not continue with this lab > -------- > Circuit Theory I > -------- > ── ((3) 20 of 49) Interconnection: programs ───────────────── > > Here are 2 different ways of creating an interconnection in > J. > > 1. Using "apply" (128!:2) on a listing of mapped components. > ) > apply =: 128!:2 > CFL =: &((+/)@:apply) NB. adverb: Circuit From Listing > load 'convert' NB. to get mfv (matrix from vector) > > L =: LF mfv 0 : 0 NB. Listing of components & connections > res map 2 4 > npn map 0 2 1 > diode map 0 3 > 2&res map 3 1 > ) > > *** event handler error > ev_advance_click 0 > |value error: mfv > | L=:LF mfv 0 :0 > |[-9] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > ---------------- > Most of CTI worked > Tried to start CTII > -------- > No labs installed. Do pacman studio/labs install and try again. Labs are > interactive tutorials and are a good way to learn J. Labs are not always > current with the latest system and may run with minor errors that can be > ignored. > ───────────────────────────────────────────────────────────── > Lab: Circuit Theory II > Author: John C. Wilson > > Comments to J Forum or [email protected] > > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 Introduction to part II ──────────────────────── > > ── ((1) 1 of 2) Outline ───────────────────────────────────── > > Circuit Theory I dealt with the mathematical definition of a > circuit (as a function) and with the operations by which new > circuits may be created from old ones. > > Circuit Theory II suggests a taxonomy or classification of > circuits according to their special properties (i.e., > according to their external behaviour rather than their > internal composition). Realization (or synthesis) questions > are also addressed. > > A final chapter considers some conventionally acceptable > circuits that are not circuits in this theory. > > > > > Please note: > 1. Both Circuit Theory I and II use "apply" (128!:2), which > was not available in J406. > > 2. Circuit Theory II requires the addon LAPACK, obtainable > at the JSoftware website. > ) > not found: c:/j701/addons/math/lapack/lapack.ijs > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 11 > jdata > ------------- > Froze > --------- > Turtle Geometry - JTurtle User Guide > ---------- > ── ((1) 2 of 40) Is this for you? (ctd) ───────────────────── > Tne classical reference for Turtle Geometry is: H. Abelson > and A. diSessa, Turtle Geometry: The computer as a medium for > exploring mathematics. MIT Press, 1980. > > To load the turtle geometry package, enter: > ) > > load 'turtle' > not found: C:\j701\bin/turtle > > *** event handler error > ev_advance_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > -------------- > > ── ((1) 6 of 40) An example ───────────────────────────────── > > The J sentence below generates the displayed graph. Its > simplicity suggests the graph has a very simple structure. > The sentence requests the computer to show a drawing obtained > by repeating 20 times the path after the comma. The path > draws a pentagon and then turns the turtle heading 18 > degrees. > ) > show repeat 20,(repeat 5 fd 1 rt 72) rt 18 > > *** event handler error > ev_advance_click 0 > |value error: rt > | show repeat 20,(repeat 5 fd 1 rt 72)rt 18 > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > --------------- > Several more and then froze > > ---------- > Arithmetic > -------------- > ── ((1) 2 of 33) Table of Contents ────────────────────────── > 1. INTRODUCTION > > A. Labs > B. Words, Pictures, and Symbols > C. Verbs > D. List Arguments > E. Experiments > F. Grouping > G. Even and Odd Numbers > H. Even +Even, Even+Odd, Odd+Odd > I. Multiplication > J. Commutativity > K. Division > L. Patterns and Colors > M. Fractions or Rationals > N. Terminology > O. Review and Exercises > > 2. TABLES > > A. Verb Tables > B. Reading > C. Fractional Arguments > D. Negative Numbers > E. Subtraction of Negative Arguments > F. Positive and Negative Arguments > G. Review and Exercises > ) > not found: C:/j701/bin/graph > > *** event handler error > ev_advance_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > ----------- > froze > -------- > > Book of Numbers > ----------- > No labs installed. Do pacman studio/labs install and try again. Labs are > interactive tutorials and are a good way to learn J. Labs are not always > current with the latest system and may run with minor errors that can be > ignored. > ───────────────────────────────────────────────────────────── > Lab: Book of Numbers > Author: KEI > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 The Romance of Numbers ───────────────────────── > > ── ((1) 1 of 3) Figure 1.4 ────────────────────────────────── > > This lab is written as a companion to The Book of Numbers, by > John H. Conway and Richard K. Guy, Springer-Verlag, 1996, > ISBN 0-387-97993-X. It will be referred to here as BON, and > all references to figures concern figures in BON. > > The development will closely follow that of BON, making > frequent explicit references to it. Sections that appear not > to benefit from this treatment will be skipped. > > The use of the computer makes it possible for the reader to > experiment with mathematical ideas with ease and precision, > often providing new insights. Experiments may also be used to > clarify any new notation encountered. Moreover, helpful > comments are sometimes appended to expressions, preceded by > NB. (for Nota Bene). > > To advance to the next panel of the lab, click on > Studio|Advance, or use the indicated shortcut. > ) > not found: C:/j701/bin/graph > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 18 > jdata > > -------------- > Finite matemahematics > --------- > ───────────────────────────────────────────────────────────── > Lab: Finite mathematics > Author: KEI > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 INTRODUCTION ─────────────────────────────────── > > ── ((1) 1 of 18) A. Purpose and Notation ──────────────────── > > This lab is written as a companion to K. Stephen Brown, et > al., Finite Mathematics, Holt, Rinehart and Winston of > Canada, ISBN 0-03-922023-0, 1988, designed for use in Grade > 13 in Ontario schools. It will be referred to here as FM. > > The use of the computer makes it possible to experiment with > mathematical ideas with ease and precision, often providing > new insights. > > Experiments may also be used to clarify any new notation > encountered. For example, your understanding of the use of > parentheses, and of notation for addition, multiplication, > and power may be tested as follows: > ) > not found: C:/j701/bin/graph > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 20 > jdata > > --------------- > Grade 8-7 (Saxon) > ---------- > ───────────────────────────────────────────────────────────── > Lab: Grade 8-7 (Saxon) > Author: Kenneth E. Iverson > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 INTRODUCTION ─────────────────────────────────── > > ── ((1) 1 of 9) A. Purpose ────────────────────────────────── > > This program is designed to accompany the text "MATH 87", by > Stephen Hake and John Saxon, Saxon Publishers, Norman, > Oklahoma, 1997. It follows the text closely, and uses the > programming language J to illustrate and illuminate the > topics. > > To proceed through successive panels, select menu > Studio|Advance. Press Up Arrow or Page Up to recall earlier > material. > ) > not found: C:\j701\bin/graph > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 21 > jdata > > --------------- > Linear algebra (Schaum) > ------------------ > Lab: Linear algebra (Schaum) > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 SYSTEMS OF LINEAR EQUATIONS ──────────────────── > > ── ((1) 1 of 36) 1. Introduction ──────────────────────────── > > This lab is written as a companion to Seymour Lipshutz > "LINEAR ALGEBRA" of Schaum's Outline Series, published by > McGraw Hill, 1991, ISBN 0-07-038007-4. It will be referred to > here by the author's initials SL. > > The use of the computer makes it possible to experiment with > mathematical ideas with ease and precision, sometimes > expanding on the text-book treatment, and often providing new > insights. You are always in control of the computer and may > enter any experiment you wish, concluding each entry by > pressing the Enter key. > > Although texts in the Schaum Outline Series are not commonly > adopted for college courses, one of them is chosen here for > the following reasons: > > 1. Adopted texts in Linear Algebra are so various that > there appear to be none that are widely used. > > 2. Designed as aids to students in a variety of courses, > the Schaum Outline Series provide broader treatments > than most other texts. > ) > not found: C:/j701/bin/graph > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 22 > jdata > > -------------------- > Teacher's Aide > ------------ > No labs installed. Do pacman studio/labs install and try again. Labs are > interactive tutorials and are a good way to learn J. Labs are not always > current with the latest system and may run with minor errors that can be > ignored. > ───────────────────────────────────────────────────────────── > Lab: Teacher's Aide > Author: Kenneth E. Iverson > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 PURPOSE ──────────────────────────────────────── > > ── ((1) 1 of 1) Introduction ──────────────────────────────── > We will use the computer not to further burden the accepted > curriculum, but to provide the teacher with a simple general > aide to help in the teaching of it. > > This help includes such things as evaluating results of > exercises; showing graphs and collections of graphs; and > coloring multiplication and other function tables to > emphasize the patterns that occur in them. > ) > not found: C:\j701\bin/graph > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 40 > jdata > > -------------- > Application Distribution - Installer > ----------- > > ── (11 of 20) Overview (ctd) ──────────────────────────────── > This step loads the app installer script (which in turn loads > the appdist utilities). > ) > load '~user\projects\apps\example\installer.ijs' > not found: c:/users/bjorn/j701-user/projects/apps/example/installer.ijs > > *** event handler error > ev_advance_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ------------- > ── (12 of 20) Overview (ctd) ──────────────────────────────── > This step builds the iapp file based on installer.ijs. > ) > build'' > > *** event handler error > ev_advance_click 0 > |value error: build > | build'' > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ---------- > Building Applications > --------- > > ── ((1) 4 of 17) Application (ctd) ────────────────────────── > ) > load 'files jview' > not found: C:\j701\bin/jview > > *** event handler error > ev_advance_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > -------------- > > ── ((1) 14 of 17) Plot (ctd) ──────────────────────────────── > ) > load 'plot' > > 'bar' plot 5 { NSALES > > *** event handler error > ev_advance_click 0 > |index error: run > | 'bar'plot 5 {NSALES > |[-2] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > ----------- > ── ((1) 16 of 17) Plot (ctd) ──────────────────────────────── > ) > name=: 5 { NAMES > > *** event handler error > ev_advance_click 0 > |index error: run > | name=:5 {NAMES > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > --------------- > ── ((2) 2 of 9) New Script (ctd) ──────────────────────────── > ) > > *** event handler error > ev_advance_click 0 > |value error: open > | open jpath'~temp\tlab42.ijs' > |[-1] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > ------------- > Client/Server (Simple Socket) > ------------ > ── (12 of 40) Client (ctd) ────────────────────────────────── > If the server isn't properly started the next section will > hang when it tries to connect to the server. If it hangs you > can interrupt with break. > ) > ------- > hangs > -------- > waits forever > ---------- > > had to stop J and start again > -------- > brake did not work and did not see what happened because I started the > server in a hidden window > had to use task manager to stop J > > ------------ > DLL Callback > ----------- > Lab: DLL Callback > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 39) dll callback ─────────────────────────────────── > This lab shows how to use a DLL callback. > > Labs "DLL: Using System DLLs (file examples)", "DLL: Writing > and Using A DLL" and User Manual chapter "DLLs and Memory > Management" are prerequisites and some familiarity with the > Win API, C programming and C data types is assumed. > > A bad declaration or parameters for a dll call or a dll > callback can CRASH or CORRUPT MEMORY. > ) > require 'dll' NB. dll utilities > require 'winapi' NB. Win API utilities > not found: C:/j701/bin/winapi > |file name error: script > | 0!:0 y[4!:55<'y' > erase 'cdcallback' NB. ensure undefined > 1 > --------- > ── (10 of 39) dll callback (ctd) ──────────────────────────── > ) > EnumWindows=: 'EnumWindows'win32api > |syntax error: run1 > | EnumWindows=: 'EnumWindows'win32api > |[-0] > ---------- > ── (11 of 39) dll callback (ctd) ──────────────────────────── > EnumWindows has 2 args: > > cdcb2 - address of callback with 2 iteger args > app-defined value - unused, use 123 > ) > EnumWindows cdcb2 ; 123 NB. gets cdcallback value error > |value error: EnumWindows > | EnumWindows cdcb2;123 > |[-0] > -------------- > > ── (15 of 39) dll callback (ctd) ──────────────────────────── > ) > EnumWindows cdcb2 ; 123 > |value error: EnumWindows > | EnumWindows cdcb2;123 > |[-0] > > ----------- > ── (17 of 39) dll callback (ctd) ──────────────────────────── > ) > callbackr=: i.0 0 NB. empty global result > EnumWindows cdcb2 ; 123 NB. results in global callbackr > |value error: EnumWindows > | EnumWindows cdcb2;123 > |[-1] > $callbackr > 0 0 > ------------ > > ── (19 of 39) dll callback (ctd) ──────────────────────────── > Window titles will make the example more interesting. > > gettext calls GetWindowText to get the window title. > > format formats the window handle with its title. > ) > GetWindowText=: 'GetWindowText'win32api > |syntax error: run1 > | GetWindowText=: 'GetWindowText'win32api > |[-0] > gettext=: 3 : '(>{.r){.>2{r=.GetWindowText y;(30$'' '');30' > format=: 3 : '(6":a),,'' '',gettext a=.{.y' > format ".wd'qhwndx' NB. handle and title of J app window > |value error: wd > | format". wd'qhwndx' > |[-3] > -------------- > ─ (20 of 39) dll callback (ctd) ──────────────────────────── > Define cdcallback to collect the window handle and title. > ) > cdcallback=: 3 : '1[callbackr=:callbackr,format y' > callbackr=: i. 0 0 > EnumWindows cdcb2 ; 123 > |value error: EnumWindows > | EnumWindows cdcb2;123 > |[-2] > ------------- > > ── (23 of 39) dll callback (ctd) ──────────────────────────── > ) > 15{.enumtop'' > |value error: EnumWindows > | EnumWindows cdcb2;123 > > ---------------- > > ── (25 of 39) dll callback (ctd) ──────────────────────────── > EnumChildWindows is similar to EnumWindows except it has an > additional arg, the window to enumerate. > ) > EnumChildWindows=: 'EnumChildWindows'win32api > |syntax error: run1 > | EnumChildWindows=: 'EnumChildWindows'win32api > |[-0] > > ----------- > Lab: DLL Callback > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 39) dll callback ─────────────────────────────────── > This lab shows how to use a DLL callback. > > Labs "DLL: Using System DLLs (file examples)", "DLL: Writing > and Using A DLL" and User Manual chapter "DLLs and Memory > Management" are prerequisites and some familiarity with the > Win API, C programming and C data types is assumed. > > A bad declaration or parameters for a dll call or a dll > callback can CRASH or CORRUPT MEMORY. > ) > require 'dll' NB. dll utilities > require 'winapi' NB. Win API utilities > not found: C:/j701/bin/winapi > |file name error: script > | 0!:0 y[4!:55<'y' > erase 'cdcallback' NB. ensure undefined > 1 > ------------- > Lab: DLL: Using System DLLs (file examples) > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 35) overview ─────────────────────────────────────── > This lab shows how to use system DLL WIN32 API procedures. > > It helps if you are familiar with calling DLL procedures. See > lab "DLL: Writing and Using A DLL" and User Manual chapter > "DLLs and Memory Management". > > This lab assumes you know some C and have an overview of the > WIN32 API. > > The lab uses file procedures CreateFile, WriteFile, ReadFile > etc. from system DLL kernel32. > ) > require 'dll' NB. dll utils > require 'winapi' NB. API utils > not found: C:/j701/bin/winapi > |file name error: script > | 0!:0 y[4!:55<'y' > > --------------- > Dll writing > --------------- > ── (4 of 58) overview (ctd) ───────────────────────────────── > ) > open '~system\examples\dllwrite\dlltest.cpp' > |value error: open > | open'~system\examples\dllwrite\dlltest.cpp' > |[-0] > > ----------- > Debug > -------- > > ── (22 of 27) Setting Stops ───────────────────────────────── > To set stops explicitly, use any of: > > Debug toolbar buttons: > Stop name at cursor - sets stops on all lines > Stop Manager - a dialog for setting stops > > Function keys: > Ctrl+F9 - toggle stop on cursor line > Ctrl+Shift+F9 - remove all stops > > Verb dbstop, which sets stops on all lines in a definition. > > Verb dbstopme, which sets stops on all lines in the current > definition. > > The underlying facility: dbss (13!:3) > ) > > *** event handler error > ev_advance_click 0 > |value error: wdpclose > | wdpclose'myform' > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ---------- > Lab: Files > Author: Don Guinn > [email protected] > > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── Chapter 1 Introduction ─────────────────────────────────── > > ── ((1) 1 of 2) Introduction ──────────────────────────────── > J provides a number of utility verbs (functions) to aid in > the processing of files. Several file organizations are > supported by J. These include text files, component files and > memory mapped files. This lab is for working with text files. > These text files could also be called flat files. The verbs > in this lab treat a file as if it were a character string > containing any of the possible 256 bit configurations found > in a byte. > > Also available are labs on Mapped Files. > > The script file defining most of these verbs is loaded by: > > load 'files' > > The text viewer will also be used: > > load 'jview' > ) > load 'files jview' > not found: C:\j701\bin/jview > |file name error: script > | 0!:0 y[4!:55<'y' > > ------------ > ── ((2) 3 of 3) General Rules (ctd) ───────────────────────── > As you are probably aware, Unix uses "/" for path separators > where Windows uses "\". The file foreign conjunctions convert > both to the one appropriate for your system; however, you can > use the verb "jhostpath" to make displayed filenames correct > for your system. This may be necessary for filenames passed > to other applications. > > You may use either "/" or "\" without regard to your base > operating system. This lab will use the Windows convention > for filenames. > ) > NB. See what your path separator is. > jhostpath 'dir1/dir2\dir3' > |value error: jhostpath > | jhostpath'dir1/dir2\dir3' > |[-1] > ----------- > ── ((7) 1 of 8) fselect ───────────────────────────────────── > fselect provides quick access to the file open Windows > utility form called the Windows common dialog box. J is > suspended until the box is closed. > > fselect uses the windows driver to invoke the wd command > mbopen. See help/wd commands and scroll down to mbopen for > more information. > ) > fselect jpath '~system\main\files.ijs' > |value error: fselect > | fselect jpath'~system\main\files.ijs' > |[-0] > -------------- > Form Editor > ---------- > ??? > > ----------- > > ) > > End of lab > No labs installed. Do pacman studio/labs install and try again. Labs are > interactive tutorials and are a good way to learn J. Labs are not always > current with the latest system and may run with minor errors that can be > ignored. > ───────────────────────────────────────────────────────────── > Lab: Formatting with printf > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 34) Introduction ─────────────────────────────────── > The printf package emulates the C printf and sprintf > functions. It also contains a pair of adverbs (vsprintf and > vbsprintf) which convert printf specifications into verbs > that perform better on large operands, and a pair of verbs > (qprintf and qsprintf) for printing out debugging messages. > > The package was contributed by Henry H. Rich > ([email protected]). > > Example: > ) > load 'printf' > not found: C:\j701\bin/printf > > *** event handler error > ev_labrun_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 51 > jdata > > --------------- > many more > > ----------- > Lab author > --------- > ─ ((1) 14 of 18) PREPARE (ctd) ───────────────────────────── > Now try to write the edit control, without a psel command. > > Press Run now. > ) > wd 'set myedit *some text' > > *** event handler error > ev_advance_click 0 > |value error: wd > | wd'set myedit *some text' > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ---------- > > ── (5 of 42) Mapped File Database (ctd) ───────────────────── > ) > open '~system\extras\labs\system\mappeddb.ijs' > |value error: open > | open'~system\extras\labs\system\mappeddb.ijs' > |[-0] > load '~system\extras\labs\system\mappeddb.ijs' > > ------------- > ODBC A simple application > -------- > > ── (9 of 10) Running the application ──────────────────────── > Computing an expense distribution is now simply a matter of > executing the next two statements. > ) > NB. connect to expense data > ch =: ddcon 'dsn=expenses' > > NB. run report > SHEET expensereport ch > > *** event handler error > ev_advance_click 0 > |domain error: ymdfrts > | m=.1{"1 ym=.0 1{"1 ymdfrts y > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > --------- > > ── (11 of 18) Getting blobs (ctd) ─────────────────────────── > Retrieve some blobs. > ) > b1 -: 'b1' getblob ch > |domain error: dehex > | dehex,>dat > b2 -: 'b2' getblob ch > |domain error: dehex > | dehex,>dat > b3 -: 'b3' getblob ch > |domain error: dehex > | dehex,>dat > b4 -: 'b4' getblob ch > |domain error: dehex > | dehex,>dat > > ------------ > Sql data > ------------ > > ── (10 of 23) Inverting tdata ─────────────────────────────── > Now lets invert the columns of tdata. For this first example > I will use ddfch. You can achieve higher performance and > completely control J datatype conversions with ddbind and > ddfetch. A second example will illustrate ddbind and > ddfetch. > ) > NB. select all the rows of tdata > sh =: 'select * from tdata' ddsel ch > > NB. get the names of fetched columns and use to > NB. create a series of unboxed nouns > cols =: ddcnm sh > (cols) =: ddfch sh,_1 > |domain error: run1 > | (cols) =:ddfch sh,_1 > |[-6] > -------- > > ── (3 of 16) Printing (ctd) ───────────────────────────────── > Script printlab demonstrates all aspects of printing. > > The script loads gl2 and makes the definitions available > directly with coinsert. > > The script defines 3 verbs: > > print - creates isigraph and starts printing > > print_g_print - print event handler > > print_draw - gl2 commands for drawing each page > ) > > *** event handler error > ev_advance_click 0 > |value error: open > | open printlabijs > |[-0] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ------------- > > ── (2 of 13) print - text printer ─────────────────────────── > "print" is a simple text printer that can be used for > printing any J data or text files. > > First, load the print utilities: > ) > load 'print' > not found: C:\j701\bin/print > > *** event handler error > ev_advance_click 0 > |file name error: script > | 0!:0 y[4!:55<'y' > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > ---------- > socet driver > ------- > ── (6 of 49) Socket Driver Server (ctd) ───────────────────── > When you are through with a socket it should be closed. > ) > sdclose SK > 0 > ---- > ajax request failed > --------- > J stopped > ---------- > ── (4 of 11) Web Server (ctd) ─────────────────────────────── > Next, we will find the address of our web server, and connect > our socket to port 80 on that host: > ) > ]jsoft=: sdcheck sdgethostbyname 'www.jsoftware.com' NB. find host > ┌─┬───────────────┐ > │2│255.255.255.255│ > └─┴───────────────┘ > sdcheck sdconnect sk;jsoft,<80 NB. connect to port 80 > > *** event handler error > ev_advance_click 0 > |EADDRNOTAVAIL: sdcheck > | sdcheck sdconnect sk;jsoft,<80 > |[-1] > jdo jev_jijx_ 0 > jtype click > jmid advance > jsid > jdata > > ---------- > Lab: Taskbar Notification Area > To advance the lab, select menu Studio|Advance or the > corresponding shortcut. > > ── (1 of 24) Introduction ─────────────────────────────────── > The Notification Area is the portion of the Windows taskbar > on the right near the clock. Long-running applications which > do not require a presence on the desktop, but require > occasional user interaction, will put an icon in this area to > let the user to call it when required. > > An example is a mouse driver which puts an icon in this area > to allow the user to change settings. > > Another is an email program which puts an icon there when > there are unread messages. > ) > > *** event handler error > ev_labrun_click 0 > |value error: IFJAVA > | IFJAVA>:IFWIN > jdo jev_jijx_ 0 > jtype click > jmid labrun > jsid 68 > jdata > > ------------- > > > > > > > > > > > > > > > > -- > Björn Helgason, Verkfræðingur > Fornustekkum II > 781 Hornafirði, > t-póst: [email protected] > gsm: +3546985532 > sími: +3544781286 > http://groups.google.com/group/J-Programming > > > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans > > góður kennari getur stigið á tær án þess að glansinn fari af skónum > /|_ .-----------------------------------. > ,' .\ / | Með léttri lund verður | > ,--' _,' | Dagurinn í dag | > / / | Enn betri en gærdagurinn | > ( -. | `-----------------------------------' > | ) | (\_ _/) > (`-. '--.) (='.'=) ♖♘♗♕♔♙ > `. )----' (")_(") ☃☠ > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
