Binary Artist

The Jason Marshall Experience

Binary Artist

Jason Marshall
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Stir.com

People, Parties, Places Stir.com is a great place to find a hangout and an event to attend in your local area.  Whether you happen to be single or not this new site can lead you to the party!.  You can favorite your hot spots and events, write reviews and leave comments about your favorite hangouts and events. I highly recommend taking a few minutes to sign up and check it out.  Cheers!

Stir

  


Posted by Admin on Friday, October 23, 2009 9:49 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Simple jquery value in and value out of a textbox

 jquery value in and value out

  $('#ControlID').val(“This is the string to set”); 

alert($('#ControlID').val());   

C#  CodeControl1.Text = Control2.Text;  

jquery Equivlent$('#ControlID1').val($('#ControlID2').val())); 


Tags: , ,
Categories: C# | jquery
Posted by Admin on Thursday, May 07, 2009 10:41 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Top 20 Movies of all time

1.  Apocalypse now
2.  Reservoir Dogs
3.  pulp fiction
4.  The Godfather
5.  The Matrix
6.  Slumdog Millionaire
7.  The Pianist
8.  Saving Private Ryan
9.  Schindler's List
10. Shawshank Redemption
11. Alien
12. Million Dollar Baby
13. The Boondock Saints
14. Forrest Gump
15. Full metal Jacket
16. Rocky
17. Raiders of the lost Ark
18. Terminator
19. American History X
20. Jaws

Categories: Movies
Posted by Admin on Tuesday, February 03, 2009 8:48 AM
Permalink | Comments (3) | Post RSSRSS comment feed

NetBooks - The next big thing!

NetBooks, a cross between an IPHONE and a LAPTOP. Or a small laptop, that will run on 3g services.

More to come....

 

 


Posted by Admin on Wednesday, December 17, 2008 10:36 AM
Permalink | Comments (0) | Post RSSRSS comment feed

PlayStation 3 has new competitor for Xbox Live

 

 

PlayStation3 goes Home

New virtualworld opens to all PS3 owners

Eat your heart out, New Xbox Experience.Tomorrow, all Playstation 3 owners will get a chance to experience Sony's ownanswer to online socializing and game playing: a virtual world called Home.

There's no charge for the new feature, whichwill come in the form of a multi-gigabyte download that'll update the firmwareof PS3s around the world. Once applied, the first step for new Home residentsis to design an avatar, a process that's already necessary on the Xbox 360 andWii, but one that will be new to many PS3-only gamers. Sony's avatar system,though, allows for considerably more realism and detail than either of itscompetitors.

Once you're in Home's world, you can chat withfriends, set up multiplayer gaming sessions, listen to streaming music, watchmovies, and play minigames. It'll be a familiar layout to anyone who's playedwith other virtual worlds like World of Warcraft, Runescape, or even SecondLife, the anything-goes social world that Home most resembles. Sony has alreadylined up an impressive range of partners -- including Red Bull, Diesel, andParamount Pictures -- who'll be offering sponsored content inside Home.

On the official PlayStation blog,Home director Jack Buser gives some useful advice from getting the most out ofyour new online life.

"We have a tutorial built in that willget you started with the controls, as well as help menus for you to referencein the Menu Pad. If you don't have a USB keyboard or Bluetooth headset pairedwith your PlayStation 3, now is the time to do so -- either option will allowyou to easily talk and meet everyone," he said in a post today.

Officially, Sony's calling the much-delayedlaunch an "open beta," which means they're pretty sure it works, butif you break it, don't bother suing.

 

 


Posted by Admin on Wednesday, December 17, 2008 7:04 AM
Permalink | Comments (0) | Post RSSRSS comment feed

XBOX 720

XBOX 720 already in development?

Yes, it is. Microsoft has already begun work on developing the Xbox 720. In an interview, Peter Moore, Ex boss of Interactive Entertainment Division at Microsoft, confirmed that “the production team from the Xbox 360 is working on the next Xbox 720 [our pet name], and they’re looking into what kind of CPUs will be available on the market in 2011-2012″. In fact, development on the Xbox 720 might have been going on for longer than we think, as Robbie Bach, the President of Entertainment & Devices Division at Microsoft, said, “We started thinking about the next generation before we shipped the Xbox 360″. So, we can be dead certain that the X720 is already in development.

HDMI and Wi-Fi will be built in

The Xbox 360 Elite already has HDMI and in 2012, Wi-Fi will be a standard and so, it should be built into the Xbox 720. The PS3 already has a built in Wi-Fi Ethernet and Bluetooth.

A 4.7GHz CPU on the Xbox 720? It could happen

The Xbox 720 could feature something similar to Sony’s Cell-like processor. But will Microsoft invest in something like that? We already have four cores on today’s PC. They might not have to look farther than their partnership with IBM. IBM has already developed a dual core 4.7GHz server CPU, dubbed the Power6. Who’s to say that Microsoft won’t put it into their X720? Those extra GHz could go towards assisting the GPU and more realistic AI. Looks like Microsoft’s partnership with IBM is finally paying off.


Posted by Admin on Sunday, December 14, 2008 9:25 AM
Permalink | Comments (3) | Post RSSRSS comment feed

Iterate through Struct Constants using reflection

 

using System.Reflection;
 

public Hashtable searchHash = new Hashtable();
System.Reflection.FieldInfo[] fields = [myStructName].GetType().GetFields();
foreach (System.Reflection.FieldInfo field in fields)
{
searchHash.Add(field.GetValue([myStructName]).ToString(),
"|");
}


Posted by Admin on Monday, July 14, 2008 4:18 AM
Permalink | Comments (15) | Post RSSRSS comment feed

Book Review: Domain-Driven Design: Tackling Complexity in the Heart of Software

Great book by Eric Evens discussing the domain driven approach to software design.

Finishing up this book...a book review will be comming soon...

 

"There are many things that make software development complex. But the heart of this complexity
is the essential intricacy of the problem domain itself. If you're trying to add automation to
complicated human enterprise, then your software cannot dodge this complexity—all it can do is
control it."

"The key to controlling complexity is a good domain model, a model that goes beyond a surface
vision of a domain by introducing an underlying structure, which gives the software developers the
leverage they need. A good domain model can be incredibly valuable, but it's not something that's
easy to make. Few people can do it well, and it's very hard to teach."


Tags: , ,
Categories: C# | LINQ | SQL Server | XNA | Domain Driven
Posted by Admin on Wednesday, May 14, 2008 6:00 AM
Permalink | Comments (4) | Post RSSRSS comment feed

SOA Using WCF proxy Inside SQL SSIS with a CAG'ed dll.

What does all that nerd lingo mean?

Basically I have some data I need to take out of the database and pass it to another server for processing in a service oriented architecture.
When this remote process is complete it will pass me back the results that I will save in the database.
The transport mechanism we will use is WCF or windows communication foundation.  To use this on the client side, which happens to be a database process. We will create a proxy class.
SQL SSIS is SQL Server's new DTS on steroids performance enhanced DTS. SSIS allows scripting in VB.net only (don't ask), and to use outside compiled dll's you have to register them in the Global Assembly Cache with a strong name, this is just a fancy way of making sure your dll's are unique.

This will happen on a timed interval.  Seams pretty simple huh?

In order to leverage windows communication foundation within SQL Server SSIS there are a number of things you have to do to make this happen. 


Build your client proxy WCF service model bindings from WCF service.

  1. Build an assembly that will wrap the logic for your WCF call.
  2. Sign the assembly with a strong name. (sn.exe or VS IDE).
  3. GAC your new assembly on the SQL box by copying into C:\WINDOWS\assembly.
  4. Merge your proxy app settings into DtsDebugHost.exe.config and DTExec.exe.config.
  5. Welding in custom assemblies in SSIS with configuration variables.

 

 

 Make sure your dll is GAC'ed and refernced in your SSIS script project.

 Make sure your dll is added to your Package.dtsx.

 


Tags: , ,
Categories: C# | GAC | SQL Server | SSIS | WCF
Posted by Admin on Wednesday, May 14, 2008 4:48 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Sharing WCF Collection Types between Service and Client

This particular feature will get ya ! if your not aware of it.

 

When using the SvcUtil.exe and specifying shared collectionTypes;

The expression in the collectionType switch for a shared collection is followed by a back quote (`) and a 1.
For generic types, you must specify the number of generic parameters with a back quote followed by the number of generic parameters.
Do not confuse the back quote (`) with the single quote (').

"c:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcUtil"
      /language:cs
      /out:ServiceClient.cs 
      /namespace:*,ShareTypes.Client
      /noconfig
      /reference:..\ShareTypes.Common1\bin\Debug\ShareTypes.Common1.dll
      /reference:..\ShareTypes.Common2\bin\Debug\ShareTypes.Common2.dll
      /collectionType:ShareTypes.Common.SharedCollection1
      /collectionType:ShareTypes.Common.SharedCollection2`1
      net.tcp://localhost:9042/Service/mex

Great article here on this topic...

http://www.codeproject.com/KB/WCF/WCFCollectionTypeSharing.aspx


Posted by Admin on Thursday, May 08, 2008 8:27 AM
Permalink | Comments (3) | Post RSSRSS comment feed

The project location is not trusted

 

If you download zipped up Visual Studio project files and extract them with out Unblocking the zip file first, you will get an error.

Right click on the zip and Unblock -> press apply before extracting.

Speaking of untrusted zones ....


Posted by Admin on Thursday, May 08, 2008 3:03 AM
Permalink | Comments (3) | Post RSSRSS comment feed

Jump off the stack into a heap of OOP !

Coming soon...

learning Object Oriented Programming...

      OR

OOP ! I did it again !!! - A lesson in object cloning...

 

 

At the end you will be able to snatch the pebble from my hand...

 

You down with  OOP ! - Yeah You Know Me !!!


Tags:
Categories: C#
Posted by Admin on Tuesday, May 06, 2008 5:19 AM
Permalink | Comments (2) | Post RSSRSS comment feed

Using Namespace Alias Qualifier (C# Programming Guide)

 

The ability to access a member in the global namespace is useful when

the member might be hidden by another entity of the same name.

In this example, the namespace System is used to include the class TestClass therefore, global::System.Console must be used to reference the System.Console class, which is hidden by the System namespace. Also, the alias mcLovin is used to refer to the namespace System.Collections; therefore, the instance of a System.Collections..::.Hashtable was created using this alias instead of the namespace.

  

Posted by Admin on Wednesday, April 30, 2008 6:37 AM
Permalink | Comments (3) | Post RSSRSS comment feed

When Multi threading unsafe COM Win32 code always specify a seperate apartment model

A .NET thread is automatically assigned an apartment upon entering apartment-savvy Win32 or legacy COM code. By default, it will be allocated a multi-threaded apartment, unless one requests a single-threaded apartment as follows:
 Image Preview
Thread t = new Thread (...);
t.SetApartmentState (ApartmentState.STA);
One can also request that the main thread join a single-threaded apartment using the STAThread attribute on the main method:
class Program {
  [STAThread]
  static void Main() {
  ...
Apartments have no effect while executing pure .NET code. In other words, two threads with an apartment state of STA can simultaneously call the same method on the same object, and no automatic marshalling or locking will take place. Only when execution hits unmanaged code can they kick in.The types in the System.Windows.Forms namespace extensively call Win32 code designed to work in a single-threaded apartment. For this reason, a Windows Forms program should have have the [STAThread] attribute on its main method, otherwise one of two things will occur upon reaching Win32 UI code:
  • it will marshal over to a single-threaded apartment
  • it will crumble and fail.

Posted by Admin on Wednesday, April 30, 2008 2:29 AM
Permalink | Comments (5) | Post RSSRSS comment feed

Who wrote this piece of code ?

Don't complain about BAD code you come across, Just fix it. Usually you are not privy to the exact situation surrounding the code you see before you.

It's easy to criticize older code someone else has written, but we have all written code that could be better. 

Ever come across a section of code, and say to your self... "Whoa! This sucks!” I wonder what the developer was thinking here.
Then you look further down and realize you wrote it 2 years ago late at night when you had the flu.
 
  

    + =

You can almost always refactor your code to make it more streamlined, readable and efficient.  But not everyone has the time, or makes time to do so.
The important message here is to "Just fix it " but be carefull there could be good reasons for the decisions made to code this solutiuon in a particular way.

More to come...


Categories: C# | LINQ | SQL Server | XNA
Posted by Admin on Tuesday, April 29, 2008 1:10 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Over Engineering Software Design

Need more cow bells ?

 Over engineering your software application is when you attempt to make it so flexible or scalable that you lose focus on returning business value. Often you can get swept up in programming and designing just for the sake of doing so.  It’s so tempting to use that “New” technology to tackle any problem that comes your way with a cool design pattern or “the tool of the month”.  Some programmers attempt to make their software very flexible and sophisticated because they believe they know their system’s future requirements.  In there programmer minds they reason that it's best to make a design more flexible or sophisticated, so it can accommodate the needs of tomorrow. This is perfect if you have a crystal ball or are psychic.  Ok you may be saying…”Yeah but based on my experience, I believe I have a handle on this business domain enough to predict the future of this software development.”


Ok, but what if you're wrong ?... If your predictions are wrong, you waste precious time, resources and money.  Then you and your team will spend days or even weeks tweaking an overly complex “flexible” piece of code.  This is time you could have spent writing the new logic exactly the way it should be to provide business value.

 

Except for the guys that work at a R&D software think-tank most of us have a business need that drives our software development, which in turn drives our paychecks.

To turn your back on business value is to bite the hand that feeds you.

 

 


Tags:
Categories: C# | LINQ
Posted by Admin on Monday, April 28, 2008 7:25 AM
Permalink | Comments (0) | Post RSSRSS comment feed

What would you say... ya do here?

Remember middle managment needs to look important also !!!


Posted by Admin on Monday, April 28, 2008 6:01 AM
Permalink | Comments (0) | Post RSSRSS comment feed

LINQ with Transactions

 This is a simple example of how to wrap your LINQ db.DataContext SubmitChanges() in a Transaction.

This is much like using transaction in SQL Server.

I used a simple add function to outline the pattern to use when wrapping your LINQ commits in transactions.

*Add a ref to System.Transactions;

 

 

  
  
New LINQ the home verion. now you and your friends can play "Map that Relational Object" on a Friday Night !!!

* Some assembily required.

   (database not included)

 

 

  using System.Transactions;


Categories: C# | LINQ
Posted by Admin on Thursday, April 17, 2008 7:30 AM
Permalink | Comments (3) | Post RSSRSS comment feed

Increase IE's number of simultaneous downloads

I do not like being restricted by IE's limitation on only allowing 2 simultaneous downloads.

Click on the Start button and select Run.

  1. On the Run line type Regedt32.exe and hit Enter. This will launch the Registry Editor
  2. Locate the following key in the registry:

    HKEY_CURRENT_USER>Software>Microsoft>Windows>
    CurrentVersion>Internet Settings
    .

  3. Click on the Internet Settings Key. Now go to the Edit menu, point to NEW click DWORD Value
  4. Type MaxConnectionsPer1_0Server for the name of this DWORD Value.
  5. Double-click on the MaxConnectionsPer1_0Server key you just created and enter the following information:
    • Value data: 10.
    • Base: Decimal.
  6. When finished press OK.
  7. Repeat steps 4 and 5. This time name the key MaxConnectionsPerServer and assign it the same values as indicated in Steps 6.
  8. Close the Registry Editor.

That's all there is to it! If you modified your registry settings correctly, you should now have the capability to download up to 10 files simultaneously.

 

 


Tags: ,
Posted by Admin on Monday, March 24, 2008 3:50 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Welding in custom assemblies in SSIS with configuration variables.

 Welding in custom assemblies in SSIS with configuration variables. 

(I will pop a GAC in your CACHE !!!!)

Pre-requisites

SQL Server 2005 (including SSIS), Microsoft Visual Studio 2005 / 2008, .NET Framework v2.0-3.5

 

Prep the Assembly

In order to register the assembly in the Global Assembly Cache (GAC), it is necessary that the assembly has a Strong Name. There is a utility called sn.exe that can be used for this purpose. However, for this project, navigate to the Signing tab, select Sign the assembly option, and select <New> from the drop-down list. Type a name for the strong name key file. Finally, uncheck the option to protect my key file with a password. Click OK and save the project file. Build the file.The final step is to register the component in the GAC.  The simplest way is to copy your assembly into the C:\WINDOWS\assembly folder by dragging and dropping.  The other method involves creating bat files or using the command prompt to register your component. 

Adding a reference to the Assembly in SSIS script designer

 Intuitively one would think your next step is to open your SSIS script editor and within your project explorer simply add a reference to your newly GAC’ed assembly.  However when you right click on References -> Add Reference and browse the list of available assemblies - yours is not there.I will not spend time trying to explain the intricacies of why this is, instead I will focus on how to get your .dll registered so you can get up and working.  The bottom line is your going to have to modify the Package.dtsx manually edit the *.dtsx script file to add additional paths to look for your defined assemblies. For example:  Open the file and first search for “<Build>”.

Add yours to the end of the ReferencePath attribute. 

<Build>         
ReferencePath = "C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.ScriptTask\9.0.242.0__89845dcd8080cc91\;
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\9.0.242.0__89845dcd8080cc91\;
C:\WINDOWS\assembly\GAC_MSIL\ myAssembly \1.0.0.0__5d6caf3fc6396ac3\"

Then you can define you assemblies in the References Tags a little further down:
 

<References>           
<Reference Name="
myAssembly " AssemblyName=" myAssembly " /> 
            *Next time you fire up the script in Visual Studio of Applications it will be referencing Next Search for “<References>”.  

<References>
               
           
<Reference Name = "myAssembly" AssemblyName = " myAssembly "/> 
</References>

Using a configuration varibles.

 When you are using a .NET assembly that reference external config variables, the hosting executable “owns” the App.config file.  Therefore in this instance, SSIS has two executables that it uses one for the development and debugging and one for the production release.  To see these files browse to:
 
C:\Program Files\Microsoft SQL Server\90\DTS\Binn

If you’re going to use configuration variables you need to add them to these two .config files:
 DTExec.exe – The main .exe SSIS uses for production release.

DTExec.exe.config 
DtsDebugHost.exe – The .exe  SSIS uses when developing and debugging.

DtsDebugHost.exe.config 

<configuration>   
<startup>
       
<requiredRuntime version="v2.0.50727"/>
   
</startup>
   
<appSettings>
               
<add key="Test1" value="test1" />
               
<add key="Test2" value="test2" />
    
</appSettings>
</configuration>

Categories: Cars
Posted by Admin on Thursday, March 13, 2008 2:13 AM
Permalink | Comments (0) | Post RSSRSS comment feed
Free Hit Counters
page counter