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>
Having a code like this:
from lxml import etree
root = etree.Element("root")
root.set("interesting", "somewhat")
child1 = etree.SubElement(root, "test")
How do i write root Element object to an xml file using write() method of ElementTree class?
In order to test how a program reacts when system resources become scarce (mainly the CPU but I'm interested in disk I/O too), I'd like to put an arbitrary load on the system.
Currently I'm doing something like this:
#!/bin/bash
while true
do
echo "a" >> a.txt
md5 a.txt
done
I could also start mp3-encoding audio files, or whatever.
What would be an easy and small Bash script that could be used to simulate an arbitrary load, ideally configurable using parameter(s)?
I'm very keen to learn Iphone apps development. Can you experts give me some tips as to which programing tool I should learn? tools I should install [of course , I prefer free tools]?, operating system I need? [I only have windows xp and unix flavours on my Personal laptop]. Do I need to have Iphone to test my apps? [poor guy, I don't own a Iphone].
Write a program that computes the sum of the logarithms of all the primes from 2 to some number n, and print out the sum of the logs of the primes, the number n, and the ratio of these two quantities. Test this for different values of n.
Hi. I need to write a program that check if a graph is bipartite.
I have read through wikipedia articles about graph coloring and bipartite graph. These two article suggest methods to test bipartiteness like BFS search, but I cannot write a program implementing these methods.
Any help would be appreciated!
I'd like to increase the time it takes the ajax to return in order to test various animations. By default it takes ~3-5ms. Is there a way to force a delay?
I'm using java.
How can I write a test to assert that the action new is rendered?
def method
...
render :action => :new
end
I'm looking for something like:
assert_equal layout, @response.layout
assert_equal format, @request.format
I know I can't do @response.action
Thanks in advance!
Deb
The Java manual says:
The locks held on a particular file by a single Java virtual machine do not overlap. The overlaps method may be used to test whether a candidate lock range overlaps an existing lock.
I guess that if I lock a file in a tomcat web application I can't be sure that every call to this application is done by a different JVM, can I? So how can I lock files within my tomcat application in a reliable way?
I have grown tired of all the little issues with paste template, it's horrible to maintain the templates, it has no way of updating an old project and it's very hard to test.
I'm wondering if someone knows of an alternative for quickstart generators as they have proven to be useful.
Hi i created one project in ASP.Net using SQL Server 2005.In that I got test connection succeed came but i got the following Error in coding .How to solve this
Error message is
Connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I want to automate this scenario. UserA assign an item to UserB, who gets an alert message. In order to do this I want to have two different browsers launched with different accounts to test this interaction. Is is possible to do this? If yes, how?
Can anyone please tell me what is wrong with this script. I am a python newb but i cant seem to figure out what might be causing it not to function.
def find_vowels(sentence):
"""
>>> find_vowels(test)
e
"""
count = 0
vowels = "aeiuoAEIOU"
for letter in sentence:
if letter in vowels:
count += 1
print count
if __name__ == '__main__':
import doctest
doctest.testmod()
I defined a class:
class A:
''' hash test class
a = A(9, 1196833379, 1, 1773396906)
hash(a)
-340004569
This is weird, 12544897317L expected.
'''
def __init__(self, a, b, c, d):
self.a = a
self.b = b
self.c = c
self.d = d
def __hash__(self):
return self.a * self.b + self.c * self.d
Why, in the doctest, hash() function gives a negative integer?
I am using CppUnit as a unit test framework. Is it possible to select a subset of testcases to execute at runtime?
Is there a filtering option provided within CppUnit to accomodate this?
For example, let's use the Add method of the ArrayList class. If I am using the default compiler settings in Visual Studio C# project in which arithmetic overflow is not checked, would ArrayList.Add() throw an OverflowException if I added too many items? Would surrounding the method call with checked or unchecked make any difference?
BTW, I would write a test program to determine the answer to this question if I had Visual Studio available to me right now.
I would like to automate my test and release process of my Monodroid app via Jenkins.
I found some infos for using Jenkins with "normal" Android projects:
https://jenkins-ci.org/content/getting-started-building-android-apps-hudson
http://androiddevresources.com/blog/2012/04/01/building-an-android-app-with-jenkins/
Has anyone experience on building a Monodroid app on Jenkins and running nunit tests?
Are there some ready-to-modify scripts?
I am working on a test server with an Oracle 11g installed. I was wondering if there is anyway I can replicate the database(environment + data) on my local Linux machine. I am using a CentOS 5.3 on Windows XP with SUN Virtual Box. On Windows I am using sqldeveloper client to connect to the 11g database.
Hi,
I am using Visual Studio 2008 Professional with TestDriven.NET 2.14.2190, Windows XP (x86).
When i right click on my unit tests project, test with - Coverage, I obtain the following output:
NCover couldn't create a coverage report.
and the result:
0 Passed, 0 Failed, 0 Skipped
I have no other versions of NCover installed, just the VS and TestDriven .NET
The actual testing is performed as expected - all tests successfully pass (so, there's nothing wrong with my class)
Does anyone know what could be the problem?
I am writing a selenium test and I need to assert that the page is redirected. How should I verify this? What would be the best way?
I am using PHPUnit and the PHPUnit_Extensions_SeleniumTestCase.
I have a variable that contains some text, some html, basically can be a string. I need to search the variable for a specific string to process that variable differently if it is contained. Here is a snippet of what I am trying to do, does not work obviously :)
$.each(data.results,
function(i, results) {
var text = this.text
var pattern = new RegExp("^[SEARCHTERM]$");
if(pattern.test( text ) )
alert(text); //was hoping this would alert the SEARCHTERM if found...
Hello,
I am trying to compile the Enet source code into my code framework for iPhone games. After modifying the header files I get it compiling and linking, but I absolutely must be compiling with the "Compile Source As" set to "Objective-C++" in my xcode project (because the framework code requires this). When I flip this switch in my test project, I get these errors:
Undefined symbols:
"_enet_list_clear", referenced from:
_enet_host_connect in host.o
...
Can anyone help get this linking with "Compile Source As" set to "Objective-C++"?
how to call a server side python script from javascript. if test.py is the python script file in server, and if the parameter to be passed to python is another url , then how this can be executed from javascript, how the return string from python script is obtained to the javascript.
Not a popularity contest, but if you were to elect some in some categories, what would be the names?
Here are a few suggested categories.
The only criteria I’d insist on would be:
needs to be fully OSS, not a one-man show, have some people involved, have source available and with a well-know open source license (hopefully with no distinction between commercial and other uses)
Blog engines
Wikis
Web frameworks
WPF frameworks
Silverlight frameworks
Unit test frameworks (including spec?)
ASP.Net tools
more specialized frameworks
Scott Hanselman and Hamilton Verissimo de Oliveira
Hi, i have an application deployed in Air, written in AS3 that client wants to install and test, i have developed a simple license app, but he is pushing for a full license witch he said he will fully paid on next monday.
How would you create a procedure in AS3 to deactivate application next monday? How secure will it be? will simply changing machine date will bypass this?