output

`Error: Output is not defined` when passing value outside a directive to parent directive

佐手、 提交于 2019-12-02 17:46:02
问题 I have an root-app component which is defined like this in the template. template: ` <dev-table (complete)="onSelect(developer)"></dev-table> <dev-details [selectedDeveloper]="selectedDeveloper"></dev-details> ` directives: [DevDetailsComponent, DevTableComponent], providers: [DevValueService, provide(DevService, {useClass: DevService})] is a list and on selection of one of the internal list it should send the value of the list (developer) which is passed into as selected developer. @Input is

Can Maven be made less verbose?

帅比萌擦擦* 提交于 2019-12-02 16:54:29
Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news). I want to get rid of all [INFO] lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven. Is there no LOG4J-like way to set the log level? Jorge Ferreira You can try the -q switch. -q,--quiet Quiet output - only show errors -q as said above is what you need. An alternative could be -B , --batch-mode Run in non-interactive (batch) mode Batch mode is essential if you need to run Maven in a non-interactive, continuous integration environment.

Python: Only writes last line of output

被刻印的时光 ゝ 提交于 2019-12-02 16:38:18
问题 Trying to write a program that extracts URLs from a website. The output is good, but when I try to write the output to a file, only the last record is written. Here is the code: import re import urllib.request # Retrieves URLs from the HTML source code of a website def extractUrls(url, unique=True, sort=True, restrictToTld=None): # Prepend "www." if not present if url[0:4] != "www.": url = "".join(["www.",url]) # Open a connection with urllib.request.urlopen("http://" + url) as h: # Grab the

Debugging code in C

时光毁灭记忆、已成空白 提交于 2019-12-02 15:56:21
问题 Can someone tell me what is wrong with my code and why it is producing this output. Code: int main(){ unsigned num; char response; do{ printf("Please enter a positive integer greater than 1 and less than 2000: "); scanf("%d", &num); if (num > 1 && num < 2000){ printf("All the prime factors of %d are given below: \n", num); printPrimeFactors(num); printf("\n\nThe distinct prime factors of %d are given below: \n", num); printDistinctPrimeFactors(num); } else{ printf("\nSorry that number does

Java: Console output in JTable

▼魔方 西西 提交于 2019-12-02 13:38:13
The program should list Volumes in a JTable . For Example: I get this output form the vollist.java class. while (volumeIter.hasNext()) { volume = volumeIter.next(); System.out.println(volume.getName()); } Console Output: vol1 vol2 vol3 ... How can I get this console output in my JTable . table = new JTable(); table.setModel(new DefaultTableModel( new Object[][] { {null, vollist.volname(null), null, null, null}, {null, vollist.volname(null), null, null, null}, {null, vollist.volname(null), null, null, null}, }, new String[] { "Nr:", "Volume Name", "TotalSize [MB]", "Used [MB]", "Status" } ));

Do I sanitize/escape correctly?

自作多情 提交于 2019-12-02 13:32:18
I've made a simple search-script in PHP that searches a mySQL database and outputs the result. How this works is like this: User searches for "jack's" through a search-form. My PHP-script GET s this search, and sanitizes it. Then the script, with the use of SELECT and LIKE , gets the results. The script then outputs the result to the user. Lastly, the script tells the user that "jack's returned x results." with the help of escaping. What I would like to ask is, am I doing it right? This is how I sanitize before SELECTING from the database: if(isset($_GET['q'])){ if(strlen(trim($_GET['q'])) >=

Output VBA Array Elements to One Cell in Excel

牧云@^-^@ 提交于 2019-12-02 13:31:50
问题 So i have a vba code that creates an array with multiple elements. I would like to output those elements into one cell in excel. Im able to output its elements to multiple cells but prefer it in one cell. Can this be done? 回答1: If the array is declared as a String or Variant then you can use Join : Sub AllIntoOne() Dim arr(1 To 3) As Variant arr(1) = 4 arr(2) = 54 arr(3) = 3 Range("A1") = Join(arr, ",") End Sub The delimiter "," defaults to a space if not supplied, but can be an empty string

Why does this do-while loop not produce the right output?

痞子三分冷 提交于 2019-12-02 13:17:39
public static void main(String[] args) throws IOException { System.out.println("Hello, come and play a game with me!"); int x = 5; int guess; do { System.out.println("Please input a number..."); guess = System.in.read(); guess = System.in.read(); if (guess < 5) { System.out.println("You guessed the number!"); break; } } while (guess > 5); } So here I wrote some code. It's supposed to be a guessing game, but no matter what I input, it always gives me in the output "Please input a number..." NO MATTER WHAT I PUT. Basically, if the "guess" is more than 5, then they guessed the number. If it's not

Python: Only writes last line of output

情到浓时终转凉″ 提交于 2019-12-02 11:34:05
Trying to write a program that extracts URLs from a website. The output is good, but when I try to write the output to a file, only the last record is written. Here is the code: import re import urllib.request # Retrieves URLs from the HTML source code of a website def extractUrls(url, unique=True, sort=True, restrictToTld=None): # Prepend "www." if not present if url[0:4] != "www.": url = "".join(["www.",url]) # Open a connection with urllib.request.urlopen("http://" + url) as h: # Grab the headers headers = h.info() # Default charset charset = "ISO-8859-1" # If a charset is in the headers

Displaying only single most recent line of a command's output

五迷三道 提交于 2019-12-02 11:12:44
问题 How can I print a command output like one from rm -rv * in a single line ? I think it would need \r but I can't figure out how. I would need to have something like this : From: removed /path/file1 removed /path/file2 removed /path/file3 To : Line 1 : removed /path/file1 Then : Line 1 : removed /path/file2 Then : Line 1 : removed /path/file3 EDIT : I may have been misunderstood, I want to have the whole process beeing printing in a single same line, changing as the command outputs an another