Re: JESS: Correct Way to insert fact

2005-03-30 Thread ejfried
I think Joe wrote:

 
 My Problem is that when the course number contains
 just numbers, the rule does not work,even though the
 course is in the factbase. But when the course number
 has a letter after it (ex. MAC2311H) it works fine. Is
 there sime way to make Jess treat all number slots as
 SYMBOLS and not integers?

Not symbols, no, but strings. Change your Java code to use RU.STRING
instead of RU.ATOM, and use double quotes whenever you write a literal
number that you'd like to be interpreted as a string.


-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




RE: JESS: Correct?

2004-08-23 Thread Jason Morris
I think that Camargo Anyela wrote:
 Is this correct?

 applet
 code=Applet1.class
 archive=jess.jar
 width=600
 height=300


Hi Camargo,

Talk about the tip of the iceberg only showing!  Guess I'll take a stab at
this... :-D

First, though the W3C www.w3c.org has deprecated the APPLET tag for some
time in favor of the OBJECT tag, the new Java Runtime plug-ins seem to
support the APPLET tag much better now.  I'm not really sure which way the
political wind is blowing on this.  All I know is that is it darn difficult
to get an applet to run in an OBJECT tag compared to an APPLET tag.

You can see the full APPLET reference at
(#1) http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.4 which
clearly makes this statement.
The OBJECT tag reference is at
(#2) http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3 .

Second, if you look at link #1, it says that if the CODEBASE is not
specified (which you haven't), then it defaults to the same base URI for the
current HTML document containing the applet.  So when the browser looks for
your Applet1.class, it is going to look in the same directory containing the
HTML file containing your applet.  The ARCHIVE attribute behaves the same
way: the browser will look for jess.jar in the folder containing your HTML
document.  Ordinarily you wouldn't put all these files together like this.

Now, in order to get APPLET tags converted to OBJECT tags that Internet
Explorer can read, it's easiest to run your HTML code through the HTML
Converter included in your JDK.  See this link
http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/html_conver
ter.html .

To run the GUI version from your command line,

1.  Navigate to your %JAVA_SDK%\lib\bin folder and run

  java -jar htmlconverter.jar -gui

2.  Browse to a source folder (select a path or files).
3.  Set the file extensions that you want converted.
4.  Browse to a BAK folder to store original files.
5.  Click Convert...

Click here http://www.morristechnicalsolutions.com/tagtest.htm to see an
example of both tags.  In your browser, you can right-click and View Source
to grab my code.

So all that said, if you look at Jess In Action, pp.288-289, you can see why
Ernest intimates that using Jess in an applet (client-side) isn't the best
web-based implementation.  I gave up on client-side Java a long time ago a
went straight to JSP/Servlets and never looked back.

Hope this helps!
Cheers,

-JM


Jason Morris
Morris Technical Solutions
[EMAIL PROTECTED]
www.morristechnicalsolutions.com
fax/phone: 503.692.1088






To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]