Sponsored Content
Full Discussion: Google Trends: UNIX
The Lounge What is on Your Mind? Google Trends: UNIX Post 303034041 by Neo on Wednesday 17th of April 2019 02:24:24 AM
Old 04-17-2019
Quote:
Originally Posted by nezabudka
Hi Neo,
Good style. You can start writing a book. Read with interest and without a dictionary. Smilie
Thanks, but every time I have started to write a book in the past, I get bored after a few pages and go back to writing code. Honestly, I have started around three or four books in my life and never got very far at all!

Also, I used to dream to write science fiction; but I'm not very imaginative at all for writing fiction.

I have a lot of respect for writers, but I just don't have the patience or interest to write books. My bad, for sure.
This User Gave Thanks to Neo For This Post:
 

6 More Discussions You Might Find Interesting

1. Web Development

Helpful Tip: Forcing Google to www.google.com

Helpful Tip! Sometimes when we are in another country, Google redirects our request for www.google.com to: www.google.co.in or to: www.google.co.th If you want to force Google to go to the US site, use: www.google.com/webhp (1 Reply)
Discussion started by: Neo
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Google Chrome is blocking access to UNIX.com

For some reason Google Chrome sees unix.com as dangerous and has start to block it. I need to select advanced and continue on own risk. Can you make an effort to remove unix.com form the list of dangerous site from Google. IE has not this problem. (5 Replies)
Discussion started by: Jotne
5 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Google reporting UNIX.com as harmful site

Google is reporting unix.com as harmful site. For example, if one types site:unix.com php into the Google search box, Google says Migration of website... PHP/Mysql -which path for DB.php - The ... This site may harm your computer. 7 posts - 3 authors - May 28 Hi, I have two websites:... (6 Replies)
Discussion started by: Unregistered
6 Replies

4. What is on Your Mind?

Any Google SEO Expert to Help UNIX.COM?

I checked (again) and it seems like we lost 70% of our Google indexed links starting in March 2018. So far, I do not know what caused this drop: https://www.unix.com/members/1-albums215-picture904.png As mentioned, I have done a lot of checking, and we did not make any changes in March of... (2 Replies)
Discussion started by: Neo
2 Replies

5. Web Development

Google Trends: react.js angular.js vue.js

While I'm on the subject of Google trends, here is a global trend since 2004 comparing react.js, angular.js, vue.js It's no secret I'm a vue.js fan and coder, but not because of the trend line (which I just saw for the first time a few minutes ago) My experience is that vue.js, a late arrival... (0 Replies)
Discussion started by: Neo
0 Replies

6. What is on Your Mind?

UNIX.com is getting crushed in google search these days

For over a decade, unix.com has been in the top tier for search referrals. The keyword "unix" used to rank #4, and when it was down, it was #9. At times, we were close to #2 on Google for the "unix" keyword. Now, in some geos (in the US for example yesterday), in Google search the "unix"... (28 Replies)
Discussion started by: Neo
28 Replies
DBIx::Class::Helper::ResultSet::CorrelateRelationship(3pUser Contributed Perl DocumentatDBIx::Class::Helper::ResultSet::CorrelateRelationship(3pm)

NAME
DBIx::Class::Helper::ResultSet::CorrelateRelationship - Easily correlate your ResultSets VERSION
version 2.013002 SYNOPSIS
package MyApp::Schema::ResultSet::Author; use base 'DBIx::Class::ResultSet'; __PACKAGE__->load_components(qw(Helper::ResultSet::CorrelateRelationship)); sub with_book_count { my $self = shift; $self->search(undef, { '+columns' => { book_count => $self->correlate('book')->count_rs->as_query } }); } 1; And then elsewhere, like in a controller: my $rows = $schema->resultset('Author')->with_book_count->all; DESCRIPTION
Correlated queries are one of the coolest things I've learned about for SQL since my initial learning of SQL. Unfortunately they are somewhat confusing. DBIx::Class has supported doing them for a long time, but generally people don't think of them because they are so rare. I won't go through all the details of how they work and cool things you can do with them, but here are a couple high level things you can use them for to save you time or effort. If you want to select a list of authors and counts of books for each author, you could use "group_by" and something like "COUNT(book.id)", but then you'd need to make your select list match your "group_by" and it would just be a hassle forever after that. The "SYNOPSIS" is a perfect example of how to implement this. If you want to select a list of authors and two separate kinds of counts of books for each author, as far as I know, you must use a correlated subquery in DBIx::Class. Here is an example of how you might do that: package MyApp::Schema::ResultSet::Author; use base 'DBIx::Class::ResultSet'; __PACKAGE__->load_components(qw(Helper::ResultSet::CorrelateRelationship)); sub with_good_book_count { my $self = shift; $self->search(undef, { '+columns' => { good_book_count => $self->correlate('books')->good->count_rs->as_query } }); } sub with_bad_book_count { my $self = shift; $self->search(undef, { '+columns' => { bad_book_count => $self->correlate('books')->bad->count_rs->as_query } }); } 1; And then elsewhere, like in a controller: my $rows = $schema->resultset('Author') ->with_bad_book_count ->with_good_book_count ->all; This assumes that the Book resultset has "good" and "bad" methods. See "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it to your entire schema. METHODS
correlate $rs->correlate($relationship_name) Correlate takes a single argument, a relationship for the invocant, and returns a resultset that can be used in the selector list. AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Arthur Axel "fREW" Schmidt. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-18 DBIx::Class::Helper::ResultSet::CorrelateRelationship(3pm)
All times are GMT -4. The time now is 07:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy