i want to write this query for php

SET @sql = NULL; SELECT   GROUP_CONCAT(DISTINCT     CONCAT(       'max(CASE WHEN ca.date = ''',       date_format(date, '%Y-%m-%d'),       ''' THEN coalesce(ca.remarks, ''N'') END) AS `',       date_format(date, '%Y-%m-%d'), '`'     )   ) INTO @sql FROM time_dimension where date>='2020-09-01'   and date <= '2020-09-30'; select @sql; SET @sql    = CONCAT('SELECT ca.employee_id,                ', @sql, '              from             (               select c.date, a.employee_id,a.remarks               from time_dimension c               left join attendance a on c.date=a.date             ) ca             where ca.date>=''2020-09-01''               and ca.date <= ''2020-09-30''                and employee_id is not null             group by ca.employee_id'); select @sql; PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; 

Advice want to Start Playing Again! Played as an Intermediate [closed]

So I used to play a while back ago. Was never that much into it. I actually used to think it was kind of stupid but as of late have been thinking about it more and more. At times it used to bore the crap out of me but when you’d get into it time used to fly by.

I played with some guys who were jerks and used to horse around a lot but would still get into it. I have a good enough idea of what to expect because of my experience and what I was exposed to. Just wondering if there were any ideas on what could help or questions, or thoughts etc.

I’ve already mentioned it to some folks. As far as planning goes, who’s going to DM and how the group structure should work for those not sure what to expect.

Once again I was never that into it. I’ve only played with one group but I went to shops and played as a child and it had a really lasting effect on me. So I want to take it slow and do it the right way.

The challenges I face trying to play are my culture. Drinking, girls, first generation-hispanic materialistic people. They’re some talented people, they have issues like everyone. Just wanted to try something different.

Maybe some guidelines, tactics, practical knowledge or anything that can contribute to the dynamics of our group. I’ve done limited research but my memory is hazy. Have already bought the materials and want this to be a memorable experience. Thanks and any comments or feedback would be much appreciated.

Want help with proving a calculus theory

Let $ f(x)$ have a second derivative on the closed interval $ [-2,2]$ . If $ \left| f(x) \right| \le 1$ and $ \frac{1}{2} (f^{\prime}(0))^2+f(0)^3>\frac{3}{2} $ when $ -2\le x\le2$ , now I need to prove that there must be a point $ x_{0}$ on the interval $ (-2,2)$ such that $ f^{\prime \prime}\left(x_{0}\right)+3\left[f\left(x_{0}\right)\right]=0$ .

(Series[1/2 (f'[x])^2 + f[x]^3, {x, 0, 1}]) // FullSimplify  1/2 (Series[f'[x], {x, 0, 1}] // Normal)^2 + (Series[      f[x], {x, 0, 1}] // Normal)^3 // Expand  (Series[f''[x], {x, 0, 1}] // Normal)^2 + (3*Series[f[x], {x, 0, 1}] //      Normal)^2 // Expand 

The above code does not reveal the nature of the problem and solve it cleverly. What can I do to solve this problem?

i want to count the number of occurrences of certain values of my TagName column

i want to count the number of occurrences of different sensor rows in SQL, but i seem to be doing it wrong and seemingly i am not visualizing it correctly.

if i was doing this in pseudocode in a c style language i would do it like this:

FOR i in range(taglist[i]):          print(taglist[i], count(taglist[i]) ) 

i have been trying this:

Select Count(a) FROM (     SELECT Distinct [TagName]          FROM [A2ALMDB].[dbo].[AlarmMaster]         where (TagName like '%Sensor%' or GroupName like'%Sensors%')     ) a 

it returns ’66’, but i want it to return the count of each of the distinct tagnames that are returned in Select A.

Can anyone help me with how i should be trying to get all the counts of my different sensor occurrences to total instead of a count of all the distinct tagnames?

thanks for the help!

I want to buy a used docking station for my laptop. Has there ever been a case of a docking station being a security concern?

I found a used docking station for my Dell laptop. The price is very interesting and the docking station seems to be in perfect shape. But I’m somehow worried about potential security risks. After all, you could install some kind of keylogger in the station’s firmware. Am I being paranoid here or is it possible in any way?

If we want to map abbreviations of full-English words (e.g. map “Jan” to “January”), how can we identify abbreviations which map to multiple words?


Short Version:

How can we construct such a trie which maps abbreviations of names-of-the-month to full-month (we map the abbreviation "mar" to "march")?

  • The set of all abbreviations is formed by:
    • keeping the first letter of the month name. (all abbreviations of "january" begin with "j")
    • deleting 1 or more characters ("jan" deletes "uary" from "january")

The Looonnnnggg Version:

How can we construct such a trie?
What algorithm will build the appropriate trie from the container of verbose strings.

Consider the English names for months of the year:

  • January
  • February
  • March
  • April
  • [… truncated …]
  • October
  • November
  • December

We find it useful say that the English names for months of the year are "verbose" strings.
For any "verbose" string $ v$ , and any string $ a$ we say that $ a$ is an "abbreviation" of $ v$ if and only if all of the following conditions are met:

  • $ a$ non-empty. $ |a| \geq 1$
  • $ a$ can formed by deleting 1 or more characters from "verbose" string $ v$
  • $ a(1) = v(1)$ . Assume that string indexing begins at $ 1$ , and not $ 0$ .

For example, "jan" is an abbreviation of "january."

Suppose you want to write an algorithm which:

  • accepts a list of verbose strings as inputs.
  • the algorithm outputs a "trie" data-structure (information retrieval tree) $ T$ such that:
    • The trie $ T$ accepts any ASCII string as input.
    • An output (leaf node) of the trie should be set of strings $ S$ such that:
      • every string in $ S$ is a verbose string
      • the string fed as input into trie $ T$ is an abbreviation of every verbose string in container $ S$

Some examples of input to the trie and output of the trie are shown below:

  • Example 1

    • Input: "Ma"
    • Output: $ \{$ "March", "May"$ \}$
  • Example 2

    • Input: "Mar"
    • Output: $ \{$ "March"$ \}$
  • Example 3

    • Input: "Decuary"
    • Output: $ \{$ " "$ \}$ ….. the empty-set

The output from the trie should be one of:

  • the empty set
  • a set of one item
  • a set of two or more items

For months of the year, we might write javascript so that an end-user can type in any half-way reasonable date-format, instead getting an error message when they put slashes instead of dashes, etc….

If you do not like the months of the year application, a different use-case would be to write write your own Linux Shell (similar to BASH). Maybe any half-way reasonable abbreviation of "make directory" will map to "mkdir" In that case, we could have many-to-one mapping from high-level shell-commands to low-level Linux commands.

The question is:

How can we construct such a trie?
What algorithm will build the appropriate trie from the container of verbose strings.

Also, can we avoid brute-force generating a list of all aberrations before-hand? The set of all strings form-able by deleting 1 or more characters from the verbose strings is quite large. We would like to avoid combinatorial explosion, if we can.

The programming language (Java, python, C+ + ) does not matter for answering this question.

How do you deal with transparent fonts that you want to be white?

I’m a bit of a total amateur, but I thought I would learn how to make a simple game during quarantine.

However, I stumbled into a problem with fonts. I’m thinking about using the free font "Pixelmania" to show a score at the top of the screen. But the font is transparent! How do I make the inner part of the font white? Do I have to manually edit the font file myself? Or is there an easier way?

enter image description here