input stringlengths 51 42.3k | output stringlengths 18 55k |
|---|---|
Where should I store SSIS Data? <p>I have a slow custom data source in a SSIS Dataa Flow Task.I have to run the package with multiple parameters</p>
<p>If I want to upload data to a DB using SQL Data Destination(Bulk Insert) the connection times out</p>
<p>If I write the data to a flat file I cannot run multiple inst... | <p>A Raw File Destination allows you to store the file name in a package variable. You can then use the /Set or /Conf command line switches of dtexec to either set the variable on the command line, or bring in a configuration file for that run of the package. The Raw Files aren't great for manual processing, but if you... |
static class instances unique to a request or a server in ASP.NET? <pre><code> public sealed class UserLoginSingleton
{
UserLoginCollection _userLoginCol = new UserLoginCollection();
UserLoginSingleton()
{
}
public static UserLoginSingleton Instance
{
get
{
IDicti... | <p>The <code>HttpContext.Items</code> collection is per-request. So in your case when the user gets redirected to page2.aspx, the instance you created on page 1 is gone. For the same instance to be available across requests, you need to be using <code>HttpContext.Session</code> to store your instance.</p>
|
Getting PartCover to work <p>I want to try PartCover for code coverage. I'm running Visual Studio 2008 Professional with MSTest. The Professional Edition does not include the Team Testing tools, like Code Coverage.</p>
<p>So, I'm trying PartCover, but I can't get it to work. In the PartCover.Browser I've selected the ... | <p>Yep, I had this problem too.
Check out the format for the Rules field.</p>
<p>In the browser add something like:</p>
<p><code>+[MyNamespace.MyAssemblyName]*</code></p>
<p>Where the assembly name you specify is the name of the assembly containing the types you want coverage for. Start off with:</p>
<p><code>+[*]*... |
Windows Explorer directory as bundle <p>I have been investigating for some time now a way to prevent my user from accidently entering a data directory of my application.</p>
<p>My application uses a folder to store a structured project. The folder internal structure is critic and should not be messed up. I would like ... | <p>Inside, or outside of your program?</p>
<p>There are ways, but none of them easy. You are probably going to be looking at a Filter Driver on the file system.</p>
|
How to get the name of the component that's extending mine in ColdFusion? <p>Let's say I have the following component called <strong><em>Base</em></strong>:</p>
<pre><code><cfcomponent output="false">
<cffunction name="init" access="public" returntype="Any" output="false">
<cfset variables.met... | <p>Is there a reason you don't want to call init in each extending cfc?</p>
<pre><code><cfcomponent output="false" extends="Base">
<cfset super.init()>
</cfcomponent>
</code></pre>
<p>That seems to populate the metadata like you want.</p>
|
ASP.net: Weird web user control problem <p>This is weird. I declare a web user control on a asp.net web page like so</p>
<pre><code>print("<%@ Register Src="~/Controls/blah.ascx" TagName="blahCtrl" TagPrefix="cc" %>");
</code></pre>
<p>I don't have problem with it until today in the code behind where it give me... | <p>Try registering it on the .aspx source page not the .aspx.cs page.</p>
|
Approach to convert from org.joda.time.DateTime to java.util.Calendar <p>Anyone done this and can share? I see an option or two but want to know what others have accomplished.</p>
| <p>According to joda-time documentation the preferred method to use is to call this:
<a href="http://joda-time.sourceforge.net/api-release/org/joda/time/base/AbstractDateTime.html#toCalendar(java.util.Locale)">AbstractDateTime#toCalendar</a>.</p>
|
Basic: How is the session id created? <p>Does IIS create the session id when a request is received and where is that saved (client or server)?</p>
<p>How does server recognize that the request is coming from the same user/session?</p>
| <p>The answer to your first question is Yes -- if sessions are used, and Both.</p>
<p>A cookie is a short bit of text passed back and forth between client and server with every request/response.</p>
<p>IIS generates a session id, saves it, and any associated data, and passes the in a cookie to the client (browser).</... |
Running multiple virtual directories on IIS - any performance issues? <p>I need to run 8-10 instances of my application on IIS 6.0 that are all identical but point to different backends (handled via config files, which would be different for each virtual directory). I want to create multiple virtual directories that p... | <p>No concerns. If you run into any performance issues, it won't be with IIS for 10 apps that size.</p>
|
Problem with table JOIN in MySQL and aggregation <p>I have three tables. This query will write down the right answer (x-lines for btv.id_user with appropriate btv.cas and race.id_zavod</p>
<pre><code>SELECT `btv.id_user`, `btv.id_zavod`,`btv.cas`
FROM `btv`
JOIN `btu` ON `btv.id_user` = `btu.id_user`
JOIN `race` ON 'b... | <p>The query you have written:</p>
<pre><code>SELECT `btv.id_user`, `btv.id_zavod`, MIN( `btv.cas` )
FROM `btv`
JOIN `btu` ON `btv.id_user` = `btu.id_user`
JOIN `race` ON 'btv.id_zavod' = `race.id_zavod`
WHERE `race.type` = '8' AND `btv.id_user` = '607'
GROUP BY `btv.id_user`</code></pre>
<p>won't run. You need a gr... |
How do YOU reduce compile time, and linking time for Visual C++ projects (native C++)? <p>How do YOU reduce compile time, and linking time for VC++ projects (native C++)?</p>
<p>Please specify if each suggestion applies to debug, release, or both.</p>
| <p>It may sound obvious to you, but we try to use forward declarations as much as possible, even if it requires to write out long namespace names the type(s) is/are in:</p>
<pre><code>// Forward declaration stuff
namespace plotter { namespace logic { class Plotter; } }
// Real stuff
namespace plotter {
namespace ... |
Javascript XML parser problem <p>test[_nObjectives].pool[j].feedbackCorrect = oQuestions[j].getElementsByTagName("feedbackCorrect")[0].firstChild.data;</p>
<p>and the XML in this case contains this: </p>
<pre><code> <feedbackCorrect>
</feedbackCorrect>
</code></pre>
<p>When executing that line of code... | <p>you are getting the error because</p>
<pre><code>oQuestions[j].getElementsByTagName("feedbackCorrect")[0]
</code></pre>
<p>is returning that tag, and the .firstChild is returning null, because it has no children...</p>
<p>Are you sure you dont want</p>
<pre><code>oQuestions[j].getElementsByTagName("feedbackCorre... |
How to create a form object from 2 different model objects in Django? <p>I have 2 objects, both from different Model classes, and want to show a form containing some fields from each one. How can I do this?</p>
| <p>The way I do it is by creating two <code>ModelForm</code> classes that use the <code>fields</code> Meta attribute to specify which <a href="http://docs.djangoproject.com/en/dev/topics/forms/modelforms/?from=olddocs#using-a-subset-of-fields-on-the-form">subset of fields</a> to use to display in the form. I display bo... |
NHibernate session management in ASP.NET MVC <p>I am currently playing around with the HybridSessionBuilder class found on Jeffrey Palermo's blog post:</p>
<p><a href="http://jeffreypalermo.com/blog/use-this-nhibernate-wrapper-to-keep-your-repository-classes-simple/">http://jeffreypalermo.com/blog/use-this-nhibernate-... | <p>You should not wrap your ISession in a using statement -- the point of passing the ISessionBuilder into the repository constructor (dependency injection) is that the calling code is responsible for controlling the life cycle of the ISession. By wrapping it in a using, Dispose() is called on the ISession and you won'... |
QueryInterface for interface VBA._Collection failed <p>We are randomly seeing this error during long executions of our system. The error is caught by our alarm system, and we successfully retry, and continue running the system. The only hits we found on Google seem to mention corrupt installations. We do not think this... | <p>Register the .dll file again from a command window by using the below command:</p>
<pre><code>regsvr32 C:\WINDOWS\system32\msvbvm60.dll
</code></pre>
|
best practices to import text into html <p>What is the best practice for importing text into html from a multipage InDesign document, from designer to non-designer. Document designed on a mac going to CMS on PC - hand off the InDesign File or strip text into word file? Supplying all images and pdf as go-by?</p>
| <p>More people are likely to be able to open a PDF than InDesign, especially with font considerations. I prefer to get work in PDF format. I can easily extract the text and I can pull the document into PhotoShop to slice it up. You just have to make sure the quality/compression settings are right so it doesn't muck up ... |
positioning logo and navigation links not aligning <p>Screenshot of the problem:</p>
<p><img src="http://i.stack.imgur.com/qutvW.jpg" alt="http://i36.tinypic.com/dfxdmd.jpg"></p>
<p>The yellow block is the logo and the blue box is the nav links (I have blanked them out). I would like to align the links at the bottom ... | <p>Try this. Seems to work in Firefox/Mac</p>
<pre><code>#header {
height: 42px;
}
#logo {
width: 253px;
height: 42px;
background: #00ffff;
float: left;
}
#nav {
width: 100%;
border-bottom: 2px solid #3edff2;
height: 42px;
}
#nav ul {
list-style-type: none;
margin: 0;
paddi... |
Linq 2 SQL or Linq Entities <p>I am starting to design a new application and what I am wondering is peoples opinions on Linq2SQL or Linq2Entities and what they feel is the better technology for rapid development.</p>
<p>I am also doing some research into ADO.net data services.</p>
| <p>Yes, agreed with Slace.</p>
<p>Just be careful on the framework you do choose, to ensure it meets all your needs.</p>
<p>For instance, I recently gutted out Entity Framework from a work project after working with it pretty solidly over the last couple of weeks, as it did not facilitate my needs, mainly due to:-</p... |
ROR: To scaffold or not? <p>I love scaffolding and it extremely helpful for prototyping. But Should we use scaffolding for developing application as such?</p>
| <p>The name "scaffolding" is sort of a misnomer in Rails now (post 2.0). The structure generated through scaffolding generator is more of a base application to build on, rather than a "prototype" that you throw away later.</p>
<p>At least, if you are designing your application to be RESTful, you will find yourself kee... |
How to save history within UpdatePanel? <p>I created an admin page for a web application, and it's mostly ajax. Almost all the events in the page update one of the UpdatePanels on the page.
How can I save each UpdatePanel state in the user's history so when the user pushes the browser "back" button they wont get redire... | <p>The ability to manage history was added in .NET 3.5 SP 1. Here are some resources that will help get you up to speed.</p>
<p><a href="http://www.asp.net/learn/3.5-SP1/video-242.aspx">Introduction to ASP.NET Ajax History</a></p>
<p><a href="http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/06/15/asp-... |
Difference between a Postback and a Callback <p>I keep on hearing this words '<strong>callback</strong>' and '<strong>postback</strong>' tossed around.<br />
What is the difference between two ? </p>
<p>Is postback very specific to the ASP.NET pages ?</p>
| <p>A Postback occurs when the data (the whole page) on the page is posted from the client to the server..ie the <strong>data is posted-back to the server</strong>, and thus the page is refreshed (redrawn)...think of it as '<strong>sending the server the whole page (asp.net) full of data</strong>'.</p>
<p>On the other ... |
Cross platform keylogger <p>I'm looking for ways to watch mouse and keyboard events on Windows, Linux and Mac from Python.</p>
<p>My application is a time tracker. I'm not looking into the event, I just record the time when it happens. If there are no events for a certain time, say 10 minutes, I assume that the user h... | <p>There are couple of open source apps that might give you some pointers:</p>
<ul>
<li><a href="http://sourceforge.net/p/pykeylogger/wiki/Main_Page/" rel="nofollow">PyKeylogger</a> is python keylogger for windows and linux</li>
<li><a href="http://code.google.com/p/logkext/" rel="nofollow">logKext</a> is a c++ keylog... |
Proper way to stop TcpListener <p>I am currently using TcpListener to address incoming connections, each of which are given a thread for handling the communication and then shutdown that single connection. Code looks as follows:</p>
<pre><code>TcpListener listener = new TcpListener(IPAddress.Any, Port);
System.Console... | <p>There are 2 suggestions I'd make given the code and what I presume is your design. However I'd like to point out first that you should really use non-blocking I/O callbacks when working with I/O like network or filesystems. It's far <em>FAR</em> more efficient and your application will work a lot better though they ... |
Large primary key: 1+ billion rows MySQL + InnoDB? <p>I was wondering if InnoDB would be the best way to format the table? The table contains one field, primary key, and the table will get 816k rows a day (est.). This will get very large very quick! I'm working on a file storage way (would this be faster)? The table is... | <p>I'd recommend you start <a href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html" rel="nofollow">partioning</a> your table by ID or date. Partioning splits a large table into several smaller table according to some defined logic (like splitting it by date ranges), which makes them much more managable perfor... |
select the <select> tag options using value <p>I want to select an option in select tag through the value. - javascript</p>
<pre><code>var selectbox=document.getElementById("Lstrtemplate");
var TemplateName=selectbox.options[selectbox.selectedIndex].text;
</code></pre>
<p>Now i am having the option text in TemplateN... | <p>Try it like this : </p>
<pre><code>var TemplateName = selectbox.options[selectbox.selectedIndex].value;
</code></pre>
|
Is it possible to do streaming WiFi Communications on the iPhone? <p>I am looking to develop an iPhone application that will require point-to-point WiFi communications on an iPhone. I would like to use the WiFi interface and have the application stream between the phone and a WiFi device. Does anyone have some experi... | <p>As far as I know (as the SDK stands now), the only thing available is communication over the existing network connection. The SDK doesn't allow for setting up wireless network connections, or creating ad-hoc networks. I believe the only way to join or create wifi networks is through the settings app.</p>
|
Smart navigation <p>What is smart navigation in .NET? </p>
| <p>SmartNavigation is a property of the Page class in System.Web.UI. When a request comes in to Internet Explorer 5.5 or higher and SmartNavigation is turned on (set to true), the following actions are performed:</p>
<ul>
<li>The flash caused by navigation is eliminated</li>
<li>The scroll position is persisted when m... |
Visual Studio skips build <p>When I try to build my project I get the following message in the build window :</p>
<p><strong>========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped ==========</strong></p>
<p>I tried rebuilding , then building again , but it doesn't help . Is there a way to view more detailed... | <p>Check with the configuration manager like CMS said and make sure that you have the right platform set. A lot of the time when you use something like the MS Application Blocks the default platform is set to Itanium.</p>
|
Xpath sibling conditional testing? <p>I'm using VB.net (2003), and calling the SelectNodes method on an xml document.<br>
If I have a document:</p>
<pre><code><InqRs>
<DetRs>
<RefInfo>
<RefType>StopNum</RefType>
<RefId>0</RefId>
</RefInfo>... | <p>You want all <strong><code>DetRs</code></strong> children of the top element:</p>
<p> <code>/*/DetRs</code></p>
<p>That have a <strong><code>RefInfo</code></strong> child:</p>
<p> <code>/*/DetRs</code><br />
... |
How could I implement this strange WPF TreeListDataGridView? <p>As you can see in the image below I have a tree datamodel consisting of groups that can contain other groups plus an arbitary number of items wich again can hold Parameters. The Parameters itself are defined globally and just reoccur in the items. Only the... | <p>I'm not a tree view expert, but it's easy to build something like that without a tree view.</p>
<p>Start with an empty VS2008 Wpf Application named WpfTreeGridWhatever</p>
<p>First, let's define our model:</p>
<pre><code>using System;
using System.Collections.Generic;
namespace WpfTreeGridWhatever
{
public c... |
Howto rotate image using jquery rotate plugin? <p>How do you rotate an image using <a href="http://code.google.com/p/jquery-rotate/" rel="nofollow">jQuery-rotate</a> plugin?</p>
<p>I have tried the following and it doesn't seem to work:</p>
<pre><code><html>
<head>
<meta http-equiv="Content-Type" conte... | <p>You've got a 404 on jQuery and the jQuery plugin. Because of that, your page is throwing a JavaScript error, that $ is not defined.</p>
<p>You need to learn basic JavaScript debugging techniques. A quick search found this article that looks like a good place for you to start:</p>
<ul>
<li><a href="http://www.devel... |
Android development with Netbeans IDE <p>Has anybody had any success with developing for Android platform using Netbeans (5.5+ ) IDE? I know of atleast netbeans one plugin that is supposed to support it but wanted to hear if anyone is using netbeans for Android development and how easy it is to set it up.</p>
| <p>There is a project called nbandroid (formerly called undroid) which is a Netbeans version of ADT and it works quite fine with SDK 1.0</p>
<p><a href="http://nbandroid.org/" rel="nofollow">http://nbandroid.org/</a></p>
<p>In the past it was hosted at undroid.nolimit.cz and nbandroid.kenai.com, both these sites are ... |
Should I have one class for every database I use? <p>First, let me explain what I am doing. I need to take an order, which is split up into different databases, and print out this very large order. What I need from the orders is about 100 or so columns from different databases. The way I was doing in was querying with ... | <p>I would recommend an object-oriented solution to this. Presumably your database is designed with tables that represent logical groupings of data. Each of these tables can likely be mapped onto a class in your system, although in some cases, it may be more than one table that makes up an object or there might be mu... |
How can I make Eclipse CDT auto-indent properly when using BOOST_FOREACH? <p>I write this tiny C++ example in Eclipse 3.4.1 (CDT 5.0.1):</p>
<pre><code>#include <iostream>
#include <vector>
#include <boost/foreach.hpp>
int foo()
{
std::vector<int> numbers;
BOOST_FOREACH(int n, numbers)
{... | <p>Add this to some header used by your code:</p>
<pre><code>#ifdef __CDT_PARSER__
#undef BOOST_FOREACH
#define BOOST_FOREACH(a, b) for(a; ; )
#endif
</code></pre>
|
How do I get CakePHP bake to find mysql.sock and recognize MySQL while using MAMP on Mac OSX? <p>I am currently reading "Beginning CakePHP:From Novice to Professional" by David Golding. At one point I have to use the CLI-command "cake bake", I get the welcome-screen but when I try to bake e.g. a Controller I get the fo... | <p>I find the solution to this problem :
Add a socket config in the cakephp app/config/database.php file</p>
<pre><code>class DATABASE_CONFIG {
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'port' => '/Applications/MAMP/tmp/mysql/mysql.sock', // here is the ... |
How to organize python test in a way that I can run all tests in a single command? <p>Currently my code is organized in the following tree structure:</p>
<pre><code>src/
module1.py
module2.py
test_module1.py
test_module2.py
subpackage1/
__init__.py
moduleA.py
moduleB.py
... | <p>Whether you seperate or mix tests and modules is probably a matter of taste, although I would strongly advocate for keeping them apart (setup reasons, code stats etc).</p>
<p>When you're using nosetests, make sure that all directories with tests are real packages:</p>
<pre><code>src/
module1.py
module2.py
... |
When would you use the different git merge strategies? <p>From the man page on git-merge, there are a number of merge strategies you can use. </p>
<ul>
<li><p><em>resolve</em> -
This can only resolve two heads (i.e. the current branch and another branch you pulled from) using 3-way merge algorithm. It tries to caref... | <p>I'm not familiar with resolve, but I've used the others:</p>
<h2>Recursive</h2>
<p>Recursive is the default for non-fast-forward merges. We're all familiar with that one.</p>
<h2>Octopus</h2>
<p>I've used octopus when I've had several trees that needed to be merged. You see this in larger projects where many br... |
What are the differences between Perl, Python, AWK and sed? <p>just want to know what are the main differences among them? and the power of each language (where it's better to use it).</p>
<p><strong>Edit:</strong> it's not "vs." like topic, just information.</p>
| <p>In order of appearance, the languages are <code>sed</code>, <code>awk</code>, <code>perl</code>, <code>python</code>.</p>
<p>The <code>sed</code> program is a stream editor, and is designed to apply the actions from a script to each line (or, more generally, to specified ranges of lines) of the input file or files.... |
Easiest way to animate background image sliding left? <p>What's the best way to animate a background image sliding to the left, and looping it? Say I've got a progress bar with a background I want to animate when it's active (like in Gnome or OS X).</p>
<p>I've been playing with the $(...).animate() function and tryin... | <p>As soon as I posted this I figured it out. In case it helps anyone else, here's the function I came up with:</p>
<pre><code>function animateBar(self) {
// Setup
var bar = self.element.find('.ui-progress-bar');
bar.css('background-position', '0px 0px');
bar.animate({
backgroundPosition: '-20px 0px'
}, 1000,... |
Descendant Enumeration in Objective-C <p>Is it possible to get a list of all descendant classes of a particular class in objective-c?</p>
<p>Something like:</p>
<pre><code> @interface A : NSObject
@end
@interface B : A
@end
@interface C : A
@end
NSArray *descendants = [A allDescendants]; // descendan... | <p>The only way I can think is to enumerate the entire list of classes in the runtime (obtained with <code>objc_getClassList</code>) and test each one for <code>isKindOfClass:A</code>.</p>
<p>This is likely the only solution because classes do not maintain links to their descendants (only to their superclass).</p>
|
Using Matlab, how can I find the value K in the following root locus? <p>In Matlab, how can I find value of K, in a system that has oscillation?</p>
<blockquote>
<p>(system's tf, if needed: (K * (s +
25))/(s^3 + 24 s^2 + 100 s) )</p>
</blockquote>
<p>PS. I'm using root locus.</p>
| <p>I assume this is the plant for a closed-loop system with gain compensation only (that would be K). In that case I would express it as a transfer function and then use the root-locus command to see where it hits on the x-axis:</p>
<pre><code>num = [1 25];
den = [1 24 100 0];
sys=tf(num,den)
rlocus(sys)
</code></pr... |
Title (in ASP.NET @ Page directive) not rendering in web page <p>I was intending on use the Title attribute in the @Page directive to customise each pages title, but it simply doesn't appear to do anything.</p>
<p>The site uses master pages - I don't know if that is a consideration.</p>
<p>Master Page snippet:</p>
<... | <p>Oops... A basic error! [aren't they always?]</p>
<p>Anyone spot a missing <code>runat="server"</code> in the element?</p>
<p>Oops.</p>
|
I want to assign a record to TStringList.Objects <p>I want create a Playlist control. I have a lot of information to display into a TStringList. I want to assign a record to TStringGrid.Objects instead of an object because so many objects may take a while to create/destroy. It also take a lot of RAM.</p>
<p>A record w... | <p>You can use a TList to a Pointer of your record.</p>
<p>Eg:</p>
<pre><code>Type
PMyrec = ^AMyRec;
</code></pre>
<p>usage</p>
<pre><code>var
MyRec : PMyRec;
new(MyRec);
MyRec^.Fullname := 'test';
MyRec^.RelativePath := false;
</code></pre>
<p>etc</p>
<p>{ MyList is a List you have create elsewhere }</p>
... |
Is it safe to run a pool under NT AUTHORITY\NETWORK SERVICE? <p>I normally would create a limited rights user and run the process under that but the fact that pools automatically created under IIS7 in 2008 use this account makes me think that this is perfectly safe, and possibly more so than something I create? The who... | <p>Yes it is safe. <a href="http://technet.microsoft.com/en-us/library/cc170953.aspx">Services and Service Accounts Security Planning Guide</a></p>
<p>One more thing. It is even better to use the local service account ( not to confuse with local System account! ). It has the same permission on the local server as netw... |
How do I kill an unruly spid in Sybase? <p>I've got a couple of rogue spid's in my database that I can see are sleeping when I log in as <code>sa</code> and use <code>sp_who</code>, but attempts to use <code>kill <spid></code> to eliminate them have failed and I don't actually have access to the server itself to ... | <p>System processes cannot be killed. For example in the output of sp_who where cmd is NETWORK HANDLER, MIRROR HANDLER and CHECKPOINT SLEEP (or rarely, CHECKPOINT) and AUDIT PROCESS cannot be killed. If they have status as "recv sleep", "send sleep", "alarm sleep" and "lock sleep" , they can be killed.</p>
<p>In sp_wh... |
Dynamic Memory Allocation Failure Recovery <p>I'm working on an embedded processor (400 MHz Intel PXA255 XScale), and I thought I saw one case where there wasn't enough memory to satisfy a 'new' operation. The program didn't crash, so I assumed other threads had freed their memory and it was just a transient thing. Th... | <p>You are trying to solve a global problem through local reasoning. The global problem is that the entire device has a limited amount of RAM (and possibly backing store) for the operating system and all of the applications. To make sure this amount of RAM is not exceeded, you have a few options:</p>
<ul>
<li><p>Eac... |
late static binding: which languages commonly used for web development support it? <p>Lately I've been seeing a lot of talk regarding PHP's lack of late static binding until 5.3. </p>
<p>From what I've read proper implementations of stuff like ActiveRecord are not possible until the language has this feature.</p>
<p>... | <p>If you want a work around, that admittedly is a little time consuming, yet will be easily removed when php 5.3 becomes available and mainstreamed, you can try the following code.</p>
<pre><code>class Specific_Model extends Model{
public static function GetAll($options = null){
parent::GetAll($options,... |
Associative array without toString, etc <p>I want to create an associative array:</p>
<pre><code>var aa = {} //equivalent to Object(), new Object(), etc...
</code></pre>
<p>and I want to be sure that any key I access is going to be a number:</p>
<pre><code>aa['hey'] = 4.3;
aa['btar'] = 43.1;
</code></pre>
<p>I know... | <p>One possibility would be to use hasOwnProperty to check that the key is something you explicitly added to the array. So instead of:</p>
<pre><code>function findNumber(userEnteredKey) {
return aa[userEnteredKey];
}
</code></pre>
<p>you'd say:</p>
<pre><code>function findNumber(userEnteredKey) {
if (Object.... |
In Java: How to handshake a secured connection using Keystore and Truststore certificate? <p>If I have 2 terminals A and B. T-A is connect T-B over secured socket connection. I need to write code to implement a connection between the 2 terminals.</p>
<p>How do I do handshake such connection using Keystore and Truststo... | <p>Here's a PDF whitepaper entitled <a href="https://www6.software.ibm.com/developerworks/education/j-jsse/j-jsse-ltr.pdf" rel="nofollow">Using JSSE for secure socket communication</a> which may help answer your question, including configuration of your keystore files.</p>
|
How much input validation should I be doing on my python functions/methods? <p>I'm interested in how much up front validation people do in the Python they write.</p>
<p>Here are a few examples of simple functions:</p>
<pre><code>def factorial(num):
"""Computes the factorial of num."""
def isPalindrome(inputStr):... | <p>I <code>assert</code> what's absolutely essential.</p>
<p>Important: What's <em>absolutely</em> essential. Some people over-test things.</p>
<pre><code>def factorial(num):
assert int(num)
assert num > 0
</code></pre>
<p>Isn't completely correct. long is also a legal possibility.</p>
<pre><code>def f... |
Gantt Chart Controls on Windows Forms <p>We are evaluating options for a Gantt chart control (on Windows Forms) as opposed developing one on our own. What are the various Gantt Chart controls you have had experience with? Pros and cons?</p>
<p>Is it a viable idea to develop such a control from scratch (given that the ... | <p>I have not worked with the Gantt charts from Telerik, but many people are very happy with Telerik.
I would never consider creating my own Gantt chart except if i was in the business of selling user controls</p>
|
Difference between User Control and Custom Control? <p>What are the differences between User Control and Custom Control in ASP.NET</p>
| <p>AFAIK, user controls are controls that you can create out of existing controls and can be part of the project and have a designer surface for you to drag/drop.</p>
<p>Custom controls are generally external to the project & would require to be hand-coded (using various asp.net control events & html building ... |
How to change XML Attribute <p>How can I change an attribute of an element in an XML file, using C#?</p>
| <p>Mike;
Everytime I need to modify an XML document I work it this way:</p>
<pre><code>//Here is the variable with which you assign a new value to the attribute
string newValue = string.Empty;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlFile);
XmlNode node = xmlDoc.SelectSingleNode("Root/Node/Elemen... |
Securing certain parts of an application <p>If someone logs on to my application this user contains a dictionary with certain permissions.</p>
<pre><code>ex: module.view.workspace = true
module.view.reporting = false
...
</code></pre>
<p>Then we know to what parts of the application the user has access.
What ... | <p>Sem, </p>
<p>I have a similar method and it worked fine so far. My application is written in C#.NET but the method is still valid. Since mine is a WinForms application I have to do other stuff but basically there is at some point an If statement asking that very same "question".</p>
<p>Martin.</p>
|
Java GUI Creating Components <p>I hope it is correct term-wise to say that components in a GUI is like JButton, JPanel, JTextField, all that good stuff.</p>
<p>I want to create a text field that takes in an integer. Then a submit button can be pressed and based on the integer that was inputted, create that many textfi... | <p>Use an appropriate LayoutManager (e.g. GridLayout) to create and add your textfields.</p>
<pre><code>for (i = 0; i < numberOfTextFields; i++) {
JTextField textField = new JTextField();
container.add(textField);
/* also store textField somewhere else. */
}
</code></pre>
|
MSSQLServer 2008 in virtual pc <p>What are your experiences with running SQL server in a virtual pc?
Currently we have an sql2008 instance running in a virtual machine.
Both CPU's hit the roof the moment a query is executed.</p>
<p>what are your experiences and what do you suggest in this matter?</p>
| <p>I've had some serious performance issues using virtualised SQL servers for database heavy applications (ETL development). See <a href="http://stackoverflow.com/questions/149318/virtualized-sql-server-why-not#149381">this Stackoverflow post</a> for a run-down on my experiences and the outcomes of digging into the un... |
WPF - How do i insert my proxy credentials in WebBrowser Control <p>I'm using a <code>webbrowser</code> <code>control</code> in WPF to show a virtual earth map, but because I'm developing behind a <code>proxy</code> of my company, every time I try to see the map, I have to insert my credentials. </p>
<p>I would like ... | <p>Can you not just put the following in your app.config?</p>
<pre><code><configuration>
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true"></defaultProxy>
</system.net>
</configuration>
</code></pre>
|
mysql range index <p>I have very simple select like this:</p>
<pre><code>SELECT * FROM table
WHERE column1 IN (5, 20, 30);
</code></pre>
<p>on column1 is seted index, after explaining query is index used, all looks to be ok. </p>
<p>but if there are more than three values in range, like this:</p>
<pre><code> SE... | <p>How many rows does MySql think there are in the table?</p>
<p>Mysql often (usually correctly!) assumes it will be quicker to do a sequential scan of the rows, rather than mess around with the more complex access via an index.</p>
<p>It varies from DBMS to DBMS but the tradeoff point is somewhere about 30% of the r... |
Can I embed a win32 DLL in a .NET assembly, and make calls into it using P/Invoke? <p>I'm writing a C# wrapper for a third-party native library, which we have as a DLL. I would like to be able to distribute a single DLL for the new assembly. Is it possible for me to embed the win32 DLL in my .NET DLL, and still make ... | <p>Should work, if the native dll does not have any dependencies.</p>
<p>You can compile the dll in as embedded resource, than access the stream from inside your code, serialize it to the temporary folder and use it from there.</p>
<p>Too much to post example code here, but the way is not to complicated.</p>
|
Loop through PivotItems: runtime error 91 <p>I have a dataset in a worksheet that can be different every time. I am creating a pivottable from that data, but it is possible that one of the PivotItems is not there. For example:</p>
<pre><code>.PivotItems("Administratie").Visible = False
</code></pre>
<p>If that specif... | <p>I've got it! :D</p>
<pre><code>Dim Table As PivotTable
Dim FoundCell As Object
Dim All As Range
Dim PvI As PivotItem
Set All = Worksheets("Analyse").Range("A7:AZ10000")
Set Table = Worksheets("Analyse").PivotTables("tablename")
For Each PvI In Table.PivotFields("fieldname").PivotItems
Set Found... |
Finding an XmlNode by attribute in ASP.net <p>I'm trying to write some code to find a specific XmlNode object based on the URL in the XML sitemap but can't get it to find anything.</p>
<p>The sitemap is the standard ASP.net sitemap and contains:</p>
<pre><code><siteMapNode url="~/lev/index.aspx" title="Live-Eye-Vi... | <p>The site map has a default name space, but you do not refer to it.</p>
<pre><code><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/lev/index.aspx" title="Live-Eye-Views">
<!-- Child Items -->
</siteMapNode>
</siteMap>
</code></pre>
<p... |
Is there a way to prevent Reflector from being able to reflect my source code? <p>Is there a way (reliable and preferably not commercial) to prevent from Reflector to reflect my source code???</p>
<p>Thanks,
Adi</p>
| <p>No. Reflector looks at your assembly just like the .NET runtime would in order to generate native code to execute. The best you could hope for would be to <a href="http://stackoverflow.com/questions/2525/best-net-obfuscation-toolsstrategy">obfuscate</a> your code and make it (somewhat) harder for the reader to under... |
Disabling text selection in DocumentViewer <p>Simple question. How do you disable the text selection of DocumentViewer in WPF? This is the feature where an XPS document is displayed by the viewer and then text can be highlighted via mouse. The highlighted text can also be copied but I have already disabled this. I just... | <p>We have solved this by overriding the ControlTemplate of the ScrollViewer embedded in the DocumentViewer control. Insert the Style below in "Window.Resources":</p>
<pre><code><Style TargetType="{x:Type ScrollViewer}" x:Key="CustomScrollPresenter">
<Setter Property="Template">
<Setter.Val... |
what does it mean when a bug doesn't crash the program <p>Sometimes Eclipse comes up saying "hey you should debug this line!!!" but doesn't actually close the program. I can then continue to play big two, and even go through the same events that caused the error the first time and get another error box to pop up!</p>
... | <p>Programming mistakes can be categorized in these categories:</p>
<ol>
<li>Compile-time errors, which are caught by the compiler at the time of compilation and without correcting them, it's not possible to run the program at all.</li>
<li>Run-time errors, which are not caught by the compiler but put the computer in ... |
JavaScript Hashmap Equivalent <p>As made clear in update 3 on <a href="http://stackoverflow.com/questions/367440/javascript-associative-array-without-tostring-etc#367454">this answer</a>, this notation:</p>
<pre><code>var hash = {};
hash[X]
</code></pre>
<p>does not actually hash the object <code>X</code>; it actuall... | <p>Why not hash your objects yourself manually, and use the resulting strings as keys for a regular JavaScript dictionary? After all you are in the best position to know what makes your objects unique. That's what I do.</p>
<p>Example:</p>
<pre><code>var key = function(obj){
// some unique object-dependent key
re... |
Why does com.mysql.jdbc.Driver take forever to open in MATLAB? <p>I'm having an issue with com.mysql.jdbc.Driver in MATLAB and I'm hoping someone else has run into it and can help me out. Basically, my problem is that on one machine, every time I call <code>database('mysql.jdbc.Driver', ...)</code>, that call takes ap... | <p>It turns out this was some sort of networking / service issue. When I turned off some of the unneeded services (Wireless Zero Configuration among others), I went from a consistent 20 seconds to create the connection to a few milliseconds. I wish I had paid better attention to the services I changed, but hopefully ... |
Associate arbitrary data with ejb call context <p>I've got a bunch of stateless ejb 3.0 beans calling each other in chain.
Consider, BeanA.do(message) -> BeanB.do() -> BeanC.do() -> BeanD.do().
Now i'd like to access message data from BeanD.do(). Obvious solution is to pass message as a parameter to all that do() cal... | <p>i don't believe there is anything in the EJB spec that provides that functionality. If you are on a specific app server, you may be able to use app server specific stuff (i think JBoss allows you to add stuff to a call context). you also may be able to fake something up using JNDI.</p>
<p>personally, this seems (... |
How can I get this request structure via .asmx web service? <p>I am working on creating a .asmx webservice to meet the specific needs of an integration environment and for the life of me I cannot figure out how to get one section of it to work. The key is that the request WSDL needs to be something like the following.... | <p>If you have WSDL contract that needs to be implemented, you may try <code>wsdl.exe /serverInterface</code> to get service stub generated.</p>
|
Tool to show processes writing to the hard drive? <p>Is there a tool that will show me what applications are writing to the hard drive in real time? I'm thinking something like Task Manager but for I/O. I've got a number of background processes running, and can never tell when Visual Studio is holding everything up, or... | <p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">ProcMon</a> from Sysinternals/Microsoft.</p>
|
Removing scrollbars from Content Editor/Page Viewer Webpart <p>I am trying to display an HTML page inside another SharePoint webpart page.</p>
<p>I used the Out-of-the-box page viewer webpart, but the page viewer webpart displays a disabled scrollbar inside it.</p>
<p>I also tried using a content editor webpart with ... | <p>Use this on your stylesheet:</p>
<pre><code>#s4-workspace {
overflow-y: hidden !important;
overflow-x: hidden !important;
}
</code></pre>
|
How can I log *all* ColdFusion scripts and CFCs used? <p>I am looking to determine from a large code base, what files are actually being used over a period of time. I need to know about CFM pages and CFCs as well as any included CFM files etc. </p>
<p>I know I can get <em>some</em> of this info using logging in applic... | <p>Hmmm, I think you'll need to turn on debugging and create a custom debug template.</p>
<p>The debug templates are in: [coldfusiondir]/wwwroot/WEB-INF/debug</p>
<p>Have a look at the code which <code>classic.cfm</code> uses to display Templates to screen, and then create some similar code which logs each template r... |
What .NET functions should be better supported in Mono? <p>I'm trying to implement a Visual Studio Addin to support cross-platform development. The addon currently only warns developer when using unsupported functions but I also want to implement a feature that informs him about functions that are implemented but produ... | <p>Mono provides a utility to analyze application binary and check for mono support called Mono Migration Analyzer. You can probably read the source code to understand more about less supported features. You can even directly use run this tool with your add in and process the results.</p>
|
Search engines and browser accept-language <p>I'm building a web portal where language content will generally depend on the "accept-language" sent by the browser. The same content-URI will thus serve different content to different users depending on their browser setting.</p>
<p>I'm very curious to know how this will ... | <p>They don't send accept-language, so the site will be indexed in the default language that you select.</p>
<p>I recommend you to have different URL for each language, not only for the search engines, but for letting the user change the site language without changing the "accept-language" and letting the user to send... |
Some (anti-)patterns on using assert (Java, and others) <p>Finally, I have a question to ask on Stack Overflow! :-)</p>
<p>The main target is for Java but I believe it is mostly language agnostic: if you don't have native assert, you can always simulate it.</p>
<p>I work for a company selling a suite of softwares wri... | <p>The number one rule is to avoid side-effects in assertions. In other words, the code should behave identically with assertions turned off as it does when assertions are turned on and not failing (obviously assertions that fail are going to alter the behaviour because they will raise an error).</p>
<p>The number tw... |
Dynamic Graph Filtering <p>I am working on a graph in WPF, in each section there are thousands of points to draw. The performance for rendering this graph is horrible. </p>
<p>Does anyone have any experience with a filter that will represent the graph with much fewer points - similar to the way a stock graph draws its... | <p>When you talk about a graph, I'm assuming you mean as in a chart rather than lots of nodes and edges (hence the stock example).</p>
<p>So, assuming that's the case, here are a couple of webpages covering algorithms for simplifying polylines:</p>
<p><a href="http://www.kevlindev.com/tutorials/geometry/simplify_poly... |
Best way to quickly determine whether a user account is a member of an AD group? <p>I currently have some code that pulls down a list of users in a group and then iterates through that group to determine if a given account exists, but it seems like there ought to be a more concise (and perhaps faster) way to accomplish... | <p>If you are on .NET 3.5 stack, <a href="http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.aspx">System.DirectoryServices.AccountManagement.dll assembly</a> has a nice API on top of AD. The following method can be implemented to solve your issue:</p>
<pre><code>static bool IsUserMembe... |
When to separate certain entities into different repositories? <p>I generally try and keep all related entities in the same repository. The following are entities that have a relationship between the two (marked with indentation):</p>
<ul>
<li>User
<ul>
<li>UserPreference</li>
</ul></li>
</ul>
<p>So they make sense t... | <p>In the Eric Evan's Domain Driven Design ( <a href="http://domaindrivendesign.org/index.htm" rel="nofollow">http://domaindrivendesign.org/index.htm</a> ) sense of things you should first think about what about your Aggregates. You then build you repositories around those.</p>
<p>There are many techniques for handlin... |
Passing a Python array to a C++ vector using Swig <p>I have an array of objects in Python </p>
<pre><code>[obj1, obj2, obj3]
</code></pre>
<p>and I want to pass them to off to a C++ function to perform some computation. I'm using SWIG to write my interface. The class type of the passed object is already defined in C+... | <p>It depends on if your function is already written and cannot be changed, in which case you may need to check Swig docs to see if there is already a typemap from PyList to std::vector (I think there is). If not, taking PyObject* as the argument to the function and using the Python C API for manipulating lists should... |
Reading an Oracle Lite ODB file without Oracle Lite <p>Is there a way to extract the data from an Oracle Lite ODB file without installing Oracle Lite? Is there a reader out there which will let me browse and copy the data?</p>
| <p>You should be able to export the data using the OLLOAD utility, which is part of, but should not require the installation of, Oracle Lite.</p>
<p><a href="http://download.oracle.com/docs/cd/E12095_01/doc.10302/e12548/cdbtools.htm#BABIIJGF" rel="nofollow">OLLOAD Documentation</a></p>
|
Monitoring load on ASP.NET Application <p>I am looking for ways to keep track of simultaneous users within an application. I cannot use IIS logs due to a load balancer that abstracts the users IP address. I am looking for a .NET code based solution or a configuration item, possibly with health monitoring to be able t... | <p>There is a similiar question here: <a href="http://stackoverflow.com/questions/259105/tools-and-methods-for-live-monitoring-aspnet-web-applications">Tools and methods for live-monitoring ASP.NET web applications?</a></p>
<p>I found an advanced logging tool for debugging and monitoring .NET applications: <a href="ht... |
iFrame causes scriptaculous dragging issues in IE7 (full code included)? <p>When I drag a link that is inside a draggable div over an iframe in IE7, I get very strange results. Try the code below and let me know if you have any suggestions about how to fix this.</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XH... | <p>I found the only way to handle this gracefully was to place a full size div, with transparency = 1% over the iframe, then drag my content over top of it.</p>
<p>PS the dragging issue is in IE6 and IE8 too.</p>
|
Why does mx:states have trouble being resolved to a component implementation? <p>Every now and then I get an error when I set up states in an MXML file. The error I get says that mx:states could not be resolved to a component implementation.</p>
<p>I read, at the following url, that this issue is caused by extending ... | <p>If you have a custom component, you'll probably have it in a namespace other than <em>mx</em>. You're on the right track by removing the namespace, but you don't have to do that. Consider the following example</p>
<pre><code><example:MyComponent xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:example="com.ex... |
How to make php5 on a machine running php4, without breaking anything <p>I know with python and a couple other languages there is a way to safely make install a newer generational version of a language onto a machine, but after digging through PHP5's configure & makefile the only thing I've seen is the prefix dir o... | <p>Here's a pretty detailed explanation on how to do this on Gentoo with some tips to watch out for.</p>
<p><a href="http://www.gentoo.org/proj/en/php/php4-php5-configuration.xml" rel="nofollow">link text</a></p>
<p>And here's another one for good measure</p>
<p><a href="http://www.howtoforge.com/apache2_with_php5_a... |
If I wanted to work using dates and time going millions of years into the past/future how would I do it? <p>If I wanted to work using dates and time going millions of years into the past/future how would I do it in C/C++/C#? </p>
<p>For example say I was working on an algorithm to see if a comet was going to hit the e... | <p>Astronomers use their own calendar, different from the civil, Gregorian calendar.</p>
<p><a href="http://scienceworld.wolfram.com/astronomy/JulianDate.html" rel="nofollow">Astronomical Julian Dates</a> are what they use.</p>
<p>Look at <a href="http://en.wikipedia.org/wiki/Julian_day" rel="nofollow">http://en.wiki... |
Why should you not use Number as a constructor? <p>I entered this statement in JSLint:</p>
<pre><code>var number = new Number(3);
</code></pre>
<p>And received the following message:</p>
<blockquote>
<p>Do not use Number as a constructor.</p>
</blockquote>
<p>Why is that? The statement is creating a number object... | <p>In addition to breaking === and typeof returning "object", using the Number constructor also changes the way the value is used in boolean contexts. Since "new Number(0)" is an object, not a literal value, it evaluates as "true" because it is not null. So for example:</p>
<pre><code>var n1 = 0;
var n2 = new Number(0... |
What is the best way to serialize a ModelForm object in Django? <p>I am using Django and the Google Web Toolkit (GWT) for my current project. I would like to pass a ModelForm instance to GWT via an Http response so that I can "chop" it up and render it as I please. My goal is to keep the form in sync with changes to my... | <p>If you were using pure Django, you'd pass the form to your template, and could then call individual fields on the form for more precise rendering, rather than using ModelForm.to_table. You can use the following to iterate over each field and render it exactly how you want:</p>
<pre><code>{% for field in form.field... |
Flex: invalidateData <p>I've trouble getting my components to update when the params has changed:</p>
<pre><code>package mycompany
{
import flash.events.Event;
import mx.events.SliderEvent;
import mx.controls.HSlider;
import mx.controls.sliderClasses.Slider;
public class FromToSlider extends HSli... | <p>Add a call to invalidateDisplayList() after invalidateProperties(). That will ensure that Flex redraws the component on the next keyframe.</p>
<p>You should also add the same to the 'set to()' function.</p>
|
How do I map a hibernate Timestamp to a MySQL BIGINT? <p>I am using Hibernate 3.x, MySQL 4.1.20 with Java 1.6. I am mapping a Hibernate Timestamp to a MySQL TIMESTAMP. So far so good. The problem is that MySQL stores the TIMESTAMP in seconds and discards the milliseconds and I now need millisecond precision. I figure... | <p>Also, look at creating a custom Hibernate Type implementation. Something along the lines of (psuedocode as I don't have a handy environment to make it bulletproof):</p>
<pre><code>public class CalendarBigIntType extends org.hibernate.type.CalendarType {
public Object get(ResultSet rs, String name) {
ret... |
Manipulate a file in code (VB.NET) without executing the file's macros <p>I have an Excel file that has a bunch of VBA and macro code in it. When I open the file in Excel I can choose not to 'enable' them - so the values in the fields all stay as they were during the last save. I need to manipulate the values as they... | <pre><code>Application.AutomationSecurity = msoAutomationSecurity.msoAutomationSecurityForceDisable
</code></pre>
<p>Try opening the workbook after this statement.
I think, this will disable macros at Application Level (not at workbook level)</p>
<p>Hope that helps.</p>
|
VS2005: How to not have VS try to parse text file resources as html? <p>I have included a resource in my Visual Studio 2005 solution that was a file on the hard drive. It is a text file, that contains text, and has a <strong>.htm</strong> extension.</p>
<p>For months it worked fine, until I wanted to edit the contents... | <p>This obviously begs the question â why do you use a wrong file extension on a system, where file type is determined by these extensions?</p>
<p>Sorry, the answer is of course wrong. I was pretty sure I had done it that way already. Still, I think the above comment is still valid, even if not applicable universall... |
Example of setting up a name entry box for high score submission on iPhone? <p>Does anyone have an example of setting up a text field where users can enter their name and/or email address to submit it online to a high score database? I would like to have
it be similar to the form that pops up when you attempt to down... | <p>This will show the dialog, but I am unsure how to make it responsive:</p>
<pre><code>[dialog setDelegate:self];
[dialog setTitle:@"Enter Name"];
[dialog addButtonWithTitle:@"Cancel"];
[dialog addButtonWithTitle:@"OK"];
UITextField * nameField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)]... |
java append to file <p>I googled for this for a while but can't seem to find it and it should be easy. I want to append a CR to then end of an XML file that I am creating with a Transformer. Is there a way to do this></p>
<p>I tried the following but this resulted in a blank file?</p>
<pre><code>
Transformer xformer ... | <p>Simple... just add the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.io.File,%20boolean)">append</a> option:</p>
<pre><code> new FileOutputStream(f, true /* append */);
</code></pre>
|
How to create a form on its own thread and keep it open throughout application lifetime <p>I am creating a little testing component and am running into a problem</p>
<p>Basically the component is a decorator on a class that controls all access to the database, it creates a form with a two buttons on it: "Simulate Lost... | <p>You will need to start a message loop on the newly created thread. You can do that by calling Application.Run(form).</p>
|
How can I run Perl scripts using FastCGI on Nginx? <p>So I am following this guide: <a href="http://technotes.1000lines.net/?p=23">http://technotes.1000lines.net/?p=23</a> and I am going through the steps. I have a VPN (slicehost.com) with Debian Etch, serving a website (static so far) with nginx. I used wget to downlo... | <p>The webserver needs a Unix domain socket to connect to the FastCGI application, but the socket can't be created. Most likely the directory you want it to be in doesn't exist (because they are automatically created when you do a <code>bind</code>).</p>
|
How do I programmatically open a MS Word document without invoking the Document_Open macro <p>I am trying to use Office Automation to open a word document. The problem is that I would like to open it without invoking the Document_Open macro. Is there a way to do this?</p>
<p>The relevant line below is wordApp.Docume... | <p>The accepted answer here may be of use:</p>
<p><a href="http://stackoverflow.com/questions/369510/manipulate-a-file-in-code-vbnet-without-executing-the-files-macros#369583">http://stackoverflow.com/questions/369510/manipulate-a-file-in-code-vbnet-without-executing-the-files-macros#369583</a></p>
|
Simple Interpreted Language Design & Implementation <p>I need some resources for implementing a simple virtual machine and interpreted language. Something that is pratical is most useful. I have read the Virtual Machine Implementation book and found that it is quite old and doesn't represent the vms I see today. Als... | <p>check <a href="http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/jucs05.pdf" rel="nofollow">The implementation of Lua 5.0</a></p>
|
Is it possible to customize error display in powershell? <p>I find the standard Powershell display of errors (red text, multi-line display) a bit distracting. Is it possible to customize this?</p>
| <p>Yes and yes.</p>
<p>You can use the built-in <code>$host</code> object if all you want to do is change the text color. However, you can't change the error message itself - that's hardcoded.</p>
<p>What you could do is (a) suppress the error messages, and instead (b) trap the errors and display your own.</p>
<p>Ac... |
Measuring Response Times In Combination With WatiN <p>I'm looking for a tool that I could potentially use in combination with <a href="http://watin.sourceforge.net/" rel="nofollow">WatiN</a> that would allow me to more or less measure both the response time of an interaction and also the filesize of the same interactio... | <p>Check out <a href="http://www.httpwatch.com/" rel="nofollow">HttpWatch</a>: <br>
"HttpWatch is an HTTP viewer and debugger that integrates with IE and Firefox to provide seamless HTTP and HTTPS monitoring without leaving the browser window." <br>
There is an article on the website called <a href="http://blog.httpwat... |
Why git can't remember my passphrase under Windows <p>I have just start using git and i can't get it to remember my passphrase I'm using cmd.exe elevated and my git host is github and i have create a ssh key like that guide on github</p>
<p>but i still get </p>
<pre><code>*\subnus.mvc>git push origin master
Enter... | <p>I realize that this question is coming up on two years old, but I had the same issue and several answers here did not completely answer the question for me. Here is two step-by-step solutions, depending on whether you use TortoiseGit in addition to msysgit or not.</p>
<p><strong>First solution</strong> Assumes Wind... |
How can I include css files from an MVC partial control? <p>I'm using ASP.NET MVC and I have a partial control that needs a particular CSS & JS file included. Is there a way to make the parent page render the <code>script</code> and <code>link</code> tags in the 'head' section of the page, rather than just renderi... | <p>If I have requirements for CSS/Javascript in a partial view, I simply make sure that any page that may include the partial view, either directly or as content retrieved from AJAX, has the CSS/Javascript included in it's headers. If the page has a master page, I add a content placeholder in the master page header an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.