Search Results

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

Page 121/858 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Android Thumbnail Loading Problem

    - by y ramesh rao
    I'm using a thumbnail loader in my project the one mentioned below. The problem is that the it loads all the thumbnails properly except the ones who's size is of about 40K. When our back end is giving that sort of thumbnails are not generated and sometimes this eventually leads to a Crash too. What m I supposed to do with this ? public class ThumbnailManager { private final Map<String, Bitmap> drawableMap; public static Context context; private Resources res; private int thumbnail_size; public ThumbnailManager() { drawableMap = new HashMap<String, Bitmap >(); res = new Resources(context.getAssets(), null, null); thumbnail_size = res.getInteger(R.ThumbnailManager.THUMBNAIL_SIZE); } public Bitmap fetchBitmap(String urlString) { if(drawableMap.containsKey(urlString)) { return (drawableMap.get(urlString)); } //Log.d(getClass().getSimpleName(), " Image URL :: "+ urlString); try { InputStream is = fetch(urlString); android.util.Log.v("ThumbnailManager", "ThumbnailManager " + urlString); drawableMap.put(urlString, BitmapFactory.decodeStream(is));//Bitmap.createScaledBitmap(BitmapFactory.decodeStream(is), thumbnail_size, thumbnail_size, false)); return drawableMap.get(urlString); } catch(Exception e) { android.util.Log.v("EXCEPTION", "EXCEPTION" + urlString); return null; } } public void fetchBitmapOnThread(final String urlString, final ImageView imageView) { if(drawableMap.containsKey(urlString)) { imageView.setImageBitmap(drawableMap.get(urlString)); return; } if(urlString.compareTo("AUDIO") == 0) { Bitmap audioThumb = BitmapFactory.decodeResource(context.getResources(), R.drawable.timeline_audio_thumb); drawableMap.put(urlString, Bitmap.createScaledBitmap(audioThumb, thumbnail_size, thumbnail_size, false)); imageView.setImageBitmap(drawableMap.get(urlString)); return; } final Handler handler = new Handler() { public void handleMessage(Message message) { imageView.setImageBitmap((Bitmap) message.obj); } }; Thread thread = new Thread() { public void run() { Bitmap urlBitmap = fetchBitmap(urlString); Message message = handler.obtainMessage(1, urlBitmap); handler.sendMessage(message); } }; thread.start(); } public InputStream fetch(String urlString) throws IOException, MalformedURLException { final URL url = new URL(urlString); final URLConnection conn = url.openConnection(); HttpURLConnection httpConn = (HttpURLConnection) conn; httpConn.setAllowUserInteraction(true); httpConn.setInstanceFollowRedirects(true); httpConn.setRequestMethod("GET"); httpConn.connect(); return(conn.getInputStream()); } }

    Read the article

  • Help with Uitextfield....

    - by Skov
    Hey .... im working on a Iphone app ..i cant get this working: i want this alert to show up if the text field is empty when clicking the button linked to "timedAlarm" and if the text filed has a text i want it to go ahead and do the local notification, every thing works fine, until i put in this code before all the code for the notification, i have tried a lot of ways, but it wont work, either the alert shows up, even if there is a text, or els the alert wont show. - (IBAction) timedAlarm { if (eventText.text != nil){ UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Excuse Me !" message:@"Plz enter an alarm text" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [message show]; [message release]; }else { Hope u can help me :-D Rene Skov

    Read the article

  • Accessing an Access DB from Outlook via VBA

    - by camastanta
    Hi The situation: In Outlook I get a message from a server. The content of the message needs to be put into an Access db. But, there may not exist another message with the same date. So, I need to look into a db if there is already a message with the same date and time. If there exists one, then it needs to be replaced and otherwise the message needs to be added to the database. The database contains a list of current positions from the vehicles on the road. The problem: I have problems to compare a date time with a date time in an Access DB via VBA. The query I use returns no records but there is a record in the database. This is the query I use: adoRS.Open "SELECT * FROM currentpositions WHERE ((currentpositions. [dateLT])=" & "#" & date_from_message & "#" & ")", adoConn, adOpenStatic, adLockOptimistic Second I need to now what the result is of that query. How can I determine the number of records that my query gives me? Thanks camastanta

    Read the article

  • How do I know if a boost thread is done ?

    - by jules
    I am using boost::thread to process messages in a queue. When a first message comes I start a message processing thread. When a second message comes I check if the message processing thread is done. if it is done I start a new one if it is not done I don nothing. How do I know if the thread is done ? I tried with joinable() but it is not working, as when the thread is done, it is still joinable. I also tried to interrupt the process at once, and add an interruption point at the end of my thread, but it did not work. Thanks

    Read the article

  • RadGrid Ajax PopAlert

    - by user272671
    I have a situation where I need to, based on user selection and some server-side processing, display a message to allow user to choose to continue processing or cancel. I have a RadGrid populated with data from the database. When User adds a new item to the grid,I want to do some processing in the back end and then inform the user of what could result and give him/her the choice to continue and believe that a message box or modal popup/radalert is the best way to do it, but how do I create the message in the back end and then using a popup, display the message and block until user responds. How do I do it please?

    Read the article

  • Mail Server on Google Apps, Hotmail Blocks

    - by detay
    My company provides private research tools (sites) for companies. Each site has its own domain name and users. These sites need to be able to send outbound mail for notifications such as password reminders. We started using Google Apps for this purpose, but lately we are having tremendous problems with mailing, especially to hotmail. I added the SPF record as required. Mxtoolbox says my domains are not in any blacklists. I was told to contact https://postmaster.live.com/snds/addnetwork.aspx and add my network. Given that I am using google's mail servers for sending mail, should I add their IP address for registering my domain? Or should I add my server's IP even though I am not hosting the mail server on it? Here's an example of a returned message; > Delivered-To: [email protected] Received: by 10.112.1.195 with SMTP > id 3csp62757lbo; > Mon, 10 Dec 2012 10:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; > d=gmail.com; s=20120113; > h=mime-version:from:to:x-failed-recipients:subject:message-id:date > :content-type; > bh=x41JiCH75hsonh+5c/kzwIs7R8u4Hum2u396lkV3g2w=; > b=v+bBPvufqfVkNz2UrnhyyoGj1Cuwf6x/yMj0IXJgH27uJU7TqBOvbwnNHf33sQ7B9T > uGzxwryC2fmxBh72cGz1spwWK348nUp6KK73MXKnF8mpc3nPQ8Ke+EQpSPeJdq/7oZvd > scZTGpy//IiGEUDU5bJ7YPqYXQRycY5N6AF5iI4mWWwbS4opybp3IKpDDktu11p/YEEO > Fj9wnSCx3nLMXB/XZgSjjmnaluGhYNdh3JFtz83Vmr50qXTG/TuIXlkirP73GfGvIt2S > 7sy8/YdEbZR92mYe9wucditYr7MOuyjyYrZYCg+weXeTZiJX1PfBVieD+kD9MnCairnP > rQeQ== Received: by 10.14.215.197 with SMTP id e45mr52766237eep.0.1355164974784; > Mon, 10 Dec 2012 10:42:54 -0800 (PST) MIME-Version: 1.0 Return-Path: <> Received: by 10.14.215.197 with SMTP id > e45mr65950764eep.0; Mon, 10 Dec 2012 10:42:54 -0800 (PST) From: Mail > Delivery Subsystem <[email protected]> To: > [email protected] X-Failed-Recipients: ********@hotmail.fr > Subject: Delivery Status Notification (Failure) Message-ID: > <[email protected]> Date: Mon, 10 Dec 2012 > 18:42:54 +0000 Content-Type: text/plain; charset=ISO-8859-1 > > Delivery to the following recipient failed permanently: > > *********@hotmail.fr > > Technical details of permanent failure: Message rejected. See > http://support.google.com/mail/bin/answer.py?answer=69585 for more > information. > > ----- Original message ----- > > Received: by 10.14.215.197 with SMTP id > e45mr52766228eep.0.1355164974700; > Mon, 10 Dec 2012 10:42:54 -0800 (PST) Return-Path: <[email protected]> Received: from WIN-1BBHFMJGUGS ([91.93.102.12]) > by mx.google.com with ESMTPS id l3sm26787704eem.14.2012.12.10.10.42.53 > (version=TLSv1/SSLv3 cipher=OTHER); > Mon, 10 Dec 2012 10:42:54 -0800 (PST) Message-ID: <[email protected]> MIME-Version: 1.0 > From: [email protected] To: *********@hotmail.fr Date: Mon, 10 Dec > 2012 10:42:54 -0800 (PST) Subject: Rejoignez-nous sur achbanlek.com > Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: > base64 > > ----- End of message -----

    Read the article

  • PHP Form - Empty input enter this text - Validation

    - by James Skelton
    No doubt very simple question for someone with php knowledge. I have a form with a datepicker, all is fine when a user has selected a date the email is send with: Date: 2012 04 10 But i would like if the user has skipped this and left blank (as i have not made this required) to send as: Date: Not Entered (<-- Or something) Instead at the minute of course it reads: Date: Form input <input type="text" class="form-control" id="datepicker" name="datepicker" size="50" value="Date Of Wedding" /> This is the validator $(document).ready(function(){ //validation contact form $('#submit').click(function(event){ event.preventDefault(); var fname = $('#name').val(); var validInput = new RegExp(/^[a-zA-Z0-9\s]+$/); var email = $('#email').val(); var validEmail = new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/); var message = $('#message').val(); if(fname==''){ showError('<div class="alert alert-danger">Please enter your name.</div>', $('#name')); $('#name').addClass('required'); return;} if(!validInput.test(fname)){ showError('<div class="alert alert-danger">Please enter a valid name.</div>', $('#name')); $('#name').addClass('required'); return;} if(email==''){ showError('<div class="alert alert-danger">Please enter an email address.</div>', $('#email')); $('#email').addClass('required'); return;} if(!validEmail.test(email)){ showError('<div class="alert alert-danger">Please enter a valid email.</div>', $('#email')); $('#email').addClass('required'); return;} if(message==''){ showError('<div class="alert alert-danger">Please enter a message.</div>', $('#message')); $('#message').addClass('required'); return;} // setup some local variables var request; var form = $(this).closest('form'); // serialize the data in the form var serializedData = form.serialize(); // fire off the request to /contact.php request = $.ajax({ url: "contact.php", type: "post", data: serializedData }); // callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('.contactWrap').show( 'slow' ).fadeIn("slow").html(' <div class="alert alert-success centered"><h3>Thank you! Your message has been sent.</h3></div> '); }); // callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // log the error to the console console.error( "The following error occured: "+ textStatus, errorThrown ); }); }); //remove 'required' class and hide error $('input, textarea').keyup( function(event){ if($(this).hasClass('required')){ $(this).removeClass('required'); $('.error').hide("slow").fadeOut("slow"); } }); // show error showError = function (error, target){ $('.error').removeClass('hidden').show("slow").fadeIn("slow").html(error); $('.error').data('target', target); $(target).focus(); console.log(target); console.log(error); return; } });

    Read the article

  • [MSBuild] Problem with setting properties 's values.

    - by Nam Gi VU
    Let's consider the below example. There, I have: target MAIN call target t then call target tt. target t call target ttt, target tt call target tttt. target t define property aa, target ttt modify aa. target tttt try to print property aa 's value. in short we have: MAIN - {t - {ttt-modify aa, define aa}, tt - tttt - print aa} But in target tttt, we can't "see" aa's updated value (by ttt)! Please help me to make that value visible to target tttt. Thank you! The whole script is as below: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MAIN" > <Target Name="MAIN" > <CallTarget Targets="t" /> <CallTarget Targets="tt" /> </Target> <Target Name="t"> <Message Text="t" /> <PropertyGroup> <aa>1</aa> </PropertyGroup> <CallTarget Targets="ttt" /> </Target> <Target Name="tt"> <Message Text="tt" /> <CallTarget Targets="tttt" /> </Target> <Target Name="ttt"> <PropertyGroup> <aa>122</aa> </PropertyGroup> <Message Text="ttt" /> </Target> <Target Name="tttt"> <Message Text="tttt" /> <Message Text="tttt:$(aa)" /> </Target> </Project>

    Read the article

  • Can jQuery's fadeIn work without AJAX?

    - by Thierry Lam
    I'm submitting a form, sometimes I have some messages that I want to show to the user. I want those messages to jQuery fadeIn after they click on the submit button. Is it possible to achieve that if the submission doesn't involve any AJAX? Here's a sample Django/Python code: # View code message = 'feedback to user' # Template <div id="messages">{{ message }}</div> The equivalent PHP code of the above might be: <?php $message = 'feedback to user'; ?> <div id="messages"><?= $message ?></div> I want #messages above to fade in after a POST. How can I achieve that?

    Read the article

  • Returning JSON or XML for Exceptions in Jersey

    - by Dominic
    My goal is to have an error bean returned on a 404 with a descriptive message when a object is not found, and return the same MIME type that was requested. I have a look up resource, which will return the specified object in XML or JSON based on the URI (I have setup the com.sun.jersey.config.property.resourceConfigClass servlet parameter so I dont need the Accept header. My JAXBContextResolver has the ErrorBean.class in its list of types, and the correct JAXBContext is returned for this class because I can see in the logs). eg: http://foobar.com/rest/locations/1.json @GET @Path("{id}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Location getCustomer(@PathParam("id") int cId) { //look up location from datastore .... if (location == null) { throw new NotFoundException("Location" + cId + " is not found"); } } And my NotFoundException looks like this: public class NotFoundException extends WebApplicationException { public NotFoundException(String message) { super(Response.status(Response.Status.NOT_FOUND). entity(new ErrorBean( message, Response.Status.NOT_FOUND.getStatusCode() ) .build()); } } The ErrorBean is as follows: @XmlRootElement(name = "error") public class ErrorBean { private String errorMsg; private int errorCode; //no-arg constructor, property constructor, getter and setters ... } However, I'm always getting a 204 No Content response when I try this. I have hacked around, and if I return a string and specify the mime type this works fine: public NotFoundException(String message) { super(Response.status(Response.Status.NOT_FOUND). entity(message).type("text/plain").build()); } I have also tried returning an ErrorBean as a resource. This works fine: {"errorCode":404,"errorMsg":"Location 1 is not found!"}

    Read the article

  • Troubles with a PHP session variable after form submission

    - by Psyche
    Hello, I'm setting a PHP session variable with a success message for a HTML form that I'm submitting. If there are no form errors, I redirect to the same page (using header()) and display the message from the session variable. Everything is fine until here, but if I access that page again after submission, the message is still there. Is it possible to make it appear only when I redirect after a successful submit? Thank you.

    Read the article

  • Do I need to specify a return type for an anonymous function in javascript / typescript?

    - by Anne
    I have the following function: $('td:eq(' + iColumn + ') input', oSettings.oApi._fnGetTrNodes(oSettings)) .each(function () { aData.push(this.value); }); In typescript I am getting a message saying: Error 3 Function declared a non-void return type, but has no return expression Why am I getting this message? I can resolve the message by saying "return true". Should I always specify a return type for this?

    Read the article

  • How can chunks be allocated in a node.js stream in object mode all at once?

    - by Quentin Engles
    I can see how buffers, and strings can be sent as chunks, but I'm having a problem thinking about how streams can be dealt when working in object mode. Say I have a byte stream from an http request message. I want to take that message, parse, and then transform it into one big object. I already know how to parse the message. What I'm wondering is if the message is big so it has many chunks, but I want to make one object for the output how can I make sure the data event waits for the whole thing? Is this just a matter of not using the push method until the chunked data has finished being sent? That would then restrict the stream data output to a smaller object which I think I'm fine with for now. As an added condition the larger data will be reduced in size after the the transform.

    Read the article

  • How messages flows between computers connected with Internet or LAN ?

    - by Praveen
    Hi All, I have been doing Windows programming in .Net since last two years. Now I am shifting to web programming so I just stuck in understanding the fundamentals of web programming, after googling I came to StackOverflow to learn from all of you great guys. My confusion is about how messages flow between systems in distributed enviornment ? I mean suppose I want to send a message "Hello" to a system connected to LAN or Internet, then what will be the steps taken to send the message. Second thing is suppose my system is "A" and I wana send message to system "B" which is connected via a wire, so how the message flows on wire and how system "B" reads it from the wire ? Please someone explain me in a layman terms. Thank you all in advance.

    Read the article

  • sendmail.php needs some php work

    - by Chris
    I am having the hardest time to get a simple sendmail.php to work. My form html is <form action=sendmail.php id=contact-form method=post> <p> <label for=cf_name>Name *</label> <input id=cf_name name=cf_name placeholder='Enter your name...' required=required title=Name type=text /> </p> <p> <label for=cf_email>Email *</label> <input id=cf_email name=cf_email placeholder='Email address...' required=required title='Email address' type=email /> </p> <p> <label for=cf_subject>Subject *</label> <input id=cf_subject name=cf_subject placeholder='Specify subject...' required=required title=Subject type=text /> </p> <p> <label for=cf_message>Message *</label> <textarea id=cf_message name=cf_message placeholder='Message text...' required=required rows=10 title='Message text'></textarea> </p> <p> <input type=submit value='Send message'/> </p> </form> And my mailer script is: <? $cf_email = $_POST['cf_email'] ; $cf_message = $_POST['cf_message'] ; $cf_subject = $_POST['cf_subject'] ; $cf_name = $_POST['cf_name'] ; mail( "[email protected]", $cf_subject, $cf_message, $cf_name, $cf_email ); print "Congratulations your email has been sent"; ?> Just want an email to to go to my email. When it appears in the inbox, the subject they typed is the one that I will see as the subject in my inbox. The from will be their name. The email it came from will be their email And the message inside will be the message they wrote in the form. Please help.

    Read the article

  • S3 browser upload via POST: unable to handle errors gracefully

    - by samf
    I am writing an app where I want the customer to be able to upload to Amazon S3 straight from the browser. I can make this work just fine. But when errors occur, I want to handle them more gracefully than splattering an XML document on the customer's screen. I have a scheme that I think would work, but it's failing. Here's what I'm trying: Create a form to do the upload, and store the form on S3 itself, in the same domain as the "action" attribute of the form. Redirect the customer to this form. Now their browser is sitting on https://<bucket>.s3.amazonaws.com/something. The page contains a hidden iframe. The form sets its target to the iframe. The load event handler looks at the contents of the iframe, and acts upon it. So, something like this: <iframe id="foo" name="foo" style="display: none" /> <form target="foo" action="https://<bucket>.s3.amazonaws.com/"> <input type="hidden" name="..." value="..." /> <input type="file" name="file" /> </form> with this javascript (using jquery): function handler() { var message = $("#foo").contents().find('message').text(); alert(message); } $("#foo").load(handler); Using firebug, I can see that the iframe contains an XML document, that contains a "message" node. However, the .find('message') always fails to find anything within the XML document. Notice that the action of the form has the same domain, port, and scheme as the document itself. So, I don't think that I should be running afoul of the same-origin policy. Right? But it fails every time. This is using Firefox and Google Chrome browsers. Thanks for any advice!

    Read the article

  • How do I post a link to the feed of a page via the Graph API *as* the page?

    - by jsdalton
    I'm working on a plugin for a Wordpress blog that posts a link to every article published to a Facebook Page associated with the blog. I'm using the Graph API and I have authenticated myself, for the time being, via OAuth. I can successfully post a message to the page using curl via a POST request to https://graph.facebook.com/{mypageid}/feed` with e.g. message = "This is a test" and it published the message. The problem is that the message is "from" my user account. I'm an admin on this test page, and when I go to Facebook and post an update from the web, the link comes "from" my page. Is there a way to authenticate myself as a page? Or is there an alternate way to POST to a page feed that doesn't end up being interpreted as a comment from a user? Thanks for any thoughts or suggestions.

    Read the article

  • Please suggest other ways of communicating between server & client.

    - by Geo
    I'm writing a TCP chat server ( programming language does not mather ). It's a school project for my nephew, so it won't be released, and all questions I'm asking are just for my knowledge :). . Some of the things it will support: chatting between users ( doh ), it will be multithreaded sending each other files I know I could easily get away with all the stuff above if I go with serialization, and just send objects from client to server and back. But, if I do that, it will be limited to a specific programming language ( meaning clients written in other programming languages may not be able to deserialize the objects ). What would be the way to go so that other clients written in other languages could be supported? One way to go, off the top of my head, would be to go in this direction: the server & the client communicate by sending messages & chunks ( in lieu of other names ). Here's what I mean by this: every time the client/server wants to send something ( text message or file ) it will first send a simple text message ( newline terminated ) with the number of the chunks it will send. Example: command 4,20,30,40,50 Where command would be something like instant-message or file,4 would be the number of chunks to be sent, 20 would be the size in bytes of the first chunk, 30 of the 2nd, and so forth. after the message was sent, the client/server will start sending chunks ( of sizes mentioned in the sent message ). What do you think about implementing the client/server communication this way? What better options are there?

    Read the article

  • PHP mail sending duplicates with different timestamp

    - by brhea
    Hi all, I've got a PHP/AJAX form on my site at http://www.brianrhea.com (click Request Project) When I test the form from multiple computers, it works fine for me. However, I will sporadically receive a duplicate e-mail and have heard from at least one user who tried to submit that it gave them an alert error which I am unable to duplicate. This is the PHP that I'm using. Is there anything that stands out as a potential issue? <?php //Retrieve form data. //GET - user submitted data using AJAX //POST - in case user does not support javascript, we'll use POST instead $name = ($_GET['name']) ? $_GET['name'] : $_POST['name']; $email = ($_GET['email']) ?$_GET['email'] : $_POST['email']; $subject = ($_GET['subject']) ?$_GET['subject'] : $_POST['subject']; $comments = ($_GET['comments']) ?$_GET['comments'] : $_POST['comments']; //flag to indicate which method it uses. If POST set it to 1 if ($_POST) $post=1; //Simple server side validation for POST data, of course, you should validate the email if (!$name) $errors[count($errors)] = 'Please enter your name.'; if (!$email) $errors[count($errors)] = 'Please enter your email.'; if (!$subject) $errors[count($errors)] = 'Please choose a subject.'; if (!$comments) $errors[count($errors)] = 'Please enter your comments.'; //if the errors array is empty, send the mail if (!$errors) { //recipient $to = '[email protected]'; //sender $from = $name . ' <' . $email . '>'; //subject and the html message $subject = 'Comment from ' . $name; $message = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head></head> <body> <table> <tr><td>Name</td><td>' . $name . '</td></tr> <tr><td>Email</td><td>' . $email . '</td></tr> <tr><td>Subject</td><td>' . $subject . '</td></tr> <tr><td>Comments</td><td>' . nl2br($comments) . '</td></tr> </table> </body> </html>'; //send the mail $result = sendmail($to, $subject, $message, $from); //if POST was used, display the message straight away if ($_POST) { if ($result) echo 'Thank you! We have received your message.'; else echo 'Please verify that you have entered a valid email address.'; //else if GET was used, return the boolean value so that //ajax script can react accordingly //1 means success, 0 means failed } else { echo $result; } //if the errors array has values } else { //display the errors message for ($i=0; $i<count($errors); $i++) echo $errors[$i] . '<br/>'; echo '<a href="form.php">Back</a>'; exit; } //Simple mail function with HTML header function sendmail($to, $subject, $message, $from) { $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= 'From: ' . $from . "\r\n"; $result = mail($to,$subject,$message,$headers); if ($result) return 1; else return 0; } ?>

    Read the article

  • Printing the "source" class in a log statement with a log4j wrapper

    - by Dur4ndal
    My application has a homebrew logging class that I'm migrating to using log4j under the covers. However, since I'm using the homebrew class to pass the rest of the application's logging statements to log4j, the output statements are logged as coming from the wrapper class instead of the source class. Is there a way to ensure that the "correct" source is being shown besides creating new org.apache.log4j.Logger instances for every log statement? I've also tried using the Logger.log(String callerFQCN, Priority level, Object message, Throwable t) method, but it doesnt seem to be working, for example: public class Logger2 { public static org.apache.log4j.Logger log4JLogger = org.apache.log4j.Logger.getLogger(Logger2.class); public static void warning(Object source, String message) { log(source, message, Level.WARN, null) } private static void log(Object source, String message, Level level, Throwable t) { String className = source.getClass().getName(); System.out.println("Logging class should be " + className); log4JLogger.log(className, loggingLevel, message, t); } } When called by: public void testWarning() { Logger2.warning(new Integer(3), "This should warn"); } Prints: Logging class should be java.lang.Integer 2010-05-25 10:49:57,152 WARN test.Logger2 - This should warn

    Read the article

  • iPhone Notifications is possible to...

    - by user331769
    Hi to all, I read more post regarding iPhone notification, and I have a simple question.... Where a device receive a notification (so I can display a message contains the message notificatio ti advise the user). I understand that message is managed by the application. The question is: ...when my application receive the notification is it possible to start it? Or in other world the application became run when receive the notification or it simple became active only to manage the message and at the end of notification management the app return to sleep? The main application windows is opened on the device ? Many thanks in advance Lukenukem Ciao

    Read the article

  • Why is this global variable not being changed???

    - by user398314
    Why does this turn up null instead of being set to the data returned from the ajax call? It must be something simple i am overlooking. var message; $(document).ready(function(){ fbFetchMessage(); alert(message); }); function fbFetchMessage(){ var url = "http://graph.facebook.com/companyname/feed?callback=?"; $.getJSON(url,function(json){ message = json.data[0].message; }); }

    Read the article

  • How to get OMElement by name in mediate?

    - by luohao
    I have a response message like this: <message> <header> <TransactionID>1</TransactionID> <Timestamp>2012-05-22 10:10:36</Timestamp> <OpCode>BOSS_DELETE_USER_SME.CD</OpCode> <MsgType>RESP</MsgType> <ReturnCode>1016</ReturnCode> <ErrorMessage>uif return error message!</ErrorMessage> </header> </message> I need convert RetuenCode "1016" to "0" in extension class. How to get OMElement "ReturnCode" in mediate? My code is failed. SOAPEnvelope envelope = context.getEnvelope(); SOAPBody soapBody = envelope.getBody(); QName ReturnCode = new QName(null, "ReturnCode"); OMElement response = soapBody.getFirstChildWithName(ReturnCode);

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >