Daily Archives

Articles indexed Saturday May 15 2010

Page 6/78 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to convert Unicode strings (\u00e2, etc) into NSString for display?

    - by karlbecker_com
    I am trying to support arbitrary unicode from a variety of international users. They have already put a bunch of data into sqlite databases on their iPhones, and now I want to capture the data into a database, then send it back to their device. Right now I am using a php page that is sending data back to from an internet mysql database. The data is saved in the mysql database properly, but when it's sent back it comes out as unicode text, such as Frank\u00e2\u0080\u0099s iPad instead of just Frank's iPad where the apostrophe should really be a curly apostrophe. The answer posted to another question indicates that there is no built-in Cocoa methods to convert the "\u00e2\u0080\u0099" portion of the unicode string from the webserver to an NSString object. Is this correct? That seems really surprising (and scarily disappointing), since Cocoa definitely allows input from many different Unicode characters, and I need to support any arbitrary language that I have never heard of, and all of the possible characters. I save them to and from the local sqlite database just fine now, but once I send it to a web server, then perhaps pull down different data, I want to ensure the data pulled from the web server is correctly formatted.

    Read the article

  • Updating List Elements, Haskell

    - by Tom
    I have homework where I am to update a list using a function that takes two elements and returns a value of part of the first element given in the function. So it's required to update the entire listing by going through each element and update its value by applying the function against all other elements in the list (including itself). So far I've been trying to firstly map the list (so that each element is done the same) and then specifically update each elements value by mapping again just the value of the specified element however in trying to map just the specific value through: the function, the specific element and the entire list I keep getting complaints that I'm inferring the list of values made from the 'map function p@list list' rather than simply giving the value at p@list. Is this the correct method to try to update a list against the entire list itself? EDIT: spelling mistakes and grammar

    Read the article

  • Telerick java script resize problem

    - by Maki
    Hi! I' have an telerick asp.net control that generate an html code that contains 2 div's, I resize this div's using js, after that this page is loading in iframe and my div's resize to defalult values, where is the problem??

    Read the article

  • Programmatically loading Entity classes with JPA 2.0?

    - by Dennetik
    With Hibernate you can load your Entity classes as: sessionFactory = new AnnotationConfiguration() .addPackage("test.animals") .addAnnotatedClass(Flight.class) .addAnnotatedClass(Sky.class) .addAnnotatedClass(Person.class) .addAnnotatedClass(Dog.class); Is there a way to do the same thing - programmatically loading your Entity classes - in a JPA 2.0 compliant way?

    Read the article

  • Is it normal that conversationId keeps increasing after each page request?

    - by Casper
    Hi I'm building a Seam application and have a question: I got a stateless session bean (default seam scope) with a delete and a select method. A page which contains a datamodel loads and got links to select and delete each row (both links refer to the actionmethods in the bean). The delete method deletes the selected row from the list and returns null (reloads page). The select method loads a new page where the selected row can be edited. Each time a link in the datamodel is clicked and an action gets fired, the conversationId gets increased. Is this normal behaviour since im not even in a conversation? If it ain't normal behaviour, what's best practice to prevent this from happening?

    Read the article

  • How Do I Make a PHP Module with the Vala Programming Language?

    - by Volomike
    This new language called Vala, which is said to be C#-like and supposedly easier than C++ or C, compiles down into C on Linux with the GCC compiler. Sounds great. Now I want to use it to make a PHP module so that slow PHP code can be made in Vala and imported into PHP as a function. How do I accomplish this in Vala? Is it even possible?

    Read the article

  • jQuery tooltip: Trouble with remove()

    - by Rosarch
    I'm using a jQuery tooltip plugin. I have HTML like this: <li class="term ui-droppable"> <strong>Fall 2011</strong> <li class="course ui-draggable">Biological Statistics I<a class="remove-course-button" href="">[X]</a></li> <div class="term-meta-data"> <p class="total-credits too-few-credits">Total credits: 3</p> <p class="median-GPA low-GPA">Median Historical GPA: 2.00</p> </div> </li> I want to remove the .course element. So, I attach a click handler to the <a>: function _addDeleteButton(course, term) { var delete_button = $('<a href="" class="remove-course-button" title="Remove this course">[X]</a>'); course.append(delete_button); $(delete_button).click(function() { course.remove(); return false; }).tooltip(); } This all works fine, in terms of attaching the click handler. However, when course.remove() is called, Firebug reports an error in tooltip.js: Line 282 tsettings is null if ((!IE || !$.fn.bgiframe) && tsettings.fade) { What am I doing wrong? If the link has a tooltip attached, do I need to remove it specially? UPDATE: Removing .tooltip() solve the problem. I'd like to keep it in, but that makes me suspect that my use of .tooltip() is incorrect here.

    Read the article

  • Take screenshot of DirectX full-screen application

    - by iconiK
    This boggles me. DirectX bypasses everything and talks directly to the device driver, thus GDI and other usual methods won't work - unless Aero is disabled (or unavailable), all that appears is a black rectangle at the top left of the screen. I have tried what other have suggested on several forums, using DirectX to get the back buffer and save it, but I get the same result: device-GetFrontBufferData(0, surface); D3DXSaveSurfaceToFile("fileName", D3DXIFF_BMP, surface, NULL, NULL); Is there any way to get a screenshot of another full-screen DirectX application when Aero is enabled?

    Read the article

  • First Post

    - by Allan Ritchie
    It has been a while since I've had a blog, but I'm back into the open source dev and decided to get back into things.  I had a blog a few years back when NHibernate was infant (0.8 or something) and I was working with the Wilson ORMapper (www.ormapper.net) at the time.  Anyhow, I'm still working with NHibernate (particularily the exciting v3 alpha 1) and Castle framework. I've also written a .NET ExtDirect stack for which I'll be writing a few articles around due to its flexibility.  I decided to write yet another communication stack because all the implementations I found on the Ext forums were lacking any sort of flexibility.  So stay tuned... I'll be presenting a bunch of the extension points.

    Read the article

  • Add panel to secondary monitor on Ubuntu 10.4

    - by Mr. Man
    I am running Ubuntu 10.4 Lucid Lynx and I was wondering if it is possible to put a panel on a secondary monitor. Here are methods I have tried which did not work: Click and drag the panel from the primary monitor to the secondary monitor Installing TwinView (couldn't find it) Thanks in advance!

    Read the article

  • Prawn image position

    - by John
    I'm trying to layout 6 images per page with prawn in Ruby: case (idx % 6) # ugly when 0 : (pdf.start_new_page; pdf.image img, :position => :left, :vposition => :top, :width => 270) when 1 : pdf.image img, :position => :right, :vposition => :top, :width => 270 when 2 : pdf.image img, :position => :left, :vposition => :center, :width => 270 when 3 : pdf.image img, :position => :right, :vposition => :center, :width => 270 when 4 : pdf.image img, :position => :left, :vposition => :bottom, :width => 270 when 5 : pdf.image img, :position => :right, :vposition => :bottom, :width => 270 end Not sure what I'm doing wrong, but it prints the first 3 images to the PDF, then creates a new page and prints the last three: Page 1: <img> <img> <blank> <blank> <blank> <blank> Page 2: <blank> <blank> <blank> <img> <img> <img> Any suggestions would help.

    Read the article

  • ASP.NET MVC Head Verb and Selenium RC

    - by Rob
    Selenium (RC) is being used to test an ASP.NET 1.1 site. When we make a request via Selenium RC (and then in turn via Firefox or other configured browser) the http verb is "HEAD". We have several form action methods that have separate POST and GET methods decorated with AcceptVerbs(HttpVerbs.Get). These methods are returning a 404 and logging a "a public action method could not be found" error message. Questions: When writing separate Get/Post action methods what is the best practice for handling the Head verb? Should we always decorate with an AcceptVerbs(HttpVerbs.Get | HttpVerbs.Head)? The only time we've seen HEAD verbs is from Selenium and from some crawlers. We created robots.txt entries for the crawlers. Does anyone know why HEAD verbs are issued via Selenium (instead of an If-Modified-Since header)? Are there mainstream crawlers that use the HEAD verb? Does it affect SEO ranking to not have it?

    Read the article

  • How to use iPhone SDK Private APIs

    - by eagle
    I haven't found a comprehensive list of the steps that are required to use a private API from the iPhone Library. In particular, I would like to know how to get header files, if they are even required, how to get it to compile (when I simply add the header, it complains that the functions aren't defined), and what resources one can use to learn about private APIs (e.g. from other user's experiences, such as http://iphonedevwiki.net/ which has a few). I've read in other places that people recommend using class-dump to get the headers. Are there any alternative methods? I've noticed that there are some repositories of iPhone Private SDKs, what are the most up to date resources you would recommend? Most of the previous questions about documentation of private APIs, have all linked to Erica Sadun's website, which doesn't seem to have documentation anymore (all the links on the left are crossed out). Please save the comments about not using private API's... I know of the biggest risks: App will get rejected by Apple. App will break in future updates to the OS. I'm talking about legitimate uses, such as: Private application use (e.g. for unit testing, or messing around to see what's possible)

    Read the article

  • Telerik java script resize problem

    - by Maki
    I have an Telerik asp.net control that generate an html code that contains 2 div's, I resize this div's using js, after that this page is loading in iframe and my div's resize to default values, where is the problem??

    Read the article

  • Debug NAudio MP3 reading difference?

    - by Conrad Albrecht
    My code using NAudio to read one particular MP3 gets different results than several other commercial apps. Specifically: My NAudio-based code finds ~1.4 sec of silence at the beginning of this MP3 before "audible audio" (a drum pickup) starts, whereas other apps (Windows Media Player, RealPlayer, WavePad) show ~2.5 sec of silence before that same drum pickup. The particular MP3 is "Like A Rolling Stone" downloaded from Amazon.com. Tested several other MP3s and none show any similar difference between my code and other apps. Most MP3s don't start with such a long silence so I suspect that's the source of the difference. Debugging problems: I can't actually find a way to even prove that the other apps are right and NAudio/me is wrong, i.e. to compare block-by-block my code's results to a "known good reference implementation"; therefore I can't even precisely define the "error" I need to debug. Since my code reads thousands of samples during those 1.4 sec with no obvious errors, I can't think how to narrow down where/when in the input stream to look for a bug. The heart of the NAudio code is a P/Invoke call to acmStreamConvert(), which is a Windows "black box" call which I can't think how to error-check. Can anyone think of any tricks/techniques to debug this?

    Read the article

  • How to generate an ear file from a maven-archetype-webapp artifact?

    - by Mike
    I currently have a project built with maven-archetype-webapp artifact. The default packaging for this project is war. Is it possible for me to insert the maven-ear-plugin in this webapp pom.xml generate an ear file that contains this project war? I tried that, but the war file doesn't get embedded in the generated ear file. It has everything except the war file. I read many Maven related articles, and perhaps I could use maven-archetype-j2ee-simple artifact. However, I'm reluctant to this use for 2 reasons:- This artifact handles ejbs and all the extra features that I don't use. It makes my project looks bloated. Second, it seems like it requires me to install the web module into the repository first before I can create the ear file. Is this the preferred way to create an ear file? How do I create an ear file that contains the war file using maven-ear-plugin from my webapp's pom.xml? If this way is not possible, what's the preferred way? I'm sorry if my questions sound a little novice, I realized I have whole lot more to learn about Maven. Thanks much.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >