instruction stringlengths 0 30k ⌀ |
|---|
I have some UI in VB 2005 that looks great in XP Style, but goes hideous in Classic Style.
Any ideas about how to detect which mode the user is in and re-format the forms on the fly?
Thanks in Advance!
-Chris |
|vb.net|windows-xp|appearance| |
I have some UI in VB 2005 that looks great in XP Style, but goes hideous in Classic Style.
Any ideas about how to detect which mode the user is in and re-format the forms on the fly?
Thanks in Advance!
-Chris
---
Post Answer Edit:
Thanks Daniel, looks like this will work. I'm using the first solution you ... |
For learning PowerShell, there are a number of great resources
1. Technet Virtual Labs ([Introduction to Windows PowerShell][1] and [Writing Scripts with Windows PowerShell][2])
2. PowerShellCommunity.org - Forums, blogs, script repository
3. #powershell on irc.freenode.net
4. PowerShell podcasts - PowerScrip... |
What is the best method for executing FTP commands from a SQL Server stored procedure? we currently use something like this:
EXEC master..xp_cmdshell 'ftp -n -s:d:\ftp\ftpscript.xmt 172.1.1.1'
The problem is that the command seems to succeed even if the FTP ended in error. Also, the use of xp_cmdshell require... |
What is best practice for FTP from a SQL Server 2005 stored procedure? |
Maybe you want to explicit more precisely what you want to cache. You have all this opportunities to cache:
<ul>
<li><b>Accessing the Data Base</b> where you cache the data first correctly tuning your RDBMS, then using a layer to delegate the decision to detect multiple queries for the same data (with <a href="http:... |
Maybe you want to explicit more precisely what you want to cache. You have all this opportunities to cache:
<ul>
<li><b>Accessing the Data Base</b> where you cache the data first correctly tuning your RDBMS, then using a layer to delegate the decision to detect multiple queries for the same data (with <a href="http:... |
One of the IIS developers has an excellent walkthrough here:
http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx
However, for the love of god why?
|
>Updating all rows of the customer table because you forgot to add the where clause.
That was exactly i did :| . I had updated the password column for all users to a sample string i had typed onto the console. The worst part of it was i was accessing the production server and i was checking out some queries when i d... |
Using an ocx in a console application |
|visual-c++|console|c++| |
I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete. |
|c++|visual-c++|console|activex| |
An interface is used for polymorphism, which applies to Objects, not types. Therefore (as already noted) it makes no sense to have an static interface member. |
I'm not using it, but I've seen demos of it. It's very nice.
Boo has a lot of interesting extensibility points in parsing and interpreting the language itself that make it ideal for writing frameworks like Specter. The end result is much nicer looking than you'd be able to get with languages like C#.
Unfortunatel... |
An other alternative would be (if your RDBMS supports it) to use columns of type array. While this breaks the normalization rules, it can be useful in situations like this. One database which I know about that has arrays is PostgreSQL. |
Perhaps a code example would help, I'm going to use C#, but you should be able to follow along.
Lets pretend we have an interface called IPayable
public interface IPayable
{
public Pay(double amount);
}
Now, we have two concrete classes that implement this interface:
public class Bus... |
As much as I despise Crystal Reports (we describe digging deep into it the seven layers of Crystal hell) -- it seems to be the best/most-flexible tool for the job. I hope someone comes along and knocks them off the block though.
Microsoft Reporting Services is an alternative, but didn't have the features we needed. |
If you want to search for text (i.e. what is being said) inside an audio stream you would have to process it with some kind of speech recognition algorithm and store the text as meta data associated with the files. For video you could also do text recognition for text inside the video. <a href="http://www.evernote.com"... |
If you want to search for text (i.e. what is being said) inside an audio stream you would have to process it with some kind of speech recognition algorithm and store the text as meta data associated with the files. For video you could also do text recognition for text inside the video. <a href="http://www.evernote.com"... |
ActiveReports and DevExpress' reporting tools are both pretty good. The ReportViewer control works too (the price is right), but I find it more difficult to use. And SSRS reports can be embedded into your ASP.Net apps as well. |
I would suggest taking a look at MS SSRS (Microsoft SQL Server Reporting Services). |
The key reason to separating internal business objects from the data contracts/message contracts is that you don't want internal changes to your app to necessarily change the service contract. If you're creating versioned web services (with more than 1 version of the implemented interfaces) then you often have a single... |
In order to be able to use an extension in Explorer, the "bitness" of the extension needs to match the bitness of the operating system. This is because (at least under Windows) you can't load a 32-bit DLL into a 64-bit process -- or vice versa. If there's no 64-bit version of HgTortoise, then you can't use it with Ex... |
I've came across this problem once.
I can't really tell you why, but I dont think cron executes with the same environment variable as the user do.
I actually had to export the good path for my programs to execute well.
Is gpg at least trying to execute?
Or are the files you are trying to encypt actually in th... |
I would use a multidimensional array so that each element in an array is a grid reference to a square on the board.
Thus
board = arrary(A = array (1,2,3,4,5,5,6,7,8),
B = array (12,3,.... etc...
etc...
)
Then *board[A][1]* is then the bo... |
Do you mean why doesn't the language support multithreading or why don't JavaScript engines in browsers support multithreading?
The answer to the first question is that JavaScript in the browser is meant to be run in a sandbox and in a machine/OS-independent way, to add multithreading support would complicate the la... |
VS.NET defaults to private class |
|c#|visual-studio| |
Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one? |
int[8][8]
0=no piece
1=king
2=queen
3=rook
4=knight
5=bishop
6=pawn
use positive ints for white and negative ints for black
|
int[8][8]
0=no piece
1=king
2=queen
3=rook
4=knight
5=bishop
6=pawn
use positive ints for white and negative ints for black
|
C++, upon which C# is derived, specified that the default class access level is private. C# carries this forward for better or worse. |
You can pick up a lot from [Pro JavaScript Techniques](http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273/ref=pd_bbs_sr_6?ie=UTF8&s=books&qid=1220371851&sr=8-6), and I'm looking forward to Resig's forthcoming [Secrets of the JavaScript Ninja](http://jsninja.com/). |
No I always have to slap that "public" keyword on the front of the class, so you are not alone. I guess the template designers thought it was a good idea to start with the very basics. You can edit these templates though in your Visual Studio install, if it really annoys you that much, but I haven't gotten to that po... |
Yes, it's unsafe.
There's no easy way of allowing it. You could have a domain whitelist that allowed YouTube, Hulu, etc. through, but whitelisting is inherently a pain in the ass - you'd be constantly updating. |
Configuring sendmail behind a firewall |
|configuration|firewall|sendmail| |
I'm setting up a server which is on a network behind a firewall and I want programs on this computer to be able to use sendmail to send emails to any email address. We have an SMTP server running on this network (let's call it mailrelay.example.com) which is how we're supposed to get outgoing emails through the firewa... |
|configuration|firewall|sendmail|smarthost| |
Propagation of Oracle Transactions Between C++ and Java |
|java|oracle-database|transactions|jta|jts| |
We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP, messaging, etc - we haven't decided).
Now my manager thinks we'll need the ... |
How are you setting focus? I haven't tried the specific scenario you've suggested, but here's how I set focus to my controls:
Public Sub SetFocus(ByVal ctrl As Control)
Dim sb As New System.Text.StringBuilder
Dim p As Control
p = ctrl.Parent
While (Not (p.GetType() Is GetType(... |
Maybe you want to explicit more precisely what you want to cache. You have all this opportunities to cache:
<ul>
<li><b>Accessing the Data Base</b> where you cache the data first correctly tuning your RDBMS, then using a layer to delegate the decision to detect multiple queries for the same data (with <a href="http:... |
Maybe you want to explicit more precisely what you want to cache. You have all this opportunities to cache:
<ul>
<li><b>Accessing the Data Base</b> where you cache the data first correctly tuning your RDBMS, then using a layer to delegate the decision to detect multiple queries for the same data (with <a href="http:... |
SQL Server - Does column order matter? |
|sql-server|performance|optimization| |
In terms of performance and optimizations:
- When constructing a table in SQL Server, does it matter what order I put the columns in?
- Does it matter if my primary key is the first column?
- When constructing a multi-field index, does it matter if the columns are adjacent?
- Using ALTER TABLE syntax, is ... |
I would say the answer to all those questions is NO, altough my experience with MS-SQL goes as far as SQL2000. Might be a different story in SQL2005 |
No to the first 3 because the index will hold the data and no the last once also |
How do you swap DIVs on mouseover? (jquery?) |
|javascript|jquery|html| |
|javascript|html|css|jquery| |
This most be the second most simple rollover effect, still I don't find any simple solution.
**Wanted:** I have a list of items and a correspoding list of slides (DIVs). After loading, the first list item should be selected (bold) and the first slide should be visible. When the user hovers over another list item, th... |
GetHashCode() should always be in sync with Equals(), and Equals() isn't necessarily guaranteed to check for <em>all</em> of the fields in your object (there's certain situations where you want that to not be the case).
Furthermore, GetHashCode() isn't guaranteed to return unique values for all possible object state... |
You might want to check those few options out, which may be required by a Ruby On Rails environment, in which case they should be compiled. Just make sure the directory corresponds to your current settings.
--with-openssl-dir=/usr --with-readline-dir=/usr --with-zlib-dir=/usr |
If you're talking about the shortest distance between two real cities on a real spherical planet, like Earth, you want the [great circle distance](http://en.wikipedia.org/wiki/Great-circle_distance).
|
I'm tackling exactly this problem, and I had completely spaced [iCalendar][1] ([rfc 2445][2]) up until reading this thread, so I have no idea how well this will or won't integrate with that. Anyway the design I've come up with so far looks something like this:
- You can't possibly store all the instances of a recu... |
Programatically or Manually?
Manually, i prefer [AdExplorer][1], which is a nice Active directory Browser. You just connect to your domain controller and then you can look for the user and see all the details. Of course, you need permissions on the Domain Controller, not sure which though.
Programatically, it dep... |
- Loading assemblies from GAC mean less overhead and security that your application will always load correct version of .NET library
- You shouldn't ngen assemblies that are outside of GAC, because there will be almost no performance gain, in many cases even loss in performance.
- You're already using GAC, because al... |
- Loading assemblies from GAC mean less overhead and security that your application will always load correct version of .NET library
- You shouldn't ngen assemblies that are outside of GAC, because there will be almost no performance gain, in many cases even loss in performance.
- You're already using GAC, because al... |
- Loading assemblies from GAC mean less overhead and security that your application will always load correct version of .NET library
- You shouldn't ngen assemblies that are outside of GAC, because there will be almost no performance gain, in many cases even loss in performance.
- You're already using GAC, because al... |
Atom feed documents and Atom entry documents are used as the representation format for RESTful web services that follow the Atom Publication Protocol (AtomPub).
I personally have used syndication feeds to expose a sub-set of the Windows Event Log information so that I could subscribe and be notified of critical even... |
I'll second the recommendation for [Capistrano][1], though if you're looking for a GUI-based solution you could try the [Webistrano][2] front end. Clean, ssh-based, sane deployment and rollback semantics and easy scripting and extensibility via ruby.
[1]:http://www.capify.org
[2]:http://blog.innerewut.de/webis... |
I tend to have less Exception types, although it's not really the OO way to do it. Instead I put an enum to my custom Exceptions, which classifies the Exception. Most of the time I have a custom base Exception, which holds on to a couple of members, which can be overridden or customized in derived Exception types.
... |
On a freelance job I did, we set up three seperate enviroments.
* A Dev server, that ran continues builds using CruiseControl. Any check-in would trigger a build. QA Testing was done here.
* A Test Server, that user acceptance testing was done on.
* Production.
The workflow was as followed:
1. Developer chec... |
For knocking out fairly "run of the mill" reports, SQL Reporting Services is really quite impressive.
For complicated analysis, loading the data (maybe pre-aggregated) into an Excel Pivot table is usually adequate for most users.
I've found you can spend a lot of time (and money) building a comprehensive "ad-hoc"... |
For knocking out fairly "run of the mill" reports, SQL Reporting Services is really quite impressive.
For complicated analysis, loading the data (maybe pre-aggregated) into an Excel Pivot table is usually adequate for most users.
I've found you can spend a lot of time (and money) building a comprehensive "ad-hoc"... |
What to use for Messaging with C# |
|c#|messaging| |
So my company stores alot of data in a foxpro database and trying to get around the performance hit of touching it directly I was thinking of messaging anything that can be done asynchronously for a snappier user experience. I started looking at [ActiveMQ][1] but don't know how well C# will hook with it. Wanting to h... |
So my company stores alot of data in a foxpro database and trying to get around the performance hit of touching it directly I was thinking of messaging anything that can be done asynchronously for a snappier user experience. I started looking at [ActiveMQ][1] but don't know how well C# will hook with it. Wanting to h... |
|c#|messaging|activemq| |
If you need to do FTP from within the database, then I would go with a .NET assembly as Kevin suggested. That would provide the most control over the process, plus you would be able to log meaningful error messages to a table for reporting.
Another option would be to write a command line app that read the database ... |
Sorry if this isn't what you are asking for...
Have you considered some sort of cache behind the scenes that acts a bit like the "bucket system" when using asynchronous sockets in c/c++ using winsock? Basicly, it works by accepting requests, and sends an immediate response back to the web app, and when it finally get... |
@Greg: The Value property concatenates all the text contents of any child nodes. So if the body element contains only text it works, but if it contains XHTML I get all the text concatenated together but none of the tags. |
@Greg: It appears you've edited your answer to be a completely different answer. To which my answer is yes, I could do this using System.Xml but was hoping to get my feet wet with LINQ to XML.
I'll leave my original reply below in case anyone else wonders why I can't just use the XElement's .Value property to get w... |
ncover with nunit2 task in NAnt |
|nant|nunit|task|ncover| |
Is there any chance to get this work? I want my tests to be run by nunit2 task in NAnt. In addition I want to run NCover without running tests again. |
have you had a look at [InputEx][1]
[1]: http://javascript.neyric.com/inputex/ |
In .Net 3.0+ you can replace your ItemDataBound to the asp:Literal by doing something like this:
<ItemTemplate>
<tr>
<td><%# Eval("published") %></td>
...
where "published" is the name of a field in the data you have bound to the repeater |
In .Net 3.0+ you can replace your ItemDataBound to the asp:Literal by doing something like this:
<ItemTemplate>
<tr>
<td><%# Eval("published") %></td>
...
where "published" is the name of a field in the data you have bound to the repeater
Edit:
@[... |
I know it doesn't answer the question, but I have always written my own, or rather written it once and tweaked it for other apps. When I store the questions in the DB I store what input type it is, then on the form I dynamically create the appropriate control depending on which input type the question needs and add th... |
Views in seperate assemblies in ASP.NET MVC |
|c#|mvc|plugins| |
I'm trying to create a webapplication where I want to be able to plug-in seperate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.
If I want to use a view, I'm stuck ... |
|c#|mvc|plugins|asp.net-mvc| |
|c#|asp.net|asp.net-mvc|mvc|plugins| |
I'm trying to create a webapplication where I want to be able to plug-in seperate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.
If I want to use a view, I'm stuck ... |
You should really talk them into allowing SQLite. It is super-simple to setup, and operates like Access would (as a file sitting next to the app on the same server). |
Both mechanisms have value. Any decent test framework will catch the standard assert() anyway, so a test run that causes the assert to fail will result in a failed test.
I typically have a series of asserts at the start of each c++ method with a comment '// preconditions'; it's just a sanity check on the state I exp... |
My answer is let your developers choose the tools they are best with. |
Thanks adeel825 & Michael Stum.
My problem is, though, i'm in a big corporation and do not have access to log in as the domain admin nor to view the active directory, so i guess my solution is to try and get that level of access.
Thanks guys! |
I know at least [yahoo!'s Rich Text Editor][1] will let you use the included spell checker in FireFox.
I also tested FCKeditor, but that requires the users to install additional plugins on his computer.
[1]: http://developer.yahoo.com/yui/editor/ |
I know at least [yahoo!'s Rich Text Editor][1] will let you use the included spell checker in FireFox.
I also tested FCKeditor, but that requires the users to install additional plugins on their computer.
[1]: http://developer.yahoo.com/yui/editor/ |
You need to go to the Active Directory Users Snap In after logging in as a domain admin on the machine:
1. Go to start --> run and type in mmc.
2. In the MMC console go to File -->
3. Add/Remove Snap-In Click Add Select
4. Active Directory Users and Computers and select Add.
5. Hit Close and then hit OK.
... |
You need to go to the Active Directory Users Snap In after logging in as a domain admin on the machine:
1. Go to start --> run and type in mmc.
2. In the MMC console go to File -->
3. Add/Remove Snap-In Click Add Select
4. Active Directory Users and Computers and select Add.
5. Hit Close and then hit OK.
... |