Hi..
After long time didn’t update my blog I decide to buy a domain name & move this blog to the new domain.
Please post comment at that new blog. (http://jimmod.com/blog/)
Thanks
Comments Off
herber-consulting.de - db2 log switch, ifxclone doesn't work in ids growth edition
jimlife.wordpress.com - mysql row number, mysql record numberHi I move my blog to my own domain http://www.jimmod.com/blog
My Life 11:32 pm
Hi..
After long time didn’t update my blog I decide to buy a domain name & move this blog to the new domain.
Please post comment at that new blog. (http://jimmod.com/blog/)
Thanks
Comments Off
My Life 6:15 pm
I move the blog to my new domain, please visit : http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/ for latest update
Sometimes you need to do query with MySQL for reporting.
And you’ll need to display the row number/ranking in query result.
Example you have this table:
table : player
fields : playerid, name & score
For reporting purpose you need to query the top 10 (highest score).
The result should be : rank, memberid, name, score.
Example :
rank playerid name score
———————————–
1 A1029 Jimmy 100
2 A9830 Lia 98
3 B28d0 Lulu 90
…
…
10 B8789 Lele 50
Now you can easily query the top 10 by using ‘limit’ and ‘order by’, but how to automatically add row number in query result?
Here’s how you do it:
select @rownum:=@rownum+1 ‘rank’, p.* from player p, (SELECT @rownum:=0) r order by score desc limit 10;
Try it ![]()
This will create a variable rownum, initialize with value 0 & increase it by 1 for every record
Technorati Tags: mysql, select, query, rownum, row number, rank
guru4.net - scienza branche, capcha guruGURU4.net offre gratuitamente risorse e soluzioni per sviluppatori Web: script, articoli, suggerimenti, librerie complete, codice sorgente liberamente utilizzabili per lo sviluppo di pagine Web
La libreria AJAX "JavaScript SOAP Client" che consente di sfruttare la potenza e la semplicità dei Web Services per creare applicazioni dinamiche
Il framework open-source "Caching Library" per la gestione avanzata della cache di ASP.NET
kodyaz.com - activate windows 7, how to activate windows 7SQL Server and SQL tutorials, Reporting Services, OLAP, Windows 7 tools and Windows 8, Purble Place, SAP ABAP and SAP Smartforms development, Visual Studio, Javascript codes, ASP.NET
anaesthetist.com - javascript calculator, preparation and priof reptilase test
|
microshell.com - xml ampersand, max in datediff in mysqlLearn something share something
apostylee.com - webservis, asp.net web serviceasp.net, jquery ve diger web teknolojileri uzerine, birazda kisisel yazilarim
aspguy.wordpress.com - how to reduse page size in wordpress, mvc 3.0 downloadHave you ever thought that how does Google perform a fast search on a wide variety of file types? For example, how Google is able to suggest you a list of search expressions while you are typing in your keywords?
Another example is Google image search: You upload an image and Google finds the similar photos for you in no time.
The key to this magic is SimHash. SimHash is a mechanism/algorithm invented by Charikar (see the full patent). SimHash comes from the combination of Similarity and Hash. This means that instead of comparing the objects with each other to find the similarity, we convert them to an N-bit number that represents the object (known as Hash) and compare them. In the other words, if instead of the object, we maintain a number that represents the object, so that we will be able to compare those numbers to find the similarity of the two objects.
The basics of SimHash are as below:
Since the hash value can be used to represent any kind of data, such as a text or an image file, it can be used to perform a fast search on almost any file type.
To calculate the hash value, we have to decide the hash size, which normally is 32 or 64. As I said before, an unsigned value works better. We also need to choose a chunk size. The chunk size will be used to break the data down to small pieces, called shingles. For example, if we decide to convert a string such as “Hello World” to a hash value, If the chunk size is 3, our chunks would be:
1-Hel
2-ell
3-llo
Etc.
To convert a binary data to a hash value, you will have to break it down to chunks of bits. E.g. you have to pick every K bits. Google says that N=64 and K=3 are recommended.
To calculate the hash value in a SimHash manner, we have to take the following steps:
Here is the code:
private int DoCalculateSimHash(string input)
{
ITokeniser tokeniser = new Tokeniser();
var hashedtokens = DoHashTokens(tokeniser.Tokenise(input));
var vector = new int[HashSize];
for (var i = 0; i < HashSize; i++)
{
vector[i] = 0;
}
foreach (var value in hashedtokens)
{
for (var j = 0; j < HashSize; j++)
{
if (IsBitSet(value, j))
{
vector[j] += 1;
}
else
{
vector[j] -= 1;
}
}
}
var fingerprint = 0;
for (var i = 0; i < HashSize; i++)
{
if (vector[i] > 0)
{
fingerprint += 1 << i;
}
}
return fingerprint;
}
And the code to calculate the hamming distance is as below:
private static int GetHammingDistance(int firstValue, int secondValue)
{
var hammingBits = firstValue ^ secondValue;
var hammingValue = 0;
for (int i = 0; i < 32; i++)
{
if (IsBitSet(hammingBits, i))
{
hammingValue += 1;
}
}
return hammingValue;
}
You may use different ways to tokenize a given data. For example you may break a string value down to words, or to n-letter words, or to n-letter overlapping pieces. From my experience, if we assume that N is the size of each chunk and M is the number of overlapping characters, N=4 and M=3 are the best choices.
You may download the full sou
devtrends.co.uk - how disable jquery addmethod rule by condition, asp.net mvc 3.0 jquery select listThis site was
ibphoenix.com - firebird, open source databaseIBPhoenix is the premier portal for the Firebird Open Source Relational database, and the leading provider of information andservices to Firebird developers and users, those who develop applications on Firebird and those who develop the underlying Firebird database engine itself.
Un ensemble complet autour de Firebird : IBPhoenix publie son 20ième DVD Développeurs.
Le DVD Développeurs contient le livre The Firebird Book: a Reference for Database Developers - Edition II (Beta), ainsi que les binaires et programmes d'installation de toutes les dernières versions de Firebird (1.0.x, 1.5.x, 2.0.x. 2.1.x et 2.5) et les autres logiciels relatifs à Firebird. Le DVD contient aussi la documentation, les drivers, outils et le code source. Vous trouverez aussi dans ce DVD une application permettant de parcourir et faire des recherches sur les archives d
sqlservercodebook.blogspot.com - mssql how to remove substring to string, update data from one table to another
cloudant.com - mango couchdb, lucene exact search with couchdbCloudant data layer as a service with elastic scaling. Start for free. Powered by CouchDB, JSON, MapReduce.
logiclabz.com - sql server split, javascript copy to clipboardLogiclabz is a Website Design & Development company with a group of talented individuals having 10 years of Software development experience.
Logiclabz
a programming laboratory



projectdmx.com - t-sql replace, select 1)a join
|
| Home | Database Fundamentals | Data Exchange | Design | Transact SQL | About |
|
WELCOME Welcome to the data management and exchange project website. My name is Anith and I am an independent database consultant. Though, I usually work on multiple projects in parallel, over the past few months or so, I have been working exclusively for a small wealth management firm in west Tennessee. If you’d like to know more about my background, the kind of work I do and my professional qualifications, please check out the authors section of this site. I started this site about two years ago as a training platform to benefit a couple of clients I had consulted previously. Moreover, I needed an avenue to be partly involved with developing software for database access and data exchange using .NET framework. A large portion of the internal contents are about programming basics, elementary software development principles and fundamentals of relational database management. A few of the pages, primarily related to the D |
mackey.ie - ctrl alt del remote desktop, using left join and where clause
idealprogrammer.com - learn vb.net in 24 hours, vb.net code generator1,300 hours of .net video tutorials on asp.net, visual basic.net, c-sharp, sql server, visual studio, and much more.
cachemiss.com - su - informix, debian 6 libct3 sqsh sybase asa
devdaily.com - mysql create user, mysql show usersTutorials for Java, Linux, Mac OS X, iPhone, iPad, Android, Drupal, MySQL, UML, software quality, testing, and more.
omegacoder.com - c# dictionary, dictionary c#
itlearner.com - 成语, 一呼百应IT学习者为广大奋斗在IT互联网站线的朋友们提供重要的IT资讯,并更多提供草根站长需要的技术文章,建站技巧等信息。
javafaq.nu - java byte signed, java compare timeEasy Learn Java: Programming Articles, Examples and Tips :
| |||||||||||||||||||
|
|
oreilly.de - ios5 programming cookbook, web 2.0Der O'Reilly Verlag ist die deutsche Niederlassung des international erfolgreichen Verlages O'Reilly Media, Inc. Die Bücher beschäftigen sich u. a. mit der Programmierung (Java, Perl, PHP), Betriebssystemen (Linux/Unix/Mac/Windows), Web-Entwicklung (XML) und Web Services.
mattsbits.co.uk - standard web banner sizes, convert email address text to image php
programmingsolution.net - tree structure jquery, ajax tree menu exampleProgramming Solutions Your Source for Information on C#,Visual Basic,PHP,JavaScript,CSS,HTML,JQuery,C# Asp.net,Visual Basic Asp.net
Category: SQL
Category: Asp.Net
Category: MDX
wow-v.com - brainiac on the tesnexu, wow vCreate, Share, and Download custom items and mobs for private WoW servers!



|
|
DONATE |
|
mirthcorp.com - mirth, mirth connectMirth Corporation develops and implements Healthcare Interoperability and Interconnectivity solutions. Mirth Connect, an Open Source software solution provides the HL7 integration engine for the Healthcare Mirth Messaging Appliances.
superasp.com.br - asp imagens dinamica, asp flushPortal de programacao ASP, Artigos, forum , script , codigos, download, ecommerce, loja virtual, loja , comércio eletrônico