c#
Visual Studio - Disable PDB generation in release mode
by Geoff on Oct.18, 2011, under c#, Coding
Simple as the title reads, this is often overlooked.
PDB files contain the following:
- Public, private, and static function addresses
- Global variable names and addresses
- Parameter and local variable names and offsets where to find them on the stack
- Type data consisting of class, structure, and data definitions
- Frame Pointer Omission (FPO) data, which is the key to native stack walking on x86
- Source file names and their lines
If you are working collaboratively with your client, this data is very useful. If you aren't, this could give someone the keys to the castle when you do not obfuscate your code.
In Visual Studio 2005, Project Properties > Compile Tab > Advanced Compile Options > Goto Generate Debug Info (dropdown list) and select None
In Visual Studio 2008, Project Properties > Build Tab > Advanced > Output - Debug Info > none
Keep Coding!
MyGeneration - Code Generation and OR Mapping
by Geoff on Sep.07, 2011, under c#, Coding, SQL
I have adopted this tool at work for its code generation ability. It generated C# and SQL Stored Procedures that I needed for my latest update to our company software. It just works. Nothing fancy. No bells. No marketing. It just works.
You can download yours here.
Thanks!
Multi Tier Permission Problem?
by Geoff on Sep.06, 2011, under c#, Coding, Notes
I currently have a client application written in C# which uses the permissions of the logged on user to call C# services installed on another computer. Your typical Two Tier setup eh? When the application is started locally, the application connects to services without a problem. When the same application is started remotely, the application cannot create a session with the service.
What gives?
Puck's Ready Check
by Geoff on Feb.03, 2010, under BrotherHood, c#, Coding, epgp, Gaming, WoW
I have talked about the application known to BrotherHood members as PRC - Puck's Ready Check.
It simply consumes the XML data from the WowArmory. It presents itself in an XML file as well with a bit of XSL in order to make itself slightly more pretty than XML alone
How does it work?
Every twelve hours, an automated task requests the BrotherHood guild roster from the Armory. The scheduled task then trolls the list and requests from the Armory each member's raid achievements, their armor and their spec. BrotherHood uses EPGP for its looting system. Based on the GP formula, the Ready Check application produces a GP value for the gear of each member. A Gear Score, if you will, is produced.
I personally don't think gear scores tell you much about a player but that is all we have before we raid or group with any player.
Also based on the GP formula, each raid zone in the game has a maximum GP value because of the ilvl of the drops from that zone.
Puck's Ready Check then sorts the roster and the zones to show players where their possible next drop could come from based on their gear alone.
Contact me directly if you are interested in this for your guild.
Code: Infragistics and Sorting Ultrawebgrid
by Geoff on Dec.16, 2009, under c#, Coding, javascript, Personal
I know a lot of my subscribers are not coders. Nonetheless I would like to put this bit of code out there.
The sorting problem would occur if the grid was sorted normally. That is, you set the single column you wish to sort the grid on and use the following code client side:
var r_grid=igtbl_getGridById('< %=gridName.columnName%>');
r_grid.addSortColumn("gridName_c_0_0", true);
r_grid.sort();
The problem with this call is that the Ultrawebgrid does not retain the sorting order of the column. The Ultrawebgrid control will then flip the sorting order when the above is called client side.
This code is the fix:
var r_grid=igtbl_getGridById('< %=gridName.ClientID%>');
var sortColId = r_grid.Bands[0].getColumnFromKey("columnName").Id // ID of column to sort grid by
r_grid.Bands[0].getColumnFromKey("columnName").SortIndicator = 0; // Make it think it's unsorted
r_grid.sortColumn(sortColId, false);
if (r_grid.Bands[0].getColumnFromKey("columnName").SortIndicator = 0)
{
r_grid.addSortColumn("gridName_c_0_0", true);
r_grid.sort();
}
I hope it helps you like it did me.
