qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,667,887 | <p>I find myself doing this a lot, and I assume there is a short hand way to make this faster. Yet in my research about shorthand and ternary operations, I can't quite seem to wrap my head around how to do it.</p>
<pre><code>// below variable only be impactful if it's SET, not Null, and === important value.
$verbose_i... | [
{
"answer_id": 74667879,
"author": "N.braha",
"author_id": 6121138,
"author_profile": "https://Stackoverflow.com/users/6121138",
"pm_score": 0,
"selected": false,
"text": "function erstellenEintrag() {\n var li = document.createElement(\"li\");\n // Set the content of the <li> element ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13757852/"
] |
74,667,899 | <p>I have simple class like that;</p>
<pre><code>class Foo {
constructor() {
this.datas = {}
}
set(key, data) {
return this.datas[key] = data
}
get(key) {
return this.datas[key]
}
}
module.exports = Foo
</code></pre>
<p>I am adding some data to <code>datas</code> veria... | [
{
"answer_id": 74667879,
"author": "N.braha",
"author_id": 6121138,
"author_profile": "https://Stackoverflow.com/users/6121138",
"pm_score": 0,
"selected": false,
"text": "function erstellenEintrag() {\n var li = document.createElement(\"li\");\n // Set the content of the <li> element ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18220526/"
] |
74,667,900 | <p>I'm trying to decode a JSON string in swift but having some weird issues accessing the properties once decoded.</p>
<p>This is the contents of the JSON file that I retrieve from a locally stored JSON file</p>
<pre class="lang-json prettyprint-override"><code>[
{
"word": "a",
"usage... | [
{
"answer_id": 74667879,
"author": "N.braha",
"author_id": 6121138,
"author_profile": "https://Stackoverflow.com/users/6121138",
"pm_score": 0,
"selected": false,
"text": "function erstellenEintrag() {\n var li = document.createElement(\"li\");\n // Set the content of the <li> element ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667900",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675069/"
] |
74,667,901 | <p>I am trying to have 9 columns per row using <code>row-cols-*</code>, but it doesn't work with more than 6:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><script s... | [
{
"answer_id": 74667879,
"author": "N.braha",
"author_id": 6121138,
"author_profile": "https://Stackoverflow.com/users/6121138",
"pm_score": 0,
"selected": false,
"text": "function erstellenEintrag() {\n var li = document.createElement(\"li\");\n // Set the content of the <li> element ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17746636/"
] |
74,667,952 | <p>I am in the process of creating a web application for a genealogy project. I want each person I add onto the database to have a unique id, based on the first 3 characters of their surname (let's call it, for the purpose of explaining, 'surname-string'), concatenated with an autoincrement (which starts from 00001 fo... | [
{
"answer_id": 74668396,
"author": "Ergest Basha",
"author_id": 16461952,
"author_profile": "https://Stackoverflow.com/users/16461952",
"pm_score": 1,
"selected": false,
"text": "uniqu_identifier CREATE TABLE test(\nid bigint NOT NULL AUTO_INCREMENT,\nsurname varchar(20),\nuniqu_identifi... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13355162/"
] |
74,667,965 | <p>I am trying to write a multi-threaded program to produce a vector of <code>N*NumPerThread</code> uniform random integers, where <code>N</code> is the return value of <code>std::thread::hardware_concurrency()</code> and <code>NumPerThread</code> is the amount of random numbers I want each thread to generate.</p>
<p>I... | [
{
"answer_id": 74668092,
"author": "Nicol Bolas",
"author_id": 734069,
"author_profile": "https://Stackoverflow.com/users/734069",
"pm_score": 2,
"selected": false,
"text": "std::vector<int>"
},
{
"answer_id": 74668131,
"author": "lewis",
"author_id": 6814658,
"author... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18255427/"
] |
74,667,970 | <p>I have a lot of movie files and I want to get their production year from their file names. as below:</p>
<p>Input: <code>Kingdom.of.Heaven.2005.720p.Dubbed.Film2media</code></p>
<p>Output: <code>2005</code></p>
<p>This code just splits <strong>all</strong> the numbers:</p>
<pre class="lang-cs prettyprint-override"><... | [
{
"answer_id": 74668067,
"author": "Olivier Jacot-Descombes",
"author_id": 880990,
"author_profile": "https://Stackoverflow.com/users/880990",
"pm_score": 3,
"selected": true,
"text": "\\b(19\\d\\d)|(20\\d\\d)\\b\n 19\\d\\d 20\\d\\d \\b | 2001 string productionYear =\n Regex.Match(str... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16478672/"
] |
74,667,993 | <p>If I have a dataframe `</p>
<pre><code>A Variant&Price Qty
AAC 7:124|25: 443 1
AAD 35:|35: 1
AAS 32:98|3:40 1
AAG 2: |25: 1
AAC 25:443|26:344 1
</... | [
{
"answer_id": 74668029,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "extractall : any between m = (df['Variant&Price'].str.extractall('(\\d+):')[0]\n .astype(int).between(2,7).group... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74667993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20434497/"
] |
74,668,015 | <p>Inside one JS file I saw:</p>
<pre><code>Math.round(timeEngine.timeLeft, 10)
</code></pre>
<p>I've checked many documentations (some are mentioned here) and all mention that this function takes one argument, so what the second argument (10) is referring to?</p>
<p><a href="https://www.w3schools.com/jsref/jsref_round... | [
{
"answer_id": 74668029,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "extractall : any between m = (df['Variant&Price'].str.extractall('(\\d+):')[0]\n .astype(int).between(2,7).group... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675451/"
] |
74,668,064 | <p>Here's the code that I attempted</p>
<pre><code>public String isPalindrome(String s) {
String trimmed = s.replaceAll("[^A-Za-z0-9]", "");
String reversed = "";
int len = trimmed.length();
for (int i = len - 1; i >= 0; i--) {
char[] allChars = trimmed.t... | [
{
"answer_id": 74668029,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "extractall : any between m = (df['Variant&Price'].str.extractall('(\\d+):')[0]\n .astype(int).between(2,7).group... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17934589/"
] |
74,668,103 | <p>I want to merge two arrays.
I want to get arr1 data based on arr2 structure, how should I do it?</p>
<p>I tried using 3 forEach, but it doesn't work.</p>
<pre><code>const arr1 = [{id:'1', List:[{name:'a', title:'a title'}, {name:'b', title:'b title'}]}, {id:'2', List:[{name:'c', title:'c title'}, {name:'d', title:'d... | [
{
"answer_id": 74668214,
"author": "Andrew Parks",
"author_id": 5898421,
"author_profile": "https://Stackoverflow.com/users/5898421",
"pm_score": 2,
"selected": true,
"text": "const arr1 = [{id:'1', List:[{name:'a', title:'a title'}, {name:'b', title:'b title'}]}, {id:'2', List:[{name:'c... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668103",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12066654/"
] |
74,668,114 | <p>The calculator should take inputs like (23>3) or (a>9) and prints if it's true or false. My main difficulty is doing it for letters. I only managed to do it for numbers. I don't know how to define the <code>scanf</code> to accept a letter. When a letter is compared to a number, I need to compare the letters' A... | [
{
"answer_id": 74668214,
"author": "Andrew Parks",
"author_id": 5898421,
"author_profile": "https://Stackoverflow.com/users/5898421",
"pm_score": 2,
"selected": true,
"text": "const arr1 = [{id:'1', List:[{name:'a', title:'a title'}, {name:'b', title:'b title'}]}, {id:'2', List:[{name:'c... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20522584/"
] |
74,668,149 | <p>Need to scrape the full table from this site with "Load more" option.</p>
<p>As of now when I`m scraping , I only get the one that shows up by default on when loading the page.</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
import requests
from six.moves import urllib
URL2 = "... | [
{
"answer_id": 74669245,
"author": "αԋɱҽԃ αмєяιcαη",
"author_id": 7658985,
"author_profile": "https://Stackoverflow.com/users/7658985",
"pm_score": 2,
"selected": false,
"text": "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nheaders = {\n 'User-Agent': 'Mozill... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20041271/"
] |
74,668,152 | <p>I am using a Stanford STANZA pipeline on some (italian) text.</p>
<p>Problem I'm grappling with is that I need data from BOTH the Token and Word objects.</p>
<p>While I'm able to access one or the other separately I'm not wrapping my head on how to get data from both in a single loop over the Document -> Sentence... | [
{
"answer_id": 74669245,
"author": "αԋɱҽԃ αмєяιcαη",
"author_id": 7658985,
"author_profile": "https://Stackoverflow.com/users/7658985",
"pm_score": 2,
"selected": false,
"text": "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nheaders = {\n 'User-Agent': 'Mozill... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668152",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7800760/"
] |
74,668,183 | <p>I'm trying to clear values in the sheets that are present in a workbook. I have a list of all possible (valid) sheets, but I won't know which sheet is currently present in the workbook. So, I need to get the worksheets' name, see if it's valid and then clear its contents. Here's what I have so far:</p>
<pre><code>Su... | [
{
"answer_id": 74669245,
"author": "αԋɱҽԃ αмєяιcαη",
"author_id": 7658985,
"author_profile": "https://Stackoverflow.com/users/7658985",
"pm_score": 2,
"selected": false,
"text": "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nheaders = {\n 'User-Agent': 'Mozill... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5118106/"
] |
74,668,211 | <p>I want to call a component and render it once on button click. So if I pressed the button again it would render however does not constantly try and re render itself.</p>
<p>At the moment, I am passing a function to the component and calling at the end of the useEffect. However this seems to not render anything.</p>
... | [
{
"answer_id": 74669245,
"author": "αԋɱҽԃ αмєяιcαη",
"author_id": 7658985,
"author_profile": "https://Stackoverflow.com/users/7658985",
"pm_score": 2,
"selected": false,
"text": "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nheaders = {\n 'User-Agent': 'Mozill... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19213617/"
] |
74,668,286 | <p>I want to send image in <code>Socket</code>.
How can I do that with <code>Ktor</code>?</p>
| [
{
"answer_id": 74668762,
"author": "hassan bazai",
"author_id": 14279755,
"author_profile": "https://Stackoverflow.com/users/14279755",
"pm_score": 0,
"selected": false,
"text": "val multipart = MultipartFormDataContent()\nval filePart = FileDataPart(\"filename\", \"image.jpg\")\nmultipa... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20626088/"
] |
74,668,291 | <p>I would like to be able to call class prototype methods using bracket notation, so that the method name can be decided at run time:</p>
<pre class="lang-js prettyprint-override"><code>classInstance['methodName'](arg);
</code></pre>
<p>I am failing to do this properly with TypeScript:</p>
<pre class="lang-js prettypr... | [
{
"answer_id": 74668762,
"author": "hassan bazai",
"author_id": 14279755,
"author_profile": "https://Stackoverflow.com/users/14279755",
"pm_score": 0,
"selected": false,
"text": "val multipart = MultipartFormDataContent()\nval filePart = FileDataPart(\"filename\", \"image.jpg\")\nmultipa... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/340355/"
] |
74,668,300 | <p>Julia REPL tells me that the output of</p>
<pre><code>'c'+2
</code></pre>
<p>is <code>'e': ASCII/Unicode U+0065 (category Ll: Letter, lowercase)</code>
but that the output of</p>
<pre><code>'c'+2-'a'
</code></pre>
<p>is <code>4</code>.</p>
<p>I'm fine with the fact that Chars are identified as numbers via their ASCI... | [
{
"answer_id": 74668529,
"author": "Bogumił Kamiński",
"author_id": 1269567,
"author_profile": "https://Stackoverflow.com/users/1269567",
"pm_score": 4,
"selected": true,
"text": "julia> @which 'a' - 1\n-(x::T, y::Integer) where T<:AbstractChar in Base at char.jl:227\n\njulia> @which 'a'... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668300",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3525251/"
] |
74,668,309 | <p>hello im trying to change a class name dynamiclly in react</p>
<p>hello im trying to change a class name dynamiclly in react</p>
<p>i am importing the classes from a realted css file like this</p>
<pre><code>import classes from "./Board.module.css";
</code></pre>
<p>and in my Board componnet i want to retu... | [
{
"answer_id": 74668529,
"author": "Bogumił Kamiński",
"author_id": 1269567,
"author_profile": "https://Stackoverflow.com/users/1269567",
"pm_score": 4,
"selected": true,
"text": "julia> @which 'a' - 1\n-(x::T, y::Integer) where T<:AbstractChar in Base at char.jl:227\n\njulia> @which 'a'... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15784054/"
] |
74,668,311 | <p>I have sales data that gives me dates in a bad format. Every new sale gets automatically added to the sheet. Looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Column A</th>
<th>Column B</th>
<th>Column C</th>
</tr>
</thead>
<tbody>
<tr>
<td>Order 1</td>
<td>2022-12-02T02:0... | [
{
"answer_id": 74668529,
"author": "Bogumił Kamiński",
"author_id": 1269567,
"author_profile": "https://Stackoverflow.com/users/1269567",
"pm_score": 4,
"selected": true,
"text": "julia> @which 'a' - 1\n-(x::T, y::Integer) where T<:AbstractChar in Base at char.jl:227\n\njulia> @which 'a'... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11995921/"
] |
74,668,354 | <p>Have this so far, and essentially want to get there is something wrong with the position of <code>last_odd</code> as the compiler says the pop index is out of range?</p>
<pre><code>def remove_last_odd(numbers):
has_odd = False
last_odd = 0
for num in range(len(numbers)):
if numbers[num] % 2 == 1... | [
{
"answer_id": 74668529,
"author": "Bogumił Kamiński",
"author_id": 1269567,
"author_profile": "https://Stackoverflow.com/users/1269567",
"pm_score": 4,
"selected": true,
"text": "julia> @which 'a' - 1\n-(x::T, y::Integer) where T<:AbstractChar in Base at char.jl:227\n\njulia> @which 'a'... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11725381/"
] |
74,668,364 | <p>I need to write a JavaScript program where it validates input.</p>
<p>Requirement:</p>
<ul>
<li>Input will have a specific prefix. (eg: --NAME--)</li>
<li>After this prefix, there can be any characters. (eg:
--NAME--any-name_wit#-any*_special_char@#$%)</li>
<li>Minimum length of total input (or length of suffix) sho... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668364",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13427720/"
] |
74,668,410 | <pre><code> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutterbluetooth">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_AD... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17906689/"
] |
74,668,477 | <p>looking to create a title style where the text breaks in-between the line, not sure if this would be considered a border or what. Any ideas?</p>
<img src="https://i.stack.imgur.com/LQ7Ek.png">
<p>Haven't tried anything yet - have been playing around but can't figure it out</p>
| [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668477",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675746/"
] |
74,668,533 | <p>I think I remember something like this from python, maybe it was the walrus operator? idk.</p>
<p>but is there a way to set an attribute while returning the value? something like this:</p>
<pre><code>class Foo {
late String foo;
Foo();
String setFoo() => foo := 'foo';
}
f = Foo();
x = f.setFoo();
print(x);... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3071728/"
] |
74,668,559 | <p>JVM up from java 11 is using by Default G1.</p>
<p>If i wont change anything by myself, will JVM make any improvements by it own and change for example to Serial if my app will be lacking resources. Or whether app is in the container or not?
Or i have to manage it by myself?</p>
| [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1894980/"
] |
74,668,561 | <p>I know similar questions exist.</p>
<p>I've gone through most of them but, so far, none of the solutions worked.</p>
<p>Here is the context:</p>
<p>Operating system: <strong>macOS Ventura 13.0.1</strong> (Intel processor)</p>
<p>Here are some commands output:</p>
<pre><code>$ ruby -v
ruby 2.7.5p203 (2021-11-24 revis... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1552587/"
] |
74,668,578 | <p>I am running WSL2 and trying to get Git Credential Manager (GCM) set up so that I don't have to always copy-paste my Github Personal Access Token into my terminal. Once I added the credential manager I was unable to access my remote repositories, this is what my <code>.gitconfig</code> looks like:</p>
<pre><code> 1... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11460992/"
] |
74,668,585 | <p>I was wondering regarding Kubernetes HPA custom metrics HPA how it is calculated with targetAverageValue.
If for example I’m using the metric that scales pods based on the number of nginx request then each pod now have is own specific metric and I was wondering if it takes each pod and check regarding its value or i... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11722396/"
] |
74,668,605 | <p>I'm using MudBlazor component library. In order to show loading on form buttons, the <a href="https://mudblazor.com/components/button#loading-button" rel="nofollow noreferrer">documentation</a> guides like this:</p>
<pre><code><MudButton Disabled="@_processing" OnClick="ProcessSomething" Varia... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19363672/"
] |
74,668,608 | <p>I have a JSON code like this:</p>
<pre><code>final String response = await rootBundle.loadString('assets/Schools.json');
List data = await json.decode(response);
print(data);
/* output:
[{ "city": "ISTANBUL", "districty": "Kagithane", "name": "Kagithane anadolu... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668608",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18003111/"
] |
74,668,617 | <p>Note, if it is single element I can extract but I need to extract all of them together.</p>
<p>Hi I am trying to extract the text and link from a list of items from a page using Selenium and Java. I am able to extract all link text but facing issue to figure out the link text. The html code looks like below:</p>
<pr... | [
{
"answer_id": 74668388,
"author": "Amila Senadheera",
"author_id": 8510405,
"author_profile": "https://Stackoverflow.com/users/8510405",
"pm_score": 3,
"selected": true,
"text": "/^--NAME--.{42,}$/ .{42,} --NAME-- const regex = /^--NAME--.{42,}$/\n\nconsole.log(regex.test(\"--NAME--C$#V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20551699/"
] |
74,668,626 | <p>I am trying to control the input I took from a form with joi validation. The function <code>validateCampgrount</code> is a middleware to check it but when I try to write the next function it says next is not defined.*</p>
<p>Where I am using <code>next()</code></p>
<pre><code>const validateCampground = (req, res, ne... | [
{
"answer_id": 74668718,
"author": "Michael M.",
"author_id": 13376511,
"author_profile": "https://Stackoverflow.com/users/13376511",
"pm_score": 3,
"selected": true,
"text": "app.post() app.post(\"/campgrounds\", validateCampground, async (req, res, next) => {\n const campground = new ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668626",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15845644/"
] |
74,668,627 | <p>I had given a technical interview in which I have been asked to find intersection point of n link list.
I could come up to find intersection point of 2 link list but couldn't extend it.
Could someone help me reach the algorithm</p>
<p>I tried to call the function to find integration point of 2 link list for every pa... | [
{
"answer_id": 74668718,
"author": "Michael M.",
"author_id": 13376511,
"author_profile": "https://Stackoverflow.com/users/13376511",
"pm_score": 3,
"selected": true,
"text": "app.post() app.post(\"/campgrounds\", validateCampground, async (req, res, next) => {\n const campground = new ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8111583/"
] |
74,668,631 | <p>I have a CSV file that contains chemical matter names and some info.What I need to do is add new columns and write their formulas, molecular weights and count H,C,N,O,S atom numbers in each formula.I am stuck with the counting atom numbers part.I have the function related it but I don't know how to merge it and mak... | [
{
"answer_id": 74668718,
"author": "Michael M.",
"author_id": 13376511,
"author_profile": "https://Stackoverflow.com/users/13376511",
"pm_score": 3,
"selected": true,
"text": "app.post() app.post(\"/campgrounds\", validateCampground, async (req, res, next) => {\n const campground = new ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19828152/"
] |
74,668,665 | <p>This is a follow up on <a href="https://stackoverflow.com/questions/74667477/no-user-defined-conversion-when-using-standard-variants-and-visitor-pattern/74667677#74667677">No user defined conversion when using standard variants and visitor pattern</a></p>
<p>I need to implement a <strong>templated version</strong> o... | [
{
"answer_id": 74668896,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 2,
"selected": false,
"text": "template virtual std::variant<>"
},
{
"answer_id": 74670891,
"author": "Rulle",
"author_id": 1008794,
... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18718251/"
] |
74,668,675 | <p>I want to use a python script to call it in the <strong>pam_exec</strong> module.</p>
<p>The <a href="https://stackoverflow.com/questions/53820496/using-my-own-python-script-to-authenticate-into-my-computer">first answer</a> in this question says that I can't use a python script and a PAM module together.</p>
<block... | [
{
"answer_id": 74668694,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 0,
"selected": false,
"text": "/etc/pam.d/common-password file."
},
{
"answer_id": 74669028,
"author": "TrentP",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15151531/"
] |
74,668,679 | <p>I have a script running that reformats borders on a variable range on the active sheet.
I would like to have it cycle through other sheets in the same workbook, without those changes being visible to the user (ie - the GUI of the current screen stays as the only thing visible while the script runs).</p>
<p>Currently... | [
{
"answer_id": 74668694,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 0,
"selected": false,
"text": "/etc/pam.d/common-password file."
},
{
"answer_id": 74669028,
"author": "TrentP",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20583572/"
] |
74,668,687 | <p>I have this problem. When I click on menù link, the page scroll but the menù remain open. This is my code-pen link (For some reason, codepen don't read che css color link, but don't worry about it)
Js suggestions? I have just tried with on click function, but don't work.</p>
<p>Thank you every body can help me!</p>
... | [
{
"answer_id": 74668694,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 0,
"selected": false,
"text": "/etc/pam.d/common-password file."
},
{
"answer_id": 74669028,
"author": "TrentP",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15910389/"
] |
74,668,688 | <p>Please I am trying to plot a scatter plot as shown in the attached image.</p>
<p>I have tried the below code but it is not working. This is in python by the way.</p>
<pre><code>hours = [n / 3600 for n in seconds]
fig, ax = plt.subplots(figsize=(8, 6))
## Your code here
ax.plot(hours, fish_counts, marker="x"... | [
{
"answer_id": 74668694,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 0,
"selected": false,
"text": "/etc/pam.d/common-password file."
},
{
"answer_id": 74669028,
"author": "TrentP",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13863465/"
] |
74,668,708 | <p>So i am trying to add radio button on my survey form and the button and the text is completly in different positions so here is a picture of how it looks --> <a href="https://i.stack.imgur.com/TKUQl.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>i tried display: inline; but still nothing c... | [
{
"answer_id": 74668694,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 0,
"selected": false,
"text": "/etc/pam.d/common-password file."
},
{
"answer_id": 74669028,
"author": "TrentP",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675973/"
] |
74,668,716 | <p>I'm trying to add a custom field in Word (in the shape { CUSTOM_FIELD } ) that uses the current page number and outputs its text representation (12 => twelve), but in multiple exotic (not supported) languages, which is why the built-in English variant (page * cardtext) isn't sufficient.</p>
<p>The VBA code won't ... | [
{
"answer_id": 74669462,
"author": "Charles Kenyon",
"author_id": 14133995,
"author_profile": "https://Stackoverflow.com/users/14133995",
"pm_score": 0,
"selected": false,
"text": "Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _\n PreserveFormatting:=False\nSelectio... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2890731/"
] |
74,668,741 | <p>I have a data file that consists of a calorie count.
the calorie count it separated by each elf that owns it and how many calories are in each fruit.
so this represents 3 elves</p>
<pre><code>4323
4004
4070
1780
5899
1912
2796
5743
3008
1703
4870
5048
2485
1204
30180
33734
19662
</code></pre>
<p>all the numbers n... | [
{
"answer_id": 74669462,
"author": "Charles Kenyon",
"author_id": 14133995,
"author_profile": "https://Stackoverflow.com/users/14133995",
"pm_score": 0,
"selected": false,
"text": "Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _\n PreserveFormatting:=False\nSelectio... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675966/"
] |
74,668,764 | <p>I have a function that prints the first multiples of a number (n) starting with zero and stopping at num_multiples, but it keeps printing out one too many multiples. I'm hoping someone can explain what I'm doing wrong so I can understand recursion a bit more.</p>
<pre><code>def print_first_multiples(n, num_multiples... | [
{
"answer_id": 74668799,
"author": "Yevhen Kuzmovych",
"author_id": 4727702,
"author_profile": "https://Stackoverflow.com/users/4727702",
"pm_score": 0,
"selected": false,
"text": "if num_multiples < 0 num_multiples = 3 num_multiples=3 num_multiples=2 num_multiples=1 num_multiples=0 if n... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
74,668,802 | <p>I have a component where-in I need to fetch some data and render it. The component gets rendered initially. The problem I'm facing is when the handler function <code>switchDocumentType</code> is called after clicking the button for a particular type, the whole component gets unmounted/un-rendered.</p>
<p>While debug... | [
{
"answer_id": 74668799,
"author": "Yevhen Kuzmovych",
"author_id": 4727702,
"author_profile": "https://Stackoverflow.com/users/4727702",
"pm_score": 0,
"selected": false,
"text": "if num_multiples < 0 num_multiples = 3 num_multiples=3 num_multiples=2 num_multiples=1 num_multiples=0 if n... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668802",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10977818/"
] |
74,668,808 | <p>I am implementing a simple arithmetic calculation on a server which includes add, sub, mul and Div, for the simplicity purposes no other operations are being done and also no parentheses "()" to change the precedence. The input I will have for the client is something like "1-2.1+3.6*5+10/2"(no do... | [
{
"answer_id": 74668799,
"author": "Yevhen Kuzmovych",
"author_id": 4727702,
"author_profile": "https://Stackoverflow.com/users/4727702",
"pm_score": 0,
"selected": false,
"text": "if num_multiples < 0 num_multiples = 3 num_multiples=3 num_multiples=2 num_multiples=1 num_multiples=0 if n... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668808",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12229319/"
] |
74,668,816 | <p>I am wondering whether there is a difference in performance between these two if-statements:</p>
<pre class="lang-cs prettyprint-override"><code>if(myObject != null && myObject.someBoolean)
{
// do something
}
if (myObject?.someBoolean ?? false)
{
// do something
}
</code></pre>
<p>If there is a dif... | [
{
"answer_id": 74669235,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": -1,
"selected": false,
"text": "?. if (obj != null) if (obj != null)\n{\n int x = obj.Value;\n}\n obj Value obj int x = obj?.Value;\n V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11257746/"
] |
74,668,849 | <p>I need to select 3 random events from the database by a certain parameter (their type). How can I do this?</p>
<p>Right now, I use foreach to select everything, but I need to select 3 objects and select them randomly.</p>
<pre><code>@foreach (Event entity in Model)
{
@if (entity.Type=="Концерт")
{
... | [
{
"answer_id": 74669235,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": -1,
"selected": false,
"text": "?. if (obj != null) if (obj != null)\n{\n int x = obj.Value;\n}\n obj Value obj int x = obj?.Value;\n V... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20183977/"
] |
74,668,853 | <p>I am trying to use the fold operation on a range returned by <code>byLine()</code>. I want the lambda which is passed to fold to be a multi-line function. I have searched google and read the documentation, but cannot find a description as to what the signature of the function should be. I surmize that one of the ... | [
{
"answer_id": 74668971,
"author": "Akshay",
"author_id": 3881787,
"author_profile": "https://Stackoverflow.com/users/3881787",
"pm_score": 3,
"selected": true,
"text": "import std.algorithm.iteration : fold;\n\n// Import the byLine function from the File module\nimport std.stdio.File : ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/524644/"
] |
74,668,854 | <p>I have this kind of code</p>
<pre><code>typedef struct {
int x;
int y;
} Test;
Test* getTest(int *length) {
Test *toReturn = malloc(sizeof(Test));
// Some operations with realloc
return toReturn;
}
void printTest(Test *arrTest, int length) {
for(int i = 0; i < length; i++) {
// S... | [
{
"answer_id": 74668942,
"author": "Akshay",
"author_id": 3881787,
"author_profile": "https://Stackoverflow.com/users/3881787",
"pm_score": -1,
"selected": false,
"text": "typedef struct {\n int x;\n int y;\n} Test;\n\nTest* getTest(int *length) {\n Test *toReturn = malloc(sizeo... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16881135/"
] |
74,668,873 | <p>in my C99-programme I want to use pseudo-random numbers between 0 an 1.
Unfortunatly, my programme always generates a first number that is almost identical. It just steps up ever so slightly every time I rerun my programme.</p>
<p>This is the relevant part of my programme:</p>
<pre><code>srand(time(NULL));
for(int... | [
{
"answer_id": 74668942,
"author": "Akshay",
"author_id": 3881787,
"author_profile": "https://Stackoverflow.com/users/3881787",
"pm_score": -1,
"selected": false,
"text": "typedef struct {\n int x;\n int y;\n} Test;\n\nTest* getTest(int *length) {\n Test *toReturn = malloc(sizeo... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676050/"
] |
74,668,885 | <p>I wish to create a custom calculator where the user defines two parameters and a function using a GUI and when they click on calculate it executes their user defined function passing the two parameters.</p>
<pre class="lang-py prettyprint-override"><code>argument1 = IntSlider( … )
argument2 = IntSlider( … )
userDefi... | [
{
"answer_id": 74668942,
"author": "Akshay",
"author_id": 3881787,
"author_profile": "https://Stackoverflow.com/users/3881787",
"pm_score": -1,
"selected": false,
"text": "typedef struct {\n int x;\n int y;\n} Test;\n\nTest* getTest(int *length) {\n Test *toReturn = malloc(sizeo... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668885",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13224380/"
] |
74,668,891 | <p>so i'm taking a python class right now and am struggling with dictionaries at the moment. my assignment is simple, i have to create a fucntion "letter_positions" which will return a dictionary of all positions of a letter in a string.</p>
<p>for example</p>
<pre><code>positions = letter_positions("fif... | [
{
"answer_id": 74669560,
"author": "Daniel Hao",
"author_id": 10760768,
"author_profile": "https://Stackoverflow.com/users/10760768",
"pm_score": 1,
"selected": false,
"text": "from collections import defaultdict\n\ndef letter_index(sentence):\n answer = defaultdict(list)\n \n f... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668891",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676037/"
] |
74,668,899 | <p>why this is not working?? anything else i need to doo??? (note: i don't want to call any <code>boot</code> method from <code>model</code>). in models its working fine with <code>booted</code> method</p>
<pre class="lang-php prettyprint-override"><code>// route
Route::get('/tests', function () {
return Test::fin... | [
{
"answer_id": 74669308,
"author": "kundefine",
"author_id": 10691416,
"author_profile": "https://Stackoverflow.com/users/10691416",
"pm_score": 1,
"selected": false,
"text": "boot Sortable bootSortable // route\nRoute::get('/tests', function () {\n\n return Test::find(1)->update([\n ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10691416/"
] |
74,668,908 | <p>I have a dataset like below:</p>
<pre><code>data="""vJrwpWtwJgWrhcsFMMfFFhFp
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
PmmdzqPrVvPwwTWBwg
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
ttgJtRGJQctTZtZT
CrZsJsPPZsGzwwsLwLmpwMDw"""
</code></pre>
<p>These are separate lines. Now, I want to group the data in a <cod... | [
{
"answer_id": 74669308,
"author": "kundefine",
"author_id": 10691416,
"author_profile": "https://Stackoverflow.com/users/10691416",
"pm_score": 1,
"selected": false,
"text": "boot Sortable bootSortable // route\nRoute::get('/tests', function () {\n\n return Test::find(1)->update([\n ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9363181/"
] |
74,668,915 | <p>I have a scenario where I have a git branch (b), based off of develop.</p>
<p>I then made changes to branch (b) and pushed to remote (b)</p>
<p>Some other developer made a PR and had their code merged into develop.</p>
<p>I then pull the changes from remote/develop and rebased my local branch (b) onto develop</p>
<p... | [
{
"answer_id": 74669016,
"author": "gentleslaughter",
"author_id": 20676002,
"author_profile": "https://Stackoverflow.com/users/20676002",
"pm_score": -1,
"selected": false,
"text": "git reset git pull --force git reset git pull"
},
{
"answer_id": 74669105,
"author": "Rusly -... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8556469/"
] |
74,668,934 | <p>I wrote this code in C and it shows me this error.
I don't know what it is or how can I solve it.</p>
<pre><code>#include <stdio.h>
#include <math.h>
int main()
{
int z;
scanf("%d", &z);
double x1 , x2 , x3 , x4 , y1 , y2 , y3 , y4;
for(int i = 0;i<=z;i++)
{
... | [
{
"answer_id": 74669042,
"author": "m3ow",
"author_id": 20474278,
"author_profile": "https://Stackoverflow.com/users/20474278",
"pm_score": 1,
"selected": false,
"text": "double tule_parekhat1 = sqrt(pow(y2-y1, 2) + (pow(x2-x1), 2));\n (pow(x2-x1), 2)) double tule_parekhat1 = sqrt(pow(y2... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676147/"
] |
74,668,944 | <p>I want to build a program that takes the amount of rainfall each day for 7 days and then output the total and average rainfall for those days.</p>
<p>Initially, I've created a while loop to take the input:</p>
<pre class="lang-py prettyprint-override"><code>rainfall = 0
rain = []
counter = 1
while counter < 8:
... | [
{
"answer_id": 74669042,
"author": "m3ow",
"author_id": 20474278,
"author_profile": "https://Stackoverflow.com/users/20474278",
"pm_score": 1,
"selected": false,
"text": "double tule_parekhat1 = sqrt(pow(y2-y1, 2) + (pow(x2-x1), 2));\n (pow(x2-x1), 2)) double tule_parekhat1 = sqrt(pow(y2... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4212022/"
] |
74,668,972 | <p>I have simple istream_view and then I am trying to use ranges::copy on result.</p>
<pre><code>auto t = ranges::istream_view<int>(is);
ranges::copy(t, std::back_inserter(v));
</code></pre>
<p><a href="https://godbolt.org/z/1ro9x3nh1" rel="nofollow noreferrer">Live example on godbolt</a></p>
<p>GCC does everythi... | [
{
"answer_id": 74669169,
"author": "IM_AG",
"author_id": 921330,
"author_profile": "https://Stackoverflow.com/users/921330",
"pm_score": 1,
"selected": false,
"text": "std::ranges::copy std::ranges::copy std::ranges::istream_view std::ranges::copy std::ranges::istream_view std::ranges::i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1595323/"
] |
74,668,974 | <p>I am working on a homework problem which is similar to this post:-
<a href="https://stackoverflow.com/questions/5859519/quickest-algorithm-to-find-at-most-n-2-1-liars-in-n-people">Quickest algorithm to find at most (n/2)-1 liars in n people</a></p>
<p>The problem is given below:-
This problem is couched in terms of ... | [
{
"answer_id": 74669088,
"author": "David G",
"author_id": 701092,
"author_profile": "https://Stackoverflow.com/users/701092",
"pm_score": 2,
"selected": true,
"text": "const int MAX_N = 100;\nint n;\nint t;\nbool people[MAX_N]; // True if the person is a liar, false otherwise\n\nvoid fi... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74668974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19572566/"
] |
74,669,001 | <p>I'm trying to get common characters from two separate vectors.</p>
<p>Example:</p>
<pre><code>x <- c("abcde")
y <- c("efghi")
df <- data.frame(x, y)
</code></pre>
<p>Desired output</p>
<pre><code> x y z
abcde efghi e
lmnop uvmxw m
</code></pre>
<p>I've trie... | [
{
"answer_id": 74669128,
"author": "Eric",
"author_id": 7091646,
"author_profile": "https://Stackoverflow.com/users/7091646",
"pm_score": 2,
"selected": false,
"text": "str_intersect <- function(s1,s2) {\n paste0(intersect(strsplit(s1,\"\")[[1]],strsplit(s2,\"\")[[1]]),collapse = \"\")\... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669001",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13874036/"
] |
74,669,005 | <p>i keep getting <code>404 image not found</code> when viewing the uploaded image on my project but the image is there. im using laravel's <code>asset()</code> helper to retrieve the image. the url in chrome shows <code>http://127.0.0.1:8000/images/dU8oaVTAwQyTor86jvDtdGKvE7H3MYkHZuUG60gH.png</code> and ive already do... | [
{
"answer_id": 74669128,
"author": "Eric",
"author_id": 7091646,
"author_profile": "https://Stackoverflow.com/users/7091646",
"pm_score": 2,
"selected": false,
"text": "str_intersect <- function(s1,s2) {\n paste0(intersect(strsplit(s1,\"\")[[1]],strsplit(s2,\"\")[[1]]),collapse = \"\")\... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3089096/"
] |
74,669,017 | <p><em><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d69eee7953a6392d12c81a77a21cf15a" rel="nofollow noreferrer">Playground</a></em></p>
<p>I have the following type definition:</p>
<pre class="lang-rust prettyprint-override"><code>pub struct UTF8Chars {
bytes: Peekabl... | [
{
"answer_id": 74669911,
"author": "Kevin Reid",
"author_id": 99692,
"author_profile": "https://Stackoverflow.com/users/99692",
"pm_score": 3,
"selected": true,
"text": "let bytes = Box::new(self.bytes()) as Box<dyn Iterator<Item = u8>>;\n let as let bytes: Box<dyn Iterator<Item = u8>> =... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10315665/"
] |
74,669,044 | <p>I have a transposed Dataframe tr:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;"></th>
<th style="text-align: center;">7128</th>
<th style="text-align: center;">8719</th>
<th style="text-align: center;">14051</th>
<th style="text-align: center;">14636</th>
</tr... | [
{
"answer_id": 74669911,
"author": "Kevin Reid",
"author_id": 99692,
"author_profile": "https://Stackoverflow.com/users/99692",
"pm_score": 3,
"selected": true,
"text": "let bytes = Box::new(self.bytes()) as Box<dyn Iterator<Item = u8>>;\n let as let bytes: Box<dyn Iterator<Item = u8>> =... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11896087/"
] |
74,669,065 | <p>I want to scrape the tweets of a specific account on Twitter via SB but it is not working for me</p>
<p>this is my code :</p>
<pre><code> import facebook as fb
from bs4 import BeautifulSoup as bs
import requests
myUrl = requests.get('https://twitter.com/search?q=(from%3AAlMosahf)&src=typed_query&... | [
{
"answer_id": 74669613,
"author": "palash gupta",
"author_id": 12719634,
"author_profile": "https://Stackoverflow.com/users/12719634",
"pm_score": 2,
"selected": false,
"text": "import tweepy\nfrom bs4 import BeautifulSoup as bs\n\n# Authenticate with the Twitter API\nauth = tweepy.OAut... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19739550/"
] |
74,669,082 | <p>I installed the latest nodejs 19.2.0 on my windows 11 OS rather than the recommended for most users 18.12.1
<code>npx create-react-app my-first-app</code> works just fine, it creates all the files and folders without any errors, shows happy hacking message as well, recommends to use <code>npm start</code> command. I... | [
{
"answer_id": 74669613,
"author": "palash gupta",
"author_id": 12719634,
"author_profile": "https://Stackoverflow.com/users/12719634",
"pm_score": 2,
"selected": false,
"text": "import tweepy\nfrom bs4 import BeautifulSoup as bs\n\n# Authenticate with the Twitter API\nauth = tweepy.OAut... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20635970/"
] |
74,669,137 | <p>I have 4 inputs in my panel; when user clicks <code>cancel</code> I need to revert to the original values before they're modified. Is there a Vuetify or Vue.js way to achieve this? or do I have to manage it using JS by storing all values in a tmp variable?</p>
| [
{
"answer_id": 74669613,
"author": "palash gupta",
"author_id": 12719634,
"author_profile": "https://Stackoverflow.com/users/12719634",
"pm_score": 2,
"selected": false,
"text": "import tweepy\nfrom bs4 import BeautifulSoup as bs\n\n# Authenticate with the Twitter API\nauth = tweepy.OAut... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4480164/"
] |
74,669,147 | <p>I'm not very good in English or in R but hopefully I can manage to explain the problem</p>
<p>I have a dataset where there is one column with years, from 1952 to 2007. I want to recode and reorganize it so that the first year is number 0, the next year nr. 1 and so on...</p>
<p>Can anyone help me?</p>
<p>I have trie... | [
{
"answer_id": 74669204,
"author": "margusl",
"author_id": 646761,
"author_profile": "https://Stackoverflow.com/users/646761",
"pm_score": 3,
"selected": true,
"text": "df <- data.frame(years = 1952:2007)\nis.na(df$years[sample(1:nrow(df), size = 10)]) <- TRUE\n\nhead(df)\n#> years\n#>... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669147",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676291/"
] |
74,669,178 | <p>Here is an example of some of the information in the text file:</p>
<pre><code>Ticker : Ticker representing the company | Company: Name | Title: Position of trader | Trade Type: Buy or sell | Value: Monetary value
Ticker : AKUS | Company: Akouos, Inc. | Title: 10% | Trade Type: P - Purchase | Value: +$374,908,350
T... | [
{
"answer_id": 74669435,
"author": "ScottC",
"author_id": 20174226,
"author_profile": "https://Stackoverflow.com/users/20174226",
"pm_score": 3,
"selected": true,
"text": "import pandas as pd\n\nfilename = 'file1.txt'\n\ndf = pd.read_csv(filename,\n sep = ':\\s+|\\s\\|',\... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669178",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20404244/"
] |
74,669,191 | <p>Please help write a C++ Program to print this sequence</p>
<p>1,2,5,6,9,10,13,14,17,18 up to 500. I need it for my homework as a student.
I tried</p>
<pre><code>#include <iostream>
using namespace std;
int main()
{
for (int i = 1; i < 454; i++) {
if (i = i + 1) {
continue;
}
... | [
{
"answer_id": 74669537,
"author": "john",
"author_id": 882003,
"author_profile": "https://Stackoverflow.com/users/882003",
"pm_score": 1,
"selected": false,
"text": "#include <iostream>\n\nint main()\n{\n for (int i = 1; i <= 500; i++) {\n if (i % 4 == 1 || i % 4 == 2) {\n ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676384/"
] |
74,669,219 | <p>I have a socket server which creates unix socket and then reads data from this unix socket. Then I have another long-process application and I want to redirect stdout of this process to my unix socket. I tried this command to test</p>
<pre><code>ping 127.0.0.1 > /tmp/unixsockettest.sock
</code></pre>
<p>But I get... | [
{
"answer_id": 74669345,
"author": "larsks",
"author_id": 147356,
"author_profile": "https://Stackoverflow.com/users/147356",
"pm_score": 1,
"selected": false,
"text": "ping 127.0.0.1 | socat - unix-connect:/tmp/unixsockettest.sock\n"
},
{
"answer_id": 74669467,
"author": "PS... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669219",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6246418/"
] |
74,669,259 | <p>I am a bit confused about the use of <code>srcset</code> attribute in the HTML <code>img</code> tag. I read several tutorials on the Web but I think stuff doesn't work as these tutorial report. First of all, let's start with an easy example:</p>
<pre><code><img src="assets/img/software-developer.jpeg" a... | [
{
"answer_id": 74669706,
"author": "Anand MS",
"author_id": 12179934,
"author_profile": "https://Stackoverflow.com/users/12179934",
"pm_score": 1,
"selected": false,
"text": "sizes sizes <img src=\"assets/img/software-developer.jpeg\" alt=\"Some Stuff\" sizes=\"(max-width: 449px) 300px, ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6286900/"
] |
74,669,313 | <p>My project is using Spring and I wanted to test with Mockito but I have a NullPointerException that I can't solve...
Isn't MockBean supposed to inject in my TeacherService ?
I have tried to put @Autowired in front of MockMvc but it's worse...</p>
<p>I want to test my Controller by adding a new Teacher :</p>
<p>This ... | [
{
"answer_id": 74669378,
"author": "Begging",
"author_id": 16606223,
"author_profile": "https://Stackoverflow.com/users/16606223",
"pm_score": 1,
"selected": false,
"text": "@BeforeEach\npublic void setup() {\n this.mvc = MockMvcBuilders.standaloneSetup(new TeacherController()).build(... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13542212/"
] |
74,669,346 | <p>I am trying to make an tracker app in witch I an user can create a group and when clicked on "show on map" it would show all of members position. I have made group info page in witch there is a Add members button. When clicked it takes the user to a new page. In that new page he searches for an different u... | [
{
"answer_id": 74669378,
"author": "Begging",
"author_id": 16606223,
"author_profile": "https://Stackoverflow.com/users/16606223",
"pm_score": 1,
"selected": false,
"text": "@BeforeEach\npublic void setup() {\n this.mvc = MockMvcBuilders.standaloneSetup(new TeacherController()).build(... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20183230/"
] |
74,669,384 | <p>So I'm writing a simple C program that essentially creates a 2D array and allows the user to input values into the 2D array. Then other functions find the smallest and largest value within that array, as well as their position in the array. When I print the matrix in the function, it prints correctly as it should. H... | [
{
"answer_id": 74669451,
"author": "anton-tchekov",
"author_id": 4724047,
"author_profile": "https://Stackoverflow.com/users/4724047",
"pm_score": 3,
"selected": true,
"text": "if (arr[i][j] = num)\n elementPosition if (arr[i][j] == num)\n"
},
{
"answer_id": 74669572,
"author... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676402/"
] |
74,669,395 | <p>I've got XML files that contain HTML snippets. I'm trying to write a Python script that opens such an XML file, searches for the elements containing the HTML, renames the classes, and then writes back the new XML file to file.
Here's an XML example:</p>
<pre><code><?xml version="1.0" encoding="UTF-... | [
{
"answer_id": 74670892,
"author": "Hermann12",
"author_id": 12621346,
"author_profile": "https://Stackoverflow.com/users/12621346",
"pm_score": 1,
"selected": false,
"text": "tree.write() import xml.etree.ElementTree as ET\nfrom html import escape, unescape\n\ntree = ET.parse('source.xm... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1116675/"
] |
74,669,406 | <p>I have a form in Excel and I need to return data from a table in access. When executing an instruction like the image it returns the error "Data Type Mismatch in Criterion Expression". I already reviewed the data types in the table and still could not resolve. What could be happening?</p>
<pre><code> Su... | [
{
"answer_id": 74669566,
"author": "rwffh",
"author_id": 4561966,
"author_profile": "https://Stackoverflow.com/users/4561966",
"pm_score": -1,
"selected": false,
"text": "rs.Open \"SELECT * FROM TbApolice WHERE Contrato='\" & UserForm.txt_certificado.Value & \"''\", db, adOpenKeyset, adL... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12829731/"
] |
74,669,407 | <p>I'm trying to create custom function in WordPress with ACF, and use it as a shortcode.</p>
<p>What I want to do is quite simple:</p>
<ul>
<li>Get a field from ACF</li>
<li>Check if the text is "not found" or something else</li>
<li>If it's something else, I'll show an H2 and a sentence with field content.<... | [
{
"answer_id": 74669566,
"author": "rwffh",
"author_id": 4561966,
"author_profile": "https://Stackoverflow.com/users/4561966",
"pm_score": -1,
"selected": false,
"text": "rs.Open \"SELECT * FROM TbApolice WHERE Contrato='\" & UserForm.txt_certificado.Value & \"''\", db, adOpenKeyset, adL... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676468/"
] |
74,669,431 | <p>I'm trying to change the color of the top border by passing the color value as props to the component, but It doesn't make any effects.</p>
<p>I'm looking for a solution. Please help me!</p>
<pre><code>export default function TargetsProgressInfo(props) {
return (
<ul>
<span ... | [
{
"answer_id": 74669770,
"author": "Necati Turan",
"author_id": 4335325,
"author_profile": "https://Stackoverflow.com/users/4335325",
"pm_score": 0,
"selected": false,
"text": "<ul>\n <li className=\"after:border-[7px] after:w-4 after:border-t-{props.colorTip} after:border-b-transparent... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675823/"
] |
74,669,460 | <p>When I try to send mail from a web page - on the mail.bg and abv.bg mail I receive letters like this :</p>
<pre><code>РќРѕРІРѕ
</code></pre>
<p>where I must receive "Ново"
What can I do so I can fix it - on gmail.com I receive the normal "Ново" and when I use echo - I also receive the normal &quo... | [
{
"answer_id": 74669483,
"author": "Necati Turan",
"author_id": 4335325,
"author_profile": "https://Stackoverflow.com/users/4335325",
"pm_score": -1,
"selected": false,
"text": "mb_internal_encoding(\"UTF-8\");\n"
},
{
"answer_id": 74670256,
"author": "Ken Lee",
"author_i... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669460",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20659496/"
] |
74,669,469 | <p>I'm working a project for school in T-SQL.</p>
<p>I have an Advisors table that is fully set up. I'm trying to update the Student table so that each StudentID is associated with an AdvisorID (referencing the Advisors table). The Student table is fully set up, minus the AdvisorID column. Both tables have Name_Full, N... | [
{
"answer_id": 74669629,
"author": "Özenç Çelik",
"author_id": 8506390,
"author_profile": "https://Stackoverflow.com/users/8506390",
"pm_score": -1,
"selected": false,
"text": "SELECT Name_Last\n FROM Student\n WHERE Name_Last IN ('R%')\n SELECT Name_Last\n FROM Student\n WHE... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17480944/"
] |
74,669,479 | <p>So I havd a problem</p>
<p>1 Im trying to make the website responsive and the paragraph ( and the
<h1>World's Biggest University</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget iaculis dui, quis dapibus diam.
Etiam tellus erat, consectetur eget eros sit amet, tincidunt consectetur erat... | [
{
"answer_id": 74669664,
"author": "Jameson",
"author_id": 20637346,
"author_profile": "https://Stackoverflow.com/users/20637346",
"pm_score": 2,
"selected": false,
"text": "<!DOCTYPE html>\n<html>\n\n<head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675904/"
] |
74,669,492 | <p>I have cards that render it from an api that has many objs including date and I wane to render the cards based on recent dates ...
What I need is to sort based on recent dates using react</p>
<p>snippets of code
also a link that works <a href="https://codesandbox.io/s/sleepy-glitter-ru6dvu?file=/src/App.js:166-207" ... | [
{
"answer_id": 74670228,
"author": "Zion",
"author_id": 2179970,
"author_profile": "https://Stackoverflow.com/users/2179970",
"pm_score": -1,
"selected": false,
"text": "News fetchDataList const fetchDataList = () => {\n setIsLoading(true);\n\n return fetch(\"https://api.npoint.io/... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676584/"
] |
74,669,511 | <p>I am working on Reactjs and using nextjs, Right now i am trying to get value
of "textarea" and "dropdown/select", but i am getting empty result,How can i do this ?
I tried with following code</p>
<pre><code> const msgChange = (e) => {
const value = e.target.value;
setState({
...... | [
{
"answer_id": 74669604,
"author": "Andy",
"author_id": 1377002,
"author_profile": "https://Stackoverflow.com/users/1377002",
"pm_score": 2,
"selected": false,
"text": "e.target.msg name const { useEffect, useState } = React;\n\nfunction Example() {\n\n const [ state, setState ] = useSt... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669511",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20641395/"
] |
74,669,545 | <p>I want to make multiple calls for which I have to wait for the answer, and afterwards I want to group all responses in an array. I've not succeeded to do this.</p>
<p>The <code>res</code> constant in code below still retains the array of promises, not their results. I have no idea what else to try. No other stackove... | [
{
"answer_id": 74670078,
"author": "helloitsjoe",
"author_id": 8852158,
"author_profile": "https://Stackoverflow.com/users/8852158",
"pm_score": 3,
"selected": true,
"text": ".map Promise.all const solve = async () => {\n const projects = currentUserProjectIDs.map((p) => {\n return... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669545",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14523632/"
] |
74,669,548 | <p>``
hi everyone, I want to take color as input and then change the color of text according to it but it's not working can anybody help me.</p>
<pre><code>import React, {useState} from 'react'
export default function Textform(props) {
//this is function
const newColor =()=>{
const x = document.getElementByI... | [
{
"answer_id": 74670078,
"author": "helloitsjoe",
"author_id": 8852158,
"author_profile": "https://Stackoverflow.com/users/8852158",
"pm_score": 3,
"selected": true,
"text": ".map Promise.all const solve = async () => {\n const projects = currentUserProjectIDs.map((p) => {\n return... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19189932/"
] |
74,669,565 | <p>Innocent React question here.</p>
<p>I have a <code>useEffect</code> method that closes a modal on the <code>escape</code> keypress, that is duplicated a few times in my code, that looks like this:</p>
<pre><code>const [shouldShowModal, setShouldShowModal] = useProfileModal();
useEffect(() => {
const closeModa... | [
{
"answer_id": 74669594,
"author": "Necati Turan",
"author_id": 4335325,
"author_profile": "https://Stackoverflow.com/users/4335325",
"pm_score": 0,
"selected": false,
"text": "// Define a custom hook to handle the keydown event\nfunction useCloseModalOnEscape(toggleModal) {\n useEffect... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669565",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13966698/"
] |
74,669,570 | <p>Take this vector:</p>
<pre><code>std::vector<int> v = {1, 2, 3, 4, 5};
</code></pre>
<p>Let's say I want to remove some elements of a vector at some arbitrary indices: 0, 1, and 3. It's tedious to have to write something like this:</p>
<pre><code>v.erase(v.begin());
v.erase(v.begin());
v.erase(v.begin() + 1);
... | [
{
"answer_id": 74669621,
"author": "Jerry Coffin",
"author_id": 179910,
"author_profile": "https://Stackoverflow.com/users/179910",
"pm_score": 2,
"selected": true,
"text": "erase // erase the first two elements\nv.erase(v.begin(), v.begin() + 2);\n"
},
{
"answer_id": 74670789,
... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19333949/"
] |
74,669,579 | <p>What's happening:<br>
<a href="https://i.stack.imgur.com/mdtyX.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mdtyX.gif" alt="enter image description here" /></a></p>
<p>Everytime I add value to height.. the 'top-most' area is causing to mess-up the y.position of the gameObject.</p>
<p>The <stron... | [
{
"answer_id": 74669757,
"author": "vik",
"author_id": 1145747,
"author_profile": "https://Stackoverflow.com/users/1145747",
"pm_score": 0,
"selected": false,
"text": "anchoredPosition"
}
] | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669579",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19903247/"
] |
74,669,588 | <pre><code>var1 = tensor([[[[0., 1., 1., ..., 1., 0., 0.],
[0., 0., 1., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 1.],
...,
[0., 0., 0., ..., 1., 1., 1.],
[0., 0., 0., ..., 1., 1., 1.],
[0., 0., 0., ..., 1., 1., 1.]]]])
print(var1.size())
print(type(v... | [
{
"answer_id": 74669757,
"author": "vik",
"author_id": 1145747,
"author_profile": "https://Stackoverflow.com/users/1145747",
"pm_score": 0,
"selected": false,
"text": "anchoredPosition"
}
] | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669588",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17763433/"
] |
74,669,595 | <p>Django admin site used to have a form to change the password for a user that wasn't the logged in user. You would look at the user's update page, and by the password field, there was a change password link. You would click it, and it would take you to a different page for changing the password. I used to take adv... | [
{
"answer_id": 74669757,
"author": "vik",
"author_id": 1145747,
"author_profile": "https://Stackoverflow.com/users/1145747",
"pm_score": 0,
"selected": false,
"text": "anchoredPosition"
}
] | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/801902/"
] |
74,669,658 | <p>I want a gray overlay above all children except for the <code>selected</code> one. Given the following structure:</p>
<pre><code><div class="parent">
<!-- I have this subparent which is absolute. I cannot remove it... -->
<div class="subParent1">
<div class="sub... | [
{
"answer_id": 74670008,
"author": "Rohit Khandelwal",
"author_id": 15220748,
"author_profile": "https://Stackoverflow.com/users/15220748",
"pm_score": 3,
"selected": true,
"text": "z-index position: absolute; subParent1 top: 0; left: 0; grayOverlay .parent {\n width: 300px;\n height: ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7513683/"
] |
74,669,688 | <p>I have table Buyer</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>BuyId</th>
<th>QuantityOrdered</th>
<th>dateordered</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>10</td>
<td>2021-11-04</td>
</tr>
<tr>
<td>1</td>
<td>20</td>
<td>2022-01-22</td>
</tr>
<tr>
<td>2</td>
<td>50</td>
<td>2... | [
{
"answer_id": 74670008,
"author": "Rohit Khandelwal",
"author_id": 15220748,
"author_profile": "https://Stackoverflow.com/users/15220748",
"pm_score": 3,
"selected": true,
"text": "z-index position: absolute; subParent1 top: 0; left: 0; grayOverlay .parent {\n width: 300px;\n height: ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20649041/"
] |
74,669,702 | <p>I looked through so many tutorials and it's still not working for me. I have a database that looks like this:
<a href="https://i.stack.imgur.com/QdXeB.png" rel="nofollow noreferrer">databaseImage</a>
Note that the actual row does not match up with the id. I would like to delete from the actual row rather than using ... | [
{
"answer_id": 74670008,
"author": "Rohit Khandelwal",
"author_id": 15220748,
"author_profile": "https://Stackoverflow.com/users/15220748",
"pm_score": 3,
"selected": true,
"text": "z-index position: absolute; subParent1 top: 0; left: 0; grayOverlay .parent {\n width: 300px;\n height: ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18284391/"
] |
74,669,705 | <p>Following is my array, and I need to replace the keys <code>name</code> with <code>title</code> and <code>Email</code> with <code>subtitle</code>.</p>
<p>I tried some ways, but I still need to fulfill my requirement. Please provide any solution to this.</p>
<pre><code>const newUpdatedList = [];
resArr.forEach((res) ... | [
{
"answer_id": 74669884,
"author": "Jesse Schoonveld",
"author_id": 7774656,
"author_profile": "https://Stackoverflow.com/users/7774656",
"pm_score": 0,
"selected": false,
"text": "const arrayOfObj = [{\n name: 'value1',\n email: 'value2'\n }, {\n name: 'value1',\n email: 'v... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669705",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8293561/"
] |
74,669,711 | <p>I have to write a program that has a <strong>constructor without parameters</strong>. I created another short program as an example to show what I do not understand.
So I have a class with the main-method:</p>
<pre><code>public class Dog {
public static void main(String[] args) {
CharacteristicsOfTheDog Dog... | [
{
"answer_id": 74669823,
"author": "Kevin Hooke",
"author_id": 406290,
"author_profile": "https://Stackoverflow.com/users/406290",
"pm_score": 3,
"selected": true,
"text": "public class CharacteristicsOfTheDog {\n\n int size = 0;\n int kilogram = 0;\n\n public CharacteristicsOfT... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20472612/"
] |
74,669,715 | <p>I have a data frame <code>tweets_df</code> that looks like this:</p>
<pre><code> sentiment id date text
0 0 1502071360117424136 2022-03-10 23:58:14+00:00 AngelaRaeBoon1 Same Alabama Republicans charge...
1 ... | [
{
"answer_id": 74669764,
"author": "Tron",
"author_id": 9917285,
"author_profile": "https://Stackoverflow.com/users/9917285",
"pm_score": -1,
"selected": false,
"text": "tweets_df[tweets_df['text'].contains('{}|{}'.format(entry['Country'],entry['Region'])]\n True"
},
{
"answer_id... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20056124/"
] |
74,669,723 | <p>I got tasked with writing a Python script that would output the longest chain of consecutive words of the same length from a sentence. For example, if the input is "To be or not to be", the output should be "To, be, or".</p>
<pre><code>text = input("Enter text: ")
words = text.replace(&... | [
{
"answer_id": 74669797,
"author": "sahasrara62",
"author_id": 5086255,
"author_profile": "https://Stackoverflow.com/users/5086255",
"pm_score": 3,
"selected": true,
"text": "groupby from itertools import groupby\nstring = \"To be or not to be\"\nsol = ', '.join(max([list(b) for a, b in ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676556/"
] |
74,669,803 | <pre><code>def paren(s, cnt=0):
if s == '':
return True
if s[0] == '(':
return paren(s[1:], cnt + 1)
elif s[0] == ')':
return paren(s[1:], cnt - 1)
return cnt == 0
</code></pre>
<p>So this code works for all cases if there is the same number of "(" and ")".
... | [
{
"answer_id": 74669797,
"author": "sahasrara62",
"author_id": 5086255,
"author_profile": "https://Stackoverflow.com/users/5086255",
"pm_score": 3,
"selected": true,
"text": "groupby from itertools import groupby\nstring = \"To be or not to be\"\nsol = ', '.join(max([list(b) for a, b in ... | 2022/12/03 | [
"https://Stackoverflow.com/questions/74669803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676763/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.