Search Results

Search found 19539 results on 782 pages for 'pretty print'.

Page 23/782 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Using BASH - Find CSS block or definition and print to screen

    - by Brian
    I have a number of .css files spread across some directories. I need to find those .css files, read them and if they contain a particular class definition, print it to the screen. For example, im looking for ".ExampleClass" and it exists in /includes/css/MyStyle.css, i would want the shell command to print .ExampleClass { color: #ff0000; }

    Read the article

  • Print numbers sequentially using printf with filling zeroes

    - by Werner
    Hi, in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; 1 2 ... 9 10 11 and I create files from those numbers. But when I list them using "ls" I get 10 11 1 2 .. so instead of trying to solve the problem using bash, I wonder how could I print; 0001 0002 ... 0009 0010 0011 and so on Thanks

    Read the article

  • How do I print this list vertically?

    - by UnworthyToast
    Let's say I have this list of asterisks, and I say it to print this way: list = ['* *', '*', '* * *', '* * * * *', '* * * * * *', '* * * *'] for i in list: print i So here, the output is: * * * * * * * * * * * * * * * * * * * * * But I want the output to be vertical, like this: * * * * * * * * * * * * * * * * * * * * * Any tips on doing this? I've tried to conceptualize how to use things like list comprehension or for-loops for this, but haven't got it quite right.

    Read the article

  • in R, how can i save the value of "print"

    - by alex
    in R , when i use "print", i can see all the values, but how can i save this as a vector for example, in for loop, for (i in 1:10), i want the value of A , when i= 1,2,3,4..... but if i use the x=A, it only have the final value of A which is the value when i = 10. so , how can i save the vaule in print(A)

    Read the article

  • Disable Clipboard & Print Screen on webpage

    - by air
    i search online but can't get satisfactory result i want to protect images on my website, i know i can disable save as, right click. the real question is can we Disable Clipboard & Print Screen with JQUERY or java script. so no image copy from print screen. thanks

    Read the article

  • A switch and router between the printer and PC that want to print but cannot

    - by Robert Memo
    IP 192.168.1.5 has a wireless connection to a Linksys router (192.168.1.1) which then is connected to a switch. The switch is connected to a server (192.168.0.2). My printer has IP address of 192.168.0.8. Internet connection is fine on 192.168.1.5. Problem 1: IP 192.168.1.5 can not print using printer 192.168.0.8. Problem 2: IP 192.168.1.2 can not access a shared folder on the the server. The reason for connecting this way is that, the server does not release wireless signal. In order to get wireless signal the Router is connected to the switch. The server is a computer server that only has one outgoing LAN port. Plus, due to inconvinience physical locations, I do not have option to change the physical locations and the way it is connected already. I just want the labtops that only have wireless connection to communicate with the printer and the server. I have tried to change the router IP address to 192.168.0.x like the server and printer. It caused problem for the laptop. The router no longer release internet signals. The router does have IP address from the server 192.168.0.5.

    Read the article

  • I can NOT submit the form

    - by buri kuri
    Hey guys Im trying to develop an advance consumer website using php and I stuck somewhere while trying to get the data with submitting to another page. All I want to do is to get the checkbox values which are stored in an array and checked by user. I urgently need your help please here is the code: $sql2="SELECT * FROM alinanfis WHERE alinanfis.fis_id='".$fis."'" ; $resultFis=mysql_query($sql2); if(mysql_num_rows($resultFis)>0) { print "<form method='POST' action='deletionResult.php'>"; print "<table>"; print "<tr>"; print "<th style='background: transparent;'></th>"; print "<th>Fis No</th>"; print "<th>isim</th>"; print "<th>soyisim</th>"; print "<th >Tarih</th>"; print "<th>Fis Tipi</th>"; print "<th>Nerede</th>"; print "<th>Litre</th>"; print "<th>Tutar</th>"; print "</tr>"; while($rowAlinan=mysql_fetch_array($resultFis)) { $sqlFisTipi="SELECT * FROM atype WHERE a_id='".$rowAlinan['a_id']."'" ; $resultFisTipi=mysql_query($sqlFisTipi); $rowFisTipi=mysql_fetch_array($resultFisTipi); $sqlNerede="SELECT * FROM isyeri WHERE i_id='".$rowAlinan['nerde']."'" ; $resultNerede=mysql_query($sqlNerede); $rowNerede=mysql_fetch_array($resultNerede); $sqlMID="SELECT * FROM musteri WHERE m_id='".$rowAlinan['m_id']."'" ; $resultMID1=mysql_query($sqlMID); $rowMID1=mysql_fetch_array($resultMID1); print "<tr>"; print "<td><input name='checkBox[]' type='checkbox' value='".$rowAlinan['fis_id']."' /> php</td>"; print "<td>".$rowAlinan['fis_id']."</td>"; print "<td>".$rowMID1['m_name']."</td>"; print "<td>".$rowMID1['m_lastName']."</td>"; print "<td>".$rowAlinan['alinan_tarih']."</td>"; print "<td>".$rowFisTipi['a_name']."</td>"; print "<td>".$rowNerede['i_name']."</td>"; print "<td>".$rowAlinan['litre']."</td>"; print "<td>".$rowAlinan['tutar']."</td>"; print "</tr>"; } print '<div class="form_settings">'; print "<input class='submit' type='submit' name= 'send' value='Send'>"; / print '</div>'; print "</table>"; print "</form>"; }//end of if(num_rows>0) else echo '*no such receipt found!!'; mysql_close($con);

    Read the article

  • PC freezing when used to print labels

    - by Will
    Hi I have a windows XP machine that is used to print labels from a Zebra label printer. It is connected a member of the domain. I am getting reports that when people try to use the computer it will sometimes be frozen to the point where they have to physically shut the machine down and boot to get it responding. (this happens about once a day). I took a look in Event Viewer and nabbed some of these errors out of it: Event Type: Error Event Source: Userenv Event Category: None Event ID: 1054 Date: 11/12/2010 Time: 9:13:04 AM User: NT AUTHORITY\SYSTEM Computer: FS-LABELMACHINE Description: Windows cannot obtain the domain controller name for your computer network. (A socket operation was attempted to an unreachable host. ). Group Policy processing aborted. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Event Type: Error Event Source: AutoEnrollment Event Category: None Event ID: 15 Date: 11/11/2010 Time: 11:08:25 PM User: N/A Computer: FS-LABELMACHINE Description: Automatic certificate enrollment for local system failed to contact the active directory (0x80072751). A socket operation was attempted to an unreachable host. Enrollment will not be performed. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Hanging application MSACCESS.EXE, version 11.0.8166.0, hang module hungapp, version 0.0.0.0, hang address 0x00000000. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.... SearchIndexer (2420) Unable to write a shadowed header for file C:\Documents and Settings\All Users\Application Data\Microsoft\Search\Data\Applications\Windows\MSS.chk. Error -1032. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Failed auto update retrieval of third-party root list sequence number from: <http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootseq.txt> with error: A connection with the server could not be established For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I'm not really sure what to make out of this... Thanks for the help in advanced, Will

    Read the article

  • Mapping printers using Group Policy Preferences; works on Windows XP, not on Windows 7 x64

    - by Graeme Donaldson
    I'm trying to use Group Policy Preferences to manage user connections to shared printers. The print server is Windows Server 2003 R2 Std edition. Several printers are installed, and I've added x64 editions of all the drivers to the print server as well. I've created a new GPO containing the printer preference settings. Printer mappings are targeted based on AD security group membership. I log on to a Windows XP PC with the Group Policy CSEs installed and the printer maps perfectly. I log on to a Windows 7 x64 PC and it doesn't map. If I manually connect to the shared printer, I get a prompt which asks me to confirm if I trust the server before installing the driver, and then it works perfectly. I have domain admin rights and my UAC settings have not been changed from the default, i.e. UAC is enabled and the default level is selected. Is the printer mapping failing because it's unable to prompt me to install the driver, or is there something else afoot?

    Read the article

  • How do I remove a printer connection without the user's intervention?

    - by 1.618
    Here's the situation: We're replacing 11 printers with newer models, and we'll be installing them on our print server and sharing them out. The plan is to share the new printers under different names than the ones they're replacing, and un-share the old ones. So I need to come up with a way to remove the client connections to old printers automatically. Clients are mostly Windows 7 with a few XP. My first idea was to call prnmngr.vbs from the login script to remove each old printer explicitly by name. The problem is that some users don't log out when they're done for the day, so I can't count on their login script running before they next need to print. I could remotely run prnmngr.vbs using SCCM, but if it's not 'impersonating' the user, I don't think it will remove their printers. Any ideas? Could I lookup how to access WMI using c# code and write a "trojan" to remove specific printers without requiring the user to do anything? (I'm only half joking). I'm open to any suggestion! Thanks!

    Read the article

  • why my print doesn't work?

    - by udaya
    hi In this below program i am printing the contents of the div when i click the print button i am receiving an alert message printer error not available why it is so <html> <head> <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script> <script type="text/javascript"> function PrintElem(elem) { Popup($(elem).text()); } function Popup(data) { var mywindow = window.open('', 'my div', 'height=400,width=600'); mywindow.document.write('<html><head><title>my div</title>'); /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.document.close(); mywindow.print(); return true; } </script> </head> <body> <div id="mydiv"> This will be printed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a quam at nibh adipiscing interdum. Nulla vitae accumsan ante. </div> <input type="button" value="Print Div" onclick="PrintElem('#mydiv')" /> </body> </html>

    Read the article

  • MS Access Interop - How to set print filename?

    - by Ryan
    Hi all, I'm using Delphi 2009 and the MS Access Interop COM API. I'm trying to figure out two things, but one is more important than the other right now. I need to know how to set the file name when sending the print job to the spooler. Right now it's defaulting to the Access DB's name, which can be something different than the file's name. I need to just ensure that when this is printed it enters the print spool using the same filename as the actual file itself - not the DB's name. My printer spool is actually a virtual print driver that converts documents to an image. That's my main issue. The second issue is how to specify which printer to use. This is less important at the moment because I'm just using the default printer for now. It would be nice if I could specify the printer to use, though. Does anyone know either of these two issues? Thank you in advance. I'll go ahead and paste my code: unit Converter.Handlers.Office.Access; interface uses sysutils, variants, Converter.Printer, Office_TLB, Access_TLB, UDC_TLB; procedure ToTiff(p_Printer: PrinterDriver; p_InputFile, p_OutputFile: String); implementation procedure ToTiff(p_Printer: PrinterDriver; p_InputFile, p_OutputFile: String); var AccessApp : AccessApplication; begin AccessApp := CoAccessApplication.Create; AccessApp.Visible := False; try AccessApp.OpenCurrentDatabase(p_InputFile, True, ''); AccessApp.RunCommand(acCmdQuickPrint); AccessApp.CloseCurrentDatabase; finally AccessApp.Quit(acQuitSaveNone); end; end; end.

    Read the article

  • AS3 using PrintJob to print a MovieClip

    - by Chris Waugh
    Hello, I am currently trying to create a function which will allow me to pass in a movieclip and print it. Here is the simplified version of the function: function printMovieClip(clip:MovieClip) { var printJob:PrintJob = new PrintJob(); var numPages:int = 0; var printY:int = 0; var printHeight:Number; if ( printJob.start() ) { /* Resize movie clip to fit within page width */ if (clip.width > printJob.pageWidth) { clip.width = printJob.pageWidth; clip.scaleY = clip.scaleX; } numPages = Math.ceil(clip.height / printJob.pageHeight); /* Add pages to print job */ for (var i:int = 0; i < numPages; i++) { printJob.addPage(clip, new Rectangle(0, printY, printJob.pageWidth, printJob.pageHeight)); printY += printJob.pageHeight; } /* Send print job to printer */ printJob.send(); /* Delete job from memory */ printJob = null; } } printMovieClip( testMC ); Unfortunately this is not working as expected i.e. printing the full width of the Movieclip and doing page breaks on the length. Any help with this would be greatly appreciated. Many thanks, Chris

    Read the article

  • Get index values for an array to print in value attribute for radio buttons

    - by kexxcream
    Problem: To get the index values of an array to print accordingly in value attribute of radio buttons. The array $_SESSION['items']: Array ( [2] => Array ( [category] => 2 [question] => Array ( [6] => Källorna refereras separat [7] => Vissa försök till sammanbindning [8] => En del sammanfattningar [9] => Olika forskningslinjer jämförs och sammanfattas [10] => Kontraster, jämförelser, sammanfattningar; centrala likheter och skillnader framhävs ) [title] => Integration av källorna ) ) I have a PHP function that looks like this: function itemsLayout ($array) { for ($i = 1; $i <= count($array['question']); $i++) { $form .= '<input type="radio" name="'.$array['category'].'" id="'.$array['category'].'" value="INDEX VALUE FOR QUESTION ARRAY HERE">'; } return $form; } PHP code: I get the index by using the following: $key = key($_SESSION['items']); $current = $_SESSION['items'][$key]; And I print the first index by using: echo itemsLayout($current); Question: How do I get the index values 6, 7, 8, 9, 10 to print in the value attribute for each radio button?

    Read the article

  • Print UITableView that has content off screen?

    - by Daniel
    Hi I have an iOS app that has the ability to print a UITableView. However, only th part of the tableview that is shown is printed. Is there a way to print the whole tableview, even if it has not been drawn yet? Here is the code I am using to print: UIGraphicsBeginImageContext(self.mainTableView.contentSize); [self.mainTableView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIPrintInteractionController *printer = [UIPrintInteractionController sharedPrintController]; printer.printingItem = viewImage; UIPrintInfo *info = [UIPrintInfo printInfo]; printer.printInfo = info; UIPrintInteractionCompletionHandler completionHandler = ^(UIPrintInteractionController *pic, BOOL completed, NSError *error) { if (!completed && error) NSLog(@"FAILED! due to error in domain %@ with error code %u: %@", error.domain, error.code, [error localizedDescription]); }; UIButton * printButton = (UIButton *)sender; if(UIUserInterfaceIdiomPad == [[UIDevice currentDevice] userInterfaceIdiom]){ [printer presentFromRect:printButton.frame inView:self.view animated:YES completionHandler:completionHandler]; } else { [printer presentAnimated:YES completionHandler:completionHandler]; }

    Read the article

  • Print directly to CUPS server from non-local clients (Ubuntu 14.04)

    - by OEP
    I set up a CUPS server with a few queues and printing from local clients (the CUPS test page and Samba) seems to work just fine. It seems like the CUPS server is denying non-local clients though: 130.127.48.70 - - [03/Jun/2014:14:29:19 -0400] "POST /printers/m137 HTTP/1.1" 200 390 Validate-Job successful-ok 130.127.48.70 - - [03/Jun/2014:14:29:19 -0400] "POST /printers/m137 HTTP/1.1" 200 339 Create-Job client-error-not-authorized localhost - - [03/Jun/2014:14:40:50 -0400] "POST /printers/m137 HTTP/1.1" 200 410869 Print-Job successful-ok This makes me think I have some sort of host-based restriction in my configuration file, but I can't find it. I've even set my default policy to Allow all only to get the same log message. I'm working from a configuration file which had previously worked on an older version of CUPS, which looks quite similar to the example cupsd.conf. I could be wrong but it looks like that final <Limit All> block ought to allow the actions the logs complain about. MaxLogSize 2000000000 # Log general information in error_log - change "info" to "debug" for # troubleshooting... LogLevel info #AccessLog syslog #ErrorLog syslog #PageLog syslog # Administrator user group... SystemGroup sys root lp # Only listen for connections from the local machine. Listen 0.0.0.0:631 Listen :::631 Listen /var/run/cups/cups.sock ServerName <snipped> # Show shared printers on the local network. Browsing Off BrowseOrder allow,deny # (Change '@LOCAL' to 'ALL' if using directed broadcasts from another subnet.) BrowseAllow @LOCAL # Default authentication type, when authentication is required... DefaultAuthType Basic # Restrict access to the server... <Location /> Order allow,deny Allow all </Location> # Restrict access to the admin pages... <Location /admin> AuthType Default Require user @SYSTEM Encryption Required Order allow,deny Allow all </Location> # Restrict access to configuration files... <Location /admin/conf> AuthType Default Require user @SYSTEM Encryption Required Order allow,deny Allow all </Location> # Set the default printer/job policies... <Policy default> # Job-related operations must be done by the owner or an administrator... <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job> Require user @OWNER @SYSTEM Order deny,allow </Limit> # All administration operations require an administrator to authenticate... <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default> AuthType Default Require user @SYSTEM Order deny,allow </Limit> # All printer operations require a printer operator to authenticate... <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs> AuthType Default Require user @SYSTEM Order deny,allow </Limit> # Only the owner or an administrator can cancel or authenticate a job... <Limit Cancel-Job CUPS-Authenticate-Job> Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit All> Order allow,deny </Limit> </Policy>

    Read the article

  • How to print a pdf in a new tab? [migrated]

    - by TheDuke777
    I need to print a pdf by opening it in a new window. I've looked at tutorials for days, but nothing is working. I've tried many approaches, but this is the most recent: <!DOCTYPE html> <html> <head> <script type="text/javascript"> function print() { window.getElementById("pdf").focus(); window.getElementById("pdf").print(); } </script> </head> <body onload="print()"> <embed id="pdf" src="http://path/to/file" /> </body> </html> The page loads fine, with the pdf embedded. But it won't print, and I feel like I've been beating my head against a brick wall trying to figure this out. How can I get this to work? I'm willing to try anything at this point.

    Read the article

  • C# PrintPreviewDialog Modification possible?

    - by C. Griffin
    Currently, what I'm doing is this: Using the built-in .NET PrintPreviewDialog Attaching my own Click handler to the Print button, which allows for the user to select the printer before finally printing. This all WORKS, HOWEVER, the OnprintToolStripButtonClick event is still sending the document to the default printer BEFORE the user gets to choose the actual printer and click Print (which works, but they're getting an extra copy on the default printer first from the old Handler). Can I remove this built-in Click handler? I've tried the other methods mentioned on here in regards to using an EventHandlerList to remove the handlers, but it doesn't work for the built-in printing event. Here is a copy of my current code in case it helps clarify: // ... Irrelevant code before this private PrintPreviewDialog ppdlg; ToolStrip ts = new ToolStrip(); ts.Name = "wrongToolStrip"; foreach (Control ctl in ppdlg.Controls) { if (ctl.Name.Equals("toolStrip1")) { ts = ctl as ToolStrip; break; } } ToolStripButton printButton = new ToolStripButton(); foreach (ToolStripItem tsi in ts.Items) { if (tsi.Name.Equals("printToolStripButton")) { printButton = tsi as ToolStripButton; } } printButton.Click += new EventHandler(this.SelectPrinterAfterPreview); // ... Irrelevant code afterwards omitted // Here is the Handler for choosing a Printer that gets called after the // PrintPreviewDialog's "Print" button is clicked. private void SelectPrinterAfterPreview(object sender, EventArgs e) { frmMainPage frmMain = (frmMainPage)this.MdiParent; if (frmMain.printDialog1.ShowDialog() == DialogResult.OK) { pd.PrinterSettings.PrinterName = frmMain.printDialog1.PrinterSettings.PrinterName; pd.PrinterSettings.Copies = frmMain.printDialog1.PrinterSettings.Copies; pd.Print(); } }

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >