instruction
stringlengths
0
30k
|c#|asp.net|database|linq|linq-to-sql|asp|
What is best practice for FTP from a SQL Server stored procedure?
|sql-server|ftp|
Personally, I would use a [List][1]&lt;Employee> for creating the list on the backend, and then use [IList][2]<Employee> when you return. When you use interfaces, it gives you the flexability to change the implementation without having to alter who's using your code. If you wanted to stick with an ArrayList, that'd be a non-generic [IList][3]. [1]: http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx [2]: http://msdn.microsoft.com/en-us/library/5y536ey6.aspx [3]: http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx
The easiest way to unit test an object with database access is using transaction scopes. For example: [Test] [ExpectedException(typeof(NotFoundException))] public void DeleteAttendee() { using(TransactionScope scope = new TransactionScope()) { Attendee anAttendee = Attendee.Get(3); anAttendee.Delete(); anAttendee.Save(); //Try reloading. Instance should have been deleted. Attendee deletedAttendee = Attendee.Get(3); } } This will revert back the state of the database, basically like a transaction rollback so you can run the test as many times as you want without any sideeffects. We've used this approach successfully in large projects. Our build does take a little long to run (15 minutes), but it is not horrible for having 1800 unit tests. Also, if build time is a concern, you can change the build process to have multiple builds, one for building src, another that fires up afterwards that handles unit tests, code analysis, packaging, etc...
I apply common sense - this sort of thing is just one of the zillion trade-offs that engineering entails, and has few special characteristics that I can see. But to be more specific, the overwhelming majority of people doing weird unreadable things in the name of performance are doing them prematurely and without measurement.
The best way to do something like this would be to return, as you say, a List, preferably using generics, so it would be List`<Employee`>. Returning a List rather than an ArrayList means that if later you decide to use, say, a LinkedList, you don't have to change any of the code other than where you create the object to begin with (i.e, the call to "new ArrayList())".
NHibernate and Oracle connect through Windows Authenication
|windows|oracle-database|nhibernate|
How do I use Windows Authentication to connect to an Oracle database? Currently I just use an Oracle Username and password however a requirement is to give the user on install the option of selecting Windows Authentication since we offer the same as SQL.
I like the CxxTest as well for the same reasons. It's a header file only so no linking required. You aren't stuck with Perl as there is a Python runner as well. I will be reviewing the google library soon. The Boost stuff pulls in too much other baggage.
Just trying to avoid large framework downloads to the client for one very small thing, perhaps I am being daft. I had looked at jQuery but also ExtJS, the documentation and UI 'look' seem far superior and professional in ExtJS ... are there particular reasons for you guys recommending jQuery?
My solution just for kicks (this was a fun exercise), no cursors, no iterations, but i do have a helper field -- Setup test table DECLARE @names TABLE ( id INT IDENTITY(1,1), name NVARCHAR(25) NOT NULL, grp UNIQUEIDENTIFIER NULL ) INSERT @names (name) SELECT 'Harry Johns' UNION ALL SELECT 'Adam Taylor' UNION ALL SELECT 'John Smith' UNION ALL SELECT 'John Smith' UNION ALL SELECT 'Bill Manning' UNION ALL SELECT 'Bill Manning' UNION ALL SELECT 'Bill Manning' UNION ALL SELECT 'John Smith' UNION ALL SELECT 'Bill Manning' -- Set the first id's group to a newid() UPDATE n SET grp = newid() FROM @names n WHERE n.id = (SELECT MIN(id) FROM @names) -- Set the group to a newid() if the name does not equal the previous UPDATE n SET grp = newid() FROM @names n INNER JOIN @names b ON (n.ID - 1) = b.ID AND ISNULL(b.Name, '') <> n.Name -- Set groups that are null to the previous group -- Keep on doing this until all groups have been set WHILE (EXISTS(SELECT 1 FROM @names WHERE grp IS NULL)) BEGIN UPDATE n SET grp = b.grp FROM @names n INNER JOIN @names b ON (n.ID - 1) = b.ID AND n.grp IS NULL END -- Final output SELECT MIN(id) AS id_start, MAX(id) AS id_end, name, count(1) AS consecutive FROM @names GROUP BY grp, name ORDER BY id_start /* Results: id_start id_end name consecutive 1 1 Harry Johns 1 2 2 Adam Taylor 1 3 4 John Smith 2 5 7 Bill Manning 3 8 8 John Smith 1 9 9 Bill Manning 1 */
Note that map is going to modify your source array as well. So you could either do: map {s/&nbsp;//g} @outdata; and skip the @filtered variable altogether, or if you need to retain the originals, @filtered = @outdata; map {s/&nbsp;//g} @filtered; Although, in that case, it might be more readable to use foreach: s/&nbsp;//g foreach @filtered;
Entity Objects can facilitate cacheing on the application layer. Good luck caching a datareader.
There's an alternative approach to this: #include <iostream> #include <fstream> #include <iterator> using namespace std; int main() { ifstream iFile("input.txt"); // input.txt has integers, one per line copy(istream_iterator<int>(iFile), istream_iterator<int>(), ostream_iterator<int>(cerr, "\n")); return 0; }
There's an alternative approach to this: #include <iterator> #include <algorithm> // ... copy(istream_iterator<int>(iFile), istream_iterator<int>(), ostream_iterator<int>(cerr, "\n"));
Well, AFAIK, all .NET versions (except version 1.x) compile to the same bytecode. In case of C#, all new features are simply syntactic sugar, which get transformed into C# 2.0 constructs when compiling. The key point where things could go wrong is when you use C# 3.0 or 3.5 specific DLLs. They don't work well with the .NET 2.0 framework, so you can't use those. I can't really think of a workaround for this, sorry :(
Found this MSDN tutorial: [Creating Add-ins Using Visual C++](http://msdn.microsoft.com/en-us/library/aa699351%28VS.60%29.aspx). Thanks Matt.
This is not possible, as you say, from a security stand point. The only way you could simulate it, is by creating a modeless dialog window. There are many third-party javascript-plugins that you could use to fake this effect so you do not have to write all that code.
COTS Workshop Registration System
|cots|
Does anyone have any experience with any COTS systems for managing workshops and the associated registrations, courses, communications, etc.? We have a home-built Perl system that is about 8 years old and is currently embedded as an iframe in a SharePoint portal site (externally facing). Needless to say, it isn't integrated into our site well, looks like crap, needs an overhaul, lacks features, etc. It would be nice to find either a product we can install or a service that provides those features. Thanks!
You can't unfortunately. The only way is to simulate this with a window.open call.
Not possible. You can however use a third party javascript library that emulates a popup window, and it will probably look better as well and be less intrusive.
Don't use the confirm() dialog then... easy to use a custom dialog from prototype/scriptaculous, YUI, jQuery ... there's plenty out there.
The first thing to came to mind is [Quercus][1] (from the makers of the Resin servlet engine), as Jordi mentioned. It is a Java implementation of the PHP runtime and purportedly allows you to access Java objects directly from your PHP (part of me says "yay, at last"). On the other hand, while I have been itching to try a project this way, I would probably keep the separation between J2EE and PHP unless there was a real reason to integrate on the code-level. Instead, why don't you try an [SOA][2] approach, where your PHP "front-end" calls into the Struts application over a defined REST or SOAP API (strong vote for REST here) over HTTP. http://mydomain.com/rest/this-is-a-method-call?parameter1=foo You can use Struts to build your entire "backend" model, dealing only with business logic and data, and completely ignoring presentation. As you expose the API with these URLs, and you are basically building a REST API (which may come in handy later if you ever need to provide greater access to your backend, perhaps by other client apps). Your PHP application can be built separately (and rather thinly), calling into the REST API (perhaps using Curl) as if it would call into a database or some native PHP class library. Anyway, that's what I'd do. But, if you do use Quercus, please post how it went. [1]: http://www.caucho.com/resin-3.0/quercus/ [2]: http://en.wikipedia.org/wiki/Service-oriented_architecture
Also, you could use autoconf and distribute your application in source form only. :)
git-stash vs. git-branch
|git|
In a previous Git question, Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work. He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like git branch -m master crap_work git branch -m previous_master master How does this compare to `git stash`? I'm a bit confused trying to see what the different use case here when it *seems* like everything `git stash` does is already handled by branching…
In a [previous Git question](http://stackoverflow.com/questions/21848/switch-branch-names-in-git), Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work. He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like git branch -m master crap_work git branch -m previous_master master How does this compare to `git stash`? I'm a bit confused trying to see what the different use case here when it *seems* like everything `git stash` does is already handled by branching…
In a [previous Git question](http://stackoverflow.com/questions/21848/switch-branch-names-in-git), Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work. He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like git branch -m master crap_work git branch -m previous_master master How does this compare to `git stash`? I'm a bit confused trying to see what the different use case here when it *seems* like everything `git stash` does is already handled by branching… --- @[Jordi Bunster](http://stackoverflow.com/questions/39651/git-stash-vs-git-branch#39862): Thanks, that clears things up. I guess I'd kind of consider "stashing" to be like a lightweight, nameless, branch. So anything stash can do, branch can as well but with more words. Nice!
The simple approach is to use an 8x8 integer array. Use 0 for empty squares and assign values for the pieces: 1 white pawns 2 white knights 3 white bishops 4 white rooks 5 white queens 6 white king Black pieces use negative values -1 black pawn -2 black knight etc 8| -4 -2 -3 -5 -6 -3 -2 -4 7| -1 -1 -1 -1 -1 -1 -1 -1 6| 0 0 0 0 0 0 0 0 5| 0 0 0 0 0 0 0 0 4| 0 0 0 0 0 0 0 0 3| 0 0 0 0 0 0 0 0 2| 1 1 1 1 1 1 1 1 1| 4 2 3 5 6 3 2 4 ------------------------- 1 2 3 4 5 6 7 8 Piece moves can be calculated by using the array indexes. For example the white pawns move by increasing the row index by 1, or by 2 if it's the pawn's first move. So the white pawn on [2][1] could move to [3][1] or [4][1]. However this simple 8x8 array representation of has chessboard has several problems. Most notably when you're moving 'sliding' pieces like rooks, bishops and queens you need to constantly be checking the indexes to see if the piece has moved off the board. Most chessprograms today, especially those that run on a 64 bit CPU, use a bitmapped approach to represent a chessboard and generate moves. x88 is an alternate board model for machines without 64 bit CPUs.
How do I retrieve data sent to the web server in ASP.NET?
|asp.net|
What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?
You should always go for readability first. The shape of a system will typically evolve as you develop it, and the real performance bottlenecks will be unexpected. Only when you have the system running and can see real evidence - as provided by a profiler or other such tool - will the best way to optimise be revealed. "If you're in a hurry, take the long way round."
An interface is a contract between the implementation and the user of the implementation. By using an interface, you allow the implementation to change as much as it wants as long as it maintains the contract for the users. It also allows multiple implementations to use the same interface so that users can reuse code that interacts with the interface.
In VB.NET For POST requests: value = Request.Form("formElementID") For GET requests: value = Request.QueryString("formElementID")
You don't say what language you're talking about, but in something .NETish, then it's no more work to return an IList than a List<T> or even an ArrayList, though the mere mention of that obsolete class makes me think you're not talking about .NET.
@ Jason You may as well return IList<> because an array actually implements this interface.
> Programs must be written for people to read, and only incidentally for > machines to execute. <br> &nbsp; &mdash; Abelson & Sussman, SICP Well written programs are probably easier to <a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#When_to_optimize">profile and hence improve performance</a>.
"Premature optimization is the root of all evil." - Donald Knuth
at times when optimization is necessary, i'd rather sacrifice compactness and keep the performance enhancement. perl obviously has some deep waters to plumb in search of the conciseness/performance ratio, but as cute as it is to write one-liners, the person who comes along to maintain your code (who in my experience, is usually myself 6 months later) might prefer something more in the expanded style, as documented here: [http://www.perl.com/pub/a/2004/01/16/regexps.html][1] [1]: http://www.perl.com/pub/a/2004/01/16/regexps.html
Is there a Way to use Linq to Oralce
|linq|oracle-database|
I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL. Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?
Is there a Way to use Linq to Oracle
|oracle-database|linq|
Just to extend the previous answer... If, for whatever reason, the assignments need to be part of the conditional, you'd want to write it thusly: $condition ? ($a=2) : ($a=3); This would be useful if you're assigning to different variables based on the condition. $condition ? ($a=2) : ($b=3); And if you're choosing the variable, but assigning the same thing no matter what, you could even do this: ($condition ? $a : $b) = 3;
I use generic lists for almost all scenarios. The only time that I would consider using a derived collection anymore is if I add collection specific members. However, the advent of LINQ has lessened the need for even that.
First of all, I am not completely sure I follow, you might need to provide some additional details to help us understand what is happening and what the problem is. I guess I am not sure I understand exactly what you're trying to accomplish and what the problem is. Second, you shouldn't need to set the dialog's parent since that is essentially what is happening with the call to Create (passing the parent). The dialogs you're describing sound like they could use some "re-thinking" a bit to be honest. Is this dialog to enter the properties of the image a child of the source window, or the WYSIWYG window?
@nlucaroni: hg transplant doesn't seem to be supported by the version of HG I am using: version 1.0.1+20080525 I was able to combine my two repositories in this way: 1) Use "hg clone first_repository" to clone one of the repositories. 2) Use "hg pull -f other_repository" to pull the code in from the other repository. The -f (force) flag on the pull is the key -- it says to ingore the fact that the two repositories aren't from the same source
I was able to combine my two repositories in this way: 1) Use "hg clone first_repository" to clone one of the repositories. 2) Use "hg pull -f other_repository" to pull the code in from the other repository. The -f (force) flag on the pull is the key -- it says to ingore the fact that the two repositories aren't from the same source
NxBRE is one option. http://sourceforge.net/projects/nxbre/#item3rd-5
Static methods are not instance methods. There's no instance context, therefore to implement it from the interface makes little sense.
I'll answer your question with an example. Suppose we had a Math class with a static method add. You would call this method like so: Math.add(2, 3); If Math were an interface instead of a class, it could not have any defined functions. As such, saying something like Math.add(2, 3) makes no sense.
I would suggest if you are going for a PHP and MySQL install to instead use [WAMP][1]. It works great and is easy to add extensions and modify everything. I use it for work and love it. [1]: http://www.wampserver.com/en/ "WAMP"
The reason why you can't have a static method in an interface lies in the way Java resolves static references. Java will not bother looking for an instance of a class when attempting to execute a static method. This is because static methods are not instance dependent and hence can be executed straight from the class file. Given that all methods in an interface are abstract, the VM would have to look for a particular implementation of the interface in order to find the code behind the static method so that it could be executed. This then contradicts how static method resolution works and would introduce an inconsistency into the language.
I'm trying to write a custom WPF ValidationRule to enforce that a certain property is unique within the context of a given collection. For example: I am editing a collection of custom objects bound to a ListView and I need to ensure that the Name property of each object in the collection is unique. Does anyone know how to do this?
If you application uses the JEE stack and you are using [Hibernate][1] you can use the [Compass Framework][2] maintain a searchable index of your database. The Compass Framework uses [Lucene][3] under the hood. The only catch is that you cannot replicate your search index. So you need to use a clustered database to hold the index tables or use the newer grid based index storage mechanisms that have been added to the Compass Framework 2.x. [1]: http://hibernate.org [2]: http://www.compass-project.org [3]: http://lucene.apache.org
This is specific to a C# project, but I ignore these files/directories: - *.csproj.user - /obj/* - /bin/* - *.ncb - *.suo I have no problems running the code in the depot on other machines after I ignore all of these files. The easiest way to find out what you need to keep is to make a copy of the folder and start deleting things you think aren't necessary. Keep trying to build, and as long as you can build successfully keep on deleting. If you delete too much, copy it from the source folder. In the end you'll have a nice directory full of the only file that have to be committed.
I use a CSS class instead: <input type="text" id="BeginDate" class="calendar" /> <input type="text" id="EndDate" class="calendar" /> Then, in your document.ready function: $('.calendar').datepicker(); Using it that way for multiple calendar fields works for me.
[.NET 3.5 SP1 tries to use the action="" attribute][1] (.NET 3.5 RTM did not). So, when you deploy, your code is attempting to set the HtmlForm.Action property and failing, as the System.Web.dll on the deploy target is RTM and does not have a setter on the property. [1]: http://john-sheehan.com/blog/index.php/less-code-is-fun-aspnet-35-sp1-removes-need-for-control-adapter-when-using-url-rewriting/
[Frank Krueger][1] writes: > Gaius: A Null Pointer exception gets thrown for you automatically by the runtime, there is no benefit to testing that stuff in the function prologue. I have two responses to this: 1. Null was just an example. For square(x), I'd want to test that the square root of the result is (approximately) the value of the parameter. For setters, I'd want to test that the value actually changed. For atomic operations, I'd want to check that all component operations succeeded or all failed (really one test for success and n tests for failure). For factory methods in weakly-typed languages, I want to check that the right kind of object is returned. The list goes on and on. Basically, anything that can be tested in one line of code is a very good candidate for a code contract in a prologue comment. 2. I disagree that you shouldn't test things because they generate runtime exceptions. If anything, you *should* test things that might generate runtime exceptions. I like runtime exceptions because they make the system [fail fast][2], which helps debugging. But the `null` in the example was a result value for some possible input. There's an argument to be made for never returning `null`, but if you're going to, you should test it. [1]: http://stackoverflow.com/users/338/frank-krueger [2]: http://en.wikipedia.org/wiki/Fail-fast
I know this is not possible for alert(), so I guess it is not possible for confirm either. Reason is security: it is not allowed for you to change it so you wouldn't present yourself as some system process or something.
Dynamic robots.txt
|seo|
Let's say I have a web site for hosting community generated content that targets a very specific set of users. Now, let's say in the interest of fostering a better community I have an off-topic area where community members can post or talk about anything they want, regardless of the site's main theme. Now, I _want_ most of the content to get indexed by Google. The notable exception is the off-topic content. Each thread has it's own page, but all the threads are listed in the same folder so I can just exclude search engines from a folder somewhere. It has to be per-page. A traditional robots.txt file would get huge, so how else could I accomplish this?
<http://www.elandsys.com/resources/sendmail/smarthost.html> > Sendmail Smarthost > > A smarthost is a host through which > outgoing mail is relayed. Some ISPs > block outgoing SMTP traffic (port 25) > and require their users to send out > all mail through the ISP's mail > server. Sendmail can be configured to > use the ISP's mail server as the smart > host. Read the linked article for instruction for how to set this up.
I would highly recommend reading the book [PHP In Action][1]. It takes you through abstracting your database connections, templating systems and all the other basics of a web application. If every PHP developer read this book then the language would have a much better reputation. It also has chapters on refactoring, unit testing and the MVC control pattern. [1]: http://www.manning.com/reiersol/
jQuery: Can you select by CSS rule, not class?
|jquery|selector|javascript|
A .container can contain many .components, and .components themselves can contain .containers (which in turn can contain .components etc. etc.) Given code like this: $(".container .component").each(function() { $(".container", this).css('border', '1px solid #f00'); }); What do I need to add to the line within the braces to select only the nested .containers that have their width in CSS set to 'auto'? I'm sure it's something simple, but I haven't really used jQuery all that much.
|javascript|jquery|css-selectors|
< META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> This will work for all well-behaving search engines, just add it to the head.
I side-stepped this problem completely by building my Qt app statically on MacOSX. That might not be practical for you though.
Simlarly to @James Marshall's suggestion - in ASP.NET you could use an HttpHandler to redirect calls to robots.txt to a script which generated the content.
Matthew has the correct approach here. In my opinion, it is very unusual for an application to reset a sequence's current value after every use. Much more conventional to set the increment size to whatever you need upfront. Also, this way is much more performant. Selecting nextval from a sequence is a highly optimised operation in Oracle, whereas running ddl to alter the sequence is much more expensive. I guess that doesn't really answer the last point in your edited question...
This looks like an issue with name resolution, try creating a public synonym on the table: CREATE PUBLIC SYNONYM *MyTempTable* for *MyTempTable*; Also, what exactly do you mean by **wrong result**, incorrect data, error message?
This looks like an issue with name resolution, try creating a public synonym on the table: CREATE PUBLIC SYNONYM *MyTempTable* for *MyTempTable*; Also, what exactly do you mean by **wrong result**, incorrect data, error message? ---------- Edit: What is the name of the schema that the required table belongs to? It sounds like the table that you are trying to select from is in a different schema to the one that belongs to the user you are connecting as.
An array would probably be fine. If you wanted more convenient means of "traversing" the board, you could easily build methods to abstract away the details of the data structure implementation.
[Fiddler][1] is a(nother) web proxy that can be used to degrade your connection. [1]: http://www.fiddler2.com/fiddler2/
As far as I have heared Google Chrome will have multithreaded javascript, so it is a "current implementations" problem.
I don't know of a way to embed powerpoint slides directly into html. However, there are a number of solutions online for converting a PPT file into a SWF, which can be embedded into HTML just like any other flash movie. [Googling for 'ppt to swf'][1] seems to give a lot of hits. Some are free, others aren't. Some handle things like animations, others just do still images. There's gotta be one out there that does what you need. :) [1]: http://www.google.com/search?source=ig&hl=en&rlz=&=&q=ppt+to+swf&btnG=Google+Search
I don't think (at least can't find a way to make) [Chris' answer][1] work in this case because ***do_div()*** actually changes the dividend in-place. Getting the absolute value implies a temporary variable whose value will change the way I require but can't be passed out of my ***__divdi3()*** override. I don't see a way around the parameter-by-value signature of ***__divdi3()*** at this point except to mimic the technique used by ***do_div()***. It might seem like I'm bending over backwards here and should just come up with an algorithm to do the 64-bit/32-bit division I actually need. The added complication here though is that I have a bunch of numerical code using the '/' operator and would need to go through that code and replace every '/' with my function calls. I'm getting desperate enough to do just that though. Thanks for any follow-up, Chad [1]: http://stackoverflow.com/questions/35463/how-to-divide-two-64-bit-numbers-in-linux-kernel#35472
> While each generated GUID is not > guaranteed to be unique, the total > number of unique keys (2^128 or > 3.4×10^38) is so large that the probability of the same number being > generated twice is very small. For > example, consider the observable > universe, which contains about 5×1022 > stars; every star could then have > 6.8×10^15 universally unique GUIDs. From [Wikipedia][1]. [1]: http://en.wikipedia.org/wiki/Globally_Unique_Identifier
> While each generated GUID is not > guaranteed to be unique, the total > number of unique keys (2^128 or > 3.4×10^38) is so large that the probability of the same number being > generated twice is very small. For > example, consider the observable > universe, which contains about 5×10^22 > stars; every star could then have > 6.8×10^15 universally unique GUIDs. From [Wikipedia][1]. [1]: http://en.wikipedia.org/wiki/Globally_Unique_Identifier
It is better to use a look-up table for obtaining the distance between two cities. This makes sense because * The Formula to calculate the distance ais quite computationally intensive.. * Distance between cities is unlikely to change. So unless you needs are very specific (like terrain mapping from a satellite or some or topography algorithm or something else), you should really just save the list of cities and distances between them, into a table and look it up as needed.
OU is an Organizational Unit (sort of like a Subfolder in Explorer), not a Group, Hence group1, 2 and 3 are not actually groups. You are looking for the DN Attribute, also called "distinguishedName". You can simply use DOMAIN\DN once you have that.
OU is an Organizational Unit (sort of like a Subfolder in Explorer), not a Group, Hence group1, 2 and 3 are not actually groups. You are looking for the DN Attribute, also called "distinguishedName". You can simply use DOMAIN\DN once you have that. Edit: For groups, the CN (Common Name) could also work. The full string from Active Directory normally looks like this: >cn=Username,cn=Users,dc=DomainName,dc=com (Can be longer or shorter, but the important bit is that the "ou" part is worthless for what you're trying to achieve.
This is a knapsack problem [(wikipedia to the rescue!)][1] The weights are the days in transit, and the profit should be $5000 - cost of leg. Eliminate all negative costs and go from there! MSN [1]: http://en.wikipedia.org/wiki/List_of_knapsack_problems
One option is to use a single subversion repository and check-in changes that effect both library and project at the same time. That way you know that whatever revision of the project you are on requires the same revision of the library.
Actually, since the size of material is fixed, but the requests are not, it's a bin packing problem. Again, [wikipedia to the rescue!][1] (Something I might have to look into for work too, so yay!) MSN [1]: http://en.wikipedia.org/wiki/Bin_packing
Use the [nant task][1], so you get one single build file. [1]: http://nant.sourceforge.net/release/0.85-rc1/help/tasks/nant.html
The GAC can also be used by assemblies that require elevated permissions to perform privileged operations on behalf of less trusted code (e.g. a partial trust ASP.NET application). For example, say you have a partial trust ASP.NET application which needs to perform a task that would require elevated privileges, i.e. Full Trust. The solution is to put the code that requires elevated privileges into a separate assembly. The assembly is marked with the ***AllowPartiallyTrustedCallers*** attribute and the class that contains the privileged logic is marked with the PermissionSet attribute, something like this: ***[PermissionSet(SecurityAction.Assert, Unrestricted=true)]*.** Our assembly would be given a strong name (signed) and then deployed into the GAC. Now our partially trusted app(s) can utilise the trusted assembly in the GAC to carry out a specific and narrow set of privileged operations without losing the benefits of partial trust. HTH
If you are on Microsoft plattform you could use the Indexing service. This integrates very easliy with IIS websites. It has all the basic features like full text search, ranking, exlcude and include certain files types and you can add your own meta information as well via meta tags in the html pages. Do a google and you'll find tons!
.Net - Detecting the Appearance Setting (Classic or XP?)
|vb.net|windows-xp|display.properties|appearance|