instruction
stringlengths
0
30k
For writing native GUIs for Erlang, [wxErlang][1] seems to be the most mature library today (also on [SourceForge][2]). [1]: http://www.erlang.org/~dgud/wxerlang/ [2]: http://sourceforge.net/projects/wxerlang/
How do you justify Refactoring work to your penny-pinching boss?
|refactoring|
You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager.. You tell your boss you're going to need a week to clean this stuff up. "Clean what up?" "My ...
|duplicate|refactoring|
|refactoring|
Wrote quite simple and working solution: bool SegmentIntersectRectangle(double a_rectangleMinX, double a_rectangleMinY, double a_rectangleMaxX, double a_rectangleMaxY, ...
Can I generate a Flex web and Air desktop app from the same source code?
|apache-flex|desktop|air|adobe|flexbuilder|
I'm new to Air. I've got an existing Flex 2 application which I'm considering bringing into Flexbuilder 3. My question is can I use the same base application (and source code) to make the Air version, or would I have to maintain to separate code trees: one for the Air version and one for the Flex/SWF version?
Get contents just shows you the file's contents, while get revision replaces your version of the file. To see the commands run by subclipse in the console view you should check the "Show SVN console automatically when command is run" option in tools/preferences/team/svn/console.
Can I serve a ClickOnce application with Apache?
|apache|deployment|clickonce|
We're testing our ClickOnce deployed application internally on IIS (Internet Information Services), but we're wondering if we can deploy it to the wider internet using Apache on Linux so we can make use of our existing external website host. If so, is there anything else I need to consider other than as specifying t...
Safari, Internet Explorer, and Firefox all have different max lengths that it accepts. I vote go for the shortest of all three. [http://www.boutell.com/newfaq/misc/urllength.html][1] Pulled from link - "**Microsoft Internet Explorer (Browser)** - 2,083 characters **Firefox (Browser)** - After 65,536 ch...
String is not a primitive type, yet you normally want to use it with value semantics, ie like a value. A value is something you can trust won't change behind your back. If you write : String str = someExpr(); You don't want it to change unless YOU do something with str. String as an Object has naturally pointer...
You need some decent symbols for the CLR. Set `_NT_SYMBOL_PATH` (in WinDBG, use File/Symbol File Path) so that it includes: SRV*C:\WebSymbols*http://msdl.microsoft.com/download/symbols That tells the debugger symbol engine that it can download symbols from Microsoft's online symbol server to C:\WebSymbols...
[svcutil][1] or just host it quickly and hit the MEX point :) [1]: http://msdn.microsoft.com/en-us/library/aa702581.aspx
I understand here that you have a table "person" with 3 records. There is nothing comparable to what you describe in Access. In "standard" Access (DAO recordset), you will have to open a recordset and use the getrows method to have your data Dim rs as DAO.recordset, _ personList as String, _ ...
Is there redirection going on? See the remarks on Wow64DisableWow64FsRedirection http://msdn.microsoft.com/en-gb/library/aa365743.aspx
xtofl has the right answer for finding an array size. No macro or template should be necessary for finding the size of a struct, since sizeof() should do nicely. I agree the [preprocessor is evil][1], but there are occasions where it is the [least evil of the alternatives][2]. [1]: http://www.parashift.com/c...
Here's what I've done for one of my projects. In your `web.xml` file, you can define the Spring bean files you want your application to use: <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml /WEB-INF/modelContex...
Flex best practices ?
|apache-flex|actionscript|blazeds|puremvc|
I have the feeling that is easy to find samples, tutorials and simple examples on Flex.<br> It seems harder to find tips and good practices based on real-life projects.<br> Any tips on how to : - How to write maintainable actionscript code - How to ensure a clean separation of concern. Has anybody used an MVC...
UI design alternatives with Groovy/JRuby/Jython or other JVM languages ?
|java|user-interface|groovy|jruby|jvm-languages|
For a developer in the Java eco-system, there is a handful of choices when it comes to UI design. The best known are: * Swing (preferred when used with Netbeans and its GUI builder) * Eclipse's SWT (mostly preferred for Eclipse plug-ins) Now, are there any frameworks or design alternatives to this which target...
You can get the by joining on the [row number](http://www.databasejournal.com/features/mssql/article.php/3572301). This is possible because since it's an identity, it will just increment as you add items, which will be in the order that you are selecting them.
SELECT Col.Column_Name from INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab, INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col WHERE Col.Constraint_Name = Tab.Constraint_Name AND Col.Table_Name = Tab.Table_Name AND Constraint_Type = 'PRIMARY KEY ' AND Col.Table_N...
Thanks for the tip, you're right - ParseTree seems to be the only code out there with any manipulation of the AST going on, except that it's actually written in RubyInline so its a strange mixture between Ruby and C code. Very interesting reading though. The other reference of course is eval.c from Ruby itself. I...
EditPlus is my editor of choice. All the features you'd need, and no more.
As markpasc stated, a PRE element inside CODE element is not allowed in HTML. The best solution is to change your HTML code to use &lt;pre>&lt;code> (which means a preformatted block that contains code) directly in your HTML for code blocks.
Early software was often modal, but usability took a turn at some point, away from this style. VI-based editors are total enigmas -- they're the only real surviving members of that order of software. Modes are a no-no in usability and interaction design because we humans are fickle mammals who cannot be trusted...
Early software was often modal, but usability took a turn at some point, away from this style. VI-based editors are total enigmas -- they're the only real surviving members of that order of software. Modes are a no-no in usability and interaction design because we humans are fickle mammals who cannot be trusted...
Well you could add a: #pragma warning (disable : 4996) before you use fopen, but have you considered using fopen_s as the warning suggests? It returns an error code allowing you to check the result of the function call. The problem with just disabling deprecated function warnings is that Microsoft may remove ...
I agree that that tutorial is flawed, throwing random, unexplained code right in front of your eyes. It introduces concepts such as the autorelease pool and user defaults without explaining why you would want them ("Autorelease pool for memory management" is hardly an explanation). That said… > basically all I wa...
Is there a way to check if there are symbolic links pointing to a directory?
|linux|symlink|
I have a folder on my server to which I had a number of symbolic links pointing. I've since created a new folder and I want to change all those symbolic links to point to the new folder. I'd considered replacing the original folder with a symlink to the new folder, but it seems that if I continued with that practice it...
[Code Analyzer][1] is simple tool which generates this kind of metrics. ![alt text][2] [1]: http://sourceforge.net/projects/codeanalyze-gpl/ [2]: http://www.codeanalyzer.teel.ws/docs/post-analysis-shot.png
What does the option "convert to web application" do if I select it in visual studio?
|visual-studio|asp.net|c#|
What are the advantages to converting my site to a web application?
|visual-studio|asp.net|c#|duplicate|
|c#|asp.net|visual-studio|duplicate|
What does the option “convert to web application” do if I select it in visual studio? If I do convert my site to a web application what are the advantages? Can I go back?
|c#|asp.net|visual-studio|
What tool/format do you use for writting your specifications?
|specifications|
I would like to know what kind of tool you use for writing your specifications. I think it's essential to use a tool that supports some kind of plain text format so that one can control the specification with a source control system like SVN. For the specification as for the code as well, it's important to have a histo...
What tool/format do you use for writing your specifications?
I've come to use <a href="http://www.docbook.org/">Docbook</a> for all such things. It's easy, flexible, and will generate html, tex (and thus pdf), etc.
Yes memory usage can get real high and you might run into problems with your JVM, as the default setting is a bit to low. Consider using this startup parameters when running eclipse: -vmargs -XX:MaxPermSize=1024M -Xms256M -Xmx1024M
You have (at least) 2 issues - the complexity of the environment (the server) and the complexity of the GUI. There are many tools for automating GUI testing. All of them are more or less fragile and require pretty much constant maintenance in the face of changing layout. There is benefit to be gained from using them...
How to Call BizTalk Orchestration Dynamically
|biztalk|
How can I call a BizTalk Orchestration dynamically knowing the Orchestration name? The call Orchestration shapes need to know the name and parameters of Orchestrations at design time. I've tried using 'call' XLang keyword but it also required Orchestration name as Design Time like in expression shape, we can write as...
How can I call a BizTalk Orchestration dynamically knowing the Orchestration name? The call Orchestration shapes need to know the name and parameters of Orchestrations at design time. I've tried using 'call' XLang keyword but it also required Orchestration name as Design Time like in expression shape, we can write as...
How can I call a BizTalk Orchestration dynamically knowing the Orchestration name? The call Orchestration shapes need to know the name and parameters of Orchestrations at design time. I've tried using 'call' XLang keyword but it also required Orchestration name as Design Time like in expression shape, we can write as...
I guess quite a few compiler do offer some wrapper or the like around the mentioned command. Here's an example #include <stdlib.h> #include <string.h> #include <intrinsics.h> _CPUID cpuinfo; int main(void) { _cpuid(&cpuinfo); printf("Vendor: %s\n", cpuinfo.Vendor); return 0; } ...
As long as you're sure that the LONG you have is really an HWND, then it's as simple as: HWND hWnd = (HWND)lParam;
I would first determine what requirements are needed from the library: 1. Debug/Release 2. Unicode support 3. And so on.. With that determined you can then create configurations for each combination required by yourself or other library users. When compiling and linking it is very important that you keep ...
You can use the same.
Aside from the legal complexities. Your service would also need to know when it was time for it to delete itself. If it's no longer being used, and the information it contains is duplicated elsewhere in better/more efficient services (and how would you test for that?) - is it serving a purpose by continuing to co...
I have used a tool in my work its [LDRA tool suite][1] It is used for testing the c/c++ code but it also can check against coding standards such as MISRA etc. [1]: http://www.ldra.co.uk/testbed.asp
To be honest, most seasoned developers will have a laugh (hopefully friendly) if you don't know pointers. At my previous Job we had two new hires last year (just graduated) that didn't know about pointers, and that alone was the topic of conversation with them for about a week. No one could believe how someone could g...
Abstract Syntax Tree
|ast|java|parsing|
I have an AST derived from the ANTLR Parser Generator for Java. What I want to do is somehow construct a control flow graph of the source code, where each statement or expression is a unique Node. I understand there must be some recursiveness to this identification, I was wondering what you would suggest as the best op...
|java|parsing|ast|
I have an AST derived from the ANTLR Parser Generator for Java. What I want to do is somehow construct a control flow graph of the source code, where each statement or expression is a unique Node. I understand there must be some recursiveness to this identification, I was wondering what you would suggest as the best op...
It is impossible to elevate just one function or any other part of a single process, because the elevation level is a per-process attribute. Just like with pregnancy, your process can either be elevated or not. If you need some part of your code to be running elevated, you must start a separate process. However, if ...
The answer probably depends on how accurate you need the display to be. If it's just to give users a sense of the other people using the site I'd suggest something similar to what you've described, but backing off on the update frequency: * on a page request associate the user with the page (and a timestamp) * use ...
Request.Url.Host
I would create a Calendar table that just contained every date from a suitable start date until a suitable end date. This wouldn't take up much space in your database and would make these types of query child's play. select ... from Calendar left outer join ... where Cal...
Anyone used Dabo for a medium-big project?
|python|dabo|
We're at the beginning of a new ERP-ish client-server application, developed as a Python rich client. We're currently evaluating Dabo as our main framework and it looks quite nice and easy to use, but I was wondering, has anyone used it for medium-to-big sized projects? Thanks for your time!
|python|erp|dabo|
Is is possible to convert C# double[,,] array to double[] without making a copy
|c#|.net|arrays|
I have huge 3D arrays of numbers in my .NET application. I need to convert them to a 1D array to pass it to a COM library. Is there a way to convert the array without making a copy of all the data? I can do the conversion like this, but then I use twice the ammount of memory which is an issue in my application: ...
Replace a character with a string in LaTeX
|latex|
I'm looking for a way to do a substring replace on a string in LaTeX. What I'd like to do is build a command that I can call like this: \replace{File,New} and that would generate something like \textbf{File}$\rightarrow$\textbf{New} This is a simple example, but I'd like to be able to put formattin...
I would first determine what requirements are needed from the library: 1. Debug/Release 2. Unicode support 3. And so on.. With that determined you can then create configurations for each combination required by yourself or other library users. When compiling and linking it is very important that you keep ...
I would first determine what requirements are needed from the library: 1. Debug/Release 2. Unicode support 3. And so on.. With that determined you can then create configurations for each combination required by yourself or other library users. When compiling and linking it is very important that you keep ...
I would first determine what requirements are needed from the library: 1. Debug/Release 2. Unicode support 3. And so on.. With that determined you can then create configurations for each combination required by yourself or other library users. When compiling and linking it is very important that you keep ...
When I last looked at Eclipse (some time ago now!) it allowed you to choose any installed font to work in. Not so sure whether it supported the notion of indenting using tab stops. It looked cool, but the code was definitely harder to read...
I'd still like to see a popular editor or IDE implement [elastic tabstops](http://nickgravgaard.com/elastictabstops/).
We use NUnitLite, although I think we did have had to add some code to it in order for it to work. One of the problems we found is that if you are using parts of the platform that only exist in CF, then you can only run those tests in NUnitLite on an emulator or Windows Mobile device, which makes it hard to run the...
By using an enum you can do this, but will look awkward. [Flags] public enum PESHeaderFlags { IsCopy = 1, // implied that if not present, then it is an original IsCopyrighted = 2, IsDataAligned = 4, Priority = 8, ScramblingControlType1 = 0, Scrambli...
i expected you'll get down-modded and picked on for that suggestion, but there's some real sense to the idea. The main advantage of the traditional 'non-proportional' font requirement in code editors is to ease the burden of performing code formatting. But with all of the interactive automatic formatting that o...
Soeren: That's kind of neat, IMO. But do people really line comments up like that? For my end of line comments, I always use a single space then // or /* or equivalent, depending on language I'm using. I never try to line up declarations or comments or anything, and the only place I've ever seen that is in textbooks.
Another vote for Textpad here. I tried Notepad++, but was annoyed that it didn't notify me when an open file had been updated (which is a pain when looking at active log files).
Though not really answering your question, there used to be a "modal like" way to write Japanese on cell phones before : The first letter you hit was a conson let's say K, and then, and then the next key you would hit would have the role of a conson. (Having two conson in a row is impossible in Japanese) Though it ...
I'm looking for a way to do a substring replace on a string in LaTeX. What I'd like to do is build a command that I can call like this: \replace{File,New} and that would generate something like \textbf{File}$\rightarrow$\textbf{New} This is a simple example, but I'd like to be able to put formattin...
Here's the results I got from a simple parsing of a string from a 100KB file 100,000 times. The Generic List(Of char) or List<char> took 612.293 seconds to go 100,000 times through the file. The ArrayList took 2,880.415 seconds to go 100,000 times through the file. This means in this scenario (as your mileage _will_...
Here's the results I got from a simple parsing of a string from a 100KB file 100,000 times. The Generic List(Of char) took 612.293 seconds to go 100,000 times through the file. The ArrayList took 2,880.415 seconds to go 100,000 times through the file. This means in this scenario (as your mileage _will_ vary) the Ge...