instruction stringlengths 0 30k ⌀ |
|---|
What I'd like to know is if there is a nice way to queue jQuery functions to execute after a set amount of time. This wouldn't pause the execution of other functions, just the ones following in the chain. Perhaps an example of what I'd envisage it would look like would illustrate:
$('#alert')
.show()
... |
I would strongly consider using range encoding in place of Huffman coding. In general, range encoding can exploit asymmetry more effectively than Huffman coding, but this is especially so when the alphabet size is so small. In fact, when the "native alphabet" is simply 0s and 1s, the only way Huffman can get any comp... |
How to call a function dynamically that is part of an instantiated cfc, without using Evaluate()? |
|coldfusion| |
For example I want to be able to programatically hit a line of code like the following where the function name is dynamically assigned without using Evaluate(). The code below of course doesn't work but represents what I would like to do.
application[funcName](argumentCollection=params)
The only way I can fin... |
use emacs-like keybinding, it's TAB :P
|
What is your accuracy requirement? If you truly need it "correct" (always gets the nearest floating-point value to the decimal specified), it will probably be hard to beat the standard library versions (other than removing locale support, which you've already done), since this requires doing arbitrary precision arithm... |
with /30 you have only 4 hosts possible.
32-30 = 2
2^2 = 4
with /24 you have 256 hosts possible
32-24 = 8
8^2 = 256
with /23 you have 512 hosts possible
32-23 = 9
9^2 = 512
its is because of the bit representation of the subnet mask
255.255.255.252 translates into
11111111.11111111.11111111... |
Either:
1. This DLL does not need to be registered
2. The DLL is corrupt
|
When you get the error, it means either:
1 The DLL does not need to be registered
or
2 The DLL is corrupt
|
This is because the program doesn't know where to find that identifier... it's more of a program use question than a programming problem. |
1. Inversion of control is a pattern used for decoupling components and layers in the system. The pattern is implemented through injecting dependencies into a component when it is constructed. These dependences are usually provided as interfaces for further decoupling and to support testability. IoC / DI containers suc... |
No. The only change will be a small amount of padding to align the data to the size of a block
However, if you are compressing the content note that you should do this *before* encrypting. Encrypted data should generally be indistinguishable from random data, which means that it will not compress.
|
This may be more semantics:
You can't call an object of another process. You can however potentially instantiate a class within a dll as long as there is a reference to that dll in the calling web application.
If you GAC the dll, the classes (not objects) will be accessible to the entire machine. |
Conor, I'd suggest to look at OpenOffice command line interface / calling macros. It can convert many file formats to many others. Then you can pick something much more parse-able than MS doc.
For instance, to convert to PDF, a command line is:
/usr/lib/ooo-2.0/program/soffice.bin -norestore -nofirststart -no... |
If you need a single concrete match, you can have the class implement Comparator, then create a standalone object with all the hashed fields included and use it to return the index of the match. When you want to find more than one (potentially) object in the collection, you'll have to turn to a library like JoSQL (whi... |
How to verify existence of a table with a given ID in a word doc in C# VSTO 3 |
|c#|ms-word|vsto|officedev|iqueryable| |
I want to check for the existence of a table with a given ID in a word document in C# (VS 2008) Visual Studio Tools for Office (version 3).
Obviously I can iterate through the document's Tables collection and check every ID, but this seems inefficient; the document will end up having a few dozen tables after I'm don... |
You should use an inner class only when you cannot implement it as a separate class using the would-be outer class' public interface. Inner classes increase the size, complexity, and responsibility of a class so they should be used sparingly.
Your encoder/decoder class sounds like it better fits the [Strategy Patte... |
First, you can always randomly sort the list in the end, so let's not worry about making "random permutations" (hard); and just worry about 1) making permutations (easy) and 2) randomizing them (easy).
If you want "truly" random groups, you have to accept that randomization by nature doesn't really allow for the con... |
Opinions on licensing schemes vary with each individual, more among developers than specific user groups (such as photographers). You should take a deep breath and try to see what your target user would accept, given the business need your application will solve.
This is my personal opinion on the subject. There wil... |
EDIT: You can make your current licensing scheme considerable more difficult to crack by storing the registry information in the Local Security Authority (LSA). Most users will not be able to remove your key information from there. A search for LSA on MSDN should give you the information you need.
Opinions on licens... |
How to get someone started with ALT.NET |
|alt.net|.net|user-groups| |
What is the order of topics to explain to a .NET developer or user group to get them started and interested with alt.net tools and practices.
- ORM
- IoC
- TDD
- DDD
- CI
- MVC - MVP
- Version Control (I think this is the one they get the fastest)
- Agile
- Etc, etc...
|
|.net|alt.net|user-groups| |
What is the order of topics to explain to a .NET developer or user group to get them started and interested with alt.net tools and practices.
- ORM
- IoC
- TDD
- DDD
- DSL
- CI
- MVC - MVP
- Version Control (I think this is the one they get the fastest)
- Agile
- Etc, etc...
|
Membership bulk email software |
|email|microsoft|asp| |
We have a Microsoft web stack web site, we have a members database.
We want to start doing mass-emails to our (opted in) membership.
I don't *particularly* want to re-invent the wheel with a system for having a web form submit and then mass send emails looping through thousands of records without timing out and o... |
The [Enterprise Library Logging Application Block][1] that comes from Microsoft's Pattern & Practices group is a great example of implementing a logging framework in an OOP environment. They have some great documentation on how they have implemented their logging application block and all the source code is available ... |
Along with the links provided above, I think you'll find this [screencast][1] useful. It gives a run through of some of the tools TextMate's HTML bundle already provides.
It's probably slightly off-topic though, but worth a look nonetheless.
[1]: http://macromates.com/screencast/html_text_transformations.mov |
A simple solution could be to run a trace on your database and inspect the queries run against it - filtered ofcourse to sort out other applications etc. accessing the database.
That ofcourse only helps once you get past the exceptions... |
[Visual Studio 2008 Product Comparison][1]
As far as I know there are no restrictions on it's use, but I'm not a lawyer.
[1]: http://msdn.microsoft.com/en-us/vstudio/products/cc149003.aspx |
For example I want to be able to programatically hit a line of code like the following where the function name is dynamically assigned without using Evaluate(). The code below of course doesn't work but represents what I would like to do.
application.obj[funcName](argumentCollection=params)
The only way I can... |
We used DOMPDF <http://www.digitaljunkies.ca/dompdf/> successfully - just define what you want printed in regular HTML format, then pass the doc to DOMPDF, and it'll create a PDF from it.
Much more convenient than working with vector-based solutions that require you to essentially lay things out yourself on the pag... |
It's far too late by the time the data gets to your database to provide meaningful validation for your users and applications. You don't want your database doing *all* the validation since that'll slow things down pretty good, and the database doesn't express the logic as clearly. Similarly, as you grow you'll be wri... |
This article explains a relatively simple 7 rules which will let you read any C declaration, if you find yourself wanting or needing to do so manually: http://www.ericgiguere.com/articles/reading-c-declarations.html
If you're fine with a tool, then I second the suggestion to use the program <code>cdecl</code>: http:... |
My preferred way:
for f in template_*.txt; do cp $f ${f/template/foo}; done
The "I-don't-remember-the-substitution-syntax" way:
for i in x y z; do cp template_$i foo_$i; done |
Travis,
There's a compromise. Your coworker is actually onto something, but I think he's doing it wrong. I'm not sure that totally random testing is very useful, but it's certainly not invalid.
A program (or unit) specification is a hypothesis that there exists some program that meets it. The program itself is th... |
Try [Environment.MachineName][1].
[1]: http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx |
<s>Try [Environment.MachineName][1].</s> Ray actually has the **best** [answer][2], although you will need to use some interop code.
[1]: http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx
[2]: http://stackoverflow.com/questions/103460/whats-the-best-way-to-determine-the-name-of-your-... |
Another vote for Subversion / TortoiseSVN but note that it doesn't play nicely with a FAT32 domestic NAS. |
For std::map, how will insert behave if it has to resize the container and the memory is not available? |
|insert|stdmap| |
For std::map, how will insert behave if it has to resize the container and the memory is not available? |
Is there a way to force a style to a div element which already has a style="" attribute |
|html|css| |
I'm trying to skin HTML output which I don't have control over. One of the elements is a DIV with a style="overflow: auto" attribute. Is there a way in CSS to force that DIV to use "overflow: hidden"? |
Is there a way to programatically determine if a font file has a specific Unicode Glyph? |
|fonts|unicode|vb.net| |
I'm working on a project that generates PDFs that can contain fairly complex math and science formulas. The text is rendered in Times New Roman, which has pretty good Unicode coverage, but not complete. We have a system in place to swap in a more unicode complete font for code points that don't have a glyph in TNR (li... |
|asp.net|vb.net|unicode|fonts| |
I'm working on a project that generates PDFs that can contain fairly complex math and science formulas. The text is rendered in Times New Roman, which has pretty good Unicode coverage, but not complete. We have a system in place to swap in a more unicode complete font for code points that don't have a glyph in TNR (li... |
If the outside world doesn't need to see it, then don't show it. You should try to encapsulate your objects so that they are losely coupled and the outside world knows just enough about them as they need to. |
The [Stern-Brocot Tree](http://en.wikipedia.org/wiki/Stern-Brocot_tree) induces a fairly natural way to approximate real numbers by fractions with simple denominators. |
Black-box vs White-box Reuse |
|oop| |
What are the pros/cons of using black-box reuse over white-box reuse? |
This guy has done a lot of work with Javascript games:
http://blog.nihilogic.dk/
|
Can you provide more information on how a "presigned URL" works? Is it like this:
AWS::S3::S3Object.url_for(self.full_filename,
self.bucket_name, {
:use_ssl => true,
:expires_in => ttl_seconds
... |
Can you provide more information on how a "presigned URL" works? Is it like this:
AWS::S3::S3Object.url_for(self.full_filename,
self.bucket_name, {
:use_ssl => true,
:expires_in => ttl_seconds
... |
The [benchmark][2] that came out when V8 first hit the scene that showed V8 being 1000% (or whatever) faster than other engines was heavily weighted towards favoring engines that were good at recursion. If your code uses a lot of recursion, then V8 might give you a significant advantage, speed-wise. For "real world" (c... |
Can you implement this as an inline function?
#define my_free(x) do { free(x); x = NULL; } while (0)
|
Fax me some electricity, please?
![Dilbert Fax][1]
[1]: http://i287.photobucket.com/albums/ll158/PhilHaney/23872stripsunday.gif |
There is no purpose for this in a non case sensitive database like SQL Server. This is a reusable database regardless of the type of database in which you are using. E.g. Informix is case-sensitive for all string data which is stored. Using this database on an Informix server would be a good reason to have/use this ... |
I found these quite helpful when starting out with OpenGL ES, just to see what approach one would take when dealing with ES as opposed to normal GL.
[http://www.zeuscmd.com/tutorials/opengles/index.php][1]
As has been mentioned earlier there are some samples available from the iPhone developer site as well:
[... |
Hopefully this will get you started:
kernel.Register(Component.For(typeof(IClassWithParam))
.ImplementedBy(typeof(ClassWithParam))
.Parameters(Parameter.ForKey("name").Eq("NewName"))
); |
Edit: Used the answers below code with the Fluent Interface :)
namespace WindsorSample
{
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
public class MyComponent : IMyComponent
... |
How can I add an HyperLink in TRichEdit using Delphi |
|delphi|hyperlink|richedit| |
How can I add an HyperLink in a TRichEdit (using Delphi).
I need to have something like:
"This is my text, click here to do something."
|
Since you're going for maximum compatibility, have you considered generating a single image representing the frame?
If you're using PHP you can use GD to dynamically create images representing the frames based on the same input that you would use to create the HTML in your question. The biggest advantage to doing th... |
I'd be interested in what kind of "basic functions" you're having to implement. There's actually quite a lot already there in the provided libraries, and I wonder if you're just not finding functionality that's already there... |
Yes, it is Unicode.
If you have 14 Chars in your File, you only get 7 '?'.
Solution pending. Still thinking. |
I have no experience in SharePoint, but if it is the case where only one ORDER BY clause is being honored I would change it to an expression rather than a column. Assuming "Rank" is a numeric column with a maximum value of 10 the following may work:
SELECT WorkId FROM SCOPE() ORDER BY AUTHOR + (10 - Rank) ASC
... |
There's a compromise. Your coworker is actually onto something, but I think he's doing it wrong. I'm not sure that totally random testing is very useful, but it's certainly not invalid.
A program (or unit) specification is a hypothesis that there exists some program that meets it. The program itself is then evidence... |
It's a collaboration website. All of the members on a team can update a single calendar and upload shared documents to a single repository. |
Asynchronous file IO in .Net |
|asynchronous|file-io|windows|windows-api|.net| |
I'm building a toy database in C# to learn more about compiler, optimizer, and indexing technology.
I want to maintain maximum parallelism between (at least read) requests for bringing pages into the buffer pool, but I am confused about how best to accomplish this in .NET.
Here are some options and the problems I... |
|.net|windows|file-io|asynchronous|windows-api| |
[Visual Studio 2008 Product Comparison][1]
As far as I know there are no restrictions on it's use, but I'm not a lawyer.
AviewAnew pointed out you can use Express Editions for commercial use: there are no licensing restrictions for applications built using Visual Studio Express Editions. See [FAQ][2] #7.
[1]... |
There are some very well thought out solutions. Some involve bypassing OO and using another mechanism (AOP).
Logging doesn't really lend itself too well to OO (which is okay, not everything does). If you have to implement it yourself, I suggest just instantiating "Log" at the top of each class:
private final lo... |
**Know when to use it.** For quick and dirty gluing commands together it's okay. If you need to make any more than few non-trivial decisions, loops, anything, go for Python, Perl, and **modularize**.
The biggest problem with shell is often that end result just looks like a big ball of mud, 4000 lines of bash and gro... |
Since ASN.1 is self describing, it's fairly easy to write an ASN.1 parser. As you probably know, ASN.1 data contains a tree of values, where each value type is identified by a globally assigned OID (Object ID). You can find a free ASN.1 decoder with source code at: <a href="http://www.geocities.co.jp/SiliconValley-SanJ... |
Well, some things you can try are:
1. Delete workspace .metadata dir. Obviously you will lose your workbench configuration.
2. Rename your .metadata dir. Start Eclipse, and you will have a new .metadata dir. Close Eclipse, delete the new dir, and rename back the original dir. It sometimes works. |
[Advanced Intellect][1] has some great tools, like aspNetEmail and ListNanny.
[1]: http://www.advancedintellect.com/productlist.aspx |
Basically singleton is a way to have static data and pretend it is not really static.
Of course I use it, but try to not abuse it. |
One basic problem with the original GoF design is the fact that the destructor isn't protected. Anyone with a reference to the singleton instance is free to destroy the singleton.
See John Vlissides update "To Kill A Singleton" in his book "Pattern Hatching" ([Amazon link][1]).
cheers,
Rob
[1]: http://www... |
Generally, use an exception to guard against unexpected failures, and use error checking in your code against failures that are part of normal program state. To illustrate:
1. Record not found in database - valid state, you should be checking the query results and messaging the user appropriately.
2. Sql error wh... |
Generally, use an exception to guard against unexpected failures, and use error checking in your code against failures that are part of normal program state. To illustrate:
1. Record not found in database - valid state, you should be checking the query results and messaging the user appropriately.
2. SQL error wh... |
It does matter how many concurrent queries you're awaiting. This was also the decision-base for the Olympics-Website, because a lot more server-ressources are needed to deliver videos via flash instead of silverlight. So silverlight might be cost-saving. |
Another option is to download the .gem file and install it manually as such:
sudo gem install path/to/ibm_db-0.10.0.gem
This particular gem was at [rubyforge][1].
[1]: http://rubyforge.org/frs/?group_id=2361&release_id=25677 |
Take a look in the online [Flex Language Guide][1] at the [AxisRenderer][2] class.
It also has some helpful sample code and output.
[1]: http://livedocs.adobe.com/flex/3/langref/index.html
[2]: http://livedocs.adobe.com/flex/3/langref/mx/charts/AxisRenderer.html |
subversion ftw. |
As far as I know, styles on the actual HTML elements override anything you can do in separate CSS style.
You can, however, use Javascript to override it. |
Vim: How do I exclude an entire word from my search? |
|regex|vim| |