FAQ Database Discussion Community


code is not reprinting board after initial print.. 2x2 Dots and Boxes game

printing,mips
The below code is a one player 2x2 Dots and Boxes Game. It prints the board at first and waits for the user input. After that, it simply does not print the board but successfully asks the question. Any insight? .data board: .ascii "\n\n . . . . 0 ....

Nested loop execution

algorithm,loops,for-loop,printing
This is a really simple question, but for some reason I'm getting confused and it's annoying. def test(): for i from Lo1 to Hi1: for j from Lo2 to Hi2: body() How many times will body() execute for: Lo1=1, Hi1=n, Lo2=i-2, Hi2=i+2 The answer is 5n times, but I have...

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]])...

DynamicReports/JasperReports third party unicode Font issue

java,pdf,printing,jasper-reports,dynamic-reports
I am using DynamicReports and struggling with getting the corrent printout, when i call .show() everything is perfect, but when i print it, either to an image using image printer or to PDF using Foxit Printer or even to my LaserJet Printer, result is same as shown in the picture...

JQuery/Javascript or other way Silent Print once only

javascript,jquery,html,pdf,printing
Anyone knows how to print a file without showing print preview in cross browsers, API or libraries like jQuery or javascript or else. Print a content without print preview (just silent print) Print once, when softcopy is printed then the softcopy is expired because I want to avoid reprint the...

Printing on Zebra iMZ320 (Objective-C + ZebraSDK + ZPL)

ios,printing,zebra-printers
I'm working on an app for iOS(Ojective-C) + Zebra iMZ320 and I need some help! I'm using Zebra SDK method -(void)sendZplOverBluetooth{} to send the variable data to printer. I've designed my label using ZPL at http://labelary.com/viewer.html. Please find the label code at the end of the question. I could split...

Linux: Connect Seiko usb printer as serial port

linux,printing,serial-port,usb
I have a Seiko DPU-D2 printer. I'm connecting it to computer with usb port and I'm trying to write to it using serial. What I don't know is where this printer is mounted. What I have so far are those pieces of information: # lsusb Bus 002 Device 009: ID...

“\n” not working with “time” in Python2

python,python-2.7,time,printing
When I use this code in Python2.7: print("-----------") print("\nTime is: \n") print("-----------") I have a regular output like this ----------- Time is: ----------- But if I use time I have a wrong output. Code: import time start = time.time() print("-----------") print("\nTime is: ", (time.time() - start)) print("-----------") Output: ----------- ('\nTime...

Add watermark below image but within print area in C#

c#,winforms,image-processing,printing,watermark
I am trying to insert a text watermark underneath a TIFF image in my windows form and would definitely appreciate anyone's help. I have a print button that retrieves the image, scales it down, then based on my margins, places the image accordingly to print. I'd like to add an...

How to draw something in DrawingVisual with millimeter unit instead of pixels?

c#,wpf,printing,drawingvisual
I'm trying to draw something in a System.Windows.Media.DrawingVisual but I need to draw thins in millimeter unit. How can I do that?

Trying to Figure out why I get a Print Syntax Error at Line 12

python,python-2.7,printing,syntax-error
This is some really basic code I have to complete for a programming class of mine I'm stuck here I get a print syntax error although I'm about 99% sure the format to print something in python 2.7.9 is print "text here". Please help google searches currently to no avail...

shared printer error in windows 8 “can’t install the kernel-mode print driver. ”

windows,printing,shared,network-printers,kernel-mode
All other windows 8 pcs can use shared printer via another desktop and its a hp printer. Except one windows 8.1 pc. kernel-mode print driver issue All computers are in a workgroup and withing the same network range.. I can access the printer shared desktop using given credentials and I...

Print DOC files - Aspose.Words

java,printing,doc,aspose.words
Recently i was working on this library and made some small programs just to check the functionality. Now at this point i just know that we can Print Doc files by using Aspose.Words Java Library. What i need to ask is How can I select Printer programatically using Aspose.Words. We...

Modify existing PDF to add “Page N of NNN” footer

pdf,printing,ghostscript,postscript,pdftk
How can I use pdftk either from the command line (or preferably from Ruby) to add page numbers to the bottom of a pre-existing PDF? I'm looking for this format: Page 1 of 2 Page 2 of 2 ...

Python: Print list of unknown length?

python,html,image,printing
I'm trying to use python to print an html file. Is there a way to incorporate the following into the print statement? Perhaps using the format method? Current situation: foo = ['some_image1.com', 'some_image2.com'] print '''<img src="' + foo[0] + '"> <img src="' + foo[1] + '"> <img src="' + foo[2]...

Printing ESC Codes In LX 350

windows,printing,lpt
We have a Old Software that Prints through LPT port and we are passing ESC code 14 & 18 to double-width printing and this works perfect when we use LPT port but when change the same printer to USB port all fonts print same small size and it prints character...

How can I use JavaPOS to print reciepts with an Epson printer?

printing,epson,javapos
How can I develop Java Software to print reciepts with an Epson reciept printer?

Understanding inheritance in practice. Printing values of an instance

python,class,inheritance,printing,instances
I have a class of Agents with a working __str__ method. I have a class of Family(Agents). The Family is structured as a dictionary with the Agent ID as key. After allocating agents to families, I iterate over my_families: When I print members.keys(), I get the correct keys. When I...

Ruby print button

ruby,printing,link-to
<%= link_to "Print", 'window.print();return false;', class: "btn btn-primary" %> Trying to implement a print button but I don't know what format to use. Could anyone help me. I want it to be using the class btn btn-primary...

Python `print` prints the same line twice

python,printing
#!/usr/bin/python import time import datetime x = datetime.datetime.now().time() u = x.replace(microsecond=0) print(u) This is the program. The output I get when running it looks like this: 10:04:13 10:04:13 Why does a single print print the same line twice? edit: The exact command used to run the file is python3 nameOfTheFile.py....

Custom papersize using floating point numbers

c#,printing
Is there any method to set paper size using real number? I'm trying this PaperSize ukuran = new PaperSize("A8", 800, 293); printDocument1.DefaultPageSettings.PaperSize = ukuran; printDocument1.PrinterSettings.DefaultPageSettings.PaperSize = ukuran; and it works good... the problem is when u try to print some bill repeatedly, the perforation of the printer move down and...

How to print contents of Rich Text Box

c#,wpf,printing
I'm making a text editor in C# and WPF. How would I go about getting the contents of my RichTextBox editor and printing them with a printer? I already got this; private void print(){ PrintDialog printDialopg = new PrintDialog(); if (printDialog.ShowDialog() == DialogResult.OK){ } } Any guides, code examples or...

Select paper source in php printing solution

php,printing,postscript,tray
Hi I've got a PHP printing solutions using sockets. Using this function/class. public function printJob($queue){ //Private static function prints waiting jobs on the queue. $this->printWaiting($queue); //Open a new connection to send the control file and data. $stream = stream_socket_client("tcp://".$this->host.":".$this->port, $this->errNo, $this->errStr, $this->timeout); if(!$stream){ return $this->errNo." (".$this->errStr.")"; } else { $job...

Printing data from list

python,list,python-2.7,printing
I have got data to print. I create list but I can't print it. My list is: NEW_2 = [['ID', 'FK'], ['1', '1'], ['2', '1'], ['5', '3'], ['6', '2']] And after print it should be like that: ID FK 1 1 2 1 5 3 6 2 After all, I...

MIPS Why I can't print the selected array position?

arrays,string,printing,mips
Whit this code the simulator says: memory addres out of bound" and print(null) t0 is the index, initially set to 0, it's portion of a cicle. la $t1, nome #array address mul $t2, $t0, 4 # t2=index*4 add $t3, $t2, $t1 lw $a0, nome($t2) li $v0, 4 syscall That's the...

Retrieving Entities from Core Data: Printing properties gives me incomplete/unwanted results?

objective-c,core-data,printing,attributes
I've recently decided to move all my application data from plists to Core Data. This was pretty straightforward. I had a class with a couple properties I would read all my plist info to using a dictionary. This was mimicked by creating an entity with the same exact attributes. I...

Printing using fmt::Display

printing,rust
I am trying to print an enum (or structure) using fmt::Display. Though the code compiles and gets to the display method, it doesn't print the value. pub enum TestEnum<'a> { Foo(&'a str), Bar(f32) } impl<'b> fmt::Display for TestEnum <'b> { fn fmt(&self, f : &mut fmt::Formatter) -> fmt::Result { println!("Got...

How to add an available network printer using java code?

java,swing,batch-file,printing
I would like to get the list of available network printers, and allow users to install (add) a selected printer on their pc using a JButton. I have searched the net and did find a java api called java printer api but this didn't help me. Any suggestions ?...

VBA - Open files in folder and print names

excel,vba,file,printing,folder
I want to open all of the files in a certain folder and have it print out the names of those files. I have set up a code that opens the files but I cannot get it to print the name. I have a separate code that will print the...

Missing functionalities when deploying Qt application

c++,qt,deployment,printing,about-box
I have created a deploy folder for my Qt gui application, I have added all .dll's he screamed for. The app is running, but there 2 functionalities that are missing. void MainWindow::on_action_About_triggered() { QString filePatch = QApplication::applicationDirPath() + "/changelog.txt"; QFile f(filePatch); if (!f.open(QFile::ReadOnly | QFile::Text)) return; QTextStream in(&f); QMessageBox::about(this, tr("About...

How to make a line crawl across the screen in Python?

python,animation,printing
print('Loading Documents...') LoadDocuments() #Function That Loads the Documents for i in range(0, 30, 1): print("-", end="") time.sleep(0.1) print(" ") print('Documents Loaded') What I want it to do is print Loading Documents... then have an animation of a line crawling across the screen Instead it prints Loading Documents and then after...

I am trying to print a 2D array to a file

java,arrays,file,printing
I want to print 2D array to txt file on my desktop. It is important, that the output is formatted in way, that is in code, because it represents rows and seats. Code: package vaja15; import java.util.*; import java.io.PrintWriter; import java.io.File; import java.io.FileNotFoundException; public class Vaja15 { public static void...

How to print a line from a text file without a certain character

python,python-2.7,printing
Not quite sure if this question is a duplicate, but it seems like it isn't, after searching for a fair while. Let's say I have these lines of text in text file. Q5) What is 1+1 A) = 1 B) = *2 C) = 0 D) = -342 E) =...

Set default printer using power shell in Java

java,powershell,printing
I have the following problem. I would like to print my docx output automatically using power shell commands in Java. So far I am using this snippet to print private static void printOut() throws IOException { Runtime runtime = Runtime.getRuntime(); String command = "powershell Start-Process –FilePath \"" + yourDocXPath +...

Html webpage print function does not displaying text box values

html,printing,textbox
I have tried code for a print option in a div on my webpage. But it is not showing the values entered in the text box. Please help me with the code below or give good references to print div values with values inside the text box. <!DOCTYPE html> <html...

Using script or Automator to set page settings, margins and page wrap automatically on Text Edit files

printing,processing,automator,textedit,page-setup
I'm putting together an installation using Processing, where users type and their text is printed on a receipt printer. I've got Processing saving out time-stamped text files to a folder, and a folder action in Automator watching that folder and sending to print. My problem is that these .txt files...

p:dataTable with paginator: how to use p:printer to print all rows without paginator

jsf,primefaces,printing,datatable,paginator
In a <p:dataTable> with paginator, I need to print all the pages. When I use <p:printer> and give the datatable as target, it only prints first page with pagination controls. How can I print all the rows of the table with <p:printer>?

Modal Dialog JQuery IE 9-11 Print Issue

javascript,jquery,iframe,printing,modal-dialog
I am trying to convert a large old IE 8 system to current browsers. Once of the issues I am fixing is the showModalDialog, due to it not working on Chrome since 37 and becoming more obsolete. The method that I am using is: http://extremedev.blogspot.co.uk/2011/03/windowshowmodaldialog-cross-browser-new.html $.showCustomModal = function(options) { var...

Android PrintManager get callback

android,printing
I am using the PrintManager to print a webpage, how can my activity get a callback once printing was successfull? I am using this code: // Get a PrintManager instance PrintManager printManager = (PrintManager) this.getSystemService(Context.PRINT_SERVICE); // Get a print adapter instance PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter(); // Create a print job...

python 3 error with print function syntax

python,python-3.x,printing
I have a list of lists with tuples. I want to get the length of a tuple using: item1=(4, 8, 16, 30) list6=[[(4, 8, 16, 29)], [(4, 8, 16, 30)], [(4, 8, 16, 32)]] print("list6.index((4, 8, 16, 29)):",list6.index([item1])) print("len(list6[1]):"), len(list6[1]) Output: list6.index((4, 8, 16, 29)): 1 len(list6[1]): There is no...

pdf printer that can be controlled by .Net

c#,pdf,printing
In my current project, I created an automatic process that control a software ( Maptitude), make work on it, then print the outcome to PDFs using the given API. The problem I get stuck on is that, Maptitude neither have an option to save the outcome to PDF nor return...

How do I print a list of strings into a table in python? [on hold]

python,string,list,table,printing
This is the list tableData = [['apples', 'oranges', 'cherries', 'banana'], ['Alice', 'Bob', 'Carol', 'David'], ['dogs', 'cats', 'moose', 'goose']] This is how I want it to look like apples Alice dogs oranges Bob cats cherries Carol moose banana David goose ...

How to print something in WPF without using controls? [closed]

c#,wpf,printing
I'm newbie in WPF and I'm trying to print student's exam papers using WPF and I'm creating exam papers using System.Drawing.Graphics and now I want to print them. But it seems every printable thing in WPF is somehow a control. I have two problems: I don't know how can I...

Center text for receipt printing

c#,winforms,printing,alignment
I have some code which I'm using to print a receipt from C#. The code below prints OK but I'm struggling with aligning the text left right and center, Graphics graphics = e.Graphics; Font font = new Font("Courier New", 10); float fontHeight = font.GetHeight(); int startX = 0; int startY...

Check whether print command success or not

c#,.net,winforms,printing
I am printing some PDF files through c# code. My code looks like this myPrinters.SetDefaultPrinter(pdfPrinterName); var info = new ProcessStartInfo { Verb = "Print", FileName = file, CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden }; var p = new Process { StartInfo = info }; p.Start(); p.WaitForInputIdle(); System.Threading.Thread.Sleep(18000); if (!p.CloseMainWindow()) p.Kill();...

Print a JTable and JLabel using swing components?

java,swing,printing,jtable
I want to print JTable and JLabel's using java swing. I have tried the below code, it's printing only JLabel values. JTable is not printing. Kindly help. Code: public class TablePrintDemo1 extends JPanel implements Printable, ActionListener { private static final long serialVersionUID = 1L; static JFrame frameToPrint; JLabel l1, l2,...

Batch file that will print all files (.pdf's and .docs) in a directory

windows,batch-file,pdf,printing,dos
Running Win7, I need a batch file that will print all .doc and .pdf files in a particular directory. Any help greatly appreciated!

Change what print(Object) displays in Swift 2.0

swift,printing,swift2
I am trying to make my class Digit display the num variable whenever print is called on that object, in Swift 2.0. I thought this might be done with a description variable, but no luck. class Digit { var num: Int var x: Int var y: Int var box: Int...

Can I print list data in a more elegant way?

python,list,printing,coding-style
Is there a cleaner way to structure my print function? lloyd = { "name": "Lloyd", "homework": [90.0, 97.0, 75.0, 92.0], "quizzes": [88.0, 40.0, 94.0], "tests": [75.0, 90.0] } alice = { "name": "Alice", "homework": [100.0, 92.0, 98.0, 100.0], "quizzes": [82.0, 83.0, 91.0], "tests": [89.0, 97.0] } tyler = { "name":...

Printing a matrix without for loops

c,string,matrix,printing,puts
I'm trying to print a char matrix using a single puts instead of nested loops, but I always get one more character in the end of the printing. I'm going to make a pong game, and I need to update the screen as fast as possible. void main() { int...

While loop keeps printing out and not reading the next line

c++,printing,while-loop
This is my first simple program. It keeps printing out Guess what it is. non-stop and doesn't even ask for user input. (the next line of code.) What is my mistake? #include <iostream> #include <string> using namespace std; int main() { string userName; cout << "Hello there.\n"; cout << "My...

How can I print over the current line in Python 2.7?

python-3.x,printing
I want to have a simple counter on a line that changes. I have the following: from __future__ import print_function from time import sleep for i in range(400): print("\r" + str(i), end = "") sleep(0.5) In Python 3, it works fine, with the counter incrementing on the same line, but...

FastReport 2.54, align 2 Memo object horizontaly to each other

delphi,printing,fastreport
I'm using FR 2.54 and I should align 2 Memo object next to each other. The first one (MemoLeft, on the left) AutoWidth property is True. I tried to change the second memo (MemoRight, on the right) Left property in the OnBeforePrint event: MemoRight.Left := MemoLeft.Left + MemoLeft.Width; but the...

How to execute keybord shortcut CTRL + P by clicking a link using jquery [duplicate]

javascript,jquery,html,printing
This question already has an answer here: How can I pop-up a print dialog box using Javascript? 4 answers I want to print a page to do so I have to click CTRL + P, so I would like to make a link to ease the process. Any help...

JTable Printing. How to set page breaks programmatically?

java,swing,printing,jtable
I am trying to find a way to programmatically set page breaks for printing out a JTable. E.g., I have a table with approx 150 rows like this: Line Number Data1 Data2 Data3 …etc 1                    a         b        c        d 1...

Zebra label printer c# SDK

c#,printing,zebra-printers,thermal-printer,zebra
We just moved from brother label printers to zebra and the brother sdk for c# is kind of meh but it did what I wanted it to do. Basically it gave me the option to create a label in the designer and attach reference names to the text files, barcode...

How to print combined words on terminal?

printing,terminal,zsh
From PHOTO(By on my zsh): I wonder how to print combined word on terminal? it looks so cool. Is there any tool to do this. Anyone knows? THX ...

IIS Print PDF through CMD using acrord32.exe

c#,asp.net,pdf,iis,printing
I have a web application where i'm trying to print directly to a printer. The code works locally, however, I can't seem to get it to work on the test server. The method is as follows; internal void PrintStockTransactionPdf(string documentNumber, EnStockTransactionType transType) { Guid fileName = Guid.NewGuid(); string tempFilePath =...

c - updating integers with pointers and addresses

c,pointers,printing
So the function below should be adding 1 to n and printing out the updated n each time scanf reads a 1. Yet It is not updating and keeps printing out 1 #include <stdio.h> #include <stdlib.h> void add_one(int *n); void command(int x); int main(int argc, char *argv[]) { int i;...

Write onclick method that has parameters in php print function

javascript,php,printing,onclick
I'm having problems with writing an onclick method in php print in code below: <?php print "<p><small> <a href='#' onclick='ajaxMenu('comments.php?news=".$fileContent['id']."');>".$number. " ".$text." </small> </a> </p>"; ?> Given code doesn't work. I believe it's because of combination of single and double quotes in it. Can anyone help me to solve this?...

Print single variable per line from list

python,list,printing
So I'm pretty new and am still learning but I can't find an answer anywhere..., that being said here is my question: I'm trying to generate output with multiple lists on different line and I want one at a time, I'll post my non-working code, and then a sample of...

Fullcalendar Month View - adjust to actual number of weeks in month

printing,fullcalendar
Using latest fullcalendar.io, the number of weeks that are displayed in month view is appropriate for the first month that renders. When using the prev/next buttons, if the next/prev month has less weeks than the current month, it still renders the current month's number of weeks. Right now it's May...

Large JDF / PDF Print Job Rejected on Canon Vario 6000

pdf,printing
Using JDF Template to fill in data about my print job, which is then prepended to the pdf I am printing. The print job transfers (via lpr) and prints successfully when there are not a lot of pages, but when I create a large job (1500 pages) it fails with...

How do I include quotation marks in a print statement if I am using a variable

python,variables,printing
word = input("Enter a word: ") word_length = len(word) print("The length of", word,"is ", word_length) If word is 'back', the output will be: The length of back is 4 I want the output to be: The length of 'back' is 4 ...

Printing page with multiple embedded Google Maps in WebKit produces tile errors

google-maps,google-chrome,google-maps-api-3,printing,webkit
Printing the following example page in either Chrome or Safari on Mac (i.e., WebKit) produces misplaced map tiles in the printed output from the second map onwards. It works on the webpage itself, and printing it does also seem to work in Firefox. Need it to work in Chrome or...

Page captions (of tab control) not shown in print preview

ms-access,printing,tabs,ms-access-2010,print-preview
I'm using MS Access 2010 and have created a simple form with a 2-page tab control. On each page is a single label. In Design View, the form looks like this... In Form View, the tab control and appropriate label are shown as expected... However, when I print preview what...

Print a nested list line by line - Python

python,python-3.x,for-loop,printing,nested-lists
A = [[1, 2, 3], [2, 3, 4], [4, 5, 6]] I am trying my best to print A of the form: 1 2 3 2 3 4 4 5 6 That is in different lines, but I am unable to do so without all the elements in different lines....

Excel VBA 2013 Print Image

image,excel-vba,printing
I would like to print an image that shows in a frame on a userform. frame1.Picture = LoadPicture(spath & xPicture & ".jpg") spath is the full path to where the picture is stored. This shows the picture just fine. Now I would like to be able to print it. Is...

“print” not working when redirecting to another application

python,windows,redirect,printing,stdout
I ran across this strange problem when redirecting the output of a python application. I was running bitmessage from source which prints quite a big amount of stuff to the console. I tried filtering out some of the lines with an application I have written. When I redirect the output...

Applying print CSS on will

javascript,html,css,printing
I have a certain page that I want the user to be able to print using the native browser print page (window.print()) and I want to be able to show the user a preview of the page I have a css file called print.css which looks like this : @media...

why do print and echo behave differently in a “for” loop [duplicate]

php,for-loop,printing,echo,behavior
This question already has an answer here: How are echo and print different in PHP? [duplicate] 6 answers If I use print in this code: <?php for($i = 1; $i <= 3; print $i . "\n") { $i++; } ?> I see as output this: 2 3 4 But...

Basic Serial-Communication over Bluetooth (Cmd Syntax Issue?)

android,serialization,printing,bluetooth,adapter
I'm having trouble communicating with a Avery GSM Indicator (control box w/display for a weigh scale & printer). My inexperience leads me to suspect my command-syntax is way off. I'm currently establishing a connection with the bluetooth dongle, creating an OutputStream, and attempting to send commands over that with this...

Direct create function while defining the method

c#,events,printing,delegates
I am trying to create an anonymous method for handling the PrintPage event of a PrintDocument object. Here's what I tried: printDocument1.PrintPage += delegate { // define method } What I want to accomplish is something like this: printDocument1.PrintPage += new PrintPageEventHandler (object sender, System.Drawing.Printing.PrintPageEventArgs e) { // define method...

Printing text next to a form field in JavaScript

javascript,html,forms,printing
I'm having a bit of trouble with this assigment and would like your help. We are meant to create a product registration form page with all the regular expressions and everything and display the correct error when the regexes don't match. I am trying to print a tick or say...

Hide Print Queue window during Processing sketch (present mode) in Mac OS X 10.10.3

osx,printing,processing,system-preferences
Put together Processing sketch for an exhibition. Users type their input - Processing saves as .txt file to a folder - Folder action prints to a thermal receipt printer automatically. My problem is since updating the OS X (10.10.3) (which I had to do. It was a college mac and...

Mapping from One Sheet to Another Fill Unfilled chracter

excel,excel-vba,printing,header,mapping
So I have one excel document that has partially filled character array ("|" shows excel column line): Current Result ("_" is a space): 1111GGH80100022190 1112QQH80100023201 1113GGH80100045201 1114AAH80100025190 So my current code outputs this above result. The problem is that characters 1-5 and 21-24 get skipped over. In general if there...

How to count the number of lines of code retrieved using beautiful soup?

python,printing,count,beautifulsoup
Is there any function in beautiful soup to count the number of lines retrieved? Or is there any other way this can be done? from bs4 import BeautifulSoup import string content = open("webpage.html","r") soup = BeautifulSoup(content) divTag = soup.find_all("div", {"class":"classname"}) for tag in divTag: ulTags = tag.find_all("ul", {"class":"classname"}) for tag...

Issue with window.print on Safari

javascript,jquery,printing,safari
I have a page that has some content to be printed. At the moment of the printing, some divs must be hidden and just one must appear. The code works fine on Chrome, Firefox and IE, but not on Safari. Here is my JS: $(".printButton").on("click", function (event) { event.preventDefault(); $("form").attr("style",...

How to output only correct answer for temperature conversion?

if-statement,printing,switch-statement
A simple question but I have tried for a few hours and can't figure the last bit. How can I easily get program to display 'only' the correct answer Celsius or Farenheit, not both? int farenheit(int x); int celcius(int x); int main() { int temperature, converted, converted2; int answer; printf("Temperature...

printing a dictionary with specific format

python,dictionary,printing
i am already done with my project and i want to print my results. i have a dictionary like this: {('a',): 4, ('b',): 5, ('c', 'd'): 3, ('e', 'f'): 4, ('g', 'h'): 3, ('i',): 3} the key in some pair key-value is one element and in some others is two...

Winforms - how to print the whole of a form, including unseen parts?

c#,winforms,printing
I have a windows forms project written in C#. The main form has a TabControl on it and there is a requirement for one of the users to be able to print one of the TabPages. The form is very long and I use a vertical scroll bar. The whole...

print on a printer an order form using javascript or ajax or jquery

javascript,php,jquery,ajax,printing
I would like to print on a printer an order form. I've got this : The order form will be composed of field which are surrounded. Everytime i've got a new order i would like to print it. I already have a `header("Refresh:30");. I just need something in javascript or...

Printing an int value obtained from user

c,printing,int,scanf,value
The problem is at the age part, the compiler does not give me any errors but when I run it it prints a random number for int age printf("Enter your name:"); scanf(" %s",&name1); int age; printf("\n\nHow old are you?"); scanf(" %d",&age); char gender; printf("\n\nEnter your gender[Male/Female]:"); scanf(" %s",&gender); char confirmation;...

How can I format a number for multiple prints in python3.x?

python,variables,python-3.x,printing,format
I want to be able to format a number a certain way and have it turn out this way for each print function I call rather than reformat it within each print function. I just see it as a way to clean up for code a little. Here's an example:...

Print form in Windows application

c#,winforms,printing,desktop-application
Im trying to get a button to print out my current form and have tried all the code I can find on here but it keeps printing blank pages and I cant work out why. The code I use is as follows Bitmap bitmap; private void btnPrint_Click(object sender, EventArgs e)...

Windows application closes after printing

vb.net,windows,printing
I created a POS application with printing capability. The application works well and can also print. The only problem is that, it closes after printing. I have settings defined at user scope. When I disable printing, everything works perfectly. Any idea what could be the cause? My printing code below:...

How to print a word thats in a string thats in a list? in Python

python,string,list,for-loop,printing
I'm new to python and would greatly appreciate some help. This is actually a part of a larger function but I am basically trying to call a word from a string that is in a list. Here's an example I came up with: words = ['i am sam', 'sam i...

Adobe air application quits when i try to print after a function called “show bill”?

actionscript-3,flash,printing,air,desktop
I am trying to create an air application using flash profession cc. I have functions called show bill and print bill in it. When i print directly with out showing the bill adobe air application works correctly. But when i try to use the show bill function and then try...

Print and println aren't executed in the same time

java,jsp,servlets,printing,println
I have a method in my servlet where I have some prints to the console.. private void collectingWorkPositions(HttpSession session, HttpServletRequest request) { System.out.println("Collecting1.."); //code... System.out.println("Collecting2.."); //code... System.out.print("printing p: "); for(Integer i:p) System.out.print(i + " "); } When this method iscalled, only Collecting1.. Collecting2.. are printed in the console. When I...

Where can I found logs for WCPP.exe?

c#,windows,logging,printing,neodynamic
Where can I found logs to Windows Print Client by Neodynamic? There is nothing in EventViewer, no log files in instalation dir, no configuration. I try to implement pringing by them client, I do everything like they in sample project, by printing client give me error. I have somewehe error,...

(epson tm-t20ii) print multiple html files with qz-print

javascript,html,printing
I tried to print multiple html files in folder with qz-print and EPSON - TM-T20II, but seem no work. This is an example of script that i used: function printPages() { if (notReady()) { return; } qz.appendHTMLFile(getPath() + "misc/out-may-21.html"); qz.appendHTMLFile(getPath() + "misc/out-may-22.html"); while (!qz.isDoneAppending()) { qz.printHTML(); } but it will...

How do i print the output of a function in python? [duplicate]

python,printing,output
This question already has an answer here: How to add delta to python datetime.time? 2 answers calculateEndTimeWork() is a function that looks like this: def calculateEndTimeWork(): currentTime = datetime.now().time().replace(microsecond=0) endTime = currentTime + timedelta(minutes=(workDuration)) return endTime What I'd like to do now is to take the output of `calculateEndTimeWork()...

Printing dictornary with list order

python,list,dictionary,printing,format
I have the following code, it is an address book (a list of dictionaries) and a list. The idea is to print the items from the dictionary in the order of the list (since dicts mess up the order of everything). When I run this code, it throws an exception...

HTML/CSS: empty page + only header page when printing table

html,css,printing
I cannot understand why there's a blank page + a page with only the table header in this document. The rest is OK but I cannot get rid of these 2 pages. This is the full HTML code: <!DOCTYPE html> <html lang="en" > <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <style media="print" type="text/css">...

Closing form after printing a web browser control contained in it

vb.net,winforms,printing,webbrowser-control
I'm taking some random print through the html and web browser control in vb.net winforms Here is my code Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myWebBrowser As New WebBrowser AddHandler myWebBrowser.DocumentCompleted, AddressOf DocumentCompleted myWebBrowser.Navigate("http://www.bing.com") End Sub Private Sub DocumentCompleted(ByVal sender...

Authenticate Google Account with php

authentication,printing,cloud
Is there a possibility to log in on to Google Accountt with php? Until 26th of May I was using https://www.google.com/accounts/ClientLogin to verify account. Now this method is disabled. What Im trying to do is to connect Google Printer Cloud to print orders in resaturant. Client makes order on website...

The values of int fmt in format()

c++,printing,outputstream,opencv3.0
Currently using OpenCV3, but in OpenCV2, there was a way to format matrix outputs. It is used in a tutorial here. The format function seems to have changed from format(mat, str) in OpenCV2 to format(mat, int) OpenCV3. Making this call: cout << "4x4: " << endl << format(fourByFour, "python") <<...

Reading file containing Arabic language

c#,file,encoding,printing,character-encoding
I have a file that contains both Arabic and English word/letters/numbers. I'm trying to print the file using the code from Here. When I open the file in notepad, I see all the funny and unprintable chars. When I save the same file as Unicode in Save as... file menu...

Sending file to print not working using System.Drawing.Printing

c#,asp.net,printing,system.drawing,printqueue
I'm trying to send a file to print without opening it trough Adobe as suggested by several Answers here; instead, I'm using the PrintQueue library (from System.Drawing.Printing). What I've accomplished so far: I have the correct PrintQueue referenced as pq: PrintQueue pq; //Assume it's correct. The way to get here...

Python: “Print” and “Input” in one line

python,input,printing,line
If I'd like to put some input in between a text in python, how can I do it without, after the user has input something and pressed enter, switching to a new line? E.g.: print "I have" h = input() print "apples and" h1 = input() print "pears." Should be...