instruction stringlengths 0 30k ⌀ |
|---|
For other options (free software), check out [this question][1] or [this question][2].
[1]: http://stackoverflow.com/questions/55075/can-i-develop-flash-without-buying-anything
[2]: http://stackoverflow.com/questions/21174/foss-tools-for-flash-development |
Eventhandling in ascx usercontrols |
|asp.net|c#| |
What is best practises for communicating events from a usercontrol to parent control/page i want to do something similar to this:
MyPage.aspx:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceholder" runat="server">
<uc1:MyUserControl ID="MyUserControl1" runat="server"
OnSo... |
|c#|asp.net| |
What is best practises for communicating events from a usercontrol to parent control/page i want to do something similar to this:
MyPage.aspx:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceholder" runat="server">
<uc1:MyUserControl ID="MyUserControl1" runat="server"
OnSo... |
[ChartDirector][1]. Ugly API, but good, server-side image results. Self contained binary.
[1]: http://www.advsofteng.com/ |
How do I estimate tasks using function points? |
|estimation|project-planning| |
What are the steps to estimating using function points?
Is there a quick-reference guide of some sort out there? |
|estimation|project-planning|function-points| |
|project-planning|estimation| |
Yes Grails is the way to go. RoR is good but it ties you in to the Ruby ecosystem. Part of the effort of learning a new framework or language is learning the class libraries as well as the language syntax. If your co-workers are all Java types you will be much better placed to receive help and support as they will all ... |
Yes Grails is the way to go. RoR is good but it ties you in to the Ruby ecosystem. Part of the effort of learning a new framework or language is learning the class libraries as well as the language syntax. If your co-workers are all Java types you will be much better placed to receive help and support as they will all ... |
in your model only pay attention to the parts you care about. So you can store the entire date in your db, but you coalesce it before displaying it to the user. |
I've assembled your comments here:
1. I'd like to do all this "w/o writing my own file I/O code"
2. I need access from "Java Ruby MATLAB" and "FORTRAN routines"
When you add these up, you definitely don't want a new file format. **Stick with the one you've got.**
If we can get you to relax your first requi... |
Automated integration testing a C++ app with a database |
|c++|database|automated-tests|integration-testing| |
I am introducing automated integration testing to a mature application that until now has only been manually tested.
The app is Windows based and talks to a MySQL database.
What is the best way (including details of any tools recommended) to keep tests independent of each other in terms of the database transactio... |
I know you already mentioned it but [PowerGREP](http://www.powergrep.com/) is **awesome**.
From the same wonderful folks who brought you RegexBuddy and who I have no affiliation with beyond loving their stuff. |
I know you already mentioned it but [PowerGREP](http://www.powergrep.com/) is **awesome**.
Some of my favorite features are:
* Right-click on a folder to run PowerGREP on it
* Use Regular Expressions or literal text
* Specify wildcards for files to include & exclude
* Search & replace
* Preview mode is nice ... |
Win32 ShellExecute and a UNC Path |
|flash|vba|macros|powerpoint| |
I'm writing a little macro which will fire up a flash presentation. I'm using VBA to do this inside Powerpoint 2007. I am calling the Win32 ShellExecute() routine. Everything works GREAT but when I run this from a location whose path is a UNC path (\\myserver\myfolder\sample.ppt) it does not work.
The ShellExecute r... |
The FFT is probably the best answer, but if you really want to do it by your method, try this:
To normalize, first make a histogram to count how many occurrances of each value from 0 to 255. Then throw out X percent of the values from each end with something like:
for (i=lower=0;i< N*(X/100); lower++)
... |
Despite the odd name ( pretty sure he's talking about the soft drink...), this site has loads of resources and examples games both 2D and 3D. [Coke and Code][1]
[1]: http://www.cokeandcode.com/ |
That's the message you get when you don't have the right connection parameters. The SID, in particular, tends to trick up newcomers. |
Potentially more efficient: if you're calculating this multiple times, you can speed this up quite a bit by keeping two standing variables
N # number of points
sums = dict(x=0,y=0,z=0) # sums of the locations for each point
then changing N and sums whenever points are created or destroyed. This chan... |
The primary motivation was, as Mark Brackett says, the limits on payload size imposed by using redirects and GET. Some implementations are smart enough to only use POST when the message goes over a certain size, as there are certainly disadvantages to the POST technique. (Chief among them being the fact that your Bac... |
Dynamic languages are fantastic for prototyping ideas. Often for performance reasons they won't work for permanent solutions or products. _But_, with languages like Python, which allow you to embed standard C/C++/Java inside them or visa versa, you can speed up the really critical bits but leave it glued together with ... |
Are you sure that network is completly unavailable? VirtualBox is known to have a [problem][1] with ICMP support so you won't be able to ping any host from the guest OS. I ran into the same problem yesterday and the network was actually working.
[1]: http://www.virtualbox.org/ticket/181 |
ksort($_GET);
This should sort the $_GET array by it's keys. krsort for reverse order. |
The `.getTimezoneOffset()` method reports the time-zone offset in minutes, counting "westwards" from the GMT/UTC timezone, resulting in an offset value that is negative to what one is commonly accustomed to. (Example, New York time would be reported to be +240 minutes or +4 hours)
To the get a normal time-zone offse... |
You should be able to do this with ASP.NET MVC's default template, I'm doing something similar. Just build your routes as {language}/{controller}/{action}/{id}
Just set a default route that goes to a controller that checks for the language cookie, and redirects the user based on that cookie. |
If you are working with an UpdatePanel just make sure that both controls are inside the panel and it will work as desired. |
## Calculate PI at compile-time with D.
( Copied from [DSource.org][1] )
/** Calculate pi at compile time
*
* Compile with dmd -c pi.d
*/
module calcpi;
import meta.math;
import meta.conv;
/** real evaluateSeries!(real x, real metafunction!(real y, int n) term)
... |
A browser will split page loading into multiple items and thus it's likely to load all sounds at once using multiple threads. I think what you're trying to accomplish is impossible. |
The permissions for Remote/Local Activation/Launch are stored in the registry under the AppID for the object.
I'm not sure how to edit it programmatically.
|
Are .NET languages really making any kind of dent in consumer desktop applications? |
|.net|native|desktop| |
Do you write consumer desktop applications with .NET languages? If so what type?
My impression is that most consumer desktop applications are still native compiled applications in C, C++ and the like.
Whilst .NET languages are growing in up take and popularity, do these new breed of applications ever break out of... |
|.net|native|desktop|discussion| |
|.net|native|desktop| |
Do you write consumer desktop applications with .NET languages? If so what type?
My impression is that most consumer desktop applications are still native compiled applications in C, C++ and the like.
Whilst .NET languages are growing in up take and popularity, do these new breed of applications ever break out of... |
**Do *you* write consumer desktop applications with .NET languages?** If so what type?
My impression is that most consumer desktop applications are still native compiled applications in C, C++ and the like.
Whilst .NET languages are growing in up take and popularity, do these new breed of applications ever break ... |
|.net|desktop|native| |
I'm a huge fan of JAX-RS - I think they've done a great job with that specification. I use it on a number of projects and its been a joy to work with.
JAX-RS lets you create REST resources using POJOs with simple annotations dealing with the URI mappings, HTTP methods and content negotiation all integrated nicely w... |
Use the "CreateValidIdentifier" method on the CSharpCodeProvider class.
CSharpCodeProvider codeProvider = new CSharpCodeProvider();
string sFixedName = codeProvider.CreateValidIdentifier( "somePossiblyInvalidName" );
CodeTypeDeclaration codeType = new CodeTypeDeclaration( sFixedName );
It retu... |
We re-wrote our website like you're doing and we are using C# with MVC. Its great. We use Microsoft's SourceSafe to control our code and it works awesome. Since you are the only developer it will depend on what you like.
Microsoft's sourcesafe allows us to create a branch that we can work off can keep under sour... |
Using Drools in a heavy batch process |
|drools| |
We used Drools as part of a solution to act as a sort of filter in a very intense processing application, maybe running up to 100 rules on 500,000 + working memory objects.
turns out that it is extremely slow.
anybody else have any experience using Drools in a batch type processing application? |
It will just sleep the thread except in the case where your application has only a single thread, in which case it will sleep the thread and effectively the process as well.
The python documentation on sleep doesn't specify this however, so I can certainly understand the confusion!
[http://python.org/doc/current/... |
That is definitely what we do as we have millions of people records and only thousands of users. We also separate address, phones and emails into relational tables as many people have more than one of each of these things. Critial is to not rely on name as the identifier as name is not unique. Make sure the tables are ... |
STRUCT is a type of Abstract Data Type that divides up a given chunk of memory according to the structure specification. Structs are particularly useful in file serialization/deserialization as the structure can often be written to the file verbatim. (i.e. Obtain a pointer to the struct, use the SIZE macro to compute t... |
Iterator is useful when you are dealing with Collections in Java. <br/>
Use <b>[For-Each][1]</b> loop(Java1.5) for iterating over a collection or array or list.<br/>
[1]: http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html |
Ultimately, because Iterator captures a control abstraction that is applicable to a large number of data structures. If you're up on your category theory fu, you can have your mind blown by this paper: [The Essence of the Iterator Pattern][1].
[1]: http://web.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications... |
What is the difference between gcc optimization levels? |
|newbies|linux|gcc| |
What is the difference between different optimization levels in GCC? Assuming I don't care to have any debug hooks, why wouldn't I just use the highest level of optimization available to me? does a higher level of optimization necessarily (i.e. provably) generate a faster program? |
|linux|gcc| |
You ask: "Why are the methods hasNext(), next() and remove() not directly coded to the data structure implementation itself?".
The Java Collections framework chooses to define the Iterator interface as externalized to the collection itself. Normally, since every Java collection implements the `Iterable` interface, a... |
also you probably can emulate shifting register with XOR sum elements between separate bits, which will give you pseudo-random sequence of numbers. |
Volume 2 of [The Art of Computer Programming](http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming) has a lot of information about pseudorandom number generation. The algorithms are demonstrated in assembler, so you can see for yourself which are simplest in assembler.
If you can link to an external library... |
That's the message you get when you don't have the right connection parameters. The SID, in particular, tends to trip up newcomers. |
How to create custom pages in dasBlog? |
|dasblog| |
I know I've seen this in the past, but I can't seem to find it now.
Basically I want to create a page that I can host on a dasBlog instance that contains the layout from my theme, but the content of the page I control.
Ideally the content is a user control or ASPX that I write. Anybody know how I can accomplish ... |
I know I've seen this in the past, but I can't seem to find it now.
Basically I want to create a page that I can host on a [dasBlog][1] instance that contains the layout from my theme, but the content of the page I control.
Ideally the content is a user control or ASPX that I write. Anybody know how I can accomp... |
Leaving aside the ethical questions, there's a commercial library available that can do this for you: http://www.octazen.com/product_abimporter.php
The library is available for PHP, .NET, Java, Ruby & ColdFusion. It supports importing contacts from dozens of different services (including all the main ones).
It on... |
For design ideas for high availability systems, check out Erlang. |
You don't need to use any fancy getDefinitionByName() methods, simply refer to it dynamically. In your case, replace the 'Fails' line with:
var classDef:Class = MyClass[name] as Class;
And that should do it. |
ifconfig interfacename create will create a virtual interface,
|
UNC paths start with a *double* back-slash. Are you doing that, or was that just a typo in the question? |
Pretty much what Lot105 described.
Each migration needs an apply and rollback script, and you have some kind of control script which checks which migration(s) need to be applied and applies them in the appropriate order.
Each developer then keeps their db in sync using this scheme, and when applied to production... |
I'll bet NetDataContractSerializer can do what you want. |
> how do you guys search for those modules
<http://search.cpan.org/> |
The basic idea will be for you to install the appropriate signal handlers for floating point exceptions. Inside your signal handler, you can throw an exception (or send a user-defined signal to another process which will raise the exception, or send a message to another thread for something similar, etc. etc. etc). T... |
You have to be careful to balance a reluctance to avoid feature creep with a tendency to ignore feature requests and feedback.
Every time a user comes to you with feedback, that's an opportunity to improve your product and what you're working on. It may end up that you're adding something interesting to both the use... |
Perhaps my comment to Keven sheffield's response may shed some light on what I am trying to accomplish:
> I have a similar repository for most
> of my data access, but I am trying to
> be able to traverse my relationships
> and maintain the DeletedOn logic,
> without actually calling any
> additional methods. T... |
I decided to answer this question again after evalutating it a little.
- The image combining is really amazing
- The CSS and Javascript is nicely minified
- All files are cached on the server meaning that the server isn't cained every time it makes a request
- The caching is performed at a browser level, ... |
Actually, I have found some applications that require .Net on my desktop.
The most famous is Paint.Net, but also amongst them is "Catalyst Control Center", delivered with my ATI graphics card.
And naturally, our company is writing our own desktop .Net application. Our target audience are business users. |
I guess you could do it in a module; but that leaves open some questions; what if you want to save the input to a database? Suddenly because you're saving encoded data to the database you end up trusting input from it which is probably a bad idea, ideally you store raw unencoded data in the database and the encode ever... |
I bet if there would be any consent of what is *common html*, there would be helpers module too, just for completeness (or because others have it). ;)
Other than that, Django template system is made mostly for HTML people, who already know how to write `p`, `img` and `a` tags and do not need any *helpers* for that. ... |
It is the protocol running over tcp that defines the uniqueness of the payload, not the tcp protocol itself.
For example, you might naively think that HTTP requests would all be identical when asking for a server's home page, but the referrer and user agent strings make the payloads different.
Similarly, if the r... |
As long as these are **only** "<" and ">" (and not the double quote itself) characters and you're using them in context like <input value="*this*" />, you're safe (while for <textarea>*this one*</textarea> you would be vulnerable of course). That may simplify your situation, but for **anything** more ... |
I recently just wrote my own rewriting system to make the URLs on my sites look better. Basically, you're going to need to write your own [IHttpModule](http://msdn.microsoft.com/en-us/library/system.web.ihttpmodule.aspx) and add it to your web.config to intercept incoming requests. You can then use the HttpContext.Curr... |
You could do
splice @array, $length;
#or
splice @{$arrays[$i]}. $length; |
You could do
splice @array, $length;
#or
splice @{$arrays[$i]}, $length; |
Stripping non printable characters from a string in python |
|python|non-printable|string| |
I use to run
$s =~ s/[^[:print:]]//g;
on Perl to get rid of non printable characters.
In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not.
What would you do?
|
I use to run
$s =~ s/[^[:print:]]//g;
on Perl to get rid of non printable characters.
In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not.
What would you do?
EDIT: It has to suppor... |
I use to run
$s =~ s/[^[:print:]]//g;
on Perl to get rid of non printable characters.
In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not.
What would you do?
EDIT: It has to suppor... |
|python|non-printable|string|regex| |
|python|string|non-printable| |
Welcome to the world of concurrency programming. You'll want to learn a bit about [mutual exclusion][1]. If you tell us what language/platform you are developing for we can describe more specifically your options.
[1]: http://en.wikipedia.org/wiki/Mutual_exclusion |
|emacs|elisp| |
Ok, I'll try to explain... For simplicity, suppose we have a post function and we want summary value changed to "foobar":
public class SomePostFunction implements FunctionProvider {
public void execute(Map transientVars, Map args, PropertySet ps) throws WorkflowException {
String newValue... |
you will most likely never get a tool for such task which would do all of your job for you. be prepared to do some refactoring work yourself. |