Search:

Type: Posts; User: epicoder; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    9
    Views
    585

    [SOLVED] Re: Python greatest number in the list

    This is why knowing the correct answer to questions like this is important:


    l = list(range(1000)); random.shuffle(l)
    max(l): 0.105857849121 milliseconds
    sorted(l)[-1]: 0.613212585449...
  2. Re: Conky script Pushing Back sh: 1: Bad Substitution Error

    Your Accuweather script seems to be reacting to the exclamation point in your hash bang, hence the "Bad substitution" error. I have no clue why it's doing that or how to fix it. Check for...
  3. Re: Automatically working through directories and printing results to file

    There are a couple methods of doing this. Which you use depends on how your shows are organized.
    If you use a known starting location and path depth, then this becomes very simple:

    for x in $(ls...
  4. Replies
    2
    Views
    1,346

    Re: Python3.3 Sockets AF_BLUETOOTH

    Although I'm not too familiar with Bluetooth, I'm pretty sure any socket made with socket.socket uses the same abstraction. You need to connect first with socket.connect before using socket.send and...
  5. Re: Python: Searching for contents in __str__

    Try this:

    if double in str(player):
    or, you could just use __str__ directly:

    if double in player.__str__():
    Both methods work, but I belive the former is the conventional method. You could...
  6. Thread: learning html

    by epicoder
    Replies
    13
    Views
    801

    Re: learning html

    I would recommend you avoid W3Schools, see my signature on why. Here are some better resources:
  7. Replies
    9
    Views
    1,500

    Re: Parse json and execute commands

    Make sure that:

    You are editing root's crontab and not yours. (make sure crontab -e is run as root)
    /etc/iptables.py is hashbanged. That is, this must be its first line: #!/usr/bin/env python
    ...
  8. Re: Using Php to Start/Stop daemon in ubuntu server

    One thing you could do is allow www-data to run /etc/init.d/mysql as root without a password. Before you do that, please consider the following security hole that would then be opened:
    If someone...
  9. Replies
    9
    Views
    1,500

    Re: Parse json and execute commands

    You are attempting to replace the crontab with /etc/iptables.py. Use

    sudo crontab -e
    to edit the crontab.
  10. Replies
    4
    Views
    1,022

    Re: XML Newbie (youtube api) from Bash

    Google has some documentation on their API which you can get here: https://developers.google.com/youtube/2.0/developers_guide_protocol_profiles#Retrieving_a_profile
    As for parsing XML, it would...
  11. Replies
    9
    Views
    1,500

    Re: Parse json and execute commands

    First off, consider the security ramifications behind this sort of action. You're blindly depending on the security of this remote server- if it gets breached, an attacker could replace that file...
  12. Re: Run javascript in child div without running javascript on parent div

    Much more context is needed if you want a helpful response. I have no idea what you are trying to do here. There is, however, one hint I can give you- Don't pass a string to setTimeout. You are...
  13. Replies
    4
    Views
    1,433

    [ubuntu] Re: possible virus threat

    Stonecold1995 is right about ClamAV. I only use it because a lot of my mail ends up at windows clients...

    Also, http://virustotal.com (not .org)
  14. Re: PHP to check/test text-content on another site.

    It would be a lot simpler and easier on your server to do this verification client side. If your visitors are going to be using modern browsers, simply add the "required" attribute to your input...
  15. Re: HTML/JavaScript onfocus and onblur not firing

    Your focus event is not firing. However, your unfocus is. I'm not quite sure of the reason why, but you could probably save yourself some trouble by using the placeholder attribute....
  16. Replies
    5
    Views
    556

    Re: %c needs to be a char or int

    I know this has technically been solved, but I'd like to point out an issue with your HTML before it becomes, well, an issue.


    <table width = 100% cellpadding = 20>

    There are two problems...
  17. Replies
    2
    Views
    492

    Re: Need gimicky (but fun) shutdown script

    You'd probably need to write an application for that. Something like xscreensaver, that sits on top of the desktop as an overlay and captures input. I have no idea how to do this or why you'd want to...
  18. Replies
    2
    Views
    632

    Re: Meta refresh doesn't include GET

    ofnuts is right. cgi.FieldStorage.getvalue returns the object None, not the string "None", if the value isn't found. You are effectively checking for index.py?p=None
    Technically it should be == None...
  19. Replies
    1
    Views
    780

    Username change request

    I would like to have my username changed to epicoder for the sake of consistency across sites. If this is not possible and/or epicoder is taken, then leave it as is.

    Thanks much in advance.
  20. Replies
    8
    Views
    11,764

    Re: Linux as a game server

    You can run a dedicated server for any Source game out there (TF2, CS: S, CS: GO, DODS, Gmod, etc, etc...) with minimal effort. The Linux tool for managing servers is really easy to use and they...
  21. Replies
    137
    Views
    21,531

    Re: Programming Language for Kids

    When I was 10 and 11 I fiddled around with python for a bit... I didn't really get the majority of it though. When you're that young, results may vary. If you like python, that's great and you should...
  22. Replies
    2
    Views
    491

    Re: I need to plot data

    It would be a simple proposition to parse the data with python/perl/whatever you like. Actually plotting the data is another thing entirely... I have never done something like this, so take my...
  23. Replies
    15
    Views
    718

    [ubuntu] Re: Adding Administrator As Root!!

    A quick google suggests that your root partition is mounted as readonly while in recovery mode. Try booting into recovery mode again, then running this at the root prompt before trying to add...
  24. Replies
    15
    Views
    718

    [ubuntu] Re: Adding Administrator As Root!!

    You need to have root permissions before you can manipulate users or groups. In short, you need a root shell. See the section from my other post on how to do this (replicated here for convenience):
    ...
  25. Replies
    15
    Views
    718

    [ubuntu] Re: Adding Administrator As Root!!

    Giving the root user a password is generally frowned upon on systems with sudo (Ubuntu included) and it is not really necessary. Instead, obtain a root prompt (see below if you aren't sure how to do...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4