Do they belong to you? Claim these comments.
Dave
Is this you? Claim Profile »
2 months ago
in Import CSV file directly into MySQL | MySQL | Tech-Recipes on Tech-Recipes
@ir:
If the passwords in your CSV file are not already MD5() then just import them as per the instructions above then run this query:
UPDATE `users` SET `password` = MD5(`password`);
@ashish:
That is the "full code". There is no more. The only step you have to do before this is to create a table that matches the CSV file you already have. No one can tell you how to do that without having your CSV file. Don't forget to modify the query above to match the table you have just created.
@zlid:
No it can't. Fields are given names and types at the same time when the table is created. To assign the names automatically, MySQL would have to also assign the column types automatically which would mean scanning down through the entire CSV file to make sure that there were no letters in a column that started with numbers and finding the longest string in a column that started with a string and so on. There are too many options in table creation to allow it to be left up to software. NULL or NOT NULL ? DATE, DATETIME, TIME, CHAR, VARCHAR or TEXT ? What if you have a column full of numbers but one Excel error message that looks like "#value" ?
You will have to create the table yourself before importing the CSV file.
If the passwords in your CSV file are not already MD5() then just import them as per the instructions above then run this query:
UPDATE `users` SET `password` = MD5(`password`);
@ashish:
That is the "full code". There is no more. The only step you have to do before this is to create a table that matches the CSV file you already have. No one can tell you how to do that without having your CSV file. Don't forget to modify the query above to match the table you have just created.
@zlid:
No it can't. Fields are given names and types at the same time when the table is created. To assign the names automatically, MySQL would have to also assign the column types automatically which would mean scanning down through the entire CSV file to make sure that there were no letters in a column that started with numbers and finding the longest string in a column that started with a string and so on. There are too many options in table creation to allow it to be left up to software. NULL or NOT NULL ? DATE, DATETIME, TIME, CHAR, VARCHAR or TEXT ? What if you have a column full of numbers but one Excel error message that looks like "#value" ?
You will have to create the table yourself before importing the CSV file.
7 months ago
in 7 Offbeat Off-the-Grid Green Gadgets, Inventions, and Innovations on Ecoble
Burning coal is a "closed loop" in the same way that burning wood is. The only difference is the time scale. Biodiesel crops re-capture their carbon in a single year. A tree takes between 20 and 50 years. Coal takes millions.
Most climatologists are saying that the next 20 years are going to be the critical ones as far as the greenhouse effect is concerned. Therefore, burning a tree whose carbon won't be re-captured for at least 20 years is as bad as burning coal.
But carbon dioxide is only one form of pollution. It's one that has gone completely unnoticed for so long that we let it build up too much and now we are panicking about it but that doesn't mean that all the other sorts of pollution don't matter. Wood smoke contains carbon monoxide and loads of tiny carcinogenic particles. These don't have the same long term effect on the climate but they have a far more direct effect on our personal health.
http://www.usatoday.com/news/nation/2005-11-13-...
http://www.lungusa.org/site/c.dvLUK9O0E/b.23354...
http://burningissues.org/car-www/index.html
http://www.epa.gov/woodstoves/healthier.html
http://www.epa.gov/woodstoves/refp.html
The magnetic fridge link has gone 404 but I found a couple of articles about the technology:
http://www.physorg.com/news64851465.html
http://www.guardian.co.uk/technology/2006/dec/1...
Unfortunately the articles are a little old but the spin-off company that was created to start manufacturing the fridges looks to still be doing things:
http://www.camfridge.com/Pages/news.html
Most climatologists are saying that the next 20 years are going to be the critical ones as far as the greenhouse effect is concerned. Therefore, burning a tree whose carbon won't be re-captured for at least 20 years is as bad as burning coal.
But carbon dioxide is only one form of pollution. It's one that has gone completely unnoticed for so long that we let it build up too much and now we are panicking about it but that doesn't mean that all the other sorts of pollution don't matter. Wood smoke contains carbon monoxide and loads of tiny carcinogenic particles. These don't have the same long term effect on the climate but they have a far more direct effect on our personal health.
http://www.usatoday.com/news/nation/2005-11-13-...
http://www.lungusa.org/site/c.dvLUK9O0E/b.23354...
http://burningissues.org/car-www/index.html
http://www.epa.gov/woodstoves/healthier.html
http://www.epa.gov/woodstoves/refp.html
The magnetic fridge link has gone 404 but I found a couple of articles about the technology:
http://www.physorg.com/news64851465.html
http://www.guardian.co.uk/technology/2006/dec/1...
Unfortunately the articles are a little old but the spin-off company that was created to start manufacturing the fridges looks to still be doing things:
http://www.camfridge.com/Pages/news.html
9 months ago
in How to cheat on online flash games? | ixibo on ixibo! Technology Blog
Tamper data is a fantastic addon for security researchers / technicians. It is by far the quickest and easiest way to mess around with submitted form values.
I could tamper with this very comment form right now. For instance, I can see a hidden parameter named redirect_to with the contents "/index.php/2008/08/03/how-to-cheat-on-online-flash-games/" which is (presumably) where I will end up after hitting "submit".
I wonder what would happen if I changed that to "yahoo.com"...
<abbr>Daves last blog post..</abbr>
I could tamper with this very comment form right now. For instance, I can see a hidden parameter named redirect_to with the contents "/index.php/2008/08/03/how-to-cheat-on-online-flash-games/" which is (presumably) where I will end up after hitting "submit".
I wonder what would happen if I changed that to "yahoo.com"...
<abbr>Daves last blog post..</abbr>
9 months ago
in 25 Reasons Why it’s Great to be an IT Guy (or Girl). on Palaestra Training
One thing that rarely gets mentioned when talking about career options in IT is specialisation.
Sure, you can stay technical or go for management. You can also go halfway where you are in charge of a team and 80% of your time is still spent doing the same things they do.
But you can also specialise.
I used be an all-rounder. I did tech support, programming, web design and system administration all in the same job. Later I was a PHP programmer who occasionally dabbled in sysadmin. Later still, I got to be just a sysadmin and as I was in a more specialised role, I was expected to be better at it and I got better pay. Even later still I specialised further into the security area. Now I'm a sysadmin with a focus on security.
There is a career path that heads towards more money in IT that isn't management. You will still have greater responsibilities as a specialist than as a generalist but at least those responsibilities will be doing what you are good at.
Sure, you can stay technical or go for management. You can also go halfway where you are in charge of a team and 80% of your time is still spent doing the same things they do.
But you can also specialise.
I used be an all-rounder. I did tech support, programming, web design and system administration all in the same job. Later I was a PHP programmer who occasionally dabbled in sysadmin. Later still, I got to be just a sysadmin and as I was in a more specialised role, I was expected to be better at it and I got better pay. Even later still I specialised further into the security area. Now I'm a sysadmin with a focus on security.
There is a career path that heads towards more money in IT that isn't management. You will still have greater responsibilities as a specialist than as a generalist but at least those responsibilities will be doing what you are good at.
9 months ago
in Anti-Intellectualism Is Destroying America on FreThink
In response to the actual article (as opposed to about half the comments here, posted by or replying to one "Roark") I have found that in Australia, the anti-intellectualism is strong and healthy in high school up to about the age of 18. (although many on the anti-intellectualists leave school at 16.)
After this age, even the ones who left school early begin to respect intelligence in others.
Australia does seem to be somewhat anti-nepotism. Controversies hit the news here from time to time about things like the "old boys network" where these old boys are all keeping each other in power and giving each other kick-backs. While that may appeal to some people because it indicates that anyone can gain power if they just know the right people, most Australians seem to realise that because they don't already know the right people then they won't be able to gain any power and that this system puts incompetent people in charge of the country.
Strangely though, anti-nepotism as we are, we voted to keep the Queen as our Head of State which kind of makes her the world's only democratically elected monarch.
It seems to me that this anti-nepotism is a learned trait that is learned from the media. The media portrays these old-boys networks in a negative light and the people see and believe what they are shown. Of course, the media isn't some external entity. It is us. (Or, at least, some of us.) Which means that there must be a positive feedback loop where the media is anti-nepotism because the people are and the people are because the media tells them to be.
I suspect this is true of America and anti-intellectualism as well.
The sort of thing that would be needed to break out of this feedback loop would be a strong-willed leader of a powerful media group that could impose his will on all of the reporters and columnists to present the message that intelligence is a positive trait and not a negative one. The media group would have to be powerful enough to tell the people what they didn't want to hear and still stay in business. That's a tough ask but if anyone can achieve that, I believe that person would be an American.
After this age, even the ones who left school early begin to respect intelligence in others.
Australia does seem to be somewhat anti-nepotism. Controversies hit the news here from time to time about things like the "old boys network" where these old boys are all keeping each other in power and giving each other kick-backs. While that may appeal to some people because it indicates that anyone can gain power if they just know the right people, most Australians seem to realise that because they don't already know the right people then they won't be able to gain any power and that this system puts incompetent people in charge of the country.
Strangely though, anti-nepotism as we are, we voted to keep the Queen as our Head of State which kind of makes her the world's only democratically elected monarch.
It seems to me that this anti-nepotism is a learned trait that is learned from the media. The media portrays these old-boys networks in a negative light and the people see and believe what they are shown. Of course, the media isn't some external entity. It is us. (Or, at least, some of us.) Which means that there must be a positive feedback loop where the media is anti-nepotism because the people are and the people are because the media tells them to be.
I suspect this is true of America and anti-intellectualism as well.
The sort of thing that would be needed to break out of this feedback loop would be a strong-willed leader of a powerful media group that could impose his will on all of the reporters and columnists to present the message that intelligence is a positive trait and not a negative one. The media group would have to be powerful enough to tell the people what they didn't want to hear and still stay in business. That's a tough ask but if anyone can achieve that, I believe that person would be an American.
9 months ago
in Anti-Intellectualism Is Destroying America on FreThink
You piss gasoline ?
I think I may have just figured out how to end America's dependence on foreign oil...
I think I may have just figured out how to end America's dependence on foreign oil...
10 months ago
in Truck Bearing Kibble on Truck Bearing Kibble
Kinda reminds me of the opening scene to "Cliffhanger".
Not the most high-brow reference I have seen in this comic but I guess you see what you want to see.
Not the most high-brow reference I have seen in this comic but I guess you see what you want to see.
10 months ago
in Truck Bearing Kibble on Truck Bearing Kibble
I'd have to guess you are talking about the guy on the Wurly-gig wearing blue jeans and a striped shirt but he is wearing a baseball cap rather than a stocking cap.
I suppose he's also not holding a rifle either but that isn't technically part of the reporter's description.
Is it just me or does the guy in the last carriage on the roller coaster look like Calvin ?
I suppose he's also not holding a rifle either but that isn't technically part of the reporter's description.
Is it just me or does the guy in the last carriage on the roller coaster look like Calvin ?
1 year ago
in Rebuttle: What Linux can do that Windows and OS X can’t on Zac Garrett
There are Linux zealots and Windows zealots (Macs zealots are known as bigots). It appears you are none of these... which is a good thing.
I run Linux at home as my main OS. I have Windows on a separate drive that I can reboot into if the need arises. I used run exclusively Mac computers and I will do so again next time I can afford a new computer.
I am not blind to any of the flaws of any of my operating systems. They all have flaws. After adding up all the flaws, I found that the ones in Linux bugged me less than the ones in Windows. The ones in Mac OS X bug me even less than the Linux ones.
That said, I was a little disappointed with not finding anything I would describe as "the coolest thing you can do using Linux that you can’t do with Windows or on a Mac?" in either Matthew's article or yours.
Compiz doesn't really count because Mac OS X had Expose years ago and Vista has fancy effects too. Not the same fancy effects but still fancy effects.
apt-get doesn't really qualify on the "cool" part. It's kinda cool for geeks but try explaining this to your girlfriend or your mother and watch how quickly they tune out.
Pretty much anything on the command line can be run under Windows with Cygwin and on a Mac natively. In fact, apparently you can even run KDE under Cygwin.
Verifying the source code to not contain bugs, security flaws and backdoors is all well and good but fails, again, on the "cool" criteria.
The most important feature of Linux: knowing that it is free (as in freedom) and cannot be taken away from you is the main reason Richard Stallman gets up in the morning... and therefore is not cool.
It looks like the only thing you can do as a Linux user that you can't as a Mac or Windows user is this: http://xkcd.com/272/
I run Linux at home as my main OS. I have Windows on a separate drive that I can reboot into if the need arises. I used run exclusively Mac computers and I will do so again next time I can afford a new computer.
I am not blind to any of the flaws of any of my operating systems. They all have flaws. After adding up all the flaws, I found that the ones in Linux bugged me less than the ones in Windows. The ones in Mac OS X bug me even less than the Linux ones.
That said, I was a little disappointed with not finding anything I would describe as "the coolest thing you can do using Linux that you can’t do with Windows or on a Mac?" in either Matthew's article or yours.
Compiz doesn't really count because Mac OS X had Expose years ago and Vista has fancy effects too. Not the same fancy effects but still fancy effects.
apt-get doesn't really qualify on the "cool" part. It's kinda cool for geeks but try explaining this to your girlfriend or your mother and watch how quickly they tune out.
Pretty much anything on the command line can be run under Windows with Cygwin and on a Mac natively. In fact, apparently you can even run KDE under Cygwin.
Verifying the source code to not contain bugs, security flaws and backdoors is all well and good but fails, again, on the "cool" criteria.
The most important feature of Linux: knowing that it is free (as in freedom) and cannot be taken away from you is the main reason Richard Stallman gets up in the morning... and therefore is not cool.
It looks like the only thing you can do as a Linux user that you can't as a Mac or Windows user is this: http://xkcd.com/272/
1 year ago
in The World’s Coolest Solar Collecting Building? on Ecoble
Just like the unit's name implies, KiloWattHours are made by multiplying a value in KiloWatts by a certain number of hours. If you want to know the rate of energy being produced, you need to divide it by time, just like metres per second (m/s) KiloWattHours when divided by time gives us KiloWatts which is a rate of energy production. A value expressed in kWh has a different meaning without the number of hours involved.
Imagine I said that my car can travel 10,000km. This doesn't tell us anything about the speed of the car until we know the time frame. 10,000km per year is fairly normal, 10,000km per day is quite fast. 500,000kWh per year is pretty good, 500,000kWh per century is not so good.
kWh are a unit that most people find rather confusing unit, much like Nm (Newton Metres) which are found my multiplying Newtons (a measure of force) by metres. I suspect this is because we are more used to measuring rates expressed as one unit divided by another, not just a bare unit or a unit multiplied by another. I hope I have cleared things up a little.
What all this means is that the panel doesn't have to be 1133 metres tall, it only needs to be 10 metres tall as long as it's out in the sun for 113 hours. Of course, in reality, it actually extracts less energy than the theoretical maximum and runs for more than 113 hours per year.
There are many more details at http://www.solar-ark.com/english/about/spec.html but to clarify some of the details mentioned in this blog, the outputs are 630kW and 530,000kWh per year. The actual usable power is 2x 300kW at 440V AC.
Although this is pretty cool, some of the best improvements to buildings can actually be made without solar panels at all. The building behind the solar array looks like it has been designed with passive solar collection in mind. Large glass windows to let in light and avoid needing artificial light, insulating glass to avoid needing costly heating and cooling and passive air-flows through the building to reduce the need for fans to move the air. It's amazing that for about 10% extra building cost, you can reduce the running costs of a building by 50% and save enormous amounts of energy at the same time.
Imagine I said that my car can travel 10,000km. This doesn't tell us anything about the speed of the car until we know the time frame. 10,000km per year is fairly normal, 10,000km per day is quite fast. 500,000kWh per year is pretty good, 500,000kWh per century is not so good.
kWh are a unit that most people find rather confusing unit, much like Nm (Newton Metres) which are found my multiplying Newtons (a measure of force) by metres. I suspect this is because we are more used to measuring rates expressed as one unit divided by another, not just a bare unit or a unit multiplied by another. I hope I have cleared things up a little.
What all this means is that the panel doesn't have to be 1133 metres tall, it only needs to be 10 metres tall as long as it's out in the sun for 113 hours. Of course, in reality, it actually extracts less energy than the theoretical maximum and runs for more than 113 hours per year.
There are many more details at http://www.solar-ark.com/english/about/spec.html but to clarify some of the details mentioned in this blog, the outputs are 630kW and 530,000kWh per year. The actual usable power is 2x 300kW at 440V AC.
Although this is pretty cool, some of the best improvements to buildings can actually be made without solar panels at all. The building behind the solar array looks like it has been designed with passive solar collection in mind. Large glass windows to let in light and avoid needing artificial light, insulating glass to avoid needing costly heating and cooling and passive air-flows through the building to reduce the need for fans to move the air. It's amazing that for about 10% extra building cost, you can reduce the running costs of a building by 50% and save enormous amounts of energy at the same time.
1 year ago
in Tips For The Privacy Minded on How To Split An Atom
There is some confusion about what Tor does. Tor encrypts your traffic ONLY while it is within the Tor network. As soon as it leaves the network it is unencrypted. Tor hides your IP address from the server/website you are using. That's ALL it does. The encryption is simply so that intermediate parts of the Tor network don't know what site you are visiting and don't know what your IP address is.
Hushmail has also been the subject of many a security discussion and the upshot of it all is "choose the secure Hushmail version, not the easy Hushmail version". The secure one involves running a Java Applet that encrypts your emails before they leave your computer. The easy version has you type your email into a normal textarea, just like the one I'm writing in now, and encrypts it on their server.
Hushmail has also been the subject of many a security discussion and the upshot of it all is "choose the secure Hushmail version, not the easy Hushmail version". The secure one involves running a Java Applet that encrypts your emails before they leave your computer. The easy version has you type your email into a normal textarea, just like the one I'm writing in now, and encrypts it on their server.
1 reply
1 year ago
in Tor Might Not Be So Secure on How To Split An Atom
You cannot configure Tor to secure your communications over the internet because that is not what Tor does. The ONLY thing Tor does is to hide your IP address from the website/server you are contacting.
If the embassies in question (and all of the businesses that Egerstad didn't publish) had used encrypted connections to their email servers then he would have had a much harder time finding out their passwords and most likely WOULD have broken some laws by doing it. If they had encrypted their emails, he still would have found their email passwords but wouldn't have been able to read their email.
If the embassies in question (and all of the businesses that Egerstad didn't publish) had used encrypted connections to their email servers then he would have had a much harder time finding out their passwords and most likely WOULD have broken some laws by doing it. If they had encrypted their emails, he still would have found their email passwords but wouldn't have been able to read their email.
1 reply
sbspalding
You make an excellent point there. Making your IP address harder to prog does not make the data itself secure. Whenever you are transferring data over the web and you want that data to be hard to intercept, it should be encrypted client side.
There really isn't any other effective alternative. Thanks Dave.
There really isn't any other effective alternative. Thanks Dave.
As for choosing the "secure version" of Hushmail, that is right as well. I don't have too much experience with the program but client-side encryption seems a lot more secure than passing it to Hushmail's servers first.