tag:blogger.com,1999:blog-86836932009-07-14T10:03:48.222-05:00Kevin Marquette - The things I do.Some problems you just cant search on. Here are some I wish were more searchable and this blog is my attempt to make that happen.KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-8683693.post-22801604221463158032009-06-27T07:13:00.001-05:002009-06-27T07:13:01.056-05:00rrdtool data resolutionOne concept I had to adjust to was deciding on the resolution of the data I wanted to collect. By resolution I mean how detailed the data is. Let us use the example of CPU usage. If I intend to look at the last 1 hour vs the last 30 days, I would see the data at different details. My 1 hour window may show me every single data point (@5 sec). Every peak and dip is exactly what it was. Each pixel is 5 sec and I have 720 data points (60 min, 12 points a min).<br /><br />Now when we look at the 30 days we will not be able to include that much detail on the screen at once. My 30 day window will show data points @60 minute ticks. If the CPU slowly goes up and down, that's not an issue. But that is not often the case. It is very spiky, up and down very quickly at times. If you only take a reading every 60 min, its any ones guess if you read a spike or a dip.<br /><br />In this case I would record the min,max, and average values. When you chart that, the max will be the spikes to show you how hard it gets pushed. The min will show you if it ever gets to idle. The average is metric that gives you the most value when looking at 30 day window.<br /><br />When you create a rrdtool database, you define all those options. You can define multiple counters to the same thing at different resolutions. You define a database and indicate how often the value will be recorded. Then you can define different resolutions of that data. You will still just record the CPU every 5 sec and the rrdtool will keep track of those data windows and resolutions.<br /><br />We can define a database that gets a value every 5 sec for our CPU dataset. We can define a detailed resolution of 1 hour and a second one of 30 days. The first RRA records a value every tick for 720 ticks. each tick is 5 sec, so that's 1 hour. The RRA would be "RRA:AVERAGE:0.5:1:720". The second RRA averages the values of 720 values (1 hour) over 30 days (720 ticks). That RRA is "RRA:AVERAGE:0.5:720:720".<br /><br />Let us pick some new numbers. What if we want 30 sec average for 2 days. 30 sec is 6 values of data. 2 days is 5760 intervals of 30 sec. So the RRA is "RRA:AVERAGE:0.5:6:5760".<br /><br />So our final rrdtool database is this:<br /><br />rrdtool create temp.rrd -s 5<br />DS:cpu:GAUGE:30:0:100<br />RRA:AVERAGE:0.5:1:720<br />RRA:AVERAGE:0.5:720:720<br />RRA:AVERAGE:0.5:6:5760<br /><br />What I want you to do is read over this and then return to the examples on the rrdtool's website. Once this information clicks, come back here and read it again. I know the RRA code is over your head if this is your intro, but when you return it will be a very solid example.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-2280160422146315803?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-68042739656011639622009-06-24T07:52:00.000-05:002009-06-24T07:52:04.851-05:00Intro to rrdtoolI recently discovered a simple tool that has lots of power behind it. <span id="SPELLING_ERROR_0" class="blsp-spelling-error">rrdtool</span> is a round robin database that stores time dependant values and easily graphs them. It is a database where you insert values at <span id="SPELLING_ERROR_1" class="blsp-spelling-corrected">consistent</span> intervals and the query results are in the form of a graph. It is a round robin database because it only saves a set number of values and overwrites the oldest one every time.<br /><br />Now that I pointed out what it is, let us talk about what we can do with that. The first thing that jumps out (and what it was designed for) is performance monitoring. You can set up a task to save the <span id="SPELLING_ERROR_2" class="blsp-spelling-corrected">CPU</span>, network, disk, and ram activity to this file every 5 sec and then generate charts to display it. Any thing you can get a counter on. Computer <span id="SPELLING_ERROR_3" class="blsp-spelling-corrected">temperature</span>, event log errors, ping times, terminal server connections, and anything else you can think of. Things like the daily <span id="SPELLING_ERROR_4" class="blsp-spelling-corrected">temperature</span>, number of visitors to your office, spam messages, or even your daily bank balance.<br /><br />This is great for performance monitoring because the database <span id="SPELLING_ERROR_5" class="blsp-spelling-corrected">automatically</span> discards old data. To put it another way, it only keeps the data for as long as you think its important. Once you define how much you want to store and at what resolution, the database is then set <span id="SPELLING_ERROR_6" class="blsp-spelling-error">in size</span>. It never grows or shrinks.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-6804273965601163962?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-41708719342090178212009-05-05T14:43:00.002-05:002009-05-05T14:52:51.567-05:00RemoteApp Disconnected Because of a protocol error in Windows 7 RC1The first thing I did after installing Windows 7 RC1 was to toss on my remote apps off of a test server. I have a 2008 Terminal Server that publishes a few common apps for seamless integration. I received a few dissconnects to the remote apps on both windows 7 RC1 boxes that I set up. Here is that message:<br /><br /><strong>RemoteApp Disconnected: Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again.</strong><br /><br />It is too soon for me to pin this on the release canidate because I have only spot tested my terminal server set up. But a quick search of the message did not give me many results. As I get more details, I will update this post.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-4170871934209017821?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com1tag:blogger.com,1999:blog-8683693.post-75743732766170081712009-04-17T07:46:00.000-05:002009-04-17T07:46:00.415-05:00Creating the Cho'gall Ninja listWith my <a href="http://www.badanatomy.com/">weekly raffle </a>starting to pick up I decided to look for another service that I could provide. Something the community needs and that I can use to promote my <a href="http://www.badanatomy.com/">raffle</a>. Our server has a huge problem with people taking loot that they should not take. We call them ninjas.<br /><br />I spent a little bit of time looking at past reports and screenshots of ninjas on our server that people have ran into. I tossed them all on one page with links to the forums post and to the screenshot. I skiped over any report where I did not have a screenshot to back it up.<br /><br />Here is the <a href="http://www.badanatomy.com/ninja.htm">Cho'gall Ninja list</a>. Its a simple page that I am maintaining by hand, but it should get the job done. If you are looking to get a name added to the <a href="http://www.badanatomy.com/ninja.htm">ninja list</a>, then make a forum post and include a good screenshot of what happened. I will try to check on this every few days to keep the list up to date.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-7574373276617008171?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-22373445276298977972009-04-04T07:43:00.001-05:002009-04-06T10:01:06.498-05:00VB.Net Auto grow Textbox as text changesI have several <span id="SPELLING_ERROR_0" class="blsp-spelling-error">textboxes</span> on a form that I would like them to grow as the user types text into them. Sometimes they will only put in a few words, other times it can be several lines of text. I expected this to be a very simple process but had a hard time finding a solution.<br /><br /><br />Several people did talk about using the TextBox.lines.count to figure out how tall to make the box. The problem with that is you must turn word wrap off for that to work. Sometimes you can do that. In my case, I needed the lines to wrap.<br /><br /><br />I did find <span id="SPELLING_ERROR_1" class="blsp-spelling-corrected">references</span> to Graphics.<span id="SPELLING_ERROR_2" class="blsp-spelling-error">MeasurString</span>(String,Font) as <span id="SPELLING_ERROR_3" class="blsp-spelling-error">SizeF</span> to figure out how long a string would be with a given font. I was about to overlook the effect different fonts and sizes would have had but it looks like this will solve both.<br /><br /><br />In the end, I took each line in the <span id="SPELLING_ERROR_4" class="blsp-spelling-error">txt</span> box. I calculated how many times each line would wrap and add that to my line count. Then used the Textbox.Font.Height to figure out how high each line would be. I also added 10 <span id="SPELLING_ERROR_5" class="blsp-spelling-corrected">pixels</span> to account for any padding at the top and bottom of the text box.<br /><br /><br />Here is the code I ended up with:<br /><br /><br /><br /><span style="font-size:85%;"><p></span></p><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Dim</span></span><span style="font-size:85%;"> <span id="SPELLING_ERROR_6" class="blsp-spelling-error">numberOfLines</span> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">As</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Integer</span></span><span style="font-size:85%;"> = 0<br /></span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Dim</span></span><span style="font-size:85%;"> e </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">As</span></span><span style="font-size:85%;"> Graphics = Graphics.<span id="SPELLING_ERROR_7" class="blsp-spelling-error">FromImage</span>(</span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">New</span></span><span style="font-size:85%;"> Bitmap(300, 300))<br /></span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Dim</span></span><span style="font-size:85%;"> <span id="SPELLING_ERROR_8" class="blsp-spelling-error">StringSize</span> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">As</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">New</span></span><span style="font-size:85%;"> <span id="SPELLING_ERROR_9" class="blsp-spelling-error">SizeF</span><br /></span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">For</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Each</span></span><span style="font-size:85%;"> item </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">As</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">String</span></span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">In</span></span><span style="font-size:85%;"> <span id="SPELLING_ERROR_10" class="blsp-spelling-error">tBox</span>.Lines<br /><span id="SPELLING_ERROR_11" class="blsp-spelling-error">StringSize</span> = e.<span id="SPELLING_ERROR_12" class="blsp-spelling-error">MeasureString</span>(item, <span id="SPELLING_ERROR_13" class="blsp-spelling-error">tBox</span>.Font)<br /><span id="SPELLING_ERROR_14" class="blsp-spelling-error">numberOfLines</span> += Math.Floor(StringSize.Width / <span id="SPELLING_ERROR_15" class="blsp-spelling-error">tBox</span>.Width) + 1<br /></span><span style="font-size:85%;color:#0000ff;"><span style="font-size:85%;color:#0000ff;">Next<br /></span></span><span style="font-size:85%;"><span id="SPELLING_ERROR_16" class="blsp-spelling-error">tBox</span>.Height = <span id="SPELLING_ERROR_17" class="blsp-spelling-error">numberOfLines</span> * tBox.Font.Height + 10</span><br /><br />I added a call to that to the <span id="SPELLING_ERROR_18" class="blsp-spelling-error">TextChanged</span> event handler for each text box. Don't forget that you have to adjust the other items on your form if you make the text box grow. It will overlap other elements if left unchecked.<br /><br /><p><span style="font-size:85%;"></p></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-2237344527629897797?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-32488166236823487542009-04-03T08:09:00.003-05:002009-04-16T14:46:37.629-05:00Creating the Bad Anatomy raffle for WarcraftRecently Blizzard changed some rules to <span id="SPELLING_ERROR_0" class="blsp-spelling-error">Warcraft</span> that now <span id="SPELLING_ERROR_1" class="blsp-spelling-corrected">allows</span> people to run casinos in game. They are crude and the operators fill the city spam. You don't know who you can trust but people still play.<br /><br />An idea I had worked on in the past was to create a lottery for players in wow. We had a lot of it planned but ended not doing because the rules were unclear if it was allowed or not. Now that the rules have changed and we are ready to start it up. So I present to you <a href="http://www.badanatomy.com/">Bad Anatomy's <span id="SPELLING_ERROR_2" class="blsp-spelling-error">Cho'gall</span> weekly raffle. </a><br /><br />Our initial idea was for a lottery where people could pick numbers and we use real world event to pick the numbers (like the multi-state lottery numbers). But our biggest issue with that is it could take a long time for a winner. In the end we decided on a raffle.<br /><br />For every 10G someone donates, we will give them one raffle ticket. The ticket is given just so the purchaser knows what his numbers are and adds to the <span id="SPELLING_ERROR_3" class="blsp-spelling-corrected">realism</span> of it. A character was created just to handle the raffle. So every message in and out from him is kept <span id="SPELLING_ERROR_4" class="blsp-spelling-corrected">separate</span> from all our other mail.<br /><br />There are 2 parts that make this work. First is the in-game mod I had to develop to receive gold, issue tickets and track tickets, and to pick the winner. It <span id="SPELLING_ERROR_5" class="blsp-spelling-corrected">initially</span> started out easier then I thought it should be and ended slightly more challenging then I thought it would be. I may go into those details in a later post. I can run my character up to the mail box and issue a command that will allow him to open <span id="SPELLING_ERROR_6" class="blsp-spelling-corrected">every</span> message, collect the gold, calculate how many tickets someone gets, and then send each of them a message with their numbers.<br /><br />The second part is the supporting website <a href="http://www.badanatomy.com/">Bad Anatomy's <span id="SPELLING_ERROR_7" class="blsp-spelling-error">Cho'gall</span> weekly raffle </a>. This is the feature that makes it real. People can check the site to see when the next raffle starts or ends, see the winners, and all the rules to the game. We took a domain name we already had (<a href="http://www.badanatomy.com/">Bad Anatomy</a>) and <span id="SPELLING_ERROR_8" class="blsp-spelling-corrected">re purposed</span> it for the raffle. I tried to give it a simple and clean look. I tried to look at lottery sites for examples and they all felt <span id="SPELLING_ERROR_9" class="blsp-spelling-corrected">overwhelming</span> with all the stuff they tried to pack onto one page. In the end, I created the look I wanted.<br /><br />This experiment is just getting started so I cannot tell you how well people are liking it or even how long I will run it. Head over to <a href="http://www.badanatomy.com/">Bad Anatomy's <span id="SPELLING_ERROR_10" class="blsp-spelling-error">Cho'gall</span> weekly raffle </a>to see how its going.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-3248816623682348754?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-18470855397361589102009-03-31T07:43:00.000-05:002009-03-31T12:36:44.121-05:00Tracking Down RTE: 35601 Element Not FoundWe recently turned on some new features of a product we were using and would get this RTE on a few records within the application. The number of problem records were small, the total number of records worked with in a day made them a regular <span id="SPELLING_ERROR_0" class="blsp-spelling-corrected">occurrence</span>. <br /><br />I went over to our test <span id="SPELLING_ERROR_1" class="blsp-spelling-corrected">environment</span>. It was up to current patch levels, but the data was a few months old. Almost all of my broken records in live were broken in test. That gave me hope that its an existing data issue and not something <span id="SPELLING_ERROR_2" class="blsp-spelling-corrected">actively</span> breaking records.<br /><br />The nice thing about our test <span id="SPELLING_ERROR_3" class="blsp-spelling-corrected">environment</span> is that I am <span id="SPELLING_ERROR_4" class="blsp-spelling-corrected">usually</span> the only person using it. That makes it easy to toss the <span id="SPELLING_ERROR_5" class="blsp-spelling-error">SQL</span> <span id="SPELLING_ERROR_6" class="blsp-spelling-error">Profiler</span> on with out having to filter it to just my <span id="SPELLING_ERROR_7" class="blsp-spelling-corrected">traffic</span>. I started the <span id="SPELLING_ERROR_8" class="blsp-spelling-error">profiler</span> at the point just before clicking the button that generated the RTE and paused it just after the message came up. I closed the app and repeated this process a few times for both working and broken records.<br /><br />Looking at the queries that each ran, the broken records all <span id="SPELLING_ERROR_9" class="blsp-spelling-error">stopped</span> at the same point after the same query was run. That tells me that the application is processing the queries as it runs them and the last one before it <span id="SPELLING_ERROR_10" class="blsp-spelling-error">stopped</span> is my suspect query. If both the broken and the working records had the same full list of queries I would have had to check them all. That would have indicated to me that it <span id="SPELLING_ERROR_11" class="blsp-spelling-error">pre-loads</span> most of the data before processing it. I was in luck.<br /><br />The query was a large one but the only difference between all records was the record ID. So it is the same query running for both working and non-working records. Running the query for all of them gave me different sized record sets. Some had more a lot of records and some had very few. One thing did jump out at me as I looked at the raw data.<br /><br />A few null values jumped out to me in a column that looked like it should have a value. With my experience with the data I knew it should have had a value. I saw one column that had data in it directly related to reference I expected instead of that null value. Because this looked like a complicated query, my first guess was a bad join. <br /><br />That column was not the only one with nulls in it but every time it had a null the 3 columns to the right also had nulls. <span id="SPELLING_ERROR_12" class="blsp-spelling-corrected">That's</span> what I expect a bad join to look like. So I started reformatting the query with proper indents and <span id="SPELLING_ERROR_13" class="blsp-spelling-corrected">white space</span>. It did contain a few union calls. The first query in the union <span id="SPELLING_ERROR_14" class="blsp-spelling-corrected">practically</span> returned the same results. It looked the same except for a few less rows. My null values were still mixed into the good data.<br /><br />I focused on the table columns that were null and the one column that contained directly related information. The <span id="SPELLING_ERROR_15" class="blsp-spelling-corrected">joins</span> between them looked correct. Exactly how I would have written them. After <span id="SPELLING_ERROR_16" class="blsp-spelling-corrected">rewriting</span> the query as simple 2 table join that used the same logic, I ended up with the same results. It was a join that I expected to be valid every time but in this case there are times where its not. <br /><br />It turned out to be a flaw in the application logic where it allowed some changes to one set of tables that should have enforced changes in another. But they were enforcing them at the application level instead. Other parts of the system enforced it <span id="SPELLING_ERROR_17" class="blsp-spelling-corrected">correctly</span>, this one point in the application did not. It overlooked the fact that it needed to enforce it and I almost expect the developer to make the same assumption I made.<br /><br />I know this is a <span id="SPELLING_ERROR_18" class="blsp-spelling-error">little</span> different from my usual problem/solution posts but this was mostly an internal product and I wanted to document the process I took to <span id="SPELLING_ERROR_19" class="blsp-spelling-corrected">solve</span> it.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1847085539736158910?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-14152453015482310832009-03-27T07:12:00.001-05:002009-03-27T07:12:00.409-05:00Quiet/Loud GameI posted this in another forum and got a lot of good feedback on it. Here is a more formal write up on a game I play with my kids at home. The Quiet Loud Game.<br /><br />I have 2 young kids at home. One is almost 4 and the other is 17 months. The 4 year old would often make lots on noise like kids do and our attempts to quiet her down were not working very well. Our problem was she didn't truly understand the concept of quiet. She knew she was doing something wrong, but had no idea what. That did not work very well for either of us. I came up with a new game to play.<br /><br />I turn the radio on to some music and turn the volume up a bit. We run around the house being loud. I yell the work loud or noisy several times and we all jump, and stomp, and scream, and yell, and slam doors, and bang on the floor. Then we start a loud count down from 3, 2, 1 and then I <span id="SPELLING_ERROR_0" class="blsp-spelling-corrected">whisper</span> the word quiet as I turn the volume on the radio way down.<br /><br />Then we all <span id="SPELLING_ERROR_1" class="blsp-spelling-corrected">whisper</span>, and tip toe, and sneak, and shush, and softly open and close doors. Only making quiet sounds. Then we start a soft count down from 3, 2, 1 and then I yell the work loud as I turn the radio back up.<br /><br />We repeat this process several times until someone starts to wear out (<span id="SPELLING_ERROR_2" class="blsp-spelling-corrected">usually</span> me) and we end it while we are all quiet. I tell them they did a great job and we all give each other high fives.<br /><br />Not only does this help teach them the concept of loud and quiet, it also gives them an outlet for that noise. And we all had a lot of fun doing it. I made a special point to do all the stuff we consider loud when doing the loud part.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1415245301548231083?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-16896569265962574912009-03-22T07:14:00.000-05:002009-03-22T13:27:56.329-05:00Left/Right Airplane GameMy little girl loves airplaines. We live close enought to an airport that she can spot them in the sky all the time. Once of her favorite games is to fly like an airplaine on my sholder. I holder her up with her legs out behind and her arms out to the side. She tells me where to go as we fly around the house.<br /><br />Recently I changed it so she has to say Left or Right. As soon as she says a direction, we go that way. Even if she is pointing the other way. After doing this a few time, she was pointing the same direction she was saying. It worked out well and we had fun doing it.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1689656926596257491?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-76683833445232485792009-03-16T13:31:00.000-05:002009-03-16T13:33:07.042-05:00W32.Downadup.C is in the wild. It looks like Conflicker is starting to evolve.It recently received a new set of instructions that are designed more to protect it then to make it spread any more. It is continuing to attack antivirus software that is used to clean it up. Just as the security industry has gotten into its system of communicating with its self, the virus has gotten a new algorithm that makes it 200 times harder. <br /><br />This cat and mouse game is about to get interesting. We have yet to see a payload from this virus. There is no question that the attack has changed at this point. Without using any new attack to build a larger infection base, it has to hold what it has already. You don’t fight that hard to keep a system infected unless you have a plan for it later.<br /><br /><a href="https://forums2.symantec.com/t5/Malicious-Code/W32-Downadup-C-Digs-in-Deeper/ba-p/393245%3bjsessionid=1A353B585C96A581ECB9D3536C31ADCB">https://forums2.symantec.com/t5/Malicious-Code/W32-Downadup-C-Digs-in-Deeper/ba-p/393245%3bjsessionid=1A353B585C96A581ECB9D3536C31ADCB</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-7668383344523248579?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-53698793957841252412009-03-16T07:47:00.001-05:002009-03-16T07:47:01.418-05:00VB Dates and DBNull.Value SQLOne think I find that I have to look up often is how to work with database dates in vb.net code. I can never remember the best way to do it and end up looking at older code all the time to do it.<br /><br />Dates are not <span class="blsp-spelling-corrected" id="SPELLING_ERROR_0">usually</span> the problem as much as empty dates. Moving an empty date from vb to <span class="blsp-spelling-error" id="SPELLING_ERROR_1">SQL</span> and back again. I <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">don't</span> expect my solution to be the best solutions. <span class="blsp-spelling-corrected" id="SPELLING_ERROR_3">Personally</span> I feel its too complicated so there had to be a better solution that I just have not found yet. With that said, here is how I handle null dates in vb.net.<br /><br />I don't like working with null values when crossing between applications and code. Mostly <span class="blsp-spelling-corrected" id="SPELLING_ERROR_4">because</span> a blank value can serve the same purpose with less code. Dates are the one place I can't use a blank value and it must be null. I will show the use of both strings and dates so you can easily see how they differ.<br /><br />Here is how I grab values from a <span class="blsp-spelling-error" id="SPELLING_ERROR_5">DataRow</span> object called row:<br /><br />dim name as string = row("Name").<span class="blsp-spelling-error" id="SPELLING_ERROR_6">ToString</span>()<br />dim DOB as <span class="blsp-spelling-error" id="SPELLING_ERROR_7">Nullable</span>(Of <span class="blsp-spelling-error" id="SPELLING_ERROR_8">DateTime</span>) = row.Field(Of <span class="blsp-spelling-error" id="SPELLING_ERROR_9">Nullable</span>(Of <span class="blsp-spelling-error" id="SPELLING_ERROR_10">DateTime</span>))("DOB")<br /><br />My use of <span class="blsp-spelling-error" id="SPELLING_ERROR_11">ToString</span>() is a quick way to convert <span class="blsp-spelling-error" id="SPELLING_ERROR_12">DBNull</span> strings into a empty string. I could store my date as a string and do the same thing, but there are times I want to keep it as a <span class="blsp-spelling-error" id="SPELLING_ERROR_13">datetime</span> object. I could use a plain <span class="blsp-spelling-error" id="SPELLING_ERROR_14">DateTime</span> and just check the value as I read it for <span class="blsp-spelling-error" id="SPELLING_ERROR_15">DBNull</span> and adjust to that. Or I can use a <span class="blsp-spelling-error" id="SPELLING_ERROR_16">Nullable</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_17">DateTime</span> object to do the same thing for me.<br /><br />When I am saving the values, I do check for values when I add them as Parameters. Here is how that code looks like:<br /><br /><br />Dim command As New <span class="blsp-spelling-error" id="SPELLING_ERROR_18">SqlClient</span>.<span class="blsp-spelling-error" id="SPELLING_ERROR_19">SqlCommand</span>()<br /><br />command.Parameters.AddWithValue("@Name", Name)<br />If DOB Is Nothing Then<br />command.Parameters.AddWithValue("@DOB", <span class="blsp-spelling-error" id="SPELLING_ERROR_20">DBNull</span>.Value)<br />Else<br />command.Parameters.AddWithValue("@DOB", DOB)<br />End If<br /><br />One other thing that you need to watch is using <span class="blsp-spelling-error" id="SPELLING_ERROR_21">DBNull</span> values in a where statement. By default <strong>NULL=NULL </strong>is false. You have to check for <strong>IS NULL </strong>instead. If you want more details on why that is look up ANSI_NULLS. I mention this because its very common to want to use a parameter in a WHERE statement. If you <span class="blsp-spelling-corrected" id="SPELLING_ERROR_22">don't</span> craft it correctly, you will not get the results you expect when the value is NULL.<br /><br />In your mind you expect this to work:<br /><br />SELECT * FROM people WHERE DOB = @DOB<br /><br />You want to use a <span class="blsp-spelling-error" id="SPELLING_ERROR_23">DBNULL</span> to find all the people without a DOB but it will return 0 records. I bet you could mess with the ANSI_NULL option or change the query to this:<br /><br />SELECT * FROM people WHERE (DOB = @DOB OR (@DOB IS NULL AND DOB IS NULL))<br /><br />This will do the normal check on the <span class="blsp-spelling-error" id="SPELLING_ERROR_24">param</span>, but will also check to see if both are null. I know I am doing <span class="blsp-spelling-error" id="SPELLING_ERROR_25">a lot</span> of extra work someplace, but this does work for me. Turning off the ANSI_NULL option will make the first query work, but I have not looked into it <span class="blsp-spelling-corrected" id="SPELLING_ERROR_26">enough</span> to know if it has any <span class="blsp-spelling-corrected" id="SPELLING_ERROR_27">negative</span> effects.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-5369879395784125241?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-76120882010730319672009-03-11T17:29:00.003-05:002009-03-11T17:57:01.344-05:00New transaction cannot enlist in the specified transaction coordinatorI was tying to set up a special feature in the software I work with that involved linked servers. This was test setup so I configured some SQL servers I already had set up and ran into this error.<br /><br /><strong>[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]<br />OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].<br />Msg 7391, Level 16, State 1, Line 2<br />The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.</strong><br /><br />The only message the application gave me was the first line but I uncovered a sql command that let me test it without the overhead of running my application. Here is that command:<br /><br /><br /><strong>BEGIN DISTRIBUTED TRANSACTION<br />select * from linkname.databasename.dbo.tablename<br />COMMIT TRAN</strong><br /><br />I was able to get the inner command to run on its own. As a distributed transaction, it would fail every time.<br /><br />I eventualy found this KB from microsoft to get me in the right direction. <a href="http://support.microsoft.com/kb/839279">http://support.microsoft.com/kb/839279</a><br /><br /><a href="http://support.microsoft.com/kb/839279">You may receive a 7391 error message in SQL Server 2000 when you run a distributed transaction against a linked server after you install Windows Server 2003 or Windows XP Service Pack 2</a><br /><br />It turned out to be a settings issue with the Microsoft Distributed Transation Cordinator (<strong>MS DTC</strong>). I had no idea what that realy was. It turns out MS DTC should be enabled when SQL is installed but by default its locked down (or is with 2003/xp sp2).<br /><br />I used <strong>dcomcnfg</strong> to get to the component services. Console Root -> Component Services -> Computers -> My computer -> Properties . On the Default properties <strong>enable distributed COM</strong> on the computer. Under MSDTC -> Security Configuration check the option for <strong>Network DTC Access</strong>.<br /><br />I did make those changes on both servers, I don't know if that was needed or not. I did the linked server last and it worked as soon as I applied the changes. I know those were the exact changes I made on the 2nd server. The first one prabably has every thing checked or opened up trying to figure it out.<br /><br />Other thing you may try if having issues it to make sure the Distributed Transaction Coordinator is running as <strong>network service</strong> and not local system. Reinstalling it as a service and <strong>rebooting</strong> were a few other tips I read while trouble shooting this problem.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-7612088201073031967?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-89985725325588069012009-02-12T08:56:00.001-06:002009-02-12T08:56:00.949-06:00Single Level Active Directory DomainIf you are considering giving your Active Directory name just a single level name, <strong>don't do it.</strong> Just stop and pick a new name. If your already stuck with a single level AD domain, I feel your pain. I see the warning now when I try to fix my problems after the fact.<br /><br /><strong>So whats the big deal?</strong> Windows <span class="blsp-spelling-error" id="SPELLING_ERROR_0">XP</span> and Server 2003 do not update <span style="BACKGROUND-COLOR: #ffff00">DNS</span> records to a single level domain. They also have issues joining a domain cross <span class="blsp-spelling-error" id="SPELLING_ERROR_2">subnet</span>. Our <span class="blsp-spelling-corrected" id="SPELLING_ERROR_3">biggest</span> problems show up when dealing with more then one <span class="blsp-spelling-error" id="SPELLING_ERROR_4">subnet</span>. <br /><br />The main problem is that <span class="blsp-spelling-error" id="SPELLING_ERROR_5">DNS</span> will be missing records. <strong>Domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_6">controllers</span> have lots of integration with <span class="blsp-spelling-error" id="SPELLING_ERROR_7">DNS</span></strong>. So if one of those is not updating its <span class="blsp-spelling-error" id="SPELLING_ERROR_8">DNS</span> records, you have a huge mess. Domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_9">controllers</span> failing to replicate was our big issue. Every time we added a domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_10">controller</span>, we ended up rebuilding the <span style="BACKGROUND-COLOR: #ffff00">DNS</span> records by hand. Adding the new server keys where needed. Most of the time replication would work one way but not the other. Fixing <span class="blsp-spelling-error" id="SPELLING_ERROR_12">DNS</span> fixed replication.<br /><br />Over time I have uncovered more documentation and most importantly this registry key:<br />[<span class="blsp-spelling-error" id="SPELLING_ERROR_13">HKEY</span>_LOCAL_MACHINE\SYSTEM\<span class="blsp-spelling-error" id="SPELLING_ERROR_14">CurrentControlSet</span>\Services\<span class="blsp-spelling-error" id="SPELLING_ERROR_15">Dnscache</span>\Parameters]"<span class="blsp-spelling-error" id="SPELLING_ERROR_16">UpdateTopLevelDomainZones</span>"=<span class="blsp-spelling-error" id="SPELLING_ERROR_17">dword</span>:00000001<br /><br />I run this on every server just to make sure. Once you run this, you will have to reboot the server so the <span class="blsp-spelling-error" id="SPELLING_ERROR_18">netlogon</span> process can register the <span class="blsp-spelling-error" id="SPELLING_ERROR_19">DNS</span>.<br /><br />You can run this on your workstations if you want them in your DNS too. we opted not to for most of ours.<br /><br />I <span class="blsp-spelling-corrected" id="SPELLING_ERROR_21">believe</span> there is now <span class="blsp-spelling-error" id="SPELLING_ERROR_22">a group</span> policy setting that sets the same value. But I do not recall where it is. If I find it, I will update this post.<br /><br />The second big issue we ran into was we <strong>could not join the domain from the other <span class="blsp-spelling-error" id="SPELLING_ERROR_23">subnets</span></strong>. In <span class="blsp-spelling-error" id="SPELLING_ERROR_24">XP</span> and 2003, Microsoft changed them to use <span class="blsp-spelling-error" id="SPELLING_ERROR_25">DNS </span>more. The computer could see the domain and tell you that it exists. It would even point out that the <span class="blsp-spelling-error" id="SPELLING_ERROR_26">SRV</span> records in <span class="blsp-spelling-error" id="SPELLING_ERROR_27">DNS </span>are correct. But it would fail to join. At some point in the process it sees the single level domain name and used <span class="blsp-spelling-error" id="SPELLING_ERROR_28">netbios</span> instead of <span class="blsp-spelling-error" id="SPELLING_ERROR_29">DNS</span>. It would work fine if on the same <span class="blsp-spelling-error" id="SPELLING_ERROR_30">subnet</span>, but with out a wins server or <span class="blsp-spelling-error" id="SPELLING_ERROR_31">lmhost</span> file it would fail. <br /><br />For the longest time, we used a <strong><span class="blsp-spelling-error" id="SPELLING_ERROR_32">lmhost</span></strong> file to point to the domain. We built it into the default ghost image and it worked great. Then came the <span class="blsp-spelling-corrected" id="SPELLING_ERROR_33">network</span> restructure that ended up changing our <span class="blsp-spelling-error" id="SPELLING_ERROR_34">IP</span> range. Evey one of those file we used in the last several years had to be updated. The symptom was a 10 min <span class="blsp-spelling-error" id="SPELLING_ERROR_35">login</span> on those computers for existing users on the computer.<br /><br />Here is a sample of what we put in the <span class="blsp-spelling-error" id="SPELLING_ERROR_36">lmhost</span> file<br /><br />10.0.0.1 <span class="blsp-spelling-error" id="SPELLING_ERROR_37">servername</span>1 #<span class="blsp-spelling-error" id="SPELLING_ERROR_38">PRE</span> #DOM:<span class="blsp-spelling-error" id="SPELLING_ERROR_39">doaminname</span><br />10.0.0.2 <span class="blsp-spelling-error" id="SPELLING_ERROR_40">servername</span>2 #<span class="blsp-spelling-error" id="SPELLING_ERROR_41">PRE</span> #DOM:<span class="blsp-spelling-error" id="SPELLING_ERROR_42">domainname</span><br />10.0.0.1 "<span class="blsp-spelling-error" id="SPELLING_ERROR_43">domainname</span> \0x1b" #<span class="blsp-spelling-error" id="SPELLING_ERROR_44">PRE</span><br />10.0.0.2 "<span class="blsp-spelling-error" id="SPELLING_ERROR_45">domainname</span> \0x1b" #<span class="blsp-spelling-error" id="SPELLING_ERROR_46">PRE</span><br /><br />Inside the quotes on the bottom line must be <strong>exactly 20 characters</strong> or it won't work.After saving the changes to the <span class="blsp-spelling-error" id="SPELLING_ERROR_47">LMHOSTS</span> file you have to enable <span class="blsp-spelling-error" id="SPELLING_ERROR_48">NetBIOS</span> over <span class="blsp-spelling-error" id="SPELLING_ERROR_49">TCP</span>/<span class="blsp-spelling-error" id="SPELLING_ERROR_50">IP</span> and import <span class="blsp-spelling-error" id="SPELLING_ERROR_51">theLMHOSTS</span> file.<br /><br />The correct way to do this would be to set up a wins server. One experiment that I tried was to put one of the <strong>domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_52">controllers</span> address as the wins server and it solved our import issue</strong>. The only thing we needed a wins server for was to join computers to the domain on a different <span class="blsp-spelling-error" id="SPELLING_ERROR_53">subnet</span>. By telling the computer that the domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_54">controller</span> is the wins server, it was able to find it and import just fine.<br /><br />So our work <span class="blsp-spelling-corrected" id="SPELLING_ERROR_55">around</span> was to run a registry hack on every server so they update <span class="blsp-spelling-error" id="SPELLING_ERROR_56">DNS </span>and to put in a fake wins server address that points to our domain <span class="blsp-spelling-corrected" id="SPELLING_ERROR_57">controller</span> for workstation importing.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-8998572532558806901?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-35489796780150147112009-02-08T20:40:00.001-06:002009-02-08T20:40:00.886-06:00Ventrilo - Ranks and Mute/Queue OptionsThere are lots of reasons you may or may not want to give users their own accounts on your vent server. I use it to give me more control over a large group. Let me give you an example.<br /><br /><br /><br />I play alot of World of Warcraft and our raid groups have 25 members. A few need to be able to talk all the time while others just talk all the time and don't stop. If you get alot of people telling everyone how to do something their special way, it just makes it more complicated for everyone else.<br /><br /><br /><br />So I have a raid channel set up that mutes all guests to that channel. All guild members have an account so they can talk. New and random people to the group we keep silent. We want them to listen to our method. If they have a sugestion, they can send it silently to a raid leader in game to relay to the group. This option is in the channel options under "Disable Guest Account Transmitting". Checking this will keep all guests from broadcasting in that channel.<br /><br /><br /><br />Another thing you can do is give each member a rank and mute low ranked members in a channel. I experimented with this but it does not work as smooth as I would like it to work. Im taling about the voice mode on the channel. The default option is normal that allows all ranks to talk. The other 2 options are Queued and Muted. The each act a little different but will keep ranks under a set level from broadcasting.<br /><br /><br /><br />Queued: This one will mute everyone else while someone is talking. So only one person can broadcast at a time. It uses the Transmit Rank Level to only allow set ranks to broadcast at all. The person that gets the mic keeps it until he stops broadcasting. Once he stops, the next new broadcast gets it. The catch is if someone starts to broadcast just before they last person has released his mic, they will stay muted. I don't like this setting because someone could think they are eaying something important, but because they never got the green light it never broadcasted. I feel like I have to watch vent on a 2nd monitor to use this. The exception here is if you only have one person that will ever talk in this setting. You can adjust this setting on the fly.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-3548979678015014711?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-54641668420791350752009-02-02T20:24:00.002-06:002009-02-02T20:40:25.144-06:00Ventrilo - How to connect?Ventrilo is a very popular voice chat program. It is used with many games to cordinate the actions of many players at once. The first step to using Vent is to get connected.<br /><br />First step is to create a user name. This is the name that everyone will see when you connect. You can create a phonetic for it so it will announce when you join or leave the channel to everyone there (that have not turned that annoying feature off). Be respectfull with that because it follows you from server to server and its easy to forget you have one set up.<br /><br />If its a new connection, you will need to add the server before you can connect to it. You will usualy be provided a server/port/password to enter. If they do not provide a password, you prabably do not need one. <br /><br />The server can be a port or an IP address. It can look like guild.typefrag.com or 10.120.34.4. You may see the port number attached to the server name with a colin. If the port number is 12345 its possible it can look like this; guild.typefrag.com:12345 or 10.120.34.4:12345. If you are not given a port number, look closer at the sever name.<br /><br />Once you add the server you can click connect. If everything is correct, you should find yourself in the root channel. From here you can double click on a channel to join it.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-5464166842079135075?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-16921197477765643362009-01-14T12:22:00.004-06:002009-01-14T12:27:49.733-06:00Ventrilo Guide on its wayI am doing alot of work with Ventrilo and finding the information available on the features I wan't to use either don't exist or are hard to find. It's my plan to document some of these things to make it easier for others.<br /><br />For now check out this guide: <a href="http://www.trap17.com/forums/Ventrilo-Gamers-Friends-t61530.html">http://www.trap17.com/forums/Ventrilo-Gamers-Friends-t61530.html</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1692119747776564336?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-8233461922726896102008-12-02T09:40:00.003-06:002008-12-02T10:51:13.499-06:00KTT: Damage Meter AoC Combat Log ProcessingI wrote little mod to track damage stats for Age of Conan when I first started playing it. There was another damage meter at the time, but it didn't have the look and feel that I wanted. Over time I added more and more features and started several others. In the end I <span class="blsp-spelling-error" id="SPELLING_ERROR_0">stoped</span> playing Age of Conan and <span class="blsp-spelling-error" id="SPELLING_ERROR_1">stoped</span> maintaining the mod.<br /><br />My core features were stable on my last release and I have <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">watched</span> it from a distance as people continue to download it. I can't it does not have bugs and many of my newer features are more proof of concept that show what can be done. <br /><br /><strong>How did I gather <span class="blsp-spelling-error" id="SPELLING_ERROR_3">dps</span> stats?</strong><br />The first big roadblock was the fact that Age of Conan did not have true mod support. It did however have a feature I could use to my advantage. <span class="blsp-spelling-error" id="SPELLING_ERROR_4">AoC</span> would generate a plain text file in <span class="blsp-spelling-error" id="SPELLING_ERROR_5">realtime</span> that contained the combat log. Every attack, heal, buff, <span class="blsp-spelling-error" id="SPELLING_ERROR_6">debuff</span>, and <span class="blsp-spelling-error" id="SPELLING_ERROR_7">xp</span> gain was recorded in that file. That one feature gave me a world of options and features that could be implemented.<br /><br /><strong>Getting the correct file:</strong><br />The log file was located in a <span class="blsp-spelling-corrected" id="SPELLING_ERROR_8">sub folder</span> within the <span class="blsp-spelling-error" id="SPELLING_ERROR_9">AoC</span> directory. During install, a registry key is set to the install path of <span class="blsp-spelling-error" id="SPELLING_ERROR_10">AoC</span>. The logs were named in such a way that an alpha sort would get me to the correct <span class="blsp-spelling-error" id="SPELLING_ERROR_11">ime</span>. On first scan of the directory, I grab the logical file and set a marker to the end of it. I start at the end of the file to exclude old stats. I assume that starting <span class="blsp-spelling-error" id="SPELLING_ERROR_12">KTT</span> is when stat collection should start. <br /><br />I also add a watch on the folder for new files getting created. There are times when <span class="blsp-spelling-error" id="SPELLING_ERROR_13">KTT</span> will be running already before the <span class="blsp-spelling-error" id="SPELLING_ERROR_14">logfile</span> gets created. If I did not watch for new files it would be stuck on the old one and never collect any stats.<br /><br /><strong>Processing the log:</strong><br />Twice a second I reopen that file. From the marker to the end of the file, I add every plain text line into a queue. The marker is updated with the end of file and the file is closed. I had to open the file in a read only non locking stream so it did not cause issues with <span class="blsp-spelling-error" id="SPELLING_ERROR_15">AoC</span> <span class="blsp-spelling-corrected" id="SPELLING_ERROR_16">writing</span> to that same file. I used the queue so I could collect the data as fast as possible and get that file closed as fast as possible.<br /><br />I would then work that queue with regular <span class="blsp-spelling-corrected" id="SPELLING_ERROR_17">expression</span> to pull out the various values and actions. I ended up with a fairly complicated <span class="blsp-spelling-error" id="SPELLING_ERROR_18">regex</span> query that did most of the work for me. I found 4 distinct sentence structures that indicate source, target, action, and a value. <span class="blsp-spelling-error" id="SPELLING_ERROR_19">AoC</span> made the combat log in sentences that were proper <span class="blsp-spelling-corrected" id="SPELLING_ERROR_20">English</span> that even reflected 2<span class="blsp-spelling-error" id="SPELLING_ERROR_21">nd</span> person when needed. While it sounds nice when read out loud, it creates <span class="blsp-spelling-error" id="SPELLING_ERROR_22">a lot</span> more work when <span class="blsp-spelling-corrected" id="SPELLING_ERROR_23">writing</span> a parser. So the <span class="blsp-spelling-error" id="SPELLING_ERROR_24">regex</span> ended up to be 4 page widths long but I didn't have to post process any of the values.<br /><br />Once each line was processed into an action object, it was then placed on another queue. I used a queue her so I could multi thread the log reading/parsing away from the rest of the application. As I work this queue I would pass the object off to the <span class="blsp-spelling-error" id="SPELLING_ERROR_25">plugin</span> framework. The damage meter <span class="blsp-spelling-error" id="SPELLING_ERROR_26">plugin</span> would flatten that stats as it received them. When calculating total damage, I just add the damage on the fly so the reporting side can just report the <span class="blsp-spelling-error" id="SPELLING_ERROR_27">precalculated</span> total. (vs summing the damage every time I want to report it). I did this for any stat that I could think of.<br /><br />Because I <span class="blsp-spelling-corrected" id="SPELLING_ERROR_28">compressed</span> the stats like this, I could keep the queue clear of actions. The point of this is my memory <span class="blsp-spelling-corrected" id="SPELLING_ERROR_29">usage</span> is only as wide as the number of stats I'm recording and not as large as the log file. During a large raid, the log file can grow to very large sizes very quickly. While <span class="blsp-spelling-error" id="SPELLING_ERROR_30">KTT</span> will jump in size very quickly as it sees a stat for the first time, as that stat is repeated over and over many times in the log, it will not take much <span class="blsp-spelling-corrected" id="SPELLING_ERROR_31">additional</span> memory.<br /><br /><strong>In closing:</strong><br />I may do little write ups on other features of my mod (or its potential) later. I wrote this for other mod writers. To show them that with very simple things and ideas you can do some very cool things. While I may not have described the best way to do something, it still worked very well for me. The mod is listed as <a href="http://aoc.curse.com/downloads/aoc-addons/details/kevmartoolkit.aspx"><span class="blsp-spelling-error" id="SPELLING_ERROR_32">KTT</span> Damage Meter, <span class="blsp-spelling-error" id="SPELLING_ERROR_33">KoS</span>, Timers, &amp; Sounds</a> over at curse.com.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-823346192272689610?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-83431104739216512222008-11-17T10:14:00.006-06:002008-11-17T10:48:24.184-06:00Antivirus 2009 Protection Scam pro-scan-online<strong>Antivirus 2009 Protection Scam</strong><br /><br /><br /><img id="BLOGGER_PHOTO_ID_5269666611457955010" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_qSwZBmiV5rY/SSGd3PywFMI/AAAAAAAAACs/PDzb7WqJh_s/s320/popup.JPG" border="0" /><br /><br />I was on my work machine and I received this pop up warning me about spyware. This kind of shocked me because the sites I visit at work are few and are work related. Not the type of sites that usualy have this type of advertising. Now that I think about it, I may know the site. If I am right, its a 3rd party add doing it so any site you trust could be doing it.<br /><br /><br /><img id="BLOGGER_PHOTO_ID_5269667210426683442" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 311px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_qSwZBmiV5rY/SSGeaHIBkDI/AAAAAAAAAC0/IcZt_4qpLhY/s400/FalseReport.PNG" border="0" /><br />I run several monitors and could see a session of IE running as small as it possibly could off to the right. A place that would be off screen for most people. Once I closed the pop up message, I saw it open a full window page that did a fake scan of my system. It indicated that several errors were found and even gave the names of a few viruses. As an IT security professional, I know how to keep my system clean and knew the report that it gave me was staged and false.<br /><br /><br /><br /><br /><br /><img id="BLOGGER_PHOTO_ID_5269667688487278082" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 324px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_qSwZBmiV5rY/SSGe18CjVgI/AAAAAAAAAC8/Qs11XfOlLeI/s400/home.JPG" border="0" /><br /><br />Clicking anywhere within the window (like the fake red X or cancel button) started downloading a file. On older web browsers it prabably would have just ran the program, but my version of IE gave me the option. You can either save it or run it. I pray that none of you ran it. Don't even save it. Your best bet is to close IE and end your session. Then log off or reboot.<br /><br />I did not get infected by it, but I can easily see how the average person would. I work in IT and have a good eye for stuff like this. I also know the average user and this prays on them. I also know several people that have gotten trapped by this. I included some screen shots from the site and a few links where people were talking about it.<br /><br />The URL for me was pro-scan-online.com but with a scam like this, I expect them to have lots of different sites set up. The file name was A9installertest_77024202.exe.<br /><br /><br /><p>Here are some other people running into this same thing:</p><p><a href="http://forums.vnunet.com/thread.jspa?threadID=146114">http://forums.vnunet.com/thread.jspa?threadID=146114</a></p><p><a href="http://forum.joomla.org/viewtopic.php?f=267&amp;p=1484262">http://forum.joomla.org/viewtopic.php?f=267&amp;p=1484262</a></p><p><a href="http://loscompanion.com/forums/index.php?topic=5473.0">http://loscompanion.com/forums/index.php?topic=5473.0</a></p><p>From reading a bit, its called the A9 Installer virus. I think its more crapware than a virus, either way avoid it.</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-8343110473921651222?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com7tag:blogger.com,1999:blog-8683693.post-13956922341657163952008-04-13T17:05:00.004-05:002008-04-17T07:03:23.116-05:00Windows cannot install required files. Make sure all files required for installation are available, and restart the installation. Error code: 0x800703I just built a new computer and ran into some issues installing Microsoft Windows Vista. I was getting this message: <strong>“Windows cannot install required files. Make sure all files required for installation are available, and restart the installation. Error code: 0x800703E6”</strong>. I would get past all the install windows and even copy all the files. It was the expanding files part that would fail.<br /><br />My first guess was to remove a stick of ram. I have heard that before and I was at 4G with the 2 sticks. That did not help this time. I ran the memory tests and everything was ok. I left that second stick out while doing the rest of my tests.<br /><br />I looked for the error code and I found a KB article (<a href="http://support.microsoft.com/kb/930984/en-us">KB930984</a>) that described my exact problem. It indicated that my firmware on my DVD drive was causing the issue. Either update the firmware or copy the files to the disk. I copied all the files to my C: and rebooted. I let it boot from the hard drive and ran into the same issue. I saw another site suggest that the DVD drive needed to be the slave on the IDE cable. Changing the jumper didn’t fix that either. I disconnected the DVD drive and the installer required that I had one.<br /><br />I thought that was odd. I had an old DVD drive that windows would see but could not see any disk inserted. I set it up and started the install over. It still complained about the DVD drive. After placing a copy of all the files and the main disk and booting from it, the install would still look for the install files on the DVD. I still had the install disk in the drive during some of my tests. That would explain me still getting the error when I thought I had ruled the DVD drive out.<br /><br />After some more searching, I found the solution. <a href="http://11011.net/archives/000673.html">Installing Vista from Hard Disk, USB Disk or Memory Stick</a>. I selected the repair option instead of install after reading that. Ignored the drive selection and started the command prompt. I ran the fallowing commands:<br /><br /><code><br />c:<br />cd /boot<br />del bcd<br />bcdedit /createstore<br />cd ../sources<br />setup<br /></code><br /><br />The install went smooth after that. After the install finished, I reformated and installed Vista 64 bit. I was using my 32 bit disk because its a known good one. I was having issues so I wanted to eliminate variables as much as I could.<br /><br />I copied all the CD files to the C: again but it failed to boot. I booted to the DVD but droped to a command line and ran the install off the hard disk. I did not have any other issues with the rest of the install. I even did that last install with both sticks of ram.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1395692234165716395?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com2tag:blogger.com,1999:blog-8683693.post-21777483863329726092008-04-13T08:57:00.003-05:002008-04-13T09:09:16.658-05:00BIOSTAR TForce TP35D2-A7 with Intel Core 2 Duo E8400 requires bios updateTP35D2-A7 needs bios update before it can use an E8400. I just purchased this combo. I could not find any clear details if the CPU and motherboard would work together. Several user reviews on newegg.com and posts on some over clocking boards indicated they work with each other. When I powered up my machine for the first time I discovered they don't work out of the box. <br /><br /><a href="http://www.kqzyfj.com/click-2954071-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16819115037%26ATT%3D19-115-037%26CMP%3DAFC-C8Junction%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Processors-_-intel-_-19115037&cjsku=N82E16819115037">Intel Core 2 Duo E8400 Wolfdale 3.0GHz 6MB L2 Cache LGA 775 65W Dual-Core Processor</a><br /><br /><a href="http://www.kqzyfj.com/click-2954071-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16813138075&cjsku=N82E16813138075">BIOSTAR TForce TP35D2-A7 LGA 775 Intel P35 ATX Intel Motherboard</a><br /><br />The power supply would turn on, all my fans would spin up, and then they would all spin down. Power would recycle and it did the same thing over and over. I looked to the manual for the TP35D2-A7 and it indicated 2 LED status lights were on the board. Neither one lit up and that indicated unusual mother board or CPU issue. In the over clocking section of the manual it indicated the power would cycle like I was seeing when clock settings did not work with the CPU. <br /><br />I was reading on the <a href="http://www.biostar.com.tw/app/en-us/t-series/cpu_support.php?S_ID=286">Biostar page </a>and it does not list the E8400 as a supported processor. In the <a href="http://www.biostar.com.tw/app/en-us/support/faq.php?S_ID=375">FAQ</a> they had a question on <a href="http://www.biostar.com.tw/app/en-us/event/IntelAMDAM2/45nm.html">support for the 45nm processors </a>and it indicated a bios update was needed. I saw this before I made my purchase. When I ran into this issue, I expected that I needed to do a bios update. The catch is if you need a supported processor installed to update the bios. If this was my first build and all I had was the E8400, I would have been dead in the water. That was my situation.<br /><br />I work in an IT department so I took my computer in with me the next day. I used a processor from a work machine to get it to boot up and flashed the bios. I placed the E8400 back into the mother board and it booted up without issue.<br /><br />To sum it up, you will need a bios update for TP35D2-A7 if you are going to use an E8400 with it and you need a working processor to update the bios. I was using the E8400 but the same should hold true for the E8200.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-2177748386332972609?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-19614960837507893672008-03-29T15:07:00.003-05:002008-03-29T16:13:45.503-05:00Tortage: Age of Conan Database<a href="http://www.tortage.com">Tortage Age of Conan Database and Reference Site </a> is my next project. I am looking to build a item and quest database for <a href="http://www.ageofconan.com/">Age of Conan</a>. Age of Conan is a new MMORPG that will be released shortly. I was a <a href="http://www.worldofwarcraft.com">World of Warcraft</a> player and I used sites like that all the time.<br /><br />At this point the game does not support mods. Once they add that ability I believe I can write some data mining mods from inside the game that will automate the process. I bet I can data mine it from the back end, but its so much easier when the program makes the API calls available to you. The advantage the in game mod can provide is location tracking when they pick something up or complete a quest.<br /><br />Until the support for mods is available I will work on other related projects. One of my first ones is a talent calculator. Someone makes one for every game. This time it may as well be me.<br /><br />Work has already started. I have purchased the domain name <a href="http://www.tortage.com">tortage.com</a> and have a server up an going. A place holder page is in place so search engines can start indexing it. The server is a low end Linux box at the moment. When it starts to generate traffic, I plan to find a good host. I would rather save the cost of hosting it for now.<br /><br />Some of you are asking why the name <a href="http://www.tortage.com">Tortage</a>. <a href="http://www.tortage.com">Tortage</a> is the starting are in Age of Conan. Your first 1-20 levels in AOC are spent in that area. It the place where you are introduced to the game and given the information you need to get started. That's the same idea behind the website.<br /><br />*DNS setting are still getting adjusted, so its possible the site will be dark for the next few days.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-1961496083750789367?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-74555450783338180012008-03-25T16:06:00.002-05:002008-03-25T16:19:40.389-05:00Internal error occurred on the report server. See the error log for more details. rsInternalError Get Online Help EXECUTE permission denied on objectI was working with SQL Server Reporting Services subscription and ran into this error:<br /><strong>An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help EXECUTE permission denied on object 'sp_verify_job_identifiers', database 'msdb', schema 'dbo'.</strong><br /><br />It looks like a permissions issue. After some searching on the error I found a post over at <a href="http://karimmohamed.spaces.live.com/blog/cns!81C4EE2B88262802!446.entry">Karim's Blog</a> with the solution. He provided the a script that adds execute permissions to several objects in the database. <br /><br />Here is his script:<br /><code><br />USE master<br />GO<br />GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO RSExecRole<br />GO<br />GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO RSExecRole<br />GO<br />GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO RSExecRole<br />GO<br />USE msdb<br />GO<br />-- Permissions for SQL Agent SP's<br />GRANT EXECUTE ON msdb.dbo.sp_help_category TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_add_category TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_add_job TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_help_job TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_delete_job TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_help_jobschedule TO RSExecRole<br />GO<br />GRANT EXECUTE ON msdb.dbo.sp_verify_job_identifiers TO RSExecRole<br />GO<br />GRANT SELECT ON msdb.dbo.sysjobs TO RSExecRole<br />GO<br />GRANT SELECT ON msdb.dbo.syscategories TO RSExecRole<br />GO<br /></code><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-7455545078333818001?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com2tag:blogger.com,1999:blog-8683693.post-59424488499578516102008-02-23T22:14:00.002-06:002008-02-23T23:02:26.508-06:00Custom RDP Solution Part 3 (RDX)Here is an update on my custom <span class="blsp-spelling-error" id="SPELLING_ERROR_0">rdp</span> solution.<br /><br />Initial testing only uncovered minor issues. After those were resolved we deployed it to a few of our users that connect to all of our terminal servers. I am using it when I <span class="blsp-spelling-error" id="SPELLING_ERROR_1">VPN</span> into my work machine. Several high <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">traffic</span> machines were secretly changed over. Not only was the change over smooth, the users had no issues with it.<br /><br />We are ready for production. As we rebuild or deploy new machines, my new client goes out with them. Once I have about 10% deployment <span class="blsp-spelling-corrected" id="SPELLING_ERROR_3">penetration</span>, I plan on pushing it out domain wide with group policy.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-5942448849957851610?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-78438537877475516932008-01-24T00:38:00.001-06:002008-01-24T00:38:14.065-06:00Tweaking Vista<p>I recently made the jump to Vista. I feel like I now have it tweaked and performing reasonably well.&#160; I can sit here and type to the sound of my keyboard keys and not to the grinding of my hard drive.&#160; Vista spent a lot of recourses just being vista and not doing anything useful.&#160; </p> <p>&#160;</p> <p>I like to pull up task manager and see that CPU usage dance between 0% and 2% as I type this.&#160; I have a little blog authoring tool open and IE displaying my last search behind me.&#160; I also trimmed the memory usage down, but I cant get it anyplace close to XP or server 2003.&#160; </p> <p><a href="http://lh4.google.com/kevmar/R5gySBpP2oI/AAAAAAAAABY/yfsbhxZ4CYU/taskmanager%5B14%5D"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="taskmanager" src="http://lh6.google.com/kevmar/R5gyShpP2pI/AAAAAAAAABk/MRPr8rjUvH8/taskmanager_thumb%5B12%5D" width="321" border="0" /></a> </p> <p>&#160;</p> <p>Most of my tweaking was done by disabling services to features that don't add any value.&#160; I have disabled everything possible that does not impact my use of Vista.&#160; I have some things enabled that I would remove if I did not VPN regularly.&#160; Here is my list of running services that I felt are required for a stable functioning computer.</p> <p>&#160;</p> <p><a href="http://lh3.google.com/kevmar/R5gyUxpP2qI/AAAAAAAAABs/fE7qMibefEM/Services%5B7%5D"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="357" alt="Services" src="http://lh5.google.com/kevmar/R5gyVRpP2rI/AAAAAAAAAB0/w7W_Zk39KHU/Services_thumb%5B5%5D" width="569" border="0" /></a></p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-7843853787747551693?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com0tag:blogger.com,1999:blog-8683693.post-82451077902484300262008-01-16T21:52:00.000-06:002008-01-17T13:06:11.256-06:00get Outlook 2007 work with Lotus Domino server using DAMOAt my place of work the email system is lotus notes. The lotus domino server was set up with fairly open access for the longest time. We could use any client we wanted if we knew how to configure it. A while ago they took steps to secure it and closed off POP3 and <span class="blsp-spelling-error" id="SPELLING_ERROR_0">IMAPI</span> access.<br /><br />That left us with having to use only Lotus Notes. For Outlook 2003 I was able to use <a href="http://www.microsoft.com/Downloads/details.aspx?FamilyID=8ebbba59-5f17-4e52-8980-c4f0dfa92d65&amp;displaylang=en">Outlook 2003/2002 Add-in: Notes Connector</a> from Microsoft. When Outlook 2007 was released, Microsoft never updated that <span class="blsp-spelling-error" id="SPELLING_ERROR_2">addon</span>. IBM also did the exact same thing. The IBM <span class="blsp-spelling-error" id="SPELLING_ERROR_3">addon</span> is called <a href="http://www.ibm.com/developerworks/lotus/library/damo/">Domino Access for Microsoft Outlook</a> . After some digging, I was able to get the IBM <span class="blsp-spelling-error" id="SPELLING_ERROR_4">DAMO</span> connector to work with Outlook 2007.<br /><br />The first question is <strong>where do I find or download the <span class="blsp-spelling-error" id="SPELLING_ERROR_5">DAMO</span>?</strong> The simple answer is that you get it from your server administrator. You cannot download it as an individual component. You have to install a copy of the Lotus Domino server to get the <span class="blsp-spelling-error" id="SPELLING_ERROR_6">DAMO</span> installer. I have no clue why IBM does not provide it as a standalone download. I also do not see it hosted anyplace else. I am reluctant to host it myself because of that.<br /><br />So <strong>to get your hands on it</strong> yourself you will have to download a trial copy of Lotus Domino 8 (or whatever the current trial is) from the <a href="http://www.ibm.com/developerworks/lotus/downloads/">Lotus downloads page</a>. This does require registration, but its fairly painless. When you do the install, you can deselect everything except <span class="blsp-spelling-error" id="SPELLING_ERROR_7">DAMO</span>. I somehow lost the <span class="blsp-spelling-error" id="SPELLING_ERROR_8">DAMO</span> installer when I tried it, but was able to do a computer search to find it.<br /><br /><strong><a href="http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllWithExcerptweb/6cc03a0bb49ea3f8852573140050eda7?OpenDocument">Once you do the install</a></strong>, you must add the install location (%<strong>ProgramFiles%\DominoForOutlook</strong>) to your Path variable in environmental variables. Make sure that all other lotus locations in that path variable are after the one you just added. I did see a registry key to check. Mine was set to the correct value by default.<br />computer\hkey_current_user\software\microsoft\office\outlook\addins\inotesoutlookaddin.addin<br />Change LoadBehavior to 3.<br /><br />The next issue you will run into is <strong>missing emails or messages</strong> that don't replicate into outlook. By default, you will only see the last 90 days of messages and will be limited to 200M of email. In the Outlook tools -> options -> Domino Preferences you will find a replication section. Bump it up to 365 days and 1600M. Then close out of Outlook and reopen it. Once it finishes replication, go back in and lower the number of days in those options. If you leave the number at 1 year <span class="blsp-spelling-corrected" id="SPELLING_ERROR_9">replication</span> will be slower day to day.<br /><br />So far it has worked very well. I am still looking into an issue where a message with a corrupt message body does not show up in Outlook but does in Lotus.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8683693-8245107790248430026?l=kevinmarquette.blogspot.com'/></div>KevMarhttp://www.blogger.com/profile/16389030891301082770noreply@blogger.com35