Search Results

Search found 5211 results on 209 pages for 'named'.

Page 13/209 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • named groups splitting regardless of position of match

    - by jeremy
    Having a hard time explaining what I mean, so here is what I want to do I want any sentenced to be parsed along the pattern of text #something a few words [someothertext] for this, the matching sentence would be Jeremy is trying #20 times to [understand this] And I would name 4 groups, as text, time, who, subtitle However, I could also write #20 Jeremy is trying [understand this] times to and still get the tokens #20 Jeremy is trying times to understand this corresponding to the right groups As long as the delimited tokens can separate the 2 text only tokens, I'm fine. Is this even possible? I've tried a few regex's and failed miserably (am still experimenting but finding myself spending way too much time learning it)

    Read the article

  • Named Function Expressions in IE, part 2

    - by Polshgiant
    I asked this question a while back and was happy with the accepted answer. I just now realized, however, that the following technique: var testaroo = 0; (function executeOnLoad() { if (testaroo++ < 5) { setTimeout(executeOnLoad, 25); return; } alert(testaroo); // alerts "6" })(); returns the result I expect. If T.J.Crowder's answer from my first question is correct, then shouldn't this technique not work?

    Read the article

  • vestal_versions : problem with column named changes

    - by arkannia
    Hi, I am working with vestal version for 2 months. Everything was fine until this afternoon. I didn't done anything special(or i don't remembered...) but the code works fine on others computers... The problem is that i'm not able to save my model anymore: rails give me this error : ActiveRecord::DangerousAttributeError: changes is defined by ActiveRecord changes field is by default an activerecord method. With the console, the message is the next : ActiveRecord::DangerousAttributeError: changes is defined by ActiveRecord Here are my local gem files: abstract (1.0.0) actionmailer (3.0.0.beta3) actionpack (3.0.0.beta3) activemodel (3.0.0.beta3) activerecord (3.0.0.beta3) activeresource (3.0.0.beta3) activesupport (3.0.0.beta3) arel (0.3.3) builder (2.1.2) bundler (0.9.25, 0.9.24) crack (0.1.7) erubis (2.6.5) god (0.9.0) haml (3.0.1, 2.2.23) i18n (0.3.7) mail (2.2.0) memcache-client (1.8.3) memcached (0.17.7) mime-types (1.16) polyglot (0.3.1) rack (1.1.0) rack-mount (0.6.3) rack-test (0.5.3) rails (3.0.0.beta3) railties (3.0.0.beta3) rake (0.8.7) savon (0.7.8, 0.7.6) text-format (1.0.0) text-hyphen (1.0.0) thor (0.13.6, 0.13.4) treetop (1.4.5) tzinfo (0.3.20) And here my Gemfile source 'http://gemcutter.org' gem "rails", "3.0.0.beta3" gem "will_paginate", "3.0.pre" #gem 'nokogiri' #gem 'curb' #gem 'handsoap' gem 'savon' gem 'mysql' gem 'haml', '2.2.23' #gem 'haml', '3.0.1' gem 'hpricot' gem 'i18n', '> 0.3.5' gem 'i18n_routing' gem 'i18n_auto_scoping' gem 'handler301', :git => 'http://github.com/kwi/handler301.git' gem 'seo_meta_builder' gem 'vestal_versions' #gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git', :branch => 'rails3' ## Bundle edge rails: gem "rails", :git => "git://github.com/rails/rails.git" ## Bundle the gems you use: # gem "bj" # gem "hpricot", "0.6" # gem "sqlite3-ruby", :require => "sqlite3" # gem "aws-s3", :require => "aws/s3" ## Bundle gems used only in certain environments: # gem "rspec", :group => :test # group :test do # gem "webrat" # end If you have any suggestions to solve this issue, i'll be glad to hear them ! Thanks

    Read the article

  • What are 'len', 'dir', 'vars' named?

    - by johannix
    I was wondering what language to use when talking about a function that takes in a specific object, acts on it and returns something else. Clearly they're functions, but I was wondering if there's a more specific term. A couple examples of Python built-in functions that fit this spec are: 'len', 'dir', 'vars' I thought it was 'predicate', but apparently that's specific to functions that return a boolean value.

    Read the article

  • Visual Studio expression containing a term named "by" cannot be evaluated in the watch window

    - by Andrei Pana
    Consider my C++ code below: int _tmain(int argc, _TCHAR* argv[]) { int by = 10; printf("%d\n", by); int bx = 20; printf("%d\n", (by + bx)); return 0; } which works fine. The funny thing is with the "by" variable. If I try to add a watch for a simple expression that contains by, the result will be CXX0030: Error: expression cannot be evaluated. For example, on a breakpoint on return 0, if I add the following watches I get the results mentioned: by : 10 bx : 20 by + 5 : CXX0030: Error: expression cannot be evaluated bx + 5 : 25 by + bx : CXX0030: Error: expression cannot be evaluated (by) + bx : 30 by + (bx) : CXX0030: Error: expression cannot be evaluated bx + (by) : CXX0014: Error: missing operrand This happens on VS2010, VS2008 on multiple computers. So, more out of curiosity, what is happening with "by"? Is it some kind of strange operator? Why doesn't bx get the same treatment? (I've tried google on this but it is quite difficult to get some relevant hits with terms like "by")

    Read the article

  • ERROR! (Using Excel's named ranges from C#)

    - by mcoolbeth
    In the following, I am trying to persist a set of objects in an excel worksheet. Each time the function is called to store a value, it should allocate the next cell of the A column to store that object. However, an exception is thrown by the Interop library on the first call to get_Range(). (right after the catch block) Does anyone know what I am doing wrong? private void AddName(string name, object value) { Excel.Worksheet jresheet; try { jresheet = (Excel.Worksheet)_app.ActiveWorkbook.Sheets["jreTemplates"]; } catch { jresheet = (Excel.Worksheet)_app.ActiveWorkbook.Sheets.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing); jresheet.Visible = Microsoft.Office.Interop.Excel.XlSheetVisibility.xlSheetVeryHidden; jresheet.Name = "jreTemplates"; jresheet.Names.Add("next", "A1", true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); } Excel.Range cell = jresheet.get_Range("next", Type.Missing); cell.Value2 = value; string address = ((Excel.Name)cell.Name).Name; _app.ActiveWorkbook.Names.Add(name, address, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); cell = cell.get_Offset(1, 0); jresheet.Names.Add("next", ((Excel.Name)cell.Name).Name, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); }

    Read the article

  • Reverse lookup SERVFAIL

    - by Quan Tran
    I just set up a DNS server and a web server using Virtualbox. The IP address of the DNS server is 192.168.56.101 and the web server 192.168.56.102. Here are my configuration files for the DNS server: named.conf: // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; //query-source address * port 53; //forward first; forwarders { 8.8.8.8; 8.8.4.4; }; listen-on port 53 { 127.0.0.1; 192.168.56.0/24; }; allow-query { localhost; 192.168.56.0/24; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; }; logging { channel default_debug { file "data/named.run"; severity debug 10; print-category yes; print-time yes; print-severity yes; }; }; zone "quantran.com" in { type master; file "named.quantran.com"; }; zone "56.168.192.in-addr.arpa" in { type master; file "named.192.168.56"; allow-update { none; }; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; named.quantran.com: $TTL 86400 quantran.com. IN SOA dns1.quantran.com. root.quantran.com. ( 100 ; serial 3600 ; refresh 600 ; retry 604800 ; expire 86400 ) IN NS dns1.quantran.com. dns1.quantran.com. IN A 192.168.56.101 www.quantran.com. IN A 192.168.56.102 named.192.168.56: $TTL 86400 $ORIGIN 56.168.192.in-addr.arpa. @ IN SOA dns1.quantran.com. root.quantran.com. ( 100 ; serial 3600 ; refresh 600 ; retry 604800 ; expire 86400 ) ; minimum IN NS dns1.quantran.com. 101.56.168.192.in-addr.arpa. IN PTR dns1.quantran.com. 102 IN PTR www.quantran.com. When I try a normal lookup from the host (I configured so that the only nameserver the host uses is the DNS server 192.168.56.101): quan@quantran:~$ host www.quantran.com www.quantran.com has address 192.168.56.102 quan@quantran:~$ host dns1.quantran.com dns1.quantran.com has address 192.168.56.101 But when I try a reverse lookup: quan@quantran:~$ host -v 192.168.56.101 192.168.56.101 Trying "101.56.168.192.in-addr.arpa" Using domain server: Name: 192.168.56.101 Address: 192.168.56.101#53 Aliases: Host 101.56.168.192.in-addr.arpa not found: 2(SERVFAIL) Received 45 bytes from 192.168.56.101#53 in 0 ms quan@quantran:~$ host -v 192.168.56.102 192.168.56.101 Trying "102.56.168.192.in-addr.arpa" Using domain server: Name: 192.168.56.101 Address: 192.168.56.101#53 Aliases: Host 102.56.168.192.in-addr.arpa not found: 2(SERVFAIL) Received 45 bytes from 192.168.56.101#53 in 0 ms So why can't I perform a reverse lookup? Anything wrong with the zone configuration files? Thanks in advance :) Oh, here is the output from the log file /var/named/data/named.run when I perform the reverse lookup: quan@quantran:~$ host 192.168.56.102 192.168.56.101 Using domain server: Name: 192.168.56.101 Address: 192.168.56.101#53 Aliases: Host 102.56.168.192.in-addr.arpa not found: 2(SERVFAIL) /var/named/data/named.run: 02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: UDP request 02-Jun-2014 15:18:11.950 client: debug 5: client 192.168.56.1#51786: using view '_default' 02-Jun-2014 15:18:11.950 security: debug 3: client 192.168.56.1#51786: request is not signed 02-Jun-2014 15:18:11.950 security: debug 3: client 192.168.56.1#51786: recursion available 02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: query 02-Jun-2014 15:18:11.950 client: debug 10: client 192.168.56.1#51786: ns_client_attach: ref = 1 02-Jun-2014 15:18:11.950 query-errors: debug 1: client 192.168.56.1#51786: query failed (SERVFAIL) for 102.56.168.192.in-addr.arpa/IN/PTR at query.c:5428 02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: error 02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: send 02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: sendto 02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: senddone 02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: next 02-Jun-2014 15:18:11.951 client: debug 10: client 192.168.56.1#51786: ns_client_detach: ref = 0 02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: endrequest 02-Jun-2014 15:18:11.951 client: debug 3: client @0xb537e008: udprecv Also, I made some changes to the log section in named.conf.

    Read the article

  • Next, Previous Records Using Named Scope

    - by keruilin
    I have a model for which I want to retrieve the next record(s) and previous record(s). I want to do this via a named_scope on the model, and also pass in as an argument the X number of next/previous records to return. For example, let's say I have 5 records: Record1 Record2 Record3 Record4 Record5 I want to be able to call Model.previous or Model.previous(1) to return Record2. Similarly, I want to be able to call Model.next or Model.next(1) to return Record4. As another example I want to be able to call Model.previous(2) to return Record3. I think you get the idea. How can I accomplish this?

    Read the article

  • Combining Searchlogic named scopes with OR

    - by jaycode
    Is something like this possible? Product.price_greater_than(10000).or_tags_name_equals('luxury') The wiki doesn't help much on this... I saw in the wiki: User.id_or_age_lt_or_username_or_first_name_begins_with(10) => "id < 10 OR age < 10 OR username LIKE 'ben%' OR first_name like'ben%'" I really don't get that, how in the world did "ben" comes up??? could anyone help please?

    Read the article

  • add method to reflection-object and named-scopes

    - by toy
    I Like to add a method to my has_many relation in the way that it is applyed on the relation object. I got an Order wich :has_many line_items I like to write things like order.line_items.calculate_total # returns the sum of line_items this I could do with: :has_many line_items do def calculate_total ... end end but this would not be applyed to named_scopes like payalbes_only: order.line_items.payables_only.calculate_total here calculate total would receive all line_items of order and not the scoped ones from payables_only-scope. My log tells me that the paybles_only scope is even not applied to the sql.

    Read the article

  • Spring - singleton problem - No bean named '....' found

    - by lisak
    Hey, I can't figure out what is wrong with this beans definition. I'm getting this error http://pastebin.com/ecn5SWLa . Especially the 14th log message is interesting. This is my app-context file http://pastebin.com/dreubpRY httpParams is a singleton which is set up in httpParamBean and then used by tsccManager and httpClient. The various depends-on settings is a result of my effort to figure it out.

    Read the article

  • Python named print?

    - by Mark
    I know it's a really simple question, but I have no idea how to google it. how can I do print '<a href="%s">%s</a>' % (my_url) So that my_url is used twice? I assume I have to "name" the %s and then use a dict in the params, but I'm not sure of the proper syntax? just FYI, I'm aware I can just use my_url twice in the params, but that's not the point :)

    Read the article

  • get xml attribute named xlink:href using xsl

    - by awe
    How can I get the value of an attribute called xlink:href of an xml node in xsl template? I have this xml node: <DCPType> <HTTP> <Get> <OnlineResource test="hello" xlink:href="http://localhost/wms/default.aspx" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" /> </Get> </HTTP> </DCPType> When I try the following xsl, I get an error saying "Prefix 'xlink' is not defined." : <xsl:value-of select="DCPType/HTTP/Get/OnlineResource/@xlink:href" /> When I try this simple attribute, it works: <xsl:value-of select="DCPType/HTTP/Get/OnlineResource/@test" />

    Read the article

  • Python regular expressions assigning to named groups

    - by None
    When you use variables (is that the correct word?) in python regular expressions like this: "blah (?P\w+)" ("value" would be the variable), how could you make the variable's value be the text after "blah " to the end of the line or to a certain character not paying any attention to the actual content of the variable. For example, this is pseudo-code for what I want: >>> import re >>> p = re.compile("say (?P<value>continue_until_text_after_assignment_is_recognized) endsay") >>> m = p.match("say Hello hi yo endsay") >>> m.group('value') 'Hello hi yo' Note: The title is probably not understandable. That is because I didn't know how to say it. Sorry if I caused any confusion.

    Read the article

  • How should platform specific lib files be named?

    - by Scott Langham
    Hello, I'm working on a C++ project that produces a lib that other teams use. It's being produced in a few different flavours: Win32 Debug Win32 Debug Static Win32 Release Win32 Release Static x64 Debug x64 Debug Static x64 Release x64 Release Static I'm wondering what the best wisdom is on how to name the dlls and what arguments are for different naming conventions. Do I output the libs into different directories, or do I append some letters on the end of the lib to differentiate them, or something else? One concern is that if I use directories, but don't give all the libs different names, users of the library will have problems where they accidentally use the wrong lib. Are these concerns valid? Thanks very much.

    Read the article

  • Howto create dynamic named folders with Maven2 Archetype?

    - by chrsk
    Hey, i try to build a structure like this +---src +---main +---webapp +---WEB-INF +---cfg ¦ +---log4j ¦ +---resources ¦ +---extensions ¦ +---${artifactIdKey}-business ¦ +---${artifactIdKey}-layout +---lib I added a required property to my archetype-metadata.xml to have an short-name for the project, which is used among other things for generating unique folders. <requiredProperties> <requiredProperty key="artifactIdKey" /> </requiredProperties> The property artifactIdKey i use in a fileSet: <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-business</directory> </fileSet> <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-layout</directory> </fileSet> The command to generate the archetype: mvn archetype:generate -B \ -DgroupId=com.stackoverflow \ -DartifactId=stackoverflow-question -DarchetypeGroupId=com.stackoverflow \ -DarchetypeArtifactId=stackoverflow-archetype -DarchetypeVersion=1.0 \ -DartifactIdKey=soq I assume to get the following folder structure, but i get the ${artifactIdKey} property as folder. Without beeing replaces. ..\ +---soq-business +---soq-layout ..\ +---${artifactIdKey}-business +---${artifactIdKey}-layout How can i achieve this? And how can i place files below soq-business? Without knowing the folder name at this time?

    Read the article

  • Debugging stack data not assigned to a named variable

    - by gibbss
    Is there a way to view stack elements like un-assigned return values or exceptions that not assigned to a local variable? (e.g. throw new ...) For example, suppose I have code along the lines of: public String foo(InputStream in) throws IOException { NastyObj obj = null; try { obj = new NastyObj(in); return (obj.read()); } finally { if (obj != null) obj.close(); } } Is there any way to view the return or exception value without stepping to a higher level frame where it is assigned? This is particularly relevant with exceptions because you often have to step back up through a number of frames to find an actual handler. I usually use the Eclipse debugging environment, but any answer is appreciated. Also, if this cannot be done, can you explain why? (JVM, JPDA limitation?)

    Read the article

  • Perl - how to get the number of elements in a list (not a named array)

    - by NXT
    Hi Everyone, I'm trying to get a block of code down to one line. I need a way to get the number of items in a list. My code currently looks like this: # Include the lib directory several levels up from this directory my @ary = split('/', $Bin); my @ary = @ary[0 .. $#ary-4]; my $res = join '/',@ary; lib->import($res.'/lib'); That's great but I'd like to make that one line, something like this: lib->import( join('/', ((split('/', $Bin)) [0 .. $#ary-4])) ); But of course the syntax $#ary is meaningless in the above line. Is there equivalent way to get the number of elements in an anonymous list? Thanks! PS: The reason for consolidating this is that it will be in the header of a bunch of perl scripts that are ancillary to the main application, and I want this little incantation to be more cut & paste proof.

    Read the article

  • Problem passing a reference as a named parameter to a variadic function

    - by Michael Mrozek
    I'm having problems in Visual Studio 2003 with the following: void foo(const char*& str, ...) { va_list args; va_start(args, str); const char* foo; while((foo = va_arg(args, const char*)) != NULL) { printf("%s\n", foo); } } When I call it: const char* one = "one"; foo(one, "two", "three", NULL); I get: Access violation reading location 0xcccccccc on the printf() line -- va_arg() returned 0xcccccccc. I finally discovered it's the first parameter being a reference that breaks it -- if I make it a normal char* everything is fine. It doesn't seem to matter what the type is; being a reference causes it to fail at runtime. Is this a known problem with VS2003, or is there some way in which that's legal behavior? It doesn't happen in GCC; I haven't tested with newer Visual Studios to see if the behavior goes away

    Read the article

  • How to copy subdirectories of multiple un-named directories

    - by Scrubbie
    Using just Ant, I want to copy subdirectories of some top-level directories but the names of top-level directories can change so I need Ant to programatically determine which directories to copy. In other words, given the sample directory structure below, copy the contents of each ./<projectX>/bin directory to ./bin. bin project1 \-- bin \-- com \-- name \-- dir1 \-- file1.class \-- file2.class \-- file3.class \-- dir2 \-- file4.class \-- file5.class project2 \-- bin \-- com \-- name \-- dir3 \-- file6.class \-- file7.class \-- file8.class project3 \-- bin \-- com \-- name \-- dir4 \-- file9.class \-- dir5 \-- file10.class \-- file11.class And the end result would be a bin directory that looks like this: bin \-- com \-- name \-- dir1 \-- file1.class \-- file2.class \-- file3.class \-- dir2 \-- file4.class \-- file5.class \-- dir3 \-- file6.class \-- file7.class \-- file8.class \-- dir4 \-- file9.class \-- dir5 \-- file10.class \-- file11.class I've tried <copy todir="${basedir}/bin"> <fileset dir="${basedir}"> <include name="**/bin/*"/> <exclude name="bin"/> </fileset> </copy> but that includes the projectX/bin directories underneath the top-level bin directory.

    Read the article

  • one codeigniter controller named site needs to handle multiple domains

    - by Mauricio Webtailor
    Got a controller in codeigniter who handles different sub sites. site/index/1 fetches content for subsite a site/index/2 fetches content for subsite b Now we decided to register domain names for these sub sites. so what we need: http://www.subsite1.com - default controller should be site/index/1 without the site/index/1 in the uri http://www.subsite2.com - default controller should be site/index/2 without the site/index/2 in the uri I fiddled and tried to play with routes.php but getting nowhere.. Can somebody point me in the right direction?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >