unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Mac Console paste generating trash text
===
On mac os console, when doing paste of large quantities of text (for example an sql database) I get loads of trash and corrupted text. But when doing the same under windows or into a text box, this doesn't happen and the text comes out ok.
Is this a buffer problem or something like it? If so anyone know any flag to make its size bigger?
Other than that, anyone got any sugestiong on a way to fix this? | 0 | [
2,
1572,
8650,
640,
62,
13500,
10744,
1854,
800,
3726,
3726,
27,
1572,
13,
759,
8650,
15,
76,
845,
640,
62,
16,
370,
13787,
16,
1854,
13,
5,
1106,
823,
40,
4444,
255,
6018,
6,
31,
164,
19069,
16,
10744,
17,
11305,
69,
1854,
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 I get the value of MemberInfo?
===
How do I get the value of a MemberInfo object? .Name returns the name of the variable, but I need the value.
I think you can do this with FieldInfo but I don't have a snippet, if you know how to do this can you provide a snippet??
Thanks! | 0 | [
2,
184,
107,
31,
164,
14,
1923,
16,
322,
108,
4120,
60,
800,
3726,
3726,
184,
107,
31,
164,
14,
1923,
16,
21,
322,
108,
4120,
3095,
60,
13,
9,
7259,
4815,
14,
204,
16,
14,
7612,
15,
47,
31,
376,
14,
1923,
9,
31,
277,
42,
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... |
free sms api
===
Anyone know of a free sms api I can integrate in my web application that will enable my users to send a limited amount of free sms messages? | 4 | [
2,
551,
7613,
18,
21,
2159,
800,
3726,
3726,
1276,
143,
16,
21,
551,
7613,
18,
21,
2159,
31,
92,
18399,
19,
51,
2741,
3010,
30,
129,
9240,
51,
3878,
20,
2660,
21,
1317,
2006,
16,
551,
7613,
18,
7561,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
(Windows) Exception Handling: to Event Log or to Database?
===
I've worked in shops where I've implemented Exception Handling into the event log, and into a table in the database.
Each have their merits, of which I can highlight a few based on my experience:
Event Log
- Industry standard location for exceptions (+)
- Ease of logging (+)
- Can log database connection problems here (+)
- Can build report and viewing apps on top of the event log (+)
- Needs to be flushed every so often, if alot is reported there (-)
- Not as extensible as SQL logging [add custom fields like method name in SQL] (-)
SQL/Database
- Can handle large volumes of data (+)
- Can handle rapid volume inserts of exceptions (+)
- Single storage location for exception in load balanced environment (+)
- Very customizable (+)
- A little easier to build reporting/notification off of SQL storage (+)
- Different from where typical exceptions are stored (-)
Am I missing any major considerations?
I'm sure that a few of these points are debatable, but I'm curious what has worked best for other teams, and why you feel strongly about the choice.
| 0 | [
2,
13,
5,
27508,
18,
6,
5391,
7988,
45,
20,
807,
6738,
54,
20,
6018,
60,
800,
3726,
3726,
31,
22,
195,
577,
19,
7014,
113,
31,
22,
195,
6807,
5391,
7988,
77,
14,
807,
6738,
15,
17,
77,
21,
859,
19,
14,
6018,
9,
206,
57,
66... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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# Web Server Connection Problem
===
I'm trying to make a simple C# web server that, at this stage, you can access via your browser and will just do a "Hello World".
The problem I'm having is that the server can receive data fine - I get the browser's header information - but the browser doesn't receive anything I send. Furthermore, I can only connect to the server by going to localhost (or 127.0.0.1). I can't get to it by going to my IP and it's not a network setting because Apache works fine if I run that instead. Also, I'm using a port monitoring program and after I attempt a connection from a browser, the process's port gets stuck in a TIME_WAIT state even though I told the connection to close and it should be back to LISTEN.
Here's the relevant code. A couple calls might not make sense but this is a piece of a larger program.
class ConnectionHandler
{
private Server server;
private TcpListener tcp;
private ArrayList connections;
private bool listening;
private Thread listeningThread;
public Server getServer()
{
return server;
}
private void log(String s, bool e)
{
server.log("Connection Manager: " + s, e);
}
private void threadedListen()
{
while (listening)
{
try
{
TcpClient t = tcp.AcceptTcpClient();
Connection conn = new Connection(this, t);
}
catch (NullReferenceException)
{
log("unable to accept connections!", true);
}
}
log("Stopped listening", false);
}
public void listen()
{
log("Listening for new connections", false);
tcp.Start();
listening = true;
if (listeningThread != null && listeningThread.IsAlive)
{
listeningThread.Abort();
}
listeningThread = new Thread(new ThreadStart(this.threadedListen));
listeningThread.Start();
}
public void stop()
{
listening = false;
if (listeningThread != null)
{
listeningThread.Abort();
log("Forced stop", false);
}
log("Stopped listening", false);
}
public ConnectionHandler(Server server)
{
this.server = server;
tcp = new TcpListener(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 80));
connections = new ArrayList();
}
}
class Connection
{
private Socket socket;
private TcpClient tcp;
private ConnectionHandler ch;
public Connection(ConnectionHandler ch, TcpClient t)
{
try
{
this.ch = ch;
this.tcp = t;
ch.getServer().log("new tcp connection to " + this.tcp.Client.RemoteEndPoint.ToString(), false);
NetworkStream ns = t.GetStream();
String responseString;
Byte[] response;
Int32 bytes;
responseString = String.Empty;
response = new Byte[512];
bytes = ns.Read(response, 0, response.Length);
responseString = System.Text.Encoding.ASCII.GetString(response, 0, bytes);
ch.getServer().log("Received: " + responseString);
String msg = "<html>Hello World</html>";
String fullMsg = "HTTP/1.x 200 OK\r\n"
+ "Server: Test Server\r\n"
+ "Content-Type: text/html; charset=UTF-8\r\n"
+ "Content-Length: " + msg.Length + "\r\n"
+ "Date: Sun, 10 Aug 2008 22:59:59 GMT\r\n";
nsSend(fullMsg, ns);
nsSend(msg, ns);
ns.Close();
tcp.Close();
}
catch (ArgumentNullException e)
{
ch.getServer().log("connection error: argument null exception: " + e);
}
catch (SocketException e)
{
ch.getServer().log("connection error: socket exception: " + e);
}
}
private void nsSend(String s, NetworkStream ns)
{
Byte[] data = System.Text.Encoding.ASCII.GetBytes(s);
ns.Write(data, 0, data.Length);
ns.Flush();
ch.getServer().log("Sent: " + s);
}
}
Does anyone have any ideas? It feels like it's gotta be something stupid on my part but I just don't know what. I'd really appreciate any insight | 0 | [
2,
272,
5910,
2741,
8128,
2760,
1448,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
21,
1935,
272,
5910,
2741,
8128,
30,
15,
35,
48,
876,
15,
42,
92,
1381,
1197,
154,
16495,
17,
129,
114,
107,
21,
13,
7,
11515,
126,
7,
9,
14,
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... |
Case-insensitive filename handling in Mercurial
===
I'm using TortoiseHg 0.5 (which includes Mercurial 1.0.2) on Vista64. My understanding from the [Mercurial Book][1] is that Mercurial should handle filenames in a case-insensitive manner on a case-insensitive filesystem (such as NTFS, which is what I'm on). However I find that my installation of Mercurial is in fact sensitive to case:
>hg status -A foo
C foo
>hg status -A FOO
? FOO
Could this be a bug in Mercurial, a bug in the TortoiseHg build of Mercurial, or is it something else? How can I achieve case-insensitive filename handling from Mercurial on Windows?
[1]: http://hgbook.red-bean.com/hgbookch7.html#x11-1530007.7 | 0 | [
2,
610,
8,
108,
19435,
3893,
7259,
7988,
19,
9046,
3594,
192,
800,
3726,
3726,
31,
22,
79,
568,
25691,
18187,
713,
9,
264,
13,
5,
2140,
1103,
9046,
3594,
192,
137,
9,
387,
9,
135,
6,
27,
13520,
3470,
9,
51,
3260,
37,
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... |
defined? method in Ruby and Rails
===
I have a quite old templating system written on top of ERB. It relies on ERB templates stored in database. Those are read and rendered. When I want to pass data from one template to another I use the :locals parameter to Rails render method. For setting default variables of those variables in some templates I use the defined? method which simply tells me if local variable has been defined and if not I initialize it with default value like this:
unless defined?(perex)
perex = true
end
I am upgrading the app to latest Rails and I see some weird behavior. Basically this sometimes works (sometimes perex is undefined) and sometimes it does not (perex is defined and set to nil). This happens without anything else changing.
I have two questions:
Is there any better way other than using defined? which is proving unreliable (was reliable for several years on top Rails 1.6)? Such a way should not result in me rewriting all the templates.
I have been going through Ruby docs and was not able to find anything about defined? method. Was it deprecated or am I just plain blind? | 0 | [
2,
2811,
60,
2109,
19,
10811,
17,
2240,
18,
800,
3726,
3726,
31,
57,
21,
1450,
315,
13,
9577,
255,
1880,
329,
642,
27,
371,
16,
13,
106,
220,
9,
32,
19272,
27,
13,
106,
220,
22894,
18,
8214,
19,
6018,
9,
273,
50,
1302,
17,
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 do I associate a nib (.xib) file with a UIView?
===
I have a subclass "s" of UIView. I want to put some buttons and labels on s. How do I associate my UIView subclass with a nib file? | 0 | [
2,
184,
107,
31,
4169,
21,
1781,
220,
13,
5,
9,
5845,
220,
6,
3893,
29,
21,
13,
5661,
4725,
60,
800,
3726,
3726,
31,
57,
21,
972,
1898,
13,
7,
18,
7,
16,
13,
5661,
4725,
9,
31,
259,
20,
442,
109,
12861,
17,
13173,
27,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VB.NET error: Microsoft.ACE.OLEDB.12.0 provider is not registered
===
I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing). Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb. In the database project I have a function which retrieves a data table as follows
private class AdminDatabase
' stores the connection string which is set in the New() method
dim strAdminConnection as string
public sub New()
...
adminName = dlgopen.FileName
conAdminDB = New OleDbConnection
conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _
"Provider=Microsoft.ACE.OLEDB.12.0"
' store the connection string in strAdminConnection
strAdminConnection = conAdminDB.ConnectionString.ToString()
My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection)
...
End Sub
' retrieves data from the database
Public Function getDataTable(ByVal sqlStatement As String) As DataTable
Dim ds As New DataSet
Dim dt As New DataTable
Dim da As New OleDbDataAdapter
Dim localCon As New OleDbConnection
localCon.ConnectionString = strAdminConnection
Using localCon
Dim command As OleDbCommand = localCon.CreateCommand()
command.CommandText = sqlStatement
localCon.Open()
da.SelectCommand = command
da.Fill(dt)
getDataTable = dt
End Using
End Function
End Class
When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception
> ex = {"The 'Microsoft.ACE.OLEDB.12.0'
> provider is not registered on the
> local machine."}
Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work. I must be missing something but I don't know what. Any ideas?
Thanks
Azim | 0 | [
2,
13,
20468,
9,
2328,
7019,
45,
7099,
9,
6174,
9,
6069,
9007,
9,
918,
9,
387,
11747,
25,
52,
3801,
800,
3726,
3726,
31,
57,
21,
3458,
1120,
570,
4295,
29,
81,
2314,
13,
5,
58,
833,
8,
9577,
6554,
669,
17,
21,
13,
20468,
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... |
where is Pktextract.exe installed?
===
I have Visual Studio 2008 and the Windows SDK 6.1 installed.
I'm trying to build a signed dll to be installed in SxS.
All the tutorials explain to use a tool called pktextract.exe which is part of the SDK, but I can't seem to find the tool. All the other tools such as makecert, mt, makecat exist.
Was pktextract replaced by some other tool in the latest version of the sdk?
Thanks for the help. | 0 | [
2,
113,
25,
13,
17244,
38,
1706,
19915,
9,
1706,
62,
4066,
60,
800,
3726,
3726,
31,
57,
3458,
1120,
570,
17,
14,
1936,
13,
18,
43,
197,
400,
9,
165,
4066,
9,
31,
22,
79,
749,
20,
1895,
21,
908,
13,
43,
211,
20,
44,
4066,
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... |
VB.NET How Do I skin a vb.net app
===
I want to skin a vb.net app I made ive googled some stuff and I've seen skinned vb.net apps.
However it seems like any time i try to find someone explaining it its a link to a pay for product.
Does anyone have anything useful on this? | 0 | [
2,
13,
20468,
9,
2328,
184,
107,
31,
1188,
21,
13,
20468,
9,
2328,
4865,
800,
3726,
3726,
31,
259,
20,
1188,
21,
13,
20468,
9,
2328,
4865,
31,
117,
5568,
8144,
43,
109,
3217,
17,
31,
22,
195,
541,
13,
22531,
13,
20468,
9,
2328... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VB.NET WMI OR WQL? Help
===
I have an application that when it first starts i need it to run a database query.
I have all the database queries however forms are all loaded by this method.
dim myfrm as new Form2
myfrm.show.
The thing is if this app has crashed etc i need to make sure its the first initial start of this program
Does anyone have any ideas? | 0 | [
2,
13,
20468,
9,
2328,
619,
1435,
54,
619,
22402,
60,
448,
800,
3726,
3726,
31,
57,
40,
3010,
30,
76,
32,
64,
3244,
31,
376,
32,
20,
485,
21,
6018,
25597,
9,
31,
57,
65,
14,
6018,
9386,
2829,
207,
1997,
50,
65,
8572,
34,
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... |
How to do a flip animation between more than two flips?
===
I have animation code in a class that extends the UIView:
// Start Animation Block
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:[self superview] cache:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1.0];
//int nextView = currentView + 1;
// Animations
[[self superview] exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
//And so I would do: [[self superview exchangeSubviewAtIndex:currentView withSubviewAtIndex:nextView];
//Doesn't work because curentView is not global... with each instance of a class it's reset to what it's instanciated to.
//currentView++;
// Commit Animation Block
[UIView commitAnimations];
This animation code works fine for two views. But I am trying to do this for many views. I tried by adding in a global variable (nextview index and currentView index), however this doesn't work since each custom view class has it's own instance and these variables aren't shared.
Does anyone know how I can accomplish what I want to do?
Thanks! | 0 | [
2,
184,
20,
107,
21,
8805,
6236,
128,
91,
119,
81,
8805,
18,
60,
800,
3726,
3726,
31,
57,
6236,
1797,
19,
21,
718,
30,
9073,
14,
13,
5661,
4725,
45,
12894,
799,
6236,
1921,
13,
15123,
1126,
11969,
14057,
4141,
800,
13,
5661,
120... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Difference of two 'uint'
===
When you attempt to declare an unassigned variable in C#.NET it is flagged as a compiler error, but if you produce a negative value at runtime and assign it to that variable at runtime the value wraps.
uint z = -1; // Will not compile
uint a = 5;
uint b = 6;
uint c = a - b; // Will result in uint.MaxValue
Is there a good reason why unassigned variables wrap in such a situation instead of throwing an exception?
Thanks. | 0 | [
2,
2841,
16,
81,
13,
22,
291,
6391,
22,
800,
3726,
3726,
76,
42,
1735,
20,
10123,
40,
13,
4140,
18,
13472,
7612,
19,
272,
5910,
9,
2328,
32,
25,
13,
29694,
28,
21,
21486,
7019,
15,
47,
100,
42,
2213,
21,
3682,
1923,
35,
485,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Software Project Management in Sharepoint
===
I realize that there have been other questions about software project management systems, and those are helpful, but does anyone know of good systems that also integrate with sharepoint? Ideally, I'd like to see something just like Trac with SVN backend support, but integrated into Sharepoint.
| 0 | [
2,
2306,
669,
1097,
19,
1891,
3132,
800,
3726,
3726,
31,
4007,
30,
80,
57,
74,
89,
2346,
88,
2306,
669,
1097,
1242,
15,
17,
273,
50,
15600,
15,
47,
630,
1276,
143,
16,
254,
1242,
30,
67,
18399,
29,
1891,
3132,
60,
5628,
102,
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... |
Challenge: elegantly LINQify this procedural code
===
string[] filesOfType1 = GetFileList1();
string[] filesOfType2 = GetFileList2();
var cookieMap = new Dictionary<string, CookieContainer>();
Action<string, Func<string, KeyValuePair<string, CookieContainer>>> addToMap = (filename, pairGetter) =>
{
KeyValuePair<string, CookieContainer> cookiePair;
try
{
cookiePair = pairGetter(filename);
}
catch
{
Console.WriteLine("An error was encountered while trying to read " + file + ".");
return;
}
if (cookieMap.ContainsKey(cookiePair.Key))
{
if (cookiePair.Value.Count > cookieMap[cookiePair.Key].Count)
{
cookieMap[cookiePair.Key] = cookiePair.Value;
}
}
else
{
cookieMap.Add(cookiePair.Key, cookiePair.Value);
}
};
foreach (string file in filesOfType1)
{
addToMap(file, GetType1FileCookiePair);
}
foreach (string file in filesOfType2)
{
addToMap(file, GetType2FileCookiePair);
}
Salient features that must be preserved:
* Files of type 1 are more important than files of type 2; i.e. if a file of type 1 maps to a (key, value1) combination and a file of type 2 maps to a (key, value2) combination, then we add (key, value1) to cookieMap and _not_ (key, value2).
* Secondarily, `CookieContainer`s with a higher `Count` have higher priority, i.e. if there are two (key, value) combos for the same key and both from the same filetype, we choose the one with higher `value.Count`.
* Per-case exception handling is a must; screwing up a single file-reading should just allows us to note that and continue.
My best attempt started like this:
var cookieMap = (filesOfType1.Select(file => GetType1FileCookiePair(file))
.Concat(filesOfType2.Select(file => GetType2FileCookiePair(file))))
.GroupBy(pair => pair.Key)
.Select(/* some way of selecting per the above bullets */)
.ToDictionary(pair => pair.Key, pair => pair.Value);
But it's inelegant and filling in that comment block seems like a bitch. Right now I'm happy to stay procedural, but I thought that it might be a fun challenge to see if people can come up with something really clever. | 0 | [
2,
2404,
45,
11614,
102,
6294,
1251,
8612,
48,
26429,
1797,
800,
3726,
3726,
3724,
2558,
500,
6488,
1041,
4474,
165,
800,
164,
16877,
5739,
165,
5,
6,
73,
3724,
2558,
500,
6488,
1041,
4474,
135,
800,
164,
16877,
5739,
135,
5,
6,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Injecting dependancy to Linq to Sql
===
Is there a mechanism to inject dependencies into Linq to Sql or entity framework entities? If so would it be a sensible approach? | 0 | [
2,
20316,
68,
12547,
10821,
20,
6294,
1251,
20,
4444,
255,
800,
3726,
3726,
25,
80,
21,
6534,
20,
20316,
29411,
77,
6294,
1251,
20,
4444,
255,
54,
9252,
6596,
12549,
60,
100,
86,
83,
32,
44,
21,
24599,
2141,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Proprietary system documentation 'leaks' and how to stop them?
===
>The ability to use BitKeeper free of charge had been withdrawn by the copyright holder Larry McVoy after he claimed Andrew Tridgell had reverse engineered the BitKeeper protocols in violation of the BitKeeper license. At Linux.Conf.Au 2005, Tridgell demonstrated during his keynote that the reverse engineering process he had used was simply to telnet to the appropriate port of a BitKeeper server and type "help".
> -- [Wikipedia on Git](http://en.wikipedia.org/wiki/Git_(software\)#Early_history)
Sometimes it's not always a matter of someone leaking your documentation or source code, so much as a matter of someone not remembering to delete a utility function or two. What sort of processes and procedures do you have in place to stop these sorts of 'leaks' getting through? | 0 | [
2,
18856,
329,
13945,
13,
22,
7199,
4020,
22,
17,
184,
20,
747,
105,
60,
800,
3726,
3726,
13,
1,
124,
2165,
20,
275,
1142,
8566,
551,
16,
1906,
41,
74,
9682,
34,
14,
8398,
8979,
5758,
1324,
14802,
75,
24,
1794,
2376,
13,
38,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Threads Manager
===
Im looking to build a thread manager for an application.
I have already started threading and it works entirely fine but I would like to be able to programatically kill them or get information on them.
Does anyone have ideas? | 0 | [
2,
20396,
1382,
800,
3726,
3726,
797,
699,
20,
1895,
21,
9322,
1382,
26,
40,
3010,
9,
31,
57,
614,
373,
9322,
68,
17,
32,
693,
2894,
1123,
47,
31,
83,
101,
20,
44,
777,
20,
625,
721,
8438,
1177,
105,
54,
164,
676,
27,
105,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Subtract n hours from a DateTime in Ruby
===
I have a Ruby DateTime which gets filled from a form. Additionally I have n hours from the form as well. I'd like to subtract those n hours from the previous DateTime. (To get a time range).
DateTime has two methods "-" and "<<" to subtract day and month, but not hour. ([API][1]). Any suggestions how I can do that?
[1]: http://www.ruby-doc.org/core/classes/DateTime.html | 0 | [
2,
27031,
13,
103,
974,
37,
21,
1231,
891,
19,
10811,
800,
3726,
3726,
31,
57,
21,
10811,
1231,
891,
56,
3049,
1943,
37,
21,
505,
9,
4351,
31,
57,
13,
103,
974,
37,
14,
505,
28,
134,
9,
31,
22,
43,
101,
20,
27031,
273,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Measure Thread Expenses
===
Joe Duffy states in the MSDN article "[Using concurrency for scalability][1]" that the cost of creating a thread is approximately 200,000 cycles, and the cost of destroying is about 100,000 cycles.
When I try to create a new thread to perform some calculations, I would like to be sure that the calculations themselves are more expensive than 200,000 cycles.
How could I measure the CPU cycles? I thinks it would be more interesting that measuring the execution time.
[1]: http://msdn.microsoft.com/en-us/magazine/cc163552.aspx | 0 | [
2,
4058,
9322,
12640,
800,
3726,
3726,
1802,
21052,
202,
19,
14,
4235,
43,
103,
2002,
13,
7,
2558,
12655,
25547,
26,
18957,
4091,
500,
2558,
165,
500,
7,
30,
14,
1516,
16,
2936,
21,
9322,
25,
1357,
13,
14335,
14763,
15,
17,
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 deal gracefully with null foreign keys in Linq to SQL?
===
In my database, Concessions have a many-to-one relationship with Firms (each Concession has a FirmID). SqlMetal has captured this relationship and generated the appropriate classes, so that each Concession has a Firm element. I'm binding against a query (simplified here) that returns a list of Concessions along with information about the corresponding Firm:
From c as Concession in Db.Concessions _
Select _
c.ConcessionID, _
c.Title, _
c.Firm.Title
The problem is that in some cases a Concession has not been assigned to a Firm (c.FirmID is null), so c.Firm is nothing and I get `Object not set to an instance` etc.
I can get around this by doing a join as follows:
From c As Concession In Db.Concessions _
Join f As Firm In Db.Firms On f.FirmID Equals c.FirmID _
Select _
c.ConcessionID, _
c.Title, _
Firm_Title = f.Title
This doesn't throw an error when FirmID is null (Firm_Title is just an empty string), but it's not elegant: it's not object-oriented, and it doesn't leverage all of the relational intelligence that Linq to SQL has already captured.
Is there a more graceful way to deal with this situation?
| 0 | [
2,
184,
20,
1183,
28138,
29,
16203,
1228,
5534,
19,
6294,
1251,
20,
4444,
255,
60,
800,
3726,
3726,
19,
51,
6018,
15,
12193,
18,
57,
21,
151,
8,
262,
8,
849,
1429,
29,
10656,
13,
5,
14322,
12193,
63,
21,
1904,
1340,
6,
9,
4444... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Security - is it ok to send a username and password via HTTP GET?
===
We are an organisation who have purchased a system which is used by doctors to view test results of patients (quite sensitive information).
Being a programmer, I have poked and prodded with the system and found that it submits the username and password via a HTTP GET request.
On the domain it is run on, all computers are set to bypass the proxy, so the URL with the request won't be saved in some proxy log somewhere.
But I would argue this is an unsafe way of handling username and passwords anyway.
The vendor will argue that since we never asked for it, it will be an 'enhancement' which will require additional $$$. (We never wrote the specifications for the system in the first place).
What kind of case could I make to management to make them feel this isn't to standard and that probably the only way this system would be secure is through HTTPS? | 0 | [
2,
1221,
13,
8,
25,
32,
5854,
20,
2660,
21,
4155,
7259,
17,
20884,
1197,
7775,
164,
60,
800,
3726,
3726,
95,
50,
40,
4080,
72,
57,
2432,
21,
329,
56,
25,
147,
34,
6995,
20,
1418,
1289,
1736,
16,
3586,
13,
5,
19539,
7830,
676,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 move the UIView to the "bottom" so that the next UIView displays?
===
I want to "remove" a UIView from a superview and add it again at the end... but at the "bottom" of the rest of the UIviews that belong to the superview.
Is this possible?
Any help is very appreciated! | 0 | [
2,
184,
107,
31,
780,
14,
13,
5661,
4725,
20,
14,
13,
7,
22389,
7,
86,
30,
14,
328,
13,
5661,
4725,
9412,
60,
800,
3726,
3726,
31,
259,
20,
13,
7,
99,
16598,
7,
21,
13,
5661,
4725,
37,
21,
1026,
4725,
17,
3547,
32,
188,
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... |
Events in C++
===
I'm not sure how to look for this online... I think they might be called something different in C++
I want to have a simple event system, somthing like
event myCustomEvent;
myCustomEvent.subscribe( void myHandler(string) );
myCustomEvent.fire("a custom argument");
// myHandler prints out the string passed in the first argument
event myNewCustomEvent;
myNewCustomEvent.subscribe( void myNewHandler(int) );
myNewCustomEvent.fire(10);
// myHandler prints 10
I can do this pretty easily with a simple class -- but when i want to have an event that passes a different type or amount of arguments to the subscriber i have to write, and define an entirely new event class.. I figure there has to be some library, or maybe even something native in Visual C++ 2008 that will work something similar to this. It's basicly just an implementation of the Observer pattern, so it can't be too impossible to do in C++
This really makes me appreciate how nice it is in JavaScript not to have to worry about the arguments you are passing.
Tell me if this is a stupid question.
| 0 | [
2,
963,
19,
272,
20512,
800,
3726,
3726,
31,
22,
79,
52,
562,
184,
20,
361,
26,
48,
2087,
9,
9,
9,
31,
277,
59,
530,
44,
227,
301,
421,
19,
272,
20512,
31,
259,
20,
57,
21,
1935,
807,
329,
15,
86,
79,
96,
68,
101,
807,
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... |
Visio & UML - Showing pointers in attributes and return values
===
I have the requirement of generating UML Diagrams for one of my C++ assignments. I'm using Visio 2007 and I'm having trouble representing C++ pointers. I've found a way to add a suffix to Datatypes however it's rather time consuming to do this for every pointer used or returned in my program.
Basically I'm trying to get `-object1 : Object* = NULL` and `+Object() : Object*` without digging into the properties and adding `*` to the suffix field every time.
I'm pretty much stuck with Microsoft software for making diagrams and coding so please don't suggest I use different software. However, if Visual Studio 2003 supports making UML Diagrams in a less painful way than Visio, I wouldn't object to using Visual Studio but please tell me where that option is. | 0 | [
2,
9060,
1963,
279,
13,
723,
255,
13,
8,
3187,
454,
445,
19,
13422,
17,
788,
4070,
800,
3726,
3726,
31,
57,
14,
8981,
16,
13500,
13,
723,
255,
14161,
18,
26,
53,
16,
51,
272,
20512,
16898,
9,
31,
22,
79,
568,
9060,
1963,
624,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 put GIF/PNG/... image on a BitBtn in Delphi?
===
I'm using Delphi 2007. How can I put a GIF/PNG image on a BitBtn component? | 0 | [
2,
184,
107,
31,
442,
489,
821,
118,
306,
2723,
118,
9,
9,
9,
1961,
27,
21,
1142,
220,
38,
103,
19,
23030,
60,
800,
3726,
3726,
31,
22,
79,
568,
23030,
624,
9,
184,
92,
31,
442,
21,
489,
821,
118,
306,
2723,
1961,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to share Domain objects on Grails with Ext GWT (GXT)?
===
My application is logically divided into server, which contain my Grails domain objects and controllers; and client, where I have my Ext GWT classes that build all the UI pages.
For UI requests, I am using an AJAX call to a controller method that returns, for instance, a list of domain objects as a JSON structure.
Following the DRY principle, I wouldn't like to "serialize" the domain data to a JSON string on the server then de-serialize it on the client to another structure - I'd like to take advantage of the Domain object I already have, this I don't have to change multiple places when I add, change or remove a new field.
Question is: is that a good way to go?
If yes, how would be the best way to make .groovy domain objects available on the "client-side" Ext GWT Java classes?
If no, why is it bad and what would you advice instead? | 0 | [
2,
184,
20,
1891,
4603,
3916,
27,
489,
7301,
18,
29,
1396,
38,
14094,
38,
13,
5,
263,
396,
38,
6,
60,
800,
3726,
3726,
51,
3010,
25,
11545,
102,
2350,
77,
8128,
15,
56,
3717,
51,
489,
7301,
18,
4603,
3916,
17,
9919,
18,
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... |
Castle, AOP and Logging in .NET
===
Are there any tutorials or sample programs out there on using AOP, Castle, and logging in a .Net application? I have found pieces out there but I am looking for something more to help me form a more complete picture.
Thanks,
-Brian | 0 | [
2,
1339,
15,
21,
2594,
17,
13,
13919,
19,
13,
9,
2328,
800,
3726,
3726,
50,
80,
186,
29724,
18,
54,
5717,
1726,
70,
80,
27,
568,
21,
2594,
15,
1339,
15,
17,
13,
13919,
19,
21,
13,
9,
2328,
3010,
60,
31,
57,
216,
2491,
70,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Visio & UML - Showing vectors
===
I have the requirement of generating UML Diagrams for one of my C++ assignments. I'm using Visio 2007 and I'm having trouble representing C++ vectors. The only way I can see this working is creating a custom C++ datatype or creating a vector class in my project, then for each instance of a vector in the UML, I need to dig into the properties and add `<Class>` into the suffix field.
Basically I'm trying to get `vector<Object>` without digging into the properties and adding `<Class>` to the suffix field every time.
I'm pretty much stuck with Microsoft software for making diagrams and coding so please don't suggest I use different software. However, if Visual Studio 2003 supports making UML Diagrams in a less painful way than Visio, I wouldn't object to using Visual Studio but please tell me where that option is. | 0 | [
2,
9060,
1963,
279,
13,
723,
255,
13,
8,
3187,
7497,
18,
800,
3726,
3726,
31,
57,
14,
8981,
16,
13500,
13,
723,
255,
14161,
18,
26,
53,
16,
51,
272,
20512,
16898,
9,
31,
22,
79,
568,
9060,
1963,
624,
17,
31,
22,
79,
452,
257... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Given a type ExpressionType.MemberAccess, how do i get the field value?
===
I am parsing an Expression Tree. Given a NodeType of ExpressionType.MemberAccess, how do I get the value of that Field?
From C# MSDN docs:
MemberAccess is A node that represents reading from a field or property.
A code snippet would be incredibly, incredibly helpful. Thanks in advance!!! | 0 | [
2,
504,
21,
1001,
1803,
4474,
9,
6990,
20604,
15,
184,
107,
31,
164,
14,
575,
1923,
60,
800,
3726,
3726,
31,
589,
2017,
18,
68,
40,
1803,
1541,
9,
504,
21,
15421,
4474,
16,
1803,
4474,
9,
6990,
20604,
15,
184,
107,
31,
164,
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... |
what's the best way to implement logging in T-SQL?
===
I want to implement a simple debug log, which consists of a table into which I insert insightful messages about the current state of a transaction. How do I stop inserts to this table being affected by rollbacks on the transaction that I'm trying to debug? In Oracle I can use <code>PRAGMA AUTONOMOUS_TRANSACTION</code> to ensure that the inserts are done outside of the transaction, but what are my options in T-SQL? How do you implement logging in your shop?
*NB: I'm not using SQL Server, I'm using Sybase 12.5.* | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
8713,
13,
13919,
19,
13,
38,
8,
18,
22402,
60,
800,
3726,
3726,
31,
259,
20,
8713,
21,
1935,
121,
16254,
6738,
15,
56,
2043,
16,
21,
859,
77,
56,
31,
14692,
9239,
1566,
7561,
88,
14,
866,
146... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP: Send XML over HTTPS/POST via cURL?
===
I wrote a class/function to send xml over https via PHP/cURL, just wondering if this is the correct approach, or if there's a better one.
/**
* Send XML via http(s) post
*
* curl --header "Content-Type: text/xml" --data "<?xml version="1.0"?>...." http://www.foo.com/
*
*/
function sendXmlOverPost($url, $xml) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// For xml, change the content-type.
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // ask for results to be returned
if(CurlHelper::checkHttpsURL($url)) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
// Send to remote and return data to caller.
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
cheers! | 0 | [
2,
13,
26120,
45,
2660,
23504,
84,
7775,
18,
118,
6962,
1197,
14320,
60,
800,
3726,
3726,
31,
738,
21,
718,
118,
22359,
20,
2660,
23504,
84,
7775,
18,
1197,
13,
26120,
118,
4734,
255,
15,
114,
5712,
100,
48,
25,
14,
4456,
2141,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 store xml files in an xml column using linq to sql?
===
I have xml files I want to read in and store in the database. Linq to sql requires the data to be sent in using an xelement, but if I send in the data this
new XElement("build", BuildNode.InnerXml)
I end up with data looking like this in the database <build>lt;..gt;..</build> It converts the brackets into lt; and gt; which then makes the data useless from a xml standpoint.
Any ideas on how to get the xml data inside the xml column? | 0 | [
2,
184,
20,
1718,
23504,
6488,
19,
40,
23504,
4698,
568,
6294,
1251,
20,
4444,
255,
60,
800,
3726,
3726,
31,
57,
23504,
6488,
31,
259,
20,
1302,
19,
17,
1718,
19,
14,
6018,
9,
6294,
1251,
20,
4444,
255,
4781,
14,
1054,
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... |
Asp.net Dropdownlist selectedindexchanged event not firing on up / down arrow
===
i have a server dropdwonlist in a ajax updatepanel. when i use the mouse to click on an item it fires the postback but when i click the up/down arrow to change entries, this is not firing . . any thoughts? | 0 | [
2,
28,
306,
9,
2328,
2804,
2968,
5739,
1704,
25671,
16229,
43,
807,
52,
7139,
27,
71,
13,
118,
125,
7409,
800,
3726,
3726,
31,
57,
21,
8128,
2804,
43,
8784,
5739,
19,
21,
20624,
11100,
3206,
532,
9,
76,
31,
275,
14,
7567,
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... |
Tell-A-Friend kind of form in iPhone SDK
===
I'm trying to build an in-game Tell A Friend form like in AppStore. Does anybody know if it can be found anywhere in the SDK? I wouldn't like to reinvent the sliced bread.
Thanks! | 0 | [
2,
494,
8,
58,
8,
12299,
825,
16,
505,
19,
21024,
13,
18,
43,
197,
800,
3726,
3726,
31,
22,
79,
749,
20,
1895,
40,
19,
8,
5128,
494,
21,
860,
505,
101,
19,
4865,
16828,
9,
630,
11181,
143,
100,
32,
92,
44,
216,
4922,
19,
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 - From Unfuddle to a local SVN server.
===
I currently have a couple of SVN repositories hosted at Unfuddle and I'd like to have a local copy of the repositories as a backup. Ideally, it would be a "live" backup so my local repository would "ping" the remote repository, and if any changes were detected, the changes would be applied to my local repository.
Has anyone tried this before? If so, what tools were used to accomplish the job?
Thanks.
| 0 | [
2,
184,
20,
13,
8,
37,
367,
4096,
12312,
20,
21,
375,
13,
18,
16578,
8128,
9,
800,
3726,
3726,
31,
871,
57,
21,
1335,
16,
13,
18,
16578,
302,
14882,
262,
2829,
2812,
35,
367,
4096,
12312,
17,
31,
22,
43,
101,
20,
57,
21,
375... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 - ms-access table editor (add, delete, update)
===
I have a database table that i want to allow my friends to update. What is the quickest way to have a asp.net page that is simply a form that maps to every field in the database and allows for add, deletes, and updates. I assume there should be an out of the box solution for this without having to code up each control, etc . . | 0 | [
2,
28,
306,
9,
2328,
13,
8,
4235,
8,
20604,
859,
1835,
13,
5,
14854,
15,
27448,
15,
11100,
6,
800,
3726,
3726,
31,
57,
21,
6018,
859,
30,
31,
259,
20,
1655,
51,
954,
20,
11100,
9,
98,
25,
14,
2231,
1430,
161,
20,
57,
21,
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... |
Getting the results of an http request in java
===
How do I call a url in order to process the results?
I have a stand-alone reporting servlet which I link to for reports. I want to email these reports now, if I were doing this in the browser, I could just use an xhttprequest, and process the results - I basically want to do the same thing in Java, but I'm not sure how to go about it.
| 0 | [
2,
1017,
14,
1736,
16,
40,
7775,
3772,
19,
8247,
800,
3726,
3726,
184,
107,
31,
645,
21,
287,
6362,
19,
389,
20,
953,
14,
1736,
60,
31,
57,
21,
1261,
8,
17979,
6670,
13,
10321,
1336,
56,
31,
3508,
20,
26,
2813,
9,
31,
259,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to write a datarow to a xml file
===
Here is the story. I was doing a program, every time the program is closed all the data(File links) created by the user is lost, so whenever the user reopen the program, he does have to do all the work again.
So I decided to use an xml file to store the data, because a dbms would take too long to load and code to handle a plain text file would be hard to maintain.
The data is mainly composed of Links that stores two file paths, one for the origin and one for the destination, one boolean that represent the state of the link before the program is closed, and a few other less important things.
When the program loads the data should be read restoring the previous state of the application.
So I made a xml file like this:
...
<Directories>
<Directory id="0">
<FilePath>C:\Test1</FilePath>
<PathSeparator>\</PathSeparator>
</Directory>
...
And used a DataSet to get the data.
Directory getDirectory()
{
ds = new DataSet();
ds.ReadXml(xmlPath);
DataRow[] myRow = ds.Tables["Directory"].
Select("id ="+id.ToString());// "id = id"
string temp = myRow[0]["FilePath"].ToString();
Directory result = new Directory();
result.path = temp;
temp = myRow[0]["PathSeparator"].ToString();
result.pathSeparator = temp[0];
return result;
}
All that works just fine, but then I tried to add new "rows" to the xml:
public static int addDirectory(DataSet ds, char pathSeparator, string path)
{
DataRow myRow = ds.Tables["Directory"].NewRow();
myRow.ItemArray[0] = 8;
myRow.ItemArray[1] = path;
myRow.ItemArray[2] = pathSeparator.ToString();
myRow.ItemArray[3] = "lol";
ds.Tables["Directory"].Rows.Add(myRow);
ds.AcceptChanges();
ds.WriteXml(ApplicationDataManager.xmlPath);
return 8;
}
But all this writes is <Directory/> to a random place on the .xml
What am I doing wrong?
By the way if anyone have any suggestions about how I should store that data, I would be glad to hear(read).
Thanks in advance! | 0 | [
2,
184,
20,
2757,
21,
1054,
5417,
20,
21,
23504,
3893,
800,
3726,
3726,
235,
25,
14,
609,
9,
31,
23,
845,
21,
625,
15,
352,
85,
14,
625,
25,
827,
65,
14,
1054,
5,
16877,
6271,
6,
679,
34,
14,
4155,
25,
529,
15,
86,
6634,
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... |
CakePHP and Flex - How nice do they play together?
===
I'm looking at a new project and we are wanting to use Flex (to provide the easy integration with AIR and provide a desktop app for our project). How easy does CakePHP play with Flex or is there a better PHP framework to use with Flex, or should we use none? | 0 | [
2,
8390,
26120,
17,
14409,
13,
8,
184,
2210,
107,
59,
418,
429,
60,
800,
3726,
3726,
31,
22,
79,
699,
35,
21,
78,
669,
17,
95,
50,
4638,
20,
275,
14409,
13,
5,
262,
1181,
14,
2010,
8078,
29,
282,
17,
1181,
21,
17404,
4865,
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... |
Is it acceptable practice to patch Ruby's base classes, such as Fixnum?
===
I am still very new to Ruby (reading through the Pickaxe and spending most of my time in `irb`), and now that I know it's possible to patch classes in Ruby, I'm wondering when it's acceptable to do so, specifically whether it's acceptable to patch Ruby's base classes. For example: I answered another Ruby question where the poster wanted to know how to subtract hours from a `DateTime`. Since the `DateTime` class doesn't seem to provide this functionality, I posted an answer that patches the `DateTime' and `Fixnum` classes as a possible solution. This is the code I submitted:
require 'date'
# A placeholder class for holding a set number of hours.
# Used so we can know when to change the behavior
# of DateTime#-() by recognizing when hours are explicitly passed in.
class Hours
attr_reader :value
def initialize(value)
@value = value
end
end
# Patch the #-() method to handle subtracting hours
# in addition to what it normally does
class DateTime
alias old_subtract -
def -(x)
case x
when Hours; return DateTime.new(year, month, day, hour-x.value, min, sec)
else; return self.old_subtract(x)
end
end
end
# Add an #hours attribute to Fixnum that returns an Hours object.
# This is for syntactic sugar, allowing you to write "someDate - 4.hours" for example
class Fixnum
def hours
Hours.new(self)
end
end
I patched the classes because I thought it made in this instance in order to create a clear, concise syntax for subtracting a fixed number of hours from a `DateTime`. Other solutions could have been:
- Simply create a new `DateTime` object, computing the new hour value in the call to `new`:
new_date = DateTime.new(old_date.year, old_date.month, old_date.day, old_date.hour - hours_to_subtract, old_date.min, old_date.sec)
- Write a utility method that accepts a `DateTime` and the number of hours to subtract from it, basically a wrapper around the above method:
def subtract_hours(date, hours)
return DateTime.new(date.year, date.month, date.day, date.hour - hours, date.min, date.sec)
end
However, as I mentioned, I took the patching approach because I thought it resulted in a much more expressive syntax.
Is there anything wrong with my approach, or is there a better way to achieve the same result?
| 0 | [
2,
25,
32,
12513,
1345,
20,
7331,
10811,
22,
18,
1000,
2684,
15,
145,
28,
6098,
6336,
60,
800,
3726,
3726,
31,
589,
174,
253,
78,
20,
10811,
13,
5,
22883,
120,
14,
2036,
24926,
17,
4837,
127,
16,
51,
85,
19,
13,
1,
49,
7549,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 reformat a PDF file for easier reading on iPhone?
===
I'd like to read an arbitrary PDF on my iPod Touch (or iPhone) with a reasonable font size. Some PDFs are already formatted with narrow columns and wide margins. Once I zoom the document to "remove" the margins, the text is easy to read.
Most documents have one very wide column of text. When I zoom in enough to make the text readable, the column is bigger than the screen, and I have to scroll left and right on every line to read. Not workable.
I'd like to run a program to convert my wide-column PDFs into narrow-column PDFs. I've researched a number of PDF libraries (like PDFKit on Mac OS X), but they all seem focused on displaying or creating PDFs.
Could you point me to any resources for reading the text in a PDF? I would rather write my own utility than buy a product, but I'd accept a product if that's the only way. | 0 | [
2,
184,
92,
31,
3202,
721,
21,
13,
11124,
3893,
26,
4950,
1876,
27,
21024,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
1302,
40,
17237,
13,
11124,
27,
51,
31,
10670,
1723,
13,
5,
248,
21024,
6,
29,
21,
9954,
9978,
1072,
9,
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 do I install plpython on MacOs X 10.5?
===
I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but I cannot figure out how to enable PL/Python. When I run the `CREATE LANGUAGE plpythonu` I get the following errors:
ERROR: could not access file "$libdir/plpython": No such file or directory
STATEMENT: CREATE LANGUAGE plpythonu;
psql:<stdin>:18: ERROR: could not access file "$libdir/plpython": No such file or directory
How can I fix it?
Thia the output of running pg_config:
BINDIR = /opt/local/lib/postgresql83/bin
DOCDIR =
INCLUDEDIR = /opt/local/include/postgresql83
PKGINCLUDEDIR = /opt/local/include/postgresql83
INCLUDEDIR-SERVER = /opt/local/include/postgresql83/server
LIBDIR = /opt/local/lib/postgresql83
PKGLIBDIR = /opt/local/lib/postgresql83
LOCALEDIR =
MANDIR = /opt/local/share/man
SHAREDIR = /opt/local/share/postgresql83
SYSCONFDIR = /opt/local/etc/postgresql83
PGXS = /opt/local/lib/postgresql83/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/opt/local' '--sysconfdir=/opt/local/etc/postgresql83' '--bindir=/opt/local/lib/postgresql83/bin' '--libdir=/opt/local/lib/postgresql83' '--includedir=/opt/local/include/postgresql83' '--datadir=/opt/local/share/postgresql83' '--mandir=/opt/local/share/man' '--without-docdir' '--with-includes=/opt/local/include' '--with-libraries=/opt/local/lib' '--with-openssl' '--with-bonjour' '--with-readline' '--with-zlib' '--with-libxml' '--with-libxslt' '--enable-thread-safety' '--enable-integer-datetimes' '--with-ossp-uuid' 'CC=/usr/bin/gcc-4.0' 'CFLAGS=-O2' 'CPPFLAGS=-I/opt/local/include -I/opt/local/include/ossp' 'CPP=/usr/bin/cpp-4.0' 'LDFLAGS=-L/opt/local/lib'
CC = /usr/bin/gcc-4.0 -no-cpp-precomp
CPPFLAGS = -I/opt/local/include -I/opt/local/include/ossp -I/opt/local/include/libxml2 -I/opt/local/include
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lssl -lcrypto -lz -lreadline -lm
VERSION = PostgreSQL 8.3.4
(I've just switched from Linux to Mac a couple of days ago... In Ubuntu stuff like that used to _just work_, so I am pretty lost.) | 0 | [
2,
184,
107,
31,
16146,
12443,
6448,
11570,
27,
1572,
759,
993,
332,
9,
264,
60,
800,
3726,
3726,
31,
57,
114,
4066,
678,
6879,
18,
22402,
469,
9,
240,
9,
300,
27,
1572,
13,
759,
993,
332,
9,
264,
13,
5,
12655,
9551,
6,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
regular expressions - match all anchors with optional attributes
===
I have a wysiwyg editor in my back end, and it is tripping up the first regular expression I wrote. This is in PHP4, using preg_replace(). I'm capturing the URI and linked text.
@<a\shref=\"http[s]?://([^\"]*)\"[]>(.*)<\/a>@siU
The client wanted all external links to open in a new window, so that's the expression I was using to find all (hopefully) external links, but leave internal, page anchor links, etc
I realised the wysiwyg editor also adds 'style="font-weight: bold"' if the user selects bold on the link. I've only recently started learning regular expressions so I'm unsure how to go about this problem.
Any help would be much appreciated!! | 0 | [
2,
1290,
13832,
13,
8,
730,
65,
6265,
18,
29,
12832,
13422,
800,
3726,
3726,
31,
57,
21,
5809,
18,
49,
7913,
263,
1835,
19,
51,
97,
241,
15,
17,
32,
25,
2305,
3181,
71,
14,
64,
1290,
1803,
31,
738,
9,
48,
25,
19,
13,
26120,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I convert a number to two's complement in verilog?
===
I am trying to design a 4-bit adder subtracter in verilog. This is only the second thing I have ever written in verilog, and I don't know all the correct syntax yet. This is the module I have so far:
module Question3(carryin, X, Y, Z, S, carryout, overflow);
parameter n = 4;
input carryin, Z;
input [n-1:0]X, Y;
output reg [n-1:0]S;
output reg carryout, overflow;
if(Z==0)
begin
Y = not(y) + 4'b0001;
end
always @(X, Y, carryin)
begin
{carryout, S} = X + Y + carryin;
overflow = carryout ^ X[n-1]^Y[n-1]^S[n-1];
end
endmodule
My compiler (xilinx 10.1), keeps saying "Syntax error near if." I have tried many different ways of doing the conversion, including just using a Case that takes Y as an argument, then checks all the possible 4-bit combinations, and converts them to two's complement.
Z is what determines if the adder does subtraction or addition. If it's 0, it means subtraction, and I want to convert y to two's complement, then just do regular addition. I'm sure the rest of the adder is correct, I just do not know what is wrong with the part where I'm trying to convert. | 0 | [
2,
184,
107,
31,
8406,
21,
234,
20,
81,
22,
18,
10838,
19,
13,
22466,
5567,
60,
800,
3726,
3726,
31,
589,
749,
20,
704,
21,
268,
8,
3326,
21,
13546,
27031,
106,
19,
13,
22466,
5567,
9,
48,
25,
104,
14,
153,
584,
31,
57,
462,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 get correctly-encoded HTML from the clipboard?
===
Has anyone noticed that if you retrieve HTML from the clipboard, it gets the encoding wrong and injects weird characters?
For example, executing a command like this:
string s = (string) Clipboard.GetData(DataFormats.Html)
Results in stuff like:
<FONT size=-2>Â Â <A href="/advanced_search?hl=en">Advanced
Search</A><BR>Â Â <A href="/preferences?hl=en">Preferences</A><BR>Â Â <A
href="/language_tools?hl=en">Language
Tools</A></FONT>
*Not sure how MarkDown will process this, but there are weird characters in the resulting markup above.*
It appears that the bug is with the .NET framework. What do you think is the best way to get correctly-encoded HTML from the clipboard? | 0 | [
2,
184,
20,
164,
12044,
8,
219,
22254,
13,
15895,
37,
14,
12229,
2806,
60,
800,
3726,
3726,
63,
1276,
2711,
30,
100,
42,
11917,
13,
15895,
37,
14,
12229,
2806,
15,
32,
3049,
14,
19608,
1389,
17,
20316,
18,
5455,
1766,
60,
26,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Way to Replace a Visual Component in Delphi
===
In a Delphi Form, I would like to replace one visual component with another. Example: I want to replace a Panel component with an ElPanel from a 3rd party package.
I would like all identical properties and events of the first component to be transferred to the new one, and all the components that belong to the first component (e.g. Toolbars, memos,status bars, etc.) to end up placed on the new component exactly where they were on the first one.
Is there a best/easiest way to do this other than adding the new component to the form and meticulously transferring every property, event and component to it one-by-one? | 0 | [
2,
246,
161,
20,
3934,
21,
3458,
5912,
19,
23030,
800,
3726,
3726,
19,
21,
23030,
505,
15,
31,
83,
101,
20,
3934,
53,
3458,
5912,
29,
226,
9,
823,
45,
31,
259,
20,
3934,
21,
4113,
5912,
29,
40,
931,
3206,
532,
37,
21,
203,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Managing users in a private TRAC
===
Are there plugins for trac that enable cookie based authentication instead of http authentication, and allow keeping the site private for unknown users?
We want to allow customers outside the office to log in, add and look at the tickets on their projects, but not the projects for our other clients. Non techie users are always confused by a http login box rather than a form that asks for a username and password. | 0 | [
2,
5616,
3878,
19,
21,
932,
13,
38,
5797,
800,
3726,
3726,
50,
80,
10922,
108,
18,
26,
13,
38,
5797,
30,
9240,
19980,
432,
27963,
700,
16,
7775,
27963,
15,
17,
1655,
2882,
14,
689,
932,
26,
2562,
3878,
60,
95,
259,
20,
1655,
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... |
What causes the 'Cannot unregister UpdatePanel' error?
===
I've got a UserControl that contains an UpdatePanel. WHen I put that on a page, it throws the following error:
> Cannot unregister UpdatePanel with ID
> 'ReviewContentUpdatePanel' since it
> was not registered with the
> ScriptManager. This might occur if the
> UpdatePanel was removed from the
> control tree and later added again,
> which is not supported. Parameter
> name: updatePanel
`ReviewContentUpdatePanel` is the name of the update panel & it's not being removed or added in code, it exists in the aspx page and isn't removed. Has anyone come across this before? | 0 | [
2,
98,
4047,
14,
13,
22,
1245,
1270,
367,
12463,
9959,
11100,
3206,
532,
22,
7019,
60,
800,
3726,
3726,
31,
22,
195,
330,
21,
4155,
12898,
30,
1588,
40,
11100,
3206,
532,
9,
76,
31,
442,
30,
27,
21,
2478,
15,
32,
13566,
14,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Php not running properly
===
I have been having some problems trying to get my php running. When i try and run any scripts they appear in the source and do not run properly. This is the htaccess file:
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
Could this be the error? | 0 | [
2,
13,
26120,
52,
946,
7428,
800,
3726,
3726,
31,
57,
74,
452,
109,
1716,
749,
20,
164,
51,
13,
26120,
946,
9,
76,
31,
1131,
17,
485,
186,
17505,
59,
1893,
19,
14,
1267,
17,
107,
52,
485,
7428,
9,
48,
25,
14,
13,
9020,
20604... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 provide runtime form design for my end user?
===
I would like to create a report designer that has the same functionality and ease of use as the Visual Studio IDE. The ability to drag controls onto a form, select various subsets of those controls, align left, evenly space, etc.
The only tools I have ever encountered are really bad. Crystal Reports, the MS Access report crapola, ComponentOne, etc. Is there a third party tool that does this right, or do I have to roll my own? | 0 | [
2,
184,
107,
31,
1181,
485,
891,
505,
704,
26,
51,
241,
4155,
60,
800,
3726,
3726,
31,
83,
101,
20,
1600,
21,
1330,
4742,
30,
63,
14,
205,
18548,
17,
6378,
16,
275,
28,
14,
3458,
1120,
13,
3448,
9,
14,
2165,
20,
5501,
8671,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Quick question: Java system clock
===
What's a simple/easy way to access the system clock using Java so that I can calculate the elapsed time of an event? | 0 | [
2,
2231,
1301,
45,
8247,
329,
4229,
800,
3726,
3726,
98,
22,
18,
21,
1935,
118,
18385,
161,
20,
1381,
14,
329,
4229,
568,
8247,
86,
30,
31,
92,
18469,
14,
13,
62,
17057,
43,
85,
16,
40,
807,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Cross browser scripting proxy
===
I am developing some client side javscript that is using some JSON web services on a different domain. I have read that some browsers do not allow cross-domain scripting and that I should create a proxy on my local server to serve the data.
Can someone please point me to a simple example of how to do this in ASP.Net? | 0 | [
2,
919,
16495,
3884,
68,
27188,
800,
3726,
3726,
31,
589,
3561,
109,
6819,
270,
3009,
710,
8741,
30,
25,
568,
109,
487,
528,
2741,
687,
27,
21,
421,
4603,
9,
31,
57,
1302,
30,
109,
16495,
18,
107,
52,
1655,
919,
8,
537,
6232,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Preventing Users from Working on the Same Row
===
I have a web application at work that is similar to a ticket working system. Some users enter new issues. Other workers choose and resolve issues. All of the data is maintained in MS SQL server 2005.
The users working to resolve issues go to a page where they can view open issues. Because up to twenty people can be looking at this page at the same time, one potential problem I had to address was what happens if someone picks an issue that someone else picked just after their page loaded.
To address this, I did two things. First, the gridview displaying the issues to select uses an AJAX timer to update every second. Once an issue has been selected, it disappears one second later at most. In case they select one within this second, they get a message asking them to choose another.
The problem is that the AJAX part of this is sending too many updates (this is what I am assuming) and it is affecting the performance of the page and database. In addition, the updates are not performing every second. I find the timer to be unreliable when working to trigger stored procedures.
There has to be a better way, but I can't seem to find one. Does anyone have experience with a situation like this or have suggestions to keep multiple users from selecting the same record to maintain? I really do not want to disable the AJAX part entirely because I feel the message alone would make the application frustrating to use.
Thanks,
| 0 | [
2,
11520,
3878,
37,
638,
27,
14,
205,
3131,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
35,
170,
30,
25,
835,
20,
21,
6133,
638,
329,
9,
109,
3878,
2830,
78,
1549,
9,
89,
2004,
3538,
17,
9854,
1549,
9,
65,
16,
14,
1054,
25,
392... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 write a mysql query that will read data from one table and write to another?
===
If this is possible, please provide a sample query or two so I can see how it would work. Both tables will be in the same database.
Thanks! | 0 | [
2,
184,
107,
31,
2757,
21,
51,
18,
22402,
25597,
30,
129,
1302,
1054,
37,
53,
859,
17,
2757,
20,
226,
60,
800,
3726,
3726,
100,
48,
25,
938,
15,
2247,
1181,
21,
5717,
25597,
54,
81,
86,
31,
92,
196,
184,
32,
83,
170,
9,
156,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
How to set up OCI to connect to Oracle from PHP?
===
On the latest Ubuntu, I have a functioning PHP 5.2.4 installation. I want to use a remote Oracle server from PHP using OCI. I've downloaded the "Instant Client Package - Basic Lite" from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html. I've unzipped the package containing the OCI libraries to a dir but I have no idea how to tell PHP that I want to use these libraries. Predictably, I get "Fatal error: Call to undefined function oci_connect() in..." when running this code:
<?php
$conn = oci_connect('hr', 'hrpw', 'someremotehost');
?>
I don't want to recompile PHP with Oracle support. What's the fastest way to wire up PHP so that I can use Oracle? Do I need any other libaries, like the Oracle client if I want to connect to a remote Oracle instance?
| 0 | [
2,
184,
20,
309,
71,
13,
16325,
20,
6379,
20,
15759,
37,
13,
26120,
60,
800,
3726,
3726,
27,
14,
5736,
287,
12968,
2473,
15,
31,
57,
21,
14175,
13,
26120,
331,
9,
135,
9,
300,
7758,
9,
31,
259,
20,
275,
21,
5388,
15759,
8128,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 succesfully host a asp.net mvc app on shared hosting without resorting to ugly URLs?
===
Let's assume we're talking about the recently released Beta version. Specifically I'm interested in a step-by-step tutorial or similar, and I'd be thrilled with information addressing how to do so on CrystalTech. | 0 | [
2,
184,
107,
31,
21792,
5052,
5655,
2015,
21,
28,
306,
9,
2328,
307,
8990,
4865,
27,
2592,
10637,
366,
4765,
68,
20,
9212,
13,
911,
7532,
60,
800,
3726,
3726,
408,
22,
18,
7158,
95,
22,
99,
1582,
88,
14,
1989,
261,
8434,
615,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Should I still see the query hit in SQL Profiler?
===
I am currently building a web site and I just implemented SqlCacheDependency using LinqToSQL like so.
public IQueryable<VictoryList> GetVictoryList()
{
string cacheKey = HttpContext.Current.User.Identity.Name + "victoryCacheKey";
IQueryable<VictoryList> cachednews = (IQueryable<VictoryList>)HttpContext.Current.Cache.Get(cacheKey);
if (cachednews == null)
{
var results = from v in _datacontext.ViewVictoryLists
orderby _datacontext.GetNewId()
select new VictoryList
{
MemberID = v.MemberID,
Username = v.Aspnetusername,
Location = v.Location,
DaimokuGoal = v.DaimokuGoal,
PreviewImageID = v.PreviewImageID,
TotalDaimoku = v.TotalDaimoku,
TotalDeterminations = v.TotalDeterminations,
DeterminationID = v.DeterminationID,
DeterminationName = v.DeterminationName
};
SqlCacheDependency dependency =
new SqlCacheDependency(_datacontext.GetCommand(results) as SqlCommand);
HttpContext.Current.Cache.Add(cacheKey, results, dependency, DateTime.MaxValue,
TimeSpan.Zero, CacheItemPriority.Normal, null);
return results.ToList().AsQueryable();
}
return cachednews;
}
It appears to be working as things are noticbly faster especially on some complex queries, however while looking at things in SQLProfiler I still see the query run through, I'm using the CommandBroker mode of SqlCacheDependency. Should I still see the query even though the data is obviously coming from a cached object? | 0 | [
2,
378,
31,
174,
196,
14,
25597,
770,
19,
4444,
255,
5296,
139,
60,
800,
3726,
3726,
31,
589,
871,
353,
21,
2741,
689,
17,
31,
114,
6807,
4444,
6109,
9616,
19038,
8883,
568,
6294,
1251,
262,
18,
22402,
101,
86,
9,
317,
13,
5312,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 change the name of an iPhone app?
===
I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since its nearly finished.
But I'm not sure how to do this with XCode, trying the obvious of changing the application's name in the pinfo, causes the signing process to go wrong (I think...) and my app won't launch giving me a Launcher error.
I guess I could make a new project and copy paste everything over, but it seems so primitive, that I'm hoping for a more civilized solution.
Thanks! | 0 | [
2,
184,
20,
753,
14,
204,
16,
40,
21024,
4865,
60,
800,
3726,
3726,
31,
260,
40,
21024,
669,
14,
89,
208,
29,
21,
10752,
522,
1797,
204,
15,
17,
130,
31,
259,
20,
753,
14,
204,
16,
14,
669,
179,
82,
1212,
842,
9,
47,
31,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to recover deleted files which TortoiseSVN accidentally removed?
===
This is an accident and I don't think there's a solution. But I'm asking anyways.
I introduced SVN to our webshop and I set all the dev pc's htdocs as part of the repository. (my first mistake)
Now, one of my coworkers are working on a project and didn't commit their code to svn (second mistake). His reasoning was that he's the only one who's doing work on that site and he don't need svn (another mistake: I introduced SVN as a collaborative tool)
I instructed everyone's SOP to be: update and then checkout when starting and shutting down their PC.
Needless to say, my coworker's project disappeared.
So my question is: is there any way to recover the uncomitted code?
P.s., I'm planning to add "source code doesn't exist unless its in subversion" and "backup daily" to our rules to prevent this from happening again. | 0 | [
2,
184,
20,
7635,
19584,
6488,
56,
25691,
18,
16578,
9746,
1974,
60,
800,
3726,
3726,
48,
25,
40,
3351,
17,
31,
221,
22,
38,
277,
80,
22,
18,
21,
4295,
9,
47,
31,
22,
79,
3379,
2774,
18,
9,
31,
1277,
13,
18,
16578,
20,
318,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Wrapping a label element within a legend element
===
I've never had a reason to put a label element inside of a legend element (never really thought about it or seen it done). But with the design I'm implementing, it's tempting to do so.
Here's what I'm tempted to do:
<fieldset>
<legend><label for="formInfo">I would like information on</label></legend>
<select id="formInfo">
<option value="Cats">Cats</option>
<option value="Dogs">Dogs</option>
<option value="Lolz">Lolz</option>
</select>
</fieldset>
It works as expected (clicking the label focuses the corresponding input) in Firefox3, Safari, Opera, and IE6/7 and it passes validation, but I'm just wondering if there are any known reasons (accessibility? semantics? browser issues) why this shouldn't be done | 0 | [
2,
13437,
21,
1899,
4520,
363,
21,
4393,
4520,
800,
3726,
3726,
31,
22,
195,
243,
41,
21,
1215,
20,
442,
21,
1899,
4520,
572,
16,
21,
4393,
4520,
13,
5,
9018,
510,
289,
88,
32,
54,
541,
32,
677,
6,
9,
47,
29,
14,
704,
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... |
Duplicating components at Run-Time
===
Is there a simple way to duplicate all child components under parent component, including their published properties?
For example:
- TPanel
- TLabel
- TEdit
- TListView
- TSpecialClassX
Of course the most important factor, it should duplicate any new component which I drop on the TPanel without modifying the code under normal circumstances.
I've heard of the RTTI, but never used it actually. Any ideas? | 0 | [
2,
1052,
25971,
1203,
5090,
35,
485,
8,
891,
800,
3726,
3726,
25,
80,
21,
1935,
161,
20,
19429,
65,
850,
5090,
131,
4766,
5912,
15,
215,
66,
467,
3704,
60,
26,
823,
45,
13,
8,
13,
38,
3206,
532,
13,
8,
13,
38,
21018,
13,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a makefile dependency rule that can handle missing files
===
We use GNU Make for our system. At the end of our makefiles, we have an include called Makedepends which generates a bunch of .d files using -MM switch on gcc. We then include the .d file for each .cc file using an include $(CXXFILES:.cc=.d) line. But when we delete file or move files, the dependancies step breaks and we have to manually delete the .d files (even a make clean doesn't work because the dependencies fail)
Is there a way to generate these dependency .d files or include these dependency .d files which will gracefully handle a file deletion or relocation? | 0 | [
2,
376,
21,
233,
16877,
26835,
1828,
30,
92,
3053,
2863,
6488,
800,
3726,
3726,
95,
275,
26092,
233,
26,
318,
329,
9,
35,
14,
241,
16,
318,
233,
16877,
18,
15,
95,
57,
40,
468,
227,
233,
19038,
18,
56,
7920,
18,
21,
7653,
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... |
getting pywin32 to work in the built in python 2.3 open office 2.4 installation.
===
I need to update data to a mssql 2005 database so I have decided to use adodbapi, which is supposed to come built into the standard installation of python 2.1.1 and greater.
It needs pywin32 to work correctly and the open office python 2.3 installation does not have pywin32 built into it. It also seems like this built int python installation does not have adodbapi, as I get an error when I go import adodbapi.
Any suggestions on how to get both pywin32 and adodbapi installed into this open office 2.4 python installation?
thanks | 0 | [
2,
1017,
7103,
4181,
3125,
20,
170,
19,
14,
392,
19,
20059,
172,
9,
240,
368,
488,
172,
9,
300,
7758,
9,
800,
3726,
3726,
31,
376,
20,
11100,
1054,
20,
21,
4235,
18,
22402,
812,
6018,
86,
31,
57,
868,
20,
275,
21,
537,
43,
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... |
Which language would you use for the self-study of SICP?
===
I've caught the bug to learn functional programming for real. So my
next self-study project is to work through the [Structure and
Interpretation of Computer Programs][1]. Unfortunately, I've never
learned Lisp, as I was not a CS major in college.
While SICP does not emphasize the tools for programming, doing the
exercises entails picking a Lisp-like language to use. It seems like
some implementation of [Scheme][2] would be the path of least
resistance. On the other hand, I hear of others who have used [Common
Lisp][3] and [Clojure][4]. It seems to me that Common Lisp or Clojure would be
more likely to be used in production code, and therefore slightly
better for my resume. BTW, I fully get the argument that learning a
language is worthwhile for its own sake, but learning a language that
helps my resume is still a benefit. I'm a capitalist and an academic
about my learning.
If you had to self-study SICP, which language would you pick and why?
Ideally, I would like to use a language that can run on the JVM.
I can certainly work with a language where REPL works with bash
and emacs.
[1]: http://mitpress.mit.edu/sicp/
[2]: http://plt-scheme.org/
[3]: http://gigamonkeys.com/book/
[4]: http://clojure.org | 4 | [
2,
56,
816,
83,
42,
275,
26,
14,
1119,
8,
26244,
16,
2769,
7439,
60,
800,
3726,
3726,
31,
22,
195,
1383,
14,
6256,
20,
2484,
7652,
3143,
26,
683,
9,
86,
51,
328,
1119,
8,
26244,
669,
25,
20,
170,
120,
14,
636,
13971,
17,
697... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Calling DLLs from a scripting language
===
I have a third-party product, a terminal emulator, which provides a DLL that can be linked to a C program to basically automate the driving of this product (send keystrokes, detect what's on the screen and so forth).
I want to drive it from a scripting language (I'm comfortable with Python and slightly less so with Perl) so that we don't have to compile and send out executables to our customers whenever there's a problem found.
We also want the customers to be able to write their own scripts using ours as baselines and they won't entertain the idea of writing and compiling C code.
What's a good way of getting Python/Perl to interface to a Windows DLL. My first thought was to write a server program and have a Python script communicate with it via TCP but there's got to be an easier solution.
| 0 | [
2,
2555,
13,
43,
211,
18,
37,
21,
3884,
68,
816,
800,
3726,
3726,
31,
57,
21,
422,
8,
9635,
2374,
15,
21,
3855,
3579,
14868,
15,
56,
1927,
21,
13,
43,
211,
30,
92,
44,
4727,
20,
21,
272,
625,
20,
11374,
3108,
5281,
14,
2891,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
DI- Dynamic parameter of type Type where type is parent object type
===
I have a dependency that I need to inject into one of my classes. This dependency will be lifestyle of Transient. It inturn has a dependency of type Type. This type should be the type of the original class. I was just wondering if anyone has any idea how I might go about conducting this registration.
See example:
public interface ICustomer
{
.....
}
public class Customer : ICustomer
{
public Customer(IRegister register)
{ .... }
}
public interface IRegister
{
.....
}
public class Register
{
public Register(Type partentType)
{ .... }
}
public class TestExample
{
public static void TestMe()
{
//If i was creating all this manually it would look
// something like this
IRegister myRegister = new Register(typeof(Customer));
ICustomer myCustomer = new Customer(myRegister);
}
}
Now i know i could call Container.Resolve when ever I want a Customer and then inject Register manually. But I need to inject Register into most of my classes so this isn't really that feasible. Hence I need a way of doing it via the config or via container.Register.
Cheers
Anthony | 0 | [
2,
926,
8,
7782,
18906,
16,
1001,
1001,
113,
1001,
25,
4766,
3095,
1001,
800,
3726,
3726,
31,
57,
21,
26835,
30,
31,
376,
20,
20316,
77,
53,
16,
51,
2684,
9,
48,
26835,
129,
44,
8937,
16,
26008,
9,
32,
19,
8169,
63,
21,
26835,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 preferences in Firefox
===
How do I access user preferences in Firefox? I have the following code:
var control = document.getElementById(control_id);
if (control) {
control.setAttribute('color', nsPreferences.copyUnicharPref(prefstr, default_val));
}
But when I run this, I get the following:
Error: nsPreferences is not defined
Source file: chrome://backgroundtoggle/content/options.xul
Line: 9
I'm having trouble wading through the Mozilla documentation. How do I make this do what I want?
Thanks. | 0 | [
2,
568,
9808,
18,
19,
535,
18219,
800,
3726,
3726,
184,
107,
31,
1381,
4155,
9808,
18,
19,
535,
18219,
60,
31,
57,
14,
249,
1797,
45,
4033,
569,
800,
4492,
9,
3060,
27567,
779,
1340,
5,
12898,
1,
1340,
6,
73,
100,
13,
5,
12898... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Mocking HttpContext doesnt work
===
I am trying to mockout httpcontext so that i can unit test my controller's Request.IsAuthenicated call.I am using the code that i found at Scott Hanselman's blog to simulate httpcontext using rhino.mocks.
so i have this unit test piece:
PostsController postsController = new PostsController(postDL);
mocks.SetFakeControllerContext(postsController);
Expect.Call(postsController.Request.IsAuthenticated).Return(true);
In my controller action, i have something like
if(Request.IsAuthenticated)....
when i try to run the unit test, the test fails throwing a null exception, and when i try to debug the unit test, i see that httpcontext is never assigned to the controller.
any ideas? | 0 | [
2,
18446,
7775,
1126,
11969,
5886,
170,
800,
3726,
3726,
31,
589,
749,
20,
10506,
1320,
7775,
1126,
11969,
86,
30,
31,
92,
1237,
1289,
51,
9919,
22,
18,
3772,
9,
403,
1346,
124,
4796,
1669,
645,
9,
49,
589,
568,
14,
1797,
30,
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... |
Most Unpleasant Programming Task You've Had to Do
===
What is the most <b>unpleasant</b> programming task you've ever had to do? This could be an assignment from a <b>job</b>, or a <b>project</b> or <b>homework assignment</b> for a class. Dimensions of unpleasantness can include <b>annoying</b>, <b>boring</b>, <b>tedious</b>, being <b>uncreative</b>, requiring no thought but lots of menial coding. | 4 | [
2,
127,
16727,
3143,
3005,
42,
22,
195,
41,
20,
107,
800,
3726,
3726,
98,
25,
14,
127,
13,
1,
220,
1,
1020,
5106,
472,
1830,
1,
118,
220,
1,
3143,
3005,
42,
22,
195,
462,
41,
20,
107,
60,
48,
110,
44,
40,
8427,
37,
21,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pseudo Random Generator with same output
===
I came across an article about Car remote entry system at [http://auto.howstuffworks.com/remote-entry2.htm][1] In the third bullet, author says,
> Both the transmitter and the receiver use the same pseudo-random number generator. When the transmitter sends a 40-bit code, it uses the pseudo-random number generator to pick a new code, which it stores in memory. On the other end, when the receiver receives a valid code, it uses the same pseudo-random number generator to pick a new one. In this way, the transmitter and the receiver are synchronized. The receiver only opens the door if it receives the code it expects.
Is it possible to have two PRNG functions producing same random numbers at the same time?
[1]: http://auto.howstuffworks.com/remote-entry2.htm | 0 | [
2,
8452,
5477,
15286,
29,
205,
5196,
800,
3726,
3726,
31,
281,
464,
40,
2002,
88,
349,
5388,
2792,
329,
35,
636,
21127,
6903,
18042,
9,
1544,
384,
5386,
7684,
9,
960,
118,
99,
20209,
8,
18195,
135,
9,
9020,
79,
500,
2558,
165,
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... |
How should I keep track of my test cases?
===
For a current project I am working on I need a way to keep track of test cases.
We are currently using [unfuddle][1] to keep track of our bugs, documents and source code. Since our app is a fairly complex client/server piece, we need to do some of the testing manually.
So, I am looking for a tool that will allow me to describe all the manual tests in some sort of list and remind me to work through all of them before each release (also, give me reports, etc..)
Ideally, I would like a hosted web app, as opposed to a windows application. I would like it also to be affordable.
There are a big [list of apps here][2] unfortunately, it seems none of them are hosted web applications.
Has anyone seen a hosted solution for test case management? (like unfuddle/lighthouse/github but for test cases)
Has anyone used a test case management tool for a small company? Which one?
[1]: http://unfuddle.com/
[2]: http://www.testingfaqs.org/t-management.html#ApTest_Manager | 0 | [
2,
184,
378,
31,
643,
792,
16,
51,
1289,
1871,
60,
800,
3726,
3726,
26,
21,
866,
669,
31,
589,
638,
27,
31,
376,
21,
161,
20,
643,
792,
16,
1289,
1871,
9,
95,
50,
871,
568,
636,
1020,
4096,
12312,
500,
2558,
165,
500,
20,
64... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript login form doesn't submit when user hits Enter
===
I'm working on a simple javascript login for a site, and have come up with this:
<form id="loginwindow">
<strong>Login to view!</strong>
<p><strong>User ID:</strong>
<input type="text" name="text2">
</p>
<p><strong>Password:</strong>
<input type="password" name="text1"><br>
<input type="button" value="Check In" name="Submit" onclick=javascript:validate(text2.value,"username",text1.value,"password") />
</p>
</form>
<script language = "javascript">
function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('album.html');
else
{
load('failure.html');
}
}
function load(url)
{
location.href=url;
}
</script>
...which works except for one thing: hitting enter to submit the form doesn't do anything. I have a feeling it's cause I've used "onclick" but I'm not sure what to use instead. Thoughts? | 0 | [
2,
8247,
8741,
6738,
108,
505,
1437,
22,
38,
12298,
76,
4155,
3858,
2830,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
1935,
8247,
8741,
6738,
108,
26,
21,
689,
15,
17,
57,
340,
71,
29,
48,
45,
13,
1,
4190,
4924,
3726,
7,
5567,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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# char to int
===
So I have a char in c#:
char foo = '2';
Now I want to get the 2 into an int. I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2. The following will work:
int bar = Convert.ToInt32(new string(foo, 1));
int.parse only works on strings as well.
Is there no native function in C# to go from a char to int without making it a string? I know this is trivial but it just seems odd that there's nothing native to directly make the conversion. | 0 | [
2,
272,
5910,
4892,
20,
19,
38,
800,
3726,
3726,
86,
31,
57,
21,
4892,
19,
272,
5910,
45,
4892,
4310,
111,
800,
13,
22,
135,
22,
73,
130,
31,
259,
20,
164,
14,
172,
77,
40,
19,
38,
9,
31,
477,
30,
8406,
9,
262,
6391,
3125,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 combine variable assignment with data-retrieval operations in T-SQL
===
Just to clarify, I'm running Sybase 12.5.3, but I am lead to believe that this holds true for SQL Server 2005 too. Basically, I'm trying to write a query that looks a little like this, I've simplified it as much as possible to highlight the problem:
DECLARE @a int, @b int, @c int
SELECT
@a = huzzah.a
,@b = huzzah.b
,@c = huzzah.c
FROM (
SELECT
1 a
,2 b
,3 c
) huzzah
This query gives me the following error: *"Error:141 A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations."*
The only work around that I've got for this so far, is to insert the derived-table data into a temporary table and then select it right back out again. Which works fine, but the fact that this doesn't work irks me. Is there a better way to do this?
| 0 | [
2,
184,
20,
12287,
7612,
8427,
29,
1054,
8,
6239,
3272,
3377,
1311,
19,
13,
38,
8,
18,
22402,
800,
3726,
3726,
114,
20,
23116,
15,
31,
22,
79,
946,
10315,
8436,
390,
9,
264,
9,
240,
15,
47,
31,
589,
672,
20,
985,
30,
48,
276... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tracking/Monitoring trend sudden trend changes in RRD's
===
I track alot of things with RRD, eg, uptime, network throughput, etc. This works well when you can fit all the graphs on a single page, however, once you scale beyond a page it becomes difficult to use graphs to catch issues, you need to look at them to see that there is an issue, and if there is hundreds or thousands of graphs, that obviously isn't possible.
So, is there any standard way, or existing software for monitoring rrd databases for trend changes? Eg, every day, network traffic looks pretty much the same, if it spikes or dips dramatically in a single hour/day/week compared to the norm, I'd like to be alerted to it.
| 0 | [
2,
10353,
118,
2111,
7478,
2090,
8703,
4224,
8703,
1693,
19,
761,
897,
22,
18,
800,
3726,
3726,
31,
792,
21,
5639,
16,
564,
29,
761,
897,
15,
12369,
15,
71,
891,
15,
982,
120,
4881,
15,
2722,
9,
48,
693,
134,
76,
42,
92,
2742,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Fastest way to convert string to integer in PHP
===
Using PHP, what's the fastest way to convert a string like this: `"123"` to an integer?
Why is that particular method the fastest? What happens if it gets unexpected input, such as `"hello"` or an array? | 0 | [
2,
7518,
161,
20,
8406,
3724,
20,
13820,
19,
13,
26120,
800,
3726,
3726,
568,
13,
26120,
15,
98,
22,
18,
14,
7518,
161,
20,
8406,
21,
3724,
101,
48,
45,
13,
1,
7,
918,
240,
7,
1,
20,
40,
13820,
60,
483,
25,
30,
1498,
2109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Sort File List in Xcode?
===
Is there a way in Xcode to sort my list of files under say the Classes folder Alphabetically?
I know I can drag them around, but with tons of files that is a pain.
I am surprised I can not right click on the folder and say to sort.
Please tell me there is a easy way to do this | 0 | [
2,
2058,
3893,
968,
19,
993,
9375,
60,
800,
3726,
3726,
25,
80,
21,
161,
19,
993,
9375,
20,
2058,
51,
968,
16,
6488,
131,
395,
14,
2684,
19294,
27169,
102,
60,
31,
143,
31,
92,
5501,
105,
140,
15,
47,
29,
5278,
16,
6488,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Windows: Mouse Down on Window Decoration
===
In almost any Windows application, I notice that holding the mouse button down in a non-client area causes the painting to stop. Why is this required?
For example, I have a Managed Direct 3D application which displays a spinning cube. If I place the pointer over the title bar and hold the mouse button down, the cube ceases to spin even though I have not coded any such condition into my loop.
Why is painting halted? What are the benefits? Most importantly, how can I work around this? | 0 | [
2,
1936,
45,
7567,
125,
27,
1463,
11824,
800,
3726,
3726,
19,
557,
186,
1936,
3010,
15,
31,
3551,
30,
1337,
14,
7567,
5167,
125,
19,
21,
538,
8,
150,
18513,
38,
217,
4047,
14,
2469,
20,
747,
9,
483,
25,
48,
1390,
60,
26,
823,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 import classes in JSP?
===
I am a complete JSP beginner. I am trying to use a <code>java.util.List</code> in a JSP page. What do I need to do to use classes other than ones in java.lang? | 0 | [
2,
184,
107,
42,
9010,
2684,
19,
487,
3401,
60,
800,
3726,
3726,
31,
589,
21,
1279,
487,
3401,
26931,
9,
31,
589,
749,
20,
275,
21,
13,
1,
9375,
1,
1004,
1385,
9,
14255,
9,
5739,
1,
118,
9375,
1,
19,
21,
487,
3401,
2478,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sync Framework Resources
===
I am looking for resources on Microsoft Sync Framework. Although MSDN and Google Search gave me the brief overview, I want some demos and presentations.
Also, is Live Mesh based on Sync Framework? | 0 | [
2,
6063,
150,
6596,
2566,
800,
3726,
3726,
31,
589,
699,
26,
2566,
27,
7099,
6063,
150,
6596,
9,
419,
4235,
43,
103,
17,
8144,
2122,
492,
55,
14,
2698,
21598,
15,
31,
259,
109,
19494,
17,
6364,
18,
9,
67,
15,
25,
515,
55,
1635... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Setting a thread priority in a service
===
In my service I have a few threads that each call the `CreateProcess()` function to launch an external application. I would like to adjust thread (or process) priorities to normal or lower, depending on some other factors. The problem is that `SetThreadPriority()` function fails with an error 6 (invalid handle?). I'm passing in a handle obtained from `PROCESS_INFORMATION::hThread` (after calling the `CreateProcess()` of course).
I've also tried setting the priority on the processes using the `SetPriorityClass()` function, which also fails.
Is there something special that I need to do to set priorities in a service?
Thanks in advance for your thoughts. | 0 | [
2,
2697,
21,
9322,
9857,
19,
21,
365,
800,
3726,
3726,
19,
51,
365,
31,
57,
21,
310,
20396,
30,
206,
645,
14,
13,
1,
6037,
1373,
16835,
5,
6,
1,
1990,
20,
3394,
40,
4886,
3010,
9,
31,
83,
101,
20,
14328,
9322,
13,
5,
248,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 cleanest way to convert a 5-7 digit number into xxx/xxx/xxx format in php?
===
I have sets of 5, 6 and 7 digit numbers. I need them to be displayed in the 000/000/000 format. So for example:
12345 would be displayed as 000/012/345
and
9876543 would be displayed as 009/876/543
I know how to do this in a messy way, involving a series of if/else statements, and strlen functions, but there has to be a cleaner way involving regex that Im not seeing. | 0 | [
2,
98,
18,
14,
2745,
1430,
161,
20,
8406,
21,
331,
8,
465,
15611,
234,
77,
13,
13290,
118,
13290,
118,
13290,
2595,
19,
13,
26120,
60,
800,
3726,
3726,
31,
57,
3415,
16,
331,
15,
400,
17,
453,
15611,
2116,
9,
31,
376,
105,
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... |
SQL Server Reporting Services Custom Page Layouts
===
Would it be possible to define layouts depending on the report type? ie. The layout size for PDFs would be different from the web layout. | 0 | [
2,
4444,
255,
8128,
6670,
687,
5816,
2478,
9106,
18,
800,
3726,
3726,
83,
32,
44,
938,
20,
9267,
9106,
18,
4758,
27,
14,
1330,
1001,
60,
13,
660,
9,
14,
9106,
1072,
26,
13,
11124,
18,
83,
44,
421,
37,
14,
2741,
9106,
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,
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... |
Visual Studio opens Development Servers for all websites in my project
===
I currently have a Visual Studio solution with 8 web applications.
When I try run one of these applications, 8 instances of the Casini Web Development Servers are launched.
Is there anyway to specify that only the web application I have set as startup project will be launched and not all 8.
I am using Visual Studio 2008
Thanks | 0 | [
2,
3458,
1120,
8965,
522,
17595,
26,
65,
13931,
19,
51,
669,
800,
3726,
3726,
31,
871,
57,
21,
3458,
1120,
4295,
29,
469,
2741,
3767,
9,
76,
31,
1131,
485,
53,
16,
158,
3767,
15,
469,
13946,
16,
14,
7167,
2651,
2741,
522,
17595,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
During execution, how can a java program tell how much memory it is using?
===
During execution, how can a java program tell how much memory it is using?
I don't care how efficient it is! | 0 | [
2,
112,
5769,
15,
184,
92,
21,
8247,
625,
494,
184,
212,
1912,
32,
25,
568,
60,
800,
3726,
3726,
112,
5769,
15,
184,
92,
21,
8247,
625,
494,
184,
212,
1912,
32,
25,
568,
60,
31,
221,
22,
38,
781,
184,
8243,
32,
25,
187,
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... |
DataTable visualizer disappeared from my Visual Studio
===
A while ago I noticed I don't have a magnifying-glass next to my datatables. I used to have it, and somehow, sometime, it disappeared...
Has anyone seen this happen? Do you know how to help me view my datatables again?
| 0 | [
2,
1054,
5924,
3458,
11907,
4115,
37,
51,
3458,
1120,
800,
3726,
3726,
21,
133,
1464,
31,
2711,
31,
221,
22,
38,
57,
21,
4723,
103,
10874,
8,
11539,
328,
20,
51,
1054,
5924,
18,
9,
31,
147,
20,
57,
32,
15,
17,
3625,
15,
8530,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how does jQuery implement hide() and show()
===
Do they set display:none or visibility: hidden?
I'm pretty sure display:none takes the element out of the normal flow, whilst visibility:hidden just hides the element but still has a reserved space for it.
Should I just go download the unpacked version and study it or does someone have a quick answer? | 0 | [
2,
184,
630,
487,
8190,
93,
8713,
3077,
5,
6,
17,
298,
5,
6,
800,
3726,
3726,
107,
59,
309,
3042,
45,
15746,
54,
19476,
45,
3689,
60,
31,
22,
79,
1772,
562,
3042,
45,
15746,
1384,
14,
4520,
70,
16,
14,
1826,
3312,
15,
4575,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 it safe to assume that the path C:\WINDOWS\system32 always exists?
===
On OS from win 2000 or later (any language) can I assume that this path will always exists?
For example I know that on win xp in some languages the "Program Files" directory have a different name.
So is it true for the System32 folder?
Thanks.
Ohad. | 0 | [
2,
25,
32,
1834,
20,
7158,
30,
14,
2013,
272,
45,
1,
27508,
18,
1,
10724,
3125,
550,
5636,
60,
800,
3726,
3726,
27,
13,
759,
37,
628,
824,
54,
138,
13,
5,
6001,
816,
6,
92,
31,
7158,
30,
48,
2013,
129,
550,
5636,
60,
26,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 does 'Polygon' mean in terms of 3D Graphics?
===
An old Direct3D book says
> "...you can achieve an acceptable frame
> rate with hardware acceleration while
> displaying between 2000 and 4000
> polygons per frame..."
What is one polygon in Direct3D? Do they mean one primitive (indexed or otherwise) or one triangle? | 0 | [
2,
98,
630,
13,
22,
17108,
4099,
22,
884,
19,
1663,
16,
203,
43,
8351,
60,
800,
3726,
3726,
40,
315,
1744,
240,
43,
360,
898,
13,
1,
13,
7,
9,
9,
9,
245,
92,
4689,
40,
12513,
3523,
13,
1,
1684,
29,
7610,
17661,
133,
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... |
Can I change page layout when using window.print()?
===
In our application we enable users to print pages. We do this by supplying a button which when click calls the window.print() function.
Some of the pages would look better if they were printed in landscape mode rather than portrait. Is there a way to control the page layout from JavaScript? | 0 | [
2,
92,
31,
753,
2478,
9106,
76,
568,
1463,
9,
10299,
5,
6,
60,
800,
3726,
3726,
19,
318,
3010,
95,
9240,
3878,
20,
4793,
4434,
9,
95,
107,
48,
34,
20679,
21,
5167,
56,
76,
10840,
3029,
14,
1463,
9,
10299,
5,
6,
1990,
9,
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... |
Python: DISTINCT on GQuery result set (GQL, GAE)
===
Imagine you got an entity in the Google App Engine datastore, storing links for anonymous users.
You would like to perform the following SQL query, which is not supported:
SELECT DISTINCT user_hash FROM links
Instead you could use:
user = db.GqlQuery("SELECT user_hash FROM links")
How to use Python **most efficiently** to filter the result, so it returns a DISTINCT result set?
How to count the DISTINCT result set?
| 0 | [
2,
20059,
45,
4421,
27,
489,
8190,
93,
829,
309,
13,
5,
263,
22402,
15,
13,
17721,
6,
800,
3726,
3726,
4382,
42,
330,
40,
9252,
19,
14,
8144,
4865,
1406,
1054,
16828,
15,
25615,
6271,
26,
10364,
3878,
9,
42,
83,
101,
20,
2985,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Can I configure SMTP in IIS, so it relays to a remote SMTP server?
===
I want to configure SMTP on my web server, so that any email sent through the SMTP server is relayed to a remote SMTP Server. The IIS SMTP server would have to use SMTP authentication, and use the host name, username and password (as if configuring a normal email client).
Does anybody know if this is possible? | 0 | [
2,
92,
31,
1065,
15951,
7613,
13726,
19,
595,
18,
15,
86,
32,
6953,
18,
20,
21,
5388,
7613,
13726,
8128,
60,
800,
3726,
3726,
31,
259,
20,
1065,
15951,
7613,
13726,
27,
51,
2741,
8128,
15,
86,
30,
186,
8517,
795,
120,
14,
7613,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 it necessary to have a seperate View for each controller action?
===
Is there a mandatory relationship between a Controller Action and a View? I mean is it necessary to have a physical View (.aspx page) for each Action inside a Controller class? | 0 | [
2,
25,
32,
2378,
20,
57,
21,
10332,
106,
1373,
1418,
26,
206,
9919,
1028,
60,
800,
3726,
3726,
25,
80,
21,
12605,
1429,
128,
21,
9919,
1028,
17,
21,
1418,
60,
31,
884,
25,
32,
2378,
20,
57,
21,
1825,
1418,
13,
5,
9,
472,
306... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Anyone got a copy of MSIINV.EXE?
===
Does anyone have a copy of MSIINV.EXE (The MSI Inventory tool)? The site where it used to be available is down(http://www.huydao.net/). I'm trying to uninstall some components in order to force the Visual Studio Setup to reinstall them. I apologize as this is not strictly a programming question but I figured anyone that has installed some of the Visual Studio beta stuff may have run into this problem as well. | 0 | [
2,
1276,
330,
21,
4344,
16,
4235,
49,
108,
710,
9,
1706,
62,
60,
800,
3726,
3726,
630,
1276,
57,
21,
4344,
16,
4235,
49,
108,
710,
9,
1706,
62,
13,
5,
124,
4235,
49,
13875,
5607,
6,
60,
14,
689,
113,
32,
147,
20,
44,
904,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
JAXB or StAX Message Limits
===
I'm current developing a WebService in a Bea Websphere 6.1 environment with Axis 2 implementation, I'm trying to respect the current standards for Web Services (JAXB, JAXWS, StAX...).
How long can be an XML message on this plattform?
I've searched arround but I haven't found anything related to this topic. | 0 | [
2,
11712,
220,
54,
13,
18,
15514,
2802,
5887,
800,
3726,
3726,
31,
22,
79,
866,
3561,
21,
2741,
11449,
19,
21,
44,
58,
2741,
14079,
400,
9,
165,
2307,
29,
8577,
172,
6123,
15,
31,
22,
79,
749,
20,
2873,
14,
866,
3364,
26,
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 do i create a recursive query?
===
Let's say I have the following table:
CustomerID ParentID Name
========== ======== ====
1 null John
2 1 James
3 2 Jenna
4 3 Jennifer
5 3 Peter
6 5 Alice
7 5 Steve
8 1 Larry
I want to retrieve in one query all the descendants of James (Jenna,Jennifer,Peter, Alice, Steve).
Thanks,
Pablo.
| 0 | [
2,
184,
107,
31,
1600,
21,
302,
24244,
25597,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
14,
249,
859,
45,
7705,
1340,
4766,
1340,
204,
800,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
3726,
800,
3726,
3726,
3726,
3726,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 check/update a row of values based on a single column header?(Access)
===
HI
I have a access databse with many tables. what i am trying to do is get the user to give an input. eg salary. then i go and check the whole database for that field to check if it is empty for any record and if it is empty i would like to update it by 99999.
Also is it possible to write a report saying for which records the updates have been made.
I am looking for a sample vba code
THanks | 0 | [
2,
184,
20,
2631,
118,
576,
8209,
21,
3131,
16,
4070,
432,
27,
21,
345,
4698,
157,
106,
60,
5,
20604,
6,
800,
3726,
3726,
4148,
31,
57,
21,
1381,
1054,
220,
870,
29,
151,
7484,
9,
98,
31,
589,
749,
20,
107,
25,
164,
14,
4155... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 is the best alternative for Java Serialization?
===
I'm currently working on a project which needs to persist any kind of objects (of which implementation we don't have any control) so these objects could be recovered afterwards.
We can't implement a ORM because we can't restrict the users of our library at development time.
Our first alternative was to serialize it with the Java default serialization but we had a lot of trouble recovering the objects when the users started to pass different versions of the same object (attributes changed types, names, ...).
We have tried with the XMLEncoder class (transforms an object into a XML), but we have found that there is a lack of functionality (doesn't support Enums for example).
Finally, we also tried JAXB but this impose our users to annotate their classes.
Any good alternative? | 0 | [
2,
56,
25,
14,
246,
2676,
26,
8247,
5956,
1829,
60,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
21,
669,
56,
2274,
20,
22084,
186,
825,
16,
3916,
13,
5,
1041,
56,
6123,
95,
221,
22,
38,
57,
186,
569,
6,
86,
158,
3916,
110,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.