messages

View attachments in threads

怎甘沉沦 提交于 2019-11-26 16:32:34
问题 I'm currently working on an alternative way to view the threads and messages. But I have problems figuring out how to display the images attached to a message. I have a GET request to this url: https://graph.facebook.com/t_id.T_ID/messages?access_token=ACCESS_TOKEN . And the response includes "attachments": { "data": [ { "id": "df732cf372bf07f29030b5d44313038c", "mime_type": "image/jpeg", "name": "image.jpg", "size": 76321 } ] } but I can't find any way to access the image. Thanks 回答1:

Java, How to get number of messages in a topic in apache kafka

笑着哭i 提交于 2019-11-26 11:56:32
问题 I am using apache kafka for messaging. I have implemented the producer and consumer in Java. How can we get the number of messages in a topic? 回答1: The only way that comes to mind for this from a consumer point of view is to actually consume the messages and count them then. The Kafka broker exposes JMX counters for number of messages received since start-up but you cannot know how many of them have been purged already. In most common scenarios, messages in Kafka is best seen as an infinite

h:messages does not display messages when p:commandButton is pressed

喜欢而已 提交于 2019-11-26 11:16:25
问题 I have a problem with the h:messages tag in JSF that simply does not show any messages. In the Glassfish log are no errors when I click the button. The setup is as follows: test.xhtml: <html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:h=\"http://java.sun.com/jsf/html\" xmlns:ui=\"http://java.sun.com/jsf/facelets\" xmlns:p=\"http://primefaces.org/ui\" xmlns:j=\"http://primefaces.org/ui\" xmlns:f=\"http://java.sun.com/jsf/core\"> <h:head> <title>test</title> <meta http-equiv=\"Content-Type\"

What is the difference between WM_QUIT, WM_CLOSE, and WM_DESTROY in a windows program?

瘦欲@ 提交于 2019-11-26 10:17:13
问题 I was wondering what the difference between the WM_QUIT, WM_CLOSE, and WM_DESTROY messages in a windows program, essentially: when are they sent, and do they have any automatic effects besides what\'s defined by the program? 回答1: They are totally different. WM_CLOSE is sent to the window when "X" is pressed or "Close" is chosen from window menu. If you catch this message this is your call how to treat it - ignore it or really close the window. By default, WM_CLOSE passed to DefWindowProc

MySQL: Large VARCHAR vs. TEXT?

自闭症网瘾萝莉.ら 提交于 2019-11-25 23:20:29
问题 I\'ve got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I\'m setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this. Is there a rationale for going with either VARCHAR(3000) or TEXT? There\'s something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I\