Search Results

Search found 5918 results on 237 pages for 'im chc'.

Page 9/237 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Letter placement error with GD2, TTF and PHP

    - by Javier Parra
    Some time ago I made a script that takes some text and returns it as an image, and worked flawlessly. But I'm not sure since when a weird bug started to happen. The letters that have a (my apologies to the font geeks) "glyph" on the left get pushed to the right so the letter starts on it, but leaves space only for the main letter, hehe, I think an example should do it. The expected result is: The "bad" one was generated, obviously, by my script, located here: http://www.esbasura.com/images/text.php?txt=The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog.&fnt=1&size=23&bg=lightgrey And the good one was generated by dafont here: http://img.dafont.com/preview.php?text=The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog.&ttf=bleeding_cowboys0&ext=1&size=23&psize=m&y=46 I'm not doing anything fancy in the script, here is the relevant part: imagefilledrectangle($im, 0, 0, $width, $height, $$bg); imagettftext($im, $size, 0, (-1*$textsize[6]), (-1*$textsize[7]), $$color, $font, $text); // imagefttext($im, $size, 0, (-1*$textsize[6]), (-1*$textsize[7]), $$color, $font, $text); same results using imagefttext imagecolortransparent($im, $$bg); header("Cache-Control: public"); // HTTP/1.1 header("Content-type: image/png"); imagepng($im); imagedestroy($im); } I'm kind of surprised, because, as I said, it used to work flawlessly. Maybe my host changed my machine. (here's my phpinfo: http://www.work4bandwidth.com/info.php) Relevant bit: gd GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled

    Read the article

  • Join + IEqualityComparer<T> and HashCode

    - by Jesus Rodriguez
    Im writing my own LINQ reference but Im getting troubles with some of the more complicated operators implementations. There is a Join implementation that takes a IEqualityComparer Im getting just crazy. Im trying to understand it first before I write (obviously) Image this two lists: List<string> initials = new List<string> {"A", "B", "C", "D", "E"}; List<string> words = new List<string> {"Ant", "Crawl", "Pig", "Boat", "Elephant", "Arc"}; Nothing weird here. I want to join both lists by the Initial, something like: Initial=A Word=Ant Initial=A Word=Arc Initial=B Word=Boat ... I need a comparator, I wrote this: public class InitialComparator : IEqualityComparer<string> { public bool Equals(string x, string y) { return x.StartsWith(y); } public int GetHashCode(string obj) { return obj[0].GetHashCode(); } } The Join itself: var blah = initials.Join(words, initial => initial, word => word, (initial, word) => new {Initial = initial, Word = word}, new InitialComparator()); It's the first time Im using HashCodes, after a good session of debugging I see that every word go to the comparator and look at its HashCode, if another word has the same HashCode it calls equals. Since I want to compare just the initial I though that I just need the first letter Hash (Am I wrong?) The thing is that this is not working correctly. Its says that "Ant" and "Arc" are equals, Ok, its comparing every word in the same list or not, But it adds only the last word it finds, in this case Arc, ignoring Ant and Ant is equals to "A" too... If I put "Ant" and "Ant" it add both. In short, What is the way of doing something like that? I know that Im doing something wrong. Thank you.

    Read the article

  • Help in J2ME for creating image and parse it

    - by HAMED
    Can anyone tell me how i can parse a png image into many png images in J2ME??? for examole:I just wnat to have a source image 150*150 pixel and parse it to 10 image with 15*15 pixel. I write an elemantary code that have exeption. This is my code: public class HelloMIDlet extends MIDlet implements CommandListener { private boolean midletPaused = false; private Command exitCommand; private Form form; private StringItem stringItem; Image im , im2; Form form1 = null; public HelloMIDlet() { try { // create source image im = Image.createImage("/image1.JPG"); int height = im.getHeight() ; int width = im.getWidth() ; int x = 0 ; int y = 0 ; while ( y < height ){ while ( x < width ){ // create 15*15 pixel of source image im2 = im.createImage(im, x, y, 15, 15, Sprite.TRANS_NONE) ; x += 15 ; } y += 15 ; x = 0 ; } } catch (IOException ex) { ex.printStackTrace(); } } please help me to make it right....It's emergency! Thanks a lot guys...

    Read the article

  • dotnet Cologne 2011 : Anmeldung ab 14. März

    - by WeigeltRo
    Am 6.5.2011 findet in Köln die dotnet Cologne 2011 statt, eine von der .NET User Group Köln und der von mir geleiteten Gruppe Bonn-to-Code.Net gemeinsam organisierte Community-Konferenz rund um .NET. Die “dotnet Cologne” hat sich mittlerweile als die große .NET Community- Konferenz in Deutschland etabliert. So war die letztjährige dotnet Cologne 2010 mit 300 Teilnehmern bereits einen Monat im Voraus ausgebucht. Und heise online schrieb: “Inzwischen besitzt die dotnet Cologne ein weites Einzugsgebiet. Die Teilnehmer kommen nicht mehr ausschließlich aus dem Kölner Umfeld, sondern aus allen Teilen Deutschlands [...] Die gute Qualität des Vorjahres in Verbindung mit einem geringen Preis hat sich schnell herumgesprochen, sodass Teilnehmer aus Bayern oder Thüringen keine Ausnahme waren.” Auch in diesem Jahr erwartet die Teilnehmer ein ganzer Tag voll mit Themen rund um .NET. Auf der Website http://www.dotnet-cologne.de sind dazu jetzt die ersten Vorträge, Sprecher sowie Infos zur Anmeldung veröffentlicht. Die Anmeldung ist ab Montag, den 14.3.2011 um 14:00 freigeschaltet. Es empfiehlt sich, schnell zu handeln, denn für die 100 ersten Teilnehmer gilt der “Super-Early Bird” Preis von nur 25,- Euro; diese Plätze waren letztes Jahr in Nullkommanix weg. Die Teilnehmer 101 – 200 zahlen den “Early Bird” Preis von 40,- Euro, ab Platz 201 gilt der “Normalpreis” von 55,- Euro. Aber egal ob “Super-Early”, “Early” oder “Normal”: 25 Vorträge auf 5 Tracks, gehalten von bekannten Namen der .NET Community, dazu den ganzen Tag über Verpflegung und Getränke – das ist zu diesem Preis ein sehr attraktives Angebot. Wir haben damit eine Konferenz organisiert, die wir selbst gerne besuchen würden. Ganz im Sinne “von Entwicklern, für Entwickler”. Was ist neu? Das Feedback vom letzten Jahr war sehr positiv, den Leuten hat’s einfach gut gefallen. Gleichwohl haben wir Feedback-Bögen, Blog-Einträge und Tweets sehr aufmerksam ausgewertet und bei der Organisation berücksichtigt: Der neue Veranstaltungsort, das Komed im Mediapark Köln, ist zentral gelegen und verfügt über günstige Parkmöglichkeiten Die Räumlichkeiten bieten mehr Platz für Teilnehmer, Sponsoren und natürlich auch das Mittagessen Wir haben dieses Jahr einige etwas speziellere Vorträge auf Level 300 und 400 im Programm, um neben fundierten Einführungen in Themengebiete auch “Deep Dives” für Experten anbieten zu können. Längere Pausen zwischen den Vorträgen ermöglichen es den Teilnehmern besser, nach den Vorträgen mit den Sprechern verbleibende Fragen zu klären, sich an den Sponsorenständen Infos zu holen oder einfach Kontakte mit Gleichgesinnten zu knüpfen. Was das Fördern der Kommunikation unter den Teilnehmern angeht, haben wir schon die eine oder andere Idee im Kopf. Aber einiges davon hängt nicht zuletzt von finanziellen Faktoren ab – und damit sind wir schon beim Thema: Es gibt noch Sponsoring-Möglichkeiten! Die dotnet Cologne 2011 ist die Gelegenheit, Produkte vorzustellen, neue Mitarbeiter zu suchen oder generell den Namen einer Firma bei den richtigen Leuten zu platzieren. Nicht ohne Grund unterstützen uns viele Sponsoren dieses Jahr zum wiederholten Mal. Vom Software-Sponsor für die Verlosung bis hin zum Aussteller vor Ort – es gibt vielfältige Möglichkeiten und wir schicken auf Anfrage gerne unsere Sponsoreninfos zu.

    Read the article

  • News, Perspektiven und jede Menge Gesprächsstoff - Der Oracle Partner Day 2012

    - by A&C Redaktion
    Was für ein Tag! Unter dem Motto „Maximize your Potential“ kamen über 470 Teilnehmerinnen und Teilnehmer beim Oracle Partner Day 2012 zusammen. Hier drehte sich alles um unsere Partner, die, wie Silvia Kaske, Senior Director Alliances & Channel Europe North, in ihrer Begrüßung betonte, „ein sehr wichtiger Baustein in der Wachstumsstrategie von Oracle“ sind. Wie einmalig diese Partnerschaft ist, betonte auch David Callaghan, Senior Vice President EMEA Alliances & Channel in seiner Keynote. Niemand sonst habe, so Callaghan, in ähnlichem Ausmaß wie Oracle, Hardware und Software tatsächlich integriert. So manche Anbieter würden zwar beides zusammenschnüren, aber bei weitem nicht so optimal abgestimmt und verflochten, wie beim „Red Stack“ von Oracle. Neben Keynotes von Jürgen Kunz, SVP Technology Northern Europe & Country Leader Germany, und Christian Werner, Senior Director Alliances & Channels Germany, zu Neuheiten und Entwicklungspotenzialen im Oracle Universum und den Präsentationen aus verschiedenen Spezialisierung-Fachgebieten, gab es sogar einen Blick in die Zukunft der IT: Der Informatiker Professor Hermann Maurer präsentierte nicht nur existierende und geplante Innovationen, etwa die berüchtigte Computerbrille, die bald das Smartphone abzulösen soll – eine ordentliche Portion Science-Fiction war auch dabei. Im Laufe des Tages nutzten diverse Partner die Möglichkeit, vor Ort den Test als OPN Implementation Specialist beim Testcenter Pearson Vue abzulegen. Viele Teilnehmer zeigten sich beeindruckt von den vielen guten Gesprächen untereinander und schöpften die Möglichkeit zum Networking und Erfahrungsaustausch voll aus. Bei einem so dichten Programm ist es natürlich schwierig, wirklich alles mitzunehmen. Daher haben wir die Präsentationen, die auf dem Oracle Partner Day gehalten wurden, hier in der Agenda noch einmal für Sie zusammengestellt. Spannend wurde es bei der Oracle Partner Award Ceremony: Zum zweiten Mal wurden dort deutsche Partner ausgezeichnet, die sich mit besonderem Engagement und Erfolg spezialisiert haben. Wer die glücklichen Gewinner sind und was ihr Unternehmen auszeichnet, lesen sie ebenfalls hier im Blog. Allen Siegern gratulieren wir noch einmal ganz herzlich! Nachdem es im voraus schon wilde Spekulationen gab, was sich wohl hinter der „Oracle Sports Challenge“ verbergen würde, wollen wir diese Frage auch hier auflösen: Wer nach dem vielen Sitzen Lust auf Bewegung hatte, konnte sich verschiedenen, mehr oder weniger sportlichen Herausforderungen stellen. Zu meistern waren verschiedene Geschicklichkeits-Spiele, unter anderem ein fast mannshoher „Oracle Stack“, den es in Yenga-Manier aufrecht zu erhalten galt, Torschüsse auf ein Tor, das von einem vollautomatischen Robo-Keeper bewacht wurde und eine Video-Wand mit einem spielerischen Reaktionstest rund um den „Red Stack“. Den ganzen Tag über konnten die Teilnehmer hinter QR-Codes versteckte Buchstaben sammeln und mit etwas Glück und Geschick einen von drei iPod Supernanos gewinnen. Abgerundet wurde das Programm durch Auftritte der Entertainment-Saxophonistinnen „Hot Sax Club“, der beeindruckenden Fußball-Freestyler mit ihrer Ballakrobatik, dem Close-up Magier Marc Gassert und unseren DJ, der für Stimmung sorgte. Eindrücke und Highlights vom Oracle Partner Day in Frankfurt sehen Sie hier, im Best-of-Video und in unserer Fotogalerie. Lassen Sie einen gelungenen Tag noch einmal Revue passieren – oder sehen Sie, was Sie alles verpasst haben. Aber: nicht traurig sein, der nächste Oracle Partner Day kommt bestimmt!

    Read the article

  • News, Perspektiven und jede Menge Gesprächsstoff - Der Oracle Partner Day 2012

    - by A&C Redaktion
    Was für ein Tag! Unter dem Motto „Maximize your Potential“ kamen über 470 Teilnehmerinnen und Teilnehmer beim Oracle Partner Day 2012 zusammen. Hier drehte sich alles um unsere Partner, die, wie Silvia Kaske, Senior Director Alliances & Channel Europe North, in ihrer Begrüßung betonte, „ein sehr wichtiger Baustein in der Wachstumsstrategie von Oracle“ sind. Wie einmalig diese Partnerschaft ist, betonte auch David Callaghan, Senior Vice President EMEA Alliances & Channel in seiner Keynote. Niemand sonst habe, so Callaghan, in ähnlichem Ausmaß wie Oracle, Hardware und Software tatsächlich integriert. So manche Anbieter würden zwar beides zusammenschnüren, aber bei weitem nicht so optimal abgestimmt und verflochten, wie beim „Red Stack“ von Oracle. Neben Keynotes von Jürgen Kunz, SVP Technology Northern Europe & Country Leader Germany, und Christian Werner, Senior Director Alliances & Channels Germany, zu Neuheiten und Entwicklungspotenzialen im Oracle Universum und den Präsentationen aus verschiedenen Spezialisierung-Fachgebieten, gab es sogar einen Blick in die Zukunft der IT: Der Informatiker Professor Hermann Maurer präsentierte nicht nur existierende und geplante Innovationen, etwa die berüchtigte Computerbrille, die bald das Smartphone abzulösen soll – eine ordentliche Portion Science-Fiction war auch dabei. Im Laufe des Tages nutzten diverse Partner die Möglichkeit, vor Ort den Test als OPN Implementation Specialist beim Testcenter Pearson Vue abzulegen. Viele Teilnehmer zeigten sich beeindruckt von den vielen guten Gesprächen untereinander und schöpften die Möglichkeit zum Networking und Erfahrungsaustausch voll aus. Bei einem so dichten Programm ist es natürlich schwierig, wirklich alles mitzunehmen. Daher haben wir die Präsentationen, die auf dem Oracle Partner Day gehalten wurden, hier in der Agenda noch einmal für Sie zusammengestellt. Spannend wurde es bei der Oracle Partner Award Ceremony: Zum zweiten Mal wurden dort deutsche Partner ausgezeichnet, die sich mit besonderem Engagement und Erfolg spezialisiert haben. Wer die glücklichen Gewinner sind und was ihr Unternehmen auszeichnet, lesen sie ebenfalls hier im Blog. Allen Siegern gratulieren wir noch einmal ganz herzlich! Nachdem es im voraus schon wilde Spekulationen gab, was sich wohl hinter der „Oracle Sports Challenge“ verbergen würde, wollen wir diese Frage auch hier auflösen: Wer nach dem vielen Sitzen Lust auf Bewegung hatte, konnte sich verschiedenen, mehr oder weniger sportlichen Herausforderungen stellen. Zu meistern waren verschiedene Geschicklichkeits-Spiele, unter anderem ein fast mannshoher „Oracle Stack“, den es in Yenga-Manier aufrecht zu erhalten galt, Torschüsse auf ein Tor, das von einem vollautomatischen Robo-Keeper bewacht wurde und eine Video-Wand mit einem spielerischen Reaktionstest rund um den „Red Stack“. Den ganzen Tag über konnten die Teilnehmer hinter QR-Codes versteckte Buchstaben sammeln und mit etwas Glück und Geschick einen von drei iPod Supernanos gewinnen. Abgerundet wurde das Programm durch Auftritte der Entertainment-Saxophonistinnen „Hot Sax Club“, der beeindruckenden Fußball-Freestyler mit ihrer Ballakrobatik, dem Close-up Magier Marc Gassert und unseren DJ, der für Stimmung sorgte. Eindrücke und Highlights vom Oracle Partner Day in Frankfurt sehen Sie hier, im Best-of-Video und in unserer Fotogalerie. Lassen Sie einen gelungenen Tag noch einmal Revue passieren – oder sehen Sie, was Sie alles verpasst haben. Aber: nicht traurig sein, der nächste Oracle Partner Day kommt bestimmt!

    Read the article

  • How to implement a multi-part snake with smooth movement? [closed]

    - by Jamie
    Sorry that i couldnt answer on my previous post but it got closed. I couldnt answer because i had to prepair for my finals. As there were problems with understanding of what im trying to achieve, im going to describe a little bit more in depth. Im creating a game in which you steer a snake. I assume everybody knows how that works. But in my case the snake isnt just propagating in an array element by element. Imagine a 2Dgrid on which the snake moves. Its 10x10 tiles. Lets say one tile is 4x4 meters. The snakes head spawns in the middle of the (3,2) tile (beginning with (0,0)), so its position is (4*3+2,4*2+2)(the 2's are so that the snake is in the middle of the 4x4 tile). And heres where the fun begins. when the snake moves, it doesnt jump to next tile. Instead it moves a fraction of the way there. So lets say the snake is heading to tile (4,2). After it moved once, its position is (4*3+2+0.1,4*2+2), where 0.1 is the fraction of the way it moved. This is done to achieve smooth movement. So now im adding the rest of the body. The rest is supposed to move along the exact same path as the head did. I implemented it so that each part of the body has its own position and direction. Then i apply this algorithm: 1.Move each part in its direction. 2.If a part is in the middle of the tile(which implies all of them are), change each parts direction to the direction of the part proceeding it. As i said before i could make this work, but i cant stop thinking that im overlooking a much easier and cleaner solution. So this is my question. Is there any easier/better/faster way to do this?

    Read the article

  • http request to cgi python script successful, but the script doesn't seem to run

    - by chipChocolate.py
    I have configured cgi scripts for my apache2 web server. Here is what I want to do: Client uploads the image to the server. (this already works) On success, I want to execute the python script to resize the image. I tried the following and the success function does execute but my python script does not seem to execute: Javascript code that sends the request: var input = document.getElementById('imageLoader'); imageName = input.value; var file = input.files[0]; if(file != undefined){ formData= new FormData(); console.log(formData.length); if(!!file.type.match(/image.*/)){ formData.append("image", file); $.ajax({ url: "upload.php", type: "POST", processData: false, contentType: false, success: function() { var input = document.getElementById('imageLoader'); imageName = input.value; var file = input.files[0]; formData = new FormData(); formData.append("filename", file); $.ajax({ url: "http://localhost/Main/cgi-bin/resize.py", type: "POST", data: formData, processData: false, contentType: false, success: function(data) { console.log(data); } }); // code continues... resize.py: #!/usr/bin/python import cgi import cgitb import Image cgitb.enable() data = cgi.FieldStorage() filename = data.getvalue("filename") im = Image.open("../JS/upload/" + filename) (width, height) = im.size maxWidth = 600 maxHeight = 400 if width > maxWidth: d = float(width) / maxWidth height = int(height / d) width = maxWidth if height > maxHeight: d = float(height) / maxHeight width = int(width / d) height = maxHeight size = (width, height) im = im.resize(size, Image.ANTIALIAS) im.save("../JS/upload/" + filename, quality=100) This is the apache2.conf: <Directory /var/www/html/Main/cgi-bin> AllowOverride None Options +ExecCGI SetHandler cgi-script AddHandler cgi-script .py .cgi Order allow,deny Allow from all </Directory> cgi-bin and python script file permissions: drwxrwxr-x 2 mou mou 4096 Aug 24 03:28 cgi-bin -rwxrwxrwx 1 mou mou 1673 Aug 24 03:28 resize.py Edit: Executing this code $.ajax({ url: "http://localhost/Main/cgi-bin/resize.py", type: "POST", data: formData, // formData = {"filename" : "the filename which was saved in a variable whie the image was uploaded"} processData: false, contentType: false, success: function(data) { alert(data); } }); it alerts the following: <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> --> </font> </font> </font> </script> </object> </blockquote> </pre> </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#6622aa"> <td valign=bottom>&nbsp;<br> <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>&lt;type 'exceptions.TypeError'&gt;</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial">Python 2.7.6: /usr/bin/python<br>Sun Aug 24 17:24:15 2014</font></td></tr></table> <p>A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.</p> <table width="100%" cellspacing=0 cellpadding=0 border=0> <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///var/www/html/Main/cgi-bin/resize.py">/var/www/html/Main/cgi-bin/resize.py</a> in <strong><module></strong>()</td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;10</small>&nbsp;<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;filename&nbsp;=&nbsp;data.getvalue("filename")<br> </tt></font></td></tr> <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;im&nbsp;=&nbsp;Image.open("../JS/upload/"&nbsp;+&nbsp;filename)<br> </tt></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;(width,&nbsp;height)&nbsp;=&nbsp;im.size<br> </tt></font></td></tr> <tr><td><small><font color="#909090">im <em>undefined</em>, <strong>Image</strong>&nbsp;= &lt;module 'Image' from '/usr/lib/python2.7/dist-packages/PILcompat/Image.pyc'&gt;, Image.<strong>open</strong>&nbsp;= &lt;function open&gt;, <strong>filename</strong>&nbsp;= '<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\x07\x07\x06\x08\n\x10\n\n\t\t\n\x14\x0e</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>'</font></small></td></tr></table> <table width="100%" cellspacing=0 cellpadding=0 border=0> <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///usr/lib/python2.7/dist-packages/PIL/Image.py">/usr/lib/python2.7/dist-packages/PIL/Image.py</a> in <strong>open</strong>(fp='../JS/upload/<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>', mode='r')</td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1994</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;isPath(fp):<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1995</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;=&nbsp;fp<br> </tt></font></td></tr> <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;1996</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fp&nbsp;=&nbsp;builtins.open(fp,&nbsp;"rb")<br> </tt></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1997</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1998</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;=&nbsp;""<br> </tt></font></td></tr> <tr><td><small><font color="#909090"><strong>fp</strong>&nbsp;= '../JS/upload/<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>', <em>global</em> <strong>builtins</strong>&nbsp;= &lt;module '__builtin__' (built-in)&gt;, builtins.<strong>open</strong>&nbsp;= &lt;built-in function open&gt;</font></small></td></tr></table><p><strong>&lt;type 'exceptions.TypeError'&gt;</strong>: file() argument 1 must be encoded string without NULL bytes, not str <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;= ('file() argument 1 must be encoded string without NULL bytes, not str',) <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>message&nbsp;= 'file() argument 1 must be encoded string without NULL bytes, not str' <!-- The above is a description of an error in a Python program, formatted for a Web browser because the 'cgitb' module was enabled. In case you are not reading this in a Web browser, here is the original traceback: Traceback (most recent call last): File "/var/www/html/Main/cgi-bin/resize.py", line 12, in &lt;module&gt; im = Image.open("../JS/upload/" + filename) File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1996, in open fp = builtins.open(fp, "rb") TypeError: file() argument 1 must be encoded string without NULL bytes, not str --> Does this mean that the formData I am sending over is empty?

    Read the article

  • ProgressDialog does not display until after AsyncTask completes

    - by tedwards
    I am trying to display an indefinite ProgressDialog, while an AsyncTask binds to a RemoteService. The RemoteService builds a list of the users contacts when the service is first created. For a long list of contacts this may take 5~10 seconds. The problem I am having, is that the ProgressDialog does not display until after the RemoteService has built it's list of contacts. I even tried putting a Thread.sleep in to give the ProgressDialog time to show up. With the sleep statement the ProgressDialog loads and starts spinning, but then locks up as soon as the RemoteService starts doing it's work. If I just turn the AsyncTask into dummy code, and just let it sleep for a while, everything works fine. But when the task has to do actual work, it is like the UI just sits and waits. Any ideas on what Im doing wrong ? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(IM,"Start Me UP!!"); setContentView(R.layout.main); Log.d(IM, "Building List View for Contacts"); restoreMe(); if (myContacts==null){ myContacts = new ArrayList<Contact>(); this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); new BindAsync().execute(); } else{ this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); } } private class BindAsync extends AsyncTask<Void, Void, RemoteServiceConnection>{ @Override protected void onPreExecute(){ super.onPreExecute(); Log.d(IM,"Showing Dialog"); showDialog(DIALOG_CONTACTS); } @Override protected RemoteServiceConnection doInBackground(Void... v) { Log.d(IM,"Binding to service in BindAsync"); try{ Thread.sleep(2000); } catch (InterruptedException e){ } RemoteServiceConnection myCon; myCon = new RemoteServiceConnection(); Intent i = new Intent(imandroid.this,MyRemoteService.class); bindService(i, myCon, Context.BIND_AUTO_CREATE); startService(i); Log.d(IM,"Bound to remote service"); return myCon; } @Override protected void onPostExecute(RemoteServiceConnection newConn){ super.onPostExecute(newConn); Log.d(IM,"Storing remote connection"); conn=newConn; } };

    Read the article

  • CD/DVD WRITER I/O ERROR !!!

    - by bobby
    http://www.mediafire.com/imageview.php?quickkey=jqzdbd5n0nl i am getting the above error wen i am trying to burn a cd/dvd on my dvd writer. im am getting dis error for evry cd/dvd..!! i hv included a screenshot.above. i dnt knw whether it a problem wit my dvd writer...!! im unable to write any dvds/cds im using imgburn burning software.

    Read the article

  • How does one calculate voltages for overclocking?

    - by TardisGuy
    So, all I know is voltage and clock have something to do with each other. Unstable if too low voltage Too high voltage, and too much heat. or higher voltage + lower clock may heat less than that voltage at higher clock. The reason why im asking is because if I can learn how the power vs speed works, Then i might be able to project some kind of thermal curve to find out where my perfect overclock might be (without 50 burn-ins) But, as is apparent im sure. I have no idea what im talking about. If anyone can help me learn more about this; throw me a page, a macro, whathaveyou I will bow before your awesomeness and... Mail you a phantom hand written thank you letter. Some clarification Rev 1 What im trying to learn: is how much power a cpu is using with measurements (Core Voltage) vs (Clock speed) - It would answer the question: Would a 1.4v core @ 4.0Ghz use as much power as a 1.4v core @ 3.0Ghz?

    Read the article

  • Which web services should be integrated?

    - by Adam Matan
    Mail + Social networking? One identity for all sites? Integration between all social networks and IM services? Which web services should be integrated in the future, and why? Edit: Clarification: By "integrating", I mean that two or more services should be seamlessly connected, and that connection would benefit the user. Foe example, I would really like to have an IM application that would support many accounts on many IM providers (And IMHO, Pidgin's not ready yet).

    Read the article

  • HELP! Any ideas? Im creating a new site using the below script embedded in my swf. But I keep getti

    - by Suzanne
    package com.flashden { import flash.display.MovieClip; import flash.text.*; import flash.events.MouseEvent; import flash.events.*; import flash.net.URLRequest; import flash.display.Loader; public class MenuItem extends MovieClip { private var scope; public var closedX; :Number public static const OPEN_MENU = "openMenu"; public function MenuItem(scope) { // set scope to talk back to -------------------------------// this.scope = scope; // disable all items not to be clickable -------------------// txt_label.mouseEnabled = false; menuItemShine.mouseEnabled = false; menuItemArrow.mouseEnabled = false; // make background clip the item to be clicked (button) ----// menuItemBG.buttonMode = true; // add click event listener to the header background -------// menuItemBG.addEventListener(MouseEvent.CLICK, clickHandler); } private function clickHandler (e:MouseEvent) { scope.openMenuItem(this); } public function loadContent (contentURL:String) { var loader:Loader = new Loader(); configureListeners(loader.contentLoaderInfo); var request:URLRequest = new URLRequest(contentURL); loader.load(request); // place x position of content at the bottom of the header so the top is not cut off ----// loader.x = 30; // we add the content at level 1, because the background clip is at level 0 ----// addChildAt(loader, 1); } private function configureListeners(dispatcher:IEventDispatcher):void { dispatcher.addEventListener(Event.COMPLETE, completeHandler); dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); dispatcher.addEventListener(Event.INIT, initHandler); dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); dispatcher.addEventListener(Event.OPEN, openHandler); dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler); dispatcher.addEventListener(Event.UNLOAD, unLoadHandler); } private function completeHandler(event:Event):void { //trace("completeHandler: " + event); // remove loader animation ----------------// removeChild(getChildByName("mc_preloader")); } private function httpStatusHandler(event:HTTPStatusEvent):void { // trace("httpStatusHandler: " + event); } private function initHandler(event:Event):void { //trace("initHandler: " + event); } private function ioErrorHandler(event:IOErrorEvent):void { //trace("ioErrorHandler: " + event); } private function openHandler(event:Event):void { //trace("openHandler: " + event); } private function progressHandler(event:ProgressEvent):void { //trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal); } private function unLoadHandler(event:Event):void { //trace("unLoadHandler: " + event); } } }

    Read the article

  • How to config mysql-server for heavy load

    - by Rasmus
    Im in the process of setting up a new database server. I have been running a few mysql database servers before and it has been working okay. But i would like to hear the recommended setup for my server. For example, what should i set the max connection, query_cache_size, table_cache and so on. I have arround 4-600 per second: Open tables: 112 Queries per second avg: 430.386. The server i am setting it up on have the following configuration: Linux version 2.6.32-5-amd64 (Debian 2.6.32-41squeeze2) 2x Intel Xeon X3440 @ 2.53GHz 4GB Ram /, /boot, /tmp etc on Software RAID1, 2x 7200RPM SATA Data location on Software RAID0, 2x7200RPM SATA Im am going to place the mysql databases on the RAID0. Am im missing anything? Let me know! Thanks in advance, im looking forward to hearing from you :-) /Rasmus

    Read the article

  • Computer experiencing slowdowns and lockups despite low cpu useage

    - by user157145
    my setup i5-2300 nvidia gtx 550 ti 6 gigs ram 600 w ocz modular psu recently reformatted and already experiencing drastic slowdown as soon as windows comes up, including repeated lockups with multiple various programs reporting that they are not responsive, then recovering after 10-30 seconds. ive checked memory and hard drive both of which come out fine. despite my plethura of worthless antiviral software im forced to assume that my illicit downloading practices have lead me into some comp trouble that i cant seem to determine. i have used ccleaner, search and destroy and malware bytes, all of which have found nothing to indicate what is causing this massive slowdown. in addition according to my resource manager my computer is operating at a load of only 30-50 percent CPU useage and 60 ram useage but taking 5-10 seconds to load files and open folders, and repeated lockups of multiple programs, especially firefox which seems to go unresponsive every 2-3 minutes. any help would be appreciated, i used a program called OTL by old timer, but cant make any sense of the results i was given. any help or suggestions would be appreciated, thank you for taking the time to read this i have avast but it didnt even find anything when i had it do a full system scan, so im thinking its clueless(also nortons, avg, and ad-aware). i also have mse but it has yet to complete a full scan it takes so long (i left it on last night but when i woke up my computer had a problem and had to restart). my hard drive has 300 gigs out of 1tb open and i already used hd tune pro, which said my harddrive was fine and its not a ssd. also im a noob at comps and only have the hd that is currently inside the computer in addition im not sure if studdering is the issue im suffering. my problem is that during my typing of these responses firefox has gone "not responsive" at least 5 times, each for times of about 5-10 seconds. when i try to control alt delete to bring up windows task manager it took 20 seconds. essentially its that my computer goes super slow at bringing up anything, or taking any action whatsoever that opens a program or file and has repeated incidents where i cant even click on whatever im trying to do because it locks up. the confusing thing about these incidents is that its right after restarting where there are minimal programs running and the computer and memory load is light.

    Read the article

  • Server 2003 PDC DNS not working..Failover server is...

    - by Seth
    In the midst of trying to utilize proc power, i create a fault tolerant DNS server a while ago. Since, Ive been trying to add another controller for exchange. So I thought I would revert back to a single primary DNS for the meantime and now Im balancing on a thread. The server i thought I uninstalled DNS, is still acting as DNS. And now the PDC does not resolve. Can anybody walk me through, Im overwhelmed and cant think straight... Im afraid if anyone restarts their machine they wont have internet. Update Ok so from the beginning. I was configuring Exchange on a new server 2008. How it happened I dont know, but it started to not resolve DNS. (exclamation mark on NIC) even though everything was static. So ultimately I decided to remove the server from the problem, because I noticed DNS was in disarray if I used the DNS IP of the first server. This is when I tested with nslookup on each DNS server. I had uninstalled DNS from the second server, but nslookup was still resolving with that IPaddress, which has me all wound up cause I dont understand. So, since the first DNS server isn't resolving, Im assuming if the second one isnt configured right I'll loose internet. Im just confused and dont know where to start troubleshooting...

    Read the article

  • How to see whats taking up space on your hard drive

    - by sam
    Im thinking of switching to one of the macbook pro retinas with a 256gb ssd, im making the move from a 512gb hd, which at the moment is split into a 60bg windows partition (which i dont think im going to have on my new machine) and a 440gb main partition of the main partition ive got 140gb free. So all in if i disregard the 60gb windows part ive got about 200gb free so im using 300gb, which is still a bit to much, ive had this machine 4/5 yrs so its likely to be clogged with files that i no longer need, is there a tool that i can use to view my current hd and see whats taking up the most room, so i can begin to see where i can cut down ? just for a bit of background my current machine runs osx.

    Read the article

  • Raid on ICH9R chip set

    - by user500982
    Hi Im looking at buyign this MB: http://www.supermicro.com/products/motherboard/ATOM/ICH9/X7SPE-HF-D525.cfm Im wondering though if the chipset will support the raid configuration I need. Im looking to configure the following arrays: raid array 1: 2 2TB Disks in Raid 0 raid array 2: 2 2TB Disks in Raid 0 raid array 3 (not actualy an array): 1 300GB Disk not in raid, to be used for OS and boot. So in total there would be 5 drives and the board supports 6. so im good when it comes to connections. However I have herd some chip sets only support one raid array (volume). so either all drives are individual, or are in the array. I must have 2 sperate raid arrays independent of each other, and a 5th drive not in any array. Anybody know if this setup will work? Thanks, -Stewart

    Read the article

  • Lustre - is this bad form?

    - by ethrbunny
    Im going to be consolidating several 'server rooms' into a single installation soon. Part of this effort will be finding a home for 5Tb (and growing) of files / logs. To this end Im looking at Lustre and appreciating its ability to scale. The big vendors want to sell me a $20K SAN to manage this but Im wondering about buying several iSCSI units (like this http://www.asacomputers.com/3U-iSCSI-Solution.html) and using VMs for the OSS machines. This would let me fail-over to cover problems and not require a dedicated system for each OSS. Given articles like this (http://h30565.www3.hp.com/t5/Feature-Articles/RAID-Is-Dead-Long-Live-RAID/ba-p/1422) that talk about how RAID is not keeping up with drive density Im leaning towards more disks with lower capacity each. Again - some akin to the iSCSI array above. Tell me why this is a terrible idea. Do I really need to invest in a PE710 for each OSS/OST?

    Read the article

  • does leaving the laptop cord in break the cord?

    - by firedrake
    i recently got a new cord for my laptop because the cord i had before broke.im not sure how it got messed up, but one moment it charged my laptop and the next moment it didn't. i then got a new cord. the new cord worked perfectly fine until now, and it has only been a month. the cord wont work unless i am pressing it into the socket, which i am currently doing. the only thing i can find in common with the cords is that i leave them plugged in 24/7. my brother says that is the problem, but i do not think it is.any tips or hints? im going to use duct tape to keep the pressure on the cord till i can find a better solution(im also thinking it could be the hole i plug it into on the back of my computer, but im focusing on the other idea for now.if i wiggle the plug part in the socket of my computer it will stop charging unless im pressing it in or to the side) any help or ideas are appreciated. not sure if this will help but i use a gateway with windows vista. thanks

    Read the article

  • Make file Linking issue Undefined symbols for architecture x86_64

    - by user1035839
    I am working on getting a few files to link together using my make file and c++ and am getting the following error when running make. g++ -bind_at_load `pkg-config --cflags opencv` -c -o compute_gist.o compute_gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o gist.o gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o standalone_image.o standalone_image.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o IplImageConverter.o IplImageConverter.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o GistCalculator.o GistCalculator.cpp g++ -bind_at_load `pkg-config --cflags opencv` `pkg-config --libs opencv` compute_gist.o gist.o standalone_image.o IplImageConverter.o GistCalculator.o -o rungist Undefined symbols for architecture x86_64: "color_gist_scaletab(color_image_t*, int, int, int const*)", referenced from: _main in compute_gist.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [rungist] Error 1 My makefile is as follows (Note, I don't need opencv bindings yet, but will be coding in opencv later. CXX = g++ CXXFLAGS = -bind_at_load `pkg-config --cflags opencv` LFLAGS = `pkg-config --libs opencv` SRC = \ compute_gist.cpp \ gist.cpp \ standalone_image.cpp \ IplImageConverter.cpp \ GistCalculator.cpp OBJS = $(SRC:.cpp=.o) rungist: $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $@ all: rungist clean: rm -rf $(OBJS) rungist The method header is located in gist.h float *color_gist_scaletab(color_image_t *src, int nblocks, int n_scale, const int *n_orientations); And the method is defined in gist.cpp float *color_gist_scaletab(color_image_t *src, int w, int n_scale, const int *n_orientation) { And finally the compute_gist.cpp (main file) #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gist.h" static color_image_t *load_ppm(const char *fname) { FILE *f=fopen(fname,"r"); if(!f) { perror("could not open infile"); exit(1); } int width,height,maxval; if(fscanf(f,"P6 %d %d %d",&width,&height,&maxval)!=3 || maxval!=255) { fprintf(stderr,"Error: input not a raw PPM with maxval 255\n"); exit(1); } fgetc(f); /* eat the newline */ color_image_t *im=color_image_new(width,height); int i; for(i=0;i<width*height;i++) { im->c1[i]=fgetc(f); im->c2[i]=fgetc(f); im->c3[i]=fgetc(f); } fclose(f); return im; } static void usage(void) { fprintf(stderr,"compute_gist options... [infilename]\n" "infile is a PPM raw file\n" "options:\n" "[-nblocks nb] use a grid of nb*nb cells (default 4)\n" "[-orientationsPerScale o_1,..,o_n] use n scales and compute o_i orientations for scale i\n" ); exit(1); } int main(int argc,char **args) { const char *infilename="/dev/stdin"; int nblocks=4; int n_scale=3; int orientations_per_scale[50]={8,8,4}; while(*++args) { const char *a=*args; if(!strcmp(a,"-h")) usage(); else if(!strcmp(a,"-nblocks")) { if(!sscanf(*++args,"%d",&nblocks)) { fprintf(stderr,"could not parse %s argument",a); usage(); } } else if(!strcmp(a,"-orientationsPerScale")) { char *c; n_scale=0; for(c=strtok(*++args,",");c;c=strtok(NULL,",")) { if(!sscanf(c,"%d",&orientations_per_scale[n_scale++])) { fprintf(stderr,"could not parse %s argument",a); usage(); } } } else { infilename=a; } } color_image_t *im=load_ppm(infilename); //Here's the method call -> :( float *desc=color_gist_scaletab(im,nblocks,n_scale,orientations_per_scale); int i; int descsize=0; //compute descriptor size for(i=0;i<n_scale;i++) descsize+=nblocks*nblocks*orientations_per_scale[i]; descsize*=3; // color //print descriptor for(i=0;i<descsize;i++) printf("%.4f ",desc[i]); printf("\n"); free(desc); color_image_delete(im); return 0; } Any help would be greatly appreciated. I hope this is enough info. Let me know if I need to add more.

    Read the article

  • apache httpd cannot browse through browser

    - by nuttynibbles
    i've setup apache and php on a virtual machine. everything works fine in the virtual machine. im able to execute php files and run up phpmyadmin connecting to mysql. on my host machine, im able ping and ssh into the remote machines. however, im unable to browse the php files on the host browser using the ip address. in my httpd.conf, im listening to port 80. i enabled the ServerName 192.168.75.102:80 am i missing some settings? port settings maybe?

    Read the article

  • "Cannot allocate memory " error whle copying data from window to ubuntu

    - by John
    I have Ubuntu 9.10 installed inside VM of server 2008. WHen i try to copy the data from the network and paste insid ethe Ubuntu it says error called "Cannot allocate memory " I have 3GB RAM attached to the Ubuntu I tried above suggestion but still im unbale to copy file from my host machine i.e. Windows XP to my Ubuntu machine ( which is at Virtual Machine) Im trying to copy jdk-1_5_0_22-linux-i586.bin file whose size is 47.4 MB Is there any other work around for this problem???? I tried Set the following registry key to ’1': HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache and set the following registry key to ’3': HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size but still im unbale to copy file from my host machine i.e. Windows XP to my Ubuntu machine ( which is at Virtual Machine) Im trying to copy jdk-1_5_0_22-linux-i586.bin file whose size is 47.4 MB Is there any other work around for this problem????

    Read the article

  • Shares Not working

    - by Crash893
    I'm running a ms server 2012 box acting as a file server, I've set up 4 shares (IT SECURITY PUBLIC HR) to start out with each share has its corresponding group as full permissions to the folder however when I access the server \server\it it says i don't have permissions. Public has NTLM AUTH as its full read/write and i can't even get into that Clearly im doing something wrong but im very new to windows server and im not sure how to start trouble shooting.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >