instruction
stringlengths
0
30k
Non Visual Studio F# IDE
|ide|f#|
Does anyone know of an IDE for F# development that does not involve me shelling out $300? I will gladly move to F# VS Express if they ever release one, but spending money to just get started with a new language is not in my budget.
Try the Align http://www.vim.org/scripts/script.php?script_id=294 and AutoAlign http://www.vim.org/scripts/script.php?script_id=884 scripts.
Found the solution! Boost builds a debug build by default. Typing "bjam release" builds the release configuration. (This isn't listed in any documentation anywhere, as far as I can tell.) Note that this is not the same as changing your build-type to release, as that doesn't build a release configuration. Doing a 'compl...
How to mock object construction?
|java|tdd|mocking|junit|
Is there a way to mock object construction using JMock in Java? For example, if I have a method as such: <pre> public Object createObject(String objectType) { if(objectType.equals("Integer") { return new Integer(); } else if (objectType.equals("String") { return new String(); }...
Is there a way to mock object construction using JMock in Java? For example, if I have a method as such: <pre> public Object createObject(String objectType) { if(objectType.equals("Integer") { return new Integer(); } else if (objectType.equals("String") { return new String(); }...
All of you are wrong. Read the question. Answer: Use a Singleton if: If you need to have one and only one object of a type in system Do not use a Singleton if: If you want to save memory If you want to try something new If you want to show off how much you know Because everyone ...
http://search.cpan.org/ is your first port of call for Perl modules.
You probably need to distribute the VC runtime with your application. There are a variety of ways to do this. [This article][1] from the Microsoft Visual C++ Team best explains the different ways to distribute these dependencies if you are using Visual Studio 2005 or 2008. As stated in the article, though you can ...
You probably need to distribute the VC runtime with your application. There are a variety of ways to do this. [This article][1] from the Microsoft Visual C++ Team best explains the different ways to distribute these dependencies if you are using Visual Studio 2005 or 2008. As stated in the article, though you can ...
What is your preferred method for moving directory structures around in Subversion?
|svn|
I have recently run into an issue where I wanted to add a folder to the directory structure of my project that would become the new 'root' directory for the previously housed files. I've been getting help in a [related thread](http://stackoverflow.com/questions/87458/can-you-specify-filenames-using-wildcards-or-regexe...
I am a fan of [Gruff Graphs][1], but [Google Charts][2] is also good if you don't mind relying on an external server. [1]: http://nubyonrails.com/pages/gruff [2]: http://code.google.com/apis/chart/
If you use a WCF service with a netMsmqBinding, you can receive queued messages without having to poll. Messages will wait if there is no service running to pick them up. You would want to make sure to use a clustered queue for reliability in case the main queuing machine goes down. Also be aware when upgrading tha...
There is related research using Kohonen neural networks/self organizing maps Both more academic systems (Google for PicSOM ) or less academic ( http://www.generation5.org/content/2004/aiSomPic.asp , (possibly not suitable for all work enviroments)) presentations exist.
Windsor Container: Does release dispose of an object?
|castle-windsor|.net|inversion-of-control|
I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance. Does container.Release(obj); automatically call Dispose() immediately? Or do I need to ...
I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance. Does container.Release(obj); automatically call Dispose() immediately? Or do I need to ...
Windsor Container: How to force dispose of an object?
|.net|inversion-of-control|castle-windsor|
I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance. Does container.Release(obj); automatically call Dispose() immediately? Or do I need to ...
try: if (!(typeof(callback)=='undefined')) {...}
Multicast sending has been answered above, receipt requires subscription to the multicast group. It (still) seems undocumented, but has been covered on the erlang-questions mailing list before. http://www.erlang.org/pipermail/erlang-questions/2003-March/008070.html {ok, Socket} = gen_udp:open(Port, [bina...
If you generate UML class diagrams for a big project the result is going to be quite chaotic. Sometimes I use the class diagrams in Visual Studio. I manually add the classes I think deserve some extra explanations. The diagrams are not UML, but it is close enough. They are always up-to-date and you can change the di...
why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT
|delphi|email|smtp|indy|
why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT when the same source code compiled in D2007 produces emails with attachments correctly named with the original file name. I am using the respective Indy libraries that come with D2007 and D2009. Not having the original file name on the attachment...
I see pointers as a manual transmission in a car. If you learn to drive with a car that has an automatic transmission, that won't make for a bad driver. And you can still do most everything that the drivers that learned on a manual transmission can do. There will just be a whole in your knowledge of driving. If you had...
My motivation is just to Get It Done. Like onebyone said, you just have to hunker down and do it. It's all a matter of priorities. The quicker the priorities are out of the way, the sooner you can get back to the interesting stuff.
Windows Workflow Foundation is a fascinating concept. It allows you to create powerful applications, or even parts of them, using flowchart-like concepts. The deeper value of this may not be immediately obvious. Say you're building a large e-commerce site. Over time, your workflows for processes such as fulfillment ...
Windows Workflow Foundation is a fascinating concept. It allows you to create powerful applications (or just parts of them) using a combination of flowchart-like concepts and normal code. The deeper value of this may not be immediately obvious. Say you're building a large e-commerce site. Over time, your workflows f...
Iterating over strings is unfortunately rather slow in Python. Regular expressions are over an order of magnitude faster for this kind of thing. You just have to build the character class yourself. The _unicodedata_ module is quite helpful for this, especially the _unicodedata.category()_ function. See [Unicode Charact...
In Palm's later devices, they moved to an extended format for the PIM applications like Contacts and Calendar. This was done to allow better mapping between the device's databases and those used by Microsoft Outlook, but it meant that the format changed from the traditional format in the original PIMs. Palm has a P...
How about [.NET's DateTime][1]? (You can pick your language within the framework) [1]: http://msdn.microsoft.com/en-us/library/system.datetime_methods.aspx
The informix database has this facility. When you define a date field you also specify a mask of the desired time & date attributes. Only these fields count when doing comparisons.
If you don't need native drag and drop in AIR, you can get the Flex drag and drop behavior by subclassing WindowedApplication and setting the DragManager. See this post on the Adobe Jira for more info: [https://bugs.adobe.com/jira/browse/SDK-13983][1] [1]: https://bugs.adobe.com/jira/browse/SDK-13983
With varying levels of specificity, your best bet is to store them as simple nullable ints. Year, Month, Day. You can encapsulate the display logic in your presentation model or a Value Object in your domain.
Built-in time types represent an instant in time. You can use the built in types and create a column for precision (Year, Month, Day, Hour, Etc.) or you can create your own date structure and use nulls (or another invalid value) for empty portions.
In a nutshell, [profilers][1] will tell you which part of your program is being called how many often. I don't profile my programs much, so I don't have too much experience, but I have played around with the [NetBeans IDE][2] profiler when I was testing it out. (I usually use Eclipse as well. I will also look into t...
Might be easier to track downloads (assuming people are getting this via HTTP) instead of installs. Otherwise, add a "register now?" feature.
You can't do this with a mailto: link, but you could create a server-side contact form that sends the e-mail out with the proper headers.
If you use the contains to method then you are doing a LIKE '%somestring%'. If you use a startswith method then it is the same as 'somestring%'. Finally, endswith is the same as using '%somestring'. To summarize, contains will find any pattern in the string but startswith and endswith will help you find matches at t...
You should research "pronounceable" password generators, since they're trying to accomplish the same task. A Perl solution would be [Crypt::PassGen][2], which you can train with a dictionary (so you could train it to various languages if you need to). It walks through the dictionary and collects statistics on 1, 2,...
XAML is for constructing object graphs not containing code. A Data template is used to indicate how a custom user-object is to be rendered on screen... (e.g. if it is a listbox item) behavior is not part of a data template's area of expertise. Redraw the solution...
After you clean up the current mess you could add a primary key that includes all the fields in the table. that will keep you from getting into the mess again. Of course this solution could very well break existing code. That will have to be handled as well.
UTF8 is best for any character-set where characters are primarily below U+0800. Otherwise UTF16.
UTF8 is best for any character-set where characters are primarily below U+0800. Otherwise UTF16. That is, UTF8 for Latin, Greek, Cyrillic, Hebrew and Arabic and a few others. In langs other than Latin, characters will take up the same space as they would in UTF16, but you'll save bytes on punctuation and spacing.
I'm currently waist-deep in designing some high level enterprise software in which chunks of data (stored in an SQL database, in this case) are referenced by 1 or more other entities. If a chunk of data remains when no more entities reference it, we're wasting storage. If a reference points so data that's not present, ...
using System.Xml.Serialization; this namespace has all the attributes you'll need if you want to map your xml to any random object. Alternatively you can use the xsd.exe tool xsd file.xsd {/classes | /dataset} [/element:element] [/language:language] [/namespace:namespace] [/outputdir...
The place to search is http://search.cpan.org. I have my browser (Firefox) set up so that I can type "cpan foo" in the address bar and it will search CPAN for modules matching "foo." You can do this with either a keyword bookmark or by assigning a keyword to a search plugin.
* You can usually determine which language the user speaks through the `Accept-Language` HTTP header. * You can determine whether certain applications and browser plugins are installed by looking at the `Accept` HTTP header.
* You can usually determine which language the user speaks through the `Accept-Language` HTTP header. * You can determine whether certain applications and browser plugins are installed by looking at the `Accept` HTTP header. * Browser version/patchlevel and .NET framework version through the `User-Agent` HTTP header....
You can do this with [BeautifulSoup][1] >>> from BeautifulSoup import BeautifulStoneSoup >>> soup = BeautifulStoneSoup(xml) >>> [child['value'] for child in soup.find('parent', attrs={'name': 'CategoryA'}).findAll('child')] You parameterize the example and make a function out of it, but you get the ...
You can do this with [BeautifulSoup][1] >>> from BeautifulSoup import BeautifulStoneSoup >>> soup = BeautifulStoneSoup(xml) >>> def getValues(name): . . . return [child['value'] for child in soup.find('parent', attrs={'name': name}).findAll('child')] [1]: http://www.crummy.com/software...
You can do this with [BeautifulSoup][1] >>> from BeautifulSoup import BeautifulStoneSoup >>> soup = BeautifulStoneSoup(xml) >>> def getValues(name): . . . return [child['value'] for child in soup.find('parent', attrs={'name': name}).findAll('child')] If you're doing work with HTML/XML I wo...
It depends on your session provider, if you have overriden the session key generation is a way that is no longer unique, then multiple users may be accessing the same session. What behavior are you seeing? And are you sure there's no static in play with the variables you are talking about?
It depends on your session provider, if you have overriden the session key generation in a way that is no longer unique, then multiple users may be accessing the same session. What behavior are you seeing? And are you sure there's no static in play with the variables you are talking about?
Maybe how it's killing it is that it's finding all processes called "apache" or similar and just killing them, regardless of if it 'owns' it or not.
I wouldn't normally take a shot in the dark on a question I can't really test the answer to, but since this one has sat around for a day, I'll give it a shot. It seems from looking at: http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F ...that even if the CDT has changed since that ...
I wouldn't normally take a shot in the dark on a question I can't really test the answer to, but since this one has sat around for a day, I'll give it a shot. It seems from looking at: http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F ...that even if the CDT has changed since that ...
Using tut http://tut-framework.sourceforge.net/ very simple, just header file only no macros. Can generate XML results
It is dumped already. for example if you have a file called `index.jsp`, a file will be created called `index_jsp.java` Just search for something like that in the work directory.
You use sIFR moderately, say for headlines. Try not to use it for links, because links in Flash don't work as well as normal HTML links. It also makes little sense to use sIFR only for text that never changes, an image would work a lot better. I haven't heard about the upside-down problem in a few years now, but in ...
Can you add a primary key identity field to the table?
I'm not sure if the concept of *the* stack footprint actually exists with modern compilers. That is to say, I think that determining the amount of stack space used depends on the branches taken, which in turn depends on input parameters, and in general requires solving the halting problem.
Another way to handle this that removes any need for includes at all is to use the [autoload][1] feature. Including everything your script needs "Just in Case" can impede performance. If your includes are all class or interface definitions, and you want to load them only when needed, you can overload the `__autoload()`...
I'd say go for the normalized design (two tables) and only denormalize (go down to one user/person table) if it will really make your life easier down the line. If however practically all people are also users it may be simpler to denormalize up front. Its up to you; I have used the normalized approach without problems...
This is certainly a good idea, as you are normalizing the database. I have done a similar design in an app that I am writing, where I have an employee table and a user table. Users may a from an external company or an employee, so I have separate tables because an employee is always a user, but a user may not be an emp...
How do I determine the page number for the tab I just clicked on in gtk#?
|mono|gtk|gtk#|
I have a GTK notebook with multiple tabs. Each tab label is a composite container containing, among other things, a button I want to use to close the tab. The button has a handler for the "clicked" signal. When the signal is called, I get the button widget and "EventArgs" as a parameter. I need to determine the...
I built and maintain a big desktop application written in .NET (1.1, 2.0 now). The application is for Dentists and it works by making use of the Ink technology found in the MIcrosoft.Ink namespace in the TabletPC SDK. Some dentists use Tablet PCs to make things easier and leverage the power of that technology. On ...
If you use the Backup/Restore solution you're likely to have orphaned users so be sure to check out [this article](http://technet.microsoft.com/en-us/library/ms175475.aspx)&lt;microsoft&gt; on how to fix them.
How do you customize the RSS feeds in SharePoint
|sharepoint|rss|moss|
In the early days of SharePoint 2007 beta, I've come across the ability to customize the template used to emit the RSS feeds from lists. I can't find it again. Anybody know where it is?
[C++ FAQ Lite](http://www.parashift.com/c++-faq-lite/) mentions of a case where using private inheritance is a legitimate solution (See [[24.3.] Which should I prefer: composition or private inheritance?](http://www.parashift.com/c++-faq-lite/private-inheritance.html#faq-24.3)). It's when you want to call the derived c...
Multicast sending has been answered, receipt requires subscription to the multicast group. It (still) seems undocumented, but has been covered on the erlang-questions mailing list before. [http://www.erlang.org/pipermail/erlang-questions/2003-March/008070.html][1] {ok, Socket} = gen_udp:open(Port, [binar...
I don't believe a custom route handler is required for what you are doing. For your "globalized" URIs, a regular MVC route, with a constraint that the "locale" parameter must be equal to "en", "de", etc., will do. The constraint will prevent non-globalized URIs from matching the route. For a "non-globalized" URI,...
Memory rotation may be an issue here, since every boxing of an int larger than or equal to 128 cause an object allocation (see Integer.valueOf(int)). Although the garbage collector very efficiently deals with short-lived objects, performance will suffer. If you know that the number of increments made will largely ou...
Memory rotation may be an issue here, since every boxing of an int larger than or equal to 128 cause an object allocation (see Integer.valueOf(int)). Although the garbage collector very efficiently deals with short-lived objects, performance will suffer. If you know that the number of increments made will largely ou...
Can you please show the select statement you use to get l_ordimage?
Can you please show the select statement you use to get l_ordimage? The main cause of this error seems to be if you don't have "for update" in your select statement, but I can't get intermedia going at the moment to test.
Are you moving it using `svn mv`, or just `mv`? I think using just `mv` may cause this issue.
Borkdude said: > You might want to try Visual Studio 2008 and its feature to debug javascript. I've been hacking around event handling multiple times, and in my opinion, although classical stepping debuggers are useful to track long code runs, they're not good in tracking events. Imagine listening to mouse move e...
The really interesting point is, that .NET creates queries like "Select * from table where name like '%test%'" when you use "from x in context.Table where x.Contains("test") select x" which is quite impressing
You maybe want to look at kbdev or evdev (look at your Documentation/input/input.txt file in your kernel source directory for starters.) That would work for console access.
Why don't you do in Java the same thing you are doing in ruby, that is creating the delimiter separated string only after you've added all the pieces to the array? ArrayList<String> parms = new ArrayList<String>(); if (someCondition) parms.add("someString"); if (anotherCondition) parms.add("someOtherSt...
Why don't you do in Java the same thing you are doing in ruby, that is creating the delimiter separated string only after you've added all the pieces to the array? ArrayList<String> parms = new ArrayList<String>(); if (someCondition) parms.add("someString"); if (anotherCondition) parms.add("someOtherSt...
Python, beyond the basics
|python|slightly-offtopic|
I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much difference it will make.
Just a sidenote: You should inform your users that you are doing this (or not do it at all) for privacy concerns. Even if you aren't collecting any personal data it can be considered a privacy problem. For example, when programs collect usage information, they almost always have a box in the installation process ask...
What languages do date, time, and calendar operations really well?
|time|