instruction stringlengths 0 30k ⌀ |
|---|
> XNA integration is high on our list of things to add to WPF so we're looking in to this for future versions. Stay tuned (to GregSc's blog) for the details as they become available.
Ian Ellison-Taylor
Read more about this [here][1]
[1]: http://groups.google.com/group/wpf-disciples/browse_thread/thread/82c... |
How to compare files with same names in two different directories using a shell script |
|bash|shell|diff| |
Before moving on to use SVN, I used to manage my project by simply keeping a `/develop/` directory and editing and testing files there, then moving them to the `/main/` directory. When I decided to move to SVN, I needed to be sure that the directories were indeed in sync.
So, what is a good way to write a shell scri... |
**Database** Oracle
**Defect** Granularity of grants on packages
**Description**
You can only grant permissions on packages and not on stored procedures inside packages. Or alternatively, you can grant permissions on single stored procedures but then you put them outside of packages. This requires you to know... |
Unfortunately you did not mention exactly what type of differences you get. Is it an occasional character that is different or is all your incoming data garbled ?
Note that characters read through the SerialPort.Read function could be changed by the system due to the setting of the [SerialPort.Encoding][1] property. ... |
I am not sure, but it looks a bit as if your email is getting encoded. 0x3D is the hexadecimal character 61, which is the equals character ('=').
What classes/libary are you using to send the emails? Check the settings regarding encoding. |
Setting DataGridViewRow.Height slow |
|c#|.net| |
I have noticed that setting row height in DataGridView control is slow. Is there a way to make it faster? |
storing state across postback |
|asp.net| |
What is the best way to store string data across postback. I need to store an ID and name for multiple entities. I was thinking of using a datatable in viewstate, but would that make viewstate grow too large? I can't use a database yet because I'll be inserting a record that those other records need to be related to... |
The simple answer is that C and most of the languages that have inherited its syntax are block scoped. That means that if a variable is defined in one block, i.e., inside { }, that is its scope.
The exception, by the way, is JavaScript, which has a similar syntax, but is function scoped. In JavaScript, a variable de... |
Are Java 6's performance improvements in the JDK, SDK, or both? |
|java|performance|comparison|versions|benchmarking| |
I've been wondering about the performance improvements touted in Java SE 6 - is it in the compiler or the runtime? Put another way, would a Java 5 application compiled by JDK 6 see an improvement run under JSE 5 (indicating improved compiler optimization)? Would a Java 5 application compiled by JDK 5 see an improvement... |
Are Java 6's performance improvements in the JDK, JVM, or both? |
I found a great tutorial into networking and java from sun's own website: http://java.sun.com/docs/books/tutorial/networking/TOC.html
The socket section even has you write a mini client / server chat demo. |
You could also update a hidden label inside the update panel which allows you to write out any javascript you like. I would suggest though using web services or even page methods to fetch the data you need instead of using update panels.
Example: myLabel.Text = "<script language=JavaScript>....</script>"; ... put yo... |
I did some more research and found this post at ps2dev forum:
> The PSP is not a Unix system, and the pspsdk is not POSIX compliant. It's close in some places, but you can't expect to just take any code that compiles fine on a POSIX system and have it work. For example:
>
> * pspsdk uses newlib, which lacks som... |
We have a large backlog of things we should do in our software, in a lot of different categories, for example:
- New problem areas for our products to solve
- New functionality supporting existing problem areas
- New functionality requested by our existing users
- Usability and "look" enhancements
- A... |
Php Is a directory writable |
|php|permissions|directory| |
Does anyone know a good way to check to see if a directory is writable?
The function 'is_writable' doesn't work for folders. |
All of this stuff could be tracked by a good bug tracking system that has the following features:
- Ability to mark work items as bugs or enhancement requests
- Category field for the region of responsibility that the work item falls under (UI, back-end, etc)
- Version # field for when the fix or feature is ... |
The key is aggressive categorization and prioritization.
Fix the problems which are keeping customers away quickly and add more features to keep the customers coming. Push back issues which only affect a small number of people unless they are very easy to fix. |
|java|spring|aspectj| |
My project is based on spring framework 2.5.4. And I try to add aspects for some controllers (I use aspectj 1.5.3).
I've enabled auto-proxy in application-servlet.xml, just pasted these lines to the end of the xml file:
<aop:aspectj-autoproxy />
<bean id="auditLogProcessor" class="com.example.bg.web.util... |
You can also contain "using namespace ..." inside a function for example:
void test(const std::string& s) {
using namespace std;
cout << s;
} |
DSL stands for Domain Specific lLanguage i.e. language designed specifically for solving problems in given area.
For example, Markdown (markup language used to edit posts on SO) can be considered as a DSL.
Personally I find a place for DSL almost in every large project I'm working on. Most often I need some kind... |
DSL stands for Domain Specific Language i.e. language designed specifically for solving problems in given area.
For example, Markdown (markup language used to edit posts on SO) can be considered as a DSL.
Personally I find a place for DSL almost in every large project I'm working on. Most often I need some kind ... |
Doing the inserts first and then the updates does seem to be a better idea for several reasons. You will be inserting at a time of low transaction volume. Since inserts have more data, this is a better time to do it.
Since you are using an id value (which is presumably indexed) for updates, the overhead of updates w... |
There was a huge [thread][1] regarding the enabling/disabling of assertions in release builds on comp.lang.c++.moderated, which if you have a few weeks you can see how varied the opinions on this are. :)
Contrary to [coppro][2], I believe that if you are not sure that an assertion can be disabled in a release buil... |
How do you structure your URL routes? |
|url|routes| |
Is there a specific pattern that developers generally follow? I never really gave it much thought before in my web applications, but the ASP.NET MVC routing engine pretty much forces you to at least take it into consideration.
So far I've liked the controller/action/index structure (e.g. Products/Edit/1), but I'm s... |
|asp.net-mvc|url|routes| |
SELECT FIELD FROM TABLE
ORDER BY
isnumeric(FIELD) desc,
CASE ISNUMERIC(test)
WHEN 1 THEN CAST(CAST(test AS MONEY) AS INT)
ELSE NULL
END,
FIELD
As per [this link][1] you need to cast to MONEY then INT to avoid ordering '$' as a number.
[1]: http:/... |
"what java enterprise applications are, how they are different from normal java classes etc"
Well they are normal classes. They are ran by an application server. The application server uses a class loader to load your servlet (any class that implements the HttpServlet interface). From there on it is your java code. ... |
[Nio][1] or the traditional way with [ServerSocket][2] or [Socket][3]
See [java.net package][4]
Nio docs [here][5].
[1]: http://en.wikipedia.org/wiki/New_I/O
[2]: http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html
[3]: http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html
[4]:... |
Sun's Java API and [official tutorials][1] are probably the best place to get your feet wet.
[1]: http://java.sun.com/docs/books/tutorial/networking/index.html |
I'm not so sure I understand your question completely, but here is a datagram implementation of an echo server I just wrote. You can see the server is responding to the client on the same IP/PORT it was sent from.
Here's the code
First, the server (listener)
from socket import *
import time
class... |
.NET Reporting Tutorial |
|c#|.net|reporting| |
Does anyone know a Turorial for the Reporting in c# .NET.
I mean not the Crystal Reports.
Thanks in Advance |
Does anyone know a Turorial for the Reporting in c# .NET.
I mean the Reports in "Microsoft.Reporting"-Namespace not the Crystal Reports.
Thanks in Advance |
Some of the __builtin__ favorites, map(), reduce(), and filter(). All extremely fast and powerful. |
Yes, it does work for folders....
> Returns TRUE if the filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable. |
According to the PHP manual [is_writable](http://de3.php.net/is-writable) should work fine on directories. |
When you talk about 100 tables per run, do you actually mean that you're creating new SQL tables? If so, I think that the architecture of your application may be the issue. I can't imagine a situation where you would need that many new tables as opposed to reusing the same few tables multiple times and simply adding a ... |
Deploying a site from VSS |
|asp.net|visual-sourcesafe| |
In answer to [this question](http://stackoverflow.com/questions/102833/how-do-i-use-aspnet-with-visual-studio-2008) Joel Coehoorn said
>Finally, only after the site's gone through a suitable QA process, the production server is updated from source control, not from within visual studio.
Does VSS Explorer have to... |
This is known as [Managed C++][1].
[1]: http://en.wikipedia.org/wiki/Managed_Extensions_for_C%2B%2B |
This was originally known as [Managed C++][1], but as Josh commented, it has been superceded by [C++/CLI][2].
[1]: http://en.wikipedia.org/wiki/Managed_Extensions_for_C%2B%2B
[2]: http://en.wikipedia.org/wiki/C%2B%2B/CLI |
# module_function
Module methods that are declared as *module_function* will create copies of themselves as **private** instance methods in the class that includes the Module:
module M
def not!
'not!'
end
module_function :not!
end
class C
include M
... |
# module_function
Module methods that are declared as *module_function* will create copies of themselves as **private** instance methods in the class that includes the Module:
module M
def not!
'not!'
end
module_function :not!
end
class C
include M
... |
> I've got a Subversion repository, backed by the berkeley DB.
Sorry to hear that. I would suggest that at your earliest convenience, you dump that repository (`svnadmin dump`) and reload it into a new one backed by FSFS (`svnadmin load`). |
If you want your sight to be accessible to people with and without disabilities, as well as external systems, then yes, you should definitely make sure you output valid HTML.
It's easy to test your HTML with [automatic validators][1].
I'll add to what Mike Edwards said about legal ramifications and remind you tha... |
**Database** Microsoft SQL Server 2005
**Defect** Lack of "INSERT OR UPDATE"
**Description**
Often you need to either insert or update a record in a table, depending on whether the record is present or not. Not having an atomic operation to do so leads to unnecessary transactions.
This does not happen with ... |
Alternatively, you might want to do error logging into the database (if you're using one) |
If you want to pass data as audio through the air there are a few things you need to be aware of though, such as how the speaker and microphone interact for example. It is important that they don't distort or alter the sound too much as what you are sending are in fact the raw bytes.
Some audio software will let you... |
|project-management|time-management|vague| |
|project-management|time-management| |
Using Visual Studio 2008 to Assemble, Link, Debug, and Execute MASM 6.11 Assembly Code |
|visual-studio|visual-studio-2008|assembly|compilation|masm| |
I would like to use Visual Studio 2008 to the greatest extent possible while effectively compiling/linking/building/etc code as if all these build processes were being done by the tools provided with MASM 6.11. The exact version of MASM does not matter, so long as it's within the 6.x range, as that is what my college i... |
No thanks. Leave the English technical terms be. Translation is awkward, generally ugly and confusing.
Sometimes I have the opposite problem, here in Italy. You try not to mix english and italian... so methods and classes are named "findUserBySocialSecurityNumber", "delete", and so on.
But business terms are ofte... |
No thanks. Leave the English technical terms be. Translation is awkward, generally ugly and confusing.
Sometimes I have the opposite problem, here in Italy. You try not to mix english and italian... so methods and classes are named "findUserBySocialSecurityNumber", "delete", and so on.
But business terms are ofte... |
Remember, the profiler is your friend. Any guesswork is a waste of time most of the time.
BTW, I have had a good experience with JetBrains' [dotTrace][1] profiler.
[1]: http://www.jetbrains.com/profiler/ |
Why is Application.Restart() not reliable? |
|c#|.net| |
Using the Method Application.Restart() in C# should restart the current Application: but it seems that this is not always working.
Is there a reason for this Issue, can somebody tell me, why it doesn't work all the time? |
Switch on string basically gets compiled into a if-else-if ladder. Try decompiling a simple one. In any case, testing string equailty should be cheaper since they are interned and all that would be needed is a reference check. Do what makes sense in terms of maintainability; if you are compring strings, do the string s... |
Just use the game tree. Remember that a tree is a special form of graph.
In your case the leaves of each node will be the game position after you make one of the moves that is available at the current node. |
you could just store them to a cookie, this would allow you to access them from Javascript too. Alternatively you could store a simple string array to the view state. A lot depends on what and how much information you wish to store. |
Is there any built-in way to convert an integer to a string (of any base) in C#? |
|c#|radix| |
Convert.ToString() only allows base values of 2, 8, 10, and 16 for some odd reason; is there some obscure way of providing any base between 2 and 16? |
Using SetTriggerOrder is nice and fine, but if your code depends on a specific sequence of execution, why not wrap all your triggers into stored procedures, and have the first one call the second, the second call the third, etc.
Then you simply have the first one execute in the trigger.
Someone in the future will... |
Using SetTriggerOrder is fine, but if your code depends on a specific sequence of execution, why not wrap all your triggers into stored procedures, and have the first one call the second, the second call the third, etc.
Then you simply have the first one execute in the trigger.
Someone in the future will be grate... |
several ways (though not an exhaustive list):
<ul><li>ViewState</li><li>hidden fields</li><li>session</li><li>query string</li><li>cookies</li></ul> |
with Groovy on the path:
groovy -e " println Integer.MAX_VALUE "
(Groovy is extremely useful for quick reference, within a Java context) |
Use both hands (and all ten fingers). |
Way too many times. As soon as someone discovers that PHP has OO features they want to wrap everything in classes.
The point to the OO stuff in PHP is so that you can architect your solutions in whichever way you want. But wrapping the existing functions in Objects doesn't yield much payoff.
That being said PH... |
I'm using Eclipse with Cypal Studio (previously called Googlipse).
If there is any other *better* plugin for Eclipse please recommend it.
As the Shell mode uses a Tomcat instance, which is the same target server we are using in the final deployment, it should be possible to achieve (or fake) a similar behaviour. |
Is there any way to get rid of the long list of usings at the top of my .cs files? |
|c#|.net|visual-studio|namespaces|organizing| |
Simple question - As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I need to include the using for the interface, the IoC container, and the concrete ... |
/* In C/C++ (second attempt) */
int main(){
int a = main() + 1;
return a;
} |
Resharper - the add-in for Visual Studio - has a feature that strips unsued Using's from a file, but I don't know anything that does quite what you describe. |
Some people enjoy hiding the usings in a `#region`. Otherwise, I think you're out of luck. Unless you want to put the namespace on all your referents. |
How do I access class variables of a parent object in PHP? |
|oop|php5| |
An instance of class A instanciates a couple of other objects, say for example from class B:
$foo = new B();
I would like to access A's public class variables from methods within B.
Unless I'm missing something, the only way to do this is to pass the current object to the instances of B:
$foo = new... |
Thanks for the help. Apparently this has something to do with including the Flex app on an ASP.NET page. When I moved it over to a flat HTML file, it worked fine. I don't have time to fully investigate right now, but that seems to have fixed it. |
Every software developer wants to build their own bug tracking system. It's because we can *obviously* improve on what's already out there since we are domain experts.
It's almost certainly not worth the cost (in terms of developer hours). Just buy [JIRA][1].
If you need extra reports for your bug tracking syst... |
Testing all classes which implement an interface in Java |
|java|unit-testing|interface| |