Google Translate

English French German Spain Italian Dutch Russian Portuguese Japanese Korean Arabic Chinese Simplified by : BTF, ed. by JRD (me!)

martedì 22 marzo 2011

Where not to go to ask questions about php or javascript programming

Wooooooooowww, I just had a heck of an experience trying to create a worthwhile dialog on a php forum to clear up a few of my own doubts. Through Google Groups comp.lang.php came right up into sight, so I figured it might be a good place to ask a question, I figured there would be a number of people who know their stuff and get me off on the right track.

So I pose my question, very simply and straightforwardly. Well well well, some know-it-all stuck up geeks start answering me and write comments about everything EXCEPT the main point of my question. I stood up to this and tried illustrate my situation and my question as explicitly as possible so as to avoid any misunderstandings as to what I was actually asking, and what do I get? Another series of answers about how I'm stuck up, know-it-all, and too condescending when I'm the one who doesn't know what he's talking about and they know their stuff and all...

And guess what, after going back and forth a few times I actually began getting some results. Until someone joined in on the conversation and brought down to the mud again. What a bickering bunch of folks over there on usenet! It must be a big group of 60-70 year olds who all they know how to do is show off, pick on people, try as hard as they can NOT to help, bicker, and then stomp their legs because you don't humiliate yourself enough in front of their great wisdom and knowledge.

Guess what usenet, you can bathe in your own egotistical closed-minded confrontations that don't lead anywhere and don't actually build anything on the web. If the world wide web is going anywhere nowadays, it's notwithstanding you guys that's for sure.

What a completely useless conversation that was. I think it should be called uselessnet, not usenet.

Finalmente il calendario liturgico di rito latino in formato iCal!

Lo scorso anno avevo preso contatto con diverse realtà ecclesiali presenti in web, che offrono la liturgia quotidiana, e spiegavo lo standard per il formato calendario "iCal", chiedendo quali potevano essere le possibilità per creare un calendario liturgico in formato iCal, compatibile quindi con applicazioni di calendario tipo Google Calendar, o applicazioni Macintosh... Se il calendario liturgico è appunto un calendario, perché non pubblicarlo in formato calendario standard per il web o per le applicazioni web / mobili / desktop ecc.? Ero del parere (come lo sono tuttora) che era un ottimo modo per condividere e consultare il calendario liturgico. Come diverse case editrici stampano i "calendarietti liturgici" dove troviamo le festività cristiane, le letture del giorno, e indicazioni per la recita della Liturgia delle Ore, perché non trasportare l'idea del "calendarietto liturgico" in formato elettronico standard, in formato iCal?

Non molti mi hanno dato più di tanto retta. Se ne sono interessati in modo particolare Francesca Favero e Roberto Zago del sito laparola.it e abbiamo iniziato una conversazione costruttiva a questo proposito e a proposito di altro.

Ebbene proprio pochi minuti fa ci tornavo sull'idea e ho deciso di googlare: "Calendario Liturgico iCal", e questa volta escono risultati. Qual'è il primo risultato? Dal sito laparola.it !

Potete scaricare qui il calendario liturgico in formato iCal (non ci sono i colori liturgici o indicazioni per la liturgia delle ore; ci sono le festività e i santi con l'indicazione del grado della celebrazione liturgica, e nella descrizione dell'evento ci sono le letture del giorno):

http://www.laparola.it/calendario/CalendarioLiturgico2011.ics

Io l'ho appena importato in Google Calendar, e ora attraverso Google Calendar potrà essere presente anche sul sito parrocchiale http://www.parrocchiasanlino.org.
Se chiunque altro desidera incorporare la versione Google Calendar l'ho reso un calendario pubblico a questo indirizzo:

https://www.google.com/calendar/feeds/g1b2j0emjcmucavtqk4u2nbflg%40group.calendar.google.com/public/basic
(per il feed XML)

https://www.google.com/calendar/embed?src=g1b2j0emjcmucavtqk4u2nbflg%40group.calendar.google.com&ctz=Europe/Rome
(per la versione web)

Per incorporare il calendario nel tuo sito puoi utilizzare questo codice:
<iframe frameborder="0" height="600" scrolling="no" src="https://www.google.com/calendar/embed?src=g1b2j0emjcmucavtqk4u2nbflg%40group.calendar.google.com&ctz=Europe/Rome" style="border: 0;" width="800"></iframe>

Yahoo! AGENDA

Vuoi iscriverti con l'agenda di Yahoo? Se hai già fatto accesso al tuo account Yahoo! basta andare a questo indirizzo: http://calendar.yahoo.com/subscribe (oppure dalla pagina dell'agenda, clicca su "Agende" nella colonna di sinistra, e seleziona "Iscriviti all'agenda"); poi inserisci l'indirizzo del file ics (http://www.laparola.it/calendario/CalendarioLiturgico2011.ics) e cliccare su "Avanti". Nella schermata successiva dai un nome al nuovo Calendario ("Agenda") e Salva. Non poteva essere più facile!

Calendario IPOD / IPHONE

Vuoi importare il Calendario Liturgico nel calendario del tuo Apple Ipod? Segui queste semplici istruzioni prese dal sito della Apple:
Copiare su iPod il documento iCal (.ics).


venerdì 11 marzo 2011

D'Orazio's Triangle (or Pascal's Triangle modified)

I think I may have made an interesting discovery.
I have been putting mathematical problems to my programming skills in the past couple weeks on my personal website johnrdorazio.altervista.org . One of the problems that I translated into php code was Pascal's Triangle. I was intrigued to find out that highlighting the odd numbers in Pascal's Triangle creates a Sierpinski Triangle. And I began wondering. What if Pascal's Triangle was slightly different? What other kinds of results can be obtained by highlighting the odd numbers?

So I thought I would try something very simple. You can see an example of Pascal's Triangle here:
http://johnrdorazio.altervista.org/SitoFlatnukePersonale/index.php?mod=problemsolving#pascal3angle


You see that Pascal's Triangle has invisible zero's outside the triangle that are added to the ones along the outer rim.
And I wondered, what if instead of having ones on the outer rim, we had incrementals (1,2,3,4...)? Pascal's has incrementals, but on the second diagonal going inwards, such that the two diagonals with the incrementals cross at the top resulting in two ones right next to each other.
And if instead the two diagonals didn't cross, but started off from the same 1, thus being the outer edges of the triangle? We get slightly different results in the addition that is being done.

So now I try to highlight the odd numbers, and then also mod 3, and I make an interesting discovery: the first 33 lines are sort of like Sierpinski's triangle with a sort of fractal pattern, but from line 33 on we get a hyberbola. Well isn't that awesome! What does it mean? I have no idea. But I thought it was interesting...

------------------------------------------------
UPDATE:
Ok I figured out in the meantime an error in my coding that was causing this behaviour of forming a "hyperbola" when highlighting mod 2 (=odd numbers) or mod 3. It has to do with the way php handles big integers. There is a limit on integer representation in php due to the number of bytes that a large integer occupies. I've read up that x64 machines can represent larger integers then x32 machines, since they have more "byteroom" to represent the integers. After that limit is reached, all larger integers will be represented as a float rather than in decimal notation. Float numbers don't have the same precision as decimal integers, so this inexact representation, when modded, turns out to have not more and more odd numbers, but more and more "odd looking" numbers (!). The amount of these "odd looking" numbers grows pretty constantly, which gives a hyperbola look to the highlighted cells.
Even though it's an "error" in the php math, which can be corrected using other math functions provided by php such as bcmath, I still think it's sort of neat. I suppose it could be interesting to consider the bitwise representation of these large integers, which leads to the hyperbola look (odd numbers can usually be determined by examining the bit-endings in the binary value of the integer: a 0-bit ending represents an even number and a 1-bit ending represents an odd number; the php bitwise operator "&" can be used for this purpose). Perhaps more experiments can be done with binary representation rather than with decimal representation to see what comes of that.

Instead the correct way of coding the php math functions (using bcmath, which utilizes string representations of large integers so that they will not lose their precision, and in such a way that there is practically no other limit than the available memory for calculation) gives us an odd-number highlighting a little different from Sierpinski's triangle, because the highlighted triangles seem to grow almost exponentially...