instruction
stringlengths
0
30k
i.e., a web browser client would be written in C++ !!!
If the editor is scriptable it should be possible to write a script to do the navigation. There might even be a Vim or Emacs script that already does something similar. FWIW when I writing a lot of Bison/Flexx I wrote a [Zeus][1] Lua macro script that attempted to do something similar (i.e. move from input file to t...
You have to give a look to the [Google Documents List Data API][1] [1]: http://code.google.com/apis/documents/developers_guide_dotnet.html
With MVC starting to become a reality in the .net web development world, I would start thinking along those lines. Remember that M, V and C are distinct components, so: * Company.Namespace.Website * Company.Namespace.Website.Core * Company.Namspance.Website.Core.Tests * Company.Namespace.Website.Model * Company....
Differently from when you reference the .js files directly from the <script> tag (note that google js api also supports this, see [here](http://code.google.com/apis/ajaxlibs/documentation/#dojo)), google.load is not synchronous. This means that when your code reach google.load, it will not wait for dojo to be ful...
Google Docs does [have an API][1] which allows you to search, upload, delete and retrieve documents from the Google Docs list of a specific user. You could conceivably use this to upload a document from your server and then retrieve the URL of that document (once it is imported), which you can then use to redirect the...
How do I create a sql dependency ona table in sql server 2000 and asp.net 2.0?
It's perfectly acceptable to use 2 different link formats. If 2 users are not seeing the same content why should they be at the same URL.
The exact circumstances are obviously very specific to your project ( e.g. development team, management style, process maturity, difficulty of the subject matter, etc.). In order to scope this a bit better so we can speak about it in anything but sweeping oversimplifications, I'm going to restate your question: >> ...
Thinking there must be a pure MAPI solution, I believe I've figured out how OutlookSpy does it. <br><br><br> The following code snippet, inserted after printf("Created MAPI session\n"); in the example from [KB194627][1], will show the *Server DN*. LPPROFSECT lpProfSect; hr = lpSess->OpenPro...
Thinking there must be a pure MAPI solution, I believe I've figured out how OutlookSpy does it. <br><br><br> The following code snippet, inserted after printf("Created MAPI session\n"); in the example from [KB194627][1], will show the *Server DN*. LPPROFSECT lpProfSect; hr = lpSess->OpenPro...
Thinking there must be a pure MAPI solution, I believe I've figured out how OutlookSpy does it. <br><br><br> The following code snippet, inserted after printf("Created MAPI session\n"); in the example from [KB194627][1], will show the *Server DN*. LPPROFSECT lpProfSect; hr = lpSess->OpenPro...
We store everything related to an application in our SCM. The DB scripts are generally stored in their own project, but are treated just like any other code... design, implement, test, commit.
I have found the C++ behavior very annoying. You cannot write virtual functions to, for instance, return the desired size of the object, and have the default constructor initialize each item. For instance it would be nice to do: `BaseClass() { for (int i=0; i<virtualSize(); i++) initialize_stuff_for_index(...
For Windows EXE's and DLL's: require "Win32API" FILENAME = "c:/ruby/bin/ruby.exe" #your filename here s="" vsize=Win32API.new('version.dll', 'GetFileVersionInfoSize', ['P', 'P'], 'L').call(FILENAME, s) p vsize if (vsize > 0) result = ' '*vsize Win32...
I think you might be looking for something other then an array. If you are trying to gradually extend the amount of data frequently, you should use a dynamic data structure such as`ArrayList`. This has an `Add` method which adds the specific object or value to the array without concerns for space. It also has a nift...
XSLTs uses functional programming - something most programmers are not used to (hence why some people consider it non-intuitive I guess).
\z Shows you table, view, and sequence permissions, for the objects contained within the Database. It does not show permissions on the database itself. If you create a table or some other object within 'testdb', it will then show up in \z's output. You can see which Databases exist on your system with \l (or \l+ fo...
I did something similar setting up a handler to stream video files from the blog on my home server. I ended up ditching it because it killed my bandwidth whenever someone would view a video, but I did have it up and working for a while. To the get it to work I had to check dasBlog out from source control and open i...
I did something similar setting up a handler to stream video files from the blog on my home server. I ended up ditching it because it killed my bandwidth whenever someone would view a video, but I did have it up and working for a while. To get it to work I had to check dasBlog out from source control and open it in...
[Flying Saucer](https://xhtmlrenderer.dev.java.net/) is a Java-based XHTML & CSS2.1 renderer that passess ACID2. Its downside is that it has no error handling. It is not really designed to be a browser, but rather to be a component used to display HTML content (help files, etc.) within an application.
[Flying Saucer](https://xhtmlrenderer.dev.java.net/) is a Java-based XHTML & CSS2.1 renderer that passess ACID2 with some error caveats. Its downside is that it has no error handling. It is not really designed to be a browser, but rather to be a component used to display HTML content (help files, etc.) within an appl...
![alt text][1][Gnu Grep][2] is alright You can download it for example here: ([site ftp][3]) All the [usual options][4] are here. [1]: http://www.gnu.org/graphics/gnu-head-sm.jpg [2]: http://www.gnu.org/software/grep/ [3]: ftp://mirrors.kernel.org/gnu/grep/ [4]: http://www.gnu.org/software/grep/do...
![alt text][1][Gnu Grep][2] is alright You can download it for example here: ([site ftp][3]) All the [usual options][4] are here. That, combined with [gawk][5] and [xargs][6] (includes 'find', from [GnuWin32][7]), and you can really script like you were on Unix! [1]: http://www.gnu.org/graphics/gnu-head...
Here is a link to Adobe's reference material http://www.adobe.com/devnet/pdf/pdf_reference.html You should know though that PDF is only about presentation, not structure. Parsing will not come easy.
I've had no problems at all, in fact some of the tools in sharpdevelop (like the vb.net -> c# converter) are very nice to have. In addition, there are some good libraries included with sharpdevelop that are also handy (like sharpziplib for zip files) I actually have VS2005, VS2008, SharpDevelop and VisualStudio 6...
What you're after is: ClientScript.RegisterClientScriptInclude(this.GetType(), "scriptName", "../dir/subdir/scriptName.js")
What you're after is: ClientScript.RegisterClientScriptInclude(this.GetType(), "scriptName", "../dir/subdir/scriptName.js")
Why not use the format dd mmm yyyy There is only one way it can be interpreted.
If you're writing code that will be used by people that would rather look at the function declaration than any comments around it, then a specification will tell them which exceptions they might want to catch. Otherwise I don't find it particularly useful to use anything but `throw()` to indicate that it doesn't thr...
Virtual Earth has something favour to [WPF][1] [1]: http://blogs.msdn.com/devkeydet/archive/2008/06/24/wpf-and-virtual-earth-revisited.aspx
They behave very well together, I have had SharpDevelop installed with 2003, 2005 and 2008. No issues at all.
use the <a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx">Microsoft XSD inference tool</a>
the <a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx">Microsoft XSD inference tool</a> is a good, free solution. Many XML editing tools, such as XmlSpy (mentioned by @Garth Gilmour) or OxygenXML Editor also have that feature. They're rather expensive, though. BizTalk Server also has an XSD inferrin...
the <a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx">Microsoft XSD inference tool</a> is a good, free solution. Many XML editing tools, such as XmlSpy (mentioned by @Garth Gilmour) or OxygenXML Editor also have that feature. They're rather expensive, though. BizTalk Server also has an XSD inferrin...
There are a couple of views we use in associations and they still appear just like any other relationship. We did need to add the associations manually. The only thing I can think to suggest is to take a look at the properties and decorated attributes generated for those classes and associations. Add a couple ta...
Mercury QuickTest Pro, Borland SilkTest, and Ranorex Recorder are some GUI testing tools.
For your specific question of **plotting**, and your specific scenario of an average of 1-2 errors per day out of 150, the simplest thing might be to plot *trimmed means*, or the range of the middle 95% of values, or something like that. It really depends on what value you want out of the plot. If you are really ...
Use test-driven development. A failing test is always a strong motivation.
Are you familiar with [Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection)? If no, then you ceartanly would benefit from learning about that concept. I guess the good-old [Inversion of Control Containers and the Dependency Injection pattern](http://www.martinfowler.com/articles/injection.html) b...
Whatever time /you/ feel is unacceptably slow for a query on your systems. It depends on the kind of queries you run and the kind of system; a query taking several seconds might not matter if it's some back-end reporting system doing complex data-mining etc where a delay doesn't matter, but might be completely unacc...
Usually I try to tell myself that **getting things to work in the real world** is just as interesting, because there is where your code will get **credits** or will be **improved** by discovered bugs and feature requests.
Set it to whatever you like. The only problem is that in a stock MySQL, it can only be set in increments of 1 second, which is too slow for some people. Most heavily used production servers execute far too many queries to log them all. The slow log is a way of filtering the log so that we can see the ones which take...
This depends a lot on the data in the file. Big mainframes have been doing sequential data processing for a long time but they don't normally use random access for the data. They just pull it in a line at a time and process that much before continuing. For random access it is often best to build objects with cachin...
One thing that pops into mind i Wikipedia. One of the co-inventors dropped out, another one is having an increasngly limited role in it, the editor turnover is mindboggling, and there are a large number of people trying to subvert it (vandalism, fake articles, putting in false information), and they have a constant inf...
In short you would want something like this: <style> .start { background-image: url("topofbubble.png"); height: <heightofimage>; } .end { background-image: url("bottomofbubble.png"); height: <heightofimage>; } .body {background-image: url("sliceofbubblemiddle.png"); } </style> ...
Could you explain the reason why you would want to change the behavior of the CEdit box? As a user I would have a problem with the caret being changed every time I enter some character. Or is it what you would like to prevent if you change that value programmatically?
Separating user table from people table in a relational database
|database|database-design|rdbms|
I've done many web apps where the first thing you do is make a user table with usernames, passwords, names, e-mails and all of the other usual flotsam. My current project presents a situation where non-users records need to function similarly to users, but do not need to the ability to be a first order user. Is i...
I have a couple of questions to ask to clarify what you are doing: 1) Does your message object *just* contain a message e.g. body, recipient, schedule time? 2) What do you intend to do with your Invitation object? Does it need to be treated specially compared to an EmailMessage? 3) If so WHAT is so special about i...
If you're concerned about your personal security (I'm not sure if that's what you're really getting after, so my apologies if this is misguided), you can always use a Tor network. If you use Firefox, you can use <a href="https://www.torproject.org/torbutton/">Torbutton</a> for one click enabling. It has the benefit (...
Can you specify filenames using wildcards or regexes in the subversion mv command?
|svn-mv-syntax|svn|
I want to do this so that I can say something like, `svn mv *.php php-folder/`, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the [svn book](http://svnbook.red-bean.com/en/1.0/re18.html). Thanks in advance!
|svn|
|svn|
I want to do this so that I can say something like, `svn mv *.php php-folder/`, but it does not seem to be working. Is it even possible? No mention of it is made on the relevant page in the [svn book](http://svnbook.red-bean.com/en/1.0/re18.html). Example output of `svn mv *.php php-folder/` : `svn: Client erro...
yeah, I agree. trusting a site with your email credentials isnt safe. Especially after what was found by gmail archiver (http://it.slashdot.org/article.pl?sid=08/03/11/1723206&from=rss) But just from programmatic POV I was wondering how they did this. maybe Gmail hotmail and all others do have API's which users c...
I've been doing Flash for 9 years and I still find this a difficult thing to get right. There is a balance of power between designers and developers, which will inevitably tip one way or the other. If you work for a developer led studio, then you are lucky, as the designers will be instructed to make a design t...
|asp.net|sql-server|
I need to create a sql dependency on a table in sql server 2000 in my asp.net 2.0 pages. What are the required actions and what is the best way?
If you only need this functionality for yourself you could download the "[Send to google docs" firefox extension][1]. That will add a right-click menu on all document links on the web and allow you to open them in google docs. [1]: http://blogs.bnet.com/businesstips/?p=1855
Use the /clr compile option
Width issue with Ext.Panel bbar in IE 6
|internet-explorer|extjs|
I've just run into a display glitch in IE6 with the ExtJS framework. - Hopefully someone can point me in the right direction. In the following example, the bbar for the panel is displayed 2ems narrower than the panel it is attached to (it's left aligned) in IE6, where as in Firefox it is displayed as the same width ...
This is called "profiling". Your IDE probably comes with one: see [Open Source Profilers in Java](http://java-source.net/open-source/profilers).
If you wrap your alias in single ticks **'numberTransactions'** and then call **ORDER BY 'numberTransactions'** select customerName, customerId, ( select count(*) from Purchases where Purchases.customerId=customerData.customerId ) as 'numberTransactions' ...
***There are better ways to get your result but just from your example query this will work on SQL2000 or better.*** If you wrap your alias in single ticks **'numberTransactions'** and then call **ORDER BY 'numberTransactions'** select customerName, customerId, ( select count(*)...
Here is a good explanation: [http://carcino.gen.nz/tech/cpp/struct_vs_class.php][1] > So, one more time: in C++, a struct is identical to a class except that the members of a struct have public visibility by default, but the members of a class have private visibility by default. [1]: http://carcino.gen.nz/tec...
I like the idea of quitting stuff. I don't need to check every 15 minutes, like I do. The problem is then, with twitter, email, aim, irc, et al., there is a lot of stuff to open. My solution is just a little bash command using the handy-dandy `open` command with a bunch of application names. It opens everything at o...
I have been using NUnit for 2 years. All is fine but I have to say that the Unit system in VS is pretty nice because it's inside the Gui and can more easily do test for private function without having to mess around. Also, the Unit Testing of VS let you do covering and other stuff that NUnit alone can't do.
Methods are overloadable, those are part of the language syntax.
User Control created dynamically not able to handle events on PostBack
|asp.net|dynamic|user-controls|postback|
I have a user control which is loaded in the page dynamically using the following code in Init of the Page. > Dim oCtl As Object > oCtl = LoadControl("~/Controls/UserControl1.ascx") > > oCtl.Id = "UserControl11" > PlaceHolder1.Controls.Clear() > PlaceHolder1.Controls.Add(oCtl) The user co...
|asp.net|user-controls|postback|dynamic|
I have a user control which is loaded in the page dynamically using the following code in Init of the Page. Dim oCtl As Object oCtl = LoadControl("~/Controls/UserControl1.ascx") oCtl.Id = "UserControl11" PlaceHolder1.Controls.Clear() PlaceHolder1.Controls.Add(oCtl) The user control also...
There are some good answers above, but in the specific example of turning an ingested feed item into a node, you could also take the approach of using the simplefeed module ([http://wwww.drupal.org/project/simplefeed][1]). This module uses the simplepie engine to ingest feeds and turns individual items from each feed i...
Not in the specification, no. The main difference is in programmer expectations when they read your code in 2 years. structs are often assumed to be POD. Structs are also used in template metaprogramming when you're defining a type for purposes other than defining objects.
`read` without any parameters will only continue if you press enter. The DOS `pause` command will continue if you press any key. Use `read –n1` if you want this behaviour.
The power you can have over the garbage collector and how it manages object collection is very powerful, especially for long-running and time-sensitive applications. It starts with weak, soft, and phantom references in the java.lang.ref package. Take a look at those, especially for building caches (there is a java.util...
All of the other answers have missed how **hard** it is to do this properly. You can do a first cut approach at this which is accurate to a certain extent, but until you take into account IEEE rounding modes (et al), you will never have the *right* answer. I've written naive implementations before with a rather large a...
*(EDIT: added a bit on David Goldberg's article)* All of the other answers have missed how **hard** it is to do this properly. You can do a first cut approach at this which is accurate to a certain extent, but until you take into account IEEE rounding modes (et al), you will never have the *right* answer. I've writt...
I must admit I'm a fan of <a href="http://www.aaronsw.com/2002/xmltramp/">xmltramp</a> due to its ease of use. Accessing the above becomes: import xmltramp values = xmltramp.parse('''...''') def getValues( values, category ): cat = [ parent for parent in values['parent':] if p...
I must admit I'm a fan of <a href="http://www.aaronsw.com/2002/xmltramp/">xmltramp</a> due to its ease of use. Accessing the above becomes: import xmltramp values = xmltramp.parse('''...''') def getValues( values, category ): cat = [ parent for parent in values['parent':] if p...
Linking two settable properties together is bad juju in my opinion. Switch to using explicit get / set methods instead of a property if this is really what you want. Code which has non-obvious side-effects will almost always bite you later on. Keep things simple and straightforward as much as possible. Also, if you ...
What is your preferred way to produce charts in a Ruby on Rails web application?
|ruby|ruby-on-rails|charts|
I'd like to add some pie, bar and scatter charts to my Ruby on Rails web application. I want want them to be atractive, easy to add and not introduce much overhead. What charting solution would you recommend? What are its drawbacks (requires Javascript, Flash, expensive, etc)?
Use this as an opportunity to remove unused features! Definitely go with the new language. Call it 2.0. It will be a lot less work to rebuild the 80% of it that you really need. Start by wiping your brain clean of the whole application. Sit down with a list of its overall goals, then decide which features are ne...
The builtin variables @- and @+ hold the start and end positions, respectively, of the last successful match. $-[0] and $+[0] correspond to entire pattern, while $-[N] and $+[N] correspond to the $N ($1, $2, etc.) submatches.
What's wrong with singleton?
|oop|design-patterns|singleton|language-agnostic|
Please feel free to bitch on [Singleton][1]. ---------- This post is motivated by answers on [What design pattern do you use the most?][2] question. I have to scream at the world **Do not overuse singletons**. Please help me scream. [1]: http://en.wikipedia.org/wiki/Singleton_pattern [2]: http://stackov...
My first guess would be that the DOM-using code is treating elements that are marked as optional in the DTD as compulsory.
My first guess would be that the DOM-using code is treating elements that are marked as optional in the DTD as compulsory. Edited to add: What I mean is that unless you validate against a DTD, you cannot expect something like the following (example using dom4j) to return anything but null. doc.selectSingleNo...
To make the text portion of a ComboBox non-editable, set the DropDownStyle property to "DropDownList". The ComboBox is now essentially select-only for the user. You can do this in the Visual Studio designer, or in C# like this: <pre><code> stateComboBox.DropDownStyle = ComboBoxStyle.DropDownList; </pre></code> ...
Mark Pilgrim describes how to do this on Windows for the current machine with the Netbios module [here][1]. You can get the Netbios module as part of the Win32 package available at python.org. Unfortunately at the moment I cannot find the docs on the module. [1]: http://groups.google.com/group/comp.lang.python...