Search Results

Search found 708 results on 29 pages for 'alan storm'.

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

  • Binary file email attachment problem

    - by Alan Harris-Reid
    Hi there, Using Python 3.1.2 I am having a problem sending binary attachment files (jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question is as follows... for file in self.attachments: part = MIMEBase('application', "octet-stream") part.set_payload(open(file,"rb").read()) encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % file) msg.attach(part) # msg is an instance of MIMEMultipart() server = smtplib.SMTP(host, port) server.login(username, password) server.sendmail(from_addr, all_recipients, msg.as_string()) However, way down in the calling-stack (see traceback below), it looks as though msg.as_string() has received an attachment which creates a payload of 'bytes' type instead of string. Has anyone any idea what might be causing the problem? Any help would be appreciated. Alan builtins.TypeError: string payload expected: File "c:\Dev\CommonPY\Scripts\email_send.py", line 147, in send server.sendmail(self.from_addr, all_recipients, msg.as_string()) File "c:\Program Files\Python31\Lib\email\message.py", line 136, in as_string g.flatten(self, unixfrom=unixfrom) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 181, in _handle_multipart g.flatten(part, unixfrom=False) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 155, in _handle_text raise TypeError('string payload expected: %s' % type(payload))

    Read the article

  • Templates vs. coded HTML

    - by Alan Harris-Reid
    I have a web-app consisting of some html forms for maintaining some tables (SQlite, with CherryPy for web-server stuff). First I did it entirely 'the Python way', and generated html strings via. code, with common headers, footers, etc. defined as functions in a separate module. I also like the idea of templates, so I tried Jinja2, which I find quite developer-friendly. In the beginning I thought templates were the way to go, but that was when pages were simple. Once .css and .js files were introduced (not necessarily in the same folder as the .html files), and an ever-increasing number of {{...}} variables and {%...%} commands were introduced, things started getting messy at design-time, even though they looked great at run-time. Things got even more difficult when I needed additional javascript in the or sections. As far as I can see, the main advantages of using templates are: Non-dynamic elements of page can easily be viewed in browser during design. Except for {} placeholders, html is kept separate from python code. If your company has a web-page designer, they can still design without knowing Python. while some disadvantages are: {{}} delimiters visible when viewed at design-time in browser Associated .css and .js files have to be in same folder to see effects in browser at design-time. Data, variables, lists, etc., must be prepared in advanced and either declared globally or passed as parameters to render() function. So - when to use 'hard-coded' HTML, and when to use templates? I am not sure of the best way to go, so I would be interested to hear other developers' views. TIA, Alan

    Read the article

  • sIFR 3 rev 436 - copy link to clipboard

    - by Alan Forsyth
    This was originally a question, but is now a code enhancement, since it's a very minor (but useful) update. When heading (or other) text is used as a link with sIFR 3, you now get the two 'open link / open link in new window' options in the right-click flash context menu for the link. When I came across sIFR for the first time yesterday, I was wanting to copy a header (h2) link to the clipboard, on a site that used sIFR 2.x, and was frustrated that I couldn't. Thanks to the wonders of open source (and well written code), I can suggest the following enhancement to sIFR 3: [In the file flash/sIFR.as, find the section starting with the comment "// Have to set up menu items first!" through to ");" and replace with the following, then add font information to the .fla and export the swf as per the tutorial:] // Have to set up the menu items first! menuItems.push( new ContextMenuItem("Follow link", function() { getURL(sIFR.instance.primaryLink, sIFR.instance.primaryLinkTarget) }), new ContextMenuItem("Open link in new window", function() { getURL(sIFR.instance.primaryLink, "_blank") }), new ContextMenuItem("Copy link to clipboard", function() { System.setClipboard(sIFR.instance.primaryLink) }) ); Now I'm happy... :-) Alan.

    Read the article

  • .NET Embedded Manifest Crashes XP

    - by Alan Spark
    Hi, I am embedding a manifest in a .NET exe so that it can request elevated permissions in Vista and Windows 7. The manifest that I am using is as follows: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" name="ElevationTest" type="win32"/> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"/> </requestedPrivileges> </security> </trustInfo> </assembly> It works as expected in Vista and Windows 7 but crashes XP with the standard "... has encountered a problem and needs to close..." error. If I don't embed any manifest then it works as expected but will obviously not have the required permissions in Vista and Windows 7. What is a standard way of producing an exe that will function with the correct permissions in XP and Vista / Windows 7? Thanks, Alan

    Read the article

  • PHP Mailer Class - Securing Email Credentials

    - by Alan A
    I am using the php mailer class to send email via my scripts. The structure is as follows: $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = 'myserver.com'; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = '[email protected]'; // SMTP username $mail->Password = 'user123'; // SMTP password $mail->SMTPSecure = 'pass123'; It seems to me to be a bit of a security hole having the mailbox credentials in plain view. So I thought I might put these in an external file outside of the web root. My question is how would I then assign the $mail object these values. I of course no how to use include and/or requires... would it simple be a case of.... $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = 'myserver.com'; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication includes '../locationOutsideWebroot/emailCredntials.php'; $mail->SMTPSecure = 'pass123'; Then emailCredentails.php: <?php $mail->Username = '[email protected]'; $mail->Password = 'user123'; ?> Would this be sufficient and secure enough? Thanks, Alan.

    Read the article

  • Need a good colocation host

    - by storm
    I'm looking for a good collocation host in Los Angeles. I've looked at quite a few hosts, but found precious few reviews. Has anyone had particularly good or bad experiences that can point me in a good direction? We will be starting out with 2U's and I'm leaning towards burstable bandwidth rather than 95th percentile. Thanks for the ideas.

    Read the article

  • Godaddy hosting with dynamic ip?

    - by Razor Storm
    I bought a domain name on godaddy.com let's call it www.website.com, but my server has a dynamic ip, how do I resolve this issue? What I've tried: get a dns account at dyndns.com let's call it dns.dyndns.com, so I set up godaddy to forward the domain to dns.dyndns.com. problem: When the user goes to www.website.com, they see dns.dyndns.com in the url bar. Bad So then I set up the forwarding on godaddy to forward with domain masking, but then the problem is now that users can't even see url paths/get queries/ or hash marks anymore! `www.website.com/folder/search?id=4#ajax=4` becomes just www.website.com in the url bar. bad! What do I do?

    Read the article

  • Separate computers in my apartment can't communicate to each other?

    - by Razor Storm
    In my apartment, the management provides the building with a network connection. I have my computer plugged into the ethernet coming out of the walls, and my friend who also lives in the apartment building has his computer connected to a separate ethernet jack. As far as I know our two computers are not within a LAN, and ipconfig shows that we only have external ip addresses. The problem, then, appears when we attempt make direct communication between our computers. I have some hosting server set up on my machine, and my friend is unable to connect to it via my ip address. Other people who do not live in the apartment can connect fine. Ethernet adapter Local Area Connection: IPv4 Address. . . . . . . . . . . : 204.29.113.41 Subnet Mask . . . . . . . . . . . : 255.255.254.0 Default Gateway . . . . . . . . . : 204.29.112.1 His ip: 204.29.113.104 Using a fulltunnel vpn doesn't help.

    Read the article

  • Alternative to setpoint that allows key configuration profiles for multiple mice?

    - by Razor Storm
    I have 2 mice: Logitech MX Revolution and Razer DeathAdder. I use my mx revolution for browsing internet (I set up a lot of hotkeys on all my buttons to make browsing really convenient) and the deathadder for gaming (the mouse is a lot more accurate and smooth). The problem is that by having two mice, setpoint randomly forgets its settings once in a while (I'm assuming due to getting confused why theres two input devices), and I constantly have to restart setpoint (every few minutes) to get it to rerecognize that the

    Read the article

  • Apache Forbidden: httpd.conf or File Permissions

    - by Alan Storm
    When setting up an Apache virtual host, I'll occasionally get the following error when attempting to access the site. Forbidden You don't have permission to access / on this server. Is there any method to (or tool that will) tell me why Apache is denying access? (local rule in httpd.conf, file permissions, etc. I'm not looking for help with a specific configuration, instead I'm looking for a way to have the computer tell me what's wrong with my system and/or configuration.

    Read the article

  • Windows 7 BSOD on boot after windows update

    - by Razor Storm
    After Windows updates today, I restarted my desktop (for the first time in a couple weeks), and on boot up ran into a BSOD: STOP: 0x0000007E (0xFFFFFFFFC0000005, 0xFFFFF8000355AB5A, 0xFFFFF880031CB3A8, 0xFFFFF880031CAC10) I tried system restore, but there was only 1 restore point which was from all the way back in January. I tried it anyway but after 10 minutes of running it said system restore could not be completed. Additional info: I checked my BIOS and it is detecting my rams. CPU is Intel Sandy Bridge i5-2500k overclocked to 4.3GHz. I reclocked it back to stock speeds (3.3 GHz) in case it was causing the issue (I highly doubt that it is). But the problem persists. Running Windows 7. 12 GB of RAM at 1333 MHz OS on 64gb SSD. What is causing this? How should I fix it? Also, if it is caused by windows update, is there a way to undo the update with command prompt? I tried safemode, and the blue screen comes up as well, but I am able to access command prompt.

    Read the article

  • Windows 7 Favorite folder doesn't work

    - by Razor Storm
    So recently I did a very stupid thing and accidentally deleted my APPDATA (LOL yes), and now the favorite folder doesn't work anymore. The favorite folder I am refering to is the one in windows explorer (not the horrid IE) in windows 7, which appears on the left of windows explorer windows. The %USERPROFILE%/Favorite folder still works correctly, but the favorite folder in the shell doesn't point there, instead it points to a nonexistant and broken location, how do i fix this problem?

    Read the article

  • iTunes high CPU usage

    - by Calm Storm
    I upgraded to iTunes 10.4.1 and use Windows 7 and my itunes library is not that large at all (say about 20gb) When I start iTunes the CPU goes between 60-80% and stays there for a long time. I see that the itunes.exe takes about 70% of CPU in Process Explorer and it spawns a SearchProtocolHost.exe every 2 mins or so which takes < 0.1% CPU. Other than that iTunes.exe is always at 70-90% and never lets me do anything else. Does someone have a suggestion? EDIT: I have tried reinstalling 10.4.1 completely deleting my library and starting with a plain installation and that does not work I have tried downgrading to 10.3.x and that does not work either :(

    Read the article

  • How to open a EAR/WAR file in windows 7

    - by Calm Storm
    I have a few EAR/WAR files which are Java archives and I would like Windows 7 to open these files the way it opens a file with extension zip. So I open this war file and in the list of softwares available with "Open" I see MS Word, Notepad etc but nothing about CompressedFolderView. I also tried manually specifying the location of exe (I thought this was expand.exe) but that does not work. Does someone know if I can make this work? Or should I use Winzip or some such utilities?

    Read the article

  • Earth’s Radiation Belt Sounds like Whale Song [Video]

    - by Jason Fitzpatrick
    The radio frequencies of Earth’s radiation belt have uncanny resemblance to a sort of whale/bird song remix. Check out this video to learn more about NASA’s efforts to explore the belts and listen to the Earth’s song. When we hear the “song” of the Earth, exactly what are we hearing? Science@NASA explains: Chorus is an electromagnetic phenomenon caused by plasma waves in Earth’s radiation belts. For years, ham radio operators on Earth have been listening to them from afar. Now, NASA’s twin Radiation Belt Storm Probes are traveling through the region of space where chorus actually comes from–and the recordings are out of this world. “This is what the radiation belts would sound like to a human being if we had radio antennas for ears,” says Kletzing, whose team at the University of Iowa built the “EMFISIS” (Electric and Magnetic Field Instrument Suite and Integrated Science) receiver used to pick up the signals. He’s careful to point out that these are not acoustic waves of the kind that travel through the air of our planet. Chorus is made of radio waves that oscillate at acoustic frequencies, between 0 and 10 kHz. The magnetic search coil antennas of the Radiation Belt Storm Probes are designed to detect these kinds of waves. HTG Explains: How Antivirus Software Works HTG Explains: Why Deleted Files Can Be Recovered and How You Can Prevent It HTG Explains: What Are the Sys Rq, Scroll Lock, and Pause/Break Keys on My Keyboard?

    Read the article

  • Very Cool &ndash; Miami 311 System for tracking citizen service requests (Windows Azure, Silverlight

    - by Jim Duffy
    Having grown up in South Florida this short, but very enlightening, video explaining how the City of Miami has implemented a 311 citizen service request system using Windows Azure, Silverlight and Bing Maps definitely caught my attention. Miami311 The Miami311 System is a Windows Azure/Silverlight-based solution which enables City of Miami citizens report and track issues reported to city management. The system uses Bing Maps to plot the location and relevant information about each issue reported. Citizens now have the ability to easily see the status of the issue without having to call the city office. What I found interesting were a couple of benefits that a metropolitan area such as Miami can take advantage of in Windows Azure cloud-based solution. For the city of Miami, both benefits center around the weather. Of course the threat of a hurricane is a real issue in South Florida and what better way to make sure your site stays up during a hurricane then to have the site hosted far away from the eye of the storm. Using a Windows Azure cloud-based architecture the City of Miami is able to host the application within the Microsoft data centers safely away from any hurricane passing through South Florida. The second benefit is the inherent scalability of a Windows Azure based solution. During a severe weather event like thunderstorms or even worse, a hurricane, downed trees and power lines are a commonly reported problem. Being able to quickly scale up the computing resources required to handle the spike in citizens reporting these types of problems on the site is a huge benefit. Once the weather event has passed and downed tree reports begin to subside they can quickly reverse the process and scale the system back down to pre-storm levels. It’s kind of day-to-day kind of stuff but very cool stuff nonetheless. Have a day. :-|

    Read the article

  • Jet Brains release WebStorm 5.0

    - by TATWORTH
    At http://www.jetbrains.com/webstorm/whatsnew/index.html?WS50ROW, Jet Brains have announced the release of WebStorm 5.0, an IDE that brings the ease of code writing in VB.NET and C# that you get with ReSharper, to JavaScript, CSS and LESS. (There are some more details in http://blog.jetbrains.com/webide/2012/08/liveedit-plugin-features-in-detail/)Code completion in JavaScript, CSS and LESS is a very welcome feature. I look forward to trying out Web Storm. The download at http://www.jetbrains.com/webstorm/download/index.html comes with a free 30-day trial).Price information is at http://www.jetbrains.com/webstorm/buy/index.jsp - you should note that if you are an open-source developer, you can apply for a free license. The price of a personal license at £23 + VAT is a no-brainer. The price of a Commercial license would have been paid for in a few days of the increased productivity that this tool brings.Web Storm currently requires Google Chrome to run. Like ReSharper it appears to be a very able tool. It includes tools such as:XSLT debuggingJSLint for checking for JavaScript errorsJavaScript debuggingJavaScript unit testing (including code coverage)JavaScript folding regionsCoffeeScript supportWell I suggest that you try WebStorm 5.0

    Read the article

  • Silverlight Cream for May 11, 2010 -- #859

    - by Dave Campbell
    In this All Submittal Issue: Colin Eberhardt, Ken Johnson, Alan Beasley, Pencho Popadiyn, Phil Middlemiss, Khawar(-2-), Levente Mihály, Alex van Beek, Bart Czernicki, Michael Washington, and Mark Monster. Shoutout: Not Silverlight necessarily, but definitely VS2010, read what Brett Balmer has to say In Defense of Portrait Mode From SilverlightCream.com: Silverlight MultiBinding solution for Silverlight 4 Colin Eberhardt updated his Silverlight Multibinding solution to Silverlight 4. Great article with explanatory graphics, and links to the code... congrats on the use in the FaceBook Client too! Spirograph Shapes: WPF Bezier shapes from math formulae Wow... I haven't seen this much math since my Master's Thesis! ... Check out all the shapes Ken Johnson has built... don't let the math scare you... just use it :) Busy Dizzy Bee-sley Spirographic Animation in Expression Blend and Silverlight This is just fun... I saw Michael Washington playing with this yesterday at the Arizona Day of .NET but didn't have a chance to ask what it was.. Alan Beasley had a good time building this, and is sharing a very detailed tutorial with us. ModalDialogs, IEditableObject and MVVM in Silverlight 4 Pencho Popadiyn said the 'M' word over at SilverlightShow... actually the 'MVVM' word :) ... he's discussing Modal dialogs with no code in the View ... check out how he did it. A Chrome and Glass Theme - Part 6 Phil Middlemiss is up to episode 6 in his Theme-building tutorial... this time out, he's giving the TabControl and TabItem new clothes ... specifically discussing what to change and what to allow to inherit ... good stuff! Silverlight 4 Fonts gotcha Check out Khawar's ATM Machine demo -- there's a link on the page for this post... he had an issue with fonts, ratted it out, and explains it for all of us... thanks Khawar Demystifying Silverlight Obfuscation Khawar also has a good post up on Obfuscating your Silverlight... definitely showing that it's not all that difficult to do. geoGallery, a WinPhone7 sample OK this is interesting... using the geoLocation feature of WP7, Levente Mihály hits Google Picasa to find pictures... good write-up and all the code. Silverlight 4: Digitally signing a XAP with Visual Studio 2010 Alex van Beek has a nice tutorial on Signing your XAP file using Visual Studio 2010... of course you may want to visit Tim Heuer's blog (search at SC) to find the two good deals on certificates that are still in play. Creating Key Performance Indicators (KPIs) in Expression Blend 4 for Business Intelligence applications In an interesting post, Bart Czernicki describes using the shape assets in Blend 4 to produce a KPI display in Silverlight or WPF. A discussion of the shape's evolution for KPI is included as well as some alternate shape uses. A DotNetNuke Silverlight 4 Drag and Drop File Manager Michael Washington has blogged about his Drag and Drop File Manager using the View Model Style pattern. This is covered in two CodeProject articles listed in the post. The design work was done by Alan Beasely and links to his work is there as well as covered in other SC posts. How to select a ListItem on Hover Mark Monster had a Use Case for Selecting a ListBox entry by hovering ... but he did it with a Behavior and for a ListBox and PathListBox and it works with DataBinding... Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Reputable geo-ip location Services

    - by Alan Storm
    Who are some of the reputable and/or stable geo-ip location service providers? I'm specing out an application that needs this functionality, and whenever I google geo-ip I get a ton of hits, but it's hard to tell who the legit providers are and who the fly-by-night folks are. Ideally I'd like something that can run without a call to an external API (i.e. regular database updates), but would be interested in hearing about experience with providers who offer live/http services. If it ran in PHP that would be great, but so long as it could run in a *nix environment that's fine. I'd prefer a paid service from a reputable provider than an awesome free service that could vanish tomorrow (free services are welcome, just convince me they're not going to vanish).

    Read the article

  • Forcing fputcsv to Use Enclosure For *all* Fields

    - by Alan Storm
    When I use fputcsv to write out a line to an open file handle, PHP will add an enclosing character to any column that it believes needs it, but will leave other columns without the enclosures. For example, you might end up with a line like this 11,"Bob ",Jenkins,"200 main st. USA ",etc Short of appending a bogus space to the end of every field, is there any way to force fputcsv to always enclose columns with the enclosure (defaults to a ") character?

    Read the article

  • How to get the Blur event to fire for the document on the iPhone?

    - by Ian Storm Taylor
    Does anyone know how to get the blur event to fire on the document for the iPhone? I'm trying to get it to fire either when a user changes windows in Safari, or when they open their bookmarks or when they decide to add the page to their homescreen. But none of these are firing it. Here's my code: $(document).blur( function () { document.title = "Ian Taylor"; }); I've tried "document", "window", "'body'". Nothing seems to work.

    Read the article

  • How to upgrade all dependencies to a specific version

    - by Calm Storm
    Hi, I tried doing a mvn dependency:tree and I get a tree of dependencies. My question is, My project depends on many modules which internally depends on many spring artifacts. There are a few version clashes. I want to upgrade all spring related libraries to say the latest one (2.6.x or above). What is the preferred way to do this? Should I declare all the deps spring-context, spring-support (and 10 other artifacts) in my pom.xml and point them to 2.6.x ? Is there any other better method ? [INFO] +- com.xxxx:yyy-jar:jar:1.0-SNAPSHOT:compile [INFO] | +- com.xxxx:zzz-commons:jar:1.0-SNAPSHOT:compile [INFO] | | +- org.springframework:spring-dao:jar:2.0.7:compile [INFO] | | +- org.springframework:spring-jdbc:jar:2.0.7:compile [INFO] | | +- org.springframework:spring-web:jar:2.0.7:compile [INFO] | | +- org.springframework:spring-support:jar:2.0.7:compile [INFO] | | +- net.sf.ehcache:ehcache:jar:1.2:compile [INFO] | | +- commons-collections:commons-collections:jar:3.2:compile [INFO] | | +- aspectj:aspectjweaver:jar:1.5.3:compile [INFO] | | +- betex-commons:betex-commons:jar:5.5.1-2:compile [INFO] | | \- javax.servlet:servlet-api:jar:2.4:compile [INFO] | +- org.springframework:spring-beans:jar:2.0.7:compile [INFO] | +- org.springframework:spring-jmx:jar:2.0.7:compile [INFO] | +- org.springframework:spring-remoting:jar:2.0.7:compile [INFO] | +- org.apache.cxf:cxf-rt-core:jar:2.0.2-incubator:compile [INFO] | | +- org.apache.cxf:cxf-api:jar:2.0.2-incubator:compile [INFO] | | | +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0-M1:compile [INFO] | | | +- org.codehaus.woodstox:wstx-asl:jar:3.2.1:compile [INFO] | | | +- org.apache.neethi:neethi:jar:2.0.2:compile [INFO] | | | \- org.apache.cxf:cxf-common-schemas:jar:2.0.2-incubator:compile UPDATE : I have removed the extra question about "\-" so my question is now what the subject asks for :)

    Read the article

  • Strategies for Accessing a Application with a COM API From PHP

    - by Alan Storm
    Background: Experienced PHP developer with a mostly *nix background. I'm writing a PHP application that needs to interact with a proprietary 3rd party system. The 3rd party system is Windows only. The PHP application will be living on a separate Linux based system The 3rd party application has been described as having a "COM API" that I'll need to talk to from the PHP application. What does this look like architecturally speaking? I'm starting with the COM section of the PHP manual, but I have specific questions. Specific Questions: Can I talk directly to a COM API from a PHP application running on another server? If so, how? (what PHP extensions would I need, or what protocols/PHP functions would I be using to talk to the API) If the answer to number 2 is no, I'd assume I'd need some kind of application on the Windows machine that can talk to COM, and then a service on the windows machine I can hit with PHP. Are there prebuilt frameworks for this kind of thing? Is this all nonsense and/or did I say something exceedingly stupid? (Quite possible, as I'm a little fuzzy on what "COM" does and doesn't cover) I'm obviously not looking for a full solution here, I'm just trying to get a general idea of what is and isn't possible and what kind of things I'll want to Google for. Thanks!

    Read the article

  • Robust, Mature HTML Parser for PHP

    - by Alan Storm
    Are there any robust and mature HTML parsers available for PHP? A quick skimming of PEAR didn't turn anything up (lots of classes for generating HTML, not so much for consuming), and Google taught me a lot of people have started and then abandoned a variety of parser projects. Not interested in XML parsers (unless then can consume non-well formed HTML) or hacking it on my own with regular expressions. Clarification of Intent: I'm not interested in filtering of HTML content, I'm interesting in extracting information from HTML documents.

    Read the article

  • How to ask BeanUtils to ignore null values

    - by Calm Storm
    Using Commons beanUtils I would like to know how to ask any converter say the Dateconverter to ignore null values and use null as default. As an example consider a public class, public class X { private Date date1; private String string1; //add public getters and setters } and my convertertest as, public class Apache { @Test public void testSimple() throws Exception { X x1 = new X(), x2 = new X(); x1.setString1("X"); x1.setDate1(null); org.apache.commons.beanutils.BeanUtils.copyProperties(x2, x1); //throws ConversionException System.out.println(x2.getString1()); System.out.println(x2.getDate1()); } } The above throws a NPE since the date happens to be null. This looks a very primitive scenario to me which should be handled by default (as in, I would expect x2 to have null value for date1). The doco tells me that I can ask the converter to do this. Can someone point me as to the best way for doing this ? I dont want to get hold of the Converter and isUseDefault() to be true because then I have to do it for all Date, Enum and many other converters !

    Read the article

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