instruction
stringlengths
0
30k
There are several places you can indicate to the .Net Framework that a specific version of a strongly typed library should be preferred over another. These are: - Publisher Policy file - machine.config file - app.config file All these methods utilise the <a href="http://msdn.microsoft.com/en-us/library/eftw1fys.aspx" title=".NET Framework General Reference - &lt;bindingRedirect&gt; Element">"&lt;bindingRedirect&gt;"</a> element which can instruct the .Net Framework to bind a version or range of versions of an assembly to a specific version. Here is a short example of the tag in use to bind all versions of an assembly up until version 2.0 to version 2.5: <assemblyBinding> <dependantAssembly> <assemblyIdentity name="foo" publicKeyToken="00000000000" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0 - 2.0.0.0" newVersion="2.5.0.0" /> </dependantAssembly> </assemblyBinding> There are lots of details so it's best if you read about <a href="http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx" title=".NET Framework Developer's Guide - Redirecting Assembly Versions">Redirecting Assembly Versions on MSDN</a> to decide which method is best for your case.
You can use inspect.stack() import inspect inspect.stack()[0] => (<frame object at 0x00AC2AC0>, 'g:\\Python\\Test\\_GetCurrentProgram.py', 15, '<module>', ['print inspect.stack()[0]\n'], 0) os.path.abspath (inspect.stack()[0][1]) => 'g:\\Python\\Test\\_GetCurrentProgram.py'
Even if the stored procedure is 10% faster (it probably isn't), you may want to ask yourself how much it really matters. What really matters in the end, is how easy it is to write and maintain code for your system. If you are coding a web app, and your pages all return in 0.25 seconds, then the extra time saved by using stored procedures is negligible. However, there can be many added advantages of using an ORM like NHibernate, which would be extremely hard to duplicate using only stored procedures.
The [XML specification][1] agrees with Wikipedia: > 2.5 Comments > > [Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor MAY, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity references MUST NOT be recognized within comments. However, while in theory theory agrees with practice, in practice it doesn't, so I'd be curious to see how your experiment works out. [1]: http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments
According to the [XML specification][1], a well-formed XML document is: > `document ::= prolog element Misc*` where `prolog` is > `prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?` and > `XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'` which means that, if you want to have comments at the top, you cannot have an XML type declaration. The specification agrees with Wikipedia on comments: > 2.5 Comments > > [Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor MAY, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity references MUST NOT be recognized within comments. All of this together means that you can put comments anywhere that's not inside other markup, except that you cannot have an XML declaration if you lead with a comment. However, while in theory theory agrees with practice, in practice it doesn't, so I'd be curious to see how your experiment works out. [1]: http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments
According to the [XML specification][1], a well-formed XML document is: > `document ::= prolog element Misc*` where `prolog` is > `prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?` and > `XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'` which means that, if you want to have comments at the top, you cannot have an XML type declaration. The specification agrees with Wikipedia on comments: > 2.5 Comments > > [Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor MAY, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity references MUST NOT be recognized within comments. All of this together means that you can put comments **anywhere that's not inside other markup**, except that you **cannot have an XML declaration if you lead with a comment**. However, while in theory theory agrees with practice, in practice it doesn't, so I'd be curious to see how your experiment works out. [1]: http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments
|io|java|
We have developed several applications using visual studio 2005 with the devart ado.net data provider for PostgreSql ([http://www.devart.com/pgsqlnet/][1]). One of the advantages of this provider is that it provides full Visual Studio support. The latest versions include all the new framework features like linq. [1]: http://www.devart.com/pgsqlnet/
You might be able to use [Pmon.exe][1] for this. You can get it as part of the [Windows Resource Kit tools][2] (the link is to the Server 2003 version, which can apparently be used in XP as well). [1]: http://commandwindows.com/server2003tools.htm [2]: http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd
Metamodelling tools..
|model-driven|tool|diagram-editor|
What tools are available for metamodelling? Especially for developing diagram editors, at the moment trying out [Eclipse GMF][1] Wondering what other options are out there? Any comparison available? [1]: http://www.eclipse.org/modeling/gmf/
|tools|model-driven|diagram-editor|
Vista BEX error
|winapi|windows-vista|
Recently I got IE7 crashed on Vista on jar loading (presumably) with the following error: Problem signature: Problem Event Name: BEX Application Name: iexplore.exe Application Version: 7.0.6001.18000 Application Timestamp: 47918f11 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6001.18000 Fault Module Timestamp: 4791a7a6 Exception Offset: 00087ba6 Exception Code: c000000d Exception Data: 00000000 OS Version: 6.0.6001.2.1.0.768.3 Locale ID: 1037 Additional Information 1: fd00 Additional Information 2: ea6f5fe8924aaa756324d57f87834160 Additional Information 3: fd00 Additional Information 4: ea6f5fe8924aaa756324d57f87834160 Googling revealed this sort of problems [is][1] [common][2] [for][3] [Vista][4] and relates to [Java][5] (although SUN [negates][6]). Also I think it has something to do with DEP. I failed to find official Microsoft Kb. So, the questions are: - What BEX stands for? - What is it about? - How to deal with such kind of errors? [1]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1194672&SiteID=1 [2]: http://support.mozilla.com/tiki-view_forum_thread.php?locale=eu&comments_parentId=101420&forumId=1 [3]: http://www.eggheadcafe.com/software/aspnet/29930817/bex-problem.aspx [4]: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.vc.mfc&tid=d511c635-3c99-431d-8118-526d3e3fff00&cat=&lang=&cr=&sloc=&p=1 [5]: http://www.gomanuals.com/java_not_working_on_windows_vista.shtml [6]: http://weblogs.java.net/blog/chet/archive/2006/10/java_on_vista_y.html
|winapi|windows-vista|
@slipsec: I don't have access to a 2003 server to try, but googling "2003 server" SCHTASKS there are links related to questions about it. Perhaps you misspell the command? Like Matt says, you also can use AT, but in this case you don't have access to the scheduled tasks via the Control Panel, only via the AT command.
It needs to be much simpler: involve less knowledge of the concepts, and require fewer steps - preferably zero. When the technology works with little or no assistance, it'll take off. The mechanics of OpenID credentials, providers and suppliers shouldn't need to be exposed to the user. People talk about educating the masses of internet users, but that's never going to happen - the masses never stop being stupid. If you want to appeal to the masses, you need to bring the technology down to meet their level instead. When a Google-affiliated site picks up that you're logged into Google and silently uses that account, it works without you ever having to tell it who you are. The fact that OpenID is so clumsy in comparison is why the big providers like Google are still avoiding it, and why the general public won't adopt it. I think the developers of OpenID messed up when they used a URL rather than an email address for the IDs. People know what email addresses are, they already have one that's associated with them (or can get one easily), and email providers like Google and Microsoft are happy to adopt a role as portals. In fact, an automatic translation from email address to URL is all it would take: > myname@example.com -> http://www.example.com/openid/myname
I suppose an alternative would be somewhere defining this sort of thing ... public class Reference { public var value:*; } Then use functions that take some number of Reference arguments to act as "pointers" if you're really just looking for "out" parameters and either initialize them on the way in or not and your swap would become: function swap(Reference a, Reference b) { var tmp:* = a.value; a.value = b.value; b.value = tmp; } And you could always go nuts and define specific IntReference, StringReference, etc.
Haskell implements type-constructor parameterisation (generics) quite well. So does Scala (although it needs a bit of hand-holding sometimes). Both of these languages have higher-kinded types (a.k.a. abstract type constructors or type-constructor polymorphism). See here: [Generics of a Higher Kind][1] [1]: http://lambda-the-ultimate.org/node/2579
You could also use a wrapper instead of int: public class Integer { public var value:int; public function Integer(value:int) { this.value = value; } } Of course, this would be more useful if you could use operator overloading...
Heck, English doesn't even implement generics well. :) My bisas is for C#. Mainly because that is what I am currently using and I have used them to good effect.
If I understand your proposal right, http://bitzi.com/ has done this for a while.
I use .Net (VB.Net), and haven't had any problems using generics. It's mostly painless. Dim Cars as List(Of Car) Dim Car as Car For Each Car in Cars ... Next Never had any problems using the generic collections, although I haven't gone so far as to design any objects that use generics on my own.
It appears that the <machinekey /> is only for ViewState encryption. It doesn't affect the file names for auto compiled assemblies.
How do I find the high water mark (for sessions) on Oracle 9i
|oracle-database|
How can I find the high water mark (the historical maximum number of concurrent users) in an oracle database (9i).
Short answer: when it's only going to happen once in a long time. [Long Answer][2]. [1]: http://blogs.msdn.com/ricom/archive/2008/01/11/performance-quiz-13-linq-to-sql-compiled-queries-cost.aspx [2]: http://blogs.msdn.com/ricom/archive/2008/01/14/performance-quiz-13-linq-to-sql-compiled-query-cost-solution.aspx
Pylons error - 'MySQL server has gone away'
|python|mysql|pylons|
[I hope this isn't too obscure&hellip; I'll ask the newsgroup if nobody knows here] I'm using Pylons (a python framework) to serve a simple web application, but it seems to die from time to time, with this in the error log: (2006, 'MySQL server has gone away') I did a bit of checking, and saw that this was because the connections to MySQL were not being renewed. This shouldn't be a problem though, because the sqlalchemy.pool_recycle in the config file should automatically keep it alive. The default was 3600, but I dialed it back to 1800 because of this problem. It helped a bit, but 3600 *should* be fine according to the docs. The errors still happen semi-regularly. I don't want to lower it too much though and DOS my own database :). Maybe something in my MySQL config is goofy? Not sure where to look exactly. Other relevant details: Python 2.5 Pylons: 0.9.6.2 (w/ sql_alchemy) MySQL: 5.0.51
1. Find out what minimum requrements you want to put on a plugin writer. Then make one or more Interfaces that the writer must implement for your code to know when and where to execute the code. 2. Make an API the writer can use to access some of the functionality in your code. You could also make a base class the writer must inherit. This will make wiring up the API easier. Then use some kind of reflection to scan a directory, and load the classes you find that matches your requirements. Some people also make a scripting language for their system, or implements an interpreter for a subset of an existing language. This is also a possible route to go. Bottom line is: When you get the code to load, only your imagination should be able to stop you. Good luck.
in our continuous integration setup we use SVNRevisionLabeller and pass the variables from this to MSBuild to use when creating the compiled website dll. It's then available to .NET using GetCurrentAssembly() in the final build.
The standard is to throw the NullPointerException. The generally infallible "Effective Java" discusses this briefly in Item 42 (in the first edition) "Favor the use of standard exceptions": > "Arguably, all erroneous method > invocations boil down to an illegal > argument or illegal state, but other > exceptions are standardly used for > certain kinds of illegal arguments and > states. If a caller passes null in > some parameter for which null values > are prohibited, convention dictates > that NullPointerException be thrown > rather than IllegalArgumentException."
|scripting|xcode|arguments|
How can I convince GroovyShell to maintain state over eval() calls?
|groovy|script|shell|java|
I'm trying to use Groovy to create an interactive scripting / macro mode for my application. The application is OSGi and much of the information the scripts may need is not know up front. I figured I could use GroovyShell and call eval() multiple times continually appending to the namespace as OSGi bundles are loaded. GroovyShell maintains variable state over multiple eval calls, but not class definitions or methods. goal: Create a base class during startup. As OSGi bundles load, create derived classes as needed.
|java|script|groovy|groovyshell|
|java|scripting|groovy|groovyshell|
Application Control Scripts on Unix
|linux|unix|script|solaris|
I'm looking for some software that allows me to control a server based application, that is, there are bunch of interdependent processes that I'd like to be able to start up, shut down and monitor in a controller manner. I've come across programs like Autosys, but that's expensive and very much over the top for what I want. I've also seen [AppCtl][1], but that seems not to handle dependencies. Maybe it would be possible to repurpose the init scripts? Oh, and as an added complication it should be able to run on a Solaris 10 or Linux box without installing any new binaries. On the boxes I've seen recently, that means shell scripts and Perl but not Python. Do any such programs exist or do I need to dust off my copy of Programming Perl? [1]: http://appctl.sourceforge.net/
|linux|unix|scripting|solaris|
Should the folders in a solution match the namespace?
|c#|.net|namespace|
Should the folders in a solution match the namespace? In one of my teams projects, we have a class library that has many sub-folders in the project. Project Name and Namespace: MyCompany.Project.Section Within this project, there are several folders that match the namespace section: - Folder Vehicles has classes in the MyCompany.Project.Section.Vehicles namespace - Folder Clothing has classes in the MyCompany.Project.Section.Clothing namespace - etc. Inside this same project, is another rogue folder - Folder BusinessObjects has classes in the MyCompany.Project.Section namespace There are a few cases like this where folders are made for "organizational convenience". My question is: What's the standard? In class libraries do the folders usually match the namespace structure or is it a mixed bag? Thanks!
|c#|.net|namespaces|
How to make subdomain user accounts in a webapp
|web-applications|dns|user|account|subdomain|
My preferred method is to get a word list of 3,4 and 5 letter words. Then select at least 2 of those, and place a random 2 digit number or special symbol (%&*@#$) between each word. If you want to you can capitalize up to one character per word at random. Depending on your strength requirements you end up with easy to remember and communicate passwords like: - lemon%desk - paper&boy32hat Keep in mind you occasionally get interesting or inappropriate combinations of words (I'll let you use your imagination). I usually have a button allowing the generation of a new password if the one presented is disliked. As a rule, only use symbols that people commonly know the name for. On a US Standard keyboard I would avoid ~`'/\^ I guess this more answered your rider question then your main question . .. Good luck!
Password generation, best practice
|passwords|security|userexperience|
I need to generate some passwords, I want to avoid characters that can be confused for each other. Is there a definitive list of characters I should avoid? my current list is il10o8B3Evu![]{} Are there any other pairs of characters that are easy to confuse? for special characters I was going to limit myself to those under the number keys, though I know that this differs depending on your keyboards nationality! As a rider question, I would like my passwords to be 'wordlike'do you have a favoured algorithm for that? Thanks :)
|security|passwords|user-experience|
Static variables are allocated inside a code segment -- they are part of the executable image, and so are mapped in already initialized. Static variables within function scope are treated the same, the scoping is purely a language level construct. For this reason you are guaranteed that a static variable will be initialized to 0 (unless you specify something else) rather than an undefined value. There are some other facets to initialization you can take advantage off -- for example shared segments allow different instances of your executable running at once to access the same static variables. In C++ static objects have their constructors called as part of the program start up, under the control of the C runtime library. Under Visual C++ at least the order that objects are initialized in can be controlled by the [init_seg][1] pragma. [1]: http://support.microsoft.com/kb/104248
Static variables are allocated inside a code segment -- they are part of the executable image, and so are mapped in already initialized. Static variables within function scope are treated the same, the scoping is purely a language level construct. For this reason you are guaranteed that a static variable will be initialized to 0 (unless you specify something else) rather than an undefined value. There are some other facets to initialization you can take advantage off -- for example shared segments allow different instances of your executable running at once to access the same static variables. In C++ (globally scoped) static objects have their constructors called as part of the program start up, under the control of the C runtime library. Under Visual C++ at least the order that objects are initialized in can be controlled by the [init_seg][1] pragma. [1]: http://support.microsoft.com/kb/104248
Sites that use OpenID need to put it front and center on the login page. I have seen many sites [hide it][1] behind a link under the standard login/registration page like this: > ##Username: > ##Password: > <span style="font-size:8px;">or use your OpenID</span> [1]: http://disqus.com/login/
In most cases simple approach like @harpo suggested will work. You can develop more sophisticated code using this approach: - Find all opened handles for selected file using SystemHandleInformation\SystemProcessInformation - Subclass WaitHandle class to gain access to it's internal handle - Pass found handles wrapped in subclassed WaitHandle to WaitHandle.WaitAny method
Can XML comments go anywhere?
|xml|comments|
I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL queries either at the top or bottom. So my question: is it valid XML to place it at either location? For example, above the XML Declaration: <!-- Queries used: ... --> <?xml version='1.0' encoding='UTF-8'?> <dataset> ... </dataset> Or below the root node: <?xml version='1.0' encoding='UTF-8'?> <dataset> ... </dataset> <!-- Queries used: ... --> I plan to initially try above the XML Declaration, but I have doubts on if that is valid XML, despite the claim from [wikipedia][1]: > Comments can be placed anywhere in the tree, including in the text if the content of the element is text or #PCDATA. I plan to post back if this works, but it would be nice to know if it is an official XML standard. [1]: http://en.wikipedia.org/wiki/Xml#Well-formed_documents:_XML_syntax
I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL queries either at the top or bottom. So my question: is it valid XML to place it at either location? For example, above the XML Declaration: <!-- Queries used: ... --> <?xml version='1.0' encoding='UTF-8'?> <dataset> ... </dataset> Or below the root node: <?xml version='1.0' encoding='UTF-8'?> <dataset> ... </dataset> <!-- Queries used: ... --> I plan to initially try above the XML Declaration, but I have doubts on if that is valid XML, despite the claim from [wikipedia][1]: > Comments can be placed anywhere in the tree, including in the text if the content of the element is text or #PCDATA. I plan to post back if this works, but it would be nice to know if it is an official XML standard. UPDATE: See [my response below][2] for the result of my test. [1]: http://en.wikipedia.org/wiki/Xml#Well-formed_documents:_XML_syntax [2]: http://stackoverflow.com/questions/50824/can-xml-comments-go-anywhere#50976
In case someone has the same problem. It works with the next code: string lookupString = "string in list"; Regex lookup = new Regex(string.Format(".*{0}.*", lookupString)); Element list = Browser.Element("li", Find.ByText(lookup)); list.MouseDown();
Neat trick with boolean OR operator: public function createShipment($startZip, $endZip, $weight = 0){ $weight or $weight = $this->getDefaultWeight(); ... }
Generating random terrain in Blender3D
|blender3d|
I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode. Any idea how/where to find one? (I'm assuming that since Blender3D has game programming capabilities, it is OK for someone to ask in SO)
For reference, this problem is usually called "substring-after-last" in XSLT 1.0.
For reference, this problem is usually called "substring-after-last" in XSLT.
At work we use subversion with TortoiseSVN - works very nicely but it is philosophically different to VSS (not really a problem if there's just you but worth being aware of). I really like the fact that the whole repository has a revision number. Given a free choice I'd've probably gone with vault but at the time I had zero budget. I'm looking at things for personal use. There are reasons to use subversion and reasons to use something completely different. The alternatives I'm considering are Vault (as before, free for single use) and Bazaar. GIT I've had to dismiss as I am, unashamedly, a Windows person and right now GIT just isn't. The distributed nature of GIT and the option of private/temporary checkins (assuming I've understood what I've read) *is* attractive - hence my looking at Bazaar. Murph
Use `xdg-utils` from <a href="http://portland.freedesktop.org/wiki/">freedesktop.org Portland</a>. Register the icon for the MIME type: xdg-icon-resource install --context mimetypes --size 48 myicon-file-type.png x-application-mytype Create a configuration file (<a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html">freedesktop Shared MIME documentation)</a>: <?xml version="1.0"?> <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> <mime-type type="application/x-mytype"> <comment>A witty comment</comment> <comment xml:lang="it">Uno Commento</comment> <glob pattern="*.myapp"/> </mime-type> </mime-info> Install the configuration file: xdg-mime install mytype-mime.xml This gets your files recognized and associated with an icon. <a href="http://portland.freedesktop.org/xdg-utils-1.0/xdg-mime.html">`xdg-mime default`</a> can be used for associating an application with the MIME type after you get a <a href="http://portland.freedesktop.org/xdg-utils-1.0/xdg-desktop-menu.html">`.desktop`</a> file installed.
If you're just trying to get a value from the app.config file, you might want to use: ConfigurationSettings.AppSettings["name"]; That works for me, anyways. /Jonas
Java Logging vs Log4J
|java|logging|
I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there. Note: Its only in windows that it is like this. Mainly in Opera and FF also in IE7 but not quite as bad. In Linux the font looks good. I haven't looked at a Mac. What do you guys do to fix this? if anything. I noticed that the titles here on SO are also pretty jagged but they are just small enough not to look bad.
|font|typography|
|fonts|typography|
Learning Lisp - Why ?
|lisp|
I really feel that I should learn Lisp and there are plenty of good resources out there to help me do it. I'm not put off by the complicated syntax, but where in "traditional commercial programming" would I find places it would make sense to use it instead of a procedural language. Is there a commercial killer-app out there that's been written in Lisp ?
|lisp|
|lisp|functional|
|functional-programming|lisp|
You can use mail: $mail -s <subject> <recipient> You then type your message and end it with a line that has only a period. This signals you are done and sends the message.
You can use mail: $mail -s <subject> <recipients> You then type your message and end it with a line that has only a period. This signals you are done and sends the message. You can also pipe your email in from STDIN and it will be sent as the text of an email: $<mail-generating-program> | mail -s <subject> <recipients> One small note with this approach - unless your computer is connected to the internet and your DNS settings are set properly, you won't be able to receive replies to your message. For a more robust command-line program you can link to your POP or IMAP email account, check out either [pine][1] or [mutt][2]. [1]: http://www.washington.edu/pine/ [2]: http://www.mutt.org/
Is there a functional language for C++ ecosystem?
|c++|functional|
Java has [Scala][1] and .NET has [F#][2]. Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended in Java for example. Does there exist an equivalent functional language that interoperates highly with C++? [1]: http://www.scala-lang.org/ [2]: http://research.microsoft.com/fsharp/
|c++|functional-programming|
cannot install ruby gems - zlib error
|ruby|gems|rubygems|
I'm trying to install some Ruby Gems so I can use Ruby to notify me when I get twitter messages. However, after doing a "gem update --system", I now get a zlib error every time I try and do a gem install of anything. below is the console output I get when trying to install ruby gems. (along with the output from "gem environment"). C:\data\ruby>gem install twitter ERROR: While executing gem ... (Zlib::BufError) buffer error C:\data\ruby>gem update --system Updating RubyGems ERROR: While executing gem ... (Zlib::BufError) buffer error C:\data\ruby>gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.2.0 - RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe - EXECUTABLE DIRECTORY: c:/ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - c:/ruby/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/
For this particular application directly observing the file will inevitably lead to a hard to trace bug, especially when the file size increases. Here are two different strategies that will work. - Ftp two files but only watch one. For example send the files important.txt and important.finish. Only watch for the finish file but process the txt. - FTP one file but rename it when done. For example send important.wait and have the sender rename it to important.txt when finished. Good luck!
Lack of operator overloading in ActionScript 3.0
|flash|actionscript-3|
One of the things I miss the most in ActionScript is the lack of operator overloading, in particular ==. I kind of work around this issue by adding a "Compare" method to my classes, but that doesn't help in many cases, like when you want to use things like the built in Dictionary. Is there a good way to work around this problem?
I have used Eclipse as a framework base but it was mostly just using SWT-- we didn't really use much of the RCP. It really depends on what you're writing, but from what I have learned from using Eclipse it is really only suited for writing an app that involves you editing data using various views (just like editing code). Anything more random that than can cause you to start pushing the framework in a direction it wasn't designed and causing massive fail.