qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,371,461 | <p>There have already been written lots of stuff about unsubscribing from observables in standard Angular workflow, but not so much about unsubscribing on page refresh (at least I haven't found much).</p>
<p>So, what can be done with subscriptions which should be unsubscribed in <code>ngOnDestroy</code> (which is never... | [
{
"answer_id": 74371730,
"author": "N.F.",
"author_id": 4052858,
"author_profile": "https://Stackoverflow.com/users/4052858",
"pm_score": 1,
"selected": false,
"text": "ngOnDestroy ngOnDestroy ngOnDestroy @HostListener @HostListener('window:beforeunload', ['$event'])\nbeforeUnload(e: Eve... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4741929/"
] |
74,371,516 | <p>I'm doing a simple blog app to practice vue.js. I'm using composition API. I have stored data that get filled in in a form. This data I want to print out in another component <code>homePosts</code> where you can see the written blogpost with writer, headline and blogtext. I have used v-model, stored data to <code>lo... | [
{
"answer_id": 74371730,
"author": "N.F.",
"author_id": 4052858,
"author_profile": "https://Stackoverflow.com/users/4052858",
"pm_score": 1,
"selected": false,
"text": "ngOnDestroy ngOnDestroy ngOnDestroy @HostListener @HostListener('window:beforeunload', ['$event'])\nbeforeUnload(e: Eve... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19224482/"
] |
74,371,543 | <p>So I am now learning html, and I was just wondering why tags such as <strong>cite</strong> even exist. When I open a website as a user, I still see the text as <em>italic</em> when the code is written as <strong>cite</strong>.</p>
<p>I found that the tags are useful when it comes to screen readers, so basically for ... | [
{
"answer_id": 74371614,
"author": "Santheep Madhavan",
"author_id": 19672487,
"author_profile": "https://Stackoverflow.com/users/19672487",
"pm_score": 3,
"selected": true,
"text": "cite"
},
{
"answer_id": 74371707,
"author": "Blye",
"author_id": 5726956,
"author_pro... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371543",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19477821/"
] |
74,371,571 | <p>I have an array of prices</p>
<p>I would like to group these prices into ranges if they are within 2 of each other</p>
<p>How do I achieve this</p>
<pre><code>// present array
const array = [
'3','5','6','12','17','22'
]
// the result I want
const array_ranges = [
'3-6', '12',
'17','22'
]
</code></pre>
| [
{
"answer_id": 74371953,
"author": "mplungjan",
"author_id": 295783,
"author_profile": "https://Stackoverflow.com/users/295783",
"pm_score": 2,
"selected": false,
"text": "const array = ['3', '5', '6', '12', '14', '17', '22'],\n rangeGap = 2,\n arrRange = array.reduce((acc, num) => {\n... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371571",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14286754/"
] |
74,371,576 | <p>Below is my code:<br>
The issue I'm facing => first button updating the second button state as well.</p>
<p>But it should be working differently:<br><strong>first</strong> with just <strong>first</strong>,<br> <strong>second</strong> with just <strong>second</strong></p>
<p>I just want to achieve the state of the... | [
{
"answer_id": 74371651,
"author": "VincentDR",
"author_id": 19540575,
"author_profile": "https://Stackoverflow.com/users/19540575",
"pm_score": 4,
"selected": true,
"text": "Container(\n child: loadingCircular // not loadingLinear\n ? CircularProgressBar_()\n : co... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14190819/"
] |
74,371,585 | <p>I use Selenium with Python to extract some data from a website.
My question is simple, I click on a link which opens with <code>target="__blank"</code>, and the problem is that I want to get the current URL of the just opened page. Unfortunately, neither the page URL is changed, nor the page source. I foun... | [
{
"answer_id": 74371651,
"author": "VincentDR",
"author_id": 19540575,
"author_profile": "https://Stackoverflow.com/users/19540575",
"pm_score": 4,
"selected": true,
"text": "Container(\n child: loadingCircular // not loadingLinear\n ? CircularProgressBar_()\n : co... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13060913/"
] |
74,371,615 | <p>Schema:</p>
<pre><code>const orderSchema = mongoose.Schema(
{
orderStatus: {
type: String,
enum: ["pending", "preparing", "completed", "declined"],
default: "pending",
},
products: [
{
product: {
... | [
{
"answer_id": 74371651,
"author": "VincentDR",
"author_id": 19540575,
"author_profile": "https://Stackoverflow.com/users/19540575",
"pm_score": 4,
"selected": true,
"text": "Container(\n child: loadingCircular // not loadingLinear\n ? CircularProgressBar_()\n : co... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11383947/"
] |
74,371,624 | <p>I'm trying to make ul menu with :before pseudoelement on li tags. Text inside :before's content is a different text for different rows. I want make this text right-aligned for each li, like this:</p>
<pre><code> pseudo_x li
pseudo_xx li
pseudo_xxx li
</code></pre>
<p><div class="snippet" data-lang="js" data-hide="... | [
{
"answer_id": 74371688,
"author": "Cédric",
"author_id": 17684809,
"author_profile": "https://Stackoverflow.com/users/17684809",
"pm_score": 1,
"selected": false,
"text": "list-style-type li:nth-child(n) {\n list-style-type: \"===\";\n}\n\nli:nth-child(2n) {\n list-style-type: \"-----... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6713230/"
] |
74,371,628 | <p>example code:</p>
<pre><code>import numpy as np
a=np.ones((1,4,4))
shape1=a[0,:,[0,1,2]].shape
shape2=a[0][:,[0,1,2]].shape
</code></pre>
<p>result:</p>
<p>shape1 is (3,4) and shape2 is (4,3)</p>
<p>Need help! I think they should have same results.</p>
| [
{
"answer_id": 74371688,
"author": "Cédric",
"author_id": 17684809,
"author_profile": "https://Stackoverflow.com/users/17684809",
"pm_score": 1,
"selected": false,
"text": "list-style-type li:nth-child(n) {\n list-style-type: \"===\";\n}\n\nli:nth-child(2n) {\n list-style-type: \"-----... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8731846/"
] |
74,371,670 | <p>'This code snippet has two types of insertion and deletion methods. I tried to fill the methods but i don't get the desired output. the print functions output is not as required. the output has to be 3 2 1 4 but instead i get 3 3 3 4. Please help me to solve this'</p>
<pre><code>"""Add a couple method... | [
{
"answer_id": 74371688,
"author": "Cédric",
"author_id": 17684809,
"author_profile": "https://Stackoverflow.com/users/17684809",
"pm_score": 1,
"selected": false,
"text": "list-style-type li:nth-child(n) {\n list-style-type: \"===\";\n}\n\nli:nth-child(2n) {\n list-style-type: \"-----... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371670",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16418700/"
] |
74,371,697 | <p>Based on <a href="https://stackoverflow.com/questions/6672834/specifying-blob-encoding-in-google-chrome">this</a> thread I tried to create a blob with utf 32 encoding and BOM of FF FE 00 00(UTF-32LE representation) as follows:</p>
<pre><code>var BOM = new Uint8Array([0xFF,0xFE,0x00,0x00]);
var b = new Blob([ BOM, &q... | [
{
"answer_id": 74372044,
"author": "Silent observer",
"author_id": 4547909,
"author_profile": "https://Stackoverflow.com/users/4547909",
"pm_score": 0,
"selected": false,
"text": "var fs = require('fs');\nvar iconv = require('iconv-lite');\n\nvar str = '你好,世界';\nvar buf = iconv.encode(st... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10508655/"
] |
74,371,701 | <p>I'd like to create kind of dependency between R and database and for that I'm trying to create a loop which is checking if a date in one column from a database is equal to today's date, if yes then run main statement, if not wait 5mins and try again (max 24 times) then break. I'm stucked with the latter, if someone ... | [
{
"answer_id": 74372044,
"author": "Silent observer",
"author_id": 4547909,
"author_profile": "https://Stackoverflow.com/users/4547909",
"pm_score": 0,
"selected": false,
"text": "var fs = require('fs');\nvar iconv = require('iconv-lite');\n\nvar str = '你好,世界';\nvar buf = iconv.encode(st... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15125859/"
] |
74,371,714 | <p>Im trying to upload a file from the client to the server in chunks. Is been ten years since I have tried to code a chunk uploader myself, this is harder then I remember.</p>
<h1>upload.proto</h1>
<pre><code>syntax = "proto3";
option csharp_namespace = "GrpcService1";
package upload;
// The Fi... | [
{
"answer_id": 74371876,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 0,
"selected": false,
"text": "await uploadStream.RequestStream.WriteAsync(...);\n using uploadStream async void await async void var buffer = Arr... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1841839/"
] |
74,371,734 | <p>I am using multiple X300/X310s to do a receive beamforming operation with synchronization to both Tx and all Rx devices with Octo-Clock. However I am seeing a constant but random phase shift across different USRPs, such phase shift is random upon each start-up/data collection but remains constant until I turn off th... | [
{
"answer_id": 74371876,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 0,
"selected": false,
"text": "await uploadStream.RequestStream.WriteAsync(...);\n using uploadStream async void await async void var buffer = Arr... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371734",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13932425/"
] |
74,371,740 | <p>I want to copy value of name and age into another array, below code is working fine, But I wanted to know better way to do it.</p>
<pre><code>const users = [
{ id: 0, name: 'John', age:34 },
{ id: 1, name: 'Wayne', age:44 },
{ id: 2, name: 'David', age:24 },
];
let values=[];
users && users.map(... | [
{
"answer_id": 74371783,
"author": "RenaudC5",
"author_id": 11260991,
"author_profile": "https://Stackoverflow.com/users/11260991",
"pm_score": 3,
"selected": true,
"text": "const users = [\n { id: 0, name: 'John', age:34 },\n { id: 1, name: 'Wayne', age:44 },\n { id: 2, name: '... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8368511/"
] |
74,371,770 | <p>I have an excel data file with 2 sheet named "Data" and "GL Data"</p>
<p>Both these sheets contain a column called "Leader" which has 4 different names - say D1, D2, D3 and D4</p>
<p>I have 4 other workbooks named - Data_D1, Data_D2, Data_D3 and Data_D4 each with 2 sheet named "Dat... | [
{
"answer_id": 74371783,
"author": "RenaudC5",
"author_id": 11260991,
"author_profile": "https://Stackoverflow.com/users/11260991",
"pm_score": 3,
"selected": true,
"text": "const users = [\n { id: 0, name: 'John', age:34 },\n { id: 1, name: 'Wayne', age:44 },\n { id: 2, name: '... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12645183/"
] |
74,371,772 | <pre><code>
let storage = {};
storage.saveCredentials = (token:any, id:any) => {
localStorage.setItem('token', token);
localStorage.setItem('userId', id);
}
storage.saveStatus = (status:any) => {
localStorage.setItem('status', JSON.stringify(status));
}
export default storage;
</code></pre>
<p>I g... | [
{
"answer_id": 74371895,
"author": "mchl_bld",
"author_id": 6805583,
"author_profile": "https://Stackoverflow.com/users/6805583",
"pm_score": 0,
"selected": false,
"text": "storage const storage = {\n saveCredentials: (token:any, id:any) => {\n localStorage.setItem('token', tok... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14769363/"
] |
74,371,778 | <p>I am trying to call a function which gets data from an API and after comaprison of received data with input it should return 0 or 1 which i may include in my code but the function is returning undefined. Can;t seem to get my head in the right place.</p>
<pre class="lang-js prettyprint-override"><code>
async function... | [
{
"answer_id": 74372035,
"author": "hernanl",
"author_id": 14329561,
"author_profile": "https://Stackoverflow.com/users/14329561",
"pm_score": 1,
"selected": true,
"text": "callingAxios = () => {\n axios.get().then()\n return 1\n}\n\ncloudVerify = (url) => {\n return callingAxios(url)... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10591419/"
] |
74,371,794 | <p>I have a panel that makes use of the following promql query to monitor the ram usage of IIS Application Pools on a server:</p>
<pre><code>windows_process_working_set_bytes{process=~"w3wp_.*", instance="Server"}
</code></pre>
<p>This returns the following results: (pseudo)</p>
<div class="s-table-... | [
{
"answer_id": 74371900,
"author": "Jan Garaj",
"author_id": 3348604,
"author_profile": "https://Stackoverflow.com/users/3348604",
"pm_score": 1,
"selected": false,
"text": "max max(\n windows_process_working_set_bytes{process=~\"w3wp_.*\", instance=\"Server\"}\n) by (process)\n"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371794",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7533440/"
] |
74,371,813 | <p>I'm new to React and l’m reading the documentation of react navigation</p>
<p>In this <a href="https://reactnavigation.org/docs/auth-flow/#implement-the-logic-for-restoring-the-token" rel="nofollow noreferrer">Section </a></p>
<pre><code>const authContext = React.useMemo(
() => ({
signIn: async (data) ... | [
{
"answer_id": 74371900,
"author": "Jan Garaj",
"author_id": 3348604,
"author_profile": "https://Stackoverflow.com/users/3348604",
"pm_score": 1,
"selected": false,
"text": "max max(\n windows_process_working_set_bytes{process=~\"w3wp_.*\", instance=\"Server\"}\n) by (process)\n"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371813",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20055746/"
] |
74,371,833 | <p>Having a dataframe like this:</p>
<pre><code>df <- data.frame(id = c(1,2,3), date1 = c("2014-Dec 2018","2009-2010","Jan 2009-Aug 2010"), date2 = c("Feb 2016-Dec 2018","2014-Dec 2018","Oct 2013-Dec 2018"))
id date1 date2
1 1 ... | [
{
"answer_id": 74371930,
"author": "zx8754",
"author_id": 680068,
"author_profile": "https://Stackoverflow.com/users/680068",
"pm_score": 1,
"selected": false,
"text": "df[ rowSums(sapply(df[ -1 ], nchar) == 17, na.rm = TRUE) < 2, ]\n# id date1 date2\n# 1 1 2014-De... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20224217/"
] |
74,371,848 | <p>I have been trying to debug this problem I am facing since 2 days now. I noticed this problem when I was trying to pull something from bitbucket. It says</p>
<pre><code>git@code.pruconnect.net: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access ... | [
{
"answer_id": 74373012,
"author": "dsastrusmploy",
"author_id": 19957542,
"author_profile": "https://Stackoverflow.com/users/19957542",
"pm_score": 1,
"selected": false,
"text": "git remote set-url origin \"SSHURL\"\n"
},
{
"answer_id": 74373053,
"author": "psq",
"author... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14917896/"
] |
74,371,856 | <p>Every day 3 new CSV-files are sent to 3 different paths. I want to copy these files to an archive within each path and then run a script which removes the first line of each file. The resulting files are then moved to another folder where a batch reads them.</p>
<p>Example for a path1: "Z:\Test\1\Script\Exp... | [
{
"answer_id": 74373182,
"author": "jdweng",
"author_id": 5015238,
"author_profile": "https://Stackoverflow.com/users/5015238",
"pm_score": 0,
"selected": false,
"text": "Files = @( \"Z:\\Test\\1\\Script\\Export_2022-11-09.csv\", \"Z:\\Test\\2\\Script\\Export_2022-11-09.csv\")\nforeach($... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20049627/"
] |
74,371,891 | <p>Looking for advice please.</p>
<p>In my DF below, I would like to subract the 'difference' column value (red square), from the value in 'trailing sl' column (blue square), but shifted to lag .shift(1).</p>
<p>So the new values would be:</p>
<pre><code>1.08778 - 0.00115
1.08663 - 0.00077
1.08586 - 0.00059
etc
</code>... | [
{
"answer_id": 74371914,
"author": "jezrael",
"author_id": 2901002,
"author_profile": "https://Stackoverflow.com/users/2901002",
"pm_score": 2,
"selected": false,
"text": "Series.notna m = df['difference'].notna()\ndf.loc[m, 'trailing_sl'] = df.trailing_sl.shift() - df['difference']\n df... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371891",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3316115/"
] |
74,371,946 | <p>i need some help with setstate asynchronous.</p>
<p>i have this select</p>
<pre><code><select id='province' onChange={handleProvince}>
<option>Select Province</option>
{province?.map(province=>(
<option value={province.id}>{p... | [
{
"answer_id": 74372049,
"author": "Paul-Marie",
"author_id": 9603417,
"author_profile": "https://Stackoverflow.com/users/9603417",
"pm_score": 2,
"selected": false,
"text": "const handleProvince = ({ target }) => (\n axios.get(`http://192.168.18.46/api/regency/${target?.value}`).then... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19032485/"
] |
74,371,956 | <p>when I make responsive with media queries on CSS, I get auto zoomed in when opening the website on mobile, so how can I adjust the zoom or what are affecting my page?</p>
<p>I tried this meta data here</p>
<pre><code><link
href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&family=Taj... | [
{
"answer_id": 74372049,
"author": "Paul-Marie",
"author_id": 9603417,
"author_profile": "https://Stackoverflow.com/users/9603417",
"pm_score": 2,
"selected": false,
"text": "const handleProvince = ({ target }) => (\n axios.get(`http://192.168.18.46/api/regency/${target?.value}`).then... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18179464/"
] |
74,371,969 | <p>I'm trying to use <code>\n</code> to add a new line in pandas dataframe</p>
<p>Here is the sample data to test:</p>
<pre><code>df = pd.DataFrame({'KEY': [4507,211,5294,2233,2260],'NAME':['kim young','laa eudong','kill gil','lee suk','No hee'],'FIND_DATE':[20130518,20140626,20140215,20141121,20140910],'EVENT_DTL':['A... | [
{
"answer_id": 74372049,
"author": "Paul-Marie",
"author_id": 9603417,
"author_profile": "https://Stackoverflow.com/users/9603417",
"pm_score": 2,
"selected": false,
"text": "const handleProvince = ({ target }) => (\n axios.get(`http://192.168.18.46/api/regency/${target?.value}`).then... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371969",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20376341/"
] |
74,371,986 | <p>I have csv file with data , but there rows i dont need. So task is remove rows from table.
For example:</p>
<pre><code> 0 A
1 B
2 C
3 D
4 E * to delete
5 F *
6 G *
7 H *
8 I
9 J
10 k
11 L
12 M *
13 N *
14 O *
15 P *
</code></pre>
<p>So i want remove last 4 rows for each 8 rows in table . In table 3089 rows<... | [
{
"answer_id": 74372015,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "import numpy as np\n\nmask = (np.arange(len(df))%8//4) == 0\n\nout = df[mask]\n mask = np.arange(len(df))%8 < 4\n\no... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74371986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18810689/"
] |
74,372,016 | <p>I am trying to get the "version" from the <code>package.json</code> is nextjs application.</p>
<p>I have tried <code>process.env.npm_package_version</code> like in node application but it's returning <code>undefined</code>.</p>
| [
{
"answer_id": 74372128,
"author": "Paul-Marie",
"author_id": 9603417,
"author_profile": "https://Stackoverflow.com/users/9603417",
"pm_score": 3,
"selected": true,
"text": "process.env.npm_package_version package_vars package.json .json const { version } = require('./package.json');\nco... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14817835/"
] |
74,372,022 | <p>Is there a way to free the data leaked through <code>Box::leak</code>?</p>
<p>I'm interfacing with C code, where one callback (called from C) needs to initialize and return a pointer to a specific data structure, I've used <code>Box::leak</code> for this, and later on in another callback I need to free that memory.<... | [
{
"answer_id": 74372128,
"author": "Paul-Marie",
"author_id": 9603417,
"author_profile": "https://Stackoverflow.com/users/9603417",
"pm_score": 3,
"selected": true,
"text": "process.env.npm_package_version package_vars package.json .json const { version } = require('./package.json');\nco... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1726544/"
] |
74,372,036 | <p>I have a list of objects stored in <code>socialmedias</code> variable. One parameter of SocialMedia class is called <code>username</code>. I want to create an array with all usernames from that list of objects <code>socialmedias</code> and I want to be sure I use the best way.</p>
<pre><code>socialmedias = [obj1, ob... | [
{
"answer_id": 74372068,
"author": "aleksandarbos",
"author_id": 5736491,
"author_profile": "https://Stackoverflow.com/users/5736491",
"pm_score": 3,
"selected": true,
"text": "usernames = [sm.username for sm in socialmedias]"
},
{
"answer_id": 74372087,
"author": "LoLo2207",... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16815116/"
] |
74,372,056 | <p>I'm doing a dental function, I'm looking to sync data in a <code>many-to-many</code> relationship. I have the following:</p>
<pre><code>tooth
- id
- name
cost
- id
- name
cost_tooth
- id
- tooth_id
- cost_id
- row_number
</code></pre>
<p>This is the data I got from input checkbox <code>tooth_id</code>, I have an ... | [
{
"answer_id": 74386255,
"author": "Ramil Huseynov",
"author_id": 6711823,
"author_profile": "https://Stackoverflow.com/users/6711823",
"pm_score": 2,
"selected": true,
"text": "foreach ($output as $key => $value) {\n $cost_id->tooths()->syncWithoutDetaching($value);\n}\n\n $sync_value ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20097685/"
] |
74,372,065 | <p>I've been trying to use pyinstaller, but it never creates it. There is always this error:
<a href="https://i.stack.imgur.com/OCvwv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OCvwv.png" alt="error" /></a></p>
<p>I've found that if I put this, it should work, but it doesn't. Does somebody know ... | [
{
"answer_id": 74386255,
"author": "Ramil Huseynov",
"author_id": 6711823,
"author_profile": "https://Stackoverflow.com/users/6711823",
"pm_score": 2,
"selected": true,
"text": "foreach ($output as $key => $value) {\n $cost_id->tooths()->syncWithoutDetaching($value);\n}\n\n $sync_value ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457435/"
] |
74,372,079 | <p>Write a function that takes three (str, c, n) arguments. Start with the end of 'str'. Insert character c after every n characters?</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-js lang-js prettyprint-override... | [
{
"answer_id": 74386255,
"author": "Ramil Huseynov",
"author_id": 6711823,
"author_profile": "https://Stackoverflow.com/users/6711823",
"pm_score": 2,
"selected": true,
"text": "foreach ($output as $key => $value) {\n $cost_id->tooths()->syncWithoutDetaching($value);\n}\n\n $sync_value ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372079",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457243/"
] |
74,372,088 | <p>I have a function <code>getMeetingsPossibilities()</code> that return an array. For example is I have 4 teams it will return <code>['0-1', '0-2', '0-3', '1-2', '1-3', '2-3']</code>.</p>
<p>I am trying to write a function that would return an array with a set of meetings for <code>n</code> time wanted.</p>
<p>For exa... | [
{
"answer_id": 74397793,
"author": "Robby Cornelissen",
"author_id": 3558960,
"author_profile": "https://Stackoverflow.com/users/3558960",
"pm_score": 3,
"selected": false,
"text": "n n + n % 2 - 1 n - 1 n const schedule = (n) => {\n const teams = [...Array(n).keys()];\n const game... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19375171/"
] |
74,372,158 | <p>The problem set I am trying to solve: <a href="https://cs50.harvard.edu/python/2022/psets/3/grocery/" rel="nofollow noreferrer">CS50P 2022 psets/3/grocery/</a></p>
<p>The code I wrote:</p>
<pre><code>
# Syntax of dict = {'key': value}
mydict = {}
# Infinite loop with break
while True:
try:
item = input(... | [
{
"answer_id": 74397793,
"author": "Robby Cornelissen",
"author_id": 3558960,
"author_profile": "https://Stackoverflow.com/users/3558960",
"pm_score": 3,
"selected": false,
"text": "n n + n % 2 - 1 n - 1 n const schedule = (n) => {\n const teams = [...Array(n).keys()];\n const game... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12078996/"
] |
74,372,173 | <p>I have a dataframe with a certain number of groups, containing a weight column and a list of values, which can be of arbitrary length, so for example:</p>
<pre class="lang-py prettyprint-override"><code>df = pl.DataFrame(
{
"Group": ["Group1", "Group2", "Group3"],
... | [
{
"answer_id": 74375312,
"author": "alexp",
"author_id": 10120952,
"author_profile": "https://Stackoverflow.com/users/10120952",
"pm_score": 0,
"selected": false,
"text": "import polars as pl\nimport numpy as np\n\ndef weighted_list(ls, weight):\n return(list(np.array(ls) * weight))\n... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20451894/"
] |
74,372,226 | <p>Good morning community! i need to transform this jquery code to vanilla JS,
In this case it uses: => :contains()</p>
<p>this is the code in jquery</p>
<pre><code>var hoveredProjectActive = $(
"#cursor-outer .project__caption:contains('" + hoveredProject + "')"
);
</code></pre>
<p>This is t... | [
{
"answer_id": 74372552,
"author": "ByGio1",
"author_id": 18184792,
"author_profile": "https://Stackoverflow.com/users/18184792",
"pm_score": 0,
"selected": false,
"text": "`${hoveredProject}`\n hoveredProject\n"
},
{
"answer_id": 74373758,
"author": "dvicemuse",
"author_... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18184792/"
] |
74,372,241 | <p>I have been trying to execute a GNU C project on ARM Cortex M3 Processor. The project runs happily on -Og optimisation level , but when I tried increasing the optimisation levels to -O2, -O3 , I encountered bus faults.</p>
<p>The GNU tool chain was "arm-none-eabi V10.3.1"</p>
<p>Tried reading the BFSR r... | [
{
"answer_id": 74390714,
"author": "Nate Eldredge",
"author_id": 634919,
"author_profile": "https://Stackoverflow.com/users/634919",
"pm_score": 2,
"selected": false,
"text": "-ffreestanding -nostdlib memset memset memset volatile memset -fno-tree-loop-distribute-patterns -O3 strb"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3786632/"
] |
74,372,253 | <p>Is my code correct? I just want to check. and is there a way that I can make it better.</p>
<pre><code>import time
import random
string = "The quick brown fox jumps over the lazy dog"
def TypeDelay(string):
for i in range(len(string)):
delay = random.uniform(0,1.1)
time.sleep(delay)
... | [
{
"answer_id": 74372336,
"author": "Daweo",
"author_id": 10785975,
"author_profile": "https://Stackoverflow.com/users/10785975",
"pm_score": 0,
"selected": false,
"text": "for i in string for i in range(len(string)):\n delay = random.uniform(0,1.1)\n time.sleep(delay)\n print(st... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19862700/"
] |
74,372,263 | <p>I am trying to write in a file N times in Prolog. I came up with this solution:</p>
<pre><code>response(M,Out,N) :-
write('How do you feel ?'),
open('output.txt',write,Out),
read(M),
write(Out,M),
close(Out),
response(M,Out,S),
S is N - 1.
response(M,Out,0).
</code></pre>
<p>The basic idea is to... | [
{
"answer_id": 74372336,
"author": "Daweo",
"author_id": 10785975,
"author_profile": "https://Stackoverflow.com/users/10785975",
"pm_score": 0,
"selected": false,
"text": "for i in string for i in range(len(string)):\n delay = random.uniform(0,1.1)\n time.sleep(delay)\n print(st... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372263",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17214298/"
] |
74,372,276 | <p>how can i await void of downloading in <a href="https://github.com/aalitor/AltoHttp" rel="nofollow noreferrer">alttohttp </a>library in c# .net?</p>
<p>when I was using WebClient it was working to make await before the code and it awaits to finish the download but in <a href="https://github.com/aalitor/AltoHttp" rel... | [
{
"answer_id": 74372428,
"author": "Joaco Ferroni",
"author_id": 8837876,
"author_profile": "https://Stackoverflow.com/users/8837876",
"pm_score": 0,
"selected": false,
"text": " void httpdownloaderU_Completed(object sender, EventArgs e)\n {\n MessageBox.Show(\"Download comleted!\");\n... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20159298/"
] |
74,372,278 | <p>I'm using <code>=importxml("URL-TO-SCRAPE";"//html//body//text()")</code> to scrape the text of urls.
However, this way the content from the header, navigation and footer is also included. How can i exclude this?</p>
| [
{
"answer_id": 74372428,
"author": "Joaco Ferroni",
"author_id": 8837876,
"author_profile": "https://Stackoverflow.com/users/8837876",
"pm_score": 0,
"selected": false,
"text": " void httpdownloaderU_Completed(object sender, EventArgs e)\n {\n MessageBox.Show(\"Download comleted!\");\n... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372278",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3392296/"
] |
74,372,307 | <p>I have a list of custom objects that I want to group based on some values within the object.
My code basically looks like this:</p>
<pre><code>class Bar{
String someVal;
int num; // group by this value
Bar(this.someVal, this.num);
}
class Foo{
String someVal;
List<Bar> bars;
Foo(this.someVal, t... | [
{
"answer_id": 74372434,
"author": "Christian",
"author_id": 10847224,
"author_profile": "https://Stackoverflow.com/users/10847224",
"pm_score": 3,
"selected": true,
"text": "\n //Get all bars out of the foos list\n final bars = foos.map((foo) => foo.bars).expand((bars) => bars);\n \n /... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9564867/"
] |
74,372,320 | <p>I have this working function that takes 2 inputs as .csv files and shows chart of the data.
What I would like to do is to turn function input into list instead of 2 files.</p>
<p>This is the function:</p>
<pre><code>def Graph(first_file,second_file):
fig = make_subplots(rows=1, cols=3)
list_of_atributes = ... | [
{
"answer_id": 74372542,
"author": "Will",
"author_id": 12829151,
"author_profile": "https://Stackoverflow.com/users/12829151",
"pm_score": 0,
"selected": false,
"text": "def Graph(files):\n \n for file in files:\n fig = make_subplots(rows=1, cols=3)\n list_of_atribut... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11812842/"
] |
74,372,323 | <pre><code>{
metadata:{
eventcode:100
}
power:on // this can be either on or off
time:1667984669//unix timestamp
}
</code></pre>
<p>My document looks something like this the power can be on or it can be off, given to and from time I have to calculate how many hours it was on, I am having trouble because in 1 day it can... | [
{
"answer_id": 74372542,
"author": "Will",
"author_id": 12829151,
"author_profile": "https://Stackoverflow.com/users/12829151",
"pm_score": 0,
"selected": false,
"text": "def Graph(files):\n \n for file in files:\n fig = make_subplots(rows=1, cols=3)\n list_of_atribut... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19893594/"
] |
74,372,331 | <p>\
I've created a practice project for my test and I can't seem to get around this problem. I need a function that grabs the input and when called in another function, the input will be used to solve a problem.
\
here is my code</p>
<pre><code>
#include <stdio.h>
int get()
{
int one,two,three,four;
sca... | [
{
"answer_id": 74372404,
"author": "Vlad from Moscow",
"author_id": 2877241,
"author_profile": "https://Stackoverflow.com/users/2877241",
"pm_score": 2,
"selected": true,
"text": "get return one,two,three,four;\n four add void get( int *one, int *two, int *three, int *four;)\n{\n scan... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20423580/"
] |
74,372,349 | <p>I have following Code which will not select a Element, when loading the Component.</p>
<pre><code> <option (click)="getSelectdDropdown(1, 'Python'); addNewItemFramework(1); checkForm()" [selected]="this.formGroup.controls['frameworkControl'].value=='1'">Python</option>
&l... | [
{
"answer_id": 74372400,
"author": "MGX",
"author_id": 20059754,
"author_profile": "https://Stackoverflow.com/users/20059754",
"pm_score": 3,
"selected": true,
"text": "export class AppComponent {\n name = 'Angular ' + VERSION.major;\n\n options = [\n { value: 0, label: 'Javascript... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18203720/"
] |
74,372,405 | <p>I'm not sure if it is a real problem or just lack of documentations.
You can put conditions for documents in foreign collection in a lookup <code>$match</code>.
You can also put conditions for the documents of original collection in a lookup <code>$match</code> with <code>$expr</code>.</p>
<p>But when I want to use ... | [
{
"answer_id": 74384199,
"author": "Robert junior",
"author_id": 6434717,
"author_profile": "https://Stackoverflow.com/users/6434717",
"pm_score": 2,
"selected": true,
"text": "$expr $match { $lookup:\n {\n from: 'books',\n localField: 'itemId',\n foreignField: '_id'... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17344899/"
] |
74,372,433 | <p>Can we create a Power automate flow from a json file? Something like we do for customer connector.</p>
| [
{
"answer_id": 74384199,
"author": "Robert junior",
"author_id": 6434717,
"author_profile": "https://Stackoverflow.com/users/6434717",
"pm_score": 2,
"selected": true,
"text": "$expr $match { $lookup:\n {\n from: 'books',\n localField: 'itemId',\n foreignField: '_id'... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7649568/"
] |
74,372,445 | <p>I want users to be able to download a Django model which is being displayed in the app. There can be many types of models, therefore I want to generalize my code. Currently I let users download the model in excel by means of the following code in HTML:</p>
<pre><code><form id="downloadfile" method="... | [
{
"answer_id": 74373127,
"author": "Md.Imam Hossain Roni",
"author_id": 6342245,
"author_profile": "https://Stackoverflow.com/users/6342245",
"pm_score": 2,
"selected": true,
"text": "from django.conf import settings\nfrom django.apps import apps\n\n\ndef get_all_models():\n model_nam... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9536233/"
] |
74,372,458 | <p>The code is creating a random number from a low value and a high value supplied by the user. Why, when printing the value of the comp_num inside the function it returns the correct value but when printing it at the end of the sequence it is 0.</p>
<pre><code>import random
comp_num = 0
def generateNumber():
comp... | [
{
"answer_id": 74372490,
"author": "Will",
"author_id": 12829151,
"author_profile": "https://Stackoverflow.com/users/12829151",
"pm_score": 2,
"selected": true,
"text": "comp_num global import random \n\ncomp_num = 0\n\ndef generateNumber():\n global comp_num\n comp_num = random.ra... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2898217/"
] |
74,372,493 | <p>I have a WCF service (.NET C#) that sometimes returns for example <code>&#xD;</code> and <code>&#x1E;</code> which is not correct XML.</p>
<p>I guess I could build a translator that are applied on each string field before sending response but it feels a bit sketchy, I do not know what to look for(more then t... | [
{
"answer_id": 74372490,
"author": "Will",
"author_id": 12829151,
"author_profile": "https://Stackoverflow.com/users/12829151",
"pm_score": 2,
"selected": true,
"text": "comp_num global import random \n\ncomp_num = 0\n\ndef generateNumber():\n global comp_num\n comp_num = random.ra... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/365624/"
] |
74,372,506 | <p>How can you programatically perform a button click in Flutter? I basically want to bind a number of buttons to keys on the keyboard, the most important part is that after a key is pressed the corresponding button the visual state of the button is triggered to inform the user which button was pressed.</p>
<p>I am awa... | [
{
"answer_id": 74372490,
"author": "Will",
"author_id": 12829151,
"author_profile": "https://Stackoverflow.com/users/12829151",
"pm_score": 2,
"selected": true,
"text": "comp_num global import random \n\ncomp_num = 0\n\ndef generateNumber():\n global comp_num\n comp_num = random.ra... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/356630/"
] |
74,372,550 | <p>I have swift code that looks like this:</p>
<pre class="lang-swift prettyprint-override"><code>var jsFriendlyFreinds = [JSObject]()
for friend in friends {
let jsFriend = await FriendsPlugin.createFriendResult(friend)
jsFriendlyFreinds.append(jsFriend)
}
</code></pre>
<p>I'd like for all the async calls to happe... | [
{
"answer_id": 74372890,
"author": "popeinvestor",
"author_id": 14148255,
"author_profile": "https://Stackoverflow.com/users/14148255",
"pm_score": 0,
"selected": false,
"text": "for friend in friends async throws {\n"
},
{
"answer_id": 74373434,
"author": "workingdog support... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3090664/"
] |
74,372,577 | <p>I have the column:</p>
<p><a href="https://i.stack.imgur.com/RJKbf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RJKbf.png" alt="period_column" /></a></p>
<p>and I want to format it so I can obtain the year and the month separated by a dot like this:
<a href="https://i.stack.imgur.com/dc1YB.png"... | [
{
"answer_id": 74372648,
"author": "JvdV",
"author_id": 9758194,
"author_profile": "https://Stackoverflow.com/users/9758194",
"pm_score": 3,
"selected": true,
"text": "=TEXT(A2,\"0000\\.00\")\n =DATE(LEFT(A2,4),RIGHT(A2,2),1)\n"
},
{
"answer_id": 74372946,
"author": "Robert M... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372577",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20050412/"
] |
74,372,607 | <p>I would like to use command</p>
<pre><code>sencha web -port 3888 start
</code></pre>
<p>But how can I point to a specified url, for example:</p>
<pre><code>http://localhost/WebContent/My.cgi?lang=en&test=true
</code></pre>
<p>?</p>
| [
{
"answer_id": 74372648,
"author": "JvdV",
"author_id": 9758194,
"author_profile": "https://Stackoverflow.com/users/9758194",
"pm_score": 3,
"selected": true,
"text": "=TEXT(A2,\"0000\\.00\")\n =DATE(LEFT(A2,4),RIGHT(A2,2),1)\n"
},
{
"answer_id": 74372946,
"author": "Robert M... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4195212/"
] |
74,372,615 | <p>I have a web app where the user can choose some products to buy. He could interrupts the configuration process restart it after.
Now I'm using localStorage to save the info about products, price...</p>
<p>I have a page where there is a table with the user's offers and he can click and continue configuring the produc... | [
{
"answer_id": 74372771,
"author": "Fabian Strathaus",
"author_id": 17298437,
"author_profile": "https://Stackoverflow.com/users/17298437",
"pm_score": 0,
"selected": false,
"text": "this.router.navigate (['/destination')] RouterModule.forRoot(routes, {onSameUrlNavigation: 'reload'}) Rou... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11604252/"
] |
74,372,621 | <p>I tried to create a slightly more complex SQL UDF that initialises a counter variable used in a while loop and then returns it.</p>
<pre class="lang-sql prettyprint-override"><code>CREATE OR REPLACE FUNCTION test_func() RETURNS NUMBER
AS
$$
begin
let counter := 0;
while (counter < 5) do
counter := counte... | [
{
"answer_id": 74372771,
"author": "Fabian Strathaus",
"author_id": 17298437,
"author_profile": "https://Stackoverflow.com/users/17298437",
"pm_score": 0,
"selected": false,
"text": "this.router.navigate (['/destination')] RouterModule.forRoot(routes, {onSameUrlNavigation: 'reload'}) Rou... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15256436/"
] |
74,372,624 | <p>I'm using the following code to draw text onto a Canvas, but the text as you can see from the photo is going off the screen, rather than adhering to the width parameters i issue to the Canvas, why is this happening?</p>
<p>This doesn't seem to happen if i use the older android canvas, possible compose bug?</p>
<pre>... | [
{
"answer_id": 74376742,
"author": "Vahid Garousi",
"author_id": 5909910,
"author_profile": "https://Stackoverflow.com/users/5909910",
"pm_score": 0,
"selected": false,
"text": "import androidx.compose.foundation.Canvas\nimport androidx.compose.foundation.background\nimport androidx.comp... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11541512/"
] |
74,372,636 | <p>I downloaded a a prepared dataset for YoloV7. Also I cloned yoloV7 Repo.</p>
<p>I want to train a model with this downloaded dataset, for this I use this command.</p>
<pre><code>python train.py --workers 8 --device 0 --batch-size 16 --data data.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights yolov7x.pt -... | [
{
"answer_id": 74383094,
"author": "anactualtoaster",
"author_id": 14077571,
"author_profile": "https://Stackoverflow.com/users/14077571",
"pm_score": 4,
"selected": true,
"text": "utils/loss.py from_which_layer.append((torch.ones(size=(len(b),)) * i).to('cuda'))\n fg_mask_inboxes fg_mas... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3290745/"
] |
74,372,652 | <p>Sorry for any miswording of anything here I am not a native english speaker I have been trying to randomly pick a number between 1 - 6 in c# and for whatever reason it says System.Func`1[System.Int32] every time I try to print it out
(i know usually this is done in main but this is my homework and I was ordered not ... | [
{
"answer_id": 74383094,
"author": "anactualtoaster",
"author_id": 14077571,
"author_profile": "https://Stackoverflow.com/users/14077571",
"pm_score": 4,
"selected": true,
"text": "utils/loss.py from_which_layer.append((torch.ones(size=(len(b),)) * i).to('cuda'))\n fg_mask_inboxes fg_mas... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14705533/"
] |
74,372,665 | <p>How can I extend y-axis in the way that line in the top don't finish sharply with the end of graph. In this case would be fine to extend y-axis to 8 or even 9, note that I can't set limit to 8 because speed value will be always different. It's only about visual effect.</p>
<p>Second question, also estetic, graph sta... | [
{
"answer_id": 74372904,
"author": "James Hinkley",
"author_id": 11398693,
"author_profile": "https://Stackoverflow.com/users/11398693",
"pm_score": 2,
"selected": true,
"text": "ax = plt.gca()\nax.set_xlim([xmin, xmax])\nax.set_ylim([ymin, ymax])\n ymax = int(round(max(list of y values)... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6125812/"
] |
74,372,679 | <p>I am trying to remove all words from a string except certain words, for example I want to retain 'red' and 'black' including all combinations it has and remove all other strings.</p>
<p>For example
inputstring = "red => white => green => black,magenta"
outputstring = "red => black,magenta&... | [
{
"answer_id": 74372911,
"author": "JohnyCapo",
"author_id": 19335841,
"author_profile": "https://Stackoverflow.com/users/19335841",
"pm_score": 1,
"selected": false,
"text": "=> words_list = input_string.split(' => ')\noutput_list = list()\nfor one_word in words_list:\n if one_word in... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9372847/"
] |
74,372,686 | <p><strong>Project Details:</strong>
In this <strong>WPF</strong> project, video is displayed on the number of structures.
In fact, it is a kind of simulator that simulates the display of video on the LEDs installed on the structure or building.</p>
<pre><code>private async Task PlayBinAsync()
{
InitBinList... | [
{
"answer_id": 74431083,
"author": "KeyvanSFX",
"author_id": 3202916,
"author_profile": "https://Stackoverflow.com/users/3202916",
"pm_score": 1,
"selected": true,
"text": "private volatile static SemaphoreSlim signal = new SemaphoreSlim(0);\npublic volatile static ObservableCollection<P... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3202916/"
] |
74,372,694 | <p>I want to get rid of repeated measures in my data file. The idea is that people pressed the space bar and I want to eliminate rows when participants pressed the key more frequently than once in 3 seconds.
I created this loop, but I see that it doesn't remove all the cases and it throws an error because the number of... | [
{
"answer_id": 74431083,
"author": "KeyvanSFX",
"author_id": 3202916,
"author_profile": "https://Stackoverflow.com/users/3202916",
"pm_score": 1,
"selected": true,
"text": "private volatile static SemaphoreSlim signal = new SemaphoreSlim(0);\npublic volatile static ObservableCollection<P... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19852988/"
] |
74,372,749 | <p>I wonder if it is still not possible to pass an actual row as a parameter to a function or procedure in oracle. I saw already some questions according to this topic but haven't found an answer which is good for me.
I need doing something like this:</p>
<pre><code>function my_func(myrow t%rowtype)AS
BEGIN
END;
</code... | [
{
"answer_id": 74373875,
"author": "Thorsten Kettner",
"author_id": 2270762,
"author_profile": "https://Stackoverflow.com/users/2270762",
"pm_score": 2,
"selected": false,
"text": "ROWID ROWID CREATE OR REPLACE FUNCTION my_func(p_rowid urowid) RETURN INTEGER AS\n v_row mytable%ROWTYPE;\... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372749",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16964468/"
] |
74,372,761 | <p>Example :
The last name is 'Daniel Thomas Kon'<br />
Output is expecting based on this condition - > if less than or equal to 3 put 1st word in last name and remaining will be in firstname</p>
<p>Here the output will be--</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>last name</th>... | [
{
"answer_id": 74373091,
"author": "MT0",
"author_id": 1509264,
"author_profile": "https://Stackoverflow.com/users/1509264",
"pm_score": 0,
"selected": false,
"text": "SELECT REGEXP_SUBSTR(name, '^(\\S+(\\s+\\S+)*?)\\s+(\\S+(\\s+\\S+)?)$', 1, 1, NULL, 1) AS last_names,\n REGEXP_SUB... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457834/"
] |
74,372,780 | <p>Prior to 4 November it was working fine and now when I am trying to build it by running yarn android but it is showing me</p>
<pre><code>Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/dev/Desktop/Abc Projects/aargee/node_modules/react-native-webrtc/android/src/main/java/com/... | [
{
"answer_id": 74372862,
"author": "ZFloc Technologies",
"author_id": 10657559,
"author_profile": "https://Stackoverflow.com/users/10657559",
"pm_score": 1,
"selected": false,
"text": "android/.idea android/.gradle android\\build android\\app\\build"
},
{
"answer_id": 74385634,
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13884276/"
] |
74,372,835 | <p>I had an issue in Swift 5.5 and I don't really understand the solution.</p>
<pre class="lang-swift prettyprint-override"><code>import Foundation
func testAsync() async {
var animal = "Dog"
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
animal = "Cat"
print(animal... | [
{
"answer_id": 74393379,
"author": "Rob",
"author_id": 1271826,
"author_profile": "https://Stackoverflow.com/users/1271826",
"pm_score": 3,
"selected": true,
"text": "actor AnimalActor {\n var animal = \"Dog\"\n \n func setAnimal(newAnimal: String) {\n animal = newAnimal\... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14014307/"
] |
74,372,851 | <p>Input Table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">index</th>
<th style="text-align: center;">income</th>
<th style="text-align: right;">Education</th>
<th style="text-align: right;">age1to_20</th>
<th style="text-align: right;">pcd</th>
</tr>
</thead>
... | [
{
"answer_id": 74372884,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "melt pivot cols_to_pivot = ['income', 'Education']\n\ncols = df.columns.difference(cols_to_pivot)\n(df.melt(cols).dr... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13106084/"
] |
74,372,880 | <p>I have these values in dataset in a pandas dataframe column</p>
<pre><code>col1
0.74
0.77
0.72
0.65
0.24
0.07
0.21
0.05
0.09
</code></pre>
<p>I want to get a new column of six elements as list in new columns as rows (by shifting one values at a time in list)</p>
<p>This is the col that I want to get.</p>
<pre><code... | [
{
"answer_id": 74372986,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 1,
"selected": false,
"text": "sliding_window_view import numpy as np\nfrom numpy.lib.stride_tricks import sliding_window_view as swv\n\nwindow = ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372880",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5506647/"
] |
74,372,922 | <p>Once I split the variable and assign it to proxyset. How do I travers proxyset array with for in. In the below example print var only return 1 2</p>
<pre><code>PROXY_PASS_MAPPING=abc|123,xyz|456
awk -v rep=$PROXY_PASS_MAPPING '
BEGIN { split(rep,proxyset,",")
print proxyset[1]
... | [
{
"answer_id": 74372986,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 1,
"selected": false,
"text": "sliding_window_view import numpy as np\nfrom numpy.lib.stride_tricks import sliding_window_view as swv\n\nwindow = ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372922",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/584239/"
] |
74,372,937 | <p>I cannot stop the android system navigation bar (3 buttons at the bottom) from appearing when interacting with objects such as a Picker or Popup (from community toolkit). We're planning on running this app on a device that has Kiosk mode enabled, hence why we want to remove the system navigation bars.</p>
<pre><code... | [
{
"answer_id": 74372986,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 1,
"selected": false,
"text": "sliding_window_view import numpy as np\nfrom numpy.lib.stride_tricks import sliding_window_view as swv\n\nwindow = ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20171074/"
] |
74,372,960 | <p>I'm creating a multipage quizz, so I need the user not to be able to go back to the previous page. So I wrote:</p>
<pre class="lang-js prettyprint-override"><code>const router = createRouter({
history: createMemoryHistory(),
routes
});
</code></pre>
<p>It's working (navigation is disabled), but it the user hits ... | [
{
"answer_id": 74373366,
"author": "Ninowis",
"author_id": 3245139,
"author_profile": "https://Stackoverflow.com/users/3245139",
"pm_score": 1,
"selected": false,
"text": "router.beforeEach((to, from) => {\n const route = this.$router.resolve(to)\n\n if (route.resolved.matched.length) ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/422331/"
] |
74,372,992 | <p>I have a player in unity with the movement controlled by a rigidbody. The movement on the Z axis is kept contstant by the game to keep the player moving forward. However, this means that the rigidbody keeps speeding up so its speed at the start of the game is much slower than the speed at the end of the game. Here i... | [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19445483/"
] |
74,372,993 | <p>I have a struct containing three numbers: number1, number2, number3. Then, I want to perform division operators on them: (number1)/(number2+number3).</p>
<pre><code>typedef struct {
int number1;
int number2;
int number3;
double ratio;
} table;
</code></pre>
<p>I tried to divide them like this:</p>
<p... | [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74372993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457970/"
] |
74,373,058 | <p>I have come across some nasty dependencies.</p>
<p>Looking around I found solutions like upgrade this, downgrade that...</p>
<p>Some solutions work for some but not for others.</p>
<p>Is there a more 'rounded' way to tackle this issue?</p>
| [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4752223/"
] |
74,373,073 | <p>Problem: i cant find the minimum, it's always zero! why? how should i fix the code?</p>
<p>** now it's done.</p>
<pre><code>#include <iostream>
using namespace std;
int main(){ // input n numbers & show max & min
int n, x, max = x, min = x;
cin>>n;
for(int i = 1; i <= n; i++){
cin... | [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373073",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457869/"
] |
74,373,096 | <p>I want to insert multiple rows from one column.</p>
<p>For my POS system like this.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>ID</th>
<th>Item Code</th>
<th>Total Qty</th>
<th>Qty of Pallets</th>
<th>Quantity Of A PalleT/Per Box</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>00... | [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20261200/"
] |
74,373,103 | <p>how is it possible for me to count the word "OFFLINE" in the Following List with Python? The List is in a .txt File so i need to open that first i guess and then look after the specific word.</p>
<p><code>MPP MPP Fault MPP Fault MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MPP MP... | [
{
"answer_id": 74385916,
"author": "Willard Peng",
"author_id": 10259001,
"author_profile": "https://Stackoverflow.com/users/10259001",
"pm_score": 1,
"selected": true,
"text": "......\n\nvoid FixedUpdate()\n{\n CalculateMovementWithoutZMovement();\n rb.velocity = new Vector3 (rb.v... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373103",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20229777/"
] |
74,373,109 | <p>I have two tables, and I want to use a value from primary table (here: <code>person.ref</code>) to extract some data from a <code>json</code> field in a secondary table (here: <code>person_details</code>):</p>
<pre><code>create table person (
id int(8),
ref varchar(20),
primary key (id)
);
create table... | [
{
"answer_id": 74373827,
"author": "Valeriu Ciuca",
"author_id": 4527645,
"author_profile": "https://Stackoverflow.com/users/4527645",
"pm_score": 2,
"selected": false,
"text": "CREATE TABLE `person` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `ref` varchar(255) DEFAULT NULL,\n PRIMAR... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1194415/"
] |
74,373,166 | <p>What is the best way to convert a string to dictionary with value of dictionary as a list</p>
<p>for example
<code>str = "abc=1,abc=2,abc=3,xyz=5,xyz=6"</code>
i need the output as:
<code>d = {"abc":["1","2","3"],"xyz":["5","6"]}</code><... | [
{
"answer_id": 74373253,
"author": "Abdul Niyas P M",
"author_id": 6699447,
"author_profile": "https://Stackoverflow.com/users/6699447",
"pm_score": 3,
"selected": true,
"text": "dict.setdefault >>> help({}.setdefault)\nHelp on built-in function setdefault:\n\nsetdefault(key, default=Non... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20035511/"
] |
74,373,181 | <p>I try to change one value inside the list but all values change for all keys.</p>
<pre><code>vertex_list = ['a','b']
distance_dict = dict.fromkeys(vertex_list, [10, 'None'])
distance_dict['a'][0] = 1
print(distance_dict)
</code></pre>
<p>output:</p>
<pre><code>{'a': [1, 'None'], 'b': [1, 'None']}
</code></pre>
<p>wh... | [
{
"answer_id": 74373532,
"author": "Abdul Niyas P M",
"author_id": 6699447,
"author_profile": "https://Stackoverflow.com/users/6699447",
"pm_score": 2,
"selected": false,
"text": "fromkeys() None dict.fromkeys None distance_dict = {vertex: [10, None] for vertex in vertex_list} \n"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19776016/"
] |
74,373,184 | <p>A dataframe I am working on contains an address line, from which I wish to extract the different variables (street name, number, postal code and country). The address line is filled according to the following template: <strong>"street number, postal code city, country"</strong>.</p>
<p>Using .str.split(), ... | [
{
"answer_id": 74373532,
"author": "Abdul Niyas P M",
"author_id": 6699447,
"author_profile": "https://Stackoverflow.com/users/6699447",
"pm_score": 2,
"selected": false,
"text": "fromkeys() None dict.fromkeys None distance_dict = {vertex: [10, None] for vertex in vertex_list} \n"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457603/"
] |
74,373,192 | <p>I have three <code>views</code> A,B and C. User can navigate from A to B and from A to C. User can navigate from B to C. Now I want to differentiate if the user have come from A to C or from B to C so I was looking in how to pass extra data in NavigationStack which can help me differentiate</p>
<p>Below is my code</... | [
{
"answer_id": 74373532,
"author": "Abdul Niyas P M",
"author_id": 6699447,
"author_profile": "https://Stackoverflow.com/users/6699447",
"pm_score": 2,
"selected": false,
"text": "fromkeys() None dict.fromkeys None distance_dict = {vertex: [10, None] for vertex in vertex_list} \n"
},
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9552485/"
] |
74,373,193 | <p>I have a text file that I need to read and perform an FFT onto.</p>
<p>Basically, the file reads something like this:</p>
<pre><code>1458 1499 1232 1232 1888 ... 2022-09-11 09:32:51.076
1459 1323 1999 1323 1823 ... 2022-09-11 09:32:51.199
</code></pre>
<p>and so on. Each row has 200 columns, and I want to basically ... | [
{
"answer_id": 74373322,
"author": "StephanT",
"author_id": 10895042,
"author_profile": "https://Stackoverflow.com/users/10895042",
"pm_score": 1,
"selected": false,
"text": "a = [1,2,3]\nb = a[:-1]\nprint b\n"
},
{
"answer_id": 74373427,
"author": "Prakash Dahal",
"autho... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373193",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12005115/"
] |
74,373,194 | <p><a href="https://i.stack.imgur.com/1VdJr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1VdJr.jpg" alt="Date Fromat" /></a></p>
<p>Edited: Want to convert the format.</p>
<p>I am kinda new in BigQuery, recently I was working on a project. I want to convert above type of format into yyyy/mm/dd for... | [
{
"answer_id": 74373712,
"author": "itroulli",
"author_id": 7903159,
"author_profile": "https://Stackoverflow.com/users/7903159",
"pm_score": 2,
"selected": true,
"text": "SELECT FORMAT_DATE(\"%Y/%m/%d\",PARSE_DATE(\"%B %d, %Y\",\"June 10, 2014\")) AS date_str\n PARSE_DATE FORMAT_DATE"
... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373194",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20436654/"
] |
74,373,230 | <p>If I write a long sentence the text doesn't fit the container. Why does the text overflow the container?</p>
<p>But when I write a long sentence but use spaces (write more than 1 sentence), the text finally fits the container.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babe... | [
{
"answer_id": 74373339,
"author": "Matteo Maestri",
"author_id": 20262119,
"author_profile": "https://Stackoverflow.com/users/20262119",
"pm_score": 2,
"selected": true,
"text": "overflow-wrap: break-word; <html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373230",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19811641/"
] |
74,373,234 | <p>I have the following input</p>
<blockquote>
</blockquote>
<pre><code>[
{
"id": "abc",
"data1": 3,
"data2": "test1",
},
{
"id": "abc",
"data1": 4,
... | [
{
"answer_id": 74373339,
"author": "Matteo Maestri",
"author_id": 20262119,
"author_profile": "https://Stackoverflow.com/users/20262119",
"pm_score": 2,
"selected": true,
"text": "overflow-wrap: break-word; <html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15995650/"
] |
74,373,237 | <p>I need to extract all the lines from file2.txt that do not match the string until the first dot in any line in file1.txt. I am interested in a solution that stays as close to my current approach as possible so it is easy for me to understand, and uses only sed and/or awk in linux bash.</p>
<p>file1.h</p>
<pre><code>... | [
{
"answer_id": 74373339,
"author": "Matteo Maestri",
"author_id": 20262119,
"author_profile": "https://Stackoverflow.com/users/20262119",
"pm_score": 2,
"selected": true,
"text": "overflow-wrap: break-word; <html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19017877/"
] |
74,373,282 | <p>Assume <code>data.php</code> has three variables like below:</p>
<pre><code>$first = 1;
$second = 1;
$third = 1;
</code></pre>
<p>My question is how to get the <code>1</code> from <code>$second</code> and change it to <code>3</code>? So it becomes:</p>
<pre><code>$first = 1;
$second = 3;
$third = 1;
</code></pre>
<p... | [
{
"answer_id": 74373339,
"author": "Matteo Maestri",
"author_id": 20262119,
"author_profile": "https://Stackoverflow.com/users/20262119",
"pm_score": 2,
"selected": true,
"text": "overflow-wrap: break-word; <html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373282",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20454874/"
] |
74,373,342 | <p>I have a <code>data.frame</code> similar to this:</p>
<pre><code>mydf=data.frame(LETTERS=LETTERS, rev_letters=rev(letters), var1=c(rep('a',10),rep('b',10),rep('c',6)), value=1:26)
> head(mydf)
LETTERS rev_letters var1 value
1 A z a 1
2 B y a 2
3 C x... | [
{
"answer_id": 74373339,
"author": "Matteo Maestri",
"author_id": 20262119,
"author_profile": "https://Stackoverflow.com/users/20262119",
"pm_score": 2,
"selected": true,
"text": "overflow-wrap: break-word; <html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2573168/"
] |
74,373,355 | <p>I Want To Prevent Oracle Database User To Write Operation On Specific Column ( Only Hibernate Connections Allowed To Write On That column)
In Other Words If You Want To Change Specific Column Only Spring Transactions Allowed To Do That Not Database User</p>
<p>update:<br />
I Dont Want A Database User Allowed To Wri... | [
{
"answer_id": 74373643,
"author": "Simon Martinelli",
"author_id": 1045142,
"author_profile": "https://Stackoverflow.com/users/1045142",
"pm_score": 1,
"selected": false,
"text": "grant update (col1, col2) on mytab to fred;\n"
},
{
"answer_id": 74385297,
"author": "Jon Helle... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10147317/"
] |
74,373,377 | <pre><code>dic = {'A':'D','N':'Q','B':'E','O':'R','C':'F','P':'S','D':'G','Q':'T','E':'H','R':'U','F':'I','S':'V','G':'J','T':'W',
'H':'K','U':'X','I':'L','V':'Y','J':'M','W':'Z','K':'N','X':'A','L':'O','Y':'B','M':'P','Z':'C'}
user_input = input("Enter the word: ").upper()
Key=str(user_input)
print... | [
{
"answer_id": 74373676,
"author": "AveragePythonEnjoyer",
"author_id": 16293191,
"author_profile": "https://Stackoverflow.com/users/16293191",
"pm_score": 1,
"selected": false,
"text": "dict_a={'A':'D','N':'Q','B':'E','O':'R','C':'F','P':'S','D':'G','Q':'T','E':'H','R':'U','F':'I','S':'... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373377",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20458142/"
] |
74,373,421 | <p>I read this portion of the book on Async programming in Rust <a href="https://rust-lang.github.io/async-book/03_async_await/01_chapter.html" rel="nofollow noreferrer">https://rust-lang.github.io/async-book/03_async_await/01_chapter.html</a></p>
<p>I see the mention of the <code>.await</code> syntax,</p>
<p>and then ... | [
{
"answer_id": 74373495,
"author": "cameron1024",
"author_id": 9186783,
"author_profile": "https://Stackoverflow.com/users/9186783",
"pm_score": 3,
"selected": true,
"text": ".await impl Future<Output = T> T ? Result<T, E> T .await? impl Future<Output = Result<T, E>> T let future = clien... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12303851/"
] |
74,373,425 | <p>I have 2 data frames with different lengths:
len(df1) 10104
len(df2) 15560</p>
<p>I want to merge these based on a common column (taskID) on both data frames. The Task ID has repeated IDs each ID represent an item belongs to the same task.</p>
<p>example:</p>
<p>df1:</p>
<div class="s-table-container">
<table class=... | [
{
"answer_id": 74373470,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "groupby.cumcount df1.merge(df2, left_on=['TaskID', df1.groupby('TaskID').cumcount()],\n right_on=['Tas... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457995/"
] |
74,373,440 | <p>I'm reading <a href="https://www.amazon.com.au/Effective-Java-Joshua-Bloch/dp/0134685997/" rel="nofollow noreferrer">Effective Java by Joshua Bloch</a>. In <em>Item 7: Eliminate Obsolete Object References</em> of chapter 2 he states:</p>
<blockquote>
<p>A third common source of memory leaks is listeners and other
ca... | [
{
"answer_id": 74375515,
"author": "Ingo Kegel",
"author_id": 936832,
"author_profile": "https://Stackoverflow.com/users/936832",
"pm_score": 2,
"selected": true,
"text": "class ApiUser {\n Listener listener;\n void registerListener() {\n listener = new Listener() {\n ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6367109/"
] |
74,373,456 | <p>Is it possible to access a javascript variable with Cypress?
I want to geht the value of foo with Cypress.</p>
<pre><code>$(document).ready(function()
{
...
var foo='xyz';
...
}
</code></pre>
<pre><code>cy.visit('abc.example.com')
cy.window().then((win) => {
let foo=win.foo;
cy... | [
{
"answer_id": 74375515,
"author": "Ingo Kegel",
"author_id": 936832,
"author_profile": "https://Stackoverflow.com/users/936832",
"pm_score": 2,
"selected": true,
"text": "class ApiUser {\n Listener listener;\n void registerListener() {\n listener = new Listener() {\n ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373456",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20111643/"
] |
74,373,467 | <p>I'm having a bit of an issue rendering a JSON object in a React component.
I want to get the meaning of a random word and then render it in page.</p>
<p>My App.js;</p>
<pre><code>function App() {
const [meaning,setMeaning] = useState([]);
};
useEffect(()=>{
getMeaning()
}, [])
const getMeaning = async ()=&g... | [
{
"answer_id": 74375515,
"author": "Ingo Kegel",
"author_id": 936832,
"author_profile": "https://Stackoverflow.com/users/936832",
"pm_score": 2,
"selected": true,
"text": "class ApiUser {\n Listener listener;\n void registerListener() {\n listener = new Listener() {\n ... | 2022/11/09 | [
"https://Stackoverflow.com/questions/74373467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4377207/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.