http://www.inc.com/magazine/20100301/lets-take-this-offline.html is generally about blogging. But take a look at this quote:
“…99 percent of these bloggers are doing it wrong. The problem? They make the blog about themselves, filling it with posts announcing new hires, touting new products, and sharing pictures from the company picnic. That’s lovely, darling — I’m sure your mom cares. Too bad nobody else does.”
So what to blog about then?
“…an entrepreneur’s blog has to be about something bigger than his or her company and his or her product.”
For example?…
“…if you’re selling a clever attachment to a camera that diffuses harsh flash light, don’t talk about the technical features or about your holiday sale (10 percent off!). Make a list of 10 tips for being a better photographer.”
or
“If you’re opening a restaurant, don’t blog about your menu. Blog about great food. You’ll attract foodies who don’t care about your restaurant yet.”
This advice, I believe, applies to many mediums—youtube, facebook, twitter. Stop talking about yourself. Start sharing good ideas.
Posted in Links, Opinion | No Comments »
Upserting means that you want to update the record if it exists or insert a new one if it doesn’t.
I found a secure solution for this at http://stackoverflow.com/questions/108403/solutions-for-insert-or-update-on-sql-server
begin tran
IF EXISTS (SELECT * FROM TABLE WITH (updlock,serializable) WHERE KEY = @KEY)
begin
UPDATE TABLE SET ...
WHERE KEY = @KEY
end
else
begin
INSERT TABLE (KEY, ...)
VALUES (@KEY, ...)
end
commit tran
I tried it and it works pretty well. You’ll need to learn how to create a stored procedure, if you don’t know how already.
Posted in Tutorials | No Comments »
I decided to sell my 2007 Macbook Pro. Now I’m trying to decide what I want to get to replace it. I’ve been hearing that Apple will be releasing new Macbook Pros with the i7 chips, which would be really cool. We’ll see how much they are.
Right now, I can get a PC laptop for $1500 with these specs:
15.6″ HD+ (1600×900) LED Backlit LCD w/ATI Mobility Radeon™ HD 4570 w/512MB GDDR2
i7-720QM (1.6~2.8GHz, 45W) w/6M L3 Cache
8GB (2 SODIMMS) DDR3/1066 Dual Channel Memory
500GB SATA II 3GB/s 7,200RPM Hard Drive
2x Blu-Ray Reader/8x Super Multi Combo Drive
These are some good specs. I have a history of going back and forth between a Mac and a PC. My first computer was a Mac mini then a custom built PC with XP (blech) and now a Macbook Pro. The blu ray is very very tempting. The price point is very affordable. I think I might try a PC this time but with Windows 2008 R2 as the OS (already have a copy). Plus, I’m just sick of how OS X deals with flash. Maybe I’ll come back to Mac after they deal with that (and get blu ray).
Geekbench scores for my current Macbook Pro:
2959 under OS X
2393 under Windows 2008 standard
Geekbench score for my new laptop (coming soon):
Posted in Opinion | No Comments »
http://mono-project.com
Don’t know much about it but it looks freakin awesome.
Posted in Links | No Comments »
This is in C# asp.net, but can easily be converted to other languages.
I assume on your paginated page that you have some sort of “page” variable and “page count” variable. Write those variables out in Javascript:
extraJs.Text += "<script type=\"text/javascript\">var page = " + pageIndex + ";\n";
extraJs.Text += "var pageCount = " + pageCount + ";</script>";
Next, let’s use jQuery to capture the left and right arrow keys:
extraJs.Text += "<script type=\"text/javascript\">\n"+
"$(document).ready(function(){\n" +
" $(document).keyup(function(event){\n" +
" switch(event.which){\n" +
" case 39:\n" +
" if(pageCount > 1 && page != pageCount){\n" +
" var next = page + 1;\n" +
" window.location = 'search.html?page=' + next;\n" +
" }\n" +
" break;\n" +
" case 37:\n" +
" if(page > 1){\n" +
" var prev = page - 1;\n" +
" window.location = '/search.html?page=' + prev;\n" +
" }\n" +
" break;\n" +
" default:\n" +
" break;\n" +
" }\n" +
" });\n" +
"});\n" +
"</script>\n";
The previous code is in the C# codebehind file. In your frontend aspx file, I used an asp literal like so:
<asp:Literal ID="extraJs" runat="server"></asp:Literal>
http://www.dixieredstorm.com/search.html
Posted in Tutorials | No Comments »