Hi
I have developed application using HTML 5 Localstorage.
How can I create a TABLE and populate 10000+ rows before initializing my
HTML 5 enabled application.
Please suggest a pattern.
I was just looking into the source code of an existing project which uses nHibernate and found that there are interfaces created for each entity classes. E.g ICustomer for Customer class. I was just wondering what can be the advantage of this pattern as ICustomer contains mainly the properties and very few methods.
I need to get all characters between '(' and ')' chars.
var str = "dfgdgdfg (aaa.bbb) sfd (c) fdsdfg ( ,ddd (eee) )";
In this example, I need to get 3 strings:
(aaa.bbb)
(c)
( ,ddd (eee) )
What pattern I have to write? Please, help.
Is there a library that can be used for implementing undo/redo functionality for DOM element manipulations in JavaScript?
I'm writing an app that moves around DOM elements, enables editing and deletion of those elements. There are event-handlers and other objects associated with each element operated upon.
Not sure whether I need to roll my own implementation of the Command pattern for this. Surely, there must be something available? If not, suggestions and pointers would be a great help.
When searching online for object oriented concepts such as the composite design pattern I often found them represented in the LePUS3 notation. I am not really familiar with this
modeling language.
Is it something I should prefer over UML?
Could someone tell me what the purpose of inner classes are? Also when designing the iterator pattern do we have to use inner classes? Would it be better to use inner classes?
Hello, I have to get any text between:
Final-Recipient: RFC822; !HERE! Action
I need !HERE! from this example. There could be any string.
I tried something like:
$Pattern = '/Final-Recipient: RFC822; (.*) Action/';
But it doesn't work.
upd
Here is the string I'm trying to parse: http://dpaste.com/187638/
my pattern is the following:
{(code)}
where code is a number (up to 6 digits), or 2 letter followed by a number.
For example:
{(45367)}
{(265367)}
{(EF127012)}
I want to find all occurrences in a long string, I can't just use pure regex , because I need to preform some action when i find a match (like logging the position and the type of the match).
Is there a simple way to load test an asp.net application? I've been reading on some microsoft pattern and practices documents that tell you to use ACT which seems kind of hard to use for complex requests.
I need t check every line of a file for the following pattern:
- 14 Values seperated by an irregular number of spaces.
- Values may be negative (-), decimal seperator is a dot followed by maximum one digit
- The line ends with several spaces
here is an example line:
10015 20100501 1 4.6 6.4 8.4 10.5 86.6 4.0 13.0 0.9 6.4 0.0 1007.2
Thanks!
i.e. you must know the basic programming construction , data structures or whatever because i don't know the pattern how people use to make a big application or where do they start.
Is there a way to search all the open buffers for a particular pattern.
C-s interactively searches current buffer.
Similarly, is there something, that searches all the open buffers.
I know I can use "occur", but "Occur" brings a new buffer and changes/messes the buffer organization.
I am using MVC design pattern in jsp-servlet web application, and want to what is the exact difference between MVC1 and MVC2 , can someone help?
EDIT newly I hear that there is 2 versions of using MVC in servlet programming, I hear that in MVC1 there is kind of coupling between controller and view , but in MVC2 they overtake it, if someone know whether this is right or wrong I'll be very thankful.
How can I match the following pattern?
"anything123.anythingelse"
Alphanum of any length, with exactly 1 "." in the middle, and then alphanum of any length?
Thanks.
Hello all,
It seems that every project has an "util" module with various code snippets used throughout other files and which don't fit any particular pattern. I want to improve my "util" library, so please post here the most useful class / function / macro that you use in all your C/C++ projects. Please keep the entries small (under 100 lines) and give only one example per post.
Thank you.
I have the following piece of code:
root="//valueExpression[matches(self::*,'pattern')]/.."
But I can only use XPath 1.0 and I get an exception for the function matches(). Can you please help me with a solution using only functions from XPath 1.0 ?
I started a project and added it to hg, but I want to take *.cs file under version control only, so,i have to add bin, obj, sln, suo,_resharper folder etc to ignore pattern, ,how to let hg only monitor certain kind of file like white list? How to do that in Subversion?
I am trying to get the number of active connections (Real Time) from a log file by IP connected and having a Play status but instead, it's giving me the total number of IP with status play. The number doesn't decrease at all. Keeps on increasing as soon as a new ip is added. How can I fix it? Here my code:
$stringToParse = file_get_contents('wowzamediaserver_access.log');
preg_match_all('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $stringToParse, $matchOP);
echo "Number of connections: ".sizeof(array_unique($matchOP[0]));
HERE IS THE LOG:
2013-10-30 14:54:36 CET stop stream INFO 200 account1 - _defaultVHost_ account1 _definst_ 149.21 streamURL 1935 fullStreamURL IP_ADDRESS_1 http (cupertino) -
2013-10-30 14:56:12 CET play stream INFO 200 account2 - _defaultVHost_ account1 _definst_ 149.21 streamURL 1935 fullStreamURL IP_ADDRESS_2 rtmp (cupertino) -
2013-10-30 14:58:23 CET stop stream INFO 200 account2 - _defaultVHost_ account1 _definst_ 149.21 streamURL 1935 fullStreamURL IP_ADDRESS_2 rtmp (cupertino) -
2013-10-30 14:58:39 CET play stream INFO 200 account1 - _defaultVHost_ account1 _definst_ 149.21 streamURL 1935 fullStreamURL IP_ADDRESS_1 http (cupertino) -
2013-10-30 14:59:12 CET play stream INFO 200 account2 - _defaultVHost_ account1 _definst_ 149.21 streamURL 1935 fullStreamURL IP_ADDRESS_2 rtmp (cupertino) -
I want to be able to count the IP whenever it has a "PLAY" status and don't count it whenever it's "STOP"
2013-10-30 14:59:00 CET play stream INFO 200 tv2vielive - _defaultVHost_ tv2vielive _definst_ 0.315 [any] 1935 rtmp://tv2vie.zion3cloud.com:1935/tv2vielive 78.247.255.186 rtmp http://www.tv2vie.org/swf/flowplayer-3.2.16.swf WIN 11,7,700,202 92565864 3576 3455 1 0 0 0 tv2vielive - - - - - rtmp://tv2vie.zion3cloud.com:1935/tv2vielive/tv2vielive rtmp://tv2vie.zion3cloud.com:1935/tv2vielive/tv2vielive - rtmp://tv2vie.zion3cloud.com:1935/tv2vielive -
2013-10-30 14:59:04 CET stop stream INFO 200 tv2vielive - _defaultVHost_ tv2vielive _definst_ 4.75 [any] 1935 rtmp://tv2vie.zion3cloud.com:1935/tv2vielive 78.247.255.186 rtmp http://www.tv2vie.org/swf/flowplayer-3.2.16.swf WIN 11,7,700,202 92565864 3576 512571 1 7222 0 503766 tv2vielive - - - - - rtmp://tv2vie.zion3cloud.com:1935/tv2vielive/tv2vielive rtmp://tv2vie.zion3cloud.com:1935/tv2vielive/tv2vielive - rtmp://tv2vie.zion3cloud.com:1935/tv2vielive -
Any solutions? I have even tried the first answer solution but getting "0" play connections.
$stringToParse = file_get_contents('wowzamediaserver_access.log');
$pattern = '~^.* play.* ( ([0-9]{1,3}+\.){3,3}[0-9]{1,3}).*$~m';
preg_match_all($pattern, $stringToParse, $matches);
echo count($matches[1]) . ' play actions';
But whenever I use my code, I am getting "Number of connections: xxxxx(actual count of IPs).
My concern is that I only need the count of IPs with PLAY status. If that IP changes to STOP then it wont count.
I need to get all characters between '(' and ')' chars.
var str = "dfgdgdfg (aaa.bbb) sfd (c) fdsdfg ( ,ddd (eee) )";
In this example, I need to get 3 strings:
(aaa.bbb)
(c)
( ,ddd (eee) )
What pattern I have to write? Please, help.
I saw this on a screencast and couldn't figure out what it was. Reference sheets just pile it in with other operators as a general pattern match operator.
What is the best way to find the period in a repeating list?
For example:
a = {4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2}
has repeat {4, 5, 1, 2, 3} with the remainder {4, 5, 1, 2} matching, but being incomplete.
The algorithm should be fast enough to handle longer cases, like so:
b = RandomInteger[10000, {100}];
a = Join[b, b, b, b, Take[b, 27]]
The algorithm should return $Failed if there is no repeating pattern like above.
Given the following text:
This is!!xa simple string!xpattern
I would like to get a regexp that matches the !x that's between "string" and "pattern" but not !!xa that's between "is" and "a".
This regexp is to be used inside a string split().
I have tried several combinations but I cannot get a regexp that meets my needs. Perhaps my expression is not so regular after all =)
Thanks in advance!
hello i have question suppose code is given like this
pattern_mask[pattern[i]] &= ~(1UL << i);
it doesnot matters other i am interesetd only 1UL here what kind of type is this in java?
1UL how implement in java?
It seems that every project has an "utility" module with various code snippets used throughout other files and which don't fit any particular pattern.
What utility classes, functions, and macros do you find most useful in your C/C++ projects? Please keep the entries small (under 100 lines) and give only one example per post.
The last time I worked with Zend_Db I recall I used to write SQL Queries manually. I've been searching for some ORM application, but, since I read something like Zend_Db is also capable of doing so, I started to try it, but I can't find neither a good tutorial explain it or a good documentation.
I read something lake Gateway pattern and ModelMapper class but I can't figure it out.
Can someone shine my path? :P