Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
No, actually both variants work for me right now at 9.5.3 on Mac - On Wed, Aug 10, 2016 at 8:31 PM, Adrian Klaver wrote: > >> Given what you are doing, RETURN TABLE it will not work there for the > same reason it does not work in 9.5: > >

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
Both variants have worked for me, thanks I am using 9.5.3 on CentOS 7 (my "production server" and Win 7, Mac (my "dev machines") :) Where does RETURN NEXT EXPRESSION work, on 9.6?

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
Thank you Adrian and others - I am trying to replace INSERT into temp table in my custom function by RETURN NEXT, but get an error: CREATE OR REPLACE FUNCTION words_check_words( IN in_uid integer, IN in_gid integer, IN in_tiles jsonb) RETURNS TABLE(word varchar,

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
There is still 1 open question - In my custom function: CREATE OR REPLACE FUNCTION words_check_words( IN in_uid integer, IN in_gid integer, IN in_tiles jsonb) RETURNS TABLE(word varchar, score integer) AS $func$ I iterate through tiles passed as last argument

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
Thank you for confirming, I supposed I have to use RETURN QUERY and now it works.

Re: [GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
Thank you - On Wed, Aug 10, 2016 at 3:18 PM, Charles Clavadetscher < clavadetsc...@swisspug.org> wrote: > > #variable_conflict [use_column|use_variable] before BEGIN: > > - http://dba.stackexchange.com/questions/105831/naming- >

[GENERAL] RETURNS TABLE function: ERROR: column reference "word" is ambiguous

2016-08-10 Thread Alexander Farber
Good afternoon, In PostgreSQL 9.5.3 I have created a function (full source code at the bottom), which goes through an 15 x 15 varchar array and collects words played horizontally and vertically. I have declared the function as: CREATE OR REPLACE FUNCTION words_check_words( IN in_uid

Re: [GENERAL] select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1); returns NULL instead of 0

2016-08-08 Thread Alexander Farber
Thank you, so should I maybe switch to cardinality then?

[GENERAL] select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1); returns NULL instead of 0

2016-08-08 Thread Alexander Farber
Good evening, I wonder, why the following returns NULL and not 0 in 9.5.3? # select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1); array_length -- (1 row) # select array_length(array_remove(ARRAY[3,3,3],3), 1); array_length -- (1 row) In a code for a

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Alexander Farber
Hello Charles, unfortunately on Windows 7 this fails: psql (9.5.3) Type "help" for help. # select lower(('И'::text collate "en_US")) ; ERROR: collation "en_US" for encoding "UTF8" does not exist LINE 1: select lower(('?'::text collate "en_US")) ; ^ By the way I

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Alexander Farber
Thank you for the replies. On CentOS 7 Linux with pgdg 9.5.3 the lower() method works and I have: # \l List of databases Name| Owner | Encoding | Collate |Ctype| ---+--+--+-+-+ postgres |

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Alexander Farber
More info: # \l+ Name| Owner | Encoding | Collate | Ctype | ---+-+--+-+---+ postgres | user1 | UTF8 | C | C | template0 | user1 | UTF8 | C | C | | | | | | template1 | user1

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Alexander Farber
Here the Windows-log excerpt (the 5 cyrillic letters stay uppercased): LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: statement: SET client_encoding = 'UTF8'; LOG: execute : SELECT out_gid AS gid FROM words_play_game($1, $2, $3::jsonb) DETAIL:

[GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Alexander Farber
Hello fellow PostgreSQL users, does anybody else observe the problem, that calling lower() method on UTF8 cyrillic strings works on Mac and Linux for version 9.5.3, but fails on Windows 7 / 64 bit (I am using the unzippable version w/o installer)? I am probably not providing enough information

[jetty-users] Use ResourceHandler to map several dirs to same contextPath

2016-08-03 Thread Alexander Farber
Good morning, is it please possible to serve 2 different dirs with static context (PNG files) under same contextPath? I have tried the following XML file but only the last dir is being served when a PNG-file is requested under "/drawable-mdpi" URL:

Re: Embedded fonts still shown in iOS app, but disappeared in Android app

2016-07-26 Thread Alexander Farber
uce the problem using the emulator, or does this > only happen on physical devices? > > > On Jul 26, 2016, at 3:47 PM, Alexander Farber <alexander.far...@gmail.com> > wrote: > > > > > http://stackoverflow.com/questions/38590070/embedded-fonts-still-shown-in-ios-app-but

Embedded fonts still shown in iOS app, but disappeared in Android app

2016-07-26 Thread Alexander Farber
Good afternoon! There is a card game written in Apache Flex, which I am trying to keep alive and while the iOS version still works ok, the Android app has developed several visual problems over the last 1-2 years: 1. The card suit symbols are not displayed correctly (my main problem!) 2. The

Re: [jetty-users] Minify JavaScript and CSS with the help of Jetty?

2016-07-19 Thread Alexander Farber
Hello, just a note for the archives - In my Wordpress-served-through-Jetty config as described at http://www.eclipse.org/jetty/documentation/current/configuring-fastcgi.html I have additionally set "gzip" init parameter to "true" with: default

Re: [jetty-users] Minify JavaScript and CSS with the help of Jetty?

2016-07-18 Thread Alexander Farber
Hi Simone, On Mon, Jul 18, 2016 at 5:00 PM, Simone Bordet wrote: > > Note that Jetty's DefaultServlet (that serves static files), is > capable of serving files compressed if they exist. > That is: client requests /style.css, but on file system you have > style.css.gz. >

Re: [jetty-users] Minify JavaScript and CSS with the help of Jetty?

2016-07-18 Thread Alexander Farber
Thank you for all the replies. I didn't assume minifying would cost any noticable time (because I was using mod_pagespeed before...) I think I will better pre-minify at my new Jetty-using website. Regards Alex ___ jetty-users mailing list

Re: [jetty-users] onWebSocketError "java.net.SocketTimeoutException: Timeout on Read"

2016-07-13 Thread Alexander Farber
Oh I am sorry, nevermind. Once I have composed and sent the mail, I've realised that I am setting the idle timeout to 2 minutes myself with "factory.getPolicy().setIdleTimeout(120 * 1000);" I have compiled old version of my servlet by mistake. Regards Alex

[jetty-users] onWebSocketError "java.net.SocketTimeoutException: Timeout on Read"

2016-07-13 Thread Alexander Farber
Good evening, I run Jetty with: # java -Dorg.eclipse.jetty.LEVEL=DEBUG -jar /usr/share/java/jetty-distribution-9.3.10.v20160621/start.jar jetty.home=/usr/share/java/jetty-distribution-9.3.10.v20160621 jetty.base=/var/www/jetty-base jetty.http.host=127.0.0.1 And connect from JavaScript to a

Re: [jetty-users] WebSocketServlet in a WAR-file: Bad character 13 for SelectChannelEndPoint

2016-07-04 Thread Alexander Farber
Hello again, all the time I was using ws://127.0.0.1:8080/ws to connect ( because of /ws ) and was getting the error. With a trailing slash ws://127.0.0.1:8080/ws/ however it works :o/ Regards Alex On Sat, Jul 2, 2016 at 6:17 PM, Alexander Farber <alexander.far...@gmail.com >

[jetty-users] WebSocketServlet in a WAR-file: Bad character 13 for SelectChannelEndPoint

2016-07-02 Thread Alexander Farber
Godd afternoon, I am probably missing something simple, when trying to create a WAR-file with a custom WebSocketServlet with a test project I have created at https://github.com/afarber/jetty-newbie/tree/master/WebSocketWarApp WsServlet.java public class WsServlet extends WebSocketServlet {

Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-07-01 Thread Alexander Farber
Thank you Jan, this has helped. I am sorry for the stupid questions - I have only used Perl and then PHP for web apps in the past decade and have completely missed the Java side :-) I have changed the url-pattern in WEB-INF/web.xml of my WAR-file to "/" And have also created the file

Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-06-30 Thread Alexander Farber
ges results in "404 page" displayed by Wordpress: http://slova.de/hello/ http://slova.de/hello/hello/ I have put the "hello" project at https://github.com/afarber/jetty-newbie/tree/master/JettyMavenHelloWarApp Regards Alex On Thu, Jun 30, 2016 at 1:53 PM, Alexander Farber < &g

Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-06-30 Thread Alexander Farber
0.1-SNAPSHOT.war but that didn't really work (I guess can not use Configure-tag inside Configure): java.lang.IllegalStateException: Unknown tag: Configure in file:/var/www/jetty-base/webapps/slova.de.xml Regards Alex On Thu, Jun 30, 2016 at 1:53 PM, Alexander Farber < alexand

Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-06-30 Thread Alexander Farber
Hello, On Wed, Jun 29, 2016 at 10:25 PM, Joakim Erdfelt wrote: > Looks like its working as designed to me ... > > http://slova.de/hello-world-0.1-SNAPSHOT/hello/ > > I see the HelloServlet response. > > Keep in mind your URL follows this general pattern ... > > >

Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-06-29 Thread Alexander Farber
.1-SNAPSHOT" > > So using http://slova.de/hello-world-0.1-SNAPSHOT would work. > > On Wed, Jun 29, 2016 at 12:03 PM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> >> I have followed >> https://www.eclipse.org/jetty/documentation/cu

[jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

2016-06-29 Thread Alexander Farber
Good evening, with the help of this mailing list (thank you) I have followed https://www.eclipse.org/jetty/documentation/9.3.x/configuring-fastcgi.html and successfully deployed several virtual hosts with Wordpress: http://www.eclipse.org/jetty/configure_9_3.dtd;>

[jetty-users] oejw.StandardDescriptorProcessor:main: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet

2016-06-28 Thread Alexander Farber
Hello, to serve a static (only HTML files and images) virtual host I have created the following /var/www/jetty-base/webapps/afarber.de.xml file: http://www.eclipse.org/jetty/configure_9_0.dtd;> /var/www/html/afarber.de / afarber.de

Re: [jetty-users] WordPress on CentOS 7 Linux

2016-06-27 Thread Alexander Farber
I would like to add for archives that it has been a bad idea to use /var/run/jetty (or /run/jetty) as JETTY_BASE, because that dir turned out to be deleted on Linux reboot :-) Here is my corrected /etc/systemd/system/jetty.service: [Unit] Description=Jetty After=network-online.target [Service]

Re: [jetty-users] WordPress on CentOS 7 Linux

2016-06-27 Thread Alexander Farber
Thank you - On Mon, Jun 27, 2016 at 8:27 PM, Simone Bordet wrote: > > Ah, you are offloading TLS. > > Then use the PROXY protocol, Jetty supports that too. > Use the "send-proxy" directive in the HAProxy configuration, and add > the "proxy-protocol" module in Jetty. > That

Re: [jetty-users] WordPress on CentOS 7 Linux

2016-06-27 Thread Alexander Farber
Hi Simone, are you sure - On Mon, Jun 27, 2016 at 3:27 PM, Simone Bordet <sbor...@webtide.com> wrote: > On Sun, Jun 26, 2016 at 8:06 PM, Alexander Farber > <alexander.far...@gmail.com> wrote: > > My only problem is that with Apache I had the following wp-config.php >

Re: [jetty-users] WordPress on CentOS 7 Linux

2016-06-26 Thread Alexander Farber
s Alex On Sun, Jun 26, 2016 at 8:06 PM, Alexander Farber < alexander.far...@gmail.com> wrote: > > Finally I copy the file from > https://www.eclipse.org/jetty/documentation/9.3.x/configuring-fastcgi.html > into /run/jetty/webapps/jetty-wordpress.xml > > and start Jett

[jetty-users] WordPress on CentOS 7 Linux

2016-06-26 Thread Alexander Farber
Amazing!! I already had WordPress running at my CentOS 7 server. Then I download Jetty and install haproxy and php-fpm packages. Create a user with "adduser -s /sbin/nologin jetty" and create /run/jetty dir with: # java -jar /usr/share/java/jetty-distribution-9.3.10.v20160621/start.jar \

Re: [CentOS] haproxy + Apache + virtual hosts -> wrong host is displayed

2016-06-24 Thread Alexander Farber
Ok, I had to add ServerAlias for each server, didn't think of it because before I had a mod_rewrite rule to remove the "www." prefix... On Fri, Jun 24, 2016 at 9:58 PM, Alexander Farber < alexander.far...@gmail.com> wrote: > > On CentOS 7.2.1511 I have installed: > ha

[CentOS] haproxy + Apache + virtual hosts -> wrong host is displayed

2016-06-24 Thread Alexander Farber
Hello, I hope my question is not off-topic here. On CentOS 7.2.1511 I have installed: haproxy-1.5.14-3.el7.x86_64 httpd-2.4.6-40.el7.centos.1.x86_64 The /etc/haproxy/haproxy.cfg binds HAProxy to ports 80 and 443 and accepts HTTPS to slova.de: defaults modehttp

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
Simone, thank you for the valuable comments - On Thu, Jun 23, 2016 at 7:08 PM, Simone Bordet wrote: > > In general, you don't need that, since Jetty can serve WordPress too > (see > http://www.eclipse.org/jetty/documentation/9.3.x/configuring-fastcgi.html > ). > We suggest

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
Thank you, Simone - On Thu, Jun 23, 2016 at 4:02 PM, Simone Bordet wrote: > > The server shows a NPE that is the root cause of your issue. > > Your server-side code is wrong at line 40, where you specify the > SslConnectionFactory, you tell it that the next protocol is

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
Oh, you meant to run my client with -Dorg.eclipse.jetty.LEVEL=DEBUG -Djavax.net.debug=ssl I am attaching the log files (now there are exceptions for some reason too). (CC-ing you Simone in case the mailing list removes the file attachments) Regards Alex On Thu, Jun 23, 2016 at 1:14 PM,

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
org.eclipse.jetty.LEVEL=DEBUG org.eclipse.jetty.websocket.LEVEL=DEBUG but no additional output is printed, do you mean something else? Regards Alex On Thu, Jun 23, 2016 at 1:14 PM, Simone Bordet <sbor...@webtide.com> wrote: > On Thu, Jun 23, 2016 at 12:36 PM, Alexander Farber > &l

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
Thank you, Leo. With -Djavax.net.debug=ssl there are following outputs - On Thu, Jun 23, 2016 at 11:26 AM, Leo Currie <leo_cur...@slc.co.uk> wrote: > > > On Wed, Jun 22, 2016 at 11:07 AM, Alexander Farber > > > > > http://stackoverflow.com/questions/37967362/websoc

Re: [jetty-users] WebSocket over SSL in Embedded Jetty 9

2016-06-23 Thread Alexander Farber
Thank you Joakim, but unfortunately you have tried ws://127.0.0.1:8080 which already works and not the wss://127.0.0.1.8443 On Wed, Jun 22, 2016 at 10:38 PM, Joakim Erdfelt <joa...@webtide.com> wrote: > I replied on your stackoverflow question. > > On Wed, Jun 22, 2016 at 11:0

Re: [CentOS] Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?

2016-06-21 Thread Alexander Farber
I think I have finally figured it out - http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html says that "-j REDIRECT" is just a shortcut for "-j DNAT" with destination address being the one of the interface: "There is a specialized case of Destination NAT called redirection: it is a

Re: [CentOS] Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?

2016-06-21 Thread Alexander Farber
Hello Gordon and others On Tue, Jun 21, 2016 at 4:13 PM, Gordon Messmer <gordon.mess...@gmail.com> wrote: > On 06/21/2016 02:30 AM, Alexander Farber wrote: > >> -A PREROUTING -p tcp -m tcp -d 144.76.184.154/32 --dport 80 -j REDIRECT >> --to-ports 8080 >> > > &

Re: [CentOS] Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?

2016-06-21 Thread Alexander Farber
Hello again, unfortunately the following /etc/sysconfig/iptables file does not work: *nat :INPUT ACCEPT :OUTPUT ACCEPT :PREROUTING ACCEPT :POSTROUTING ACCEPT #-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 -A PREROUTING -p tcp -m tcp -d 144.76.184.154/32 --dport 80 -j

[CentOS] Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?

2016-06-20 Thread Alexander Farber
Good evening, on a CentOS 7 LAMP (not gateway) dedicated server I am using iptables-services with the following /etc/sysconfig/iptables: *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

Re: [jetty-users] Stopping embedded Jetty (not webapps) gracefully in systemd service

2016-06-19 Thread Alexander Farber
Ok, I have solved the problem of my custom service wrongly entering "failed" state by adding the line: SuccessExitStatus=143 because that seems to be the usual exit code of JVM after receiving "kill -TERM" ___ jetty-users mailing list

[jetty-users] Stopping embedded Jetty (not webapps) gracefully in systemd service

2016-06-19 Thread Alexander Farber
Hello, in CentOS 7 Linux I have followed the guide https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html and have created a custom service unit for systemd in the file

Re: [CentOS] Error: Could not find or load main class with OpenJDK and Oracle Java

2016-06-17 Thread Alexander Farber
Nevermind, I had to move my test file under thepackagename/TheClassName.class and then it runs fine. However my real program [1] consisting of few jar-files still does not run on CentOS (while running fine on Windows). I have to investigate more and will ask a separate question. Regards Alex

[CentOS] Error: Could not find or load main class with OpenJDK and Oracle Java

2016-06-17 Thread Alexander Farber
Hello fellow Linux users, on CentOS 7.2 I have successfully downloaded and installed Oracle Java [1] with: # rpm -Uvh jdk-8u91-linux-x64.rpm Also there is already OpenJDK installed: # rpm -qa | grep -i jdk java-1.8.0-openjdk-headless-1.8.0.91-0.b14.el7_2.x86_64

Re: [GENERAL] Moving from PHP to Java: A result was returned when none was expected.

2016-06-15 Thread Alexander Farber
I only understand a quarter of what you guys are writing, but to me the JDBC driver throwing SQLException "A result was returned when none was expected" when my stored function is declared as "void" with CREATE OR REPLACE FUNCTION words_skip_game( IN in_uid integer, IN in_gid

Re: [GENERAL] Moving from PHP to Java: A result was returned when none was expected.

2016-06-15 Thread Alexander Farber
Hello Jan, On Wed, Jun 15, 2016 at 4:17 PM, Jan de Visser <j...@de-visser.net> wrote: > On Wednesday, June 15, 2016 3:56:07 PM EDT Alexander Farber wrote: > > Now I am trying to call the same function through JDBC driver > 9.4.1208.jre7: > > > > private sta

Re: [GENERAL] Moving from PHP to Java: A result was returned when none was expected.

2016-06-15 Thread Alexander Farber
Actually I meant the doc https://jdbc.postgresql.org/documentation/94/update.html

[GENERAL] Moving from PHP to Java: A result was returned when none was expected.

2016-06-15 Thread Alexander Farber
Good afternoon, at PostgreSQL 9.5.3 I have a stored function (full source code below) returning void, which I successfully call with PHP: function skipGame($dbh, $uid, $gid) { $sth = $dbh->prepare('SELECT words_skip_game(?, ?)'); $sth->execute(array($uid, $gid)); } Now I am

Re: [GENERAL] How to pass jsonb and inet arguments to a stored function with JDBC?

2016-06-14 Thread Alexander Farber
at 3:45 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Jun 14, 2016 at 9:33 AM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> >> CREATE OR REPLACE FUNCTION words_merge_users( >> IN in_users jsonb, >>

[GENERAL] How to pass jsonb and inet arguments to a stored function with JDBC?

2016-06-14 Thread Alexander Farber
Dear PostgreSQL users, I have a stored procedure defined as: CREATE OR REPLACE FUNCTION words_merge_users( IN in_users jsonb, IN in_ip inet, OUT out_uid integer) RETURNS integer AS $func$ ... $func$ LANGUAGE plpgsql; Which I can successfully call at

[jetty-users] How to get remote IP address as String in WebSocketListener?

2016-06-14 Thread Alexander Farber
Hello, would calling String ip = mSession.getRemoteAddress().getAddress().getHostAddress(); be a good way of getting the remote IP address in the onWebSocketText callback of a custom WebSocketListener implementation? I am asking because - 1) Is calling 3 methods necessary or maybe there is

Re: [jetty-users] auto-respawning of jetty as a linux service

2016-06-13 Thread Alexander Farber
One option at CentOS 6 (probably not the best one, but it works for me since many years) is to put an entry into /etc/inittab That is how I run a Perl script (as user "nobody") acting as a daemon for a multiplayer game and redirect output into /tmp/log-Mon.txt /tmp/log-Tue.txt etc.:

Re: [jetty-users] Using org.eclipse.jetty.util.ajax.JSON in custom WebSocketListener

2016-06-07 Thread Alexander Farber
Hello Simone and others, On Mon, May 30, 2016 at 12:04 AM, Simone Bordet wrote: > > The JSON class is for public use and used, for example, by the CometD > project (https://cometd.org). > It might just be a problem with your IDE or otherwise some other > configuration. > >

Re: [jetty-users] WebSocketHandler or WebSocketListener - where to open JDBC connection

2016-06-05 Thread Alexander Farber
and then passed to the registered class. Would creating a custom WebsocketCreator help here? https://www.eclipse.org/jetty/documentation/current/jetty-websocket-server-api.html Regards Alex On Sun, Jun 5, 2016 at 8:54 AM, Alexander Farber <alexander.far...@gmail.com > wrote: > But actua

[jetty-users] WebSocketHandler or WebSocketListener - where to open JDBC connection

2016-06-04 Thread Alexander Farber
Good evening, I am working on a word game, moving it from AJAX/PHP to Websockets/Jetty. Most of code is in stored procedures for PostgreSQL anyway. Being a Servlets and JDBC newbie I have a question please: If you would have a custom WebSocketHandler like

Re: [CentOS] iptables.service listed as: not-found inactive dead

2016-05-31 Thread Alexander Farber
-services # systemctl enable iptables # systemctl start iptables And it seems to work well now Regards Alex On Tue, May 31, 2016 at 3:29 PM, Marcelo Roccasalva < marcelo-cen...@irrigacion.gov.ar> wrote: > On Tue, May 31, 2016 at 9:57 AM, Alexander Farber < > alexander.f

[CentOS] iptables.service listed as: not-found inactive dead

2016-05-31 Thread Alexander Farber
Hello fellow CentOS users, on a freshly installed 7.2 machine and after reading https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/chap-Managing_Services_with_systemd.html I try to enable iptables with following commands: # cat

[GENERAL] How to hide JDBC connection credentials from git?

2016-05-31 Thread Alexander Farber
Hello, I work on several small Java projects (using Maven+NetBeans) and store them in a public git repository. I would like to use PostgreSQL JDBC in some of the projects, but don't want to make the connection credentials of my database public. Surely there are other developers out there, who

[jetty-users] Using org.eclipse.jetty.util.ajax.JSON in custom WebSocketListener

2016-05-29 Thread Alexander Farber
Good evening, I have 2 questions related to JSON usage please: 1) I have added jetty-util-ajax Maven-package to https://github.com/afarber/jetty-newbie/blob/master/EmbWebsocketListener/pom.xml org.eclipse.jetty jetty-util-ajax 9.3.9.v20160517

Re: [jetty-users] ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory

2016-05-27 Thread Alexander Farber
After adding org.eclipse.jetty.websocket websocket-server ${jettyVersion} to my pom.xml (you can see all the files and error texts at

[jetty-users] ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory

2016-05-27 Thread Alexander Farber
Hello, I am trying to follow few Jetty 9 websocket tutorials ( like https://webtide.com/jetty-9-updated-websocket-api/ ) and run embedded Jetty with a custom WebSocketListener. 1) https://github.com/afarber/jetty-newbie/blob/master/EmbeddedWebsocket/src/main/java/de/afarber/MyListener.java -

Re: [jetty-users] Embedded Jetty example project in NetBeans 7 - how to stop?

2016-05-24 Thread Alexander Farber
No, I have tried 2 versions: 9.0.2.v20130417 and 9.3.9.v20160517 and unfortunately "mvn jetty:stop" is not known: mvn jetty:stop [INFO] Scanning for projects... Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml Downloading:

[jetty-users] Embedded Jetty example project in NetBeans 7 - how to stop?

2016-05-24 Thread Alexander Farber
Good evening, when I create the JettyMavenHelloWorld example in NetBeans 7 http://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html#configuring-embedded-jetty-with-maven and then run it by clicking the green run button in NetBeans IDE - it does not start for the 2nd time (the

Re: [GENERAL] Including SQL files

2016-03-21 Thread Alexander Farber
Thanks for your replies. While I use "\i" regularly I just didn't realize it would be suitable here as well :-) Regards Alex

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello Chris, On Wed, Mar 9, 2016 at 4:42 PM, Chris Travers <chris.trav...@gmail.com> wrote: > > > On Wed, Mar 9, 2016 at 1:10 PM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> >> what is please the most efficient way to delete a slice from

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello Mike, On Wed, Mar 9, 2016 at 2:42 PM, Mike Sofen wrote: > > Have you considered a normal (relational), non-array-based data model for this app (2 or 3 tables in a 1:M/M:M) instead of the single table model you’ve shown? That would then allow you to use normal sql

[GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello fellow PostgreSQL users, what is please the most efficient way to delete a slice from the start of a longer array (after I have copied it to another array)? Do I really have to copy a large slice of the array to itself, like in the last line here: pile_array := pile_array ||

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-08 Thread Alexander Farber
_subtract -- {A,B,C} (1 row) On Tue, Mar 8, 2016 at 2:28 PM, Alexander Farber <alexander.far...@gmail.com > wrote: > I could not find a solution neither > at http://postgres.cz/wiki/Array_based_functions > nor at https://github.com/JDBurnZ/postgresql-anyarray >

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-08 Thread Alexander Farber
Hello again, I could not find a solution neither at http://postgres.cz/wiki/Array_based_functions nor at https://github.com/JDBurnZ/postgresql-anyarray So I have written my own stored function to subtract one non-unique array from another (like swapping tiles in a word game): DROP FUNCTION IF

Re: [GENERAL] Subtract one array from another, both with non-unique elements

2016-03-06 Thread Alexander Farber
Thank you, but shouldn't I better use FOREACH for my task? On Sun, Mar 6, 2016 at 6:34 PM, bricklen <brick...@gmail.com> wrote: > On Sun, Mar 6, 2016 at 9:22 AM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> could someone please recommend the mos

[GENERAL] Subtract one array from another, both with non-unique elements

2016-03-06 Thread Alexander Farber
Hello, could someone please recommend the most efficient way subtracting elements of one array from the other in PostgreSQL 9.5? Should I create a new array or can I work on the existing one (and if the latter - will FOREACH work well when elements are removed "from under its feet"?). Both

Re: [GENERAL] Check constraints for varchar[] and varchar[][] columns in a table

2016-03-04 Thread Alexander Farber
Okay, let's call it <~ :-) On Fri, Mar 4, 2016 at 4:53 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Farber <alexander.far...@gmail.com> writes: > > I am trying to add CHECK constraints to the VARCHAR arrays: > > > hand1 varchar[7] NOT

[GENERAL] Check constraints for varchar[] and varchar[][] columns in a table

2016-03-04 Thread Alexander Farber
Hello, for a Scrabble-like word game using PostgreSQL 9.5 as backend I am trying to add CHECK constraints to the VARCHAR arrays: CREATE TABLE words_games ( gid SERIAL PRIMARY KEY, created timestamptz NOT NULL, player1 integer REFERENCES words_users(uid) ON DELETE CASCADE

Re: [GENERAL] How to ensure that a stored function always returns TRUE or FALSE?

2016-03-02 Thread Alexander Farber
Thank you all for the valuable replies. I've also got suggestions to use IS NOT DISTINCT FROM or STRICT at http://stackoverflow.com/questions/35742865/how-to-ensure-that-a-stored-function-always-returns-true-or-false but the former has the edge case of NULL=NULL returning TRUE and with the

Re: [GENERAL] How to ensure that a stored function always returns TRUE or FALSE?

2016-03-02 Thread Alexander Farber
uro...@gmail.com> wrote: > On 3/2/16, Alexander Farber <alexander.far...@gmail.com> wrote: > > > > CREATE OR REPLACE FUNCTION check_user( > > in_social integer, > > in_sid varchar(255), > > in_auth var

Re: [GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-02 Thread Alexander Farber
Thank you, this is very helpful, just 1 little question: Why do you write just EXCEPTION? Shouldn't it be RAISE EXCEPTION? Regards Alex On Wed, Mar 2, 2016 at 11:18 AM, Albe Laurenz <laurenz.a...@wien.gv.at> wrote: > Alexander Farber wrote: > > how to set such a savepoint ins

Re: [GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-02 Thread Alexander Farber
Andreas Kretschmer wrote: > >> Alexander Farber <alexander.far...@gmail.com> hat am 1. März 2016 um > 19:41 > >> geschrieben: > > >> in PostgreSQL 9.5 does RAISE EXCEPTION reliably rollback all previous > >> commands in a stored function? > > > > Yes. > > That is, unless you set a savepoint to which you can rollback. >

[GENERAL] How to ensure that a stored function always returns TRUE or FALSE?

2016-03-02 Thread Alexander Farber
Good morning, with the following stored function I would like to validate user data: CREATE OR REPLACE FUNCTION check_user( in_social integer, in_sid varchar(255), in_auth varchar(32)) RETURNS boolean AS $func$

[GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-01 Thread Alexander Farber
Good evening, in PostgreSQL 9.5 does RAISE EXCEPTION reliably rollback all previous commands in a stored function? I have a stored function (the code is at the bottom), which takes a JSON array of objects as arguments. First it prepares some data and then loops through the JSON array and

Re: [CentOS] Socket behavior change from 6.5 to 6.6

2015-01-16 Thread Alexander Farber
What about SO_LINGER at the Linux side, have you tried that? http://stackoverflow.com/questions/3757289/tcp-option-so-linger-zero-when-its-required On Fri, Jan 16, 2015 at 1:18 PM, Glenn Eychaner geycha...@mac.com wrote: Since you always use the same local port - maybe you need to set

Re: [CentOS] Socket behavior change from 6.5 to 6.6

2015-01-15 Thread Alexander Farber
Since you always use the same local port - maybe you need to set SO_REUSEADDR option. Greetings from Germany Alex ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: SDK 4.14 installer

2015-01-07 Thread Alexander Farber
Are there please any screenshot of flatspark available, besides https://github.com/akamud/FlatSpark ? On Wed, Jan 7, 2015 at 3:05 AM, Justin Mclean jus...@classsoftware.com wrote: The RELEASE_NOTES link I posted before was to the very latest in the develop branch which hasn't been released

[CentOS] Changing LANG from de_DE to en_US in CentOS 6

2014-12-21 Thread Alexander Farber
Hello, on a Macbook with OSX Yosemite (which prints de_DE.UTF-8 as value of $LANG in Terminal) and VmWare Fusion 7 I have installed CentOS 6.6 minimal. When I ssh to my new VM as root, the $LANG is de_DE.UTF-8 too. I would like it to be en_US.UTF-8 instead. I have grepped /etc and /root for

Re: [CentOS] Not To James B. Byrne

2014-11-14 Thread Alexander Farber
On Wed, Nov 12, 2014 at 4:46 PM, Kai Schaetzl mailli...@conactive.com wrote: That's ridiculous, you don't even know what's wrong or if it's wrong at all or what you want him to do but you have to cry it out loud to the list to put social pressure on him. No, actually it's more like you have to

[CentOS] To James B. Byrne

2014-11-11 Thread Alexander Farber
Dear James, everyday I look into my Gmail SPAM folder and your mails (sent to Centos list) are there. Noone else is there but you. Please finally fix your MX records or whatever is needed. No offence Greetings from Germany Alex ___ CentOS mailing list

Re: [CentOS] To James B. Byrne

2014-11-11 Thread Alexander Farber
intended. Just moral support meant. Valeri On Tue, November 11, 2014 10:16 am, Alexander Farber wrote: Dear James, everyday I look into my Gmail SPAM folder and your mails (sent to Centos list) are there. Noone else is there but you. Please finally fix your MX records or whatever is needed

Re: [CentOS] To James B. Byrne

2014-11-11 Thread Alexander Farber
Of couse I could explain my Gmail mailbox not move messages by James - but I assumed the person sending 3-4 messages daily to this mailing list might be asked to consider to fix his own settings (MX and http certificate). The Chrome warning for harte-lyne.ca looks dreadful by the way. Regards

Re: [CentOS] To James B. Byrne

2014-11-11 Thread Alexander Farber
Reindl, you should relax a bit. I didn't mean exactly MX, just meant a heads up to take a look at own configs. I like how you defend using a broken http cert. Regards Alex On Tue, Nov 11, 2014 at 7:42 PM, Reindl Harald h.rei...@thelounge.net wrote: Am 11.11.2014 um 19:34 schrieb Alexander

Re: [CentOS] Need help for issue with /etc/ppp/ip-down in Centos 6.4 64 bits

2014-09-01 Thread Alexander Farber
Have you tried: # fgrep -r ip-down /etc On Mon, Sep 1, 2014 at 11:35 AM, nampt2 nam_phamt...@yahoo.com wrote: I have question about /etc/ppp/ip-down What 's the script call this one when ppp interface down ? Or how can i check it's working ?

Re: [CentOS] Use postfix and spamd on CentOS 6 - looking for a shortest guide

2014-08-18 Thread Alexander Farber
Thanks Adam, it works for me now and I have summarized my setup at: http://serverfault.com/questions/619537/use-postfix-and-spamassassin-packages-on-centos-6-to-reject-spam-without-custo I don't see a reason to add a milter or amavis - because my server is idling. Regards Alex On Thu, Aug

Re: Use postfix and spamassassin packages on CentOS 6 to reject SPAM

2014-08-12 Thread Alexander Farber
On Tue, Aug 12, 2014 at 1:44 AM, Bill Cole postfixlists-070...@billmail.scconsult.com wrote: On 11 Aug 2014, at 10:22, li...@rhsoft.net wrote: http://serverfault.com/questions/619537/use-postfix- and-spamassassin-packages-on-centos-6-to-reject-spam-without-custo Also worth noting:

Re: Use postfix and spamassassin packages on CentOS 6 to reject SPAM

2014-08-12 Thread Alexander Farber
Hello again, On Tue, Aug 12, 2014 at 9:34 AM, Alexander Farber alexander.far...@gmail.com wrote: On 11 Aug 2014, at 10:22, li...@rhsoft.net wrote: http://serverfault.com/questions/619537/use-postfix- and-spamassassin-packages-on-centos-6-to-reject-spam-without-custo the point of my

<    1   2   3   4   5   6   7   8   9   10   >