Search Results

Search found 332 results on 14 pages for 'baz'.

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • TSQL: finding unique entries in a single table

    - by pcampbell
    Consider a table or CTE structured like this: Name Num ---- ---- Abc 12 Abc 12 XYZ 70 XYZ 80 Bar 50 Bar 55 Foo 44 Foo 44 Baz 88 The requirement is to determine the Name where multiple different Nums exist. The desired resultset is Name ---- XYZ Bar What TSQL statement would you use to derive this resultset?

    Read the article

  • How to create dependencies in automake?

    - by Sam
    Hello, I have a Makefile.am file right now that looks like this: lib_LIBRARIES = foo.a foo_a_SOURCES = bar.F90 baz.F90 When compiled, bar.F90 gives bar.o. However, bar.F90 depends on several other Fortran files (cat.F90, dog.F90, pig.F90). I want to set up Automake to rebuild bar.o if the source of one of these dependencies change. I've been reading the GNU manuals for automake/autoconf and was unable to find a solution to this. Thanks for reading.

    Read the article

  • Spring Transactional Parameterized Test and Autowiring

    - by James Kingsbery
    Is there a way to get a class that extends AbstractTransactionalJUnit4SpringContexts to play nicely with JUnit's own @RunWith(Parameterized), so that fields marked as Autowired get wired in properly? @RunWith(Parameterized) public class Foo extends AbstractTransactionalJUnit4SpringContexts { @Autowired private Bar bar @Parameters public static Collection data() { // return parameters, following pattern in // http://junit.org/apidocs/org/junit/runners/Parameterized.html } @Test public void someTest(){ bar.baz() //NullPointerException } }

    Read the article

  • Berkeley DB: btree prefix comparison for directory-like keys?

    - by Mark Harrison
    I'm going to index a BDB with keys that look a lot like directory paths ('/foo/bar', '/foo/baz', etc, with levels of slashes generally < 10). Does anybody have any experience with using a Btree prefix comparison routine[1] for this? Are the savings worthwhile? Any references to experience papers on this subject? [1] http://www.stanford.edu/class/cs276a/projects/docs/berkeleydb/ref/am_conf/bt_prefix.html

    Read the article

  • multiple class inheritance

    - by redcoder
    In PHP, is it possible to have multiple inheritance (by the nature of the PHP, not writting modification code) ? example : class a { public function foo(); } class b { public function bar(); } class c extends a, b { public function baz(); }

    Read the article

  • What's the fastest way to check if a word from one string is in another string?

    - by Mike Trpcic
    I have a string of words; let's call them bad: bad = "foo bar baz" I can keep this string as a whitespace separated string, or as a list: bad = bad.split(" "); If I have another string, like so: str = "This is my first foo string" What's the fasted way to check if any word from the bad string is within my comparison string, and what's the fastest way to remove said word if it's found? #Find if a word is there bad.split(" ").each do |word| found = str.include?(word) end #Remove the word bad.split(" ").each do |word| str.gsub!(/#{word}/, "") end

    Read the article

  • C++: Unknown pointer size when forward declaring (error C2036)

    - by Rosarch
    In a header file, I have forward declared two members of a namespace: namespace Foo { struct Odp typedef std::vector<Odp> ODPVEC; }; class Bar { public: Foo::ODPVEC baz; // C2036 }; The error generated by the compiler is: error C2036: 'Foo::Odp *': unknown size I'm guessing this is an issue with forward declaring Odp. How can I get around this?

    Read the article

  • meaning of the returned list of python json

    - by fmsf
    Hey, I'm new to python so I really don't know the language very well. the following example was taken from here http://docs.python.org/library/json.html >>> import json >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') [u'foo', {u'bar': [u'baz', None, 1.0, 2]}] what does the u mean? and how do i know which elements are available in the dictionary?

    Read the article

  • Equivalent of Backticks in Python

    - by Chris Bunch
    What is the equivalent of the backticks found in Ruby and Perl in Python? That is, in Ruby I can do this: foo = `cat /tmp/baz` What does the equivalent statement look like in Python? I've tried os.system("cat /tmp/baz") but that puts the result to standard out and returns to me the error code of that operation.

    Read the article

  • BitBucket Wiki: Create a heirarchy structure?

    - by Rosarch
    I want to create a hierarchy in my wiki like so: General FooPages Foo1 Foo2 Foo3 ODP Bar Baz I would like to create these pages, and use <<toc>> table of contents macros to organize them. How can I do that? Do I need to clone and edit the wiki on my own machine, or can I do that exclusively through the web interface?

    Read the article

  • Apache mod_rewrite - prefer files over directories with pretty URLs

    - by Jesse
    I want to have pretty urls so http://www.domain.com/foo will return http://www.domain.com/foo.php The issue is that there is a directory that has the same name. I have another page at http://www.domain.com/foo/bar/baz and right now my server just returns the directory listing of foo when I request http://www.domain.com/foo Pseudocode: If the request plus ".php" is a file rewrite out the file instead of the directory Actual Code: RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME}\.php -f RewriteRule (.*) $1.php [NC,L]

    Read the article

  • Eclipse outline of Prototype javascript classes

    - by Rob Agar
    Is there a way to show the structure of a javascript class declared using Prototype's Class.create function in the Eclipse outline view? The declarations look like: var Foo = Class.create({ bar: function() { ... }, baz: function() { ... }, }); At the moment all I get is "Foo:". (A google search turned up http://marketplace.eclipse.org/content/prototypewtp, but the link to the plugin homepage is dead)

    Read the article

  • basic operations for modifying a source document with XSLT

    - by SpliFF
    All the tutorials and examples I've found of XSLT processing seem to assume your destination will be a significantly different format/structure to your source and that you know the structure of the source in advance. I'm struggling with finding out how to perform simple "in-place" modifications to a HTML document without knowing anything else about its existing structure. Could somebody show me a clear example that, given an arbitrary unknown HTML source will: 1.) delete the classname 'foo' from all divs 2.) delete a node if its empty (ie <p></p>) 3.) delete a <p> node if its first child is <br> 4.) add newattr="newvalue" to all H1 5.) replace 'heading' in text nodes with 'title' 6.) wrap all <u> tags in <b> tags (ie, <u>foo</u> -> <b><u>foo</u></b>) 7.) output the transformed document without changing anything else The above examples are the primary types of transform I wish to accomplish. Understanding how to do the above will go a long way towards helping me build more complex transforms. To help clarify/test the examples here is a sample source and output, however I must reiterate that I want to work with arbitrary samples without rewriting the XSLT for each source: <!doctype html> <html> <body> <h1>heading</h1> <p></p> <p><br>line</p> <div class="foo bar"><u>baz</u></div> <p>untouched</p> </body> </html> output: <!doctype html> <html> <body> <h1 newattr="newvalue">title</h1> <div class="bar"><b><u>baz</u></b></div> <p>untouched</p> </body> </html>

    Read the article

  • Reading object tree from file into Python

    - by jjkparker
    I have a Python app that contains an object structure that the user can manipulate. What I want to do is allow the user to create a file declaring how the object structure should be created. For example, I would like the user to be able to create the following file: foo.bar.baz = true x.y.z = 12 and for my app to then create that object tree automatically. What's the best way to do something like this?

    Read the article

  • Dealing with &rest-parameters in common lisp

    - by Patrick
    I want define a functions that accepts &rest - parameters and delegates them to another function. (html "blah" "foo" baz) = "blahfoobaz" I did not find a better way than this one: (defun html (&rest values) (concatenate 'string "" (reduce #'(lambda(a b) (concatenate 'string a b)) values :initial-value "") "")) But this looks somewhat glumbsy to me, since line 4 does no more than concatenating the &rest parameter "values". I tried (concatenate 'string "" (values-list values) "") but this does not seem to work (SBCL). Could someone give me an advice? Kind regards

    Read the article

  • Assignment in conditional operator

    - by DuoSRX
    I've seen a lot this kind of code recently : if ($foo = $bar->getFoo()) { baz($foo); } Is this considered good or bad practice ? For example, Netbeans IDE give a notice if you use this kind of code : Possible accidental assignment, assignments in conditions should be avoided What do you think ?

    Read the article

  • rb plugin the hot key not working

    - by Bunny Rabbit
    def activate(self,shell): self.shell = shell self.action = gtk.Action ('foo','bar','baz',None) self.activate_id = self.action.connect ('activate', self.call_bk_fn,self.shell) self.action_group = gtk.ActionGroup ('hot_key_action_group') self.action_group.add_action_with_accel (self.action, "<control>E") uim = shell.get_ui_manager () uim.insert_action_group (self.action_group, 0) uim.ensure_update () def call_bk_fn(self,shell): print('hello world') i am using the above code in a plugin for rhythmbox ,and here i am trying to register the key ctr+e so that the call_bk_fn gets called whenever the key combination is pressed , but its not working why is that so ?

    Read the article

  • How to optimize foreach loop in PHP

    - by vanneto
    First off, I know the title is generic and not fitting. I just couldn't think of a title that could describe my problem. I have a table Recipients in MySQL structured like this: id | email | status 1 foo@bar S 2 bar@baz S 3 abc@def R 4 sta@cko B I need to convert the data into the following XML, depending on the status field. For example: <Recipients> <RecipientsSent> <!-- Have the 'S' status --> <recipient>foo@bar</recipient> <recipient>bar@baz</recipient> </RecipientsSent> <RecipientsRegexError> <recipient>abc@def</recipient> </RecipientsRegexError> <RecipientsBlocked> <recipient>sta@cko</recipient> </RecipientsBlocked> </Recipients> I have this PHP code to implement this ($recipients contains an associative array of the db table): <Recipients> <RecipientsSent> <?php foreach ($recipients as $recipient): if ($recipient['status'] == 'S'): echo "<recipient>" . $recipient['email'] . "</recipient>"; endif; endforeach; ?> </RecipientsSent> <RecipientsRegexError> <?php foreach ($recipients as $recipient): if ($recipient['status'] == 'R'): echo "<recipient>" . $recipient['email'] . "</recipient>"; endif; endforeach; ?> </RecipientsRegexError> <?php /** same loop for the B status */ ?> </Recipients> So, this means that if I have 1000 entries in the table and 4 different status' that can be checked, it means that there will be 4 loops, each one executing 1000 times. How can this be done in a more efficient manner? I thought about fetching four different sets from the database, meaning 4 different queries, would that be more efficient? I'm thinking it could be done with one loop but but I can't come up with a solution. Any way this could be done with only one loop?

    Read the article

  • How to access a superclass method from a nested class?

    - by m01
    I hope this code explains the problem: class Foo { void a() { / *stuff */ } } class Bar extends Foo { void a() { throw new Exception("This is not allowed for Bar"); } class Baz { void blah() { // how to access Foo.a from here? } } } I know that I may be doing something wrong, because inheritance perhaps shouldn't be used in such way. But it's the easiest way in my situation. And, beside that, I'm just curious. Is it possible?

    Read the article

  • Postfix logs missing information on delivery status (postfix/smtp message)

    - by hegemon
    I noticed a problem with postfix logs, that information on some of emails delivery status is missing. The issue affects about 1% of emails. "Healthy" log: <server># grep 8EB992EFBB44 postfix_log/mail04.log Jun 5 03:09:29 mail04 postfix/smtpd[8537]: 8EB992EFBB44: client=xxx.xxx.xxx[xxx.xxx.xxx.xxx] Jun 5 03:09:29 mail04 postfix/cleanup[34349]: 8EB992EFBB44: message-id=<[email protected]> Jun 5 03:12:02 mail04 postfix/qmgr[76377]: 8EB992EFBB44: from=<[email protected]>, size=48845, nrcpt=1 (queue active) Jun 5 03:15:12 mail04 postfix/smtp[35058]: 8EB992EFBB44: to=<[email protected]>, relay=mx.baz.com[xxx.xxx.xxx.xxx]:25, conn_use=70, delay=343, delays=153/190/0/0.24, dsn=2.0.0, status=sent (250 ok) Jun 5 03:15:12 mail04 postfix/qmgr[76377]: 8EB992EFBB44: removed "Broken" log: <server># grep F3C362EF37CA postfix_log/mail04.log Jun 5 04:03:27 mail04 postfix/smtpd[39666]: F3C362EF37CA: client=xxx.xxx.xxx[xxx.xxx.xxx.xxx] Jun 5 04:03:27 mail04 postfix/cleanup[41287]: F3C362EF37CA: message-id=<[email protected]> Jun 5 04:03:28 mail04 postfix/qmgr[76377]: F3C362EF37CA: from=<[email protected]>, size=48892, nrcpt=1 (queue active) ** here should be a log line from postfix/smtp but there is none ** Jun 5 04:03:29 mail04 postfix/qmgr[76377]: F3C362EF37CA: removed Background information: system: FreeBSD xxx.xxx.xxx 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 Postfix is installed inside jail. Logs are on the same machine, log dir is mounted thru nullfs. The site has spikes of heavy load, causing disks (local) to run at 100%. Update The log is rotated daily, current size is ~ 500MB. I made a test by queuing 99000 messages to same destination (in order to rule out dns/network/mx issues). 5715 messages don't have any DSN record. Failed messages queue time is spread evenly over time, i don't see any time-bound issues. Some undelivered emails: envelopeid | processed_time --------------+---------------------------- 8D7652EF3BAE | 2012-06-06 13:19:11.072715 DD53A2EF3C5C | 2012-06-06 13:33:24.374783 8C52F2EF4E3F | 2012-06-06 13:39:15.810616 BBC572EF525C | 2012-06-06 13:44:22.762812 E95822EF54D1 | 2012-06-06 13:52:01.134533 839DD2EF4FBB | 2012-06-06 14:13:48.511236 017EE2EF6234 | 2012-06-06 15:04:48.618963 Those are a few picks, such records of undelivered email occur almost every second. <server># egrep '(8D7652EF3BAE|BBC572EF525C|017EE2EF6234)' mail04.log Jun 6 13:19:10 mail04 postfix/smtpd[20350]: 8D7652EF3BAE: client=xxx.xxx.xxx[xxx.xxx.xxx.xxx] Jun 6 13:19:10 mail04 postfix/cleanup[21024]: 8D7652EF3BAE: message-id=<[email protected]> Jun 6 13:19:10 mail04 postfix/qmgr[7939]: 8D7652EF3BAE: from=<[email protected]>, size=63718, nrcpt=1 (queue active) Jun 6 13:19:11 mail04 postfix/qmgr[7939]: 8D7652EF3BAE: removed Jun 6 13:44:22 mail04 postfix/smtpd[20346]: BBC572EF525C: client=xxx.xxx.xxx[xxx.xxx.xxx.xxx] Jun 6 13:44:22 mail04 postfix/cleanup[24811]: BBC572EF525C: message-id=<[email protected]> Jun 6 13:44:22 mail04 postfix/qmgr[7939]: BBC572EF525C: from=<[email protected]>, size=63758, nrcpt=1 (queue active) Jun 6 15:04:49 mail04 postfix/smtpd[20344]: 017EE2EF6234: client=xxx.xxx.xxx[xxx.xxx.xxx.xxx] Jun 6 15:04:49 mail04 postfix/cleanup[35585]: 017EE2EF6234: message-id=<[email protected]> Jun 6 15:04:49 mail04 postfix/qmgr[7939]: 017EE2EF6234: from=<[email protected]>, size=63706, nrcpt=1 (queue active) <server># <server># find /var/spool/postfix/active/ -type f -print | wc -l 1 <server># IMPORTANT: As you can see above some of emails doesn't event have the removed line.

    Read the article

  • (Apache) RedirectMatch regex to match all directories except those in my list

    - by dotben
    I need to 301 redirect all requests coming in for requests to http//server.com to be redirected to http//newserver.com unless the request is for an arbitary list of directories we are maintaining on the legacy server (eg server.com/foo or server.com/bar) I'm having a hard time working out how best to set this up and the regexs. EG, I need: http//server.com/page1 redirect to http//newserver.com/page1 http//server.com/dir1/page2 redirect to http//newserver.com/dir1/page2 http//server.com/foo to load as normal http//server.com/bar/baz.html to load as normal ... because 'foo' and 'bar' are in my list of legacy dirs. I'm wondering if the way to do this is to some how catch the matches in my list and then redirect anything else as a wildcard over to the new server -- but I can't make it work. Can anyone help me with some regex and rewrites for those please? Thanks (apologies for fudging the http:// in the urls, ServerFault thinks I'm posting hyperlinks and won't otherwise let me post this)

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >