hooks – How to restrict views date search to display only day and month in Drupal 8 with hook_views_query_alter? In Drupal 7 I was using this code

function mymodule_views_query_alter(DrupalviewsViewExecutable $view, DrupalviewsPluginviewsquerySql $query) { allowMonthAndDay($query); }


function allowMonthAndDay($query) {
$query_params = drupal_get_query_parameters();
if(!isset($query_params('date_of_birth')) || empty($query_params('date_of_birth'))) {
  return;
}
$day = str_pad($query_params('date_of_birth')('value')('day'), 2, "0", STR_PAD_LEFT);
$month = str_pad($query_params('date_of_birth')('value')('month'), 2, "0", STR_PAD_LEFT);
$birthday = $month . $day;
if(is_numeric($birthday) && $birthday != '0000') {
  $this->view->query->where(1)('conditions')(2)('field') = "DATE_FORMAT(field_data_field_date_of_birth.field_date_of_birth_value, '%m%d') = :field_data_field_donor_date_of_birth_field_date_of_birth_value";
  $this->view->query->where(1)('conditions')(2)('value')(':field_data_field_date_of_birth_field_date_of_birth_value') = $birthday;
}

}

How to get sql job not running more than two month?

How to write a query to get list of sql jobs which are not running more than 60days.

How We Drive 1000s of People To Our Website Every Month

I recently just launched a blog and within the first 3 months we hit 1000 unique visitors, and now we get thousands every month. All of this thanks to SEO.

We were so happy with the results we wanted to share our insights with the community and show you all the steps we used to gain our traffic. If you want to check out our free ebook you can get it here: https://mailchi.mp/6e97647d124f/ebook-sing-up

Forum Posting – $20 a month

Material will fit the situation. Will attempt to make a some threads and replies extra long. However, the point is to look natural.

Thread edited: 6/19/20

Free shared hosting for 1st month

Hello everyone,
If anyone wants free web hosting goto below mentioned URL

digirdp.com/manage/cart.php?gid=24

Goto URL
Select any plan
Use promo code- FREEHOST

Congratulations you have got 1 month free web hosting

Just scaled a Shopify store to $54k month. Looking for partners to create more stores!!!

Hello guys and girls,

Little info about myself.

I am an entrepreneur based in Istanbul, Turkey. I ve been doing Shopify and Facebook marketing for over 5 years. In my first month as a dropshipper i scaled a store that sells charcoal paste to $30k a month. Cashed little over $200k net profit after 14 months.

Over the past year i ve developed a new technique with Shopify stores and Facebook marketing. Its fast and brings consistent day after day results.

The store i created little over a month ago with this technique just hit $54k revenue today.

I am looking to create 10 more stores with this technique, I need partners for each of them since Paypal and Shopify Payments (the best payment gateway in my opinion) is not available in my country.

What i require from candidates,

1. My new partner must be from/located in one of these countries – USA, CANADA, UK, AUSTRALIA.
2. They must have a registered business in one of these countries as well.
3. Must have an aged Facebook account.
4. Must have $300-$500 ad budget available for initial Facebook marketing.
SEMrush

Basically not looking for any payment or anything, but you must have ad budget available for initial testing phase. When we become profitable, we ll be paying marketing cost with our profit anyway. But first phase $300-$500 needs to be available.

My new partners will only be responsible for managing cash flows since revenue will go to your bank account from Shopify Payments. You need to manage payments going to Facebook Marketing, paying suppliers, paying future virtual assistants and also paying my cut which is 50/50.

I will manage everything else with my team.

My system is very sharp and quick, if we agree to be partners, store will be ready for marketing in 2 days and we ll be profitable in 7-14 days.

First 10 suitable partners that contacts me gets to work with me. Hope to kill it with you guys!!!

 

postgresql – How would I improve my “algorithm” for figuring out my average spending on food per month?

I have a database table keeping track of every grocery delivery. It’s stored as timestamps and sums (EUR).

Currently, I do this:

SELECT (SUM("amount in EUR") / 3) 
FROM personal."food purchases" 
WHERE "purchase time" >= now() - INTERVAL '3 months';

Now, let’s say that the current day is 1st of September 2020. This “algo” will count together all the deliveries from exactly three months back from the current moment, which I guess means from the first day of June, and then simply slash this price into 3 to symbolize “three months”.

Sometimes, depending on the day, this will give a reasonable value. Other times, and I cannot fully describe/understand why, this gives either a too high or too low value. I suspect that the reason for this is that my food purchases/deliveries don’t always happen on the exact same day, and vary quite a bit in price as well. Thus, the resulting sum, even though I do an interval of three months and then slash with three, and thus “should” give the average food cost “recently”, is oftentimes misleading.

I can’t tell for sure, but I think that it sometimes includes one purchase “too many”, and sometimes “one too few”. It might even be worse than that.

Can you help me improve my formula to be more “fair”? I want to know the average amount I pay for food each month, and I’m not convinced that I’m getting that value with my current query.

I think I need to drop the part which goes three months back from the current time, and instead somehow calculates the… last three… months… um… Frankly, I don’t know what I need to do. I just don’t think that the current method is correct.

I’d appreciate if your suggestion/solution stays as close as possible to my original query. I want to understand what is happening. I actually suspect that this is a very common issue and probably built into PG and all other database softwares.

If Biden is elected will we all have the freedom and utopia that the CHOP residents experienced over the last month ?

I’m sorry Zod did the right-wing dog whistling bait an angry bitter and misinformed white male like you with horror stories of CHAZ that didn’t happen, gonna pander to MyNorthwest and KIRO Radio which are both owned by Bonneville International which is wholly owned by Deseret Management Corporation which is wholly owned by the Mormon church some more.

Lick them boots.

“Just look at democrat run cities. Thugs murdering thugs, leads in covid infections and deaths, crumbling infrastructure.”

Spoken like an out of touch hick in a trailer park

I will provide real and genuine WEBSITE TRAFFIC for 1 month for your website for $1

I will provide real and genuine WEBSITE TRAFFIC for 1 month for your website

I will provide real and genuine WEBSITE TRAFFIC for 1 month for your website for 1$

Are you looking for WEBSITE TRAFFIC?

  • We know that web traffic is the amount of data sent and received by visitors to a website.
  • To increase your sale, you must need organic traffic.
  • No generated traffic by software or bots.
  • All traffic from various types of social media and other platforms.

So, it is not an easy task to generate traffic but I will do it as a digital marketer. 

Thanking You.

.

Community of the Month #39 – Tie Breaker | Forum Promotion

Hi guys,

We ended up with a three way tie in our Community of the Month #39, so I figured I’d just make a quick public poll and provide everyone with 48 hours to place your votes.

Anyways, here are our three contestants:

Same rules apply:

  • You must have made at least 15 posts on FP within the past three months to vote in CoTM.
  • You may only vote for one of the sites listed below (which were submitted in the first half of this month).
  • You may not vote for a site that you submitted to CoTM.
  • You may not vote for a site you are an administrator on.
  • You may not ask others to vote for a site you own, or are an administrator on.
  • You may not create duplicate accounts, or use others’ accounts, to vote for a site.
  • Any other tactic to gain additional votes may result in the votes being discounted, and/or further action.

Regards,
Cam