Don't bother with server variables or headers. Just use the Request.UrlReferrer[^] property directly.
Vega02
Posts
-
HTTP_REFERER question -
Contains both secure and non secure itemsYou have a link to a non-HTTPS item on your site, like an , , or CSS file that is served via regular HTTP. To make this message go away you'll have to make sure those files are also served via HTTPS.
-
Types of JITWhich 3 types of JIT compilers?
-
ReflectionUnfortunately this does not work in all cases and is not guaranteed to work in future versions of the framework. See Mike Stall's blog [^]for more info. The question one should be asking is "why does the constructor need to know the declaring type of its calling method?"
-
Type.GetFields Method (BindingFlags)The field abc is defined as static, but in your GetFields() call you ask it to return only instance fields.
-
Problem with HashTableShouldn't the hash codes be the same, since they represent the same underlying value? It doesn't matter that they're boxed value types. They don't have reference equality, but they still have value equality, hence they should have the same hash code.
-
Problem with HashTableIs this using the built-in HashTable class? I would recommend using Dictionary<int, string>[^] instead. Your problem may have been due to some weirdness while boxing.
-
.NET framework lib source code available1. Open a Visual Studio command prompt. 2. Type "set complus_zapdisable=1" to disable JIT optimization. 3. Type "devenv" to launch Visual Studio. 4. Open your solution. 5. Right-click on your project and hit Properties. 6. Navigate to the Debug tab. 7. Uncheck the "Enable the Visual Studio hosting process" checkbox. 8. JIT optimizations are now fully disabled when you go to debug. You can verify this by noting that in the Modules window, every entry in the Optimized column is No. Happy debugging! :)
-
Binary conversion , Help please!!It looks like you're trying to implement a multi-precision integer. But outside of the MIDI specification I don't know where an MPI of this type would still be in use today, so it sounds almost like a homework assignment. What do you have so far? Maybe we could take a look at that and figure out what's going wrong in your code.
-
How do I get the com port working on .net 1.0You're right - it's not supported in .NET 1.0. However, if you search CodeProject you'll find that people have solved this problem. Check out this page: http://www.codeproject.com/info/search.asp?cats=3&searchkw=serial+port&Submit1=Search&author=&sd=15+Nov+1999&ed=2+Aug+2007[^] Many of the entries look like they could be useful. Check #5 out for starters.
-
obsfucationI don't have any experience with them myself, but nearly everything I've heard about them is negative. The general consensus seems to be that if you have a piece of code you'd really like to protect, you have two options: 1. Put it in an unmanaged DLL, then invoke its methods from your managed program. This isn't perfect, but disassembling unmanaged code is less trivial than disassembling managed code. 2. Don't even ship the secure binary. Keep it in a safe location - i.e. on your web server, and have the client make web calls to your service. This is the ideal solution, as you don't have to worry about obfuscation. The client never even has access to your binary! Of course, this solution is only appropriate for a very limited number of scenarios. Your clients need constant network access to make this work. Good luck!
-
Hmm.. Possible? Facebook for $6,000,000,000?A blog post linked to a rumor on a blog post linked to . . ., etc. Lots of people wonder why Facebook is valued so highly. The simple fact is that it's an advertiser's wet dream - you have tens of millions of people who have created excruciatingly detailed demographic profiles of themselves, so with the right advertising you can achieve an unimaginably high click-through rate. That said, MS is in the market of creating search and advertising platforms, not necessarily in the actual market data itself. They would only have to partner with Facebook - and I believe they have - in order to deploy their systems on the Facebook network. A buyout isn't necessary or even practical considering that they don't actually need the demographic data. And now I'm off to leave random notes on my friends' Facebook walls. And when I wake up in the morning, the acquisition will have gone through because all of my predictions fail horribly. :)
-
String.IsNullOrEmptyOr... NullRefererenceException!It's not a myth. For reference, here is the repro code: static void Main(string[] args) { Console.WriteLine("starting"); test(null); Console.WriteLine("finished"); Console.ReadLine(); } static void test(string x) { for (int j = 0; j < 10; j++) { if (String.IsNullOrEmpty(x)) { //TODO: } } } Note that it's a very specific circumstance. You have to be running the code in a tight loop to exercise the buggy JIT optimization. Note also that because this is a JIT bug, you have to compile the code and run it from the command line. Optimization is automatically disabled for programs launched from the Visual Studio IDE, even in release mode. Also remember that you need the .NET Framework 2.0 installed to exercise this. So the bug is in the optimizer itself - potentially serious, I guess. I've not heard of anybody actually being affected by this in a production app though.
-
books on c# 2You could always go to your local library and borrow an actual book - and hey, it's free! :-D May I suggest Pro C# 2005 and the .NET 2.0 Platform, Third Edition[^]? The linked site also offers it as an eBook for USD 30.
-
how can i disable CTRL+ALT+DEL,ALT+F4 and ALT+TAb keysAs Jon said, Windows will not allow you to disable CTRL-ALT-DEL. This is because this particular shortcut is used to signal to the Windows OS that you want to perform some critical action - log off, terminate a program, etc. In fact, in some Windows setups, you are required to press CTRL-ALT-DEL before you login to the system. This is so that you know that you're typing your username and password into a real Windows OS login dialog - not some spoofer. That said, it sounds like you might be trying to write a screensaver program. Don't worry about those key combinations. Just write your program as a normal .EXE file, then when it is compiled change the file extension to .SCR. Then right-click on the file from Explorer and hit Install. You'll now be able to use this as a screensaver, and Windows should take care of those pesky key combinations for you automatically.
-
DVD DRM row sparks user rebellionIt seems that there are two arguments here. 1. I want to exercise my fair use rights to enjoy the media that I have purchased in the privacy of my own home in the manner of my choosing. 2. I want to distribute and download copyrighted materials on the 'Net without compensation to the copyright holders. The problem is that most people believe that (1) should be legal, but the DMCA makes it illegal. (2) has already been illegal for a very long time - even before the DMCA. The RIAA / MPAA are trying to link (1) and (2) together - they want the people who want (1) to be treated like the criminals who want (2). They do this by saying that (1) invariably leads to (2). Of course, there is ample evidence that the conclusion the RIAA / MPAA try to draw is false. One such source follows. We developed a data set of 312 popular movies and located one or more samples of 183 of these movies on file sharing networks, for a total of 285 movie samples. 77% of these samples appear to have been leaked by industry insiders. Most of our samples appeared on file sharing networks prior to their official consumer DVD release date. Indeed, of the movies that had been released on DVD as of the time of our study, only 5% first appeared after their DVD release date on a web site that indexes file sharing networks, indicating that consumer DVD copying currently represents a relatively minor factor compared with insider leaks. Source: http://lorrie.cranor.org/pubs/drm03.html[^] So, using this logic in the argument that you gave, you'd be free to use PimpFish however you want provided you pay for it. However, that still does not give you a license to freely distribute it - that would still be considered copyright infringement.
-
May get a new monitor.Throwing in my vote for the Samsung 226BW. Roommate got one of these a few days ago, and it is absolutely beautiful. It sounds like this is the Samsung monitor you were considering as an alternative earlier in the thread. http://www.newegg.com/Product/Product.aspx?Item=N82E16824001096[^] But the quality of LCDs seems to be going up across the board nowadays, so hopefully you'll be happy with whatever you decide. :)
-
visual studio 2005Yes, VS 2005 generally works with Vista. You'll need to apply a patch. See http://msdn2.microsoft.com/en-us/vstudio/aa948853.aspx[^] for info. Be sure to download SP1 and SP1 Update at the bottom of that page.
-
str(number,width,presicion) function -
Visual studio Orcas Beta 1Anybody happen to have a link to the major changes between Mar '07 CTP and Beta 1? MSDN blogs is blowing up and the only changelogs I can find are between VS 2005 and VS Orcas. :(