Daily Archives

Articles indexed Tuesday June 8 2010

Page 18/122 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Asynchronous Image loading in certain custom UITableViewCells

    - by Dan
    So, I'm sure that this issue has been brought up before, but I haven't quite seen a solution for my specific problem. What I'm doing is loading a group of custom UITableViewCell's that are drawn using Loren Brichter's solution, each cell has some content, an icon (representing the user) that is asynchronously loaded into it, and a few other things. Eventually, I'm hoping to add support for images. Not every cell has an image, so in the creation of the cell, it determines if an image is required to be loaded and drawn into the cell. My problem is that I don't know how I can do that while keeping the image loaded asynchronously - with not every cell having the need to load an image (like needed with the icon) I'm not sure how to keep it in order when an cell is thrown off screen and re-rendered when the user scrolls over it. Each cell draws it content from an NSArray containing a custom object called FeedItem. All I'm really looking for is some sort of solution or idea to help me because right now I am at a loss. Thanks guys, I will appreciate the help.

    Read the article

  • Correct way to create a menu with shortcuts in WPF

    - by mattdekrey
    What is the correct/best way to create a menu with hotkey shortcuts? I simply want a File menu like Visual Studio's that has New, Open, Save, Save All, Exit, and a few other standard shortcuts. It seems that InputGestureText displays the appropriate text, but since it's called "Text" and doesn't seem to trigger events, I'm going to assume that isn't the right way to do it. The Command architecture also seems fairly bulky, so I don't want to head down that path if there is a better way.

    Read the article

  • Regex: Strip HTML attributes except SRC

    - by Ian Silber
    Hi, I'm trying to write a regular expression that will strip all tag attributes except for the SRC attribute. For example: <p id="paragraph" class="green">This is a paragraph with an image <img src="/path/to/image.jpg" width="50" height="75"/></p> Would be returned as: <p>This is a paragraph with an image <img src="/path/to/image.jpg" /></p> I have a regular expression to strip all attributes, but I'm trying to tweak it to leave in src. Here's what I have so far: <?php preg_replace('/<([A-Z][A-Z0-9]*)(\b[^>]*)>/i', '<$1>', '<html><goes><here>'); Using PHP's preg_replace() for this. Thanks! Ian

    Read the article

  • There are no drives listed during windows 7 system recovery

    - by Kragen
    I'm trying to use the Windows 7 system recovery disk to repair a boot sector, however I'm finding that when I boot the recovery disk, it doesn't list / mount any of my disk partitions, and so I can't perform the recovery. The partitions are all NTFS formatted, and the drivers used to read the disks all seem to be fairly straightforward Microsoft drivers, so I shouldn't need to load any extra drivers to see my partitions (its a Dell Latitude D530) Diskpart correctly lists the partitions (complete with labels) - it just that when I attempt to switch to that partition it gives me the "This partition does not contain a recognised file system" message. Has anyone got any idea how I can work out why my partitions are not visible?

    Read the article

  • Filemaker XSL Select Column By Name

    - by Kevin Sylvestre
    I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <people> <xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW"> <person> <name> <xsl:value-of select="fm:COL[01]/fm:DATA"/> </name> <location> <xsl:value-of select="fm:COL[02]/fm:DATA"/> </location> </person> </xsl:for-each> </people> </xsl:template> </xsl:stylesheet> Any ideas? Thanks.

    Read the article

  • Get Excel.Application object from Process or hwnd in .NET

    - by Abiel
    In C# I am trying to get an instance of an Excel.Application object from a Process object. This seems like it should be really simple yet I cannot figure it out and cannot find an example. To repeat, I have a System.Diagnostics.Process object that I know refers to a running Excel instance. I now need to recover a Microsoft.Office.Interop.Excel.Application object that refers to the process so that I can go about manipulating the Excel application from C#. In case it makes it any simpler, I also have the HWND id and window text associated with the active Excel window. Thanks.

    Read the article

  • How do I toggle two images using jQuery and radio buttons?

    - by trench
    This isn't pretty, but I think you'll get what I'm trying to do. <label><input name="jpgSel" type="radio" value="0">jpg 1</label><br /> <label><input name="jpgSel" type="radio" value="1">jpg 2</label><br /> <div id="showjpg"></div> and $(document).ready(function() { $("select").change(function () { if ($("jpgSel:checked").val() == 1) { $('#showjpg').attr({ src: 'one.jpg', alt: 'one dot jpg' }); } else { $('#showjpg').attr({ src: 'two.jpg', alt: 'two dot jpg' }); } });

    Read the article

  • How stable are Cisco IOS OIDs for querying data with SNMP across different model devices?

    - by Daniel Papasian
    I'm querying a bunch of information from cisco switches using SNMP. For instance, I'm pulling information on neighbors detected using CDP by doing an snmpwalk on .1.3.6.1.4.1.9.9.23 Can I use this OID across different cisco models? What pitfalls should I be aware of? To me, I'm a little uneasy about using numeric OIDs - it seems like I should be using a MIB database or something and using the named OIDs, in order to gain cross-device compatibility, but perhaps I'm just imagining the need for that.

    Read the article

  • ios::nocreate error while compiling a C++ code

    - by Mohit Nanda
    While, compiling a package, written in C++ on RHEL 5.0. I am getting the following error. error: nocreate is not a member of std::ios The source-code corresponds to: ifstream tempStr(argv[4],ios::in|ios::nocreate); I have tried #g++ -O -Wno-deprecated <file.cpp> -o <file> as well as: #g++ -O -o <file> Please suggest a solution.

    Read the article

  • Why does cisco IOS require domain-name to be set before SSH keys can be generated?

    - by Daniel Papasian
    Is there a technical reason why IOS requires the device's domain-name to be set (via ip domain-name) before an SSH key can be generated? Is the domain-name used in any way in the generation of the key? Is there any way to force the generation of a key before the domain name is set? UPDATE: Myself (before I posted this question) and others in your answer seem to think it may be used as either a salt or a source of entropy for the key. Wouldn't the domain-name be very predictable? This doesn't seem like a suitable source of entropy.

    Read the article

  • Read email from incoming mail server(POP)

    - by nccsbim071
    Hi, I have used an open source code from codeproject to read email from incoming mail server(POP Server). The code can be found at following location: http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx So far it works fine i can read emails. My objective of using this code was to retrieve emails from POP server and process them. My problem is: If i use gmails pop server "pop.gmail.com" and run the appplication. I get only those emails that i have not retrieved since the last time i run the application. but if i use my clients pop server everytime i run the application i get all the emails in the pop server. for example: If i use gmail pop server: pop.gmail.com I have three emails in the pop server. I haven't run the application. I am running the application for the first time. Application reads the email, this time i will get 3 all the three email. I run the application second time, my application will not read any emails this time because i have already read the 3 existing one. This is fine, this is what i want. Now i send email to pop.gmail.com. I run the application again for the third time, this time i will only get the email that has just arrived that is the fourth one. This is good behaviour, this is what i want. But if i use my clients pop server: No matter how many times i run the application, it reads all the emails in the mail box. This will create problem for me, because i am thinking of building a window service that will read emails from pop server and process them. This service will run continuously. I will process emails in the pop serve then sleep for let's say 1 minute and the process the emails again. If the application downloaded from codeproject reads all the emails all the time, my clients mailbox can have like thousands for email in this mail box, so this would not be feasible for me. Is there some settings that is to be made at my client's pop server that will allow my application to retrieve only those emails that i have not read since last time i run the service or any help Please help, thanks,

    Read the article

  • Open facebox from c# codebehind

    - by diver-d
    Hi there, I am creating a basic contact us form that contains a few fields and a button. I am using the jquery facebox plugin which I want to open after the buttons click event is fired displaying a value from one of the textboxes within the div tag. e.g. <div id="info" style="display:none;"><h1>Thanks for your enquiry</h1><p>Thanks [NAMEFIELD],<br /> Someone will be in contact with you shortly.</p> Any tips would be great!

    Read the article

  • Form Validation using javascript in joomla...

    - by Ankur
    I want to use form validation. I have used javascript for this and I have downloaded the com_php0.1alpha-J15.tar component for writing php code but the blank entries are goes to the database. Please guide me... sample code is here... <script language="javascript" type="text/javascript"> function Validation() { if(document.getElementById("name").value=="") { document.getElementById("nameerr").innerHTML="Enter Name"; document.getElementById("name").style.backgroundColor = "yellow"; } else { document.getElementById("nameerr").innerHTML=""; document.getElementById("name").style.backgroundColor = "White"; } if(document.getElementById("email").value=="") { document.getElementById("emailerr").innerHTML="Enter Email"; document.getElementById("email").style.backgroundColor = "yellow"; } else { document.getElementById("emailerr").innerHTML=""; document.getElementById("email").style.backgroundColor = "White"; } if(document.getElementById("phone").value=="") { document.getElementById("phoneerr").innerHTML="Enter Contact No"; document.getElementById("phone").style.backgroundColor = "yellow"; } else { document.getElementById("phoneerr").innerHTML=""; document.getElementById("phone").style.backgroundColor = "White"; } if(document.getElementById("society").value=="") { document.getElementById("societyerr").innerHTML="Enter Society"; document.getElementById("society").style.backgroundColor = "yellow"; } else { document.getElementById("societyerr").innerHTML=""; document.getElementById("society").style.backgroundColor = "White"; } if(document.getElementById("occupation").value=="") { document.getElementById("occupationerr").innerHTML="Enter Occupation"; document.getElementById("occupation").style.backgroundColor = "yellow"; } else { document.getElementById("occupationerr").innerHTML=""; document.getElementById("occupation").style.backgroundColor = "White"; } if(document.getElementById("feedback").value=="") { document.getElementById("feedbackerr").innerHTML="Enter Feedback"; document.getElementById("feedback").style.backgroundColor = "yellow"; } else { document.getElementById("feedbackerr").innerHTML=""; document.getElementById("feedback").style.backgroundColor = "White"; } if(document.getElementById("name").value=="" || document.getElementById("email").value=="" || document.getElementById("phone").value=="" || document.getElementById("society").value=="" || document.getElementById("occupation").value=="" || document.getElementById("feedback").value=="") return false; else return true; } </script> <?php if(isset($_POST['submit'])) { $conn = mysql_connect('localhost','root',''); mysql_select_db('society_f',$conn); $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $society = $_POST['society']; $occupation = $_POST['occupation']; $feedback = $_POST['feedback']; $qry = "insert into feedback values(null". ",'" . $name . "','" . $email . "','" . $phone . "','" . $society . "','" . $occupation . "','" . $feedback . "')" ; $res = mysql_query($qry); if(!$res) { echo "Could not run a query" . mysql_error(); exit(); } } ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> .td{ background-color:#FFFFFF; color:#000066; width:100px; } .text{ border:1px solid #0033FF; color:#000000; } </style> </head> <body> <form id="form1" method="post"> <input type="hidden" name="check" value="post"/> <table border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td colspan="3" style="text-align:center;"><span style="font-size:24px;color:#000066;">Feedback Form</span></td> </tr> <tr> <td class="td">Name</td> <td><input type="text" id="name" name="name" class="text" ></td> <td style="font-style:italic;color:#FF0000;" id="nameerr"></td> </tr> <tr> <td class="td">E-mail</td> <td><input type="text" id="Email" name="Email" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="emailerr"></td> </tr> <tr> <td class="td">Contact No</td> <td><input type="text" id="Phone" name="Phone" maxlength="15" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="Phoneerr"></td> </tr> <tr> <td class="td">Your Society</td> <td><input type="text" id="society" name="society" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="societyerr"></td> </tr> <tr> <td class="td">Occupation</td> <td><input type="text" id="occupation" name="occupation" class="text"></td> <td style="font-style:italic;color:#FF0000;" id="occupationerr"></td> </tr> <tr> <td class="td">Feedback</td> <td><textarea name="feedback" id="feedback" class="text"></textarea></td> <td style="font-style:italic;color:#FF0000;" id="feedbackerr"></td> </tr> <tr> <td colspan="3" style="text-align:center;"> <input type="submit" value="Submit" id="submit" onClick="Validation();" /> <input type="reset" value="Reset" onClick="Resetme();" /> </td> </tr> </table> </form> </body> </html>

    Read the article

  • Firefox hangs waiting for ssl.google-analytics.com

    - by squillman
    It seems that FF has a problem with 403 Access Denied responses from proxies, at least for ssl.google-analytics.com. I've found this post which describes my problem. I'm posting my workaround as an answer, but would also welcome any more information if anyone has it as I can't find anything! EDIT: Note that the current version of Firefox which is experiencing this issue is 3.0.10 EDIT: Still there for FF 3.5...

    Read the article

  • Joomla, drupal or dotnetnuke?

    - by hovercraft2x
    I'm in the process of starting my own podcasting website. I'm trying to find a good cms to use. At work I'm a .net developer and we are starting to use DNN for some small projects around the office. I'd like the new business to be fully open source but it might be nice to use Dnn cause I will already have some experience with it from work. I'm worried that I'll be spreading myself too thin learning php/Lamp at home and .net at work. What does everyone recommend?

    Read the article

  • Refactoring. Your way to reduce code complexity of big class with big methods

    - by Andrew Florko
    I have a legacy class that is rahter complex to maintain: class OldClass { method1(arg1, arg2) { ... 200 lines of code ... } method2(arg1) { ... 200 lines of code ... } ... method20(arg1, arg2, arg3) { ... 200 lines of code ... } } methods are huge, unstructured and repetitive (developer loved copy/paste aprroach). I want to split each method into 3-5 small functions, whith one pulic method and several helpers. What will you suggest? Several ideas come to my mind: Add several private helper methods to each method and join them in #region (straight-forward refactoring) Use Command pattern (one command class per OldClass method in a separate file). Create helper static class per method with one public method & several private helper methods. OldClass methods delegate implementation to appropriate static class (very similiar to commands). ? Thank you in advance!

    Read the article

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