How To Create a Vertical Separator with WPF

16 rules to live by

14. March 2008 23:39 by sam in   //  Tags: , , ,   //   Comments (22)

Ladies and Gents,

I found an article today that like most, I cannot take credit for writing.  But like always, the things I tell you on this blog will not be things that I have come up with, but which the human population of the world has come up with.  We all want to live and we are always looking for motivational things in our life.  We want things that inspire us and make us feel better or work harder as a person.  I know everyone believes this and wants this.  That why I bring you these self motivating rules from a source that isn't utilized or looked at often by people or at least I think so.  The article comes from GoDaddy.com and it was written by the owner Bob Parsons.  Bob, is a unique individual with years of experience and talent.  He currently owns a major corporation from the ground up. I do not know him personally, but he looks like a man every man would in some way like to aspire to.  He came out with these rules for his daily life.  After looking over them, I have implemented them in my daily life and strived to achieve what only some people dream of.  I hope you will look at them the same way.

1. Get and stay out of your comfort zone.
I believe that not much happens of any significance when we're in our comfort zone. I hear people say, "But I'm concerned about security." My response to that is simple: "Security is for cadavers."

2. Never give up.
Almost nothing works the first time it's attempted. Just because what you're doing does not seem to be working, doesn't mean it won't work. It just means that it might not work the way you're doing it. If it was easy, everyone would be doing it, and you wouldn't have an opportunity.

3. When you’re ready to quit, you’re closer than you think.
There's an old Chinese saying that I just love, and I believe it is so true. It goes like this: "The temptation to quit will be greatest just before you are about to succeed."

4. With regard to whatever worries you, not only accept the worst thing that could happen, but make it a point to quantify what the worst thing could be.
Very seldom will the worst consequence be anywhere near as bad as a cloud of "undefined consequences." My father would tell me early on, when I was struggling and losing my shirt trying to get Parsons Technology going, "Well, Robert, if it doesn't work, they can't eat you."

5. Focus on what you want to have happen.
Remember that old saying, "As you think, so shall you be."

6. Take things a day at a time.
No matter how difficult your situation is, you can get through it if you don't look too far into the future, and focus on the present moment. You can get through anything one day at a time.

7. Always be moving forward.
Never stop investing. Never stop improving. Never stop doing something new. The moment you stop improving your organization, it starts to die. Make it your goal to be better each and every day, in some small way. Remember the Japanese concept of Kaizen. Small daily improvements eventually result in huge advantages.

8. Be quick to decide.
Remember what General George S. Patton said: "A good plan violently executed today is far and away better than a perfect plan tomorrow."

9. Measure everything of significance.
I swear this is true. Anything that is measured and watched, improves.

10. Anything that is not managed will deteriorate.
If you want to uncover problems you don't know about, take a few moments and look closely at the areas you haven't examined for a while. I guarantee you problems will be there.

11. Pay attention to your competitors, but pay more attention to what you’re doing.
When you look at your competitors, remember that everything looks perfect at a distance. Even the planet Earth, if you get far enough into space, looks like a peaceful place.

12. Never let anybody push you around.
In our society, with our laws and even playing field, you have just as much right to what you're doing as anyone else, provided that what you're doing is legal.  If the law is unfair to you and others, you should do everything in your power to see that doesn't happen anymore going along with not allowing anyone to push you around. Imagine if Rosa Parks would have obeyed the laws! [Thanks Katrina]

13. Never expect life to be fair.
Life isn't fair. You make your own breaks. You'll be doing good if the only meaning fair has to you, is something that you pay when you get on a bus (i.e., fare).

14. Solve your own problems.
You'll find that by coming up with your own solutions, you'll develop a competitive edge. Masura Ibuka, the co-founder of SONY, said it best: "You never succeed in technology, business, or anything by following the others." There's also an old Asian saying that I remind myself of frequently. It goes like this: "A wise man keeps his own counsel."

15. Don’t take yourself too seriously.
Lighten up. Often, at least half of what we accomplish is due to luck. None of us are in control as much as we like to think we are.

16. There’s always a reason to smile.
Find it. After all, you're really lucky just to be alive. Life is short. More and more, I agree with my little brother. He always reminds me: “We’re not here for a long time, we’re here for a good time!”

Looking over these rules, they are more for the entrepreneur than anyone else but due to their over all value, they are very good rules. I would like to hear of any other rules people live by, please speak up.

Sam Stone

Can ASP.NET be hacked?

13. March 2008 21:00 by Scott in   //  Tags:   //   Comments (4)

I just  viewed a video today CNN put out, which has Chinese hackers being interviewed.  Let me know if this is old news, but the hackers are from an island off of China.  The hackers own a couple of hacking sites as seen in the video on CNN.  The links are hard to find but are noticeable with the video supplied if you look close.  The sites are www.hack4.com and www.hackbase.com noticeable through the screen shots taken by the dark visitor.

hack4  xiaochen4
The two sites here are shown in links of the video.

These sites proclaim they have close to 10,000 members and over 50,000 page loads a day. While the members of this community claim to have hacked into the pentagon and other various organizations throughout the world.  The US government states that hackers have come from China and are paid for by the Chinese government.  Though China does ask the US to prove the allegations, but they know due to the top secret content produced at the pentagon, China will never be supplied with proof.

Hackers use such approaches as XSS, SQL Injection, Google Hacking, Security Engineering and Microsoft Live Search Hacking(Live Search hacking is dead).  The question is, can ASP.NET be hacked.  Yes without a doubt.

XSS - Cross Site Scripting - Used when you have ID's in your URL such as http://www.dotnetrocks.com/default.aspx?showNum=323.  The ID ShowNum can be modified to be http://www.dotnetrocks.com/default.aspx?showNum=500 and we will create an Error on their site.  If they didn't have custom errors on remote only, well we would then be able to dive into their code and play around with the ID number.  Other XSS strategies are to inject JavaScript into the site by using some techniques listed here.  The Prevention of this kind of an attack would be to store your id's in sessions and hidden fields. Disclaimer: I only pointed this site out because I have played with this sites ID numbers before.  I pointed it out to them, but they still decided not to change it.  Lets hope they read this blog some day.

SQL Injection - These attacks work when user input is used to create a SQL statement in the code behind file.  Lets say we have a query:

   1:  select * from customers where customerID = 'sdfa'

The vulnerable query would be

   1:  select * from customers where customerID = 'asdf'
   2:  union 
   3:  SELECT table 
   4:  FROM INFORMATION_SCHEMA.TABLES --'

This kind of injection happens in a user entered textbox or field which is then used to complete some kind of SQL Statement.  So lets say I was filling out a form that had the customer ID number on it.  I would inject the SQL by writing

   1:  ' union 
   2:  SELECT table 
   3:  FROM INFORMATION_SCHEMA.TABLES --

This kind of injection works and could even be used to delete entire tables of information.  But why delete the User table and credit card numbers when you can gain access to the and get them to be displayed and copied. To Prevent this kind of attack, you will need to start using Stored Procedures, OR a new way of querying databases using LINQ.  LINQ is Microsoft's new technology and looks to be the end all be all of Stored procedures which makes the headaches and problems with coding allot easier to manage.

Microsoft does have preventive measures put in place for this kind of attack, but you have to be sure to use them. Stored procedures in SQL Server are one and the other is Request validation used in ASP.net applications.

I hoped you enjoyed the information supplied to you.  I had a good time writing it with a bit of research that had to be done. Thanks for visiting.

Scott Pio

kick it on DotNetKicks.com

Godaddy and Windows Hosting Rates

13. March 2008 15:26 by Scott in   //  Tags: , , ,   //   Comments (28)

logo_hdr3

I read this article today "Windows Hosting Rates are killing developers and students... Is Microsoft aware?" while searching through DZone for things to read.  I read over the article and I am going to definitely have to agree with this man.  I am just a mild professional developer not making the big bucks, but working on small projects for low pay like Indialantic Fire department.  This site is dressed up just like a blog and only the template is static, everything else is what a user can enter in an editor window. I thought it was a nifty idea I thought of before the blog idea came to my head. Getting back on track, I am also hurt by Microsoft's ability to look at Windows Hosting Rates. On Go Daddy alone, it cost more than $50.00 a year for a small time web site and when you own a few domains and don't care for Domain forwarding, well it can add up.  It is definitely killing my pocket income.  I want to develop and put content out there, but these prices are difficult.  I know its $50.00 a year, not much right?  well when you have other things to pay for, I wish it was just cheaper.  I do know that Go Daddy is one of the cheapest domain hosting companies out there, but my pocket is still being hurt.  I love developing, I take pride in my work, I just hope it would be cheaper.

The costs of serving these sites is the only reason why I put ads up on my sites.  I would have no need for them, but its how I pay for the service.  I just started blogging too, so I am not making any money at all.  I'm not complaining, but this is a luxury and luxuries always go first when you get strapped for cash.  I just hope I don't give up this luxury.

On a side note: Go Daddy does offer free hosting with banners on top of the page.  I have a couple of domains like that, but I have never seen a banner up on the top as of yet.  (maybe I shouldn't have said that)

As for Microsoft, I might have to pose this question to them.  I don't see why I can't ask this question at the Devconnections conference I am going to this April. On the article itself, they were discussing switching over to a new open source provider just despite the costs.  Is anyone else interested in switching to a new framework because of the prices?  I love ASP.NET.  It would be hard to give up.

kick it on DotNetKicks.com

Curvy Corners using JavaScript on DIVs

12. March 2008 20:06 by Scott in   //  Tags:   //   Comments (26)

I found a pretty good web site a while back and I just thought I would share it with you.  It does curvy Corners on the fly for DIV elements.  I know its a short post, but I hope you like. Curvy Corners

Untitled-1

Devconnections, HERE I COME! OOPS, help me decide.

12. March 2008 14:35 by scott in   //  Tags: , , , ,   //   Comments (11)

Alright ladies and gents. Two weeks ago, I sent a memo to my boss.  I told him all about Devconnections and how much impact it would have on the team of developers I work with(currently 4 total and the other three are Cold Fusion dev's) and our next up and coming projects include a HUGE project we just landed.  If you know who I work for, then you would know what I was talking about.  I am excited with this project.  It excites me.  There is allot of data capturing and this type of project is on the bleeding edge of development and ideas. Wow and I am excited for both my company and I now get to go to Devconnections.  I currently reside in Melbourne, FL so it is an easy drive to Orlando which the company will pay for everything including but not limited to food, transportation, hotel etc...  I also get to go to the Heroes Happen Launch of Microsoft 2008 Products on company time.  The launch event is sold out for Orlando, FL which every attendee also gets a version of Windows Server 2008, Visual Studio 2008 and SQL Server 2008 for FREE.  This is a heck of a bargain that I just cant say no.  I am pretty sure these versions are complete full versions.  Can someone Verify?

SP08_ASP_MidBanner hero_event

I think this will also be an amazing event which opens the Friday after Devconnections.  What do I need help with?  Well let me tell you after looking through the brochure, there are allot of courses and sessions to look over.  I then went ahead and narrowed it down to 19 sessions I want to go to.  I still have to decide on only 13 sessions with the hope they don't overlap.  I need feedback so please help me on this.

Requirements:

  1. I don't want a course that I can learn through an ASP.NET tutorial on the web EASILY.  I pick up things quick, so I want sessions that I can't pick up unless its shown to me.
  2. I have only been coding for 1.5 years now with a total of 8 years web design experience, so I still consider my self new to the C# world.  I want to learn things, the average person wouldn't pick up in that year.
  3. I want things that will benefit my company and me. Sorry, I can't give you name of the company, but they have been in the news allot as of lately.
  4. I want to learn new technologies including take a few courses with JavaScript.
  5. I want to take Carl Franklins session.  I have heard him plenty of times on .Net Rocks and know he is a master programmer and presenter!

Those are the requirements, now since I still consider my self a newby in the C# world, please help me pick.  I will listen to all replies with earnest.

 AMS304: INTRODUCTION TO THE NEW ASP.NET MODEL VIEW CONTROLLER (MVC) FRAMEWORK MICROSOFT
One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. In the near future, ASP.NET will include support for developing Web applications using an MVC-based architecture. The MVC pattern can also help enable red/green test-driven development (TDD)—where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself. Join us for a dive into the new MVC Framework.

ADX210: BUILDING A LINQ-BASED BUSINESS LAYER FOR ASP.NET APPLICATIONS RICK STRAHL
With LINQ and LINQ to SQL, there are many new opportunities for creating a more flexible, business object layer using the enhanced database connectivity and language enhancements that LINQ offers. Rather than focus on the new features of the LINQ engine, this session puts LINQ into the perspective of a business-object framework and how you can leverage LINQ as part of this high-level application layer. I’ll start by examining how LINQ to SQL interacts with the database and see how this model fits for data access, both directly in the user interface layer and in a more formal, multitier-type business layer. I’ll then dive in and examine different ways you can use LINQ to SQL in combination with a traditional business layer and highlight the fact that DLINQ, on its own, does not necessarily replace a flexible data access layer in an ASP.NET application. The focus of the session is on ASP.NET business-application development, which is used for examples and special considerations for data retrieval.

AMS204: DISPLAYING DATA WITH THE NEW LISTVIEW AND DATAPAGER CONTROLS IN THE .NET FRAMEWORK 3.5 MICROSOFT
Get complete control over how your data is displayed using the new ListView and DataPager controls. Take a deep dive into using these controls to easily and efficiently display and update your data. Learn how you can control every detail of how data is presented to the users of your site.

ADX211: BUILDING N-TIER APPLICATIONS WITH LINQ DAN WAHLIN
Creating a modular and maintainable application architecture is always a key part of the application development life cycle. In this session, you’ll learn how to build N-Tier/N-Layer applications that leverage Language Integrated Query (LINQ) to minimize development time while still maintaining module design practices. Topics covered include using the Visual Studio 2008 LINQ to SQL designer, using data context objects, and performing different types of LINQ queries.

AGN311: DEVELOPING A PROVIDERBASED FEATURE FOR ASP.NET 2.0 MIGUEL CASTRO
You’ve used ASP.NET 2.0’s Membership system, right? You’ve even developed your own custom Membership Providers. But did you know that you can use that same Provider Model for any feature of your application you wish? I’ll show you how by creating a “credit card processing and returns“ sub-system that takes advantage of ASP.NET 2.0’s Provider Model, allowing you to create different credit card processors any time you want without changing your site code. Many ASP.NET developers don’t know you can even do this; come be a part of the few.

AGN310: URL REWRITING: WHAT, WHY, AND HOW MIGUEL CASTRO
You may have noticed sites out there with URLs like“.../2007/10/8.aspx“. Obviously this signifies a date, but can there really be a page for every day of the year on this site? The answer is definitely not. This is a technique known as URL rewriting, which allows for friendlier URLs that may not necessarily correspond to the site’s physical page structure. More importantly, this technique is crucial for search engine optimization, since typically search engines ignore query strings in the URL. In this session, I’ll show you the basics of URL rewriting, teach you how to centralize it using HTTP Modules, and even get you going on a reusable URL rewriting engine component.

AAR101: USING THE ASP.NET MVC FRAMEWORK DAVE SUSSMAN
The ASP.NET postback model was a radical step for Web applications when it was released and is now commonplace. However, applications are becoming more complex and provide some challenges to testing. The new ASP.NET Model View Controller (MVC) framework provides a clear separation between the aspects of ASP.NET pages, allowing for cleaner code, easier and faster testing, and powerful and flexible URL mapping. This session.com April 20-23, 2008 Orlando, Florida will examine the MVC framework, showing how it differs from the postback architecture, and how you can integrate it into existing applications.

APF310: ASP.NET PERFORMANCE AND SCALE TIPS AND TRICKS ROB HOWARD
This presentation takes a look at some tips and tricks for getting great performance out of your ASP.NET solution. It will start with some of the common physical design options, examine the choices to make when writing ASP.NET and .NET code, and finally look at some of the tools used for tracking and measuring changes in your ASP.NET application’s performance. You’ll leave this session with some actionable tips & tricks that you can take home and apply immediately.

ARP250: PROGRAMMING SQL SERVER REPORTING SERVICES PAUL LITWIN
In this session, you’ll learn how to programmatically manipulate SQL Server 2005 Reporting Services (SSRS) and integrate SSRS into your ASP.NET applications by employing URL Access, Report Viewer controls, and the Reporting Services Web Services. A major issue with SSRS is that you can normally only display reports using Internet Explorer, but in this session you’ll discover how to integrate SSRS into your applications using any modern browser, including Firefox, Netscape, and Safari. You’ll also learn how to extend reporting services by calling custom .NET assemblies from your SSRS reports. Finally, the session will touch on improvements to SRRS promised for the upcoming SQL Server 2008 release.

APG315: ASP.NET INTERNALS ROB HOWARD
This presentation is a deep-dive into the inner-workings of ASP.NET. In it you’ll learn exactly how ASP.NET communicates with the outside world, such as with IIS. The session will also peel open ASP.NET’s HttpRuntime for a deeper look at the internals of the request/response processing architecture. Then the session will wrap up with a discussion of the ASP.NET Page and how it is parsed and compiled. If you want to learn how to write better ASP.NET applications, knowing exactly how ASP.NET works is critical.

ACS311: BUILDING CUSTOM ASP.NET AJAX CONTROLS DAN WAHLIN
By creating custom ASP.NET AJAX controls you can encapsulate frequently used functionality and promote better code re-use in applications. In this session, you’ll learn how to create client-side ASP.NET AJAX controls that extend classes in the ASP.NET AJAX script library. You’ll also see how you can encapsulate client-side controls in ASP.NET AJAX server-side controls. Topics covered include defining client-side control constructors and fields, using the prototype design pattern to define control properties and methods, disposing of resources, and creating server-side controls that implement the IScriptControl interface.

ACS216: JAVASCRIPT FOR ASP.NET DEVELOPERS STEPHEN WALTHER
JavaScript is a badly misunderstood language. This is unfortunate, since a mastery of JavaScript is a requirement for building Rich Internet Applications. In this session, Stephen Walther provides an introduction to the JavaScript language for C# and Visual Basic .NET developers. In particular, you’ll learn how to create JavaScript objects and how to take advantage of prototype inheritance. You’ll learn how inheritance in JavaScript differs from inheritance in Visual Basic .NET and C#. The session will also tackle important and advanced features of the JavaScript language such as closures.

A LAP AROUND VISUAL STUDIO TEAM SYSTEM 2008 MICROSOFT
In this demo-intensive session, you will be exposed to many of the new features in Visual Studio Team System 2008. This session cover everything from Team Foundation Server for project management, work item tracking, version control and build support, to integration with Microsoft Project and Excel, unit testing, code coverage and code metrics, database projects, to Web testing with AJAX support and the new user-pace load testing. You will leave with an understanding of how Visual Studio Team System 2008 can be your organization’s Application Lifecycle Management (ALM) solution, and enable you and your team to collaborate and communicate to ensure software quality and provide visibility into the development process.

IMPROVING TEAM DEVELOPMENT MICROSOFT
Do you build software alone? In today’s world, software development is done by increasingly larger teams made of people with different skill sets, including project planning, functional definition, development, and testing. As teams grow larger there is a greater need for tools to enable the communication and collaboration that is necessary to deliver high quality software effectively. In this session, you will learn how to function as a collaborative team using Visual Studio Team System 2008, including process templates, work item tracking, version control, and reporting. Whether you are on a team that values Agile process, one that prefers CMMI, or any other process, this session will apply to you.

VISUAL STUDIO 2008: LINQ DEEP DIVE AND BEST PRACTICES AMANDA SILVER
LINQ (Language Integrated Query) is a key platform innovation introduced with Visual Studio 2008 which brings SQL-style query expressions into VB and C# enabling you to describe what data to reason about instead of how to access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we’ll uncover tips, tricks, and best practices for writing queries that will help you write robust, high-performing, maintainable business applications more quickly. In addition to gaining a solid understanding of LINQ for data access, you’ll also leave this session with a clear understanding of how query and the individual language features can be leveraged in other parts of your application to write less code.

BUILDING SERVICE ORIENTED APPLICATIONS WITH WCF AND VISUAL STUDIO 2008 JOHN STALLO
Windows Communication Foundation (WCF) is one of the core platform technologies introduced in .NET 3.0 and Visual Studio 2008 includes tool support for building and consuming WCF services. In this demo-focused session, we’ll start from the basics of creating and consuming a WCF service and quickly move into the advanced techniques and support related to service hosting, service configuration, etc. This session assumes you are familiar with the basic concepts of WCF and will focus on the end-to-end experience within Visual Studio 2008 for building and consuming WCF services.

VVS310: FUN WITH PROGRAMMING CARL FRANKLIN
Looking for something fun and inspirational? Let Carl Franklin show you some of the fun you can have with Visual Studio .NET and a few cool ideas, from artificial intelligence to practical joke software.

VPF305: FUNDAMENTALS OF WINDOWS PRESENTATION FOUNDATION: BEYOND THE BLING KATHLEEN DOLLARD
Have you seen Windows Presentation Foundation (WPF) portrayed as a way to spin photos on cubes and wondered what this had to do with you? Windows Presentation Foundation does take us into a new realm full of graphic possibilities, but it also offers a radical new UI model that’s well worth exploring. This session focuses on how you can use WPF to make business user interfaces. You’ll focus on the underlying model and separation of UI into discrete pieces that can be expressed in different ways. You’ll build UIs with grids and stack panels for layout and explore databinding, templates, and triggers. You’ll see how to create an application that’s logically organized and you can customize both in look and feel on a global basis—either to customize for individual clients or to keep your application looking fresh through future UI fashion changes.

I hope that narrows it down for you so you can give me pointers on where to take this.

Scott Pio

kick it on DotNetKicks.com

Twitter App for BlogEngine.net

9. March 2008 16:57 by scott in   //  Tags: ,   //   Comments (5)

Here is my first thought on things.

I just created a twitter account, I know its a long time.  But since I created my blog with the idea of wanting to get the word out about what I think.  I decided to go searching for a twitter control for the BlogEngine.net.  Which I found one at Codeplex, it is called BlogEngine.NET Twitter Extension.  I went to look at the application and I was satisfied, but I only found that the application just gives the latest feeds of what you published in twitter.  I wanted to give it more extensibility like the JavaScript version of the Twitter badge.

The current Twitter application on codeplex like I said only does the updates without any times, dates or user names.  I decided to upgrade the application to include how long ago the message was sent and a link to the message on twitter.  This took a few hours actually to dive into the old code and produce the new stuff. I hope you like it.

To Download:

Twitter.cs (8.22 kb)

To Install:

Prerequisites
BlogEngine.NET 1.3 (1.2 ?)
How To
1. Download source code. Put the Twitter.cs file in App_Code/Controls folder of your BlogEngine.NET site.
1. Télécharger le code source. Copier le fichier Twitter.cs dans le dossier App_Code/Controls de votre site BlogEngine.NET.
2. Add the following line in the page where the control should appear.
2. Ajouter la ligne suivante dans la page où le contrôle doit s'afficher.
<blog:Twitter ID="Twitter" runat="server" Username="julesss" Password="mypassword" />
Properties
- Username (required) : username of your Twitter account
- Password (required) : password of your Twitter account
- Timeline (optionnal) : updates type to display from Twitter : User, Friends or Public (default : User)
- NumberOfStatuses (optionnal) : number of updates to display (default : 20, which is the maximum recommended by Twitter)

The lines I personally edited is around line 141.

The old code was:

   1:  string innerText = status["text"].InnerText;
 
The New code I inserted is:
 
   1:                      string innerText = "\"" + status["text"].InnerText + "\"" + "<br />"
 + "<a href='http://twitter.com/" + status["user"]["screen_name"].InnerText + "/statuses/" 
+ status["id"].InnerText + "/'>";
   2:                      string TwitterTime = status["created_at"].InnerText;
   3:                      string[] TimeValues = TwitterTime.Split(' ');
   4:                      TwitterTime = TimeValues[1] + " " + TimeValues[2] + " "
 + TimeValues[5] + " " + TimeValues[3] + " GMT";
   5:                      DateTime dt = Convert.ToDateTime(TwitterTime);
   6:                      innerText += GetRelativeDate(dt);
   7:                      innerText += "</a>";

I also inserted a new method that allows for the relative time to be found.

   1:          /// <summary>
   2:          /// gets the relevant time of the current twitter user.
   3:          /// </summary>
   4:          /// <param name="date"></param>
   5:          /// <returns></returns>
   6:          private String GetRelativeDate(DateTime date)
   7:          {
   8:              DateTime now = DateTime.Now;
   9:              TimeSpan span = now - date;
  10:              if (span <= TimeSpan.FromSeconds(60))
  11:              {
  12:                  return span.Seconds + " seconds ago";
  13:              }
  14:              else if (span <= TimeSpan.FromMinutes(60))
  15:              {
  16:                  if (span.Minutes > 1)
  17:                  {
  18:                      return "about " + span.Minutes + " minutes ago";
  19:                  }
  20:                  else
  21:                  {
  22:                      return "about a minute ago";
  23:                  }
  24:              }
  25:              else if (span <= TimeSpan.FromHours(24))
  26:              {
  27:                  if (span.Hours > 1)
  28:                  {
  29:                      return "about " + span.Hours + " hours ago";
  30:                  }
  31:                  else
  32:                  {
  33:                      return "about an hour ago";
  34:                  }
  35:              }
  36:              else
  37:              {
  38:                  if (span.Days > 1)
  39:                  {
  40:                      return "about " + span.Days + "days ago";
  41:                  }
  42:                  else
  43:                  {
  44:                      return "about a day ago";
  45:                  }
  46:              }
  47:          }

I hope you like it as much as I do.  By the way, did I tell you its written all in ASP.NET and C#.  There's another fine example of a GREAT language!

kick it on DotNetKicks.com

Lets start it off great!

9. March 2008 16:11 by Scott in   //  Tags:   //   Comments (12)

Ladies and gents, after 10 or 15 hours setting up blogs for my girlfriend and me, I am finally ready to write in the Blogging world. 

To start it off, I am out of Melbourne, FL.  Please remember, this blog is not a representation of my employers views.

Other than that, I am a Full time .net developer with a personal blog at scottpio.com, I do imagine, I will be writing more on this one than my personal blog. I am happy to see a good language come out right when I am getting started in the coding world.  I have been building web apps for about 8 years now, but moved to full time on Jan 15 2007.

I hope that you like the future of this blog.  I will try to put GOOD content in it as my personal promise to the readers. haha. Its at zero currently.

 

Scott Pio

Anti-Terrorism, Free Speech and California State University

8. March 2008 18:33 by sam in   //  Tags: , ,   //   Comments (2)

Anti-Terrorism, Free Speech and California State University.  What do all these things have in common?  Free speech was restricted at California State up until people took a stand and said NO!  417,000 Students no longer face disciplinary action because they spoke out against California State universities free speech rules.  An article posted yesterday described the situation. Students at a anti-terrorism rally Stomped on flags that prescribed Allah on them.  This of course is an anti Hezbollah and Hamas Campaign.  The students who were disciplined filed suit and they finally won the suit.  The school was required to pay $100.00 to each student of the campaign and legal fees.  I for one am glad to see this. But what's the limit and how far will people be allowed to go with first amendment rights?  I question this because of all the new problems in London these days.  People are protesting for Islam.   Why? Well certain cartoons could have started it.  Who knows where it will end.

This reminds me of all the protests in downtown London.  The protests of anti UK have struck a spark deep in me. The current protests that go on there are very real and very scary.  I wonder if people could really call this free speech?  Is this the First Amendment? I am going to have to say that it is.  It is very much the first amendment. This same act is what protected the students in California.  Will Americans sit idly by and allow this to happen?  Will Americans start Protest rallies towards Islam rallies?  Could there be riots like the 1964 Race Riots when Muslims stood up against the police?  I would only hope not.

image0011  image0021

image0031 image0041

image0051  image0071

image0081  image0091

I for one believe in free speech down to my bones. I would imagine these people in the pictures do to.  But I believe that if these kinds of people had their way, free speech could be abolished.  Liberties as we know it could be abolished.  We would be without our freedoms.  That is frightening.  I for one will not allow my self to live like that.  I hope that everyone reading this blog recognizes that this is going to happen more often down the road.  I ask, what will you do about it? Will you sit idly by and just read what I say, will you do what the California kids did, will it cause hatred in you, or will you look at this from a peaceful stance and say "they are just exercising their freedom of speech rights"?

I am going to have to sit on this topic and think about it.  Do I hate or do I love?  People that want these kinds of atrocities to happen in the world do not deserve my vote. I will never support someone that says Exterminate another race.  I will support the California kids though, not for their hatred of Islam, but for their fight for freedom of speech.

Both Free Speech rallies can cause hatred, both can cause riots, both can cause extremists.  But both are protected by Freedom of Speech. 

Voltaire once said "I may not agree with what you have to say, but I will defend to the death your right to say it"

I for one believe Voltaire.

 image0061

This is the First of many.

8. March 2008 15:57 by Sam in   //  Tags: , ,   //   Comments (9)

Introductions...

First I must say, let this be the first of many entries.  I spent about 10 or 15 hours preparing for this blog along with others setting them up and getting them ready for this Great endeavor. 

I have been all over the state of Florida, but I currently reside in Melbourne, FL.  

 I am vastly immersed in many fields of my life.  I love the thought of politics.  I do also love the thought of Liberty or Freedom as most people know it.  One of my Favorite quotes is from Patrick Henry when he spoke in Virginia is "Give Me Liberty or Give me Death".  I start this blog because of that act.  Give me Liberty or give me Death to us all.  I love my country and only wish for liberties and Freedom to be in all countries of the World.  Lets hope that liberty becomes common in the Entire world.  Thanks for listenin.

 Sam Stone