I have an XML file located at a location such as
http://example.com/test.xml
I'm trying to parse the XML file to use it in my program with xPath like this but it is not working.
Document doc = builder.parse(new File(url));
How can I get the XML file?
I have attached a screen shot : http://i.imgur.com/tU05T.png
I have checked my DPI settings. they are 100%.
I cant seem to find out why the test would be a differnt font size in the runtime application vs the designer.. Can anyone assist. I have tried googling, have have not come up with any meaningful links..
Heya,
I am looking for a way to close a scripty2 dialog like this :
http://mir.aculo.us/stuff/scripty2-ui/test/functional/controls_dialog.html
From outside of the dialog (i.e. with firebug command line) but my javascript mojo is a bit limited and after 30 min of going around the DOM I cannot find a way. Any hints ?
NB : scripty2 is a rewrite of script.aculo.us which uses bits of Jquery UI.
I don't normally use VB, and even less vba for excel, but I'm writing a function inside a macro and seem to not understand even the basics of creating a function
For example
Public Function test() As Integer
return 1
End Function
This gives a compile error.
This is profoundly stupid, but how do I make a function return an integer in vba?
We are implementing a single sign on mechanism in an enterprise environment, where the token is shared between applications using HTTP header. Now, in order to do the integration test, I need to write an application to simulate this.
Is there any way in ASP.NET where I can redirect to another web-page and pass a custom HTTP header in the process?
Thanks
We have recently downloaded, installed and compiled gcc-3.0.4 code. gcc compiler has built successfully and we where able to compile some same test cpp file. I would like to know how we can modify gcc source code so that we add additional run time debugging statements like the binary in execution compiled by my gcc should print below statement in a log file:
filename.cpp::FunctionName#linenumber-statement
or any additional information that I can insert via this tailored compiler code Any references would be highly appreciable.
This is Exercise 28.1.2 from HtDP. I've successfully implemented the neighbors function and all test cases pass.
(define Graph (list
(list 'A (list 'B 'E))
(list 'B (list 'E 'F))
(list 'C (list 'D))
(list 'D empty)
(list 'E (list 'C 'F))
(list 'F (list 'D 'G))
(list 'G empty)))
(define (first-line n alist)
(cond
[(symbol=? (first alist) n) alist]
[else empty]))
;; returns empty if node is not in graph
(define (neighbors n g)
(cond
[(empty? g) empty]
[(cons? (first g))
(cond
[(symbol=? (first (first g)) n) (first-line n (first g))]
[else (neighbors n (rest g))])]))
; test cases
(equal? (neighbors 'A Graph) (list 'A (list 'B 'E)))
(equal? (neighbors 'B Graph) (list 'B (list 'E 'F)))
(equal? (neighbors 'C Graph) (list 'C (list 'D)))
(equal? (neighbors 'D Graph) (list 'D empty))
(equal? (neighbors 'E Graph) (list 'E (list 'C 'F)))
(equal? (neighbors 'F Graph) (list 'F (list 'D 'G)))
(equal? (neighbors 'G Graph) (list 'G empty))
(equal? (neighbors 'H Graph) empty)
The problem comes when I copy-paste the code from Figure 77 of the text. It is supposed to determine whether a destination node is reachable from an origin node. However it appears that the code goes into an infinite loop except for the most trivial case where the origin and destination nodes are the same.
;; find-route : node node graph -> (listof node) or false
;; to create a path from origination to destination in G
;; if there is no path, the function produces false
(define (find-route origination destination G)
(cond
[(symbol=? origination destination) (list destination)]
[else (local ((define possible-route
(find-route/list (neighbors origination G) destination G)))
(cond
[(boolean? possible-route) false]
[else (cons origination possible-route)]))]))
;; find-route/list : (listof node) node graph -> (listof node) or false
;; to create a path from some node on lo-Os to D
;; if there is no path, the function produces false
(define (find-route/list lo-Os D G)
(cond
[(empty? lo-Os) false]
[else (local ((define possible-route (find-route (first lo-Os) D G)))
(cond
[(boolean? possible-route) (find-route/list (rest lo-Os) D G)]
[else possible-route]))]))
Does the problem lie in my code? Thank you.
Is there a one fix solution for all IE6 problems? One HTC/jQuery file that fixes IE6 problems like PNG, background position, hover, (even) rounded corners...
I'm just tired to look for all fixes, test them and put them seperately.
I am writing a script to run under the korn shell on AIX. I'd like to use the mkdir command to create a directory. But the directory may already exist, in which case I don't want to do anything. So I want to either test to see that the directory doesn't exist, or suppress the "File exists" error that mkdir throws when it tries to create an existing directory.
Any thoughts on how best to do this?
Hi ive got a set of li with hover effect, what i want is when the page loads ALL the li fadein randomly.
i don't want to shuffle them.....they should keep their ordering intact meaning 1,2,3,4,5.... just want to make them appear on the page randomly and stay there
test page:
http://humayunrehman.com/hovertest/
I'm wondering if its possible to configure Intellij's smart insert to suggest hamcrest and mockito dsl idioms when in test classes. Really I'm looking for something like eclipse's 'static favorites', so that when I hit ctrl + space or ctrl +shift +space the idioms are present.
In general is it possible to configure autocomplete/smart insert or the suggestions balloon for that matter. I've looked through the settings without much luck but could easily have overlooked something.
Hi,
I'm having a small problem with mod_rewrite
I have the following in my .htacces:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC]
This is my index.php file:
<?php echo $_GET['name]; ?>
This works great for the following url:
www.mySite.com/this is an example.htm
this would display "this is an example"
What i'm trying to do however, is get it to do the same, without the .htm extension:
for example:
www.mySite.com/this is an example
Any ideas?
(dont think it's relevant but i'm using xampp to test this)
I have this (simplification):
$(li).click(function{alert("test");});
<li>
<input>
</li>
What's the best way to bind an event to li but not fire when the user clicks on the input element?
Hi all,
I'm adding a label to a page using the code below, how would I set the position of the label (i.e top right)?
Label lbl = new Label();
lbl.Text = "Test";
lbl.ForeColor = System.Drawing.Color.Black;
lbl.Font.Size = 10;
lbl.Font.Bold = false;
lbl.Font.Name = "Arial";
Page.Controls.Add(lbl);
Thanks
Do I need to pay the $30 just to play around in the sandbox for Website Payments Pro? I'm trying to get Active Merchant working in Rails, and it's giving me an error "invalid merchant configuration"... after digging around a bit it says I need to "accept the billing agreement" and/or sign up for the Payments Pro first. So, do I need to pay the $30 just to test in sandbox? Or is there another workaround for this error?
Here is the situation
I create a instance of a class
$newobj = new classname1;
Then I have another class writtern below and I want to this class to access the object above
class newclass {
public function test() {
echo $newobj->display();
}
}
It is not allowed, is there a way define a variable globally through a class?
Hey Everyone,
I was wondering if any one had compiled a list of the most commonly used Android devices so I can get an idea of what I should test for. Even better would be suggested configurations for emulating each device.
Thanks,
Rob
Hi all;
var v_name = null;
$.ajax({
type: "GET",
url: "Testpage.aspx",
data: "name=test",
dataType: "html",
success: function(mydata) {
v_name= mydata;
}
});
alert(v_name);
Output: alert in null
"success" scope in alert work
how to make ? pls help
I have the following code:
[TestMethod]
public void TestFoo()
{
Foo(null);
}
private void Foo (object bar)
{
Console.WriteLine("Foo - object");
}
private void Foo (string bar)
{
Console.WriteLine("Foo - string");
}
and when I run the test "TestFoo()", the console output is "Foo - string". How does the compiler decide which method to call?
What is the best solution to play an audio file on mouse over via JavaScript? And stop it when the mouse leaves the link. jQuery is available.
<a href="/test.mp3" class="play">play</a>
I am facing a really tough time doing this. I haven't done much on web development before this. I know HTML and dats it. What else do I need to learn in order to start coding a good facebook app (specifically scripting languages like JS, PHP etc). I have already created a test application using a web hosting site. Time is of the essence here.
Hello there,
I am using C and my knowledge is very basic.
I want to scan a file and get the contents after the first or second line only ...
I tried :
fscanf(pointer,"\n",&(*struct).test[i][j]);
But this syntax simply starts from the first line =\
How is this possible ?
Thanks.
There's a TImage component on a form in my program.
In some situation, the program must test:
If "there is an image assigned to the picture property of the TImage component" then
.............
How can I do this?
Thanks in advance.