Archive for the ‘ General ’ Category

Protest SOPA

The price of freedom is eternal vigilance.

~Thomas Jefferson

SOPA is bad for free speech, free expression, innovation, and the American sense of liberty. Censorship is not the way to stop piracy internet piracy.

Join the Protest:

https://www.google.com/landing/takeaction/

http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act

http://americancensorship.org/

 

 

Sphere: Related Content

Hacking Sphider Search Engine to Search Substrings

The Sphider search engine is a nice, compact program you can add to your site to provide a search function without having to go through Google or some other paid service. It offers all the features you’d expect from a search engine, including weighted searches, customizable output, and an easy-to-use administrator panel. The one thing it lacks, however, is the ability to search substrings.

Let’s say, for instance, you have a page on your site talking about an office you have in Europe. Searching for “Europe” comes up with the page without any problems, but if you type in “Euro”, you get nothing. For people used to using Google, this is unacceptable, because it tells the user that there are no pages with any version of “Euro”, including “European”.

The reason for this is twofold:

1. Sphider uses a series of tables in a database to organize and weight all the words on each page. To make the search faster, rather than one large database for each word, they are split into 17 databases, based on the leading character of the word when the MD5 hash of the string is calculated. For those of you unfamiliar with MD5, here is the official definition.

From RFC 1321 – The MD5 Message-Digest Algorithm:

The MD5 message-digest algorithm takes as input a message of arbitrary length and produces as output a 128-bit “fingerprint” or “message digest” of the input. The MD5 algorithm is intended for digital signature applications, where a large file must be “compressed” in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.

Just think of it as a function which takes a word and spits out a consistent string of gibberish. For Sphider’s purposes, the first digit of that string is the number of the table of words to look through. Since there are 17 possible values, that means that the search only has to look through one table, which is 1/17 of the total number of words. In essence, the search is faster.

The problem comes in when a term like “Euro’ puts out a different MD5 than “European’, which means that Sphider will try to look in a different table. Because of this, a search for “Euro’ will never come up with “European’.

2. The second reason involves the query that Sphider sends to the database. Here it is:

$query1 = "SELECT link_id from ".$mysql_table_prefix."link_keyword$wordmd5, ".$mysql_table_prefix."keywords where ".$mysql_table_prefix."link_keyword$wordmd5.keyword_id= ".$mysql_table_prefix."keywords.keyword_id and keyword='$searchword'";

The $wordmd5 portion is the MD5 code calculated earlier, which tells which table to search for that particular word. What you’ll notice, though, is the portion for keyword=’$searchword’. Since the search term and word in our example aren’t equal, this will never turn up a correct result. What we need to do is alter the equation to not only find things that are exactly equal, but are like each other. The new portion of the code we end up with is:

keyword LIKE '%".$searchword."%'

The LIKE operator is MySQL code for a simple pattern matching operation, and the % characters indicate that there can be any number of other characters before and after the search word. So, “asdfasdfeuro”, “euroasfasdf”, and “asdfasdfeuroasdf;alk” would all be acceptible.

Now that the basic search query is altered to match variations of the search term, and not just the search term exactly, we have to alter it further so that it searches every table of keywords, because those other words which include the keyword as a substring might have a different MD5 code, and thus be in a different table.

This is where the hack gets ugly.

Yes, there are longer ways of organizing things that would provide a more elegant solution, but the quickest, simplest solution is to simply make a query for each table, and combine them all with the UNION MySQL term into one big query. Hold your breath:

$query1 = "(SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword0, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword0.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword1, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword1.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword2, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword2.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword3, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword3.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword4, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword4.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword5, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword5.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword6, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword6.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword7, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword7.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword8, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword8.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyword9, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyword9.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyworda, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyworda.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keywordb, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keywordb.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keywordc, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keywordc.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keywordd, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keywordd.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keyworde, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keyworde.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"UNION (SELECT distinct link_id, weight, domain from ".$mysql_table_prefix."link_keywordf, ".$mysql_table_prefix."keywords WHERE ".$mysql_table_prefix."link_keywordf.keyword_id = ".$mysql_table_prefix."keywords.keyword_id and keyword LIKE '%".$searchword."%')".
"order by weight";

What this does is disregard the MD5 code for the search term, and search every table anyways…even the ones Sphider thinks shouldn’t have the search term in it. While this does theoretically slow the search down, if the site isn’t hundreds of pages long, the search time won’t be very much longer. What is does, is turn up results for “European” when someone searches for “Euro”, which is well worth the sacrifice of a few tenths of a second in search time.

 

Sphere: Related Content

Dancer Silhouettes (Free Download)

In a continuing series of free stock artwork, here is a set of vector images of ballet dancers in different poses.

Ballet Dancer Silhouette Images

Download Compressed File Here

DancerSilhouettes.zip (includes .ai, .eps, and hi-res .jpeg files).

You are welcome to use these images royalty-free, so long as you don’t a) pass them off as your own work, b) distribute them without redirecting people back here, or c) sell them for a profit.

 

Sphere: Related Content

A Personalized Google Doodle

I was given this over the Holidays, and thought it cool enough to share with everybody. I have yet to frame it, but it is in the works.

Considering how many millions (or billions?) of people use Google every day, I’d say this man’s work has quietly gained quite a bit of fame, making this piece, albeit a print, quite a find. He was described by CNN as being the “most famous unknown artist in the world.”

I believe it’s little touches like this—adding a uniqueness and attention to detail—that make what a business does special. Our culture seems to have lost the aesthetic touch we had in years past, the touch that makes cities in Europe so beautiful and many in America so ugly in comparison.

 

Sphere: Related Content

Art History

In many ways art is the best lens with which to study history, as it allows us to peer through the haze and focus on human thought, passion and capability of the time.

 

Sphere: Related Content

Web Publishing

When discussing the work I do with others, I find the current nomenclature somewhat lacking. I’ve taken to using the term “web publishing” much more extensively, as I believe it better describes the combined fields of web design, web development, and traditional publishing.

Of course, when using the term, I am often me with raised eyebrows, as if the vagueness seems to leave people a bit confused. To me, however, that’s the idea.

The term Web Publishing is meant to encompass all the elements of traditional publishing, translated into a different media. A web publisher is not strictly a graphic designer, nor are they a developer. They aren’t solely focused on the content of the site or in how it’s structured, any more than a publisher is solely concerned with the text of the book or it’s layout.

Web publishing encompasses all of these aspects, from the design and structure of the site, to the content that goes in it, and finally to the development process which brings all these pieces together into a working piece. Much the same way that a work published by traditional means requires an engineering know-how to put the creative pieces into a working format.

pub⋅lish [puhb-lish]
–verb (used with object)

1. to issue (printed or otherwise reproduced textual or graphic material, computer software, etc.) for sale or distribution to the public.

The terms Web Designer and Programmer seem to pigeonhole people into one category or the other, without opening up to the possibility of combining both the right and left sides of the brain. In this same way, the worlds of printed material and virtual material seem to be split, and everybody is required to fall into one camp or the other. I feel there is a stronger need to draw the connection between what happens in the physical world of print, and what goes on in the virtual world of web.

web pub⋅lish⋅ing [web puhb-lish-ing]
–noun

1. to issue via the web information (text, graphics, products, data, etc…) for sale or distribution to the public.

2.the entire process of publishing material online (via the internet), including design, content development, programming, and promotion, requiring knowledge of graphic design, [English] grammar, various programming languages, and project management.

The same ideas of typography, layout, design, editing, etc…, both apply to material published online and in a book. The only thing that differentiates the two is the way we access that material. Because of this fact, I believe the term web publishing deserves a higher place in our lexicon, and hopefully will be more widely understood in the future.

 

Sphere: Related Content

Interactive CV

Even if you don’t have your own portfolio site, or a site advertising your services, a good way to “put yourself out there” is with an interactive web resume or CV. Not only can it convey a good deal of information about yourself, it does so in a very elegant, visually-pleasing way which helps set you apart from the competition. With the current economic situation, employers can be swamped with hundreds of resumes for a single job opening, and this makes standing out from the crowd more important than ever.

Template 1 Screenshot

Template 2 Screenshot

If you’re interested in using either one of the templates shown here, simply download the appropriate file to your machine, unpack it, and insert your own content into it. Each template employs jQuery to add basic interactivity, and imports the latest version from the jQuery website.

To add or remove a section, simply change the link between the <h2> tags in the section labeled navigation. Then add a corresponding div, like so:

<div id="your section name here" class="information" >
    your info goes here
</div>

Within the current templates you will find several corresponding styles that you can use to format your information, or you can edit the attached style sheet to include your own.

You can download the .rar files for each template here:

template 1
template 2

This is considered open source, and you are welcome to use and distribute it as you like, so long as you do not make a profit from its distribution. You are welcome to use it for personal, business, and professional development.

Sphere: Related Content

 

close