unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
What exactly does REST mean? What is it, and why is it getting big now?
===
I <del>understand (I think) the basic idea behind RESTful-ness. Use HTTP methods semantically - GET gets, PUT puts, DELETE deletes, etc... Right?</del> thought I understood the idea behind REST, but I think I'm confusing that with the details of an HTTP implementation. What is the driving idea behind rest, why is this becoming an important thing? Have people actually been using it for a long time, in a corner of the internets that my flashlight never shined upon? | 0 | [
2,
98,
1890,
630,
760,
884,
60,
98,
25,
32,
15,
17,
483,
25,
32,
1017,
580,
130,
60,
800,
3726,
3726,
31,
13,
1,
3436,
1,
4579,
10731,
13,
5,
49,
277,
6,
14,
2125,
882,
439,
760,
1566,
8,
720,
9,
275,
7775,
3195,
17220,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting FetchMode in native Hibernate
===
I need to set the fetch mode on my hibernate mappings to be eager in some cases, and lazy in others. I have my default (set through the hbm file) as lazy="true". How do I override this setting in code? MyClass has a set defined of type MyClass2 for which I want to set the FetchMode to EAGER.
Currently, I have something like:
Session s = HibernateUtil.getSessionFactory().openSession();
MyClass c = (MyClass)session.get(MyClass.class, myClassID);
| 0 | [
2,
2697,
18312,
15570,
19,
1275,
4148,
2102,
8820,
800,
3726,
3726,
31,
376,
20,
309,
14,
18312,
3740,
27,
51,
4148,
2102,
8820,
13305,
18,
20,
44,
8705,
19,
109,
1871,
15,
17,
16792,
19,
654,
9,
31,
57,
51,
12838,
13,
5,
3554,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you pass "this" to the constructor for ObjectDataProvider in XAML?
===
How do you pass "this" to the constructor for ObjectDataProvider in XAML.
Lets say my presenter class is:
public class ApplicationPresenter(IView view){}
and that my UserControl implements IView.
What do I pass to the ConstructorParameters in the code below so that the UserControl can create the ApplicationPresenter using the default constructor?
<ObjectDataProvider x:Key="ApplicationPresenterDS"
ObjectType="{x:Type Fenix_Presenters:ApplicationPresenter}"
ConstructorParameters="{ ?? what goes here ??}" d:IsDataSource="True" />
I only need to do this so that I can use Blend 2. I know that I can do this in the code behind, but if I do I can't instantiate the class from within Blend. I also know that I can create a parameterless constructor for ApplicationPresenter and pass it a dummy class that implements IView, but I would rather do this in markup if at all possible.
My code behind at the moment is:
public MyUserControl()
{
InitializeComponent();
DataContext = new ApplicationPresenter(this);
} | 0 | [
2,
184,
107,
42,
1477,
13,
7,
1565,
7,
20,
14,
6960,
248,
26,
3095,
18768,
26735,
139,
19,
13,
6791,
8184,
60,
800,
3726,
3726,
184,
107,
42,
1477,
13,
7,
1565,
7,
20,
14,
6960,
248,
26,
3095,
18768,
26735,
139,
19,
13,
6791,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Way to handle/consolidate multiple Logins?
===
this is the scenario:
multiple web systems (mostly lampp/wampp) exist, most of them with separate login information, (some share it). We're considering the benefits/disadvantages of unifying them somehow, or at least making handling the user administration parts easier.
Due to the nature of some systems (its a mixed bag of custom OSS systems,internally developed software and 3rd party commercial software) we can't unify all login-screens into a single screen.
A idea passed around is a sort of login master brain were we can control all user name creation,permissions,inactivation, etc. This will still make people have to manually log in into every system, but at least it'll make the administrative load of user management easier.
Are there any known solutions to this kind of problem that involves (necesarily, it could be considered) changing the least amount of code/systems possible? | 0 | [
2,
246,
161,
20,
3053,
118,
1126,
23666,
1373,
1886,
2205,
17040,
60,
800,
3726,
3726,
48,
25,
14,
12705,
45,
1886,
2741,
1242,
13,
5,
18397,
6792,
306,
118,
1608,
79,
3421,
6,
3182,
15,
127,
16,
105,
29,
1725,
6738,
108,
676,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I'm getting blank pages instead of error messages using classic ASP, IIS6 and WinServer 2003 R2
===
We have an old system running on a WinServer2003 R2 - IIS6 and it was written using classic ASP.
We need to trap all errors and for that, I configured IIS to redirect 404s and 500s to a custom page (custom errors config) that writes the info to a log file.
Here is the weird thing: The first time the error occurs, the page is redirected and I get my log file entry. But, if this page is loaded again (I hit F5, or other user goes there, etc), the browser receives a blank page: no error message and my custom page is ever called.
If I restart IIS6 I get the same behavior, first time it works, next not.
-> Send ASP errors to browser is turned on
-> Show friendly http errors is turned off in my explorer
Any thoughts?
| 0 | [
2,
31,
22,
79,
1017,
6463,
4434,
700,
16,
7019,
7561,
568,
2732,
28,
306,
15,
595,
18,
379,
17,
628,
10321,
106,
973,
761,
135,
800,
3726,
3726,
95,
57,
40,
315,
329,
946,
27,
21,
628,
10321,
106,
3325,
761,
135,
13,
8,
595,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIWebView Expose Objective C to JavaScript
===
How would I expose an Objective C method within JavaScript when using the iPhone SDK when using the UIWebView?
Any help would be appreciated! | 0 | [
2,
13,
5661,
14113,
4725,
13833,
7038,
272,
20,
8247,
8741,
800,
3726,
3726,
184,
83,
31,
13833,
40,
7038,
272,
2109,
363,
8247,
8741,
76,
568,
14,
21024,
13,
18,
43,
197,
76,
568,
14,
13,
5661,
14113,
4725,
60,
186,
448,
83,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Limiting File Attachments to a SQL Server 2005 DB to a value > 8000 bytes
===
I have a .Net app that will allow the users to attach files to a SQL Server 2005 database. I want to limit the filesize to 10MB, so from what I can tell, I have to declare the datatype varbinary(max), since the max size I can actually specify is 8000 bytes. But the ~2GB filesize varbinary(max) allows seems like overkill. Is there a way for me to limit it at 10MB in the database, or do I just need to check that they're not trying to attach something larger on the frontend. | 0 | [
2,
17567,
3893,
14575,
18,
20,
21,
4444,
255,
8128,
812,
13,
9007,
20,
21,
1923,
13,
1,
13,
28064,
34,
3231,
800,
3726,
3726,
31,
57,
21,
13,
9,
2328,
4865,
30,
129,
1655,
14,
3878,
20,
19514,
6488,
20,
21,
4444,
255,
8128,
81... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Decimal Textbox in Windows Forms
===
I am doing an Financial Winforms application and am having some trouble with the controls.
My customer needs to insert decimal values all over the place (Prices, Discounts etc) and I'd like to avoid some of the repeating validation.
So I immediately tried the MaskedTextBox that would fit my needs (with a Mask like "€ 00000.00"), if it weren't for the focus and the length of the mask.
I can't predict how big the numbers are my customer is going to enter into the app.
I also can't expect him to start everything with 00 to get to the comma. Everything should be keyboard-friendly.
Am I missing something or is there simply no way (beyond writing a custom control) to achieve this with the standard Windows Forms controls? | 0 | [
2,
26380,
1854,
5309,
19,
1936,
1997,
800,
3726,
3726,
31,
589,
845,
40,
1553,
628,
4190,
18,
3010,
17,
589,
452,
109,
2572,
29,
14,
8671,
9,
51,
7705,
2274,
20,
14692,
26380,
4070,
65,
84,
14,
209,
13,
5,
24137,
18,
15,
14691,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Profiling VBA code for word
===
I have some legacy code that uses VBA to parse a word document and build some XML output;
Needless to say it runs like a dog but I was interested in profiling it to see where it's breaking down and maybe if there are some options to make it faster.
I don't want to try anything until I can start measuring my results so profiling is a must - I've done a little searching around but can't find anything that would do this job easily. There was one tool by brentwood? that requires modifying your code but it didn't work and I ran outa time.
Anyone know anything simple that works? | 0 | [
2,
8721,
49,
802,
566,
969,
1797,
26,
833,
800,
3726,
3726,
31,
57,
109,
7780,
1797,
30,
2027,
566,
969,
20,
2017,
870,
21,
833,
4492,
17,
1895,
109,
23504,
5196,
73,
17023,
18,
20,
395,
32,
1461,
101,
21,
1952,
47,
31,
23,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Capture Keystrokes on Symbian OS?
===
How would one go about capturing users keystrokes in the SMS composer on the Symbian OS, specifically for a Nokia N73 (or any of the symbian supported devices http://en.wikipedia.org/wiki/Symbian_OS#Devices_that_have_used_the_Symbian_OS)? I'm new to symbian development and I'm trying to write an application to analyse writing styles of those who send SMSs. Any information (or push in the right direction) would be great.
Many Thanks,
A | 0 | [
2,
3683,
1246,
12962,
18,
27,
13,
7261,
10035,
13,
759,
60,
800,
3726,
3726,
184,
83,
53,
162,
88,
12859,
3878,
1246,
12962,
18,
19,
14,
7613,
18,
3039,
27,
14,
13,
7261,
10035,
13,
759,
15,
3524,
26,
21,
24294,
13,
103,
4440,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle PL/SQL Query Order By issue
===
Does anyone know what is wrong with this query?
SELECT DISTINCT c.CN as ClaimNumber,
a.ItemDate as BillReceivedDate, c.DTN as
DocTrackNumber
FROM ItemData a,
ItemDataPage b,
KeyGroupData c
WHERE a.ItemTypeNum in (112, 113, 116, 172, 189)
AND a.ItemNum = b.ItemNum
AND b.ItemNum = c.ItemNum
ORDER BY a.DateStored DESC;
I have done T-Sql most of my career and this looks correct to me, however this query is for an Oracle database and Toad just places the cursor on the a.DateStored in the Order By section. I'm sure this is elementary for anyone doing PL/SQL.
Thanks!
| 0 | [
2,
15759,
12443,
118,
18,
22402,
25597,
389,
34,
1513,
800,
3726,
3726,
630,
1276,
143,
98,
25,
1389,
29,
48,
25597,
60,
5407,
4421,
272,
9,
9881,
28,
2632,
16299,
15,
21,
9,
2119,
79,
8209,
28,
1071,
27700,
8209,
15,
272,
9,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle Hierarchical Query Performance
===
We're looking at using Oracle Hierarchical queries to model potentially very large tree structures (potentially infinitely wide, and depth of 30+). My understanding is that hierarchal queries provide a method to write recursively joining SQL but they it does not provide any real performance enhancements over if you were to manually write an equivalent query... is this the case? What sort of experiences have people had, performance wise, with using oracle hierarchical queries? | 0 | [
2,
15759,
21376,
4272,
25597,
956,
800,
3726,
3726,
95,
22,
99,
699,
35,
568,
15759,
21376,
4272,
9386,
2829,
20,
1061,
9465,
253,
370,
1541,
3815,
13,
5,
4296,
10107,
102,
9698,
102,
1051,
15,
17,
5204,
16,
712,
2430,
6,
9,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Accessing more than one data provider in a data layer
===
I'm working on a business application which is being developed using DDD philosophy. Database is accessed through NHibernate and data layer is implemented using DAO pattern.
The UML class diagram is shown below.
![UML Class Diagram][1]
[http://img266.imageshack.us/my.php?image=classdiagramhk0.png][1]
I don't know the design is good or not. What do you think?
But the problem is not the design is good or not. The problem is,
After starting up the application an `IDaoFactory` is instantiated in presentation layer and send as parameter to presenter classes(which is designed using MVC pattern) as below
...
IDaoFactory daoFactory = new NHibernateDaoFactory(); //instantiation in main class
...
SamplePresenterClass s = new SamplePresenterClass(daoFactory);
...
Using just one data provider (which was just one database) was simple. But now we should get data from XML too. And next phases of the development we should connect to different web services and manipulate incoming and outgoing data.
The data from XML is going to be got using a key which is an enum. We add a class named `XMLLoader` to the data layer and add an interface `ILoader` to the domain. `XMLLoader` has a method whose signature is
List<string> LoadData(LoaderEnum key)
If we instantiate ILoader with XMLLoader in presentation layer as below we have to send it to objects which is going to get some XML data from data layer.
ILoader loader = new XMLLoader();
SamplePresenterClass s = new SamplePresenterClass(daoFactory, xmlLoader);
After implementing web service access classes
SamplePresenterClass s = new SamplePresenterClass(daoFactory, xmlLoader, sampleWebServiceConnector1, sampleWebServiceConnector2, ...);
The parameters is going to be grown in time. I think i can hold all instances of data access objects in a class and pass it to required presenters (maybe singleton pattern can helps too). In domain layer there must be a class like this,
public class DataAccessHolder
{
private IDaoFactory daoFactory;
private ILoader loader;
...
public IDaoFactory DaoFactory
{
get { return daoFactory; }
set { daoFactory = value; }
}
...
}
In main class the instantiation can be made with this design as follows
DataAccessHolder dataAccessHolder = new DataAccessHolder();
dataAccessHolder.DaoFactory = new NHibernateDaoFactory();
dataAccessHolder.Loader = new XMLLoader();
...
SamplePresenterClass s = new SamplePresenterClass(dataAccessHolder);
What do you think about this design or can you suggest me a different one?
Thanks for all repliers...
[1]: http://img266.imageshack.us/my.php?image=classdiagramhk0.png | 0 | [
2,
1381,
68,
91,
119,
53,
1054,
11747,
19,
21,
1054,
5385,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
508,
3010,
56,
25,
142,
885,
568,
13,
43,
8096,
3177,
9,
6018,
25,
12904,
120,
12109,
15191,
8820,
17,
1054,
5385,
25,
6807,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Problem sending emails with lotus domino server
===
We have been using lotus domino server for sending out emails for a number of years but out of a sudden. It cannot send out emails anymore.
Anyone have any idea on how to check whether is there any misconfiguration done or is there any logs for this ? | 0 | [
2,
1448,
4907,
8517,
18,
29,
15175,
23320,
8128,
800,
3726,
3726,
95,
57,
74,
568,
15175,
23320,
8128,
26,
4907,
70,
8517,
18,
26,
21,
234,
16,
122,
47,
70,
16,
21,
4224,
9,
32,
1967,
2660,
70,
8517,
18,
3375,
9,
1276,
57,
186... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
adodb and access changing ® to ®
===
i connecting to a access database with php and adodb. Strings with characters like ® are saved in the database as ® .
What can i do to store it correctly?
| 0 | [
2,
21,
537,
9007,
17,
1381,
4226,
13,
1,
20,
21,
1,
800,
3726,
3726,
31,
6440,
20,
21,
1381,
6018,
29,
13,
26120,
17,
21,
537,
9007,
9,
7887,
29,
1766,
101,
13,
1,
50,
4377,
19,
14,
6018,
28,
21,
1,
13,
9,
98,
92,
31,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to reliably get row index in JTable from MouseEvent ?
===
I want to find out at whih row of JTable the user clicked.
How to do it ? | 0 | [
2,
184,
20,
13,
19003,
4801,
164,
3131,
4348,
19,
487,
5924,
37,
7567,
4943,
38,
13,
60,
800,
3726,
3726,
31,
259,
20,
477,
70,
35,
13,
9373,
252,
3131,
16,
487,
5924,
14,
4155,
15802,
9,
184,
20,
107,
32,
13,
60,
3,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Rendering strategy for a window system in XNA (RenderTarget performance)
===
I'm currently creating a window system for XNA games from scratch. I'm developing primarily for Windows, but who knows what platforms I might support in the future. Feel free to answer if you know this for native Direct3D, since the performance semantics should be similar. If possible, consider what would change if the target platform was X-Box 360.
I'm making good progress, but now I am unsure on how to exactly render the windows. I came up with four approaches:
* Just render all controls directly onto the screen. This is what I do now. Controls can be animated by blending between states as long as they are not semi-transparent. I did not find a good way to animate between an arbitrary number of states (suppose a button that is currently animating from button-up to button-down and from mouse-out to mouse-over, and then it is being disabled. It should smoothly blend from its last state to the new state. With this approach, this only works if one animation is played after the last one finished, or you'll have jumps in animation.
* Render each top-level window and all controls into a render target, and then use that to render the top-level windows with semi-transparency onto the screen. This makes semi-transparency at top-level work and is easy to manage, but doesn't change the thing with the animations.
* Render each control into a render target, which is only updated when the control becomes dirty (i.e. must animate or the text has been changed). This way, per-control semi-transparency would work.
* Like the previous, but in addition to solve the animation problem have a second render target for each control. Whenever an animation starts, swap render targets, so we have the state when the animation starts, and blend it with the destination state into the other render target. This should not add overhead over the previous approach, we just had twice as many render targets, of which in any given frame only one would be rendered to (at maximum). But here comes the problem: For this to work, I would need to have the "old" render target preserve its contents. This should work with good performance on Windows, but appears to have a serious performance impact on X-Box 360. On the other hand, the "preserve" bit is only necessary while an animation is active.
And here come the actual questions. Anything that clarifies is welcome. With the performance questions, remember that this would just be the window system of a game - the game behind might use many render targets and suck up performance as well, and likely much more than the window system. Assume that we might have five top-level windows with 20-40 controls each on the screen in absolute worst-case.
- Which of these approaches, if any, would you recommend and why? Feel free, of course, to add another approach.
- Is there a performance impact when just having let's say 200 or 400 render targets available, provided that only maybe 20 of them are being rendered to each frame?
- Is the performance impact of PreserveContents really that bad on X-Box 360? How bad is it on Windows?
- The RenderTarget2D.RenderTargetUsage property can be written to. Is switching this at runtime a good idea, to enable PreserveContents only as needed?
- Would you (as a player) mind if control animations would jump in certain situations, like hovering over a button, moving the mouse out and then in again, so the "normal->hover" animation is played twice from the beginning because it is slower than you? | 0 | [
2,
15307,
4427,
26,
21,
1463,
329,
19,
993,
325,
13,
5,
99,
16706,
3958,
3060,
956,
6,
800,
3726,
3726,
31,
22,
79,
871,
2936,
21,
1463,
329,
26,
993,
325,
466,
37,
12395,
9,
31,
22,
79,
3561,
2257,
26,
1936,
15,
47,
72,
362... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Remove duplicate from a table
===
The database type is PostGres 8.3.
If I wrote:
SELECT field1, field2, field3, count(*)
FROM table1
GROUP BY field1, field2, field3 having count(*) > 1;
I have some rows that have a count over 1. How can I take out the duplicate (I do still want 1 row for each of them instead of +1 row... I do not want to delete them all.)
Example:
1-2-3
1-2-3
1-2-3
2-3-4
4-5-6
Should become :
1-2-3
2-3-4
4-5-6
*The only answer I found is [there][1] but I am wondering if I could do it without hash column.*
**Warning**
I do not have a PK with an unique number so I can't use the technique of min(...). The PK is the 3 fields.
[1]: http://www.siafoo.net/article/64 | 0 | [
2,
4681,
19429,
37,
21,
859,
800,
3726,
3726,
14,
6018,
1001,
25,
678,
6879,
18,
469,
9,
240,
9,
100,
31,
738,
45,
5407,
575,
165,
15,
575,
135,
15,
575,
240,
15,
2468,
5,
2483,
6,
37,
859,
165,
214,
34,
575,
165,
15,
575,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CTimeSpan.GetDays() and daylight savings time
===
I found in a bug in an old C++ MFC program we have that calculates an offset (in days) for a given date from a fixed base date. We were seeing results that were off by one for some reason, and I tracked it down to where the original programmer had used the CTimeSpan.GetDays() method. According to the [documentation][1]:
> Note that Daylight Savings Time can cause GetDays to return a potentially surprising result. For example, when DST is in effect, GetDays reports the number of days between April 1 and May 1 as 29, not 30, because one day in April is shortened by an hour and therefore does not count as a complete day.
My proposed fix is to use `(obj.GetTotalHours()+1)/24` instead. I think that would cover all the issues since this is a batch job that runs at about the same time every day, but I thought I'd ask the smart people here before implementing it if there might be a better way.
[1]: http://msdn.microsoft.com/en-us/library/14zezc9x.aspx | 0 | [
2,
272,
891,
18,
3206,
9,
3060,
1185,
18,
5,
6,
17,
12344,
12135,
85,
800,
3726,
3726,
31,
216,
19,
21,
6256,
19,
40,
315,
272,
20512,
307,
7061,
625,
95,
57,
30,
18469,
18,
40,
17493,
13,
5,
108,
509,
6,
26,
21,
504,
1231,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When will my BackgroundWorker instance be garbage collected
===
consider this code block
public void ManageInstalledComponentsUpdate()
{
IUpdateView view = new UpdaterForm();
BackgroundWorker worker = new BackgroundWorker();
Update update = new Update();
worker.WorkerReportsProgress = true;
worker.WorkerSupportsCancellation = true;
worker.DoWork += new DoWorkEventHandler(update.DoUpdate);
worker.ProgressChanged += new ProgressChangedEventHandler(view.ProgressCallback);
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(view.CompletionCallback);
worker.RunWorkerAsync();
Application.Run(view as UpdaterForm);
}
It all works great but I wnat to understand why the objects (worker,view and update) don't get garbage collected
| 0 | [
2,
76,
129,
51,
2395,
22560,
4851,
44,
15024,
3674,
800,
3726,
3726,
3563,
48,
1797,
1921,
317,
11364,
4705,
108,
21300,
69,
11103,
849,
14128,
576,
8209,
5,
6,
13,
1,
31,
576,
8209,
4725,
1418,
800,
78,
11100,
139,
4190,
5,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to fake a validation error in a MonoRail controller unit-test?
===
I am running on Castle's trunk, and trying to unit-test a controller-action where validation of my DTO is set up. The controller inherits from SmartDispatcherController. The action and DTO look like:
<pre><code>
[AccessibleThrough(Verb.Post)]
public void Register([DataBind(KeyReg, Validate = true)] UserRegisterDto dto)
{
CancelView();
if (HasValidationError(dto))
{
Flash[KeyReg] = dto;
Errors = GetErrorSummary(dto);
RedirectToAction(KeyIndex);
}
else
{
var user = new User { Email = dto.Email };
// TODO: Need to associate User with an Owning Account
membership.AddUser(user, dto.Password);
RedirectToAction(KeyIndex);
}
}
public class UserRegisterDto
{
[ValidateNonEmpty]
[ValidateLength(1, 100)]
[ValidateEmail]
public string Email { get; set; }
[ValidateSameAs("Email")]
public string EmailConfirm { get; set; }
[ValidateNonEmpty]
public string Password { get; set; }
[ValidateSameAs("Password")]
public string PasswordConfirm { get; set; }
// TODO: validate is not empty Guid
[ValidateNonEmpty]
public string OwningAccountIdString { get; set; }
public Guid OwningAccountId
{
get { return new Guid(OwningAccountIdString); }
}
[ValidateLength(0, 40)]
public string FirstName { get; set; }
[ValidateLength(0, 60)]
public string LastName { get; set; }
}
</code></pre>
The unit test looks like:
<pre><code>
[Fact]
public void Register_ShouldPreventInValidRequest()
{
PrepareController(home, ThorController.KeyPublic, ThorController.KeyHome, HomeController.KeyRegister);
var dto = new UserRegisterDto { Email = "ff" };
home.Register(dto);
Assert.True(Response.WasRedirected);
Assert.Contains("/public/home/index", Response.RedirectedTo);
Assert.NotNull(home.Errors);
}
</code></pre>
("home" is my HomeController instance in the test; home.Errors holds a reference to an ErrorSummary which should be put into the Flash when there's a validation error).
I am seeing the debugger think that dto has no validation error; it clearly should have several failures, the way the test runs.
I have read [Joey's blog post on this](http://joeydotnet.com/blog/archive/2007/10/25/monorail-controller-test-analysis---problem-and-resolution.aspx), but it looks like the Castle trunk has moved on since this was written. Can someone shed some light, please? | 0 | [
2,
184,
20,
7031,
21,
27999,
7019,
19,
21,
4129,
7301,
9919,
1237,
8,
10543,
60,
800,
3726,
3726,
31,
589,
946,
27,
1339,
22,
18,
6436,
15,
17,
749,
20,
1237,
8,
10543,
21,
9919,
8,
8645,
113,
27999,
16,
51,
13,
43,
262,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Easiest way to copy an entire SQL server Database from a server to local SQL Express
===
I need to copy an entire database from a SQL Server 2005 on my server over to my local SQL Express in order to run my application for a presentation. What is the fastest/easiest way to get this done?
EDIT: I have very limited access to my server so I don't think I can access the backup file that I could create so that is out. | 0 | [
2,
27237,
161,
20,
4344,
40,
1078,
4444,
255,
8128,
6018,
37,
21,
8128,
20,
375,
4444,
255,
2999,
800,
3726,
3726,
31,
376,
20,
4344,
40,
1078,
6018,
37,
21,
4444,
255,
8128,
812,
27,
51,
8128,
84,
20,
51,
375,
4444,
255,
2999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visualization Tools for Huge Graphs
===
I would like to create a graph (set of vertices connected with edges) and I'm looking for tools or libraries that can help me.
The graph is composed of at least 1000 nodes. Although it may be a little ambitious, I'd like to create one that has 60k nodes.
Obviously the resulting graph is meant to be artistic more than functional. For example, I've seen graphics illustrating a huge graph of IP addresses (would be convenient if I could remember where I had seen it).
Any suggested software or libraries or frameworks? | 0 | [
2,
28873,
4672,
26,
2329,
7210,
18,
800,
3726,
3726,
31,
83,
101,
20,
1600,
21,
7210,
13,
5,
3554,
16,
21235,
2587,
29,
7840,
6,
17,
31,
22,
79,
699,
26,
4672,
54,
8649,
30,
92,
448,
55,
9,
14,
7210,
25,
1869,
16,
35,
639,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How best to implement user selectable variables in web application
===
I have a Java based web-application and a new requirement to allow Users to place variables into text fields that are replaced when a document or other output is produced. How have others gone about this?
I was thinking of having a pre-defined set of variables such as :
`@BOOKING_NUMBER@`
`@INVOICE_NUMBER@`
Then when a user enters some text they can specify a variable inline (select it from a modal or similar). For example:
*"This is some text for Booking `@BOOKING_NUMBER@` that is needed by me"*
When producing some output (eg. PDF) that uses this text, I would do a regex and find all variables and replace them with the correct value:
*"This is some text for Booking 10001 that is needed by me"*
My initial thought was something like Freemarker but I think that is too complex for my Users and would require them to know my DataModel (eww).
Thanks for reading!
D. | 0 | [
2,
184,
246,
20,
8713,
4155,
5407,
579,
12157,
19,
2741,
3010,
800,
3726,
3726,
31,
57,
21,
8247,
432,
2741,
8,
2552,
20669,
17,
21,
78,
8981,
20,
1655,
3878,
20,
209,
12157,
77,
1854,
2861,
30,
50,
1141,
76,
21,
4492,
54,
89,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use an app.config file when calling a C# dll from C++
===
How do I use an `app.config` file for the .Net part when calling a .Net dll from C++ and the data in the config-file must be read at the .Net runtime startup.
If I use have a `foo.dll.config` that I call from `ConfigurationManager.OpenExeConfiguration("foo.dll")` I can access application settings. What I would like to do though is to change some information in `<system.data>`, namely remove a `DbProviderFactory` and replace it with a new one.
It seems like this can only be done if the code is put in the exectubales `app.config` file.
But as I am calling the .Net code from C++, I cannot have an app.config for my executable.
Is there some way to specify a configuration file that is sure to be run right after `machine.config` when the .Net runtime starts, even though I'm calling the .Net dll through C++?
| 0 | [
2,
184,
20,
275,
40,
4865,
9,
14093,
2816,
3893,
76,
2555,
21,
272,
5910,
13,
43,
211,
37,
272,
20512,
800,
3726,
3726,
184,
107,
31,
275,
40,
13,
1,
7753,
9,
14093,
2816,
1,
3893,
26,
14,
13,
9,
2328,
141,
76,
2555,
21,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to setup a connection timeout depending of the user login in MySQL
===
I have currently more than 100 connections in Sleep state.
Some connection must stay in Sleep state (and don't close) because it's permanent connection but some others (with a different user name) are from some php script and I want them to timeout very fast.
Is it possible to setup a wait_timeout per user? and if yes, How?
| 0 | [
2,
184,
20,
18161,
21,
2760,
85,
1320,
4758,
16,
14,
4155,
6738,
108,
19,
51,
18,
22402,
800,
3726,
3726,
31,
57,
871,
91,
119,
808,
6760,
19,
1742,
146,
9,
109,
2760,
491,
1179,
19,
1742,
146,
13,
5,
290,
221,
22,
38,
543,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to read a PEM RSA private key from .NET
===
I've got an RSA private key in PEM format, is there a straightforward way to read that from .NET and instantiate an RSACryptoServiceProvider to decrypt data encrypted with the corresponding public key? | 0 | [
2,
184,
20,
1302,
21,
24800,
13,
22038,
932,
1246,
37,
13,
9,
2328,
800,
3726,
3726,
31,
22,
195,
330,
40,
13,
22038,
932,
1246,
19,
24800,
2595,
15,
25,
80,
21,
22262,
161,
20,
1302,
30,
37,
13,
9,
2328,
17,
6322,
15882,
40,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best open source .NET content management system (CMS)?
===
I'm trying to find a decent (ie cheap / free) .NET content management system. DotNetNuke is not an option as far as I am concerned.
Wish list:
1. Works out of the box
2. Easy to install
3. Simple clean interface
4. Skinable / template driven
5. Free or cheap
6. Open source preferred
Or is is just better to PHP for this kind of thing? If so, what should I be checking out?
Thanks :D | 4 | [
2,
98,
25,
14,
246,
368,
1267,
13,
9,
2328,
2331,
1097,
329,
13,
5,
9095,
18,
6,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
21,
12238,
13,
5,
660,
9148,
13,
118,
551,
6,
13,
9,
2328,
2331,
1097,
329,
9,
14123,
2328,
42... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Display Form non-maximized with borders on Windows Mobile
===
I need to create a status dialog for a Windows Mobile application (C# 2.0) that needs to be updated, so MessageBox is out. I tried to just create a new Form class, change the size and call ShowDialog, but it always comes up full screen (minus the title bar of course). The only way I could figure out how to display it small is to set FormBorderStyle to None, but then it really does have no border or title bar at all!
I want it to still look like a message box (with title bar and borders) but, I need to actually use a Form so I can update it.
Any ideas of how to do this? | 0 | [
2,
3042,
505,
538,
8,
8304,
1660,
1333,
29,
5878,
27,
1936,
3241,
800,
3726,
3726,
31,
376,
20,
1600,
21,
1782,
28223,
26,
21,
1936,
3241,
3010,
13,
5,
150,
5910,
172,
9,
387,
6,
30,
2274,
20,
44,
6372,
15,
86,
2802,
5309,
25,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How does svnserve serve up multiple repositories?
===
I had svnserve configured to look at directory "Foo" for the repository it served. Now I changed the configuration from one repository to multiple repositories, all contained in one directory "Bar". I reconfigured svnserve to look at "Bar", but now my client can't find any repositories. What am I doing wrong? Do I need one service for each repository?
Thanks, Miel. | 0 | [
2,
184,
630,
13,
18,
16578,
10321,
62,
1884,
71,
1886,
302,
14882,
262,
2829,
60,
800,
3726,
3726,
31,
41,
13,
18,
16578,
10321,
62,
28895,
20,
361,
35,
16755,
13,
7,
4120,
111,
7,
26,
14,
24869,
32,
423,
9,
130,
31,
1015,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Limitations of using C++/CLI with NUnit
===
[This answer][1] to a question about C++ unit test frameworks suggests a possibility that had not occurred to me before: using C++/CLI and NUnit to create unit tests for native C++ code.
We use NUnit for our C# tests, so the possibility of using it for C++ as well seems enticing.
I've never used managed C++, so my concern is are there any practical limitations to this approach? Are many of you doing this? If so, what was your experience like?
[1]: http://stackoverflow.com/questions/13699/choosing-a-c-unit-testing-toolframework#13897 | 0 | [
2,
14070,
16,
568,
272,
20512,
118,
150,
1210,
29,
10210,
242,
800,
3726,
3726,
636,
1565,
1623,
500,
2558,
165,
500,
20,
21,
1301,
88,
272,
20512,
1237,
1289,
6596,
18,
5049,
21,
4813,
30,
41,
52,
2437,
20,
55,
115,
45,
568,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What' the best way to save iphone app setting?
===
I'd like to allow user to change the setting of app. But I am not sure where shall I save the configuration.
Is there any local space allocated for app?
Thanks.
| 0 | [
2,
98,
22,
14,
246,
161,
20,
2079,
21024,
4865,
2697,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
1655,
4155,
20,
753,
14,
2697,
16,
4865,
9,
47,
31,
589,
52,
562,
113,
3004,
31,
2079,
14,
8091,
9,
25,
80,
186,
375,
726,
11685... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
The image which UIImagePicker take from UI is truncated on top and bottom
===
I am using UIImagePicker to take photo and save the photo. But appears the photo it takes was truncated on top and bottom, which was top and bottom menu when UIImagePicker taking the photo. I am wondering how to take the whole screen of the photo.
Thanks. | 0 | [
2,
14,
1961,
56,
13,
5661,
22039,
16855,
106,
247,
37,
13,
5661,
25,
22328,
69,
27,
371,
17,
2129,
800,
3726,
3726,
31,
589,
568,
13,
5661,
22039,
16855,
106,
20,
247,
3056,
17,
2079,
14,
3056,
9,
47,
1780,
14,
3056,
32,
1384,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Correctly over-loading a stringbuf to replace cout in a MATLAB mex file
===
MathWorks currently doesn't allow you to use cout from a mex file when the MATLAB desktop is open because they have redirected stdout. Their current workaround is providing a function, [mexPrintf, that they request you use instead][1]. After googling around a bit, I think that it's possible to extend the std::stringbuf class to do what I need. Here's what I have so far. Is this robust enough, or are there other methods I need to overload or a better way to do this? (Looking for portability in a general UNIX environment and the ability to use std::cout as normal if this code is not linked against a mex executable)
class mstream : public stringbuf {
public:
virtual streamsize xsputn(const char *s, std::streamsize n)
{
mexPrintf("*s",s,n);
return basic_streambuf<char, std::char_traits<char>>::xsputn(s,n);
}
};
mstream mout;
outbuf = cout.rdbuf(mout.rdbuf());
[1]: http://www.mathworks.com/support/tech-notes/1600/1605.html | 0 | [
2,
12044,
84,
8,
16866,
21,
3724,
2345,
410,
20,
3934,
272,
1320,
19,
21,
4277,
9086,
55,
396,
3893,
800,
3726,
3726,
5057,
7684,
871,
1437,
22,
38,
1655,
42,
20,
275,
272,
1320,
37,
21,
55,
396,
3893,
76,
14,
4277,
9086,
17404,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Gettings starged with Mac development
===
How long does it take for an experienced Windows programmer to learn writing simple software for MAC OS X?
Where does one start and what tools will be necessary? | 0 | [
2,
1017,
18,
778,
6430,
29,
1572,
522,
800,
3726,
3726,
184,
175,
630,
32,
247,
26,
40,
3882,
1936,
17968,
20,
2484,
1174,
1935,
2306,
26,
1572,
13,
759,
993,
60,
113,
630,
53,
799,
17,
98,
4672,
129,
44,
2378,
60,
3,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I see the SQL ActiveRecord generates?
===
I'd like to check a few queries generated by ActiveRecord, but I don't need to actually run them. Is there a way to get at the query before it returns its result? | 0 | [
2,
184,
92,
31,
196,
14,
4444,
255,
1348,
14953,
7920,
18,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
2631,
21,
310,
9386,
2829,
6756,
34,
1348,
14953,
15,
47,
31,
221,
22,
38,
376,
20,
1121,
485,
105,
9,
25,
80,
21,
161,
20,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
How to Select data from Table from a DSN in T-SQL?
===
How can I get data from a database that I can only access through an ODBC Data Source (DSN) in T-SQL MS SQL Server, any version? | 0 | [
2,
184,
20,
5407,
1054,
37,
859,
37,
21,
13,
43,
18,
103,
19,
13,
38,
8,
18,
22402,
60,
800,
3726,
3726,
184,
92,
31,
164,
1054,
37,
21,
6018,
30,
31,
92,
104,
1381,
120,
40,
12340,
7229,
1054,
1267,
13,
5,
43,
18,
103,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
Why use hex?
===
Hey! I was looking at this code at http://www.gnu.org/software/m68hc11/examples/primes_8c-source.html
I noticed that in some situations they used hex numbers, like in line 134:
for (j = 1; val && j <= 0x80; j <<= 1, q++)
Now why would they use the 0x80? I am not that good with hex but I found an online hex to decimal and it gave me 128 for 0x80.
Also before line 134, on line 114 they have this:
small_n = (n & 0xffff0000) == 0;
The hex to decimal gave me 4294901760 for that hex number.
So here in this line they are making a bit AND and comparing the result to 0??
Why not just use the number?
Can anyone please explain and please do give examples of other situations.
Also I have seen large lines of code where it's just hex numbers and never really understood why :(
| 0 | [
2,
483,
275,
24,
396,
60,
800,
3726,
3726,
8409,
187,
31,
23,
699,
35,
48,
1797,
35,
7775,
6903,
6483,
9,
263,
4215,
9,
5583,
118,
12980,
5011,
118,
79,
4279,
9469,
1306,
118,
29041,
18,
118,
21108,
18,
1,
457,
150,
8,
12097,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you organize VMware Workstation images?
===
I currently use VMware workstation to create separate workspaces for various clients that I do work for. So for a given client I only install software needed for a specific job, and don't have to worry about software A for client #1 mucking up software B for client #2.
With an adequate sized hard drive this works well but I am not sure I am using VMware to its best advantage. The steps I go through when setting up for a new job are:
1. Do a windows update on a base VMware image that I have saved away.
2. Make a full clone of the base image and rename for the new job
3. Launch the new image and configure/install as necessary.
After doing this for a while I now have a collection of VMware images sitting around that are all at different levels of updates unless I manually go into each image and kick off an update cycle. And if there is some new tool that I want in all of my images I have to also go around and do multiple manual installs. But I feel secure in knowing that each image is self contained (albeit taking 10+Gb at a hit) and that if anything happens to a single image then an issue cannot propagate into any other image. (Note that I do do regular backups of all my images)
So my question is am I doing this the best way, or should I consider linked clones so that I only have to do a windows update or common application install on my base system? What are the pro's and con's of each way of organizing things?
In addition, although I try not to keep data files inside the Image's local disks I find that the share to my local hard drive seems very slow compared to the Images file system, hence I tend to leave work inside the image. Should I force myself to not leave data inside the image? Or put another way, how much corruption can a VMware image take before any single file in the images filesystem becomes inaccessible?
| 0 | [
2,
184,
107,
42,
9213,
13,
20147,
5011,
170,
10839,
3502,
60,
800,
3726,
3726,
31,
871,
275,
13,
20147,
5011,
170,
10839,
20,
1600,
1725,
170,
5582,
18,
26,
617,
7421,
30,
31,
107,
170,
26,
9,
86,
26,
21,
504,
6819,
31,
104,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to disable dtd at runtime in java's xpath ?
===
I got dtd in file and I cant remove it. When i try to parse it in Java I get "Caused by: java.net.SocketException: Network is unreachable: connect", because its remote dtd. can I disable somehow dtd checking? | 0 | [
2,
184,
20,
1460,
579,
13,
43,
38,
43,
35,
485,
891,
19,
8247,
22,
18,
993,
8353,
13,
60,
800,
3726,
3726,
31,
330,
13,
43,
38,
43,
19,
3893,
17,
31,
2973,
4681,
32,
9,
76,
31,
1131,
20,
2017,
870,
32,
19,
8247,
31,
164,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tracking permissions in SharePoint
===
Is there any sort of "out of the box" system within SharePoint (i.e. MOSS 2007) that is useful for tracking/managing permissions. We've got a relatively small installation, but I can easily see special permissions for special users/sites getting out of hand. I'm hoping there's something pre-baked into SharePoint that will help with this, but if there is, I don't know where.
If this isn't available from SharePoint, are there any 3rd party tools people would recommend? | 0 | [
2,
10353,
5572,
18,
19,
1891,
3132,
800,
3726,
3726,
25,
80,
186,
2058,
16,
13,
7,
1320,
16,
14,
1649,
7,
329,
363,
1891,
3132,
13,
5,
49,
9,
62,
9,
8188,
624,
6,
30,
25,
4811,
26,
10353,
118,
177,
7426,
5572,
18,
9,
95,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How best to do Agile Development with Trac?
===
We use [Trac][1] as our bug tracking / development / wiki system and I was wondering if anyone has experience and uses some of the Trac Agile/Scrum plugins or functionalities? Anything you'd recommend?
Or would it be better to duplicate Trac tickets as dead-tree user story index cards and a hand-drawn burndown chart?
[1]: http://trac.edgewall.org | 0 | [
2,
184,
246,
20,
107,
27475,
522,
29,
13,
38,
5797,
60,
800,
3726,
3726,
95,
275,
636,
38,
5797,
500,
2558,
165,
500,
28,
318,
6256,
10353,
13,
118,
522,
13,
118,
13,
17375,
329,
17,
31,
23,
5712,
100,
1276,
63,
1496,
17,
2027... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running Commands Remotely Over SSH
===
I've searched around a bit for similar questions, but other than running one command or perhaps a few command with items such as:
ssh user@host -t sudo su -
However, what if I essentially need to run a script on (let's say) 15 servers at once. Is this doable in bash? In a perfect world I need to avoid installing applications if at all possible to pull this off. For argument's sake, let's just say that I need to do the following across 10 hosts:
1. Deploy a new Tomcat container
2. Deploy an application in the container, and configure it
3. Configure an Apache vhost
4. Reload Apache
I have a script that does all of that, but it relies on me logging into all the servers, pulling a script down from a repo, and then running it. If this isn't doable in bash, what alternatives do you suggest? Do I need a bigger hammer, such as perl (python might be preferred since I can guarantee python is on all boxes in a RHEL environment thanks to yum/up2date)? If anyone can point to me to any useful information it'd be greatly appreciated, especially if it's doable in bash. I'll settle for perl or python, but I just don't know those as well (working on that). Thanks! | 0 | [
2,
946,
14294,
23288,
84,
13,
18,
1635,
800,
3726,
3726,
31,
22,
195,
9036,
140,
21,
1142,
26,
835,
2346,
15,
47,
89,
119,
946,
53,
1202,
54,
1774,
21,
310,
1202,
29,
3755,
145,
28,
45,
13,
18,
1635,
4155,
1,
11694,
13,
8,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I convert a List(Of T) to an ObservableCollection(Of T) in VB.NET?
===
Is there a way to do this without iterating through the List and adding the items to the ObservableCollection? | 0 | [
2,
184,
107,
31,
8406,
21,
968,
5,
1041,
13,
38,
6,
20,
40,
5122,
10321,
579,
15015,
872,
5,
1041,
13,
38,
6,
19,
13,
20468,
9,
2328,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
107,
48,
366,
32,
106,
1880,
120,
14,
968,
17,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
not strict xpath for java
===
do you know any not strict xpath for java? (I want it to not check dtd and schema) and it would be cool if it dont care about correct xml. | 0 | [
2,
52,
8170,
993,
8353,
26,
8247,
800,
3726,
3726,
107,
42,
143,
186,
52,
8170,
993,
8353,
26,
8247,
60,
13,
5,
49,
259,
32,
20,
52,
2631,
13,
43,
38,
43,
17,
23874,
6,
17,
32,
83,
44,
2700,
100,
32,
1049,
781,
88,
4456,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Need a row count after SELECT statement: what's the optimal SQL approach?
===
I'm trying to select a column from a single table (no joins) and I need the count of the number of rows, ideally before I begin retrieving the rows. I have come to two approaches that provide the information I need.
**Approach 1:**
SELECT COUNT( my_table.my_row ) AS row_count
FROM my_table
WHERE my_table.foo = 'bar'
Then
SELECT my_table.my_row
FROM my_table
WHERE my_table.foo = 'bar'
Or **Approach 2**
SELECT my_table.my_row, ( SELECT COUNT ( my_table.my_row )
FROM my_table
WHERE my_table.foo = 'bar' ) AS row_count
FROM my_table
WHERE my_table.foo = 'bar'
I am doing this because my SQL driver (SQL Native Client 9.0) does not allow me to use SQLRowCount on a SELECT statement but I need to know the number of rows in my result in order to allocate an array before assigning information to it.
Which of these two solutions will be faster?
I am using a do-while look for row retrieval, iterating until SQLFetch returns SQL_NO_DATA. Is it possible for `row_count` to equal say 7 when I first retrieve data using SQLFetch in Approach 2 and during subsequent calls, have someone add a row so that suddenly, the `row_count` value is stale? Will this affect the number of results I receive for my query?
Finally, is there a better approach that I should consider (perhaps a way to instruct the driver to return the number of rows in a SELECT result using SQLRowCount?) | 0 | [
2,
376,
21,
3131,
2468,
75,
5407,
3331,
45,
98,
22,
18,
14,
17586,
4444,
255,
2141,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
5407,
21,
4698,
37,
21,
345,
859,
13,
5,
251,
10612,
6,
17,
31,
376,
14,
2468,
16,
14,
234,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple Website (Apache/PHP/MySQL + JavaScript)
===
I've been asked to create a fairly straightforward website for a friend. Essentially a user will log in, fill in a set of information, and submit it. This data will then need to written to a database (and read from/presented at a future point).
I'm not really a web developer (I do mostly Java/C++), but about 3 years ago I worked on a project where we created a site using WAMP (Windows, Apache, MySQL and PHP), with a bit of JavaScript/AJAX thrown in for good measure. I was going to use WAMP again, but am concerned that there might be better tools available now.
So, is the WAMP approach a good one for a straightforward site like this?
If so, what tools would you recommend to use for the development of PHP/Javascript?
Finally, I saw in one of the blog posts that Stack Overflow uses JQuery. Would it be worthwhile to use these libs?
| 0 | [
2,
1935,
2271,
13,
5,
7738,
2569,
118,
26120,
118,
915,
18,
22402,
2754,
8247,
8741,
6,
800,
3726,
3726,
31,
22,
195,
74,
411,
20,
1600,
21,
6647,
22262,
2271,
26,
21,
860,
9,
7398,
21,
4155,
129,
6738,
19,
15,
3509,
19,
21,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Assign auto-incrementing value to new column in Oracle
===
I have this table in an Oracle DB which has a primary key defined on 3 of the data columns. I want to drop the primary key constraint to allow rows with duplicate data for those columns, and create a new column, 'id', to contain an auto-incrementing integer ID for these rows. I know how to create a sequence and trigger to add an auto-incrementing ID for new rows added to the table, but is it possible to write a PL/SQL statement to add unique IDs to all the rows that are already in the table? | 0 | [
2,
13952,
3108,
8,
28461,
68,
1923,
20,
78,
4698,
19,
15759,
800,
3726,
3726,
31,
57,
48,
859,
19,
40,
15759,
13,
9007,
56,
63,
21,
1256,
1246,
2811,
27,
203,
16,
14,
1054,
7498,
9,
31,
259,
20,
2804,
14,
1256,
1246,
28804,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JQuery UI Tabs Causing Screen to "Jump"
===
I'm using the latest version of the JQuery UI tabs. I have tabs positioned toward the bottom of the page.
Every time I click a tab, the screen jumps toward the top.
How can I prevent this from happening?
See this example:
[http://5bosses.com/examples/tabs/sample_tabs.html][1]
[1]: http://5bosses.com/examples/tabs/sample_tabs.html | 0 | [
2,
487,
8190,
93,
13,
5661,
6523,
18,
3242,
2324,
20,
13,
7,
21925,
7,
800,
3726,
3726,
31,
22,
79,
568,
14,
5736,
615,
16,
14,
487,
8190,
93,
13,
5661,
6523,
18,
9,
31,
57,
6523,
18,
12125,
729,
14,
2129,
16,
14,
2478,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you change the address of a document library?
===
I have a site with multiple document libraries in it. One of the site users has full control of the site & at one point, instead of creating a new document library, they renamed the default document library from "Shared Documents" to "Correspondence". Now they've opened the document library in windows explorer, so it's added an entry into their network places. The name of the entry was "Shared Documents on portal.mydomain.net" and not "Correspondence on portal.mydomain.net". This is because the address of the library is still "Shared Documents". I went into the user's network places and renamed the entry, however I would prefer to have the address changed as well, so that future users do not run into the same problem.
I looked in the Document Library Settings but couldn't find a place to change the address there. The address gets displayed in "Title, description and navigation" but there is no option to change it. I tried looking under Site Actions > Site Settings > Content and structure to see if there was any way to change the address there. However, when I check off the Correspondence document library and pull down the actions menu, "Move" is greyed out.
I *suppose* that I could save the library as a template, include the content & make a new library in the proper address, but then the modified by information would all be wrong.
Any ideas? | 0 | [
2,
184,
107,
42,
753,
14,
3218,
16,
21,
4492,
1248,
60,
800,
3726,
3726,
31,
57,
21,
689,
29,
1886,
4492,
8649,
19,
32,
9,
53,
16,
14,
689,
3878,
63,
503,
569,
16,
14,
689,
279,
35,
53,
454,
15,
700,
16,
2936,
21,
78,
4492... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why are hidden form elements still read by JAWS?
===
**The Situation**
I have an area of the screen that can be shown and hidden via JavaScript (something like "show/hide advanced search options"). Inside this area there are form elements (select, checkbox, etc). For users using assistive technology like a screen-reader (in this case JAWS), we need to link these form elements with a label or use the "title" attribute to describe the purpose of each element. I'm using the title attribute because there isn't enough space for a label, and the tooltip you get is nice for non-screen-reader users.
The code looks something like this:
<div id="placeholder" style="display:none;">
<select title="Month">
<option>January</option>
<option>February</option>
...
</select>
</div>
**The Problem**
Normally, JAWS will not read hidden elements... because well, they're hidden and it knows that. However, it seems as though if the element has a title set, JAWS reads it no matter what. If I remove the title, JAWS reads nothing, but obviously this is in-accessible markup.
**Possible Solutions**
My first thought was to use a hidden label instead of the title, like this:
<div id="placeholder" style="display:none;">
<label for="month" style="display:none">Month</label>
<select id="month">...</select>
</div>
This results in the exact same behavior, and now we lose the tool-tips for non-screen-reader users. Also we end up generating twice as much Html.
The second option is to still use a label, put position it off the screen. That way it will be read by the screen-reader, but won't be seen by the visual user:
<div id="placeholder" style="display:none;">
<label for="month" style="position:absolute;left:-5000px:width:1px;">Month</label>
<select id="month">...</select>
</div>
This actually works, but again we lose the tool-tip and still generate additional Html.
My third possible solution is to recursively travel through the DOM in JavaScript, removing the title when the area is hidden and adding it back when the area is shown. This also works... but is pretty ugly for obvious reasons and doesn't really scale well to a more general case.
Any other ideas anyone? Why is JAWS behaving this way? | 0 | [
2,
483,
50,
3689,
505,
2065,
174,
1302,
34,
3321,
18,
60,
800,
3726,
3726,
13,
1409,
124,
1858,
1409,
31,
57,
40,
217,
16,
14,
2324,
30,
92,
44,
1721,
17,
3689,
1197,
8247,
8741,
13,
5,
9099,
101,
13,
7,
9303,
118,
19522,
2255... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Memory allocation on Windows C code
===
I'd like to know which method is recommended on Windows C programming: using malloc or the Win32 HeapAlloc (maybe VirtualAlloc?) function.
I've read the MSDN [Memory Management Functions][1] article and the MSDN articles regarding malloc and HeapAlloc, but they do not say which one should be used and in what situations.
[1]: http://msdn.microsoft.com/en-us/library/aa366781(VS.85).aspx | 0 | [
2,
1912,
16840,
27,
1936,
272,
1797,
800,
3726,
3726,
31,
22,
43,
101,
20,
143,
56,
2109,
25,
5773,
27,
1936,
272,
3143,
45,
568,
3668,
2499,
54,
14,
628,
3125,
15414,
192,
10799,
13,
5,
5138,
6599,
192,
10799,
60,
6,
1990,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to convert all html escaped characters in a tidied xhtml string, so it loads in an XmlDocument?
===
In a .net web application I talk to a 3rd party CMS api which gives back html. I need to convert it to well formed xml, so I use an .net wrapper around HTML tidy. This generates a nice xhtml DOM, but things go wrong when characters such as are used.
I need those to be converted to their code format like   in order for an XmlDocument to accept it.
Can't set any more options on the tidy wrapper other than making it xhtml. So with the string returned, I need to do some magic, but I think it will come down to regular expressions. Any alternative solutions are welcome. | 0 | [
2,
184,
20,
8406,
65,
13,
15895,
5409,
1766,
19,
21,
4174,
6375,
993,
15895,
3724,
15,
86,
32,
19069,
19,
40,
23504,
28132,
60,
800,
3726,
3726,
19,
21,
13,
9,
2328,
2741,
3010,
31,
930,
20,
21,
203,
897,
346,
2390,
18,
21,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When should I use the java 5 method cast of Class?
===
Looking through some code I came across the following code
trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto));
and I'd like to know if casting this way has any advantages over
trTuDocPackTypdBd.update((TrTuDocPackTypeDto)packDto);
I've asked the developer responsible and he said he used it because it was new (which doesn't seem like a particularly good reason to me), but I'm intrigued when I would want to use the method. | 0 | [
2,
76,
378,
31,
275,
14,
8247,
331,
2109,
1325,
16,
718,
60,
800,
3726,
3726,
699,
120,
109,
1797,
31,
281,
464,
14,
249,
1797,
9235,
2473,
13799,
8573,
1084,
9251,
220,
43,
9,
576,
8209,
5,
6384,
2473,
13799,
8573,
4474,
43,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need help configuring IIS to serve 2.0 web services
===
I am attempting to deploy .NET 2.0 web services on IIS that has both 1.0 and 2.0 installed. This web server primarily serves a large .NET 1.0 application.
I have copied by .NET 2.0 web service project to the server and have created a virtual directory to point to the necessary folder.
When I set the ASP.NET version to 2.0 in IIS, The application prompts me for a username and password (when I attempt to open the site in the browser), If I set it back to 1.0, then I am not prompted for a password, but obviously get a full application error.
I have anonymous access enabled (with a username / password) and have authenticated access checked as "Integrated Windows Authentication)
How can I configure IIS so that I am not prompted for a password while having ASP.NET version set to 2.0?
Thanks...
| 0 | [
2,
376,
448,
1065,
13549,
68,
595,
18,
20,
1884,
172,
9,
387,
2741,
687,
800,
3726,
3726,
31,
589,
6314,
20,
17617,
13,
9,
2328,
172,
9,
387,
2741,
687,
27,
595,
18,
30,
63,
156,
137,
9,
387,
17,
172,
9,
387,
4066,
9,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Asp.Net MVC JQuery goodness
===
I've been developing a simple website using asp.net MVC and I'm starting to add some JQuery\JSON goodness.
My problem is up until now all my 'Views' have been strongly typed and I've been building the view based on data from ViewData.Model.MyViewsData. Now once the view has been rendered and I do a Ajax style request I get new data back as JSON and I need to update my view. Now how can I update my view with the new data when I no longer have access to all the original ViewData?
I'm guessing I need to one of two things, either: always fetch the data back using Jquery\JSON and forget about using ViewData or do some sort of partial rendering of my view?!
Any tutorials or samples would be most appreciated.
Many Thanks
| 0 | [
2,
28,
306,
9,
2328,
307,
8990,
487,
8190,
93,
18509,
800,
3726,
3726,
31,
22,
195,
74,
3561,
21,
1935,
2271,
568,
28,
306,
9,
2328,
307,
8990,
17,
31,
22,
79,
1422,
20,
3547,
109,
487,
8190,
93,
1,
728,
528,
18509,
9,
51,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unicode block of a character in python
===
Is there a way to get the Unicode Block of a character in python? The [unicodedata][1] module doesn't seem to have what I need, and I couldn't find an external library for it.
Basically, I need the same functionality as [`Character.UnicodeBlock.of()`][2] in java.
[1]: http://www.python.org/doc/2.5.2/lib/module-unicodedata.html
[2]: http://java.sun.com/javase/6/docs/api/java/lang/Character.UnicodeBlock.html#of(char) | 0 | [
2,
28010,
1921,
16,
21,
925,
19,
20059,
800,
3726,
3726,
25,
80,
21,
161,
20,
164,
14,
28010,
1921,
16,
21,
925,
19,
20059,
60,
14,
636,
8843,
22254,
4375,
500,
2558,
165,
500,
12613,
1437,
22,
38,
2260,
20,
57,
98,
31,
376,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to copy all properties of an object to another object, in Python?
===
Is there a library method to copy all the properties between two instances of the same class, in Python?
I mean, something like Apache Commons' PropertyUtilsBean.copyProperties()
Thanks! | 0 | [
2,
184,
20,
4344,
65,
3704,
16,
40,
3095,
20,
226,
3095,
15,
19,
20059,
60,
800,
3726,
3726,
25,
80,
21,
1248,
2109,
20,
4344,
65,
14,
3704,
128,
81,
13946,
16,
14,
205,
718,
15,
19,
20059,
60,
31,
884,
15,
301,
101,
17140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
Need help configuring IIS to serve 2.0 web services
===
I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application.
I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attempt to browse the site in a web-browser, I am prompted for a password. If I set the ASP.NET version down to 1.0, I am not prompted for a password, but obviously receive a full application error.
How can I configure IIS so that I can have the .NET 2.0 version selected without requiring the password prompt?
I have anonymous access enabled and have the "Authenticated Access" set to integrated windows authentication"
Any help or suggestions is appreciated...
Thanks.
| 0 | [
2,
376,
448,
1065,
13549,
68,
595,
18,
20,
1884,
172,
9,
387,
2741,
687,
800,
3726,
3726,
31,
589,
6314,
20,
17617,
40,
28,
306,
9,
2328,
172,
9,
387,
2741,
365,
3010,
27,
40,
595,
18,
8128,
30,
871,
2589,
21,
370,
13,
9,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio 2005 extensions for .NET Framework 3.0 (WPF)
===
Did Microsoft abandon support for Windows Presentation Foundation (WPF) on Visual Studio 2005?
There was the a Community Technology Preview (CTP) for the WPF and WCF, but [it's no longer available][1] for download. There are [released extensions for Windows Workflow Foundation][2] (WF) for Visual Studio 2005.
But as far as i can tell Microsoft abandoned support for WPF in Visual Studio 2005, and instead released them as Visual Studio 2008. Can anyone confirm or deny this?
[1]: http://tinyurl.com/5hn2yd
[2]: http://www.microsoft.com/downloads/details.aspx?FamilyId=5D61409E-1FA3-48CF-8023-E8F38E709BA6&displaylang=en | 0 | [
2,
3458,
1120,
812,
17529,
26,
13,
9,
2328,
6596,
203,
9,
387,
13,
5,
499,
7721,
6,
800,
3726,
3726,
144,
7099,
10416,
555,
26,
1936,
6364,
1304,
13,
5,
499,
7721,
6,
27,
3458,
1120,
812,
60,
80,
23,
14,
21,
514,
1099,
16121,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
programmatic login with .net membership provider
===
I'm trying to unit test a piece of code that needs a currently logged in user in the test. Using the .Net 2.0 Membership Provider, how can I programmatically log in as a user for this test? | 0 | [
2,
625,
6732,
6738,
108,
29,
13,
9,
2328,
4363,
11747,
800,
3726,
3726,
31,
22,
79,
749,
20,
1237,
1289,
21,
1855,
16,
1797,
30,
2274,
21,
871,
13,
19287,
19,
4155,
19,
14,
1289,
9,
568,
14,
13,
9,
2328,
172,
9,
387,
4363,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need help configuring IIS to serve 2.0 web services
===
I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application.
I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attempt to browse the site in a web-browser, I am prompted for a password. If I set the ASP.NET version down to 1.0, I am not prompted for a password, but obviously receive a full application error.
How can I configure IIS so that I can have the .NET 2.0 version selected without requiring the password prompt?
I have anonymous access enabled and have the "Authenticated Access" set to integrated windows authentication"
Any help or suggestions is appreciated...
Thanks.
| 0 | [
2,
376,
448,
1065,
13549,
68,
595,
18,
20,
1884,
172,
9,
387,
2741,
687,
800,
3726,
3726,
31,
589,
6314,
20,
17617,
40,
28,
306,
9,
2328,
172,
9,
387,
2741,
365,
3010,
27,
40,
595,
18,
8128,
30,
871,
2589,
21,
370,
13,
9,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the OCaml idiom equivalent to Python's range function?
===
I want to create a list of integers from 1 to n. I can do this in Python using range(1, n+1), and in Haskell using: take n (iterate (1+) 1).
What is the right OCaml idiom for this? | 0 | [
2,
98,
25,
14,
13,
14977,
8184,
28380,
4602,
20,
20059,
22,
18,
978,
1990,
60,
800,
3726,
3726,
31,
259,
20,
1600,
21,
968,
16,
13820,
18,
37,
137,
20,
13,
103,
9,
31,
92,
107,
48,
19,
20059,
568,
978,
5,
165,
15,
13,
103,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I merge two python iterators?
===
I have two iterators, a `list` and an `itertools.count` object (i.e. an infinite value generator). I would like to merge these two into a resulting iterator that will alternate yield values between the two:
>>> import itertools
>>> c = itertools.count(1)
>>> items = ['foo', 'bar']
>>> merged = imerge(items, c) # the mythical "imerge"
>>> merged.next()
'foo'
>>> merged.next()
1
>>> merged.next()
'bar'
>>> merged.next()
2
>>> merged.next()
Traceback (most recent call last):
...
StopIteration
What is the simplest, most concise way to do this? | 0 | [
2,
184,
107,
31,
12666,
81,
20059,
32,
106,
9922,
60,
800,
3726,
3726,
31,
57,
81,
32,
106,
9922,
15,
21,
13,
1,
5739,
1,
17,
40,
13,
1,
242,
106,
20799,
18,
9,
16549,
1,
3095,
13,
5,
49,
9,
62,
9,
40,
9698,
1923,
15286,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WordPresss Plugin Development
===
Besides the CODEX what resources do you recommend to help a person new to creating plugins help create a WordPress plugin. I have an idea, but need a bit better explanation than what is in the CODEX to get started. | 0 | [
2,
833,
5890,
18,
10922,
108,
522,
800,
3726,
3726,
3410,
14,
18666,
98,
2566,
107,
42,
12360,
20,
448,
21,
840,
78,
20,
2936,
10922,
108,
18,
448,
1600,
21,
833,
5890,
10922,
108,
9,
31,
57,
40,
882,
15,
47,
376,
21,
1142,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
VB.NET Importing Classes
===
I've seen some code where a *Class* is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well?
TestClass.vb
public class TestClass
public shared function Somefunc() as Boolean
return true
end function
end class
MainClass.vb
imports TestClass
public class MainClass
public sub Main()
Somefunc()
end sub
end class
These files are in the App_Code directory. Just curious, because I've never thought of doing this before, nor have I read about it anywhere. | 0 | [
2,
13,
20468,
9,
2328,
9010,
68,
2684,
800,
3726,
3726,
31,
22,
195,
541,
109,
1797,
113,
21,
1637,
1898,
2483,
25,
11808,
15,
700,
16,
21,
204,
5582,
15,
544,
65,
14,
12038,
443,
118,
5909,
1807,
43,
18,
16,
30,
718,
904,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need help configuring IIS to serve 2.0 web services
===
I am attempting to deploy an ASP.NET 2.0 Web service application on an IIS server that currently serves a large .NET 1.0 web application.
I have set up an appropriate virtual directory and have set the ASP.NET version for the virtual directory to 2.0, when I attempt to browse the site in a web-browser, I am prompted for a password. If I set the ASP.NET version down to 1.0, I am not prompted for a password, but obviously receive a full application error.
How can I configure IIS so that I can have the .NET 2.0 version selected without requiring the password prompt?
I have anonymous access enabled and have the "Authenticated Access" set to integrated windows authentication"
I should mention that I have another 2.0 web service application configured on this server the same as this and it is working fine. Any help or suggestions is appreciated...
Thanks.
| 0 | [
2,
376,
448,
1065,
13549,
68,
595,
18,
20,
1884,
172,
9,
387,
2741,
687,
800,
3726,
3726,
31,
589,
6314,
20,
17617,
40,
28,
306,
9,
2328,
172,
9,
387,
2741,
365,
3010,
27,
40,
595,
18,
8128,
30,
871,
2589,
21,
370,
13,
9,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unexpected behavior of window.onback in JavaScript?
===
I'm using window.onback = history.forward(); to prevent users from resubmitting data. I know it's a hack and I don't like it either, but that's not what this question is about. The problem is that the code prevents other pages from going back to the page with the code. Let me clarify.
PageA.aspx has the JavaScript code in it. The user submits PageA, hits Back, and nothing happens. That's good. Now the user clicks a link to PageB.aspx, which does *not* have the code. When the user clicks the Back button, which should take her to PageA.aspx, it does not. It exhibits the same behavior as if PageB had the no-back JavaScript code.
Here's how I have it implemented in PageA.aspx:
<script type="text/javascript">
window.onback = history.forward();
</script>
I have confirmed that this code is only in PageA.aspx and not in the master, includes, or anything else. This is an ASP.NET 2.0 application running in SharePoint 2007. The browser is IE7.
Any ideas? | 2 | [
2,
9380,
3257,
16,
1463,
9,
218,
1958,
19,
8247,
8741,
60,
800,
3726,
3726,
31,
22,
79,
568,
1463,
9,
218,
1958,
800,
447,
9,
21216,
5,
6,
73,
20,
2501,
3878,
37,
302,
7563,
5130,
1203,
1054,
9,
31,
143,
32,
22,
18,
21,
1183... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rolling out entire site, or only changed pages/elements? (ASP.NET)
===
We use ASP.NET, C#
When making an update to one of our websites, we roll out the entire site rather than updating just the pages or sections that have changed. This scares me.
Is this a good idea? Should I roll out only the changes?
Should I break my site into smaller projects?
What is best practice? | 0 | [
2,
3929,
70,
1078,
689,
15,
54,
104,
1015,
4434,
118,
27567,
18,
60,
13,
5,
472,
306,
9,
2328,
6,
800,
3726,
3726,
95,
275,
28,
306,
9,
2328,
15,
272,
5910,
76,
544,
40,
11100,
20,
53,
16,
318,
13931,
15,
95,
3001,
70,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
javascript closures and function placement
===
Does the placement of a function have an effect on the performance of closures within scope? If so, where is the optimal place to put these functions? If not, is the implied association by closure enough reason to place a function in another place logically?
For instance, if **foo** does not rely on the value of **localState**, does the fact that **localState** is accessible from **foo** have implications as to **foo**'s execution time, memory use, etc.?
(function(){
var localState;
function foo(){
// code
}
function bar(){
// code
return localState;
}
})();
In other words, would this be a better choice, and if so why?
(function(){
function foo(){
// code
}
var localState;
function bar(){
// code
return localState;
}
})();
| 0 | [
2,
8247,
8741,
7790,
18,
17,
1990,
10774,
800,
3726,
3726,
630,
14,
10774,
16,
21,
1990,
57,
40,
1590,
27,
14,
956,
16,
7790,
18,
363,
9914,
60,
100,
86,
15,
113,
25,
14,
17586,
209,
20,
442,
158,
3719,
60,
100,
52,
15,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP: Right way to declare variable before use in loop
===
I have a variable that is built in loop. Something like:
$str = "";
for($i = 0; $i < 10; $i++) $str .= "something";
If $str = "" is ommitted, I get undefined variable notice, but I thought php auto-declare a variable the first time it sees undeclared one?
How do I do this right? | 0 | [
2,
13,
26120,
45,
193,
161,
20,
10123,
7612,
115,
275,
19,
5293,
800,
3726,
3726,
31,
57,
21,
7612,
30,
25,
392,
19,
5293,
9,
301,
101,
45,
5579,
9729,
800,
13,
7,
7,
73,
26,
5,
4403,
49,
800,
713,
73,
5579,
49,
13,
1,
332... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Large custom survey / reporting applications - best practice
===
###The situation
When you study social sciences, you are frequently confronted with the need for online surveys (scientific data collection online). That's one of the main reasons why I started with **PHP** in the first place.
Recently these survey applications have grown and grown. A **lot of complexity** has been added: reporting (flash charts, PDF generation), data aggregation, different levels of aggregation (e.g. company units), questionnaire module selection for the companies involved, etc.
Now I see myself confronted with a complex data gathering and reporting application which is **getting slow and unmaintainable** (running on the basis of Joomla). In the meantime I'm not studying anymore but still developing online research applications.
One of my platforms has up to 100 new users per day and aggregates / reports data of several **thousend users** *times* **hundreds of data items** *times* **dozens of hierarchy levels**.
###My questions
- is PHP/mysql still a way to go?
- could a framework like codeIgnitor be a basis for such an application or should I develop everything from the scratch?
- do you know any kind of survey specific framework I could use as a basis?
| 0 | [
2,
370,
5816,
3431,
13,
118,
6670,
3767,
13,
8,
246,
1345,
800,
3726,
3726,
6926,
5910,
5910,
124,
1858,
76,
42,
949,
668,
2623,
15,
42,
50,
3086,
14568,
29,
14,
376,
26,
2087,
14490,
13,
5,
28161,
1054,
1206,
2087,
6,
9,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VB.NET Importing Classes
===
I've seen some code where a *Class* is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well?
TestClass.vb
public class TestClass
public shared function Somefunc() as Boolean
return true
end function
end class
MainClass.vb
imports TestClass
public class MainClass
public sub Main()
Somefunc()
end sub
end class
These files are in the App_Code directory. Just curious, because I've never thought of doing this before, nor have I read about it anywhere.
| 0 | [
2,
13,
20468,
9,
2328,
9010,
68,
2684,
800,
3726,
3726,
31,
22,
195,
541,
109,
1797,
113,
21,
1637,
1898,
2483,
25,
11808,
15,
700,
16,
21,
204,
5582,
15,
544,
65,
14,
12038,
443,
118,
5909,
1807,
43,
18,
16,
30,
718,
904,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Smalltalk and IoC
===
I see a lot of IoC frameworks for .Net and Java. Does anyone know why there are no equivalent frameworks for Smalltalk. This is more a philosophy question than anything else. I'm wondering if there is something in the Smalltalk way of doing things that precludes the necessity of having an IoC framework. | 0 | [
2,
284,
9718,
17,
31,
2499,
800,
3726,
3726,
31,
196,
21,
865,
16,
31,
2499,
6596,
18,
26,
13,
9,
2328,
17,
8247,
9,
630,
1276,
143,
483,
80,
50,
90,
4602,
6596,
18,
26,
284,
9718,
9,
48,
25,
91,
21,
3177,
1301,
119,
602,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GZip HttpResponse using XSL Transformer - Java
===
I have the following code below in my Servlet, but when IE hits the page, it returns a blank html page. If I use the response.getOutputStream() directly in the StreamResult constructor, the page loads fine. What am I missing?
**response** is an instance of HttpServletResponse and **xsl** is an instance of Transformer from XSLTC TransformerFactory
response.setHeader("Content-Encoding", "gzip");
GZIPOutputStream gzipOut = new GZIPOutputStream(response.getOutputStream());
Result outputResult = new StreamResult(gzipOut);
xsl.transform(xmlSource, outputResult); | 0 | [
2,
489,
2553,
306,
7775,
99,
18,
8782,
870,
568,
993,
18,
255,
8007,
106,
13,
8,
8247,
800,
3726,
3726,
31,
57,
14,
249,
1797,
1021,
19,
51,
13,
10321,
1336,
15,
47,
76,
13,
660,
3858,
14,
2478,
15,
32,
4815,
21,
6463,
13,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
List Veiw C# stay selected
===
I have a list view that after double click a record open a new form to show the details, but the record in teh list view lost the "selection"....
How do i can to now which record has clicked ???
Thanks
Maria João | 0 | [
2,
968,
13,
195,
49,
499,
272,
5910,
1179,
1704,
800,
3726,
3726,
31,
57,
21,
968,
1418,
30,
75,
1494,
10840,
21,
571,
368,
21,
78,
505,
20,
298,
14,
3289,
15,
47,
14,
571,
19,
13,
22314,
968,
1418,
529,
14,
13,
7,
18,
5033,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use SVN to rollout ASP.NET websites?
===
We use ASP.NET / C#.
We work locally, test locally, check in our code and binaries through SVN.
On our server, we checkout the latest 'build' from SVN directly into our IIS web directory.
Is this a good practice, or is there something else we should be doing for rollouts? | 0 | [
2,
184,
20,
275,
13,
18,
16578,
20,
3001,
1320,
28,
306,
9,
2328,
13931,
60,
800,
3726,
3726,
95,
275,
28,
306,
9,
2328,
13,
118,
272,
5910,
9,
95,
170,
6680,
15,
1289,
6680,
15,
2631,
19,
318,
1797,
17,
4511,
11301,
120,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sanitizing bad XML in Java
===
I'm using a third-party library that returns "XML" that is not valid, because it contains invalid characters, as well as non-declared entities. I need to use a Java XML parser to parse this XML, but it's choking.
Is there a generic way to sanitize this XML so that it becomes valid? | 0 | [
2,
523,
242,
3335,
896,
23504,
19,
8247,
800,
3726,
3726,
31,
22,
79,
568,
21,
422,
8,
9635,
1248,
30,
4815,
13,
7,
396,
8184,
7,
30,
25,
52,
7394,
15,
185,
32,
1588,
16671,
1766,
15,
28,
134,
28,
538,
8,
546,
12078,
69,
125... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to store static reference arrays/dicts in Cocoa touch
===
I have several arrays of arrays or arrays of dicts that I would like to store in my iPhone app. This lists are static and won't be modified by the app or users. Occasionally they may be displayed but more likely they'll be iterated over and compared to some input value. Would the best way to store these arrays be a CoreData/SQLite data store, in a header file, or something I'm not thinking of? I could see making a class that only has these arrays stored in them for access, but I'm not sure if that's the best route to take. | 0 | [
2,
246,
161,
20,
1718,
12038,
2801,
7718,
18,
118,
16315,
18,
19,
24507,
1723,
800,
3726,
3726,
31,
57,
238,
7718,
18,
16,
7718,
18,
54,
7718,
18,
16,
13,
16315,
18,
30,
31,
83,
101,
20,
1718,
19,
51,
21024,
4865,
9,
48,
7227,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Calculating a 2D Vector's Cross Product
===
From wikipedia:
> the cross product is a binary operation on two vectors in a **three-dimensional** Euclidean space that results in another vector which is perpendicular to the plane containing the two input vectors.
Given that the definition requires at least three dimensions, how does one calculate the cross product of two 2d vectors?
I have seen two implementations. One returns a new vector (but only accepts a single vector), the other returns a scalar (but is a calculation between two vectors).
Implementation 1 (returns a scalar):
float CrossProduct(const Vector2D & v1, const Vector2D & v2) const
{
return (v1.X*v2.Y) - (v1.Y*v2.X);
}
Implementation 2 (returns a vector):
Vector2D CrossProduct(const Vector2D & v) const
{
return Vector2D(v.Y, -v.X);
}
Why the varying implementations? What would I use the scalar implementation for? What would I use the vector implementation for?
The reason I ask is because I'm writing a Vector2D class myself and don't know which method to use.
| 0 | [
2,
22937,
21,
172,
43,
7497,
22,
18,
919,
2374,
800,
3726,
3726,
37,
20169,
45,
13,
1,
14,
919,
2374,
25,
21,
14171,
1453,
27,
81,
7497,
18,
19,
21,
13,
1409,
5642,
8,
7865,
1409,
22422,
5609,
726,
30,
1736,
19,
226,
7497,
56,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Stop text from wrapping with NSLayoutManager
===
Given any arbitrary, one-line string, my goal is to render it into a bitmap representation. However, I have no means of finding out its dimensions beforehand, so I am reduced to getting the glyph range's bounding rect and resizing my canvas if it's not large enough. Unfortunately, if the canvas is not wide enough for the string, but tall enough that the text can wrap, the layout manager decides that this is best. How can I stop the layout manager from wrapping the text? | 0 | [
2,
747,
1854,
37,
13437,
29,
13,
2172,
4414,
1320,
22256,
800,
3726,
3726,
504,
186,
17237,
15,
53,
8,
1143,
3724,
15,
51,
1195,
25,
20,
16535,
32,
77,
21,
1142,
15022,
5442,
9,
207,
15,
31,
57,
90,
1108,
16,
3007,
70,
82,
991... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best practices for login pages?
===
I am working on a single sign-on login page using [Shibboleth][1] that will be used for a variety of web applications. Obviously we would like to make this page as secure and usable as possible while limiting the effects of phishing scams.
**What are the best practices to keep in mind when designing a login page?**
Some questions that have come up around this issue:
- Is it important for the login page to always look the same on every display?
- Conversely, would it be beneficial for the login page to have a random design?
- Is it better for the login page to look the same as all of your other pages or should it have its own unique design?
- If the login page has its own unique design, should it incorporate other constant elements from your site's design (such as global navigation)?
- Is the login page an appropriate place to provide the user with additional content (such as latest news)?
- Are there any additional security features that should be included to help keep people safe?
[1]: http://en.wikipedia.org/wiki/Shibboleth_(Internet2) | 0 | [
2,
246,
5242,
26,
6738,
108,
4434,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
345,
1676,
8,
218,
6738,
108,
2478,
568,
636,
18,
8630,
22008,
96,
500,
2558,
165,
500,
30,
129,
44,
147,
26,
21,
1747,
16,
2741,
3767,
9,
4409,
95,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best "captcha" for use within a struts framework?
===
We need to integrate a good CAPTCHA into our CA Siteminder implementation. What is the best CAPTCHA for use with Struts? | 4 | [
2,
98,
25,
14,
246,
13,
7,
4666,
38,
1651,
7,
26,
275,
363,
21,
18316,
18,
6596,
60,
800,
3726,
3726,
95,
376,
20,
18399,
21,
254,
13960,
1651,
77,
318,
1658,
689,
79,
19720,
6123,
9,
98,
25,
14,
246,
13960,
1651,
26,
275,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Which Eclipse package to download for pydev?
===
I'm getting started with python, eclipse and pydev. Which Eclipse package should I choose? Nothing on the eclipse homepage tells me what to choose and python documentation assumes I have eclipse installed. Does which package I choose matter? | 0 | [
2,
56,
11652,
6030,
20,
7121,
26,
7103,
14438,
60,
800,
3726,
3726,
31,
22,
79,
1017,
373,
29,
20059,
15,
11652,
17,
7103,
14438,
9,
56,
11652,
6030,
378,
31,
3538,
60,
626,
27,
14,
11652,
213,
6486,
2609,
55,
98,
20,
3538,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
How to specify the reply-to address using sp_send_dbmail in SQL Server
===
I need to send an email to someone and want them to be able to simply reply to the email without having to specify the email address.
Using sp_send_dbmail sets the reply-to address as the name of the profile that it was sent from.
Can this be changed to specify the reply-to so it looks like it came from me.
Thanks. | 0 | [
2,
184,
20,
19077,
14,
6504,
8,
262,
3218,
568,
3782,
1,
18,
2451,
1,
9007,
8079,
19,
4444,
255,
8128,
800,
3726,
3726,
31,
376,
20,
2660,
40,
8517,
20,
737,
17,
259,
105,
20,
44,
777,
20,
1659,
6504,
20,
14,
8517,
366,
452,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
do you consider that technique "BAD"
===
Sometimes you need to skip execution of the part of the method under sertain non-critical error conditions. You can you *exceptions* for that but that exceptions generally are not recomender to be used in normal application logic, only for abnormal situations.
So do a trick like this:
do
{
bool isGood = true;
.... some code
if(!isGood)
break;
.... some more code
if(!isGood)
break;
.... some more code
} while(false);
..... some other code, which has to be executed.
I use "fake" loop which will run once, and I can abort it by *break* or *continue*
Some of my colleagues did not like that, and they call it "bad practice". I personally find that approach preatty slick. But what do you think?
| 0 | [
2,
107,
42,
3563,
30,
4873,
13,
7,
5989,
7,
800,
3726,
3726,
1030,
42,
376,
20,
12532,
5769,
16,
14,
141,
16,
14,
2109,
131,
4245,
5851,
538,
8,
21522,
7019,
2039,
9,
42,
92,
42,
1637,
10066,
5757,
2483,
26,
30,
47,
30,
13392,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Function point to kloc ratio as a software metric... What do you think?
===
What do you think of using a metric of function point to lines of code as a metric?
It makes me think of the old game show "Name That Tune". "I can name that tune in three notes!" I can write that functionality in 0.1 klocs! Is this useful?
It would certainly seem to promote library usage, but is that what you want? | 0 | [
2,
1990,
454,
20,
17966,
150,
4825,
28,
21,
2306,
11544,
9,
9,
9,
98,
107,
42,
277,
60,
800,
3726,
3726,
98,
107,
42,
277,
16,
568,
21,
11544,
16,
1990,
454,
20,
1560,
16,
1797,
28,
21,
11544,
60,
32,
1364,
55,
277,
16,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SSAS custom group by query
===
My fact table looks like this
yesterday a
yesterday a
yesterday a
yesterday b
yesterday b
yesterday c
today a
today a
today b
today b
tommorow a
tommorow a
tommorow c
tommorow d
In the end I need an Excel report like this
repetition count
1 2 3
yesterday 1 1 1
today 0 2 0
tomorow 2 1 0
How to create a "repetion count" dimension in SSAS 2k5 ? Please keep in mind that my fact table is a liitle bit more complicated and I have more other dimension there.
My idea is to create a named query in DSV but I have some doubts if filtering will work correctly. | 0 | [
2,
13,
8234,
18,
5816,
214,
34,
25597,
800,
3726,
3726,
51,
837,
859,
1879,
101,
48,
7124,
21,
7124,
21,
7124,
21,
7124,
334,
7124,
334,
7124,
272,
786,
21,
786,
21,
786,
334,
786,
334,
2067,
1293,
5417,
21,
2067,
1293,
5417,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How long do you cache resources client side?
===
A website of mine will host the usual images, javascript and CSS stylesheets in the database. Since these are unlikely to change each day, I am going to use some client caching on these to reduce the server load.
How long do you cache these? A few days? More?
I'm probably not going to reuse the same name twice if I update the resource, so I shouldn't have outdated data concerns. | 0 | [
2,
184,
175,
107,
42,
16522,
2566,
6819,
270,
60,
800,
3726,
3726,
21,
2271,
16,
1114,
129,
2015,
14,
3820,
3502,
15,
8247,
8741,
17,
272,
18,
18,
1034,
17627,
18,
19,
14,
6018,
9,
179,
158,
50,
10387,
20,
753,
206,
208,
15,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to split a huge zip file into multiple volumes?
===
When I create a zip Archive via java.util.zip.*, is there a way to split the resulting archive in multiple volumes? Let's say my overall archive has a filesize of 24 MB and I want to split it into 3 files on a limit of 10 MB per file.
Is there a zip API which has this feature? Or any other nice ways to achieve this?
Thanks
Thollsten | 0 | [
2,
184,
20,
2132,
21,
2329,
12133,
3893,
77,
1886,
6127,
60,
800,
3726,
3726,
76,
31,
1600,
21,
12133,
9250,
1197,
8247,
9,
14255,
9,
2553,
306,
9,
2483,
15,
25,
80,
21,
161,
20,
2132,
14,
2927,
9250,
19,
1886,
6127,
60,
408,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting Folder permissions on Vista.
===
I am trying to set the permissions of a folder and all of it's children on a vista computer. The code I have so far is this.
public static void SetPermissions(string dir)
{
DirectoryInfo info = new DirectoryInfo(dir);
DirectorySecurity ds = info.GetAccessControl();
ds.AddAccessRule(new FileSystemAccessRule(@"BUILTIN\Users",
FileSystemRights.FullControl,
InheritanceFlags.ContainerInherit,
PropagationFlags.None,
AccessControlType.Allow));
info.SetAccessControl(ds);
}
However it's not working as I would expect it to.
Even if I run the code as administrator it will not set the permissions.
Any one want to point me in the right direction. | 0 | [
2,
2697,
19294,
5572,
18,
27,
13520,
9,
800,
3726,
3726,
31,
589,
749,
20,
309,
14,
5572,
18,
16,
21,
19294,
17,
65,
16,
32,
22,
18,
391,
27,
21,
13520,
1428,
9,
14,
1797,
31,
57,
86,
463,
25,
48,
9,
317,
12038,
11364,
309,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Apache Abdera Client - Posting/Putting
===
Looking for help using the Apache Abdera Atom Client. I am trying to post and put files to a feed but I am getting a 400 error saying that the content type must be application/x-www-form-urlencoded or multipart/form-data | 0 | [
2,
17140,
11249,
2615,
6819,
13,
8,
15669,
118,
4881,
1203,
800,
3726,
3726,
699,
26,
448,
568,
14,
17140,
11249,
2615,
14571,
6819,
9,
31,
589,
749,
20,
678,
17,
442,
6488,
20,
21,
4063,
47,
31,
589,
1017,
21,
4353,
7019,
1148,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
T-Sql cursor not proceeding on fetch
===
I know that cursors are frowned upon and I try to avoid their use as much as possible, but there may be some legitimate reasons to use them. I have one and I am trying to use a pair of cursors: one for the primary table and one for the secondary table. The primary table cursor iterates through the primary table in an outer loop. the secondary table cursor iterates through the secondary table in the inner loop.
The problem is, that the primary table cursor though apparently proceeding and saving the primary key column value [Fname] into a local variable @Fname, but it does not get the row for the corresponding foreign key column in the secondary table. For the secondary table it always returns the rows whose foreign key column value matches the primary key column value of the **first row** of the primary table.
Following is a very simplified example for what I want to do in the real stored procedure.
Names is the primary table
SET NOCOUNT ON
DECLARE
@Fname varchar(50) -- to hold the fname column value from outer cursor loop
,@FK_Fname varchar(50) -- to hold the fname column value from inner cursor loop
,@score int
;
--prepare primary table to be iterated in the outer loop
DECLARE @Names AS Table (Fname varchar(50))
INSERT @Names
SELECT 'Jim' UNION
SELECT 'Bob' UNION
SELECT 'Sam' UNION
SELECT 'Jo'
--prepare secondary/detail table to be iterated in the inner loop
DECLARE @Scores AS Table (Fname varchar(50), Score int)
INSERT @Scores
SELECT 'Jo',1 UNION
SELECT 'Jo',5 UNION
SELECT 'Jim',4 UNION
SELECT 'Bob',10 UNION
SELECT 'Bob',15
--cursor to iterate on the primary table in the outer loop
DECLARE curNames CURSOR
FOR SELECT Fname FROM @Names
OPEN curNames
FETCH NEXT FROM curNames INTO @Fname
--cursor to iterate on the secondary table in the inner loop
DECLARE curScores CURSOR
FOR
SELECT FName,Score
FROM @Scores
WHERE Fname = @Fname
--*** NOTE: Using the primary table's column value @Fname from the outer loop
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Outer loop @Fname = ' + @Fname
OPEN curScores
FETCH NEXT FROM curScores INTO @FK_Fname, @Score
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT ' FK_Fname=' + @FK_Fname + '. Score=' + STR(@Score)
FETCH NEXT FROM curScores INTO @FK_Fname, @Score
END
CLOSE curScores
FETCH NEXT FROM curNames INTO @Fname
END
DEALLOCATE curScores
CLOSE curNames
DEALLOCATE curNames
Here is what I get for the result. Please note that for the outer loop it DOES show the up-to-date Fname, but when that Fname is used as @Fname to fetch the relevant row from the secondary table for the succeeding iterations, it still get the rows that match the first row (Bob) of the primary table.
Outer loop @Fname = Bob
FK_Fname=Bob. Score=10
FK_Fname=Bob. Score=15
Outer loop @Fname = Jim
FK_Fname=Bob. Score=10
FK_Fname=Bob. Score=15
Outer loop @Fname = Jo
FK_Fname=Bob. Score=10
FK_Fname=Bob. Score=15
Outer loop @Fname = Sam
FK_Fname=Bob. Score=10
FK_Fname=Bob. Score=15
Please let me know what am I do wrong.
Thanks in advance!
| 0 | [
2,
13,
38,
8,
18,
22402,
29588,
52,
20459,
27,
18312,
800,
3726,
3726,
31,
143,
30,
29588,
18,
50,
6594,
685,
17,
31,
1131,
20,
2658,
66,
275,
28,
212,
28,
938,
15,
47,
80,
123,
44,
109,
11912,
2932,
20,
275,
105,
9,
31,
57,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VB.net (desktop) context menu assigned to multiple controls owner problem
===
I have two different grid controls on the same form. They share the same context menu. I am having trouble determining which control is the owner when I select the context menu item. | 0 | [
2,
13,
20468,
9,
2328,
13,
5,
3196,
197,
3880,
6,
4141,
11379,
2467,
20,
1886,
8671,
2410,
1448,
800,
3726,
3726,
31,
57,
81,
421,
7354,
8671,
27,
14,
205,
505,
9,
59,
1891,
14,
205,
4141,
11379,
9,
31,
589,
452,
2572,
13521,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... |
Maintain PHP Session
===
I am looking for a way to maintain PHP sessions across multiple domains on the same server. I am going to be integrating my sites with a Simple Machines Forum so I will need to use MySQL based sessions. Thanks! | 0 | [
2,
4027,
13,
26120,
3723,
800,
3726,
3726,
31,
589,
699,
26,
21,
161,
20,
4027,
13,
26120,
5763,
464,
1886,
15544,
27,
14,
205,
8128,
9,
31,
589,
228,
20,
44,
24529,
51,
3259,
29,
21,
1935,
6035,
5691,
86,
31,
129,
376,
20,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I add multiple should_receive expectations on an object using RSpec?
===
In my Rails controller, I'm creating multiple instances of the same model class. I want to add some RSpec expectations so I can test that it is creating the correct number with the correct parameters. So, here's what I have in my spec:
<pre>
Bandmate.should_receive(:create).with(:band_id => @band.id, :user_id => @user.id, :position_id => 1, :is_leader => true)
Bandmate.should_receive(:create).with(:band_id => @band.id, :user_id => "2222", :position_id => 2)
Bandmate.should_receive(:create).with(:band_id => @band.id, :user_id => "3333", :position_id => 3)
Bandmate.should_receive(:create).with(:band_id => @band.id, :user_id => "4444", :position_id => 4)
</pre>
This is causing problems because it seems that the Bandmate class can only have 1 "should_receive" expectation set on it. So, when I run the example, I get the following error:
<pre>
Spec::Mocks::MockExpectationError in 'BandsController should create all the bandmates when created'
Mock 'Class' expected :create with ({:band_id=>1014, :user_id=>999, :position_id=>1, :is_leader=>true}) but received it with ({:band_id=>1014, :user_id=>"2222", :position_id=>"2"})
</pre>
Those are the correct parameters for the second call to create, but RSpec is testing against the wrong parameters.
Does anyone know how I can set up my should_receive expectations to allow multiple different calls? | 0 | [
2,
184,
92,
31,
3547,
1886,
378,
1,
99,
1105,
1284,
11870,
27,
40,
3095,
568,
13,
1224,
12610,
60,
800,
3726,
3726,
19,
51,
2240,
18,
9919,
15,
31,
22,
79,
2936,
1886,
13946,
16,
14,
205,
1061,
718,
9,
31,
259,
20,
3547,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ExternalInterface Performance: Looking for Some Best-Practices/Tips
===
I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awful, particularly with larger (i.e., custom) objects; the more EI calls we make, and the larger the custom objects as pass in, the harder things seem to drop off performance-wise.
I'm assuming there's a good deal of overhead in serializing these objects, so I'm wondering, are there any best practices out there for using ExternalInterface in this particular way? There doesn't seem to be much out there in terms of documentation on this subject yet.
Is it better, say, to pass a large block of XML into the player control as a string, and parse it with Flex, than to pass it as a custom object, as a rule? How should Flex apps requiring a relatively tight integration with their host apps best use ExternalInterface without sacrificing performance? Is EI performance an issue Adobe is addressing? Any implementation differences between players 9 and 10? What kinds of things should we avoid to get the most out of this feature?
Thanks in advance!
Chris | 0 | [
2,
4886,
6280,
6413,
956,
45,
699,
26,
109,
246,
8,
7310,
14468,
5052,
118,
10169,
18,
800,
3726,
3726,
31,
22,
79,
568,
14409,
203,
19,
14,
13,
5661,
16,
21,
1936,
4865,
13,
5,
26694,
517,
28,
40,
12138,
1348,
396,
569,
6,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HttpWebRequest over SSL?
===
I've used HttpWebRequests to post data to HTTPS websites before, and I've never had todo anything different than a regular HTTP Post.
Does anyone know if there are any tricks involved that I missed to ensure that this is done properly? | 0 | [
2,
7775,
458,
3692,
10351,
84,
13,
18,
18,
255,
60,
800,
3726,
3726,
31,
22,
195,
147,
7775,
458,
3692,
10351,
18,
20,
678,
1054,
20,
7775,
18,
13931,
115,
15,
17,
31,
22,
195,
243,
41,
20,
537,
602,
421,
119,
21,
1290,
7775,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SqlDateTime overflow Exception
===
I am trying to insert a time only value, but get the following error
> + ex {"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."} System.Exception
From the front end, the time is selected using the "TimeEdit" control, with the up and down arrows. The table in SQL Server has the fields set as smalldatetime. I only need to store the time. I use the following to return data to the app
select id,CONVERT(CHAR(5),timeFrom,8)as timeFrom,CONVERT(CHAR(5),timeTo,8)as timeTo
FROM dbo.Availability
where id = @id
and dayName = @weekday
How do I pass time only to the table?
Thanks | 0 | [
2,
4444,
255,
8209,
891,
20285,
5391,
800,
3726,
3726,
31,
589,
749,
20,
14692,
21,
85,
104,
1923,
15,
47,
164,
14,
249,
7019,
13,
1,
2754,
1396,
13,
1,
7,
18,
22402,
8209,
891,
20285,
9,
491,
44,
128,
13,
8197,
8197,
1053,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you deal with Brain Buffer Overflow?
===
This is probably an old topic, but I just ran into it again, and it sounds like a good area to look for other ideas.
The library I am working on has a bug that I am having difficulty isolating. In fact one of the things that happened in the last day or two, was the size got too big. The amount of detail is so large, I can't keep the whole thing in my head.
I call this Brain Buffer Overflow.
There are many techniques available to help reduce the size of the stuff you need to fit into your head, so there is room for more important stuff.
- Breaking things into **functions**, so you deal with the interface, rather than the internal details.
- Same thing for **classes**. Hide the dirty implementation behind a class interface, so you don't have to think about the details.
- I print source listings and tape them up on the wall, so I have a more global view than what is available, though my 22 inch lcd monitor.
What techniques do you use to help keep unneeded stuff out of your brain buffer, so you can deal with larger problems?
| 4 | [
2,
184,
107,
42,
1183,
29,
1964,
17497,
20285,
60,
800,
3726,
3726,
48,
25,
910,
40,
315,
8303,
15,
47,
31,
114,
717,
77,
32,
188,
15,
17,
32,
2795,
101,
21,
254,
217,
20,
361,
26,
89,
3478,
9,
14,
1248,
31,
589,
638,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.