instruction
stringlengths
0
30k
Best way to license Microsoft software as a very small developer
|visual-studio|windows|licensing|microsoft|consulting|
I've recently switched from being an employee of a small consulting company to being an independent consultant and as time goes on I will need to upgrade Windows and Visual Studio. So what is the most affordable way to go about this for a small time developer? My previous boss suggested I get a TechNet Plus subscrip...
I've recently switched from being an employee of a small consulting company to being an independent consultant and as time goes on I will need to upgrade Windows and Visual Studio. So what is the most affordable way to go about this for a small time developer? My previous boss suggested I get a TechNet Plus subscrip...
Best way to license Microsoft software as an independent developer
|windows|visual-studio|microsoft|licensing|consulting|
This is to avoid confusion with `.ToString()` methods. For instance: double test = 1.54d; //string.Format pattern string.Format("This is a test: {0:F1}", test ); //ToString pattern "This is a test: " + test.ToString("F1"); If Format was an instance method on string this coul...
This is to avoid confusion with `.ToString()` methods. For instance: double test = 1.54d; //string.Format pattern string.Format("This is a test: {0:F1}", test ); //ToString pattern "This is a test: " + test.ToString("F1"); If Format was an instance method on string this coul...
Another possibility could be from side effects. Most min/max macros will include the parameters multiple times and may not do what you expect. Errors and warnings could also be generated. <PRE> max(a,i++) expands as ((a) > (i++) ? (a) : (i++)) afterwards i is either plus 1 or plus 2 </PRE> The () in the expans...
Dog should return a Leg not a DogLeg as the return type. The actual class may be a DogLeg, but the point is to decouple so the user of Dog doesn't have to know about DogLegs, they only need to know about Legs. Change: class Dog : Animal { public override DogLeg GetLeg() {...} } to: ...
Comparing with .asmx: WCF is the next generation of Microsoft's Web service development platform, which addresses many of the issues with older versions, specifically: - better interoperation, so you can interoperate with Web services that aren't from Microsoft or that are published on the Internet - much more flex...
Did you try `[textView sizeThatFits:textView.bounds]` ?
Did you try `[textView sizeThatFits:textView.bounds]` ? Edit: sizeThatFits returns the size but does not actually resize the component. I'm not sure if that's what you want, or if `[textView sizeToFit]` is more what you were looking for. In either case, I do not know if it will perfectly fit the content like you wan...
The first thing I would look at is whether you have any asp controls being displayed on the page. The doPostback function will only be put into the page if ASP thinks that one of your controls requires it.
The first thing I would look at is whether you have any asp controls being displayed on the page. The doPostback function will only be put into the page if ASP thinks that one of your controls requires it. If you aren't using one of those you can use: Page.ClientScript.GetPostBackClientHyperlink(controlName,...
The first thing I would look at is whether you have any asp controls (such as linkbutton, comboboxes,that don't normally generate a submit but requre a postback) being displayed on the page. **The __doPostback function will only be put into the page if ASP thinks that one of your controls requires it.** If you are...
Why can't you load the .net runtime into you process space? It is possible to host the .net runtime and call into .net using COM.
Do indexes work with "IN" clause
|sql|query|indexing|
If I have a query like: Select EmployeeId From Employee Where EmployeeTypeId IN (1,2,3) and I have an index on the EmployeeTypeId field, does SQL server still use that index?
While I do not have an algorithm for you, my first action would be to take a look at the process involved in entering a new contact. Perhaps users do not have an easy way to find the contact they are looking for. Much like on Stack Overflow's new question form, you could suggest contacts that already exist on the new c...
Binding Events to Event Handlers is usually your first introduction to delegates...You might not even know you were using them because the delegate is wrapped up in the EventHandler class.
I'm not sure if you can figure out the exact name of the build configuration. Howerver, if you use Debug.Assert(...), that code will only be run when you compile in debug mode. Not sure it that helps you at all.
Usually it would, unless the IN clause covers too much of the table, and then it will do a table scan. Best way to find out in your specific case would be to run it in the query analyzer, and check out the execution plan.
You can use [precompiler directives][1] within Visual Studio. The #if directive will allow you to determine if you are going to include code or not based on your custom solution configuration. [1]: http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx
Windows Mobile - What scripting platforms are available?
|windows-mobile|scripting|system-administration|administration|
We have a number of users with Windows Mobile 6 and need to apply minor changes. eg. update a registry setting. One option is push and execute an executable file using our device management software. I'd like this to be a little more friendly for the admins who are familiar with scripting in VBScript/JScript etc. Wh...
|scripting|system-administration|administration|windows-mobile|
|scripting|windows-mobile|system-administration|administration|
add a const value assign to a value that designate the configuration you are in. like #ifdef _ENABLE_CODE1_ const codeconfig = 1; #else const codeconfig = 2; #endif and add _ENABLE_CODE1_ in your configuration preprocessor.
A quick google search came up with this http://en.wikipedia.org/wiki/Delegation_pattern . Basically, anytime that you use an object that forwards it's calls to another object then you are delegating.
I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers. The plugin works like this: Whenever I open a source file I let the plugin parse the source's corresponding build file (this could be further developed with caching the pars...
Any information you can get about the user's environment can be fetched from System.getProperty("..."); For a list of what you can get, take a look here: [http://mgrand.home.mindspring.com/java-system-properties.htm][1] I don't think you'll be able to get the path you require (the All Users path) in an OS ...
Yep, you can do it across the 3 something like the below: SELECT page_tag.id, page.name, group_concat(tags.name) FROM tag,page, page_tag where page_tag.page_id = page.page_id AND page_tag.tag_id = tag.id; Has not been tested, and could be probably be written a tad more efficiently, but should get you sta...
You could use a treeview control and use a recursive XLinq algorithm to put the data in there. I've done that myself with an interface allow a user to build up a custom XML representation and it worked really well.
Is there a html opposite to noscript
|html|javascript|
Is there a tag in html that will only display its content if JavaScript is enabled? I know noscript works the opposite way around, displaying its html content when JavaScript is turned off. but I would like to only display a form on a site if JavaScript is available, telling them why they cant use the form if they don'...
SimpleModal breaks ASP.Net Postbacks
|jquery|asp.net|javascript|postback|simplemodal|
I'm using [jQuery](http://jquery.com/) and [SimpleModal](http://www.ericmmartin.com/projects/simplemodal/) in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their postbacks, which is not really acceptable. There is one source I've found...
|asp.net|javascript|jquery|postback|simplemodal|
I'm using [jQuery](http://jquery.com/) and [SimpleModal](http://www.ericmmartin.com/projects/simplemodal/) in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their postbacks, which is not really acceptable. There is one source I've found...
Compiling for a 64bit OS is an option in the compiler. You can absolutely compile to a 32bit exe from within Vista 64 bit. When you run the app, you can then see in the TaskManager that there is a "*32" next to the process...this means it's 32bit ;) I believe your managers need some more education on what 64bit OS...
There are two possible solutions here. 1. Add a constraint to the ignore route to make sure that only requests that should be ignored would match that route. Kinda kludgy, but it should work. RouteTable.Routes.IgnoreRoute("{folder}/{*pathInfo}", new {folder="content"}); 2. What is in your content directory...
As long as you compile your executables as 32 bit, they will run on both 32 bit and 64 Windows machines (guaranteed). Using 64 dev machines has the advantage that you can start testing your code with 64 bit compilation (to check for things like pointers casted to 32 bit integers), this way making the transition to 64 b...
Not an answer to your question, but possibly a solution to your problem: VirtualBox (and probably others) supports "seamless integration" mode, which just gives you a second start bar and lets you drag windows around freely. Also, and this is an answer to your question, it depends on your compile settings. You can c...
Recommended iPhone Development Resources
|iphone|
This is my first post here and I wanted to get some input from people doing iPhone development. Other than the Apple DevCenter, where are there good sites to learn iPhone developement? I know Apple has a tough NDA but there has to be people talking about writing applications for the iPhone. Thank you, Rob B...
|duplicate|
|iphone|duplicate|
|iphone|resources|
Craig Hockenberry (developer of Twitterrific) blogs about iPhone development issues at [furbo.org][1] [1]: http://furbo.org/
> Why is a code solution that works > getting voted down? Sure, it's ugly > ... Perhaps because as well as being ugly it isn't educational and **doesn't** work. Also, I suspect that like me, most people don't have the power to edit at present (and judging by the rank needed - never will). The use of an array c...
Although I use Vim, some of my cow-orkers use [SlickEdit](http://www.slickedit.com/) which looks pretty good. I'm not certain about integrated debugging because we wouldn't be able to do that on our particular project anyway. SlickEdit does have good support for navigating large code bases, with cross referencing an...
> could you clarify a little bit more how it was for you, what you had to change. Maybe you could point me in the right direction by providing some links to the information you used. My first source were actually the tools' `man` pages. Just type $ man toolname on the command line (`$` here is part of the ...
|javascript|html|
It's not possible to obtain 'true' random numbers, a computer is a logical construct that can't possibly create 'truly' random anything, only pseudo-random. There are better and worse pseudo-random algorithms out there, however. In order to obtain a 'truly' random number you need a physical random source, some gambl...
I believe that was on [thedailywtf.com][1] - ie. not something that you want to do. It is not possible to get a truly random number from pseudorandom numbers, no matter how many times you call randomize(). You *can* get "true" random numbers from special [hardware][2]. You could also collect entropy from mouse mo...
I think you may need to use multiple updates. Something like (not tested): select ID as 'PageId', Name as 'PageName', null as 'Tags' into #temp from [PageTable] declare @lastOp int set @lastOp = 1 while @lastOp > 0 begin update p set p.tags = isnull(tag...
Lets change this around a bit. If your program is trying to write to a file and failing you either need to change the location of the file to one where the user can write to, or check the correct rights when the program starts and refuse to run if the user doesn't have them. Trampling over the system permissions is not...
I have not done this, but here it goes. 1. Convert Visio file to Visio XML format. 2. Use [Dia for Windows][1] and [Dia VDX plug-in][2] to convert Visio XML into Dia. 3. Use [tedia2sql][3] to generate SQL. [1]: http://dia-installer.de/index_en.html [2]: http://www.redferni.uklinux.net/dia/vdx/ [3]: h...
[According to Wikipedia][1] `/dev/random`, in Unix-like operating systems, is a special file that serves as a true random number generator. The /dev/random driver gathers environmental noise from various non-deterministic sources including, but not limited to, inter-keyboard timings and inter-interrupt timings that ...
The finally block will always be called (well not really [always](http://thedailywtf.com/Articles/My-Tales.aspx) ... ) even if an exception is thrown or a return statement is reached (although that may be language dependent). It's a way to clean up that you know will always be called.
It means that the grouping is [atomic][1], throwing away backtracking information that would support non-possessive capturing. [1]: http://www.regular-expressions.info/atomic.html
It means that the grouping is [atomic][1], and it throws away backtracking information for a matched group. So, this expression is possessive; it won't back off even if doing so is the only way for the regex as a whole to succeed. It's "independent" in the sense that it doesn't cooperate, via backtracking, with other e...
You can't use an array. Or rather, you would need to pick a size, and if you ended up needing more then you would have to allocate a new, larger, array, copy the data from the old one into the new one, and continue on as before (until you exceed the size of the new one...) Generally, you would go with one of the co...
You can't use an array. Or rather, you would need to pick a size, and if you ended up needing more then you would have to allocate a new, larger, array, copy the data from the old one into the new one, and continue on as before (until you exceed the size of the new one...) Generally, you would go with one of the co...
I don't know if there's a universally preferred pattern. I tend to prefer adding the event to the view interface and having the presenter respond to the view. I described this pattern in [more detail here][1]. [1]: http://haacked.com/archive/2006/08/09/ASP.NETSupervisingControllerModelViewPresenterFromSchematicT...
You could write a custom route that derives from the Route class GetRouteData to strip dashes, but when you call the APIs to generate a URL, you'll have to remember to include the dashes for action name and controller name. That shouldn't be too hard.
Are you using javascript to communicate between frames/iframes which point to different domains? This is not permitted by the JS "same origin/domain" security policy. Ie, if you have `<iframe name="foo" src="foo.com/script.js">` `<iframe name="bar" src="bar.com/script.js">` And the script on bar.com tries to...
Do you really care about the individual data points? Or will using the statistical aggregate functions on the day number instead suffice to tell you what you wish to know? - [AVG][1] - [STDDEV_POP][2] - [VARIANCE][3] - [TO_DAYS][4] [1]: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#f...
As far as finalizers go: 1. They are virtually useless. They aren't guaranteed to be called in a timely fashion, or indeed, at all (if the GC never runs, neither will any finalizers). This means you generally shouldn't rely on them. 2. Finalizers are not guaranteed to be idempotent. The garbage collector takes g...
When we built the first version of our own framework ([Inon Datamanager][1]) I had it read pre-existing SQL tables and autogenerate Java objects from them. When my colleagues who came from a Smalltalkish background built the second version, they started from the objects and then autogenerated the tables. Actually...
@Rob G - Hey! That's my post! ;) For some other good examples, be sure to browse the NUnit source code. I work closely with Charlie whenever I can to make sure it is building and testing on Mono. He tries to run whenever he can as well.
Check out section <b>5.14.2. Moving files and folders</b> (or check out "move" in the Index of the help) of the TortoiseSVN help. You do a move via right-draging. It also mentions that you need to commit from the parent folder to make it "one" revision. This works for doing the change in a working copy. You can also...
In TortoiseSVN right click somewhere and go TortoiseSVN > Repo Browser open the repository. All you then have to do is drag and drop the file from one folder to the where you want it. It'll ask you to add a commit message and it defaults it to "Moved file/folder remotely"
- First - calling an extension method. This style of coding is called "[fluent interface][1]" as you mentioned. - Second method is called [language integrated query][2] [1]: http://www.martinfowler.com/bliki/FluentInterface.html [2]: http://en.wikipedia.org/wiki/Language_Integrated_Query
the first isn't even really linq, its a lambda expression, with a type invariant object created. (a) => new { blah = b} The second is a linq query filling an on the fly class that has a property Line. There is no hashrocket operator in this one, so this one is just plain old linq.
I recommend that you walk over to your local book store this weekend, get a cup of coffee and find jQuery in Action by Manning Press. Go ahead and read the first chapter of this 300 page book in the store, then buy it if it resonates with you. I think you'll be surprized by how easy jQuery lets you perform what your...
[Kevin Frei](http://blogs.msdn.com/freik/) talks about exception handling performance cost in his speech "[The Cost of C++ Exception Handling on Windows](http://www.nwcpp.org/Meetings/2006/10.html)". (Under "Summary & Conclusions" there is one list item that says "[Exception handling performance cost is] not always mea...
Printing DOM Changes
|browsers|internetexplorer|firefox|
What I am trying to do is change the background colour of a table cell &lt;td&gt; and then when a user goes to print the page, the changes are now showing. I am currently using an unobtrusive script to run the following command on a range of cells: element.style.backgroundColor = "#f00" This works on scree...
You can't use an array. Or rather, you would need to pick a size, and if you ended up needing more then you would have to allocate a new, larger, array, copy the data from the old one into the new one, and continue on as before (until you exceed the size of the new one...) Generally, you would go with one of the co...
While I would recommend using ToString in this case, always keep in mind you can use ANY VB.Net function or class from C# just by referencing Microsoft.VisalBasic.dll.
From the documentation it does not appear to be possible without actually adding several category template files (unless you custom program it). I run Wordpress, and I have only seen it accomplished category by category. [http://codex.wordpress.org/Category_Templates][1] [1]: http://codex.wordpress.org/Catego...
I figured it out. I created a method that passed the **ContextMenu.SourceControl()** property by reference so I could manipulate the control that called the ContextMenu. In the beginning of the method, I got the **SelectedValue** of the ComboBox and the reloaded the data in the ComboBoxes. I then set the **Selecte...
I'm not sure exactly what you mean by multi-line, but if it is selecting multiple elements in a drop down list, see this [demo][1]. If its showing elements that wrap mulitple lines in a drop down, see this [demo][2]. You can put a break in the HTML to achieve what you might be looking for. I've used this control ...
When one unsigned and one signed variable are added (or any binary operation) both are implicitly converted to unsigned, which would in this case result in a huge result. So it is safe in the sense of that the result might be huge and wrong, but it will never crash.
I don't really understand why you want it was "source" rather than as a perl library, but you can download the source for any CPAN module. I haven't used it, but [Tree][1] looks to fill your requirements. [1]: http://search.cpan.org/~rkinyon/Tree-1.01/lib/Tree.pm
If you decide to continue using functions, you can get some inspiration from WordPress. You can probably reduce the "program" to a minimum by making templates more granular. Also, good tools (i.e. HTML editors) can help designers ignore your PHP and work on the design without breaking the code. (But I have no sugges...
If you decide to continue using functions, you can get some inspiration from WordPress. You can probably reduce the "program" to a minimum by making templates more granular. Also, good tools (i.e. HTML editors) can help designers ignore your PHP and work on the design without breaking the code. (But I have no sugges...
[The C++ Programming Language][1] by Bjarne Stroustrup covers C++ in depth. Bjarne is the inventor of C++. It also provides insights into why the language is the way it is. Some people find the book a little terse. I found it to be an enjoyable read. If you have done some C++ before it's a great place to start. It is b...
concatenate several fields into one with SQL
|sql|
i have three tables *tag*, *page*, *page-tag* With the next data ***page*** ID NAME 1 page 1 2 page 2 3 page 3 4 page 4 ***tag*** ID NAME 1 tag 1 2 tag 2 3 tag 3 4 tag 4 ***page-tag*** ID PAGE-ID TAG-ID 1 2 1 2 ...
|sql|mysql|