instruction
stringlengths
0
30k
|xfdl|language-agnostic|ruby|
The .XFDL file extension identifies XFDL Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications. I know how to view XFDL files using a file viewer I fou...
How can I modify .xfdl files? (Update #1)
|ruby|language-agnostic|xfdl|
The .XFDL file extension identifies XFDL Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications. I know how to view XFDL files using a file viewer I fou...
ASP.NET built in user profile, Vs old stile user class/tables
|asp.net|profile|
I am looking for the spiritual guidance of what is the best practice around the use of Profile feature in ASP.NET. How do you decide what should be kept in the built in user Profile, or if you should just go and create your own DB Table and add a column for that? For example, a user has a zip code, should I save the...
I tested your scenario using 2 sample pages using XmlHttpRequest option. Custom headers are available in the aspx page posted to, using XmlHttpRequest. Create the following 2 pages. Make sure the aspx page is in a solution , so that you can run the in the debugger, set break point and inspect the Request.Header col...
Entity-SQL (eSQL) allows you to do things such as dynamic queries more easily than LINQ to Entities. However, if you don't have a scenario that requires eSQL, I would be hesitant to rely on it over LINQ because it will be much harder to maintain (e.g. no more compile-time checking, etc). I believe LINQ allows you t...
Have you tried using the DefaultValueAttribute or ShouldSerialize and Reset methods in conjunction with the constructor? I feel like one of these two methods is necessary if you're making a class that might show up on the designer surface or in a property grid. Hmm... the markdown editor doesn't seem to be doing th...
Have you tried using the [DefaultValueAttribute][1] or <a href="http://msdn.microsoft.com/en-us/library/53b8022e%28VS.71%29.aspx">ShouldSerialize and Reset methods</a> in conjunction with the constructor? I feel like one of these two methods is necessary if you're making a class that might show up on the designer surf...
Continuations are extremely versatile and are a way to save execution state and resume it later. Here is a small example of a cooperative multithreading environment using continuations in Scheme: (Assume that the operations enqueue and dequeue work as expected on a global queue not defined here) (define (fork...
I tested the **&lt;wbr&gt;**, **&amp;#8203;** and **&amp;shy;** techniques. All three worked well in IE 7, Firefox 3 and Chrome. The only one that did not break the copy/paste was the **&lt;wbr&gt;** tag.
You can [load sos][1] and your memory dump into Visual Studio to at least insulate you from the 'interesting' ui that WinDbg presents. [1]: http://blogs.msdn.com/vijaysk/archive/2007/11/15/sos-your-visual-studio.aspx
How about an evironment variable? Set developers machines with the tomcat name and production with the Weblogic name. You can even set your code to use a default one (WebLogic) in case the variable don't exist.
perfmon from Microsoft can monitor each individual CPU. perfmon also works remote and you can monitor farious aspects of Windows. I'm not sure if it helps to find run-away processes because the Windows scheduler dos not execute a process always on the same CPU -> on your 8 CPU machine you will see 12.5 % usage on al...
Python 2.3, or 2.2 if you can live without the many modules that were added (e.g. datetime, csv, logging, optparse, zipimport), aren't using SSL, and are willing to add boilerplate for True/False. 2.4 added decorators. generator expressions, reversed(), sorted(), and the subprocess and decimal modules. Although the...
Embedding a remote Python shell in an application
|python|networking|
You can embed the [IPython](http://ipython.scipy.org/) shell inside of your application so that it launches the shell in the foreground. Is there a way to embed a telnet server in a python app so that you can telnet to a certain port and launch a remote IPython shell? Any tips for redirecting the input/output str...
Individual CPU usage is available through the standard windows performance counters. You can monitor this in perfmon. However, it won't give you the result you are looking for. Unless a thread/process has been explicitly bound to a single CPU then a run-away process will not spike one core to 100% while all the ot...
How about this? You could expand this pattern to do "years" messages, and you could put in a check for "1 day" or "1 hour" so it wouldn't say "1 days ago"... I like the CASE statement in SQL. drop function dbo.time_diff_message GO create function dbo.time_diff_message ( @input_date d...
On a related, or actually, on the completely opposite note - if you're the user of the aforementioned form and want to re-enable the autocomplete functionality, use the 'remember password' bookmarklet from this [bookmarklets page](https://www.squarefree.com/bookmarklets/forms.html). It removes all 'autocomplete="off"' ...
Considering the comment of wcm (top value = xfd), you can calculate it like this; function IntToExcel(n: Integer); string; begin Result := ''; for i := 2 down to 0 do begin if (n div 26^i)) > 0 then Result := Result + Char(Ord('A')+(n div (26^i))); ...
Considering the comment of wcm (top value = xfd), you can calculate it like this; function IntToExcel(n: Integer); string; begin Result := ''; for i := 2 down to 0 do begin if ((n div 26^i)) > 0) or (i = 0) then Result := Result + Char(Ord('A')+(n div (26^i)...
Here are some tips from A List Apart for cleaning user input to avoid potential problems http://www.alistapart.com/articles/secureyourcode
As Jason said, I would focus more on cleaning the data on the server side. You don't really have any real control on the client side unless you're using Silverlight / Flex and even then you'd need to check the server. That being said, Here are some tips from A List Apart you may find helpful regarding server sid...
WebDev.WebServer.EXE Crashes After VS 2008 SP1 Install
|asp.net|webserver|
Since, for various reasons, I can't use IIS for an ASP.NET website I'm developing, I run Cassini from the command line to test the site. However, after installing Visual Studio 2008 SP1, I get a System.Net.Sockets.SocketException when I try to start up the web server. Is anyone else having this problem, and if so, ho...
|ajax|ruby-on-rails|
|ajax|ruby-on-rails|
|ajax|ruby-on-rails|
|ruby-on-rails|ajax|
I am working on a rails project. Using the tag observe_field, I am taking text typed into a text area, processing it in a control, and displaying the result in a div (very similar to the preview in stack overflow). Everything works fine until I type certain special chars. 1. ? => causes the variable not to be found...
Best place I've found for commercial toolbar icons etc is [glyfx.com][1]. [1]: http://glyfx.com
Where can I get free Vista style developer graphics?
|graphics|
What is the best source of free Vista style graphics for application development? I want 32x32 and 16x16 that I can use in a Winforms application.
|winforms|graphics|
If you're using Visual Studio Professional or above, you've got a zip file of icons in your VS path under `Common7\VS2008ImageLibrary`. Some of the images use the Vista style.
Why does TreeNodeCollection not implenent IEnumerable<TreeNode>?
|.net|winforms|
TreeNodeCollection, like some of the other control collections in System.Windows.Forms, implements IEnumerable. Is there any design reason behind this or is it just a hangover from the days before generics?
Checking the results of a Factory in a unit test
|unit-testing|tdd|java|
I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object. What is the best way to test that the factory h...
I'm not necessarily looking for the fastest but a nice balance, some of the server that this code is being developed for are fairly slow, the script that hashes and stores the password is taking 5-6 seconds to run, and I've narrowed it down to the hashing (if I comment the hashing out it runs, in 1-2 seconds). It do...
I concur with the Dragon Book reference; IMO, it is the definitive guide to compiler construction. Get ready for some hardcore theory, though. If you want a book that is lighter on theory, [Game Scripting Mastery](http://www.amazon.com/Scripting-Mastery-Premier-Press-Development/dp/1931841578/ref=sr_1_1?ie=UTF8&s=bo...
In my experience its best to keep an the info in the profile to a bare minimum, only put the essentials in there that are directly needed for authentication. Other information such as addresses should be saved in your own database by your own application logic, this approach is more extensible and maintainable.
I think that depends on how many fields you need. To my knowledge, Profiles are essentially a long string that gets split at the given field sizes, which means that they do not scale very well if you have many fields and users. On the other hand, they are built in, so it's an easy and standardized way, which means t...
I think that depends on how many fields you need. To my knowledge, Profiles are essentially a long string that gets split at the given field sizes, which means that they do not scale very well if you have many fields and users. On the other hand, they are built in, so it's an easy and standardized way, which means t...
Forget about finding a IDE to write/run/compile assembler on Mac. But, remember mac is UNIX. See [http://asm.sourceforge.net/articles/linasm.html][1]. A decent guide (though short) to running assembler via GCC on Linux. You can mimic this. Macs use Intel chips so you want to look at Intel syntax. [1]: http://asm...
What type is selectedYear? A DateTime? If so then you might need to convert to a string.
Is there a lightweight, preferable open source, formatable label control for dotnet?
|.net|
I have been looking for a way to utilize a simple markup language, or just plain html, when displaying text in WinForm applications. I would like to avoid embedding a webbrowser control since in most of the case I just want to highlight a single word or two in a sentence. I have looked at using a RTFControl but I b...
I have been looking for a way to utilize a simple markup language, or just plain html, when displaying text in WinForm applications. I would like to avoid embedding a webbrowser control since in most of the case I just want to highlight a single word or two in a sentence. I have looked at using a RTFControl but I b...
The reason was that the value I was retrieving was from a form element, but the submit was done through a link + JQuery, not through a form button submit.
Well, just use Html. We have used the following 'FREE' control in some of our applications, and its just beautiful. We can define the UI in HTML Markup and then render it using this control. <http://www.terrainformatica.com/htmlayout/main.whtm> Initially, we started looking at HtmlToRTF converters so that we c...
Request.Form only includes variables posted through a form, while Request.Params includes both posted form variables and get variables specified as URL parameters.
Also worth remembering is that there are different types of MVP as well. Fowler have broken the pattern into two - Passive View and Supervising Controller. When using Passive View your View typically implement a fain grained interface with properties mapping more or less directly to the underlaying UI widget. For in...
You can't link against wine as it's essentially a call interdictor/translator rather than a set of libraries you can hook into. If linux is important go OpenGL/SDL/OpenAL.
Video Thumbnails in Java
|java|video|jmf|
I want to generate a thumbnail preview of videos in Java. I'm mostly JMF and video manipulation alienated. - Is there an easy way to do it? - What about codecs? Will I have to deal with it? - Any video type is suported? (including Quicktime)
@Brian R. Bondy Thanks for the explicit help for how to do get the number of items. In fact I was all ready working my way to understanding that it could be done (for list or report view) with ListView_GetCountPerPage, and I would use you way to get it for for the others, though I don't need the ListView_ApproximateV...
If you're fine with calling something external, you can use [ghostscript][1] - look at the ps2ascii script included with the distribution. I'm not sure what you want from a graphical tool - a big button that you push to chose the input and output files? A preview? You might be able to use GSView, depending on what y...
If cost isn't an issue (*there is also an Express SKU*) then take a look at the 800,000 pound gorilla. WebSphere MQ (MQ Series). It runs on practically any platform and supports so many different queue managers and messaging patterns it really isn't appropriate to list them here. - IBM's WebSphere MQ Site: [http://...
Amazon's S3 will occasionally fail with errors during uploads or downloads -- generally "500: Internal Server" errors. The error rate is normally pretty low, but it can spike if the service is under heavy load. The error rate is never 0%, so even at the best of times the occasional request will fail. Are you checkin...
Git ignore file for Xcode projects
|git|xcode|
Which files should I include in .gitignore when using Git in conjunction with Xcode?
|version-control|git|xcode|
|mac|version-control|git|xcode|
IMO you may be better off with ASP.Net. While you would have a slight learning curve, you'd be developing on a proven, reliable, scalable model rather than something thats in beta and will likely change before RTM. Also, with AJAX these days its possible to get a pretty slick user experience out of ASP.Net.
I think you can avoid a commit hook script in this case by using the svn:eol-style property as described <a href="http://svnbook.red-bean.com/en/1.1/ch07s02.html"> here </a> in the Red Book. This way SVN can worry about your line endings for you. Good luck!
A Hibernate session loads all data it reads from the DB into what they call the <i>first-level cache</i>. Once a row is loaded from the DB, any subsequent fetches for a row with the same PK will return the data from this cache. Furthermore, Hibernate gaurentees reference equality for objects with the same PK in a singl...
* Is there anything in the Application section of the event log? * Have you tried using a different port? * Per [this thread][1], try: >Unbind from Visual Source safe, delete the web project from the solution, rename the folder where the website is stored and then re add to the solution as an existing web site and t...
|reporting-services|
Personally, I think you should know how databases work as well as the relational model and the rhetoric behind it, including all forms of normalization (even though I rarely see a need to go beyond third normal form). The core concepts of the relational model do not change from relational database to relational databas...
Practical use of System.WeakReference
|.net|.net-framework|garbage-collection|
I understand what [System.WeakReference][1] does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's t...
|.net|garbage-collection|
I've never used it but the tutorial here: http://webby.rubyforge.org/tutorial/ Makes it look like the answer to your question is "yes". Specifically I'm looking under the "Making Changes" header on that page.
Best Way To Determine If .NET 3.5 Is Installed
|.net-3.5|installation|registry|.net-framework|
I need to programatically determine whether .NET 3.5 is installed. I thought it would be easy: <% Response.Write(Environment.Version.ToString()); %> Which returns "2.0.50727.1434" so no such luck... In my research I have that there are some rather obscure registry keys I can look at but I'm not sure if tha...
|.net|.net-3.5|installation|registry|
I've been getting into some pretty heavy use of NHibernate with ASP.NET MVC lately, and am really loving it.
I think you should consider a different development strategy to prevent issues like this. One that seems to work best for me is to never do development directly on my master branch. Regardless of the changes I'm making, I always create a new branch for new code: <pre> git checkout -b topic/topic_name master </pr...
If you're looking to use powerful, higher level tools rather than building *everything* yourself, [this course page](http://www.antlr.org/wiki/display/CS652/CS652+Home) is a pretty good option. It's a languages course by the author of the Java parser engine ANTLR that I took last Spring. You can get the book for the ...
If you're looking to use powerful, higher level tools rather than building *everything* yourself, going through the projects and readings for [this course](http://www.antlr.org/wiki/display/CS652/CS652+Home) is a pretty good option. It's a languages course by the author of the Java parser engine ANTLR. You can get th...
[This website][1] might help you out a bit more. Also [this one][2]. I'm working from a fairly rusty memory of a statistics course, but here goes nothing: When you're doing analysis of variance (ANOVA), you actually calculate the F statistic as the ratio from the mean-square variances "between the groups" and th...
You need to put from project import Project in `controllers/__init__.py`. Note that when [Absolute imports][1] become the default (Python 2.7?), you will want to add a dot before the module name (to avoid collisions with a top-level model named `project`), i.e., from .project import Project [...
It looks like WebOrb can do it: [WebOrb FAQ][1] (last entry) > Can I stream Flash video to a Flex/Flash client through WebORB? Yes, WebORB supports FLV video streaming. An example is included with the WebORB for .NET product distribution. I haven't worked with WebOrb though, so I can't say for sure how easy it i...
Interfaces and Versioning
|design-patterns|