Best unofficial Apache Server developers community |
| |||||
| Jul 5, 2010 | |||||
|
Deven You |
|
||||
| Tags: | |||||
Similar Threads
Ask a question about regex in CRS
Hi, everyone
The following rule comes from
rules/base_rules/modsecurity_crs_41_sql_injection_attacks.conf , but I
don't understand what does the regular expression "(?:[\\\(\)\%#]|--)"
mean. What's the meaning of "\%" in a regex?
SecRule MATCHED_VAR "(?:[\\\(\)\%#]|--)"
"t:none,setvar:'tx.msg=%{rule.msg}',setvar:tx.sql_injection_score=+%{tx.critical_anomaly_score},setvar:tx.anomaly_score=+%{tx.critical_anomaly_score},setvar:tx.%{rule.id}-WEB_ATTACK/SQL_INJECTION-%{matched_var_name}=%{tx.0}"
Android
This is a multi-part message in MIME format. Anyone tried a derby database on android? I need to look at this shortly but if it is a definite "does not work" then you will save me some time. Thanks Paul
Re: Android
On 23.06.10 15:03, Paul French wrote: Anyone tried a derby database on android? I need to look at this shortly but if it is a definite “does not work” then you will save me some time. Hi, I think you're out of luck for now, at least if you want this to be an easy ride :) See DERBY-4458 [1]. Regards, [1] https://issues.apache.org/jira/browse/DERBY-4458 Thanks Paul
Android?
Hi All, I saw the recent news/video and other links of couchdb running on android but nothing regarding how to get the source/build itself. Is that available for testing? Robert
Using Regex
All,
I am using pig embedded in Java and need to use matches in my pig job.
However when I try to use escape characters in the pig line, the
compiler complains. How do I use complex regex while embedding?
Sample code that is throwing errors:
myServer.registerQuery("filtered = FILTER firstcut BY dIP matches
'\Q34.21.12.*\E';");
error: invalid escape sequence.
Thanks,
Matt
STA: Statistical Toolbox for Android
Dear community, I have made a small statistical application for Android-phones and would appreciate if anybody have comments. The program is found by searching on STA on the Android Market (it is free). As mentioned, the application is for statistical purposes, and so far only a few basic tools are available (distribution tool for density plot, cumulative probabilities, quantiles, and samples and a few descriptives for a dataset). The next features that I have planned is to include statistical tests (independent t, pairred t etc.). If anybody have comments, please do not hesitate :-). Both feature requests, general comments, and criticism are welcome! And, oh yeah, it is (of course) using Apache Commons Math :-). Cheers, Mikkel.
android compilation problems?
Has anybody compiled the scxml library to work on android? If so, would it be possible for someone to make the compiled jar files with the modified code to work on android available (as described here: http://commons.apache.org/scxml/useca...h-on-android.html ) and send it to me? I only ask because I assume that whoever wrote the tutorial has a compiled version lying around somewhere. I'm trying to implement the library on android and am running across a lot of issues. (not at my home computer right now so sorry I'm not very specific)
couchdb android unusable?
Hi,
So I installed this morning couchdb on my nexus one from the market
place . There are a lot of problem currently that I'm afraid make it
unusable :
- cache. The browser seem to agrressivly cache all data. So I couldn't
create a user at first without clearing cache and cookies. The same
when logged, futon don't recognize the cookie.
- problem with utf8. It seem I can't create any doc nor replicate.
Replication give in logs :
[Wed, 28 Jul 2010 11:08:39 GMT] [error] [<0.400.0>] attempted upload
of invalid JSON
{"source":"http://192.168.1.1/afgwar","target":"afgwar"}
This is ajust a quick report. Will try more later. Also are the build
instructions available somewhere ?
- benoit
Using variables in regex
Well, how do I use the content of a variable in regex?
$username = "user1"
file { "userdata.tar.bz2":
source => "puppet://$server/modules/$module/
userdata.tar.bz2",
ensure => $users ? {
/$username/ => absent,
default => present,
},
}
$users is a custom fact that contains all local users:
users => at avahi bin daemon dnsmasq ftp games haldaemon lp mail
messagebus nobody ntp polkituser postfix pulse root sshd suse uuidd
wwwrun man news uucp puppet user1
When I hardcode "user1" into the regex my test works fine and the file
is removed.
But things like /$variable/ or /\$variable/ or /#{variable}/ just
don't work.
Is it even possible in version 0.25.4?
Issues with Node Regex
I am trying to match groups of nodes - i.e.
Node: synd1-path2.path2.some.domain
Node: synd2-path2.path2.some.domain
By using either of the node definitions below:
node /^synd\w+\.path2\.some\.domain$/ {
include ibapps
include db
}
Using Regex in Embedded Pig in Java
All,
I am using pig embedded in Java and need to use matches in my pig job.
However when I try to use escape characters in the pig line, the
compiler complains. How do I use complex regex while embedding?
Sample code that is throwing errors:
myServer.registerQuery("filtered = FILTER firstcut BY dIP matches
'\Q34.21.12.*\E';");
error: invalid escape sequence.
Thanks,
Matt
client-side password validation using regex
Hi all,
I was wondering if it's possible to validate a <html:password> field
on client-side by using a regular expression.
A look at validateMask.js told me that the only field types supported are
'hidden', 'text', 'textarea' and 'file'.
Code:
if ((field.type == 'hidden' ||
field.type == 'text' ||
field.type == 'textarea' ||
field.type == 'file') &&
(field.value.length > 0)) {
if (!jcv_matchPattern(field.value, oMasked[x][2]("mask")))
{
if (i == 0) {
focusField = field;
}
fields[i++] = oMasked[x][1];
isValid = false;
}
}
Is this the exspected behavior? Is there any reason for not supporting
'password' fields?
If so, how would I validate a password field by using a regex (without
changing the js file on my own :))?
Cheers,
Ref. 324 * Geoinformationszentrum
Tel. 0211 9449-6310 * Fax: 0211 9449-6610
Email: stephan.### @it.nrw.de<mailto:stephan.k### @it.nrw.de>
Created: (HIVE-1483) Update AWS S3 log format deserializer regex
Update AWS S3 log format deserializer regex
Re: JSP 2.2 & EL 2.2 implementation complete
I tried to download the el-api2.2 jar from GlassFish. and it doesn't work. see my thread here: http://old.nabble.com/using-new-el-ap...6-ts28649111.html could you please help? Mark Thomas wrote: The subject says it all really. Still no sign of the TCK so there are probably some bugs in my understanding/interpretation of the spec. Mark
Re: JiBX databinding implementation
Nilupa Bandara wrote: Hello Everyone, The code that I've written so far is available at[1], [2] and it for simple data types. I've used the Axis2 JiBX implementation as guide and now I am working on implementing the complex data type support. I haven't had a chance to look at this in any detail, but I suspect you may be going off track. The Axis2 support uses code generation of the actual stub code called by the client to access the server, and the message receiver code on the server side which calls the service method. The simple data type support comes in when unwrapping a request message from the WSDL to pass the child elements as method parameters. From what I understand of CXF's implementation it always uses a wrapper class that matches the actual request or response message element (which is the content of the SOAP Body element), and handles converting this into method parameters with shared logic. So you shouldn't need to work with the simple data types at all. What I'd think you would need to work on would be handling the actual JiBX conversions to and from the SOAP Body. I've tried taking a look at the XMLBeans support in CXF to see if I could get a handle on how this needs to be done, but I find the code hard to follow with the only comments brief one-liners on interface method definitions. So here's my take on how I think this should work, and perhaps Dan or someone else can help match this up with the CXF structure. To start with, you need to have some sort of configuration which tells you how to access the JiBX binding factory. JiBX is very flexible in how it handles bindings, including allowing multiple bindings of the same class to different XML representations. Each binding has an associated factory class used to work with that binding at runtime. You load a binding factory using the methods in org.jibx.runtime.BindingDirectory, which work with several variations of parameters: 1. by the binding name and base Java package in the binding 2. by the binding name and one of the classes mapped in that binding 3. by one of the classes mapped in the binding (if that class is only involved in one binding). You can pass a classloader to the first two variations, to specify where the classes can be found. If you don't supply a classloader, the BindingDirectory does its best to find things using the classloader which loaded the class you pass in (if using a class) or the classloader which loaded the BindingDirectory class (if using package name lookup). Binding factories are thread-safe and can be cached once you've found them. When handling input, you need to start with the XMLStreamReader positioned at the start tag of the message element (the child of the SOAP Body element). You create an unmarshalling context instance from the binding factory which you'll use for unmarshalling the data. This is an interface, but for your purposes you'll need to cast it to the actual implementation class org.jibx.runtime.impl.UnmarshallingContext and use the setDocument() method which takes an IXMLReader instance. You create the IXMLReader instance from your existing XMLStreamReader using the org.jibx.runtime.impl.StAXReaderWrapper constructor. You should be able to just call the unmarshalElement() method of the unmarshalling context and get back the unmarshalled instance. It looks like you've figured out much of this, but I wanted to spell it out to help you understand the sequence. From your stack trace it appears you're calling parseElementText(), which is definitely not what you want to use - this just returns text content for an element with no child elements. Handling output is a little different You first create a marshalling context, then a org.jibx.runtime.impl.StAXWriter using the constructor which takes an XMLStreamWriter (for the namespace URIs, just pass an array with the two required values listed in the method JavaDocs), and set the StAXWriter on the marshalling context. Then cast the object you're going to marshal to the org.jibx.runtime.IMarshallable interface (which is added to each mapped class by the JiBX binding compiler) and call the marshal() method defined by this interface. Hope this gets you further. Keep us posted on this list and I'll try to provide pointers whenever you run into problems. Once the basic JiBX runtime support is working we can discuss how to integrate JiBX code generation from schema, but I think the basic runtime support is the most important step. - Dennis
Lucene CassandraDirectory Implementation
Hi All, I was browsing through the Lucene JIRA and came across the issue named "A Column-Oriented Cassandra-Based Lucene Directory" at https://issues.apache.org/jira/browse/LUCENE-2456 Has anyone had a chance to test it? If so, do you think it's an efficient implementation as a replacement for the FSDirectory? Best Regards, Utku
Avro RPC implementation using Netty
hi, I have implemented the Avro RPC Server and Transceiver using Netty. If anyone is interested in it, you can look at http://github.com/coolwhy/avro-rpc-on-netty. Any suggestion is welcome. Thanks! - harry
Re: JiBX databinding implementation
On Friday 21 May 2010 8:57:32 pm Nilupa Bandara wrote: Hello Everyone, The code that I've written so far is available at[1], [2] and it for simple data types. I've used the Axis2 JiBX implementation as guide and now I am working on implementing the complex data type support. However there seems to be an error when we present the XMLSteramReader obtained form CXF runtime to JiBX UnmashallingContext which needs work on process a part of an XML document not as a whole. However when we present an XMLStreamRead from which it can read the desired element as a whole document it seems to work.[4]. I suspect this is a bug in JiBX framework and I am willing to hear expert advice on this. Not really sure what to suggest on this. I know with XMLBeans in JAX-RS, we did have some issues if the XMLStreamReader wasn't positioned exactly where it wanted to be. I think XMLBeans didn't want the start doc events or something so had to make sure it was "next" beyond that. I would try fiddling with the stream reader in your standalone "full document" case to see if you can get it the same state as CXF presents it to see if that reproduces it and then kind of reverse you changes to see what may be doable to fix how CXF calls into JiBX. Dan Any suggestions, advice and tips will be much appreciated !! Thanks & Regards, Nilupa [1] http://github.com/nilupa/cxf [2] http://github.com/nilupa/cxf/tree/trunk/rt/databinding/jibx/ [3] Error output: ava.lang.ArrayIndexOutOfBoundsException: Attempt to peek past end of stack at org.jibx.runtime.IntStack.peek(IntStack.java:231) at org.jibx.runtime.IntStack.peek(IntStack.java:245) at org.jibx.runtime.impl.StAXReaderWrapper.endTag(StAXReaderWrapper.java:159) at org.jibx.runtime.impl.StAXReaderWrapper.nextToken(StAXReaderWrapper.java:18 2) at org.jibx.runtime.impl.UnmarshallingContext.accumulateText(UnmarshallingCont ext.java:840) at org.jibx.runtime.impl.UnmarshallingContext.parseContentText(UnmarshallingCo ntext.java:874) at org.jibx.runtime.impl.UnmarshallingContext.parseElementText(UnmarshallingCo ntext.java:936) at org.apache.xcf.jibx.JibxDataReader.read(JibxDataReader.java:57) at org.apache.xcf.jibx.JibxDataReader.read(JibxDataReader.java:1) at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInte rceptor.java:251) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteral InInterceptor.java:127) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai n.java:243) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO bserver.java:110) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jet tyHTTPDestination.java:313) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTT PDestination.java:277) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandle r.java:70) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol lection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java :930) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409 ) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:58 2) [4] Work around JibxDataReader.java : line 90 try { reader = StaxUtils.createXMLStreamReader(StaxUtils.read(reader)); } catch (Exception e) { throw new RuntimeException(e); } On Fri, Apr 30, 2010 at 11:30 AM, Nilupa Bandara <nilupa.ma### @gmail.com > wrote: > > Hi, > > At the moment, I am running the sample Web services in debug mode just to > get a deeper understanding of how the cxf data > > binding architecture works at runtime. I am also planning to look at how > > its done for Axis2 and perhaps we might be able to reuse some of that > code there. As soon as I have something concrete, will post it to this > mailing list. > > Thanks & Best Regards, > Nilupa > > On Fri, Apr 30, 2010 at 2:00 AM, Dennis Sosnoski <dm### @sosnoski.com> wrote: >> I'm curious how the JiBX databinding GSoC project is progressing... >> anything to discuss yet? >> >> JiBX is pretty flexible in how it reads and writes XML, with its own >> org.jibx.runtime.IXMLReader and IXMLWriter interfaces used to decouple >> from the details of the parser and writer. Implementations of these >> interfaces are supplied for working with StAX XMLStreamReader and >> XMLStreamWriter, and the existing Axis2 support for JiBX should be a >> good guide for fitting the actual runtime hooks together. >> >> Just to make sure I understand how this works, JAX-WS configuration can >> be used with any type of org.apache.cxf.databinding.DataBinding >> implementation, right? So someone wanting to use JiBX with a JAX-WS >> frontend would just need to specify this using their preferred >> configuration technique (such as cxf-client.xml on the client side). >> >> Thanks, >> >> - Dennis
DO NOT REPLY IteratedValueExpression and IndexedValueExpression implementation
https://issues.apache.org/bugzilla/show_bug.cgi?id=49542
Henri Yandell <baya### @apache.org> changed:
What |Removed |Added
Question on Objective-C
Jul 25, 2010 Question regarding folder redirect Jun 1, 2010 Apache License question Jul 14, 2010 Question about .htaccess (*.jpg file redirect) - ~80k hit per day Jun 5, 2010 | |||||
(33 lines) Jul 7, 2010 11:56
(88 lines) Jul 7, 2010 13:08
(1 lines) Jul 9, 2010 03:59