Daily Archives

Articles indexed Friday May 21 2010

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

  • Python 3.0 IDE - Komodo and Eclipse both flaky?

    - by victorhooi
    heya, I'm trying to find a decent IDE that supports Python 3.x, and offers code completion/in-built Pydocs viewer, Mercurial integration, and SSH/SFTP support. Anyhow, I'm trying Pydev, and I open up a .py file, it's in the Pydev perspective and the Run As doesn't offer any options. It does when you start a Pydev project, but I don't want to start a project just to edit one single Python script, lol, I want to just open a .py file and have It Just Work... Plan 2, I try Komodo 6 Alpha 2. I actually quite like Komodo, and it's nice and snappy, offers in-built Mercurial support, as well as in-built SSH support (although it lacks SSH HTTP Proxy support, which is slightly annoying). However, for some reason, this refuses to pick up Python 3. In Edit-Preferences-Languages, there's two option, one for Python and Python3, but the Python3 one refuses to work, with either the official Python.org binaries, or ActiveState's own ActivePython 3. Of course, I can set the "Python" interpreter to the 3.1 binary, but that's an ugly hack and breaks Python 2.x support. So, does anybody who uses an IDE for Python have any suggestions on either of these accounts, or can you recommend an alternate IDE for Python 3.0 development? Cheers, Victor

    Read the article

  • non blocking tcp connect with epoll

    - by doccarcass
    My linux application is performing non-blocking TCP connect syscall and then use epoll_wait to detect three way handshake completion. Sometimes epoll_wait returns with both POLLOUT & POLLERR revents set for the same socket descriptor. I would like to understand what's going on at TCP level. I'm not able to reproduce it on demand. My guess is that between two calls to epoll_wait inside my event loop we had a SYN+ACK/ACK/FIN sequence but again I'm not able to reproduce it. Any clue ? Regards, Seb

    Read the article

  • Distributing iPhone App to developers in your team through iTunes

    - by Rudiger
    Hi everyone, Was wondering if you can distribute your App to other developers in your team through iTunes. I guess you would upload the App as a beta version through iTunes Connect and anyone with a provisioned iPhone would receive the update. I didn't think it was possible but someone told me they were sure you could. If this is not possible are there any other benefits of a company standard enrolment besides being able to add other people so they can get the same resources? Thanks

    Read the article

  • Writing reports with Perl

    - by georgemp
    Hi, I am trying to write out multiple report files using perl. Each file has the same structure, but with different data. So, my basic code looks something like #begin code our $log_fh; open %log_fh, ">" . $logfile our $rep; if (multipleReports) { while (@reports) { printReport($report[0]); } } sub printReports { open $rep, ">" . $[0]; printHeaders(); printBody(); close $rep; } sub printHeader() { format HDR = @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $generatedLine . format HDR_TOP = . $rep->format_name("HDR"); $rep->format_top_name("HDR_TOP"); $generatedLine = "test"; write($rep); $generatedLine = "next item"; write($rep); $generatedLine = "last header item"; write($rep); } sub printBody #There are multiple such sections in my code. For simplicity, I have just shown 1 here { #declare own header and header top. Set report to use these and print items to $rep } #end code The above is just a high level of the code I am using and I hope I have captured all the salient points. However, for some reason, I get the first report file output correctly. The second file instead of having in the first section test next item last item reads last item last item last item I have tried a whole lot of options primarily around autoflush, but, for the life of me can't figure out why it is doing this. I am using Perl 5.8.2. Any help/pointers much appreciated. Thanks George

    Read the article

  • Strip text of all formatting on paste

    - by griegs
    I have an application that allows the user to create an article. The problem arises when the user pastes from something like Word which comes loaded with a bunch of markup. I'm using a jQuery editor called tiny_mce which allows the markup. I do a htmlencode and decode obviously but it means that i carry a huge payload of markup. Is there a way to strip (all) markup from pasted text and just keep the text? Or is there a way that tiny_mce can show the markup as text?

    Read the article

  • Best 3rd Party Resume Parser Tool

    - by Krishna Kumar
    We are working on a hiring application and need the ability to easily parse resumes. Before trying to build one, was wondering what resume parsing tools are available out there and what is the best one, in your opinion? We need to be able to parse both Word and TXT files.

    Read the article

  • Using Window Handle to disable Mouse clicks and Keyboard Inputs using c#

    - by srk
    I need to disable the Mouse Clicks, Mouse movement and Keyboard Inputs for a specific windows for a Kiosk application. Is it Feasible in C# ? I have removed the menu bar and title bar of a specific window, will that be a starting point to achieve the above requirement ? The code for removing the menu bar and title bar using window handle : #region Constants //Finds a window by class name [DllImport("USER32.DLL")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //Sets a window to be a child window of another window [DllImport("USER32.DLL")] public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); //Sets window attributes [DllImport("USER32.DLL")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //Gets window attributes [DllImport("USER32.DLL")] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); [DllImport("user32.dll")] static extern IntPtr GetMenu(IntPtr hWnd); [DllImport("user32.dll")] static extern int GetMenuItemCount(IntPtr hMenu); [DllImport("user32.dll")] static extern bool DrawMenuBar(IntPtr hWnd); [DllImport("user32.dll")] static extern bool RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); //assorted constants needed public static uint MF_BYPOSITION = 0x400; public static uint MF_REMOVE = 0x1000; public static int GWL_STYLE = -16; public static int WS_CHILD = 0x40000000; //child window public static int WS_BORDER = 0x00800000; //window with border public static int WS_DLGFRAME = 0x00400000; //window with double border but no title public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar public static int WS_SYSMENU = 0x00080000; //window menu #endregion public static void WindowsReStyle() { Process[] Procs = Process.GetProcesses(); foreach (Process proc in Procs) { if (proc.ProcessName.StartsWith("notepad")) { IntPtr pFoundWindow = proc.MainWindowHandle; int style = GetWindowLong(pFoundWindow, GWL_STYLE); //get menu IntPtr HMENU = GetMenu(proc.MainWindowHandle); //get item count int count = GetMenuItemCount(HMENU); //loop & remove for (int i = 0; i < count; i++) RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE)); //force a redraw DrawMenuBar(proc.MainWindowHandle); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION)); } } }

    Read the article

  • Unable to create unmanaged object using new keyword in managed C++

    - by chair79
    Hi all, I've created a class with a boost::unordered_map as a member, Linkage.h #ifndef LINKAGE_H #define LINKAGE_H #include <boost/unordered_map.hpp> class Linkage { private: boost::unordered_map<int, int> m_IOMap; public: .... }; Linkage.cpp #include "stdafx.h" ... // methods and in the managed side of C++, I try to create the pointer of the obj: private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { Linkage* m_pLink = new Linkage(); ..... } However this produces errors: Error 4 error LNK2005: "private: static unsigned int const boost::detail::type_with_alignment_imp<4>::found" (?found@?$type_with_alignment_imp@$03@detail@boost@@$$Q0IB) already defined in Proj_Test.obj Linkage.obj ..... Error 7 fatal error LNK1169: one or more multiply defined symbols found Could anyone explain to me pls? Thanks.

    Read the article

  • Can't connect to MySQL on CentOS 5 Error 13 - Permission Denied

    - by abszero
    Ok, I have an install of CentOS 5 running as a GuestOS in VirtualBox. The network card for the Cent box is bridged with that of my host OS so that the boxes can see each other. Cent has an IP of 192.168.1.108 and my Host box has an IP of .104. Everything, with regard to networking, seems to be working properly as I can access the Drupal install that is on the Cent box from a web browser on my host box by navigating to http://192.168.1.108 however when I try to configure the database for Drupal through the Drupal install interface I am getting the Can't connect to MySQL error. First I thought this might of been a Firewall issue so I stopped iptables but that had no effect. I thought maybe the user I had setup did not have access to the server so I tried root and that did not work. Searching on the net said that I needed to provide a bind-address parameter to my.cnf so I did that with no change. (As a side note the length of my my.cnf file was MUCH shorter than the ones presented online. In fact under mysqld all I have are datadir, socket, user, and bind-address. Is this normal or should the file be more verbose?) After a few hours of messing with permissions and such I tried using 'localhost' as the value for the database server, from my HOST OS, and the Drupal install kicked off without a problem. So while my issue is resolved I am curious as to why 'localhost' works and why 192.168.1.108 did not? Is there something i need to do to specifically access the MySQL box via the aforementioned IP? Thanks.

    Read the article

  • Compaq Q2009 monitor display Issues

    - by jasonco
    I have this compaq q2009 monitor 20' inches and I am having display issues. When I turn on the computer the image is displayed fine for a fraction of a second and then the display goes black. If I turn off the monitor and turn it on again the the same thing happens: the image is displayed for a fraction of a second and then goes black. This is odd. I've looked all over the web and I haven't found anything useful (not even in the HP website). So there is no "out of range" or "recommended resolution" message. It just displays and then goes black. I think the resolution is fine because it was working OK until recently and I haven't changed anything in that regard. Any help would be appreciated. Thanks.

    Read the article

  • Want to install OS from USB instead of CD : How to deal with *.img image files?

    - by claws
    I'm on windows. I'm trying DragonflyBSD operating system. as you can see here: http://www.dragonflybsd.org/download/ there are two kinds of images CD (.iso) and USB (.img) files available for download. I downloaded *.iso and using UNetbootin to make a bootable USB stick. But its taking hell lot of time. Its been 2 hours and its just 50% done(9k of 18k files). I'm really pissed off now! I used *.iso because I didn't know how to deal with *.img files. Will it be quick *.img file? How to use it to make bootable USB?

    Read the article

  • EF4. Add a object with relationship causes full table select

    - by Fujiy
    Ex 1: "autor.ComentariosWorkItens.Add(comentarioWorkItem);" autor.ComentariosWorkItens makes EF4 load all ComentariosWorkItens. Ex 2: comentarioWorkItem.Usuario = autor; Fixup make EF load all ComentariosWorkItens too: private void FixupUsuario(Usuario previousValue) { if (previousValue != null && previousValue.ComentariosWorkItens.Contains(this)) { previousValue.ComentariosWorkItens.Remove(this); } if (Usuario != null) { if (!Usuario.ComentariosWorkItens.Contains(this)) { Usuario.ComentariosWorkItens.Add(this); } } } How can I prevent this?

    Read the article

  • Integrate forum software into existing Zend site

    - by mrbubblesort
    I've searched around and haven't really found anything on this, so maybe someone here has tried this before. My company already has a website built with Zend, and we'd like to add in a forum as well. All I really need is something that will work with postgresql and has foreign language support (particularly Japanese, but if worst comes to worst, I'll just translate it myself). phpBB fits all my needs though. Is it possible to get the two working together? Or is there another forum software that'll work with Zend? Or is it better to just build the thing from scratch? Thanks!

    Read the article

  • How to limit traffic using multicast over localhost

    - by Shane Holloway
    I'm using multicast UDP over localhost to implement a loose collection of cooperative programs running on a single machine. The following code works well on Mac OSX, Windows and linux. The flaw is that the code will receive UDP packets outside of the localhost network as well. For example, sendSock.sendto(pkt, ('192.168.0.25', 1600)) is received by my test machine when sent from another box on my network. import platform, time, socket, select addr = ("239.255.2.9", 1600) sendSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sendSock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 24) sendSock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton("127.0.0.1")) recvSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) recvSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True) if hasattr(socket, 'SO_REUSEPORT'): recvSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, True) recvSock.bind(("0.0.0.0", addr[1])) status = recvSock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(addr[0]) + socket.inet_aton("127.0.0.1")); while 1: pkt = "Hello host: {1} time: {0}".format(time.ctime(), platform.node()) print "SEND to: {0} data: {1}".format(addr, pkt) r = sendSock.sendto(pkt, addr) while select.select([recvSock], [], [], 0)[0]: data, fromAddr = recvSock.recvfrom(1024) print "RECV from: {0} data: {1}".format(fromAddr, data) time.sleep(2) I've attempted to recvSock.bind(("127.0.0.1", addr[1])), but that prevents the socket from receiving any multicast traffic. Is there a proper way to configure recvSock to only accept multicast packets from the 127/24 network, or do I need to test the address of each received packet?

    Read the article

  • Help with Django localization--doesn't seem to be working. Nothing happens

    - by alex
    Can someone help me with Localization? I put {% trans "..." %} in my template, I filled in my django.po after running "makemessages". #: templates/main_content.html:136 msgid "Go to page" msgstr "¦~C~Z¦~C¦¦~B¦¦~L~G¦~Z" #: templates/main_content.html:138 msgid "Page" msgstr "¦~C~Z¦~C¦¦~B¦" #: templates/main_content.html:154 msgid "Next" msgstr "?" Then, I set LANGUAGES={} in my settings.py along with "gettext lambda": gettext = lambda s: s LANGUAGES = ( ('de', gettext('German')), ('en', gettext('English')), ('ja', gettext('Japanese')), ) Of course, I installed the LocaleMiddleware. I also set the request.session['django_language'] = "ja" How do I test that this is working? How do I see japanese on my site!?

    Read the article

  • VS Solution and Mercurial repository layout for a c# project with plugins and external libraries.

    - by Joviee
    I'm developing a project in .NET (using C# to be more specific). Using Visual Studio as an IDE. Using Mercurial for version control. I'll be using some third-party libraries: ThirdParty.Foo.dll ThirdParty.Bar.dll ThirdParty.Baz.dll And some in-house libraries: Company.A Company.B Company.C Company.D (References third party libraries) Company.E (References Company.A) The project itself will have the following components: Project.Core Project.DataModel (references in-house/third-party libraries) Project.GUI (references Core, DataModel, and in-house/third-party libraries) Project.PluginOne (references Core, DataModel, and in-house/third-party libraries) Project.PluginTwo (references Core, DataModel, and in-house/third-party libraries) * can be an arbitrary number of plugins * I'm quite new to Mercurial, so I don't really know the best way to structure my repositories for a project like this, with a lot of interconnected components. The in-house libraries are fairly distinct, so I would say that each one of them should have its own repository. However, some of them use functionality provided by others. How should these dependencies be managed? The project plug-ins should be distinct from eachother, so I'd imagine that each would have its own repository. How should the dependencies on the in-house/third-party libraries and the rest of the project (Project.DataModel and Project.Core) be managed, with regards to the solution layout and the repository layout? So basically, for a project like this, what are the best way of structuring: (a) my visual studio solutions (b) my source control repository/repositories

    Read the article

  • How do you draw a line on a canvas in WPF that is 1 pixel thick.

    - by xarzu
    The method for drawing a line on a canvas in WPF that uses the line class actually draws a line that is two pixels thick: Line myLine = new Line(); myLine.Stroke = System.Windows.Media.Brushes.Black; myLine.X1 = 100; myLine.X2 = 140; // 150 too far myLine.Y1 = 200; myLine.Y2 = 200; myLine.StrokeThickness = 1; graphSurface.Children.Add(myLine); Microsoft might have decided to set a standard for line thickness and the minimum is 2 pixels thick when you set the strockThickness to 1, but when you already have rectangles drawn in XAML and even error fonts using WingDings, it is an obvious miss-match. How do you draw a line that is truly 1 pixel thick?

    Read the article

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