qid
int64
4
8.14M
question
stringlengths
20
48.3k
answers
list
date
stringlengths
10
10
metadata
list
input
stringlengths
12
45k
output
stringlengths
2
31.8k
198,526
<p>How do I determine if the currency symbol is supposed to be on the left or right of a number using CFLocale / CFNumberFormatter in a Mac Carbon project?</p> <p>I need to interface with a spreadsheet application which requires me to pass a number, currency symbol, currency symbol location and padding instead of a CS...
[ { "answer_id": 200245, "author": "Hans Martin Kern", "author_id": 27559, "author_profile": "https://Stackoverflow.com/users/27559", "pm_score": 2, "selected": false, "text": "<p>As a workaround, I have started to create a string representing a currency value and determining the position ...
2008/10/13
[ "https://Stackoverflow.com/questions/198526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27559/" ]
How do I determine if the currency symbol is supposed to be on the left or right of a number using CFLocale / CFNumberFormatter in a Mac Carbon project? I need to interface with a spreadsheet application which requires me to pass a number, currency symbol, currency symbol location and padding instead of a CStringRef c...
As a workaround, I have started to create a string representing a currency value and determining the position of the currency symbol by searching the string, but this sure looks fishy to me. ``` CFNumberFormatterRef numberFormatter = CFNumberFormatterCreate(kCFAllocatorDefault, CFLocaleCopyCurrent(), kCFNumberForm...
198,532
<p>In <code>.NET</code> (at least in the 2008 version, and maybe in 2005 as well), changing the <code>BackColor</code> property of a <code>DateTimePicker</code> has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calendar?</p> <p><strong><em>Edit:</em...
[ { "answer_id": 199278, "author": "Vivek", "author_id": 7418, "author_profile": "https://Stackoverflow.com/users/7418", "pm_score": 5, "selected": true, "text": "<p>According to <a href=\"http://msdn.microsoft.com/en-us/library/0625h0ta.aspx\" rel=\"nofollow noreferrer\">MSDN</a> : </p>\n...
2008/10/13
[ "https://Stackoverflow.com/questions/198532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27302/" ]
In `.NET` (at least in the 2008 version, and maybe in 2005 as well), changing the `BackColor` property of a `DateTimePicker` has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calendar? ***Edit:*** I was talking about Windows forms, not ASP.
According to [MSDN](http://msdn.microsoft.com/en-us/library/0625h0ta.aspx) : > > Setting the `BackColor` has no effect on > the appearance of the `DateTimePicker`. > > > You need to write a custom control that extends `DateTimePicker`. Override the `BackColor` property and the `WndProc` method. Whenever you c...
198,535
<p>I have small page which has label, DropDownList and a submit button.</p> <pre><code>&lt;div&gt; &lt;asp:label id=&quot;Message&quot; runat=&quot;server&quot;/&gt; &lt;br /&gt; Which city do you wish to look at on hotels for?&lt;br /&gt;&lt;br /&gt; &lt;asp:dropdownlist id=&quot;Dropdownli...
[ { "answer_id": 198547, "author": "tpower", "author_id": 18107, "author_profile": "https://Stackoverflow.com/users/18107", "pm_score": 0, "selected": false, "text": "<p>Maybe the page is being cached when in a virtual directory.</p>\n\n<p>Try adding this to the Page_Load</p>\n\n<pre><code...
2008/10/13
[ "https://Stackoverflow.com/questions/198535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245/" ]
I have small page which has label, DropDownList and a submit button. ``` <div> <asp:label id="Message" runat="server"/> <br /> Which city do you wish to look at on hotels for?<br /><br /> <asp:dropdownlist id="Dropdownlist1" runat="server" EnableViewState="true"> </asp:dropdownlist>...
It sounds like you may have EnableViewState disabled at the page level. Contrary to the other responses, you don't need to repopulate your lists on PostBack if ViewState is enabled. Try adding the EnableViewState="true" attribute in your page header. I think it is a bug. If EnableViewState="false" at the page level, ...
198,543
<p>I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke (<kbd>Alt</kbd> + <kbd>Down</kbd>) emulate clicking the button. In order to avoid writing this over and over, I want to make a generic KeyUp event handler that will r...
[ { "answer_id": 198584, "author": "torial", "author_id": 13990, "author_profile": "https://Stackoverflow.com/users/13990", "pm_score": 3, "selected": false, "text": "<p>From <em><a href=\"http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/44b0d573-5c53-47b0-8e85-6056cbae95b0/\"...
2008/10/13
[ "https://Stackoverflow.com/questions/198543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/549/" ]
I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke (`Alt` + `Down`) emulate clicking the button. In order to avoid writing this over and over, I want to make a generic KeyUp event handler that will raise the ButtonClick ...
Here's a demo using generics (error checks omitted): ``` using System; using System.Reflection; static class Program { private class Sub { public event EventHandler<EventArgs> SomethingHappening; } internal static void Raise<TEventArgs>(this object source, string eventName, TEventArgs eventArgs) where TEvent...
198,564
<p>I have apache web server installed as frontend and I have j2ee SAP Netweaver Application Server installed in Intranet server. How can I configure apache to forward requests and response to/from j2ee app server. for example, external apache server's ip is 9.20.1.1:80. internal sap server's address is 192.168.0.1/sap...
[ { "answer_id": 198611, "author": "Mark Roddy", "author_id": 9940, "author_profile": "https://Stackoverflow.com/users/9940", "pm_score": 1, "selected": false, "text": "<p>Assuming you have mod_proxy enabled, add to you're sites-available:</p>\n\n<pre><code> ProxyRequests Off\n &lt;Loc...
2008/10/13
[ "https://Stackoverflow.com/questions/198564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27563/" ]
I have apache web server installed as frontend and I have j2ee SAP Netweaver Application Server installed in Intranet server. How can I configure apache to forward requests and response to/from j2ee app server. for example, external apache server's ip is 9.20.1.1:80. internal sap server's address is 192.168.0.1/sap/bc...
You mentioned load balancing- so presumably you want to be able to add more Application Servers that are served through a single address. I hope they are stateless or storing session information in a database. You can use Apache to serve as a reverse proxy load balancer with `mod_proxy_balancer`. Docs are [here](http:/...
198,577
<p>Is there any real practical difference between "java -server" and "java -client"? </p> <p>All I can find on Sun's site is a vague </p> <blockquote> <p>"-server starts slower but should run faster". </p> </blockquote> <p>What are the real differences? (Using JDK 1.6.0_07 currently.)</p>
[ { "answer_id": 198598, "author": "Brian Knoblauch", "author_id": 15689, "author_profile": "https://Stackoverflow.com/users/15689", "pm_score": 2, "selected": false, "text": "<p>I've not noticed any difference in startup time between the 2, but clocked a very minimal improvement in applic...
2008/10/13
[ "https://Stackoverflow.com/questions/198577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3333/" ]
Is there any real practical difference between "java -server" and "java -client"? All I can find on Sun's site is a vague > > "-server starts slower but should run faster". > > > What are the real differences? (Using JDK 1.6.0\_07 currently.)
This is really linked to *HotSpot* and the default *option values* ([Java HotSpot VM Options](http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html)) which differ between client and server configuration. From [Chapter 2](http://www.oracle.com/technetwork/java/whitepaper-135217.html#2) of the whi...
198,580
<p>What are optimal settings for Recycling of Application Pools in IIS7 in a shared environment?</p> <p><img src="https://i.stack.imgur.com/RNQo8.png" alt="enter image description here"></p>
[ { "answer_id": 198586, "author": "Daniel Silveira", "author_id": 1100, "author_profile": "https://Stackoverflow.com/users/1100", "pm_score": 2, "selected": false, "text": "<p>Tip: When you recycle your app, all your session variables are destroyed... so caution on this!</p>\n\n<p>IMHO, k...
2008/10/13
[ "https://Stackoverflow.com/questions/198580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23280/" ]
What are optimal settings for Recycling of Application Pools in IIS7 in a shared environment? ![enter image description here](https://i.stack.imgur.com/RNQo8.png)
As a Hoster, you definitely want to recycle on Memory & Time, potentially Request limits and CPU. You want to be pretty aggressive about these limits, but make sure you publish them to your clients. [**Memory**](https://technet.microsoft.com/en-us/library/cc725749(v=ws.10).aspx) - 512 for an x86 box, maybe 768. For x6...
198,606
<p>I typically use URL rewriting to pass content IDs to my website, so this</p> <pre><code> Foo.1.aspx </code></pre> <p>rewrites to</p> <pre><code> Foo.aspx?id=1 </code></pre> <p>For a specific application I need to pass in multiple IDs to a single page, so I've rewritten things to accept this:</p> <pre><code> Fo...
[ { "answer_id": 198617, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "<p>The right way to <em>accept</em> multiple ids is like this:</p>\n\n<pre><code>Foo.aspx?id=1;id=2;id=3;id=4;id=5\n</...
2008/10/13
[ "https://Stackoverflow.com/questions/198606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/239663/" ]
I typically use URL rewriting to pass content IDs to my website, so this ``` Foo.1.aspx ``` rewrites to ``` Foo.aspx?id=1 ``` For a specific application I need to pass in multiple IDs to a single page, so I've rewritten things to accept this: ``` Foo.1,2,3,4,5.aspx ``` This works fine in Cassini (the built...
I recall that Url Routing by default first checks to see if the file exists, and commas are not legal in filenames, which is parhaps why you are getting errors. IIS may have legacy code that aborts the request before it can get to asp.net for processing. Scott Hanselman's [blog post](http://www.hanselman.com/blog/Plu...
198,623
<p>I haven't really done any Windows scripting at all, so I am at a loss on how to pull this one off. Anyway, basically what we want to do is have a script that will take an argument on which IIS AppPool to recycle. I have done some research on Google and haven't had much success on getting things to work.</p> <p>He...
[ { "answer_id": 198760, "author": "Scott Saad", "author_id": 4916, "author_profile": "https://Stackoverflow.com/users/4916", "pm_score": 4, "selected": false, "text": "<p><strong>Where-Object</strong> is a filter that expects something as in input. There seems to be a missing <strong>pipe...
2008/10/13
[ "https://Stackoverflow.com/questions/198623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
I haven't really done any Windows scripting at all, so I am at a loss on how to pull this one off. Anyway, basically what we want to do is have a script that will take an argument on which IIS AppPool to recycle. I have done some research on Google and haven't had much success on getting things to work. Here is what I...
**Where-Object** is a filter that expects something as in input. There seems to be a missing **pipe**, before the *where filter*. Try: ``` $appPoolName = $args[0] $appPool = get-wmiobject -namespace "root\MicrosoftIISv2" -class "IIsApplicationPool" | Where-Object {$_.Name -eq "W3SVC/APPPOOLS/$appPoolName"} $appPool....
198,625
<p>Does anyone know if it is possible to reliably determine (programattically C/C++...) whether or not a firewall or IP filtering software is installed on a Windows PC? I need to detect whether a certain server IP is being blocked in my client software by the host OS.</p> <p>I don't need to worry about external hardw...
[ { "answer_id": 198644, "author": "Mark Roddy", "author_id": 9940, "author_profile": "https://Stackoverflow.com/users/9940", "pm_score": 0, "selected": false, "text": "<p>You'd have to translate from C#, but this blog post explains how to check if the Windows firewall is enabled:\n<a href...
2008/10/13
[ "https://Stackoverflow.com/questions/198625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10446/" ]
Does anyone know if it is possible to reliably determine (programattically C/C++...) whether or not a firewall or IP filtering software is installed on a Windows PC? I need to detect whether a certain server IP is being blocked in my client software by the host OS. I don't need to worry about external hardware firewal...
After reading some of your comments in reply to other answers, I think this might actually be closer to what you're looking for. It might not catch every type of firewall but any major firewall vendor should be registered with the Security Center and therefore detected with this method. You could also combine this with...
198,650
<p>In asp.net, you can retrieve MULTIPLE datatables from a single call to the database. Can you do the same thing in php?</p> <p>Example:</p> <pre><code>$sql ="select * from t1; select * from t2;"; $result = SomeQueryFunc($sql); print_r($result[0]); // dump results for t1 print_r($result[1]); // dump results for t2 ...
[ { "answer_id": 198665, "author": "gnud", "author_id": 27204, "author_profile": "https://Stackoverflow.com/users/27204", "pm_score": 0, "selected": false, "text": "<p>This should be possible with newer MySQL and the mysqli (improved) php extension.\nI'm not sure if any DB abstraction laye...
2008/10/13
[ "https://Stackoverflow.com/questions/198650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27305/" ]
In asp.net, you can retrieve MULTIPLE datatables from a single call to the database. Can you do the same thing in php? Example: ``` $sql ="select * from t1; select * from t2;"; $result = SomeQueryFunc($sql); print_r($result[0]); // dump results for t1 print_r($result[1]); // dump results for t2 ``` Can you do somet...
This is called "multi-query." The mysql extension in PHP does not have any means to enable multi-query. The mysqli extension does allow you to use multi-query, but only through the multi\_query() method. See <http://php.net/manual/en/mysqli.multi-query.php> Using multi-query is not recommended, because it can increase...
198,656
<p>I creating a control for WPF, and I have a question for you WPF gurus out there.</p> <p>I want my control to be able to expand to fit a resizable window. </p> <p>In my control, I have a list box that I want to expand with the window. I also have other controls around the list box (buttons, text, etc).</p> <p>I wa...
[ { "answer_id": 198688, "author": "Bob King", "author_id": 6897, "author_profile": "https://Stackoverflow.com/users/6897", "pm_score": 0, "selected": false, "text": "<p>While I wouldn't recommend creating a UI that requires outer scroll bars you can accomplish this pretty easily:</p>\n\n<...
2008/10/13
[ "https://Stackoverflow.com/questions/198656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I creating a control for WPF, and I have a question for you WPF gurus out there. I want my control to be able to expand to fit a resizable window. In my control, I have a list box that I want to expand with the window. I also have other controls around the list box (buttons, text, etc). I want to be able to set a m...
I've created a class to work around this problem: ``` public class RestrictDesiredSize : Decorator { Size lastArrangeSize = new Size(double.PositiveInfinity, double.PositiveInfinity); protected override Size MeasureOverride(Size constraint) { Debug.WriteLine("Measure: " + constraint); base...
198,668
<p>I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file:</p> <pre><code>&lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; &lt;qualifyAssembly partialName="MyAssem...
[ { "answer_id": 198688, "author": "Bob King", "author_id": 6897, "author_profile": "https://Stackoverflow.com/users/6897", "pm_score": 0, "selected": false, "text": "<p>While I wouldn't recommend creating a UI that requires outer scroll bars you can accomplish this pretty easily:</p>\n\n<...
2008/10/13
[ "https://Stackoverflow.com/questions/198668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27578/" ]
I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file: ``` <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="MyAssembly" full...
I've created a class to work around this problem: ``` public class RestrictDesiredSize : Decorator { Size lastArrangeSize = new Size(double.PositiveInfinity, double.PositiveInfinity); protected override Size MeasureOverride(Size constraint) { Debug.WriteLine("Measure: " + constraint); base...
198,670
<p>Thanks for reading. I'm a bit new to jQuery, and am trying to make a script I can include in all my websites to solve a problem that always drives me crazy...</p> <p>The problem: Select boxes with long options get cut off in Internet Explorer. For example, these select boxes: <a href="http://discoverfire.com/test/s...
[ { "answer_id": 198901, "author": "msmithstubbs", "author_id": 27606, "author_profile": "https://Stackoverflow.com/users/27606", "pm_score": 5, "selected": true, "text": "<p>To modify each select, try this:</p>\n\n<pre><code>$('select').each(function(){\n\n $('option', this).each(functio...
2008/10/13
[ "https://Stackoverflow.com/questions/198670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27580/" ]
Thanks for reading. I'm a bit new to jQuery, and am trying to make a script I can include in all my websites to solve a problem that always drives me crazy... The problem: Select boxes with long options get cut off in Internet Explorer. For example, these select boxes: <http://discoverfire.com/test/select.php> In Fir...
To modify each select, try this: ``` $('select').each(function(){ $('option', this).each(function() { // your normalizing script here }) }); ``` The second parameter (this) on the second jQuery call scopes the selecter ('option'), so it is essentially 'all option elements within this select'. You can thin...
198,679
<p>Given an <code>InputStream</code> called <code>in</code> which contains audio data in a compressed format (such as MP3 or OGG), I wish to create a <code>byte</code> array containing a WAV conversion of the input data. Unfortunately, if you try to do this, JavaSound hands you the following error:</p> <pre><code>java...
[ { "answer_id": 198807, "author": "Simon Lehmann", "author_id": 27011, "author_profile": "https://Stackoverflow.com/users/27011", "pm_score": 4, "selected": true, "text": "<p>The problem is that the most AudioFileWriters need to know the file size in advance if writing to an OutputStream....
2008/10/13
[ "https://Stackoverflow.com/questions/198679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4287/" ]
Given an `InputStream` called `in` which contains audio data in a compressed format (such as MP3 or OGG), I wish to create a `byte` array containing a WAV conversion of the input data. Unfortunately, if you try to do this, JavaSound hands you the following error: ``` java.io.IOException: stream length not specified `...
The problem is that the most AudioFileWriters need to know the file size in advance if writing to an OutputStream. Because you can't provide this, it always fails. Unfortunatly, the default Java sound API implementation doesn't have any alternatives. But you can try using the AudioOutputStream architecture from the Tr...
198,691
<p>I'm working on a solution that contains multiple projects targeting Windows Mobile 5 and standard Windows applications.</p> <p>Lately when opening up a form in designer the common UI controls (textbox, button, label, etc etc...) have vanished leaving only the controls defined within the project.</p> <p>Resetting t...
[ { "answer_id": 199273, "author": "justin.m.chase", "author_id": 12958, "author_profile": "https://Stackoverflow.com/users/12958", "pm_score": 1, "selected": false, "text": "<p>I've noticed this exact same thing for regular WinForms as well. I can't speak to mobile applications but in reg...
2008/10/13
[ "https://Stackoverflow.com/questions/198691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm working on a solution that contains multiple projects targeting Windows Mobile 5 and standard Windows applications. Lately when opening up a form in designer the common UI controls (textbox, button, label, etc etc...) have vanished leaving only the controls defined within the project. Resetting the toolbox has no...
I just had a similiar problem. In a managed C++ project all the default toolbox items disappeared form the winforms designer. After playing around for a while I found that there was a problem in the .vcproj file. ``` <VisualStudioProject ProjectType="Visual C++" Version="9,00" Name="COLLADA Import" Pro...
198,705
<p>In my <a href="http://www.codeplex.com/MEF" rel="nofollow noreferrer">MEF</a> usage, I have a bunch of imports that I want to make available in many other parts of my code. Something like:</p> <pre><code>[Export (typeof (IBarProvider))] class MyBarFactory : IBarPovider { [Import] public IFoo1Service IFoo1Se...
[ { "answer_id": 198708, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "https://Stackoverflow.com/users/5314", "pm_score": 0, "selected": false, "text": "<p>I thought about making an interface to provide these services:</p>\n\n<pre><code>partial class BarImplementation\n{\n ...
2008/10/13
[ "https://Stackoverflow.com/questions/198705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5314/" ]
In my [MEF](http://www.codeplex.com/MEF) usage, I have a bunch of imports that I want to make available in many other parts of my code. Something like: ``` [Export (typeof (IBarProvider))] class MyBarFactory : IBarPovider { [Import] public IFoo1Service IFoo1Service { get; set; } [Import] public IFoo2S...
I'm not entirely sure this answers your question but have you considered using the constructor injection yet? ``` class BarImplementation : IBar { [ImportingConstructor] public BarImplementation(IFoo1Service foo1, IFoo2Service foo2, ...) { } } ``` By marking your constructor with the ImportingConstructor att...
198,707
<p>As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed.</p> <p>KeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control.</p> <p>My first attempt was just to consider the KeyC...
[ { "answer_id": 198736, "author": "gnud", "author_id": 27204, "author_profile": "https://Stackoverflow.com/users/27204", "pm_score": 0, "selected": false, "text": "<p>Have a look at System.Text.Encoding.ASCII and System.Text.Encoding.Default</p>\n" }, { "answer_id": 198804, "a...
2008/10/13
[ "https://Stackoverflow.com/questions/198707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9328/" ]
As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed. KeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control. My first attempt was just to consider the KeyCode to be the asc...
Many controls override the default key input events. For instance, a Panel won't respond to them by default at all. As for the case of simple controls, you could try: ``` protected override bool IsInputKey(Keys keyData) { // This snippet informs .Net that arrow keys should be processed in the panel (which is stran...
198,716
<p>I need to pivot one column (Numbers column). example need this data:</p> <pre><code>a 1 a 2 b 3 b 4 c 5 d 6 d 7 d 8 d 9 e 10 e 11 e 12 e 13 e 14 </code></pre> <p>Look like this</p> <pre><code>a 1 2 b 3 4 c 5 d 6 7 8 9 e 10 11 12 13 14 </code></pre> <p>any help would be greatly appreciated...</p>
[ { "answer_id": 198879, "author": "Booji Boy", "author_id": 1433, "author_profile": "https://Stackoverflow.com/users/1433", "pm_score": 1, "selected": false, "text": "<p>This related question should have the answer you need: <a href=\"https://stackoverflow.com/questions/24470/sql-server-p...
2008/10/13
[ "https://Stackoverflow.com/questions/198716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27585/" ]
I need to pivot one column (Numbers column). example need this data: ``` a 1 a 2 b 3 b 4 c 5 d 6 d 7 d 8 d 9 e 10 e 11 e 12 e 13 e 14 ``` Look like this ``` a 1 2 b 3 4 c 5 d 6 7 8 9 e 10 11 12 13 14 ``` any help would be greatly appreciated...
Using `ROW_NUMBER()`, `PIVOT` and some dynamic SQL (but no cursor necessary) : ``` CREATE TABLE [dbo].[stackoverflow_198716]( [code] [varchar](1) NOT NULL, [number] [int] NOT NULL ) ON [PRIMARY] DECLARE @sql AS varchar(max) DECLARE @pivot_list AS varchar(max) -- Leave NULL for COALESCE technique DECLARE @sele...
198,717
<p>Ok, so I'm building bread crumbs and depending on the value of the breadcrumb an image will be the seperator. So "HOME" will have one image and "SEARCH" will have another. </p> <p>I know I can do this programatically (at least I ASSUME) but is there an easier way to do this? Can I link an image to a node based on t...
[ { "answer_id": 198817, "author": "Aleris", "author_id": 20417, "author_profile": "https://Stackoverflow.com/users/20417", "pm_score": 2, "selected": false, "text": "<p>You can put an</p>\n\n<pre><code>&lt;asp:Image ... /&gt;\n</code></pre>\n\n<p>into the PathSerparatorTemplate but you st...
2008/10/13
[ "https://Stackoverflow.com/questions/198717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4140/" ]
Ok, so I'm building bread crumbs and depending on the value of the breadcrumb an image will be the seperator. So "HOME" will have one image and "SEARCH" will have another. I know I can do this programatically (at least I ASSUME) but is there an easier way to do this? Can I link an image to a node based on the value o...
I see you have already accepted an answer, but I thought some code would help, so here is some: Site1.Master ------------ --- ``` <asp:SiteMapPath ID="SiteMapPath1" Runat="server" OnItemDataBound="Item_Bound"> <PathSeparatorTemplate> <asp:Image ID="SepImage" runat="server" ImageUrl="/images"/...
198,726
<p>I'm responsible for several (rather small) programs, which share a lot of code via different libraries. I'm wondering what the best repository layout is to develop the different prorgrams (and libraries), and keep the libraries in sync across all the programs.</p> <p>For the sake of argument let's say there are two...
[ { "answer_id": 198784, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": 1, "selected": false, "text": "<p>Why does the source for the library have to exist in the program tree. Compile your libraries separately and link ...
2008/10/13
[ "https://Stackoverflow.com/questions/198726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5822/" ]
I'm responsible for several (rather small) programs, which share a lot of code via different libraries. I'm wondering what the best repository layout is to develop the different prorgrams (and libraries), and keep the libraries in sync across all the programs. For the sake of argument let's say there are two programs ...
Well, I guess I disagree that externals are out of the question. I've had a similar problem in the past. I solved it using the svn property externals. Create your library repositories: ``` svnadmin create /path/library1 svnadmin create /path/library2 ... ``` Create client repositories: ``` svnadmin create /path/pr...
198,743
<p>After many years of using make, I've just started using jam (actually ftjam) for my projects. </p> <p>In my project workspaces, I have two directories:</p> <ul> <li><code>src</code> where I build executables and libraries</li> <li><code>test</code> where my test programs are</li> </ul> <p>I'm trying to set up a d...
[ { "answer_id": 201788, "author": "Remo.D", "author_id": 16827, "author_profile": "https://Stackoverflow.com/users/16827", "pm_score": 2, "selected": false, "text": "<p>Ok this seems to be not an as easy question as I thought so I worked out a solution on my own. It uses a script to achie...
2008/10/13
[ "https://Stackoverflow.com/questions/198743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16827/" ]
After many years of using make, I've just started using jam (actually ftjam) for my projects. In my project workspaces, I have two directories: * `src` where I build executables and libraries * `test` where my test programs are I'm trying to set up a dependency on test programs so that each time I compile them, the...
Ok this seems to be not an as easy question as I thought so I worked out a solution on my own. It uses a script to achieve the end result so I still hope that a Jam guru will have a jam-only solution. * Create a Jamrules in the root directory of the project with the common definitions. * Create a Jamfile in the root d...
198,744
<p>Yeah, its a bit on this side of pointless, but I was wondering... I've got all these codebehind files cluttering my MVC app. The only reason why I need these files, as far as I can tell, is to tell ASP.NET that my page extends from ViewPage rather than Page. </p> <p>I've tried a couple different Page directives c...
[ { "answer_id": 198794, "author": "Sumit", "author_id": 16123, "author_profile": "https://Stackoverflow.com/users/16123", "pm_score": 2, "selected": false, "text": "<p>Assuming you don't have any code in your codebehind, why don't you point them all to one codebehind file?</p>\n" }, {...
2008/10/13
[ "https://Stackoverflow.com/questions/198744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Yeah, its a bit on this side of pointless, but I was wondering... I've got all these codebehind files cluttering my MVC app. The only reason why I need these files, as far as I can tell, is to tell ASP.NET that my page extends from ViewPage rather than Page. I've tried a couple different Page directives changes, but ...
Delete the codebehind and use a page directive like this: ``` <%@ Page Title="Title" Inherits="System.Web.Mvc.ViewPage" Language="C#" MasterPageFile="~/Views/Layouts/Site.Master" %> ``` Or, if you want to get rid of the codebehind but still want to use strongly typed view, then read this link: <http://devlicio.us/bl...
198,754
<p>When using the unmanaged API for the .NET framework to profile a .NET process in-process, is it possible to look up the IL instruction pointer that correlates to the native instruction pointer provided to the StackSnapshotCallback function?</p> <p>As is probably obvious, I am taking a snapshot of the current stack,...
[ { "answer_id": 214123, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<pre><code>Console.WriteLine(\"StackTrace: '{0}'\", Environment.StackTrace);\n</code></pre>\n\n<p>Make sure your build generat...
2008/10/13
[ "https://Stackoverflow.com/questions/198754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27577/" ]
When using the unmanaged API for the .NET framework to profile a .NET process in-process, is it possible to look up the IL instruction pointer that correlates to the native instruction pointer provided to the StackSnapshotCallback function? As is probably obvious, I am taking a snapshot of the current stack, and would...
In order to translate from a native instruction pointer as provided by `ICorProfilerInfo2::DoStackSnapshot` to an intermediate language method offset, you must take two steps since `DoStackSnapshot` provides a `FunctionID` and native instruction pointer as a virtual memory address. Step 1, is to convert the instructio...
198,777
<p>I'm trying to configure Windows Powershell to work with Visual Studio. Nothing fancy, just get things set so I can cl &amp; nmake. I think all I need to do is edit the path setting(but I don't know how to set that in WPSH).</p>
[ { "answer_id": 198822, "author": "jerhinesmith", "author_id": 1108, "author_profile": "https://Stackoverflow.com/users/1108", "pm_score": 1, "selected": false, "text": "<p>You might want to check out <a href=\"https://stackoverflow.com/questions/138144/whats-in-your-powershell-profileps1...
2008/10/13
[ "https://Stackoverflow.com/questions/198777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
I'm trying to configure Windows Powershell to work with Visual Studio. Nothing fancy, just get things set so I can cl & nmake. I think all I need to do is edit the path setting(but I don't know how to set that in WPSH).
After much digging around, I created a directory in My Documents named **WindowsPowerShell**, created a file named **Microsoft.PowerShell\_profile.ps1**, and(after a few iterations), inserted the following code in it, and it works. ``` function Get-Batchfile($file) { $theCmd = "`"$file`" & set" cmd /c $theCm...
198,781
<p>Easy question this time.</p> <p>I'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form "[^<em>x</em>]" where <em>x</em> is the character that you don't want to appear, but that doesn't seem to be working.</p> <p>For example,</p> ...
[ { "answer_id": 198790, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 7, "selected": true, "text": "<p>Your solution is half right. The match you see is for the other characters. What you want to say is something like ...
2008/10/13
[ "https://Stackoverflow.com/questions/198781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1108/" ]
Easy question this time. I'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form "[^*x*]" where *x* is the character that you don't want to appear, but that doesn't seem to be working. For example, ``` Regex.IsMatch("103","[^0]") ``...
Your solution is half right. The match you see is for the other characters. What you want to say is something like "hey! I do not want to see this character in the entire string". In that case you do: ``` Regex.IsMatch("103","^[^0]*$") ```
198,831
<p>I'm building an app in Ruby on Rails, and I'm including 3 of my models (and their migration scripts) to show what I'm trying to do, and what isn't working. Here's the rundown: I have users in my application that belong to teams, and each team can have multiple coaches. I want to be able to pull a list of the coach...
[ { "answer_id": 198956, "author": "Mike Deck", "author_id": 1247, "author_profile": "https://Stackoverflow.com/users/1247", "pm_score": 1, "selected": false, "text": "<p>I don't think ActiveRecord can handle doing a 2 step join in a has_many relationship. In order for this to work you'll...
2008/10/13
[ "https://Stackoverflow.com/questions/198831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168/" ]
I'm building an app in Ruby on Rails, and I'm including 3 of my models (and their migration scripts) to show what I'm trying to do, and what isn't working. Here's the rundown: I have users in my application that belong to teams, and each team can have multiple coaches. I want to be able to pull a list of the coaches th...
You can't do a has\_many :through twice in a row. It'll tell you that its an invalid association. If you don't want to add finder\_sql like above, you can add a method that mimics what you're trying to do. ``` def coaches self.teams.collect do |team| team.coaches end.flatten.uniq end ```
198,849
<p>I've just performed a new installation of the very latest (Fall, 2008) version of Fedora 9 Linux and am perplexed that it never set the default route properly and that even traveling the labyrinthine ways of this OS, there's no obvious way.</p> <p>Of course, it's clear that one can do it on a one-off basis like thi...
[ { "answer_id": 198859, "author": "zigdon", "author_id": 4913, "author_profile": "https://Stackoverflow.com/users/4913", "pm_score": 1, "selected": false, "text": "<p>I have not used recent versions of Fedora, but it was often set as a GATEWAY variable in /etc/sysconfig/network.</p>\n\n<p...
2008/10/13
[ "https://Stackoverflow.com/questions/198849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26976/" ]
I've just performed a new installation of the very latest (Fall, 2008) version of Fedora 9 Linux and am perplexed that it never set the default route properly and that even traveling the labyrinthine ways of this OS, there's no obvious way. Of course, it's clear that one can do it on a one-off basis like this: ``` ...
The gateway is normally set in /etc/sysconfig/network-scripts/ifcfg-eth0, not in /etc/sysconfig/network. For example, on my current machine: > > /etc/sysconfig/network > > > ``` NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=flyboys NISDOMAIN=ekcineon ``` > > /etc/sysconfig/network-scripts/ifcfg-eth0 > > > ```...
198,870
<p>I'm using the GGeoXml object to overlay KML on an embedded Google Map. I need to customize the popup balloon for placemarks, so I'm trying to use the <a href="http://code.google.com/apis/kml/documentation/kmlreference.html#balloonstyle" rel="nofollow noreferrer"><code>&lt;BalloonStyle&gt;</code></a> element:</p> <p...
[ { "answer_id": 329240, "author": "Stepan Mazurov", "author_id": 40786, "author_profile": "https://Stackoverflow.com/users/40786", "pm_score": 2, "selected": true, "text": "<p>No, like you have mentioned, html in the description is the only way I know that you can control the style of bal...
2008/10/13
[ "https://Stackoverflow.com/questions/198870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/239663/" ]
I'm using the GGeoXml object to overlay KML on an embedded Google Map. I need to customize the popup balloon for placemarks, so I'm trying to use the [`<BalloonStyle>`](http://code.google.com/apis/kml/documentation/kmlreference.html#balloonstyle) element: ``` <?xml version="1.0" encoding="utf-8"?> <Document xmlns="htt...
No, like you have mentioned, html in the description is the only way I know that you can control the style of balloons through kml/georss feed.
198,892
<p>I have an img tag in my webapp that uses the onload handler to resize the image:</p> <pre><code>&lt;img onLoad="SizeImage(this);" src="foo" &gt; </code></pre> <p>This works fine in Firefox 3, but fails in IE7 because the image object being passed to the <code>SizeImage()</code> function has a width and height of 0...
[ { "answer_id": 198903, "author": "Steve Paulo", "author_id": 9414, "author_profile": "https://Stackoverflow.com/users/9414", "pm_score": 4, "selected": true, "text": "<p>IE7 is trying to resize the image before the DOM tree is fully rendered. You need to run it on document.onload... you'...
2008/10/13
[ "https://Stackoverflow.com/questions/198892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10861/" ]
I have an img tag in my webapp that uses the onload handler to resize the image: ``` <img onLoad="SizeImage(this);" src="foo" > ``` This works fine in Firefox 3, but fails in IE7 because the image object being passed to the `SizeImage()` function has a width and height of 0 for some reason -- maybe IE calls the func...
IE7 is trying to resize the image before the DOM tree is fully rendered. You need to run it on document.onload... you'll just need to make sure your function can handle being passed a reference to the element that isn't "this." Alternatively... and I hope this isn't a flameable offense... jQuery makes stuff like this ...
198,910
<p>I wrote a small WPF app where I like to prepend text into a RichTextBox, so that the newest stuff is on top. I wrote this, and it works: </p> <pre><code> /// &lt;summary&gt; /// Prepends the text to the rich textbox /// &lt;/summary&gt; /// &lt;param name="textoutput"&gt;The text representing the cha...
[ { "answer_id": 199409, "author": "Jan Bannister", "author_id": 460845, "author_profile": "https://Stackoverflow.com/users/460845", "pm_score": 1, "selected": false, "text": "<p>RickTextbox.Document is a FlowDocument to which you can add almost anything that implements ContentElement. Tha...
2008/10/13
[ "https://Stackoverflow.com/questions/198910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5948/" ]
I wrote a small WPF app where I like to prepend text into a RichTextBox, so that the newest stuff is on top. I wrote this, and it works: ``` /// <summary> /// Prepends the text to the rich textbox /// </summary> /// <param name="textoutput">The text representing the character information.</param> ...
Try the following: ``` BitmapImage bi = new BitmapImage(new Uri(@"C:\SimpleImage.jpg")); Image image = new Image(); image.Source = bi; InlineUIContainer container = new InlineUIContainer(image); Paragraph paragraph = new Paragraph(container); RichTextBoxOutput.Document.Blocks.Add(paragraph); ``` The Inl...
198,928
<p>Brief:</p> <pre><code>convert ( -size 585x128 gradient: ) NewImage.png </code></pre> <p>How do I change the above ImageMagick command so it takes the width and height from an existing image? I need it to remain a one line command.</p> <hr> <p>Details:</p> <p>I'm trying to programatically create an image reflec...
[ { "answer_id": 205401, "author": "korro", "author_id": 22650, "author_profile": "https://Stackoverflow.com/users/22650", "pm_score": 1, "selected": false, "text": "<p>If you are calling it from C#, perhaps you could get retrieve the image dimensions in C#.\nThen call the ImageMagick comm...
2008/10/13
[ "https://Stackoverflow.com/questions/198928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Brief: ``` convert ( -size 585x128 gradient: ) NewImage.png ``` How do I change the above ImageMagick command so it takes the width and height from an existing image? I need it to remain a one line command. --- Details: I'm trying to programatically create an image reflection using ImageMagick. The effect I am l...
If you are calling it from C#, perhaps you could get retrieve the image dimensions in C#. Then call the ImageMagick command with ``` command = String.Format("convert bar %1x%2",img.Width,img.Height) ```
198,936
<p>What is the right way to populate the model for the index page in a grails app? There is no IndexController by default, is there some other mechanism for getting lists of this and that into the model?</p>
[ { "answer_id": 198953, "author": "Robert Fischer", "author_id": 27561, "author_profile": "https://Stackoverflow.com/users/27561", "pm_score": 2, "selected": false, "text": "<p><strong>The good answer:</strong> If you need to populate a model for the index page, it's time to change from u...
2008/10/13
[ "https://Stackoverflow.com/questions/198936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2031/" ]
What is the right way to populate the model for the index page in a grails app? There is no IndexController by default, is there some other mechanism for getting lists of this and that into the model?
I won't claim that this is the right way, but it is one way to start things off. It doesn't take much to have a controller be the default. Add a mapping to UrlMappings.groovy: ``` class UrlMappings { static mappings = { "/$controller/$action?/$id?"{ constraints { // apply constrai...
198,945
<p>How can you get a <strong>raw</strong> socket in Perl, and then what's the best way to built a packet for use with it?</p>
[ { "answer_id": 198954, "author": "zigdon", "author_id": 4913, "author_profile": "https://Stackoverflow.com/users/4913", "pm_score": 3, "selected": false, "text": "<p>Perhaps searching <a href=\"http://search.cpan.org\" rel=\"nofollow noreferrer\">CPAN</a> might help? <a href=\"http://se...
2008/10/13
[ "https://Stackoverflow.com/questions/198945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
How can you get a **raw** socket in Perl, and then what's the best way to built a packet for use with it?
Looks like [Net::RawIP](http://search.cpan.org/dist/Net-RawIP) was what I was looking for: ``` use Net::RawIP; $a = new Net::RawIP; $a->set({ip => {saddr => 'my.target.lan',daddr => 'my.target.lan'}, tcp => {source => 139,dest => 139,psh => 1, syn => 1}}); $a->send; $a->ethnew("eth0"); $a->ethset(source => '...
198,952
<p>I have two users Bob and Alice in Oracle, both created by running the following commands as sysdba from sqlplus:</p> <pre> create user $blah identified by $password; grant resource, connect, create view to $blah; </pre> <p>I want Bob to have complete access to Alice's schema (that is, all tables), but I'm no...
[ { "answer_id": 198962, "author": "cagcowboy", "author_id": 19629, "author_profile": "https://Stackoverflow.com/users/19629", "pm_score": 5, "selected": true, "text": "<p>AFAIK you need to do the grants object one at a time.</p>\n\n<p>Typically you'd use a script to do this, something alo...
2008/10/13
[ "https://Stackoverflow.com/questions/198952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25915/" ]
I have two users Bob and Alice in Oracle, both created by running the following commands as sysdba from sqlplus: ``` create user $blah identified by $password; grant resource, connect, create view to $blah; ``` I want Bob to have complete access to Alice's schema (that is, all tables), but I'm not sure what g...
AFAIK you need to do the grants object one at a time. Typically you'd use a script to do this, something along the lines of: ``` SELECT 'GRANT ALL ON '||table_name||' TO BOB;' FROM ALL_TABLES WHERE OWNER = 'ALICE'; ``` And similar for other db objects. You could put a package in each schema that you need to iss...
198,970
<p>I have a fairly simple const struct in some C code that simply holds a few pointers and would like to initialize it statically if possible. Can I and, if so, how?</p>
[ { "answer_id": 198980, "author": "Lev", "author_id": 7224, "author_profile": "https://Stackoverflow.com/users/7224", "pm_score": 5, "selected": true, "text": "<p>You can, if the pointers point to global objects:</p>\n\n<pre><code>// In global scope\nint x, y;\nconst struct {int *px, *py;...
2008/10/13
[ "https://Stackoverflow.com/questions/198970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26551/" ]
I have a fairly simple const struct in some C code that simply holds a few pointers and would like to initialize it statically if possible. Can I and, if so, how?
You can, if the pointers point to global objects: ``` // In global scope int x, y; const struct {int *px, *py; } s = {&x, &y}; ```
198,974
<p>I have a validation control that has the following expression:</p> <pre><code>(?=(.*\\d.*){2,})(?=(.*\\w.*){2,})(?=(.*\\W.*){1,}).{8,} </code></pre> <p>That's a password with at least <strong>2 digits</strong>, <strong>2 alpha characters</strong>, <strong>1 non-alphanumeric</strong> and <strong>8 character minimum...
[ { "answer_id": 198981, "author": "David Laing", "author_id": 13238, "author_profile": "https://Stackoverflow.com/users/13238", "pm_score": -1, "selected": false, "text": "<p>How about one of the existing jQuery based password strength validators - like:\n<a href=\"http://scripts.simplyth...
2008/10/13
[ "https://Stackoverflow.com/questions/198974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19753/" ]
I have a validation control that has the following expression: ``` (?=(.*\\d.*){2,})(?=(.*\\w.*){2,})(?=(.*\\W.*){1,}).{8,} ``` That's a password with at least **2 digits**, **2 alpha characters**, **1 non-alphanumeric** and **8 character minimum**. Unfortunately this doesn't seem to be cross-browser compliant. Thi...
`(?=(.*\W.*){0,})` is not 0 non-alphanumeric characters. It is *at least 0* non-alphanumeric characters. If you wanted the password to not contain any non-alphanumeric characters you could do either `(?!.*\W)` or `(?=\w*$)`. A simpler solution would be to skip the `\W` look-ahead, and use `\w{8,}` instead of `.{8,}`. ...
198,975
<p>I am tring to get the <a href="http://www.herrodius.com/blog/85" rel="nofollow noreferrer">ASDoc Ant task</a> to work:</p> <pre><code>&lt;target name="asdoc" depends="compile"&gt; &lt;mkdir dir="${dist_asdocs}"/&gt; &lt;asdoc docSources="${srcdir}" output="${dist_asdocs}" executable="${FLEX_HOM...
[ { "answer_id": 199586, "author": "Simon Lehmann", "author_id": 27011, "author_profile": "https://Stackoverflow.com/users/27011", "pm_score": 2, "selected": false, "text": "<p>Well, I can't test it because it is implemented for Windows only (tries to execute asdoc.exe).</p>\n\n<p>But I ha...
2008/10/13
[ "https://Stackoverflow.com/questions/198975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13220/" ]
I am tring to get the [ASDoc Ant task](http://www.herrodius.com/blog/85) to work: ``` <target name="asdoc" depends="compile"> <mkdir dir="${dist_asdocs}"/> <asdoc docSources="${srcdir}" output="${dist_asdocs}" executable="${FLEX_HOME}/bin/asdoc.exe" /> </target> ``` When I run it I get errors fr...
Well, I can't test it because it is implemented for Windows only (tries to execute asdoc.exe). But I have written my own solution for the lack of an ant task for asdoc: ``` <exec executable="${FLEX_HOME}/bin/asdoc" dir="${basedir}"> <arg value="-source-path"/> <arg path="${basedir}/src"/> <arg value="-do...
198,979
<p>I'm using Visual Studio 2008 Team System with SP1, and I've noticed an annoying tendency for the IDE to hang for several (10-15) seconds whenever I stop debugging an application. At first I thought this only happened with WPF apps, but I've observed the behavior in Windows Forms apps and ASP.NET sites as well. I'v...
[ { "answer_id": 199033, "author": "Joel", "author_id": 13713, "author_profile": "https://Stackoverflow.com/users/13713", "pm_score": 0, "selected": false, "text": "<p>Does it hangover even with basic apps? Like making a new windows form then hitting debug, or is it only with more complic...
2008/10/13
[ "https://Stackoverflow.com/questions/198979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27457/" ]
I'm using Visual Studio 2008 Team System with SP1, and I've noticed an annoying tendency for the IDE to hang for several (10-15) seconds whenever I stop debugging an application. At first I thought this only happened with WPF apps, but I've observed the behavior in Windows Forms apps and ASP.NET sites as well. I've mad...
Looking at your ProcMon results, it appears that it's that CreateFile() call that's taking all the time. I'm assuming that all activity is waiting for that thread to return. You can verify this -- with some difficulty -- in Process Explorer (also part of the SysInternals package previously linked), using the Threads ta...
198,984
<p>I have a solution with multiple projects and we need to do some serious global replacements.</p> <p>Is there a way to do a wildcard replacement where some values remain in after the replace?</p> <p>So, for instance if I want every <strong>HttpContext.Current.Session[“whatevervalue”]</strong> to become <strong>Http...
[ { "answer_id": 198988, "author": "IAmCodeMonkey", "author_id": 27613, "author_profile": "https://Stackoverflow.com/users/27613", "pm_score": 2, "selected": false, "text": "<p>Easy...use regular expressions and grouping.</p>\n\n<p>Find what:\n(HttpContext.Current.Session[“whatevervalue”])...
2008/10/13
[ "https://Stackoverflow.com/questions/198984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213/" ]
I have a solution with multiple projects and we need to do some serious global replacements. Is there a way to do a wildcard replacement where some values remain in after the replace? So, for instance if I want every **HttpContext.Current.Session[“whatevervalue”]** to become **HttpContext.Current.Session[“whateverval...
First, Backup your Projects, just in case... Always a good idea before mass replacements. Then, in the Find/Replace Dialog, select the Use Regular Expressions checkbox: In the Find box, use the pattern: ``` HttpContext\.Current\.Session\["{.@}"\] ``` and in the Replace box, use: ``` HttpContext.Current.Session["\...
199,014
<p>I have a proxy object generated by Visual Studio (client side) named ServerClient. I am attempting to set ClientCredentials.UserName.UserName/Password before opening up a new connection using this code:</p> <pre><code>InstanceContext context = new InstanceContext(this); m_client = new ServerClient(context); m_clie...
[ { "answer_id": 200713, "author": "Mike Two", "author_id": 23659, "author_profile": "https://Stackoverflow.com/users/23659", "pm_score": 0, "selected": false, "text": "<p>I think your problem might be related to the use of the InstanceContext. I thought that was only needed for duplex com...
2008/10/13
[ "https://Stackoverflow.com/questions/199014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3656/" ]
I have a proxy object generated by Visual Studio (client side) named ServerClient. I am attempting to set ClientCredentials.UserName.UserName/Password before opening up a new connection using this code: ``` InstanceContext context = new InstanceContext(this); m_client = new ServerClient(context); m_client.ClientCrede...
It appears that you can only access these properties pretty early in the instanciation cycle. If I override the constructor in the proxy class (ServerClient), I'm able to set these properties: ``` base.ClientCredentials.UserName.UserName = "Sample"; ``` I'm beginning to appreciate the people who suggest not using th...
199,016
<p>I'm trying to use opengl in C#. I have following code which fails with error 2000 ERROR_INVALID_PIXEL_FORMAT<br> First definitions:</p> <pre><code>[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern IntPtr GetDC(IntPtr hWnd); [StructLayout(LayoutKind.Se...
[ { "answer_id": 205675, "author": "Brian", "author_id": 17356, "author_profile": "https://Stackoverflow.com/users/17356", "pm_score": 0, "selected": false, "text": "<p>I cannot test this right now, but my first suspicion would be the structure packing. Have you tried setting the packing ...
2008/10/13
[ "https://Stackoverflow.com/questions/199016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22569/" ]
I'm trying to use opengl in C#. I have following code which fails with error 2000 ERROR\_INVALID\_PIXEL\_FORMAT First definitions: ``` [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern IntPtr GetDC(IntPtr hWnd); [StructLayout(LayoutKind.Sequential)] ...
Found solution. Problem is very strange ugly and really hard to find. Somwhere on the internet I found that when you are linking opengl32.lib while compiling c++ application it must be placed before gdi32.lib. The reason for this is that (supposedly) opengl32.dll is overwriting ChoosePixelFormat and SetPixelFormat f...
199,035
<p>Has anyone used <a href="http://pear.php.net/package/Spreadsheet_Excel_Writer/" rel="nofollow noreferrer">Pear: Spreadsheet_Excel_Writer</a>?</p> <p>The <a href="http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.intro-format.php" rel="nofollow noreferrer">Formatting Tutorial</a> lists a scr...
[ { "answer_id": 199166, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 3, "selected": true, "text": "<p>Here is some sample code:</p>\n\n<pre><code>&lt;?php\nrequire_once 'Spreadsheet/Excel/Writer.php';\n$workbook = new Spreadshe...
2008/10/13
[ "https://Stackoverflow.com/questions/199035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15031/" ]
Has anyone used [Pear: Spreadsheet\_Excel\_Writer](http://pear.php.net/package/Spreadsheet_Excel_Writer/)? The [Formatting Tutorial](http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.intro-format.php) lists a script similar to what I'm working with: (trimmed down) ``` <?php require_once 'Spre...
Here is some sample code: ``` <?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer('test.xls'); $worksheet =& $workbook->addWorksheet('My first worksheet'); if (PEAR::isError($worksheet)) { die($worksheet->getMessage()); } $workbook->close(); ?> ``` I think for starters, gi...
199,044
<p>My rails app is in a svn repository, but several of the plugins are installed through git and later added to the svn repo. How can I update these plugins? I can't seem to get script/plugin update to do anything. I'd really like to update activemerchant to get rid of the Inflector warnings.</p>
[ { "answer_id": 200349, "author": "Greg Borenstein", "author_id": 10419, "author_profile": "https://Stackoverflow.com/users/10419", "pm_score": 0, "selected": false, "text": "<p>You should just be able to navigate to the plugin's directory and hit:\n<code>\ngit pull\n</code>. I'm pretty s...
2008/10/13
[ "https://Stackoverflow.com/questions/199044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2884/" ]
My rails app is in a svn repository, but several of the plugins are installed through git and later added to the svn repo. How can I update these plugins? I can't seem to get script/plugin update to do anything. I'd really like to update activemerchant to get rid of the Inflector warnings.
If you haven't made any local changes to the plugin and you don't need to track what changes to it the update will bring, you can just run `script/plugin install` again, passing in `--force` if you need to. For example: ``` script/plugin install --force git://github.com/dchelimsky/rspec.git ```
199,045
<p>I'm looking for a library that has functionality similar to Perl's <a href="http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm#SYNOPSIS" rel="noreferrer">WWW::Mechanize</a>, but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting ...
[ { "answer_id": 199054, "author": "moo", "author_id": 23107, "author_profile": "https://Stackoverflow.com/users/23107", "pm_score": 1, "selected": false, "text": "<p>Try looking in the PEAR library. If all else fails, create an object wrapper for curl.</p>\n\n<p>You can so something simpl...
2008/10/13
[ "https://Stackoverflow.com/questions/199045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14569/" ]
I'm looking for a library that has functionality similar to Perl's [WWW::Mechanize](http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm#SYNOPSIS), but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple for...
SimpleTest's [ScriptableBrowser](http://simpletest.sourceforge.net/en/browser_documentation.html) can be used independendly from the testing framework. I've used it for numerous automation-jobs.
199,059
<p>I've got a file whose format I'm altering via a python script. I have several camel cased strings in this file where I just want to insert a single space before the capital letter - so "WordWordWord" becomes "Word Word Word".</p> <p>My limited regex experience just stalled out on me - can someone think of a decent...
[ { "answer_id": 199075, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": true, "text": "<p>You could try:</p>\n\n<pre><code>&gt;&gt;&gt; re.sub(r\"(\\w)([A-Z])\", r\"\\1 \\2\", \"WordWordWord\")\n'Word Word Wor...
2008/10/13
[ "https://Stackoverflow.com/questions/199059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19074/" ]
I've got a file whose format I'm altering via a python script. I have several camel cased strings in this file where I just want to insert a single space before the capital letter - so "WordWordWord" becomes "Word Word Word". My limited regex experience just stalled out on me - can someone think of a decent regex to d...
You could try: ``` >>> re.sub(r"(\w)([A-Z])", r"\1 \2", "WordWordWord") 'Word Word Word' ```
199,065
<p>I've declared Javascript arrays in such a way that I could then access them by a key, but it was a long time ago, and I've forgotten how I did it.</p> <p>Basically, I have two fields I want to store, a unique key, and its value. I know there is a way to do it.. something like:</p> <pre><code>var jsArray = new {key...
[ { "answer_id": 199083, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 4, "selected": true, "text": "<p>You can do it in different ways:</p>\n\n<pre><code>var a = {'a':0, 'b':1, 'c':2};\n\nvar b = new Array();\nb[...
2008/10/13
[ "https://Stackoverflow.com/questions/199065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
I've declared Javascript arrays in such a way that I could then access them by a key, but it was a long time ago, and I've forgotten how I did it. Basically, I have two fields I want to store, a unique key, and its value. I know there is a way to do it.. something like: ``` var jsArray = new {key: 'test test', value:...
You can do it in different ways: ``` var a = {'a':0, 'b':1, 'c':2}; var b = new Array(); b['a'] = 0; b['b'] = 1; b['c'] = 2; var c = new Object(); c.a = 0; c.b = 1; c.c = 2; ```
199,068
<p>Is it possible to play video from data that has been embedded in a swf at compile time (with the <code>[Embed]</code> metatag)?</p> <p>The "Import Video->Embed" feature provided by Flash CS3 etc. is not acceptable because it has many severe limitations (including sound synchronization issues, a maximum number of fr...
[ { "answer_id": 199125, "author": "James Fassett", "author_id": 27081, "author_profile": "https://Stackoverflow.com/users/27081", "pm_score": 2, "selected": false, "text": "<p>You can import a flv into a swf file using the Flash IDE - I've done that before. You can drop it onto the timeli...
2008/10/13
[ "https://Stackoverflow.com/questions/199068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26331/" ]
Is it possible to play video from data that has been embedded in a swf at compile time (with the `[Embed]` metatag)? The "Import Video->Embed" feature provided by Flash CS3 etc. is not acceptable because it has many severe limitations (including sound synchronization issues, a maximum number of frames, and other cavea...
As long as your video is an FLV, then the answer is yes - you can use `NetStream.appendBytes()` to play the embedded `ByteArray`: ``` public class Main extends MovieClip { [Embed(source="sample.flv", mimeType="application/octet-stream")] private var SampleVideo:Class; public function Main():void { ...
199,080
<p>A similar question was asked <a href="https://stackoverflow.com/questions/198931/how-do-i-tell-if-net-35-sp1-is-installed">here</a>, but it was specific to .NET 3.5. Specifically, I'm looking for the following:</p> <ol> <li>What is the correct way to determine which .NET Framework versions and service packs are ins...
[ { "answer_id": 199121, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 3, "selected": false, "text": "<p>Enumerate the subkeys of <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP</code>. Each subk...
2008/10/13
[ "https://Stackoverflow.com/questions/199080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1559/" ]
A similar question was asked [here](https://stackoverflow.com/questions/198931/how-do-i-tell-if-net-35-sp1-is-installed), but it was specific to .NET 3.5. Specifically, I'm looking for the following: 1. What is the correct way to determine which .NET Framework versions and service packs are installed? 2. Is there a li...
The registry is [the official way](https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed) to detect if a specific version of the Framework is installed. ![enter image description here](https://i.stack.imgur.com/hiLch.png) Which registry keys are needed chang...
199,092
<p>I have a stub Qt application and I keep getting compiler errors</p> <pre><code>#include &lt;QApplication&gt; int main(int argc, char *argv[]) { return 0; } </code></pre> <p>I used <code>qmake -project</code> and <code>qmake</code> commands and as far as I can tell they did their job correctly. When I subse...
[ { "answer_id": 199552, "author": "Adam Mitz", "author_id": 2574, "author_profile": "https://Stackoverflow.com/users/2574", "pm_score": 0, "selected": false, "text": "<p>Based on the later response from the questioner, not the original question.</p>\n\n<p>From the MSYS prompt run \"ls /mi...
2008/10/13
[ "https://Stackoverflow.com/questions/199092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8923/" ]
I have a stub Qt application and I keep getting compiler errors ``` #include <QApplication> int main(int argc, char *argv[]) { return 0; } ``` I used `qmake -project` and `qmake` commands and as far as I can tell they did their job correctly. When I subsequently call `make` at the command line I get the foll...
Well I had similar problem before when I was installing MingW downloaded from the web, but in the other hand while installing Qt it will ask you to download the version of MingW which is compatible with Qt. So have you tried installing it when the Qt installer asked you?
199,099
<p>I'm using <code>$.post()</code> to call a servlet using Ajax and then using the resulting HTML fragment to replace a <code>div</code> element in the user's current page. However, if the session times out, the server sends a redirect directive to send the user to the login page. In this case, jQuery is replacing the ...
[ { "answer_id": 199156, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 6, "selected": false, "text": "<p>Use the low-level <code>$.ajax()</code> call:</p>\n\n<pre><code>$.ajax({\n url: \"/yourservlet\",\n data: { },\n complete...
2008/10/13
[ "https://Stackoverflow.com/questions/199099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2024/" ]
I'm using `$.post()` to call a servlet using Ajax and then using the resulting HTML fragment to replace a `div` element in the user's current page. However, if the session times out, the server sends a redirect directive to send the user to the login page. In this case, jQuery is replacing the `div` element with the co...
The solution that was eventually implemented was to use a wrapper for the callback function of the Ajax call and in this wrapper check for the existence of a specific element on the returned HTML chunk. If the element was found then the wrapper executed a redirection. If not, the wrapper forwarded the call to the actua...
199,113
<p>I have a <code>BasePage</code> which inherits from <code>System.Web.UI.Page</code>, and every page that inherits the <code>BasePage</code> will have the same master page.</p> <p>How do I cast the <code>Page.Master</code> of the <code>BasePage</code> to the specific master page so I can access properties on it?</p>
[ { "answer_id": 199116, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": 0, "selected": false, "text": "<p>In VB.Net</p>\n\n<pre><code>MasterPageVariable = Ctype(page.MasterPage, MasterPageClass)\n</code></pre>\n" }, ...
2008/10/13
[ "https://Stackoverflow.com/questions/199113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4998/" ]
I have a `BasePage` which inherits from `System.Web.UI.Page`, and every page that inherits the `BasePage` will have the same master page. How do I cast the `Page.Master` of the `BasePage` to the specific master page so I can access properties on it?
Overriden Master can't be done (its not Virtual), and masking it with new causes an issue with the page class not being able to get its master, so the best thing to do is a second property. Something like: ``` public CustomMasterPage MasterPage { get { return this.Master as CustomMasterPage; } } ``` In your Bas...
199,127
<p>I have asp.net form that contains fields. When I access this window, my javascript functions can access the fields via the DOM with the getElementById() method and when I postpack to the server I am receiving the updates made by the client.</p> <p>However, when I launch the form as a child window using Telerik's ...
[ { "answer_id": 199187, "author": "Craig", "author_id": 2894, "author_profile": "https://Stackoverflow.com/users/2894", "pm_score": 1, "selected": false, "text": "<p>It is quite possible that the element's ID is not what you think it is. Check the rendered page and see if the ID is there...
2008/10/13
[ "https://Stackoverflow.com/questions/199127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19799/" ]
I have asp.net form that contains fields. When I access this window, my javascript functions can access the fields via the DOM with the getElementById() method and when I postpack to the server I am receiving the updates made by the client. However, when I launch the form as a child window using Telerik's RadWindow co...
To get the ID of your asp.net control do something like this: ``` <%= theControl.ClientID %> ``` getElementByName is not as commonly used as getElementById. The ID attribute is supposed to be unique for each element on the page whereas the name attribute can be duplicated.
199,130
<p>For my Java apps with very long classpaths, I cannot see the main class specified near the end of the arg list when using ps. I think this stems from my Ubuntu system's size limit on /proc/pid/cmdline. How can I increase this limit?</p>
[ { "answer_id": 199140, "author": "caskey", "author_id": 114986, "author_profile": "https://Stackoverflow.com/users/114986", "pm_score": -1, "selected": false, "text": "<p>Perhaps the 'w' parameter to ps is what you want. Add two 'w' for greater output. It tells ps to ignore the line wi...
2008/10/13
[ "https://Stackoverflow.com/questions/199130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27635/" ]
For my Java apps with very long classpaths, I cannot see the main class specified near the end of the arg list when using ps. I think this stems from my Ubuntu system's size limit on /proc/pid/cmdline. How can I increase this limit?
You can't change this dynamically, the limit is hard-coded in the kernel to PAGE\_SIZE in fs/proc/base.c: ``` 274 int res = 0; 275 unsigned int len; 276 struct mm_struct *mm = get_task_mm(task); 277 if (!mm) 278 goto out; 279 if (!mm->arg_end) 280 ...
199,142
<p>I'm designing some VB based ASP.NET 2.0, and I am trying to make more use of the various ASP tags that visual studio provides, rather than hand writing everything in the code-behind. I want to pass in an outside variable from the Session to identify who the user is for the query.</p> <pre><code>&lt;asp:sqldatasour...
[ { "answer_id": 199148, "author": "Wayne", "author_id": 8236, "author_profile": "https://Stackoverflow.com/users/8236", "pm_score": 3, "selected": true, "text": "<p>I believe Oracle uses the colon \":\", not the at-symbol \"@\".\n<hr>\n\"user\" is probably a reserved word. Change it to \...
2008/10/13
[ "https://Stackoverflow.com/questions/199142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12545/" ]
I'm designing some VB based ASP.NET 2.0, and I am trying to make more use of the various ASP tags that visual studio provides, rather than hand writing everything in the code-behind. I want to pass in an outside variable from the Session to identify who the user is for the query. ``` <asp:sqldatasource id="DataStores"...
I believe Oracle uses the colon ":", not the at-symbol "@". --- "user" is probably a reserved word. Change it to "userID", or something similar.
199,145
<p>I'm using this code, and I get the stack trace that is listed below. I've got this working with just https and with basic authentication, but not ntlm.</p> <pre><code>HttpClient client = null; HttpMethod get = null; try { Protocol myhttps = new Protocol("https", ((ProtocolSocketFactory) new EasySSLProtocolSocketF...
[ { "answer_id": 200471, "author": "Sergey Mikhanov", "author_id": 3894, "author_profile": "https://Stackoverflow.com/users/3894", "pm_score": 0, "selected": false, "text": "<p>Have a look at the utility posted <a href=\"http://nodsw.com/blog/leeland/2006/12/06-no-more-unable-find-valid-ce...
2008/10/13
[ "https://Stackoverflow.com/questions/199145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310/" ]
I'm using this code, and I get the stack trace that is listed below. I've got this working with just https and with basic authentication, but not ntlm. ``` HttpClient client = null; HttpMethod get = null; try { Protocol myhttps = new Protocol("https", ((ProtocolSocketFactory) new EasySSLProtocolSocketFactory()), 443...
HttpClient does not fully support NTLM. Please have a look at [Known limitations and problems](http://hc.apache.org/httpclient-3.x/authentication.html#Known_limitations_and_problems). The HttpClient documentation regarding NTLM is a bit confusing, but the bottom line is that they do not support NTLMv2 which makes it ha...
199,151
<p>I'm trying to link a Qt application with its libraries and the linker (MinGW) spews hundreds of lines like the following, and I am unsure how to proceed.</p> <pre> cpp: undefined reference to `_Unwind_SjLj_Register' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x29d):qcoreapplication_win. cpp: undefined r...
[ { "answer_id": 199328, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": 1, "selected": false, "text": "<p>It's been a while since I did any Qt development, but there were only a couple instances that I remember spewing ou...
2008/10/13
[ "https://Stackoverflow.com/questions/199151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8923/" ]
I'm trying to link a Qt application with its libraries and the linker (MinGW) spews hundreds of lines like the following, and I am unsure how to proceed. ``` cpp: undefined reference to `_Unwind_SjLj_Register' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x29d):qcoreapplication_win. cpp: undefined reference...
I don't know... but to me, spewing stuff about Unwind suggests that you have a mismatch between whether the library is compiled with exceptions and your application is compiled with exceptions. If you want exceptions, make sure you have enabled them by adding the following line in your qmake file: ``` CONFIG += excep...
199,154
<p>I get the following error when trying to load an RSS feed:</p> <blockquote> <p>Attempted to read or write protected memory. This is often an indication that other memory is corrupt.</p> </blockquote> <p>My code works fine from my local host, error only occurs when i upload it to my dedicated server!</p> <p>Here...
[ { "answer_id": 199168, "author": "Jonathan S.", "author_id": 2034, "author_profile": "https://Stackoverflow.com/users/2034", "pm_score": 0, "selected": false, "text": "<p>I'm not familiar with this error but have you verified that your security/permissions are set correctly on the dedica...
2008/10/13
[ "https://Stackoverflow.com/questions/199154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I get the following error when trying to load an RSS feed: > > Attempted to read or write protected memory. This is often an indication that other memory is corrupt. > > > My code works fine from my local host, error only occurs when i upload it to my dedicated server! Here is the code: ``` Protected Sub Page_L...
We had the same behaviour as Todd Smith mentions. After the upgrade to .Net 3.5 SP1 we got this error. In our case the reason was the **protection / obfuscation** of our DLLs with Remotesoft Protector. This is most likely only our problem and not a solution for anyone else. Nevertheless I thought I'd mention it here ...
199,158
<p>I have a table that stores all the volunteers, and each volunteer will be assigned to an appropriate venue to work the event. There is a table that stores all the venues.</p> <p>It stores the volunteer's appropriate venue assignment into the column <code>venue_id</code>.</p> <pre><code>table: venues columns: id, v...
[ { "answer_id": 199168, "author": "Jonathan S.", "author_id": 2034, "author_profile": "https://Stackoverflow.com/users/2034", "pm_score": 0, "selected": false, "text": "<p>I'm not familiar with this error but have you verified that your security/permissions are set correctly on the dedica...
2008/10/13
[ "https://Stackoverflow.com/questions/199158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
I have a table that stores all the volunteers, and each volunteer will be assigned to an appropriate venue to work the event. There is a table that stores all the venues. It stores the volunteer's appropriate venue assignment into the column `venue_id`. ``` table: venues columns: id, venue_name table: volunteers_200...
We had the same behaviour as Todd Smith mentions. After the upgrade to .Net 3.5 SP1 we got this error. In our case the reason was the **protection / obfuscation** of our DLLs with Remotesoft Protector. This is most likely only our problem and not a solution for anyone else. Nevertheless I thought I'd mention it here ...
199,180
<p>The only thing I can get python omnicomplete to work with are system modules. I get nothing for help with modules in my site-packages or modules that I'm currently working on.</p>
[ { "answer_id": 199636, "author": "technomalogical", "author_id": 6173, "author_profile": "https://Stackoverflow.com/users/6173", "pm_score": 2, "selected": false, "text": "<p>Just ran across this on Python reddit tonight: <a href=\"http://orestis.gr/blog/2008/10/13/pysmell-v06-released/\...
2008/10/13
[ "https://Stackoverflow.com/questions/199180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1367022/" ]
The only thing I can get python omnicomplete to work with are system modules. I get nothing for help with modules in my site-packages or modules that I'm currently working on.
I get completion for my own modules in my PYTHONPATH or site-packages. I'm not sure what version of the pythoncomplete.vim script you're using, but you may want to make sure it's the latest. EDIT: Here's some examples of what I'm seeing on my system... This file (mymodule.py), I puth in a directory in PYTHONPATH, and...
199,182
<p>I'm working on a program that is form based but I have been asked to add some command line support, this works fine apart from the form flashes up and closes down when running from the command line. Is there anyway to hide the form whilst the command line is running? Some code does refer to controls so the gui would...
[ { "answer_id": 199198, "author": "benPearce", "author_id": 4490, "author_profile": "https://Stackoverflow.com/users/4490", "pm_score": 2, "selected": false, "text": "<p>In your Main method you can create the form such as:</p>\n\n<pre><code>main = new MainForm();\n</code></pre>\n\n<p>then...
2008/10/13
[ "https://Stackoverflow.com/questions/199182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm working on a program that is form based but I have been asked to add some command line support, this works fine apart from the form flashes up and closes down when running from the command line. Is there anyway to hide the form whilst the command line is running? Some code does refer to controls so the gui would ne...
In your Main method you can create the form such as: ``` main = new MainForm(); ``` then do any command line processing required. When not in command line mode simply call: ``` Application.Run(main); ```
199,219
<p>Im getting frustrated because of OpenDNS and other services (ie: roadrunner) that now always returns a ping even if you type any invalid url ie: lkjsdaflkjdsjf.com --- I had created software for my own use that would ping a url to verify if the site was up or not. This no longer works. Does anyone have any ideas a...
[ { "answer_id": 199234, "author": "Sherm Pendley", "author_id": 27631, "author_profile": "https://Stackoverflow.com/users/27631", "pm_score": 2, "selected": false, "text": "<p><a href=\"http://www.gnu.org/software/wget/\" rel=\"nofollow noreferrer\">Wget</a> is a nice alternative. It will...
2008/10/13
[ "https://Stackoverflow.com/questions/199219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26685/" ]
Im getting frustrated because of OpenDNS and other services (ie: roadrunner) that now always returns a ping even if you type any invalid url ie: lkjsdaflkjdsjf.com --- I had created software for my own use that would ping a url to verify if the site was up or not. This no longer works. Does anyone have any ideas about ...
You could create a simple web page with an address bar for the website and some javascript that uses AJAX to hit a site. If you get any HTTP response other than 200 on the async callback, the site isn't working. ``` <html> <head> <script language="javascript" type="text/javascript"> <!-- var ajax =...
199,235
<p>I am using Oracle adapter from the BizTalk Adapter Pack (WCF based for BTS 2006 R2). In the configuration of the "solicit-response" send ports, I have used Oracle's username and password to connect to the database. </p> <p>Now I would like to change that and use the SSO. So far I have created the Affiliate applicat...
[ { "answer_id": 2384200, "author": "Sam", "author_id": 47636, "author_profile": "https://Stackoverflow.com/users/47636", "pm_score": 2, "selected": false, "text": "<p>You can add an SSO ticket in a custom pipeline component on the send port. The following code works for me:</p>\n\n<pre><c...
2008/10/13
[ "https://Stackoverflow.com/questions/199235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I am using Oracle adapter from the BizTalk Adapter Pack (WCF based for BTS 2006 R2). In the configuration of the "solicit-response" send ports, I have used Oracle's username and password to connect to the database. Now I would like to change that and use the SSO. So far I have created the Affiliate application and ma...
You can add an SSO ticket in a custom pipeline component on the send port. The following code works for me: ``` public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg) { ISSOTicket ssoTicket = new ISSOTicket(); pInMsg.Context.Write("SSOTicket", "http://schemas.microsoft.com/...
199,238
<p>I'm writing a lightweight XML editor, and in cases where the user's input is not well formed, I would like to indicate to the user where the problem is, or at least where the first problem is. Does anyone know of an existing algorithm for this? If looking at code helps, if I could fill in the FindIndexOfInvalidXml...
[ { "answer_id": 199327, "author": "theraccoonbear", "author_id": 7210, "author_profile": "https://Stackoverflow.com/users/7210", "pm_score": 2, "selected": false, "text": "<p>Unless this is an academic exercise, I think that writing your own XML parser is probably not the best way to go a...
2008/10/13
[ "https://Stackoverflow.com/questions/199238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27109/" ]
I'm writing a lightweight XML editor, and in cases where the user's input is not well formed, I would like to indicate to the user where the problem is, or at least where the first problem is. Does anyone know of an existing algorithm for this? If looking at code helps, if I could fill in the FindIndexOfInvalidXml meth...
I'd probably just cheat. :) This will get you a line number and position: ``` string s = "<?xml version=\"1.0\"?><tag1><tag2>Some text.</taagg2></tag1>"; System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); try { doc.LoadXml(s); } catch(System.Xml.XmlException ex) { MessageBox.Show(ex.LineNumber.ToStrin...
199,252
<p>I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role.</p> <p>I can think of two ways to design this: o...
[ { "answer_id": 199268, "author": "Levi Rosol", "author_id": 23458, "author_profile": "https://Stackoverflow.com/users/23458", "pm_score": 5, "selected": false, "text": "<p>how about creating a Permission table, then a UserPermission table to store the relationships?</p>\n\n<p>You'll neve...
2008/10/13
[ "https://Stackoverflow.com/questions/199252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27649/" ]
I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role. I can think of two ways to design this: one, with a...
I think it's a general rule of thumb to stay away from mystical bitstrings that encode the meaning of the universe. While perhaps clunkier, having a table of possible permissions, a table of users, and a link table between them is the best and clearest way to organize this. It also makes your queries and maintenance (...
199,263
<p>The title may not really explain what I'm really trying to get at, couldn't really think of a way to describe what I mean.</p> <p>I was wondering if it is good practice to check the arguments that a function accepts for nulls or empty before using them. I have this function which just wraps some hash creation like ...
[ { "answer_id": 199276, "author": "gnud", "author_id": 27204, "author_profile": "https://Stackoverflow.com/users/27204", "pm_score": 1, "selected": false, "text": "<p>If NULL is an inacceptable input, throw an exception. By yourself, like you did in your sample, so that the message is hel...
2008/10/13
[ "https://Stackoverflow.com/questions/199263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
The title may not really explain what I'm really trying to get at, couldn't really think of a way to describe what I mean. I was wondering if it is good practice to check the arguments that a function accepts for nulls or empty before using them. I have this function which just wraps some hash creation like so. ``` P...
In general, I'd suggest it's good practice to validate all of the arguments to public functions/methods before using them, and fail early rather than after executing half of the function. In this case, you're right to throw the exception. Depending on what your method is doing, failing early could be important. If you...
199,266
<p>How can I make xargs execute the command exactly once for each line of input given? It's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. </p> <blockquote> <p>From <a href="http://en.wikipedia.org/wiki/Xargs" rel="noreferrer">http://en.wikipedia.org/wik...
[ { "answer_id": 199270, "author": "Draemon", "author_id": 26334, "author_profile": "https://Stackoverflow.com/users/26334", "pm_score": 10, "selected": true, "text": "<p>The following will only work if you do not have spaces in your input:</p>\n\n<pre><code>xargs -L 1\nxargs --max-lines=1...
2008/10/13
[ "https://Stackoverflow.com/questions/199266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
How can I make xargs execute the command exactly once for each line of input given? It's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. > > From <http://en.wikipedia.org/wiki/Xargs>: > > > find /path -type f -print0 | xargs -0 rm > > > In this examp...
The following will only work if you do not have spaces in your input: ``` xargs -L 1 xargs --max-lines=1 # synonym for the -L option ``` from the man page: ``` -L max-lines Use at most max-lines nonblank input lines per command line. Trailing blanks cause an input line to be logically continued ...
199,333
<p>I was writing a program in C++ to find all solutions of <em>a</em><sup><em>b</em></sup> = <em>c</em>, where <em>a</em>, <em>b</em> and <em>c</em> together use all the digits 0-9 exactly once. The program looped over values of <em>a</em> and <em>b</em>, and it ran a digit-counting routine each time on <em>a</em>, <em...
[ { "answer_id": 199353, "author": "Jonathan Allen", "author_id": 5274, "author_profile": "https://Stackoverflow.com/users/5274", "pm_score": -1, "selected": false, "text": "<p>Inline assembly lets you check the overflow bit directly. If you are going to be using C++, you really should lea...
2008/10/13
[ "https://Stackoverflow.com/questions/199333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23732/" ]
I was writing a program in C++ to find all solutions of *a**b* = *c*, where *a*, *b* and *c* together use all the digits 0-9 exactly once. The program looped over values of *a* and *b*, and it ran a digit-counting routine each time on *a*, *b* and *ab* to check if the digits condition was satisfied. However, spurious ...
I see you're using unsigned integers. By definition, **in C** (I don't know about C++), unsigned arithmetic does not overflow ... so, at least for C, your point is moot :) With signed integers, once there has been overflow, [undefined behaviour](http://en.wikipedia.org/wiki/Undefined_behavior) (UB) has occurred and yo...
199,336
<p>How would I print a spinning curser in a utility that runs in a terminal using standard C?</p> <p>I'm looking for something that prints: \ | / - over and over in the same position on the screen?</p> <p>Thanks </p>
[ { "answer_id": 199344, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": true, "text": "<p>You could use the backspace character (<code>\\b</code>) like this:</p>\n\n<pre><code>printf(\"processing... |\");\nffl...
2008/10/13
[ "https://Stackoverflow.com/questions/199336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3467/" ]
How would I print a spinning curser in a utility that runs in a terminal using standard C? I'm looking for something that prints: \ | / - over and over in the same position on the screen? Thanks
You could use the backspace character (`\b`) like this: ``` printf("processing... |"); fflush(stdout); // do something printf("\b/"); fflush(stdout); // do some more printf("\b-"); fflush(stdout); ``` etc. You need the `fflush(stdout)` because normally stdout is buffered until you output a newline.
199,390
<p>I have an application used by pretty tech-savey people and they want small island of programmability so I've used embedded Iron Python.</p> <p>However, since IronPython 2.0 Eval() doesn't work any more. Specifically I can't both load modules and inject local variables.</p> <p>There is a work around where I can sti...
[ { "answer_id": 199406, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 3, "selected": true, "text": "<p>Could you be a little more specific about the problem, and maybe provide a code example? The \"eval\"-style functi...
2008/10/13
[ "https://Stackoverflow.com/questions/199390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460845/" ]
I have an application used by pretty tech-savey people and they want small island of programmability so I've used embedded Iron Python. However, since IronPython 2.0 Eval() doesn't work any more. Specifically I can't both load modules and inject local variables. There is a work around where I can still call Execute()...
Could you be a little more specific about the problem, and maybe provide a code example? The "eval"-style functionality is definitely still present, though as you've noticed, the hosting interface has changed considerably since 1.0. This works in beta 5: ``` ScriptEngine engine = Python.CreateEngine(); ScriptSource s...
199,418
<p>I have a C++ library that provides various classes for managing data. I have the source code for the library.</p> <p>I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time.</p> <p>I'm using GNU tool chain (gcc, glibc, etc), so language an...
[ { "answer_id": 199422, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": true, "text": "<p>Yes, this is certainly possible. You will need to write an interface layer in C++ that declares functions with <code>ex...
2008/10/13
[ "https://Stackoverflow.com/questions/199418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3467/" ]
I have a C++ library that provides various classes for managing data. I have the source code for the library. I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time. I'm using GNU tool chain (gcc, glibc, etc), so language and architecture sup...
Yes, this is certainly possible. You will need to write an interface layer in C++ that declares functions with `extern "C"`: ``` extern "C" int foo(char *bar) { return realFoo(std::string(bar)); } ``` Then, you will call `foo()` from your C module, which will pass the call on to the `realFoo()` function which is...
199,428
<p>I Have one entity [Project] that contains a collection of other entities [Questions].</p> <p>I have mapped the relation with a cascade attribute of &quot;all-delete-orphan&quot;.</p> <p>In my DB the relation is mapped with a project_id (FK) field on the questions table. this field cannot be null since I don't want a...
[ { "answer_id": 199474, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": -1, "selected": false, "text": "<p>The delete is occurring on the Project first and cascading to the Question, but the Project delete includes a null...
2008/10/13
[ "https://Stackoverflow.com/questions/199428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7595/" ]
I Have one entity [Project] that contains a collection of other entities [Questions]. I have mapped the relation with a cascade attribute of "all-delete-orphan". In my DB the relation is mapped with a project\_id (FK) field on the questions table. this field cannot be null since I don't want a Question without a Proj...
Straight from the [documentation](http://www.hibernate.org/hib_docs/nhibernate/html/example-parentchild.html#example-parentchild-cascades). This explains your problem exactly i believe: However, this code ``` Parent p = (Parent) session.Load(typeof(Parent), pid); // Get one child out of the set IEnumerator childEnume...
199,468
<p>Why am I getting an out of memory exception?</p> <p>So this dies in C# on the first time through:</p> <p><strong>splitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat));</strong> </p> <p>Where splitBitmaps is a List&lt;BitMap&gt; BUT this works in VB for at least 4 iterations:</p> <p><strong...
[ { "answer_id": 199497, "author": "Dave Markle", "author_id": 24995, "author_profile": "https://Stackoverflow.com/users/24995", "pm_score": 2, "selected": false, "text": "<p>Make sure that you're calling .Dispose() properly on your images, otherwise unmanaged resources won't be freed up. ...
2008/10/13
[ "https://Stackoverflow.com/questions/199468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21691/" ]
Why am I getting an out of memory exception? So this dies in C# on the first time through: **splitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat));** Where splitBitmaps is a List<BitMap> BUT this works in VB for at least 4 iterations: **arlSplitBitmaps.Add(Image.Clone(rectDimensions, Image.P...
Clone() may also throw an Out of memory exception when the coordinates specified in the Rectangle are outside the bounds of the bitmap. It will not clip them automatically for you.
199,469
<p>I need to change the capitalization of a set of files in a subversion working copy, like so:</p> <pre> svn mv test.txt Test.txt svn mv test2.txt Test2.txt svn mv testn.txt Testn.txt ... svn commit -m "caps" </pre> <p>How can I automate this process? Standard linux install tools available.</p>
[ { "answer_id": 199485, "author": "Andrew", "author_id": 826, "author_profile": "https://Stackoverflow.com/users/826", "pm_score": 0, "selected": false, "text": "<p>I typically do this by redirecting the 'ls' output to a file, using vim macros to massage each filename into the command lin...
2008/10/13
[ "https://Stackoverflow.com/questions/199469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27667/" ]
I need to change the capitalization of a set of files in a subversion working copy, like so: ``` svn mv test.txt Test.txt svn mv test2.txt Test2.txt svn mv testn.txt Testn.txt ... svn commit -m "caps" ``` How can I automate this process? Standard linux install tools available.
ls | awk '{system("svn mv " $0 " " toupper(substr($0,1,1)) substr($0,2))}' obviously, other scripting languages will work just as well. awk has the advantage that it it ubiquitous.
199,483
<p>This is the constraint I have on the Customers table.</p> <pre><code>ALTER TABLE Customers ADD CONSTRAINT CN_CustomerPhone CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]') </code></pre> <p>Why does this fail?</p> <pre><code>INSERT INTO Customers (CustomerName, Address, City, Sta...
[ { "answer_id": 199500, "author": "shahkalpesh", "author_id": 23574, "author_profile": "https://Stackoverflow.com/users/23574", "pm_score": 4, "selected": true, "text": "<p>Check the length of the Phone field.<br>\nIs it 15 or more characters?</p>\n\n<p>Using your code with a temp table h...
2008/10/13
[ "https://Stackoverflow.com/questions/199483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/100/" ]
This is the constraint I have on the Customers table. ``` ALTER TABLE Customers ADD CONSTRAINT CN_CustomerPhone CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]') ``` Why does this fail? ``` INSERT INTO Customers (CustomerName, Address, City, State, Zip, Phone) VALUES ('Some Name','...
Check the length of the Phone field. Is it 15 or more characters? Using your code with a temp table here ``` create table #temp (phone varchar(15)) ALTER TABLE #temp ADD CONSTRAINT CN_CustomerPhone CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]') INSERT INTO #temp (Phone) VA...
199,488
<p>For some reason I am having troubles with a DBI handle. Basically what happened was that I made a special connect function in a perl module and switched from doing:</p> <pre><code>do 'foo.pl' </code></pre> <p>to</p> <pre><code>use Foo; </code></pre> <p>and then I do</p> <pre><code>$dbh = Foo-&gt;connect; </cod...
[ { "answer_id": 199635, "author": "Axeman", "author_id": 11289, "author_profile": "https://Stackoverflow.com/users/11289", "pm_score": 3, "selected": true, "text": "<p>From <a href=\"http://perldoc.perl.org/perlfunc.html#do-EXPR\" rel=\"nofollow noreferrer\">perlfunc</a>:</p>\n\n<blockquo...
2008/10/13
[ "https://Stackoverflow.com/questions/199488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
For some reason I am having troubles with a DBI handle. Basically what happened was that I made a special connect function in a perl module and switched from doing: ``` do 'foo.pl' ``` to ``` use Foo; ``` and then I do ``` $dbh = Foo->connect; ``` And now for some reason I keep getting the error: > > Can't l...
From [perlfunc](http://perldoc.perl.org/perlfunc.html#do-EXPR): > > ``` > > do 'stat.pl'; > > is just like > > eval `cat stat.pl`; > > ``` > So when you `do 'foo.pl'`, you execute the code in the current context. Because I don't know what goes on in `foo.pl` or `Foo.pm`, I can't tell you wha...
199,498
<p>I'm just getting started working with foreign keys for the first time and I'm wondering if there's a standard naming scheme to use for them?</p> <p>Given these tables:</p> <pre><code>task (id, userid, title) note (id, taskid, userid, note); user (id, name) </code></pre> <p>Where Tasks have Notes, Tasks are owned ...
[ { "answer_id": 199504, "author": "EvilTeach", "author_id": 7734, "author_profile": "https://Stackoverflow.com/users/7734", "pm_score": 4, "selected": false, "text": "<p>How about <code>FK_TABLENAME_COLUMNNAME</code>?</p>\n\n<p><strong>K</strong>eep <strong>I</strong>t <strong>S</strong>i...
2008/10/13
[ "https://Stackoverflow.com/questions/199498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
I'm just getting started working with foreign keys for the first time and I'm wondering if there's a standard naming scheme to use for them? Given these tables: ``` task (id, userid, title) note (id, taskid, userid, note); user (id, name) ``` Where Tasks have Notes, Tasks are owned by Users, and Users author Notes....
The standard convention in SQL Server is: ``` FK_ForeignKeyTable_PrimaryKeyTable ``` So, for example, the key between notes and tasks would be: ``` FK_note_task ``` And the key between tasks and users would be: ``` FK_task_user ``` This gives you an 'at a glance' view of which tables are involved in the key, s...
199,499
<p>I'm creating a custom Java Struts tag that is for building and formatting an html select box in a standardised way (part of our usability guidelines).</p> <p>Each select box has an additional/initial value which describes the requirement of the value returned by the select element, i.e.:</p> <ul> <li><i>Mandatory<...
[ { "answer_id": 199507, "author": "caskey", "author_id": 114986, "author_profile": "https://Stackoverflow.com/users/114986", "pm_score": 2, "selected": false, "text": "<p>'multiplicity' would seem the right name.</p>\n\n<p>Looks like you're describing the following values:</p>\n\n<p>Manda...
2008/10/13
[ "https://Stackoverflow.com/questions/199499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6340/" ]
I'm creating a custom Java Struts tag that is for building and formatting an html select box in a standardised way (part of our usability guidelines). Each select box has an additional/initial value which describes the requirement of the value returned by the select element, i.e.: * *Mandatory* - with the label "Plea...
**NOTE: See EDIT below for a different approach than the one given here** How about `requirementConstraint`? ``` <my:customSelect requirementConstraint="Mandatory"> <option value="1">A</option> <option value="2">B</option> <option value="3">C</option> </my:customSelect> ``` Another possiblity is not to tri...
199,508
<p>Is it possible to show other processes in progress on an Oracle database? Something like Sybases <code>sp_who</code></p>
[ { "answer_id": 199523, "author": "jim", "author_id": 27628, "author_profile": "https://Stackoverflow.com/users/27628", "pm_score": 3, "selected": false, "text": "<p>After looking at sp_who, Oracle does not have that ability per se. Oracle has at least 8 processes running which run the d...
2008/10/14
[ "https://Stackoverflow.com/questions/199508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14952/" ]
Is it possible to show other processes in progress on an Oracle database? Something like Sybases `sp_who`
I suspect you would just want to grab a few columns from V$SESSION and the SQL statement from V$SQL. Assuming you want to exclude the background processes that Oracle itself is running ``` SELECT sess.process, sess.status, sess.username, sess.schemaname, sql.sql_text FROM v$session sess, v$sql sql WHERE ...
199,521
<p>I have a form with a "Clear" button.</p> <p>When the user clicks "Clear", I want to clear the value of all the visible elements on the form. In the case of date controls, I want to reset them to the current date.</p> <p>All of my controls are contained on a Panel.</p> <p>Right now, I'm doing this with the below ...
[ { "answer_id": 199540, "author": "theraccoonbear", "author_id": 7210, "author_profile": "https://Stackoverflow.com/users/7210", "pm_score": 1, "selected": false, "text": "<p>I've done something similar and this is basically how I went about doing it. The only change I might suggest woul...
2008/10/14
[ "https://Stackoverflow.com/questions/199521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
I have a form with a "Clear" button. When the user clicks "Clear", I want to clear the value of all the visible elements on the form. In the case of date controls, I want to reset them to the current date. All of my controls are contained on a Panel. Right now, I'm doing this with the below code. Is there an easier ...
You can skip the GetType and CType dance with [TryCast](http://msdn.microsoft.com/en-us/library/zyy863x8(VS.80).aspx): ``` Dim dtp as DateTimePicker = TryCast(ctrl, DateTimePicker) If dtp IsNot Nothing then dtp.Value = Now() ``` That'll save you about 10 lines. An [extension method](http://msdn.microsoft.com/en-us/...
199,527
<p><code>$0</code> is the variable for the top level Ruby program, but is there one for the current method?</p>
[ { "answer_id": 199550, "author": "Mark A. Nicolosi", "author_id": 1103052, "author_profile": "https://Stackoverflow.com/users/1103052", "pm_score": 5, "selected": false, "text": "<p>From <a href=\"http://snippets.dzone.com/posts/show/2785\" rel=\"noreferrer\">http://snippets.dzone.com/po...
2008/10/14
[ "https://Stackoverflow.com/questions/199527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757/" ]
`$0` is the variable for the top level Ruby program, but is there one for the current method?
Even better than my first answer you can use \_\_method\_\_: ``` class Foo def test_method __method__ end end ``` This returns a symbol – for example, `:test_method`. To return the method name as a string, call `__method__.to_s` instead. **Note:** This requires Ruby 1.8.7.
199,528
<p>I know how to program Console application with parameters, example : myProgram.exe param1 param2.</p> <p>My question is, how can I make my program works with |, example : echo "word" | myProgram.exe?</p>
[ { "answer_id": 199534, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 7, "selected": true, "text": "<p>You need to use <code>Console.Read()</code> and <code>Console.ReadLine()</code> as if you were reading user inp...
2008/10/14
[ "https://Stackoverflow.com/questions/199528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
I know how to program Console application with parameters, example : myProgram.exe param1 param2. My question is, how can I make my program works with |, example : echo "word" | myProgram.exe?
You need to use `Console.Read()` and `Console.ReadLine()` as if you were reading user input. Pipes replace user input transparently. You can't use both easily (although I'm sure it's quite possible...). **Edit:** A simple `cat` style program: ``` class Program { static void Main(string[] args) { stri...
199,537
<p>Newish to Oracle programming (from Sybase and MS SQL Server). What is the "Oracle way" to avoid filling the trans log with large updates?</p> <p>In my specific case, I'm doing an update of potentially a very large number of rows. Here's my approach:</p> <pre><code>UPDATE my_table SET a_col = null WHERE my_table_...
[ { "answer_id": 199578, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 0, "selected": false, "text": "<p>Any UPDATE is going to generate redo. Realistically, a single UPDATE that updates all the rows is going to generat...
2008/10/14
[ "https://Stackoverflow.com/questions/199537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14952/" ]
Newish to Oracle programming (from Sybase and MS SQL Server). What is the "Oracle way" to avoid filling the trans log with large updates? In my specific case, I'm doing an update of potentially a very large number of rows. Here's my approach: ``` UPDATE my_table SET a_col = null WHERE my_table_id IN (SELECT my_table...
The amount of updates to the redo and undo logs will not at all be reduced if you break up the UPDATE in multiple runs of, say 1000 records. On top of it, the total query time will be most likely be higher compared to running a single large SQL. There's no real way to address the UNDO/REDO log issue in UPDATEs. With I...
199,564
<p>My professor wrote this shell script to time my program, and display the results. For some reason it just outputs 0s with my program. He provided the following files:</p> <pre><code>timeit.csh sequence ecoli2500.txt ecoli3000.txt ecoli5000.txt ecoli7000.txt ecoli8000.txt ecoli9000.txt ecoli...
[ { "answer_id": 199592, "author": "Kyle Burton", "author_id": 19784, "author_profile": "https://Stackoverflow.com/users/19784", "pm_score": 0, "selected": false, "text": "<p>I'm not sure what the state of the environment (eg: PATH) or the state of the files and permissions are, but it cou...
2008/10/14
[ "https://Stackoverflow.com/questions/199564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
My professor wrote this shell script to time my program, and display the results. For some reason it just outputs 0s with my program. He provided the following files: ``` timeit.csh sequence ecoli2500.txt ecoli3000.txt ecoli5000.txt ecoli7000.txt ecoli8000.txt ecoli9000.txt ecoli10000.txt ``` ...
Fixed. The problem was here: ``` nice /usr/bin/time -p $program < ``` in the script. My computer doesn't execute shell scripts without a "./" before the command. My professors computer must be different. Changing the script to ``` nice /usr/bin/time -p ./$program < ``` Ran the program perfectly. I know for ce...
199,597
<p>I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each.</p> <p>I want to create a select drop down from the venues table.</p> <p>Right now I can display the venue each volunteer is assigned, but I want it to display the drop down box, w...
[ { "answer_id": 199614, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "<pre class=\"lang-php prettyprint-override\"><code>$query = &quot;SELECT volunteers_2009.id, volunteers_2009.comments, voluntee...
2008/10/14
[ "https://Stackoverflow.com/questions/199597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each. I want to create a select drop down from the venues table. Right now I can display the venue each volunteer is assigned, but I want it to display the drop down box, with the venue alr...
```php $query = "SELECT volunteers_2009.id, volunteers_2009.comments, volunteers_2009.choice1, volunteers_2009.choice2, volunteers_2009.choice3, volunteers_2009.lname, volunteers_2009.fname, volunteers_2009.venue_id, venues.venue_name FROM volunteers_2009 AS volunteers_2009 LEFT OUTER JOIN venues ON (volunteers_2009.ve...
199,603
<p>I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like...</p> <pre><code>x = 40 f = lambda { |y| x + y } save_for_later(f) </code></pre> <p>Later, in a separate run of the Ruby interpreter, I want to be able to say...<...
[ { "answer_id": 199617, "author": "Mark", "author_id": 26310, "author_profile": "https://Stackoverflow.com/users/26310", "pm_score": -1, "selected": false, "text": "<p>Ruby has the Marshal class that has a dump method that you can call.</p>\n<p>Take a look here:</p>\n<p><a href=\"http://r...
2008/10/14
[ "https://Stackoverflow.com/questions/199603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12887/" ]
I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like... ``` x = 40 f = lambda { |y| x + y } save_for_later(f) ``` Later, in a separate run of the Ruby interpreter, I want to be able to say... ``` f = load_from_before z...
**Use Ruby2Ruby** ``` def save_for_later(&block) return nil unless block_given? c = Class.new c.class_eval do define_method :serializable, &block end s = Ruby2Ruby.translate(c, :serializable) s.sub(/^def \S+\(([^\)]*)\)/, 'lambda { |\1|').sub(/end$/, '}') end x = 40 s = save_for_later { |y| x + y } #...
199,606
<p>C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declarations don't work correctly. Hence, this is OK in C, but n...
[ { "answer_id": 199618, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 4, "selected": true, "text": "<p>Why not just cast the result back to a Foo?</p>\n\n<pre><code>Foo x = Foo(Foo_First | Foo_Second);\n</code></pre>\n\n<p>...
2008/10/14
[ "https://Stackoverflow.com/questions/199606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3712/" ]
C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declarations don't work correctly. Hence, this is OK in C, but not ...
Why not just cast the result back to a Foo? ``` Foo x = Foo(Foo_First | Foo_Second); ``` EDIT: I didn't understand the scope of your problem when I first answered this question. The above will work for doing a few spot fixes. For what you want to do, you will need to define a | operator that takes 2 Foo arguments an...
199,608
<p>How can I rotate a layer using Core Animation around an arbitrary point? ( In my case a point that is not inside the layer I want to rotate )</p> <p>I prefer doing this without changing the anchor point, because unless I get something wrong every time I change the anchor point it also changes the position of the la...
[ { "answer_id": 199877, "author": "lajos", "author_id": 3740, "author_profile": "https://Stackoverflow.com/users/3740", "pm_score": 2, "selected": false, "text": "<p>You can do this by appending multiple transformations:</p>\n\n<ol>\n<li>translate the layer by (-rotCenterX, rotCenterY)</l...
2008/10/14
[ "https://Stackoverflow.com/questions/199608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407138/" ]
How can I rotate a layer using Core Animation around an arbitrary point? ( In my case a point that is not inside the layer I want to rotate ) I prefer doing this without changing the anchor point, because unless I get something wrong every time I change the anchor point it also changes the position of the layer. I tr...
I finaly did it by creating a new bigger layer with it's center at my rotation axis and setting the layer i want to rotate as it's sub layer. Then I rotate the bigger layer instead of the sub layer
199,612
<p>So far I've figured out how to pass Unicode strings, bSTRs, to and from a Euphoria DLL using a Typelib. What I can't figure out, thus far, is how to create and pass back an array of BSTRs.</p> <p>The code I have thus far (along with <code>include</code>s for EuCOM itself and parts of Win32lib):</p> <pre><code>glob...
[ { "answer_id": 211288, "author": "bugmagnet", "author_id": 426, "author_profile": "https://Stackoverflow.com/users/426", "pm_score": 0, "selected": false, "text": "<p>I've been in touch with the Euphoria people via their <a href=\"http://openeuphoria.org/EUforum/index.cgi?module=forum&am...
2008/10/14
[ "https://Stackoverflow.com/questions/199612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/426/" ]
So far I've figured out how to pass Unicode strings, bSTRs, to and from a Euphoria DLL using a Typelib. What I can't figure out, thus far, is how to create and pass back an array of BSTRs. The code I have thus far (along with `include`s for EuCOM itself and parts of Win32lib): ``` global function REALARR() sequence...
You should use the `create_safearray()` function. It's documented (hidden?) under Utilities. Basically, put your BSTR pointers into a sequence and pass it to `create_safearray()`: ``` sequence s, bstrs s = {"A", "B"} bstrs = {} for i = 1 to length(s) do bstrs &= alloc_bstr( s[i] ) end for atom array array = creat...
199,629
<p>I am working with an existing code base made up of some COM interfaces written in C++ with a C# front end. There is some new functionality that needs to be added, so I'm having to modify the COM portions. In one particular case, I need to pass an array (allocated from C#) to the component to be filled.</p> <p>What I...
[ { "answer_id": 199707, "author": "Gerald", "author_id": 19404, "author_profile": "https://Stackoverflow.com/users/19404", "pm_score": 0, "selected": false, "text": "<p>I don't know much about C# COM operability, but have you tried using SAFEARRAY(INT_PTR) or something similar?</p>\n" }...
2008/10/14
[ "https://Stackoverflow.com/questions/199629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5927/" ]
I am working with an existing code base made up of some COM interfaces written in C++ with a C# front end. There is some new functionality that needs to be added, so I'm having to modify the COM portions. In one particular case, I need to pass an array (allocated from C#) to the component to be filled. What I would li...
Hmmm... I've found some information that gets me closer... [Marshaling Changes - Conformant C-Style Arrays](http://msdn.microsoft.com/en-us/library/ek1fb3c6.aspx#cpconeditingmicrosoftintermediatelanguagemsilanchor1) This IDL declaration (C++) ``` HRESULT GetFoo([in] int bufferSize, [in, size_is(bufferSize)] int buff...
199,642
<p>I have a combo box on a WinForms app in which an item may be selected, but it is not mandatory. I therefore need an 'Empty' first item to indicate that no value has been set.</p> <p>The combo box is bound to a DataTable being returned from a stored procedure (I offer no apologies for Hungarian notation on my UI con...
[ { "answer_id": 199669, "author": "Mark", "author_id": 26310, "author_profile": "https://Stackoverflow.com/users/26310", "pm_score": 2, "selected": false, "text": "<p>Cant you add a new DataRow to the DataTable before you bind it to your DataSource?</p>\n<p>You can use the NewRow function...
2008/10/14
[ "https://Stackoverflow.com/questions/199642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
I have a combo box on a WinForms app in which an item may be selected, but it is not mandatory. I therefore need an 'Empty' first item to indicate that no value has been set. The combo box is bound to a DataTable being returned from a stored procedure (I offer no apologies for Hungarian notation on my UI controls :p )...
There are two things you can do: 1. Add an empty row to the `DataTable` that is returned from the stored procedure. ``` DataRow emptyRow = hierarchies.NewRow(); emptyRow["guid"] = ""; emptyRow["ObjectLogicalName"] = ""; hierarchies.Rows.Add(emptyRow); ``` Create a DataView and sort it using ObjectLogicalName column...
199,651
<p>I'm looking for a generic "Row Picker" for JQuery.</p> <p>We've all seen the cool "Picker" tools like date pickers, color pickers, time pickers, etc, where you click in a text box and a little calendar or color palate or clock or something comes up. You select something (like a date) and the text box is then popul...
[ { "answer_id": 199710, "author": "Duncan", "author_id": 25035, "author_profile": "https://Stackoverflow.com/users/25035", "pm_score": 3, "selected": true, "text": "<p>I don't know about totally generic though you can certainly achieve a row selector fairly easily in jQuery. </p>\n\n<pre...
2008/10/14
[ "https://Stackoverflow.com/questions/199651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27580/" ]
I'm looking for a generic "Row Picker" for JQuery. We've all seen the cool "Picker" tools like date pickers, color pickers, time pickers, etc, where you click in a text box and a little calendar or color palate or clock or something comes up. You select something (like a date) and the text box is then populated with a...
I don't know about totally generic though you can certainly achieve a row selector fairly easily in jQuery. ``` <script type="text/javascript"> $(function() { $('table#data_table tr').click(function() { alert($(this).find('td.id').html()); }); }); </script> <table border="0" id="data...
199,665
<p>I have a SOAP client in Ruby that I'm trying to get working with a Ruby SOAP server, to no avail. The client works fine over SSL with a Python SOAP server, but not with the Ruby version. Here's what the server looks like:</p> <pre><code>require 'soap/rpc/standaloneServer' require 'soap/rpc/driver' require 'rubygems...
[ { "answer_id": 199817, "author": "Chris Bunch", "author_id": 422, "author_profile": "https://Stackoverflow.com/users/422", "pm_score": 3, "selected": true, "text": "<p>Arg. I was trying to follow along <a href=\"http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/108292\" rel=\"n...
2008/10/14
[ "https://Stackoverflow.com/questions/199665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
I have a SOAP client in Ruby that I'm trying to get working with a Ruby SOAP server, to no avail. The client works fine over SSL with a Python SOAP server, but not with the Ruby version. Here's what the server looks like: ``` require 'soap/rpc/standaloneServer' require 'soap/rpc/driver' require 'rubygems' require 'htt...
Arg. I was trying to follow along [this link](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/108292) and it turns out I was missing a simple include statement: ``` require 'webrick/https' ``` That, combined with the help from the link in the original question solves the problem. Hopefully this saves som...
199,692
<p>I have only a basic knowledge of css, is it possible to inherit a property from one style into another style. So for instance I could inherit the font size specified in my default paragrah tag settings into my hyperlink tags.</p> <p>The reason I want to do this is to make it easier to maintain multiple styles.</p>
[ { "answer_id": 199714, "author": "leek", "author_id": 3765, "author_profile": "https://Stackoverflow.com/users/3765", "pm_score": 4, "selected": true, "text": "<p>You can define common styles for two elements at once like so:</p>\n\n<pre><code>p, a {\n font-size: 1em;\n}\n</code></pre...
2008/10/14
[ "https://Stackoverflow.com/questions/199692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16989/" ]
I have only a basic knowledge of css, is it possible to inherit a property from one style into another style. So for instance I could inherit the font size specified in my default paragrah tag settings into my hyperlink tags. The reason I want to do this is to make it easier to maintain multiple styles.
You can define common styles for two elements at once like so: ``` p, a { font-size: 1em; } ``` And then extend each one with their individual properties as you want: ``` p { color: red; } a { font-weight: bold; } ``` **Keep in mind:** Styles defined later in a style sheet generally override properties...
199,718
<p>Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string.</p> <p>Use Object Initializers to create an Anonymous Type:</p> <pre><code>var person = new { ...
[ { "answer_id": 199748, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<p>What is the application for this?</p>\n\n<p>I would not go down this road for a few reasons. </p>\n\n<ul>\n<li><p>First; it...
2008/10/14
[ "https://Stackoverflow.com/questions/199718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7831/" ]
Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string. Use Object Initializers to create an Anonymous Type: ``` var person = new { FirstName = "Chris"...
There are languages for .NET that have duck-typing but it's not possible with C# using Dot.Notation since C# requires that all member references are resolved at compile time. If you want to use the Dot.Notation, you still have to define a class somewhere with the required properties, and use whatever method you want to...
199,728
<p>How do I set gc.reflogExpire so that items will never expire?<br> What other time interval formats does it accept?</p> <p>The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.</p>
[ { "answer_id": 199927, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 3, "selected": false, "text": "<p>I’m not sure where the format is documented, if at all, but <code>git reflog</code> uses the <code>approxidat...
2008/10/14
[ "https://Stackoverflow.com/questions/199728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
How do I set gc.reflogExpire so that items will never expire? What other time interval formats does it accept? The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.
Setting gc.refLogExpire to "never" should do the trick. ``` git config gc.reflogExpire "never" ```
199,747
<p>Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run?</p> <p>Also in the dreaded case of actual overflow what happens? </p> <p>Does it crash, trigger an exception or signal? Is there a standard or is it different on all systems and compiler...
[ { "answer_id": 199809, "author": "jussij", "author_id": 14738, "author_profile": "https://Stackoverflow.com/users/14738", "pm_score": 4, "selected": false, "text": "<p>On <strong>Windows</strong> a stack overflow <strong>exception</strong> will be generated.</p>\n\n<p>The following windo...
2008/10/14
[ "https://Stackoverflow.com/questions/199747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13676/" ]
Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run? Also in the dreaded case of actual overflow what happens? Does it crash, trigger an exception or signal? Is there a standard or is it different on all systems and compilers? I'm looking s...
On **Windows** a stack overflow **exception** will be generated. The following windows code illustrates this: ``` #include <stdio.h> #include <windows.h> void StackOverFlow() { CONTEXT context; // we are interested control registers context.ContextFlags = CONTEXT_CONTROL; // get the details GetThreadCont...
199,761
<p><sup><strong>Note:</strong> This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).</sup></p> <p>We're building a web API that's programmatically generated from a C# class. The class has method <code>GetFooBar(int a, int b)</code> and the API has a method <code>GetFooBa...
[ { "answer_id": 199765, "author": "Kalid", "author_id": 109, "author_profile": "https://Stackoverflow.com/users/109", "pm_score": 6, "selected": false, "text": "<p>From this site:</p>\n<p><a href=\"https://www.tek-tips.com/viewthread.cfm?qid=1500861\" rel=\"nofollow noreferrer\">https://w...
2008/10/14
[ "https://Stackoverflow.com/questions/199761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109/" ]
**Note:** This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4). We're building a web API that's programmatically generated from a C# class. The class has method `GetFooBar(int a, int b)` and the API has a method `GetFooBar` taking query params like `&a=foo &b=bar`. The...
Surprised no one mentioned C# 4.0 optional parameters that work like this: ``` public void SomeMethod(int a, int b = 0) { //some code } ``` **Edit:** I know that at the time the question was asked, C# 4.0 didn't exist. But this question still ranks #1 in Google for "C# optional arguments" so I thought - this answ...
199,769
<p>I'm on a Hardy Heron Ubuntu build, BTW.</p>
[ { "answer_id": 199810, "author": "andy", "author_id": 6152, "author_profile": "https://Stackoverflow.com/users/6152", "pm_score": 0, "selected": false, "text": "<p>Hate to give this answer, because it isn't very helpful, but it works fine for me (scroll wheel in gvim on ubuntu hardy).\n<...
2008/10/14
[ "https://Stackoverflow.com/questions/199769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20273/" ]
I'm on a Hardy Heron Ubuntu build, BTW.
Try: :set mouse=a ":help mouse" says ``` Enable the use of the mouse. Only works for certain terminals (xterm, MS-DOS, Win32 |win32-mouse|, qnx pterm, and Linux console with gpm). For using the mouse in the GUI, see |gui-mouse|. The mouse can be enabled for different modes: n Normal mode v Visual mode ...
199,774
<p>I'm trying to get a postgres jdbc connection working in eclipse. It would be nice to use the Data Source Explorer, but for now I'm just trying to get a basic connection. What I have done so far is download the postgres JDBC connector. I then tried two different things. First, Preferences-> Data Management, I tried t...
[ { "answer_id": 211512, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "<p>Here's one way to get PostgreSQL connectivity to your application:</p>\n\n<ol>\n<li>Get an instance of <code>org.postgresq...
2008/10/14
[ "https://Stackoverflow.com/questions/199774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27689/" ]
I'm trying to get a postgres jdbc connection working in eclipse. It would be nice to use the Data Source Explorer, but for now I'm just trying to get a basic connection. What I have done so far is download the postgres JDBC connector. I then tried two different things. First, Preferences-> Data Management, I tried to a...
This is how I have made a connection: (I do not know if this is "best practice", but it works.) Importing the driver: 1. Right click on your project 2. Choose property 3. Choose `Java build path` 4. Choose `Add external JARS..` and select the location to the JDBC driver. Here is my code: ``` try{ Class.forName(...