473,387 Members | 1,394 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

a very small js library to include GRAPH COMMAND (lines,points, circle etc) and MATHsimbols

I developed a little javascript library for implement instruction like
LINE (x0,y0,x1,y1) or drawImage(x,y) and, to make it short, the graph
commands of JAVA. It is based on the <span> tag.

Also, based on the 'symbol' font and some trick with tables, i
developed a library to make maths on a web page (dinamically so to
have exercises always news for my students) for example the
instruction ww(frac(intrnd(1/10),intrnd(1/10)) prints a casual
fraction on the page and ww(exists,x,inset,A) prints the two
mathematical symbols and 'x' and 'A'.

This libraries have the very usefull property to work off-line (client
side), so students can change the code and make esperiments at their
home (and eventually re-put them on their own sites). It is also a way
to make students work with programmation (they love graphics)

You can see them at
www.giovanninicco.com/gnzip

or take them up at
www.giovanninicco.com/gnlib.zip.

If you are interested to use them or to develop some other
libraries,or just give a comment (good or bad) i would be very
pleased: wr***@giovanninicco.com

Giovanni Nicco
Jul 23 '05 #1
2 1547
wr***@giovanninicco.com (Giovanni Nicco) writes:
Also, based on the 'symbol' font .... for example the instruction ww(frac(intrnd(1/10),intrnd(1/10))
prints a casual fraction on the page and ww(exists,x,inset,A) prints
the two mathematical symbols and 'x' and 'A'.


For this, you should not rely on the symbol font. From the example
page, I get:
---
ww(exists_,"x",inset,"A",_bar_,"x",leq,"1"); produces:
$ xÎA ½ x£1
---
I guess the character with the same number as the "$" sign comes out as
an "exists"-symbol in the symbol font, but that is not how fonts are
supposed to work.

My browser (Opera in this case) sees a "$" and thinks:
"a byte with the value 36 ... the page encoding is assumed to be
windows-1252 (that's a guess, the file contains not encoding
information and the server didn't send any), so that byte represents
Unicode code point 36 - the dollar sign. Does the currently selected
font, Symbol, have a glyph for code point 36? No. Bummer, then let's use
the default font."

It doesn't, as IE does, decide to arbitrarily show the 36th glyph
in the font file, a glyph that has the assiciated Unicode code
point 8707, not 36.

The code point for the "exists" symbol is 8707 (hexadecimal
0x2203). You can use it in a Javascript string as, e.g., "\u2203"
or in HTML as

or
&exist;

Ditto for the other Symbol glyphs, including greek letters.

Otherwise it looks fine in IE :)
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2
[...]
For this, you should not rely on the symbol font

You can use it in a Javascript string as, e.g., "\u2203"...

[...]

thanks, i will rebuild my library in that sense.
Bye
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Marco Chiarandini | last post by:
Dear all, I am experiencing a problem in the deallocation of STL data structures. In paritcular I create a vector of sets and insert integers in each set. I do not define any deallocator since...
0
by: ufnuceda | last post by:
Hello everyone, I was wondering if any of you have some experience with the boost library. I am having trouble compiling code with it. Since boost is being used a lot these days I thought some...
1
by: monomaniac21 | last post by:
Hi all! Ive got a very simple page shown below to draw a line graph and I need some help, how do can i label each point on the X and the Y axis? The lines are drawn with an imageline function,...
0
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with...
3
bvdet
by: bvdet | last post by:
I wrote a script that extracts line and circle data from an Autocad DXF file:## GridDXF.py Version 1.02 ## Copyright (c) 2006 Bruce Vaughan, BV Detailing & Design, Inc. ## All rights reserved....
4
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; }...
2
by: Man4ish | last post by:
I have created Graph object without vertex and edge property.It is working fine. #include <boost/config.hpp> #include <iostream> #include <vector> #include <string> #include...
1
by: rboorgapally | last post by:
Hi everyone, I am trying to run BFS on a graph that is created with input from a file. I am facing problems with the output though the code is compiling: #include <boost/graph/adjacency_list.hpp>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.