FAQ Database Discussion Community


Uncaught SyntaxError: Unexpected token < in HTML - can't solve

html,console,syntax-error,token
Can anyone help me find this unexpected token? I've been looking at this code for a while so maybe i need a fresh pair of eyes to solve this. see HTML code below: <div class="list-view hide"> <table class="custom-reports-table"> <script id="custom-reports-table" type="text/javascript"> <tbody> {{#each listItem}} <tr class="row" id="{{itemId}}"> <td class="select-container"> <div...

.jar from netbeans will not open in console

java,netbeans,jar,console
Built a simple java program in netbeans, build/compiled it and it generated a .jar for me in the project directory. The following is my src code: import java.util.Scanner; public class Welcome { public static void main(String[] args){ System.out.println("Welcome to Java"); Scanner input = new Scanner(System.in); } } I want to...

2D array won't display correct contents in console grid

c++,multidimensional-array,visual-studio-2013,console,enumerator
I'm working on a simple, text-based Battle Ship game in C++. I'm currently trying to make a grid/board show properly in the console. I had the formatting correct, but I found that the elements of the 2D array wouldn't be right. Below is an example. I've set all elements in...

How to check if application runs on the command line?

java,console
I would like to write a Java application that opens a GUI if started from a GUI and parses command line arguments if started from the command line. Is there any way to check if the application was started from the GUI?...

Get both console and tty after upgrade Debian to Jessie 8.0 in openvz

console,debian,tty,openvz,proxmox
I can not use this machine via proxmox's console, because there are both console and tty, I confirmed that this problem came after dist-upgrade!...

Why won't the scanner prompt me for an input?

java,loops,console,java.util.scanner
I have this method: public String scanInput() { String input = ""; Scanner skanner = new Scanner(System.in); while(skanner.hasNextLine()){ input = skanner.nextLine(); } skanner.close(); return input; } The first time this method is run, the program stops, and I'm prompted for an input in the console before it can proceed. However,...

How to split JFrame to have console on one side

java,swing,console,jframe,jpanel
I am working on this project github.com/csharpest94/Patience-Game and currently using this as my screen handler: public class Window extends JFrame { private static final long serialVersionUID = 1L; private ThePanel canvas; /** * The constructor creates a Frame ready to display the cards */ public Window() { // Calls the...

Console wait until left mouse button down

c#,console,mouse,wait
I have the problem, that my console application wait at random points, until i press the left mouse button. The application is written in C#. I don't use ReadKey or something else in my application (Which even should wait for a key pressed not the mouse). Does anyone had similar...

What is the small blue circle in the chrome console log?

google-chrome,console
I'm logging dynamic java script code into my chrome console using console.log. Sometimes I get a small blue circle on one line with a number in it. Does anyone know what it means? Thanks...

My Ruby console closes before I can look at the error code [closed]

ruby,error-handling,console
So, when I run a Ruby script, if it has an error in it, it will run (in the ruby.exe console) until it hits the error, and then flash an error message for a quarter of a second or so and then close automatically. As you can see, this does...

How do i reset nuget and start afresh?

console,nuget,reset
here's what's happening. within the last few days something happened to my solution that apparently broke nuget. when i go into package manager/installed and do a find on SignalR, nothing comes back as if SignalR wasn't installed when i know it is. when i go into manager/online and do the...

Google Chrome console unstoppable Uncaught TypeError: Cannot read property 'style' of null

google-chrome,firefox,console
Seems like something wrong happened with my Google Chrome. I'm getting Uncaught TypeError: Cannot read property 'style' of null VM34153:1 that is counting up unstoppable, at any site I open, even Stackoverflow. Also it says that this error happens somewhere at VM34153:1. I tried disable any adblock addons. Nothing helps....

Cordova platform add windows EACCES error

osx,cordova,console,windows-phone
I was trying to add the windows platform (I use OSX 10.9) and the console gave me this error: EACCES. bash-3.2# cordova platform add windows WARNING: Applications for platform windows can not be built on this OS - darwin. Adding windows project... Error: spawn EACCES at exports._errnoException (util.js:746:11) at ChildProcess.spawn...

chrome debugger: clicking exception link in console opens file in new tab instead of cross-linking into source file

google-chrome,meteor,coffeescript,console,source-maps
I have the chrome debugger open showing both the console and the sources tab. I am debugging a meteor.js application and am getting an exception in the console that displays a file link with a line number in the stack trace. I swear when I used to click these it...

How would I go about making a console app like GIT [closed]

c#,ruby,console,console-application
I want to build an application that can run from the console where I can put it in my path on windows and be able to use it. Like git for example. I normally use C# and Ruby but I want to try to get it to work on a...

bash prompt shell displayed differently in terminal and tty console

bash,terminal,console,tty,ps1
This is a portion of my ~/.bashrc: prompt(){ local EXIT="$?" # return code PS1="" local red="\[\033[0;31m\]" # text colour local purple="\[\033[0;35m\]" # text colour local normal="\[\033[0m\]" # text colour if [ $EXIT == 0 ]; then # $EXIT colour based upon its value local return="${normal}${?}" else local return="${red}${?}${normal}" fi PS1+="${normal}[${purple}\\D{%-l:%M%P}${normal}]${return}...

NCurses like library for haskell that runs on both Windows and Unix?

haskell,console,cross-platform,ncurses
I have a little program that is multi-threaded. I'm tired of the output ending up cropping up within my input. I would like to use some type of library that will move me beyond the console model of the glass teletype. The library I know (of) is ncursed which I...

C++ : Using background colors with clrscr()

c++,windows,console
I am currently making a simple game. The initial screen is the welcome screen with the following for color: system("color f3")//background:white , text:aqua then when I invoke the following from my main() function void display() { Sleep(2000); clrscr(); system("color f3"); cout<<"Levels:\n\n"; int d; cout<<"1.Easy\n"; cout<<"2.Medium\n"; cout<<"3.Hard\n"; cout<<"4.Insane!\n"; cout<<"Choose your difficulty:";...

Instead of dataGridView in C# windows application, what should I use for console application to display a table from sql server?

c#,sql,table,console
Question as above. I was told to use list<> to do so. But I still have no clue about how to do it exactly. I am a C# newbie. Thanks for help.

Neither .on or .live functions are recognized

javascript,jquery,console,developer-tools
I am so frustrated right now. I have been trying for the past half hour to get event delegation to work. I tried using .on and Chrome told me that it wasn't a function. I searched this question $(...).on is not a function - jQuery Error and thought it was...

Print variables coming to model's methods

ruby-on-rails,ruby,ruby-on-rails-3,console
Having following code: class MyModel < ActiveRecord::Base before_create :do_process def do_process #I want to print here everything that came to this method self.my_stuff = my_stuff end Say we have model with name and description attributes and I'm going into console and enter something like MyModel.create! name: 'test', description: 'test' So...

Can not access rails console on ubuntu 14.04

ruby-on-rails,ruby,ubuntu,console,server
I am trying to access the console to manage my application and it wont let me. what i right is rails console or rails c and i get this: [email protected]:~/Agustin/RoRProyect$ rails c /usr/lib/ruby/vendor_ruby/active_support/test_case.rb:12:in `<module:ActiveSupport>': uninitialized constant Test (NameError) from /usr/lib/ruby/vendor_ruby/active_support/test_case.rb:11:in `<top (required)>' from /usr/lib/ruby/vendor_ruby/rails/console/app.rb:2:in `<top (required)>' from /usr/lib/ruby/vendor_ruby/rails/application.rb:312:in...

Gmail console App C#

c#,console
I'm trying to figure out why I am getting the error "Cannot assign to 'loggedIn' because it is a method group" within my menu method. Any help will be appreciated. Code is below: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GmailClient { class Program { static string userName="";...

shell script - creating folder structure

osx,bash,shell,console
I wrote this little shell script(test.sh) to create a basic folder structure: #!/bin/bash # Check if directory already exists, # if it doesnt, create one. if [ ! -d "~/.dir1" ]; then mkdir ".dir1" else rm -rf ".dir1" mkdir ".dir1" fi When I run test.sh in console, the hidden folder...

C# server logging to text file from console

c#,console,streamwriter
I currently have a client which is communicating with a server on localhost. When the client communicates with the server, the server keeps track of what is happening, eg. string response = "Location updated for " + uname + ": " + uloc; Console.WriteLine(response); I am trying to keep a...

Forked and executed program does not returns to console

c++,console,exec,fork
I took example program from Advanced Linux Programming site: /*********************************************************************** * Code listing from "Advanced Linux Programming," by CodeSourcery LLC * * Copyright (C) 2001 by New Riders Publishing * * See COPYRIGHT for license information. * ***********************************************************************/ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> /* Spawn a child...

Is there a method so you'd find out which/name of functions that were being called?

javascript,html,console,load
I am trying to get handy in using Google Development Tools. Do we have a method to identify which functions (specifically Javascript) are used/required before a successful page load?

How to get particular controller scope list in console - angularjs?

javascript,jquery,angularjs,browser,console
I am trying to edit bus list in browser console for this bus search angualrjs site. I tried to access the filteredBusData(ng-repeat) list in that page which is used in ng-repeat from console. Code: Method 1: angular.element(document.body).injector().invoke(function ($rootScope) { scope = $rootScope; console.log(scope.filteredBusData); }); Method 2: angular.element('[ng-controller="busTicketCheckoutCtrl"]').scope; `busTicketCheckoutCtrl` is the...

Create a hyperlink to a project file in console output

java,intellij-idea,hyperlink,console,log4j
Is there a way for me to write out a link to the console output that when clicked on directs to a project file in Intellij? For example, this happens when a run-time exception occurs. I see the stack trace and I can click on a link in the console...

Running a node.js script in Komodo console

javascript,node.js,console,komodo
I'm having trouble running a test script. I have the standard configuration: and the file settings: but when I run the script I get this: Where is my "Hello World" string? If I add code that would normally produce an error, it will display the error fine. Is it debugging...

I can't query in WebView context

css,webview,console,calabash,calabash-android
I'm facing a problem right now, and I need some help. I have a native app that displays in some point a webView, the class for this webView is called: org.xwalk.core.XWalkView. I'm developing in Windows and running calabash-android console, but when I use any of this commands: query("webView css:'' ")...

How can i tell my Program to “re-do” diffrent Actions (chosen by User-Input) after it is done, till the do-while Requirement is set?

c#,input,console,readline
Im just a Beginner in C# and im working on a Console Application, I want the Program to be able to read the Input of the User and execute the Orders until he has 0 HP. Its basicly gonna be "Fighting-Game". My Problem now, I can only ask for the...

My array displays only 300 elements in C++ Visual studio

c++,arrays,visual-studio-2012,console,output
I have written a code wherein I have an int array of 1000 capacity. I have randomized each element of the array. When I try to print out all 1000 of the elements. It only displays 300 lines/outputs in the console window. I wrote this in C++ and using Visual...

Viewing Nested Records in Rails Console

ruby-on-rails,database,ruby-on-rails-4,console,records
I am trying to view nested records from the rails console. I have subarticles nested into articles. In other words, subarticles belongs to article, and articles has many subarticles. I have tried something like Article.subarticle.all from the console but this doesn't work. What is the best way to go about...

Unity - How to write console

c#,unity3d,console,mouseevent
I add an AR camera my unity project. I use vuforia sdk for AR functions. I want to handle mouse/finger click on screen and get pixel position on screen image. I write below code. To check pixel values, I try to write them on the console. But I don't see...

Ionic + Genymotion : JavaScript logs

javascript,logging,console,ionic,genymotion
I'm trying to create an app with Ionic on Linux. I use the emulator Genymotion because ADB doesn't work on my computer (black screen until the end of time). I haven't any problem to run the app on Genymotion with ionic run android but I'm wondering how to see the...

node.js child_process.spawn output to console odd format

node.js,console,console.log
I'm trying to write a small wrapper to execute a shell command via nodejs and print the output of the command to the console. so far I'm pretty much done, but the format of the output in the console is... awkward and and I have no idea why. :( #!/usr/bin/env...

How to undo PATH changes? (CentOS) [closed]

linux,path,console
Exporting PATH I carelessly copy/pasted path with new line, so instead of export PATH=/usr/local/something:$PATH I got just export PATH=/usr/local/something{\n} So I guess all my usefull PATH entries got erased. How do I undo the changes?...

stdout from python to stdin java

java,python,console
I have having a stdout from python to stdin in java. I am using Python code p = subprocess.Popen(command, stdout = subprocess.PIPE, stdin = subprocess.PIPE) p.stdin.write("haha") print "i am done" #it will never hit here Java code Scanner in = new Scanner(System.in) data = in.next()// the code blocks here Basically...

Can you unprint a line in R?

r,printing,console
I am writing up some data processing stuff and I wanted to have a concise progress status printing a fraction that updates over time on a single line in the console. To get this done I wanted to have something like this print(Initiating data processing...) for(sample in 1:length(data)){ print(paste(sample,length(data),sep="/")) process(data[[sample]])...

Confusion about CTRL_SHUTDOWN_EVENT handling in DLLs and WM_QUERYENDSESSION

c,winapi,console,shutdown
My UI is in a DLL. Right now, both the DLL and the EXE that uses it are compiled as console programs so I can use stdout and stderr for debugging and error reporting during development. One of the things is that I have an uninit() function that makes sure...

AllocConsole(); with GetAsyncKeyState();

c++,console
I've got some std::cout and std::cin commands between AllocConsole(); and FreeConsole();, but when I press ctrl + caps lock the console just briefly flashes by and wont cout or wait for the cin. Is this the wrong approach to set hotkeys for bringing up the console? if (GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_CAPITAL)){...

Console.log a multi-dimensional array

javascript,arrays,multidimensional-array,console,console.log
So I have created a multi-dimensional array: (i.e. one with two sets of 'coordinates') var items = [[1,2],[3,4],[5,6]]; My site is in development and the array, when it is loaded, and what it contains is constantly changing, so I need to be able to, whilst running the script, dynamically view...

Print same number multiple times to form rectangle of given size

c#,for-loop,console
I have school assignment to create console program that creates a Field of Numbers (rectangular shape) with the Input of the User using basic for loop. Meaning, the User will write which Number should be used to fill the Field, and how high and wide the Field should be. Here...

C# Supplying Commands to Process with StandardInput and Reading Output with StandardOutput

c#,.net,shell,process,console
I have been tasked with implementing an interactive shell in C# and have run into some complications. I have done this exact project in Java and used the ProcessBuilder class which made things easy. The problem I am having right now is reading the standard output of the process. I...

File.AppendText attempting to write to wrong location

c#,file,console,streamwriter
I have a C# console application that runs as a scheduled task within Windows Task Scheduler. This console app writes to a log file that when runs within debug mode creates and writes to the file within the application folder itself. However, when it runs in the task scheduler it...

Override Symfony\Component\Console\Commande\Command.php

symfony2,console,command,override
I am developping some kind of cronjob monitoring on our symfony2 application. I created a CommandExecution entity with a 'completed' property. I'm using console events to create and persist this entity. My service : kernel.listener.console: class: Evo\CronBundle\EventListener\ConsoleListener arguments: [@doctrine.orm.entity_manager] tags: - { name: kernel.event_listener, event: console.command, method: onConsoleCommand } -...

Using the Rails console to delete odd-numbered records

ruby-on-rails-4,command-line,console
I'd like to delete records with odd numbered ID's from Hero table using the Rails console. Would someone be so kind as to suggest a way for me to do this? Kind Regards, Ryan...

Equilateral triangle in Java using for loop

java,console
I am trying to draw an equilateral triangle of asterisk characters but when a user enters row number that row will be drawn as "x" and the whole triangle will be "*" but I have an error in the spaces. Here is my code: int number_of_stars = getHeight(); for (int...

Writing out a specific line of a list

c#,if-statement,file-io,console
I have a large file, and I took that file and divided it into 2 groups: A and B. Below is a sample of each line in the file: 5/21/2015 11:55:56 PM | Batch 6|386/767|50.33 %|CH2M-R|Processed NXRMN5...Checking refundable and non-refundable fares. Traditional Booking. Inside ticketing window. Minimum Savings Required: $131.00....

How do I indent my code with the tab-space key?

javascript,firefox,console
For example, how can I type JS some code that looks like this into the Firefox console: if (10 > 5) { alert("Hello world!"); alert("How are you doing today?"); alert("I'm doing great, thanks!") } Without resorting to using the space bar or my operating system's clipboard? I'd like to be...

Why doesn't shell_exec of php work with here?

c#,php,command-line,console,shell-exec
I have a php script and an exe file created using c#. I want php to execute that exe file. I tried to use shell_exec command. But nothing is happening!! Then I tried echo shell_exec("dir"); and it works by displaying the info. Why is it not executing the exe file....

C++ - Getting string of text inbetween character and text

c++,string,console,extract
I'm making a console program that will get a line of text that starts with a specific character. I'm working with an .txt file as the input of text, and this is it: <?xml version="1.0" encoding="utf-8"?> <vector android:height="64.0dip" android:width="64.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#00000000" android:pathData="M12.05,7.7c-1.1,0,-2,0.94,-2,2.05v0.5h4v-0.5C14.05,8.65,13.15,7.7,12.05,7.7z" /> <path...

How to get JavaScript console user input working (node.js)?

javascript,node.js,input,console
This is some homework I have. I want it to read user input and then create two objects, giving them values based on the user input. Here is my code, beginning at the top of the JS file: console.log("Type 'help' for commands"); console.log("Square numbers:"); console.log("Enter player 1 name"); var player1...

How to make a browser console wait in a javascript

javascript,browser,console,wait
I'm trying to make a script that clicks on a page button, waits X seconds (for the result of the click to take place), and then continues. How can I do that? (only the wait part)...

Intellij remote tomcat print to console

intellij-idea,console,tomcat7
I'm learning java webdevelopment and I'm using tomcat 7. I set everything up so that I can remotely debug (breakspoints seem to work) my deployment on a remote tomcat server using IntelliJ. My book on webdevelopment states that I can use System.out.println() in most IDE's to print to the console....

display messages from the javascript console

javascript,logging,console
how would I use javascript to loop through the messages in the javascript console and display them to a user, for example adding them line by line to a container element like a div. I understand how to add messages to the console with console.log but my question is, is...

how to attach a running node.js process and debug WITHOUT a GUI?

node.js,debugging,console
By sending SIGUSR1 I can start internal debugger on port 5858, and can use node-inspect to debug the running process via GUI in browser. However if the host server have NO GUI, and this kind of port(5858) is firewalled due to security policy. How can I debug it in local...

Giving out even Numbers from 0-100 without using a Modulo-Operator with a for-loop in a c# Console

c#,for-loop,console
I just cant find a Solution to give out even Numbers without using the Modulo-Operator. I need to use a for-loop since its required by my School Assignment. Something as Simple as Possible since im just a Beginner ._.

C++: Re-use line printed to console [duplicate]

c++,terminal,console,formatting,output
This question already has an answer here: How to rollback lines from cout? 3 answers Edit: Thanks to user mah's comment, I found what I was looking for. I want to rollback the line, see this question. I always print information to the console using std::cout and std::endl, but...

Not sure what's wrong with my logic for my snake game?

c,graphics,console,cygwin
For reference, here is the link to my assignment (the course is a C language course): Snake The mouth is supposed to be "<", ">", "v", or "^", depending on the direction, and the body segments are supposed to be "*". So first of all, my up and down arrow...

Programmaticaly pressed Alt + Enter not working

c++,windows,keyboard,console
There is code: keybd_event(VK_MENU, 0, 0, 0); keybd_event(VK_RETURN, 0, 0, 0); Sleep(200); keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0); First line would press ALT, Second line would press ENTER (RETURN), Fourth line would release ALT, Fifth line would release ENTER (RETURN)....

Using Chrome Console with Firebase

javascript,console,firebase
As a js newbie, this is probably a dumb question. But how can I actually use js within a Chrome console. I am trying to interact with my Firebase via the console but when I try to get the Firebase reference I keep getting undefined. I know I can use...

Shows blank output while filtering alphabets in Java for a long text

java,regex,string,console,output
I'm trying to strip out only the alphabets from a long text. I have two approaches on doing it. 1. if(character falls between a-z and A-Z){ //concatenate } 2. inputText.toLowerCase().replaceAll("[^a-z]+", ""); // I just need lowercase Here's how I'm doing I/O Scanner scan = new Scanner(new File("message.txt")); String message =...

How to print out member functions of a imported library in a python 3 console?

python-3.x,console
Note: The example output is an ipython (an enhanced python programming console) feature instead of a python 3 standard (@DTing). One can obtain a list of member functions by dir(libname) command when the default console is used (@Matthew Runchey). In a python 2.7 console, one has the command libname. to...

What’s the quickest, easiest way to execute a JavaScript file on a live web page?

javascript,console,google-chrome-devtools,firefox-developer-tools
I have this JavaScript file URL: https://rawgit.com/Khan/tota11y/master/build/tota11y.min.js (hosted on GitHub and passed through RawGit), and I would like to inject it into a live web page via the browser’s console. In order to achieve that, I can dynamically create a <script> element and append it to the DOM: (function ()...

Javascript:: textContent/innerText of firstChild

javascript,html,console,innertext
My code is pretty much explain itself of what I'm about to get : <div id=player> <div class="button hand">&#9658;</div> <div class=time>00:00/02:25</div> <div class="timeline hand"><span class="now hand"></span></div> </div> <script> var myPlayer=document.getElementById('player').firstChild; var playerStatus=(myPlayer.innerText||myPlayer.textContent); console.log(playerStatus); </script> I'm expect to get the ascii value &#9658; on console. Small tweak needed...

Edit a database record through the Rails console

ruby-on-rails,database,console
Example scenario: I'm on my mac's Terminal inside the Rails console and have just entered the following database record with a misspelling in one of the fields: irb(main):019:0> Meme.create(:category => 'funny', :title => 'Balloon frihgtens cat') Q: Using the Rails console, how can I fix that record to have the...

Testing c++ console output via TDD

c++,unit-testing,boost,console,tdd
I am writing c++ program using Test Driven Development Approach. I have a function which uses console output. I would like to write a test which is able to test whether the console output is the same like the expected output. I saw this can be solved and should be...

Unrequested debugging Info in Powershell console

debugging,powershell,console,winscp,winscp-net
I'm having a nuisance issue I'd like to eliminate where I get debugging info I am not asking for in a Powershell console and ISE. It's a nuisance in that it gets in the way of my desired debugging info. I'm not clear if this is specific to the tool...

Combine interactive input from stdin with async output to stdout

c++,c,linux,unix,console
My test application writes logs in stderr and uses stdin to receive interactive commands from the user. Needless to say, that any stderr output spoils user input (and command prompt) in terminal. For example, this command line (_ is a cursor position): Command: reboo_ will become: Command: reboo04-23 20:26:12.799 52422...

Get all the Ti.API.info strings to an array

console,titanium
I need to get all the Ti.API.info strings to an array by using some function at the end of the app.js file, How do I get all those string to array once it has been printed on console. For Example Ti.API.info("Hello"); Ti.API.info("Good Morning"); Ti.API.info("Good Afternoon"); Ti.API.info("Good Evening"); at the end...

Console “404 Not Found”? [FIXED]

jquery,ajax,console
FIXED, the problem was in a source attribute with value 0 (src="0") . i have a script in jquery and when it is initialized, in console appear "GET http://localhost/0", everything working perfectly but in console i have 4 get request error. I use jQuery.ajax for init the script. Screen...

How to run python script with Laravel's command fire method?

php,python,laravel,console,command
I have a need to execute a Python script from a Laravel Command, but I can't find any methods in Illuminate\Console\Command to complete my task. I want to run this command via the console: C:\Python34\python H:\myapp\app\python\questionPopulator.py To do so, I tried the following in my commands fire() method: public function...

Console “Hangs” when GUI launches

c#,wpf,user-interface,console,hang
Before I start, I'd like to appologize for any... idiocy... that I may show when asking this question, I'm trying to learn C# after coming from Java, and just wanted to jump right into it! I'm working on a project that is designed to take commands through the console, such...

Yii - Calling api request within CConsole

api,yii,console,command
I have the following issue: I have a local db with comments and I need to do some actions with some users I'm getting via an API request. Code is something like this: class RunCronCommand extends CConsoleCommand { public function actionIndex() { ... $comments = Comment::model()->findAll('status = :status', array(':status' =>...

How can I debug variables by console which bind to the controller by controllerAs in AngularJS

javascript,angularjs,debugging,console
Usually when I´m working with Controllers, I bind the data I need to the $scope to access them from the markup. But when I use controllerAs the data should be attached to "this" in the controller. So "this.foo = 'bar'" instead of "$scope.foo = 'bar'" But how can I debug...

VB Script to change desktop wallpaper on startup

powershell,vbscript,console,wallpaper
Due to some mardy users voting down my last one, I'll change the question. I want to create a VBScript, or whatever method you deem possible to do so. That sets the desktop background to a desired image on PC startup. Anybody shed light on how to do so Would...

Console has no method 'debug' in Nodejs?

javascript,node.js,console
The console.debug() function can be invoked in the browser console. However there is one error when console.debug() is called in Nodejs. TypeError: Object #<Console> has no method 'debug' at Object.<anonymous> (c:\share\node\receive.js:20:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at...

Is it possible to move the console “Command” folder from it's default directory and avoiding the Exception: Command “name” is not defined?

symfony2,console,symfony-console
By default the console command folder is in: MyProject\MyBundle\Command and all works as expected, but if I move the folder in another directory like :MyProject\MyBundle\MyFolder\Command on command execution it thrown an: [InvalidArgumentException] Command "command_name" is not defined. I haven't been able to find anything useful after searching over the internet...

Console wont work [duplicate]

java,console
This question is an exact duplicate of: When does System.out not appear in the Java console? 5 answers I’m using a basic System.out.println but it doesn’t outprint in my console. I am using Eclipse's debug button. What might be the issue? private static void Check(){ System.out.println("Starting"); } ...

How can I detect if some file in a subdir changed?

linux,console,sh
Basically I have a big directory (>10GB)(each subdir only has a few other subdirs) and want to do sth to any files that changes. I can't just go through all the files and check, because it takes to long and uses about 90% of my CPU :(. This is how...

Is 'console.time' in nodejs synchronous or async?

javascript,node.js,console
I am trying to log time for something. The general code looks like so: var stream = db.call.stream(); stream.on('data', function () { if (first) { console.time('doSomething'); } stream.pause(); doSomethingWithData(data); if (stopCondition) { console.timeEnd('doSomething'); done(); } else { stream.resume(); } }); I would like to know if the call to console.time...

When the console isn't open in chrome, some items are not longer clickable (some js calls stop working)

javascript,console
I have a section on my webpage in this form. The idea is that the div.content is originally hidden, and display only when the respective h3 is clicked. This works fine in firefox and safari. It also works fine in chrome, but ONLY when the console is open. When the...

What is the best way to display List items on the console based on the value of the items' properties?

c#,list,properties,console,items
I have a List that cointains some objects that have 2 string and 2 int properties. I would like to be able to display all the 4 properties of an object based on the content of its first property. For example: I want to display all the data of all...

Using xpath on javascript console

javascript,xpath,console
Hi I want to get someid's content by using xpath. my xpath: //*[someid"]/div[1]/div/div[1] code that doesn't even run: alert($x(//*[someid"]/div[1]/div/div[1])); error I get: Uncaught SyntaxError: Unexpected token } ...

Different outputs in Console and ASP.net Webform

c#,asp.net,iis,webforms,console
I wrote the following code to fetch the list of Sites on IIS. in Console it works normally and does what I want, but in webforms when I print the output it returns all the projects that exist in visual Studio folder. how come does it happen? public partial class...

Chrome Dev Tools console - select frame programatically

javascript,google-chrome,iframe,console,google-chrome-devtools
Using the Chrome Dev Tools console, I'm trying to select an element inside an iframe on the page. Is there a way to do this programatically without having to select the frame in the frames dropdown in order to set the console context to that frame first? Assuming the target...

Console colorizing AWK script does not work on cmd.exe

windows,awk,cmd,console
I wrote an AWK script, so that while launching my python scripts, stout is being colorized. Fine, it works, but only while using cygwin. For some reason I have to use win7 cmd.exe. I installed gawk for win but it does not work: python script.py | awk -f colorize.awk here...

Copy output without output buffering

php,console
I have a PHP script that write into consol some logs,erros etc. I want to save all this information into a variable for sending an email at the end of its execution. I know i can use obstart and co for doing that but I also want that during its...

Google Developer Console… no promote to prod action?

java,android,console,store
This is my first ever Android app and it has just completed the beta testing phase and now ready to go live. When I go the 'PRODUCTION' tab under the APK menu, it says: You currently don't have the necessary rights to make changes to APKs in production. Please ask...

Console.Write(i) in each for or Console.write(Stringbuilder) at the end which one is better

c#,console
Console.Write(i) in each for or Console.Write(StringBuilder) at the end: Which one is better? I have two functions, the first one prints within the for loop and the other one is printing at the end. public static void checkmethod1(int value, Checkevent text) { Stopwatch stopwatch2 = new Stopwatch(); stopwatch2.Start(); StringBuilder builder...

Async void method in Console doesn't want to fire

c#,console,async-await
Why don't I see anything in the console when I run the program below? Screenshot for proof. I see both done-messages when I uncomment both lines (why not only "Foo Done!"?) class Program { static void Main(string[] args) { //var foo = new Foo(); var bar = new Bar(); }...

How can I run a bash in every subfolder of a base folder

bash,shell,unix,console
I want to 'optimize' all my *.png images and found this so I made the bash as it says with: #!/bin/bash pngnq -vf -s1 *.png rename -f 's/-nq8.png$/.png/' *.png optipng -o7 *.png And here I have 2 problems: The first one is that the second line (rename) does nothing... it...

Java execute multiple console commands on loaded program

java,console,command,runtime,execute
I want to load a program from the console and then execute commands on it later on. The loading works fine, but how can I execute commands on the loaded program without starting it every time I want to use it? For example: ./randomapp command1 command2 But on Java, I...

Jquery Animate not working but run console

jquery,console,jquery-animate
Sorry, I can't speak English so excuse me. I have object 'window.userInterface.filmMakinesi'. I this object run console no problem. But when run my javascript file create a problem occurs. Not working. Interesting. window.userInterface.filmMakinesi = function(control) { controlBox = []; controlBox["ileri"] = {dinamikCSS: "top",operator:"-"}; controlBox["geri"] = {dinamikCSS: "bottom",operator:"+"}; secim = controlBox[control].dinamikCSS;...

Read/Write data to Console generated by exe from windows form application

c#,forms,console
I have a simple c# windowsform application which calls an exe .The exe inturn opens a console. Is it possible to read and write data to the CONSOLE generated by the exe. I want to send data from my windows forms application

Using C++ rand() to get random directions (up/down/left/right) - always getting up

c++,random,console,srand
I'm making a C++ text-based Battleship game. I use the rand() function to randomly place the computer's ships. I seed the number generator once at the beginning of main(), with the line below: srand(static_cast<unsigned>(time(0))); I later use the rand() function to choose the spaces where each individual ship will go....

Non Malicious vb.net Console app detected as virus? (FTP uploader)

vb.net,ftp,console,console-application
So I made kinda a "dropbox" type program for some of my friends computers. You place files in a specific folder, and when my console app sees a file created, it uploads it via ftp to my server. The file is then deleted from their computer. On my computer, I...

Add folder contents to .rar through console commands without adding folder itself

cmd,console,archive,rar,winrar
Here's a question: I have a folder named Root and it contains some files and folders. Using Winrar console commands, I need to create an archive Root.rar that should contain entire file/folder structure of Root and SHOULDN'T contain Root folder itself. For example: On drive: Root- |-SomeFile |-SomeFolder- |-SomeOtherFile In...