It took me about one year to find some time to enhance my project BD-incollo. I worked hard for 5 days and to add new features and fight the (huge) amount of spam that was wasting my database space. Now I’m very proud to announce bd-incollo 0.9, a free, light, speedy, anonymous Pastebin clone written in Python Django. This version introduces a lot of new features, including the possibility to make diffs between pastes, and fights spam using Akismet. Read more about the features on the project page and on the new News section on the website that makes use of BD-incollo, incollo.com .
BD-incollo 0.9 is free software as always, under the Gnu Affero General Public License 3.
Currently, you can:
- Copy, Paste and store a text / source code snippet to the system
- NEW! Give other people the possibility to discover your Paste (make a Paste either public or private)
- Decide to colorize the syntax of the Paste
- Share it using its URL
- NEW! Enhance Pastes! Create a Paste starting from an old one
- NEW! View differences! Makes use of the powerful diff-match-patch by Neil Fraser to see differences between two Pastes
- NEW! Antispam protection using Akismet and akismet.py by Michael Foord
- Download it as plain text
- View it as plain text
- Search something interesting through other pastes!
- Report abuses to site admins
It also uses a very smart hash system that automatically re-computes a hash key in case of collision.
Here is an example of Paste: http://incollo.com/f341e6a4b
Here is an example of enhancement of the Paste: http://incollo.com/ba22929ac
Here is a full-screen diff of the Pastes: http://incollo.com/compare/f341e6a4b/ba22929ac
Play with them! Use incollo.com, spread it!
Road to 1.0
1.0 development will start after my next examination session (on September) and will surely include:
- Some asynchronous improvements
- The possibility to teach Akismet about Spam and Ham in Pastes (when admin user is logged in)
- More cleaner code
- The possibility to associate a user to its Pastes via a Cookie (always anonymous) and let him delete them
- Comments to snippets?
- What else? Contact me if you’ve got ideas!
Related posts
Categories: Activism?, Free*, Programming Tags: bd-i, BD-incollo, BD-project, bodom_lx free software, code, contact, DELETE, differences, django, django easy example, Download, free software, google, hash, HTTP, incollo, page, pastebin, pastebin clone django, pro, project, projects, PUT, python, python django, report, rest, site, source, source code, syntax, Text, url, version, web, year
Time for a screenshot! This is the page which handles new pastes:

BD-incollo: page for new pastes
There are some news:
- I implemented a hash function (hexadecimal number as output) to be used to access pastes, instead of using their ids
- I played with templates to have all the functionalities accessed in very small mouse movements
Next, the requirements regarding automatic cleanup of the pastes!
Related posts
Categories: Activism?, Free*, Programming Tags: bd-i, BD-incollo, BD-project, django, hash, HTTP, incollo, page, PNG, PUT, report, screenshot, templates
Time for two new C programs! At the DSA course I learned something about Hash Tables and collision resolutions.
I just implemented insert/search/print operations.
The first source code is an implementation of a Hash Map with open addressing (linear probing) as collision resolution method.
The following are the interesting functions of the program. As always, take a look at the source code for comments:
// hashMapLinear[] is the hash map
void linearProbingInsert
(int value
){
int probe = hash
(value
);
while (hashMapLinear
[probe
]!=
0){
probe = fmod
((probe
+1),SIZE_HASH_MAP
);
}
hashMapLinear
[probe
] = value;
}
int linearProbingSearch(int value){
int probe = hash(value);
int i;
for(i=0;i<size_hash_map ;i++){
if(hashMapLinear[probe]==value)
return TRUE;
probe = fmod((probe+1),SIZE_HASH_MAP);
}
return FALSE;
}
Download: hash-map-linear-probing.c
The second program is an implementation of a Hash Map with chaining as collision resolution method.
Interesting functions:
// t_hashTableNode is a struct that is created as single linked list
void chainedHashInsert
(int value
){
int probe = hash
(value
);
if(hashMapChained
[probe
] ==
NULL){
hashMapChained
[probe
] = malloc
(sizeof(t_hashTableNode
));
hashMapChained
[probe
]->value = value;
hashMapChained
[probe
]->next =
NULL;
}else{
t_hashTableNode *hashTableNode = hashMapChained
[probe
];
while(hashTableNode->next!=
NULL){
hashTableNode = hashTableNode->next;
}
hashTableNode->next = malloc
(sizeof(t_hashTableNode
));
hashTableNode->next->value = value;
hashTableNode->next->next =
NULL;
}
}
int chainedHashSearch(int value){
t_hashTableNode *hashTableNode = hashMapChained[hash(value)];
while(hashTableNode!=NULL){
if(hashTableNode->value==value){
return TRUE;
}
hashTableNode = hashTableNode->next;
}
return FALSE;
}
Download: hash-map-chaining.c
Related posts
Categories: Programming Tags: address, algorithms, C language, code, data structures, Download, hash, hash map, hash table, HTTP, java, javascript, link, list, page, pageTracker, php, pro, rest, source, source code, Wiki, wikipedia
Recent Comments