Daily Archives

Articles indexed Wednesday June 9 2010

Page 25/126 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • how to show &lt;html&gt; in textarea

    - by saturngod
    In textarea, I load text from database and then show in textarea. I have a problem, textarea not show &lt; and &gt;. It has been changed to < and . <textarea>&gt;html&gt;</textarea> in textarea , change to . I want to show &lt;html&gt; , how to make it ?

    Read the article

  • Extending JavaScript's Date.parse to allow for DD/MM/YYYY (non-US formatted dates)?

    - by Campbeln
    I've come up with this solution to extending JavaScript's Date.parse function to allow for dates formatted in DD/MM/YYYY (rather then the American standard [and default] MM/DD/YYYY): (function() { var fDateParse = Date.parse; Date.parse = function(sDateString) { var a_sLanguage = ['en','en-us'], a_sMatches = null, sCurrentLanguage, dReturn = null, i ; //#### Traverse the a_sLanguages (as reported by the browser) for (i = 0; i < a_sLanguage.length; i++) { //#### Collect the .toLowerCase'd sCurrentLanguage for this loop sCurrentLanguage = (a_sLanguage[i] + '').toLowerCase(); //#### If this is the first English definition if (sCurrentLanguage.indexOf('en') == 0) { //#### If this is a definition for a non-American based English (meaning dates are "DD MM YYYY") if (sCurrentLanguage.indexOf('en-us') == -1 && // en-us = English (United States) + Palau, Micronesia, Philippians sCurrentLanguage.indexOf('en-ca') == -1 && // en-ca = English (Canada) sCurrentLanguage.indexOf('en-bz') == -1 // en-bz = English (Belize) ) { //#### Setup a oRegEx to locate "## ## ####" (allowing for any sort of delimiter except a '\n') then collect the a_sMatches from the passed sDateString var oRegEx = new RegExp("(([0-9]{2}|[0-9]{1})[^0-9]*?([0-9]{2}|[0-9]{1})[^0-9]*?([0-9]{4}))", "i"); a_sMatches = oRegEx.exec(sDateString); } //#### Fall from the loop (as we've found the first English definition) break; } } //#### If we were able to find a_sMatches for a non-American English "DD MM YYYY" formatted date if (a_sMatches != null) { var oRegEx = new RegExp(a_sMatches[0], "i"); //#### .parse the sDateString via the normal Date.parse function, but replacing the "DD?MM?YYYY" with "YYYY/MM/DD" beforehand //#### NOTE: a_sMatches[0]=[Default]; a_sMatches[1]=DD?MM?YYYY; a_sMatches[2]=DD; a_sMatches[3]=MM; a_sMatches[4]=YYYY dReturn = fDateParse(sDateString.replace(oRegEx, a_sMatches[4] + "/" + a_sMatches[3] + "/" + a_sMatches[2])); } //#### Else .parse the sDateString via the normal Date.parse function else { dReturn = fDateParse(sDateString); } //#### return dReturn; } })(); In my actual (dotNet) code, I'm collecting the a_sLanguage array via: a_sLanguage = '<% Response.Write(Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]); %>'.split(','); Now, I'm not certain my approach to locating "us-en"/etc. is the most proper. Pretty much it's just the US and current/former US influenced areas (Palau, Micronesia, Philippines) + Belize & Canada that use the funky MM/DD/YYYY format (I am American, so I can call it funky =). So one could rightly argue that if the Locale is not "en-us"/etc. first, then DD/MM/YYYY should be used. Thoughts? As a side note... I "grew up" in PERL but it's been a wee while since I've done much heavy lifting in RegEx. Does that expression look right to everyone? This seems like a lot of work, but based on my research this is indeed about the best way to go about enabling DD/MM/YYYY dates within JavaScript. Is there an easier/more betterer way? PS- Upon re-reading this post just before submission... I've realized that this is more of a "can you code review this" rather then a question (or, an answer is embedded within the question). When I started writing this it was not my intention to end up here =)

    Read the article

  • How to make an application like google transliteration desktop application in c#

    - by Thunder
    I would like to make a application that accepts the entry from keyboard modify it and send it to the active window (may be application like word, excel,notepad windows screens ) etc. It the feature is just like google's transliteration application for windows . I would like to do it in c# . I think this involves hooking in the keyboard and sending keys (like sendkey in vb) to the current window.

    Read the article

  • Outlook email address autocompletion slow

    - by user214984
    Hello, I'm using outlook 2007. Two days ago, we've enabled auto-archiving, maybe that't the source of our problems, but I still have to investigate. At any rate, auto completion of email addresses in the to/cc/bcc fields has become a stopper, taking up to a minute to do something. I've searched the web, but found only references to problems with McAfee which I don't have installed (http://www.groovypost.com/howto/microsoft/outlook/fix-slow-outlook-email-address-auto-complete/) Thanks Holger

    Read the article

  • How to set different colors to the bars in stacked bar chart in ireport ?

    - by Purushotham
    Hi, I need to set a unique color to each bar in the stacked bar chart. Whatever the color I see in one bar it shouldn't be repeated in any other bar or any other stack. For example: I have 5 bars in the report. Each bar has 3 different stacks. I want to apply a red related colors to the first bar and its stacks. Second bar should have blue related colors. etc.. It is showed in the attached image. The image shows a very basic requirement what we want. Just created using a normal ms paint. Stacked Bar MS Paint Image

    Read the article

  • Windows XP, USB-Stick and multiple Partitions

    - by Bobby
    Hello. I've got an USB-Stick with multiple Partitions on it (FAT32 (active), FAT32, Ext2 <-- that's another story) and it seems like that my Windows XP can only mount the first partition of the stick. If I try to mount the second one using the volume manager it tells me that I need to make it active and reboot...is it really that limited or am I just missing something here? Partitions: FAT32, System Rescue CD, bootable and active FAT32, some tools ext2, some data (I know that I need extra drivers etc., but that's not asked here. Edit (Solution): Thanks to the answer with the RMB (ReMoveable Bit) I was able to dig up a solution described at this site (Section: On flash drive only the first partition works). Basically, there's an Hitachi Driver available which filters the RMB on Driver-Level, which just needs to be a little modified to function with basically every USB-Stick. All you need to do is adding the "Device Instance ID" to the driver and then use this driver.

    Read the article

  • Booting ubuntu from usb hdd: GRUB menu not shown

    - by emanemos
    Hello, could anyone help me to boot ubuntu-9.04 from usb hard disk? This disk contains /boot primary partition. During ubuntu installation I used "Advanced" button and asked to install GRUB to the /boot partition. Later I checked whether GRUB files are really present in this partition. They are. However, I get stuck while trying to boot. The boot menu ("ubuntu generic version", "ubuntu recovery mode", etc...) is not shown. Instead I am thrown to GRUB minimal bash-like version. I feel at a loss and have no idea why I am pointed to this minimal version. Can anybody prompt me what to do?

    Read the article

  • How to detect non-graceful disconnect of Twisted on Linux?

    - by Victor Lin
    I wrote a server based on Twisted, and I encountered a problem, some of the clients are disconnected not gracefully. For example, the user pulls out the network cable. For a while, the client on Windows is disconnected (the connectionLost is called, and it is also written in Twisted). And on the Linux server side, my connectionLost of twisted is never triggered. Even it try to writes data to client, but the connection is lost. Why Twisted can't detect those non-graceful disconnection (even write data to client) on Linux? How to makes Twisted detect non-graceful disconnections? Because the feature Twisted can't detect non-graceful, I have lots of zombie user on my server. Thanks. Victor Lin.

    Read the article

  • Web2py controllers with parameters?

    - by nickfranceschina
    I am building an app using Web2py framework... I don't want to have to use the request object to get all of the querystring parameters, instead I'd like to build my controller with named parameters and have the router unpack the querystring (or form data) dictionary into the named parameters and call my controller. so instead of a controller method of create_user(): where I would use the global request() object and look through the vars list... I would prefer instead to have create_user(first_name, last_name, email): like I see in other MVC platforms. is this possible in Web2py already? or is there a plugin for it? or do I need to add that myself?

    Read the article

  • Powerpoint displays a "can't start the application" error when an Excel Chart object is embedded in

    - by A9S6
    This is a very common problem when Excel Worksheet or Chart is embedded into Word or Powerpoint. I am seeing this problem in both Word and Powerpoint and the reason it seems is the COM addin attached to Excel. The COM addin is written in C# (.NET). See the attached images for error dialogs. I debugged the addin and found a very strange behavior. The OnConnection(...), OnDisConnection(...) etc methods in the COM addin works fine until I add an event handler to the code. i.e. handle the Worksheet_SheetChange, SelectionChange or any similar event available in Excel. As soon as I add even a single event handler (though my code has several), Word and Powerpoint start complaining and do not Activate the embedded object. On some of the posts on the internet, people have been asked to remove the anti-virus addins for office (none in my case) so this makes me believe that the problem is somewhat related to COM addins which are loaded when the host app activates the object. Does anyone have any idea of whats happening here?

    Read the article

  • how to save Audiorecorded file to another location? i m trying but i got exception...

    - by rakesh-bhatt99
    NSString recordFile = [NSTemporaryDirectory() stringByAppendingPathComponent: (NSString)inRecordFile]; NSArray *docPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString docDir=[[docPaths objectAtIndex:0]stringByAppendingPathComponent: (NSString)inRecordFile]; url = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)docPaths, NULL); // create the audio file XThrowIfError(AudioFileCreateWithURL(url, kAudioFileCAFType, &mRecordFormat, kAudioFileFlags_EraseFile, &mRecordFile), "AudioFileCreateWithURL failed"); CFRelease(url);

    Read the article

  • Number of times a iphone app installed

    - by thndrkiss
    Hi, I am new to iphone stuff. After deploying an application in iTunes is there a way to find out the number of iphone/ipod touch which has installed / uninstalled this application ? During uninstall the user is asked to rate the application, how to get that information with a developer license credentials ?

    Read the article

  • How to debug Perl program sudden exits?

    - by taw
    I have Perl program based on io::async, and it sometimes just exits after a few hours/days without printing any error message whatsoever. There's nothing in dmesg or /var/log either. STDOUT/STDERR are both autoflush(1) so data shouldn't be lost in buffers. It doesn't actually exit from IO::Async::Loop->loop_forever - print I put there just to make sure of that never gets triggered. Now one way would be to keep peppering the program with more and more prints and hope one of them gives me some clue. Is there better way to get information what was going on in a program that made it exit/silently crash?

    Read the article

  • Upgrade URL for SEO from mysite.com/dbtable_id/ to mysite.com/dbtable_id/article-title

    - by John
    I have an existing journal website with the following url structure http://mysite.com/dbtable_id/ (eg. http://mysite.com/89348/) where 89348 is the primary key id of the journal article. I want to add the title of the article to the url for SEO purposes like http://mysite.com/dbtable_id/article-title (eg. http://mysite.com/89348/hello-world) I like this approach because I don't need to change the PHP code since it will still look up the article by dbtable_id. All I have to do is append url friendly titles to relevant links in template files and add one more rule to a .htaccess file. Is there anything I should be concerned about? Am I following best practices? Will the possibility for mismatch between "dbtable_id" and "article-title" affect SEO?

    Read the article

  • iPhone Map issue

    - by Shibin Moideen
    Hi all, I am working on a map application in iPhone. While loading the MapViewController the map is not loaded automatically in the mapView, When we drag the mapView the area outside the intial view is loaded. Also when we double tap on the map it get start loading. Can anybody help me fixing this.? Thanks in Advance, Shibin

    Read the article

  • question abouut string sort

    - by davit-datuashvili
    i have question from programming pearls problem is following show how to use lomuto's partitioning scheme to sort varying length bit strings in time proportional to the sum oof their length and algorithm is following each record in x[0..n-1] has an integer length and pointer to the array bit[0..length-1] code void bsort(l,u,depth){ if (l>=u) return; for (int i=l;i<u;i++) if (x[i].length<depth) swap(i,l++); m=l; if (x[i].bit[depth] ==0) swap(i,m++); bsort(l,m-1,depth+1); bsort(m,u,depth+1); please help me i need following things 1. how this algorith works 2.how implement in java?

    Read the article

  • including tk.h and tcl.h in c program

    - by user362075
    hi, i am working on an ubuntu system. My aim is to basically make an IDE in C language using GUI tools from TCL/TK. I installed tcl 8.4, tk8.4, tcl8.4-dev, tk8.4-dev and have the tk.h and tcl.h headers file in my system. But, when I am running a basic hello world program it's showing a hell lot of errors. include "tk.h" include "stdio.h" void hello() { puts("Hello C++/Tk!"); } int main(int, char *argv[]) { init(argv[0]); button(".b") -text("Say Hello") -command(hello); pack(".b") -padx(20) -pady(6); } Some of the errors are tkDecls.h:644: error: expected declaration specifiers before ‘EXTERN’ /usr/include/libio.h:488: error: expected ‘)’ before ‘*’ token In file included from tk.h:1559, from new1.c:1: tkDecls.h:1196: error: storage class specified for parameter ‘TkStubs’ tkDecls.h:1201: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token /usr/include/stdio.h:145: error: storage class specified for parameter ‘stdin’ tk.h:1273: error: declaration for parameter ‘Tk_PhotoHandle’ but no such parameter Can anyone please tell me how can I rectify these errors? Please help...

    Read the article

  • MFMailComposeController crashing non-deterministically

    - by sss
    Hello, I've been struggling with this issue for a few days. I am trying to use the MFMailComposeController to send emails. What's happening is that the program crashes (long stack-trace below) upon clicking the SEND button. However, this is non-deterministic - sometimes it works immediately, sometimes after a long delay, and most often, it crashes. Here's my code for sending: -(void)mailWithAttachment:(NSString *) fileName type:(NSString*) attachmentType data:(NSData *) attachmentData { MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; mc.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { [mc setSubject:@"my subject"]; [mc setMessageBody:@"my body" isHTML:YES]; [mc addAttachmentData:attachmentData mimeType:attachmentType fileName:fileName]; [self presentModalViewController:mc animated:YES]; } [mc release]; } didFinish result looks like you'd imagine: -(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self dismissModalViewControllerAnimated:YES]; //...some other actions here for other UI logic, but problem persists if removed } And the definition of the class: @interface ShareViewController : UIViewController { //... } Here's the stack trace: #0 0x33568534 in gdb_objc_debuggerModeFailure #1 0x3356634e in _rwlock_write_nodebug #2 0x33560940 in map_images #3 0x2fe0413e in __dyld__ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE #4 0x2fe042d4 in __dyld__ZN4dyldL11notifyBatchE17dyld_image_states #5 0x2fe0aee0 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE #6 0x2fe062d6 in __dyld__ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE #7 0x2fe08188 in __dyld_dlopen #8 0x30c18fd0 in dlopen #9 0x0000390c in <function called from gdb> #10 0x3356628e in getMethodNoSuper_nolock #11 0x335662b8 in _class_getMethodNoSuper_nolock #12 0x3356518a in lookUpMethod #13 0x33562914 in _class_lookupMethodAndLoadCache #14 0x3356264a in objc_msgSend_uncached #15 0x33562a2a in _class_initialize #16 0x33567dfe in prepareForMethodLookup #17 0x33565168 in lookUpMethod #18 0x33562914 in _class_lookupMethodAndLoadCache #19 0x3356264a in objc_msgSend_uncached #20 0x32b2c288 in +[NSTimeZone(NSTimeZone) defaultTimeZone] #21 0x32b2c246 in -[NSCalendarDate initWithTimeIntervalSinceReferenceDate:] #22 0x32b3beb4 in -[NSDate(NSCalendarDateStuff) descriptionWithCalendarFormat:timeZone:locale:] #23 0x323642fc in -[NSDate(Goodies) descriptionForMimeHeaders] #24 0x32a6e812 in -[MailComposeController headersUseSuspendInfo:] #25 0x32a71e38 in -[MailComposeController messageUseSuspendInfo:endingEditing:] #26 0x32a6e594 in -[MailComposeController _getMessage:] #27 0x32a6e536 in -[MailComposeController message] #28 0x32a72bcc in -[MailComposeController deliverMessageRemotely] #29 0x32a7cab0 in -[_MFMailComposeRootViewController mailComposeControllerCompositionFinished:] #30 0x32a6e0a0 in -[MailComposeController sendMessage] #31 0x32a7086a in -[MailComposeController send:] #32 0x32c29ffa in -[NSObject performSelector:withObject:] #33 0x32a661cc in -[MailComposeView _sendButtonClicked:] I've tried the MFMailComposeController as a child of different views with the same result. Can anyone advise? I'd really appreciate it!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >