Search Results

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

Page 13/782 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Web-To-Print - What technology should I explore? Web-Content -> drag & drop to Templates -> PDF

    - by hamlin11
    I'm discussing some software design issues with a potential client and the idea of Web-to-Print technology has come up. We need users to be able to drag images from an image library to various regions defined by a template. Example: Images may go in box A, B, or C and text may go in boxes D or E. These templates would be setup Boxes A through E would be defined inside a template by administrators using some sort of editor. These templates would serve as a mapping from web-content to a PDF. Once users drag images and insert text in the appropriate regions of the template, the result will be converted into a PDF. Is this feasible these days with jquery & asp.net? That would be nice. If not, what would be the ideal solution?

    Read the article

  • how can I get jquery.sIFR plugin to display sIFR-alternate text for print?

    - by apeBoy
    I'm struggling with this. I've used the jquery sIFR plugin as opposed to sIFR it prevented conflicts with other jquery I am using on my pages. It works fine in its prime function: replacing html text with Flash. However, the .sIFR-alternate class is given an inline style of 'opacity: 0' which persists when flashblock is on. So alternate text does not appear. Neither does it appear when printng the page (yes I have included styles for sIFR-print). I've tried replacing the opacity:0 inline style with display: none but this causes height issues with the output flash. Any one else had this or have any ideas?

    Read the article

  • Print number series in java

    - by user1898282
    I have to print the series shown below in java: ***1*** **2*2** *3*3*3* 4*4*4*4 My current implementation is: public static void printSeries(int number,int numberOfCharsinEachLine){ String s="*"; for(int i=1;i<=number;i++){ int countOfs=(numberOfCharsinEachLine-(i)-(i-1))/2; if(countOfs<0){ System.out.println("Can't be done"); break; } for(int j=0;j<countOfs;j++){ System.out.print(s); } System.out.print(i); for(int k=1;k<i;k++){ System.out.print(s); System.out.print(i); } for(int j=0;j<countOfs;j++){ System.out.print(s); } System.out.println(); } } But there are lot of for loops, so I'm wondering whether this can be done in a better way or not?

    Read the article

  • Printing fails after first print with Centos 6 and HP LaserJet P3015dn printer

    - by Gavin Simpson
    Centos 6 recognises and configures a HP LaserJet P3015dn printer connected via USB. This machine is being configured as a small group file/print server. I can print a test page, which is processed/printed correctly. The next time printing is attempted (say printing a second test page), the page is not printed and the printer is set to disabled. The status of the printer is stated as: Stopped - /usr/lib/cups/backend/hp failed in the printer configuration dialogue. /var/log/cups/error_log contains this information (first two lines were there prior to the failed print job) E [24/Jun/2004:09:12:57 +0100] Returning HTTP Forbidden for Resume-Printer (ipp://localhost/printers/HP-LaserJet-P3010-Series) from localhost E [24/Jun/2004:09:20:59 +0100] Returning HTTP Forbidden for CUPS-Delete-Printer (ipp://localhost/printers/HP-LaserJet-P3010-Series) from localhost D [24/Jun/2004:09:37:28 +0100] [Job 28] The following messages were recorded from 09:36:43 AM to 09:37:28 AM D [24/Jun/2004:09:37:28 +0100] [Job 28] Adding start banner page "none". D [24/Jun/2004:09:37:28 +0100] [Job 28] Adding end banner page "none". D [24/Jun/2004:09:37:28 +0100] [Job 28] File of type application/vnd.cups-banner queued by "gavin". D [24/Jun/2004:09:37:28 +0100] [Job 28] hold_until=0 D [24/Jun/2004:09:37:28 +0100] [Job 28] Queued on "HP-LaserJet-P3010-Series" by "gavin". D [24/Jun/2004:09:37:28 +0100] [Job 28] job-sheets=none,none D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[0]="HP-LaserJet-P3010-Series" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[1]="28" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[2]="gavin" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[3]="Test Page" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[4]="1" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[5]="job-uuid=urn:uuid:b3370a97-4ab6-3451-40a2-6239b13fa3e1 job-originating-host-name=localhost" D [24/Jun/2004:09:37:28 +0100] [Job 28] argv[6]="/var/spool/cups/d00028-001" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[0]="CUPS_CACHEDIR=/var/cache/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[1]="CUPS_DATADIR=/usr/share/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[2]="CUPS_DOCROOT=/usr/share/cups/www" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[4]="CUPS_REQUESTROOT=/var/spool/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[5]="CUPS_SERVERBIN=/usr/lib/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[6]="CUPS_SERVERROOT=/etc/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[7]="CUPS_STATEDIR=/var/run/cups" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[8]="HOME=/var/spool/cups/tmp" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[10]="[email protected]" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[11]="SOFTWARE=CUPS/1.4.2" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[12]="TMPDIR=/var/spool/cups/tmp" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[13]="USER=root" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[15]="CUPS_ENCRYPTION=IfRequested" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[16]="IPP_PORT=631" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[17]="CHARSET=utf-8" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[18]="LANG=en_US.UTF-8" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[19]="PPD=/etc/cups/ppd/HP-LaserJet-P3010-Series.ppd" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[20]="RIP_MAX_CACHE=8m" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[21]="CONTENT_TYPE=application/vnd.cups-banner" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[22]="DEVICE_URI=hp:/usb/HP_LaserJet_P3010_Series?serial=VNBV993GM4" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[23]="PRINTER_INFO=Hewlett-Packard HP LaserJet P3010 Series" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[24]="PRINTER_LOCATION=electra.geog.ucl.ac.uk" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[25]="PRINTER=HP-LaserJet-P3010-Series" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[26]="CUPS_FILETYPE=document" D [24/Jun/2004:09:37:28 +0100] [Job 28] envp[27]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript" D [24/Jun/2004:09:37:28 +0100] [Job 28] Started filter /usr/lib/cups/filter/bannertops (PID 2858) D [24/Jun/2004:09:37:28 +0100] [Job 28] Started filter /usr/lib/cups/filter/pstops (PID 2859) D [24/Jun/2004:09:37:28 +0100] [Job 28] Started backend /usr/lib/cups/backend/hp (PID 2860) D [24/Jun/2004:09:37:28 +0100] [Job 28] load_banner(filename="/var/spool/cups/d00028-001") D [24/Jun/2004:09:37:28 +0100] [Job 28] Page = 612x792; 12,12 to 600,780 D [24/Jun/2004:09:37:28 +0100] [Job 28] Page = 612x792; 12,12 to 600,780 D [24/Jun/2004:09:37:28 +0100] [Job 28] slow_collate=0, slow_duplex=0, slow_order=0 D [24/Jun/2004:09:37:28 +0100] [Job 28] Before copy_comments - %!PS-Adobe-3.0 D [24/Jun/2004:09:37:28 +0100] [Job 28] %!PS-Adobe-3.0 D [24/Jun/2004:09:37:28 +0100] [Job 28] %%BoundingBox: 12 12 600 780 D [24/Jun/2004:09:37:28 +0100] [Job 28] %cupsRotation: 0 D [24/Jun/2004:09:37:28 +0100] [Job 28] %%Creator: bannertops/CUPS v1.4.2 D [24/Jun/2004:09:37:28 +0100] [Job 28] %%CreationDate: Thu 24 Jun 2004 09:36:43 AM BST D [24/Jun/2004:09:37:28 +0100] [Job 28] %%LanguageLevel: 2 D [24/Jun/2004:09:37:28 +0100] [Job 28] %%DocumentData: Clean7Bit D [24/Jun/2004:09:37:28 +0100] [Job 28] %%Title: (Test Page) D [24/Jun/2004:09:37:28 +0100] [Job 28] %%For: (gavin) D [24/Jun/2004:09:37:28 +0100] [Job 28] %%Pages: 1 D [24/Jun/2004:09:37:28 +0100] [Job 28] %%DocumentSuppliedResources: font Monospace D [24/Jun/2004:09:37:28 +0100] [Job 28] %%+ font Monospace-Bold D [24/Jun/2004:09:37:28 +0100] [Job 28] %%+ font Monospace-BoldOblique D [24/Jun/2004:09:37:28 +0100] [Job 28] %%+ font Monospace-Oblique D [24/Jun/2004:09:37:28 +0100] [Job 28] %%EndComments D [24/Jun/2004:09:37:28 +0100] [Job 28] Before copy_prolog - %%BeginProlog D [24/Jun/2004:09:37:28 +0100] [Job 28] STATE: +connecting-to-device D [24/Jun/2004:09:37:28 +0100] [Job 28] prnt/backend/hp.c 762: ERROR: cannot open channel PRINT D [24/Jun/2004:09:37:28 +0100] [Job 28] Backend returned status 1 (failed) D [24/Jun/2004:09:37:28 +0100] [Job 28] Printer stopped due to backend errors; please consult the error_log file for details. D [24/Jun/2004:09:37:28 +0100] [Job 28] End of messages D [24/Jun/2004:09:37:28 +0100] [Job 28] printer-state=5(stopped) D [24/Jun/2004:09:37:28 +0100] [Job 28] printer-state-message="/usr/lib/cups/backend/hp failed" D [24/Jun/2004:09:37:28 +0100] [Job 28] printer-state-reasons=paused /var/log/messages contains the following reports associated with the recognition of the printer and the failed print job: Jun 24 09:35:07 electra kernel: usb 1-8: new high speed USB device using ehci_hcd and address 2 Jun 24 09:35:07 electra kernel: usb 1-8: New USB device found, idVendor=03f0, idProduct=8d17 Jun 24 09:35:07 electra kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jun 24 09:35:07 electra kernel: usb 1-8: Product: HP LaserJet P3010 Series Jun 24 09:35:07 electra kernel: usb 1-8: Manufacturer: Hewlett-Packard Jun 24 09:35:07 electra kernel: usb 1-8: SerialNumber: VNBV993GM4 Jun 24 09:35:07 electra kernel: usb 1-8: configuration #1 chosen from 1 choice Jun 24 09:35:07 electra kernel: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x8D17 Jun 24 09:35:07 electra kernel: usbcore: registered new interface driver usblp Jun 24 09:35:07 electra udev-configure-printer: invalid or missing IEEE 1284 Device ID Jun 24 09:35:08 electra hp[1942]: io/hpmud/pp.c 627: unable to read device-id ret=-1 Jun 24 09:35:09 electra python: io/hpmud/pp.c 627: unable to read device-id ret=-1 Jun 24 09:35:51 electra kernel: usblp0: removed Jun 24 09:37:28 electra hp[2860]: io/hpmud/dot4.c 254: unable to read Dot4ReverseReply data: Resource temporarily unavailable exp=2 act=0 Jun 24 09:37:28 electra hp[2860]: io/hpmud/dot4.c 330: invalid DOT4InitReply: cmd=0, result=20#012, revision=0 Jun 24 09:37:28 electra hp[2860]: prnt/backend/hp.c 762: ERROR: cannot open channel PRINT I am now at a loss as to how to proceed to get this printer working on my Centos machine. How can I configure the machine to print more than a single print job without needing to be unplugged/plugged in repeatedly?

    Read the article

  • How to print data form C#

    - by Hybryd
    I've searched Stackoverflow and google and found many ways how I can print stuff in C#. The best way for me would be to populate blank white windows form with some label, textbox and picturebox elements and print it as a windows form. This way is very poor because it prints in 72 DPI, and is not flexible for multiple pages print. Next way that I found that would be good is using iTextSharp, but there is a problem that iTextSharp only generates PDF-s, and you have to open it in PDF viewer and print from there. I love this way of thinking where I create a paragraph, and then fill it with text and graphic, so I found this thread http://www.devarticles.com/c/a/C-Sharp/Printing-Using-C-sharp/ where it discusses how to create your own printing engine in C#, something like iTextSharp, but very lightweight... Now that I've said that, I want to know is there any ready to use printing engine that would be like iTextSharp, made for printing, not for PDF generation? What is the best way to print something, without using reporting services like CrystalReports. I think Crystal Reports wouldn't work for my case cause I don't want to print generic reports, but some text and graphics that I need to dynamicaly generate every time I need to print.

    Read the article

  • error catching exception while System.out.print

    - by user1702633
    I have 2 classes, one that implements a double lookup( int i); and one where I use that lookup(int i) in solving a question, or in this case printing the lookup values. This case is for an array. So I read the exception documentation or google/textbook and come with the following code: public double lookup(int i) throws Exception { if( i > numItems) throw new Exception("out of bounds"); return items[i]; } and take it over to my class and try to print my set, where set is a name of the object type I define in the class above. public void print() { for (int i = 0; i < set.size() - 1; i++) { System.out.print(set.lookup(i) + ","); } System.out.print(set.lookup(set.size())); } I'm using two print()'s to avoid the last "," in the print, but am getting an unhandled exception Exception (my exception's name was Exception) I think I have to catch my exception in my print() but cannot find the correct formatting online. Do I have to write catch exception Exception? because that gives me a syntax error saying invalid type on catch. Sources like http://docs.oracle.com/javase/tutorial/essential/exceptions/ are of little help to me, I'm can't seem to grasp what the text is telling me. I'm also having trouble finding sources with multiple examples where I can actually understand the coding in the examples. so could anybody give me a source/example for the above catch phrase and perhaps a decent source of examples for new Java programmers? my book is horrendous and I cannot seem to find an understandable example for the above catch phrase online.

    Read the article

  • Windows 2008 Terminal Services "Easy Print" and Matrix Printers

    - by Cesar87
    Server: Windows 2008 Server Standard SP2 with "Terminal Services" role Clients: Windows XP SP3 + .NET 3.5 Framework SP1 + Remote Desktop Client 7.0 We are using "Easy Print" feature which allows programs running on server to "see" printers installed on client machines. Everything works fine, EXCEPT when we send a text-only output to a dot-matrix printer. In this case, the printer only outputs a blank page. At first, we had problems with the error "Windows Presentation Foundation Terminal Server Print W has encountered a problem and needs to close." but this was fixed by replacing TsWpfWrp.exe with the one from Vista SP1 as suggested here. But now, we only get a blank page! Every other (graphical) document we sent to printer works 100%. We also tried to use the "Generic text-only" driver, but the result is same. Now we are trying to change parameters like print processor on "advanced" tab from printer driver to see if something happen. But this is just guessing and we really don't know what to try anymore. The problem appears to be on Easy Print driver, but we found almost no resources about it. Any tips are welcome.

    Read the article

  • Parsing the output of "uptime" with bash

    - by Keek
    I would like to save the output of the uptime command into a csv file in a Bash script. Since the uptime command has different output formats based on the time since the last reboot I came up with a pretty heavy solution based on case, but there is surely a more elegant way of doing this. uptime output: 8:58AM up 15:12, 1 user, load averages: 0.01, 0.02, 0.00 desired result: 15:12,1 user,0.00 0.02 0.00, current code: case "`uptime | wc -w | awk '{print $1}'`" in #Count the number of words in the uptime output 10) #e.g.: 8:16PM up 2:30, 1 user, load averages: 0.09, 0.05, 0.02 echo -n `uptime | awk '{ print $3 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $4,$5 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $8,$9,$10 }' | awk '{gsub ( ",","" ) ; print $0 }'`"," ;; 12) #e.g.: 1:41pm up 105 days, 21:46, 2 users, load average: 0.28, 0.28, 0.27 echo -n `uptime | awk '{ print $3,$4,$5 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $6,$7 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $10,$11,$12 }' | awk '{gsub ( ",","" ) ; print $0 }'`"," ;; 13) #e.g.: 12:55pm up 105 days, 21 hrs, 2 users, load average: 0.26, 0.26, 0.26 echo -n `uptime | awk '{ print $3,$4,$5,$6 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $7,$8 }' | awk '{gsub ( ",","" ) ; print $0 }'`","`uptime | awk '{ print $11,$12,$13 }' | awk '{gsub ( ",","" ) ; print $0 }'`"," ;; esac

    Read the article

  • Pretty output question

    - by sid_com
    Hello! #!/usr/bin/env perl use warnings; use strict; my $text = 'hello ' x 30; printf "%-20s : %s\n", 'very important text', $text; the output of this script looks more ore less like this: very important text : hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello ... but I would like an output like this: very important text: hello hello hello hello hello hello hello hello hello hello hello hello ... How could I change my script to reach my goal?

    Read the article

  • VS2010 method comment block pretty format.

    - by camelCase
    I have just installed the lastest RC of VS2010, which for me represents a shift from VS2008. A new comment formatting feature that I was looking forward to appears to be missing. About 6 months ago I read a Scott Gu blog post that mentioned a new VS2010 feature that would format /// style method comment blocks into more readable formatted regions inline with other code. The Scott Gu blog did not provide a screen shot but I was expecting the VS2010 editor to remove the XML tags from the /// method comment block and render just the essential text comment. Was this feature pulled during the Beta, or is there an option switch urking somewhere?

    Read the article

  • CUPS causes printer to click and doesn't print

    - by Pez Cuckow
    I'm suffering a strange problem with my Cannon iP4850 when trying to use CUPS on a Raspberry Pi (this is not RPi specific, please do not vote to move it). When I plug the printer into my Laptop (OSX) or my Desktop W7 it identifies as a iP4800 and prints perfectly. So I plug it into the Pi (running debian), set it up in CUPS enable sharing and can now see the iP4800 series shared on the network. However if I print to it (using AirPrint etc...); the file gets to CUPS safely (shows in the queue) but when it tries to print the printer clicks (like a loud thunk) 3/4 times and then gives in, with a double amber flashing light. In cups it shows as job completed. Do you know why using the pi and cups would cause what appears to be a hardware fault and what I can do to fix the problem or to provide further debug info? Thanks for your time! Description: Canon iP4800 series Location: Lounge Driver: Canon PIXMA iP4800 - CUPS+Gutenprint v5.2.9 (color, 2-sided printing) Connection: usb://Canon/iP4800%20series?serial=2239B2 Note: I've tried deleting and re-adding the printer to the Laptop, Desktop and PI and the results are always the same Log for plugging in printer and printing (attempting to) something until the printer turned off again pi@pezpi /var/log $ dmesg [ 7284.176336] usb 1-1.2: new high speed USB device number 8 using dwc_otg [ 7284.279703] usb 1-1.2: New USB device found, idVendor=04a9, idProduct=10d5 [ 7284.279750] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7284.279771] usb 1-1.2: Product: iP4800 series [ 7284.279786] usb 1-1.2: Manufacturer: Canon [ 7284.279800] usb 1-1.2: SerialNumber: 2239B2 Setting cups to verbose: Change loglevel in cupsd.conf to debug (or debug2) pi@pezpi /var/log $ sudo vim /etc/cups/cupsd.conf pi@pezpi /var/log $ sudo /etc/init.d/cups restart [ ok ] Restarting Common Unix Printing System: cupsd. pi@pezpi /var/log $ Log from $ /var/log/cups/error_log is at http://pastebin.com/7VZMRMrG (too large to post here) The log contains - in order (deleted the log and then did the beneath) Restarting the cups server Attempting to print a test page x2 Printing from 192.168.1.90 via AirPrint Printing from 192.168.1.90 via Network Print Turning the printer off and on again

    Read the article

  • pretty print makefiles

    - by wickedchicken
    The linux kernel (and various other projects including git) have very nice makefiles that hide the giant cc calls into nice little acronyms. For example: gcc -O2 -o cool.o cool.c -llib gcc -O2 -o neat.o neat.c -llib would become: CC cool.c CC neat.c Which is really nice if you have a project with a large number of files and long compiler flags. I recall that this had to do with suppressing the default output and making a custom one. How do you do it?

    Read the article

  • Javascript + Pretty Print JSON

    - by FlySwat
    I'm looking for a jQuery plugin or a standalone script that will take a javascript object and create a navigatable tree like the FireBug plug in does. Does this exist, or will I need to write one? Googling hasn't found much yet.

    Read the article

  • Error in Print Function in Bubble Sort MIPS?

    - by m00nbeam360
    Sorry that this is such a long block of code, but do you see any obvious syntax errors in this? I feel like the problem is that the code isn't printing correctly since the sort and swap methods were from my textbook. Please help if you can! .data save: .word 1,2,4,2,5,6 size: .word 6 .text swap: sll $t1, $a1, 2 #shift bits by 2 add $t1, $a1, $t1 #set $t1 address to v[k] lw $t0, 0($t1) #load v[k] into t1 lw $t2, 4($t1) #load v[k+1] into t1 sw $t2, 0($t1) #swap addresses sw $t0, 4($t1) #swap addresses jr $ra #return sort: addi $sp, $sp, -20 #make enough room on the stack for five registers sw $ra, 16($sp) #save the return address on the stack sw $s3, 12($sp) #save $s3 on the stack sw $s2, 8($sp) #save Ss2 on the stack sw $s1, 4($sp) #save $s1 on the stack sw $s0, 0($sp) #save $s0 on the stack move $s2, $a0 #copy the parameter $a0 into $s2 (save $a0) move $s3, $a1 #copy the parameter $a1 into $s3 (save $a1) move $s0, $zero #start of for loop, i = 0 for1tst: slt $t0, $s0, $s3 #$t0 = 0 if $s0 S $s3 (i S n) beq $t0, $zero, exit1 #go to exit1 if $s0 S $s3 (i S n) addi $s1, $s0, -1 #j - i - 1 for2tst: slti $t0, $s1, 0 #$t0 = 1 if $s1 < 0 (j < 0) bne $t0, $zero, exit2 #$t0 = 1 if $s1 < 0 (j < 0) sll $t1, $s1, 2 #$t1 = j * 4 (shift by 2 bits) add $t2, $s2, $t1 #$t2 = v + (j*4) lw $t3, 0($t2) #$t3 = v[j] lw $t4, 4($t2) #$t4 = v[j+1] slt $t0, $t4, $t3 #$t0 = 0 if $t4 S $t3 beq $t0, $zero, exit2 #go to exit2 if $t4 S $t3 move $a0, $s2 #1st parameter of swap is v(old $a0) move $a1, $s1 #2nd parameter of swap is j jal swap #swap addi $s1, $s1, -1 j for2tst #jump to test of inner loop j print exit2: addi $s0, $s0, 1 #i = i + 1 j for1tst #jump to test of outer loop exit1: lw $s0, 0($sp) #restore $s0 from stack lw $s1, 4($sp) #resture $s1 from stack lw $s2, 8($sp) #restore $s2 from stack lw $s3, 12($sp) #restore $s3 from stack lw $ra, 16($sp) #restore $ra from stack addi $sp, $sp, 20 #restore stack pointer jr $ra #return to calling routine .data space:.asciiz " " # space to insert between numbers head: .asciiz "The sorted numbers are:\n" .text print:add $t0, $zero, $a0 # starting address of array add $t1, $zero, $a1 # initialize loop counter to array size la $a0, head # load address of print heading li $v0, 4 # specify Print String service syscall # print heading out: lw $a0, 0($t0) # load fibonacci number for syscall li $v0, 1 # specify Print Integer service syscall # print fibonacci number la $a0, space # load address of spacer for syscall li $v0, 4 # specify Print String service syscall # output string addi $t0, $t0, 4 # increment address addi $t1, $t1, -1 # decrement loop counter bgtz $t1, out # repeat if not finished jr $ra # return

    Read the article

  • Correct (pretty) window redraw during the creation

    - by Coder
    Does anyone know what is a correct way to redraw window during lengthy initialization operations? Say I have HWND with NULL brush, and it does some not so quick child window initialization (Window initialization is not so quick on Vista and 7, especially on netbooks, even with threaded app). With this config window stays black for half a second on slower laptops. But if I supply window color brush, it seems that there are some sort of child controls or something that draws black squares on top of it, which also seems ugly. Even though the controls are created without WS_VISIBLE initially. Oh, the window has the WS_EX_COMPOSITED style, which should do the double buffering to avoid flicker. But it still behaves ugly. Are there any other tricks I've forgotten, missed?

    Read the article

  • Pretty printing boost::unordered_map on gdb

    - by scooterman
    Hi all, recently I've started to use the excellent boost::unordered_map on my system, but got one drawback: I couldn't figure how to inspect its contents. Printing it on gdb gives me a table_ and a buckets_, but haven't found where are the items. Anyone has a clue about this?

    Read the article

  • How to print arguments passed to configure script?

    - by Sam
    Hi, I'm trying to print arguments passed to a ./configure script. Calling 'echo' on $BASH_ARGV will just print the last set of arguments. For example if I run: ./configure --enable-foo --enable-bar echo $BASH_ARGV will print only "--enable-bar" How do I print all the arguments? Thanks!

    Read the article

  • Pretty Pixel-level Picture Painting, Programatically

    - by dreeves
    My mac laptop has 1,024,000 pixels. What's the simplest way to turn my display completely black and go nuts with writing little programs to twiddle pixels to my heart's delight? To make it more concrete, say I wanted to implement the Chaos Game to draw a Sierpinski triangle, at the pixel level, with nothing else on the screen. What are ways to do that?

    Read the article

  • jQuery Syntax Question, pretty easy I think..

    - by Fuego DeBassi
    Hi all, question: <script type="text/javascript"> $(document).ready(function() { $(".module .caption").hide(); $(".module").hover(function() { $(this).find(".caption").slideDown(); },function() { $(this).find(".caption").slideUp(); }); }); </script> This snippet works great for my purposes, the only caveat is that I need the .module hover function to simultaneously add a class of "under" to all other ".caption"'s that are not $this, and then remove them when the hover ends. So basically I don't want the "module" that is hovered to get the class, I want it to do exactly what I am showing here...sliding .caption up and down on end hover, I just want all other ".caption"s to get the under class when any ".module" is hovered. Just hitting a dead end with what I have been trying, want to do it in the same function. Any ideas?

    Read the article

  • Needs help regarding print in asp.net (need to remove datetime from printpage)

    - by Rajesh Rolen- DotNet Developer
    i am using below code to print my content of webpage in asp.net using javascript window.print(document.getElementById('dvPrint')); when i do print, it automatically adds date time on page.. (i think because of page setup) in firefox. please tell me how can i remove this setting. i mean i dont want datetime to be printed automatically on my print page (even if its set in pagesetup).

    Read the article

  • Pretty photo ibox doesn't trigger after appending new element in HTML

    - by user1469133
    I'm trying to get prettyPhoto or some other jquery plugin to work after I append new element to the HTML page: to be specific I have this: $(document).ready(function() { $(window).scroll(function() { if($(window).scroll) { $('div#loadMoreComments').show(); $.ajax({ type : "POST", url : "getvariables.php", dataType: "json", data : { webid: $(".posts:last").attr('id') } }).done(function( msg ) { jQuery.each(msg , function(index, value){ $("#posts").append(value); }); // $("#posts").append(msg); $('div#loadmore').hide(); }); } }); }); Then I have something like this that has to trigger the popup <p><a href="#inline-1" rel="ibox">Trigger popup.</a></p> <div id="inline-1" style="display: none;"> Content to show up after the link is triggered </div> Will appreciate any help over this. Thanks.

    Read the article

  • Make var_dump look pretty

    - by tPlummer
    I have a simple $_GET[] query var set for showing testing data when pulling down queries from the DB. <?php if($_GET['test']): ?> <div id="test" style="padding: 24px; background: #fff; text-align: center;"> <table> <tr style="font-weight: bold;"><td>MLS</td></tr> <tr><td><?php echo KEY; ?></td></tr> <tr style="font-weight: bold;"><td>QUERY</td></tr> <tr><td><?php echo $data_q; ?></td></tr> <tr style="font-weight: bold;"><td>DATA</td></tr> <tr><td><?php var_dump($data); ?></td></tr> </table> </div> <?php endif; ?> When I do var_dump, as expected it's this big array string that is all smushed together. Is there a way to add in line breaks at least for this or display the var_dump in a way that's more readable? I'm open to jQuery suggestions on manipulating the string after it's posted.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >