instruction stringlengths 0 30k ⌀ |
|---|
Take a look at [Ampache][1]. It is a Web-based Open Source Audio file manager. It is implemented with MySQL, and PHP. It allows you to view, edit, and play your audio files via the web.
[1]: http://ampache.org/ |
If all you make is simple little web pages, then do whatever. Or better yet learn PHP. |
If all you make is simple little web pages, then do whatever. Or better yet learn PHP. Most of the response you are going to get are from people who make web applications, and for that asp.net blows the pants off of classic asp in power and maintainability though. |
Just looking for the first step basic solution here that keeps the honest people out.
Thanks,
Mike |
Maybe the way to go is something like [Clutter][1] or [Allegro][2]. If you check in this [article][3] at ArsTechnica what they are using Clutter for, you might get an idea how to use it. I don't know for sure if it works on Windows, but I'm pretty sure it does, considering it only depends on libraries that are supporte... |
You're already using [SqlBulkCopy](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx), which is a good start.
However, just using the SqlBulkCopy class does not necessarily mean that SQL will perform a bulk copy. In particular, there are a few requirements that must be met for SQL Server... |
You could try <a href="http://www.wxwidgets.org/">wxWidgets</a> (it has wxBitmapButton) or try to implement your own solution using <a href="http://www.libsdl.org/">SDL</a> for all of the graphics. |
I think the real answer is, like all approaches in programming, is that it depends on which one is better. Generally, a set based language is going to be more efficient, because that is what it was designed to do. There are two places where a cursor is at an advantage:
<br/>1. You are updating a large data set in a... |
And bear in mind that all this stuff about the *projects* being compatible between 2005 and 2008 is NOT true for C/C++ projects. |
The best practice, as others have said, is to place each class in its own translation unit from a code maintenance and understandability perspective. However on large scale systems this is sometimes not advisable - see the section entitled "Make Those Source Files Bigger" in [this article][1] by Bruce Dawson for a disc... |
experience with java clustering ? |
|terracotta|jgroups|java|clustering| |
Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, jgroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also. |
Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, jgroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also.
UPDATE - I will be a bit more specific -> not that interested in Web App clu... |
|java|clustering|terracotta|jgroups| |
Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, jgroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also.
UPDATE - I will be a bit more specific -> not that interested in Web App clu... |
I've heard of [AutoDisconnect][1] causing similar issues (even if the device isn't idle). You may want to try disabling that on the server.
[1]: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q138365 |
A reinstall of Ruby sorted this issue out. It's not what I wanted; I wanted to know why I was getting the issue, but it's all sorted out. |
@Dominic,
I'm almost positive that putting that in the route will cause routing issues.
@Ricky,
Until MVC has support for this, you can be a little more "old school" about how you make your routes. For example, you can convert:
<%= Html.ActionLink("Home", "Index") %>
into:
<a href='<%= Url.Act... |
I have a two dimensional array that I need to load data into. I know the width of the data (22 values) but I do not know the height (estimated around 4000 records, but variable).
I have it declared as follows:
float[,] _calibrationSet;
....
int calibrationRow = 0;
While (recordsToRead)
... |
Depending on your application you could use the [Diffie-Hellman][1] method for two parties to securely agree on a symmetric key.
After an initial, secure exchange, the key is agreed upon and the rest of the session (or a new session) can use this new symmetric key.
[1]: http://en.wikipedia.org/wiki/Diffie-Hel... |
If you are using a http endpoint, you can use a secure transport such as https. |
As was previously answered, you can cast back and forth between signed and unsigned without a problem. The border case for signed integers is -1 (0xFFFFFFFF). Try adding and subtracting from that and you'll find that you can cast back and have it be correct.
However, if you are going to be casting back and forth, I... |
The most useful tool I've found for monitoring a server while performing a test such as JMeter on it is [dstat][1]. It not only gives you a range of stats from the server, it outputs to csv for easy import into a spreadsheet and lets you extend the tool with modules written in Python.
[1]: http://dag.wieers.com/... |
Finally blocks permit you, as a developer, to tidy up after yourself, regardless of the actions of preceeding code in the try{} block encountered errors, and have others have pointed out this, is falls mainly under the umbrella of freeing resources - closing pointers / sockets / result sets, returning connections to a ... |
@yapiskan,
C# is a strong typed language Foo< X> != Foo. So if you need to catch some exception, provide *exact* type in *catch* clause.
You can learn more on exception handling reading [this][1] MSDN article.
[1]: http://msdn.microsoft.com/en-us/library/ms229005.aspx |
I like [this explanation][1].
Basically, you should use tuples when there's a constant structure (the 1st position always holds one type of value and the second another, and so forth), and lists should be used for lists of homogeneous values.
Of course there's always exceptions, but this is a good general guideli... |
Hitchhiker,
If you're willing to spend some money, TOAD has "compare schemas" functionality which should do what you're after. It'll report the differences and produce a migration script to bring one into line with the other.
I've never used the script, so I can't vouch for it, but I have used it to make sure ou... |
This is a quick and dirty method that may be useful:
select *
from mytbl
where "," + ltrim(rtrim(@keylist)) + "," like "%," + ltrim(rtrim(name)) + ",%" |
What are the best resources to get started with Eclipse plugin development? |
|eclipse|books|tutorials|plugin-development|sites| |
I'm interested in writing eclipse plugins where do I start?
What resources have helped you?
I'm looking for:
1. Tutorials
2. Sites devoted to plugin development
3. Books
|
What's the best tool to graphically display memory layout from a .map file? |
|c++|c|embedded|linker| |
My build (gcc) toolchain produces a .map file. Is there a tool to analyze the memory map graphically? |
What is a good online resource for css 'design patterns'? |
|html|css|xhtml| |
Can anyone out there recommend a good online resource for CSS 'design patterns'?
I know design patterns in a software context usually refer to OO based design patterns, but I mean design patterns in the broader sense of the term: i.e. common, clean solutions to common problems / tasks.
An example of such a resour... |
|html|css|design-patterns|xhtml| |
The mount point is usually "\Storage Card" but can be localized into other languages or modified by OEMs (some devices use "\SD Card" or other mount points, and some devices support mounting multiple storage media). The best way to enumerate the available cards is to use FindFirstFlashCard and FindNextFlashCard.
Bo... |
How do I group in memory lists? |
|c#|.net|linq|lambda| |
I have a list of Foo. Foo has properties Bar and Lum. Some Foos have identical values for Bar. How can I use lambda/linq to group my Foos by Bar so I can iterate over each grouping's Lums? |
File format for generating dynamic reports in applications |
|pdf|reporting|adobe| |
We generate dynamic reports in all of our business web applications written for .Net and J2EE. On the server side we use ActiveReports.Net and JasperReports to generate the reports. We then export them to PDF to send down to the browser.
Our clients all use Adobe Reader. We have endless problems with the differen... |
add
with (rowlock)
to your SQL query
[SQL Server Performance article][1]
[1]: http://www.sql-server-performance.com/articles/per/lock_contention_nolock_rowlock_p1.aspx |
add
with (rowlock)
to your SQL query
[SQL Server Performance article][1]
**EDIT:** ok, I misunderstood the question. What you want is transaction isolation. +1 to Joel :)
[1]: http://www.sql-server-performance.com/articles/per/lock_contention_nolock_rowlock_p1.aspx |
Without the PDB symbols for that application you're going to have a tough time making heads or tails of what is going on and where. I think any source code information is going to be only in that PDB file that was created when whoever built that application.
This is assuming that the PDB file was EVER created for th... |
What is the best approach to moving a preexisting project from Flash 7/AS2 to Flex/AS3? |
|apache-flex|flash|actionscript-3|porting| |
I have a large codebase that targetted Flash 7, with a *lot* of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code.
The syntax for AS2 and AS3 is generally the same, so I'm starting to wonder how hard it would be to port the... |
For all submit buttons, via JQuery, it'd be:
$('input[type=submit]').click(function() { this.disabled = true; });
Or it might be more useful to do so on form submission:
$('form').submit(function() {
$('input[type=submit]', this).attr("disabled","disabled");
});
But I think we could gi... |
I don't, but there's a Java port called [jchronic][1]. If nothing else, it could provide a good jumping-off point for your own. Or perhaps some knowledgeable person out there could help with a semi-automatic Java to C# translator.
[1]: https://jchronic.dev.java.net/ |
I don't, but there's a Java port called [jchronic][1]. If nothing else, it could provide a good jumping-off point for your own. Or perhaps you could use a semi-automatic Java to C# translator like [Octopus][2] to help translate it. (Or something better, if anyone knows of anything.)
[1]: https://jchronic.dev.jav... |
I don't, but there's a Java port called [jchronic][1]. If nothing else, it could provide a good jumping-off point for your own. Or perhaps you could use a semi-automatic Java to C# translator like [Octopus][2] to help translate it. (Or something better, if anyone knows of anything.)
Okay, another possible avenue: co... |
I pretty much always use a power of 2 unless there is a good reason not to, such as a customer facing interface where some other number has special meaning to the customer.
If you stick to powers of 2 it keeps you within a limited set of common sizes, which itself is a good thing, and it makes it easier to guess t... |
I pretty much always use a power of 2 unless there is a good reason not to, such as a customer facing interface where some other number has special meaning to the customer.
If you stick to powers of 2 it keeps you within a limited set of common sizes, which itself is a good thing, and it makes it easier to guess t... |
I don't understand what you are trying to do here. Are you trying to execute a Python script that generates a C# file and then compile that with the project? Or are you trying to compile a Python script to C#? |
I have created a SQL Server User Defined Function to calculate someone's age, given their birthdate. This is useful when you need it as part of a query:
using System;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlSer... |
Use traditional encryption of the data that you are placing inside the WCF container. Maybe something like the following:
[http://www.obviex.com/samples/EncryptionWithSalt.aspx][1]
[1]: http://www.obviex.com/samples/EncryptionWithSalt.aspx |
There are several things that make a finally block useful:
1. If you return from the try or catch blocks, the finally block is still executed, right before control is given back to the calling function
2. If an exception occurs within the catch block, or an uncaught type of exception occurs in the try block, the ... |
Multiline ddl Custom Control |
|c#|asp.net|custom-controls| |
One of the guys I work with needs a custom control that would work like a multiline ddl since such a thing does not exist as far as we have been able to discover
does anyone have any ideas or have created such a thing before
we have a couple ideas but they involve to much database usage |
One of the guys I work with needs a custom control that would work like a multiline ddl since such a thing does not exist as far as we have been able to discover
does anyone have any ideas or have created such a thing before
we have a couple ideas but they involve to much database usage
We prefer that it b... |
If you are catpuring logging information for future searching and anaylsis perhaps a database would be a better answer.
As for your solution. Flat files do not scale well at all where as a database scale much better. I wouldn't split the files either, that just compounds the scalability issue. If you have to us... |
I highly recommend [Test-Driven Development by Kent Beck (ISBN-10: 0321146530)][1]. It wasn't written specifically for PHP, but the concepts are there and should be easily translatable to PHP.
[1]: http://www.amazon.com/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530 |
G'day,
Definitely do the logging in flat file and add munge scripts to turn it into XMl later.
First suggestion would be to make sure that all date/time strings are in ISO 8601 format, namely YYYY-MM-DD hh:mm:ss.
Second is to make your categories, e.g. exception, fatal, error, warning, info, etc. really stand ... |
It might not be the most fully-featured, but [FLTK][1] is an incredibly simple cross-platform GUI library.
[1]: http://www.fltk.org |
It might lack some features, but [FLTK][1] is an incredibly simple cross-platform GUI library.
[1]: http://www.fltk.org |
Assuming you don't have any heuristics, a variation of [dijkstra's algorithm][1] should suffice pretty well. Every time you consider a new edge, store information about its "ancestors". Then, check for the invariant (only one direction change), and backtrack if it is violated.
I'll post some pseudocode later.
[... |
Assuming you don't have any heuristics, a variation of [dijkstra's algorithm][1] should suffice pretty well. Every time you consider a new edge, store information about its "ancestors". Then, check for the invariant (only one direction change), and backtrack if it is violated.
The ancestors here are all the edges th... |
I'll advocate the use of source control here. Especially if the development team uses branching to deal with structured releases. That way, whatever CSS is checked into the production branch is what should be deployed ... and if it is updated mid-stream, it's the responsibility of the person (designer?) that updates ... |
The fancy name is "Content Delivery Network" [(Wikipedia)](http://en.wikipedia.org/wiki/Content_Delivery_Network).
We store our CSS files in a database, and then have a separate website that does nothing but serve CSS resources. We implemented this in May 2007 for 1000+ websites in 30+ countries. It has worked flawl... |
Do this:
list.ForEach(i => Console.Write("{0}\t", i));
----------
EDIT: To others that have responded - he wants them all on the same line, with tabs between them. :) |
List<int> a = new List<int>() { 1, 2, 3, 4, 5 };
a.ForEach(p => Console.WriteLine(p));
edit: ahhh he beat me to it. |
list.ForEach(x=>Console.WriteLine(x)); |
I can't offer an existing tool for it, but I would expect that you can get a lot of this information from you build tools (with some effort, probably). Typically you can at least let the build tool print the commands it would run, without actually running them. (E.g. the `-n` option of `make` and `bjam` does this.) Fro... |
Detecting if an IDataReader contains a certain field before iteration. |
<http://regexlib.com/REDetails.aspx?regexp_id=610>
> ^(?=\d)(?:(?:31(?!.(?:0?[2469]|11))|(?:30|29)(?!.0?2)|29(?=.0?2.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(?:\x20|$))|(?:2[0-8]|1\d|0?[1-9]))([-./])(?:1[012]|0?[1-9])\1(?:1[6-9]|[2-9]\d)?\d\d(?:(?=\x20\d)\x20|$... |
[According to Microsoft][1], other websites do not inherit settings from the Default Website. Do you mean you are editing the default web.config which is located in the same folder as the machine.config?
[1]: http://msdn.microsoft.com/en-us/library/ms178685.aspx |
@Espo: I just have to say that regex is incredible. I'd hate to have to write the code that did something useful with the matches, such as if you wanted to actually find out what date and time the user typed.
It seems like Tom's solution would be more tenable, as it is about a zillion times simpler and with the addi... |
HTML time-savers are useful, but they're only useful when they're intuitive and easy-to-understand. Having to instantiate a `new Draw` just doesn't sound very natural. Furthermore, `wideHeaderBox` and `left` will only have significance to someone who intimately knows the system. And what if there *is* a redesign, like ... |
There are a lot of benefits:
- You get immediate feedback on if your code is working, so you can find bugs faster
- By seeing the test go from red to green, you know that you have both a working regression test, and working code
- You gain confidence to refactor existing code, which means you can clean up co... |
**Benefits**
1. You figure out how to compartmentalize your code
2. You figure out exactly what you want your code to do
3. You know how it supposed to act and, down the road, if refactoring breaks anything
4. Gets you in the habit of making sure your code always knows what it is supposed to do
**Getting S... |
try the following
var names = (from dr in dataTable.Rows
select (string)dr["Name"]).Distinct().OrderBy(name => name);
this should work for what you need |
What is Object Mocking and when do I need it? |
|testing|mocking| |
Many people use Mock Objects when they are writing unit tests. What is a **Mock Object**? Why would I ever need one? Do I need a Mock Object Framework? |
I agree with the second part of Patrick's answer. Even if in some tests it seems to keep insertion order, the documentation (and normal behavior for dictionaries and hashes) explicitly states the ordering is unspecified. You're just asking for trouble depending on the ordering of the keys. Add your own bookkeeping (as ... |
It allows you to test how one part of your project interacts with the rest, without building the entire thing and potentially missing a vital part.
EDIT: Great example from wikipedia: It allows you to test out code beforehand, like a car designer uses a crash test dummy to test the behavior of a car during an accide... |
As Ubiguchi points out TFS is not a version control product. Buying TFS with the intention of only using it for Version Control would clearly be a waste of money. TFS is an integrated suite of tools to automate all aspects of Application Lifecycle Management (and pretty much geared to "The Enterprise".
Also per Be... |
Here's all the books available for developing Eclipse Plugins:
[http://www.eclipseplugincentral.com/books-index-req-view_subcat-sid-4.html][1]
[1]: http://www.eclipseplugincentral.com/books-index-req-view_subcat-sid-4.html |
I have done quite a bit with an RCP application that made use of multiple plug-ins. This book helped me tremendously in all fronts: RCP framework and plug-in development:
http://www.amazon.com/Eclipse-Rich-Client-Platform-Applications/dp/0321334612
The book walks you through the development of a IM chat client usin... |
The real problem with subforums comes when you guess wrong about which topics have enough interest to get their own subforums. While some topics end up with their own vibrant subcommunities others end up as empty ghettos, with little activity or feeling of community. Topics that might flourish as occasional subjects ... |
Select existing data from database to create test data |
|sql-server|database| |
I have a SqlServer database that I've manually filled with some test data. Now I'd like to extract this test data as insert statements and check it in to source control. The idea is that other team members should be able to create the same database, run the created insert scripts and have the same data to test and deve... |
EMS DB Extract for SQL Server ([http://www.sqlmanager.net/en/products/mssql/extract][1]) seems to do what you want, and it seems to be free.
Hope this helps,
Robin
[1]: http://www.sqlmanager.net/en/products/mssql/extract |