Search Results

Search found 5146 results on 206 pages for 'foo chow'.

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

  • Sendmail SMART_HOST not working

    - by daniel
    Hello, I've defined SMART_HOST to be a specific server, lets call it foo.bar.com. However, when I send a test mail using 'sendmail -t', sendmail tries to use mx.bar.com, which subsequently rejects my mail. I've verified that foo.bar.com works and that mx.bar.com does not work (yay telnet). I've recompiled sendmail.mc vi make, make -C and m4. I've verified the DS entry in sendmail.cf. I've restarted sendmail correctly. I'm not sure how to proceed at this point. Any ideas? Here is my SMART_HOST line: define(SMART_HOST',foo.bar.com')dnl ...and here is the result of a test mail. It never tries to use foo.bar.com, instead it uses mx.bar.com. $ echo subject: test; echo | sendmail -Am -v -flocaluser -- [email protected] subject: test [email protected]... Connecting to mx.bar.com via relay... 220 mx.bar.com ESMTP >>> EHLO myhost.bar.com 250-mx.bar.com 250-8BITMIME 250 SIZE 52428800 >>> MAIL From:<[email protected]> SIZE=1 250 sender <[email protected]> ok >>> RCPT To:<[email protected]> 550 #5.1.0 Address rejected. >>> RSET 250 reset localuser... Connecting to local... localuser... Sent Closing connection to mx.bar.com. >>> QUIT 221 mx.bar.com And last, here is a test mail sent using foo.bar.com: $ hostname myhost.bar.com $ telnet foo.bar.com 25 Trying ***.***.***.***... Connected to foo.bar.com (***.***.***.***). Escape character is '^]'. 220 foo.bar.com ESMTP Sendmail 8.14.1/8.14.1/ITS-7.0/ldap2-1+tls; Tue, 21 Dec 2010 13:27:44 -0700 (MST) helo foo 250 foo.bar.com Hello myhost.bar.com [***.***.***.***], pleased to meet you mail from: [email protected] 250 2.1.0 [email protected]... Sender ok rcpt to: [email protected] 250 2.1.5 [email protected]... Recipient ok data 354 Enter mail, end with "." on a line by itself testing . 250 2.0.0 oBLKRikZ003758 Message accepted for delivery quit 221 2.0.0 foo.bar.com closing connection Connection closed by foreign host. Any ideas? Thanks

    Read the article

  • Rebasing a branch which is public

    - by Dror
    I'm failing to understand how to use git-rebase, and I consider the following example. Let's start a repository in ~/tmp/repo: $ git init Then add a file foo $ echo "hello world" > foo which is then added and committed: $ git add foo $ git commit -m "Added foo" Next, I started a remote repository. In ~/tmp/bare.git I ran $ git init --bare In order to link repo to bare.git I ran $ git remote add origin ../bare.git/ $ git push --set-upstream origin master Next, lets branch, add a file and set an upstream for the new branch b1: $ git checkout -b b1 $ echo "bar" > foo2 $ git add foo2 $ git commit -m "add foo2 in b1" $ git push --set-upstream origin b1 Now it is time to switch back to master and change something there: $ echo "change foo" > foo $ git commit -a -m "changed foo in master" $ git push At this point in master the file foo contain changed foo, while in b1 it is still hello world. Finally, I want to sync b1 with the progress made in master. $ git checkout b1 $ git fetch origin $ git rebase origin/master At this point git st returns: # On branch b1 # Your branch and 'origin/b1' have diverged, # and have 2 and 1 different commit each, respectively. # (use "git pull" to merge the remote branch into yours) # nothing to commit, working directory clean At this point the content of foo in the branch b1 is change foo as well. So what does this warning mean? I expected I should do a git push, git suggests to do git pull... According to this answer, this is more or less it, and in his comment @FrerichRaabe explicitly say that I don't need to do a pull. What's going on here? What is the danger, how should one proceed? How should the history be kept consistent? What is the interplay between the case described above and the following citation: Do not rebase commits that you have pushed to a public repository. taken from pro git book. I guess it is somehow related, and if not I would love to know why. What's the relation between the above scenario and the procedure I described in this post.

    Read the article

  • How can I remove old log entries from a log file and archive them somewhere else in Linux?

    - by Mike B
    CentOS 4.x I apologize in advance if this is not the appropriate place to ask this question. It pertains to a linux server / IT admin task. I've got a log file on an old CentOS 4.x server and I want to remove log entries older than a certain date and place them in a new file for archive. Here's an example of the log format: 2012-06-07 22:32:01,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:32:03,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:32:04,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123| 2012-06-07 22:32:10,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:32:12,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:32:15,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123| 2012-06-07 22:32:40,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:32:58,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:33:01,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123| 2012-06-07 22:33:01,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123|blah blah blah 2012-06-07 22:33:02,289 ABC:0|Foo|Foo2|4.4|1234|Some Event|123| Essentially, I'm looking for a one-liner that will do the following: Find any events older than a provided YYYY-MM-DD and remove them from the primary log file. Take the deleted events from step 1 and put them in a new log file (Optional) Compress the new archive log file holding the deleted events. I'm aware that there are log rotate tools that do this but this should just be a one-time task so I'd prefer not to set that up. Additional notes: If the date part it tricky or too resource intensive, an alternative would be to just keep the last X number of lines and move the rest. I was originally thinking of something like tail -n 10000 > newfile.txt but that would mean moving the "good" logs to a new file and then doing a name swap... and then I'd still need to remove the "good" entries from the archive. This particular log file is pretty large (1 GB) so I'd prefer the task to be as resource and time efficient as possible. The extra pipes in the log concern me and I'm not sure if I'd need extra protection in the commands to avoid that from causing problems.

    Read the article

  • Nginx + PHPBB3 reverse proxy images problem

    - by siberiano
    Hello all I have a problem with my Nginx Frontend + Apache2 backend + PHPBB3 software. It doesn't load the CSS and the images neither. I get constant errors like these: 2010/04/14 16:57:25 [error] 13365#0: *69 open() "/var/www/foo/styles/styles/coffee_time/theme/large.css" failed (2: No such file or directory), client: 83.44.175.237, server: www.foo.com, request: "GET /styles/coffee_time/theme/large.css HTTP/1.1", host: "www.foo.com", referrer: "http://www.foo.com/viewforum.php?f=43" This is my config of the site: server { listen 80; server_name www.foo.com; access_log /var/log/nginx/foo.access.log; # serve static files directly location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ { access_log off; expires 30d; root /var/www/trasteando/; } location / { root /var/www/foo/; index /var/www/foo/index.php; } # proxy the PHP scripts to predefined upstream .apache. # location ~ .php$ { proxy_pass http://apache; } location /styles/ { root /var/www/foo/styles/; }

    Read the article

  • Apache: Isn't chmod 755 enough to set up symlink or alias on Apache httpd on Mac OS 10.5?

    - by eed3si9n
    On my Mac OS 10.5 machine, I would like to set up a subfolder of ~/Documents like ~/Documents/foo/html to be http://localhost/foo. The first thing I thought of doing is using Alias as follows: Alias /foo /Users/someone/Documents/foo/html <Directory "/Users/someone/Documents/foo/html"> Options Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </Directory> This got me 403 Forbidden. In the error_log I got: [error] [client ::1] (13)Permission denied: access to /foo denied The subfolder in question has chmod 755 access. I've tried specifying likes like http://localhost/foo/test.php, but that didn't work either. Next, I tried the symlink route. Went into /Library/WebServer/Documents and made a symlink to ~/Documents/foo/html. The document root has Options Indexes FollowSymLinks MultiViews This still got me 403 Forbidden: Symbolic link not allowed or link target not accessible: /Library/WebServer/Documents/foo What else do I need to set this up? Solution: $ chmod 755 ~/Documents In general, the folder to be shared and all of its ancestor folder needs to be viewable by the www service user.

    Read the article

  • Ruby on Rails: Using XML Builder Partials

    - by randombits
    Partials in XML builder are proving to be non-trivial. After some initial Google searching, I found the following to work, although it's not 100% xml.foo do xml.id(foo.id) xml.created_at(foo.created_at) xml.last_updated(foo.updated_at) foo.bars.each do |bar| xml << render(:partial => 'bar/_bar', :locals => { :bar => bar }) end end this will do the trick, except the XML output is not properly indented. the output looks something similar to: <foo> <id>1</id> <created_at>sometime</created_at> <last_updated>sometime</last_updated> <bar> ... </bar> <bar> ... </bar> </foo> The <bar> element should align underneath the <last_updated> element, it is a child of <foo> like this: <foo> <id>1</id> <created_at>sometime</created_at> <last_updated>sometime</last_updated> <bar> ... </bar> <bar> ... </bar> </foo> Works great if I copy the content from bar/_bar.xml.builder into the template, but then things just aren't DRY.

    Read the article

  • NHibernate: Subqueries.Exists not working

    - by cbp
    I am trying to get sql like the following using NHibernate's criteria api: SELECT * FROM Foo WHERE EXISTS (SELECT 1 FROM Bar WHERE Bar.FooId = Foo.Id AND EXISTS (SELECT 1 FROM Baz WHERE Baz.BarId = Bar.Id) So basically, Foos have many Bars and Bars have many Bazes. I want to get all Foos that have Bars with Bazes. To do this, a detached criteria seems best, like this: var subquery = DetachedCriteria.For<Bar>("bar") .SetProjection(Projections.Property("bar.Id")) .Add(Restrictions.Eq("bar.FooId","foo.Id")) // I have also tried replacing "bar.FooId" with "bar.Foo.Id" .Add(Restrictions.IsNotEmpty("bar.Bazes")); return Session.CreateCriteria<Foo>("foo") .Add(Subqueries.Exists(subquery)) .List<Foo>(); However this throws the exception: System.ArgumentException: Could not find a matching criteria info provider to: bar.FooId = foo.Id and bar.Bazes is not empty Is this a bug with NHibernate? Is there a better way to do this?

    Read the article

  • Django QuerySet ordering by number of reverse ForeignKey matches

    - by msanders
    I have the following Django models: class Foo(models.Model): title = models.CharField(_(u'Title'), max_length=600) class Bar(models.Model): foo = models.ForeignKey(Foo) eg_id = models.PositiveIntegerField(_(u'Example ID'), default=0) I wish to return a list of Foo objects which have a reverse relationship with Bar objects that have a eg_id value contained in a list of values. So I have: id_list = [7, 8, 9, 10] qs = Foo.objects.filter(bar__eg_id__in=id_list) How do I order the matching Foo objects according to the number of related Bar objects which have an eg_id value in the id_list?

    Read the article

  • .php files see Apache environment variables, .html files don't

    - by dotancohen
    Consider this environment: $ cat .htaccess AddType application/x-httpd-php .php .html SetEnv Foo Bar $ cat test.php <?php echo "Hello: "; echo $_SERVER['Foo']; echo $_ENV['Foo']; echo getenv('Foo'); ?> $ cat test.html <?php echo "Hello: "; echo $_SERVER['Foo']; echo $_ENV['Foo']; echo getenv('Foo'); ?> This is the output of test.php: Hello BarBarBar This is the output of test.html: Hello Why might that be? How might I fix it? Here is phpinfo.php: http://pastebin.com/rgq7up61 Here is phpinfo.html: http://pastebin.com/VUKFNZ36 If anyone knows where I can host a real webpage instead of just the HTML for one, please let me know and I'll move the content to there. Thanks.

    Read the article

  • How does Unity.Resolve know which constructor to use?

    - by stiank81
    Given a class with several constructors - how can I tell Resolve which constructor to use? Consider the following example class: public class Foo { public Foo() { } public Foo(IBar bar) { Bar = bar; } public Foo(string name, IBar bar) { Bar = bar; Name = name; } public IBar Bar { get; set; } public string Name { get; set; } } If I want to create an object of type Foo using Resolve how will Resolve know which constructor to use? And how can I tell it to use the right one? Let's say I have a container with an IBar registered - will it understand that it should favor the constructor taking IBar? And if I specify a string too - will it use the (string, IBar) constructor? Foo foo = unityContainer.Resolve<Foo>(); And please ignore the fact that it would probably be easier if the class just had a single constructor...

    Read the article

  • Why does 6.times.map work in ruby 1.8.7 but not 1.8.6

    - by Lee
    The following code snippet works fine in 1.8.7 on Mac OS X, but not in 1.8.6 on Ubuntu. Why? Is there a workaround? Works in 1.8.7: $ ruby --version ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] ltredgate15:eegl leem$ irb >> 6.times.map {'foo'} => ["foo", "foo", "foo", "foo", "foo", "foo"] >> But not in 1.8.6: # ruby --version ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux] Ruby Enterprise Edition 20090610 # irb irb(main):001:0> 6.times.map {'foo'} LocalJumpError: no block given from (irb):1:in `times' from (irb):1 irb(main):002:0> Why is there a difference? What's the workaround for 1.8.6?

    Read the article

  • App crashes often in a for-loop

    - by Flocked
    Hello, my app crashes often in this for-loop: for (int a = 0; a <= 20; a++) { int b = arc4random() % [newsStories count]; NSString * foo = [[NSString alloc]initWithString:[[newsStories objectAtIndex: arc4random() % b]objectForKey:@"title"]]; foo = [foo stringByReplacingOccurrencesOfString:@"’" withString:@""]; foo = [[foo componentsSeparatedByCharactersInSet:[[NSCharacterSet letterCharacterSet] invertedSet]] componentsJoinedByString:@" "]; foo = [foo stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; textView.text = [textView.text stringByAppendingString:[NSString stringWithFormat:@"%@ ", foo]]; } The code changes a NSString from a NSDictionary and adds it into a textView. Sometimes it first crashes in the second time using the for-loop. What did I wrong?

    Read the article

  • Populating an association with children in factory_girl

    - by Craig Walker
    I have a model Foo that has_many 'Bar'. I have a factory_girl factory for each of these objects. The factory for Bar has an association to Foo; it will instantiate a Foo when it creates the Bar. I'd like a Factory that creates a Foo that contains a Bar. Ideally this Bar would be created through the :bar factory, and respect the build strategy (create/build) used to create the Foo. I know I could just call the :bar factory and then grab the Foo reference from the new Bar. I'd like to avoid this; in my test case, the important object is Foo; calling the Bar factory seems a bit circuitous. Also, I can see the need for a Foo with multiple Bars. Is this possible in factory_girl? How do you define this relationship in the parent?

    Read the article

  • help with htaccess

    - by Matías
    I want to do this: foo.com/xxx= foo.com/somepage.php?id=xxx This is how I do it: Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} ^$ RewriteRule ^([^/]+)$ http://foo.com/somepage.php?id=$1 [L] the problem now, is that foo.com doesn't work any more. I can't see foo.com neither foo.com/index.php help me! :)

    Read the article

  • Linux's thread local storage implementation

    - by anon
    __thread Foo foo; How is "foo" actually resolved? Does the compiler silently replace every instance of "foo" with a function call? Is "foo" stored somewhere relative to the bottom of the stack, and the compiler stores this as "hey, for each thread, have this space near the bottom of the stack, and foo is stored as 'offset x from bottom of stack'"?

    Read the article

  • Using PIG with Hadoop, how do I regex match parts of text with an unknown number of groups?

    - by lmonson
    I'm using Amazon's elastic map reduce. I have log files that look something like this random text foo="1" more random text foo="2" more text noise foo="1" blah blah blah foo="1" blah blah foo="3" blah blah foo="4" ... How can I write a pig expression to pick out all the numbers in the 'foo' expressions? I prefer tuples that look something like this: (1,2) (1) (1,3,4) I've tried the following: TUPLES = foreach LINES generate FLATTEN(EXTRACT(line,'foo="([0-9]+)"')); But this yields only the first match in each line: (1) (1) (1)

    Read the article

  • Icinga notifications are being marked as spam when sent to my mailbox

    - by user784637
    I'm using gmail and my domain is foo.com About half the notifications from my icinga server, [email protected] go to my spam folder for [email protected] Received-SPF: fail (google.com: domain of [email protected] does not designate <ip6> as permitted sender) client-ip=<ip6>; Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of [email protected] does not designate <ip6> as permitted sender) [email protected] Is my current SPF record set up to allow my icinga server with the ip <ip4> and <ip6> to send email from the domain foo.com? ;; ANSWER SECTION: foo.com. 300 IN TXT "v=spf1 ip4:<ip4> ip6:<ip6> -all"

    Read the article

  • How do I split filenames from paths using python?

    - by Rasputin Jones
    I have a list of files that look like this: Input /foo/bar/baz/d4dc7c496100e8ce0166e84699b4e267fe652faeb070db18c76669d1c6f69f92.mp4 /foo/baz/bar/60d24a24f19a6b6c1c4734e0f288720c9ce429bc41c2620d32e01e934bfcd344.mp4 /bar/baz/foo/cd53fe086717a9f6fecb1d0567f6d76e93c48d7790c55e83e83dd1c43251e40e.mp4 And I would like to split out the filenames from the path while retaining both. Output ['/foo/bar/baz/', 'd4dc7c496100e8ce0166e84699b4e267fe652faeb070db18c76669d1c6f69f92.mp4'] ['/foo/baz/bar/', '60d24a24f19a6b6c1c4734e0f288720c9ce429bc41c2620d32e01e934bfcd344.mp4'] ['/bar/baz/foo', 'd53fe086717a9f6fecb1d0567f6d76e93c48d7790c55e83e83dd1c43251e40e.mp4'] How would one go about this? Thanks!

    Read the article

  • How do I include a module in a namespaced class?

    - by snl
    I am having trouble including a module in a namespaced class. The example below throws the error uninitialized constant Bar::Foo::Baz (NameError). What basic piece of Ruby knowledge am I missing here? module Foo module Baz def hello puts 'hello' end end end module Bar class Foo include Foo::Baz end end foo = Bar::Foo.new

    Read the article

  • Inheritance in Java

    - by stevebot
    If I have an abstract class in java named Foo and it has an implementor named Bar then I want to know the following. lets say Foo looks something like public abstract class Foo { Service serviceFoo ... } And Bar is public class Bar extends Foo { ... } Also, lets assume I have an instance with Foo, named foo, currently that has serviceFoo instantiated If I then declare: Foo foo = new Bar(); will this create a a new instance of Bar that has serviceFoo instantiated or not? E.g. will that field be inherited and instantiated or just inherited?

    Read the article

  • Get domain name (not subdomain) in php

    - by Cyclone
    I have a URL which can be any of the following formats: http://example.com https://example.com http://example.com/foo http://example.com/foo/bar www.example.com example.com foo.example.com www.foo.example.com foo.bar.example.com http://foo.bar.example.com/foo/bar example.net/foo/bar Essentially, I need to be able to match any normal URL. How can I extract example.com (or .net, whatever the tld happens to be. I need this to work with any TLD.) from all of these via a single regex? This is in PHP. Thanks for the help!

    Read the article

  • How to version control config files pragmatically?

    - by erenon
    Suppose we have a config file with sensitive passwords. I'd like to version control the whole project, including the config file as well, but I don't want to share my passwords. That could be good, if this config file: password=secret foo=bar becomes password=* foo=bar and the other users of the vcs could also set up the password on they own. To ignoring the file isn't a good approach, the developers should be aware, if the config file changes. Example: Local version: password=own_secret foo=bar config file in vcs: password=* foo=bar Then suddenly, the config file changes: password=* foo=bar baz=foo And the local version would become for each developer: password=own_secret foo=bar baz=foo This is my solution. How could I achieve this behaviour? How do you store your config files? Is there a way to do that, or should I hack something?

    Read the article

  • C++ vs. C++/CLI: Const qualification of virtual function parameters

    - by James McNellis
    [All of the following was tested using Visual Studio 2008 SP1] In C++, const qualification of parameter types does not affect the type of a function (8.3.5/3: "Any cv-qualifier modifying a parameter type is deleted") So, for example, in the following class hierarchy, Derived::Foo overrides Base::Foo: struct Base { virtual void Foo(const int i) { } }; struct Derived : Base { virtual void Foo(int i) { } }; Consider a similar hierarchy in C++/CLI: ref class Base abstract { public: virtual void Foo(const int) = 0; }; ref class Derived : public Base { public: virtual void Foo(int i) override { } }; If I then create an instance of Derived: int main(array<System::String ^> ^args) { Derived^ d = gcnew Derived; } it compiles without errors or warnings. When I run it, it throws the following exception and then terminates: An unhandled exception of type 'System.TypeLoadException' occurred in ClrVirtualTest.exe Additional information: Method 'Foo' in type 'Derived'...does not have an implementation. That exception seems to indicate that the const qualification of the parameter does affect the type of the function in C++/CLI (or, at least it affects overriding in some way). However, if I comment out the line containing the definition of Derived::Foo, the compiler reports the following error (on the line in main where the instance of Derived is instantiated): error C2259: 'Derived': cannot instantiate abstract class If I add the const qualifier to the parameter of Derived::Foo or remove the const qualifier from the parameter of Base::Foo, it compiles and runs with no errors. I would think that if the const qualification of the parameter affects the type of the function, I should get this error if the const qualification of the parameter in the derived class virtual function does not match the const qualification of the parameter in the base class virtual function. If I change the type of Derived::Foo's parameter from an int to a double, I get the following warning (in addition to the aforementioned error, C2259): warning C4490: 'override': incorrect use of override specifier; 'Derived::Foo' does not match a base ref class method So, my question is, effectively, does the const qualification of function parameters affect the type of the function in C++/CLI? If so, why does this compile and why are there no errors or warnings? If not, why is an exception thrown?

    Read the article

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