message

creating folders in IMAP does not work

痞子三分冷 提交于 2019-12-05 05:12:22
I am trying hard to create a folder in IMAP (I am using gmail) Here is what i have attempted so far: public boolean createFolder(String folderName) throws MessagingException { store = session.getStore("imap"); System.out.println("connecting store.."); store.connect("imap.gmail.com", 993, "something@gmail.com", "password"); System.out.println("connected !"); //using store.getDefaultFolder(); shows error : "folder cannot contain messages" Folder defaultFolder = store.getFolder("Inbox"); return createFolder(defaultFolder, folderName); } private boolean createFolder(Folder parent, String

how to send message from service to activity

不想你离开。 提交于 2019-12-05 04:48:31
I build an AsyncTask that create a service and now I want to sent from service to AsyncTask message. my code on the AsyncTask is: class ResponseHandler extends Handler { public void handleMessage(Message message) { // Toast.makeText(this, "message from service",Toast.LENGTH_SHORT).show(); } hope that it will handle the message from service correct my if I wrong. and from service tried to do this Message message = Message.obtain(null, MyService.ADD_RESPONSE_HANDLER); message.replyTo = messenger; try { myService.send(message); catch (RemoteException e) { e.printStackTrace(); } but my errors are

Codeigniter not logging

痞子三分冷 提交于 2019-12-05 03:53:41
I can't seem to figure out why codeigniter isn't logging my log_messages In Config: $config['log_threshold'] = 4; $config['log_path'] = '/var/log/mydlp.log'; In script: log_message('error','here'); File location: -rw-rw-rw- 1 root root 0 2012-12-05 13:10 mydlp.log I'm not getting anything when I get to the log message. Here's my directory structure for /var and /var/log drwxr-xr-x 6 root root 4096 2012-12-05 13:10 log drwxr-xr-x 14 root root 4096 2012-01-04 14:38 var Am I doing something wrong here? $config['log_path'] is supposed to be a path to a directory, not a file. CI writes its own

Thymeleaf : How to use Custom Message Key in JSR-303 Annotation

微笑、不失礼 提交于 2019-12-05 03:48:41
问题 Use Thymeleaf Person.java public class Person { @NotEmpty(message="{Valid.Password}") private String password; } message.properties Valid.Password = Password is Empty!! Login.html <span class="error" th:errors="person.password"></span> th:errors can not retrieve 'Valid.Password' Message That area is shown as empty. if message key change to NotEmpty.person.password of message.properties, then it is working. how to use custom message key? 回答1: using javax.validation constrains on class and

Protocol Terminology: Message versus Packet

拥有回忆 提交于 2019-12-05 02:41:53
In practice, what is the most appropriate term for the communications transmitted over a network in higher level protocols (those above TCP/IP, for example)? Specifically, I am referring to small, binary units of data. I have seen both "message" and "packet" referred to in various client/server libraries, but I was interested in the community's consensus. These are definitely messages. A "packet" is a layer-3 (in ISO terminology) protocol unit, such as an IP packet; and a "datagram" is a layer-1 or layer-2 unit, such as the several Ethernet datagrams that might make up the fragments of an IP

Set notification message as request attribute which should show after sendRedirect

孤街醉人 提交于 2019-12-05 02:25:44
问题 I've created two sets of servlets: Views and Controllers/Handlers Views : Perform simple reads and forward data to JSP s Controllers : Perform database updates or inserts and send a notification to either a JSP or a View type servlet Notification here is a status message for the user. Example: "You have successfully updated blah..." If I use requestDispatcher.forward() in controllers and the user refreshes (after the Controller has passed control to view/jsp) the page by confirming resend

How to put Bootstrap ValidationMessageFor in correct position?

微笑、不失礼 提交于 2019-12-05 01:07:10
问题 I am using bootstrap for my web application, and I have problem with validationmessagefor puting message state in correct position. Now I have use this example from this link, with this code: <div class="control-group error"> <label class="control-label" for="inputError">Input with error</label> <div class="controls"> <input type="text" id="inputError"> <span class="help-inline">Please correct the error</span> </div> </div> Now code that I use: <h4 class="form-signin-heading">Please sign in<

How to add a touchable Url link to a url in a UIAlertView's message?

天大地大妈咪最大 提交于 2019-12-05 00:10:40
I want to add a clickable link of an url into UIAlertView 's message. Such that when user sees the alert view, they can can touch on link inside message. Alternatively they can go next by clicking on the OK button. Is possible to do it? How? sergio The only way I see to implement what you are trying to is through a custom alert view. There are several approaches that you can take. One is subclassing UIAlertView and here you can find a short tutorial: Subclass UIAlertView . In your subclass you could then build the alert any way you like to implement the touch-enabled text. Have a look at this

CodeIgniter reusable message library

北城以北 提交于 2019-12-04 20:54:31
I'm using Message library ( http://codeigniter.com/wiki/Message/ ) to display error messages on my site. This is the code that I'm using to display a message: $this->message->set('error',$this->config->item('error.login')); Right now I'm storing common messages in my config file (config/config.php) instead of writing the message every time. Is there a better way to do it? The config file is getting very long. What I'm looking for is a better way to store re-usable text strings. CodeIgniter's language class is what you're looking for: CI Language Class $this->message->set('error',$this->lang-

Spring MVC - How to show a message in view until a download starts

非 Y 不嫁゛ 提交于 2019-12-04 19:18:55
I have a Controller which allows users to download a file. The problem is that depending on the params sent to the controller, the controller will zip different folders and send them to the clients, and zipping can take sometimes 2 minutes, time while the user is prompted with an empty browser tab and a loading header. Is there a way I could show a message to the user until the file is zipped and download really starts? Something like "Please wait, your file is being prepared for download!" Thank you! This is not specific to spring mvc - you can do this with any sort of web based action (like