|
hi all
is there any 64bit hashing algorithm implemented in .net?
i am using .net 3.5 and need to encrypt a string with length of 3 to a byte array of length 8 or 10
for example :
hash("ABC")="!@?{%ER)@w"
any suggestion?
|
|
|
|
|
Take the first half of the MD5 hash. I don't know how many collisions it will create or if they are uniform but it may work?
|
|
|
|
|
hi
no i need a class implemented in .net some thing like MD5 Class .
but it have to generate byte array of length 6 to 10 (not 16 byte or higher).
|
|
|
|
|
I would read my post again. Last time I checked 16/2 = 8.
|
|
|
|
|
it would give ambiguous meaning
does anyone know something about this problem?
|
|
|
|
|
All hashing algorithms give ambiguous results. The number of expected collisions is directly proportional to the input size, output size and quality of the hashing algorithm. Read the Wiki page on the subject for more information about hashing.
|
|
|
|
|
Hi every body,
I’m working with the Crystal report in C# application, and using Linq to connect database in SQL server.
I need to create Crystal Report whose datasource not only one table but two and these two tables are related to each other with a foreign key, so I tried to join them then give the result to the report as a datasource but in the result I have repetition in data, I mean each row from the first table goes with all the rows from the other table so when there must be just 3 rows as a result I have 9 rows
can any body help?
|
|
|
|
|
This means that you don't have a real join in place. Basically, you are seeing a case where you are getting a many to many result back - your query should limit the results.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you Mr.Pete O'Hanlon for your reply,
But what you have said is right and I guessed that, then I made sure that the returned rows from the query were without repitition ( I stopped the program while debugging and see the values)
I think that the problem might be when selecting the database fields for the report !!
What do you think and how to solve it ?
Thanks to be helpful
|
|
|
|
|
I suspect the reason why you're getting the results you are is because of the JOIN type that has been used in the SQL query. You'll have to craft the SQL statement to return your proper results yourself. You may want to read up on the different join types [^] to understand how they work before proceding.
|
|
|
|
|
Either You not using internal link in data sources at crystal report end or you not use grouping option for that
Akhil Khare
|
|
|
|
|
I made sure that I used internal link in data sources.
If I was using grouping option would it get ride of the repetition of data?
could you please tell me what is the main goal of grouping option.
Thank you for being very helpful
|
|
|
|
|
Actually when data will replicate then ther must be a comman data which are replicate so when we use th e group option on that particluar data feild then it grouped as per condition
e.g.
City Amount
DElhi 10000
DElhi 500
delhi 1500
Now after Group on CIty Feild it will
DElhi
---------> What u wanna to shown
|
|
|
|
|
I don't think that my pronlem will be sovlved using group option, because in the result I obtained there are some data seemed to be as a mixed data resaulted from joining, I mean there are some error data row and I don't want to group them but get ride of them ..
Please read my problem agin to see what is the exact problem !!
Thanks,
|
|
|
|
|
Hello,
Does anyone know if it is possible to programmatically add a panel to the Outlook 2007 Navigation pane?
Thanks,
Sean
|
|
|
|
|
I suspect VSTO will let you do this. Meanwhile, this[^] article may provide a starting point.
/ravi
|
|
|
|
|
There are following classes:
public class X
{
Int32[] a;
public List<Int32> xxx()
{ ... }
}
public class Y
{
List<Int32> a;
public List<Int32> xxx()
{ ... }
}
What I am trying to do is to find a generic way to make the class of similar descent:
public class GenericClass<T> where T : IEnumerable
{
T a;
public List</*Type of the elements in the IEnumerable T*/> xxx()
{ .... }
}
No ideas come to my head. Maybe some will come to yours'? I understand that the problem is that IEnumerable is not generic but maybe there will be any clever solutions
|
|
|
|
|
public class Foo<T> : IEnumerable<T> {
private List<T> someList;
IEnumerator<T> IEnumerable<T>.GetEnumerator();
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();
}
|
|
|
|
|
I don't know if I understand your problem, but if I'm correct, you should do
public class GenericClass<T>
{
T a;
public List<T> xxx()
{ .... }
}
If it's not what you want, write about your problem in more details.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
You see, if I instantiate this class like this:
new GenericClass<Int32[]>(); ,
then what xxx() returns is List<Int32[]>, although it should return List<Int32>.
Now, if I instantiate the class this way:
new GenericClass<List<Int32>>(); ,
then xxx() will return List<List<Int32>>, but it should also return List<Int32>.
That is why I think that IEnumerable is the way to go for T.
I am starting to think that my idea is conceptually wrong, since I cannot think of anything that would work.
|
|
|
|
|
Your problem is you need T to be the type of element, not a collection of so your IEnumerable idea isn't going to work.
I think you need something like this:
public class GenericClass<T>
{
private List<T> a = null;
public GenericClass(IEnumerable<T> items)
{
if (items != null)
a = new List<T>(items);
}
public List<T> Xxx()
{
return a;
}
}
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Yes, that's what I needed! Simple and elegant. Thank you!
|
|
|
|
|
You're welcome
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Hi!!
Can we make a program which can access the display of a pc from another... just see the desktop(not manipulate it)...
|
|
|
|
|
It's the same as doing it with the manipulation capability. You need to have 2 apps. One running on your monitor machine that shows you what's on the remote desktop and an app running on the remote desktop that puts the screen view together and sends it to your monitoring workstation. Google for "C# VNC" and you'll find examples and libraries.
|
|
|
|