All tests should be run with jUnit3, if i run a non-configured Test, it tries to use the default-TestRunner (jUnit4).
So, i have to go into the run/debug configuration, change the TestRunner to "jUnit3" and run it again.
On EVERY Test. This just disturbs the workflow.
So, is there an option to REMOVE jUnit4 as possible TestRunner, or even better, change the Default TestRunner to jUnit3 ?
Thanks in Advance,
every time i tried to debug some php application i get this error message
Unhandled event loop exception
XPCOM error -2147467262
i found a log like this one in my home direcorty
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f232a4331b5, pid=4151, tid=139787135117072
JRE version: 6.0_18-b18
Java VM: OpenJDK 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
Derivative: IcedTea6 1.8.1
Distribution: Ubuntu 10.04 LTS, package 6b18-1.8.1-0ubuntu1
Problematic frame:
C [libc.so.6+0x391b5] exit+0x35
After switching on some debug options in Xcode, it now tells me the following in the output:
GuardMalloc[Roadcast-4010]: free: magic is 0x0000090b, not 0xdeadbeef.
GuardMalloc[Roadcast-4010]: free: header magic value at 0x43f49bf0, for block 0x43f49c00-0x43f50000, has been trashed by a buffer underrun.
GuardMalloc[Roadcast-4010]: Try running with MALLOC_PROTECT_BEFORE to catch this error immediately as it happens.
How do I switch on MALLOC_PROTECT_BEFORE?
If I have a very large document to print and on each page of the document it needs to say "page x of y" Is there a way I could precalculate y without having to printing twice as offered as a solution here: http://bytes.com/topic/c-sharp/answers/862133-c-printing-page-count
I'm trying to avoid printing once, getting they y and then setting it, then printing again.
Hello, I want to write a default Logger for my application. Currently I am using the default Java API Class Logger .
I was wondering if it's possible to format my logs to look somthing like this:
[level] [dd:MM:YYYY] [hh:mm:ss] message
The logger should also be able to print the messages into the System.out and into a file ?
Where should I look for this functionality ?
Can you please give me some code snippets ?
I have a text file where some lines have a character at the beginning and some lines don't. I want to print the text file to screen, excluding the lines that don't have a character at the beginning.
Can I do this with grep?
Is it possible in C# to set such a condition that if the condition is true - compile one file;If condition is false - compile another file?
Sort of like
#ifdef DEBUG
#include Class1.cs
#else
#include Class2.cs
#endif
Or possibly set it up in project properties.
Can we change printer settings on run time
in SSRS 2008.
If a parameter pass which can change the Page Setup of a Page.
Like For ex:
if a report is on Legal Size paper
but i want to print on A4 Landscape Or Legal on run time.
it depends on my choice.
On my machine, the execution speed between "d.clear()" and "d={}" is over 100ns so am curious why one would use one over the other.
import timeit
def timing():
d = dict()
if __name__=='__main__':
t = timeit.Timer('timing()', 'from __main__ import timing')
print t.repeat()
Hello everyone! I try to learn java for android devices..
i have to create the update function. But still have one question: How????
in class root
public void update(){
maindebug("update"); // This is my debug function
}
public void run(){
while(isRunning){ // isRunning is a boolean variable
SystemClock.sleep(100);
update();
}
}
and inside onCreate
run();
but it doesnt work :(
I'm trying to write a function named median that takes a list as an input and returns the median value of the list.
I'm working with Python 2.7.2
The list can be of any size and the numbers are not guaranteed to be in any particular order.
If the list contains an even number of elements, the function should return the average of the middle two.
This is the code I'm starting with:
def median(list):
print(median([7,12,3,1,6,9]))
In Python I can use the iterkeys() method to iterate over the keys of a dictionary. For example:
mydict = {'a': [3,5,6,43,3,6,3,],
'b': [87,65,3,45,7,8],
'c': [34,57,8,9,9,2],}
for k in mydict.iterkeys():
print k
gives me:
a
c
b
How can I do something similar in Javascript?
I need to debug a web service. I want to point my client app to the proxy URL and point the proxy to the real service URL and see all requests/responses. I know I could do network sniffing (Wireshark/Ethereal) but isn't there a simple "proxy" app that can do this? I found trivialproxy but the links are broken :(
as my snippet below, the non-capturing group "(?:aaa)" should be ignored in matching result,
so the result should be "_bbb" only.
however, I get "aaa_bbb" in matching result
only when I specify group(2) does it show "_bbb".
import re
string1 = "aaa_bbb"
print(re.match(r"(?:aaa)(_bbb)", string1).group())
>>> aaa_bbb
My target is to send keyboard events to external application.
From my application, I'm launching a C# exe (console application) that bring the target application to the front and uses SendKeys.SendWait to send keyboards events. I ran into a rate case were the command don't have any affect.
When debugging it, it works but when running it not in debug it fails.
I think it as something to do with the fact that when debugging my application is the active application.
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.
How to implement a static function in an abstract class?? Where do I implement this?
class Item{
public:
//
// Enable (or disable) debug descriptions. When enabled, the String produced
// by descrip() includes the minimum width and maximum weight of the Item.
// Initially, debugging is disabled.
static enableDebug(bool);
};
I'm developing an iPhone application. I have an EXC_BAD_ACCESS that occurs only in the release target; when I build the debug target the exception does not occur. However, when I set the NSZombieEnabled environment variable to YES, I still get the EXC_BAD_ACCESS with no further information. Is it even possible for NSZombieEnabled to work when executing the release target? I don't see why not, since gdb is running in both cases...
I am currently trying to create a test suite for my javascript apps. My problem is that, it seems I cannot get access to init() from my utils object, as you can see below:
I have my app that follow a singleton pattern:
var appModal = function () {
var utils = Object.create(moduleUtils);
function init(caller, options ) {
}
}();
My test suite is in moduleUtils, this is a object literal converted to a prototype
moduleUtils.debug = {
addSlideTest : function(){
/* this function cannot fire init() from appModal */
}}
I'm evaluating report engines for a Java desktop application. I need to print receipts, invoices and reports. I'm looking at Jasper Reports since it seem to be the most popular reporting engine in the Java world. Are there any big drawbacks or disadvantages with using it in a small business system?
Hello,
I'm having memory woes.
I've got a C++ Library (Equalizer from Eyescale) and they use the Traversal
Visitor Pattern to allow you to add new functionality to their classes.
I've finally figured out how it works, and I've got a Visitor that just
returns the properties from one of the objects. (since I don't know how
they're allocated).
so.
My little code does this:
VisitorResult AGLContextVisitor::visit( Channel* channel )
{
// Search through Nodes, Pipes until we get to the right window.
// Add some code to make sure we find the right one?
// Not executing the following code as C++ in gdb?
eq::Window* w = channel->getWindow();
OSWindow* osw = w->getOSWindow();
AGLWindow* aw = (AGLWindow *)osw;
AGLContext agl_ctx = aw->getAGLContext();
this->setContext(agl_ctx);
return TRAVERSE_PRUNE;
}
So here's the problem.
eq::Window* w = channel->getWindow();
(gdb) print w
0x0
BUT If I do this:
(gdb) set objc-non-blocking-mode off
(gdb) print w=channel->getWindow()
0x300effb9
// an honest memory location, and sets w as verified in the Debugger window
of XCode.
It does the same thing for osw.
I don't get it. Why would something work in (gdb) but not in the code?
The file is completely a cpp file, but it seems to be running in objc++,
since I need to turn blocking off.
Help!? I feel like I'm missing some memory-management basic thing here,
either with C++ or Obj-C.
[edit]
channel-getWindow() is supposed to do this:
/** @return the parent window. @version 1.0 */
Window* getWindow() { return _window; }
The code also executes fine if I run it from a C++-only application.
[edit]
No... I tried creating a simple stand-alone program since I was tired of running it as a plugin. Messy to debug.
And no, it doesn't run in the C++ program either. So I'm really at a loss as to what I'm doing wrong.
Thanks,
--
Stephen Furlani
Hi, i have this string in my utf-8 mysql DB:
"Pruebá de eñes"
When i print it like plain text, everything works ok, but if i load that same field inside an input, textarea, etc, it becomes: "Pruebá de eñes"
How can i solve this problem? =(