Archivio per Programmazione

Lezione di oggi di reti di calcolatori: i cookie.

Interazione utente-server: i cookie.
Non tutti i siti usano i cookie, ma Yahoo, Amazon e DoubleClick ne fanno largo uso.

Reti di calcolatori e internet, Kurose-Ross, ed. settembre 2005.

The 4th Coming – T4C Server in Python – Version 0.3

The 4th Coming Server - IngameAllora, ecco la versione 0.3. Adesso il client entra in gioco, ma mancano tutti i pacchetti relativi ai movimenti ed a qualunque azione fatta in gioco.
Vengon mostrati anche 3 canali: Bugs, Main e RolePlay, ma per il momento le chat non sono ancora attive.
Ho aggiunto dei servizi e modificato la schermata di avvio del server… lo sviluppo procede.
Vi lascio quindi con i nuovi sorgenti e il dump del database che vi avevo promesso.
Eventuali impostazioni vanno modificate nel file t4c_sockets.py.

Here’s the server version 0.3. Now the client enters in ‘inGame’ mode, so the healing service add health and mana.
At the time I am writing, most of the packets to move the player, chat, attack… and similar are not been implemented yet.
There are 3 chat channels: Bugs, Main and RolePlay, but the chat has not been implemented.
I added more threads and modified the server boot, but the developing still continues.
So, it is now available for the download the new server version and the database dump to easily try it by yourself. The settings are saved in t4c_sockets.py.

T4C Server Source code
Database Dump

The 4th Coming Server v0.2 + Source code – MMORPGing with MySQL!

The 4th Coming Server ScreenshotSì, il python è figo. Ci sono anche i thread! :D
Ho aggiunto molte funzioni al server, ora è multiutente (alloca dinamicamente le classi utente richieste ed un thread separato si occupa di pingare i client connessi (non ho ancora reversato la parte di protocollo che si occupa del kick di un utente, per ora viene fornito solo un avviso).
Inoltre è stata aggiunto il supporto MySQL, per cui ora gli utenti effettuano il login *sul serio* (prima qualunque login veniva accettato mancando un controllo a riguardo) e vengono proposti i veri personaggi creati.
Il database MySQL è lo stesso creato per il server ufficiale della Vircom, a breve comunque rilascerò anche un dump per poterlo provare in modo più semplice.
La versione di protocollo attualmente supportata è quella relativa al client 1.25.
Il client ancora non entra in gioco, ma beh, ho preferito implementare tutte queste funzioni e preparare la modalità multiuser *prima*! :D

Python is cool. Really cool. I was looking for something to ping users connected… and I discovered it has threads. And yes, threads are cool too :P
Some features has been added, now it is multiuser, MySQL has been implemented, so using the standard Vircom database, you can log in and manage users. Shortly I will add also the MySQL dump to help you try it.
The actual protocol version implemented is the 1.25.
The client still doesn’t enter in a game, but I’ve just added the multiuser feature and the MySQL support, features *more* useful I think :P
Here’s the The 4th Coming Server, with Python Sources.

And here’s the TODO:
Here’s what should be added for the new release (ordered by importance):

- Handling of fragmented packets
- Handling of non-received packets (or crc error)

- Client enter pre-game
- Client enter in-game

- Chat
- Whispers, messages & co

- Movements
- Fights

- CLI to use and edit server preferences (CLI or via browser and another thread spawned)

- Maps, walls & co

- NPCs scripting (maybe in python?)

Controllo servocomando con un pic

Sì, mi interesso anche di robotica e questo è l’ultimo progetto che ho realizzato… ho cercato di renderlo quanto più semplice e banale possibile… e di farlo funzionare :P

Adminbar for wordpress!

Adminbar

Dopo aver finito gli esami più impellenti, ho finalmente il tempo per dedicarmi alle mie cose… e quindi ho deciso di ritoccare e pubblicare finalmente un plugin che ho creato non troppo tempo fa, che mostra, come su wordpress.com, una barra in alto facilmente personalizzabile, con le azioni più comuni. Tra le tante cose, vengono mostrati i commenti in attesa di moderazione e lo spam akismet da controllare.
L’installazione è semplicissima, basta scaricare il file e decomprimerlo tra i plugins. Finito.
Fatemi sapere se vi interessa ;)

———————-

With this plugin you can add in your blog a topbar (wordpress.com-like), with the most common actions. It’s really easy to install (just decompress it in the plugins directory) and easy to personalize (you have to edit the plugin… but it’s really easy to do!). I’ve also added the “awaiting moderation” action and the “akismet spam”… so it’s really easy to check if you gotta something to do :P

———————-

Adminbar Türkçe İndir (Thanks to Wparşiv)
More information here! (Thank you ;))
———————-

Cheers!
Note: It is released under GPL v2 license

Changelog 1.1:
- Fixed absolute path with relative path
Changelog 1.2
- Easy configuration with arrays, fixed the plugin with internet explorer

Comment Spam Trap v2.0

Dato che ho dei seri problemi con lo spam (pur avendo akismet attivo qualche commento di spam mi viene messo erratamente tra gli articoli in moderazione), ho scaricato, modificato, semplificato ed installato un plugin chiamato Comment Spam Trap, scritto originariamente da Badi Jones.
Adesso il plugin è perfettamente autonomo, basta installarlo ed attivarlo e filtrerete gran parte dello spam.
Come funziona?
Viene proposto al bot che invia commenti fasulli un form di verifica dell’email, che però viene nascosto invece ai browser (tramite css, anzichè tramite javascript come faceva lo script originale… ed inoltre a differenza dell’originale, è perfettamente invisibile ai normali utenti).
Quando il box viene riempito, viene generato un errore e la richiesta di pubblicazione del commento viene interrotta.
Spero vi possa essere utile quanto lo è a me :)
Ecco il link per il download.

In this period, i’ve got many problems with spam. Akismet sometimes do not recognize it and some spamming comments are placed in “awaiting moderation”, so I searched somewhere for a solution.
I’ve found a plugin called “Comment Spam Trap v2.0″ originally written by Badi Jones; so I’ve downloaded, edited and installed it.
Now the 2.0 version of mine is fully transparent to the end-user and doesn’t require anything more than being activated.
How does it works?
It adds a textbox, hidden with the css to the browsers, but visible to the spamming bots, where’s required to rewrite the email for validation. If the box is filled, the comment is discarted.
I’m testing it now and it seems to work well… so you can try it and let me know what do you think about it :P
The download link is here.
Have a nice spamless day ;)

Nuova photo gallery in ajax…

Ajax Gallery… quasi finita! Guardate quant’è bella :P
In pratica ha le thumbnails che si ingrandiscono al passaggio del mouse, effetti di dissolvenza, animazioni varie ed un utile menù sull’immagine grande (che può essere usato ad esempio per votare la foto e far scaricare le diverse versioni della foto, come mostrato nell’esempio ;)).
Adesso non resta altro che implementare il php per la gestione della galleria… ed avevo pensato a fare un bel plugin per wordpress (visto che in wordpress devo implementarla!).

Buona visione a tutti ;)