Search Results

Search found 361 results on 15 pages for 'erik philips'.

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

  • How to use Python list comprehension (or such) for retrieving rows when using MySQLdb?

    - by Erik Nygren
    Hey all, I use MySQLdb a lot when dealing with my webserver. I often find myself repeating the lines: row = cursor.fetchone() while row: do_processing(row) row = cursor.fetchone() Somehow this strikes me as somewhat un-pythonic. Is there a better, one-line way to accomplish the same thing, along the lines of inline assignment in C: while (row = do_fetch()) { do_processing(row); } I've tried figuring out the syntax using list comprehensions, but I can't seem to figure it out. Any recommendations? Thanks, Erik

    Read the article

  • Youtube Downloader

    - by Erik Persson
    Hi, A time ago I had a script who got the flv-file from a specified youtube-video, which now is broken due to changes at their website. I am wondering if Youtube may have an API to download the flv-file, where can I find it in that case? Have anyone build an own script, may someone wanna help be building it? Is there any scripts in any other languages such as shell/bash that works? :) Best regards, Erik Persson

    Read the article

  • wifi usb dongle detected but no wlan interface

    - by piotrek
    I'm using ubuntu 12.04. When I insert my philips PTA01 usb wifi dongle, in dmesg i can see: [ 1181.535290] usb 2-3: new high-speed USB device number 4 using ehci_hcd [ 1181.684074] usb 2-3: New USB device found, idVendor=0471, idProduct=209e [ 1181.684086] usb 2-3: New USB device strings: Mfr=16, Product=32, SerialNumber=48 [ 1181.684093] usb 2-3: Product: PTA-01 [ 1181.684100] usb 2-3: Manufacturer: PHILIPS TV [ 1181.684105] usb 2-3: SerialNumber: 10 dmesg | grep ath: [ 367.861626] usbcore: registered new interface driver ath9k_htc but still there is no wlan interface when I do ifconfig. Just eth0 and lo. How can I turn wifi on? in case it's relevant. uname -a: Linux myhost 3.5.0-28-generic #48~precise1-Ubuntu SMP Wed Apr 24 21:42:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    Read the article

  • Phillips SAA7139 TV tuner card not working

    - by Gaurav Butola
    When I had windows 7 installed on my computer, My TV tuner card used to work fine after installing the drivers but on ubuntu it is not working. I have tried several Softwares to get it working but none helped. Today I installed Me Tv and when I open it, I get an error saying "There are no DVB devices available". What can I do to get my Philips TV Tuner card working. I have a PCI card and here is the output of lspi command 04:00.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)

    Read the article

  • Steps to diagnose SNU5600 disconnection problem

    - by Rich
    I have a Philips SNU5600 WiFi dongle plugged into two machines (ie I have two SNU5600 dongles, one in each machine). One machine is running 10.10 and the other is running Linux Mint. The dongles work absolutely fine, except if I do a lot of file transfers to a NAS attached to the wireless router. After a while the connection to the router will go. To get the connection back I either need to run sudo /etc/init.d/networking restart or I need to unplug and plug in again the dongle. Otherwise the dongle works fine (web browsing, streaming, etc). Output of lsusb: Bus 002 Device 003: ID 0471:1236 Philips (or NXP) SNU5600 802.11bg Output of lsusb -v at http://pastebin.com/dXYKkF01 What steps should I take next to resolve this? Is it a known problem? Could it be the router? It is a 3Com "OfficeConnect Wireless 11g Cable/DSL Gateway Version 1.02.15".

    Read the article

  • Better way to write this regex to match multi-ordered property list?

    - by Andrew Philips
    I've been whacking on this regex for a while, trying to build something that can pick out multiple ordered property values (DTSTART, DTEND, SUMMARY) from an .ics file. I have other options (like reading one line at a time and scanning), but wanted to build a single regex that can handle the whole thing. SAMPLE PERL # There has got to be a better way... my $x1 = '(?:^DTSTART[^\:]*:(?<dts>.*?)$)'; my $x2 = '(?:^DTEND[^\:]*:(?<dte>.*?)$)'; my $x3 = '(?:^SUMMARY[^\:]*:(?<dtn>.*?)$)'; my $fmt = "$x1.*$x2.*$x3|$x1.*$x3.*$x2|$x2.*$x1.*$x3|$x2.*$x3.*$x1|$x3.*$x1.*$x2|$x3.*$x2.*$x1"; if ($evts[1] =~ /$fmt/smo) { printf "lines:\n==>\n%s\n==>\n%s\n==>\n%s\n", $+{dts}, $+{dte}, $+{dtn}; } else { print "Failed.\n"; } SAMPLE DATA BEGIN:VEVENT UID:0A5ECBC3-CAFB-4CCE-91E3-247DF6C6652A TRANSP:OPAQUE SUMMARY:Gandalf_flinger1 DTEND:20071127T170005 DTSTART,lang=en_us:20071127T103000 DTSTAMP:20100325T003424Z X-APPLE-EWS-BUSYSTATUS:BUSY SEQUENCE:0 END:VEVENT SAMPLE OUTPUT lines: == 20071127T103000 == 20071127T170005 == Gandalf_flinger1

    Read the article

  • WPF Skin Skinning Security Concerns

    - by Erik Philips
    I'm really new to the WPF in the .Net Framework (get that out of the way). I'm writing an application where the interface is very customizable by simply loading .xaml (at the moment a Page element) files into a frame and then mapping the controls via names as needed. The idea is to have a community of people who are interested in making skins, skin my application however they want (much like Winamp). Now the question arises, due to my lack of Xaml knowledge, is it possible to create malicious Xaml pages that when downloaded and used could have other embedded Iframes or other elements that could have embed html or call remote webpages with malicious content? I believe this could be the case. If this is the case then I two options; either I have an automated process that can remove these types of Xaml files by checking it’s elements prior to allowing download (which I would assume would be most difficult) or have a human review them prior to download. Are there alternatives I’m unaware of that could make this whole process a lot easier?

    Read the article

  • Visual Studio Talk Show #118 is now online - Command-Query Responsibility Separation (French)

    http://www.visualstudiotalkshow.com Erik Renaud: La sparation des responsabilits entre les commandes et les requtes Nous discutons avec Erik Renaud de la sparation des responsabilits entre les commandes et les requtes (Command-Query Responsibility Separation - CQRS). La plupart des applications lisent les donnes beaucoup plus frquemment qu'ils font des critures. Sur la base de cette dclaration, une bonne ide consiste sparer le code qui est responsable de lcriture des donnes du code qui est...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • setting enablesReturnKeyAutomatically on UISearchBar

    - by Erik Carlson
    Hi There, I'm writing for iphone OS 3.1.3. I want the search button in the keyboard from my UISearchBar to have the search button enabled all the time. If this was any old UITextField (not a search bar) the property would be enablesReturnKeyAutomatically. I have tried setting this using the example given at http://discussions.apple.com/thread.jspa?messageID=8457910 which suggests: UITextField *searchTextField ; searchTextField = [[searchBar subviews]objectAtIndex:0]; searchTextField.enablesReturnKeyAutomatically = NO ; Should work. unfortunately it crashes: 2010-05-20 08:36:18.284 ARemote[5929:207] *** -[UISearchBarBackground setEnablesReturnKeyAutomatically:]: unrecognized selector sent to instance 0x3b31980 2010-05-20 08:36:18.284 ARemote[5929:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UISearchBarBackground setEnablesReturnKeyAutomatically:]: unrecognized selector sent to instance 0x3b31980' I have also tried ((UITextField *)[(NSArray *)[searchBar subviews] objectAtIndex:0]).enablesReturnKeyAutomatically = NO;</code> Which gives similar results. Any ideas? Cheers Erik

    Read the article

  • Random Gui errors using C# Mono on OSX

    - by Erik Karlsson
    Hello. Im developing a app in c# (winforms), which uses mono to run on osx. It contains some dynamic controls, for example a custom groupbox which contains some labels and textboxes, a button etc. these boxes can both be added and removed dynamically. Problem arises both when they are created, and removed, or even when a messagebox is shown. What happens is that sometimes on rendering white boxes appears, or some labels are not drawn correctly. And sometimes when a messagebox appears, it first opens up like 5 dummies which are just blank, and which you cant close. Am i doing something wrong, should i sleep the gui thread a bit after each creation, or should i invalidate stuff on my own? Or should i try GTK#? Many thanks on input on this, Erik

    Read the article

  • Change present working directory of a calling shell from a ruby script

    - by Erik Kastman
    I'm writing a simple ruby sandbox command-line utility to copy and unzip directories from a remote filesystem to a local scratch directory in order to unzip them and let users edit the files. I'm using Dir.mktmpdir as the default scratch directory, which gives a really ugly path (for example: /var/folders/zz/zzzivhrRnAmviuee+++1vE+++yo/-Tmp-/d20100311-70034-abz5zj) I'd like the last action of the copy-and-unzip script to cd the calling shell into the new scratch directory so people can access it easily, but I can't figure out how to change the PWD of the calling shell. One possibility is to have the utility print out the new path to stdout and then run the script as part of a subshell (i.e. cd $(sandbox my_dir) ), but I want to print out progress on the copy-and-unzipping since it can take up to 10 minutes, so this won't work. Should I just have it go to a pre-determined, easy-to-find scratch directory? Does anyone have a better suggestion? Thanks in advance for your help. -Erik

    Read the article

  • ReadOnlyCollection or IEnumerable for exposing member collections?

    - by Erik Öjebo
    Is there any reason to expose an internal collection as a ReadOnlyCollection rather than an IEnumerable if the calling code only iterates over the collection? class Bar { private ICollection<Foo> foos; // Which one is to be preferred? public IEnumerable<Foo> Foos { ... } public ReadOnlyCollection<Foo> Foos { ... } } // Calling code: foreach (var f in bar.Foos) DoSomething(f); As I see it IEnumerable is a subset of the interface of ReadOnlyCollection and it does not allow the user to modify the collection. So if the IEnumberable interface is enough then that is the one to use. Is that a proper way of reasoning about it or am I missing something? Thanks /Erik

    Read the article

  • Unit Testing & Fake Repository implementation with cascading CRUD operations

    - by Erik Ashepa
    Hi, i'm having trouble writing integration tests which use a fake repository, For example : Suppose I have a classroom entity, which aggregates students... var classroom = new Classroom(); classroom.Students.Add(new Student("Adam")); _fakeRepository.Save(classroom); _fakeRepostiory.GetAll<Student>().Where((student) => student.Name == "Adam")); // This query will return null... When using my real implementation for repository (NHibernate based), the above code works (because the save operation would cascade to the student added at the previous line), Do you know of any fake repository implementation which support this behaviour? Ideas on how to implement one myself? Or do you have any other suggestions which could help me avoid this issue? Thanks in advance, Erik.

    Read the article

  • PHP - CSRF - How to make it works in all tabs?

    - by Erik Persson
    Hi there, I have readed about how to prevent CSRF-attacks in the last days. I am going to update the token in every pageload, save the token in the session and make a check when submitting a form. But what if the user has, lets say 3 tabs open with my website, and I just store the last token in the session? This will overwrite the token with another token, and some post-action is going to fail. Do I need to store all tokens in the session, or is there a better solution to get this working? Best regards, Erik Persson

    Read the article

  • MVVM/Presentation Model With WinForms

    - by Erik Ashepa
    Hi, I'm currently working on a brownfield application, it's written with winforms, as a preparation to use WPF in a later version, out team plans to at least use the MVVM/Presentation model, and bind it against winforms... I've explored the subject, including the posts in this site (which i love very much), when boiled down, the main advantage of wpf are : binding controls to properties in xaml. binding commands to command objects in the viewmodel. the first feature is easy to implement (in code), or with a generic control binder, which binds all the controls in the form. the second feature is a little harder to implement, but if you inherit from all your controls and add a command property (which is triggered by an internal event such as click), which is binded to a command instance in the ViewModel. The challenges I'm currently aware of are : implementing a commandmanager, (which will trigger the CanInvoke method of the commands as necessery. winforms only supports one level of databinding : datasource, datamember, wpf is much more flexible. am i missing any other major features that winforms lacks in comparison with wpf, when attempting to implement this design pattern? i sure many of you will recommend some sort of MVP pattern, but MVVM/Presentation model is the way to go for me, because I'll want future WPF support. Thanks in advance, Erik.

    Read the article

  • function (blurClass) NOT WORKING IN IE

    - by Erik
    I can't get this plugin to function properly in IE.... Check out my homepage and look at the huge search field toward the top... www.naturalskin.com Whenever I refresh the screen the "blur" looses its function and I'm stuck with text..... Here is the script that I place in an external js page: http://www.naturalskin.com/src/js/javascript/batches.js jQuery.fn.hint = function (blurClass) { if (!blurClass) { blurClass = 'blur'; } return this.each(function () { // get jQuery version of 'this' var $input = jQuery(this), // capture the rest of the variable to allow for reuse title = $input.attr('title'), $form = jQuery(this.form), $win = jQuery(window); function remove() { if ($input.val() === title && $input.hasClass(blurClass)) { $input.val('').removeClass(blurClass); } } // only apply logic if the element has the attribute if (title) { // on blur, set value to title attr if text is blank $input.blur(function () { if (this.value === '') { $input.val(title).addClass(blurClass); } }).focus(remove).blur(); // now change all inputs to title // clear the pre-defined text when form is submitted $form.submit(remove); $win.unload(remove); // handles Firefox's autocomplete } }); }; Erik

    Read the article

  • PHP: Next Available Value in an Array, starting with a non-indexed value

    - by Erik Smith
    I've been stumped on this PHP issue for about a day now. Basically, we have an array of hours formatted in 24-hour format, and an arbitrary value ($hour) (also a 24-hour). The problem is, we need to take $hour, and get the next available value in the array, starting with the value that immediately proceeds $hour. The array might look something like: $goodHours = array('8,9,10,11,12,19,20,21). Then the hour value might be: $hour = 14; So, we need some way to know that 19 is the next best time. Additionally, we might also need to get the second, third, or fourth (etc) available value. The issue seems to be that because 14 isn't a value in the array, there is not index to reference that would let us increment to the next value. To make things simpler, I've taken $goodHours and repeated the values several times just so I don't have to deal with going back to the start (maybe not the best way to do it, but a quick fix). I have a feeling this is something simple I'm missing, but I would be so appreciative if anyone could shed some light. Erik

    Read the article

  • Why can't i change the permissions of files I have access to?

    - by Erik
    I'm logged into a server as user "ubuntu" and I've got files that look like this: -rw-rw-r-- 1 www-data www-data 33150 2012-06-04 22:17 file-a.png -rw-rw-r-- 1 www-data www-data 36371 2012-06-04 22:15 file-b.png -rw-rw-r-- 1 www-data www-data 41439 2012-06-04 22:16 file-c.png the ubuntu user is a member of the group www-data: > groups unbuntu ubuntu : ubuntu www-data so shouldn't I be able to change other permissions since I have access to the file? I'm not an expert on the user/group stuff ... so this is just perplexing me. I'm trying to run: > chmod o-r * I realize I can do it with sudo, easily, but I'm trying to understand why I can't modify the files without sudo. Thanks for any help!

    Read the article

  • Can I use CodeSynthesis XSD (C++/Tree mapping) together with a GPLv3-licensed library?

    - by Erik Sjölund
    Is it possible to write an open source project that uses generated code from CodeSynthesis XSD (C++/Tree) and then link it to a third-party library that is licensed under the GPL version 3? Some background information: CodeSynthesis XSD is licensed under the GPL version 2 but with an extra FLOSS exception (http://www.codesynthesis.com/projects/xsd/FLOSSE). C++ source code generated from CodeSynthesis XSD (C++/Tree) needs to be linked against Xerces (http://xerces.apache.org/xerces-c/) that is licensed under the Apache License 2.0. Update I posted a similar question on the xsd-users mailing list two years ago but I didn't fully understand the answers. In that email thread, I wrote: I think it is the GPL version 3 software that doesn't allow itself be linked to software that can't be "relicensed" to GPL version 3 ( for instance GPL version 2 software ). That would also include XSD as the FLOSS exception doesn't give permission to "relicense" XSD to GPL version 3.

    Read the article

  • Automatic login vs. manual login and screensaver lock

    - by Erik Johansson
    Is there a way to prevent a command from running when I login manually, but having it run when the computer starts up and GDM automatically logs me in. This is the setup: in the Gnome "on start programs" settings I have a command that locks the screen gnome-screensaver-command -l I have automatic login turned on. That means that the screen will be locked when I turn on the computer, but it will also be locked when I manually login from GDM, is there a way to prevent this?

    Read the article

  • VIM does not detect syntax of .ssh/config

    - by Erik
    On a plain Ubuntu installation (12.04 in my case) when I have no ~/.vimrc VIM does not detect syntax of .ssh/config. Syntax highlighting works, but it does not set the correct filetype. vi ~/.ssh/config :set syn? >syntax=conf When I do: set syn=sshconfig Then the syntax highlighting is as it should be. Why isn't the filetype automatically identified? And how can it be set automatically?

    Read the article

  • New Management Console in Java SE Advanced 8u20

    - by Erik Costlow-Oracle
    Java SE 8 update 20 is a new feature release designed to provide desktop administrators with better control of their managed systems. The release notes for 8u20 are available from the public JDK release notes page. This release is not a Critical Patch Update (CPU). I would like to call attention to two noteworthy features of Oracle Java SE Advanced, the commercially supported version of Java SE for enterprises that require both support and specialized tools. The new Advanced Management Console provides a way to monitor and understand client systems at scale. It allows organizations to track usage and more easily create and manage client configuration like Deployment Rule Sets (DRS). DRS can control execution of tracked applications as well as specify compatibility of which application should use which Java SE installation. The new MSI Installer integrates into various desktop management tools, making it easier to customize and roll out different Java SE versions. Advanced Management Console The Advanced Management Console is part of Java SE Advanced designed for desktop administrators, whose users need to run many different Java applications. It provides usage tracking for those Applet & Web Start applications to help identify them for guided DRS creation. DRS can then be verified against the tracked data, to ensure that end-users can run their application against the appropriate Java version with no prompts. Usage tracking also has a different definition for Java SE than it does for most software applications. Unlike most applications where usage can be determined by a simple run-count, Java is a platform used for launching other applications. This means that usage tracking must answer both "how often is this Java SE version used" and "what applications are launched by it." Usage Tracking One piece of Java SE Advanced is a centralized usage tracker. Simply placing a properties file on the client informs systems to report information to this usage tracker, so that the desktop administrator can better understand usage. Information is sent via UDP to prevent any delay on the client. The usage tracking server resides at a central location on the intranet to collect information from those clients. The information is stored in a normalized database for performance, meaning that a single usage tracker can handle a large number of clients. Guided Deployment Rule Sets Deployment Rule Sets were introduced in Java 7 update 40 (September 2013) in order to help administrators control security prompts and guide compatibility. A previous post, Deployment Rule Sets by Example, explains how to configure a rule set so that most applications run against the most secure version but a specific applet may run against the Java version that was current several years ago. There are a different set of questions that can be asked by a desktop administrator in a large or distributed firm: Where are the Java RIAs that our users need? Which RIA needs which Java version? Which users need which Java versions? How do I verify these answers once I have them? The guided deployment rule set creation uses usage tracker data to identify applications both by certificate hash and location. After creating the rules, a comparison tool exists to verify them against the tracked data: If you intend to run an RIA, is it green? If something specific should be blocked, is it red? This makes user-testing easier. MSI Installer The Windows Installer format (MSI) provides a number of benefits for desktop administrators that customize or manage software at scale. Unlike the basic installer that most users obtain from Java.com or OTN, this installer is built around customization and integration with various desktop management products like SCCM. Desktop administrators using the MSI installer can use every feature provided by the format, such as silent installs/upgrades, low-privileged installations, or self-repair capabilities Customers looking for Java SE Advanced can download the MSI installer through their My Oracle Support (MOS) account. Java SE Advanced The new features in Java SE Advanced make it easier for desktop administrators to identify and control client installations at scale. Administrators at organizations that want either the tools or associated commercial support should consider Java SE Advanced.

    Read the article

  • How to credit other authors in an open source project

    - by erik
    I have a pet project that I am planning to release as open source at some point in the not-too-distant future. A couple of the files use or are mostly code that was taken from a project released under the New BSD License. While I have changed it to fit my needs and added some small stuff, the algorithm and the functionality is basically exactly the same. I want to make sure that the author of the code gets credit and that the license is not broken, but I also want to make the reader aware that this is not the code as it was orignally released. How should I approach this? Should I isolate the code as much as possible and just retain the original license? Maybe put all the files that contain foreign code in their own folder and add a readme explaining what has been added/removed? There must have been tons of projects using other open source code. What is the standard approach to this?

    Read the article

  • Running a webbrowser on the screen saver or login screen.

    - by Erik Johansson
    I would really like people to beable to use my locked computer to surf, so I would like some way to run a browser on login screen. So can I make GDM run firefox in some way? It would be cooler if I could have a browser as a screensaver, but that seems a bit harder. Please ignore all the security problems with this, if you let someone use your computer you have lost that race anyways. Though of course it would be nice to have a browser running as another user.

    Read the article

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