instruction
stringlengths
0
30k
Suggestions on how to add the functionality to import Finale music files on an application?
|parsing|
I'm working on a music writing application and would like to add the functionality to import Finale music files. Right now, the only thing I know is that they are enigma binary files. Does anyone have any suggestions on where I could start so that I could be able to parse through these types of files?
Linux/X11 input library without creating a window
|linux|sdl|user-input|
Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you have abstracted control so the control ma...
|linux|user-input|sdl|
Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you have abstracted control so the control ma...
Is there a good library to use for gathering user input in Linux from the mouse/keyboard/joystick that doesn't force you to create a visible window to do so? SDL lets you get user input in a reasonable way, but seems to force you to create a window, which is troublesome if you have abstracted control so the control ma...
"embedded programming" is a very broad term. AVR is pretty well in that category, but it's a step below ARM, in that it's both simpler to use, as well as less powerful. If you just want to play around with ARM, buy a Nintendo DS or a Gameboy Advance. These are very cheap compared to the hardware inside (wonders of m...
Thanks for both of your replies. Unfortunately, my main development environment is Linux + GDC + Tango, so I don't have conio.h, since I don't use DMC as my C compiler. And I also found both getc() and getchar() is also line buffered in my development environment, so it could not achieve what I wish I could do. ...
I'm planning to write such article in near future, but you can now take [my configuration][1] of [Cedet][2] + Emacs, that helps me to effectively edit C++ sources. If you'll have questions, you could ask me directly [1]: http://xtalk.msk.su/~ott/common/emacs/rc/emacs-rc-cedet.el.html [2]: http://cedet.sf.net
Use var $useTable = false; in your model definition.
gdb: how to set breakpoints on future shared libraries with a --command flag
|c++|c|linux|unix|gdb|
I'm trying to automate a gdb session using the --command flag. I'm trying to set a breakpoint on a function in a shared library (the Unix equivalent of a DLL) . My cmds.gdb looks like this: set args /home/shlomi/conf/bugs/kde/font-break.txt b IA__FcFontMatch r However, I'm getting the following: ...
|.net|reflection|
Given an instance of System.Reflection.Assembly.
I don't know if no answer counts as an answer but I'd say you have researched everything and you really came up with the 2 possible solutions... - Test Suite runs tests in parallel - Split the test suite up I am at a loss for any thing else.
If you've lots of different instances of this problem to solve, I've had some success with [Apache Ant][1] for this kind of copy/update/backup kind of thing. There *is* a bit of a learning curve, though, and it *does* require you to have a Java runtime environment installed. [1]: http://ant.apache.org/
I'm a big fan of Restlet, but I usually use it to implement apps whose primary role is to **be** a RESTful web service. It sounds like you're looking to add a RESTful API to an existing application. If that's the case, JAX-RS's (or Enunciate's) annotation-based approach might be a better fit for your project. As for...
In the blog specific package area I have used: Textpattern, Typolight, Nucleus, Serendipity and Wordpress. Hands down, Wordpress is the easiest for end-users to manage and, frankly, it is one of the easiest to template. The userbase for Wordpress is so large that you can easily find resources to help you out when you g...
I used to have a problem understand pointers in pascal way back :) Once i started doing assembler pointers was really the only way to access memory and it just hit me. It might sound like a far shot, but trying out assembler (which is always a good idea to try and understand what computers is really about) probably wil...
I usually give Eclipse 512 MB of RAM (using the -Xmx option of the JVM) and I don't have any memory problems with Ganymede. I upgraded to two GB of RAM a few months ago, and I can really recommend it. It makes a huge difference.
Something like void debugAssert(bool val, const char* file, int lineNumber); #define assert(x) debugAssert(x,__FILE__,__LINE__); So that you can just for example have assert(n == true); and get the source file name and line number of the problem printed out to your log if n is false. If you ...
CTRL-K, CTRL-D Reformat Document! *This is under the VB keybindings, not sure about C#*
Not sure how helpful this will be, but my team uses doxygen to produce documentation, which happens to provide color syntax highlighting on our code views as well as a side bonus. Never really needed it, but it does it.
There is very good one, driven by XML, fast and opensource: <a href="http://sourceforge.net/projects/colorer/">http://sourceforge.net/projects/colorer/</a>
Instead of passing it via a query string you should create a hidden form field with its value and then post to your 2nd page, which can then grab the posted value and it will be hidden from the user.
Table: Events - StartTime (dateTime) - EndTime (dateTime) null for no end time - RepeatUnit (int) null = noRepeat, 1 = hour, 2 = day, 3 = week, 4 = dayOfMonth, 5 = month, 6 = year - NthDayOfMonth (int) - RepeatMultiple (int) eg, set RepeatUnit to 3, and this to 2 for every fortnight - Id ...
IsAssignableFrom() tells you if one type can be assigned to a variable of another given type (may be the same type). GetInterface() gets a System.Type object representing the specified interface. You didn't specify what you were trying to accomplish so I couldn't tell you which is better.
If you just want to see if a type implements a given interface, either is fine, though GetInterface() is probably faster since IsAssignableFrom() does more internal checks than GetInterface(). It'll probably even faster to check the results of Type.GetInterfaces() which returns the same internal list that both of the o...
I'm not sure if it's "hidden", but not many people know about it -- [pseudoregisters][1]. Comes very handy when debugging, I've @ERR, hr in my watch window all the time. [1]: http://www.codeproject.com/KB/debug/pseudoregister.aspx
You might want to check out an old JS lib I wrote, called <a href="http://code.google.com/p/submodal/">SubModal</a>. Easy to understand and modify. Go to town ;) Once you've modded it, use <a href="http://code.google.com/p/minify/">Minify</a> in combination with gzip on your server. The lib size will be teeny tin...
I specifically said I do not need this for canvas applications (as that is trivial to do), but on Facebook Pages! This is done with [profile.setFBML][1] and data published that way does reside on the facebook servers. [1]: http://wiki.developers.facebook.com/index.php/Profile.setFBML
For the entire Table then: Update Computers Set Total_Disk_Space = Total_Disk_Space + 120; If, you only want to update certain ones, then you'd need filters, for example: Update Computers Set Total_Disk_Space = Total_Disk_Space + 120 Where PurchaseDate BETWEEN '1/1/2008' AND GETDATE();
Yeah update computers set total_disk_space = total_disk_space + 120;
Yeah: update computers set total_disk_space = total_disk_space + 120;
A (preemptive) multitasking OS is able to run more than one process simultaneously and has control over which process is using the CPU and other resources at each time, as opposed to a cooperative multitasking OS where the processes had to voluntarily relinquish the CPU, leading to hangs and crashes. Usually, moder...
Try to attach tabindex attribute to your elements and then programmaticaly (in javaScript change it): <INPUT tabindex="3" type="submit" name="submit">
A good index is something that you can rely on to be unique for a specific table row. One commonly used index scheme is the use of numbers which increment by 1 for each row in the table. Every row will end up having a different number index.
[IntelliJ Idea][1] tool does that as well. [1]: http://www.jetbrains.com/idea/features/html_css_editor.html "IntelliJ Idea"
You could use the [onfocus][1] event on field two, which will be called when it receives focus. At that point, field 1's value should be updated and you can perform your check then. [1]: http://www.w3schools.com/jsref/jsref_onfocus.asp
Declare it pure virtual in the base class.<br> class Base<br> {<br> ...<br> vitual void Clone() = 0;<br> };
I mainly look for index or table scans. This usually tells me I'm missing an index on an important column that's in the where statement or join statement. From http://www.sql-server-performance.com/tips/query_execution_plan_analysis_p1.aspx: > If you see any of the following in an > execution plan, you should co...
The [S.O.L.I.D. principles][1]. Or at least I try not to steer away too much from them. [1]: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
You can use an overloaded TryParse() which adds a NumberStyle parameter to the TryParse call which provides parsing of Hexadecimal values. Use NumberStyles.AllowHexSpecifier. Basically you'd do this: bool parsedSuccessfully = uint.TryParse(TextBox1.Text, NumberStyles.AllowHexSpecifier, CultureInfo.CurrentCulture...
You can use an overloaded TryParse() which adds a NumberStyle parameter to the TryParse call which provides parsing of Hexadecimal values. Use NumberStyles.AllowHexSpecifier. Basically you'd do this: uint color; bool parsedSuccessfully = uint.TryParse(TextBox1.Text, NumberStyles.AllowHexSpecifier, Cultu...
You can use an overloaded TryParse() which adds a NumberStyle parameter to the TryParse call which provides parsing of Hexadecimal values. Use NumberStyles.AllowHexSpecifier. Basically you'd do this: uint color; bool parsedSuccessfully = uint.TryParse(TextBox1.Text, NumberStyles.AllowHexSp...
You can use an overloaded TryParse() which adds a NumberStyle parameter to the TryParse call which provides parsing of Hexadecimal values. Use NumberStyles.HexNumber which allows you to pass the string exactly as formatted in the question ("0xFF0000"). Basically you'd do this: uint color; bool parsedSuc...
FinalBuilder Enumeration of files and folders
|finalbuilder|
What's the best way to enumerate a set of files and folders using FinalBuilder? The context of my question is, I want to compare a source folder with a destination folder, and replace any matching files in the destination folder that are older than the source folder. Any suggestions?
I guess it depends on what exactly is contained in the file, but here's a quick one: hexdump file1 > file1.tmp hexdump file2 > file2.tmp diff file1.tmp file2.tmp Since 16 bytes are typically reported on each line, this won't technically give you a count of the bytes changed, but will give you a roug...
Filesystems do not support "inserting" data in the middle of a file. If you really have a need for a file that can be accessed in a sorted kind of way, I suggest you look into using an embedded database. You might want to take a look at [SQLite][1] or [BerkeleyDB][2]. Then again, you might be working with a text ...
Here's an example using WMI: strComputer = "." Set objSWbemServices = GetObject("winmgmts:\\" & strComputer) Set colSWbemObjectSet = _ objSWbemServices.InstancesOf("Win32_LogicalMemoryConfiguration") For Each objSWbemObject In colSWbemObjectSet Wscript.Echo "Total Physi...
Here's an example using WMI: strComputer = "." Set objSWbemServices = GetObject("winmgmts:\\" & strComputer) Set colSWbemObjectSet = _ objSWbemServices.InstancesOf("Win32_LogicalMemoryConfiguration") For Each objSWbemObject In colSWbemObjectSet Wscript.Echo "Total Physi...
To understand pointers, I can't recommend the [K&R][1] book highly enough. [1]: http://www.amazon.com/Programming-Language-Prentice-Hall-Software/dp/0131103628/ref=pd_bbs_1?ie=UTF8&s=books&qid=1221768211&sr=8-1
Any decent code profiler will do this for you. I like DevPartner personally.
If you subclass then intercept the WM_PASTE message you can do what you want, throw the message away to prevent the paste, manipulate the clipboard data, whatever.
I believe that a project can also become corrupted in regards to breakpoints. I have a project, for example, that WILL NOT break on any breakpoints that it remembers from the previous session. I first wrote about this [here][1] [1]: http://kleymeyer.typepad.com/blog/2007/09/problem-with-br.html
Subclass the edit box and handle the WM_PASTE message.
Pointers and classes are completely different topics so I wouldn't really lump them in together like this. Of the two, I would say pointers are more fundamental. A good exercise for learning about what pointers are is the following: 1. create a linked list 2. iterate through it from start to finish 3. rev...
How to redirect all stderr in bash?
|linux|bash|shell|
I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending `2> a_file` to each command. By default, these stderr streams are redirected to the stdout of an ...
I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending `2> a_file` to each command. By default, these stderr streams are redirected to the stdout of an ...
I will also usually use a version file. I will create one file per jar since each jar could have its own version.
The problem is that you are redirecting the output which falls outside of the sudo permission boundaries. try this: sudo sh -c "echo 'something' >> /etc/privilegedfile"
You are probably trying to do something like this.... alert($("#myElement").tagName); You should do this... alert($("#myElement")[0].tagName);
You may want to look into [MacGDBp][1]. It's new, free, and the UI looks great. It utilizes the Xdebug PHP extension as well. You can find instructions in the [help][2] section, which includes Xdebug configurations, and there's also a nice overview of the app from the guys at Particletree here: [Silence The Echo with M...
I'm not sure there will be a single package that exactly suits your needs. You have a few considerations to make: 1. How to pass data to the equipment and how to collect it back. This is very application specific, but a usually good option is the old'n'good serial port (RS232) for which an easy interfact exists for ...
If you have .Net installed, a tool to generate XSD schemas and classes is already included by default.<br /> For me, the XSD tool is installed under the following structure. This may differ depending on your installation directory. C:\Program Files\Microsoft Visual Studio 8\VC>xsd Microsoft (R) Xml Schemas...
Nemerle, at http://nemerle.org/ , is a .NET language (also supporting mono) that supports a lot of of the functional programming paradigm while staying visually close to C#. It has extensive macro support.
I use httperf for a high level view of performance. Rails has a performance script built in, that uses the ruby-prof gem to analyse calls deep within the Rails stack. There is an awesome [Railscast][1] on [Request Profiling][2] using this technique. [NewRelic][3] have some seriously cool analysis tools that give ...
ARM has the nicest instruction set of the widely used embedded platforms, leaving you free to pick up the general principles of writing software for embedded platforms without getting bogged down in weird details like non-orthogonal registers or branch delay slots. There are plenty of emulators - ARM's own, while not f...
If gsScreens is a list of objects instead of a list of pointers (as your code suggests), then you're not storing what you think you're storing in it. C++ is polymorphic through pointers.
If gsScreens is a list of objects instead of a list of pointers (as your code suggests), then you're not storing what you think you're storing in it. What's happening is that -- instead of putting a TestMenu into the list, you're actually constructing a new MenuScreen using the compiler-generated copy constructor an...
We are using [Weifen Luo's "DockPanel Suite"][1] for our project and quite happy with it. [1]: http://sourceforge.net/projects/dockpanelsuite
Filesystems do not support "inserting" data in the middle of a file. If you really have a need for a file that can be written to in a sorted kind of way, I suggest you look into using an embedded database. You might want to take a look at [SQLite][1] or [BerkeleyDB][2]. Then again, you might be working with a tex...
Filesystems do not support "inserting" data in the middle of a file. If you really have a need for a file that can be written to in a sorted kind of way, I suggest you look into using an embedded database. You might want to take a look at [SQLite][1] or [BerkeleyDB][2]. Then again, you might be working with a tex...
The best explanation I have found is by Mike Acton, [Understanding Strict Aliasing][1]. It's focused a little on PS3 development, but that's basically just GCC. From the article: "Strict aliasing is an assumption, made by the C (or C++) compiler, that dereferencing pointers to objects of different types will never ...
The best explanation I have found is by Mike Acton, [Understanding Strict Aliasing][1]. It's focused a little on PS3 development, but that's basically just GCC. From the article: "Strict aliasing is an assumption, made by the C (or C++) compiler, that dereferencing pointers to objects of different types will never ...
I doubt it, the function could still call a global function that altered the state of the world and not violate const.
I found [VBinDiff][1]. I haven't used it, but it probably does what you want. [1]: http://www.cjmweb.net/vbindiff/
Follow basic design principles ------------------------------ - **C**ontrast - Make things that are different *look* different - **R**epetition - Repeat the same style in a screen and for other screens - **A**lignment - Line screen elements up! Yes, that includes text, images, controls and labels. - **P*...
Pass the GUID through a **session**, best way. http://www.w3schools.com/ASP/asp_sessions.asp OR, since it's 2 different servers, pass the information by POST method: http://www.w3schools.com/aspnet/aspnet_forms.asp
Pass the GUID through a **session**, best way. http://www.w3schools.com/ASP/asp_sessions.asp OR, since it's 2 different servers, pass the information by POST method: http://www.w3schools.com/aspnet/aspnet_forms.asp The other possibility is to store the session state in a database on the local server, and r...
One thing that has to be considered when choosing session backend is "how often session data is modified"? Even sites with moderate traffic will suffer if session data is modified on each request, making many database trips to store and retrieve data. In my previous work we used memcache as session backend exclusive...
**Ctrl-F10**: run to cursor during debugging. Took me ages to find this, and I use it all the time; **Ctrl-E, Ctrl-D**: apply standard formatting (which you can define).
Minimal latency objects pooling technique in multithread application
|c++|
1. In the application we have something about 30 types of objects that are created repeatedly. 2. Some of them have long life (hours) some have short (miliseconds). 3. Objects could be created in one thread and destroyed in another. Does anybody have any clue what could be good pooling technique in the sense ...
|c++|multithreading|
1. In the application we have something about 30 types of objects that are created repeatedly. 2. Some of them have long life (hours) some have short (miliseconds). 3. Objects could be created in one thread and destroyed in another. Does anybody have any clue what could be good pooling technique in the sense ...
Not possible. Nothing specifies a "Root" namespace. The default namespace in the options is a visual studio thing, not a .net thing
As long as you follow a single practice, it doesn't really matter. Generally, I write a single unit test for a method that covers all the variations for a method (I have simple methods;) and then write more complex sets of tests for methods that require it. My naming structure is thus usually test<MethodName> (a holdov...
If you have ReSharper installed, then from within the Solution Explorer you can right-click on a reference and click **Find Dependent Code**. If it comes back with a dialog of results then you're using that reference/assembly. If you get the message "Code dependent on module *module name* not found." Then you should be...
The first set of names is more readable to me, since the CamelCasing separates words and the underbars separate parts of the naming scheme. I also tend to include "Test" somewhere, either in the function name or the enclosing namespace or class.
Automatically verify my website's links are pointing to urls that exist?