instruction
stringlengths
0
30k
Unfortunately, the lock file (ldb) must be created, updated and deleted. If a user with insufficient permissions opens the database, it will be locked for all other users, therefore all your users need Read/Write/Delete permissions on the back-end. EDIT The lock file must be created every time the database is opene...
Unfortunately, the lock file (ldb) must be created, updated and deleted. If a user with insufficient permissions opens the database, it will be locked for all other users, therefore all your users need Read/Write/Delete permissions on the back-end. EDIT #1 The lock file must be created every time the database is op...
Open-source radix/mtrie implementation in C?
|c|algorithm|data-structures|
I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. I would like to know if there's a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself.
How do you get a string from a MemoryStream?
|.net|vb.net|string|memorystream|
If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out?
VSTO wraps Office's Automation interfaces. Office is doing the work under the covers, so must be installed.
You can probably use `svn blame` to get the date each line was changed and then use `sed` to pull out only the year and month and then use `sort` and `uniq -c` to generate a useful report.
Security in what sense? Either way it really depends on what script is running and how well it is written. Too many scripts these days are half-assed and do not properly do input validation. I personally prefer FastCGI to mod_php since if a FastCGI process dies a new one will get spawned, whereas I have seen mod_php...
use a [StreamReader](http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx), then you can use the [ReadToEnd](http://msdn.microsoft.com/en-us/library/system.io.streamreader.readtoend.aspx) method that returns a string.
Stored procedures/DB schema in source control
|database|version-control|sql-server|
Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a chance (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I've begun using darcs for versioning, but I'd be curious about gene...
|sql-server|database|version-control|
Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a chance (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I've begun using darcs for versioning, but I'd be curious about gene...
In my experience, no; you just have to properly mutex yourself when you write to those values, or structure your program such that the threads will stop before they need to access data that depends on another thread's actions. My project, x264, uses this method; threads share an enormous amount of data but the vast ma...
|.net|
I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework. The project consist for the bigger part of VB.NET, but there are also parts in C#...
|c#|.net|winforms|vb.net|deprecated|
Take a peek at this [whitepaper][1] on evolving a .NET 2.0 application to 3.5. I hold that the changes from 1.1 to 2.0 are more significant, but the process should be similar. [1]: http://www.ythos.net/casestudy.aspx?CaseStudyId=12
There is a utility called isightcapture that runs from the unix command line that takes a picture from the isight camera and saves it. You can check it out at this web site: http://www.macupdate.com/info.php/id/18598 An example of using this with AppleScript is: tell application "Terminal" do script "/Appl...
Most of the code should still compile except for a few warnings about stuff being obsolete. But there are a couple of things you should look out for with respect to Visual Studio generated code. If you've generated strongly typed datasets in Visual Studio 2003 you can forget about editing them in newer versions o...
AJAX Dropdowns (HTML Select) in Firefox with JQuery
|jquery|ajax|html-select|
Help! I am using JQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actually appends the information below my existing option - "Select An <It...
You should use extern "C" anytime that you include a header defining functions residing in a file compiled by a C compiler, used in a C++ file. (Many standard C libraries may include this check in their headers to make it simpler for the developer) For example, if you have a project with 3 files, util.c, util.h, and...
1. Read and follow the [Become an Xcoder][1] tutorial. 2. Read [Cocoa Programming for the Mac OS X][2] and type in all the code. 3. You can also watch [CocoaCast][3] if you would like to watch how programming is done instead of just reading it. 4. The Cocoa documentation in apple's developer website is also a very g...
LinqToSql and full text search
|linq-to-sql|full-text-search|
Has anyone come up with a good way of performing full text searches (`FREETEXT() CONTAINS()`) for any number of arbitrary keywords using standard LinqToSql query syntax? I'd obviously like to avoid having to use a Stored Proc or have to generate a Dynamic SQL calls. Obviously I could just pump the search string i...
Does LinqToSql support full text search?
LinqToSql and full text search
LinqToSql and full text search - can it be done?
Has anyone come up with a good way of performing full text searches (`FREETEXT() CONTAINS()`) for any number of arbitrary keywords using standard LinqToSql query syntax? I'd obviously like to avoid having to use a Stored Proc or have to generate a Dynamic SQL calls. Obviously I could just pump the search string i...
I maintain an ms-access application splitted to frontend and backend files. The frontend file is in the users conputers. The backend file is in a shared folder in the server. What is the lowest permissions required? can I give some of the users only read-only permissions in that folder? (or hide it from them in...
I would second the Magento suggestion. It has a modern code base and is designed with extensibility in mind. It also has multi-site, multi-language capabilities engineered in from the start. It's open source _and_ seems to have a disciplined development team (with a MySQL AB -like business model) behind it .
MVC Retrieve Model On Every Request
|asp.net-mvc|mvc|
Let’s say I'm developing a helpdesk application that will be used by multiple departments. Every URL in the application will include a key indicating the specific department. The key will always be the first parameter of every action in the system. For example http://helpdesk/HR/Members http://helpdesk/HR/M...
|asp.net|asp.net-mvc|mvc|
You should take a look at how to make ASP.NET MVC work on the specific version of IIS your're planning to use. There's a whole page on the topic (Using ASP.NET MVC with Different Versions of IIS) on [http://www.asp.net/learn/mvc/tutorial-08-vb.aspx][1] [1]: http://www.asp.net/learn/mvc/tutorial-08-vb.aspx
Is there a cross-language TDD solution?
|tdd|cross-language|
I want to write a simple colour management framework in C#, Java and AS3. I only want to write the unit tests once though, rather than recreating the unit tests in JUnit, FlexUnit and say NUnit. I have in mind the idea of say an xml file that defines manipulations of "instance" and assertions based on the state of ...
What about what [C++ FAQ](http://www.parashift.com/c++-faq-lite/pointers-to-members.html) says?
One way is to use IFrames to show the ads, and use meta tags in them to tell that Google should not index them. Another way whould be to use javascript to print the ads, so they whould not be there when the browser does not support java (Google Bot dont execute java) Alot of Ad-systems use the javascript one, but...
Do you use the Inductive User Interface pattern in Windows Forms?
|.net|winforms|user-interface|usability|
And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: - [Microsoft Inductive User Interface Guidelines][1] - [IUIs and Web-Style Navigation in Windows Forms, Part 1][2] ...
What is the difference between precedence, associativity, and order?
|c#|arithmetic-expressions|
This confusion arises as most people are trained to evaluate arithmetic expressions as per PEDMAS or BODMAS rule whereas arithmetic expressions in programming languages like C# do not work in the same way. What are your takes on it?
I would say that something that is meant to be sometimes used as a Map and sometimes as a Set should implement Map, since that can be viewed as a set of keys or values as well as a mapping between keys and values. That is what the Map.containsKey() and Map.containsValue() methods are for.
I was thinking about this a little more and realised that while dynamic proxies will work (it's how RMI (used?) to work), if you really want this sort of functionality you would be better off looking at aspect oriented programming (AOP) using something like AspectJ (eclipse.org/aspectj). This way you can get several...
If I had to pick one, it would have to be AWK. It's lightweight, has a small learning curve and has many useful functions like index and substr.
I'm a huge fan of Castle. I love the facilities it also provides beyond the IoC Container story. It really simplfies using NHibernate, logging, AOP, etc. I also use [Binsor][1] for configuration with Boo and have really fallen in love with Boo as a language because of it. [1]: http://www.ayende.com/Blog/a...
<http://stackoverflow.com/questions/36778/firefox-vs-ie-innerhtml-handling#36793> ?
Unless you have a strong reason for refactoring (because you are going to add more classes like those in near future) the penalty of changing the design for such a small and contrived example would overcome the gain in maintenance or overhead in this scenario. Anyhow here is a possible design based on generic and lambd...
This isn't a gotcha, it's more of a heads up. .NET v3.0 and v3.5 are not new CLRs but simply an added set up assemblies, compilers, resources etc... **Both .NET v3.0 AND v3.5 use the v2.0 CLR.** Because of this you won't be able to say set an IIS App Pool to use a v3.5 CLR...cause it doesn't exist. Discussed in a...
We're looking at doing the same migration right now Tobi. First, you can get a good idea of what to expect by making a copy of your project (or a portion of it) and give it a "dry run" through the .NET 2.0 compiler. My experience with this was that the 2.0 compiler gives more warnings about bad programming practices ...
People say that the major thing TCP gives you is reliability. But that's not really true. The most important thing TCP gives you is congestion control: you can run 100 TCP connections across a DSL link all going at max speed, and all 100 connections will be productive, because they all "sense" the available bandwidth. ...
Slightly OT, hope you don't mind... I'm a Zend Framework user and I think it's worth saying that the loose coupling means you don't need to include any files you're not actively using. Hopefully this negates your concern about unnecessary overhead. With the layouts stuff added in a recent release of ZF, its temp...
|javascript|jquery|data-structures|graphs|layout|
What problems can be solved, or tackled more easily, using graphs and trees?
|algorithm|datastructure|graph|tree|computer-science|
What are the most common problems that can be solved with both these data structures? It would be good for me to have also recommendations on books that: - Implement the structures - Implement and explain the reasoning of the algorithms that use them Thanks!
|algorithm|data-structures|graph|tree|computer-science|
|algorithm|data-structures|graph|tree|computer-science|
Trouble using JRun to Host Java Servlets
|hosting|servlet|java|jrun|
I am being deploying new versions of java servlets with JRun as the host. I am having difficulty finding good sources for information about JRun and tutorials about how to configure and manage it. After installing JRun and opening the launcher it can't start the admin server that it creates by default...so obviously...
|java|hosting|servlet|jrun|
I am being deploying new versions of java servlets with JRun as the host. I am having difficulty finding good sources for information about JRun and tutorials about how to configure and manage it. After installing JRun and opening the launcher it can't start the admin server that it creates by default...so obviously...
|java|hosting|servlets|jrun|
What is the meaning of the type safety warning in certain Java generics casts?
|java|generics|casting|type-safety|warning|
What is the meaning of the Java warning "Type safety: The cast from Object to List<Integer> is actually checking against the erased type List"? I get it when I try to cast an Object to a type with generic information, such as in the following code: Object object = getMyList(); List<Integer> list = (List<In...
|java|generics|warnings|casting|type-safety|
Return function pointer to a nested function in C
|c|pointer|nested|
As the title already states, I'm trying to declare a nested function and return a pointer to that function. I want this function 'not' to return a new function pointer which will return the negation of whatever the original function was. Here is what I have: someType not( someType original ) { int is...
I have a problem with inline vs included Javascript
|javascript|
I am relatively new to javascript and am trying to understand how to use it correctly. If I wrap js code in an anonymous function to avoid making variables public the functions within the js are not available from within the html that includes the js. On initially loading the page the js loads and is executed but on s...
Remote Installation Services and/or Windows Deployment Services. One or the other comes "free" with Windows Server (RIS with Windows Server 2003 SP1 or earlier; WDS with Windows Server 2003 SP2 or later), and is pretty easy to set up and use. :-) Requires your computers to support PXE booting, however.
Oh here's a good one: since the XML serialization code is generated and placed in a separate DLL, you don't get any meaningful error when there is a mistake in your code that breaks the serializer. Just something like "unable to locate s3d3fsdf.dll". Nice.
Folder with Extension
|windows|registry|
I'm looking to have windows recognize that certain folders are associated to my application - maybe by naming the folder 'folder.myExt'. Can this be done via the registry? A bit more info<br> - This is for a x-platform app ( that's why I suggested the folder with an extension - mac can handle that ) <br> - The ...
You can create "Unattended Install" disks for XP to setup configurations, base software and more. There's info on this at http://unattended.msfn.org/unattended.xp/ .. just write a lot of CDs and pop em in the drives. The installs go automatically from start to finish as the name implies. You just have to cross your fin...
ResourceBundle from Java/Struts and replace expressions
|java|jakarta-ee|struts|resourcebundle|
If I have a Resource bundle property file: A.properties: thekey={0} This is a test And then I have java code that loads the resource bundle: ResourceBundle labels = ResourceBundle.getBundle("A", currentLocale); labels.getString("thekey"); How can I replace the {0} text with some value ...
Recommendation on Tools to migrate from Clearcase to SVN?
|svn|migration|clearcase|
I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would like to get all history information, or as much as can be acquired. Incremental merges would be very beneficial but isn't required.
The only issue I've seen is with name conflicts. You'll need to dis-ambiguate any class or method names in your code that share names with ones added to the .net framework between .net 2.0 and 3.5
In addition to the app configuration stuff mentioned above, if you use any XSD validation you will need to replace some code around loading and validating XML.