instruction stringlengths 0 30k ⌀ |
|---|
|win32api|c++|windowssdk|encryption| |
We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function [CryptEncrypt.][1] (direct and decryptable)
The problem is that CryptEncrypt can produce NU... |
I think somebody faced a similar problem like yours and had the following workaround which is posted at
[http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=319830][1]
[1]: http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=319830 |
Suggest some good MVC framework in perl |
|perl|model-view-controller| |
Can you suggest some good MVC framework for perl -- one I am aware of is [catalyst](http://www.catalystframework.org/)
The need is to be able to expose services on the perl infrastructure which can be called by Java/.Net applications seamlessly. |
There are some really hidden keywords and features in C# related to the TypedReference undocumented class. The following keywords are undocumented :
**__makeref
__reftype
__refvalue
__arglist**
how do you use them :
// Create a typed reference
int i = 1;
TypedReference tr1 = __makeref(i);
/... |
There are some really hidden keywords and features in C# related to the TypedReference undocumented class. The following keywords are undocumented :
**__makeref
__reftype
__refvalue
__arglist**
how do you use them :
// Create a typed reference
int i = 1;
TypedReference tr1 = __makeref(i);
/... |
I'll tell you right now that Catalyst has by far the best reputation amongst Perl developers in terms of a rapid application development MVC framework.
In terms of "pure" MVC I'm not sure there are even that many "mature" or at least production-ready alternatives.
If Catalyst doesn't seem right to you, then you ... |
I believe those two aren't equivalent... fit to square off against each other.
**CLR Integration is supposed to phase out "extended stored procedures" of yore.** We have some of these in our workplace... essentially blocks of processing/logic over SQL data that was too hard/impossible to do via conventional DB Store... |
I believe those two aren't equivalent... fit to square off against each other.
**CLR Integration is supposed to phase out "extended stored procedures" of yore.** We have some of these in our workplace... essentially blocks of processing/logic over SQL data that was too hard/impossible to do via conventional DB Store... |
You can subscribe to the [AppDomain.UnhandledException event][1]. If you have a message loop, you can tie to the [Application.ThreadException event][2].
[1]: http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx
[2]: http://msdn.microsoft.com/en-us/library/system.windows.forms.appl... |
The code is using a server-side cursor, that's what those calls are for. The first set of calls is preparing/opening the cursor. Then fetching rows from the cursor. Finally closing the cursor. Those sprocs are analogous to the OPEN CURSOR, FETCH NEXT, CLOSE CURSOR T-SQL statements.
I'd have to take a closer look... |
The code is using a server-side cursor, that's what those calls are for. The first set of calls is preparing/opening the cursor. Then fetching rows from the cursor. Finally closing the cursor. Those sprocs are analogous to the OPEN CURSOR, FETCH NEXT, CLOSE CURSOR T-SQL statements.
I'd have to take a closer look... |
>Why are pointers such a leading factor of confusion for many new, and even old, college level students in the C/C++ language?
The concept of a placeholder for a value - variables - maps onto something we're taught in school - algebra. There isn't an existing parallel you can draw without understanding how memory ... |
Googling for "GWT +sparklines" has gotten me to [gchart][1], which seems like what I need.
From what I understand - it's all client side and requires nothing more than their JAR file.
[1]: http://code.google.com/p/gchart/ |
I don't think pointers as a concept are particularly tricky - most students mental models map to something like this and some quick box sketches can help.
The difficulty, at least that which I've experienced in the past and seen others deal with, is that the management of pointers in C/C++ can be unncessarily convol... |
I don't think pointers as a concept are particularly tricky - most students' mental models map to something like this and some quick box sketches can help.
The difficulty, at least that which I've experienced in the past and seen others deal with, is that the management of pointers in C/C++ can be unncessarily convo... |
Firebug won't display console feeds for some of my sites |
|web|development|firefox|firebug| |
Using Firebug v1.20b7 with Firefox v3.0.1 I use firebug a lot for web devlopment.
I have very often the problem that Firebug won't show its web console for seeing the POSTs and GETs. I can view all the other tabs, including the NET tab that gives me a lot of the same information that the CONSOLE tab does.
Curious... |
|.net-3.5|web-deployment-project|reportviewer2008| |
|.net-3.5|reportviewer2008|web-deployment-project| |
|.net-3.5|reportviewer|web-deployment-project|reportviewer2008| |
Functional languages use a different paradigm than imperative and object oriented languages. They use side effect free functions as a basic building block in the language. This enables lot's of things and makes a lot of things more difficult (or in most cases different from what people are used to)
One of the bigges... |
Functional languages use a different paradigm than imperative and object oriented languages. They use side effect free functions as a basic building block in the language. This enables lots of things and makes a lot of things more difficult (or in most cases different from what people are used to)
One of the biggest... |
The code is using a server-side cursor, that's what those calls are for. The first set of calls is preparing/opening the cursor. Then fetching rows from the cursor. Finally closing the cursor. Those sprocs are analogous to the OPEN CURSOR, FETCH NEXT, CLOSE CURSOR T-SQL statements.
I'd have to take a closer look... |
Unlike Java, Dotnet exceptions are fairly expensive in terms of processing power and handled exceptions should be avoided in the normal and successful execution path. Not only will you avoid clutter in the console window but your performance will improve and it will make performance counters like .NET CLR Exceptions mo... |
For any process with high parallelism these machines (eg, the t1000/t2000) are great for their cost. I've been running oracle on them for about 18 months now and it works great.
If you task is a single threaded/single process, then you'd be better off with a high speed dual/quad core intel machine.
If your app... |
Check out [Apache Savan][1]. It's a publisher/subscriber implementation for Axis2 that supports WS-Eventing (see [sample.eventing.Client][2] for an example client).
JBossWS has some information about setting up a service [here][3], but I didn't see any example for a client. Regarding CXF and Metro, I'm not sure if t... |
I've used NVelocity with MonoRail for some time but have recently switched to [Spark][1] for both Asp.Net MVC and MonoRail. The syntax seems very natural to me, but I guess that's to be expected. ;)
[1]: http://dev.dejardin.org |
Two things to keep in mind when using events on dynamically generated controls in ASP.Net:
* Firstly, the controls should ideally be created in the Page.Init event handler. This is to ensure that the controls have already been created before the event handling code is ran.
* Secondly, you must assign the same value... |
Advantages:
- Can generate them offline.
- Makes replication trivial (as opposed to int's, which makes is REALLY hard)
- ORM's usually like them
- unique accross applications. So We can use the PK's from our CMS (guid) in our app (also guid) and know we are NEVER going to get a clash.
Disadvantages:
... |
How to do Streaming read of a large XML file in C# 3.5 ... |
|c#|.net|xml|.net-3.5|streaming| |
How can you do a streaming read on a large XML file that contains a xs:sequence just bellow root element, without loading the whole file into a XDocument instance in memory.
|
I would never assume that any browser renders a page exactly the same.. always test!
Even though they support standards, there are plenty of variations between different browsers and even different versions. FF1 renders differently to FF2 which renders differently to FF3.
You also have to remember that each brows... |
Things that will always differ between the two (and other browsers) are default values (font sizes in headings, for example). The way they achieve default visuals is often different, as well, such as whether or not they use padding or margin to achieve the indentation in bulleted lists.
Something quite positive that... |
I think it's not possible if you want to use object model (i.e. XElement\XDocument) to query XML. Obviously, you can't build XML objects tree without reading enough data. However you can use [XmlReader][1] class.
> The XmlReader class reads XML data
> from a stream or file. It provides
> non-cached, forward-only, ... |
The only thing you can do is disable SuperFetch, which can be done from the command prompt with this command (there has to be a space between the = sign and disabled).
sc config Superfetch start= disabled
There is a myth out there that you can disable DLL caching, but that only worked for systems prior to Win... |
Make XAMPP serve file outside of htdocs |
|xampp|apache|php|serverconfiguration| |
Is it possible to configure [xampp][1] to serve up a file outside of the htdocs directory?
For instance, say I have a file:
C:\projects\transitCalculator\trunk\TransitCalculator.php
and my xampp files are normally served out of:
C:\xampp\htdocs\
(because that's how it's configured by default) Is there so... |
Make XAMPP/Apache serve file outside of htdocs |
|php|apache|serverconfiguration|xampp| |
Is it possible to configure [xampp][1] to serve up a file outside of the htdocs directory?
For instance, say I have a file:
C:\projects\transitCalculator\trunk\TransitCalculator.php
and my xampp files are normally served out of:
C:\xampp\htdocs\
(because that's how it's configured by default) Is there so... |
|php|apache|server-configuration|xampp| |
Visual Web Developer (Express): Setting Document Root for Dev Environment |
|c#|asp.net|serverconfiguration|visual-web-developer| |
I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this? |
|c#|asp.net|server-configuration|visual-web-developer| |
Best way to perform dynamic subquery in MS Reporting Services? |
|sql|reporting|services| |
I'm new to SQL Server Reporting Services, and was wondering the best way to do the following:
* Query to get a list of popular IDs
* Subquery on each item to get properties from another table
Ideally, the final report columns would look like this:
[ID] [property1] [property2] [Select COUNT(*) FROM AnotherTabl... |
Better still, install the [`path.py`][1] module, it wraps all the `os.path` functions and other related functions into methods on an object that can be used wherever strings are used:
>>> from path import path
>>> path('mydir/myfile.txt').abspath()
'C:\\example\\cwd\\mydir\\myfile.txt'
>>>
... |
There are two different Javascript functions that you can implement for dynamically adding menu items to list item drop downs. Core.js (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\CORE.JS) checks for the existence of these methods when generating the menu items for a s... |
Brad is right: use Safari if you want the Mac font rendering algorithm.
Jeff and Joel have both blogged about this before (not surprisingly, around the time that Safari was released for Windows), if you would like more details:
[http://www.codinghorror.com/blog/archives/000885.html][1]
[1]: http://www.codi... |
Asp.Net MVC will help you keep html/css/js separate in that it will present fewer features that would prevent you from keeping them separate.
For example Html helpers typically return just that: Html. From that point you are free to choose to keep all style information associated only by class attributes.
Consid... |
How to position a DIV to fill all available space between a header DIV and a footer DIV? |
|html|css| |
Let's say I have a parent DIV. Inside, there are three child DIVs: header, content and footer. Header is attached to the top of the parent and fills it horizontally. Footer is attached to the bottom of the parent and fills it horizontally too. Content is supposed to fill all the space between header and footer.
Now ... |
If you can tolerate having numbers and underscores in that regex, you can e.g. use the \w modifier (Perl syntax). I believe some engines support [:alpha:], but that is not pure Perl. \w takes into account the locale you are in, and matches both uppercase and lowercase, and I bet it is faster than using [A-Z] while igno... |
public abstract class Config
{
public static final boolean ENABLELOGGING = true;
}
---
import static Config.*;
public class MyClass
{
public myMethod()
{
System.out.println("Hello, non-logging world");
if (ENABLELOGGING)
... |
Using Tom's approach with the startup script, you can then call:
> __doPostBack('UpdatePanelName', ''); |
If your `Timer` is only ever going to have one task to execute then I would suggest subclassing it:
class ReschedulableTimer extends Timer {
private Runnable task;
private TimerTask timerTask;
public void schedule(Runnable runnable, long delay) {
task = runnable;
timerTas... |
Java contains some sort of preprocessor of its own. It's called [APT](http://java.sun.com/j2se/1.5.0/docs/guide/apt/). It processes and generates code. At the moment I'm not sure how this should work (I haven't tried it). But it seems to be used for these kind of things. |
The Mootools sortables plugin does just that, and best of all, it's free ;)
http://demos.mootools.net/Sortables |
Yes, it's identical.
A note: if you really want to understand events, I recommend learning the observer pattern and implementing it yourself a for a while. Once you fully understand it, stop doing it yourself and use the professional and well-documented implementation unless you have a real need to do otherwise. |
|sql|reporting|service| |
I think I'd like to stay away from an unweildy framework. Just some approach I can use that generally makes the pages more readable with cleaner code.
Stack Overflow wants me to decide which answer is best, when best is a subjective opinion. Who is to say what the 'best' practice is. |
What is the most effiecent to get data from the database to session |
|php|mysql|sessions| |
What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have:
$sql = "SELECT * FROM users WHERE username='" . mysql_escape_string($_POST['usernam... |
Most efficient way to get data from the database to session |
What is the most effiecent to get data from the database to session |
Most efficient way to get data from the database to session |
What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have:
$sql = "SELECT * FROM users WHERE username='" . mysql_escape_string($_POST['usernam... |
|php|mysql|session| |
Better windows command line shells |
|windows|command.com|shells| |
Is there a better windows command line shell other than cmd which has better copy paste between Windows' windows and console windows? |
Let's say I have a parent DIV. Inside, there are three child DIVs: header, content and footer. Header is attached to the top of the parent and fills it horizontally. Footer is attached to the bottom of the parent and fills it horizontally too. Content is supposed to fill all the space between header and footer.
>The... |
Let's say I have a parent DIV. Inside, there are three child DIVs: header, content and footer. Header is attached to the top of the parent and fills it horizontally. Footer is attached to the bottom of the parent and fills it horizontally too. Content is supposed to fill all the space between header and footer.
>The... |
What is a good plotting library for .Net? |
|.net|windows|graphing| |
I'm writing some data acquisition software and need a gui plotting library that is fast enough to do realtime updated graphs. I've been using Nplot which is pretty good for a free library, but I'm wondering if there are any better libraries (preferably free or cheap). |
gchart looks seriously awesome. Go with it ! |
Well, not free. But we have had very good results with Nevron. Their support is excellent as well.
Another good option is TeeCharts. |
If you can find a solution that works with tuples, use them, as it forces immutability which kind of drives you down a more functional path. You almost never regret going down the functional/immutable path. |
"C# : Left to right, and processing stops if a match (evaluates to true) is found."
Zombie sheep is wrong, not enough rep to down vote it.
The question is about the && operator, not the || operator.
In the case of && evaluation will stop if a FALSE is found.
In the case of || evaluation stops if a TRUE is f... |
I think that the main reason that people have trouble with it is because it's generally not taught in an interesting and engaging manner. I'd like to see a lecturer get 10 volunteers from the crowd and give them a 1 meter ruler each, get them to stand around in a certain configuration and use the rulers to point at eac... |
After installing any version of Xcode targeting Intel-based Macs, you should be able to write assembly code. Xcode is a suite of tools, only one of which is the IDE, so you don't have to use it if you don't want to. (That said, if there are specific things you find clunky, please file a bug at [Apple's bug reporter][... |
WPF Application fails on startup with TypeInitializationException |
|.net|wpf|prism| |
I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices "Composite Application Guidance for WPF". I've followed their instructions however my WPF application fails immediately with a "TypeInitializationException".
The InnerException property reveals that "The... |
Add the esc tool to your toolbox and then you can use ${esc.hash} |
Thanks for the answer. But I want my WPF version to use the SAME service as the Silverlight one. In Silverlight it "just works" because the Silverlight content is hosted on a protected ASPX page. When I sign in using Forms Authentication on the ASP.NET app an authentication cookie is set. On any WCF service requests fr... |
I finally found a way to make this work. For authentication I'm using the "[WCF Authentication Service][1]". When authenticating the service will try to set an authentication cookie. I need to get this cookie out of the response, and add it to any other request made to other web services on the same machine. The code t... |
Heres is a howto: [http://support.microsoft.com/kb/301228/en-us][1] Just remember that you should not use XmlTextReader but instead XmlReader in conjunction with XmlReader.Create
[1]: http://support.microsoft.com/kb/301228/en-us |
I'm confused by the mention of the "xs:sequence" - this is a XML Schema element.
Are you trying to open a large XML Schema file? Are you open a large XML file that is based on that schema? Or are you trying to open a large XML file and validate it at the same time?
None of these situations should provide you wit... |