- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hi, I have got a little problem with __setitem__ method. It works fine in single class, but if class member is instance of the same class method __setitem__ doesn't work on class member but on class. Here is an example: Here is a class with __setitem__ method: [code="python"] class MyClass: … | |
Re: Gentoo, becouse is very fast and flexible. Portage is using USE flags for compilation software so I have in my distro only what I need. | |
Re: You should reboot your system and in Grub or Lilo load kernel with parameter init=/bin/bash. Then you have root permissions but system will be for reading only. So you write command: [code]mount -o remount,rw /[/code]. It remount your system for writing and you can run script passwd and change root … | |
Re: [code=c]#include <stdio.h> int main(void) { int sec_code = 0; while(sec_code < 1 || sec_code > 4) { scanf("%d", &sec_code); if(sec_code < 1 || sec_code > 4) { printf("Ivalid value entered. Must be 1 to 4, please re-enter: "); } } }[/code] | |
Re: on 36. line you have fp = open(argv[2], "r"); it should be fp = fopen(argv[2], "r"); Else you have declared variable char line[MAXSIZE]; but you don't use it in your code. | |
Re: In my opinion is much better tu use something like this: Template.class.php: [code=php] <?php class Template { private $tpl_data = array(); private $file; function __construct($filename) { // Load file into $file var $this->file = implode('', @file($filename)); } public function assign($vardata) { // Load var array into $tpl_data foreach($vars as $key … | |
Re: lol. i don't understand your question, but you can download ethereal(wireshark) it is good packet sniffer with gui ;) | |
Re: hmm. advice? good luck :P by the way, fedora core 2 is too old :) try fedora 9 | |
Re: I had Ubuntu and it realy is not way. Debian is good choice. But 1CD debian is useless. I prefer debian netinstall and if you will have any problems google is good, or you can try slackware, it is conservative distro but it has a lot of comments in configuration … | |
Has someone here got posix specification? It would be in PDF format. Thanks | |
Re: if you are working in linux and have acpi support you can open for reading file /proc/acpi/battery/{YOUR_BAT}/info. There is some info about laptop battery. | |
Re: I'm using fluxbox right now and I'm glad for that. It's very easy to use and configuration is not very difficult. On google are many manuals how to configure fluxbox. | |
Re: you must have installed alsa-base alsa-utils alsa-oss and if you have that, run alsaconf and then add yourself to group audio "adduser usre_name audio" after that run alsamixer for setting of volume | |
Re: do you run this script as owner of this home directory? or you can try chmod 777 | |
Re: if you have on one line only one value for example 1 2 3 [code=python]to = open("file2", "w") #open file for write mode fp = open("file", "r") #open read for write mode for line in fp.readlines(): #read file 'file' for lines if int(line) <= 22 and int(line) >= 10: #if … | |
Re: Thats right. You must allow it in your php.ini file. If you don't have access to this file you can try function ini_set(). | |
Re: xampp is good choice. it contains php/perl, mysql, apache2 of course, proftpd etc... and if you want console based mysql client you can download apache-server. if you have debian based distro you can only type "apt-get install mysql-server apache2 mod-libapache-php5" thats all :) | |
Re: FreeBSD is unix based OS. Linux isn't OS. It's only kernel ;) based on minix. and if you don't know that, so you haven't skillse for work with FreeBSD ;) in my opinion you can try Debian for example.. | |
Re: I don't know if I understand correct but you can try something like this [code=php]$sql = "SELECT COUNT(t1.id) AS music, COUNT(t2.id) AS videos, COUNT(t3.id) AS something_else FROM table_name1 t1, table_name2 t2, table_name3 t3 WHERE ..."; $result = mysql_query($sql); $row = mysql_fetch_object($result); [/code] and now you can call $row->video, $row->music etc … | |
Re: def Step: must by def Step(): and else I don't know :) | |
Re: You can go on [code]http://hotscripts.com[/code] and take a look around there for some scripts ;) | |
Re: do you have a dial-up connection, USB modem or something else? if you have USB modem and you want connect with ppp deamon you must remove BRLtty. or you can try setup automatic assignment IP adress from DHCP |