Dimitri Witkowski
Posts
-
Any ASP.NET MVC open-source role management GUIs? -
Any ASP.NET MVC open-source role management GUIs?Hello! Are there any open source ASP.NET MVC GUIs for users/roles management?
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Javascript synchronous Yes-No-Cancel dialog [modified]Thanks.. But it's not what I'm searching for :( It's modal but not synchronous. The key moment is that using this library, I cannot wait until the dialog is closed, like in:
alert("test"); ... // will be executed after user clicks OK
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Lock down a web site's allowable IP range to just one IP address [modified] -
HttpContext.Current.Session & HttpContext.Current.Cache questionsSession ID will be different for different browsers, why did you expect to see the same? Session is recognized by user's cookies.
HttpContext.Current.Cache
is shared across application domain (MSDN[^]). If your IIS is configured to run as web farm (it can use not one process to serve requests) - cache object will be different for each process. In any other case it is the same.Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Javascript synchronous Yes-No-Cancel dialog [modified]Yeah, you are right, showModalDialog is not a part of any web standard but it's supported by all web browsers. Furthermore, Opera tells this:
typeof(window.showModalDialog)
will be"function"
But I don't understand how to use it in Opera Using a div with high z-index will be not acceptable because it will not allow to wait while the user clicks on it. Yeah, I know how to implement everything using div-s but the problem is that my function must be called from external JS-component and return the ansewer to it. The component's code cannot be changed. Yeah, I mean exactly non cpu-intensive no-operation, if it exists, this means that non cpu-intensive loop can be easily implemented. Please sorry me for inaccuracy.Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Javascript synchronous Yes-No-Cancel dialog [modified]Hello everyone! I'm implementing a javascript function that must show a modal dialog with Yes-No-Cancel buttons and return the selected value. I have found a workaround for IE, Firefox, Chrome and Safari (using
window.showModalDialog
). Does anyone know any solution for Opera? It doesn't supportshowModalDialog
:mad: Or, as a variant, maybe there's any implementation of noop for Opera? (non CPU-intensive loop) The problem is that I can't show a modal dialog in such way:show(success: function() { ... });
My function is called from external javascript component, and this component is expecting the result in synchronous way. Thanks in advance.
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
modified on Friday, June 18, 2010 4:02 PM
-
Online code protection service ideaYeah - it's unsafe, slow, and with no benefits. Thkx.
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Online code protection service ideaNeighter do I. I thought it's too paranoid ;P
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Online code protection service ideaThanks.. really a stupid idea. You have supported me.
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Online code protection service ideaOnline - that was the original idea.. I'm thinking about it too With offline tool everything is clear to me :)
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Online code protection service ideaThanks for your opinion :) I mean obfuscation and code encryption
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Online code protection service ideaHello guys! My friend gave me an idea to create a free online code protection service, first I laughed and now I think, maybe it's not too bad idea? How do you think, will it be useful? It's interesting to me.. would anyone trust his clear code to such service? :^)
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Forms Authentication - weird behaviorNo, you need "*", not "?". "*" is any user, including anonymous. "?" is anonymous. If the structure of your site is
resources/images/myimage.jpg
, you should add<location path="resources/images">
Also, read about location element: http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx[^]
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Forms Authentication - weird behaviorOhhh, I really don't remember how it was in 1.1 1.1 was soooooo long ago..
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Forms Authentication - weird behaviorYou should allow loading images and styles to unauthorized users, this is a typical prcactice. By default, ASP.NET will require authorization for all files, including images. Something like:
<location path="Images">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location><location path="css">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
For Multilingual ApplicationHave no idea, whether it work with DVB systems and don't want to read the specification :p No, there's no built-in mechanism to identify the encoding. But there are some open-source encoding detectors, here are some examples: http://code.google.com/p/ude/[^] http://www.conceptdevelopment.net/Localization/NCharDet/[^]
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
In which language CLR is written??It's written mostly in C++, with Assembler pieces. If you want to get an idea what's inside .NET Framework, you can download Shared Source Common Language Infrastructure from Microsoft, it's a very good thing to start learning of .NET internals: http://www.microsoft.com/downloads/details.aspx?FamilyID=8c09fd61-3f26-4555-ae17-3121b4f51d4d&displaylang=en[^]
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
For Multilingual ApplicationHow about:
Encoding.GetEncoding("iso-8859-1").GetBytes("your-string");
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Error casting delegate in non-generic classVery interesting question. I have an idea why this might happen. 1. Generic class:
TestClassGeneric<T>
. GetMe is unknown during the compile-time, because it's defined inside a generic class and the typeparamT
may vary at run-time (actually,GetMe
in this case will beTestClassGeneric<T>.GetMe
). 2. Non-ceneric class:TestClassGeneric
. GetMe is non-generic too, and the compiler may "guess" that the conversion will fail. Some facts:System.Action
is built-in delegate, it's defined aspublic delegate void Action()
If you replaceGetMe
withAction
, you will get an error in two cases.- At the run-time, the conversion will fail, and
si
will benull
. - If you replace
si = _call as System.ComponentModel.ISynchronizeInvoke;
withsi = (System.ComponentModel.ISynchronizeInvoke)_call;
, both generic and non-generic will fail.
Thanks! I'll remember this - it's a very good task and needs understanding of generics in .NET Framework :thumbsup:
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
modified on Wednesday, June 9, 2010 2:13 PM