|
BillWoodruff wrote: Of more interest, and something I actually intend to explore, is what happens when have compound structures with KeyValue pairs, and both Key and Value Types are complex classes, not just ValueTypes. It depends, it calls Equals(T other) when IEquatable<T> is implemented (in that type or a base class), regular Equals otherwise which might default to Object.Equals, in that case it uses Reference Equality for reference types and Bitwise Equality for value types (that's how the official documentation puts it), which could be restated as "always bitwise equality, so if you give it a reference it's bitwise equality on the reference itself" (that might help a person who thinks in pointers, it would probably confuse someone who thinks in objects).
The code where it tests to see which case it's in and then makes an EqualityComparer uses a lot of reflection, by the way.
Thanks for inviting me by the way, but I've found that jungles aren't my thing, so I don't think I'll do anything with that..
|
|
|
|
|
Often when you have a problem that looks like "I need a data structure that has the properties of A and of B" where A and B are some data structure, there's an obvious way to just combine A and B and wrap them a little thing that keeps them synchronized.
Such as here, it looks like a List and like a Dictionary.. what can you do? Well you can make a List<Tvalue> and a Dictionary<Tkey, int> and let the dictionary map keys to indexes in the list.
If you also want removal, you can use a linked list instead of a list, and let the dictionary map keys to nodes in the linked list.
|
|
|
|
|
I did the same as a workaround solution... thanks a lot
|
|
|
|
|
Hi Harold,
Upvoted, as usual: why is it that when I read your comments, I often feel like I am listening to Yoda trying to tell me something through metaphor that's just beyond my ability to grasp ?
yours, Bill
~
“This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal
|
|
|
|
|
|
use Dictionary<string,double>
|
|
|
|
|
Hi
I'm developing a wpf application using visual studio 2010 in c#.
for security reason, the navigation in the operating system is not allowed while running the application.
That means once it is launched, all Windows menu, icons, toolbars ... must be hidden, and only the application must appear.
(it's a kind of that the PC becomes only dedicated to it).
Any suggestion or Idea ?
Thanks in advance
|
|
|
|
|
I don't have any code but what I think you might want to look into is running the application in what is known as 'kiosk' mode.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Sounds like what you want is a "kiosk" mode kinda thing.
If so, you should add WindowStyle="None" and WindowState="Maximized" to the XAML of your main window. Further, you can even disable resizing and make it be the windows at the top from the start, adding ResizeMode="NoResize" and Topmost="True". Code would look like this:
<Window x:Class="WpfApplicationTest1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
WindowStyle="None"
WindowState="Maximized"
ResizeMode="NoResize"
Topmost="True">
Note that Windows keyboard shortcuts still work (Alt+Tab, Windows Key, Alt+F4). If you want to "disable" those, you will have to capture them, although opening applications in this manner (for example Windows+E for Windows Explorer) won't display the newly opened application since yours is Topmost as set in the property.
[EDIT]
The same can be achieved modifying those properties in the constructor, like so:
namespace WpfApplicationTest1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
WindowStyle = WindowStyle.None;
WindowState = WindowState.Maximized;
ResizeMode = ResizeMode.NoResize;
Topmost = true;
}
}
}
If you think you can do a thing or think you can't do a thing, you're right - Henry Ford
Emmanuel Medina Lopez
modified 18-Jul-13 13:48pm.
|
|
|
|
|
Hello
Thanks for your reply.
but with this solution the windows expolorer still work, for example when I push the keybord start button it still works,
What I want to do is to diable all windows fonctionnality (like Windows +E ....)
Thanks
|
|
|
|
|
I don't think, you can do this. And even if you did, the user could still press Ctrl + Alt + Del (which can't be intercepted as far as I know), open Task Manager and kill your application.
I would suggest another appoach. Give the user only minimal rights (just to his user directory). Start your application under a different user who has access to the necessary directories. Require a password to close your application. Under this setup the Task Manager is of no use because the user can't kill other users' processes.
The good thing about pessimism is, that you are always either right or pleasently surprised.
modified 19-Jul-13 6:17am.
|
|
|
|
|
aymen amri wrote: but with this solution the windows expolorer still work, for example when I push the keybord start button it still works The keyword was "Kiosk mode". DuckDuckGo it, and you'll come across checklists like this one[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all
If I have a web page URL string in C#, how to save the web page as MHTML extension?
|
|
|
|
|
First, the mandatory question since you don't mention it in your post:
What have you tried?
I remember I did something kind of like what you want about a year ago, since I didn't have a clue, I googled (don't remember the specific query), and one of the first links was a MSDN page with an example to it.
What I mean is: please show/tell us what you've done, and what is the specific problem that you have, so we know that you are indeed making an effort and not just wasting everyone's time.
Now, I'm not just gonna lecture you and give you nothing. Look for info on:
How to read/write files in C#
How to get the HTML contents of a web page
You'll need to get acquainted with the following namespaces/classes:
System.Net[^]
System.IO[^]
Filestream[^]
WebClient[^]
If you think you can do a thing or think you can't do a thing, you're right - Henry Ford
Emmanuel Medina Lopez
|
|
|
|
|
|
Hi All,
I have created a stored procedure which returns dynamic columns, i need to map this to the EF to populate the data on a KendoUI Grid. How can i do it?
I need to create the entities based on the number of columns returned from the stored procedure, because my columns are always dynamic and change frequently, so i cannot create a fixed custom entity in EF.
if I have used Normal Ado.net it will return datatable format.In this we can't bind kendoui using Datatable.
Any help would be appreciated Please respond ASAP.
|
|
|
|
|
|
I Need to execute a procedures using C# Command
like this
string cmd = @"Create Or Replace Procedure Fix wrapped
a000000
230
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
b5 db
D72BlwrV1gjrUSfLEEUQzh3CcxkwgzJfCsvhf46iLc3qX7ovyA5450Xt2d/eEhO83Ttm+5lG
yjOGJunKydtdR733WyVs09T4gOwU6QIvvFfp8+3D9WWHGKKnQF8AX3JfGH/C1tGABS8+oMDe
i/GE+pinMauuHrnwHUUBJhPUUAEOyLJ4PUJmKP+2lUY8eTpOwbHNkjDgbSz3sX3qD4jh0UQ="
command.CommandTimeout = 0;
command.CommandText = cmd;
command.ExecuteNonQuery();
this code done successfully but the result when execute the fix procedures on the pl\sql
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object AUDI.FIX is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Or show me message the procedures is corrupted
So there is any Idea
|
|
|
|
|
I would like to do a image stitching program(which is like a panoramic image after capturing) that is able to capture and stitching at the same time, but I am using the example codings provided by EMGU CV and the codings are unable to stitch images vertically and also Axis Communication PTZ 214 Camera for the captured images.I will be using imagebox control and axis media control. Can somebody please help?
modified 18-Jul-13 5:28am.
|
|
|
|
|
Hello All,
need to convert Word Document Content Like Mail Merge and Convert It in to OPEN XML, please, do the need full.
Thanks In Advance
|
|
|
|
|
If by "do the needful" you mean write your code for you, that's just not going to happen.
You haven't said anything at all about where you're stuck in this process, so it's pretty much impossible to tell you what's going on.
|
|
|
|
|
Dave, fyi, the expression "do the needful" is a Hindi-English idiom often used in correspondence; in this case it may not have the meaning of "gimme codez" ... or, it might
yours, Bill
“Human beings do not live in the objective world alone, nor alone in the world of social activity as ordinarily understood, but are very much at the mercy of the particular language which has become the medium of expression for their society. It is quite an illusion to imagine that one adjusts to reality essentially without the use of language and that language is merely an incidental means of solving specific problems of communication or reflection." Edward Sapir, 1929
|
|
|
|
|
I know where it's from and it can be traced back to about the 1700's in British English.
But, since the OP doesn't specify anything at all about what he's looking for, I just had to guess and us an "if" in preface to the most likely possibility.
|
|
|
|
|
Hi Dave,
I am delighted to know you are familiar with such constructions (the more common form, I believe, is "do the necessary") [^]. I'm not sure whether, technically, these (now archaic) forms qualify as calques, and/or Anglicisms.
Have you lived in India, or is there a family connection with the Raj ?
Hope my response to you did not seem patronizing
yours, Bill
“Human beings do not live in the objective world alone, nor alone in the world of social activity as ordinarily understood, but are very much at the mercy of the particular language which has become the medium of expression for their society. It is quite an illusion to imagine that one adjusts to reality essentially without the use of language and that language is merely an incidental means of solving specific problems of communication or reflection." Edward Sapir, 1929
|
|
|
|
|
BillWoodruff wrote: Have you lived in India, or is there a family connection with the Raj ?
Oh God, no! I just went and did the homework to find out my it's so popular in India, and, to a lesser extent, South Asia English.
BillWoodruff wrote: Hope my response to you did not seem patronizing
No, no. We're good!
|
|
|
|