Daily Archives

Articles indexed Friday May 28 2010

Page 16/107 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • suppress keyboard in iphone UiWebViews

    - by rob
    I have an app that uses UiWebViews, and I need to not show the keyboard for a text field within such a view. I provide my own buttons that insert the limited sorts of text the field allows, but I also need to allow pasting (I will filter what gets pasted) and adjusting the cursor position. Any way to do this?

    Read the article

  • Problem while fetching xml through some rss feed

    - by Tariq- iPHONE Programmer
    I was fetching xml through some rss feed. I am unable to sort items in depth like i have sorted easily "channel - description" as NSString *resultValue=[[responseDictionary valueForKeyPath:@"rss.channel.description"] textContent]; Above Result: YouTube RSS Feed My question is how i can parse .... item - description... i.e (Music video by Andrews \U00a9 1982 MJJ Productions Inc.) i am getting nil if i fetch like valueForKeyPath:@"rss.channel.item.description"] Key: rss Value: { "_text" = "\n"; channel = { "_text" = "\n"; description = { "_text" = "YouTube RSS Feed"; }; item = ( { "_text" = "\n\t"; description = { "_text" = "Music video by Andrews \U00a9 1982 MJJ Productions Inc."; }; enclosure = { length = 294; type = "application/x-shockwave-flash"; url = "http://youtube.com/v/Zi_XLOBDo_Y.swf"; }; link = { "_text" = "http://youtube.com/?v=Zi_XLOBDo_Y"; };

    Read the article

  • Best Version control for lone developer

    - by Stephen
    I'm a lone developer at the moment; please share you experiences on what is a good VC setup for a lone developer. My constraints are; I work on multiple machines and need to keep them synced up Sometimes I work offline I'm currently using Subversion(just the client to a remote server), and that is working ok. I'm interested in mecurial and git DVCS, but none of their use-cases make sense to my situation. EDIT: I've migrated my active development to Fossil http://www.fossil-scm.org/ after trialing it with a client. I really like the features to autosync my repositories(reducing accidental forks), the documentation support(both wiki and embedded/versioned) that supports my need to document the code and the project in different spaces, the easy to configure issue tracker, nice access control, skinnable web interface and helpful community.

    Read the article

  • uploaded photo modification on server restricted

    - by crisgomez
    Hi, Can anybody help regarding my problem?I created an application that upload photos. the photos are stored into a specific directory.When the photo uploaded is greater than the number of bytes allowed , the photo should be resize in order to have a size standard. The problem is, the photo is not resizing due to the lack of permission of the user to the specific directory in which the photos are stored.Is there any way around, to resize the photo without having granting permission to the application users?

    Read the article

  • PHP & MySQL query value question.

    - by space
    How can I use the first query's id value $row['id'] again after I run a second query inside the while loop statement? To show you what I mean here is a sample code below of what I'm trying to do. I hope I explained it right. Here is the code. $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT users.* FROM users WHERE user_id = 4"); if (!$dbc) { // There was an error...do something about it here... print mysqli_error($mysqli); } while($row = mysqli_fetch_assoc($dbc)) { echo '<div>User: ' . $row['id'] . '</div>'; echo '<div>Link To User' . $row['id'] . '</div>'; $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc2 = mysqli_query($mysqli,"SELECT COUNT(cid) as num FROM comments WHERE comments_id = $row[id]"); if (!$dbc2) { // There was an error...do something about it here... print mysqli_error($mysqli); } else { while($row = mysqli_fetch_array($dbc2)){ $num = $row['num']; } } echo '<div>User ' . $row['id'] . ' Comments# ' . $num . '</div>'; }

    Read the article

  • Hype Machine Fluid Greasemonkey script broken help fixing it.

    - by newhen
    Hi, There is a greasemonkey script here that is suppose to work with a standalone fluid app. I just tried it out and it doesn't but I can't figure out what is wrong with it. Anybody wanna take a look at the code for me see if I am doing something wrong. Alot to ask but worth trying. Source: http://userscripts.org/scripts/review/62762 Screenshot fluid while the script is enabled: http://grab.by/4CoZ (there is no difference in the site at all)

    Read the article

  • Quartz 2D's drawing text and NSTimer in custom method

    - by coure06
    i want to show text using quartz 2d. Text will be drawing randomly on different position after each 1 seconds. I am not sure how i can use NSTimer with quartz 2D text. I can draw text in drawRect method where graphics context is already available. How i will draw text using my custom method myDraw which will be called after 1 second using NSTimer? If i create my custom Method the graphics context is not available in that method.

    Read the article

  • android 2.2 browser dont work pageY or PageX in ontouchend event

    - by juanca
    I have a web app that work perfect in android 2.1, when I upgrade to 2.2 the pageX property in ontouchend event, this is my code: menu1.ontouchend = function(e){ e.preventDefault(); if (e.touches && e.touches.length0) { // iPhone x2 = e.touches[0].pageX; y2 = e.touches[0].pageY; } else { // all others x2 = e.pageX; y2 = e.pageY; } } Anybody know what change in the javascript API for touch events from 2.1 to 2.2?????

    Read the article

  • How can I manage command line arguements/variables for a script written in Perl?

    - by Structure
    I am trying to manage numerous arguments that are specified by a user when they execute a command. So far, I have been trying to limit my script design to manage arguments as flags that I can easily manage with Getopt::Long as follows: GetOptions ("a" => \$a, "b" => \$b); In this way I can check to see if a or b were specified and then execute the respective code/functions. However, I now have a case where the user can specify two arguments variables as follows: command -a black -b white This is fine, but I cannot come up with a good way to determine whether -a or -b is specified first. Therefore I do not know whether the argument variable is assigned to $ARGV[0] or $ARGV[1] after I have executed GetOptions ("a" => \$a, "b" => \$b);. How can I tell which variable is associated with -a and which is associated with -b in the example above?

    Read the article

  • Windows Hosts File Location

    - by Jon
    I've got a general query regarding the location of the hosts file on Windows. It resides at this location: f:\windows\system32\drivers\etc\hosts My question is why? Could Microsoft have picked a more obscure location for a hosts file?

    Read the article

  • Need help getting Suspend to work in Ubuntu on laptop

    - by Aerik
    I've been doing a lot of research, but I've got to admit right out front that I'm not even sure exactly what is the right question. I've installed Kubuntu 10.4 on a Panasonic Toughbook CF-29. When I try to uses "suspend", the screen flickers, and then the hard drive light goes off but the power light stays on. I looked at the /var/log/pm-suspend.log, but I don't seen any errors... though I'm not sure what success should look like either. So I guess my real question is a bit more accurately stated as "How do I troubleshoot suspend not working in Kubuntu on a laptop?" Thanks, Aerik

    Read the article

  • Problem with XML encoding of database contents with Latin characters

    - by user89691
    I have an ASP Access database that contains strings in various European languages. The database was populated prior by agents in the respective countries. It contains entries with accented etc characters as you would expect. If I open the database with MS Access these characters show up fine. For example the the German equivalent of "Open" shows as "Öffnen" (hopefully you can see an "O" with 2 dots above it!). I have ASP code that reads the database and returns records in XML. The text is passed to XMLEncode to construct the XML, but that only seems to deal with the 5 specials like "<", "&", etc. If I dump the XML the accented characters are unchanged. <English>Open</English> <German>Öffnen</German> If I look at the raw packets with Wireshark I see that the "Ö" byte is hex D6, which appears to be it's decimal Unicode and ISO 8859-1 value. The problem starts when I try to parse the XML in client-side JS. I get: "An invalid character was found in text content" from IE. FF and Chrome happily accept the XML without hiccup but the browser shows the "Ö" character as a diamond with a question mark inside. http://www.validome.org/xml/validate/ reports "encoding error." http://www.w3schools.com/dom/dom_validate.asp thinks it is fine. The XML is UTF-8 encoded. What do I need to do to have IE accept my XML without complaint? What do I need to do to have browsers display the stuff correctly?

    Read the article

  • what is cairo required by GTK 2.9 to compile (on Lucid Lynx)?

    - by A.Rashad
    I have been trying to run configure to prepare the make file for GTK 2,9 on a fresh Linux box (running Ubuntu 10.04 Lucid Lynx). it complained about some dependencies, including: glib-2.0 atk (1.29.2) pango (1.20) cairo (1.6) I managed to find the glib 2.22.0, downloaded the atk but did not compile yet, did not start the pango yet, but when tried to get the cairo package I didn't know where to get it from! nothing on GNU site, not on GTK site! anyone knows where to get it from?

    Read the article

  • Why is T() = T() allowed in C++?

    - by Rimo
    I believe the expression T() creates an rvalue (by the Standard) However the following code compiles (at least on gcc4.0) class T {... }; int main() { T() = T(); } I know technically this is possible because member functions can be invoked on temporaries and the above is just invoking the operator= on the r-value temporary created from T(). But conceptually this is like assigning a new value to an r-value. Is there a good reason why this is allowed?

    Read the article

  • Uploading PDF or .doc and security

    - by Kamo
    I have a script that lets the user upload text files (PDF or doc) to the server, then the plan is to convert them to raw text. But until the file is converted, it's in its raw format, which makes me worried about viruses and all kinds of nasty things. Any ideas what I need to do to minimize the risk of these unknown files. How to check if it's clean, or if it's even the format it claims to be and that it does not crash the server.

    Read the article

  • WPF Border DesiredHeight

    - by Joseph Sturtevant
    The following Microsoft example code contains the following: <Grid> ... <Border Name="Content" ... > ... </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsExpanded" Value="True"> <Setter TargetName="ContentRow" Property="Height" Value="{Binding ElementName=Content,Path=DesiredHeight}" /> </Trigger> ... </ControlTemplate.Triggers> When run, however, this code generates the following databinding error: System.Windows.Data Error: 39 : BindingExpression path error: 'DesiredHeight' property not found on 'object' ''Border' (Name='Content')'. BindingExpression:Path=DesiredHeight; DataItem='Border' (Name='Content'); target element is 'RowDefinition' (HashCode=2034711); target property is 'Height' (type 'GridLength') Despite this error, the code works correctly. I have looked through the documentation and DesiredHeight does not appear to be a member of Border. Can anyone explain where DesiredHeight is coming from? Also, is there any way to resolve/suppress this error so my program output is clean?

    Read the article

  • What should a hobbyist do to develop good programming skills after basics?

    - by thyrgle
    So I'll say right here that I'm no professional coder. I'm a hobbyist. And pretty much like other people I feel like I'm doing it wrong. Like this question A feeling that I'm not a good programmer if have began to feel like that. Now I know basically that they say you shouldn't worry and that your good even if you continuously doubt yourself. But, they are talking to him. I'm not like him (in the sense I'm more of a newbie)... I've been coding as a hobbyist for 3 years (3 hobbyist years mind you!) unlike his 10-11 years that he states. Also, the only thing I've probably read in-depth is Teach Yourself C++ in 21 Days. And before I continue, just so your not confused about the various questions I've posted on (mostly) iPhone and OpenGL, I have poked and prodded at those two things for a few months each and finally sort of got a hang of both of them. But, from what I've noticed, is that I suck at making good code. For me its not even a debate of whether I'm doing it wrong or not: I can tell (from the various spaghetti code I create and other various discrepancies I, and others, can see and have noted in my code). What is a good way to get rid of these awful habits of mine and do it in a more correct, or if there is no "correct way" then I mean "typical", way?

    Read the article

  • changing filesystem format from jfx to ext4 without losing data

    - by A.Rashad
    I have a fresh Lucid Lynx (Ubuntu 10.04) running on a laptop. where I defined the filesystems as: mount point / on ext4 (46 Gb) mount point /home on jfs (63 GB) swap as 3 Gb I left the machine over night to do some task, without AC power supply. next day in the morning I found it on standby, task completed, but filesystem was not reachable. it gave me I/O error it seems that there is a problem with jfs and standby. anyways, to avoid any hassle, I want to move this mount point from jfs format to ext4. can I do this without losing data and without the need to place the data in a temporary location until transformation is done? sorry to mention that, but I recall back in the windows days, we would change a FAT16 to FAT32 or a FAT32 to NTFS without having to lose the data. I hope this is available on Linux.

    Read the article

  • Strange type-related error

    - by vsb
    I wrote following program: isPrime x = and [x `mod` i /= 0 | i <- [2 .. truncate (sqrt x)]] primes = filter isPrime [1 .. ] it should construct list of prime numbers. But I got this error: [1 of 1] Compiling Main ( 7/main.hs, interpreted ) 7/main.hs:3:16: Ambiguous type variable `a' in the constraints: `Floating a' arising from a use of `isPrime' at 7/main.hs:3:16-22 `RealFrac a' arising from a use of `isPrime' at 7/main.hs:3:16-22 `Integral a' arising from a use of `isPrime' at 7/main.hs:3:16-22 Possible cause: the monomorphism restriction applied to the following: primes :: [a] (bound at 7/main.hs:3:0) Probable fix: give these definition(s) an explicit type signature or use -XNoMonomorphismRestriction Failed, modules loaded: none. If I specify signature for isPrime function explicitly: isPrime :: Integer -> Bool isPrime x = and [x `mod` i /= 0 | i <- [2 .. truncate (sqrt x)]] I can't even compile isPrime function: [1 of 1] Compiling Main ( 7/main.hs, interpreted ) 7/main.hs:2:45: No instance for (RealFrac Integer) arising from a use of `truncate' at 7/main.hs:2:45-61 Possible fix: add an instance declaration for (RealFrac Integer) In the expression: truncate (sqrt x) In the expression: [2 .. truncate (sqrt x)] In a stmt of a list comprehension: i <- [2 .. truncate (sqrt x)] 7/main.hs:2:55: No instance for (Floating Integer) arising from a use of `sqrt' at 7/main.hs:2:55-60 Possible fix: add an instance declaration for (Floating Integer) In the first argument of `truncate', namely `(sqrt x)' In the expression: truncate (sqrt x) In the expression: [2 .. truncate (sqrt x)] Failed, modules loaded: none. Can you help me understand, why am I getting these errors?

    Read the article

  • Sybase ODBC connection String with .net

    - by nitinkhanna
    Hi, I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string. I have used the connectionstrings.com but unable to get the correct one. After runnig and making the connection Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass; and some other combination of thic connection string I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed What am I suppose to correct in that. Please help. Thanks

    Read the article

  • Conditionally hide a portion of a partial when viewed from another controller

    - by user284194
    I'm using a partial from my messages controller in my tags controller. The portion in question looks like this: <% unless message.tag_list.nil? || message.tag_list.empty? %> <% message.tags.each do |t| %> <div class="tag"><%= link_to t.name.titleize, tag_path(t) %></div> <% end %> <% end %> Is there a way to hide this portion of the partial only when it is viewed from the tags controller? Thanks for reading my question.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >