I have a SortedDictionary as defined like this:
SortedDictionary<TPriority, Queue<TValue>> dict;
But I want to sort the keys in reverse order. I assume I need set the Comparer, but what comparer do I use for a generic TPriority? Note that TPriority implements IComparable.
I have a cell that takes the time value from another cell. I want to include an addition of this time as well as a dash '-' to format the time into a sort of schedule.
Example:
userinput cell: 5:00 AM
Formated cell (how I would like it to look): 5:00 AM - 3:30 PM
What would the function be to get something like this?
i have passportno(varchar) in database.
i am entering values like this 001,002,003. and i want to display like sorting order.
now i wrote query like this "select * from passport_registration where status=1 ORDER BY passportno" then displaying output like this......077,088,099,100,1000,1001,1009,101,1010
i want to diplay sort order. how to do?
The user will have a static list of items to choose from. Using a Picker View they will choose one of the items and then select how many of them they want.
Whats the best way to save this in core data? A Struct?
struct order {
NSInteger item;
NSInteger numberOf;
};
Or some sort of relationship?
Many Thanks
i'm trying to get a list of the most recent used applications. NSWorkspace returns me a list of active applications and i can sort them on a few options using NSRunningApplication. see list below:
launchDate
finishedLaunching
processIdentifier
i dont want the lauch date but the recent 'active' date (like the way cmd-tab sorts).
Does anyone knows the solution for this?
What I'd like to do is write just Lazy C++ .lzz files and then have lzz run before a build to generate .cpp and .h files that will be built into the final application, sort of like how moc works with Qt.
Is there any way to do this?
I need to store a 30 letter combination, but each letter can only be "0", "1" or "2". When I use sizeof(myString), it returns 32.
I want to use this 30 letter combination to access a row of an array, so I'm wondering if it is possible to use a 3 value bool of some sort to store 1 of 3 values in.
In some languages (ColdFusion comes to mind), you can run a query on the result set from a previous query. Is it possible to do something like that in php (with MySQL as the database)?
I sort of want to do:
$rs1 = do_query( "SELECT * FROM animals WHERE type = 'fish'" );
$rs2 = do_query( "SELECT * FROM rs1 WHERE name = 'trout'" );
I'm parsing Xml data which has entries like this:
<item name="UserText" type_name="gh_string" type_code="10"> </item>
I'm supposed to read the 6 spaces as a String, but both the InnerText and InnerXml values of the System.Xml.XmlNode are zero length Strings.
Is there any way I can get at this whitespace data in existing files and what do I need to do in the future to prevent this sort of screw up?
I am building a custom CMS in ASP.NET MVC and one of the requirements is that the content has a start and end date that dictates whether or not the page appears on the site. What is the best approach to this? Should I run some sort of chron job to mark the status of the page according to its publish dates? Does anyone have any resources or advice on the matter?
What sort of code should I put in preamble, such that every math fomula (in dolar signs) that is too long to fit in line width (a.k.a. produces Bad Box) start in new line (like putting // before equation) ? Or is it impossible to detect and prevent Bad Box in compiling ?
In an interpreted language like PHP it is possible in theory to set up some sort of callback function that would be run indiscriminately after every line of code. I am wondering if such a thing exists in PHP or if such a thing could be accomplished in any way? Such a feature could be useful for diagnostics or performance tests. Does anyone know of such a mechanism in PHP?
I am using Eazfuscator.NET 3.0.41 to obfuscate a (VS 2010) WPF 4 application. After obfuscating, when I double click the exe file it's throwing an error message like this.
"Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException"
Is there a way I could enable some sort of a logging to check where it's going wrong ? How can I solve this problem? please advice
In my gridview I have 6 pages. When I go to page two and try to sort by descending on any of my columns I get sent back to page 1. Is there a way to stay at page two?
I have an XSD document that I need to communicate with an endpoint (client side only) - is there this functionality built into spring? I have been using JAXB, but was wondering if spring has some sort of wrapper. Thanks.
If you have a C++ project that has a bunch of .ODL files and the generated .h files from the ODL compiler, should doxygen be told to parse both .odl and .h, or only one or the other? In general I don't like documenting generated code but IDL is sort of a special case.
In any case, it seems like the member listing of ODL files is not quite working properly in my tests, are ODL files properly parsed?
I'm looking at the possibility of using Android as a secure corporate mobile platform.
One of the pre-requisites for this will be a way of managing multiple devices, security policies, software deployment, that sort of thing - essentially the things the BlackBerry Enterprise Server handles for BlackBerry or MDM (or something 3rd party like SOTI) handles for Windows Mobile.
Does such a thing exist for Android? It's a platform we're interested in but without this right now (and we're not in a position to build it ourselves) it's a non-starter.
I am just wondering if you are supposed to write a sort of really secure application with data being transmitted over insecure networks, what kind of encryption algorithm will you use it in order to make it safe ? I know several c++ libraries for encryption providing nice functions with different algorithms, but i'm not quite sure which cipher to use - AES, DES, RSA, Blowfish or maybe something more different ?
Please provide your ideas and suggestions. Thank you.
i am having a application where i am generating the uibuttons dynamically want to use same @selector...Now as sooon as event is generated i wanna check for values and pass it to thtroughthat selector how can i implement this code?
can anyone tell me a tutorial sort where buttons are dynamically generated and check for particular button click is depicted?
Plz help...
It has to be self contained, some sort of Erlang runtime library, and the BEAM files. This is so that anyone can run the program with one click, by running a .exe off a network drive, without having to install Erlang or anything else.
Hi all,
I came cross a question in my interview.
Question:
Array of integers will be given as the input and you should find out the middle element when sorted , but without sorting.
For Example.
Input: 1,3,5,4,2
Output: 3
When you sort the given input array, it will be 1,2,3,4,5 where middle element is 3.
You should find this in one pass without sorting.
Any solutions for this?
I have many columns in oracle database and some new are added with values. I like to find out which columns have values other than 0 or null. So I am looking for column names for which some sort of useful values exists at least in one row.
How do I do this?
Update: This sounds very close. How do I modify this to suit my needs?
select column_name, nullable, num_distinct, num_nulls
from all_tab_columns
where table_name = 'SOME_TABLE'
I often find this strange CDATA tag in XML files:
<![CDATA[]]>
I have observed that this CDATA tag always comes at the beginning, and then followed by some stuff.
But sometimes it is used, sometimes it is not. I assume it is to mark that some "data" will be inserted after that. But what kind of "data"? Isn't anything I write in XML tags some sort of "data"?
When connecting to mysql, I have functions to get the relevant error message and error code, I see nothing of the sort in the list of ftp functions of PHP.
Is there a best practice to handle errors in FTP?