Search Results

Search found 63131 results on 2526 pages for 'error message'.

Page 128/2526 | < Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >

  • Can't send flash message from Model method

    - by Andy
    Hello, I'm trying to prevent a record that has a relationship to another record from being deleted. I can stop the deletion but not send a flash message as I had hoped! class Purchaseitem < ActiveRecord::Base before_destroy :check_if_ingredient ... def check_if_ingredient i = Ingredient.find(:all, :conditions => "purchaseitem_id = #{self.id}") if i.length > 0 self.errors.add(:name) flash.now[:notice] = "#{self.name} is in use as an ingredient and cannot be deleted" return false end end This will prevent a the delete wihthout the flash line, and when I add it I get: undefined local variable or method `flash' for # Any help would be much appreciated!

    Read the article

  • problem in custom error message on zend_element

    - by user1400
    hello all i created a text element like following code $test = $this->createElement('text', 'test'); $test->setLabel('test:'); $test->addValidator(new Zend_Validate_Int()); $test->addErrorMessages(array('isEmpty'=>'u should enter a number','%value% is not integer')); $shomare->setRequired(true); $this->addElement($test); when i set empty or non integer number to textbox , it show both its own error message , if its empty errormessage="u should enter a number" and when it is not a valid integer it shows '%value% is not integer' thanks

    Read the article

  • OpenSSL in C++ email client - server closes connection with TLSv1 Alert message

    - by mice
    My app connects to a IMAP email server. One client configured his server to reject SSLv2 certificates, and now my app fails to connect to the server. All other email clients connect to this server successfully. My app uses openssl. I debugged by creating minimal openssl client and attempt to connect to the server. Below is the code with connects to the mail server (using Windows sockets, but same problem is with unix sockets). Server sends its initial IMAP greeting message, but after client sends 1st command, server closes connection. In Wireshark, I see that after sending command to server, it returns TLSv1 error message 21 (Encrypted Alert) and connection is gone. I'm looking for proper setup of OpenSSL for this connection to succeed. Thanks #include <stdio.h> #include <memory.h> #include <errno.h> #include <sys/types.h> #include <winsock2.h> #include <openssl/crypto.h> #include <openssl/x509.h> #include <openssl/pem.h> #include <openssl/ssl.h> #include <openssl/err.h> #define CHK_NULL(x) if((x)==NULL) exit(1) #define CHK_ERR(err,s) if((err)==-1) { perror(s); exit(1); } #define CHK_SSL(err) if((err)==-1) { ERR_print_errors_fp(stderr); exit(2); } SSL *ssl; char buf[4096]; void write(const char *s){ int err = SSL_write(ssl, s, strlen(s)); printf("> %s\n", s); CHK_SSL(err); } void read(){ int n = SSL_read(ssl, buf, sizeof(buf) - 1); CHK_SSL(n); if(n==0){ printf("Finished\n"); exit(1); } buf[n] = 0; printf("%s\n", buf); } void main(){ int err=0; SSLeay_add_ssl_algorithms(); SSL_METHOD *meth = SSLv23_client_method(); SSL_load_error_strings(); SSL_CTX *ctx = SSL_CTX_new(meth); CHK_NULL(ctx); WSADATA data; WSAStartup(0x202, &data); int sd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); CHK_ERR(sd, "socket"); struct sockaddr_in sa; memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_addr.s_addr = inet_addr("195.137.27.14"); sa.sin_port = htons(993); err = connect(sd,(struct sockaddr*) &sa, sizeof(sa)); CHK_ERR(err, "connect"); /* ----------------------------------------------- */ /* Now we have TCP connection. Start SSL negotiation. */ ssl = SSL_new(ctx); CHK_NULL(ssl); SSL_set_fd(ssl, sd); err = SSL_connect(ssl); CHK_SSL(err); // Following two steps are optional and not required for data exchange to be successful. /* printf("SSL connection using %s\n", SSL_get_cipher(ssl)); X509 *server_cert = SSL_get_peer_certificate(ssl); CHK_NULL(server_cert); printf("Server certificate:\n"); char *str = X509_NAME_oneline(X509_get_subject_name(server_cert),0,0); CHK_NULL(str); printf(" subject: %s\n", str); OPENSSL_free(str); str = X509_NAME_oneline(X509_get_issuer_name (server_cert),0,0); CHK_NULL(str); printf(" issuer: %s\n", str); OPENSSL_free(str); // We could do all sorts of certificate verification stuff here before deallocating the certificate. X509_free(server_cert); */ printf("\n\n"); read(); // get initial IMAP greeting write("1 CAPABILITY\r\n"); // send 1st command read(); // get reply to cmd; server closes connection here write("2 LOGIN a b\r\n"); read(); SSL_shutdown(ssl); closesocket(sd); SSL_free(ssl); SSL_CTX_free(ctx); }

    Read the article

  • Displaying message if no photo present...

    - by bgadoci
    I am using the code: <%= image_tag site.photo.url(:small) if site.photo.file? %> to tell my app to display nothing if there is no photo associated with a particular post (site in this case). Is there a way to render a message along w/ this. For instance "no image with the post". I tried simply doing <%= if site.photo.file? %> <p> no image with this site </p> <% end %> But that doesn't seem to work. New to ruby and rails if you can't tell.

    Read the article

  • Need help with displaying the message correctly in the pole display always starting at the beginning

    - by SA
    Hi, I am using an HP RS232 pole display with the following setting: Char type: USA/Europe (default) Command mode: EPSON (default) Baud rate: 9600, n , 8, 1 (default?) Passthru None (Default) Here's the code using System.IO.Ports; private SerialPort port; port = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One); port.Handshake = Handshake.None; Port.WriteLine("Welocome to something something"); It has 2 lines consisting of 20 characters each with a total of 40 characters. I have no control how and where the characters get displayed. I would like it to always begin on line 1 position 1 but as I said earlier how would I be able to do that. The same program if I run again and again it moves a character to the left. I have set it to accept ASCII char set and so I am able to type as is visble in the Writeline message

    Read the article

  • What is Java Message Service (JMS) for?

    - by Daniel
    I am currently evaluating JMS and I don't get what I could use it for. Currently, I believe this would be a Usecase: I want to create a SalesInvoice PDF and print it when an SalesOrder leaves the Warehouse, so during the Delivery transaction I could send a transactional print request which just begins when the SalesOrder transaction completes successfully. Now I found out most JMS products are standalone server. Why would a need a Standalone Server for Message Processing, vs. e.g. some simple inproc processing with Quartz scheduler? How does it interact with my application? Isn't it much too slow? What are Usecases you already implemented successfully?

    Read the article

  • problem in add custom error message in zend_element

    - by user1400
    hello all i created a text element like following code $test = $this->createElement('text', 'test'); $test->setLabel('test:'); $test->addValidator(new Zend_Validate_Int()); $test->addErrorMessages(array('isEmpty'=>'u should enter a number','%value% is not integer')); $shomare->setRequired(true); $this->addElement($test); when i set empty or non integer number to textbox , it show both its own error message , if its empty errormessage="u should enter a number" and when it is not a valid integer it shows '%value% is not integer' thanks

    Read the article

  • Determine if e-mail message can be successfully sent

    - by Felipe Lima
    Hello Everyone, I am working in a mailing application in C# and, basically, I need to be able to determine which recipients successfully received the message, which ones did not, no matter what was the failure reason. In summary, I need an exception to be thrown whenever the email address does not exist, for example. However, SmtpClient.Send does not throw an exception in this case, so I'd need to monitor the delivery failure replies and parse them, maybe. I know this is not a simple task, so I'd ask you experts some tips on how to handle the main issues with email sending. Thanks in advance!!

    Read the article

  • Reading in a file - Warning Message in R

    - by Sheila
    I have a file that has 22268 rows BY 2521 columns. When I try to read in the file using this line of code: file <- read.table(textfile, skip=2, header=TRUE, sep="\t", fill=TRUE, blank.lines.skip=FALSE) I get the following error: Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : number of items read is not a multiple of the number of columns I also used this command to see what rows had an incorrect number of columns: x <-count.fields("train.gct", sep="\t", skip=2) which(x != 2521) and got back a list of about 20 rows that were incorrect. Is there a way to fill these rows with NA values? I thought that is what the "fill" parameter does in the read.table function, but it doesn't appear so. Any help would be greatly appreciated. Thank you.

    Read the article

  • change svn message editor

    - by Scott
    So my co-worker felt it necessary to go onto my development box and do some code changes, then submit his work to subversion. I never set the commit message editor, and all of a sudden, one day I forgot to add the -m handle and apparently he set the default editor to emacs. Being that I don't know the first thing about emacs and prefer vim myself, how do I go about changing the default editor for svn commands to vim after it's already been set. I deleted the .subversion directory under the home directory, and it still prompts me.

    Read the article

  • Change Message on Sony Reader to “Do not disconnect”

    - by Martin Broerse
    When I connect a Sony Reader to an USB port “USB connected” is shown on the Reader. When the Sony “Reader Library” software is started this message changes to “Do not disconnect”. I want to implement this in a software tool to. There seems to be no file locked. Perhaps it is done via ebookUsb.dll. Does anybody know how this is done from any programming language? I like to see an example.

    Read the article

  • Error message: "$(window).width is not a function"

    - by Crippletoe
    Hi all, i am trying to use a jQuery scrollbar called "Jscrollhorizontalpane". when i am trying to use it i get the following error message: "$(window).width is not a function" in firebug's console. i am new to jQuery do this might be very basic but still, i dont know what that means and why there is a problem. the scroller comes in a bundle with a few files, one of which is called "jScrollHorizontalPane.js" and i believe it holds the code for the scroller. i tried replacing $ signs there with the word "jQuery" (in case there is a conflict) but it didnt seem to help. also important to add that on the same page i am using another jQuery scroller (a vertical one as opposed to the horizontal on mentioned above) which works just fine and when i examined it's .js file, i could spot lines with "$(window).width". any ideas?

    Read the article

  • problem in jquery with showing pop message on submit form

    - by user1400
    hi guys in my application on php i use of 'jQuery Notify Bar' plugin for display messages, i'd like to show message when my form submit(in edit page) ,the other page(index page) is opened and notify bar be open until the other page(index page) is completely load and even some second more but the problem is that notify bar show for short Moment and when the index page begin to load , notify bar is closed, and the delay property is not effect to that $('#myForm').submit(function(){ $.notifyBar({ html: "Thank you, your settings were updated!", **delay: 20000,** animationSpeed: "normal" }); how to show notify bar in the other page too? thanks

    Read the article

  • Message box does not work in release mode

    - by Bi
    I have the following code in a C# windows form application. if (myGrid.Rows.Count != 0) { // do something } else { MessageBox.Show("Test"); } The message box shows up in Debug mode but not in release mode. Any idea why? I am having similar issues with other code as well For instance if (!myParameter) this.mycheckBox.Enabled = false; else this.mycheckBox.Enabled = true; The above code works in debug mode not in release. Not sure why. Thanks

    Read the article

  • How to post private message with Twitter API

    - by Venil Aminovich
    I want to send a private message to my followers with Twitter API (application is for iPhone). If I can do that with this API, please, give the code or the link to the code to me. Update: I've read the link dev.twitter.com/docs/api/1/post/direct_messages/new ACB gave me, and I understood the idea, how post direct messages. But the issue is there is no any word about autentification in this link. But I can't post tweet without autentification. Should I use TWRequest and set the account to this request? Thank you in advance!

    Read the article

  • Backup VM : Copy virtual disk xxx.vmdk The virtual disk is either corrupted or not a supported forma

    - by boiteavinc
    Hi I'm french. I'm student and I use ESXI4 for my studies. When I try backup my VMs, with ghettoVCBg2.pl and vSphere Management Assistant, I get the following error message on Vsphere Client : "Copy virtual disk xxx.vmdk The virtual disk is either corrupted or not a supported format". I have no error in the log VCB ; 03-23-2010 08:31:56 -- debug: Main: Login by vi-fastpass to: esxi 03-23-2010 08:31:56 -- debug: copyTask: Task START 03-23-2010 08:31:56 -- debug: copyTask: waiting for next job and sleep ... 03-23-2010 08:32:00 -- info: Initiate backup for AD_DNS_DHCP found on esxi 03-23-2010 08:32:09 -- debug: AD_DNS_DHCP original powerState: poweredOn 03-23-2010 08:32:09 -- debug: Creating Snapshot "ghettoVCBg2-snapshot-2010-03-23" for AD_DNS_DHCP 03-23-2010 08:33:19 -- info: AD_DNS_DHCP has 1 VMDK(s) 03-23-2010 08:33:19 -- debug: backupVMDK: Backing up "Raptor1 AD_DNS_DHCP/AD_DNS_DHCP.vmdk" to "Backup_VM VM/AD_DNS_DHCP/AD_DNS_DHCP-2010-03-23/$ 03-23-2010 08:33:19 -- debug: backupVMDK: Signal copyThread to start 03-23-2010 08:33:19 -- debug: backupVMDK: Backup progress: Elapsed time 0 min 03-23-2010 08:33:19 -- debug: copyTask: Wake up and follow the white rabbit, with status: doCopy 03-23-2010 08:33:19 -- debug: CopyThread: Start backing up VMDK(s) ... 03-23-2010 08:33:25 -- debug: copyTask: send copySuccess message ... 03-23-2010 08:33:25 -- debug: copyTask: waiting for next job and sleep ... 03-23-2010 08:34:20 -- debug: backupVMDK: Successfully completed backup for Raptor1 AD_DNS_DHCP/AD_DNS_DHCP.vmdk Elapsed time: 1 min 03-23-2010 08:34:22 -- debug: Removing Snapshot "ghettoVCBg2-snapshot-2010-03-23" for AD_DNS_DHCP 03-23-2010 08:34:24 -- debug: checkVMBackupRotation: Starting ... 03-23-2010 08:34:26 -- debug: Purging Backup_VM VM/AD_DNS_DHCP/AD_DNS_DHCP-2010-03-23--1 due to rotation max 03-23-2010 08:34:28 -- info: Backup completed for AD_DNS_DHCP! 03-23-2010 08:34:28 -- debug: Main: Disconnect from: esxi 03-23-2010 08:34:28 -- debug: Main: Calling final clean up 03-23-2010 08:34:28 -- debug: cleanUP: Thread clean up starting ... 03-23-2010 08:34:28 -- debug: cleanUp: Send exit to copyThread 03-23-2010 08:34:28 -- debug: copyTask: Wake up and follow the white rabbit, with status: exit 03-23-2010 08:34:28 -- debug: copyTask: die ... 03-23-2010 08:34:28 -- debug: cleanUp: Join passed 03-23-2010 08:34:28 -- info: ============================== ghettoVCBg2 LOG END ============================== My ghetto conf file is : VM_BACKUP_DATASTORE = "Backup_VM" VM_BACKUP_DIRECTORY = "VM" VM_BACKUP_ROTATION_COUNT = "3" DISK_BACKUP_FORMAT = "thin" ADAPTER_FORMAT = "lsilogic" POWER_VM_DOWN_BEFORE_BACKUP = "0" VM_SNAPSHOT_MEMORY = "1" VM_SNAPSHOT_QUIESCE = "1" LOG_LEVEL = "info" VM_VMDK_FILES = "all" I tried several I tried several DISK_BACKUP_FORMAT, I have same error. Despite the error, even when I get files on the NFS share. But when I try to open the vmx file with vmware workstation. I get this error: Can not open the disk 'G: \ Backup ESX \ VM \ AD_DNS_DHCP \ AD_DNS_DHCP-2010-03-23 - 1 \ AD_DNS_DHCP.vmdk' or one of the snapshot disks it depends on. Reason: The called function can not be performed on partial chains. Please open the parent virtual disk. I have no snapshot on my VM on ESXi. Can you help me ?

    Read the article

  • Varnish 503 Guru Mediation errors with pfsense and healthy apache

    - by Fammy
    We are running a pfsense firewall / load balancer with varnish as service, In front of Fedora linux webservers running apache. We are getting intermittent 503 guru mediation errors. We are a bit stuck scratching our heads because it is not easily repeatable. The timeouts are set to 30s (connect and first byte) but yet the 503 page will show instantly, not after 30s. Then if you refresh immediately it may very well work instantly and sometimes for a 100 refreshes. The load average on the web servers is < 1, the DB server is < 3 (all servers (web, db, pfsense/varnish) are physical rather than VM. I would have thought if the timeouts were being hit then the 503 page would only appear after 30s am I mistaken? Also when an error happens there does not appear to be any corresponding error in apache's log files. This seems to affect pages as well as images, so it is possible to have the page load fine, and for 9/10 images on the page to be fine but 1 not work An example of the varnish debug is below. It says no backend connection but I can't figure out why, if the load was high on apache I could understand it being flaky The machines are on the same gig ethernet lan 21 ReqStart c *IP-REMOVED* 33418 1274368062 21 RxRequest c GET 21 RxURL c /fashion/ 21 RxProtocol c HTTP/1.1 21 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121622 Fedora/3.0.5-1.fc10 Firefox/3.0.5 21 RxHeader c Host: *ourdomain.com* 21 RxHeader c Accept: */* 21 RxHeader c Accept-Encoding: deflate, gzip 21 VCL_call c recv lookup 21 VCL_call c hash 21 Hash c /fashion/ 21 Hash c *ourdomain.com* 21 VCL_return c hash 21 VCL_call c miss fetch 21 FetchError c no backend connection 21 VCL_call c error restart 21 VCL_call c recv lookup 21 VCL_call c hash 21 Hash c /fashion/ 21 Hash c *ourdomain.com* 21 VCL_return c hash 21 VCL_call c miss fetch 21 FetchError c no backend connection 21 VCL_call c error restart 21 VCL_call c recv lookup 21 VCL_call c hash 21 Hash c /fashion/ 21 Hash c *ourdomain.com* 21 VCL_return c hash 21 VCL_call c miss fetch 21 FetchError c no backend connection 21 VCL_call c error deliver 21 VCL_call c deliver deliver 21 TxProtocol c HTTP/1.1 21 TxStatus c 503 21 TxResponse c Service Unavailable 21 TxHeader c Server: Varnish 21 TxHeader c Content-Type: text/html; charset=utf-8 21 TxHeader c Content-Length: 384 21 TxHeader c Accept-Ranges: bytes 21 TxHeader c Date: Wed, 11 Apr 2012 10:36:17 GMT 21 TxHeader c X-Varnish: 1274368062 21 TxHeader c Age: 0 21 TxHeader c Via: 1.1 varnish 21 TxHeader c Connection: close 21 TxHeader c X-Cache: MISS 21 Length c 384 21 ReqEnd c 1274368062 1334140577.449995041 1334140577.450334787 1.794108152 0.000282764 0.000056982

    Read the article

  • how to resolve this .Net 3.5 warning/error?

    - by 5YrsLaterDBA
    I have three machines. one installed VS2008 another two installed SDK6 and Framework3.5 (one of these two is a build machine). When I use MSBuild to build our application, all of them get this warning: C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. and the build machine comes with some errors: scsm\SCSM.cs(234,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(235,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(304,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(314,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(317,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(323,17): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(324,17): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(325,17): error CS1501: No overload for method 'Invoke' takes '1' arguments but other machines are passed without error. Resources are identical in those three machines. searched online but cannot find answer. Anybody here can help me resolve this? thanks

    Read the article

  • Activity has leaked window that was originally added

    - by Pentium10
    What's this error, why happens? 05-17 18:24:57.069: ERROR/WindowManager(18850): Activity com.mypkg.myP has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c46ff0 that was originally added here 05-17 18:24:57.069: ERROR/WindowManager(18850): android.view.WindowLeaked: Activity ccom.mypkg.myP has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c46ff0 that was originally added here 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.view.ViewRoot.<init>(ViewRoot.java:231) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.view.Window$LocalWindowManager.addView(Window.java:424) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.Dialog.show(Dialog.java:239) 05-17 18:24:57.069: ERROR/WindowManager(18850): at com.mypkg.myP$PreparePairingLinkageData.onPreExecute(viewP.java:183) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.os.AsyncTask.execute(AsyncTask.java:391) 05-17 18:24:57.069: ERROR/WindowManager(18850): at com.mypkg.myP.onCreate(viewP.java:94) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.ActivityThread.access$2200(ActivityThread.java:126) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.os.Handler.dispatchMessage(Handler.java:99) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.os.Looper.loop(Looper.java:123) 05-17 18:24:57.069: ERROR/WindowManager(18850): at android.app.ActivityThread.main(ActivityThread.java:4595) 05-17 18:24:57.069: ERROR/WindowManager(18850): at java.lang.reflect.Method.invokeNative(Native Method) 05-17 18:24:57.069: ERROR/WindowManager(18850): at java.lang.reflect.Method.invoke(Method.java:521) 05-17 18:24:57.069: ERROR/WindowManager(18850): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 05-17 18:24:57.069: ERROR/WindowManager(18850): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-17 18:24:57.069: ERROR/WindowManager(18850): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • Need help with reCAPTCHA - keep getting incorrect-captcha-sol

    - by Anriëtte Combrink
    Hi I am trying to add a reCAPTCHA to my site, but keep getting incorrect-captcha-sol error when I submit the answer. Can anyone tell me if I am correct in doing the following? I have a generic index.php, which includes contact.php. In contact.php I have inserted the following code: require_once('recaptchalib.php'); $publickey = "XXXX"; $privatekey = "XXXX"; //the response from reCAPTCHA $resp = null; //the error code from reCAPTCHA, if any $error = null; if ($_POST['submit']) { $message = $_POST['message_txt']; $name = $_POST['name_txt']; $email = $_POST['email_txt']; $emailBody = $message; $to = 'xx'; $from = $name.' <'.$email.'>'; $subject = 'XX Website Enquiry'; $headers = 'From: '.$from; $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { echo 'captcha correct'; if (mail($to,$subject,$emailBody,$headers)) { //echo 'mail sent'; $confirmation = 'sent'; } else { //echo 'mail not sent'; $confirmation = 'error'; } } else { # set the error code so that we can display it. You could also use # die ("reCAPTCHA failed"), but using the error message is # more user friendly $error = $resp->error; echo $error; } } In my html I inserted the CAPTCHA like this: <form name="contactForm" method="post" action="index.php?id=contact&action=submit#contact"> <tr><td>Name</td><td><div align="right"> <input type="text" name="name_txt" class="input"> </div></td></tr> <tr><td>Email</td><td><div align="right"> <input type="text" name="email_txt" class="input"> </div></td></tr> <tr><td height="10"></td></tr> <tr><td colspan="2">Message</td></tr> <tr><td colspan="2"><textarea name="message_txt" class="textarea" style="width:200px; height:100px"></textarea></td></tr> <tr><td colspan="2"><?php echo recaptcha_get_html($publickey, $error); ?></td></tr> <tr><td colspan="2" style="padding-top:10px;"><input type="image" src="images/header_06.gif" name="submit" value="submit"></td></tr> </form> I cannot see that I am doing anything wrong, but would appreciate any constructive criticism. TIA

    Read the article

  • How to use opencv header in visual studio windows app

    - by yooo
    I did my work in visual studio 2010 c++ console , but now i am trying to convert my work into windows app (making interface of it) in visual studio c++ . For that i have to add some header files which i have to add manually in windows form application, like and it show me some error's in it like DetectRegions.h(10): error C2146: syntax error : missing ';' before identifier 'filename' DetectRegions.h(10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(11): error C2061: syntax error : identifier 'string' DetectRegions.h(14): error C2143: syntax error : missing ';' before '<' DetectRegions.h(14): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(14): error C2238: unexpected token(s) preceding ';' DetectRegions.h(16): error C2143: syntax error : missing ';' before '<' DetectRegions.h(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(16): error C2238: unexpected token(s) preceding ';' DetectRegions.h(17): error C2061: syntax error : identifier 'RotatedRect' DetectRegions.h(18): error C2653: 'cv' : is not a class or namespace name DetectRegions.h(18): error C2146: syntax error : missing ';' before identifier 'histeq' DetectRegions.h(18): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(18): error C2061: syntax error : identifier 'Mat' DetectRegions.h(18): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int DetectRegions.h(18): warning C4183: 'histeq': missing return type; assumed to be a member function returning 'int' Plate.h is same like DetectRegions.h I add the other headers of opencv in Form1.h like #include "opencv2/features2d/features2d.hpp" #include <opencv/highgui.h> #include "opencv2/opencv.hpp" .......

    Read the article

  • How do I make C++/wxWidgets code accessible to a wxPython app?

    - by Jon Cage
    I have a code library which is written in C++ and makes extensive use of the wxWidgets library. I'm now trying to wrap my library (currently using SWIG) so that it's callable from wxPython, but I've hit a wall: ------ Build started: Project: MyLibLib, Configuration: Release_SWIG_OutputForBin Win32 ------ Performing Custom Build Step In order to function correctly, please ensure the following environment variables are correctly set: PYTHON_INCLUDE: C:\Python26\include PYTHON_LIB: C:\Python26\libs\python26.lib d:\MyProject\Software\MyLib\trunk\MyLib>C:\swigwin-2.0.0\swig.exe -python d:\MyProject\Software\MyLib\trunk\MyLibLib\MyLib.i d:\MyProject\Software\MyLib\trunk\MyLib>if errorlevel 1 goto VCReportError d:\MyProject\Software\MyLib\trunk\MyLib>goto VCEnd Compiling... MyLib_wrap.c C:\wxWidgets-2.8.10\include\wx/wxchar.h(886) : warning C4273: '_snprintf' : inconsistent dll linkage c:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : see previous definition of '_snprintf' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2061: syntax error : identifier 'wxCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2449: found '{' at file scope (missing function header?) C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : '}' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : ')' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2061: syntax error : identifier 'wxWritableCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2059: syntax error : ':' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2061: syntax error : identifier 'wxWCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2449: found '{' at file scope (missing function header?) C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2059: syntax error : '}' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : fatal error C1004: unexpected end-of-file found Build log was saved at "file://d:\MyProject\Software\MyLib\trunk\MyLib\Release_SWIG_OutputForBin\BuildLog.htm" MyLibLib - 13 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Is there a particular way I should be going about this? I spent some time googling for similar errors, but got none which suggests I'm probably barking up the wrong tree here...? [Edit] Is a dll and ctypes the answer?

    Read the article

  • #Error showing up in multiple LEFT JOIN statement Access query when value should be NULL

    - by lar
    I'm trying to return an ID's last 4 years of data, if existing. The table (call it A_TABLE) looks like this: ID, Year, Val The idea behind the query is this: for each ID/Year in the table, LEFT JOIN with Year-1, Year-2, and Year-3 (to get 4 years of data) and then return Val for each year. Here's the SQL: SELECT a.ID, a.year AS [Year], a.Val AS VAL, a1.year AS [Year-1], a1.Val AS [VAL-1], a2.year AS [Year-2], a2.Val AS [VAL-2], a3.year AS [Year-3], a3.Val AS [VAL-3] FROM ( ([A_TABLE] AS a LEFT JOIN [A_TABLE] AS a1 ON (a.ID = a1.ID) AND (a.year = a1.year+1)) LEFT JOIN [A_TABLE] AS a2 ON (a.ID = a2.ID) AND (a.year = a2.year+2)) LEFT JOIN [A_TABLE] AS a3 ON (a.ID = a3.ID) AND (a.year = a3.year+3) The problem is that, for past years where there is no data (eg, Year-1), I see "#Error" in the appropriate VAL column (eg, [VAL-1]). The weird thing is, I see the expected "null" in the Year column (eg, [YEAR-1]). Some sample data: ID YEAR VAL Dave 2004 1 Dave 2006 2 Dave 2007 3 Dave 2008 5 Dave 2009 0 outputs like this: ID YEAR VAL YEAR-1 VAL-1 YEAR-2 VAL-2 YEAR-3 VAL-3 Dave 2004 1 #Error #Error #Error Dave 2006 2 #Error 2004 1 #Error Dave 2007 3 2006 2 #Error 2004 1 Dave 2008 5 2007 3 2006 2 #Error Dave 2009 0 2008 5 2007 3 2006 2 Does that make sense? Why am I getting the appropriate NULL val for the non-existent YEARs, but an #Error for the non-existent VALs? (This is Access 2000. Conditional statements like "IIf(a1.val is null, -999, a1.val)" do not seem to do anything.) EDIT: It turns out that the errors are somehow caused by the fact that A_TABLE is actually a query. When I put all the data into an actual table and run the same query, everything shows up as it should. Thanks for the help, everyone.

    Read the article

  • jQuery aspx error function always called, even with apparently valid return data

    - by M Katz
    I am making an ajax call using jQuery (jquery-1.5.2.min.js). The server receives the call. fiddler shows the response text coming back apparently correct. But back in javascript my error: function is called instead of my success: function, and the data of the parameters to the error function don't give much clue as to the problem. Here's the function where I make the initial call: function SelectCBGAtClickedPoint() { $.ajax( { type: "GET", dataType: "text", url: "http://localhost/ajax/SelectCBGAtPoint/1/2", success: function( msg ) { alert( "success: " + msg ); }, error: function( jqXHR, textStatus, errorThrown ) { alert( "error: " + jqXHR + textStatus + errorThrown ); } } ); } Here's the function where I handle the call in my cherrypy server code: def ajax( ajax, *args ): with lock: print "ajax request received: " + str( args ) cherrypy.response.headers[ "Content-Type" ] = "application/text" return "{ x: 0 }" Cherrypy is an odd beast, and I was thinking the problem must lie there. But as I say, I see both the query go out and the response come back in Fiddler. Here is what Fiddler shows as the raw view of the response: HTTP/1.1 200 OK Date: Mon, 11 Apr 2011 17:49:25 GMT Content-Length: 8 Content-Type: application/text Server: CherryPy/3.2.0 { x: 0 } Looks good, but then back in javascript, I get into the error: function, with the following values for the parameters (as shown in firebug): errorThrown = "" jqXHR = Object { readyState=0, status=0, statusText="error"} statusText = "error" I don't know where that word "error" is coming from. That string does not appear anywhere in my cherrypy server code. Note that even though I'm returning a JSON string I've set the send and receive types to "text" for now, just to simplify in order to isolate the problem. Any ideas why I'm getting this "error" reply, even when errorThrown is empty? Could it be that I haven't properly "initialized" either jQuery or jQuery.ajax?

    Read the article

  • Error while compiling pjsip 2 for cxode 4.3.2 and SDK 5.1

    - by Linus Persson
    I'm trying to compile pjsip version 2 using the terminal and I'm getting constant error no matter what I try. Been looking for the answer all over the internet including stackoverflow. I downloaded pjsip version 2 using their subversion repository today so all files should be up to date. When following this guide: http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone I get this error after running "make dep && make clean && make": ld: symbol(s) not found for architecture armv7 collect2: ld returned 1 exit status make[2]: *** [../bin/pjsua-arm-apple-darwin9] Error 1 make[1]: *** [pjsua] Error 2 make: *** [all] Error 1 When using the above guide combined with this guide: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-October/013481.html I get this error after running "make dep && make clean && make": ld: symbol(s) not found for architecture arm collect2: ld returned 1 exit status make[2]: *** [../bin/pjsua-arm-apple-darwin10] Error 1 make[1]: *** [pjsua] Error 2 make: *** [all] Error 1 I've included /pjlib/include/pj/config_site.h with the following code: #define PJ_CONFIG_IPHONE 1 #include <pj/config_site_sample.h> How do I get pjsip to compile without errors? Please consider that I'm new to this, thank you!

    Read the article

< Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >