|
Hi,
I am not a Java specialist, but I assume its collections are quite similar to
the ones in .NET (they would be identical if you were refering to J# instead
of Java).
In .NET a hashtable holds a lot of key,value pairs; it applies a lot of tricks
to handle large collections very fast (that is given a key, find the value).
It does not store things in alphabetical order. It does include all necessary
logic to avoid collisions (thats different keys producing the same hash;
trying to enter two key,value pairs with same key results in an exception).
If you want to traverse a collection alphabetically, you must have an ordered
collection, that either sorts by itself (as in SortedList) or that supports
an explicit Sort operation (as in ArrayList, and List).
So one often ends up having two parallel collections, say a Hashtable for
fast key->value translation, and a SortedList for listing the keys alphabetically.
Hope this helps.
|
|
|
|
|
Hey all,
I'm looking to store sensitive data in an oracle database. Oracle has some neat encryption features that allow you to send a key for decryption purposes. The application ties into Active Record for authentication and permission management.
I'm trying to come up with a way to store individuals personal records in such a way that they are accessible to others (using groups / permissions) but are not kept in plain text. How do you encrypt something that is capable of decryption (DES3 or AES)while not storing the decryption key somewhere accessible to a developer or dba? Leaving a certificate in the development tree isn't an option either because of the nature of the company (no real passwords in source control).
Any thoughts?
Best,
Jon Lebensold
|
|
|
|
|
Have you come up with any solution to this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Well, the project is on hold but here's what I've come up with so far:
You store a plaintext string (i.e. "helloworld" in the web.config)
You then setup IIS so that the application doesn't recycle memory.
You store a general decryption key in AppState of the application (essentially keeping the key only in memory)
You use the decryption key to take your plaintext string and encrypt it (so "helloworld" becomes whatever it would be with your AES encrypted string turns it into, with or without a salt) and then you take THAT and place it into the web.config. This way, the actual key isn't stored on the server, the config files or in the database.
I do know, however that microsoft has a tool for encrypting parts of your web.config, but I haven't looked into it (and only discovered it after the architecture I had just proposed.)
When the application first loads, it checks to see if the key in AppState can encrypt "helloworld" to match the encrypted string in the web.config.
In terms of assigning permissions to different users, you could use this same key to encrypt all the strings in the database, including a 1-many mapping of passwords to users with permission to see them.
let me know if you come up with anything better!
|
|
|
|
|
How would you sort an obscenely amount of data? Say 500 gigabytes or more? Any brilliant ideas?
|
|
|
|
|
Using a highly optimised sort algorithm suited to the data and disk based operations :P unless you have 1tb of ram laying around
I suppose a database could do it too.
|
|
|
|
|
Divide the data into files small enough to sort by normal operations, sort each file, and merge the sorted files. You could also import the data into a database engine and have it do the ordering.
|
|
|
|
|
Brady Kelly wrote: You could also import the data into a database engine and have it do the ordering.
Which database engine you think could handle such huge datasets?
|
|
|
|
|
In SQL Server 2005 the number of rows per table is only constrained by storage space. and the maximum file sizes are 16 terabytes for the data file and 2 terabytes for the log file.
|
|
|
|
|
Hi,
I would try to (partially) sort the data as it is generated, not afterwards.
If applicable. For instance for words, keep 26 or 26^n collections.
|
|
|
|
|
I have a stand alone application (messenger). I was asked to the messenger to have the fallowing possibility:
from a link with a phone number parameter to make a call in the application. If the messenger is not installed, to take the client to the official web site. If the product is installed to see if it is open. If it is open and the user is logged in to make the call.
My idea is the client to check the registry and see if the product is there, which solves the first part. If there are certain keys in the registry next step is from the processes to see if the product is active. If active somehow send instruction to call the function : CallNumber( phonenumber phnum)
Can you give me any leads on how to do all this, any other solution to the task?
The project is done in C++
Thank you very much
Dimkov Trajce
|
|
|
|
|
What??? What legitimate reason do you have for dialing a number? Possibly without the user knowing that you have done so.
Programs that have done this in the past have been used to hijack users phonelines and redirect them to premium rate numbers (often abroad).
Please explain what the legitimate reason is to do this.
|
|
|
|
|
I am developing the application, and it is a messenger who has voip.
The company asked me if users can make phone calls using the messenger from a link on a web page with the phone number as a parameter. If some security is needed i can implement it in the application, and the link they will get only after signing in on the official webpage.
Extra difficulty is if they erase the the messenger. This is the reason why I have to see if the application is in the computer(if so but closed to ask to open the application) and if the application is by some chance removed, (it is not in the registry my guess) take the user on the official download site.
I believe something like this can be done with scripting on the client side code with javascript, but I am not sure
|
|
|
|
|
If they erase the messenger and you want to take them to the official webpage, then you wouldn't want to dial the number. You would just use something like
Process.Start("http://www.mycompany.com"); from the application.
|
|
|
|
|
let me split this to couple of questions:
1.Can I access the registry with IE and if yes how?
2. Can I use IE and scripting language to call a program with parameter?
Thank you Pete in advance
|
|
|
|
|
Directly, you can't access the registry. The way that I've done this in the past was to have an external C routine called from a Java applet running in the browser session.
|
|
|
|
|
I decided to create an ActiveX commponent which will find the application by PID.
If it doesn find the PID, the app is not running, if yes Ill do ::SendMessage to the window of the app
|
|
|
|
|
Please visit my blog and add your comments and feedbacks for the discussion topic I have raied on "Evolving Software Architectures in CRM world".
http://pchaitanya.wordpress.com
Chaitanya
|
|
|
|
|
Hi all
I am new to the area of "software architecture" . Could anyone please provide me links/books and subjects to look for to know about the job of an architect ?
redindian
|
|
|
|
|
If your very new, then start with Patterns, I prefer to start with Head First Design Patterns and go with GOF( Gang of Four) Patterns by Erich Gama
And you know the Road to go ahead.
Regards,
Vythees
|
|
|
|
|
I disagree. Architects are responsible of programming in the large, whereas DESIGN patterns are standard solutions to solve problems in programming in the small (as the design in the name already says).
And a side note:
Yes, yes I know there is no clear boundary between architecture and design, no need to write that to me
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
You need to understand your client's needs, technology to archieve their needs, and design a solution of their needs.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
|
Almost any application in our company interacts with data sources. As the number of applications and data sources grows it becomes very difficult to support our information system. To avoid this we decided to develop some "common gateway" - middle tier that will be used by all applications that need to access any data sources. Also we plan to implement WCF for this task.
What do you think about this?
Does anybody know any existing solutions?
Thanks.
|
|
|
|
|
I don't have an answer for you but a question:
A single "gateway" will surely simply the "layout" of your system (applications, data sources, ...) but will probably introduce a bottleneck, because all applications have to communicate with this gateway.
When performance is critical then a more SOA like approach (not exactly sure if SOA is the right term, though) by building a system where services interact on there own. When each service has a clearly defined task then this approach is clearer and more scalable then a Gateway approach.
But it's very difficult to give a perfect solution for all possible systems
-^-^-^-^-^-
no risk no funk
|
|
|
|