Search Results

Search found 21430 results on 858 pages for 'message digest'.

Page 30/858 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Display nice error message when there is something wrong after ajax request jqgrid

    - by Niels Ilmer
    Hello, I delete rows with this function: function deleteRow(){ rows = jQuery("#category_grid").getGridParam('selarrrow'); if( rows.length>0){ jQuery('#category_grid').delGridRow(rows,{ msg:'Verwijderen geselecteerde rijen?' }); }else{ alert("Selecteer eerst een rij om te verwijderen!"); } } but when it's fails in my php, server side and a exception is thrown. The errormessage looks not nice. How can i show errotext in the dialog box? or catch an error message after an ajax call? At the moment the error message looks like: error Status: 'CDbException'. Error code: 500 When i googled i found a event of the delGridRow function called errorTextFormat. Is this the event where i'm looking for? Can someone please give me an example of the implementation of this event? greetings niels

    Read the article

  • Skype Raw API (NOT COM API) send message problem

    - by Mike Trader
    In converting this CONSOLE example to a full windows dialog implementation I have run into a very "simple problem". SendMessage() (line 283) is returning zero, GetLastError reveals 0x578 - Invalid window handle. http://read.pudn.com/downloads51/sourcecode/windows/multimedia/175678/msgapitest.cpp__.htm (https://developer.skype.com/Download/Sample...example_win.zip) C++ 2005 Studio express edition instructions http://forum.skype.com/index.php?showtopic=54549 The previous call using HWND_BROADCAST works and Skype replies as expected, so I know Skype is installed and working properly. The handle I use is the wParam value from the Skype Reply message, as in the code. This is non zero, but I am not sure if there is a way to test it other than with SendMessage. The compiled app from this C++ code example (see zip download) does actually work so I am stumped. I do encode the message with UTF8, and I create an instance of the COPYDATASTRUCT in my app, populate it then call SendMessage() with the COPYDATASTRUCT pointer in lparam. Skype does not respond nor does it obey. Am I missing something obvious here?

    Read the article

  • Does RabbitMq do round-robin from the exchange to the queues

    - by Lancelot
    Hi, I am currently evaluating message queue systems and RabbitMq seems like a good candidate, so I'm digging a little more into it. To give a little context I'm looking to have something like one exchange load balancing the message publishing to multiple queues. I don't want to replicate the messages, so a fanout exchange is not an option. Also the reason I'm thinking of having multiple queues vs one queue handling the round-robin w/ the consumers, is that I don't want our single point of failure to be at the queue level. Sounds like I could add some logic on the publisher side to simulate that behavior by editing the routing key and having the appropriate bindings in place. But that's kind of a passive approach that wouldn't take the pace of the message consumption on each queue into account, potentially leading to fill up one queue if the consumer applications for that queue are dead. I was looking for a more pro-active way from the exchange entity side, that would decide where to send the next message based on each queue size or something of that nature. I read about Alice and the available RESTful APIs but that seems kind of a heavy duty solution to implement fast routing decisions. Anyone knows if round-robin between the exchange the queues is feasible w/ RabbitMQ then? Thanks.

    Read the article

  • Objective C message dispatch mechanism

    - by Dolphin
    I am just staring to play around with Objective C (writing toy iPhone apps) and I am curious about the underlying mechanism used to dispatch messages. I have a good understanding of how virtual functions in C++ are generally implemented and what the costs are relative to a static or non-virtual method call, but I don't have any background with Obj-C to know how messages are sent. Browsing around I found this loose benchmark and it mentions IMP cached messages being faster than virtual function calls, which are in turn faster than a standard message send. I am not trying to optimize anything, just get deeper understanding of how exactly the messages get dispatched. How are Obj-C messages dispatched? How do Instance Method Pointers get cached and can you (in general) tell by reading the code if a message will get cached? Are class methods essentially the same as a C function (or static class method in C++), or is there something more to them? I know some of these questions may be 'implementation dependent' but there is only one implementation that really counts.

    Read the article

  • code first CTP5 error message

    - by user482833
    I get the following error message with a new project I have set using code first CTP5. Can't find anything on the web about it. Has anyone encountered this error message? The context cannot be used while the model is being created. This occurs the first time my database context is called (code below): using (StaffData context = new StaffData()) { return context.Employees.Count(e = e.EmployeeReference) == 1; } At this point the database has not been created. I have a database initialiser DropCreateDatabaseIfModelChanges which I set in app_start.

    Read the article

  • Android - Redirect sending of SMS message

    - by Donal Rafferty
    I currently use a ContentObserver to listen for changes in the SMS ContentProvider and tell my application whether a message has been sent or received. Upon getting notification that a message is being sent I would like to present the user the option to send that SMS normally over GSM/CDMA or if connected to Wifi to send the SMS over an ip connection. I am aware of how to present my own application as an option to create and send an SMS when a user clicks on a contacts information and "Send SMS" but this is not what I want. I want the user to be able to use the native or a 3rd party SMS application and when they try to send an SMS present them with a dialog screen giving them the option to send the SMS in whichever direction they want. So is it possible that once I get notified an SMS is being sent to pause it, allow the user to pick the desired route to send it and then change the sms from being sent over GSM/CDMA to being sent using a protocol over IP if required?

    Read the article

  • Help with chat server

    - by mithun1538
    I am designing a chat server in java. The communication is Http based and not socket based. In the client side I have an applet. In the server side I have a servlet. Applet: I create a new thread to listen for incoming messages(GET method). The main thread is used to send messages(POST messages). The partial code is : public void start() { System.out.println("Creating new thread"); Thread thread = new Thread(this); thread.start(); } private String getNewMessage() { System.out.println("Inside getNewMessage"); String msg = null; try { while(msg == null) { System.out.println("Trying to listen to servlet"); URL servlet = new URL(getCodeBase(), "NewServlet?mode=msg"); URLConnection con = servlet.openConnection(); con.setUseCaches(false); DataInputStream din = new DataInputStream(new BufferedInputStream(con.getInputStream())); msg = din.readUTF(); System.out.println("message read :" + msg); } } catch (Exception e) { e.printStackTrace(); } return msg + "\n"; } public void run() { System.out.println("Inside new thread"); while(true) { System.out.println("inside first while"); String newMsg = getNewMessage(); chatOutput.append(newMsg); System.out.println("Appended!!"); } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String message = chatInput.getText(); chatInput.setText(""); chatOutput.append(message + "\n"); try { System.out.println("Trying to send msg :" + message); URL url = new URL(getCodeBase(), "NewServlet"); URLConnection servletConnection = url.openConnection(); servletConnection.setDoInput(true); servletConnection.setDoOutput(true); servletConnection.setUseCaches(false); servletConnection.setRequestProperty("Content-Type", "application/octet-stream"); ObjectOutputStream out = new ObjectOutputStream(servletConnection.getOutputStream()); out.writeObject(message); out.flush(); out.close(); System.out.println("Message sent!"); } catch (Exception e) { e.printStackTrace(); } } This next code is from the servlet side. it uses the Observable interface to identify and send messages to clients. public class NewServlet extends HttpServlet { // getNextMessage() returns the next new message. // It blocks until there is one. public String getNextMessage() { // Create a message sink to wait for a new message from the // message source. System.out.println("inside getNextMessage"); return new MessageSink().getNextMessage(source);} @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("Inside Doget"); response.setContentType("text/plain"); PrintWriter out = response.getWriter(); out.println(getNextMessage()); } // broadcastMessage() informs all currently listening clients that there // is a new message. Causes all calls to getNextMessage() to unblock. public void broadcastMessage(String message) { // Send the message to all the HTTP-connected clients by giving the // message to the message source source.sendMessage(message); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("Inside DoPost"); try { ObjectInputStream din= new ObjectInputStream(request.getInputStream()); String message = (String)din.readObject(); System.out.println("received msg"); if (message != null) broadcastMessage(message); System.out.println("Called broadcast"); // Set the status code to indicate there will be no response response.setStatus(response.SC_NO_CONTENT); } catch (Exception e) { e.printStackTrace(); } } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; } MessageSource source = new MessageSource();} class MessageSource extends Observable { public void sendMessage(String message) { System.out.println("inside sendMsg"); setChanged(); notifyObservers(message); } } class MessageSink implements Observer { String message = null; // set by update() and read by getNextMessage() // Called by the message source when it gets a new message synchronized public void update(Observable o, Object arg) { // Get the new message message = (String)arg; // Wake up our waiting thread notify(); } // Gets the next message sent out from the message source synchronized public String getNextMessage(MessageSource source) { // Tell source we want to be told about new messages source.addObserver(this); System.out.println("AddedObserver"); // Wait until our update() method receives a message while (message == null) { try { wait(); } catch (Exception ignored) { } } // Tell source to stop telling us about new messages source.deleteObserver(this); // Now return the message we received // But first set the message instance variable to null // so update() and getNextMessage() can be called again. String messageCopy = message; message = null; System.out.println("Returning msg"); return messageCopy; } } As you can see I have included System.out.println("Some message"); in some places. this was just for debugging purposes. In java console, i get the following output: Creating new thread Inside new thread. inside first while. Inside getNewMessage. Trying to listen to servlet. In the servlet side, i get the following output in the tomcat logs: Inside Doget. inside getNextMessage. AddedObserver. After i type a message in the applet, and send it, I get the foll output in java console: Trying to send msg :you deR?? Message sent! But in servlet side, I dont get anything in the logs. I used the O'Reily Java Servlet Programming as reference(The observer interface comes from there). But I am not getting any chat communication between two clients. As can be understood from the logs, the POST method is not called. Any reason for this?

    Read the article

  • Change JS alert to DOM error message div

    - by Jason
    I need to convert my error messaging to a positioned div (hidden initially) instead of the standard js alert. I realize I need to push the alert message to the DOM, but I'm new to javascript. Any help would be appreciated. Additionally, I need to do it without a confirm (so error message removes on field focus) if(el != null) { switch(el.name) { case "firstName": //First Name Field Validation, Return false if field is empty if( f.firstName.value == "" ) { alert( bnadd_msg_002 ); if ((typeof TeaLeaf != "undefined") && (typeof TeaLeaf.Client != "undefined") && (typeof TeaLeaf.Client.tlAddEvent != "undefined") ) { var nVO = { ErrorMessage : bnadd_msg_002} var subtype="CustomErrorMsg"; TeaLeaf.Event.tlAddCustomEvent(subtype, nVO); } return false; } break;

    Read the article

  • Invalidate (MFC) debug assertion failed error message

    - by kobac
    I've made a custom control, and when I want it to repaint on the screen I call Invalidate(), and afterwards UpdateWindow(), but i get message: debug assertion failed for a file afxwin2.inl in line 150 which is: AFXWIN_INLINE void CWnd::Invalidate(BOOL bErase) { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, NULL, bErase); } The thing is that when I run the same app in release mode, it doesn't report any message! So this clue makes me think it's about some environment configuration I should change. What do you think? Thanks.

    Read the article

  • Why doesn't Visual Studio show an exception message when my exception occurs in a static constructor

    - by Tim Goodman
    I'm running this C# code in Visual Studio in debug mode: public class MyHandlerFactory : IHttpHandlerFactory { private static Dictionary<string, bool> myDictionary = new Dictionary<string, bool>(); static MyHandlerFactory() { myDictionary.Add("someKey",true); myDictionary.Add("someKey",true); // fails due to duplicate key } } Outside of the static constructor, when I get to the line with the error Visual Studio highlights it and pops up a message about the exception. But in the static constructor I get no such message. I am stepping through line-by-line, so I know that I'm getting to that line and no further. Why is this? (I have no idea if that fact that my class implements IHttpHandlerFactory matters, but I included it just in case.) This is VS2005, .Net 2.0

    Read the article

  • Zend Framework: Flash Messenger, add a message from the model

    - by Dan
    Any idea on how best to add a message to flash messenger from the model? As FlashMessenger is an action helper, this seems not to be possible, so the obvious solution is to create an internal message object in the model, and return that to the controller from where you can use addMessage(). But if you want to return something else as well, this falls down. Another idea is an additional session namespace for these internal messages, which is then merged in with the Flash Messenger namespace messages at output time? Anyone have any thoughts or experience on this? Cheers.

    Read the article

  • Zend RegEx Validator error message issue

    - by Mallika Iyer
    Hello, I'm validating a text field in my form as follows: $name = new Zend_Form_Element_Text('name'); $name->setLabel('First Name:') ->setRequired(true) ->addFilter(new Zend_Filter_StringTrim()) ->addValidator('regex',true,array('/^[(a-zA-Z0-9)]+$/')) ->addErrorMessage('Please enter a valid first name'); What I'm trying to accomplish is - how can i display a meaningful error message? Eg: If first name is 'XYZ-', how can i display '- is not allowed in first name.' Is there a way I can access what character the regex is failing for? Would you recommend something else altogether? I thought about writing a custom validator but the regex is pretty simple, so I don't see the point. I couldn't find a decent documentation for the zend 'regex' validator anywhere. If I don't override the default error message, I simple get something like : ';;;hhbhbhb' does not match against pattern '/^[(a-zA-Z0-9)]+$/' - which I obviously don't want to display to the user. I'd appreciate your inputs.

    Read the article

  • Using Facebook Graph to simply post a wall message with just javascript

    - by Glycerine
    Hey guys, Now I know this question has been asked similarly a lot of times but I'm really struggling here. Its a simple thing I need to do: I would like to post a message onto a users wall saying "I scored 8/10 on objects game" then a URL Thats it. I don't mind if facebook needs to authenticate and then post the message. and I really don't want to have to use the full API - as I don't want to handle user login details. Is it possible using the new Graph API and javascript. Uber thanks guys this'll allow me to sleep tonight.

    Read the article

  • Returning from dll (Asynchronous sockets)

    - by Juha
    I am trying to do a simple http-server in (c++) dll-file that I can use from managed (C#) application with P/Invoke. I was trying to do this with asynchronous functions (WSAAsyncSelect() and stuff), so that I could manage server by calling functions inside dll whenever needed and after that it would return to my main program. Now I'm not sure if that is even possible. It seems that "main function" in dll, the function that starts the server, has to include message loop or something and since it's a loop, it doesn't return from dll ever. Could I somehow do this message stuff in my managed application and call some function in dll when there is something to do? Or is it even possible to do this stuff in one thred? I would really like to avoid all concurrency stuff. The dll looks now basicly the same as here, main function is the one that I call from managed C# program and would like to return to there after calling the function. http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancediomethod5b.html I'm quite noob in windows programming, and never even heard of this message-queue or message-loop.

    Read the article

  • Installshield 2009 Premier Basic MSI: Not show a warning message window during uninstall

    - by Samir
    Installshield 2009 Premier Basic MSI: When I uninstall there is a Message Box saying that explorer has to be closed: [Title] My-Product-Name [List] Explorer [radio button 1, Selected by default] Automatically close applications and attempt to restart them after setup is complete [radio button 2] Do not close applications. (A Reboot will be required) [Ok Button] [Cancel Button] If I click OK [with radio button 1 selected] all opened folders are closed !!! How to get rid of this, I don't want any warning message box to show and not close explorer either? More info: I have a dll which is used to show explorer context menu with icons when we right click on any file/folder. This dll is registered during installation and unregistered during uninstall. When we uninstall WinRAR we don't see any such messages, do we?

    Read the article

  • wm_mousewheel message in WTL

    - by Rushi
    I am trying to handle wm_mousewheel for my application. Code: BEGIN_MSG_MAP(DxWindow) MESSAGE_HANDLER(WM_MOUSEWHEEL, KeyHandler) END_MSG_MAP() . . . LRESULT DxWindow::KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { if(uMsg==wm_mousewheel) { //Perform task. } return 0; } But this code doesn't work.KeyHandler doesn't receive wm_mousewheel message. I am testing this application on vista. If my approach is wrong how to handle wm_mousewheel properly? Do vista is responsible for failure in handling wm_mousewheel message?

    Read the article

  • Cabal: Odd Error Message + Lack of Documentation

    - by voxcogitatio
    So I recently installed cabal (from the default binary of ArchLinux). I then tried to upgrade cabal as a user: cabal upgrade Cabal --user --prefix=$USER Resolving dependencies... cabal: fromFlag NoFlag. Use fromFlagOrDefault What I've already done: Googled the error message. Turned up the cabal source and little else. Looked at haskell-wiki on cabal-install. Looked through this guide. So basically I'm wondering: What's up with the error message? Could anyone point me in the direction of a cabal tutorial?

    Read the article

  • Triggering PHP from ActiveMQ

    - by scompt.com
    Background: Our current system involves two services (one written in Java, the other in PHP) that communicate with each other using HTTP callbacks. We would like to migrate from HTTP callbacks to a message-based architecture using ActiveMQ (or another, if necessary). We'll probably use STOMP to communicate between them. Eventually, the PHP service will be rewritten in Java, but that's not part of this project. Question: How can the ActiveMQ system notify PHP that a new message has been posted to the queue that the PHP system is subscribed to? In the current system, the callback inherently calls into the PHP and triggers it. This goes away with a message-based architecture. Possible solutions: Cron regularly calls a PHP script that checks for new messages. yuck. A long-running PHP process that loops and sleeps and checks for new messages. less yuck? ActiveMQ calls a PHP script when a new message is posted. good, how? ??

    Read the article

  • Deploying spring message driven pojo on weblogic 8.1

    - by Igman
    Hello, I am trying to deploy a spring message message driven POJO on weblogic 8.1. It is a simple POJO, and it works fine being run outside of an application server, but the messages do not seem to be picked up at all. I have created empty home and remote interfaces, as well as a container bean class that contains an instance of the pojo which it gets from the application context. I then added this container bean class to the ejb-jar.xml as a . I have not been able to get the messages pick up. Does anyone have any suggestions as to what I am doing wrong? Could anyone point me to a tutorial on how to deploy a MDP? Thanks.

    Read the article

  • Jersey message body reader not found in maven-built JAR

    - by Olvagor
    My application uses a REST (JAX-RS Jersey) interface. When I run it in Eclipse, everything' s fine. The domain objects are annotated, I'm not using XML files for the REST mapping. Now I created a standalone JAR using the maven-assembly-plugin, which packs the application and all dependencies in a single, executable JAR file. This also seems to work. But when I start the application and request an object from the server, Jersey complains, that it can't find a message body reader: com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java type, class de.rybu.atuin.core.entity.User, and MIME media type, application/json, was not found Any ideas why this happens? EDIT: After I slept a night over it, I noticed that it complains about JSON... but I'm using only XML for serialization. Strange.

    Read the article

  • Handling wm_mousewheel message in WTL

    - by Rushi
    I am trying to handle wm_mousewheel for my application. Code: BEGIN_MSG_MAP(DxWindow) MESSAGE_HANDLER(WM_MOUSEWHEEL, KeyHandler) END_MSG_MAP() . . . LRESULT DxWindow::KeyHandler( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled ) { if(uMsg==wm_mousewheel) { //Perform task. } return 0; } But this code doesn't work.KeyHandler doesn't receive wm_mousewheel message. I am testing this application on vista. If my approach is wrong how to handle wm_mousewheel properly? Do vista is responsible for failure in handling wm_mousewheel message?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >