instruction stringlengths 0 30k ⌀ |
|---|
Source Control in Visual Studio Isolated Shell |
|visual-studio|visualstudioextensibility|vsx| |
I am developing an **Isolated Shell** that caters to "**designers/special content creators**" performing specific tasks, using the Shell. As they operate on files, they need to be able to use TFS for source control. This is mainly due to the fact that Developers will also operate on the same files from TFS but using Vi... |
|visual-studio|extensibility|vsx| |
MySQL shell on Windows |
|windows|mysql|shell| |
I think you may be getting confused between TAggregate and TAggregateField objects, and the Delphi documentation probably isn't helping.
AFAICT, TAggregateField objects are automatically 'recalculated' and can be bound to data-aware controls like TDBLabel, but don't have any OnUpdate event.
"TAggregate" objects,... |
I think you may be getting confused between TAggregate and TAggregateField objects, and the Delphi documentation probably isn't helping.
AFAICT, TAggregateField objects are automatically 'recalculated' and can be bound to data-aware controls like TDBText, but don't have any OnUpdate event.
"TAggregate" objects, ... |
<url-pattern>*NEXTEVENT*</url-pattern>
The URL pattern is not valid. It can either end in an asterisk or start with one (to denote a file extension mapping).
The url-pattern specification:
> - A string beginning with a ‘/’ character and ending with a ‘/*’
> suffix is used for path mapping.
> - A string... |
<url-pattern>*NEXTEVENT*</url-pattern>
The URL pattern is not valid. It can either end in an asterisk or start with one (to denote a file extension mapping).
The url-pattern specification:
> - A string beginning with a ‘/’ character and ending with a ‘/*’
> suffix is used for path mapping.
> - A string... |
I would suggest reading [this thread][1] from 2006 (On Amazon web services developers connection). It seems there's no easy solution to this.
[1]: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=10849&start=0&tstart=0 |
Invalid <url-pattern> servlet mapping in tomcat 6.0 |
|java|tomcat|6.o|web.xml| |
print("<pre><code><servlet> <servlet-name>myservlet</servlet-name> <servlet-class>workflow.WDispatcher</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>*NEXTEVENT*</url-pattern></servlet-mapping></code></pre>");
Above is the s... |
**Quickie**
If you are using plain JSP views (as is most common), then simply add
<% response.setStatus( 403 ); %>
somewhere in your view file. At the top is a nice place.
**Detail**
In MVC, i would always set this in the view, and in most cases with Spring-MVC, use the `SimpleMappingExceptionResolve... |
select
datepart(month,getdate()) -- integer (1,2,3...)
,datepart(year,getdate()) -- integer
,datename(month,getdate()) -- string ('September',...)
|
Look at Ayendes rhino commons. He uses an abstraction over the IoC container. So that you can switch containers whenever you want. Something like container.Resolve is always there in every container.
I use Structuremap to do the dirty work it has a fluent interface and the XML things and it is powerfull enough for m... |
I have been working with Joomla for some time and I believe it one of the best CMS for starting off a Website. I have tried others a lot, But Joomla is better because it has Numerous Extentions (Components , Modules) and also its very Easy to Customize. You could also look at the Community Builder Extension for joomla... |
Like people have said, it really depends on what information the site is displaying. Two good examples are StackOverflow, and Google Images..
If stackoverflow stretched to fit the screen, longer answers would be annoying to read, because the eye finds it difficult to scan over long lines - this is *exactly* why news... |
The easiest would be to get the second value from this result set in the application:
SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2
But if you must select the second value using SQL, how about:
SELECT min(value) FROM (SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2) GROUP BY... |
The easiest would be to get the second value from this result set in the application:
SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2
But if you must select the second value using SQL, how about:
SELECT MIN(value) FROM (SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2) AS t GRO... |
The easiest would be to get the second value from this result set in the application:
SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2
But if you must select the second value using SQL, how about:
SELECT MIN(value) FROM (SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2) AS t
|
If you are using C# 3.0, you could use Object Initializers:
public Person()
{
}
public string Logon { get; set; }
public string Badge { get; set; }
You would call the contructor like this:
var p1= new Person { Logon = "Steve" };
var p2= new Person { Badge = "123" }; |
You may have to be more specific about what a "novell server" is. From what I understand, Novell servers run some form of Suse linux. Sql Server is a windows only product.
My company, however, does have clients that run Novell networks, and we do run Sql Servers on their network. But they're hosted on a win box... |
Visual Studio doesn't make it obvious which assembly reference you need to add. One way to find out would be to look up ConfigurationManager in the MSDN Library. At the top of the "about ConfigurationManager class" page it tells you which assembly and DLL the class is in. |
Now that there's Unicode, it's generally counter-productive to use named character entities. I would recommend using the Unicode character for a non-breaking space instead of an entity, just for that reason. Alternatively, you could use the entity ` `;, instead of the named entity. Using named entities makes you... |
SQL Server, although rooted in a Sybase/Unix/VMS background, is a native windows application. Apart from the compact edition (which runs on some Windows mobile platforms), SQL Server runs on Windows desktop and server operating systems.
More informaiton can be found at [wikipedia][1].
[1]: http://en.wikipedia... |
Is this a reasonable way to handle getters/setters in a PHP class? |
|php|oop| |
I'm going to try something with the format of this question and I'm very open to suggestions about a better way to handle it.
I didn't want to just dump a bunch of code in the question so I've posted the code for the class on refactormycode.
**[base-class-for-easy-class-property-handling](http://www.refactormycod... |
As far as I can tell, the browser will check the expiry date against the local clock (although it will account for the time zone), so the code in your question may not work as you expect if the client's clock is inaccurate. Most commonly, this happens when their time looks right but is set to the wrong timezone, meani... |
core dump files on Linux: how to get info on opened files? |
|linux|crash| |
I have a core dump file from a process that has probably a file descriptor leak (it opens files and sockets but apparently sometimes forgets to close some of them). Is there a way to find out which files and sockets the process had opened before crashing? I can't easily reproduce the crash, so analyzing the core file s... |
Good content.
Update it often.
Read and digest everything at [Creating a Google-friendly site: Best practices][1].
Be active on the web. Comment in blogs, correspond genuinely with people, in email, im, twitter.
I'm not too sure about the domain name. Wikipedia? What does that mean? Mozilla? What word is t... |
Good content.
Update it often.
Read and digest everything at [Creating a Google-friendly site: Best practices][1].
Be active on the web. Comment in blogs, correspond genuinely with people, in email, im, twitter.
I'm not too sure about the domain name. Wikipedia? What does that mean? Mozilla? What word is t... |
You could try the [Sysinternals PSExec tool][1]. You would need a checksum utility available on the remote machine. Unfortunately since they became part of Microsoft they don't make any source code available.
Alternatively, you could install the Cygwin SSH daemon on the remote machines and use ssh but that's a bit... |
TIFFs will begin with either II or MM (Intel byte ordering or Motorolla).
The TIFF 6 specification can be downloaded [here][1] and isn't too hard to follow
[1]: http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf |
The command line interface to MySQL works perfectly well in itself, but when using my local copy I'm forced to interact with it using the old-fashioned DOS windows. Is there some way I can redirect it through a better shell? |
Increasing camera capture resolution in OpenCV |
|c|image|opencv|resolutions|webcams| |
In my C/C++ program, I'm using [OpenCV][1] to capture images from my webcam. The camera ([Logitech QuickCam IM][2]) can capture at resolutions **320x240**, **640x480** and **1280x960**. But, for some strange reason, OpenCV gives me images of resolution **320x240** only. Calls to change the resolution using **cvSetCaptu... |
|c|image|webcam|opencv|resolutions| |
I’d strongly not recommend rolling your own encoding. I’d use the [Microsoft Anti-Cross Site Scripting Library][1] which is very small (v1.5 is ~30kb) if HttpUtility.HtmlEncode isn’t available.
As for decoding, maybe you could use the decoding routine from [Mono][2]?
[1]: http://www.microsoft.com/downloads/d... |
Easy way to AJAX WebControls |
|asp.net|ajax| |
I've got an web application that I'm trying to optimise. Some of the controls are hidden in dialog-style DIVs, so I'd like to have them load in via AJAX only when the user wants to see them. This is fine for controls that are mostly Literal-based (various menus and widgets), but when I have what I call "dirty" contro... |
|asp.net|ajax|web-controls| |
How do I replicate content on a web farm |
|iis|web-server|replication| |
We have a Windows Server Web Edition 2003 Web Farm.
What can we use that handle replication across the servers for:
Content & IIS Configuration (App Pools, Virtual Directories, etc...)
We will be moving to Windows 2008 in the near future, so I guess what options are there on Windows 2008 as well. |
Cascading deletes in PostgreSQL |
|sql|postgresql| |
I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default ON DELETE RESTRICT behavior for those constraints. But when trying to share a snapshot of the database with a consultant, I needed to remove some sensitive data. I wish that my memory of a DELETE FROM... |
> Why doesn't C# support this class level generic type inference?
Because they're generally ambiguous. By contrast, type inference is trivial for function calls (if all types appear in arguments). But in the case of constructor calls (glorified functions, for the sake of discussion), the compiler has to resolve mult... |
Javascript collection of DOM objects - why can't I reverse items order with Array.reverse()? |
|javascript|arrays| |
What would be the problem with reversing the array of DOM objects got from a command like:
var imagesArr = new Array();
imagesArr = document.getElementById("myDivHolderId").getElementsByTagName("img");
imagesArr.reverse();
When i call the reverse() method, the script stops executing with the error '... |
The only concrete numbers I can find which are from early ASP.NET MVC-development is on this forum-thread:
[http://forums.asp.net/p/1231621/2224136.aspx][1]
Rob Connery himself somewhat confirms statement that ScottGu has claimed that ASP.NET MVC can serve 8000 requests per second.
Maybe Jeff and his crew can ... |
Chrome is actually a little different to Safari, it uses a completely different javascript implementation and problems have been reported with both prototype and jquery. I wouldn't worry about it too much for now, it's still an early beta version of the browser and such inconsistencies will probably be treated as bugs.... |
|java|tomcat|web.xml| |
|java|tomcat|servlets|web.xml| |
I personally use NHibernate with SqlCe, this provides a "throw-away" database that doesn't need any specialized tear down after the tests are run.
It also provides a good way to test your nhibernate mappings if applicable.
Here is a link to an article I wrote awhile ago on how to accomplish this: [http://www.code... |
Thanks. A load of `callLater`-s added to our custom chart code seems to have done it. |
Oracle write to file |
|oracle-database| |
I am running oracle and have a querry which pulls some results from the database. I would like to write the results as a text file. How would I go about doing this? |
I am running oracle and have a query which pulls some results from the database. I would like to write the results as a text file. How would I go about doing this? |
I am running oracle and have a query which pulls some results from the database. I would like to write the results as a text file. How would I go about doing this?
My prefered way would be by using UTL_FILE. Would some one have an example of how to do this? |
Honestly, with 8 objects max and 8 properties max per object, your best bet is to just traverse each object and make the comparisons directly. It'll be fast and it'll be easy.
If you're going to be using these types of comparisons often, then I agree with Jason about JSON serialization...but otherwise there's no ne... |
I think those tools are very good, but for my purpose I have written a custom own. The main reason for this was because of I'm working on a SQL Server Compact 3.5 database, so none of the listed tools worked.
Of course it isn't as powerful as the tools from Redgate but you get the most important features very quick.... |
Perhaps I got the wrong end of the stick but wouldn't,
<pre><code>$full_url = $base_url . $relative_url</code></pre>
work? IIRC Perl text processing is pretty quick. |
Perhaps I got the wrong end of the stick but wouldn't,
<pre><code>$full_url = $base_url . $relative_url</code></pre>
work? IIRC Perl text processing is pretty quick.
<i>@lennysan</i> Ah sure yes of course. Sorry I can't help, my Perl is pretty rusty. |
Here is an extension method in VB.NET for the Image Class
<pre><code>
Imports System.Runtime.CompilerServices
Namespace Extensions
''' <summary>
''' Extensions for the Image class.
''' </summary>
''' <remarks>Several usefull extensions for the image class.</remarks>
Public Module ImageEx... |
|google|chrome| |
|google-chrome| |
Some JavaScript frameworks, such as [mootools][1], give you access to a special event named "domready":
> Contains the window Event 'domready', which will execute when the DOM has loaded. To ensure that DOM elements exist when the code attempting to access them is executed, they should be placed within the 'domready... |
Yes, Linkedin has an API:
* [http://www.programmableweb.com/api/linkedin][1]
* [http://blog.linkedin.com/blog/2007/12/the-intelligent.html][2]
So you could build an application that uses it.
[1]: http://www.programmableweb.com/api/linkedin
[2]: http://blog.linkedin.com/blog/2007/12/the-intelligent.ht... |
Yes, Linkedin has an API:
* [http://www.programmableweb.com/api/linkedin][1]
* [http://blog.linkedin.com/blog/2007/12/the-intelligent.html][2]
So you could build an application that uses it.
**Update:** ([from second link][2])
> We’ll be phasing all of this in over the coming months and to get involved w... |
Yes, Linkedin has an API:
* [http://www.programmableweb.com/api/linkedin][1]
* [http://blog.linkedin.com/blog/2007/12/the-intelligent.html][2]
So you could build an application that uses it.
**Update:** ([from second link][3])
> We’ll be phasing all of this in over the coming months and to get involved w... |
The onload event is considered the proper way to do it, but if you don't mind using a javascript library, jQuery's $(document).ready() is even better.
$(document).ready(function(){
// manipulate the DOM all you want here
});
The advantages are:
1. Call $(document).ready() as many times as you ... |
fprintf return success but can't write to an existin file |
|c|printf|stream|io| |
In my codes, fprintf return successful by returning the number of bytes written in STREAM, but in the actual file the string I put is not there. |
|c|file|io|stream|printf| |
Using an `ExceptionResolver` is a great way to go, but if you just want this to be view-independent, you could certainly make a call to ` response.sendError(HttpServletResponse.SC_FORBIDDEN, "AdditionalInformationIfAvailable");` in your Controller.
|
[http://railscasts.com/episodes/68-openid-authentication](Railscasts episode 68 - OpenID authentication) describes how to do exactly this. It's about a year old, so you may have to do some stuff differently. I'd also strongly for either an updated or newer OpenID plugin (the link for the one in the video is labeled "ou... |
[Railscasts episode 68 OpenID authentication](http://railscasts.com/episodes/68-openid-authentication) describes how to do exactly this. It's about a year old, so you may have to do some stuff differently. I'd also strongly for either an updated or newer OpenID plugin (the link for the one in the video is labeled "outd... |
How do you deal with polymorphism in a database? |
|oop|database-design| |
Example
I have Person, SpecialPerson, and User. Person and SpecialPerson are just people - they don't have a user name or password on a site, but they are stored in a database for record keeping. User has all of the same data as Person and potentially SpecialPerson, along with a user name and password as they are re... |
Sockets and Processes in Java |
|java|sockets|network-programming|blackberry| |
In Java, what would the best way be to have a constantly listening port open, and still send upon receipt of a packet. I'm not particularly savvy with network programming at the moment, so the tutorials I've found on the net aren't particularly helpful.
Would it make sense to have the listening socket as a serversoc... |
|iis|replication|web-server| |
|iis|replication|webserver| |
Encryption in C# Web-Services |
|web-service|encyption|security|c#| |
I'm looking for a simple way to encrypt my soap communication in my C# Web-Service.
I was looking into [WSE 3.0][1] but it seems Microsoft dropped support for it, and therefore it's not straightforward to use.
It seems WCF could've been an option but I prefer not to upgrade from .NET 2.0 .
Any **simple**, stra... |
|c#|security|encryption|web-service| |