text:
Q: How to make the middle of a repeating-conic-gradient transparent? I am trying to make the middle of a conic-gradient see-through/ transparent.
Which is bellow this example.
This makes it transparent in the middle using a radial gradient:
background: radial-gradient(circle, transparent 0% 35%, #0a0a0a 35%);

https://jsfiddle.net/jty64ha3/

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  --color-a: blue;
  --color-b: black;
  --color-c: red;
  --color-d: black;

  background-size: 165px 165px;
  background-image:
    linear-gradient(var(--color-a) 5px, #0000 5px),
    linear-gradient(90deg, var(--color-a) 5px, #0000 5px),

    linear-gradient(var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px),
    linear-gradient(90deg, var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px),

    linear-gradient(var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px),
    linear-gradient(90deg, var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px),

    linear-gradient(var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px),
    linear-gradient(90deg, var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px),

    linear-gradient(var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px),
    linear-gradient(90deg, var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px),

    linear-gradient(var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px),
    linear-gradient(90deg, var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px),

    linear-gradient(var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px),
    linear-gradient(90deg, var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px),

    linear-gradient(var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px),
    linear-gradient(90deg, var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px),

    linear-gradient(var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px),
    linear-gradient(90deg, var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px),

    linear-gradient(var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px),
    linear-gradient(90deg, var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px),

    linear-gradient(var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px),
    linear-gradient(90deg, var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px),

    linear-gradient(var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px),
    linear-gradient(90deg, var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px),

    linear-gradient(var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px),
    linear-gradient(90deg, var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px),

    linear-gradient(var(--color-b) 70px, #0000 70px 100px, var(--color-b) 100px),
    linear-gradient(90deg, var(--color-b)70px, #0000 70px 100px, var(--color-b) 100px),

    linear-gradient(var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px),
    linear-gradient(90deg, var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px),

    linear-gradient(var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px),
    linear-gradient(90deg, var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px),

    linear-gradient(var(--color-a), var(--color-a));
}

.outer {
  display: flex;
  min-height: 100vh;
  align-content: center;
}

.ratio-keeper {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  margin: auto;
  overflow: hidden;
  border: 1px solid #333;
}

.curtain {
  flex: 1 0 0;
  margin: auto;
  max-width: 642px;
  /*box-shadow: inset 0 -2px 0px 0px #0a0a0a;*/
  border: 20px solid #000;
  border-radius: 3.2px;
  border-color: #000 #101010 #000 #101010;
  background: radial-gradient(circle, transparent 0% 35%, #0a0a0a 35%);
  /*background-image: repeating-conic-gradient(blue, black 0.00306deg);*/
}

.fence {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" ><path stroke="rgb(113, 121, 126)" d="m10 .15-4.85 4.85 4.85 4.85v.15h-.13l-4.86-4.86-4.86 4.86h-.15v-.14l4.87-4.86-4.87-4.87v-.13h.15l4.86 4.86 4.85-4.86h.14z"/></svg>');
  filter: drop-shadow(0 0 5px #000);
  clip-path: circle(25% at center);
  animation: fade 8s linear;
}

@keyframes fade {
  0% {
    opacity: 0.9;

  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.9;
  }
}

.fence>div {
  position: absolute;
  /*top: 0;*/
  left: 0;
  right: 0;
  /*width: 100%;*/
  height: 0.55%;
  /*height: 2px;*/
  background: green;

}

.fence>div:nth-child(1) {
  top: 10%;
}

.fence>div:nth-child(2) {
  top: 20%;
}

.fence>div:nth-child(3) {
  top: 30%;
}

.fence>div:nth-child(4) {
  top: 40%;
}

.fence>div:nth-child(5) {
  top: 50%;
}

.fence>div:nth-child(6) {
  top: 60%;
}

.fence>div:nth-child(7) {
  top: 70%;
}

.fence>div:nth-child(8) {
  top: 80%;
}

.fence>div:nth-child(9) {
  top: 90%;
}

.fan svg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 70%;
  margin: auto;
  animation: fan-spin 100s linear;
}

@keyframes fan-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.cross::before,
.cross::after {
  content: "";
  background: black;

}

.cross::before

/*horizontal*/
  {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 100%;*/
  /*height: 10px;*/
  height: 2.8%;
  clip-path: circle(29% at center);
}

.cross::after

/*vertical*/
  {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 10px;*/
  width: 1.5%;
  /*height: 100%;*/
  clip-path: circle(51% at center);
}

        <svg xmlns="http://www.w3.org/2000/svg" width="70%" height="70%" viewBox="76 130 381 381">
          <path fill="#000100" stroke="#000" d="m166.3352 168.6294c5.5396 2.4448 45.2339 54.394 72.7499 91.0151-9.1901-44.8757-21.7959-109.0279-19.9558-114.796 4.1462-12.9949 33.7039-13.5172 41.5845-13.7579 7.8827-.2415 37.4165-1.5221 42.3488 11.1948 2.1872 5.6436-6.4773 70.4506-12.9142 115.8007 25.2309-38.2323 61.6818-92.5089 67.0612-95.2865 12.119-6.2568 33.3898 14.2749 39.1337 19.6768 5.7424 5.402 27.5341 25.3815 22.0294 37.859-2.4441 5.5389-54.3954 45.2354-91.0172 72.7506 44.8757-9.1901 109.0293-21.7959 114.7974-19.9559 12.9927 4.1442 13.5193 33.7032 13.7586 41.5838.2422 7.8819 1.5221 37.4165-11.192 42.3473-5.6471 2.1894-70.4541-6.4765-115.8049-12.9127 38.2323 25.2323 92.5081 61.6783 95.2871 67.0605 6.2581 12.1175-14.2742 33.3877-19.6776 39.133-5.4027 5.7432-25.3815 27.5341-37.8563 22.0279-5.5396-2.4434-45.2361-54.3961-72.7534-91.0143 9.1901 44.8757 21.7952 109.0287 19.9551 114.7953-4.1434 12.9934-33.7026 13.5157-41.5852 13.7586-7.8799.24-37.4165 1.5221-42.3431-11.1936-2.1887-5.6464 6.4779-70.4541 12.9133-115.8071-25.2323 38.2323-61.6824 92.5124-67.0639 95.2908-12.1169 6.256-33.3891-14.2728-39.1337-19.6754-5.7432-5.4027-27.5313-25.383-22.0251-37.8578 2.4434-5.5396 54.394-45.2339 91.0136-72.7526-44.8764 9.1908-109.0266 21.7944-114.7967 19.9566-12.9934-4.1434-13.5171-33.7025-13.7586-41.5852-.2407-7.8806-1.5221-37.4165 11.1963-42.346 5.6443-2.1879 70.4498 6.4752 115.8 12.9121-38.233-25.2316-92.5081-61.6783-95.2865-67.0612-6.256-12.1169 14.2748-33.3913 19.6768-39.1337 5.4006-5.7438 25.3794-27.5333 37.8584-22.0272z" />
        </svg>

But if I want to use a conic-gradient instead as the background, how do I make the middle transparent? https://jsfiddle.net/yug4ht8n/
repeating-conic-gradient(blue, black 0.00306deg);

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  --color-a: blue;
  --color-b: black;
  --color-c: red;
  --color-d: black;

  background-size: 165px 165px;
  background-image:
    linear-gradient(var(--color-a) 5px, #0000 5px),
    linear-gradient(90deg, var(--color-a) 5px, #0000 5px),

    linear-gradient(var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px),
    linear-gradient(90deg, var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px),

    linear-gradient(var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px),
    linear-gradient(90deg, var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px),

    linear-gradient(var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px),
    linear-gradient(90deg, var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px),

    linear-gradient(var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px),
    linear-gradient(90deg, var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px),

    linear-gradient(var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px),
    linear-gradient(90deg, var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px),

    linear-gradient(var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px),
    linear-gradient(90deg, var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px),

    linear-gradient(var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px),
    linear-gradient(90deg, var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px),

    linear-gradient(var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px),
    linear-gradient(90deg, var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px),

    linear-gradient(var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px),
    linear-gradient(90deg, var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px),

    linear-gradient(var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px),
    linear-gradient(90deg, var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px),

    linear-gradient(var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px),
    linear-gradient(90deg, var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px),

    linear-gradient(var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px),
    linear-gradient(90deg, var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px),

    linear-gradient(var(--color-b) 70px, #0000 70px 100px, var(--color-b) 100px),
    linear-gradient(90deg, var(--color-b)70px, #0000 70px 100px, var(--color-b) 100px),

    linear-gradient(var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px),
    linear-gradient(90deg, var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px),

    linear-gradient(var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px),
    linear-gradient(90deg, var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px),

    linear-gradient(var(--color-a), var(--color-a));
}

.outer {
  display: flex;
  min-height: 100vh;
  align-content: center;
}

.ratio-keeper {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  margin: auto;
  overflow: hidden;
  border: 1px solid #333;
}

.curtain {
  flex: 1 0 0;
  margin: auto;
  max-width: 642px;
  /*box-shadow: inset 0 -2px 0px 0px #0a0a0a;*/
  border: 20px solid #000;
  border-radius: 3.2px;
  border-color: #000 #101010 #000 #101010;
  /*background: radial-gradient(circle, transparent 0% 35%, #0a0a0a 35%);*/
  background-image: repeating-conic-gradient(blue, black 0.00306deg);
}

.fence {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" ><path stroke="rgb(113, 121, 126)" d="m10 .15-4.85 4.85 4.85 4.85v.15h-.13l-4.86-4.86-4.86 4.86h-.15v-.14l4.87-4.86-4.87-4.87v-.13h.15l4.86 4.86 4.85-4.86h.14z"/></svg>');
  filter: drop-shadow(0 0 5px #000);
  clip-path: circle(25% at center);
  animation: fade 8s linear;
}

@keyframes fade {
  0% {
    opacity: 0.9;

  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.9;
  }
}

.fence>div {
  position: absolute;
  /*top: 0;*/
  left: 0;
  right: 0;
  /*width: 100%;*/
  height: 0.55%;
  /*height: 2px;*/
  background: green;

}

.fence>div:nth-child(1) {
  top: 10%;
}

.fence>div:nth-child(2) {
  top: 20%;
}

.fence>div:nth-child(3) {
  top: 30%;
}

.fence>div:nth-child(4) {
  top: 40%;
}

.fence>div:nth-child(5) {
  top: 50%;
}

.fence>div:nth-child(6) {
  top: 60%;
}

.fence>div:nth-child(7) {
  top: 70%;
}

.fence>div:nth-child(8) {
  top: 80%;
}

.fence>div:nth-child(9) {
  top: 90%;
}

.fan svg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 70%;
  margin: auto;
  animation: fan-spin 100s linear;
}

@keyframes fan-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.cross::before,
.cross::after {
  content: "";
  background: black;

}

.cross::before

/*horizontal*/
  {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 100%;*/
  /*height: 10px;*/
  height: 2.8%;
  clip-path: circle(29% at center);
}

.cross::after

/*vertical*/
  {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 10px;*/
  width: 1.5%;
  /*height: 100%;*/
  clip-path: circle(51% at center);
}

        <svg xmlns="http://www.w3.org/2000/svg" width="70%" height="70%" viewBox="76 130 381 381">
          <path fill="#000100" stroke="#000" d="m166.3352 168.6294c5.5396 2.4448 45.2339 54.394 72.7499 91.0151-9.1901-44.8757-21.7959-109.0279-19.9558-114.796 4.1462-12.9949 33.7039-13.5172 41.5845-13.7579 7.8827-.2415 37.4165-1.5221 42.3488 11.1948 2.1872 5.6436-6.4773 70.4506-12.9142 115.8007 25.2309-38.2323 61.6818-92.5089 67.0612-95.2865 12.119-6.2568 33.3898 14.2749 39.1337 19.6768 5.7424 5.402 27.5341 25.3815 22.0294 37.859-2.4441 5.5389-54.3954 45.2354-91.0172 72.7506 44.8757-9.1901 109.0293-21.7959 114.7974-19.9559 12.9927 4.1442 13.5193 33.7032 13.7586 41.5838.2422 7.8819 1.5221 37.4165-11.192 42.3473-5.6471 2.1894-70.4541-6.4765-115.8049-12.9127 38.2323 25.2323 92.5081 61.6783 95.2871 67.0605 6.2581 12.1175-14.2742 33.3877-19.6776 39.133-5.4027 5.7432-25.3815 27.5341-37.8563 22.0279-5.5396-2.4434-45.2361-54.3961-72.7534-91.0143 9.1901 44.8757 21.7952 109.0287 19.9551 114.7953-4.1434 12.9934-33.7026 13.5157-41.5852 13.7586-7.8799.24-37.4165 1.5221-42.3431-11.1936-2.1887-5.6464 6.4779-70.4541 12.9133-115.8071-25.2323 38.2323-61.6824 92.5124-67.0639 95.2908-12.1169 6.256-33.3891-14.2728-39.1337-19.6754-5.7432-5.4027-27.5313-25.383-22.0251-37.8578 2.4434-5.5396 54.394-45.2339 91.0136-72.7526-44.8764 9.1908-109.0266 21.7944-114.7967 19.9566-12.9934-4.1434-13.5171-33.7025-13.7586-41.5852-.2407-7.8806-1.5221-37.4165 11.1963-42.346 5.6443-2.1879 70.4498 6.4752 115.8 12.9121-38.233-25.2316-92.5081-61.6783-95.2865-67.0612-6.256-12.1169 14.2748-33.3913 19.6768-39.1337 5.4006-5.7438 25.3794-27.5333 37.8584-22.0272z" />
        </svg>

A: We can use mask-image like this:
  mask-image: radial-gradient(circle, transparent 0% 33%, black 33%);

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  --color-a: blue;
  --color-b: black;
  --color-c: red;
  --color-d: black;
  background-size: 165px 165px;
  background-image: linear-gradient(var(--color-a) 5px, #0000 5px), linear-gradient(90deg, var(--color-a) 5px, #0000 5px), linear-gradient(var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px), linear-gradient(90deg, var(--color-b) 10px, #0000 10px 160px, var(--color-b) 160px), linear-gradient(var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px), linear-gradient(90deg, var(--color-c) 15px, #0000 15px 155px, var(--color-c) 155px), linear-gradient(var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px), linear-gradient(90deg, var(--color-d) 20px, #0000 20px 150px, var(--color-d) 150px), linear-gradient(var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px), linear-gradient(90deg, var(--color-a) 25px, #0000 25px 145px, var(--color-a) 145px), linear-gradient(var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px), linear-gradient(90deg, var(--color-b) 30px, #0000 30px 140px, var(--color-b) 140px), linear-gradient(var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px), linear-gradient(90deg, var(--color-c) 35px, #0000 35px 135px, var(--color-c) 135px), linear-gradient(var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px), linear-gradient(90deg, var(--color-d) 40px, #0000 40px 130px, var(--color-d) 130px), linear-gradient(var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px), linear-gradient(90deg, var(--color-a) 45px, #0000 45px 125px, var(--color-a) 125px), linear-gradient(var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px), linear-gradient(90deg, var(--color-b) 50px, #0000 50px 120px, var(--color-b) 120px), linear-gradient(var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px), linear-gradient(90deg, var(--color-c) 55px, #0000 55px 115px, var(--color-c) 115px), linear-gradient(var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px), linear-gradient(90deg, var(--color-d) 60px, #0000 60px 110px, var(--color-d) 110px), linear-gradient(var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px), linear-gradient(90deg, var(--color-a) 65px, #0000 65px 105px, var(--color-a) 105px), linear-gradient(var(--color-b) 70px, #0000 70px 100px, var(--color-b) 100px), linear-gradient(90deg, var(--color-b)70px, #0000 70px 100px, var(--color-b) 100px), linear-gradient(var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px), linear-gradient(90deg, var(--color-c) 75px, #0000 75px 95px, var(--color-c) 95px), linear-gradient(var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px), linear-gradient(90deg, var(--color-d) 80px, #0000 80px 90px, var(--color-d) 90px), linear-gradient(var(--color-a), var(--color-a));
}

.outer {
  display: flex;
  min-height: 100vh;
  align-content: center;
  position: relative;
}

.ratio-keeper {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  margin: auto;
  overflow: hidden;
  border: 1px solid #333;
}

.curtain {
  flex: 1 0 0;
  margin: auto;
  max-width: 642px;
  /*box-shadow: inset 0 -2px 0px 0px #0a0a0a;*/
  border: 20px solid #000;
  border-radius: 3.2px;
}

.curtainBack {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  max-width: 642px;
  width: 100%;
  padding-top: min(400px, 56.25%);
  max-height: 403px;

  margin: auto;
  overflow: hidden;

  background-image: repeating-conic-gradient(blue, black 0.00306deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0% 32%, black 32%);
  mask-image: radial-gradient(circle, transparent 0% 122px, black 122px);

}

.fence {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" ><path stroke="rgb(113, 121, 126)" d="m10 .15-4.85 4.85 4.85 4.85v.15h-.13l-4.86-4.86-4.86 4.86h-.15v-.14l4.87-4.86-4.87-4.87v-.13h.15l4.86 4.86 4.85-4.86h.14z"/></svg>');
  filter: drop-shadow(0 0 5px #000);
  clip-path: circle(25% at center);
  animation: fade 8s linear;
}

@keyframes fade {
  0% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
  }
}

.fence>div {
  position: absolute;
  /*top: 0;*/
  left: 0;
  right: 0;
  /*width: 100%;*/
  height: 0.55%;
  /*height: 2px;*/
  background: green;
}

.fence>div:nth-child(1) {
  top: 10%;
}

.fence>div:nth-child(2) {
  top: 20%;
}

.fence>div:nth-child(3) {
  top: 30%;
}

.fence>div:nth-child(4) {
  top: 40%;
}

.fence>div:nth-child(5) {
  top: 50%;
}

.fence>div:nth-child(6) {
  top: 60%;
}

.fence>div:nth-child(7) {
  top: 70%;
}

.fence>div:nth-child(8) {
  top: 80%;
}

.fence>div:nth-child(9) {
  top: 90%;
}

.fan svg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 70%;
  margin: auto;
  animation: fan-spin 100s linear;
}

@keyframes fan-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cross::before,
.cross::after {
  content: "";
  background: black;
}

.cross::before
/*horizontal*/

{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 100%;*/
  /*height: 10px;*/
  height: 2.8%;
  clip-path: circle(29% at center);
}

.cross::after
/*vertical*/

{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /*width: 10px;*/
  width: 1.5%;
  /*height: 100%;*/
  clip-path: circle(51% at center);
}

        <svg xmlns="http://www.w3.org/2000/svg" width="70%" height="70%" viewBox="76 130 381 381">
          <path fill="#000100" stroke="#000" d="m166.3352 168.6294c5.5396 2.4448 45.2339 54.394 72.7499 91.0151-9.1901-44.8757-21.7959-109.0279-19.9558-114.796 4.1462-12.9949 33.7039-13.5172 41.5845-13.7579 7.8827-.2415 37.4165-1.5221 42.3488 11.1948 2.1872 5.6436-6.4773 70.4506-12.9142 115.8007 25.2309-38.2323 61.6818-92.5089 67.0612-95.2865 12.119-6.2568 33.3898 14.2749 39.1337 19.6768 5.7424 5.402 27.5341 25.3815 22.0294 37.859-2.4441 5.5389-54.3954 45.2354-91.0172 72.7506 44.8757-9.1901 109.0293-21.7959 114.7974-19.9559 12.9927 4.1442 13.5193 33.7032 13.7586 41.5838.2422 7.8819 1.5221 37.4165-11.192 42.3473-5.6471 2.1894-70.4541-6.4765-115.8049-12.9127 38.2323 25.2323 92.5081 61.6783 95.2871 67.0605 6.2581 12.1175-14.2742 33.3877-19.6776 39.133-5.4027 5.7432-25.3815 27.5341-37.8563 22.0279-5.5396-2.4434-45.2361-54.3961-72.7534-91.0143 9.1901 44.8757 21.7952 109.0287 19.9551 114.7953-4.1434 12.9934-33.7026 13.5157-41.5852 13.7586-7.8799.24-37.4165 1.5221-42.3431-11.1936-2.1887-5.6464 6.4779-70.4541 12.9133-115.8071-25.2323 38.2323-61.6824 92.5124-67.0639 95.2908-12.1169 6.256-33.3891-14.2728-39.1337-19.6754-5.7432-5.4027-27.5313-25.383-22.0251-37.8578 2.4434-5.5396 54.394-45.2339 91.0136-72.7526-44.8764 9.1908-109.0266 21.7944-114.7967 19.9566-12.9934-4.1434-13.5171-33.7025-13.7586-41.5852-.2407-7.8806-1.5221-37.4165 11.1963-42.346 5.6443-2.1879 70.4498 6.4752 115.8 12.9121-38.233-25.2316-92.5081-61.6783-95.2865-67.0612-6.256-12.1169 14.2748-33.3913 19.6768-39.1337 5.4006-5.7438 25.3794-27.5333 37.8584-22.0272z" />
        </svg>


text:
Q: Get SAPUI5 VizFrame's id in dataPointStyle rule callback I am generating some dynamic vizframe column charts by looping at the response I get from my Odata service. One of my requirement for the chart is to show columns in different color depending on the value of a field I have in data. Let's call it validation status.
I have a fairly good idea on how to achieve this in normal situations by using the setVizProperties method and setting up rules for the dataPointStyle properties. It would still have been possible if I had the same criteria for all the charts and all the values. But that isn't the case since I need to check each record individually to determine it's status. So I thought of using the callback functionality of the dataPointStyle. But the problem here is that although it gives me the context but it doesn't tell me from which chart this callback has been triggered. My idea is that if I get the chart name or it's reference then I can access it's model and determine the color.
So if I can somehow get a reference of the vizframe from where the call back is being triggered, it will solve my problem.

callback
Description:
function (data, extData) {...} => true|false
A function to determine whether a given data matches the rule. Parameters:
data is an object with all bound field ids as keys, and corresponding values as values. It helps to consider it as the object containing everything you see in datapoint mouseover tooltip. If unbound dimensions or measures are set in FlatTableDataset context field, the related key/value pairs will be included in this parameter as well.
extData is an object with all other measure fields that in the same line with current data point. Measure Ids as keys, and corresponding values as values. It helps to compare value between different measures.

Link to the vizFrame documentation
JSFiddle
My Data looks something like this:
[{
    "RunLogId": "0000000040",
    "RuleId": "00016",
    "CreatedOn": "2020-07-21",
    "CreatedAt": "09:44:35",
    "NAV_SUBSCRIBED_LOGS": {
      "results": [
        {
          "RunLogId": "0000000040",
          "Sequence": "00001",
          "RuleId": "00016",
          "Variation": "-3.94",
          "ValidationStatus": "F",
          "Dimension": "ABC"
        },
        {
          "RunLogId": "0000000040",
          "Sequence": "00002",
          "RuleId": "00016",
          "Variation": "1.04",
          "ValidationStatus": "S",
          "Dimension": "DEF"
        }
      ]
    }
  },
  {
    "RunLogId": "0000000033",
    "RuleId": "00014",
    "CreatedOn": "2020-07-15",
    "CreatedAt": "11:10:09",
    "NAV_SUBSCRIBED_LOGS": {
      "results": [
        {
          "RunLogId": "0000000033",
          "Sequence": "00001",
          "RuleId": "00014",
          "Variation": "-2.36",
          "ValidationStatus": "F",
          "Dimension": "ABC"
        },
        {
          "RunLogId": "0000000033",
          "Sequence": "00002",
          "RuleId": "00014",
          "Variation": "-5.05",
          "ValidationStatus": "F",
          "Dimension": "DEF"
        }
      ]
    }
  }]

My code looks some like this :
for (var i = 0; i < chartsCount; i++) {
            var oModel = new JSONModel();
            var chartData = aSubscriptions[i].NAV_SUBSCRIBED_LOGS.results;
            var aDimensions = [];
            var aDimFeeds = [];
            aDimensions.push({
                    name: "Dimension",
                    value: "{Dimension}"
                });
            aDimFeeds.push("Dimension");
            oModel.setData(chartData);
            oModel.refresh();

            var oDataset = new FlattenedDataset({
                dimensions: aDimensions,
                measures: [{
                    name: "Variation",
                    value: "{Variation}"
                }],
                data: {
                    path: "/"
                }
            });

            var oVizFrame = new VizFrame();
            oVizFrame.setVizType("column");
            oVizFrame.setHeight("450px");
            oVizFrame.setDataset(oDataset);
            oVizFrame.setModel(oModel);
            var feedValueAxisActual = new sap.viz.ui5.controls.common.feeds.FeedItem({
                    "uid": "valueAxis",
                    "type": "Measure",
                    "values": ["Variation"]
                }),
                feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
                    "uid": "categoryAxis",
                    "type": "Dimension",
                    "values": aDimFeeds
                });

            oVizFrame.addFeed(feedValueAxisActual);
            oVizFrame.addFeed(feedCategoryAxis);
            oVizFrame.setVizProperties({

                plotArea: {

                    dataPointStyle: {
                        "rules": [
                            {
                                    callback: function (oContext, extData) {
                                        that.checkValue(oContext, "S");
                                    },
                                    "properties": {
                                        "color": "sapUiChartPaletteSemanticGoodLight1"
                                    },
                                    "displayName": "Successful"
                                }
                            , {
                                    callback: function (oContext, extData) {
                                        that.checkValue(oContext, "F");
                                    },
                                    properties: {
                                        color: "sapUiChartPaletteSemanticBadLight1"
                                    },
                                    "displayName": "Failed"
                            }
                        ],
                            others: {
                                properties: {
                                    color: "sapUiChartPaletteSemanticNeutral"
                                },
                                "displayName": "Undefined"
                            }
                    }
                }
            });
            //Chart Container
            var oChartContainer = new ChartContainer();
            var oChartContainerContent = new ChartContainerContent();
            oChartContainerContent.setContent(oVizFrame);
            oChartContainer.addContent(oChartContainerContent);
}

A: Not sure if I understand you correctly but I'll give it a shot anyway. If I was wrong let me know.
You create charts in a loop. You want to access the specific chart in a callback.
Why don't you access oVizFrame in your callback?
First I would replace the for loop with a forEach. forEach calls a given function for every element in your array:
aSubscriptions.forEach(function(oSubscription) {
    const oModel = new JSONModel();
    const chartData = oSubscription.NAV_SUBSCRIBED_LOGS.results;

    ...
}

In a for loop your variables are reused. In a forEach function a new scope is created for every item. So when you access oVizFrame in your callback it is the same oVizFrame that you declared earlier.
Then you should be able to access oVizFrame in your callback.
oVizFrame.setVizProperties({
    plotArea: {
        dataPointStyle: {
            "rules": [{
                callback: function(oContext, extData) {
                    // >>>>>>>> Do something with oVizFrame <<<<<<<<
                    that.checkValue(oContext, "S");
                },
                ...
            }, {
                callback: function(oContext, extData) {
                    // >>>>>>>> Do something with oVizFrame <<<<<<<<
                    that.checkValue(oContext, "F");
                },
                ...
            }],
            ...
        }
    }
});

redpajama_set_name: RedPajamaStackExchange


text:
Q: I can't scroll, could few minutes ago I'm using Laravel to make some pages, one of them has next and previous page button, that work, and for dark reasons, I can't scroll using scroll wheel anymore. I can click on the side bar of the browser and scroll this way, but scroll wheel won't do anything for now (and it's not a broken wheel, other sites work well).
The only thing I changed right before it happened is that I moved some view code in a blade template.
I tried this, with no succes:
html {
    overflow: scroll;
}

However, this kinda works :
* {
    overflow: scroll;
}

But i get scroll bar on container, makes the page aweful.
What could be the reason to this ? And if somehow it keep happening, can I hide side scroll bars ?(I also cleared cache)


text:
Q: XML Deserialisation of XMLElement with value specified I'm sure this is simple, but I can't find the answer. What would be the correct Class syntax for this part of an XML file?

I have got this far, but seem to be missing something, pardon the pun, key! I feel I'm approaching it in the wrong way, but I can't seem to find an example code that matches an XML that has the value inside the element.
        [Serializable, XmlRoot("Keys")]
    public class Keys
    {
        [XmlElement("Key")]
        public Key Key { get; set; }
    }

    [Serializable, XmlRoot("Key")]
    public class Key
    {
        [XmlAttribute("TYPE")]
        public string Type { get; set; }

    }

A: I think you are looking for the XmlTextAttribute which will get you the number. Also I think you want a collection of keys in which case, we need to declare it as a collection.
[XmlRoot("Keys")]
public class Keys
{
    [XmlElement("Key")]
    public List<Key> Items { get; set; }
}

public class Key
{
    [XmlAttribute("TYPE")]
    public string Type { get; set; }

    [XmlText]
    public string Text {get;set;}
}

Another way to do it if Keys is not your actual root object, you can use XmlArrayAttribute and XmlArrayItemAttribute
public class MyObject
{
    [XmlArray("Keys")]
    [XmlArrayItem("Key")]
    public List<Key> Keys {get;set;}
}

public class Key
{
    [XmlAttribute("TYPE")]
    public string Type { get; set; }

    [XmlText]
    public string Text {get;set;}
}


text: Q: Migrating project from NBAndroid (NetBeans) to Eclipse for Android dev I have a NBAndroid project that I've spent a fair amount of time working on and need to move over to Eclipse. My choice of NetBeans was simply one of preference but I did not realize at the time that Eclipse is really the best way to go for Android dev (since Google's tools are all focused around Eclipse). I was wondering if anyone has had experience moving a NetBeans Android project from NetBeans to Eclipse. There's tons of info about going the other way, but not much about this way. Please let me know your advice and/or experiences. Thanks.


text:
Q: Access data object in asyncData - Nuxt I wonder if there is a way to access object properties as keys returned by asyncData()?
data() {
    return {
       bookmark_btn: {
        status: null,
        loading: false
      }
   }
}

I tried access data object properties like below but didn't work.
async asyncData(){
    let activity = await axios.get('data.json')
    return { bookmark_btn.status: activity.status}
}

A: As mentioned before, because asyncData is a server rendered method you can't directly access your components data.
Previous solution works but I don't think it's how things are intended to work with Nuxt and it's complicated (using a 3rd party lib Vuex and messing around context object).
According to the API, asyncData will be merged into your data after loading the client side, which means you will have access to the returning value object of your page.
This mean you can use it directly to change the state of your page when the server side finishes loading so you either use the reactivity of vue and use it directly or you use the value within the mounted property of your page which is the solution for your use case.

A: Use new fetch method instead of asyncData present in  Nuxt >= 2.12 . this fetch method can have data properties.
async fetch() {
    let activity = await axios.get('data.json')

    this.$set(this.bookmark_btn, 'status', activity.status)
}

Check out more in official docs https://nuxtjs.org/api/pages-fetch/
Or to use old asyncData, remove data() from component as whatever asyncData will return, will append in data(). So you can try out this
  async asyncData() {
    let activity = await axios.get("data.json")
    return {
      bookmark_btn:{
        status: activity.status,
        loading: false
      }
    }
  }

A: if you put data in store can you easily git this data to asyncData function

export default {
  state: () => ({
    posts: [],
    selectedPost: {},
    page:3
  }),
  mutations: {
    updatePosts(state, posts){
      state.posts = posts;
    },
    updateSelectedPost(state, post){
      state.selectedPost = post;
    }
  }
}

that was store file

 asyncData({$axios , store }  ){
         return $axios.$get(`http://localhost:3001/data?_page=${store.state.page}&_limit=20`)
         .then( res =>{

                 store.commit("updatePosts", res);
          })
      },

that was index.vue file


text:
Q: Net Core 7 and AOT: is it needed to add in project file the configuration in all libraries of the solution? I wanted to compile an application with AOT, I am following the documentation: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/
Here, it is said I have to add a paramater in the project file:
<PropertyGroup>
    <PublishAot>true</PublishAot>
</PropertyGroup>

Supose that I have a WPF application that uses another libraries in the same solution. I have to add this parameter in all the projects or it is enough in the main prject (the WPF project)?
Thanks.

A: All libraries, AOT is on the executable level.
Though, of course, you will get incremental benefits by enabling it in only a subset of your libraries, then increasing the number of libraries that use AOT over time. Or even just enabling it on libraries that execute the most code at start-up, and leaving the other to be JITted in peace later.


text:
Q: SQL using contains or Like '%%' and IN together is there any way to write SQL query where we can perform contains Check  on a column to  a sub query/function
i.e. in this manner
select * from where COLUMN contains IN (select * from func)

or
select * from where '%'+ COLUMN + '%' IN (select * from func)

A: Try This,
Select * From  table_name A
Where Exists (Select *  From table_name B
                 Where B.Column Like '%' + A.Column +'%')

A: Reviewed my answer because I seem to misunderstood the question
    Select a.*
    from foo a,
    (select * from func) b
    where a.id = b.id or a.id like '%'+convert(varchar,b.id)+'%'

This will select records where A result set column id is equal or like %b.id%


text:
Q: Is it possible to thank Stack Overflow without writing it as a question? I would like to thank all of Stack Overflow for already having solutions to so many of my problems that I almost never have to post a question.

A: You can do so by voting on the answers that helped you.
You already earned the privilege to vote on Science Fiction & Fantasy. You only need 15 points on most sites, easily earned with some good quality suggested edits, for example.


text:
Q: vim fw, Fw, tw, Tw, and ; in command mode I've been using shortcutfoo to tighten up my vim muscle memory and I ran across some commands I can't understand even with their animations and explanations.
These are the explanations for the commands:

*

*fw | Move to next 'w' on line

*Fw | Move to previous 'w' on line

*tw | Move before next 'w' on line

*Tw | Move before previous 'w' on line

*;  | Repeat last f, F, t, or T

I've tried using these commands in my vim but they don't seem to do anything noticeable.

A: Go to link:
https://www.shortcutfoo.com/app/dojos/vim/cheatsheet
Search keyword: Intermediate Text Navigation I.
Hover in icon camera preview. You can see an example to imagine easy.
Example:

*

*fw | Move to next 'w' on line:

*

*Fw | Move to previous 'w' on line

*

*tw | Move before next 'w' on line

*

*Tw | Move before previous 'w' on line

*

*; | Repeat last f, F, t, or T

Similar with other key shortcut.


text:
Q: Jw player is not playing mp3 having mime type "audio/x-mpeg" I am playing mp3 files on the JW player but i am facing a strange problem.
JW player is playing mp3 files having mime type "audio/mpeg" but it is failed to play mp3 files having mime type "audio/x-mpeg". It is such a strange problem for me because both files are mp3 JW player should play both.
I have also tried to convert mp3 file to mp3 file using ffmpeg in php but it is still producing mp3 file having mime type "audio/x-mpeg".
 exec(ffmpeg -i $input_file -vn -ar 44100 -ac 2 -ab 192k -f mp3 output.mp3)
one thing i need to mention that this file type is generating from ios app.
I am stuck from 2 days in this issue. Your help would be really appreciated .
Thanks

A: You need to keep the mp3 with supported mime type.
Jwplayer does not support audio/x-mpeg format. Check here
Update:
1) audio format for iOS and Android
2) What are the audio-format encoders that Android and iOS have in common?
Hope this helps


text:
Q: Android custom InputConnection newly failing I've got a custom webview that I use (via contenteditable) as a rich text editor. To accommodate a few things, I also have a custom InputConnection.
This has worked fine until just recently — I'm suspecting a recent Android/WebView update.
I construct the InputConnection by overriding my WebView-derived class's onCreateInputConnection:
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
    InputConnection ic = super.onCreateInputConnection(outAttrs);
    if (ic != null) {
        InputConnection mic = new MyInputConnection(ic);
        return mic;
    }
    return ic;
}

MyInputConnection looks like:
private class MyInputConnection implements InputConnection {
    private InputConnection IC;

    // Must be implemented (at least pre-Android-N)
    @Override
    public ExtractedText getExtractedText(ExtractedTextRequest request, int flags) {
        return IC.getExtractedText(request, flags);
    }
    ...
}

This used to work great. But now I get:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.AssertionError
    at org.chromium.content.browser.input.ImeUtils.checkCondition(ImeUtils.java:1)
    at org.chromium.content.browser.input.ThreadedInputConnection.assertOnImeThread(ThreadedInputConnection.java:64)
    at org.chromium.content.browser.input.ThreadedInputConnection.getExtractedText(ThreadedInputConnection.java:105)
    at com.myapp.MyWebView$MyInputConnection.getExtractedText(MyWebView.java:106)
    at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:326)
    at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:85)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

So it seems like somehow it doesn't like the thread that my InputConnection is running on? Even though it should be calling the WebView's original InputConnection?
Like I said, the puzzling part is this was working a couple of days ago. (It fails now with Gboard and SwiftKey, at least, but strangely seems to still work as it did originally with Hacker's Keyboard.)


text:
Q: strip HTML tags without removing & - ampersand in Python I am using the following to strip HTML tags in Python, but it is also removing & (ampersand) and I need them to stay.  Any ideas?
from HTMLParser import HTMLParser
class MLStripper(HTMLParser):
    def __init__(self):
        self.reset()
        self.fed = []
    def handle_data(self, d):
        self.fed.append(d)
    def get_data(self):
        return ''.join(self.fed)

def strip_tags(html):
    s = MLStripper()
    s.feed(html)
    return s.get_data()

(also, code blocks not cooperating, please imagine an indent on the last three lines)

A: Regex substitution sounds like an easy way to do it.
import re
text = 'foo&bar link'
re.sub(r'<.+?>', '', text)
# foo&bar link

There might be some special cases I haven't thought about which would require a bit more complicated regex.


text:
Q: Traefik Acme "MissingEndpoint" 'Endpoint' configuration is required for this service I've been using Traefik for a while now to get and renew an ACME wildcard certificate. It uses AWS Route 53 for a DNS Challenge. The cert recently expired, having failed to renew with an error I can't find a solution anywhere. "Endpoint" doesn't seem to exist in any documentation on Traefik I can find.
route53: MissingEndpoint: 'Endpoint' configuration is required for this service

FULL ERROR:

time="2022-05-09T20:23:49Z" level=error msg="Error renewing certificate from LE: {*.internal.<DOMAIN REMOVED> []}, error: one or more domains had a problem:\n[*.internal.<DOMAIN REMOVED>] [*.internal.<DOMAIN REMOVED>] acme: error presenting token: route53: MissingEndpoint: 'Endpoint' configuration is required for this service\n" providerName=dns-route53.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory" here

Here's a cut down version of my docker-compose file to define Traefik:
services:
  traefik:
    image: "traefik:latest"
    environment:
      - AWS_ACCESS_KEY_ID=${TRAEFIK_AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${TRAEFIK_AWS_SECRET_ACCESS_KEY}
      - AWS_REGION=${AWS_REGION}
      - AWS_HOSTED_ZONE_ID=${ROUTE53_HOSTED_ZONE_ID}
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.http.address=:80"
      - "--entryPoints.https.address=:443"
      - "--entrypoints.https.http.tls.certResolver=dns-route53"
      - "--entrypoints.public.http.tls.certResolver=dns-route53"
      - "--entrypoints.https.http.tls.domains[0].main=*.${DOMAIN}"
      - "--certificatesresolvers.dns-route53.acme.dnsChallenge=true"
      - "--certificatesResolvers.dns-route53.acme.dnsChallenge.provider=route53"
      - "--certificatesResolvers.dns-route53.acme.email=dns@${DOMAIN}"
      - "--certificatesResolvers.dns-route53.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: always

I'm using:

*

*Traefik version 2.6.6 built on 2022-05-03T16:58:48Z"

*Docker version 20.10.14, build a224086 (all services as a single docker-compose)

*AWS Route 53

A: This likely won't help anyone, but this specific problem was caused because AWS_REGION was set incorrectly.


text:
Q: Why RSA key is adding in the same line(sometimes) in the known_hosts file When I'm doing scp a file to my remote machine, Usually the RSA and DSS keys will be added in the next lines. But sometimes(very rarely) it is appending the key to the previous key. And this is causing host key verification failed.
Mostly this is happening when I'm giving port number as 24(in my case I'm using 24 as my port for scp) What could be the reason?


text:
Q: jquery background positioning of background sprite On load - am running the following as an animation, CSS background position of a sprite and the appearance of a text block.  All is working sans the css.background. Anyone know why jquery appears to be ignoring the css call?  Or a suggested work around?
function roll_a() {
$("#a").css("background-position", "0px -444px");
$("#a_text").delay(1000).slideDown();
$("#a").css("background-position", "0px 0px");
$("#a_text").delay(500).slideUp();

$("#b").css("background-position", "0px -216px");
$("#b_text").delay(2000).slideDown();
$("#b").css("background-position", "0px 0px");
$("#b_text").delay(500).slideUp();
}

This however this is working elsewhere, but just on mouseover.
    $("#a").mouseenter(function() {
    $("#a").css("background-position", "0px -444px");
    $("#a_text").slideDown();
    }).mouseleave(function() {
    $("#a").css("background-position", "0px 0px");
    $("#a_text").slideUp();
    });

A: I believe the correct syntax in jQuery is:
$("#a").css("backgroundPosition", "0px -444px");

backgroundPosition instead of background-position

A: RESOLVED.
JQuery was so fast ....  That it moved the background positions in an instant - not even a blink.  By using setTimeout was able to slow it down enough for the effect to show.
$("#a_text").delay(1000).slideDown();
   setTimeout( function(){
   $("#a").css("background-position", "0px -444px");
},1000);

$("#a_text").delay(500).slideUp();
   setTimeout( function(){
   $("#a").css("background-position", "0px 0px");
},2000);


text:
Q: How to display output after entering some integers separated by a newline without the use of arrays? Task:

t denotes the number of inputs, followed by t lines, each containing a single integer n.
  For each integer n given at input, display a line with the value of n.
Sample input:
4
1
2
5
3
Sample output:
1
2
5
6

The output should appear after all lines of integer n are taken as input, i.e, it should not display output after each line of input.
How can this be done using a while loop without the use of array to store the input numbers?
while(i<t)
{
    scanf("%d",&num);
    printf("%d",&num);
    i++;
}

This code is working fine if the input numbers n are separated by a space and appears on the same line. But when the input numbers are provided after a newline, it displays the corresponding output after each input value.

A: If you want to this without using array, then the best way i could think of is recursion. But note, that internally, your values will be stored in the stack frames, and your values will be printed in reverse(because stack is LIFO). Here is how you can do,
void foo(i, t)
{
    if(t==i)
        return;
    int num;
    scanf("%d",&num);

    foo(++i, t);

    printf("%d\n",num);
}

Note, however, that the values will be printed in reverse, as stack is LIFO

A: Generally such type of input output are used in coding competition where a user is expected to match the expected output to the actual output.
Try pasting the input using a command prompt or online compilers and check it. It is totally fine as the output is as expected.
How does it take if the total input is given at once.
First it reads the t and then it reads the num and prints the number but your printing is actually after the input. This is how the output is checked in a coding competition.
PS: If you want everything after input, use arrays.


text:
Q: SQLITE foreign key delete not working I have done
PRAGMA foreign_keys=ON;

and it's still not working. Tables:
tbl_one {
  user_id integer PRIMARY KEY NOT NULL,
  description text,
  FOREIGN KEY (user_id) REFERENCES tbl_two (id) ON DELETE CASCADE
}

tbl_two {
  id integer PRIMARY KEY NOT NULL
}

Now deleting a user from tbl_two should delete the entry in tbl_one but it does not sqlite version is 3.5.6.

A: Foreign key constraint enforcement was added to SQLite 3.6.19 (read first paragraph of section 2). Prior to that version, the statements could be parsed and compile, but with no effect.


text:
Q: Enabling/Disabling certain textfields based on input Problem: I have a number of textfields that are all disabled by default. And right now, I have it where if they click on a button 'Modify' that some of those text fields become editable.
Now, I have data being passed to those textfields and I want to get it where if a textfield contains a certain letter (ex. C or D) and they click on the 'Modify' button that it enables certain textfields and if it is any other letter and they click 'Modify' those fields will not be enabled
This is the current code that I have for enabling certain fields when 'Modify' is clicked.
buttonModify.on({'click': function (){
            var textF = Ext.getCmp('textfield1');
                textF.enable();
                textF.setReadOnly(false);
                textF = Ext.getCmp('textfield2');
                textF.enable();
                textF.setReadOnly(false);

Is there a way where I can add a function where only enable tectfield2 when Modify is clicked if textfield1 contains the letters c or D? Otherwise, remain disabled.

A: This is probably what you want, or pretty close:
buttonModify.on(
    {
        'click': function (){
            var textF = Ext.getCmp('textfield1');
            textF.enable();
            textF.setReadOnly(false);
            var textValue = textF.getValue();
            if(textValue && Ext.isString(textValue) &&
                (textValue.toUpperCase().indexOf("C") != -1 || textValue.toUpperCase().indexOf("D") != -1))
            {
                textF = Ext.getCmp('textfield2');
                textF.enable();
                textF.setReadOnly(false);
            }
        }
    }
);


text:
Q: Entity Framework Error - Unable to determine the DbProviderFactory type for connection of type 'System.Data.EntityClient.EntityConnection' I use Entity Framework 6.1.3 & Sql Server 2008 & VS2013
I working on Asp.net project. in my project I use 3-Tier architecture (App Project - BLL Project - DAL Project). on DAL Project I created Entity Data Model and load database on it.
also I transfer "App.config" data (from DAL Project) to "Web.config" (App Project).
now when I want to get data from EF I Get under Exception.

Unable to determine the DbProviderFactory type for connection of type
  'System.Data.EntityClient.EntityConnection'. Make sure that the
  ADO.NET provider is installed or registered in the application config.

this is the content of app.config:
<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <connectionStrings>
    <add name="ADO_DefaultConnection" connectionString="Data Source=.;Initial Catalog=DbTile; Connect Timeout=30;Integrated Security=true;Trusted_Connection=True;" providerName="System.Data.SqlClient" />
    <add name="EF_DefaultConnection" connectionString="metadata=res://*/EDM.csdl|res://*/EDM.ssdl|res://*/EDM.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=DbTile;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
      </namespaces>
    </pages>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    <handlers>
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>
</configuration>

How Solved this problem?

A: [Solved]
I Added EF 6.1.3 dlls to BLL And App Projects and Now Works Fine.


text:
Q: Android - Tracking location device realtime using Google Map I'm trying develop application using Google Map API. The application will display position other device in Map if user online using my application.
For Example tracking people nearby.
What is I have to send Latitude and Longitude of each people device to my database server and in all device automatically update Marker in Map every time?
Or in Google Map API can handle that problem?

A: You need to implement location listener like this: http://blog.doityourselfandroid.com/2010/12/25/understanding-locationlistener-android/
And in onLocationChanged method you need to send new user location to server. Then server must send gcm to all devices. Help this: https://developers.google.com/cloud-messaging/android/client


text:
Q: Get last user action (change) independent of language I'm currently checking the undo control list to get the last action/change done by the user (as in Refer to Excel Undo List language independent) - which works (almost) perfectly.
However this list contains language dependent text, which is quite inconvenient if you need language independent code. Its not even guaranteed that the last action (e.g. Paste) can always be identified by the first word of the text entry.
So my question is, if anybody is aware of a better, language independent, more programmatic way to detect the last command/action of the user.
Any help is highly welcome.


text:
Q: Validation for number in text field in html5 using angularjs I have an input field which is number type in my form. It is not a mandatory field. So i have not given required attribute. But whenever the user gives value to it he must provide only numeric value and not alphabets or any special characters. How to validate this in ng-show of angularjs?

A: Please see here for example : http://jsbin.com/renegica/12/
<form name="myForm" ng-submit="onSubmit()">

    <input type="text" name="number" ng-model="number" ng-pattern="/^[0-9]+$/" required/>
    Not a number!
  </form>

A: Use angular-ui mask here-> http://angular-ui.github.io/ui-utils/#/mask
Here is an example of my using it with a phone number pattern:
<input name="phoneInputNumber"
ui-mask="(999)999-9999"
ng-model="phoneInput.number" />

A: Hope this Thread will solve your problem.
Solving a Regex for a number range
You can get your regex pattern for any number range in http://utilitymill.com/utility/Regex_For_Range according to this thread.


text:
Q: ssa() time series gapfilling R I have a question regarding gapfilling of time series, using the the R package {Rssa}.
The example series is of length 334 and contains several NAs.
b1 <- as.vector(B1.med[1,])
> str(b1)
 num [1:334] 0.0171 0.0331 0.014 0.0371 0.0149 0.0179 NA NA 0.0293 0.0096 ...

I want to use igapfill {Rssa} to fill my NAs. As igapfill wants an SSA shaped object, I have to do an ssa first, where a problem comes up:
> my.L = length(b1)%/%2
> s1.gap <- ssa(b1,L=my.L)
Error in ssa(b1, L = my.L) :
  Nothing to decompose: the given field shape is empty
In addition: Warning messages:
1: In eval(expr, envir, enclos) :
  Some field elements were not covered by shaped window. 292 elements will be ommited
2: In eval(expr, envir, enclos) :
  Nothing to decompose: the given field shape is empty

The help suggests (and has as default) a window length L of about half the data length, which just wouldn´t work for me.
Only after going down with L to 23 I will not get this error message, but warnings still:
> s2.gap <- ssa(b1,L=23)
Warning message:
In eval(expr, envir, enclos) :
  Some field elements were not covered by shaped window. 269 elements will be ommited

> summary(s2.gap) #for L=23

Call:
ssa(x = b1, L = 23)

Series length: 334, Window length: 23,  SVD method: eigen
Special triples:  0

Computed:
Eigenvalues: 1, Eigenvectors: 1,    Factor vectors: 0

Precached: 0 elementary series (0 MiB)

Overall memory consumption (estimate): 0.008934 MiB

But I won´t get more than 1 eigenvector until I further decrease (and still error messages).
> summary(s2.gap)  #for L=15

Call:
ssa(x = b1, L = 15)

Series length: 334, Window length: 15,  SVD method: eigen
Special triples:  0

Computed:
Eigenvalues: 15,    Eigenvectors: 15,   Factor vectors: 0

Precached: 0 elementary series (0 MiB)

Overall memory consumption (estimate): 0.01062 MiB

I don´t quite understand what my problem here is and google etc. have not helped me much either. I´m thankful for any advice :-)

A: (Probably, my answer is too late. Hope that it could be still helpful.)
Definitely, Rssa works with NA. However, the call of ssa before igapfill is really an unclear point in Rssa. The citation from the recent book Singular Spectrum Analysis with R:
"Note that it is typical for the iterative approach to use the parameter value
force.decompose = FALSE in the preliminary call of ssa to avoid the decomposition,
which may be impossible due to the gap location."
That is, use s1.gap <- ssa(b1, L=my.L, force.decompose = FALSE) before the call of igapfill. Probably, the companion web-site to the cited book will be helpful for other tips.


text:
Q: Prove $\operatorname{Rank} (T) +\operatorname{Nullity} (T) = \dim V$
Suppose that $T : V \to W$ is a linear transformation from a finite dimensional vector space $V$ to a vector space $W$. Then $\operatorname{rank} (T)$ is finite and $\operatorname{Rank} (T) +\operatorname{Nullity} (T) = \dim V$.

Here's my proof so far:

Let $n = \dim V$ and $r = \operatorname{rank}(T)$, so we must prove $r = n - \dim \ker(T)$. suppose first that $1 \le r \le n-1$. Let $S = (v_1,\ldots,v_m)$ be a basis for $\ker T$, and choose vectors $T = (v_{m+1},\ldots,v_n)$ in $V$ so that $S \cup T = (v_1,\ldots,v_n)$ is a basis for $V$. we now claim that $U = (Tv_{m+1},\ldots,Tv_n)$ is a basis for range $T$, and with this done we will have $r = \operatorname{rank} T = \dim \operatorname{range} T = \#U = n-m = n - \dim \ker T$.

And from here, I have no idea what to do. My classmate told me that I have to show $U$ is linearly independent and that $\operatorname{Span} U = \operatorname{range} T$ (?) but I'm not quite sure$\ldots$
Am I approaching this theorem too complicatedly? Any help would be very helpful!!

A: Take $w\in T(V)$. Then $w=T(\alpha_1v_1+\alpha_2v_2+\dots +\alpha_nv_n)$, since $T$ is linear this is equal to:
\begin{align}
\alpha_1T(v_1)+&\alpha_2 T(v_2)+\dots +\alpha_nT(v_n)\\
&=\underbrace{0+0+\dots +0}_m + \alpha_{m+1}T(v_{m+1})+\alpha_{m+2} T(v_{m+2})+\dots+ \alpha_nT(v_n)\\
&=\alpha_{m+1}T(v_{m+1})+\alpha_{m+2} T(v_{m+2})+\dots+ \alpha_nT(v_n).
\end{align}
So $\{T(v_{m+1}),T(v_{m+2}),\dots, T(v_n)\}$ generates $T(V)$.
Now, suppose $\alpha_{m+1}T(v_{m+1})+\alpha_{m+2} T(v_{m+2})+\dots +\alpha_nT(v_n)=0$.
Notice $\alpha_{m+1}T(v_{m+1})+\alpha_{m+2} T(v_{m+2})+\dots +\alpha_nT(v_n)=T(\alpha_{m+1}v_{m+1}+\alpha_{m+2}v_{m+2}+\dots +\alpha_nv_n)\implies \alpha_{m+1}v_{m+1}+\alpha_{m+2}v_{m+2}+\dots +\alpha_nv_n\in \ker(T)$. Therefore $-(\alpha_{m+1} v_{m+1} + \alpha_{m+2} v_{m+2} + \dots +\alpha_nv_n)\in \ker(T)$. So we can write it as $\alpha_1v_1+\alpha_2v_2+\dots +\alpha_mv_m$.
Which leads us to $\alpha_1v_1+\alpha_2v_2+\dots+ \alpha_nv_n=0$, since $\{v_1, v_2,\dots, v_n\}$ is basis for $V$ we conclude $\alpha_i=0$ for all $ 1\leq i \leq n$. in particular $\alpha_{m+1},\alpha_{m+2},\dots, \alpha_n=0$. So $\{ T(v_{m+1}), T(v_{m+2}),\dots, T(v_n)\}$ is linearly independent

A: Well, you are indeed almost done: a basis is a linear independent generating
set, so as your classmate mentioned, you only need to check these two
properties for $v_{m+1},\ldots,v_n$.
For linear independence assume
$$0 = \sum_{i=m+1}^n T(v_i)\lambda_i = T(\sum_{i=m+1}^n v_i\lambda_i)$$
and see what this would mean for the $v_{m+1},\ldots,v_n$.
For generation, given a typical element $T(v)$ of $\operatorname{range}(T)$,
express $v$ with the basis of $V$ and observe what happens to
the $v_1,\ldots,v_m$ when $T$ is applied.


text:
Q: Simple way to concatenate BIT and NVARCHAR columns MyTable
=======
Item NVARCHAR(200)
Hidden BIT

I need to load all the items from MyTable in a DropDownList in such format: Item (Hidden)
This how my list would look like:
Brush
Table (Hidden)
Box (Hidden)
PC
Ball

N.B: I've reached in my search to this SQL entry:
SELECT        ID, Item + '(' + CAST(Hidden AS NVARCHAR(200)) + ')' AS Conct
FROM            Items

Which Returns Item(0) or Item(1)
..I can't think of a simple way to use for my purpose but I thought I'd change the Hidden column to NVARCHAR and store hidden or blank in it .. or maybe add another column that stores the word 'Hidden' for any '1' in the Hidden (BIT) column. What do you think guys ?

A: You can use the CASE statement:
SELECT ID,
       Item + (CASE Hidden WHEN 1 THEN ' (Hidden)' ELSE '' END) AS Conct
FROM Items

A: You could do a CASE:
SELECT ID, Item + (CASE Hidden
                             WHEN 1 THEN '(Hidden)'
                             ELSE ''
                        END) AS Conct
FROM   Items

Adding another column for the word 'Hidden' when Hidden is 1 would be redundant.


text:
Q: Split string by regex in JavaScript I'm trying to split a string by the following array of characters:
"!", "%", "$", "@"

I thought about using regex, so I developed the following method which I thought would split the string by the characters:
var splitted = string.split(/\!|%|\$|@*/);

However, when I run the following code, the output is split by every character, not what I was hoping for:
var toSplit = "abc%123!def$456@ghi";
var splittedArray = toSplit.split(/\!|%|\$|@*/);

How could I make it so that splittedArray contains the following elements?
"abc", "123", "def", "456", "ghi"

Any help appreciated.

A: @* matches the empty string and there's an empty string between any two characters, so the string is split at every single character. Use + instead:
/\!|%|\$|@+/

Also if you meant the + to apply to every character and not just @ then group them up:
/(\!|%|\$|@)+/

Or better yet, use a character class. This lets you omit the backslashes since none of these characters are special inside square brackets.
/[!%$@]+/

A: Use the following:
var splittedArray = toSplit.split(/[!%$@]+/);

Your current code will split between every character because @* will match empty strings.  I am assuming since you used @* that you want to consider consecutive characters a single delimiter, which is why the + is at the end of the regex.  This will only match one or more characters, so it will not match empty strings.
The [...] syntax is a character class, which is like alternation with the | character except that it only works for single characters, so [!%$@] will match either !, %, $, or @.  Inside of the character class the escaping rules change a little bit, so you can just use $ instead of \$.


text:
Q: Autotools: GCC's Makefile.in has a bug (7.3.0 and earlier). How to re-program automake to find 'ar' and 'objdump' GCC's cross compiling autotools is supposed to be flexible, but I've isolated a bug that's been breaking cross compiler builds that ought to work.
Note: Some systems will "poison" default compiler tool names to prevent using wrong tools by default. On my system, x86_64-pc-gnu-linux-ar will execute but "ar" is not found.
I need to build cross compiler toolchains with custom names.  gcc's configure script supports this with --program-prefix or --program-transform-name.  However, when using a custom name, all compile time tools have to be explicitly named on the configure line.  gcc configure is not intelligent enough to find tools it has just built with a name change. (too stupid).
The GCC manual states how to explicitly name tools:
configure AR=x86_foo_b_ar AR_FOR_TARGET=ARMv6m_foo_b_ar ...

However, it doesn't work right.  Autoools sometimes ignores the supplied names and the build fails.  In particular, it ignores 'AR' and 'OBJDUMP' variables.
Apparently the toplevel gcc configure was created at a later date than lower level configures.
Makefile.in without Makefile.am in GCC?
Makefile.am does not exist in some subdirectories, but it does exist in newer subdirectories.
This causes inconsistencies in variable passing from the top-level makefile.
Internally, the top level "configure" script has variables AR_FOR_HOST (alias for AR), AR_FOR_BUILD, and AR_FOR_TARGET. These variables are used to re-define "AR" when entering sub-directories to force a generic make script to compile for a particular target.
I've even gone so far as to define the internal variables correctly as well as "AR" and "OBJDUMP" on the configure command line. ( Shouldn't be needed ).
gcc-7.3.0/configure --host=x86_64-pc-linux-gnu --program-prefix=armv6m-softfloat-eabi-newlib- AR_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-ar AR=/usr/bin/x86_64-pc-linux-gnu-ar AR_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-ar AR_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/ar AS_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-as AS=/usr/bin/x86_64-pc-linux-gnu-as AS_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-as AS_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/as DLLTOOL_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/dlltool LD_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-ld LD=/usr/bin/x86_64-pc-linux-gnu-ld LD_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-ld LD_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/ld LIPO_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/lipo NM_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-nm NM=/usr/bin/x86_64-pc-linux-gnu-nm NM_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-nm NM_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/nm OBJCOPY_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJCOPY=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJCOPY_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-objcopy OBJCOPY_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/objcopy OBJDUMP_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-objdump OBJDUMP=/usr/bin/x86_64-pc-linux-gnu-objdump OBJDUMP_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-objdump OBJDUMP_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/objdump RANLIB_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-ranlib RANLIB=/usr/bin/x86_64-pc-linux-gnu-ranlib RANLIB_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-ranlib RANLIB_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/ranlib READELF_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-readelf READELF=/usr/bin/x86_64-pc-linux-gnu-readelf READELF_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-readelf READELF_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/readelf STRIP_FOR_BUILD=/usr/bin/x86_64-pc-linux-gnu-strip STRIP=/usr/bin/x86_64-pc-linux-gnu-strip STRIP_FOR_HOST=/usr/bin/x86_64-pc-linux-gnu-strip STRIP_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/strip CC_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/cc CXX_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/cxx WINDRES_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/windres WINDMC_FOR_TARGET=/usr/libexec/gcc/armv6m-softfloat-eabi-newlib/windmc --target=armv6m-softfloat-eabi --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/armv6m-softfloat-eabi-newlib/gcc-bin/7.3.0 --includedir=/usr/lib/gcc/armv6m-softfloat-eabi-newlib/7.3.0/include --datadir=/usr/share/gcc-data/armv6m-softfloat-eabi-newlib/7.3.0 --mandir=/usr/share/gcc-data/armv6m-softfloat-eabi-newlib/7.3.0/man --infodir=/usr/share/gcc-data/armv6m-softfloat-eabi-newlib/7.3.0/info --with-gxx-include-dir=/usr/lib/gcc/armv6m-softfloat-eabi-newlib/7.3.0/include/g++-v7 --with-python-dir=/share/gcc-data/armv6m-softfloat-eabi-newlib/7.3.0/python --enable-languages=c --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo 7.3.0-r3 p1.4 --disable-esp --enable-poison-system-directories --disable-bootstrap --with-newlib --enable-multilib --disable-altivec --disable-fixed-point --with-float=soft --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer --enable-default-pie --enable-default-ssp

I'm wanting gcc to both make and use tools that start with the prefix: armv6m-softfloat-eabi-newlib-
(Arm cortex m0 chipset is what I am using)
But "make" still fails when attempting to execute "ar" in the .../libcpp  directory.  The reason is that .../libcpp/Makefile.in is not updated by automake.  It's a hand crafted file.  On line 28 of the old .../libcpp/Makefile.in it says "AR = ar"
So, the AR variable is hardcoded to "ar"  But, "ar" doesn't exist on my system.  I've tried editing .../libcpp/Makefile.in with "AR = dummyname" , and the build crashes with "can't fine dummyname" instead of can't find "ar".  So, the bug is on line 28.
All other variables in the .../libcpp/Makefile.in are of the form:
CC = @CC@
INSTALL = @INSTALL@

etc..
On a positive note: The compiler used by .../libcpp IS the fully qulaified name I gave to gcc-7.3.0/configure. That success made me think I could fix the bug by editing the makefile to read:
AR = @AR@

But the build fails with "Can't find AR@"
I'm not familiar enough with autotools to hand edit the Makefile.in and fix the bug.
What's the @variable@ name format do?
Does the configure.ac in the subdirectory have to define "AR" in some way for @AR@ to be linked to the value in the toplevel directory?
I've tried a few other tests while building different gcc versions.  Re-running autoconfig, automake, is hell because GCC uses AC_PREREQ() macro.
For example, I have autotools 2.69 installed ... but gcc 7.3.0 fails and complains that I must use autotools 2.64, ONLY. eg: AC_PREREQ(2.64)
So, fixing the bug via autotools doesn't seem practical.
I'm hoping to simply patch the .../libcpp/Makefile.in, since that file is exactly the same in so many versions of gcc.
Questions:
Why is "ar" hard-coded ? Is this a serious legacy issue? and what is a minimal patch that won't interfere with other configurations of GCC?
Is it better to modify the shell or the Makefile; eg: like the top level configure shell script could define a bash function that would be inherited by make as "if" it were a program.
if [ -z ${AR##*-*} ] ; then
    ar() { $AR }
fi

Edit:  A quick-fix patch for gcc-7.3.0
This is not a "correct" fix, but just a work-around.
I've found three places where the sub-directories ignore variables passed in from the toplevel configure.
.../libcpp/Makefile.in  on line 29
.../gcc/configure just before line 29531
.../libcc1/configure just before 14574
The second and third errors are from a defective macro in configure.ac.  I haven't traced it back because I can't run autoconfig anyway.
I added a line to the configure(s), to see if passing the default OBJDUMP override variable would allow gcc to compile. It does.  I'm not sure I've chosen the right override variable for all cases of gcc compile switches, but at least it proves where the bug is.
Patch file follows:
--- gcc-old/libcpp/Makefile.in
+++ gcc-new/libcpp/Makefile.in
@@ -28,3 +28,3 @@
 INSTALL = @INSTALL@
-AR = ar
+AR ?= ar
 ARFLAGS = cru
--- gcc-old/gcc/configure
+++ gcc-new/gcc/configure
@@ -29531,4 +29531,6 @@
      ;;
    esac

+   if [ -n $OBJDUMP ]; then export_sym_check="$OBJDUMP -T"; fi
+
    if test x"$enable_plugin" = x"yes"; then
--- gcc-old/libcc1/configure
+++ gcc-new/libcc1/configure
@@ -14574,4 +14574,6 @@
      ;;
    esac

+   if [ -n $OBJDUMP ]; then export_sym_check="$OBJDUMP -T"; fi
+
    if test x"$enable_plugin" = x"yes"; then

A: TL;DR: there are a lot of things you could try, but the very first would be to specify AR on the command line when you run make:
make AR=x86_foo_b_ar

That shouldn't be necessary when you've already specified the same to configure, but if it doesn't work then that suggests a problem one or more levels up from the Makefile.in you're looking at.  Variable definitions specified on the make command line override definitions in makefiles.

"make" still fails when attempting to execute "ar" from the .../libcpp directory. The reason is that .../libcpp/Makefile.in is not updated by automake. It's a hand crafted file.

To be clear, since understanding the system you are trying to use is immensely helpful in troubleshooting it, automake does not run at configuration or build time.  It is used by the package maintainer to build one or more Makefile.in files to be included in source distributions, such as the one you obtained.  Of course, this is not the only way to create Makefile.in files, and the configure script does not care how you create them (or other input files).

I'm not familiar enough with autotools to hand edit the Makefile.in and fix the bug. What's the @variable@ name format do?
Does the configure.ac in the subdirectory have to define "AR" in some way for @AR@ to be linked to the value in the toplevel directory?

The @variable@ construction is used for values that are expected to be substituted by the configure script when it builds a corresponding output file.  For that to take place, there needs to be at least a corresponding AC_SUBST([variable]) or its equivalent in the configure.ac (sometimes named configure.in, instead).  Normally, that's preceded somewhere in configure.ac by code assigning an appropriate value to shell variable variable.
If you modify configure.ac then you need to rebuild the configure script, and in that case it's probably safest to rebuild the whole build system, as a package maintainer would do.  There may be a script provided for that purpose in the package (autogen.sh is a common name for such scripts), but the default mechanism is to run the Autotools program autoreconf in the top-level directory of the project source tree.

I've tried a few other tests while building different gcc versions.
  Re-running autoconfig, automake, is hell because GCC uses AC_PREREQ()
  macro.
For example, I have autotools 2.69 installed ... but gcc 7.3.0 fails
  and complains that I must use autotools 2.64, ONLY. eg:
  AC_PREREQ(2.64)

That description is not consistent with the documentation of AC_PREREQ, nor with my experience with that macro.  AC_PREREQ tests for the specified Autoconf version or newer.  It does not demand an exact Autoconf version.  There may be something else in the build system that does so, but it's not AC_PREREQ.
In any case, one alternative would be to obtain and install Autoconf 2.64.  You may even be able to install it alongside your existing version.  Some systems even provide pre-built packages for exactly that purpose.

So, fixing the bug via autotools doesn't seem practical. I'm hoping to
  simply patch the .../libcpp/Makefile.in, since that file is exactly
  the same in so many versions of gcc.

Patching a Makefile.in does not require afterward re-running the autotools, so it's at least conceivable that that would work.  Even for Makefile.in files that were generated by Automake.  You could consider having a look at how AR is defined in some of the Automake-generated Makefile.in files in the project (supposing there are any) for an idea of how it should look.

Why is "ar" hard-coded ? Is this a serious legacy issue?

I can only speculate.  As a threshold matter, I'm inclined to suppose that in that Makefile, the archiver of the build system is the one wanted (not that of the intended host system, nor a cross-ar for host-target).  It is reasonable in that case for AR = ar to be provided as a default, because that can be overridden via a declaration of that variable on the command-line.
That you are in fact not getting the AR you specify to configure looks like a bug to me -- probably a regression introduced at some point when some of the higher-level bits of the build system were updated.  I have no trouble imagining such an issue slipping by, as a system configuration such as yours, in which the system's own archiver goes only by a non-standard name, is very uncommon.

and what is a
  minimal patch that won't interfere with other configurations of GCC?

The first thing to try is to pass the AR definition on the top-level make command line:
make AR=x86_foo_b_ar

Such definitions will be passed on to recursively-invoked sub-makes, and definitions on the command line (but not, by default, from the environment) override definitions in Makefiles.

Is it better to modify the shell or the Makefile; eg: like the top
  level configure shell script could define a bash function that would
  be inherited by make as "if" it were a program.

The top-level configure script could be modified to define a shell function and export it to child processes, but not to its parent or siblings.  This is nothing specific to configure; the shell just doesn't work that way.  Whatever changes you make, if any, would be best made in Makefile.in files before running configure, or in the generated Makefiles afterward.


text:
Q: Can I edit a post as to delete a edited portion of it for good? say I post something I realize afterward is embarrasing and/or inconvenient (say a password, a friend's phone number, ecc.).
May I ask to delete it, in strong sense to remove from the system? How?
If not, why?

A:
say I post something I realize afterward is embarrasing and/or inconvenient (say a password, a friend's phone number, ecc.).

So, you want these edited out - and not be available in any revision of the post, if I understand correctly.
First, edit out the problematic bits (password, phone number, any other sensitive bits).
Then flag the post and explain what the issue is - moderators have tools to redact revisions - so passwords and other sensitive information will not longer be in any revision.

If you are talking about deleting a complete post - that's somewhat different (I doubt a whole post will contain such sensitive information - possibly just part of it - and in that case, see above).
You can delete your own question if it has zero answers or one answer without any upvotes, similarly you can just delete any of your answers.
Again, you can flag such a post for deletion - explain why it needs to be deleted. Note that the issue needs to be more than just "I am embarrassed about what I posted" for moderators to take any steps. Point being - the issue you posted may be of help to others - and when posting on the sites - you have licensed them as cc-by-sa (see the footer) to Stack Overflow, meaning - we have the right to keep them around.


text:
Q: End examples with padding and a little mark What I want to do can be illustrated with this picture:

I want the examples to be numbered, draw two slashes after every example and add a little vertical spacing between the end of the examples and the next paragraph.
I tried with the following code, two different ways but with one I get the numbering but don't know how to get the lines and with the other I don't know how to get the numbering.

\documentclass[
    12pt,
    openright,%
    parskip=full,
    spanish,
]{scrreprt}

\usepackage[spanish]{babel}
\usepackage{amsmath,mathtools,amssymb,amsthm}

\theoremstyle{definition}
\newtheorem{theorem}{Teorema}[section]
\newenvironment{ExampleOne}
  {\renewcommand\qedsymbol{$ / / $}\begin{proof}[Ejemplo]}
    {\end{proof}}
\newtheorem{ExampleTwo}[theorem]{Ejemplo}

\begin{document}
\begin{ExampleOne}
    This is an example
\end{ExampleOne}

\begin{ExampleTwo}
    This is a second example
\end{ExampleTwo}

\end{document}

A: I am not sure what notation and numbering you really want, but the following example is easy to modify:
\documentclass[
    12pt,
    openright,%
    parskip=full,
    spanish,
]{scrreprt}

\usepackage[spanish]{babel}
\usepackage{amsmath,mathtools,amssymb,amsthm}

\theoremstyle{definition}
\newtheorem{theorem}{Teorema}[section]
\newenvironment{ExampleOne}
  {\renewcommand\qedsymbol{$ / / $}\begin{proof}[Ejemplo]}
    {\end{proof}}

 \newtheorem{ExampleTwo}[theorem]{Ejemplo}

\newenvironment{mythm}{\begin{ExampleTwo}}{\renewcommand\qedsymbol{$ / / $}\qed \end{ExampleTwo}}

\begin{document}

\chapter{Uno}

Yours:

\begin{ExampleOne}
    This is an example
\end{ExampleOne}

\begin{ExampleTwo}
    This is a second example
\end{ExampleTwo}

The new one:

\begin{mythm}
This is the third example
\end{mythm}

\end{document}


text:
Q: How to create a "next" button that switches tabs using Java Script and Twitter Bootstrap I have the following code: http://jsfiddle.net/h6rQ2/2/
I'm using html to create a basic form. This form has two sections -- each section is contained within a tab (tabs created with Twitter Bootstrap).
How do I create a "next" button which switches from the first tab to the second tab? When I try doing it right now, it only submits the form. Does Twitter Bootstrap already provide a function that lets you switch tabs via an external button? If so, how do you use it?

A: Given those buttons :

    <button class="btn" id="prevtab" type="button">Prev</button>
    <button class="btn" id="nexttab" type="button">Next</button>

You'd need this JS :
var $tabs = $('.tabbable li');

$('#prevtab').on('click', function() {
    $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').tab('show');
});

$('#nexttab').on('click', function() {
    $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').tab('show');
});

Working demo (jsfiddle)

A: To make it cyclic (last tab goes to first, first tab goes to last), here is my code :
function previousVin(){
    var previousElement = $('#myTab li').filter('.active').prev('li').find('a[data-toggle="tab"]');
    if(previousElement.html()===undefined){
        $('#myTab a:last').tab('show');
    }else{
        previousElement.tab('show');
    }
}
function nextVin(){
    var nextElement = $('#myTab li').filter('.active').next('li').find('a[data-toggle="tab"]');
    if(nextElement.html()===undefined){
        $('#myTab a:first').tab('show');
    }else{
        nextElement.tab('show');
    }
}

A: For bootstrap 3
$('a[data-toggle^="tab"]').click(function(){
    var data = $(this).attr("href");
    $('a[data-toggle^="tab"]').parent("li").removeClass("active");
    $('li a[href^="'+data+'"]').parent("li").addClass("active");
    $('.tab-pane').removeClass("active");
    $(data).addClass("active");
})

You can add links like these anywhere
Next
Previous


text:
Q: Partitioning Datetime and Date data type I have one small question for partitioning table.
I have created a partition function on Date datatype, most of the table covers under it but some big table have to DataTime data type.
So the question is how can i use both data types in singe partition function and scheme? Or how can I handle this situation?
Appreciated your Help and Support.


text:
Q: Writing multiple structures to a File in Go me and my group are new to Go and we have a "Header" struct and multiple "Record" structs that we're trying to write to a file. However, whenever we try to update the Header struct in the file by rewriting to it, the rest of the file gets messed up.
We are using Encode / Decode: (dataFile is returned from os.Open)
dataFile.Seek(header.FreePtr,0) //seek to free space - could we just refactor and seek to end of file?
encoder := gob.NewEncoder((dataFile))
err = encoder.Encode(record)
if err != nil {
    panic(err)
}

dataFile.Seek(header.FreePtr, 0)
decoder = gob.NewDecoder(dataFile)
r := Record{}
err = decoder.Decode(&r)
fmt.Println(r.Key)
fmt.Println(r.Width)
fmt.Println(string(r.Data))

header.FreePtr += int64(unsafe.Sizeof(record.Key)) + int64(unsafe.Sizeof(record.Width))+ int64(record.Width)
dataFile.Seek(0, 0)
encoder = gob.NewEncoder(dataFile)
err = encoder.Encode(header)
if err != nil {
    panic(err)
}

Is there a better way to do this? If we don't need to update the header, would that solve our problems? (Encoding to the end of the file all the time instead of trying to update something at the beginning between adding records). Ideally we might need a header later though, so if we could keep it, that would be great.
Thanks in advance!

A: Your file get messed up because the length of the header changes when you update it.
That is why some formats reserve the last N bytes of the File for the header.
In your way you would have to

*

*Read the whole file in memory

*Update the Header

*Rewrite Header + Records back to the file

Or Allocate a FIXED size for the header at the start of your file and only update that part of it.
Keep in mind that this a problem with any programming language, not just Go.


text:
Q: In Azure Java Functions unable to read host.json values in test/production environment I am trying to implement once simple Azure Java Function where host.json entries changes w.r.t each slots ( environment ) . I need to read those value in my java class.
Locally I am able to read it using System.getEnv which may be referring local-settings.json, however when deployed in azure site its not working.Please suggust

A: The host.json metadata file contains global configuration options that affect all functions for a function app.
For more details, please refer to: https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
For your requirement, you need to add settings in your function application settings:

And then add environment settings here:

Update
If you develop with VS Code, you can add Azure Function extension, and then you can upload all you local settings:


text:
Q: Which of the following relations are true?Here $[x]$ denotes the greatest integer less then or equal to $x$ (as in option b) symbol Which of the following relations are true?
$1)$ $(-1)^{\frac{n(n-1)}{2}} = (-1)^{\frac{n(n+1)}{2}}$
$2)$ $(-1)^{\frac{n(n-1)}{2}} = (-1)^{[\frac{n}{2}]}$
$3)$ $(-1)^{\frac{n(n-1)}{2}} = (-1)^{n^2}$
Here $[x]$  denotes  the  greatest  integer  less then or equal to $x$ (as in
 option b) symbol
My attempts :   if  I take  $n=0$  then all option $1,2,3$ are  True
Any other   logics?

A: If $n=4k+1$ then last one is not true.
Also $$(-1)^{{n(n+1)\over 2}} = (-1)^{{n(n-1)\over 2}+n}=(-1)^{{n(n-1)\over 2}}(-1)^n$$
so for $n$ is odd it is not true.

So, only the second can be always true:
If $n=2k$ then
$$(-1)^{k(2k-1)} = (-1)^k = (-1)^{[\frac{n}{2}]}$$
If $n=2k+1$ then
$$(-1)^{(2k+1)k} = (-1)^k = (-1)^{[\frac{n}{2}]}$$


text: Q: Required attribute "title" was not provided. for Install Promotion Campaign I keep getting this error when trying to launch my iOS install ad campaign "Required attribute "title" was not provided."  Any idea what Title this is referencing?


text:
Q: Create html table and fill using data in array can you help me with looping problem in php? I've been confused for hours because I don't understand deeply
so overall the data below is the result of the clustering calculation - KMeans. The array below is the data that has been grouped.
and the problem is when displaying it, because it's too confusing for me.
so I have an array data like the following.
array (size=3)
  0 =>
    array (size=8)
      'Label 1' => int 1
      'Label 2' => int 0
      'Label 3' => int 0
      'Label 4' => int 0
      'Label 5' => int 0
      'Label 6' => int 0
      'Label 7' => int 1
      'Label 8' => int 0
  1 =>
    array (size=8)
      'Label 1' => int 0
      'Label 2' => int 0
      'Label 3' => int 1
      'Label 4' => int 0
      'Label 5' => int 1
      'Label 6' => int 1
      'Label 7' => int 0
      'Label 8' => int 0
  2 =>
    array (size=8)
      'Label 1' => int 0
      'Label 2' => int 1
      'Label 3' => int 0
      'Label 4' => int 1
      'Label 5' => int 0
      'Label 6' => int 0
      'Label 7' => int 0
      'Label 8' => int 1

and I want to create a table that looks like the this.

Lable
Groups

Label 1
C1

Label 2
C3

Label 3
C2

Label 4
C3

Label 5
C2

Label 6
C2

Label 7
C1

Label 8
C3

Where array 0.1,2 will be used to identify C1, C2, C3. so

array 0 = C1
array 1 = C2
array 2 = C3

Saya sudah mencoba seperti ini, tetapi hasil yang diharapkan membingungkan dan sejak itu, hanya macet di sini
// $dataset->count() = 8
for ($i=0; $i<$dataset->count(); $i++){

    // $dataset->label($i) = get lable
    echo $dataset->label($i) . "
";

    // $results->count() = 3
    for ($j=0; $j<$results->count(); $j++){
        if ($dataset->label($i) == array_keys($results->offsetGet($j))[$i]){

            // $results->offsetGet($j) = contains the array above
            echo $results->offsetGet($j)[array_keys($results->offsetGet($j))[$i]];
            echo "
";
        }

    }
    echo "
";
}

already the result of the code that was made like this,
it's really confusing for me to reach the final result like in table.
Label 1
1
0
0

Label 2
0
0
1

Label 3
0
1
0

Label 4
0
0
1

Label 5
0
1
0

Label 6
0
1
0

Label 7
1
0
0

Label 8
0
0
1

so think like this to determine whether the label belongs to which group
so the array keys are 0.1,2 to specify C1, C2, C3, e.g.
more precisely the value 1 of each label to determine where the group belongs; and value 0 of each label indicates not a member of the group.
0 => 'Label 1' => 1 // then it is a member of C1, and if
0 => 'Label 2' => 0 // is not a member of C1;
1 => 'Label 3' => 1 // then it is a member of C2
2 => 'Label 2' => 1 // and now label 2 is a member of C3

[
    0 => [
       'Label 1' => 1, // member C1
       'Label 2' => 0,
       'Label 3' => 0,
        . . .
    ],
    1 => [
       'Label 1' => 0,
       'Label 2' => 0,
       'Label 3' => 1, // member C2
        ...
    ],
    2 => [
       'Label 1' => 0,
       'Label 2' => 1, // member C3
       'Label 3' => 0,
       ...
    ]
]

A: Loop over the first sub-array with a foreach, the extended syntax gives you access to key and value. If the value is 1, then you want to output C1 in your second column. Use the key to access the corresponding values in the other two sub-arrays, and output C2 / C3 based on whether those values are 1.

      Label
      Group

    <?php foreach($data[0] as $label => $value): ?>

      <?php echo $label; ?>
      <?php
        if($value == 1) { echo 'C1'; }
        if($data[1][$label] == 1) { echo 'C2'; }
        if($data[2][$label] == 1) { echo 'C3'; }
      ?>

    <?php endforeach; ?>

Live example with reduced data set: https://3v4l.org/qb3FA


text:
Q: CUDA stream is blocked when launching many kernels (>1000) I found that CUDA stream will block when I launch lots of kernels (more than 1000). I am wondering is there any configuration that I can change?
In my experiments, I launch a small kernel 10000 times. This kernel ran shortly (about 190us). The kernel launched very fast when launching the first 1000 kernels. It takes 4~5us to launch a kernel. But after that, The launch process becomes slow. It takes about 190us to launch a new kernel. The CUDA stream seems to wait for the previous kernel complete and the buffer size is about 1000 kernel.
When I created 3 streams, each stream can launch 1000 kernel asynchrony.
I want to make this buffer bigger. I try to set cudaLimitDevRuntimePendingLaunchCount, but it does not work. Is there any way?
#include <stdio.h>
#include "cuda_runtime.h"

#define CUDACHECK(cmd) do {                                   \
            cudaError_t e = cmd;                              \
            if (e != cudaSuccess) {                           \
                printf("Failed: Cuda error %s:%d '%s'\n",     \
                    __FILE__,__LINE__,cudaGetErrorString(e)); \
                exit(EXIT_FAILURE);                           \
            }                                                 \
        } while (0)

// a dummy kernel for test
__global__ void add(float *a, int n) {
    int id = threadIdx.x + blockIdx.x * blockDim.x;
    for (int i = 0; i < n; i++) {
        a[id] = sqrt(a[id] + 1);
    }
}

int main(int argc, char* argv[])
{
    // managing 1 devices
    int nDev = 1;
    int nStream = 1;
    int size = 32*1024*1024;

    // allocating and initializing device buffers
    float** buffer = (float**)malloc(nDev * sizeof(float*));
    cudaStream_t* s = (cudaStream_t*)malloc(sizeof(cudaStream_t)*nDev*nStream);

    for (int i = 0; i < nDev; ++i) {
        CUDACHECK(cudaSetDevice(i));
        // CUDACHECK(cudaDeviceSetLimit(cudaLimitDevRuntimePendingLaunchCount, 10000));
        CUDACHECK(cudaMalloc(buffer + i, size * sizeof(float)));
        CUDACHECK(cudaMemset(buffer[i], 1, size * sizeof(float)));
        for (int j = 0; j < nStream; j++) {
            CUDACHECK(cudaStreamCreate(s+i*nStream+j));
        }
    }

    for (int i = 0; i < nDev; ++i) {
        CUDACHECK(cudaSetDevice(i));
        for (int j=0; j < 10000; j++) {
            for (int k=0; k < nStream; k++) {
                add<<<32, 1024, 0, s[i*nStream+k]>>>(buffer[i], 1000);
            }
        }
    }

    for (int i = 0; i < nDev; ++i) {
        CUDACHECK(cudaSetDevice(i));
        cudaDeviceSynchronize();
    }

    // free device buffers
    for (int i = 0; i < nDev; ++i) {
        CUDACHECK(cudaSetDevice(i));
        CUDACHECK(cudaFree(buffer[i]));
    }

    printf("Success \n");
    return 0;
}

Here is the nvprof results:
When I create 3 streams, the first 3000 kernel launched quickly and then become slow

When I create 1 streams, the first 1000 kernel launched quickly and then become slow

A: The behavior you are witnessing is expected behavior.  If you search on the cuda tag for "queue" or "launch queue" you will find many other questions that refer to it.  CUDA has a queue (apparently per-stream) that kernel launches go into.  As long as the outstanding launch count is less than the queue depth, the launch process will be asynchronous.
However when the outstanding (i.e. uncompleted) launches exceed the queue depth, the launch process changes to a kind of synchronous behavior (although not synchronous in the usual sense).  Specifically, when the outstanding number of kernel launches exceeds the queue depth, the launch process will block the CPU thread that is performing the next launch, until a launch slot opens in the queue (effectively means a kernel has retired at the other end of the queue).
You have no visibility into this (no way to query the number of slots open in the queue) nor any way to view or control the queue depth.  Most of the information I'm reciting here is obtained by inspection; it is not formally published in CUDA documentation that I am aware of.
As already discussed in the comments, one possible approach to alleviate your concern around launches in a multi-device scenario is to launch breadth-first rather than depth-first.  By this I mean that you should modify your launch loops so that you launch a kernel to device 0, then device 1, then device 2, etc. before launching the next kernel on device 0.  This will give you the optimum performance in the sense that all GPUs will be engaged with processing, as early as possible in the launch sequence.
If you'd like to see changes in CUDA behavior or documentation, the general suggestion is to become a registered developer at developer.nvidia.com, then log into your account there and file a bug, using the bug filing process accessible by clicking on your account name in the upper right hand corner.


text:
Q: html tags in products attributes on woocommerce At this moment I'm using WooCommerce,and  I'm trying to insert HTML code in an attribute of a product but to save this escaping HTML tags
is there a way to place HTML tags in an attribute?

A: Use jQuery. Your changes will be added when the page is rendered. Example:
$('#link').attr('my-attr', 'my-value');