messages

Echo messages while php script still executes

╄→гoц情女王★ 提交于 2019-12-04 10:49:55
问题 I have a php script that uses cURL and takes about 10-15 minutes to execute. What it does, it parses about 1000 pages looking for specific matches and throughout the script I have diagnostic messages echo'ed out, like "Going to the next page", "Found a match", "Error loading page" ... The way it works now (and the way that it's normal) is it executes for like 10 minutes and only then spits out all my custom messages. I would like to be able to display those messages as they happen, not when

Keep track of read/unread User Messages with a MessageClicks table?

牧云@^-^@ 提交于 2019-12-04 09:10:31
I'm trying to implement a simple Inbox system for users of my app so that can send basic messages to each other - just like in many forum systems. If User has_many :messages , how do I keep track of and notify the User of messages unread since last time they were read? I'm thinking clicks on the link to the Messages screen need to be recorded in a separate table ( MessagesClicks ). Is that the best approach here? So then I check the MessagesClicks table to see if any new messages have arrived since the last time that link was clicked - based on a last_clicked or updated_at field . I would keep

JSF PRG with validation error

核能气质少年 提交于 2019-12-04 03:38:29
问题 I'm using JSF with the PRG pattern. (use in my navigation rules). The problem is that the redirect is not done (i.e. a post followed by a get of the same page) when I got validation errors (ex : the mandatory value isn't set by the user). The scenario is : user doesn't put the mandatory value and submit the form validation error occurs and the same view is shown with an error message (no PRG) the user set the mandatory value and submit ==> GO to the next page (with PRG) The user click back

How to send a notification that's handled by ON_NOTIFY?

╄→гoц情女王★ 提交于 2019-12-04 01:56:27
问题 I'm trying to post a LVN_ ITEMCHANGED to my custom gridlist's owner. I know how to send a WM_ User message using PostMessage (as shown here) ::PostMessage( AfxGetMainWnd()->GetSafeHwnd(), WM_REFRESH, (WPARAM)pBuffer, (LPARAM)GetOutputIdx() ); When I use this same code to send a LVN_ITEMCHANGED message though, ::PostMessage( AfxGetMainWnd()->GetSafeHwnd(), LVN_ITEMCHANGED, 0, 0); it doesn't seem to be caught by the ON_NOTIFY(LVN_ITEMCHANGED, ..., ...) I have in the owner class. Am I wrong to

Xcode 8 Messages Template Application: Error on iOS Simulator

耗尽温柔 提交于 2019-12-03 23:22:19
When I create a new project using the "Messages Application" template of Xcode 8 and try to run it on iOS simulator, I get the following error: Title The request to open com.myDomain.MyApp failed. Details The request was denied by service delegate ( SBMainWorkspace ) for reason: NotFound ("Application "com.myDomain.MyApp" is unknown to FrontBoard"). The message is the same for Objective-C and Swift projects. I don't find any search result for this message yet, so any hint will be helpful. I will update the question as I progress. Edit This error occurred with Xcode 8 beta versions. You may

Spring validations default messages

梦想的初衷 提交于 2019-12-03 21:28:14
I need to get the resolved error messages programmatically in the controller. The default validation message for typeMismatch errors are not populating from my messages.properties file. I have a form backing object where a field is an Integer. If I submit a string for that field I get: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'establishedYear'; nested exception is java.lang.NumberFormatException: For input string: "1995a" as the default message in the ObjectError. Here's my controller that output it: @RequestMapping(method =

How best to pass a message for the user between pages

蓝咒 提交于 2019-12-03 20:20:06
So the chain of events is: The user submits a form. During the processing of the submission, there is a message generated, such as "Your record was saved." The user is redirected to a new page, say the search results. The new page needs to display the message. So, the question is how to get the message from step 2 to step 3? This is only one simple example...there are many other much more complicated examples. I am using PHP. Needs: supports multiple messages and need to be formatted on the receiving machine as required messages can be added on the same page (such as within step 4) messages

C# Bubbling/Passing Along An Event

送分小仙女□ 提交于 2019-12-03 17:07:06
How do I pass along an event between classes? I know that sounds ridiculous (and it is) but I've been stumped on this for the past little while. Search didn't turn up a similar question so I figured I would pose it. Here are the objects involved: WinForm -> Speaker -> Tweeter -> Woofer [Speaker, Tweeter, Woofer] all declare a "SpeakToMe" event that sends a simple string message. The events are declared using the standard pattern: public delegate void SpeakToMeHandler(object sender, SpeakToMeEventArgs e); public event SpeakToMeHandler SpeakToMe; protected virtual void OnSpeakToMe(string message

Database schema for messaging to multiple users

ぃ、小莉子 提交于 2019-12-03 15:22:51
问题 I'm looking for the best solution to implement messaging to multiple users within the system(Facebook-style). I'm came up with the following idea: where each Message belongs to the Message_Chain and in the Message_status table user-sender and users-receivers are listed. However I'm afraid that this schema is not very efficient to use when there are millions of messages in the system. Could anyone suggest any other solution to the current problem? Or explain why my solution will be fine?

Does iPhone SDK Objective C support functions inside of functions?

耗尽温柔 提交于 2019-12-03 15:09:20
I know that javascript, for example supports functions inside of functions, like so: function doSomething(){ function doAnothingThing(){ //this function is redefined every time doSomething() is called and only exists inside doSomething() } //you can also stick it inside of conditions if(yes){ function doSomethingElse(){ //this function only exists if yes is true } } } Does objective-c support this? Theoretical example: -(void) doSomething:(id) sender{ -(void) respondToEvent: (id) sender{ //theoretically? ... please? } } BONUS: What is the proper term for a "local" function? The usual term is