Posts

delphi - Pre-sorting analysis algorithm? -

It is a famous release with the query that when the data is in the set or in almost ordering order, the performance is very bad In this case, the summation sort, which is usually very slow, is easily the best option. The question is what is to use. Whether an algorithm is available to run through a data set, a comparative factor is applied, and returns a report on how the data set is running in a sequential way? I like Delphi / Pascal, but the examples are not very complex, so I can read other languages. As you expect, many ideas go into this means of mean-of-three techniques That the worst case behavior of Duchessert is not for sorted data, but rather for less obvious cases. is quite exciting, because it quickly avoids the worst condition of the Quadratik. Instead of its natural question, "How do I find that the data is almost-sorted", it effectively asks itself as it is, "Is it taking too long?" If the answer is yes, then it goes from quicksource to ...

python - Do dicts preserve iteration order if they are not modified? -

If I have a dictionary in Python, and I repeat it once more, and then again, what I have not inserted, removed or updated any item in the dictionary, should be preserved? (But I could see-up) what's here dict.items () says: dict.items () Return of a copy of the key (value, value) of the dictionary. If the item (), key (), value (), etirts (), eterrese (), and iTevilViews () are said to have no interference in the dictionary, the lists will be consistent. . I think it's fair to believe that if you do, the ordering of that order will not change.

selecteditem - Getting previously selected item in select box with jQuery -

I have an item HTML selection box, on which I want to know what was selected before changing the item Selection of items. Until the change is removed, it is too late: $ ("select"). Change (work () {var str = ""; $ ("select option: selected"). Each (function () {// This is the current selected item (new) str + = (this) .text () "Docs" Docs says that 'The change event sets a fire when a control input loses focus and its focus is revised by obtaining a focus . ' However, the 'blurred' event does not seem to be the perfect organizing event and there is no incident of "onFocusLost" type. Is it a cross- a lot of hoop jumping Browser compatible ways without? The value should be captured before this change as soon as the user opens the selection menu, Will be caught, but in reality they choose something before they. $ (document) .ready (function () {$ ('select'). Focus (function () {var theValue = ...

C#: Are nullable types (int?) objects? -

I understand that there are no objects in type C of the value, that is, they do not get from the system. Object. Assuming this logic puts my logic at this point, like int?, Are things that they inherit from the object? If so, do they subject all rules and constraints to other things, or do they have special rules governing their behavior? Just as a reference, this question comes from the investigation of the functioning of the null cooperative operator. wrong - value types are objects, but they are not identical to the reference types Behave - instead of pass-by-reference they are pass-by-value, Nullable & lt; T & gt; (which is T? ) is a straightforward, and therefore comes from System.ValueType and System.Object. In the C # compiler, there is a magic that makes it difficult, in the same way, it behaves according to meaningless relationships as a reference type, but they always keep per-value criteria.

security - Displaying PDF to user -

We are providing a web form from which users fill their personal information; Some of them are sensitive information (SSN, birthday, etc.). At user submissions, data is prefilled in a PDF which is made available through a link. We are building PDF in the folder that has allowed write to the website. How can we create and add PDFs in this folder with the naming scheme (using GUID?), Such that PDF file location is not estimated to any other user Can someone write in URL and Access PDF? The PDF folder may only have exclusive rights for the user, but this can be a different question as to how it has been completed. (The number of users is unknown because it will be open to the public). Any thoughts on this? In a nutshell, we need to allow the user to see a PDF of data recorded in preventing more savvy users to understand the location of PDF files, allowing access to other files. Thank you! Trying to obscure the path in a file is not really making it safe I access the ope...

events - wpf detect open window -

In my WPF app (CSRAP) I have an event handler that will open a new window (window B) when triggered Applications and some data displayed. However, when the event resumes, the new window (window B) is still open, so I do not want to create another instance of Window B, but to update the data displayed in the current instance. So the question is, how is it that the window b is already and if it is not already already open only, otherwise update the data? I got the application. Present. But in some way that is not working for me yet, you can create a LoadWindow () method in WindowB, which you can call to load (or refresh) ) data & amp; Whether a window is already open or not, whether it works when this window closes, does it take a representative to call: Private operation ParentCallbackOnClose; Public Zero LoadWindows (Action ParentsCallbackOnclosus) {// Load data (Data contact or whatever set up) ParentCalbackOnocos = ParentCalback Onocos; // Open the window and Show / Sho...

iphone - Why is scaling down a UIImage from the camera so slow? -

[Update: Last call for creative ideas here! My next option is to ask for the apple, I think.] Yes, this is a lot of pixels, but in the graphics hardware 1 on the screen, the quad with 1024x1024 texture is capable of creating too many pictures / sec 60's, so in reality the way to reset a 2048x1536 image to 640x480 should be in less than 1.5 seconds. So why is it so slow? Does the underlying image data give the OS returns from the peer, which is not ready to be pulled in some way, so that it switches into some fashion that the GPU can not help with it? My best estimate is that it should be changed from RGBA to ABGR or something; Can anyone think in such a way that it is possible for the system to understand the system to give me data quickly, even if it is in the wrong format, and I will work with you later? As far as I know, there is no dedicated "graphics" memory in the iPhone, so there should be no question of moving image data from one place to a...