Search Results

Search found 2199 results on 88 pages for 'printing'.

Page 61/88 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Frame Buffers wont work with pyglet.

    - by Matthew Mitchell
    I have this code: def setup_framebuffer(surface): #Create texture if not done already if surface.texture is None: create_texture(surface) #Render child to parent if surface.frame_buffer is None: surface.frame_buffer = glGenFramebuffersEXT(1) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, surface.texture, 0) glPushAttrib(GL_VIEWPORT_BIT) glViewport(0,0,surface._scale[0],surface._scale[1]) glMatrixMode(GL_PROJECTION) glLoadIdentity() #Load the projection matrix gluOrtho2D(0,surface._scale[0],0,surface._scale[1]) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) for this despite the second parameter printing as 1 for a test I did, I get: glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) I only got this after implementing pyglet. GLUT is too limited. Thank you.

    Read the article

  • FileSystemWatcher.WaitForChanged returns, but there is still a lock on the file

    - by SnOrfus
    I have a program that send a document to a pdf printer driver and that driver prints to a particular directory. After the print I want to attach the pdf to an e-mail (MailMessage) and send it off. Right now, I send the document to the printer (wich spawns a new process) and then call a FileSystemWatcher.WaitForChanged(WaitForChangedResult.Created) but when the object is created, it's still not done "printing" and the pdf printer still has a lock on it, throwing an error when I try to attach that file to an e-mail. I've considered a plain Thread.Sleep(2000) or whatever, but that's far less than ideal. I considered putting the attachment code in a try/catch block and looping on failure, but again, that's just bad news. I can't really think of an elegant solution.

    Read the article

  • RDLC: How to print multiple tables in one report

    - by Eduardo Molteni
    I'm generating the RDLC XML schema and showing the report in the ReportViewer control. No problems there. Now, I want a report with 2 tables, with 2 differents dataset. Something like this gets generated: <Body> <ReportItems> <Table Name="Table1"> .... </Table> <Table Name="Table2"> .... </Table> </ReportItems> </Body> But, when printed, both tables start from the top, printing one table over the other (not nice) Is there a way to tell that Table2 should start after Table1? Update: I've tried with List with a fake DataSource, but it does not work.

    Read the article

  • Would the MSFT Report Viewer (rdlc) Work with MVC

    - by Mike Thomas
    I am interested in learning MVC, and have experimented with a couple of the sample apps. As a project, I'd like to move part or all of my own office app to MVC. An important part of this app, and of ALL of my apps for customers, is the printing of invoices, purchase orders, inventory lists and so forth. In fact, one of their main criteria for judging what we do is the appearance of these documents and their incorporation into the app in a practical, intuitive way. It's impossible for me to get by without a report writer. The MSFT report viewer used to produce rdlc reports has been sufficient, and even comes up better than the competition in a couple of key areas. Does this control work with an ASP.NET MVC application?

    Read the article

  • Reserve RAM in C

    - by petersmith221
    Hi I need ideas on how to write a C program that reserve a specified amount of MB RAM until a key [ex. the any key] is pressed on a Linux 2.6 32 bit system. * /.eat_ram.out 200 # If free -m is execute at this time, it should report 200 MB more in the used section, than before running the program. [Any key is pressed] # Now all the reserved RAM should be released and the program exits. * It is the core functionality of the program [reserving the RAM] i do not know how to do, getting arguments from the commandline, printing [Any key is pressed] and so on is not a problem from me. Any ideas on how to do this?

    Read the article

  • Reserve RAM in C

    - by petersmith221
    Hi I need ideas on how to write a C program that reserve a specified amount of MB RAM until a key [ex. the any key] is pressed on a Linux 2.6 32 bit system. * /.eat_ram.out 200 # If free -m is execute at this time, it should report 200 MB more in the used section, than before running the program. [Any key is pressed] # Now all the reserved RAM should be released and the program exits. * It is the core functionality of the program [reserving the RAM] i do not know how to do, getting arguments from the commandline, printing [Any key is pressed] and so on is not a problem from me. Any ideas on how to do this?

    Read the article

  • "wait_fences: failed to receive reply: 10004003"?

    - by Michael
    I get this cryptic error the first time (and only the first time) my view is loaded due to the following line of code: - (void)viewWillAppear:(BOOL)animated { [textField becomeFirstResponder]; } There is a noticeable (~3 – 4 second, even on the simulator) delay due to this that makes my app feel unresponsive. Does anyone know how to fix this? I can't find any documentation on it on Apple's site, or any solutions here or on Google. Strangely, the opposite situation happens if I put the line in -viewDidAppear: instead of -viewWillAppear:; that is, instead of printing the error only the first time the keyboard is shown and never again, the error is not printed the first time but every time after. This is causing a major headache for me.

    Read the article

  • Problem with openssl_get_privatekey returning false

    - by Joe Corkery
    I am trying to generate a signed url for Amazon's CloudFront service but am running into problems in that the openssl_get_privatekey function appears to be returning false and I can't quite figure out why. Here is the code (PHP) that I am using: $priv_key = file_get_contents(path_to_my_pem_file); $priv_keyid = openssl_get_privatekey($privkey); Unfortunately, everytime I try this openssl_get_privatekey fails silently and I run into errors when I try to sign with openssl_sign later on. I've tried printing out the contents of $priv_key after it has been read in and it appears to be correct. I'm running this on RHEL 5.4 using PHP 5.2.13. I've confirmed that file pem file is readable and I've also run dos2unix on it just in case (didn't work before or after). Any thoughts would be greatly appreciated as I am relatively new to both PHP and openssl.

    Read the article

  • Javacript in html - Using single quote inside another single quote

    - by Ashish Nair
    document.getElementById("img").innerHTML="< img src='/sitepath/"+imgg+".jpg' width='72' height='44' onclick='alert('hello');' />"; The above code is my javascript. Problem is printing hello or any other string. If I just type 123 in place of hello, it does give alert. But am not able to use a string like hello there. Normally a string in an alert function is kept inside quotes ' ' but the entire content is inside double quotes and I have already used single quote at the beginning of onclick function. I tried using Escape character ("\") but it didnt help. Any suggestions?

    Read the article

  • Awk to grab colo(u)r codes from CSS files aka School me in Awk

    - by Andrew Bolster
    Nice and (hopefully) easy. I am trying to work out how to grab the variable #XXX from a text file (css file) containing strings like hr { margin: 18px 0 17px; border-color: #ccc; } h1 a:hover, h2 a:hover, h3 a:hover { color: #001100; } Which I would like to return as ccc 777 The plan then is to throw this through sort and uniq and the end up with a defining colourscheme for the page. Basically, I can't work out how to go from matching /color:#...[...]/ to just printing out the wildcarded sections.

    Read the article

  • How to copy a System.Drawing.Graphics over another Graphics?

    - by Simon T.
    We got some code that implement printing using Printdocument and it does all the drawing directly on the Graphics object received in the PrintEventArgs. It would be more convenient if the code doing the drawing used another canvas and we would add this canvas to the PrintEventArgs Graphics after. Since the code already depends on the Graphics object I need a canvas with this object. I also need a way to copy the canvas onto the PrintEventArgs Graphics. I can create a Graphicsfrom an Image but as far as I know it needs to be stored on the disk. Any suggestions?

    Read the article

  • Delphi and prevent event handling

    - by pKarelian
    How do you prevent a new event handling to start when an event handling is already running? I press a button1 and event handler start e.g. slow printing job. There are several controls in form buttons, edits, combos and I want that a new event allowed only after running handler is finnished. I have used fRunning variable to lock handler in shared event handler. Is there more clever way to handle this? procedure TFormFoo.Button_Click(Sender: TObject); begin if not fRunning then try fRunning := true; if (Sender = Button1) then // Call something slow ... if (Sender = Button2) then // Call something ... if (Sender = Button3) then // Call something ... finally fRunning := false; end; end;

    Read the article

  • Error using traits class.: "expected constructor destructor or type conversion before '&' token"

    - by Mark
    I have a traits class that's used for printing out different character types: template <typename T> class traits { public: static std::basic_ostream<T>& tout; }; template<> std::ostream& traits<char>::tout = std::cout; template<> std::wostream& traits<unsigned short>::tout = std::wcout; gcc (g++) version 3.4.5 (yes somewhat old) is throwing an error: "expected constructor destructor or type conversion before '&' token" And I'm wondering if there's a good way to resolve this. (it's also angry about _O_WTEXT so if anyone's got some insight into that, I'd also appreciate it)

    Read the article

  • String search and write into file in jython

    - by kdev
    hi Everyone , i wish to write a program that can read a file and if a particular str_to_find is found in a bigger string say AACATGCCACCTGAATTGGATGGAATTCATGCGGGACACGCGGATTACACCTATGAGCAGAAATACGGCCTGCGCGATTACCGTGGCGGTGGACGTTCTTCCGCGCGTGAAACCGCGATGCGCGTAGCGGCAGGGGCGATCGCCAAGAAATACCTGGCGGAAAAGTTCGGCATCGAAATCCGCGGCTGCCTGACCCAGATGGGCGACATTCCGCTGGAGATTAAAGACTGGCGTCAGGTTGAGCTTAATCCGTTTTC then write that line and the above line of it into the file and keep repeating it for all the match found. Please suggest i have written the program for printing that particular search line but i dont know how to write the above line. Thanks everyone for your help. import re import string file=open('C:/Users/Administrator/Desktop/input.txt','r') output=open('C:/Users/Administrator/Desktop/output.txt','w') count_record=file.readline() str_to_find='AACCATGC' while count_record: if string.find(list,str_to_find) ==0: output.write(count_record) file.close() output.close()

    Read the article

  • Can a struct become deallocated?

    - by brettr
    I've declared a struct in my header file like this: typedef struct { NSString *department; NSString *departmentId; } Department; Department currentDepartment; This struct is in a fairly simple class. I assign the struct values in viewDidLoad. Just before leaving viewDidLoad, I see the struct values are still there. After the user clicks a segment control, I reassign the struct values. Before assigning values, I see the two struct values are 0x0. I do have NSZombieEnabled, which is printing out this when I mouse over the struct while the app is running and one of my breakpoints have been hit: MyApp[25722:207] *** -[CFString _cfTypeID]: message sent to deallocated instance 0xfc0e90 I'm not creating an instance of the struct or deallocating it. How can it be getting deallocated?

    Read the article

  • Is there a stylesheet or Windows commandline tool for controllable XML formatting, specifically putt

    - by Scott Stafford
    Hi - I am searching for an XSLT or command-line tool (or C# code that can be made into a command-line tool, etc) for Windows that will do XML pretty-printing. Specifically, I want one that has the ability to put attributes one-to-a-line, something like: <Node> <ChildNode value1='5' value2='6' value3='happy' /> </Node> It doesn't have to be EXACTLY like that, but I want to use it for an XML file that has nodes with dozens of attributes and spreading them across multiple lines makes them easier to read, edit, and text-diff. NOTE: I think my preferred solution is an XSLT sheet I can pass through a C# method, though a Windows command-line tool is good too.

    Read the article

  • Bourne Script: Redirect success messages but NOT error messages

    - by sixtyfootersdude
    This command: keytool -import -file "$serverPath/$serverCer" -alias "$clientTrustedCerAlias" -keystore "$clientPath/$clientKeystore" -storepass "$serverPassword" -noprompt Will when it runs successfully outputs: Certificate was added to keystore I tried redirecting the stdard out with: keytool ... > /dev/null But it is still printing. It appears that the message is being output into standard error. Since when I do this it is not displayed: keytool ... > /dev/null 2>&1 However this is not what I am wanting to do. I would like error messages to be output normally but I do not want "success" messages to be output to the command line. Any ideas? Whatever happened to unix convention: "If it works do not output anything".

    Read the article

  • Assinging a GD reference to a new variable fails to copy

    - by Stomped
    This is a contrived example, but it illustrates my problem much more concisely then the code I'm using - and I've tested this and it exhibits the problem: $image = imagecreatefromjpeg('test.jpg'); $copy_of_image = $image; // The important bit imagedestroy($image); header('Content-type: image/jpeg'); imagejpeg($copy_of_image); Now, my expectation is that $copy_of_image is exactly that, but when I run this, it fails, printing out the URL of the script of all things. Comment out the imagedestroy() and it works just fine. a var_dump of $image provides: resource(3) of type (gd) So why can't I copy this? Apparently the assignment $copy_of_image = $image is creating a reference rather then a copy - is there a way to prevent that?

    Read the article

  • Reading inputs in java

    - by Gandalf StormCrow
    Hello everyone I'm trying to improve my Java skills by solving some problems from ACM, now the thing is my sample input looks like this : 3 100 34 100 75 250 27 2147483647 101 304 101 303 -1 -1 So at first I'm just trying to read them but its not working here is the java code: import java.io.BufferedInputStream; import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner stdin = new Scanner(new BufferedInputStream(System.in)); while (stdin.hasNext()) { System.out.println(stdin.nextInt() + " and the next " + stdin.nextInt()); } } } I'm trying to send these inputs as an argument, and not by reading them from file, here is how: The program just spins(executes) but not printing anything. How can I fix this?

    Read the article

  • Object Reference is required for non static field, method, or property

    - by JB
    using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { public class GetSchedule { public GetSchedule() { IDnumber[] IDnumbers = new IDnumber[3]; IDnumbers[0] = new IDnumber() { Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290" }; IDnumbers[1] = new IDnumber() { Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290" }; IDnumbers[2] = new IDnumber() { Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290" }; } public class IDnumber { public string Name { get; set; } public string ID { get; set; } public string year { get; set; } public string class1 { get; set; } public string class2 { get; set; } public string class3 { get; set; } public string class4 { get; set; } public static void ProcessNumber(IDnumber myNum) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDnumber.Name); myData.AppendLine(": "); myData.AppendLine(IDnumber.ID); myData.AppendLine(IDnumber.year); myData.AppendLine(IDnumber.class1); myData.AppendLine(IDnumber.class2); myData.AppendLine(IDnumber.class3); myData.AppendLine(IDnumber.class4); MessageBox.Show(myData); } public string GetDataFromNumber(string ID) { foreach (IDnumber idCandidateMatch in IDnumbers) { if (IDCandidateMatch.ID == ID) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDnumber.Name); myData.AppendLine(": "); myData.AppendLine(IDnumber.ID); myData.AppendLine(IDnumber.year); myData.AppendLine(IDnumber.class1); myData.AppendLine(IDnumber.class2); myData.AppendLine(IDnumber.class3); myData.AppendLine(IDnumber.class4); return myData; } } return ""; } } } }using System; using System.IO; using System.Data; using System.Text; using System.Drawing; using System.Data.OleDb; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing.Printing; using System.Collections.Generic; namespace Eagle_Eye_Class_Finder { public class GetSchedule { public GetSchedule() { IDnumber[] IDnumbers = new IDnumber[3]; IDnumbers[0] = new IDnumber() { Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290" }; IDnumbers[1] = new IDnumber() { Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290" }; IDnumbers[2] = new IDnumber() { Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290" }; } public class IDnumber { public string Name { get; set; } public string ID { get; set; } public string year { get; set; } public string class1 { get; set; } public string class2 { get; set; } public string class3 { get; set; } public string class4 { get; set; } public static void ProcessNumber(IDnumber myNum) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDnumber.Name); myData.AppendLine(": "); myData.AppendLine(IDnumber.ID); myData.AppendLine(IDnumber.year); myData.AppendLine(IDnumber.class1);// i get it for all of these myData.AppendLine(IDnumber.class2); myData.AppendLine(IDnumber.class3); myData.AppendLine(IDnumber.class4); MessageBox.Show(myData); } public string GetDataFromNumber(string ID) { foreach (IDnumber idCandidateMatch in IDnumbers) { if (IDCandidateMatch.ID == ID) { StringBuilder myData = new StringBuilder(); myData.AppendLine(IDnumber.Name); myData.AppendLine(": "); myData.AppendLine(IDnumber.ID); myData.AppendLine(IDnumber.year); myData.AppendLine(IDnumber.class1); myData.AppendLine(IDnumber.class2); myData.AppendLine(IDnumber.class3); myData.AppendLine(IDnumber.class4); return myData; } } return ""; } } } }

    Read the article

  • RDLC: Is there a way to print multiple tables without SubReports?

    - by Eduardo Molteni
    I'm generating the RDLC XML schema and showing the report in the ReportViewer control. No problems there. Now, I want a report with 2 tables, with 2 differents dataset. Something like this gets generated: <Body> <ReportItems> <Table Name="Table1"> .... </Table> <Table Name="Table2"> .... </Table> </ReportItems> </Body> But, when printed, both tables start from the top, printing on table over the other (not nice) Is there a way to tell that Table2 should start after Table1? Update: I've tried with List with a fake DataSource, but it does not work.

    Read the article

  • How do I get the java.concurrency.CyclicBarrier to work as expected

    - by Ritesh M Nayak
    I am writing code that will spawn two thread and then wait for them to sync up using the CyclicBarrier class. Problem is that the cyclic barrier isn't working as expected and the main thread doesnt wait for the individual threads to finish. Here's how my code looks: class mythread extends Thread{ CyclicBarrier barrier; public mythread(CyclicBarrier barrier) { this.barrier = barrier; } public void run(){ barrier.await(); } } class MainClass{ public void spawnAndWait(){ CyclicBarrier barrier = new CyclicBarrier(2); mythread thread1 = new mythread(barrier).start(); mythread thread2 = new mythread(barrier).start(); System.out.println("Should wait till both threads finish executing before printing this"); } } Any idea what I am doing wrong? Or is there a better way to write these barrier synchronization methods? Please help.

    Read the article

  • Ruby from the command line - sticking - Windows

    - by tyndall
    I have seen this behavior on Windows with Ruby for a long time. If I install a gem sometimes the command line will just get "lost" and stop printing output until you go back to the command line and hit enter a few times. I notice this in other places too. Like starting up a Ruby on Rails console. Or generating a model with Rails. Have other people seen this? What causes this? The weird thing is this doesn't happen all the time. I have never seen this with PHP, Lua, Perl or Python from the command line. I have seen this on Vista and Windows 7 (32-bit and 64-bit). This happens on multiple machines.

    Read the article

  • Why can't the JVM just make autoboxing "just work"?

    - by Pyrolistical
    Autoboxing is rather scary. While I fully understand the difference between == and .equals I can't but help have the follow bug the hell out of me: final List<Integer> foo = Arrays.asList(1, 1000); final List<Integer> bar = Arrays.asList(1, 1000); System.out.println(foo.get(0) == bar.get(0)); System.out.println(foo.get(1) == bar.get(1)); That prints true false Why did they do it this way? It something to do with cached Integers, but if that is the case why don't they just cache all Integers used by the program? Or why doesn't the JVM always auto unbox to primitive? Printing false false or true true would have been way better.

    Read the article

  • Dinamically creating a member ID card as pdf using PHP?

    - by aefxx
    I need to code a PHP script that would let me generate a pdf file which displays a member ID card (something like a credit card used to identify oneself) at a certain resolution. Let me explain: I do have the basic blueprint of the card in png file format. The script needs to drop in a member's name and birth day along with a serial. So far, no problem - there are plenty of good working PHP librarys out there. My problem is to ensure that the resulting pdf (the generated image of the card, to be precise) meets a certain resolution (preferably 300dpi), so that printing it would look right. Any ideas? EDIT I solved it using the TCPDF library which let's you scale images at a certain resolution. Get it here: http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >