Search Results

Search found 34813 results on 1393 pages for 'im fine'.

Page 17/1393 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Draw and move a point over an image in python

    - by frx08
    Hi all I have to do a little script in Python. In this script I have a variable (that represents a coordinate) that is continuously updated to a new value. So I have to draw a red point over a image and update the point position every time the variable that contains the coordinate is updated. I tried to explain what I need doing something like this but obviously it doesn't works: import Tkinter, Image, ImageDraw, ImageTk i=0 root = Tkinter.Tk() im = Image.open("img.jpg") root.geometry("%dx%d" % (im.size[0], im.size[1])) while True: draw = ImageDraw.Draw(im) draw.ellipse((i, 0, 10, 10), fill=(255, 0, 0)) pi = ImageTk.PhotoImage(im) label = Tkinter.Label(root, image=pi) label.place(x=0, y=0, width=im.size[0], height=im.size[1]) i+=1 del draw someone may help me please? thanks very much!

    Read the article

  • PHP - string to image only produces black background

    - by Phil Jackson
    Hi im really having a problem find how to fix this. $string = "foo"; $font = 4; $width = ImageFontWidth($font) * strlen($string); $height = ImageFontHeight($font); $im = @imagecreatetruecolor ($width,$height); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 5, 0, 0, $string, $textcolor); imagegif($im, 'somefile.gif', 8); imagedestroy($im); I cannot seem to change the background from black. Does anyone have any ideas?

    Read the article

  • ViewContext.RouteData.Values["action"] is null on server... works fine on local machine

    - by rksprst
    I'm having a weird issue where ViewContext.RouteData.Values["action"] is null on my staging server, but works fine on my dev machine (asp.net development server). The code is simple: public string CheckActiveClass(string actionName) { string text = ""; if (ViewContext.RouteData.Values["action"].ToString() == actionName) { text = "selected"; } return text; } I get the error on the ViewContext.RouteData.Values["action"] line. The error is: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Any help is appreciated. Thanks in advance.

    Read the article

  • Error about 'invalid JSON' with couchDB view but the json's fine...

    - by Chris Huang-Leaver
    I am trying to setup the following view on CouchDB { "_id":"_design/id", "_rev":"1-9be2e55e05ac368da3047841f301203d", "language":"javascript", "views":{ "by_id":{ "map" : "function(doc) { emit(doc.id, doc)}" },"from_user_id":{ "map" : "function(doc) { if (doc.from_user_id) {emit(doc.from_user_id, doc)}}"}, "from_user":{ "map" : "function(doc) { if (doc.from_user) {emit(doc.from_user, doc)}}"}, "to_user_id":{ "map" : "function(doc) {if (doc.to_user_id){ emit(doc.to_user_id, doc)}}"}, "to_user":{ "map" : "function(doc) {if (doc.to_user){ emit(doc.to_user, doc)}}" }, "max_id":{ "map" : "function(doc) { if (doc.id) {emit(doc._id, eval(doc.id))}}", "reduce" :"function(key,value) { a = value[0]; for (i=1; i <value.length; ++i){a = Math.max(a,value[i])} return a}" } } } when I try to 'PUT' this using curl: curl -X PUT -d keys.json $CDB/_design/id {"error":"bad_request","reason":"invalid UTF-8 JSON"} I know it's not invalid JSON, because I tested it using the 'json' library built into Python 2.6, it loads fine. JS screw ups give me the error 'must evaluate to a function' What else might be wrong with it?

    Read the article

  • rake jobs:work working fine. problem with script/delayed_job start.

    - by krunal shah
    I am calling function with LoadData.send_later(:test). LoadData is my class and test is my method. It's working fine while i am running rake jobs:work. But when i am running script/delayed_job start or run that time delayed_job.log shows error like TEastern Daylight Time: *** Starting job worker delayed_job host:KShah pid:5968 TEastern Daylight Time: * [Worker(delayed_job host:KShah pid:5968)] acquired lock on LoadData.load_test_data_with_delayed_job Could not load object for job: uninitialized constant LoadData TEastern Daylight Time: * [JOB] delayed_job host:KShah pid:5968 completed after 0.0310 TEastern Daylight Time: 1 jobs processed at 10.6383 j/s, 0 failed ... Any solution??

    Read the article

  • Im getting fatal errors... can anyone help me edit my program!

    - by user350217
    The errors i am getting are: Error 1 error LNK2019: unresolved external symbol "double __cdecl getDollarAmt(void)" (? getDollarAmt@@YANXZ) referenced in function _main hid.obj Error 2 fatal error LNK1120: 1 unresolved externals this is my program: #include<iostream> #include<cmath> #include<string> using namespace std; double getDollarAmt(); void displayCurrencies(); char getCurrencySelection (float amtExchanged); bool isSelectionValid(char selection); double calcExchangeAmt (float amtExchanged, char selection); void displayResults(double newAmount, float amtExchanged, char selection, char yesNo); const double russianRubles = 31.168; const double northKoreanWon = .385; const double chineseYuan = 6.832; const double canadianDollar = 1.1137; const double cubanPeso = 1.0; const double ethiopianBirr = 9.09; const double egyptianPound = 5.6275; const double tunisianDinar = 1.3585; const double thaiBaht = 34.4; /****** I changed the variables to global variables so you don't have to worry about accidentally setting them to 0 or assigning over a value that you need ********/ float amtEchanged = 0.0; char selection; char yesNo; double newAmount; int main() { float amtExchanged = 0.0; selection = 'a'; yesNo = 'y'; newAmount = 0.0; getDollarAmt (); displayCurrencies(); getCurrencySelection (amtExchanged); isSelectionValid(selection);/**** you only need to use the selection variable ****/ calcExchangeAmt (amtExchanged, selection); displayResults(newAmount, amtExchanged, selection, yesNo); return 0; } double getDollarAmt (float amtExchanged) // promt user for eachange amount and return it to main { float amtExchanged0;//created temporary variable to set amtExchanged to cout<< "Please enter the total dollar amount to exchange: "; cin>> amtExchanged0; amtExchanged = amtExchanged0;//setting amtExchanged to the right value return amtExchanged; } void displayCurrencies() // display list of currencies { cout<<"A Russian Ruble"<<endl <<"B North Korean Won"<<endl <<"C Chinese Yuan"<<endl <<"D Cuban Peso"<<endl <<"E Ethiopian Birr"<<endl <<"F Thai Baht"<<endl <<"G Canadian Dollars"<<endl <<"H Tunisian Dinar"<<endl <<"I Egyptian Pound"<<endl; } char getCurrencySelection (float amtExchanged) // make a selection and return to main { char selection0;//again, created a temporary variable for selection cout<<"Please enter your selection: "; cin>>selection0; selection = selection0;//setting the temporary variable to the actual variable you use /***** we are now going to see if isSelectionValid returns false. if it returns false, that means that their selection was not character A-H. if it is false we keep calling getCurrencySelection *****/ if(isSelectionValid(selection)==false) { cout<<"Sorry, the selection you chose is invalid."<<endl; getCurrencySelection(amtExchanged); } return selection; } bool isSelectionValid(char selection) // this fuction is supposed to be called from getCurrencySelection, the selction // must be sent to isSelectionValid to determine if its valid // if selection is valid send it bac to getCurrencySelection // if it is false then it is returned to getCurrencySelection and prompted to // make another selection until the selection is valid, then it is returned to main. { /**** i'm not sure if this is what you mean, all i am doing is making sure that their selection is A-H *****/ if(selection=='A' || selection=='B' || selection=='C' || selection=='D' || selection=='E' || selection=='F' || selection=='G' || selection=='H' || selection=='I') return true; else return false; } double calcExchangeAmt (float amtExchanged,char selection) // function calculates the amount of money to be exchanged { switch (toupper(selection)) { case 'A': newAmount =(russianRubles) * (amtExchanged); break; case 'B': newAmount = (northKoreanWon) * (amtExchanged); break; case 'C': newAmount = (chineseYuan) * (amtExchanged); break; case 'D': newAmount = (canadianDollar) * (amtExchanged); break; case 'E': newAmount = (cubanPeso) * (amtExchanged); break; case 'F': newAmount = (ethiopianBirr) * (amtExchanged); break; case 'G': newAmount = (egyptianPound) * (amtExchanged); break; case 'H': newAmount = (tunisianDinar) * (amtExchanged); break; case 'I': newAmount = (thaiBaht) * (amtExchanged); break; } return newAmount; } void displayResults(double newAmount, float amtExchanged, char selection, char yesNo) // displays results and asked to repeat. IF they want to repeat it clears the screen and starts over. { switch(toupper(selection)) { case 'A': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Russian Rubles."<<endl<<endl; break; case 'B': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" North Korean Won."<<endl<<endl; break; case 'C': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Chinese Yuan."<<endl<<endl; break; case 'D': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Cuban Pesos."<<endl<<endl; break; case 'E': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Ethiopian Birr."<<endl<<endl; break; case 'F': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Thai Baht."<<endl<<endl; break; case 'G': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Canadian Dollars."<<endl<<endl; break; case 'H': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Tunisian Dinar."<<endl<<endl; break; case 'I': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Egyptian Pound."<<endl<<endl; break; } cout<<"Do you wish to continue? (Y for Yes / N for No)"; cin>>yesNo; if(yesNo=='y' || yesNo=='Y') { getDollarAmt(); } else { system("cls"); } }

    Read the article

  • What is the best service/tool to put short audio clips on a website so users can click and listen im

    - by Edward Tanguay
    I'm making a foreign language flashcard website in which I want to have 100s of short 3-10 second audio files available for users to click and listen. So I am looking for a tool/service such as YouTube or Screenr.com but for audio which e.g.: allows me to easily upload multiple kinds of audio files: mp3, wav, etc. easy to manage them online (delete, replace) has a simple, small player (e.g. flash) that integrates nicely into any site

    Read the article

  • xmlhttp.responseText and xmlhttp.readyState works fine with localhost but if i use IP address it is

    - by hemant
    Hi All, xmlhttp.responseText and xmlhttp.readyState works fine with localhost but if i use IP address it is not returning values same as localhost. function getFilenames() { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="GetFileNames.php"; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState == 4) { StringFileName = xmlhttp.responseText; } else { StringFileName = null; } } Regards Hemant

    Read the article

  • How to assign fine grained permission on shared mailboxes?

    - by sudhirc
    Typically you can assign either Full and Sendas permissions to mailboxes using Powershell. In our organization we have a need to assign other fine grained permissions like editor, reader , author to the shared mailboxes. We are using a third party tool to achieve this. I am pretty happy with the tool except for that fact that it is a GUI only tool. I am trying to automate the entire process of shared mailbox creation by using a combination of embedded powershell in C# program. All other steps are easy to automate but because this tool is GUI only, I am really struck. Is there an API method available to to achieve this? I guess EWS API can provide some answer but I really do not know where to start.

    Read the article

  • How to send IM message like Skype in Android ?

    - by mob-king
    I have to build a feature in my application which allows user to send a skype message. For this I have installed skype lite client for Android (although offically the download has been currently withdrawn from Skype). Now how to initiate the activity from my application OR simply send the chat message without bringing it front, assuming I have skype installed in Android & also signed in already. Any help ? Thanks.

    Read the article

  • Custom http service responds fine to local IP address but NOT to localhost or 127.0.0.1

    - by Scrappydog
    I'm trying to connect to a custom http service written by another developer. The service responds fine on a local IP address and port number. Such as: http://10.1.1.1:1234 but it does NOT respond to http://localhost:1234 or http://127.0.0.1:1234 The service is a simple single function application written in VC++ that takes an http post string and returns another string. I'm trying to all it from C# using HttpWebRequest.GetResponse, but I can reproduce the same problem manually from a web browser... Test environment is Windows 2008 Server. Bottom line I'm looking for some troubleshooting tips to help the other developer fix his code.

    Read the article

  • Is there an optimal way to render images in cocoa? Im using setNeedsDisplay

    - by Edward An
    Currently, any time I manually move a UIImage (via handling the touchesMoved event) the last thing I call in that event is [self setNeedsDisplay], which effectively redraws the entire view. My images are also being animated, so every time a frame of animation changes, i have to call setNeedsDisplay. I find this to be horrific since I don't expect iphone/cocoa to be able to perform such frequent screen redraws very quickly. Is there an optimal, more efficient way that I could be doing this? Perhaps somehow telling cocoa to update only a particular region of the screen (the rect region of the image)?

    Read the article

  • im writing a spellchecking program, how do i replace ch in a string..eg..

    - by Ajay Hopkins
    what am i doing wrong/what can i do?? import sys import string def remove(file): punctuation = string.punctuation for ch in file: if len(ch) > 1: print('error - ch is larger than 1 --| {0} |--'.format(ch)) if ch in punctuation: ch = ' ' return ch else: return ch ref = (open("ref.txt","r")) test_file = (open("test.txt", "r")) dictionary = ref.read().split() file = test_file.read().lower() file = remove(file) print(file) p.s, this is in Python 3.1.2

    Read the article

  • WPF Labels look fine in XP, but are cut off at the bottom in Vista and Windows 7.

    - by juharr
    The following xaml looks fine in XP, but the bottom of the text gets cut off in Vista and Windows 7. <Grid> <Border Height="86" Margin="10,54,10,0" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="1"/> <Label Height="22" Width="100" Margin="15,43,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="White">Text Over Border</Label> </Grid> I realize that I could just increase the Height of the label, but I'm guessing I'll have problems with systems that have different resolution settings, or large text settings. Is there a better way to lay this out?

    Read the article

  • SQLBindParameter is working fine but SQLExecute gives error in Windows 2008 Server 64bit.

    - by rajugkgp
    Dear All, I am migrating my application from 32bit(Windows 2003 Server) to 64bit (Windows 2008 Server R2).I am getting the following while trying to execute a SQL command Encountered ODBC error -1: S1010, 0, [Microsoft][ODBC Driver Manager] Function sequence error . Basically internal function call is SQLExecute() function call. This works perfectly for Windows 2003 Server 32bit. I tried the command execute at the background from the command prompt and it is working. Any help or suggestion would be very much appreciated. I checked the squence of call.We have two consecutive SQLBindParameter function call and then we call SQLExecute. Is this sequence incorrect in case of 64bit? I also checked the return code given by SQLExecute which is 99. Any pointers or suggestions would be very helpful. The above sequence is working fine with 32bit Windows. Thanks in advance. -R

    Read the article

  • Cannot use fclose on output stream, input stream is fine.

    - by TeeJay
    Whenever I run my program with fclose(outputFile); at the very end, I get an error. glibc detected...corrupted double-linked list The confusing thing about this though, is that I have fclose(inputFile); directly above it and it works fine. Any suggestions? FILE* inputFile = fopen(fileName, "r"); if (inputFile == NULL) { printf("inputFile did not open correctly.\n"); exit(0); } FILE* outputFile = fopen("output.txt", "wb"); if (outputFile == NULL) { printf("outputFile did not open correctly.\n"); exit(0); } /* ... read in inputFile ... */ /* ... some fprintf's to outputFile ... */ fclose(inputFile); fclose(outputFile);

    Read the article

  • Java ME Application running fine in Emulator but crashing when deployed to N70. Any way to identify

    - by sana
    I have developed a Java ME application for CLDC platform. It works fine when executed in an emulator. But when i deploy it to my N70 phone the application doesn't start at all in the phone. In my application there are some 14 classes and am creating an instance of each and putting them in the vector on application start. The classes just have one variable and 2 methods. Can this creating of lot of instances be the reason for its crashing? Is there any way I can find out the reason why the application is not able to start in the phone?

    Read the article

  • Is there a way to access Skype IM logs?

    - by eternalmatt
    I tried looking in C:\Users[name]\AppData\Roaming\Skype and I found a folder called "chatsync" with some mysterious folders with files ending in .dat. I'm almost certain that these are the chat logs but I don't know a way to properly open these files (notepad shows gibberish mixed with English words). I'm not trying to do sleuthing, just a project for my girlfriend. So more importantly: how can I read Skype's .dat files properly?

    Read the article

  • How do you determine how coarse or fine-grained a 'responsibility' should be when using the single r

    - by Mark Rogers
    In the SRP, a 'responsibility' is usually described as 'a reason to change', so that each class (or object?) should have only one reason someone should have to go in there and change it. But if you take this to the extreme fine-grain you could say that an object adding two numbers together is a responsibility and a possible reason to change. Therefore the object should contain no other logic, because it would produce another reason for change. I'm curious if there is anyone out there that has any strategies for 'scoping', the single-responsibility principle that's slightly less objective?

    Read the article

  • im writing this code so the user would enter his/her name and followed by his/her marks to get the a

    - by WM
    What if the user wanted to enter his/her grades in the following way: Will 23, 34, 45, 45 how would i get rid of the commas public class StudentAverage { public static void main(String[] args) { int markSum = 0; double average = 0; Scanner input1 = new Scanner(System.in); System.out.print("Enter student record : "); String name = input1.next(); Scanner input2 = new Scanner(input1.nextLine()); int countTotal = 0; while (input2.hasNextInt()) { countTotal++; markSum += input2.nextInt(); } average = markSum / countTotal; // to calculate the total average System.out.print( name + " " + average ); } }

    Read the article

  • JQuery tools overlay opens at the top of page instead of overlaying in IE, works fine in FF/Chrome

    - by culov
    Here is the sandbox version of my site: http://3.latest.truxmapper.appspot.com/ To reproduce the error, hover over to the toolbar and go to Support -- FAQ. In Chrome/FF, this will work as expected. In IE, the background image will quickly move to the center of the page, but when its time to insert the div over the background image, its inserted on top of the page rather than the center of the page. The plugin example ( http://flowplayer.org/tools/overlay/apple.html ) works fine in IE, so i know it ought to be possible. I've tried messing around with the div placement on the html and with the css to no avail. Does anyone know what could be the problem? Thanks!

    Read the article

  • MySQL only returning one result. Im Baffled.

    - by Tapha
    Here is te code: <?php //Starting session session_start(); //Includes mass includes containing all the files needed to execute the full script //Also shows homepage elements without customs require_once ('includes/mass.php'); $username = $_SESSION['username']; if (isset($username)) { //Query database for the users networths $sq_l = "SELECT * FROM user"; $sql_query_worth = mysql_query($sq_l); while ($row = mysql_fetch_assoc($sql_query_worth)) { $dbusername = $row['username']; } echo $dbusername; } ?>

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >