Government's view of the economy could be summed up in a few short phrases: If it moves, tax it. If it keeps moving, regulate it. And if it stops moving, subsidize it. - Ronald Reagan
The views expressed in this blog are mine and mine alone, not that of my employer, Microsoft, or anyone else’s. No warrantee is given for the quality of any material on this site.
ditto on this, i've been using grisoft for probably 3 years now on all of my machines and it's never let me down.
I agree completely with Shawn's advice. I would strongly recommend using the Enterprise Libraries. They are well documented and well tested. Plus they work together as a package. It is important for applications to have a solid DAL, Logging, Exception Handling, etc.
I would also suggest taking a look at the Smart Client Software Factory (CAB). Furthermore, you could investigate ClickOnce as a deployment strategy for your WinForms applications.
For a recent project I needed a Flood Fill Algorithm (see Flood Fill in Wikipedia, http://en.wikipedia.org/wiki/Flood_fill
It's certainly odd that performance differs so greatly.
Maybe this is caused (at least partially) by the weird code you're writing, since it doesn't actually do _anything_ right? This might just be some small compiler corner case.
Furthermore; you're using long's and that too seems unusual.
I played around with your benchmark and discovered that integer overflow checking is at fault - with that off, VB is just as fast. I wrote a post about it too :-).
Eamon I think you hit the nail on the head. Checking the 'Remove Integer Overflow Checks' options under Properties | Compile | Advanced Compile Options allowed my VB Code to consistently perform the test in under 3 seconds. Good Catch.
You can read Eamon’s full post at the following URL http://eamon.nerbonne.org/2006/12/vbnet-vs-c-example-of-difficulty-of.html
Check out some of the great posts we got in response to our “unilaterally declaring Friday, January 19th
Last week I made a recommendation ( http://drowningintechnicaldebt.com/blogs/shawnweisfeld/archive/2007/01/24/Virtual-Earth-Mobile-1.69.aspx
PingBack from http://drowningintechnicaldebt.com/blogs/shawnweisfeld/archive/2007/01/24/Virtual-Earth-Mobile-1.69.aspx
Talking to a colleague the other day about anti-virus they recommend another free alternative to AVG. I have never used it but he highly recommends it. Check it out at http://www.avast.com/eng/download-avast-home.html.
Joel's 5 things: http://codecube.net/item.asp?cc_ItemID=355
Posted on behalf of JT Shim
1. I joined a weigh-gain program and was slated to gain 0.5 lbs for 20 weeks for a grand total of 10 lbs. Notwithstanding eating without contraints, the gain was negligible to non existent. I continue to maintain that it's in the genes and have greater sympathy for those who wish to alter their weight. Can a leopard change it's spots? (Jer 13:23.)
2. Since I'm a relatively open person, finding things to disclose is hard and this level of introspection hurts my head :-)
3. I still love my first wife.
4. One of my life goals was to be able to do simultaneous translation from any language to any other language. People tell me that I speak English very well. I tell them that I better--it's the only language that I speak!
5. I'm too nice for my own good.
I got this email about CodeCamp and thought I would share:
3/26/2007
Shawn,
Thanks for all the effort to pull together the 2007 code camp. It was my first and left a very favorable lasting impression. All speakers were superb and the scheduling could not have been better. The raffle drawing was a nice way to finish up the day. I won a C# copy and have started reading it to add that language to my repertoire.
As an organizer of military reunions, I know what an effort it was to set up and administer such a complex program and can appreciate the effort more than most.
Thanks again & BZ (Navy code for well done.)
Ted
Shawn –
The Orlando Code Camp ROCKED – and you did a really great job hosting the event! Thanks also for letting me tag-team with David Strommer for our session – it was completely full and we had a lot of great feedback.
Thanks,
Jeff
March 29, 2007
Hello Shawn,
I am sending this email to thank you for your efforts.
My career is focused mainly on Sales & Marketing (24 yrs). I embraced technology early in my career (80’s – what’s a Fax machine?) as a tool to better my career and make me and my co-workers more productive. I have been screwed ever since.? Now I spend my days selling new ideas and technology to my company and my co-workers in our sales department. I can say with great conviction that it is by far the hardest sales job I have ever had in my life.
This past SCC Code Camp was my first. I have to say that it was a great experience for me, professionally speaking, and well worth my time. I look forward to my next Code Camp.
Thank you,
Mike
April 5, 2007
CodeCamp was awesome again this year. Thanks for everything you did to bring this great event to Orlando.
Rob
Thought I'd share this with you. Great job in planning this event.
Brian
April 11, 2007
Shawn
Good afternoon, this code camp on 27 March 07 was my first one and now will not be my last one. I learned as well as benefited by being exposed to new concepts. It was obvious that you put so much time and effort to make this a success. Thank you for your hard work in providing an opportunity of professional growth and enrichment. Code camp is a valuable tool that everyone should take advantage of.
Regards
Markus
Wow, the last two days has been quite a bit of fun. Hey, these things don't happen every day. Who would
In my earlier post I put together an image processing class ( drowningintechnicaldebt.com/blogs
Thanks for organizing a great meeting. Talking with Charlie and CO. was definately worth the drive from Jax. The team was really open to feedback and talk many questions from the group. Every LINQ presentation I see adds something new to a technology I am really looking foward to.
Dennis
Shawn, I get an error:
'The name 'directory' does not exist in the current context'
oh *** .. nice!
that was supposed to be "oh sh!t ... nice"
Pingback from Community College: Junior & Technical College Degree » 2007 Day of Silverlight
Brilliant.
It's unfortunate that with all the abstractions and libraries out there, these simple things are often forgotten.
Too bad I can't bump this +5 insightful.
to resolve the error you need to add the following to your cs file:
using System.IO;
If you are using this as an ad rotator or the like, then you really need to alter line 4 as follows:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
Without EnablePartialRendering="true" your entire page will refresh which is not very user friendly in most circumstances.
hi,
is it possible to use adrotator wothout update panel & scriptmanager?
I got some glowing praise via email, and I thought I would share.
---------------------------------
I have attended several of your presentations, the most recent at CodeCamp 2008 in Miramar. Your presentations are always well thought out, organized and informative. In my opinion your greatest strength is your ability to stay focused on the presentation and not let it get off course via questions from us. Thanks for taking the time to speak to us and I look forward to your future presentations.
Ken
Pingback from Free Tutorials
Pingback from Dallas Community Leadership Summit | Health Insurance
Pingback from Taxes » Dallas Community Leadership Summit
Hey Shawn -
It was great meeting you at the CLS. Thanks for joining us and for the great participation!
Hi,
I'm trying to integrate a SAPBW connection into my .net website using a SAPBW xml/a adapter. (I've added a web reference to this so I have a .wdsl).
However, I'm stuck with step 3 which shows how to implement the solution for an application rather then a website so it talks about modify the generated webservice proxy??
"Step 3: Modify the WebService Proxy Class, When .NET generates the proxy class it declares the Execute Mehtod with two arguments the ExecuteCommand and a PropertiesType. The PropertiesType is a base class for the DiscoverProperties object, but has no properties. To fix this we actually want to pass a DiscoverProperties object to the Execute Method. While this compiles fine the XML serializer has a problem serializing the request. To fix this add "[XmlElement(typeof(DiscoverProperties))]" before the PropertiesType argument in the Execute Methods Signature. It should look like this "public System.Xml.XmlElement Execute([System.Xml.Serialization.XmlElementAttribute(IsNul lable=true)] ExecuteCommand Command, [XmlElement(typeof(DiscoverProperties))]PropertiesType Properties) {"
"
How do I make this sort of change in a .net website. Do I need to modify the webreference wdsl file?
Any help would be very much appreciated because I can't seem to get over this... (please find my code below).
Imports System
Imports System.Data
Imports System.Xml
Imports System.Collections.Generic
Imports System.Text
Imports System.Net
Imports Microsoft
Imports SAPBW
Imports Microsoft.AnalysisServices.AdomdClient
Imports System.Xml.Serialization
Imports System.Xml.Schema
Imports System.IO
'Namespace SAPBW
<XmlInclude(GetType(_Default))> _
<XmlInclude(GetType(PropertiesType))> _
<XmlInclude(GetType(DiscoverProperties))> _
Partial Class _Default
Inherits System.Web.UI.Page
'Global Variables
Private BWQuery As MsXmlAnalysis
Private Command As ExecuteCommand
Private result As XmlElement
Private convert_result As XmlNodeReader
Private properties As DiscoverProperties
'Private properties As PropertiesType
Private login As NetworkCredential
Private cellset_result As CellSet
Private tuples_on_columns As TupleCollection
Private i As Integer
Private nr_tuples_on_columns As Integer
Protected UN As String = "UserName"
Protected Pass As String = "PassWord"
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InitializeVariables()
SetVariables()
WriteCommand()
Commands()
End Sub
Private Sub InitializeVariables()
BWQuery = New MsXmlAnalysis()
Command = New ExecuteCommand()
properties = New DiscoverProperties()
properties.PropertyList = New DiscoverPropertiesPropertyList()
login = New NetworkCredential()
Private Sub SetVariables()
login.UserName = UN
login.Password = Pass
BWQuery.Credentials = login
BWQuery.PreAuthenticate = True
properties.PropertyList.Content = "SchemaData"
properties.PropertyList.Format = "Multidimensional"
properties.PropertyList.DataSourceInfo = "default"
Private Sub WriteCommand()
Command.Statement = "SELECT NON EMPTY { [Measures].[3YIJG796Q2HIRX2ZBG2MMQZNN] } ON COLUMNS, NON EMPTY {[FEEEARNER].[LEVEL01].ALLMEMBERS } ON ROWS FROM [OP_CTIM3/FI_CTIM3_001_V01]"
Private Sub Commands()
'Dim s As XmlSerializer = new XmlSerializer(typeof(result))
'<XmlElement(typeof(DiscoverProperties))>
Try
Dim propType As PropertiesType
/************************************************** ******
**This is the problem as Execute expects (Command, Property)
**however i've populated Discoverproperties attribute but
**cannout pass it without implementing step 3. So I am trying
**to pass BWQuery.Execute(Command, properties)
************************************************** ******/
result = BWQuery.Execute(Command, propType)
convert_result = New XmlNodeReader(result)
cellset_result = CellSet.LoadXml(convert_result)
Dim i As Integer = 1
For i = 1 To nr_tuples_on_columns
Response.Write(tuples_on_columns(i).Members(0).Cap tion)
Next
'Console.ReadLine()
Catch ex As Exception
Response.Write(ex.ToString())
End Try
End Class
'End Namespace
Pingback from 2 Static » Blog Archive » Generics , Extension Methods, and XML Serialization
Pingback from 2 Static » Blog Archive » 2 Static ?? Blog Archive ?? Generics , Extension Methods, and XML …
Pingback from 2 Static » Blog Archive » 2 Static ?? Blog Archive ?? 2 Static ?? Blog Archive ?? Generics …
Ultram. Order ultram no prescription. Tramadol ultram and acute pain.
Vicodin. Vicodin withdrawal.
Great and helpful article. I have one question on the Xml that comes back from SAP(like below). The problem is that the descriptive column names are in the Schema section and the column names in the actual xml are in a "C00000#" format.
How do I would convert this data into a DataSet or DataTable object that has the columns named with the names in the schema?
<root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">">www.w3.org/.../XMLSchema-instance">
<xsd:schema xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:sql="urn:schemas-microsoft-com:xml-sql" elementFormDefault="qualified">
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="row" type="row" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="uuid">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="row">
<xsd:element name="C000000" type="xsd:string" sql:field="[ZFISQUART].[LEVEL01].[MEMBER_CAPTION]" />
<xsd:element name="C000001" type="xsd:string" sql:field="[ZDBBUS].[LEVEL01].[MEMBER_CAPTION]" />
<xsd:element name="C000002" type="xsd:string" sql:field="[Measures].[ZDBOPINC]" />
<xsd:element name="C000003" type="xsd:string" sql:field="[Measures].[ZDBORONA]" />
<xsd:element name="C000004" type="xsd:string" sql:field="[Measures].[ZDBORONAR]" />
<xsd:element name="C000005" type="xsd:string" sql:field="[Measures].[ZDBNETASS]" />
</xsd:schema>
<row><C000000>FY04Q1</C000000><C000001>Sales</C000001><C000002>10,000.00 USD</C000002><C000003>0.000</C000003><C000004>0.000</C000004><C000005>100,000.00 USD</C000005></row>
<row><C000000>FY04Q1</C000000><C000001>Marketing</C000001><C000002>1,200.00 USD</C000002><C000003>0.000</C000003><C000004>0.000</C000004><C000005>125,000.00 USD</C000005></row>
</root>
Pingback from Free .NET Hosting for User Groups | Legal Webmastering
Pingback from Leistung von Visual Basic verbessern - EntwicklerGemein.de
Pingback from Die Code-Zentrale » Blog Archive » schneller Zugriff auf Bitmaps, Manipulation von Bitmaps
Shawn:
Excuse me for interrup you in some way. I didn't find a place for put this message for you. I'm new to C# and I need to validate users on my SQL-Server DataBase using Microsoft FingerPrint Reader. I found your solution and I'd like to ask you if you could send me (please) some "steps" I've to follow in order to see how the solution works. I have in my computer SQL-Server and also MS-Visual Studio 2005.
Thank you for any help, It would be greatly appreciate.
David
johni2i The think you need to edit is the "Proxy Class" this is what .NET created when you added the web reference. If you press the "Show All Files" button in the Solution Explorer in VS.net you should see it hiding there. It will be the file with the big message on top that says dont edit it :)
schwinbp The dataset object has a method that will allow you to suck the xml into it. (msdn.microsoft.com/.../system.data.dataset.readxml.aspx)
Pragnesh, Looks like tdinardo has done this with AdRotator. (drowningintechnicaldebt.com/.../ASP.NET-AJAX-Random-Image-Rotator.aspx)
Yes these controls use Dundas Data Visualization technology.
blogs.msdn.com/.../microsoft-chart-control-vs-dundas-chart-control.aspx
I wanted to share the feedback that I got from my presentation this year at the PASS Summit. ( http:
RDN did an article on this reddevnews.com/.../article.aspx
Pingback from Websites tagged "secirity" on Postsaver
Pingback from Recent Faves Tagged With "freenet" : MyNetFaves
Pingback from Recent Links Tagged With "uac" - JabberTags
We used the web services to Integrate an existing ASP.NET Web Site with SharePoint. So the ASP.NET sends data to SharePoint and possibly kicks off a workflow.
Pingback from TLCube.com » Sormenj??ljet
This is a great review of the book! Thanks. I am halfway through it myself right now. Now all of the authors, except Shaun, are going to be speaking at the next Orlando Code Camp, in a track dedicated to DotNetNuke. http://www.orlandocodecamp.com
(FYI - I helped to edit the book. :) A really rewarding experience.)
Link Listing - March 8, 2009
Back in 2008 I blogged about Pivot/Cross Tab Queries in SQL Server ( drowningintechnicaldebt.com
Using the example from my last post ( Cross Tab Queries in SQL Server V2 ) I was asked to figure out
That is very cool! You have come such a long way in the community. It's amazing! Congratulations, and we'll see you here in Orlando later this month.
Today was a good day for questions, got one asking how to query the file system from sql server. See