Daily Archives

Articles indexed Tuesday December 21 2010

Page 14/33 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • TypeError: Python thinks that I passed a function 2 arguments but I only passed it 1

    - by slhck
    I work on something in Seattle Repy which is a restricted subset of Python. Anyway, I wanted to implement my own Queue that derives from a list: class Queue(list): job_count = 0 def __init__(self): list.__init__(self) def appendleft(item): item.creation_time = getruntime() item.current_count = self.job_count self.insert(0, item) def pop(): item = self.pop() item.pop_time = getruntime() return item Now I call this in my main server, where I use my own Job class to pass Jobs to the Queue: mycontext['queue'] = Queue() # ... job = Job(str(ip), message) mycontext['queue'].appendleft(job) The last line raises the following exception: Exception (with type 'exceptions.TypeError'): appendleft() takes exactly 1 argument (2 given) I'm relatively new to Python, so could anyone explain to me why it would think that I gave appendleft() two arguments when there obviously was only one?

    Read the article

  • Just messed up a server misusing chown, how to execute it correctly?

    - by Jack Webb-Heller
    Hi! I'm moving from an old shared host to a dedicated server at MediaTemple. The server is running Plesk CP, but, as far as I can tell, there's no way via the Interface to do what I want to do. On the old shared host, running cPanel, I creative a .zip archive of all the website's files. I downloaded this to my computer, then uploaded it with FTP to the new host account I'd set up. Finally, I logged in via SSH, navigated to the directory the zip was stored in (something like var/www/vhosts/mysite.com/httpdocs/ and ran the unzip command on the file sitearchive.zip. This extracted everything just the fine. The site appeared to work just fine. The problem: When I tried to edit a file through FTP, I got Error - 160: Permission Denied. When I Get Info for the file I'm trying to edit, it says the owner and group is swimwir1. I attemped to use chown at this point to change owner - and yes, as you may be able to tell, I'm a little inexperienced in SSH ;) luckily the server was new, since the command I ran - chown -R newuser / appeared to mess a load of stuff up. The reason I used / on the end rather than /var/www/vhosts/mysite.com/httpdocs/ was because I'd already cded into their, so I presumed the / was relative to where I was working. This may be the case, I have no idea, either way - Plesk was no longer accessible, although Apache and things continued to work. I realised my mistake, and deciding it wasn't worth the hassle of 1) being an amateur and 2) trying to fix it, I just reprovisioned the server to start afresh. So - what do I do to change the owner of these files correctly? Thanks for helping out a confused beginner! Jack

    Read the article

  • Using Proguard for Android in Eclipse Problem

    - by Chris
    I have taken a fresh install of Eclipse and all the latest Android tools and want to use Proguard on existing project, but for now I have created a new blank one. I have added a proguard.cfg file to my project added proguard.config=proguard.cfg to my default.properties Now when I try to export I get the following error [2010-12-12 10:36:35 - ApplicationTest] Proguard returned with error code 1. See console [2010-12-12 10:36:35 - ApplicationTest] 'C:\Program' is not recognized as an internal or external command, [2010-12-12 10:36:35 - ApplicationTest] operable program or batch file. [2010-12-12 10:36:35 - ApplicationTest] '-jar' is not recognized as an internal or external command, [2010-12-12 10:36:35 - ApplicationTest] operable program or batch file. I know it means there is a filepath setup incorrectly, question is where the heck is as I have looked through the general properties and project properties and can't see any reference to proguard or obfuscation so am stuck on what to change Any help appreciated.

    Read the article

  • 404 with spring 3

    - by markjason72
    hi I am going through my first lessons with spring 3.I created a dynamic web app in eclipse with the following structure. spring3mvc \src\my.spring.HelloWorldController.java \WebContent | |-----WEB-INF\jsp\hello.jsp |-----index.jsp |-----web.xml |-----WEB-INF\spring-servlet.xml |-----WEB-INF\lib\...*.jar files I created the spring-servlet.xml as below <context:component-scan base-package="my.spring" /> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> and coded the controller package my.spring; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller public class HelloWorldController { @RequestMapping("/hello") public ModelAndView helloWorld() { String message = "Hello World, Spring 3.0!"; return new ModelAndView("hello", "message", message); } } index.jsp has a link to hello view <html> <body> <a href="hello.html">Say Hello</a> </body> </html> finally in hello.jsp I have put <html> <body> ${message} </body> </html> My web.xml has <display-name>Spring3MVC</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <servlet> <servlet-name>spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> When I run the app on Tomcat6 server( thru eclipse),I can see the index page at http://localhost:8080/Spring3MVC/ .It displays the link to hello page.When I click on it(http://localhost:8080/Spring3MVC/hello.html),I get a 404 error. message /Spring3MVC/hello.html description The requested resource (/Spring3MVC/hello.html) is not available. Any idea how I can solve this? thanks mark.

    Read the article

  • HTTP Compression problems on IIS7

    - by Jonathan Wood
    I've spent quite a bit of time on this but seem to be going nowhere. I have a large page that I really want to speed up. The obvious place to start seems to be HTTP compression, but I just can't seem to get it to work for me. After considerable searching, I've tried several variations of the code below. It kind of works, but after refreshing the browser, the results seem to fall apart. They were turning to garbage when the page used caching. If I turn off caching, then the page seems right but I lose my CSS formatting (stored in a separate file) and get an error that an included JS file contains invalid characters. Most of the resources I've found on the Web were either very old or focused on accessing IIS directly. My page is running on a shared hosting account and I do not have direct access to IIS7, which it's running on. protected void Application_BeginRequest(object sender, EventArgs e) { // Implement HTTP compression if (Request["HTTP_X_MICROSOFTAJAX"] == null) // Avoid compressing AJAX calls { // Retrieve accepted encodings string encodings = Request.Headers.Get("Accept-Encoding"); if (encodings != null) { // Verify support for or gzip (deflate takes preference) encodings = encodings.ToLower(); if (encodings.Contains("gzip") || encodings == "*") { Response.Filter = new GZipStream(Response.Filter, CompressionMode.Compress); Response.AppendHeader("Content-Encoding", "gzip"); Response.Cache.VaryByHeaders["Accept-encoding"] = true; } else if (encodings.Contains("deflate")) { Response.Filter = new DeflateStream(Response.Filter, CompressionMode.Compress); Response.AppendHeader("Content-Encoding", "deflate"); Response.Cache.VaryByHeaders["Accept-encoding"] = true; } } } } Is anyone having better success with this?

    Read the article

  • Counting multiple entries in a MySQL database?

    - by Aaron
    Hi all, I'm trying to count multiple entries in a MySQL database, I know how to use COUNT(), but the exact syntax I want to get the results I need eludes me. The problem: Table structure: ID, CODE, AUTHOR, COUNTRY, TIMESTAMP. Code, Author and Country overlap many times in the table. I am trying to discover if there is one simple query that can be ran to return (using WHERE clause on COUNTRY) the author field, the code field, and then a final field that counts the number of times the CODE was present in the query result. So, theoretically I could end up with an array like: array('author', 'code', 'codeAppearsNTimes'); Authors also have varying codes associated with them, so I don't want the results merged. I suppose the end result would be: 'This author is associated with this code this many times'. Is this possible with MySQL? Thanks in advance.

    Read the article

  • Fastest primality test

    - by Grigory Javadyan
    Hi. Could you suggest a fast, deterministic method that is usable in practice, for testing if a large number is prime or not? Also, I would like to know how to use non-deterministic primality tests correctly. For example, if I'm using such a method, I can be sure that a number is not prime if the output is "no", but what about the other case, when the output is "probably"? Do I have to test for primality manually in this case? Thanks in advance.

    Read the article

  • Is it possible to restrict fileserver access to domain users using computers that are members of the domain?

    - by Chris Madden
    It seems domain isolation can be used to accomplish, but I'd like a solution that doesn't require IPsec, or more accurately, doesn't require IPsec on the fileserver. IPsec if done in software has a large CPU overhead and our NAS boxes don't support any kind of offload. The goal is to avoid authenticated users using non-managed machines to access network resources. Network Access Protection (NAP) and the various enforcement points looked promsiing but I couldn't find a bulletproof way to use them [which doesn't require IPsec on the fileserver]. I was thinking when a domain user accesses the NAS box it will first need a Kerberos ticket from AD, so if AD could somehow verify the computer that was requesting the ticket was in the domain I'd have a solution.

    Read the article

  • CentOS box access by name

    - by out_sider
    I intent to develop a centos server with lamp. What I want is connect the server to any kind of home network and access it by http://myserver. I have already successfully set a static ip but I can't seem to ping it by name. If you had to develop a solution with the intent to plug in the box by Ethernet to a router and access it with a browser using the server name what would you do? That's basically what I'd like to know. Thanks in advance

    Read the article

  • Where are the SQLServer jobs stored?

    - by Saiyine
    I'd like to know what is the process a SqlServer job is executing, but I only can find that it calls DTSRun with an encrypted string. After decoding the string, it results is just the name of the job with the user and the password. How can I find what is this job really calling? Edit: I've found a candidate, they could be at the msdb.sysdtspackages, but again, can't read them as SQLServer says the data is binary. How can I read them to confirm they are the jobs?

    Read the article

  • Remote Desktop over SSH SOCKS proxy to bypass firewall

    - by scrumpyjack
    Hi folks, I'm trying to connect to a Windows server from my Mac using RDC2.1 for Mac. The problem is the server I need to connect to is guarded by the evil dragon - IP-based access control on a completely separate network. I have an IP I can get in on, but it's at my office (i.e. a completely separate network). Because that network isn't set up for VPN, I've set up a SOCKS proxy through an SSH tunnel (which is all working fine). (SSH proxy) Me (on my Mac) ----------> Office Linux box ----> Windows server (home network) (office network) (other network) From my Linux server in my office (the SSH server) I can telnet to port 3389 on the Windows server, no problem. But from my Mac I can't get so much as a squeak out of it. Any ideas?

    Read the article

  • Google app mail hosting and windows 2008 server DNS configuration

    - by fyasar
    Hi There, I used to use shared hosting before and I created a google app account and I configured DNS records on shared hosting's contol panel according to google dns documentations. Everything was working until I switched to dedicated server. First I added DNS role to my new server and I configured whole DNS and NS stuff. I have mail address that mail.domain.com that was redirecting to google app email before. Rightnow, It's not possible to access to mail.domain.com addres from somewhere. But I'm accessing from a few point which located some computer on different network. I stacked in this problem. Please, see the below screen shots I checked on DNSStuff.com,everything is green. Also, I checked on InteliWiz, it seems correct And, Here is the my DNS records. I was accessing to my mail.domain.com address from everywhere, Now, I cannot access to mails from many places since 3 week. Where is the my mistake ? Any help would be appriciated.

    Read the article

  • DPM Coordinator Service is not responding

    - by Anatoly Vilchinsky
    Hi dear Gurus! I'm in stuck point now, so please at least try to help me. I've installed DPM 2010 on cluster server (w2k8 r2), everything was fine. Than I've tried tot install Protection Agent on both server of my cluster, but I'm getting error Error 312: The agent operation failed because the DPM Agent Coordinator service is not responding. Error details: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it (0x80070422) Recommended action: Restart the DPM Agent Coordinator service on . And the thing is that I'm totally can't see DPM Agent Coordinator service not on the localhost, nor on the second server. All the suggestion, that I've found in the internet are suggesting to restart this service, but how can I perform this if the one is absent? I'll be glad for any help

    Read the article

  • How to configure catch-all in Exchange2010 hub-transport environment?

    - by Itay Levin
    Im getting the delivery failed from the post master reply. i don't want it. because then poeple can find out all my real users on the exchange. also, i have a lot of users (10K) in my application - and i don't want to create a mailbox for each user. is it possible to get this done in ex2010 sp1. hub-transport configuration? or i must use edge-transport as indicated in http://technet.microsoft.com/en-us/library/bb691132(EXCHG.80).aspx

    Read the article

  • Xen HVM networking wont work

    - by Nathan
    I'm trying to get a Xen HVM network working using route however I am failing. Xen PV works fine using Ubuntu but when installing Ubuntu on HVM it fails to pick up the network. I'll let you know now that I'm not that experienced with Xen so I would appreciate any help. vm104 is the HVM thats causing me the problems, here is the configs that I believe should help resolve the problem. [root@eros vm104]# cat vm104.cfg import os, re arch = os.uname()[4] if re.search('64', arch): arch_libdir = 'lib64' else: arch_libdir = 'lib' kernel = '/usr/lib/xen/boot/hvmloader' builder = 'hvm' memory = 6000 shadow_memory = '8' cpu_weight = 256 name = 'vm104' vif = ['type=ioemu, ip=85.25.x.y, vifname=vifvm104.0, mac=00:16:3e:52:3d:fe, bridge=xenbr0'] acpi = 1 apic = 1 vnc = 1 vcpus = 4 vncdisplay = 3 vncviewer = 0 vncconsole = 1 vnclisten = '217.118.x.y' vncpasswd = 'kCfb5S4tE7' serial = 'pty' disk = ['phy:/dev/vpsvg/vm104_img,hda,w', 'file:/home/solusvm/xen/iso/Windows-Server-2008-RC2.iso,hdc:cdrom,r'] device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' boot = 'cd' sdl = '0' usbdevice = 'tablet' pae=1 [root@eros /]# cat /etc/xen/xend-config.sxp | egrep -v "(^#.*|^$)" (xend-unix-server yes) (xend-unix-path /var/lib/xend/xend-socket) (xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$') (network-script network-route) (vif-script vif-route) (network-script 'network-route netdev=eth0') (dom0-min-mem 256) (dom0-cpus 0) (vnc-listen '0.0.0.0') (vncpasswd '') (keymap 'en-us') The Windows install will not pick up the network - I've tried setting the IP manually by using the Xen servers IP as the gateway and setting the main IP in Windows but no luck. If anyone needs any more information let me know and I appreciate any input!

    Read the article

  • An unknown Mac is connected to my router?

    - by Yar
    There is a computer that is not mine that is accessible on my network. I can even access its filesystem via AFP. What I want to know is how the computer could get on my network. My network is secured like this: Does that mean that they've used password cracking tools? The pass is not easy to guess but not hard to figure out via brute-force hacking, I guess. If I am being hacked, should I switch to WPA?

    Read the article

  • (Windows 7) Shared External Drive Permission Issues

    - by connec
    So, say I share my system (C) drive through windows (E.g. properties -> Sharing -> Advanced Sharing -> Share this Folder). I can then access this drive at \\Comp\C on another networked computer - all is well. However, if I insert a removable (USB) disk, say "E", and proceed to share it the same way, when I attempt to access \\Comp\E (either directly or through browsing) I get an error: Windows cannot access \\Comp\E You do not have permission to access \\Comp\E. Contact your network administrator to request access. Now, the permissions (Advanced Sharing -> Permissions) are set with "Everyone" having read access (same as the internal drive), so this doesn't make a lot of sense. Also of note, I have an SSH server on my computer (through Cygwin) and even through SSH (logging in as an administrator user) I cannot access /cygdrive/e (although /cygdrive/c is accessible). As a final note, the drive is of course accessible on the host machine (E:\), and also at \\Comp\E on the host machine.

    Read the article

  • A few questions about advanced Autohotkey uses

    - by user47625
    Hello, I have been using this wonderful piece of software for some time now, but for just a few basic things. So I'm wondering if the following would be possible: to use different set of shortcuts for different applications - so one shortcut performs different actions in different places. to make some form of modes for application, where you could use some switch (vim style) and this would change things the shortcat would do if it would be possible to place some caption that indicates which mode you are using - little improvement of previous item I thank everyone for their answers.

    Read the article

  • Adding arbitrary search URLs to Firefox search bar

    - by Matthew
    New-ish versions of Firefox (I'm currently on 3.6) have the nifty "search bookmark" feature, which allows you to create searches in the location bar with custom URLs, e.g. en.wikipedia.org/wiki/%s. This is really great, but when trying to mange the engines in the search bar, I was dismayed at the lack of customisability there. It looks like the two search methods are entirely distinct. Is there a way to put custom URLs in my search bar, or do I have to just hope that whatever I want is on the long but finite list of plugins at mycroft? Thanks UPDATE: done a bit more research, posting my own answer

    Read the article

  • Is it safe to remove Per user queued Windows Error Reporting?

    - by Rewinder
    I was cleaning up my laptop hard-disk, running Windows 7, and as part of the process I ran the Disk Cleanup utility. To my surprise I saw 2 items in the list that were quite large (both ~300MB). Per user queued Windows Error Reporting System queued Windows Error Reporting I guess I had never noticed these, because they were never that big. So, what are these items? Any particular reason why they became so large all of a sudden? And finally, is it safe to remove them?

    Read the article

  • Make iMovie text overlay remain on screen after in-transition

    - by Kit
    My idea of a text overlay has the following timeline: In-transition Static display Out-transition For this project, I am particularly fond of iMovie's Organic Main text overlay. I want it to display for an extended period. The problem is, when I set its display time for 3:20 (minutes:seconds), it performs its transition over the whole period. The text would won't be fully seen until the next 3 minutes. This is what I want: In-transition for 1 second Static display for 3:18 minutes Out-transition for 1 second Is that possible with iMovie?

    Read the article

  • Windows cannot find the host name "download.microsoft.com" using DNS

    - by joedotnot
    When trying to download a file found on the Microsoft downloads center that starts with, for example, http://download.microsoft.com/download/6/8/7/(some_GUID)/(some_file_name.ext) i get a timeout with "Internet Explorer cannot display the webpage". More information says: Internet connectivity has been lost. The website is temporarily unavailable. The Domain Name Server (DNS) is not reachable. The Domain Name Server (DNS) does not have a listing for the website's domain. If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section. Diagnose Connection problems says: Windows cannot find the host name "download.microsoft.com" using DNS Bear with me while i expand on the problem: It all started when i tried to download Windows XP mode for my Windows 7 machine. I went to the virtual PC site, then thru the motions of Windows Genuine Advantage which validated ok, but when it redirects to grab the file just times out with above error. (NB: i also tried with the latest Chrome and Firefox but no use due to the Genuine Advantage stuff, so i decided to stick with IE). I am behind an ADSL2+ modem router connecting via wireless (Win 7 Pro laptop); so i hop over to the desktop connected via ethernet (Vista Business), and same result; begin to think site download.microsoft.com site is down. So i give it a break an read up on EDNS, flushing the cache, hosts file, etc... Try again an hour later on the Win 7 machine, still no go; so i turn off the Win 7 (software) firewall, and lo and behold, i can connect and grab any files from download.microsoft.com; (...nice, so we have a Micro$0ft firewall preventing access to a Micro$0ft website, no wonder my auto-updates kept failing but that's another story). But i still am not happy that the desktop connected via ethernet still cannot get to download.microsoft.com, even though i turned off all firewalls, defenders, anti-virus, etc. What is so special / specific about the url download.microsoft.com, any other site is ok, including www.microsoft.com. Any networking guru know what's REALLY going on, and how can i get the desktop to connect? Ping download.microsoft.com - Ping request could not find host download.microsoft.com. Please check the name and try again. Ping google.com or even www.microsoft.com works gives me an IP address. NB: On the wireless laptop ping download.microsoft.com works, i get xxxx.ms.akamai.net [202.7.177.33].

    Read the article

  • Trimestre financier record pour Adobe qui franchit la barre du milliard de dollars de chiffre d'affaires trimestriel

    Trimestre financier record pour Adobe qui franchit la barre du milliard De dollars de chiffre d'affaires trimestriel Adobe vient d'annoncer un bilan financier resplendissant en ce quatrième et dernier trimestre financier de l'année 2010. L'entreprise se réjouit surtout de rejoindre le club des entreprises IT enregistrant plus d'un milliard de dollars de chiffre d'affaire (CA) trimestriel. Soit une croissance de 33% par rapport au même trimestre de l'année passée où l'entreprise n'avait enregistré "que" 757.3 millions de dollars de revenus. Pour l'ensemble de l'année 2010, l'entreprise a réalisé 3.8 milliards de dollars de CA (+29%). Des perf...

    Read the article

  • River City Give Camp 4-6 Feb 2011 in Richmond!

    - by andyleonard
    I'm often approached by community members who seek new or better employment. One problem? Experience. You need experience to get a new or better job; you can't get experience without the new gig. </ Catch22 > River City Give Camp is a way to gain some experience, but it's much more than that - it's also a great way to network with others currently working in the field. Sign up ! Show them what you've got! :{>...(read more)

    Read the article

  • Flash CS, reference root from external class

    - by Lotus
    Hi, I made this class and I put it in the same package of Timeline.as (the Document Class): package { import flash.utils.Timer; import flash.events.TimerEvent; public class Counter2 extends Timer { public function Counter2(delay:Number, repeatCount:int=0) { super(delay, repeatCount); super.addEventListener(TimerEvent.TIMER, timerHandler); } public override function start():void { super.start(); } public override function stop():void { super.stop(); } public function timerHandler(evt:TimerEvent) { trace(evt.target.currentCount); } } } This class is instanciated in Timeline.as constructor. Is there any way to reference Timeline(root) from this class? And, if so, how? Thanks!

    Read the article

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