command line – output formatting issue in vs code terminal with multiple test cases

I’m having a issue with vs code terminal. Whenever I run a code which takes multiple test cases, the output which shows in the terminal is wrongly formatted. What I want is that the output of all the test cases should be shown at the end, but what happens is that 1st test case’s output gets mixed with 2nd test case input. Please help me solve this issue. Thanks!
Below is the image for the test case and expected output and what I’m getting as an output in my vs code in ubuntu :
[extected output][1]: https://i.stack.imgur.com/XBFR7.png

[output format which I get if I copy paste the input and run the code][2]: https://i.stack.imgur.com/THb0G.png

Thanks a lot once again, I hope to get my problem solved as soon as possible. I’m stuck at this issue for a long time and wasn’t able to find any fix even after searching lot on the internet.

How to make a finite state machine when input sequence is given 00010101 and output for this sequence is given is 011001110

A three-state finite machine has {0,1} as its input and output alphabets. Given the following input sequence and its corresponding output sequence , determine the machine

Input Sequence : 00010101

Output Sequence : 011001110

I am a beginner in Finite state machine topic, I can draw only simple FSM, but don’t have any idea about this , Any type of answer will be appreciate.

Interpreting Python List Output

I am having a hard time understanding why the output of this Python code is 1. Just to add, I am just new to programming:

What is the output of the following snippet:
lst = (3, 1, -2)
print(lst(lst(-1)))

output formatting – Inequalities having Inequality[] InputForm

I’m having a tough time dealing with inequalities.

in[]: -1 <= x // InputForm
out[]: -1 <= x
in[]: -1 <= x <= 1/2 // InputForm
out[]: -1 <= x <= 1/2

So far so good, but

in[]: -1 <= x < 1/2 // InputForm
out[]: Inequality[-1, LessEqual, x, Less, 1/2]

I do not want such Inequality[] function that looks like a FullForm not InputForm !
It seems so toggle when there is a combination of Less and LessEqual…

I tried to splits the Inequality but I do not want this output…

in[]: Reduce`InequalityExpand[-1 <= x < 1/2] // InputForm
out[]: -1 <= x && x < 1/2

How to deal with this behavior ?

NB : InputForm matters for me, I’d like to get this one line output.

reduce output gain of in-call audio for headphones. android 9.0 , rooted

The lowest in-call audio is too loud for me while using headphones. I cant reduce to zero, it caps at a limit. How can i reduce output gain of in-call audio especially for headphones?

so far i tried with “viper4androidfx” but it doesn’t have any effect on in-call volume but media volumes has effect. can i edit /system/vendor/etc/audio_policy_volumes.xml to reduce even more?

My audio_policy_volumes.xml

r – Custom loader is displayed before the beginning of output creation process n a shiny app

I have the shiny dashboard below in which if I give a name except of the default consent.name,give the password makis and press the Get started an rmd output is generated.
As you will see while the report is being created a loading message is displayed. The issue is that this loading message is displayed before doing anything at all and this is confusing. How can this loading message be displayed only when the Name and Password inputs are correct and the Get started actionButton() is pushed? I believe that the loading message created with withLoader() should be moved from the ui to the server part of the code in order to follow the same logic as the rmarkdown uiOutput().

the ex.rmd

---
title: "An example Knitr/R Markdown document"
output: pdf_document
---


{r chunk_name, include=FALSE}
x <- rnorm(100)
y <- 2*x + rnorm(100)
cor(x, y)

and the app.

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(shinyjs)
library(knitr)
library(shinycustomloader)
dbHeader <- dashboardHeaderPlus(
  titleWidth = "0px",
  tags$li(a(
    div(style="display: inline;margin-top:25px; padding: 0px 0px 0px 1250px;vertical-align:top; width: 150px;", actionButton("well", "Welcome")),

  ),
  class = "dropdown")
  
  
)

shinyApp(
  ui = dashboardPagePlus(
    header = dbHeader,
    sidebar = dashboardSidebar(width = "0px",
                               sidebarMenu(id = "sidebar", # id important for updateTabItems
                                           menuItem("Welcome", tabName = "well", icon = icon("house"))
                               )           ),
    body = dashboardBody(
      
      useShinyjs(),
      tags$script(HTML("$('body').addClass('fixed');")),
      
      tags$head(tags$style(".skin-blue .main-header .logo { padding: 0px;}")),
      tabItems(
        tabItem("well",
                fluidRow(),
                tags$hr(),
                tags$hr(),
                fluidRow(
                  fluidRow(textInput("name", label = ("Name"), value = "consent.name")),
                  passwordInput("pwd", "Enter the Database browser password"),
                  withLoader(uiOutput('markdown'),type="html",loader = "loader1"),
                  actionButton("button", "Get started",style='padding:4px; font-size:140%')
                  ))
       
      )
      
      
    )
    
  ),
  server<-shinyServer(function(input, output,session) { 
    hide(selector = "body > div > header > nav > a")
    
    observeEvent(input$button,{
      if (input$name=="consent.name"){
        return(NULL)
      }
      else{
        if(input$pwd=="makis"){
          output$markdown <- renderUI({
            HTML(markdown::markdownToHTML(knit('ex.rmd', quiet = TRUE)))
          })
          
        }
        else{
          return(NULL)
        }
      }
    })
    
  }
  )
)

terminal – PHPUnit always output “No tests executed!” on MacOS Big Sur

When trying to run any PHPUnit tests, I always get a No tests executed! message on my MacOS machine. A simple way to reproduce, on this specific machine, is to install a fresh instance of Laravel and running the default tests :

$ composer create-project --prefer-dist laravel/laravel blog
$ cd blog
$ vendor/bin/phpunit

=> No tests executed!

The expected output would be OK (2 tests, 2 assertions).

As far as I know, this is not a PHPUnit configuration issue since the default Laravel code is expected to work, the same issue appear with other framework and any code I try, the same issue is present with different PHPUnit version (8.5 and 9.4) and the exact steps listed above return the expected output inside an Ubuntu VM as well as on another Mac running Catalina.

Actually, I suspect it is not a PHPUnit issue, but more of a MacOS issue or a PHP configuration issue, one that could manifest in other form later with another tool or project.

PHPUnit used to work fine on this machine, but it’s been a couples weeks/months I didn’t actually used it. The only thing that changed since I last (successfully) used any PHPUnit on this Mac as been upgrading to MacOS Big Sur and installing (then uninstalling) Homebrew.

The issue appears PHPUnit can’t find any testsuite. Running vendor/bin/phpunit --testsuite Unit still output No tests executed! while, inside a fresh Laravel install, should output Ok (1 test, 1 assertion).

So my question is : Is there anything else I can try to fix this before doing a fresh install of macOS Big Sur, and is anyone having the same issue?

amazon web services – How do you set up a custom “log table” for CloudWatch so that you can see the output of tabular data?

I’d like to create a widget on the AWS dashboard which contains the output of docker service ls and ideally a way of drilling down so I can see the docker service ps of a specific service.

I see there’s the “log” widget, I was thinking I can repurpose that for the output, but I am not sure how to get the inputs for it.

I am presuming I can create a Python/Perl BOTO client that would output the data to cloudwatch regularly.

front end – Mathematica refuses to output ContourIntegral and DoubleContourIntegral in nice mathmatical Notation

I experience a strange behaviour of handling the Contour and Double Contour Integral symbols (ContourIntegral) and (DoubleContourIntegral) in Mathematica. Whatever I try theyy behave differently than (Integral).
Consider the following input

Integrate(f(x), x (Element) V)
ContourIntegral(f(x), x (Element) t)
DoubleContourIntegral(f(x), x (Element) S)

The first statement outputs a nice mathematical notation using the (Integral) Symbol (ignoring the obvious and clear error about the invalid integration variable). The other two, dont evaluate to any of the symbols. Even if I enter the above Contour Integrals with (ContourIntegral) and (DoubleContourIntegral) notation they evaluate to the ContourIntegral and DoubleContourIntegral forms. Trying TraditionalForm, HoldForm or Inactivate do not help either. Any Ideas how to convince Mathematica that the symbols stay in the original entry form?

Conditional Fields for Contact Form 7 not working and displaying [/group] in output

I’m trying to get Conditional Fields for Contact Form 7 up and running in WordPress. I’m using Contact Form 7 version 5.1.3 and Contact Form 7 Conditional Fields version 1.9.14.

I’m trying to follow this tutorial, which gives you the final code to paste into the Contact Form 7 Form tab:

Your name: [text your-name]
Your email address: [email* your-email]
<p>What kind of support do you want?
[select* support-type first_as_label "-- Choose support type --" "Technical support" "Sales"]</p>
[group technical-support-selected]
  <p>Your operating system: [select* operating-system first_as_label "-- Choose your operating system --" "Android" "iOS" "Linux" "Windows" "Other"]</p>
  [group os-selected]
<p>Please specify your [group os-android inline]Android[/group][group os-iOS inline]iOS[/group][group os-linux inline]Linux[/group][group os-windows inline]Windows[/group] version:
    [text* version]</p>
  [/group]
  [group os-other-selected]
    <p>Please specify your OS and version.
    [text* other-os "Operating System"][text* other-version "Version"]</p>
  [/group]
[/group]
[group sales-support-selected]
  <p>Where is your business located?
  [select* continent first_as_label "-- Choose your continent --" "Europe" "America" "Africa" "Asia" "Oceania" "Antarctica"]</p>
[/group]

<p>[textarea comments]</p>

[submit "Send"]

and this code to paste into the Conditional Fields tab in Text view:

show [technical-support-selected] if [support-type] equals "Technical support"
show [sales-support-selected] if [support-type] equals "Sales"
show [os-selected] if [operating-system] not equals ""
               and if [operating-system] not equals "Other"
show [os-android] if [operating-system] equals "Android"
show [os-iOS] if [operating-system] equals "iOS"
show [os-linux] if [operating-system] equals "Linux"
show [os-windows] if [operating-system] equals "Windows"
show [os-other-selected] if [operating-system] equals "Other"

However, when I paste the code in, the final output isn’t hiding anything and [/group] shows through to the output. Here’s a screen grab:

enter image description here

Any idea how I can get this working?