Re: [GENERAL] Comparing first 3 numbers of a IPv4 address?

2010-11-20 Thread Alexander Farber
with another text[]... I see no problem here. It works just fine. But probably there is another (better) solution... 2010/11/20 Alexander Farber alexander.far...@gmail.com I'm actually hoping to use inet (or cidr?) instead of strings... On 11/20/10, Dmitriy Igrishin dmit...@gmail.com wrote

Re: [GENERAL] Comparing first 3 numbers of a IPv4 address?

2010-11-20 Thread Alexander Farber
Thank you. Or maybe also? (author_ip '255.255.255.0'::inet) = (_author_ip '255.255.255.0'::inet) On Sat, Nov 20, 2010 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alexander Farber alexander.far...@gmail.com writes: 1) if I'd like to compare just the first 3 numbers of the IP address

[GENERAL] Counting boolean values (how many true, how many false)

2010-11-16 Thread Alexander Farber
Hello, if I have this table with 3 boolean columns: # \d pref_rate Table public.pref_rep Column |Type | Modifiers +-+--- id | character varying(32) | author | character

Re: [GENERAL] Counting boolean values (how many true, how many false)

2010-11-16 Thread Alexander Farber
Thank you all, I've ended up with the following. But I really wonder if using boolean in my case (trying to offer players a web from with 3 x 2 radio buttons to rate each other) is really the best choice - since it feels a bit awkward (and maybe slow?) # create table pref_rep (

[Flashcoders] Set HTTP cookies with navigateToURL()

2010-11-13 Thread Alexander Farber
Hello, I have a small multiplayer Flash game in which you can display a player profile by clicking at his or her avatar: const PROFILE_URL:String = 'http://myserver/user.php?id='; try { navigateToURL(new URLRequest(PROFILE_URL+id), '_blank'); } catch(e:Error) { } This works well, but now I'd

[GENERAL] Syntax of: alter table ... add constraint ...

2010-11-08 Thread Alexander Farber
Hello, I'm having this table filled with data: \d pref_users; Table public.pref_users Column |Type | Modifiers +-+--- id | character varying(32) | not null first_name | character

Re: [GENERAL] Syntax of: alter table ... add constraint ...

2010-11-08 Thread Alexander Farber
Thank you, alter table pref_users add constraint pref_users_medals_check check (medals = 0); has worked! I do not use pgAdmin, because I see in the logs of my 2 web server, that attackers look for it all the time. But I'll install it at my development VM at home now. Regards Alex -- Sent via

Re: [GENERAL] Syntax of: alter table ... add constraint ...

2010-11-08 Thread Alexander Farber
Oh right, I meant phpPgAdmin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Finding rank of a single record

2010-11-07 Thread Alexander Farber
Sorry Rob, but it fails with: pref= select * from ( select u.id, u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m where m.yw=to_char(current_timestamp, '-IW') ) all_ranks ar where

Re: [GENERAL] Finding rank of a single record

2010-11-07 Thread Alexander Farber
And: pref= select * from ( select u.id, u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m where m.yw=to_char(current_timestamp, '-IW') ) ar where ar.id='OK138239987797'; works, but

[GENERAL] Finding rank of a single record

2010-11-06 Thread Alexander Farber
Hello, I have 2 tables with user infos (please see \d output at the bottom) and would like to find their rank depending on their money. When I select all records, the rank() works fine: pref= select u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m

[GENERAL] select to_char(current_timestamp, 'YYYY-WW');

2010-11-04 Thread Alexander Farber
Hello, sorry for the stupid question, but why has the week number changed from 44 to 45 this night? It is Friday, 2010-11-05 01:10, but I get now: pref= SELECT to_char(current_timestamp, '-WW'); to_char - 2010-45 (1 row) pref= SELECT CURRENT_DATE; date 2010-11-05

Re: [GENERAL] select to_char(current_timestamp, 'YYYY-WW');

2010-11-04 Thread Alexander Farber
On Fri, Nov 5, 2010 at 1:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: WW is defined as starting the first week on the first day of the year. 2010 started on a Friday so the week number increments on Fridays. There are some other format codes with different behavior ... Thank you, that is what I

Re: [GENERAL] select to_char(current_timestamp, 'YYYY-WW');

2010-11-04 Thread Alexander Farber
I will try -IW On Fri, Nov 5, 2010 at 1:28 AM, Alexander Farber alexander.far...@gmail.com wrote: But is there a format code for a week starting on Sunday or Monday? Sorry, I can't find it at http://www.postgresql.org/docs/8.4/interactive/functions-formatting.html -- Sent via pgsql

[GENERAL] async queries in Perl and poll()/select() loop - how to make them work together?

2010-11-01 Thread Alexander Farber
= $dbh-prepare_cached( q{select pref_update_users(?, ?, ?, ?, ?, ?, NULL)}, {pg_async = PG_ASYNC}); $sth-execute('ID123', 'Alexander', 'Farber', undef, undef, undef); }; warn $@ if $@; } -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] async queries in Perl and poll()/select() loop - how to make them work together?

2010-11-01 Thread Alexander Farber
Hello Andy and others, On Mon, Nov 1, 2010 at 3:33 PM, Andy Colson a...@squeakycode.net wrote: On 11/1/2010 4:29 AM, Alexander Farber wrote: I have a small multiplayer game, a non-forking daemon reading/writing to sockets and running in a IO::Poll loop. I.e. I would like to fire and forget

[GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
Hello Postgres users, to mimic the MySQL-REPLACE statement I need to try to UPDATE a record and if that fails - INSERT it. But how can I detect that the UPDATE has failed in my SQL procedure? begin transaction; create table pref_users ( id varchar(32) primary

Re: [GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
Thanks Pavel, but I have an SQL procedure and not plpgsql? On Sun, Oct 31, 2010 at 9:34 AM, Pavel Stehule pavel.steh...@gmail.com wrote: But how can I detect that the UPDATE has failed in my SQL procedure? see: http://www.postgresql.org/docs/8.4/interactive/plpgsql-control-structures.html

Re: [GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
Thanks for all the comments. Do I need to use BEGIN/COMMIT in my plpgsql-function for UPSERT or are functions atomic? Regards Alex -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
And would a pure SQL-function solution to call an INSERT followed by an UPDATE in its body and ignoring the error? (don't know how ignore it best though, so that I don't ignore other critical errors) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
[corrected typo, sorry] And wouldn't a pure SQL-function solution be: to call an INSERT followed by an UPDATE in its body and ignoring the error? (don't know how ignore that error best though, so that I don't ignore other critical errors) -- Sent via pgsql-general mailing list

Re: [GENERAL] Implementing replace function

2010-10-31 Thread Alexander Farber
I've created a function now (below) and can call it as well, but how can I see it at the psql prompt? Is there a \d command for that or should I dump the database to see my declarations? And is my function atomic? I.e. can't it happen, that FOUND is not true, but then another session calls a

[GENERAL] Sorting rows by a column and storing a row number

2010-10-31 Thread Alexander Farber
Hello, I have a card game for each I'd like to introduce weekly tournaments. I'm going to save the score (virtual money) won by each player into: create table pref_money ( id varchar(32) references pref_users, yw char(7) default to_char(current_timestamp,

[Flashcoders] mod_socket_policy: Apache module for serving socket policy file

2010-10-26 Thread Alexander Farber
Hello, I'd like to send a short note about my Apache module for serving socket policy file in a more effective and secure way than many current scripts on the net do: It can't be blocked by a slow/malicious client, runs with reduced privilleges (as apache, www, nobody, YMMV) and doesn't read any

Re: How to access client socket from a protocol handler

2010-10-24 Thread Alexander Farber
On Sun, Oct 24, 2010 at 12:08 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Sun, Oct 24, 2010 at 00:00, Alexander Farber alexander.far...@gmail.com wrote: I've created a module using bb (the source code at the bottom) and it suffers from the same problem (hijacks the port 80 too). Could

Re: How to access client socket from a protocol handler

2010-10-23 Thread Alexander Farber
Hello Ben and others On Sat, Oct 23, 2010 at 12:52 AM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Sat, Oct 23, 2010 at 00:15, Alexander Farber the conn_config solution is most portable across Apache versions. And what do you mean by core_module in my case (source code below)? That's

Re: How to access client socket from a protocol handler

2010-10-23 Thread Alexander Farber
Hello Ben, On Sat, Oct 23, 2010 at 2:08 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Sat, Oct 23, 2010 at 10:13, Alexander Farber alexander.far...@gmail.com wrote: Your connection handler should return DECLINED for vhosts it doesn't handle (I wager mod_perl did this for you). You can get

Re: How to access client socket from a protocol handler

2010-10-23 Thread Alexander Farber
No, SetHandler should be ok, because mod_echo works fine. I've added the port number to my logs: ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, conn-base_server, served socket policy to %s via %d, conn-remote_ip, conn-base_server-port); And now I see in the error_log:

[CentOS] How to install and update a src rpm?

2010-10-23 Thread Alexander Farber
Hello, is there please a way to install and later update a src rpm - instead of locating and downloading that package manually? I've run: yum install rpm-build mock yum-utils successfully. But when I try to run yumdownloader --source httpd, I get the error listed at the bottom of my mail. Do I

How to access client socket from a protocol handler

2010-10-22 Thread Alexander Farber
Hello, I have a simple Perl module (source code at the bottom), which sends a string to clients connecting to port 843. It works ok, but I'd like to rewrite it in C because it seems to use 20m for this simple task at my CentOS 5.5/64 Linux with httpd-2.2.3-43 and mod_perl-2.0.4: PID USER

Re: How to access client socket from a protocol handler

2010-10-22 Thread Alexander Farber
Hi Ben, On Fri, Oct 22, 2010 at 11:54 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Fri, Oct 22, 2010 at 23:08, Alexander Farber alexander.far...@gmail.com wrote: but don't know how to get the client socket via conn_rec? apr_socket_t *client  = ap_get_module_config(conn-conn_config

Implementing a custom config directive (AP_INIT_TAKE1) in mod_perl 2

2010-10-22 Thread Alexander Farber
Hello, I have a simple protocol handler which writes a string to client socket (source code below). I would like to make that string configurable through httpd.conf, so that I could say there: Listen 843 VirtualHost _default_:843 MyPolicyStringxmlblah/xml

Re: Implementing a custom config directive (AP_INIT_TAKE1) in mod_perl 2

2010-10-22 Thread Alexander Farber
Wow, thank you - I'll try it out

Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Hello mod_perl 2 users, I have 3 questions please: 1) How do you specify the path to your custom module, so that Apache 2 can load it at the startup? I'm using mod_perl-2.0.4-6.el5 with CentOS Linux 5.5 and have the following lines in /etc/httpd/conf.d/perl.conf: LoadModule

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Thanks Ryan and Torsten - 2010/10/21 Torsten Förtsch torsten.foert...@gmx.net: On Thursday, October 21, 2010 15:21:37 Alexander Farber wrote:  [error] Can't locate object method log via package Apache2::ServerRec at /etc/httpd/SocketPolicy.pm line 39.\n you probably miss a use Apache2

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Or maybe I've looked wrong and you do need to loop in Perl? On Thu, Oct 21, 2010 at 5:20 PM, Alexander Farber alexander.far...@gmail.com wrote: 2) I've looked at http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sendrecv.c?view=markup  If APR::Socket::send() is autogenerated from

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Even though my logs show that 1 send-call usually suffices (I have a site with 1 visitor/3 min), I've updated my script. Not sure if returning DECLINED is a good idea. And if you know a way to log into access_log instead of error_log, please tell me. Thank you Alex package SocketPolicy; use

Re: [GENERAL] Constraint: string length must be 32 chars

2010-10-17 Thread Alexander Farber
Hello, really good advices here! But - On Sun, Oct 17, 2010 at 2:37 AM, Rob Sargent robjsarg...@gmail.com wrote: I just read the anonymously part, so I take it you have ruled out recording the given coordinate components directly, in multiple columns presumably?  Otherwise it seems you could

Re: [GENERAL] Constraint: string length must be 32 chars

2010-10-17 Thread Alexander Farber
Hello again, I have 1 more question please: how do you select the x and y parts of a point data type? Can't find it in http://www.postgresql.org/docs/8.4/interactive/functions-geometry.html For example, I have this table with a pos column: snake= \d gps Table public.gps

[GENERAL] Constraint: string length must be 32 chars

2010-10-16 Thread Alexander Farber
Hello, I'm trying to create a table, where md5 strings will serve as primary keys. So I'd like to add a constraing that the key length should be 32 chars long (and contain [a-fA-F0-9] only): create table gps ( id varchar(32) primary key CONSTRAINT char_length(id)==32, stamp timestamp DEFAULT

Re: [GENERAL] Constraint: string length must be 32 chars

2010-10-16 Thread Alexander Farber
snake= create table gps ( id varchar(32) primary key CONSTRAINT id_length char_length(id)=32, stamp timestamp DEFAULT current_timestamp, pos point); ERROR: syntax error at or near char_length LINE 2: id varchar(32) primary key CONSTRAINT id_length char_length(...

Re: [GENERAL] Constraint: string length must be 32 chars

2010-10-16 Thread Alexander Farber
Thank you for your advices. I actually would like to store GPS coordinates, but anonymously, so I was going to save md5(my_secret+IMEI) coming from a mobile... I have to lookup if uuid is supported there Regards Alex On Sat, Oct 16, 2010 at 11:08 PM, Rob Sargent robjsarg...@gmail.com wrote:

[CentOS] iptables failure at the last line

2010-10-05 Thread Alexander Farber
Hello, can anybody please spot an error here? # sudo service iptables start Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter[ OK ] Unloading iptables modules:[ OK ] Applying

Re: [CentOS] iptables failure at the last line

2010-10-05 Thread Alexander Farber
Hello Nicolas, On Tue, Oct 5, 2010 at 11:01 AM, Nicolas Thierry-Mieg nicolas.thierry-m...@imag.fr wrote: Any hints on how to debug those issues? the same way you debug stuff when you can't see the problem by just staring at it: reduce it to a minimal error-case. So, remove some of those

Re: [CentOS] iptables failure at the last line

2010-10-05 Thread Alexander Farber
Seems to work now, thank you (I was having -p tcp instead of -p udp): *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [294:35064] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -s 194.247.190.0/24 -j DROP -A INPUT -p icmp -m icmp --icmp-type

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Alexander Farber
I wish I could see those hanging queries, what SQL do they try to execute: pref= select * from pg_stat_activity; datid | datname | procpid | usesysid | usename |current_query | query_start | backend_start | client_addr | client_port

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Alexander Farber
Hello again, ouch, I have these postmaster's spinning up again - even though I've disabled the cronjob and rebooted: top - 11:42:31 up 1:22, 2 users, load average: 9.15, 7.59, 5.03 Tasks: 135 total, 10 running, 125 sleeping, 0 stopped, 0 zombie Cpu0 : 31.7%us, 0.5%sy, 0.0%ni, 67.4%id,

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Alexander Farber
I've upgraded my CentOS 5.5 VM to: postgresql-libs-8.4.4-1PGDG.rhel5 postgresql-devel-8.4.4-1PGDG.rhel5 postgresql-8.4.4-1PGDG.rhel5 postgresql-contrib-8.4.4-1PGDG.rhel5 postgresql-docs-8.4.4-1PGDG.rhel5 postgresql-server-8.4.4-1PGDG.rhel5 postgresql-plperl-8.4.4-1PGDG.rhel5 and then have loaded

[GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Alexander Farber
Hello Postgres users, I have a Linux website with phpBB serving a small Facebook game: # uname -a Linux X 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:50:31 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/redhat-release CentOS release 5.5 (Final) # rpm -qa | grep -i postgres

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Alexander Farber
Thank you, I've enabled logging, but couldn't see anything suspicious there. Also the 60%-120% CPU-eating postmaster processes are now suddenly gone. I suspect this is some bug in the postgresql-server-8.1.21-1.el5_5.1 delivered with CenOS 5.5/64 bit, because I don't have many simultaneous users

[Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
Hello, I'm trying to compress XML data being exchanged via Socket with a Perl backend and after taking several hurdles, I'm stuck at this error message: 1061: Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray. My code is:

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
On Sun, Oct 3, 2010 at 6:27 PM, Dave Watts dwa...@figleaf.com wrote: In your code, if there's nothing to read, your exception handlers fall through after calling handleTcpError. At compile time, the compiler has no guarantee that there'll be anything in the byte array. Thanks Dave, you're

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
I've even added 2 checks for the _nbytes being 0 and a check for _bytes != null and still it fails with 1061: Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray. (ok, I understand that by static compiler means _bytes being null) My

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
On Sun, Oct 3, 2010 at 7:44 PM, Henrik Andersson he...@henke37.cjb.net wrote: Dave Watts skriver: In your code, if there's nothing to read, your exception handlers fall through after calling handleTcpError. At compile time, the compiler has no guarantee that there'll be anything in the byte

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
Bingo, Tom - On Sun, Oct 3, 2010 at 8:14 PM, Tom Gooding t...@quickthinkmedia.co.uk wrote: It looks to me like your compiler error is due to a call to _bytes.inflate() where the compiler detects that inflate() is not a method of the ByteArray class, I think it was added in later player

[GENERAL] Copying a column into a temp. table

2010-10-01 Thread Alexander Farber
How do you copy a column from table please? I'm trying with PostgreSQL 8.1.21/CentOS 5.5: # psql -a -f clean-forum.sql start transaction; START TRANSACTION create temp table old_topics (topic_id integer) on commit delete rows; CREATE TABLE create temp table old_posts (post_id integer) on commit

[GENERAL] How to restore postgres database?

2010-10-01 Thread Alexander Farber
Ouch! I've loaded my backup while being connected to the wrong database - to the dafeult postgres database. Is there a way to restore it? I currently have: postgres=# \l List of databases Name| Owner | Encoding ---+--+-- postgres | postgres | UTF8

Re: [GENERAL] Copying a column into a temp. table

2010-10-01 Thread Alexander Farber
Alex On Fri, Oct 1, 2010 at 4:59 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Fri, Oct 1, 2010 at 10:52 AM, Alexander Farber alexander.far...@gmail.com wrote: Thank you, I've created the following script which seems to work ok. I just hope, that it won't be hit by the max_stack_depth

[GENERAL] Working around in-statement with temporary tables

2010-09-30 Thread Alexander Farber
Hello, I'm using phpBB 3.0.7-PL1 with postgresql-server-8.1.21-1.el5_5.1 with CentOS Linux 5.5, both under 32-bit (dev. VM) and 64-bit (prod. server) One of the phpBB sub-forums grows quickly every day and I have problems cleaning old messages there, because its phpBB's admin-script bails out

[CentOS] Forbidden: can't access *.html files in /var/www/html

2010-09-29 Thread Alexander Farber
Hello, I'm using the latest CentOS with phpBB 3.0.x + postgreSQL + sendmail (relayed through gmail.com) - all those programs working fine, with no big modifications of the CentOS defaults (i.e. SELinux is on). Now I'm struggling with the seemingly simple problem, that when I put an .html file

Re: [CentOS] Forbidden: can't access *.html files in /var/www/html

2010-09-29 Thread Alexander Farber
Nope this doesn't help. I've tried both 444 and 644 for Alex.html and vice versa: 444 and 644 for the .php and .xml files. On Wed, Sep 29, 2010 at 4:52 PM, Rob Del Vecchio rob.delvecc...@gmail.com wrote:  # ls -al Alex.html index.php hello-world.php -r--r--r-- 1 root    root     599 Sep 29 15:49

Re: [CentOS] Forbidden: can't access *.html files in /var/www/html

2010-09-29 Thread Alexander Farber
On Wed, Sep 29, 2010 at 5:29 PM, Simon Billis si...@houxou.com wrote: Can you show the output of ls -laZ please? This will show the selinux context information for the files - the error is usually to do with the context of the files. Hello and thanks for your reply. The SELinux stuff is new

[Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Hello, does anybody please know, why I can only set the background color here? var _label:Label = new Label(); _label.text = 'should be red'; _label.textField.background = true; _label.textField.backgroundColor = 0x00FF00; _label.textField.textColor = 0xFF;

Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Thanks, but - On Tue, Sep 21, 2010 at 11:36 AM, Karl DeSaulniers k...@designdrumm.com wrote: Have you tried setting the text color before the background color? I think you were assigning your text to _label not _label.textField. Is this what you wanted? Try    var _label:Label = new

Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Unfortunately there is no html property, and even this is not working: var _label:Label = new Label(); _label.textField.background = true; _label.textField.backgroundColor = 0x00FF00; _label.textField.textColor = 0xFF; _label.textField.text = should be red; _label.textField.htmlText = should

Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Nope :-) On Tue, Sep 21, 2010 at 11:57 AM, Karl DeSaulniers k...@designdrumm.com wrote: _label.label = 'should be red'; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Thank you Kenneth, this explains what probably happens beneath the hood On Tue, Sep 21, 2010 at 1:16 PM, Kenneth Kawamoto kennethkawam...@gmail.com wrote: If you cancel the TextFormat you should be able to apply textColor, i.e. _label.setStyle(textFormat, new TextFormat(null, null, null));

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-16 Thread Alexander Farber
Hello, On Wed, Sep 15, 2010 at 10:53 PM, Kerry Thompson al...@cyberiantiger.biz wrote: What you really want is something like this: games      game id=0/      game id=9012        user id=OK10218913103 name=Yervand/      /game      game id=9013        user id=OK305894249541 name=chabo/   

[Flashcoders] Creating sliding panel with a TransitionManager.start

2010-09-16 Thread Alexander Farber
Hello, I've created a MovieClip _rect and have placed several components on it and packed that alltogether inside a class which extends Sprite. I would like that stuff to slide in and out of screen and so I've added: public function hidePanel():void {

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-16 Thread Alexander Farber
It's a List (AS3 Flash component). Thanks, I've ended up creating an Array and filling it with XML data: private var _allDP:DataProvider = new DataProvider(); for each (var game:XML in xlist) { var obj:Object = { id: ga...@id, xml: game, len: game.elements('user').length() };

Re: [Flashcoders] Custom cellRenderer for a List with XML data

2010-09-15 Thread Alexander Farber
Hello Kerry and others, Alexander Farber wrote: http://stackoverflow.com/questions/3709172/custom-cellrenderer-for-a-list-with-xml-data thank you, I've traced the set data in debugger and its d argument is really an Object, not XML. Flash seemingly will go through all the 1st level children

[Flashcoders] Custom cellRenderer for a List with XML data

2010-09-14 Thread Alexander Farber
Hello, I can't figure out, how to feed data to a List cellRenderer if it is in XML format. What argument will set data() receive? In the trace output I only see, that it is an object. I have prepared a simple test case demonstrating my problem (and posted a copy and screenshot at

[CentOS] Shutdown CentOS VM when closing VMWare Workstation

2010-09-09 Thread Alexander Farber
Hello, I'm using CentOS 5.5 / 16bit as a virtual machine in VMWare Workstation and have installed the VMWare Tools by running vmware-install.pl and vmware-config-tools.pl but can't figure out how to make the VM shutdown, when I shutdown the Windows PC hosting it. Does anybody please have any

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Alexander Farber
Hello fellow flashcoders, I'm still struggling with my e4x problem. With Kenneth's help I've got it partly working for the cases where each game has at least 1 user node: var games:XML = games game user/ user/ user/ /game game user/ user/

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Alexander Farber
Thank you for the pointers, I'll read up on child() and attribute() - I've missed them in the docs somehow ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-23 Thread Alexander Farber
Hello Kenneth and others, On Thu, Aug 19, 2010 at 9:05 PM, Kenneth Kawamoto kennethkawam...@gmail.com wrote: trace(Full games: + games.game.(user.length() == 3).length()); trace(Vacant games: + games.game.(user.length() 3).length()); thank you - now my Flash code is working, but my Flex

Re: [Flashcoders] pdf encoders

2010-08-23 Thread Alexander Farber
Maybe script it with Openoffice? On 8/20/10, Glen Pike postmas...@glenpike.co.uk wrote: Hi, Never tried it, but what about Zend_Pdf? Glen Anthony Pace wrote: I am sending this here just cause I think it's likely some developers here have had to work with PDF output. I know

Re: [flexcoders] Listening for CollectionEvent in custom component

2010-08-21 Thread Alexander Farber
Hello Wesley and others, I have prepared a simple test case to demo my problem - I'm trying to create a custom component which is being fed with XML repeatedly coming from server. My problem is that the CollectionEvent listener isn't fired. Games.mxml: ?xml version=1.0 encoding=utf-8? mx:VBox

Re: [flexcoders] Listening for CollectionEvent in custom component

2010-08-21 Thread Alexander Farber
Hello Wesley, On Sun, Aug 22, 2010 at 12:47 AM, Wesley Acheson wesley.ache...@gmail.com wrote: This means that your listening to a change in a subsequently unbound collection. oh ok thanks, this makes sense. In that case I probably don't need any events at all, because I read the XML data

[Flashcoders] E4X question: counting number of subnodes

2010-08-19 Thread Alexander Farber
Hello, my server delivers XML data over socket, representing games, with up to 3 players in each. In my custom component I'd like to display a summary: total number of games, number of full games (3 players) number of vacant games (joinable, because less than 3 players). I've prepared a reduced

Re: [flexcoders] does Flex 5 upgrade? or downgrade in practice? REFdn7076142784

2010-08-19 Thread Alexander Farber
So you think Flex is complex, but then you want it to become multithreaded?

[flexcoders] Push verse Poll in Flash Player

2010-08-16 Thread Alexander Farber
An idea: you could open a socket connection (because of corporate proxies best would be the port 80) and try to read an integer: private function handleTcpData(event:Event):void { while(_socket.bytesAvailable) { try{ var i:int = _socket.readInt(); fetchHttpData(i); }catch(e:Error){

[CentOS] Redirecting PHP error messages into a log file

2010-07-30 Thread Alexander Farber
Hello, I'm using CentOS release 5.5 x86_64 with the stock php-5.1.6-27.el5 and would like to redirect PHP messages into /var/log/httpd/php_log First I tried adding that file name to /etc/php.ini: error_log = /var/log/httpd/php_log and restarted httpd, but the file didn't appear. I've touched it

Re: [CentOS] Redirecting PHP error messages into a log file

2010-07-30 Thread Alexander Farber
So you think the httpd.* line in syslog.conf is correct? On Sat, Jul 31, 2010 at 12:48 AM, Jason Pyeron jpye...@pdinc.us wrote: -Original Message- I still would like to move those messages to a separate file though, so I've added the following line to /etc/syslog.conf and reloaded

[flexcoders] Re: PopUpButton with TileList and custom renderer works, but 2 annoyances

2010-07-26 Thread Alexander Farber
Hello again, On Sat, Jul 24, 2010 at 5:39 PM, Alexander Farber alexander.far...@gmail.com wrote: 1) For some reason I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher) 2) The TileList tl2 has a scrolling issue. I've

[flexcoders] PopUpButton with TileList and custom renderer works, but 2 annoyances

2010-07-25 Thread Alexander Farber
Hello, I'm trying to use a PopUpButton with a red/black colored TileList and it does work, but has 2 minor issues, that I can't figure out. I've prepared a simple test case listed at the bottom, please review it. 1) For some reason I get numerous warnings: warning: unable to bind to property

[flexcoders] Re: Changing color of the PopUpButton

2010-07-23 Thread Alexander Farber
Oh sorry - I was missing: pub.setStyle('color', 0xFF);

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
Thank you, but now I get the runtime error: TypeError: Error #1034: Type Coercion failed: cannot convert rende...@4c310a1 to mx.controls.menuClasses.IMenuItemRenderer. at

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
I've tried another code and still get the error when I click the menu: TypeError: Error #1034: Type Coercion failed: cannot convert myrende...@47410a1 to mx.controls.menuClasses.IMenuItemRenderer. at

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-22 Thread Alexander Farber
Now it works (not sure if dispathEvent needed though and why): ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=off horizontalScrollPolicy=off implements=mx.controls.menuClasses.IMenuItemRenderer width=100% height=100% mx:Script

[flexcoders] Changing color of the PopUpButton

2010-07-22 Thread Alexander Farber
Hello, I have a working code for displaying red and black entries in the list of a PopUpButton (depending on the card suit). However I'm missing the minor last touch: when the user selects a red entry in the list and I assign its value to the PopUpButton's label, I don't know how to change

[flexcoders] Re: 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-21 Thread Alexander Farber
Hello, I'm trying this code, but get the error about bad casting in Test.mxml: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory. My Renderer.mxml: ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; mx:Text

[flexcoders] 2 PopUpButton questions: force opening upwards + red and black item colors

2010-07-19 Thread Alexander Farber
Hello, I'm trying to port a bigger project from Flash CS4 to Flex 3 and have a problem that the PopUpButton, that is located at the right bottom of my app, opens downwards when I click it and thus is being cut off. Only if I resize the browser, it will open upwards as actually wanted by me. I've

[CentOS] kernel: Machine check events logged

2010-07-07 Thread Alexander Farber
Hello, every few hours I get the following message in /var/log/message: Jul 5 20:23:28 hXXX kernel: Machine check events logged Jul 5 20:53:28 hXXX kernel: Machine check events logged Jul 5 22:13:28 hXXX kernel: Machine check events logged Jul 5 23:53:28 hXXX kernel: Machine check events

Re: [CentOS] kernel: Machine check events logged

2010-07-07 Thread Alexander Farber
Hello Mark, On Wed, Jul 7, 2010 at 2:51 PM, m.r...@5-cent.us wrote: First, this is *very* bad - I'm not good enough on this to tell you if it's the CPU, or the motherboard, but it's one of the two, *not* just memory. Second, if you're paying for hosting, and it's *their* server, you need to

Re: [CentOS] kernel: Machine check events logged

2010-07-07 Thread Alexander Farber
I've only found this Solaris blog, but don't understand it well enough: http://blogs.sun.com/gavinm/entry/amd_opteron_athlon64_turion64_fault Can't provide you more details, because my dedicated server is under hoster's hardware tests since 5 hours :-( (and I guess everyone will run home for the

Re: [CentOS] kernel: Machine check events logged

2010-07-07 Thread Alexander Farber
Anyway my hoster has finished the hardware tests (probably just kept running memtest86 or some vendor CD?) on my CentOS 5.5/64bit machine with quad Opteron 1381 and said that they haven't found any issues. I'll post here a short note if I will experience any issues on my LAPP server (preferans.de

[GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Alexander Farber
Hello, why aren't double quotes accepted below? db1=# alter user user1 password pass1; ERROR: syntax error at or near pass1 LINE 1: alter user user1 password pass1; ^ db1=# alter user user1 password 'pass1'; ALTER ROLE Is there a thumb rule to know when to use

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Alexander Farber
And identifiers means column names (eventually containing whitespace)? Thank you Alex -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: Hosting at Strato.de: anybody using PowerServer L with Opteron 1212 HE?

2010-06-16 Thread Alexander Farber
Hello again, On Wed, Jun 9, 2010 at 8:35 PM, umaxx um...@oleco.net wrote: http://wiki.bsdforen.de/howto/strato_mr2_openbsd for initial installation procedure since dettus.net was not really working for me cause of MBR boot issues (probably my fault). (Also I guess I should take amd64 there?)

<    3   4   5   6   7   8   9   10   11   12   >