List categories with posts – WordPress Development Stack Exchange

Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Query Optimization for Subquery – Database Administrators Stack Exchange

Please help to optimize below MySQL query

        (SELECT GROUP_CONCAT(revenue)FROM LOGS WHERE user_id = AND TYPE ='conversion') AS revenue,
        (SELECT SUM(revenue) FROM LOGS WHERE TYPE ='impression' AND user_id = ) AS totalImpressions,
        (SELECT SUM(revenue) FROM LOGS WHERE user_id = AND TYPE ='conversion') AS totalConversions,
        (SELECT MIN(TIME) FROM LOGS WHERE user_id = ) AS minTime,
        (SELECT MAX(TIME) FROM LOGS WHERE user_id = ) AS maxTime
         FROM users u  

Starting Full Stack Engineer and Blockchain Developer School – Hey There

Just wanted to stop in and say "hey" to everyone. Here's a little info about me:

* 2018 I was diagnosed w/a severe case of degenerative disc disease and severe arthritis.
* Spent a year and 3 months trying to relieve chronic pain in my neck w/dr. visits.
* May of 2019 had no other choice but to get a disc replacement surgery C4-C5
* Scraped all the arthritis out around it, because it was an experimental piece/not a fusion.
* Took 6 months to get back to "my normal."
* Couple months later…

Starting Full Stack Engineer and Blockchain Developer School – Hey There

On/off buttons in Phaser – Game Development Stack Exchange

I am trying to make an on/off button for audio in Phaser, and when you click on the button once it shows the off button, but when I click on it again, the on button does not show. Right now I did not implement the audio feature, I am just working on the button itself first. Here is the code:

 soundOnOff() {
 gameState.on = this.add.image(this.config.width - 20 , 0 + 30, 'on')
 .setScale(2); = this.add.image(this.config.width - 20 , 0 + 30, 'off')

 gameState.on.setInteractive();; = false;

 gameState.on.on('pointerdown', () => {
 gameState.on.visible = false; = true;
 });'pointerdown', () => {
gameState.on.visible = true; = false;


Please tell me how I can fix this! Also, how do I make my bird, in gameState.bird, not jump when I click the button. Thank You!

Understand Scala Implicit classes – Stack Overflow

I am reading a Spark in Action book, I came across a construct that even after a while working with Scala I still can’t understand. Here is the code (complete code) :

First we have a case class where RDD will be converted to DataFrame using this case class:

     import java.sql.Timestamp
        case class Post(
     ... ) 

Then we define an object with implicit class

object StringImplicits {

    implicit class StringImprovements(val s: String) {
    import scala.util.control.Exception.catching

    def toIntSafe = catching(classOf(NumberFormatException)) opt s.toInt

    def toLongSafe = catching(classOf(NumberFormatException)) opt s.toLong

    def toTimestampSafe = catching(classOf(IllegalArgumentException)) opt


Then we import the object which is already in scope for some reason and now looks like all String object has the three methods defined in StringImprovements

import StringImplicits._

def stringToPost(row: String): Post = {
  val r = row.split("~")


  • Why do we need to need to import an already in scope object?
  • Which statement exactly assigned these methods to the String object, this is so confusing?

Reading implicit classes doc it makes some sense but not everything is clear. For example how come this is a valid expression

scala> 5 times println("HI")

I understand if it was


javascript – FizzBuzz solution – Code Review Stack Exchange

I’m preparing for junior developer interviews and am trying to come up with a more interesting/versatile solution to FizzBuzz than I’ve done in the past. Any ideas of how I might DRY this up? Is it too difficult to read?

const isMultiple = (num, mod) => {
    return num % mod == 0

const fizzBuzz = (range, array) => {
    return (...Array(range)).fill('').map((el,i) => {
    i ++
    for (let element of array) { 
        isMultiple(i,element.number) && (el += 
        if (el == "") el = i
    return el

const objArr = (
    number: 3, 
    name: "Fizz"
    number: 5, 
    name: "Buzz"


UK visitors visa refusal – Travel Stack Exchange

My UK visitors visa was refused on August 2019.

I acknowledge you have submitted a letter from your family and sponsor and documents demonstrating their funds I am satisfied that your sponsor who I understand is your next of kin have sufficient funds to meet the cost relating to your visit. However it is your own circumstances which are of Paramount importance in the assessment of my application.

Then they said I stated I was a student but the information provided does not demonstrate I am a student or currently enrolled in an academic institution, then they said it is also unclear from my application and information provided how I am financially supported to meet the course of living in my country.

They said against this background I am not satisfied you have established the strength of your ties, is such that represents a strong reason for you to leave the UK afte the limited period I stated. My pplication was refused on 4.2 a abd c

I want to reapply now. I have evidence of being a student now. And I have started in my application my aunt have been the one supporting financially since my father is dead.

What are my chances of getting this visitors visa?

Empty String in Automata – Computer Science Stack Exchange

Thanks for contributing an answer to Computer Science Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

cryptography – Encryption layers – Information Security Stack Exchange

I’m curious, as a green programmer, if one used layers of encryption methods, would this be more difficult to crack or impossible?


Layer 1- encryption method 1 “Encrypt this string”

Apply crypto = “encrypted mumbo jumbo”

Layer 2- encryption method 2 “encrypted mumbo jumbo”

Apply crypto layer 2 = “encrypted mumbo jumbo becomes encrypted mumbo jumbo”

And so on…

Does this heighten security and if so does would this take a long time to decrypt?

Edit Comments Fields – WordPress Development Stack Exchange

I need to edit the comments fields.

1 – The metadata should be only date;
2 – The comment itself should be trimmed;
3 – the word ‘says’ next to the name should be gone;

I believe I can manage the logics, however I do not know how to get these fields, apply the logic, and return them.

enter image description here

<article id="div-comment-5" class="comment-body">
                <footer class="comment-meta">
                    <div class="comment-author vcard">
                        <img alt="" src=";d=mm&amp;r=g" srcset=";d=mm&amp;r=g 2x" class="avatar avatar-50 photo" height="50" width="50" loading="lazy">                        <b class="fn"><a href="http://mundo.local" rel="external nofollow ugc" class="url">Stefano Monteiro</a></b> <span class="says">says:</span>                 </div><!-- .comment-author -->

                    <div class="comment-metadata">
                        <a href="http://mundo.local/videos/music-classic-canada-37/#comment-5"><time datetime="2021-01-21T17:59:16+00:00">January 21, 2021 at 5:59 pm</time></a> <span class="edit-link"><a class="comment-edit-link" href="http://mundo.local/wp-admin/comment.php?action=editcomment&amp;c=5">Edit</a></span>                 </div><!-- .comment-metadata -->

                                    </footer><!-- .comment-meta -->

                <div class="comment-content">
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
                </div><!-- .comment-content -->

                <div class="reply"><a rel="nofollow" class="comment-reply-link" href="http://mundo.local/videos/music-classic-canada-37/?replytocom=5#respond" data-commentid="5" data-postid="830" data-belowelement="div-comment-5" data-respondelement="respond" data-replyto="Reply to Stefano Monteiro" aria-label="Reply to Stefano Monteiro">Reply</a></div>