java,debugging,jframe,user,jtextfield
Here's an example where I created a JFrame and added a JTextField into it, and a input change listener, which gets triggered as and when the input is changed in the textField. I'm alerting a message if the input is "hello". import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.DocumentEvent; import...
css,google-chrome,debugging,google-chrome-devtools
In Chrome DevTools this is visible in the "Styles" pane on the "Elements" tab. For your specific example the output looks like this: Note that matching part of the selector (:read-only in this case) is in black letters, while part that doesn't match ([readonly]) is greyed out. More general solution...
From the JDI documentation The JavaTM Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similiar systems needing access to the running state of a (usually remote) virtual machine. The JDI provides introspective access to a running virtual machine's state, Class, Array, Interface, and...
angularjs,debugging,angularjs-injector
To access $rootScope you could do angular.element(document).injector().get('$rootScope') ...
google-chrome,debugging,drag-and-drop,google-chrome-devtools
No, devtools window has to be focused in order for keyboard shortcuts to work. While you're dragging an element, it is the dragged element that has the focus, not the devtools window. The best you can do is with a custom script. Try setting a timeout in the console to...
java,algorithm,debugging,if-statement,multidimensional-array
You need to draw rectangles for both "alive" and "dead" cells but color them differently. Live cells could be black and dead cells white but if you don't redraw every cell during every iteration you'll run into the issue you've described. That being said...you seem to have answered your own...
You could kill the previous instance by hand with kill - which doesn't prompt - then the run command won't prompt either. Or: (lldb) settings set auto-confirm 1 will give the default (capitalized) answer to all lldb queries. Or if you have Xcode 6.x (or current TOT svn lldb) you...
debugging,intellij-idea,bdd,cucumberjs
Instead of using the cucumber.js plugin, I used the run/debug configuration of node.js. I just set the run config of the node.js plugin like that -> JavaScript file: node_modules/.bin/cucumber.js (any path to the cucumber.js file)...
I fixed it by writing out actual cases for each of the 8 directions, and it seems to work now. public static boolean pieceInWay(final GamePiece[][] board, final Move move) { final int changerx = (int) Math.signum(move.getdx()); final int changery = (int) Math.signum(move.getdy()); switch (Direction.getFromDelta(changerx, changery)) { case DOWN: for (int...
javascript,google-chrome,debugging
It means that the property name is actually the string "legend:". You can tell by the syntax highlighting. For example: obj['legend:'] = 'value'; ...
javascript,node.js,debugging,electron
On your BrowserWindow call the function openDevTools() this will open the same dev tools you find in Chrome. I wrote about this on my blog at http://www.mylifeforthecode.com/debugging-renderer-process-in-electron/. Here is a simple main.js file that includes openDevTools: var app = require('app'); var BrowserWindow = require('browser-window'); var mainWindow = null; app.on('window-all-closed', function()...
You need to setup at least 2 processor cores in your vm when using Awesomium
All of your if else statements should be else if statements and you need a ; after var x = 30 confirm("Are you ready to play 'I CAN GUESS THAT'? A game where Player 2 tries to guess player 1 number?"); //find out names var player1 = prompt("Player 1 what...
c#,debugging,if-statement,visual-studio-2013,and-operator
The this.Frame.CanGoBack property changed between the time it entered and the time it got to the next line. A property that is implemented like the following: get { var result=backingvalue; backingvalue=!result; return result; } Would do it. Try changing the code to the following: var bool1=this.Frame!=null; if (bool1) { var...
If print wikipedia.__file__ gives you the file name that you're looking for, why don't you just set the API_URL after importing? import wikipedia wikipedia.API_URL = "http://de.wikipedia.org/w/api.php" EDIT: I forgot to mention, because I found this so obvious: search for API_URL in wikipedia.py and other files. You'll notice it is set...
c,debugging,segmentation-fault,gdb,strcmp
You should check that you properly use strcmp(), the API is: int strcmp(const char *str1, const char *str2) You must: 1) Validate that st[i], your first argument is a pointer. 2) Make sure that st[i] & s has the Null terminator '\0'`. 3) Check that st[i] & s pointing to...
You can use regex for that: foreach(string line in a) { Match m = Regex.Match(line, @"Savings\s+found:\s*\$(?<savings>\d+\.\d+)\s*\(\s*(?<percent>\d+\.\d+)\s*%"); if (m.Success) { decimal savings = decimal.Parse(m.Groups["savings"].Value, CultureInfo.InvariantCulture); decimal percent = decimal.Parse(m.Groups["percent"].Value, CultureInfo.InvariantCulture); string prefix = string.Empty; if (percent >= 30) { if (savings >= 500) prefix = "**"; else prefix = "*"; }...
There is no way to have such code collapsed automatically via settings/matching pattern. But you can surround such code with custom folding blocks -- the folding state will be remembered when opening next time and if opened first time it also will be collapsed (thanks to defaultstate="collapsed" part). //<editor-fold defaultstate="collapsed"...
android,osx,debugging,android-studio,usb
It was an issue related to Mac's USB port. With another Mac everything works and rebooting issued Mac and changing USB port it worked again. Thanks ...
angularjs,sqlite,cordova,debugging
Have you tried GapDebug? It let's you debug your Cordova/Phonegap app on an Android or iOS device via Chrome Dev Tools or Safari Webkit Inspector and is almost magical. -> https://www.genuitec.com/products/gapdebug/
Add ToList like this: var results = TstarData.AsEnumerable().Join(M5Data.AsEnumerable(), a => a.Field<String>("VehicleName"), b => b.Field<String>("Unit_NO"), (a, b) => { DataRow row = ComTable.NewRow(); row.ItemArray = a.ItemArray.Concat(b.ItemArray).ToArray(); ComTable.Rows.Add(row); return row; }).ToList(); ...
debugging,firebug,google-chrome-devtools
Have you tried the Chrome profiler? Launch the Chrome DevTools (F12) Go to the Profiles panel Ensure that Collect JavaScript CPU Profile is selected Click Start Perform your operation Click Stop. Then you should see a list of functions that were called....
debugging,reverse-engineering,disassembling,ida
If you want to "watch for the value 'Error when trying to download (...)'" - then you'd probably find out that it is very complicated, resource heavy, although possible. You'd have to "trace" into every opcode that the processor executes and check where ever you need (e.g - the stack)...
android,debugging,android-studio,android-ndk
Actually, the advertised NDK support isn't available yet, even if you download the ndk-bundle and update Android Studio to the latest version in the canary channel (1.3-preview3 as of now). The SDK tools team said that the NDK support wasn't part of the first previews of Android Studio 1.3. However...
The outputs in terminal exposed two issues: the ImportError: No module named importlib leads to unsupported library in Python. So install new version of Python (greater than 2.7) as @Amartel said.But the in my situation the gdb needs to be rebuild with --with-python configuration option to make gdb use newer...
python,debugging,python-3.x,attributeerror
import random while True: result = random.randrange(2) if result == 0: print ("Heads") else: print ("Tails") ...
You can pipe the list of address expressions to = K to convert them into pointer-sized hex numbers. The numbers will be all on one line, but gaddr2line wants one number per line, so shell-pipe them through fmt -w 1 to break the one line into multiple lines, then into...
The support from IntelliJ told me to try the IDE with bundled java. http://download.jetbrains.com/idea/ideaIC-14.1.3-custom-jdk-bundled.dmg And it works! Edit: IntelliJ support feedback: The problem was that there was a hang within java.net.Inet4AddressImpl.getLocalHostName(Native Method) JDK method call, which gets your system hostname. This is either JDK problem or local configuration issue... The...
google-chrome,debugging,google-chrome-devtools,developer-tools,adobe-brackets
This is basically how browsers work, they try to look for a favicon.ico in the root folder if none is specified in the meta tags. There is a simple solution to filter it out though, but it will remove any network related errors from the console (but you can of...
css,asp.net,debugging,web-config
It's possible that there is some code that is checking if compilation is in debug mode and makes web page run different. Why to use it, for example for enabling some debuging details. Try to search for something like IsDebuggingEnabled in project...
java,debugging,reflection,stack-trace
The stack records which code is waiting for a call to return, not which objects. If the method is in the superclass and the subclass doesn't override it, the stack will record the superclass method, because that's where control must eventually return to. The only way to get at the...
With ETW you can also capture Kernel data and see how your code effects CPU, Disk usage. You can also capture callstacks for ETW events (call stack for kernel mode events in Vista and also usermode events since Windows 7). The .Net Runtime ETW Provider raises Exceptions when you activate...
excel,debugging,visual-studio-2013,vsto
Try to use any logging mechanisms to log any action in the code. Thus, you will be able to find what is going on in the code at runtime. For example, you can write actions to the log file. You may find the log4net library helpful.
because of } else if (c >= '0' || c <= '9'){ you probably want it to be } else if (c >= '0' && c <= '9'){ ...
java,eclipse,debugging,stack,mpi
Set an Eclipse breakpoint and launch the application in Debug mode. Then the IDE will be stopping at the breakpoint and you can step into mpi.jar library. If the source is not directly found you have to navigate and point Eclipse to it. Then you should be able to continue...
python,debugging,variables,math,pygame
Inside you question() function, if value is not equal to "easy", "medium" or "hard", it'll bump into an undefined sum1 variable. As you didn't say exactly in which line the exception is raised, that would be my best bet. EDIT: OK, the reason I asked if you knew about some...
java,debugging,while-loop,java.util.scanner
I made it more simpler. Please try this. I removed other unknown methods from my code. Scanner sc = new Scanner(System.in); int bet = 0; do { bet=sc.nextInt(); } while (bet > cash); return bet; Say if you pass cash as 100, then you typed 200 as bet, it will...
Replace while (j!=' ') by while (pass[j] != 0) You want to loop as long as pass[j] is different from zero. Remember, strings are terminated by a zero....
angularjs,debugging,angular-ui-router
So I came to conclusion that the logic of debug should be so: console.log router events (code is here) to check router logic check the template of current router state (mock it if needed) check the controller of current state (mock with empty function if needed) check all templates and...
debugging,generics,types,compiler-errors
Imagine this scenario: public class Bob(){} public Class Tom(){} List list = new List(); list.Add(new Bob()); list.Add(new Tom()); Tom tom = (Tom)list[0]; //oops wrong index This will fail, but only at run time as a Bob isn't a Tom List<Bob> list = new List<Bob>(); list.Add(new Bob()); Tom tom = list[0];...
c,debugging,gdb,printf,race-condition
Is this any better then putting a printf in my code? No, it's much worse. Every breakpoint that is hit in GDB triggers the following chain of events: context switch from running thread to GDB GDB stops all other threads (assuming default all-stop mode) GDB evaluates breakpoint commands GDB...
c++,debugging,gdb,clang,netbeans-8
One flaw of gdb is that the pretty-printing code is only for printing, and can't be used to dig deeper. This flaw also affects the "varobj" feature, which is what most GUIs use when communicating with gdb about value display. There are some possibilities that can make this better. First,...
node.js,debugging,node-inspector
I resolved the problem by choosing a different port than 8080. It seems like the debugger uses this port. I was not aware of that because this port was familiar to me as I used it for my application.
python,function,debugging,user-input
You do not understand variable scoping or types. That's the "problem". (It's not really a problem, since you're learning.) What's expected The question wants you to provide a function digit_sum that accepts a number, and returns a number. In this case it would accept 434 and return 18. That is,...
perl,debugging,script-debugging
In perl, compile time is also run time. So there's really not a great deal of advantage in using #define type statements. My usual trick is: my $debug = 0; $debug += scalar grep ( "-d", @ARGV ); (GetOpt is probably honestly a better plan though) And then use: print...
You cannot have two calls, update and select without having ; in between.
debugging,visual-studio-2013,nunit,resharper
It appears that the ability to debug unit tests while other projects are running is a feature that was introduced in Resharper 9.x. The other developer was using a trial of it, it turns out. Now that he's reverted back to 8.2.2, he is seeing the same thing that I...
javascript,debugging,firefox,firefox-addon,xul
As erikvold has said, the link to your Uedit.js script is wrong. This is the minimum that is wrong and is the thing that is complained about in the console: browser.xul:5 is line 5 in browser.xul, which is: <script src="Uedit.js" /> You state that you have tried: <script src="chrome://Uedit/Uedit.js" />...
excel-vba,debugging,collections
You could use debug.print and write the output into the immediate window and bypass the limit that way. I am almost certain that there is no way to increase that limit, but maybe someone else can give a def. answer on that....
java,eclipse,debugging,exception
After debugging Eclipse I understood that "scope" filters should match throwing location (in this case java.math.BigDecimal) and not the catch location. This is the original JVM debugger filtering on "scope", however JVM limits filter to one item (class or package), while Eclipse can process multiple items. The code that does...
android,debugging,testing,android-wear,large-files
The dock that comes with the LG G Watch R can also be plugged into the computer, allowing you to use the much faster USB connection to install your Wear app.
performance,debugging,windbg,symbols,hang
Shouldn't that be: .sympath cache*C:\SymbolCache1;SRV*\\our.corp\SymbolStore;SRV*C:\SymbolCache2*http://msdl.microsoft.com/download/symbols That is, by listing \\our.corp\SymbolStore without SRV* you are telling dbghelp to look in this unstructured directory for symbols. If you use the SRV* syntax then you are telling dbghelp to get symsrv to look in that directory in a very specific and structured way....
java,debugging,arraylist,iterator
As others mentioned, you can't modify collection while iterating (remove is optional). Well, you can gather all the sharks that should die in another collection, and remove them after the iterator loop terminates. Try the following: private void updateSharks() { ArrayList<Shark> toRemove = new ArrayList<Shark>(); ArrayList<Shark> toAdd = new ArrayList<Shark>();...
Remove semicolon after if/else if/else For e.g. else if (choice1 === "paper"); ...
javascript,jquery,google-chrome,debugging,developer-tools
too low rep to put this as comment :( but you might want to take a look at What does status=canceled for a resource mean in Chrome Developer Tools?
Check this, I fix the part where you read from text file and populate the TreeMap. I tested and works fine. public class Map { private TreeMap<String, String> pairs; public Map() { pairs = new TreeMap<String, String>(); } public void readFrom(String fileName) { try { Scanner input = new Scanner(new...
If the condition in your if statement is true, then return true; gets executed and the method terminates. To check this, just put a println(...) before the return false; instruction, you will see that it won't be executed. Check again your debug, you probably got confused by the tool....
javascript,node.js,debugging,webstorm
Node runs server side, so any console.log statements will appear in the the console you ran your script from. You won't see any debug statements in the browser except those from client js code. The reason you see file updated is because you sent that string as a response...
c++,debugging,exception,logging
However, since the .exe is a standalone, how do I make it so it automatically creates a dump or a log of some sort if an exception happens? If your program crash it will automatically creates a core dump and you can collect core dump and analyze it. But...
I think the game variable is null because you define it and don't initialize it. private Game game; public GamePanel() { ... Game game = new Game(); ... } you should initialize the class variable game instead of creating a new one, try: public GamePanel() { ... game = new...
ruby-on-rails,debugging,delayed-job
It is normal, you must have set log_level in config/environments/production.rb to :debug. Changing it to :info will not update production log with delayed job's debug comments....
debugging,intellij-idea,scala.js,utest
Currently, the only way to (step-by-step) debug Scala.js code I know of, is inside a browser. The Scala.js sbt plugin does currently not easily allow you to export a JS file you can load in the browser and run. However, if you really need to, you can do so manually:...
on your PC which is connected run in the cmd window: adb logcat this will update real time, if you wish to clear the logcat use adb logcat -c To filter by a TAG use: adb logcat -s "TAGNAME" These are what I find useful if you need more info...
android,debugging,android-emulator,usb,wifi
If you are using Cyanogenmod, developer options provides a way to operate adb over network. 1) Enable 'ADB over network' in Developer option of Android Settings 2) When you enable 'ADB over network' and if you are connected to internet, you will find your wlan device ip address below the...
java,debugging,variables,object
That is caused by static modificators. static String userName; static int userAge; removing the static keywords is the trick Static modificators indicates it is for all instances. Btw. the constructor is bad, should be: NameIsAge (String userName, int userAge) { this.userName = userName; this.userAge = userAge; } Folows the whole...
The error says that you are trying to deal with the array that holds a value of null. to understand better, fill in all 25 spots in the array and run the program, it will not give you any error. Here is the solution that you need. private void sortFlowers(String...
c,arrays,debugging,parameter-passing
As 'beverages()' function is want to return double array then you need to modify like double * beverages() { static double purchase [8]= {3.50, 3.80, 3.90, 4.20, 4.00, 4.30, 3.00, 3.10}; // Line of code return purchase; } In main function you need to modify like main() { double *purchase...
python,debugging,neural-network,theano
Use .eval() to evaluate the symbolic expression Use Test Values ...
javascript,google-chrome,debugging,google-chrome-devtools,console.log
Find the function of interest in the Console Right click the word function Click "Show function definition" Function is now displayed in the Sources tab Alternatively, log the result of Function.prototype.toString.call(someObj.methodOne) /* function (e) { return 'e is ' + e; } */ A third choice is to double...
You must ReFill the Guardian form of the Applet then the program will be successfully built. And when exported you need to mount to the emulator. That's how you need to work.
This happens when you source code is out of sync with class files that are being executed in the VM. To correct this Do a clean build. Deploy your changes (i.e. make sure the class file you built are copied to the execution environment). Re-start your debug session. The debug...
visual-studio,debugging,visual-studio-2013,windows-phone-8.1
I found a solution about it, but there is still some missing on my answer. I don't know how but accidentally a blank project worked on my emulator. After that I looked up the ProjectName.csproj.user file and there were a change somekind like that After that I added the same...
ios,xcode,debugging,crash,launch
Sometimes when you debuting with real device new version of xCode stops your prices at beginning like described in question : int main(int argc, char * argv[]) { @autoreleasepool { // stop here: return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } but this is not real crash (it is just...
I am not aware of such a feature, but in any programming environment you can get away with an adhoc solution: just define a method debugBreak, add a breakpoint to it and then use that. By example: def debugBreak() { println("Breakpoint hit!") // Manually set a breakpoint here } //.......
java,android,eclipse,debugging
I step through the code as the application is running on the Android device but the exception occurs in code that is not part of the application As you've done, step through your application code line by line in a debugger, until you get to the last line which...
algorithm,sorting,debugging,quicksort
You don't consider the case when i == j and also, as @MK said in a comment, the pivot should be a value and not an index (pivot = (a1+b1)/2; should be something like pivot = a[(a1+b1)/2]). For example, if you start the array a = {2, 45, 56, 3,...
java,debugging,recursion,immutability
It is the new node, that should take its content from node in general. It must be the equals/compare. More solid code would be: int comparison = key.compareTo(node.getKey()); if (comparison < 0) { return new Node<K, E>( insert(node.getLeft(), key, elem), node.getKey(), node.getElem(), node.getRight()); } else if (comparison == 0) {...
android,debugging,android-studio,logcat
Try to remove all dependencies in your build.gradle file. IMHO, the bug will be in play-services-analytics. Google Analytics tracks exception. Try to remove tracker.enableExceptionReporting(true) in your code.
java,debugging,java-ee,netbeans,glassfish
Additional information relevant to the problem is that I was trying to get a test client working for the service. The problem turned out to be that I was simply adding another java class to the service package. The solution is: Create a new project. Add a new Web Service...
xcode,osx,debugging,memory,objective-c-blocks
On the theController.completionHandler = nil; line you remove the last reference to the block, which causes the block to be deallocated. Then on the [theController release]; line, you access the block's captured copy of the theController variable, which is stored in the block. But you already deallocated the block, so...
osx,perl,debugging,documentation,locale
I got the exact same error on OSX Yosemite 10.10.3 [email protected]:~$ perldoc perllocale Error while formatting with Pod::Perldoc::ToMan: at /System/Library/Perl/5.18/Pod/Perldoc.pm line 1346. at /usr/bin/perldoc5.18 line 11. Got a 0-length file from /System/Library/Perl/5.18/pods/perllocale.pod via Pod::Perldoc::ToMan!? at /usr/bin/perldoc5.18 line 11. [email protected]:~$ The command perldoc -l perllocale shows the path the the file:...
java,debugging,java-7,close,try-with-resources
See comment of @jb-nizet your decompiler did not show the correct things, which explains your question 1. For question 2 have a look at the Stream.path variable in the debugger. On my System this are not the Streams openend by you but Java 8 internal files like "/opt/Oracle_Java/jdk1.8.0_40/jre/lib/tzdb.dat", "/opt/Oracle_Java/jdk1.8.0_40/jre/lib/meta-index" and...
css,angularjs,debugging,drag-and-drop
You just need to add vertical-align: bottom; to your .dndPlaceholder style rules.
android,debugging,android-gradle
Have you tried to move the ic_launcher in mipmap-... folders? If not try to create mipmap forlders for all the resolutions and move the ic_launcher.png files into them (make sure they are removed from drawable folders. Also don't forget to change the reference in the android manifest file :-)...
I add dir(variablename) to the watch window to achieve this. If it's not visible, activate it with Alt+5 (or View/Tool Windows/Debug). Another option is to use "Evaluate Expression" (Alt+F8) and do the same Using Community Edition 4.0.4 on Windows 7 SP1 x64 if that should matter....
As you mentioned , its problem of privileges. Quoted from this site ORA-01031: insufficient privileges Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges. When Trusted Oracle...
debugging,pointers,gcc,gdb,memory-address
There is no built-in command to do this. There is an open feature request in gdb bugzilla to have a way to show the meaning of all the known slots in the current stack frame, but nobody has ever implemented this. This can be done with a bit of gdb...
java,debugging,intellij-idea,concurrency,ide
is the code that spwaned the threads your's ? if so you could set unique names on the threads and use those names to distinguish your threads when using breakpoint conditions. e.g. //spwaning the thread Thread threadA=... threadA.setName("thread-A"); // IntelliJ Condition : Thread.currentThread().getName().equals("thread-A") ...
You can tell the debugger where to find source files. In the Run or Debug Configurations dialog, there is a Source tab when you select a particular configuration. That's where you can specify so-called Source Containers. For more details, see the Eclipse CDT help page.
java,eclipse,debugging,breakpoints
A) Simply use hit count as 1000. Its works only if the methodA inside for loop is NOT under some condition. B) Using condition Put the break point at the first statement inside methodA.Refer image [Here methodA == test and I put break point at line number 14] Right click...
function,python-2.7,debugging,primes
You don't return the result for any value greater than 2. For 0, 1 and 2, you do return it: return True For the fourth case that covers all other numbers, you only print the result, but you don't return it as a boolean value. Edit: Your attempt to filter...
ios,objective-c,debugging,screen-lock,user-inactivity
This isn't possible. Following link has some work around for this. Basically you can get the idle time in your app till the screen goes off which should be the same as device' auto-lock time. iphone-detecting-user-inactivity-idle-time-since-last-screen-touch...
java,debugging,if-statement,for-loop,arraylist
In Deck the attribute deck is never initialized and thus null. Since deck is null this line: deck.add(new Card(i,j)); will throw a NullPointerException. Simply create deck before the for-loops to solve this problem Deck() { deck = new ArrayList<>(); for(int i=0; i<4; i++) { for(int j=1; j<=13; j++) { deck.add(new...
java,visual-studio,debugging,editor,brackets
You can compile Java using the command line, by navigating to the correct directory and using the javac command. I'm afraid you're probably out of luck when it comes to debuggers. The best you can do, to my knowledge, is to use prints to track your code.
The icon definitions for xcode4 is available here and don't look different from xcode 6. Check this SO thread as well/