I've got a document fragment with children that I want to loop over (when possible). This is causing an error "Cannot read property 'xxx' of null".
How do I test if this will be the case?
I would like to have a quick script listing all active hosts in a LAN, and I am a bit lost. From other posts I figured that this can be done most effectively by polling the DHCP server (in my case a Lancom router) using SNMP.
However, I am not familiar with the SNMP commands in PHP. Is snmpwalk() the correct function? Can I get snmpwalk() or any other php function to return an array that contains a list of all live hosts?
Hi,
I am using Emma for code-coverage for my project. In my JUnit test case, I am calling a method but in code coverage report, it shows no coverage for that method which is getting called from testCase. Need help. Thanks.
I know that I've seen this site before, but cannot remember it for the life of me. Basically, it is a listing of commonly used gems, like XML parsing or ORM libraries. For the ORM case, it lists ActiveRecord, DataMapper, and the like, stating the advantages and disadvantages of each. Does anyone know what this site is? I've googled and have not been able to find it.
What pattern should I use for data-access in case of VS2008 generated L2s or EF DataModels? Repository-pattern or what?
As we know VS2008 generates Data-Models and DataContexts/ObjectContexts in the same file, then, how should I arrange my VS2008 assemblies in my VS2008 solution to achieve a layered design?
If I use repository pattern, how should I arrange my assemblies in the VS2008 solution (as Data-Models and Data/Object-Contexts are stored in the same file...)?
Any web/example link would be appreciated.
I have used functions with doubly dereferenced pointers (**var) to return values. However, I was recently asked a question to figure out a use-case where a triple dereferencing (***var) may be needed. I couldn't think of any practical scenario. Does anyone have any experience here?
i am unable to open some attachments which is in russian language using microsoft outlook 2003. this problem is with my 2-3 staffs. and i am able to open these mails in outlook express in same computer. what is the problem?
Considerring two DIVs A and B, which A includes B, and CSS:
A { margin-left: -2000px; }
B { margin-left: 2000px; }
with this CSS, position of B is no difference to its situation with no CSS, i want to know will there be a performance decrease when rendering? Compare to the case of no CSS.
In the project I'm working on I have a StructureMap registry for the main web project and another registry for my integration tests. During some of the tests I wire up the web project's registry, so that I can get objects out of the container for testing.
In one case I want to be able to replace a default concrete type from the web registry with one in the test registry.
Is this possible?
How do you do it?
Microsoft Ajax can expose webservices which respond with json or xml depending on configuration.
I would like to mock these services using soap ui.
Using the wsdl I can do this to mock the services in the case where xml is returned, however how can I mock the response when JSON is returned?
I'm trying to develop an algorithm that identifies all possible paths between two nodes in a graph, as in this example.
in fact, i just need to know which nodes appear in all existing paths.
in the web only got references about DFS, A* or dijkstra, but i think they doesn't work in this case.
Does anyone know how to solve it?
Hi, in Mac or Linux, we can simply define IP and hostname in /etc/hosts. Then we can call another local computer with hostname (not with IP) we defined. But in windows, How can I do that? Where can I edit such configuration?
#!/bin/bash
function usage(){
cat <<EOF
USAGE: $0 [strategylist]
valid strategies are:
ALLD
ALLC
TitForTat
JOSS
WeightedRandom
Tester
EOF
exit 1
}
[ -z $1 ] && usage
javac robsAgents/*.java robsAgents/behaviours/*.java
agentlist='leader:robsAgents.TournamentLeader'
agentlist=$agentlist";$1:robsAgents.Contestant"
while shift;
do
agentlist=$agentlist";$1:robsAgents.Contestant"
done
java jade.Boot -gui -host 127.0.0.1 "$agentlist"
i have above bash script and have no access to a windows computer and i need to convert it to a .bat file, but don't even know how to do the shift and argument parsing
If i have some code looks like this(Please ignore the syntax, i want to understand it without a specified language):
count = 0
def countDown():
count += 1
if __name__ == '__main__':
thread1(countDown)
thread2(countDown)
thread3(countDown)
Here i have a CPU with only one core, do i really need a lock to the variable count in case of it could be over-written by other threads.
I don't know, but if the language cares a lot, please explain it under Java?C and Python, So many thanks.
Case example: I have a long list of items, and when I put my mouse over this div changes to that picture of that item. No matter where you scroll to, the div remains in a fixed position.
Sort of like a frame.
How to adjust height of textview programetically as we are typing the text
textview should increase upwards with no limit.UIScrollview for textview is disable in our case.We are giving scroll for entire view to see upward contents in textview
I am looking for a good Integrated development environment for developing applictaions in C language for both windows and linux.
IDE should have:
good interface,
easy file management,
auto filling and
any advanced options.
Tell me which IDE you most admire for these tasks
For general PC application development
For embedded application development in C
If you think it is more specific question then you may also take it as a general case.
Thanks in advance.
I’m looking at some C# code, and have come across the following statement:
#if DEBUG
// Do something here
#else
// Do something else
#endif
I assumed that DEBUG would be a defined somewhere as follows:
#define DEBUG
But I’m unable to find such a definition, although the code seems to behave as though it were set. Is DEBUG a special case, and if so, how is it set / unset?
I have a Windows 2008 server with two IP addresses assigned to a single NIC. The DNS settings are setup to register the connections's addresses on the DNS server. nslookup shows both IP addresses for the server name. How is name resolution done in this case, i.e. which IP address does the DNS server return for a host lookup? Or does it return both, and the client selects one of the addresses?
I am working with USB device on Windows that is seen as a virtual serial port. I can communicate with the device using CreateFile and ReadFile functions, but in some cases my application does not call CloseHandle (when my application in development crashes). After that all calls to CreateFile fail (ERROR_ACCESS_DENIED), and the only solution is to log in to my computer again. Is there any way to force closing the open handle (or reopening) programmatically?
I recently came across a webpage using the font "ff-tisa-web-pro-1" (specified in their css file).
How does that work? I definitely don't have this font on my computer, yet it was displayed.
When I obtain a field 'text' of an array I have to do something like this:
$text = isset($tab['text'][0])?$tab['text'][0]:"";
is there any function that returns value when element $tab['text'] exists and "" when not and of course doesn't produce notice in latter case.
Hi Experts,
Who can help me with this: I am working on Win7 x64, with VS.net 2008. I am developping for pocketpc.
When my application is deployed to the device emulator it can't connect to my computer / db server. Both de emulator as well the mobile device center are configured to use DMA. When I cradle the device using device manager, nothing happens.
What can I try?
Greets,
Jasper
Is there any way to set one job priority higher then other,
In my case there are two jobs those are working on same set of tables,first JOB-A which is running every 12 hr and other JOB-B is every 10 minutes , i think at some time when they run simultaneously JOB-B is getting in to deadlock and get failed,
i google the topic and found sqlgoverner is helpful in such cases
does anyone know how to resolve?