|
I am running a Debian Lenny server with two network interfaces. The first interface eth0 is connected to the LAN and receives an IP-address from the DHCP-server on this LAN. The second interface eth1 is connected directly to a NAS, on this NAS a DHCP ...
Started by zx883 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
This is exactly how the information provided by the DHCP server is used .
It receives an IP address via DHCP.
|
|
In my Rails app, I have a script that updates some records in the database. When I send a SIGTERM to kill the script, it occasionally receives that signal while ActiveRecord is executing a query. This leads to an ActiveRecord::StatementInvalid exception...
Started by Readonly on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
To do the database update, and signal the parent to... .
It sounds like this "script" is external to the Rails app ( script/runner or similar?), so perhaps you can decouple the "signal handler" and "worker"? Eg can you fork a child process/thread/fiber/.. .
|
|
Hi. I got a JTextField , and to that field I have added a Keylistener . Inside the keyPressed method, I ask the method to print ( System.out.println ) whats inside the JTextField .. If I hit a letter, it seems as the Keylistener receives this key-hit ...
Started by Johannes on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
See the original here
((AbstractDocument)textField.getDocument()).setDocumentFilter(new UppercaseDocumentFilter()); class....
Not the prettiest source and it's not 100% correct, just showing how it works .
Use a DocumentFilter to alter the text as it comes in .
|
Ask your Facebook Friends
|
I ported most of my app to OTP behaviors, but I'm stuck. I can't figure out how to do selective receives using a gen_server. If none of the callback function clauses match a message, rather than putting the message back in the mailbox, it errors out!
...
Started by mwt on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
There is no reason you can't implement your own service which handles... .
The gen_server while doing the selective receives, then it could be an idea to start a process as well block for you which prevents you from using selective receives.
|
|
I have a page that allows the user to download a dynamically-generated file. It takes a long time to generate, so I'd like to show a "waiting" indicator. The problem is, I can't figure out how to detect when the browser has received the file, so I can...
Started by JW on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Start the waiting ....
If you're download a file, which is saved, as opposed to being in the document, there's no way to determine when the download is complete, since it is not in the scope of the current document, but a separate process in the browser .
|
|
I have a method that I want to test which expects an IEnumerable<T> as a parameter.
I'm currently mocking the contents of the IEnumerable<T> as follows (Using Moq):
var mockParent = new Mock<ICsvTreeGridExportable>(); var mockChild =...
Started by Jamie Dixon on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Var mockParent = new Mock<ICsvTreeGridExportable>(); var mockChild = new Mock<ICsvTreeGridExportable>(); TestMethod(new[] { mockParent.Object, mockChild.Object });
Arrays... .
I would just create an array using the collection intialiser syntax .
|
|
I'm really not sure how to approach this, but I am subscribing to events fired within a custom class and ideally I wish to queue them and handle them first in first out as they come in. I am aware of Queue<T> and I think I should use this? but my...
Started by GONeale on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
As soon as the queue receives items, the event could trigger a thread to process it and empty it out.
|
|
The below code results in a timeout.
It works fine on non-Android Java. What's the matter?
//@Override public static void run() { //System.out.println ( "Local Machine IP : "+addrStr.toString ( ) ) ; HelloWorldActivity.tv.setText("Trace 1"); try { // ...
Started by Quandary on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Most specifically:
Each instance of the emulator runs behind a virtual router/firewall service that ... .
Are you testing this on the emulator or on an actual phone? If you're using an emulator you need to be aware of how networking on the emulator works .
|
|
Hi,
Is there any tool, or any VS debug option i'd use to watch all the calls my c# application, sends to the SQL server 2k8? I'd like to know how efficient is my c# code at doing the calls, like how many SELECTS is it sending at certain time/situation...
Started by Walter on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You may want....
You can launch this from the Administrative Tools in Windows Server 2003 .
SQL Profiler
Apart from the SQL Profiler, SQL Server includes performance counters that you can track live with the Windows Performance Monitor (Perfmon.exe) .
|
|
I'm having a problem with an ASP.NET MVC application that I'm developing. I'm still fairly new at web development and in particular MVC, so please forgive me is this is a really stupid newbie mistake ;-)
I have a view that displays a list of products....
Started by Tim Long on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Your action method should be:
public ActionResult Details(string id)
+1 ... .
The parameter you need to accept shouldn't be "stockCode" is should be "id"
MVC is trying to model bind the "id=item.StockCode.ToString()" to a parameter that is named the same .
|