instruction
stringlengths
0
30k
Windows generally protects shares via two methods - permissions on the share itself, and then NTFS file permissions. Good practice would be to have the share permissions as "Authenticated User" and remove the "Everyone" group. Personally I would make sure that usernames and passwords match up on each computer, and ...
Can Visual Studio 2008 work with Team System 2005?
|visual-studio|visual-studio-team-system|
I would like to upgrade my team from VS2005 to VS2008 without touching the version of Team Server which is 2005. Is that possible? And if so, how do I tell VS to recognize TFS ? Currently in my VS2008 options menu, I don't have any source control to choose from...
No way to do this. Windows abstracts this for you. As mentioned, you need to write/modify a device driver.
Have you tried the 'pause' command? @echo off echo hello world pause - more info on 'pause' : [http://technet.microsoft.com/en-us/library/bb490965.aspx][1] - DOS Command Line reference A-Z : [http://technet.microsoft.com/en-us/library/bb490890.aspx][2] [1]: http://technet.microsoft.com/e...
Have you tried doLayout() method of FormPanel?
Triangulation is he obvious answer, but it's hard to write a solid triangulator. Unless you have two month time to waste don't even try it. There are a couple of codes that may help you: The GPC Library. Very easy to use, but you may not like it's license: http://www.cs.man.ac.uk/~toby/alan/software/gpc.html ...
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable devic...
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable devic...
The converter from Telerik works well. http://converter.telerik.com/<br> http://converter.telerik.com/batch.aspx
[Textmate][1] is an editor like BBEdit **but** it has the ability to run commands such as compilation, debugging, refactoring (though it will do so via XCode). It also has code completion. In addition, you can write your own commands for Textmate that you can then run. [1]: http://macromates.com/
Unless there's a language where the empty program causes a stack overflow, the following should be the shortest possible. Befunge: : Duplicates the top stack value over and over again.
Unless there's a language where the empty program causes a stack overflow, the following should be the shortest possible. Befunge: : Duplicates the top stack value over and over again. edit: Patrick's is better. Filling the stack with 1s is better than filling the stack with 0s, since the interpreter...
apt-cache search libgluezilla libmono-mozilla0.1-cil - Mono Mozilla library From the package description: Description: Mono Mozilla library Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Novell. Mono ...
The HttpUtility.HtmlEncode will happen too late, assuming you are getting the exception on postback of code from the client. You can run some javascript on the client to pre-encode the server Postback. See the following link for a quick example: [Comparing escape(), encodeURI(), and encodeURIComponent()][1] [...
My quick and dirty solution to this problem was to run a loop that matches my list of custom tags with a regular expression. The regexp doesn't catch tags that have another inner custom tag inside them. When there is a match, a function to process that tag is called and returns the "processed HTML". If that custom ...
import imp foo = imp.load_source('module.name', '/path/to/file.py') foo.MyClass() There are equivalent convenience functions for compiled Python files and DLLs.
You can use the load_source(module_name, path_to_file) method from [imp module][1]. [1]: http://docs.python.org/lib/module-imp.html
Personally I made some rather big projects with Django, but I can compare only with said "montrosities" (Spring, EJB) and really low-level stuff like Twisted. Web frameworks using interpreted languages are mostly in its infancy and all of them (actively maintained, that is) are getting better with every day.
I don't really know about SQL Server web synchronization, but as SQL Express don't have an SQL Server Agent, you can write a C# console application that runs with the scheduled tasks.
The easiest way would be to use a non-server-side &lt;form&gt; tag with the method="get" then when the form was submitted you would automatically get the querystring you are after (and don't forget to add &lt;label&gt; tags and associate them with your radio buttons): <form action="..." method="get"> <i...
Attribute.IsDefined(typeof (YourClass), typeof (SerializableAttribute)); Probably involves reflection underwater, but the most simple way?
You have to loop over all assemblies that you are interested in. From the assembly you can get all the types it defines. Note that when you do AppDomain.CurrentDomain.Assemblies you only get the assemblies that are loaded. Assemblies are not loaded until they are needed, so that means that you have to explicitly load t...
I've just been recovering my XPath skills- this <a href="http://www.mulberrytech.com/quickref/">Xslt and XPath Quick Reference sheet</a> is quite a useful reference - it doesn't go into depth but it does list what is available and what you might want to search for more information on. The w3schools tutorial linked p...
You can use svn+ssh:, and then it's based on access control to the repository at the given location. This is how I host a project group repository at my Uni, where I can't setup anything else. Just having a directory that the group owns, and running svn-admin (or whatever it was) in there means that I didn't need t...
stick all your options in an enum, the have something like the following GetEmployeeName(Enum identifier) { switch (identifier) case eBatchID: { // Do stuff } case eSSN: { } case eEmailId: { } cas...
This looks like an "I wouldn't start from here" kind of a question. The "install Excel on the server and start coding" answer looks like the only route, but it simply has to be worth exploring alternatives first: it's going to be painful, expensive and time-consuming. I strongly feel that we're looking at a "requ...
Not the direct answer to your question, but have you tried using [File::Temp][1]? It is specifically designed to work on any OS. [1]: http://search.cpan.org/dist/File-Temp/
Underscores aren't actually valid in internet host names, despite some people using them anyway. A sane DNS server should not allow you to have records for them. Change your system's host name so it's valid, hopefully this will fix it.
It's possible that the two machines have different versions of an underlying dll that isn't part of your build process. I've seen this happen when distributing services across our internal server farm.
The app uses the Regional Settings of the machine it's running on, and it looks like it is your problem. You can force a thread to use a specific culture by setting System.Threading.Thread.CurrentThread.CurrentCulture and System.Threading.Thread.CurrentThread.CurrentUICulture to a specific value.
I had the chance to play around with QF-TEST once. It is commercial, but offers a lot of functionality. Maybe you have a look at it: [http://www.qftest.de/en/index.html][1] [1]: http://www.qftest.de/en/index.html
I had a similar problem once (except in C++) When I compared the sizes of the compiled executables, they were way off. Unfortunately, after days of searching, the best solution I found was to uninstall VS05 and re-install it.
There are a lot of different options here. Where I work we use #if pragmas but it could also be done with separate assemblies for the separate versions. Ideally you would at least keep the version defendant code in separate partial class files and make the correct version available at compile time. I would enforce ...
There are a lot of different options here. Where I work we use #if pragmas but it could also be done with separate assemblies for the separate versions. Ideally you would at least keep the version dependant code in separate partial class files and make the correct version available at compile time. I would enforce ...
dbunit (www.dbunit.org) does go from sql to xml and vice versa; you might be able to modify it more for your needs.
Frequently you can solve circular reference issues by using setter injection instead of constructor injection. In pseudo-code: Foo f = new Foo(); Bar b = new Bar(); f.setBar(b); b.setFoo(f);
Probably best to go all the way and improve the variable names: foreach (object obj in collectionOfRelatedObjects) { if (obj is ISomethingable) continue; //do something to/with the not-ISomethingable }
is there a curl/wget option that says not to save files upon http errors?
|scripting|curl|wget|
I want to download a lot of urls in a script but I do not want to save the ones that lead to HTTP errors. as far as I read in the man they both don't provide such functionality. does anyone know about another downloader who does?
Iterators are one of the many design patterns available in java. Design patterns can be thought of as convenient building blocks, styles, usage of your code/structure. To read more about the Iterator design pattern check out the this website that talks about Iterator as well as many other design patterns. Here is ...
J D OConal's is the best way to do this but as a side note, you can use the as keyword to cast an object, and it'll return null if its not of that type. So something like: foreach (ParentType parentType in collectionOfRelatedObjects) { var obj = (parentType as ISomethingable); if (obj == nul...
[java2s][1] is the best according to me. because - 1) Like mrlinx said "almost always has a sample on common stuff" 2) Stuffs are nicely organized by category, so, you can easily find out what you are looking for. 3) You can find codes for latest version of JDK [1]: http://www.java2s.com/
If you're small, then yeah, find when your lowest usage period is, and do it then (for us personally, usually around 1AM-3AM PST is the lowest dip...but it never drops to 0 of course). Once you start growing to having a larger userbase, if you want people to take you seriously you'll need to design your application suc...
Multiple forms on ASP.NET page
|asp.net|webforms|
Coming from a Classic ASP background, I'm used to multiple forms on a page, but this clearly limited in a ASP.NET page. However, I have a situation where I have a form that gathers input from the user, saves the data to a DB, and afterwards I want to render (and tweak the values of) a special form that posts to the ...
As Will and Marty say, the automatic was intended for recursive functions. However, there may be a simulator issue while using non recursive functions that can be solved by using automatic. If the same function is called with different values and processed by the simulator in the same time slice, the returned val...
As Will and Marty say, the automatic was intended for recursive functions. If a normal (i.e. not automatic) function is called with different values and processed by the simulator in the same time slice, the returned value is indeterminate. That can be quite a tricky bug to spot! This is only a simulation issue, whe...
XMP library for ruby
|ruby|xmp|
Could any one recommended an open source library that allows me add XMP metadata to JPEG images? Thanks.
What is the value of href attribute in openid.server link tag if Techorati OpenID is hosted at my site?
|openid|
I want to log in to Stack Overflow with Techorati OpenID hosted at my site. http://stackoverflow.com/users/login has some basic information. I understood that I should change <link rel="openid.delegate" href="http://yourname.x.com" /> to <link rel="openid.delegate" href="http://technorati.com/peo...
Screen capture doesn't work on MFC application in Vista
|windows-vista|mfc|visual-c++|
We've got some in-house applications built in MFC, with OpenGL drawing routines. They all use the same code to draw on the screen and either print the screen or save it to a JPEG file. Everything's been working fine in Windows XP, and I need to find a way to make them work on Vista. In three of our applications, e...
Follow the DB treatment: null == <anything> is always false
Seems odd that, though I cannot change the name of the Person object, I can simply grab its controller and change it there. That's not a good way to secure your object's data. But, notwithstanding, here's a way to do it: /// <summary> /// A controlled person. Not production worthy code. /// ...
Depending on who the end user is you have a few options: 1. Shipping DVD's This option tends to be rather expensive, and may not be the best way, what if you are shipping it to someone that no longer has the software installed. 2. HTTP hosting (using Akamai, or any other CDN) This works rather well for ...
Depending on the system configuration, size of CHAR mesured in BYTES can vary. In your examples: <ol> <li>Limits field to 11 <b>BYTE</b></li> <li>Limits field to 11 <b>CHAR</b>acters</li> </ol> <hr/> Conclusion: 1 CHAR is not equal to 1 BYTE.<br/><br/>
Define the goal for the project. Sounds like you are looking almost exclusively at the solution rather than the problem. A program isn't useful to you or anyone else unless it addresses some problem. Writing code to get moving is great, but you appear to lose interest and focus after you start -- because you're look...
MinGW "stdio.h : No such file or directory"
|c|compiler-construction|
I am trying to use MinGW to compile a C program under Windows XP. The gcc.exe gives the following error: **stdio.h : No such file or directory** The code (hello.c) looks like this: #include < stdio.h > void main() { printf("\nHello World\n"); } I use a batch file to call gcc. T...
One approach I'm considering is having my application start up a lightweight OSGi container, which if I understand correctly would be able to discover what plugin JAR files exist in a designated folder, which in turn would let me list them for the user to choose from. Is this feasible?
One approach I'm considering is having my application start up a lightweight OSGi container, which if I understand correctly would be able to discover what plugin JAR files exist in a designated folder, which in turn would let me list them for the user to choose from. Is this feasible? I also found [this article][1]...
You may use swt.custom.StyledText. That has many features to change the look of the text. But I don't think it can load or save RTF right now. I once wrote an HTML editor with it, but it is quite difficult, since the StyledText model to add styles to a part of the text is so alien compared to the way HTML/RTF works....
You could use a feature in Oracle called <a href="http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm">Flashback</a> which allows you to create a restore point, which you can easily jump back to after you've done testing. Quoted from the site, > Flashback Database is like a 'rewind ...
Using Linq: int[] numbers = Enumerable.Range(9,10000) .Where(x => x % 3 == 0) .Take(20) .ToArray(); Also easily parallelizeable using PLinq if you need: int[] numbers = Enumerable.Range(9,10000) .AsParallel() //added this line .Where(x => x % 3 == 0...
The best method is dd MMM yyyy (ie 15 Sep 2008). This means there is no possiblity of getting it wrong for different Locals. ds.select(DBDate = '15 Sep 2008') You can use the DateFormat function to convert to long date format as well and this will work fine too.
you can use offsetLeft and offsetTop
How do I clone all remote branches with Git?
|git|
I have a master and a dev branch, both pushed to github, I've cloned, pulled, fetched, but I remain unable to get anything other than the master branch back. I'm sure I'm missing something obvious, but I have RTM any I'm getting no joy at all. ---
This isn't an exact answer, but some relevant notes I've made from investigating FLV files for a business requirement. Most FLV audio is encoded in the MP3 format, meaning you can extract it directly from the FLV container. If the FLV was created from someone recording from their microphone, the audio is encoded wit...
If you know you're going to be sorting on a single value ascending and descending, then set is your friend. Use a reverse iterator when you want to "sort" in the opposite direction. If your objects are complex and you're going to be sorting in many different ways based on the member fields within the objects, then ...
I second log4php. I typically have it configured to send things like exceptions to ERROR or CRITITCAL and have them written to syslog. From there, you can have your syslog feed into [Zenoss][1], [Nagios][2], [Splunk][3] or anything else that syslog can talk to. [1]: http://www.zenoss.com/ [2]: http://www.nagi...
How to programmatically configure an ODBC Datasource using C#
|c#|.net|odbc|
Is there any way to create a ODBC DSN with C#? Maybe a P/invoke?
I tend to use anonymous namespaces when creating helper functions. Since they should (generally) only be seen by the module that cares about them, its a good way to control dependencies.
My guess is that you're re-using a static field on a class to hold the connection string. Those static fields are re-used across multiple IIS requests so you're probably only ever seeing the most recently logged in user in the 'last updated by'. BTW, unless you have a REALLY good reason for doing so then you should...
Back in the day, we'd use a specific "lock server" on the network to handle this. Bleh. Your database server might have resources specifically for doing this kind of thing. MS-SQL Server has application locks usable through the _sp\_getapplock_/_sp\_releaseapplock_ procedures.
HTTP GET in VB.NET
|vb.net|http-get|
What is the best way to issue a http get in VB.net? I want to get the result of a request like http://api.hostip.info/?ip=68.180.206.184
I did this in a Java program a few years back, and the way I did it was to PUT a VCALENDAR document into the folder. One quirk is that the VCALENDAR had to be enclosed within an RFC822 message. It's a bizarre combination of WebDAV, email, and iCAL/VCAL, but it worked at the time on Exchange 2003 hosted at Link2Exchan...
The tips for using a VM enviroment is the best: no worries about deinstalling. Just install a complete Oracle enviroment and after one succesfull run: winrar the VM ... after corrupting the Oracle home once again: just delete the current VM and unrar the backup
Do you only count Bank Hours too? 9AM - 3PM? Or is it 24 hours a day?
You should try the [HttpWebRequest][1] class. [1]: http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx
Thanks for the input to everybody, you helped me a big step further. After following the guides you provided I got: **Run-time error: '-2147024894' (80070002)': File or assembly name AssemblyName, or one of its dependencies, was not found.** But I could fix that with this [Workaround][1]. [1]: http://support...
1. Try to see if you can take a very short break for a day or two and come back more refreshed. 2. Don't leave boring bits to the end 3. Test it yourself 4. Ensure that your diet/exercise/sleep/etc level don't get lower 5. Tell the others that you are feeling a bit down, can you swap areas of work for a day?
Save and Restore Form Position and Size
|.net|winforms|configuration|settings|
In a WinForms 2.0 C# application, what is the typical method used for saving and restoring form position and size in an application? Related, is it possible to add new User scoped application settings AT RUNTIME? I totally see how to add settings at design time, that's not a problem. But what if I want to create one...
Yes, you can... (We're doing that here too) - Tools -> Connect To Team Foundation Server - "Add..." - Enter IP / hostname