Posts
 
Reputation
Joined
Last Seen
Ranked #139
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
96% Quality Score
Upvotes Received
198
Posts with Upvotes
153
Upvoting Members
59
Downvotes Received
5
Posts with Downvotes
5
Downvoting Members
5
68 Commented Posts
~172.02K People Reached
About Me

I am a web developer that deals mostly in .NET and C#. My prior background was working in VB6 and VBA. I know my way around data and code, but I'll not pretend to know as much as I want to know.

Interests
Programming! Music and video games.
PC Specs
Dell Studio 17 laptop running Windows 7, plenty powerful enough for my needs.
Favorite Tags
vb.net x 110
c# x 36
xml x 18
mssql x 14
Member Avatar for Duki

I went out for a salad for lunch, came back with a stromboli. Hey, it happens. Washing it down with a nice, tasty Coke.

Member Avatar for Dani
22
17K
Member Avatar for zambetta

[CODE] List<int> list = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; Random random = new Random(); var sortedList = list.OrderBy(i => random.Next()).ToList(); foreach (int i in sortedList) Console.WriteLine(i); // split list into 2 var group1 = sortedList.Take(5); var group2 = sortedList.Skip(5).Take(5); Console.Read(); [/CODE]

Member Avatar for adajames
0
1K
Member Avatar for mikecole79

In VBA, there is/was an ActiveCell.Offset method, but it was more complicated than that. It would be ActiveCell.Offset(rowcount, columncount).Range("A1").Select. The "A1" was sort of like a grounding value, giving it the proper frame of reference. That may or may not be proper description for it, but I knew whenever I …

Member Avatar for jackflint
0
431
Member Avatar for elmbrook

[CODE] Type type = Type.GetType("WindowsFormsApplication1.Form2"); object obj = Activator.CreateInstance(type); (obj as Form).Show(); [/CODE]

Member Avatar for mohamed.a.salim.31
0
939
Member Avatar for jazz_vill

[QUOTE=jazz_vill;1120831]Ok here's my code: is there another way to improve this code? so I dont have to this routine in every letter?[/QUOTE] The ASCII values for A-Z are 65 to 90. You could loop over those integers to search for your characters. Easier still, you could create a string of …

Member Avatar for Reshma_2
0
2K
Member Avatar for Damon88

Does this proof of concept fit your needs? [CODE=C#] static void Main(string[] args) { string fileName = @"C:\Work\test.bmp"; string fileNameCopy = @"C:\Work\test2.bmp"; Byte[] buffer = File.ReadAllBytes(fileName); MemoryStream stream = new MemoryStream(buffer); try { File.Delete(fileName); Console.WriteLine("Original file deleted."); } catch { throw ; } Bitmap bitmap = (Bitmap)Bitmap.FromStream(stream); bitmap.Save(fileNameCopy); bitmap.Dispose(); stream.Dispose(); …

Member Avatar for dwimage
0
2K
Member Avatar for yobotiks

Here's a way of doing it. It involves creating a public function to update the list data in your main form, and creating a constructor overload in the second form to accept a parameter of the type of the main form. Then on a button click event on the second …

Member Avatar for ddanbe
0
2K
Member Avatar for mercury113

[CODE] Dim result As DialogResult = MessageBox.Show("Some text", "Some caption", MessageBoxButtons.OKCancel) If result = Windows.Forms.DialogResult.OK Then 'do something ElseIf result = Windows.Forms.DialogResult.Cancel Then 'do something else End If [/CODE]

Member Avatar for avtaars
0
220
Member Avatar for JamesGeddes

You should probably look at writing a web service. Create the service on your website, add a reference to it in your offline project (it will generate the proxy classes you need), and then you can interact with it. Here's a sample web service implementation: [CODE] using System.Collections.Generic; using System.IO; …

Member Avatar for softwareskill
0
765
Member Avatar for buffalo0

Here is a method to read it using LINQ to XML (System.Xml.Linq). This will create an IEnumerable(of T), where T is an anonymous type. [CODE] Sub Main() Dim xml As String = "<?xml version=""1.0"" encoding=""utf-8""?>" _ & "<pupil>" _ & "<name>Test Name</name>" _ & "<tagid>00000000000000000001</tagid>" _ & "</pupil>" Dim document …

Member Avatar for softwareskill
0
5K
Member Avatar for ncaatrackstar

You can use reflection to load an assembly at runtime. Consider this code compiled into Foo.dll [CODE] namespace Foo { public class Bar { public string Blah() { return "Blah"; } } } [/CODE] And then in another program [CODE] using System; using System.Reflection; class Program { static void Main(string[] …

Member Avatar for BhuvanRam
0
552
Member Avatar for mania_comp

This is the first I've heard of this, but stackoverflow says it happens when you use the publish utility within Visual Studio. I have no idea if that's true or not. [url]http://stackoverflow.com/questions/2148125/why-does-app-offline-htm-keep-appearing-in-my-web-project[/url] From a link off that link, there's also this blurb "SQL Server 2005 express edition does not support …

Member Avatar for anandd
0
2K
Member Avatar for ddanbe

I don't know how applicable this may be, but it's interesting nonetheless. Here's an article on using GDI+ and doing color transformations with a matrix of floats. [url]http://www.aspfree.com/c/a/C-Sharp/Performing-Color-Transformation-Operations-in-Csharp-GDIplus/[/url] I also don't know of any (other) methods to tweak colors besides, as you said, simply messing with the RGB values. As …

Member Avatar for pvladov
0
1K
Member Avatar for sillyboy

Right now, I'm listening to a compilation of various Royksopp tracks off the Melody AM, The Understanding, and Junior albums.

Member Avatar for Helianthus
0
5K
Member Avatar for panpwintlay

My algorithm below is similar to what slogfilet suggested: I consider using anything beyond the square root of the integer candidate to be redundant and a waste of time to use as a test divisor. I'm not accepting user input, nor am I writing the prime numbers to the screen, …

Member Avatar for Momerath
-1
1K
Member Avatar for prakashmca07

DataGrids, Repeaters, etc., do not have to be used with database connections, they can be bound with other collections. Take this example: [CODE] <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:DataGrid …

Member Avatar for rispy
0
112
Member Avatar for amby

Your assumption is correct. [CODE]StringBuilder[] empDetails = new StringBuilder[100];[/CODE] This line establishes an array of StringBuilder references, but you still need to create instances of objects for each array element (*or at least any element you intend to actually use). [CODE] for (int i = 0; i < empDetails.Length; i++) …

Member Avatar for Brindha.s
0
221
Member Avatar for adkool

I use IE mostly, FF occasionally (usually just to test something). IE meets my needs.

Member Avatar for crunchie
2
890
Member Avatar for kat-spn

1) Don't assume the input should be an integer. If you want to calculate the number of coins required, you should allow for dollars [I]and[/I] cents. Use a [ICODE]double[/ICODE] or [ICODE]decimal[/ICODE] data type instead. 2) For validation, use the .TryParse(string input, out result) method. The method itself returns a bool, …

Member Avatar for Chaitanya Dhote
0
949
Member Avatar for Gaurav arora

Here is an example using an order table. You take the top 1 from the top N [I]in reverse order[/I]. [CODE] select top 1 OrderTotal From (select top 10 OrderTotal from orders order by ordertotal desc) x Order By x.OrderTotal [/CODE] Let's say my top 10 OrderTotals (in descending order) …

Member Avatar for crishlay
0
248
Member Avatar for akamini

[CODE] sql = "SELECT * FROM tblBookings WHERE StudentID = " & Target And "Paid =" & Target2 [/CODE] The word [I]And[/I] should be inside your quotes. [CODE] sql = "SELECT * FROM tblBookings WHERE StudentID = " & Target & " And Paid = " & Target2 [/CODE] And …

Member Avatar for raffy3
0
337
Member Avatar for expvice

Is there a reason you want to convert the pages from programmable ASP.NET to static HTML? I would use a URL rewriting solution instead to get all the programmability of ASP.NET while also having SEO-friendly URLs. There are canned solutions available (built into IIS7 or you can use a tool …

Member Avatar for elaek
0
197
Member Avatar for jake1496

My favorite game of recent months is Dragon Age: Origins, which I played on Xbox 360 but it also available on PC and PS3. Mass Effect 2 (360 and PC) is also a good recent game. All time? I'm going with Star Wars: Knights of the Old Republic. [I]This post …

Member Avatar for davidlouis88
-8
857
Member Avatar for ana12
Member Avatar for Ancient Dragon

That reminds me of a video from a few years ago that has unfortunately been taken down from youtube and I can't find it elsewhere. The short version is that a guy tied a rope to his truck and dragged a GameCube along the road for several miles, with it …

Member Avatar for dexter737
0
162
Member Avatar for zortec

I had a Mazda Protege once. It was a good little car; it had 225,000 miles on it when I traded it in towards a new car a few years ago. This was a 1994 Protege, so I can't attest to current quality, but that one served me well.

Member Avatar for dexter737
0
358
Member Avatar for ana12

I went to a doctor for medical advice and a healthy eating recipe. He gave me green eggs and spam. Should have known not to go to Dr. Seuss.

Member Avatar for dexter737
-5
217
Member Avatar for ana12

I think a good time to have pasta would be during breakfast. Would you agree, ana12?

Member Avatar for dexter737
-11
323
Member Avatar for cwarn23

[QUOTE=GrimJack;1102621]Most common computer problem is the interface between the chair and the keyboard[/QUOTE] Ah, ye olde PEBKAC error.

Member Avatar for efmesch
1
173
Member Avatar for PierlucSS

I wouldn't use a repeater to generate XML, but that's just me. If you want to continue down that path, I would advise you to explore the repeater's ItemDataBound event and take care of the binding of the second repeater within the code behind of the page. As for another …

Member Avatar for sohelelite
0
121