question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
71,236,870
How to extract a value inside column in certain pattern in oracle<p>I want to extract data in the format (465797,461396) from (',7809628#465797,7809628#461396,') data. How can I do that?</p>
<p>[DBFiddle][1]</p> <pre><code>select ltrim( regexp_replace( ',7809628#465797,7809628#461396,' ,'[^#]*#(\d+),' ,',\1') ,',' ) new_str from dual; </code></pre> <p>Results:</p> <pre><code>NEW_STR ------------- 465797,461396 </code></pre> <p>Regexp <code>'[^#]*#(\d+),'</code>:</p> <p><co...
How to extract a value inside column in certain pattern in oracle
oracle
0
25
2
71,236,991
71,236,991
1
true
2022-02-23T12:23:07.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract a value inside column in certain pattern in oracle<p>I want to extract data in the format (465797,461396) from (',7809628#465797,7809628#46139...
71,170,464
Sort a HCL block with specific property's value<p>I would like to sort an HCL block with <code>env</code></p> <p><strong>Before</strong></p> <pre><code>resource &quot;datadog_monitor&quot; &quot;A&quot; { tags = [&quot;env:stg&quot;] } resource &quot;datadog_monitor&quot; &quot;B&quot; { tags = [&quot;env:dev&quot...
<p>The usual way is to squeeze the blocks into single lines, sort those lines, and then expand the blocks back to their original form. Assumption: the buffer only contains those blocks.</p> <ol> <li><p>Squeeze</p> <pre><code>:[range]g/^res/.,/^}/s/\n/§ </code></pre> <p>Explanation:</p> <ul> <li>on each line starting wi...
Sort a HCL block with specific property's value
vim|hcl
0
39
2
71,177,916
71,177,916
1
true
2022-02-18T08:32:23.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sort a HCL block with specific property's value<p>I would like to sort an HCL block with <code>env</code></p> <p><strong>Before</strong></p> <pre><code>resou...
71,292,293
Import numerical value from a website to Google Sheets<p>I want to import a numerical value from <a href="https://dps.psx.com.pk/company/SYS" rel="nofollow noreferrer">this website</a> to <a href="https://docs.google.com/spreadsheets/d/1QLwNsazCvUU_h54aowdhidN8gKZ3M9E4b7eu_pN8F8g/edit?usp=sharing" rel="nofollow norefer...
<p>In your situation, how about the following sample formula?</p> <h3>Sample formula:</h3> <pre><code>=IMPORTXML(A1,&quot;//div[@data-name='REG']//div[div[@class='stats_label']/text()='LDCP']/div[@class='stats_value']&quot;) </code></pre> <ul> <li><p>In this case, the URL of <code>https://dps.psx.com.pk/company/SYS</co...
Import numerical value from a website to Google Sheets
google-sheets|google-sheets-formula|spreadsheet
0
40
2
71,292,601
71,292,601
1
true
2022-02-28T08:27:51.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Import numerical value from a website to Google Sheets<p>I want to import a numerical value from <a href="https://dps.psx.com.pk/company/SYS" rel="nofollow n...
71,095,991
Css height:0 undocumented property?<p>i have main grid with 2 columns. grid take 1 fr height. In right column i want create scrolled div with take all height.</p> <p><strong>We all know that flex dont overflow need apply min-height/min-width: 0;</strong></p> <p>But i 2 hour try apply all combination for stop height ove...
<p>By making the element <code>h-0</code> it will have a height equal to 0 thus it won't contribute to the dimension of the grid (it's like it doesn't exist). Later it will grow to fill the space with the <code>flex-grow</code></p> <hr /> <p>If you want to work with <code>min-height</code> you have to do is to consider...
Css height:0 undocumented property?
html|css|flexbox|css-grid
0
41
1
71,096,117
71,096,117
1
true
2022-02-12T21:24:33.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Css height:0 undocumented property?<p>i have main grid with 2 columns. grid take 1 fr height. In right column i want create scrolled div with take all height...
71,125,136
How to fill the horizontal space between two divs using dotted/dashed line using CSS<p><a href="https://i.stack.imgur.com/qG5q6.png" rel="nofollow noreferrer">this is what I want to achieve</a></p> <p>I tried to do so but I am not able to change the gap between the dashes. Also, the size of the circles and the dashed l...
<p>Your template looks very suspiciously like svg lines that use <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray" rel="nofollow noreferrer">stroke-dasharray</a> and round <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap" rel="nofollow noreferrer">st...
How to fill the horizontal space between two divs using dotted/dashed line using CSS
html|css|reactjs|sass|styling
0
555
3
71,125,247
71,125,247
1
true
2022-02-15T10:51:16.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fill the horizontal space between two divs using dotted/dashed line using CSS<p><a href="https://i.stack.imgur.com/qG5q6.png" rel="nofollow noreferrer...
71,194,979
How to calculate all aggregations at once without using a loop over indices?<p>How to calculate all aggregations at once without using a loop over indices?</p> <pre><code>%%time import random random.seed(1) df = pd.DataFrame({'val':random.sample(range(10), 10)}) for j in range(10): for i in df.index: df.lo...
<p>I think what you're looking for is something like this:</p> <pre><code>import random random.seed(1) df = pd.DataFrame({'val':random.sample(range(10), 10)}) for j in range(1, 10): df[f'mean_last_{j}'] = df['val'].rolling(j, min_periods=1).mean() df[f'std_last_{j}'] = df['val'].rolling(j, min_periods=1).std()...
How to calculate all aggregations at once without using a loop over indices?
pandas|statistics|rolling-computation
0
36
2
71,195,246
71,195,246
1
true
2022-02-20T13:41:19.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to calculate all aggregations at once without using a loop over indices?<p>How to calculate all aggregations at once without using a loop over indices?</...
71,255,470
Why I am not success to do onboarding screen only when to app launches for the first time in SwiftUI?<p>I am new in SwiftUI, I have Onboarding screen in my app, and it is work, but I want to see this Onboarding screen only one times, and I used ViewRouter class for it, my project work, but I am still not success to do...
<p>You aren't using your <code>ViewRouter</code> in the code you've shown at all right now.</p> <p>The easiest change would be to use <code>@AppStorage</code> instead of <code>@State</code> in your view, which will persist across launches. You can even use the same key you were using in your <code>ViewRouter</code>:</p...
Why I am not success to do onboarding screen only when to app launches for the first time in SwiftUI?
swiftui
0
24
1
71,255,940
71,255,940
1
true
2022-02-24T16:50:20.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I am not success to do onboarding screen only when to app launches for the first time in SwiftUI?<p>I am new in SwiftUI, I have Onboarding screen in my a...
71,295,156
Why do all objects have the same date despite incrementing in each iteration?<p>Hi I want to be able to modify an array of objects in state using a for loop and would like to know the best way of going about this!</p> <pre><code>const [ paymentData, setPaymentData ] = useState([ { paymentN: 'First Payment', p...
<p>Each object is referring to the same date object causing all of them to have the same date after the loop. You can create a new Date in each iteration to fix this.</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-...
Why do all objects have the same date despite incrementing in each iteration?
javascript|reactjs|for-loop|ecmascript-6|react-hooks
0
41
2
71,295,256
71,295,256
1
true
2022-02-28T12:37:35.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do all objects have the same date despite incrementing in each iteration?<p>Hi I want to be able to modify an array of objects in state using a for loop ...
71,369,785
How to remove all instances of a class when adding it to a new object in Javascript<p>Trying to create an active state on the most recently clicked navigation bar button. Currently it will add the class to each item selected but the for...of loop doesn't seem to remove the class.</p> <p>The nav bar is dynamically made ...
<p>Don't use <code>for...of</code> to iterate over live HTMLCollections like what <code>getElementsByClassName</code> returns. The reason is that in that loop you are executing code which leads to the element being removed from the live collection instantly, which in turn for the <code>for...of</code> (which internaly ...
How to remove all instances of a class when adding it to a new object in Javascript
javascript
0
38
1
71,369,984
71,369,984
1
true
2022-03-06T11:19:31.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove all instances of a class when adding it to a new object in Javascript<p>Trying to create an active state on the most recently clicked navigatio...
71,190,572
Xamarin View - How to put TextButton at the end and to the foreground<p>I am trying to figure out. How I can put the Login-Button at the end of the view, but on the foreground of placeholderText. This green textfield should be replaced by a maps-view later. My current code:</p> <pre><code>&lt;?xml version=&quot;1.0&quo...
<p>try this.</p> <pre><code>&lt;StackLayout HorizontalOptions=&quot;FillAndExpand&quot; VerticalOptions=&quot;FillAndExpand&quot; HeightRequest=&quot;1&quot; BackgroundColor=&quot;Aqua&quot;&gt; &lt;Label Text=&quot;placeholderText&quot; Margin=&quot;10,10,10,10&quot; /&gt; ...
Xamarin View - How to put TextButton at the end and to the foreground
java|xml|google-maps|xaml|xamarin
0
34
1
71,193,581
71,193,581
1
true
2022-02-20T01:08:00.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin View - How to put TextButton at the end and to the foreground<p>I am trying to figure out. How I can put the Login-Button at the end of the view, but...
71,270,295
Can a variable be injected into a callback function in dart / flutter?<p>I have a function lets say:</p> <pre><code>class MyDelegate { MyDelegate({this.callback}); final VoidCallback? callback; @override Size layout(){ var _height = 10; debugPrint('height: '+ _height.toString()); callback!(); return _h...
<p>You can set up your callback function like this:</p> <pre><code>class MyDelegate { MyDelegate({this.callback}); final Function(double)? callback; @override Size layout(){ var _height = 10; debugPrint('height: '+ _height.toString()); callback!(_height) return _height } } (double height){ var _m...
Can a variable be injected into a callback function in dart / flutter?
flutter|dart
0
283
3
71,270,398
71,270,398
1
true
2022-02-25T18:31:42.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can a variable be injected into a callback function in dart / flutter?<p>I have a function lets say:</p> <pre><code>class MyDelegate { MyDelegate({this.cal...
71,114,014
makefile computing diff fails<p>When I try to compute the <code>diff</code> between two text files:</p> <pre><code>results.txt: file1.txt file2.txt diff $(word 1,$^) $(word 2,$^) &gt; $@ </code></pre> <p>I get this weird (?) error:</p> <pre><code>$ make diff file1.txt file2.txt &gt; results.txt makefile:2: recipe f...
<p>The issue is that <code>diff</code> typically has a non-zero exit code if the files differ. This will cause <code>make</code> to infer the command failed. The easy fix would be to tell <code>make</code> to <a href="https://www.gnu.org/software/make/manual/make.html#Errors" rel="nofollow noreferrer">ignore the exit...
makefile computing diff fails
makefile|diff
0
45
1
71,114,195
71,114,195
1
true
2022-02-14T15:10:25.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: makefile computing diff fails<p>When I try to compute the <code>diff</code> between two text files:</p> <pre><code>results.txt: file1.txt file2.txt diff ...
71,147,462
Verifying Referral URL String & Cookie String with Javascript IF<p>I am attempting to verify the referral URL and whether or not a cookie contains a certain string and then perform an action, however right now - my IF statement is always TRUE.</p> <p>When I remove the ref1 section, and only keep getcookie, I believe th...
<p>It's tricky to debug this code as a sample of the value of ref1 is not provided. However, I can give some advice on where to go with this.</p> <p>The <code>indexOf</code> method returns either the index of the substring/element provided, or <code>-1</code> if not present. Be aware that <code>Boolean(-1)</code> retur...
Verifying Referral URL String & Cookie String with Javascript IF
javascript
0
20
1
71,147,615
71,147,615
1
true
2022-02-16T18:34:29.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Verifying Referral URL String & Cookie String with Javascript IF<p>I am attempting to verify the referral URL and whether or not a cookie contains a certain ...
71,322,517
How to use "multi-threading" in python with ROS services and serial comunication?<p>I want to run multiple process in python with ROS services and serial communication (between Raspberry Pi and ESP32 Microcontroller) in my robot. The software schematic in the robot is shown in this image<a href="https://i.stack.imgur.c...
<p>You could build a default, simple node with two callbacks, one of which is your message callback for the subscribed ROS topic, and one of which is a callback to a <a href="http://wiki.ros.org/rospy/Overview/Time#Timer" rel="nofollow noreferrer">TimerEvent</a> which can be called repeatedly every 0.3 seconds. You nee...
How to use "multi-threading" in python with ROS services and serial comunication?
python|multithreading|ros
0
1,539
1
71,394,826
71,394,826
1
true
2022-03-02T12:14:03.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use "multi-threading" in python with ROS services and serial comunication?<p>I want to run multiple process in python with ROS services and serial com...
71,290,986
How can I check if a symbol/MC is a child of another symbol/MC?<p>I'm using Adobe Animate HTML5 Canvas. EaselJS would also apply.</p> <p>How can I check if a symbol/MC is a child of another symbol/MC?</p> <p>So a symbol/MC is added as a child of <code>lensParentLeft</code> in the following. I then want to check if it...
<p>You can use the <code>contains</code> method. It does a recursive parent check up to the stage to find an ancestor.</p> <p><a href="https://createjs.com/docs/easeljs/classes/Container.html#method_contains" rel="nofollow noreferrer">https://createjs.com/docs/easeljs/classes/Container.html#method_contains</a></p> <pre...
How can I check if a symbol/MC is a child of another symbol/MC?
javascript|html5-canvas|createjs|easeljs
0
27
2
71,312,120
71,312,120
1
true
2022-02-28T05:40:29.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I check if a symbol/MC is a child of another symbol/MC?<p>I'm using Adobe Animate HTML5 Canvas. EaselJS would also apply.</p> <p>How can I check if ...
71,099,889
Flutter Api Data fetching Error with typeCast and asynchronous suspension<p>I'm trying to fetch the API Data , and it's just returned Circular Progress Indicator when I'm checking my response body from the client Im receiving my required but was unable to display it. Kindly guide me through it where Im going wrong. My ...
<pre><code>Future&lt;List&lt;IotWmcsModel&gt;&gt; fetchApiData() async { var url = Uri.parse( 'https://iotwmcsapi20220208180616.azurewebsites.net/api/Iotwmcsta004'); final response = await http.get(url); List&lt;IotWmcsModel&gt; iotWmcsModel = (response.body as List).map((e) =&gt; IotWmcsModel.fromJ...
Flutter Api Data fetching Error with typeCast and asynchronous suspension
flutter
0
266
1
71,100,015
71,100,015
1
true
2022-02-13T10:43:06.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter Api Data fetching Error with typeCast and asynchronous suspension<p>I'm trying to fetch the API Data , and it's just returned Circular Progress Indic...
71,272,106
Map discrepant variables between two data frames using a third data frame<p>I have two data frames, <code>df1</code> and <code>df2</code> of identical structure. The first three columns, <code>id</code>, <code>form</code>, and <code>instance</code> identify the participant and form(s). The remaining variable columns, <...
<p>I didn't use your <code>map</code> frame, so my apologies if I have not answered your question, but I didn't think you needed it. I believe this does what you want:</p> <pre><code>inner_join( df1 %&gt;% mutate(across(starts_with(&quot;var&quot;),as.character)) %&gt;% pivot_longer(cols=var1:var3,values_to = &quot;d...
Map discrepant variables between two data frames using a third data frame
r
0
30
2
71,272,563
71,272,563
1
true
2022-02-25T21:55:49.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Map discrepant variables between two data frames using a third data frame<p>I have two data frames, <code>df1</code> and <code>df2</code> of identical struct...
71,385,231
How to impute data based on subgroup and date in R<p>I have a dataset with meteorological information. It includes the variables:</p> <ul> <li><code>DATE</code>: measured every hour along year 2020</li> <li><code>STATION</code>: code of the meteorological station where information was gathered</li> <li><code>CITY</code...
<pre><code>left_join( df, df %&gt;% group_by(DATE,CITY) %&gt;% summarize(city_mean = mean(var,na.rm=T)), by=c(&quot;DATE&quot;,&quot;CITY&quot;) ) %&gt;% mutate(var = if_else(is.na(var), city_mean, var)) %&gt;% select(!city_mean) </code></pre> <p>If you don't like the join approach, you can also do this:<...
How to impute data based on subgroup and date in R
r|date|grouping|imputation
0
36
1
71,385,312
71,385,312
1
true
2022-03-07T17:47:35.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to impute data based on subgroup and date in R<p>I have a dataset with meteorological information. It includes the variables:</p> <ul> <li><code>DATE</co...
71,106,752
Django url path matching not working as expected<p>I have problem with Django model get_absolute_url reverse methods. I have a url pattern that works perfectly but the problem for example</p> <p>when I visit <code>example.com/blog/python/first-post</code> the path works perfectly, but when I try a random path like, <co...
<p>Try using <code>path('blog/python/&lt;slug:article_slug&gt;', views.ArticleDetailView.as_view(), name='article_detail')</code> in the <code>urls.py</code> instead of <code>path('blog/&lt;slug:series_slug&gt;/&lt;slug:article_slug&gt;', views.ArticleDetailView.as_view(), name='article_detail')</code>.</p> <p><strong>...
Django url path matching not working as expected
python|django|url-pattern
0
286
1
71,106,898
71,106,898
1
true
2022-02-14T03:07:25.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django url path matching not working as expected<p>I have problem with Django model get_absolute_url reverse methods. I have a url pattern that works perfect...
71,374,077
I am trying to make a mini game. The movement is in X and Y coordinates that range between -5 and 5 inclusively in python. How do I fit this in a loop<pre><code>#The Commands are going North and South in the Y - variable and East and West in the X - variable and X - to exit the game x = 0 y = 0 print(&quot;Welcome to s...
<pre><code># The Commands are going North and South in the Y - variable and East and West in the X - variable and X - to exit the game x = 0 y = 0 print(&quot;Welcome to sloth quest!&quot;) print(&quot;________________________________________&quot;) print() print(&quot;You're currently at position (0, 0) in the world....
I am trying to make a mini game. The movement is in X and Y coordinates that range between -5 and 5 inclusively in python. How do I fit this in a loop
python|loops
0
44
1
71,374,137
71,374,137
1
true
2022-03-06T20:46:08.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am trying to make a mini game. The movement is in X and Y coordinates that range between -5 and 5 inclusively in python. How do I fit this in a loop<pre><c...
71,278,444
I have a problem with construct regular expression<p>I have a data frame where row in one column looks like this:</p> <pre><code>&lt;title&gt;Some text&lt;/title&gt; &lt;selftext&gt;Some text&lt;/selftext&gt; </code></pre> <p>This above is one row in one column. The problem is that not every row looks like this. I hav...
<p>My first idea for what is wrong with the pattern would be that you set a range but only allow <em>exactly</em> one character. Use this to allow any content within title and selftext tags which have <em>at least</em> one character.</p> <pre><code>pattern = &quot;&lt;title&gt;[a-zA-Z0-9]+&lt;/title&gt;\n\n&lt;selftext...
I have a problem with construct regular expression
python|pandas|python-re
0
23
1
71,278,484
71,278,484
1
true
2022-02-26T16:35:49.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have a problem with construct regular expression<p>I have a data frame where row in one column looks like this:</p> <pre><code>&lt;title&gt;Some text&lt;/t...
71,141,778
why does my data table fail to load when i have validation error in my modal form?<p>I have a view users where I have included both a modal form and a data table which populates from users table. I access the modal form via button. I have some validation in code igniter 4. When i enter all the fields correctly in the m...
<p>I solved the issue by passing my data to the method that returns validation errors to the view.</p> <pre><code>$modeluser-&gt;setValidationMessages($fieldValidationMessage); $userdata = $this-&gt;getData();// called the method to get userdata. if($modeluser-&gt;save($data)===false){ return view('admin_template/u...
why does my data table fail to load when i have validation error in my modal form?
php|forms|codeigniter-4
0
34
1
71,170,746
71,170,746
1
true
2022-02-16T12:20:53.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why does my data table fail to load when i have validation error in my modal form?<p>I have a view users where I have included both a modal form and a data t...
71,310,034
swift Stack insertSubview & auto refresh layout problem<p>I would like to click and add subview at: index 3 position. But the constraint not update automatically. how can i refresh the layout when adding subview to uistack?</p> <p>Thank you for your help very much</p> <pre><code>@objc func showMoreView() { stac...
<p>Swift provides the following <code>UIStackView</code> function to insert a view at a specified position:</p> <pre><code>func insertArrangedSubview(_ view: UIView, atIndex stackIndex: Int) </code></pre> <p>(see the <a href="https://developer.apple.com/documentation/uikit/uistackview/1616237-insertarrangedsubview" rel...
swift Stack insertSubview & auto refresh layout problem
ios|swift|autolayout|addsubview
0
298
2
71,310,173
71,310,173
1
true
2022-03-01T14:28:50.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: swift Stack insertSubview & auto refresh layout problem<p>I would like to click and add subview at: index 3 position. But the constraint not update automatic...
71,321,581
Uppaal : Is there a way to know the size of the state space?<p>In Uppaal, is there a way to know how many states exists as the combination of locations and variables</p>
<p>For predictions, one could naively multiply all automata locations and variable ranges, but this gives wastly pesimistic result, exceeding the real state space size most of the time, therefore it is meaningless.</p> <p>For estimating the state space, one can ask a query <code>A[] true</code> and use <code>-u</code> ...
Uppaal : Is there a way to know the size of the state space?
uppaal
0
44
1
71,406,491
71,406,491
1
true
2022-03-02T11:04:11.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uppaal : Is there a way to know the size of the state space?<p>In Uppaal, is there a way to know how many states exists as the combination of locations and v...
71,330,696
How to get the currentThread().getName() as part of (concurrent.futures) future result?<p>I have the following code with questions at the bottom:</p> <pre><code>1 from threading import currentThread 2 import concurrent.futures 3 import urllib.request 4 5 URLS = ['http://www.foxnews.com/', 6 'http://www.cn...
<p>I would refactor the <code>load_url</code> function to return a tuple(or better yet a namedtuple or object) like this:</p> <pre><code>from threading import currentThread import concurrent.futures import urllib.request URLS = ['https://www.foxnews.com/', 'https://www.cnn.com/', 'https://www.bbc.co.uk...
How to get the currentThread().getName() as part of (concurrent.futures) future result?
python|multithreading|concurrent.futures
0
44
1
71,330,951
71,330,951
1
true
2022-03-03T00:14:23.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the currentThread().getName() as part of (concurrent.futures) future result?<p>I have the following code with questions at the bottom:</p> <pre><c...
71,185,752
How to set attributes to the other items in array besides the selected element (this)?<p>I would like to make buttons in my HTML while one of my JS classes is running and receives a response from the backend. I'm using jQuery and vanilla JS and created an example below. In this example, I'd like to dynamically disable ...
<p>You could do something like that, looping over all buttons to disable/re-enable them on click.</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"><code>Array.from(document.getElement...
How to set attributes to the other items in array besides the selected element (this)?
javascript|html|jquery|bootstrap-5
0
37
3
71,185,980
71,185,980
1
true
2022-02-19T14:09:28.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set attributes to the other items in array besides the selected element (this)?<p>I would like to make buttons in my HTML while one of my JS classes i...
71,418,171
Adjusting forms in Rails for shallow routing<p>I have students and checklists for models, and each student has many checklists. I've been trying to change the default scaffolds to work with shallow routing. I fixed by controller by setting the checklist and student depending on the action, and that seems to work. But I...
<p>You really don't have to do much to get forms to work with nested routes.</p> <p>When you're using <code>form_with</code> it passes the arguments to the <a href="https://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html" rel="nofollow noreferrer">polymorphic route helpers</a> which will compa...
Adjusting forms in Rails for shallow routing
ruby-on-rails|ruby
0
45
1
71,421,772
71,421,772
1
true
2022-03-10T02:28:34.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adjusting forms in Rails for shallow routing<p>I have students and checklists for models, and each student has many checklists. I've been trying to change th...
71,422,365
How to perform condition for specific ranks in R<p>This is example of my dataset</p> <pre><code>timeplot=structure(list(SAP = c(&quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&quot;, &quot;s643&...
<p>Use <code>mutate()</code> and <code>group_by()</code> from <code>{dplyr}</code> package within the <code>{tidyverse}</code>. then use <code>ifelse()</code> statement</p> <pre><code>library(tidyverse) timeplot &lt;- timeplot %&gt;% mutate(hour_digit = as.numeric(gsub(&quot;([0-9]+).*$&quot;, &quot;\\1&quot;, hour)...
How to perform condition for specific ranks in R
r|dplyr
0
41
2
71,422,797
71,422,797
1
true
2022-03-10T10:11:22.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to perform condition for specific ranks in R<p>This is example of my dataset</p> <pre><code>timeplot=structure(list(SAP = c(&quot;s643&quot;, &quot;s643&...
71,285,004
Find the max value when there are multiple groups to be considered<p>I have already tried <a href="https://stackoverflow.com/questions/12102200/get-records-with-max-value-for-each-group-of-grouped-sql-results">Get records with max value for each group of grouped SQL results</a> answers from here. But it takes only grou...
<p>Just use a derived table to obtain the <code>MAX(revenue)</code> per <code>(user, hour)</code> groups.</p> <p>Then SUM the results per user:</p> <p><a href="https://dbfiddle.uk/?rdbms=mariadb_10.6&amp;fiddle=13777fc24e4dadc5f5fa7baf69c77a4c" rel="nofollow noreferrer">The fiddle</a></p> <pre class="lang-sql prettypri...
Find the max value when there are multiple groups to be considered
mysql|sql
0
37
1
71,285,838
71,285,838
1
true
2022-02-27T13:05:30.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find the max value when there are multiple groups to be considered<p>I have already tried <a href="https://stackoverflow.com/questions/12102200/get-records-w...
71,228,731
Collapsible displaying by default. Want them to be hidden<p>Attempting to create collapsible buttons. They are showing &amp; collapsing onclick however I'd like them to be hidden by default. Started a personal website project to self teach HTML. What am I missing? Attempted to use button but like the styling of link wi...
<p>In your css file, add this to the bottom:</p> <pre><code>div.jumbotron.tab{ display:none; } </code></pre> <p>That will hide your tabs by default when you load the page because you are specifically targeting any div that has both the &quot;jumbotron&quot; and &quot;tab&quot; classes. Good luck as you continue to le...
Collapsible displaying by default. Want them to be hidden
javascript|html|css
0
26
1
71,233,856
71,233,856
1
true
2022-02-22T21:49:39.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Collapsible displaying by default. Want them to be hidden<p>Attempting to create collapsible buttons. They are showing &amp; collapsing onclick however I'd l...
71,249,505
Understanding Thread Indexing in cuda :<p>Consider the Following Kernels :</p> <ol> <li>Multiple Threads Single Block :</li> </ol> <pre><code> __global__ Kernel(){ int tid = threadIdx.x; } </code></pre> <ol start="2"> <li>Multiple Blocks Multiple Threads :</li> </ol> <pre><code> __global__ K...
<p>The output is not useful, as there is no guarantee for which block will be scheduled at which point in time on which streaming multiprocessor (SMP). Even the warps inside the same block do not have to run in parallel. So probably one warp of block 2 and one warp of block 3 are processed in parallel on different SMPs...
Understanding Thread Indexing in cuda :
cuda
0
272
1
71,251,169
71,251,169
1
true
2022-02-24T09:04:09.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding Thread Indexing in cuda :<p>Consider the Following Kernels :</p> <ol> <li>Multiple Threads Single Block :</li> </ol> <pre><code> __global__ K...
71,363,256
The argument type 'List<Set<ListBody>>' can't be assigned to the parameter type 'ListBody'<p>I take the first 5 groups of data returned from the <code>departures</code> API, using the class <code>Boards</code> and put them into a List of returned parsed <code>Json</code>.</p> <pre><code> var mappedList = boards.depar...
<p>I thinks what you want is this?. Since then you have a ListBody with multiple text widgets instead of a list of ListBody( with 1 text widget)</p> <pre><code>var mappedValues = ListBody( children: mappedList.map((m) =&gt; RichText ()).toList(), ); </code></pre> <p>example on how to use RichText:</p> <pre><code> R...
The argument type 'List<Set<ListBody>>' can't be assigned to the parameter type 'ListBody'
flutter|dart
0
42
1
71,363,898
71,363,898
1
true
2022-03-05T14:57:54.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The argument type 'List<Set<ListBody>>' can't be assigned to the parameter type 'ListBody'<p>I take the first 5 groups of data returned from the <code>depart...
71,205,605
How to solve the error in the below email content in C#<p>I am using C# MVC Architecture.</p> <p>I am going to retrieve the questions from the database and display in the email content as a list of questions.</p> <p>Below is the method of the email template.</p> <pre><code> public bool SendJobAcceptanceToRecruiter(stri...
<p>You need to &quot;unfold&quot; the list of questions, if you do that, you'll have all the freedom you need.</p> <p>In stead of:</p> <pre><code>&quot;&lt;br/&gt;Questions Posted: &quot; + ques + &quot;&lt;br/&gt;&quot; </code></pre> <p>use something like this:</p> <pre><code>&quot;&lt;br/&gt;Questions Posted: &quot; ...
How to solve the error in the below email content in C#
c#|asp.net-mvc|list|email
0
44
1
71,205,926
71,205,926
1
true
2022-02-21T11:32:54.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to solve the error in the below email content in C#<p>I am using C# MVC Architecture.</p> <p>I am going to retrieve the questions from the database and d...
71,136,802
How to Split Cells and Display Only Worksheet Name?<p>Is there a clean and tidy way to get cells split ONLY by sheet name? I have a bunch of cells that look something like this.</p> <pre><code>=(Xlookup($A2,Staff!A:A,Client!K:K)*E2 =B3*(Xlookup(E3,Auto!1:1,Desc!3:3) </code></pre> <p>And, all kinds of other stuff. Basic...
<p>If you have O365, this will work for you ...</p> <pre><code>=LET(x, TRANSPOSE(FILTERXML(&quot;&lt;d&gt;&lt;r&gt;&quot; &amp; SUBSTITUTE(A1, &quot;,&quot;, &quot;&lt;/r&gt;&lt;r&gt;&quot;) &amp; &quot;&lt;/r&gt;&lt;/d&gt;&quot;, &quot;//r[contains(text(),&quot;&quot;!&quot;&quot;)]&quot;)), MID(x, 1, FIND(&quot;!&quo...
How to Split Cells and Display Only Worksheet Name?
excel|vba
0
40
1
71,136,943
71,136,943
1
true
2022-02-16T05:26:35.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Split Cells and Display Only Worksheet Name?<p>Is there a clean and tidy way to get cells split ONLY by sheet name? I have a bunch of cells that look ...
71,164,744
Unexpected results when using asynchronous jQuery request<p>On my website I have a table with some &quot;add&quot; links. By clicking on the add links, a ajax request is fired and - as soon as this request has been performed - a new table row directly below the &quot;add&quot; link row is created.</p> <p>When clicking ...
<p>The problem is indeed that the <code>id</code> and <code>click</code> values are overwritten before the AJAX call can finish.</p> <p>This happens because you don't use a variable keyword, like <code>var</code>, <code>let</code> or <code>const</code> to declare your variable. Therefor <code>id</code> and <code>click<...
Unexpected results when using asynchronous jQuery request
javascript|jquery|asynchronous
0
16
1
71,165,029
71,165,029
1
true
2022-02-17T20:07:02.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unexpected results when using asynchronous jQuery request<p>On my website I have a table with some &quot;add&quot; links. By clicking on the add links, a aja...
71,197,376
Why can importing a file let some parts of that file be accessed but not things which aren't exported?<p>I was following a React tutorial where a javascript file A containing some functions and various console log statements etc is imported into another javascript file B.</p> <p>One of those functions from file A is th...
<blockquote> <p>...doesn't importing the whole file essentially bring everything in that file into scope for file B?</p> </blockquote> <p>No, not at all. The example module you've shown doesn't export anything, so everything inside it (the <code>test1</code> function) is entirely private to the module. This is one of t...
Why can importing a file let some parts of that file be accessed but not things which aren't exported?
javascript|reactjs|import|module
0
28
1
71,197,416
71,197,416
1
true
2022-02-20T18:18:18.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can importing a file let some parts of that file be accessed but not things which aren't exported?<p>I was following a React tutorial where a javascript ...
71,228,021
Error message in SwiftUI: Type '() -> ()' cannot conform to 'ShapeStyle'<p>I wrote an extension for the instructions inside the application, after writing an error came out:</p> <pre><code>Type '() -&gt; ()' cannot conform to 'ShapeStyle' </code></pre> <p>Here is the extension itself and here is the error:</p> <pre><co...
<p>In your extension to <code>View</code>, in this line <code>SpotlightView(rect: rect, content: title)</code> you are not matching your initialiser. The <code>SpotlightView</code> requires 3 parameters:</p> <ul> <li>rect, of type CGRect</li> <li>title, of type String</li> <li>content, a closure</li> </ul> <p>You are p...
Error message in SwiftUI: Type '() -> ()' cannot conform to 'ShapeStyle'
ios|swift|xcode|swiftui
0
535
1
71,228,102
71,228,102
1
true
2022-02-22T20:41:05.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error message in SwiftUI: Type '() -> ()' cannot conform to 'ShapeStyle'<p>I wrote an extension for the instructions inside the application, after writing an...
71,401,479
Concatenate Data in Nested JSON file to CSV<p>I get a JSON file with Server info in it and I'm trying to concatenate the output into one output.</p> <p>Here is the output I get:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Server Name</th> <th>Operating System</th> <th>Service</th> <th>I...
<p>A simplified example:</p> <pre class="lang-sh prettyprint-override"><code>@' [ { &quot;Server Name&quot;: &quot;DC01&quot;, &quot;Operating System&quot;: &quot;Windows Server 2016&quot;, &quot;Service&quot;: &quot;Domain Controller&quot;, &quot;IPs&quot;: [ { &quot;IP&quot;: &q...
Concatenate Data in Nested JSON file to CSV
powershell
0
25
1
71,401,691
71,401,691
1
true
2022-03-08T21:10:57.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Concatenate Data in Nested JSON file to CSV<p>I get a JSON file with Server info in it and I'm trying to concatenate the output into one output.</p> <p>Here ...
71,264,264
Need to join 2 buttons in a column<p>I want to display 2 button in a column like below shown pic</p> <p><a href="https://i.stack.imgur.com/8pymA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8pymA.png" alt="enter image description here" /></a></p> <pre><code>column = [ { title: 'operat...
<p>basically what you return inside the 'render' property of the column object will render in the table's column.</p> <pre><code>column = [ { title: 'operation', dataIndex: 'operation', render: (_, record) =&gt; { //---------------------&gt; missing { in your code const editable = isEd...
Need to join 2 buttons in a column
reactjs|antd
0
35
1
71,264,469
71,264,469
1
true
2022-02-25T10:13:06.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to join 2 buttons in a column<p>I want to display 2 button in a column like below shown pic</p> <p><a href="https://i.stack.imgur.com/8pymA.png" rel="no...
71,142,502
Localization not working in laravel 8 with json file<p>I am trying to implement multiple languages in my laravel application <strong>with json files in resource/lang/ directory with shortnames of languages</strong> i.e en.json, ar.json. Following is the code</p> <p>web.php</p> <pre><code>Route::get('lang/{lang}', [Home...
<p>don't do artisan calls when the user change language.</p> <p>setLocale should be enough, but you need to store that locale in the session at least,</p> <p>switchLang :</p> <pre><code>session()-&gt;put('locale', $lang); </code></pre> <p>middleware:</p> <pre><code>if(session()-&gt;has('locale')) { app()-&gt;setLoc...
Localization not working in laravel 8 with json file
php|laravel|laravel-localization
0
800
1
71,145,808
71,145,808
1
true
2022-02-16T13:10:39.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Localization not working in laravel 8 with json file<p>I am trying to implement multiple languages in my laravel application <strong>with json files in resou...
71,268,043
Count occurrences in specific column ranges and return factor variable, R<p>I have data like this:</p> <pre><code>df&lt;-structure(list(levels_incised___1 = c(0, 0, 0, 0, 0, 0), levels_incised___2 = c(1, 0, 0, 0, 0, 0), levels_incised___3 = c(1, 0, 0, 0, 0, 0), levels_incised___4 = c(1, 0, 0, 0, 0, 0), levels_incised...
<p>A few things to resolve here:</p> <ul> <li>find a way to convert <code>levels...#</code> to one of the <code>C</code>/<code>T</code>/... categories;</li> <li>produce logic to infer based on presence of groups.</li> </ul> <p>I think the first can be done by extracting the number and using <code>findInterval</code> to...
Count occurrences in specific column ranges and return factor variable, R
r|tidyverse
0
39
2
71,268,503
71,268,503
1
true
2022-02-25T15:24:39.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count occurrences in specific column ranges and return factor variable, R<p>I have data like this:</p> <pre><code>df&lt;-structure(list(levels_incised___1 = ...
71,411,826
How to select the complete JSON node if any key-value pair matched inside the node?<p>I have JSON some thing like below</p> <pre><code>{ &quot;title&quot;: &quot;seller_information&quot;, &quot;sellers&quot;: [ { &quot;seller&quot;: &quot;s1&quot;, &quot;prod_on_sale&quot;: &quot...
<pre><code>public static JSONObject getObject(String itemToSearch, JSONArray array) { for(int i = 0; i &lt; array.length(); i++) { try { JSONObject jsonObject = array.getJSONObject(i); if (jsonObject.getString(&quot;seller&quot;).equals(itemToSearch)){ return jsonObje...
How to select the complete JSON node if any key-value pair matched inside the node?
java|arrays|json
0
34
1
71,412,020
71,412,020
1
true
2022-03-09T15:27:44.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select the complete JSON node if any key-value pair matched inside the node?<p>I have JSON some thing like below</p> <pre><code>{ &quot;title&quot...
71,115,014
DataTable: the date is sorted only by the first number (based on dd)<p>I'm having a problem with sorting the date; what I notice is that the date is sorted only according to the first number (therefore only to dd), as you can verify.</p> <p>The date format must be dd/MM/yyyy. So the date 11/02/2022 should come before t...
<p>Your dates are not in a valid format so DataTable treats them as strings. For DataTable to sort them as dates, you need to convert them to date object. Try this</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-htm...
DataTable: the date is sorted only by the first number (based on dd)
javascript|datatables
0
22
2
71,115,218
71,115,218
1
true
2022-02-14T16:20:54.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DataTable: the date is sorted only by the first number (based on dd)<p>I'm having a problem with sorting the date; what I notice is that the date is sorted o...
71,190,893
Updating all rows using many conditions like "LIKE"<p><strong>Goal:</strong></p> <ul> <li>Get &quot;Banco&quot; and &quot;Lançamento&quot; values from TAB_Aditivos_Pagamentos, search for &quot;Descrição&quot; which contains &quot;Lançamento&quot; and &quot;Banco&quot; from TAB_Aditivos_Pagamentos then UPDATE TAB_Aditiv...
<p>Loops in SQL are always a bad sign. You should be able to do this in an <a href="https://www.sqlservertutorial.net/sql-server-basics/sql-server-update-join/" rel="nofollow noreferrer">update with a join</a>.</p> <p>First, write the select with a join.</p> <pre><code>select * from TAB_Aditivos_Pagamentos ap join TAB_...
Updating all rows using many conditions like "LIKE"
sql|sql-server
0
30
1
71,190,997
71,190,997
1
true
2022-02-20T02:20:44.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating all rows using many conditions like "LIKE"<p><strong>Goal:</strong></p> <ul> <li>Get &quot;Banco&quot; and &quot;Lançamento&quot; values from TAB_Ad...
71,342,797
How do I remove all variable names and leave values only in my export in R?<p>I have this code:</p> <pre><code>library(openxlsx) library(tidyverse) rid &lt;- (c(1:20,NA)) RISN &lt;- (c(1:20, NA)) Fake &lt;- (c(1:20, NA)) df &lt;- tibble(rid, RISN, Fake) df &lt;- df %&gt;% filter(!is.na(rid) &amp; !is.na(RISN)) %&gt;...
<p>One option would be to use <code>colNames = FALSE</code>. While not mentioned in the docs, under the hood <code>write.xlsx</code> calls <code>buildWorkbook</code> which calls either <code>writeDataTable</code> or <code>writeData</code>. Hence, you could use arguments mentioned in <code>?writeDataTable</code> as well...
How do I remove all variable names and leave values only in my export in R?
r|dplyr
0
24
1
71,342,859
71,342,859
1
true
2022-03-03T19:33:48.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I remove all variable names and leave values only in my export in R?<p>I have this code:</p> <pre><code>library(openxlsx) library(tidyverse) rid &lt;...
71,300,110
How to efficiently use a dictionary and a list of keys to find a list of values<p>For example, I have a pandas data frame <code>df</code> like this:</p> <pre><code> A B 0 12 ['key1', 'key2'] 1 23 ['key3', 'key4'] </code></pre> <p>and I have a dictionary <code>dic</code> like this:</p> <pre><code>{'key1': 'value...
<p>One approach is to use function</p> <pre><code>def check_dictionary(list_of_keys): return [dic[x] for x in list_of_keys if x in dic] df['C']=df['B'].apply(check_dictionary) </code></pre> <p>Another approach is to use lambda:</p> <pre><code>df['C']=df['B'].apply(lambda row: [dic[key] for key in row if x in dic] ...
How to efficiently use a dictionary and a list of keys to find a list of values
python|pandas|search|data-structures
0
42
1
71,300,273
71,300,273
1
true
2022-02-28T19:27:29.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to efficiently use a dictionary and a list of keys to find a list of values<p>For example, I have a pandas data frame <code>df</code> like this:</p> <pre...
71,187,708
Angular formArray inside formArray<p>I am doing inline editing in my project, i am trying to patchvalue data from server, i have formarray inside the formArray for my <strong>accountNumbers</strong> array, but when i try to change value of inputs it gives error: Error: Cannot find control with path: 'type -&gt; options...
<p>If you look at the path, you can see that your missing the index of the elemento of the second FormArray.</p> <blockquote> <p>type -&gt; options -&gt; 0 -&gt; accountNumbers -&gt; <strong>[missing_index]</strong> -&gt; accountNumber</p> </blockquote> <p>Similar as you are assigning the first <code>FormArray</code> i...
Angular formArray inside formArray
angular|typescript
0
283
1
71,187,970
71,187,970
1
true
2022-02-19T18:02:55.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular formArray inside formArray<p>I am doing inline editing in my project, i am trying to patchvalue data from server, i have formarray inside the formArr...
71,108,289
Why codecvt can't convert unicode outside BMP to u16string?<p>I am trying to understand C++ unicode and having this confused me now.</p> <p>Code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; #include &lt;locale&gt; #include &lt;codecvt&gt; using namespace std; void trial1(){ string a = &quot;\U...
<p><code>std::codecvt_utf8</code> does not support conversions to/from UTF-16, only UCS-2 and UTF-32. You need to use <a href="https://en.cppreference.com/w/cpp/locale/codecvt_utf8_utf16" rel="nofollow noreferrer"><code>std::codecvt_utf8_utf16</code></a> instead.</p>
Why codecvt can't convert unicode outside BMP to u16string?
c++|c++11
0
32
1
71,108,761
71,108,761
1
true
2022-02-14T07:15:43.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why codecvt can't convert unicode outside BMP to u16string?<p>I am trying to understand C++ unicode and having this confused me now.</p> <p>Code:</p> <pre><c...
71,399,773
Why did this assignment of a shared pointer have no effect after returning from nested function?<p>Consider this mwe:</p> <pre class="lang-cpp prettyprint-override"><code>#include&lt;iostream&gt; #include&lt;memory&gt; #include&lt;vector&gt; using namespace std; struct A { shared_ptr&lt;vector&lt;int&gt;&gt; b; }...
<p>In <code>main()</code>, <code>a.b</code> doesn't point at a valid <code>vector</code>, so accessing <code>a.b-&gt;size()</code> is <em>undefined behavior</em>.</p> <p><code>bar()</code> creates a new <code>vector</code> that holds a <em>copy</em> of the <code>A</code> object that was passed in to it. <code>foo()</co...
Why did this assignment of a shared pointer have no effect after returning from nested function?
c++|c++11
0
42
2
71,399,822
71,399,822
1
true
2022-03-08T18:18:49.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why did this assignment of a shared pointer have no effect after returning from nested function?<p>Consider this mwe:</p> <pre class="lang-cpp prettyprint-ov...
71,123,220
How to add columns to my data frame, including the counts of another columns , for two different column, in R?<p>I need to count two different columns in a data frame and add the values as two new columns.</p> <p>In the example below, I want to count x and y</p> <pre><code>ID l x y 1 s 1 E 1 s 2 NA 1 ...
<p>Here is a <code>tidyverse</code> approach. You can <code>group_by</code> your <code>ID</code> column, and count rows that is not <code>NA</code>.</p> <pre><code>library(tidyverse) df %&gt;% group_by(ID, l) %&gt;% summarize(n.x = sum(!is.na(x)), n.y = sum(!is.na(y)), .groups = &quot;drop&quot;) # A tibble: 4 ...
How to add columns to my data frame, including the counts of another columns , for two different column, in R?
r|count
0
45
1
71,123,318
71,123,318
1
true
2022-02-15T08:29:51.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add columns to my data frame, including the counts of another columns , for two different column, in R?<p>I need to count two different columns in a d...
71,155,461
Automate manual color selection for `geom_tile`s<p>I have this type of data:</p> <pre><code>target_seq &lt;- structure(list(Line = c(&quot;130&quot;, &quot;131&quot;, &quot;132&quot;, &quot;133&quot;, &quot;134&quot;, &quot;135&quot;, &quot;136&quot;, &quot;137&quot;, &quot;138&qu...
<p>You can create a vector storing the name of the &quot;Actor&quot; and their corresponding colours. Then use the vector in <code>scale_fill_manual(values = vector)</code>.</p> <p>Here my vector is <code>tile_fill</code>, which fills actor B with blue, R with red and M with green (the Actor names comes from your <code...
Automate manual color selection for `geom_tile`s
r|ggplot2
0
37
1
71,155,579
71,155,579
1
true
2022-02-17T09:28:42.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Automate manual color selection for `geom_tile`s<p>I have this type of data:</p> <pre><code>target_seq &lt;- structure(list(Line = c(&quot;130&quot;, &quot;1...
71,286,243
ZStack is laying out views differently when adding another view<p>I have this code:</p> <pre><code>ZStack { if let captionText = captionText { VStack { Spacer() Text(captionText) .font(.small) } } user.username() } </code></pre> <p>It look...
<p>I believe you are just missing an <code>alignment: .leading</code> – and I don't understand why you use <code>ZStack</code> instead of <code>VStack</code>:</p> <pre><code>struct ContentView: View { var username = &quot;[anonymous]&quot; var captionText: String? = &quot;Admin&quot; var body: so...
ZStack is laying out views differently when adding another view
swift|swiftui
0
21
1
71,286,432
71,286,432
1
true
2022-02-27T15:58:51.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ZStack is laying out views differently when adding another view<p>I have this code:</p> <pre><code>ZStack { if let captionText = captionText { VS...
71,094,279
How to change just one parameter using Redux?<p>I try to update my global state using Redux, but I try to update just one paramter of five, not all.</p> <p>My store code looks like:</p> <pre><code>const initialState = { loggedIn: false, thisUser: {} } export function usersReducer(state = initialState, action) ...
<p>I understand why you did this, it seemed logical to you, but it will not work.</p> <pre><code> const state = { ...state, [thisUser.activated]: action.payload }; </code></pre> <p>So your goal is to update the state to be like this:</p> <pre><code>{ loggedIn: true, thisUser: { //other propertie...
How to change just one parameter using Redux?
javascript|reactjs|redux
0
36
2
71,094,640
71,094,640
1
true
2022-02-12T17:33:52.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change just one parameter using Redux?<p>I try to update my global state using Redux, but I try to update just one paramter of five, not all.</p> <p>M...
71,172,619
okHttp client gives timeout after adding callTimeout() config to it and has moments where the request doesn't reach the host<p>after adding callTimeout() config to the okhttp client I started to get timeouts</p> <pre><code>Caused by: java.io.InterruptedIOException: timeout Caused by: java.io.IOException: Canceled OkHt...
<p>As after adding the configurations, you are getting this exception, I am suspecting, the requested endpoint needs more time than your configured 5 seconds.</p> <p>If your requested endpoint is taking more than 5 seconds (5_000 milliseconds) to get a response, you will get a timeout here with this config.</p> <p>You ...
okHttp client gives timeout after adding callTimeout() config to it and has moments where the request doesn't reach the host
java|android|retrofit|okhttp
0
289
2
71,173,559
71,173,559
1
true
2022-02-18T11:18:57.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: okHttp client gives timeout after adding callTimeout() config to it and has moments where the request doesn't reach the host<p>after adding callTimeout() con...
71,355,608
Debezium connector task is in unassigned state<p>Today one of the nodes out of 3 went out of sync and was brought back up. Now when I check the status of the connector task it shows as UNASSIGNED even though the connector is in a RUNNING state. The workers are running in distributed mode.</p> <p>I tried to restart the ...
<blockquote> <p>resume that connector once it is back?</p> </blockquote> <p>After you run the connect-distributed script, it should rebalance the tasks.</p> <p>Otherwise, there's a /restart API endpoint</p> <blockquote> <p>if one worker goes down, it should Automatically assign the task to another worker</p> </blockquo...
Debezium connector task is in unassigned state
apache-kafka|apache-kafka-connect|debezium
0
264
1
71,371,372
71,371,372
1
true
2022-03-04T18:12:00.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Debezium connector task is in unassigned state<p>Today one of the nodes out of 3 went out of sync and was brought back up. Now when I check the status of the...
71,362,149
Moving DataBase from Microsoft SQL folder to App_Data folder (appseting.json)<pre><code>1. &quot;WebApi&quot;: &quot;Data Source=.;Initial Catalog=TaskDB; Integrated Security=true&quot; 2. &quot;WebApi&quot;: &quot;Server=(localdb)\\mssqllocaldb;AttachDBFilename=%CONTENTROOTPATH%\\App_Data\\TaskDB.mdf;Trusted_Conn...
<p>The files of database are exclusive in hand of SQL Server. You can not move database when it is online. Taking database offline, requires that no one be connected to database.</p> <p>First take the database <code>offline</code> then try to move the files. You can take the database offline both using SSMS and query. ...
Moving DataBase from Microsoft SQL folder to App_Data folder (appseting.json)
sql-server|asp.net-mvc|mvs
0
38
1
71,364,378
71,364,378
1
true
2022-03-05T12:21:42.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving DataBase from Microsoft SQL folder to App_Data folder (appseting.json)<pre><code>1. &quot;WebApi&quot;: &quot;Data Source=.;Initial Catalog=TaskDB; In...
71,369,806
Discord bot failing to call username of person who calls it<p>I'm trying to make my bot say a simple message whenever someone tells it 'hello'. Currently, the code of the command itself looks like this:</p> <pre><code>const { SlashCommandBuilder } = require('@discordjs/builders'); const greeter = &quot;default&quot;; c...
<p>If You want to mention a user you can do <code>${message.author}</code>. But if you want to say for ex. <code>Hello, Brandon</code> then you need to do <code>${message.author.username}</code>. The message <code>${message.author.tag}</code> does not always function and also I recommend you <code>const user = message....
Discord bot failing to call username of person who calls it
javascript|discord|discord.js
0
37
1
71,369,898
71,369,898
1
true
2022-03-06T11:22:33.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord bot failing to call username of person who calls it<p>I'm trying to make my bot say a simple message whenever someone tells it 'hello'. Currently, th...
71,254,406
System.IO.IOException: Connection timed out In Mailkit<p>I used MailKit.Net.Imap to read email in my mail box.</p> <p>Sometimes I get an exception like that I shared below</p> <p><strong>System.IO.IOException: Connection timed out ---&gt; System.Net.Sockets.SocketException (110): Connection timed out at MailKit.Net.Net...
<p>You have 2 options:</p> <ol> <li>Increase the timeout using the <code>ImapClient.Timeout</code> property. (That said, 1 minute is <em>less</em> than the default timeout which is 2 minutes)</li> <li>As Max points out in the comments below, properly handle exceptions and retry (which often will require reconnecting th...
System.IO.IOException: Connection timed out In Mailkit
c#|.net-core|imap|mailkit
0
269
1
71,254,593
71,254,593
1
true
2022-02-24T15:29:50.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: System.IO.IOException: Connection timed out In Mailkit<p>I used MailKit.Net.Imap to read email in my mail box.</p> <p>Sometimes I get an exception like that ...
71,259,124
Show multi-selected itens when load a edit view<p>I'm doing a edit form for some data. I'm having problem to pass information to . As you can see in my view, I pass the data to form using &quot;initial&quot; dictionary.</p> <p><strong>VIEWS.PY</strong></p> <pre><code>@login_required def project_detail(request, project_...
<p>Why are you passing 'project_id' into your form class instance? Try changing this:</p> <pre><code>form = ProjectDetailForm(project_id, request.POST, instance = project) </code></pre> <p>to this:</p> <pre><code>form = ProjectDetailForm(request.POST, instance = project) </code></pre> <p>and see if it helps. Also in ...
Show multi-selected itens when load a edit view
python|django|django-views|django-forms|crud
0
31
1
71,259,194
71,259,194
1
true
2022-02-24T22:47:06.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show multi-selected itens when load a edit view<p>I'm doing a edit form for some data. I'm having problem to pass information to . As you can see in my view,...
71,110,317
How to change id of datatable?<p>I have some websocket listening code that already do good things when receiveing some events.</p> <p>I now need to force reloading of datatable ONLY if I am in a specific page.</p> <p>I'd like to specify the id the of the datatable iteself (or add a data-, or add a class) in the List Op...
<p>In short - you can't. But maybe you can:</p> <p>(A) force reload the datatable only if on the correct <em>route</em>;</p> <p>(B) force reload the datatable if something is present in the DOM; and you can add things to the page using <a href="https://backpackforlaravel.com/docs/5.x/base-widgets" rel="nofollow norefer...
How to change id of datatable?
laravel-backpack
0
15
1
71,195,869
71,195,869
1
true
2022-02-14T10:25:35.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change id of datatable?<p>I have some websocket listening code that already do good things when receiveing some events.</p> <p>I now need to force rel...
71,223,654
How to get wandb to pass arguments by position?<p>I am trying to explore the results of different parameter settings on my python script &quot;train.py&quot;. For that, I use a wandb sweep. Each wandb agent executes the file &quot;train.py&quot; and passes some parameters to it. As per the wandb documentation (<a href=...
<p>Don't think you can get positional arguments from W&amp;B Sweeps. However, there's a little work around you can try that won't require you touching the <code>train.py</code> file.</p> <p>You can create an invoker file, let's call it <code>invoke.py</code>. Now, you can use it get rid of the keyword argument names. S...
How to get wandb to pass arguments by position?
python|python-3.x|wandb
0
270
1
71,225,201
71,225,201
1
true
2022-02-22T15:07:04.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get wandb to pass arguments by position?<p>I am trying to explore the results of different parameter settings on my python script &quot;train.py&quot;...
71,363,597
Return the ID of the selected terms to array<p>My terms have an additional ACF true/false field. I need to get a list of all the term IDs with the field enabled and return a list of these IDs.</p> <p>So far I have achieved such a code, but it returns me only one ID:</p> <pre><code>function terms_exclude_id_func() {...
<p>in your foreach loop, $IDs must be an array, and you need to push the values into it, not redefine its value:</p> <pre class="lang-php prettyprint-override"><code>function terms_exclude_id_func() { $terms_control = get_terms([ 'taxonomy' =&gt; 'product_cat', 'hide_empty' =...
Return the ID of the selected terms to array
php|arrays|wordpress|function
0
36
1
71,363,669
71,363,669
1
true
2022-03-05T15:46:00.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return the ID of the selected terms to array<p>My terms have an additional ACF true/false field. I need to get a list of all the term IDs with the field enab...
71,137,399
Error in setting headers in axios and react<p>I have tried many of the stack overflow solution but I am unable to solve this problem</p> <p>My code is below</p> <p>helper/axios.js</p> <pre><code>import axios from &quot;axios&quot;; const instance = axios.create({ baseURL: process.env.REACT_APP_BACKEND_URI, timeout...
<p>Maybe you could try importing your <code>store</code> directly inside the file.</p> <p>I don't thing <code>useSelector</code> can be called outside the Functional Component.</p> <p>Example,</p> <pre class="lang-jsx prettyprint-override"><code>import axios from &quot;./helper/axios&quot;; import store from &quot;./yo...
Error in setting headers in axios and react
reactjs|axios
0
39
1
71,137,455
71,137,455
1
true
2022-02-16T06:46:01.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error in setting headers in axios and react<p>I have tried many of the stack overflow solution but I am unable to solve this problem</p> <p>My code is below<...
71,208,167
Casting to char as Integer<p>I'm trying to do some casting but cannot understand where I'm making a mistake. The error occurs in this line:</p> <pre><code>set datekey = cast(to_char((event_time)::TIMESTAMP,'yyyymmdd') as integer) </code></pre> <p><strong>ERROR</strong>: Syntax error at »yyyymmdd« LINE 16: ... datek...
<p>Use two single quote instead of one single quote when using dynamic query. All static text except variable/parameter inside preparing query must use two single quote.</p> <pre><code>cast(to_char((event_time)::TIMESTAMP,''yyyymmdd'') as integer) case when manufacturer like ''%DESIGNA%'' THEN 2 WHEN...
Casting to char as Integer
postgresql
0
19
1
71,208,226
71,208,226
1
true
2022-02-21T14:40:02.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Casting to char as Integer<p>I'm trying to do some casting but cannot understand where I'm making a mistake. The error occurs in this line:</p> <pre><code>se...
71,399,208
WrapPanel hides half of the last uiElement of each line<p>Each UserControl I have in a stackPanel has a WrapPanel, and each UserControl in this WrapPanel is a word (so they have a different size from each other, depending on the length of the word), so that a sentence appears.</p> <p>Here is an image to help you unders...
<p>The problem is that you bind the WrapPanel's Width to that of its UserControl parent without subtracting the Width of the Label element.</p> <p>You should not need to bind any Width at all, when you use suitable Panel elements, like e.g. a Grid or a DockPanel instead of StackPanel.</p> <pre><code>&lt;Border x:Name=&...
WrapPanel hides half of the last uiElement of each line
c#|wpf|windows|wrappanel
0
34
1
71,399,835
71,399,835
1
true
2022-03-08T17:32:14.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WrapPanel hides half of the last uiElement of each line<p>Each UserControl I have in a stackPanel has a WrapPanel, and each UserControl in this WrapPanel is ...
71,141,635
Add new columns via apply but specify column names only once<p>I want to add the result of an <code>apply()</code> as new columns. In the current code I have to give the names at two places. Is there a better way doing this?</p> <pre class="lang-py prettyprint-override"><code>#!/usr/bin/env python3 import pandas as pd ...
<p>Just for fun, if you want to keep the naming inside the function you can try this:</p> <pre><code>df.join(df.apply(foo,axis=1)) </code></pre> <p>and the result will be</p> <pre><code> 0 A B 0 0 1 2 1 1 1 2 2 2 1 2 </code></pre>
Add new columns via apply but specify column names only once
python|pandas
0
27
2
71,142,153
71,142,153
1
true
2022-02-16T12:11:09.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add new columns via apply but specify column names only once<p>I want to add the result of an <code>apply()</code> as new columns. In the current code I have...
71,222,910
Changing the Label Color in kivy if an int is bigger than 22<p>So I want to change the color of an label in kivy if some variable is bigger than 22 I tried everything, <a href="https://stackoverflow.com/questions/57080830/how-to-change-label-background-color-dynamically-in-kivy">this</a> is how it should work. like if ...
<p>If I understood your problem properly then you want to change the text colour (color) depending on some value ( of <code>ZZ</code> perhaps).</p> <p>To achieve that, first create a NumericProperty (assuming <code>ZZ</code> takes only number) for <code>ZZ</code> in <code>MyApp</code>. With that you will be able to use...
Changing the Label Color in kivy if an int is bigger than 22
python|python-3.x|kivy|kivy-language
0
33
1
71,223,376
71,223,376
1
true
2022-02-22T14:17:16.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing the Label Color in kivy if an int is bigger than 22<p>So I want to change the color of an label in kivy if some variable is bigger than 22 I tried e...
71,266,485
How to apply a custom function with proxy::dist to create a distance matrix in R<p>I have defined a custom function and tested the function to make sure that it works but I am unable to apply it to a list in order to obtain a distance matrix.</p> <p>The code I have is:</p> <pre><code>library(Biostrings) library(proxy) ...
<p>You don't need to use the <code>proxy</code> package as <code>proxy::dist</code> is meant to icompare rows of matrix/dataframes against each other. Since you want to compare strings, you can use <code>outer</code>. However, you need to tweak your <code>customalnfunc</code> function, so that it returns only a number ...
How to apply a custom function with proxy::dist to create a distance matrix in R
r|function|matrix|proxy
0
43
1
71,266,837
71,266,837
1
true
2022-02-25T13:20:01.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to apply a custom function with proxy::dist to create a distance matrix in R<p>I have defined a custom function and tested the function to make sure that...
71,093,971
CSS dropdown menu lined up with viewport, not parent to impede crazy scrolling<p>Most CSS dropmenus tend to line up the top of the list of children <code>&lt;ul&gt;</code> with the top of the parent <code>&lt;li&gt;</code>.</p> <p>But that breaks down easily the longer the menus and lengthier the list of children, whi...
<p>You'll have to offset up to hit the top off the viewport by adding a sub-menu class and changing the relative parent:</p> <pre><code>.li-sub ul { top: 0px !important; left: 250px !important; } </code></pre> <p>Here's the same fiddle but with the adjustments: <a href="https://jsfiddle.net/getr0cou/4/" rel="nofol...
CSS dropdown menu lined up with viewport, not parent to impede crazy scrolling
css
0
23
1
71,094,157
71,094,157
1
true
2022-02-12T16:57:59.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS dropdown menu lined up with viewport, not parent to impede crazy scrolling<p>Most CSS dropmenus tend to line up the top of the list of children <code>&lt...
71,305,381
incremental Shiny UI using conditionalPanel() and a text output in conditions<p>I have been trying to create a Shiny UI that changes depending on the stage of data processing, but I can't figure out why my conditional panels don't pop up, and why even my text output for debugging doesn't show a value in the UI.</p> <p>...
<p>EDIT for better explanation :</p> <p>You are defining <code>stage</code> too many times. The only one counting is the last one :</p> <pre><code>stage &lt;- eventReactive(input$button2, {&quot;second&quot;}) </code></pre> <p>At this point, <code>stage</code> is only that, so it never triggers.</p> <p>Here is what you...
incremental Shiny UI using conditionalPanel() and a text output in conditions
r|shiny
0
36
1
71,306,011
71,306,011
1
true
2022-03-01T08:04:15.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: incremental Shiny UI using conditionalPanel() and a text output in conditions<p>I have been trying to create a Shiny UI that changes depending on the stage o...
71,099,826
lack of space between signatures on the plot and wrong column order on the plot in R<p>I need create plot using <code>ggplot2</code></p> <p>Here my code with reproducible example</p> <pre><code>library(tidyverse) gemoglabin=structure(list(Therapy.group = c(1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L...
<p>I think there are two answers here. One is the solution to the question you asked, which is that you can prevent clashes using <code>guide_axis(n.dodge = 2)</code></p> <pre class="lang-r prettyprint-override"><code>ggplot(datadim.lng, aes(x = vizit, y = gem, fill = Therapy.group)) + geom_boxplot(position = positi...
lack of space between signatures on the plot and wrong column order on the plot in R
r|ggplot2
0
30
2
71,100,008
71,100,008
1
true
2022-02-13T10:35:10.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: lack of space between signatures on the plot and wrong column order on the plot in R<p>I need create plot using <code>ggplot2</code></p> <p>Here my code with...
71,254,153
Fast fill 3D array/matrix in R with known index and value<p>may I ask a stupid question about fast assigning values to a big 3D matrix in R? I have x, y, z for location index and val for values to fill. The for loop takes so long, could you please help? Note that here I just simulated xyz and val</p> <pre><code>x &lt;-...
<p>You can do</p> <pre class="lang-r prettyprint-override"><code>a[cbind(x, y, z)] &lt;- val </code></pre> <p>It's difficult to show that this works on such a large example, so let's demonstrate on a smaller scale with a 3 x 3 x 3 matrix:</p> <pre class="lang-r prettyprint-override"><code>a &lt;- array(numeric(), c(3, ...
Fast fill 3D array/matrix in R with known index and value
r|performance|mapply
0
35
1
71,254,181
71,254,181
1
true
2022-02-24T15:12:52.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fast fill 3D array/matrix in R with known index and value<p>may I ask a stupid question about fast assigning values to a big 3D matrix in R? I have x, y, z f...
71,267,989
Function within a function: cramer function "Error in loglin"<p>I tried to embed the <code>cramer</code> function from <code>sjstats</code> package. Although the function works perfectly outside the custom function, it doesn't work within it.</p> <p>Thank you very much in advance.</p> <pre><code>library (sjstats) c...
<p>This happens because <code>x</code> and <code>y</code> are not automatically substituted in a formula for the variables you have passed. Look:</p> <pre class="lang-r prettyprint-override"><code>f &lt;- function(x, y) { return(x ~ y) } f(a, b) #&gt; x ~ y </code></pre> <p>If you want the variables substituted, you...
Function within a function: cramer function "Error in loglin"
r|function|custom-function
0
38
2
71,268,726
71,268,726
1
true
2022-02-25T15:20:38.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function within a function: cramer function "Error in loglin"<p>I tried to embed the <code>cramer</code> function from <code>sjstats</code> package. Although...
71,326,214
didn't match because some of the keywords were incorrect: dtype<p>The following code is an instance method built in a class</p> <pre><code>def get_samples_from_component(self,batchSize): SMALL = torch.tensor(1e-10, dtype=torch.float64, device=local_device) a_inv = torch.pow(self.kumar_a,-1) b_inv = torch.po...
<p><code>v_means</code> is already a tensor, try to simple remove the tensor re-implementation in:</p> <pre><code>components = torch.IntTensor(torch.argmax(torch.cat( self.compose_stick_segments(v_means),1) ,1), dtype=torch.long, device=self.device) </code></pre> <p>to:</p> <pre><code>components = torch.argmax(torch.ca...
didn't match because some of the keywords were incorrect: dtype
python|deep-learning|neural-network|pytorch
0
256
1
71,326,367
71,326,367
1
true
2022-03-02T16:39:18.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: didn't match because some of the keywords were incorrect: dtype<p>The following code is an instance method built in a class</p> <pre><code>def get_samples_fr...
71,411,961
How to join one column multiple times to many columns? - SQL<p>I have two tables like:</p> <pre><code>t1: | parent | main | child | ------- | ---- | ------ | A | B | NULL | B | C | NULL | NULL | C | D t2: | letter | num | | ------- | ---- | | A | 1 | | A | 2 | | B |...
<p>You can do:</p> <pre><code>select t1.parent, p.num as parent_num, t1.main, m.num as main_num, t1.child, c.num as child_num from t1 left join t2 p on p.letter = t1.parent left join t2 m on m.letter = t1.main left join t2 c on c.letter = t1.child </code></pre> <p>However, I would say the cardinalities of those...
How to join one column multiple times to many columns? - SQL
sql|database|join|amazon-redshift|union
0
30
1
71,412,136
71,412,136
1
true
2022-03-09T15:36:38.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to join one column multiple times to many columns? - SQL<p>I have two tables like:</p> <pre><code>t1: | parent | main | child | ------- | ---- | ------...
71,250,863
How to count role attributes from html page in python<p>is it possible to count how much time specific role shows up? There is a website and I want to use python to do this.</p> <p>e.g</p> <pre><code>&lt;div class=&quot;container&quot;&gt; &lt;div role=&quot;grid&quot;&gt; &lt;div role=&quot;gridcell&quot;&gt;&lt;/d...
<p>Going by the DOM you have provided in the query:</p> <p>If you want to count the <code>role='gridcell'</code> attributes:</p> <pre><code>gridcells = driver.find_elements(By.XPATH, &quot;//div[@role='gridcell']&quot;) print(len(gridcells)) </code></pre> <p>If you wan to count the <code>role</code> that contains any r...
How to count role attributes from html page in python
python|html|selenium
0
31
1
71,251,072
71,251,072
1
true
2022-02-24T10:56:50.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to count role attributes from html page in python<p>is it possible to count how much time specific role shows up? There is a website and I want to use py...
71,316,417
regex for n characters or at least z characters<p>I have a input control (.net Regex and must be 1 liner) that I have to make sure it's either 15 characters long with - . or input box can have N/A</p> <p>for example, 1443-RXSW3-8738 - this is 15 characters long or N/A</p> <p>So far I have this <code>^[a-zA-Z0-9]{1...
<p>Use <code>^([a-zA-Z0-9-]{15}|N/A)$</code>. We simply add hyphen to the character class at either the end or the start to ensure it is treated as a normal character.</p> <p>Try it out at <a href="http://regexstorm.net/tester?p=%5e%28%5ba-zA-Z0-9-%5d%7b15%7d%7cN%2fA%29%24&amp;i=1443-RXSW3-8738" rel="nofollow noreferr...
regex for n characters or at least z characters
.net|regex
0
39
1
71,316,548
71,316,548
1
true
2022-03-02T01:20:12.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: regex for n characters or at least z characters<p>I have a input control (.net Regex and must be 1 liner) that I have to make sure it's either 15 characters ...
71,319,297
Getting error when doing re-mapping dict keys to another dict keys in python<p>below is my code:</p> <pre><code>mapping_dict = {&quot;NET_D&quot;: [ (&quot;name&quot;, &quot;tiN&quot;), (&quot;d_id&quot;, &quot;id&quot;), (&qu...
<p>You could do this, although technically your <code>mapping_dict</code> is a list of tuples and not a nested dict.</p> <pre><code>mapping_dict = {&quot;NET_D&quot;: [ (&quot;name&quot;, &quot;tiN&quot;), (&quot;d_id&quot;, &quot;id&quot;), ...
Getting error when doing re-mapping dict keys to another dict keys in python
python-3.x|dictionary|mapping
0
38
1
71,319,841
71,319,841
1
true
2022-03-02T08:06:49.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting error when doing re-mapping dict keys to another dict keys in python<p>below is my code:</p> <pre><code>mapping_dict = {&quot;NET_D&quot;: ...
71,106,182
Jq strftime() to show time in a specific time zone<p>How to use jq to convert seconds since Unix epoch to a time string in human readable format but adjusted to Sydney, Australia time zone?</p> <p>I tried filter:</p> <pre><code>now | strftime(&quot;%Y-%m-%dT%H:%M:%SZ&quot;) </code></pre> <p>But I don't know how to adju...
<p>Both of the following convert to the time zone indicated by the <code>TZ</code> environment variable var:</p> <pre><code>localtime | strftime(...) </code></pre> <pre><code>strflocaltime(...) </code></pre> <p>For example,</p> <pre class="lang-none prettyprint-override"><code>$ jq -nr 'now | strftime(&quot;%FT%T&quot;...
Jq strftime() to show time in a specific time zone
jq|strftime
0
519
2
71,107,835
71,107,835
1
true
2022-02-14T01:04:14.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jq strftime() to show time in a specific time zone<p>How to use jq to convert seconds since Unix epoch to a time string in human readable format but adjusted...
71,326,044
How to stop pipe jq execution based on condition?<p>Using ActiveCampain work flows, I have a pipeline in which I want to execute code conditionally based on the output of a jq command.</p> <p>For example, I want to execute and <code>!http</code> and <code>!jq</code> command if <code>.status == &quot;event-created&quot;...
<p>A quick look at the docs suggest there's a <a href="https://developers.activecampaign.com/docs/commands-1#switch-command-a-nameswitch-commanda" rel="nofollow noreferrer"><code>!switch</code></a> &quot;command&quot; you can use.</p> <pre class="lang-json prettyprint-override"><code>{ &quot;!switch&quot;: { &quo...
How to stop pipe jq execution based on condition?
activecampaign
0
43
1
71,329,229
71,329,229
1
true
2022-03-02T16:26:24.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to stop pipe jq execution based on condition?<p>Using ActiveCampain work flows, I have a pipeline in which I want to execute code conditionally based on ...
71,157,159
Use arbitrary classes as parameter for parametrized tests in googletest<p>I have some repetive tests where the input of the tests needs to be created uniquely in a non-repetive way. Imagine 2 tests like this:</p> <pre><code>struct ComplexInput{}; ComplexInput CreateA(); ComplexInput CreateB(); bool FunctionUnderTest(...
<p>You can store function pointers and pass them to parameterized tests, as long as they have the same type (i.e., same parameters and return type)</p> <p><a href="https://godbolt.org/z/Gh4GeMrTE" rel="nofollow noreferrer">See it online</a></p> <pre><code>struct ComplexInput{}; ComplexInput CreateA(); ComplexInput Cre...
Use arbitrary classes as parameter for parametrized tests in googletest
c++|googletest
0
33
1
71,157,385
71,157,385
1
true
2022-02-17T11:18:40.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use arbitrary classes as parameter for parametrized tests in googletest<p>I have some repetive tests where the input of the tests needs to be created uniquel...
71,173,880
Make new same form on next last field<p>I created the field on form html with press enter instead of tab, i want to make automatic create new same form when its enter in last field form</p> <p>my problem : the form automatic created starting with the second field, and the form always makes a multiple of 2 forms</p> <p...
<p>Perhaps this will work for you?</p> <p>I fixed the HTML too</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"><code>const display = document.getElementById("area") const table = doc...
Make new same form on next last field
javascript|php|html
0
27
1
71,174,107
71,174,107
1
true
2022-02-18T12:58:38.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make new same form on next last field<p>I created the field on form html with press enter instead of tab, i want to make automatic create new same form when ...
71,238,739
Finding a changing sub-string within a string in Python<p>I looking for a way to extract two substrings from a string in Python. My string can be one of the following 4 examples:</p> <pre><code>&quot;CRISTART 101 STATUS MODE joint POSJOINTCURRENT 3.19 3.01&quot; &quot;CRISTART 101 STATUS MODE joint POSJOINTCURRENT -2.0...
<p>Use slice method to get last two digits, like this:</p> <pre><code>data = &quot;CRISTART 101 STATUS MODE joint POSJOINTCURRENT 3.19 3.01&quot; result = data.split()[-2:] #Last two values print(result) </code></pre> <p>Output:</p> <pre><code>['3.19', '3.01'] </code></pre> <p>Or use regex based method to extract all o...
Finding a changing sub-string within a string in Python
python|string|find|substring
0
32
3
71,238,964
71,238,964
1
true
2022-02-23T14:26:42.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding a changing sub-string within a string in Python<p>I looking for a way to extract two substrings from a string in Python. My string can be one of the ...
71,179,365
Pandas Avoid Multidimensional Key Error Comparing 2 Dataframes<p>I am stuck on a multidimensional key value error. I have a datframe that looks like this:</p> <pre><code> year RMSE index cyear Corr_to_CY 0 2000 0.279795 5 1997 0.997975 1 2011 0.299011 2 1994 0.997792 2 2003 0.368...
<p>You can use <code>isin</code> method:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd # Sample creation import io comp = pd.read_csv(io.StringIO('year,RMSE,index,cyear,Corr_to_CY\n2000,0.279795,5,1997,0.997975\n2011,0.299011,2,1994,0.997792\n2003,0.368341,1,1993,0.977143\n2013,0.377902,23,20...
Pandas Avoid Multidimensional Key Error Comparing 2 Dataframes
pandas|multidimensional-array|indexing|filter
0
34
1
71,180,802
71,180,802
1
true
2022-02-18T20:14:04.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas Avoid Multidimensional Key Error Comparing 2 Dataframes<p>I am stuck on a multidimensional key value error. I have a datframe that looks like this:</p...
71,406,935
How to scroll page and scrape site?<p>from another thread I was suggested to specify this question on another topic. My issue is related to scraping a website that requires to scroll down the page dynamically and in the meanwhile copy the data in my dataframe.</p> <p>Until now with the code below I can copy only the fi...
<p>My tip is get the data from the api. Far more efficient than using Selenium here:</p> <pre><code>import requests import pandas as pd import datetime url = &quot;https://prod-public-api.livescore.com/v1/api/react/date/soccer/20220309/0.00?MD=1&quot; jsonData = requests.get(url).json() rows = [] for stage in jsonDat...
How to scroll page and scrape site?
python|selenium|web-scraping
0
40
1
71,408,381
71,408,381
1
true
2022-03-09T09:19:32.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scroll page and scrape site?<p>from another thread I was suggested to specify this question on another topic. My issue is related to scraping a websit...
71,286,495
Dart, compare two lists and return element from first list that does not exist in second list<p>I have two lists,</p> <pre><code>List first = [{'name':'ABC','serialNumber':'ABC-124-353'}, {'name':'XYZ','serialNumber':'XYZ-123-567'}, {'name':'GRE', 'serialNumber': 'GRE-290-128'}]; List second = [{'name':'PQR','serialNu...
<p>Another solution would be to use <code>where</code> on your <code>first</code> List to check if the <code>serialNumber</code> is contained in the <code>second</code> list:</p> <pre class="lang-dart prettyprint-override"><code>final secondSerials = second.map((item) =&gt; item['serialNumber']).toSet(); print(first.wh...
Dart, compare two lists and return element from first list that does not exist in second list
dart
0
40
2
71,287,422
71,287,422
1
true
2022-02-27T16:27:15.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dart, compare two lists and return element from first list that does not exist in second list<p>I have two lists,</p> <pre><code>List first = [{'name':'ABC',...
71,300,252
Appending query parameters to specific URI<p>I'm trying to append the query string <code>?sort_by=id&amp;dir=ASC&amp;lim=2&amp;flt=1</code> to any traffic going to <code>/admin/users.php</code>, which should result in:</p> <pre><code>/admin/users.php?sort_by=id&amp;dir=ASC&amp;lim=2&amp;flt=1 </code></pre> <p>I was att...
<p>Since you are trying to rewrite an URI of the PHP file, most likely you have a PHP handler looking somewhat like</p> <pre class="lang-none prettyprint-override"><code>location ~ \.php$ { ... } </code></pre> <p>The <code>~</code> modifier specifies a regex matching location, and locations of that type have a grea...
Appending query parameters to specific URI
php|nginx|nginx-location
0
42
1
71,300,372
71,300,372
1
true
2022-02-28T19:40:33.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Appending query parameters to specific URI<p>I'm trying to append the query string <code>?sort_by=id&amp;dir=ASC&amp;lim=2&amp;flt=1</code> to any traffic go...
71,259,316
Can someone help me in convert this MySql query to sequelize?<p>I am new to sequelize. I am not sure how to convert this MySql query so that I can use it in my node.js file.</p> <p>MySql query:</p> <pre><code>SELECT Rtrim(Ltrim(childstatus)),TIMESTAMPDIFF(d,dob,now(3)) INTO @childstatus, @Ageday FROM childdetails whe...
<p>You can use <code>Sequelize.fn</code> to call these two functions indicating them in <code>attributes</code> option like this:</p> <pre class="lang-js prettyprint-override"><code>const details = await ChildDetials.findAll({ attributes: [ [Sequelize.fn('RTrim', Sequelize.fn('LTrim', Sequelize.col('childstatus')))...
Can someone help me in convert this MySql query to sequelize?
mysql|node.js|sequelize.js
0
28
1
71,269,238
71,269,238
1
true
2022-02-24T23:14:09.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can someone help me in convert this MySql query to sequelize?<p>I am new to sequelize. I am not sure how to convert this MySql query so that I can use it in ...
71,352,177
Getting error while trying to run expect script inside bash<p>Here is my version of script that is first trying to get docker stats container wise but and then moves onto the expect part to start a tester tool to fetch stats by pressing the <strong>x key</strong>. Script is as follows:</p> <pre><code>#!/bin/bash #!/usr...
<p>Looks like a quoting problem. You have quoted the EOF for the here-document, which should prevent substitution on its contents, however that applies after it has been passed to docker. But before it gets to that stage it gets processed by the shell which is running your script, and that will try to substitute the ...
Getting error while trying to run expect script inside bash
bash|expect
0
31
1
71,353,172
71,353,172
1
true
2022-03-04T13:32:06.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting error while trying to run expect script inside bash<p>Here is my version of script that is first trying to get docker stats container wise but and th...
71,196,161
How to Get the last element in Array list of Observable?<p>This function is to filter an observable off all message from my friend list (onlineUserModel) and to get an observable of type string; <strong>lastMessage</strong> of each friend</p> <pre><code>getLastMessage(onlineUserModel : OnlineUserModel): Observable&lt;s...
<p>Assuming they <code>this.allDirectMessages$</code> emits an array of all dms in chronological order, I would think all you would need would be:</p> <pre><code>getLastMessage$({ userName }: OnlineUserModel) { return this.allDirectMessages$.pipe( map&lt;DirectMessage[], DirectMessage&gt;((dms: DirectMessage[]) =...
How to Get the last element in Array list of Observable?
angular|typescript|rxjs|observable|ngrx
0
262
1
71,198,563
71,198,563
1
true
2022-02-20T16:02:52.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Get the last element in Array list of Observable?<p>This function is to filter an observable off all message from my friend list (onlineUserModel) and...
71,328,250
Fill Missing Column With 0 and Generate Date Sequence From MySQL Database Given a Start and End Date | PHP<p>I have gone through the forum and seen some examples but not still quite able to get what I'm actually looking for here. So please if you can, ANSWER directly here without linking to other questions.</p> <p>I wa...
<p>You can fetch the data from the database and build the <code>$data</code> array just as you currently are. Then you just need to iterate the given date range and to create the output you want. If there's a matching value in <code>$data</code>, then use that, otherwise default to a zero value.</p> <pre><code>$start =...
Fill Missing Column With 0 and Generate Date Sequence From MySQL Database Given a Start and End Date | PHP
php|mysql|json
0
39
2
71,328,426
71,328,426
1
true
2022-03-02T19:36:34.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill Missing Column With 0 and Generate Date Sequence From MySQL Database Given a Start and End Date | PHP<p>I have gone through the forum and seen some exam...
71,225,336
How do I display an object from an array based on timer?<p>I'm building a music application and I'd like to display content from a specific object in an array based on a start and duration time. Here is an example of my data.</p> <pre><code>[ { id: 1, content: 'hello how are you', start: 0, duration: 10 }, { id: 2, con...
<blockquote> <p>however it disappears once the currentTime changes.</p> </blockquote> <p>It's because you just change your state with a <code>null</code> (no object found) :) You can basically do something like that:</p> <pre><code>const handleMarker = (podcast) =&gt; { let marker = podcast.markers.find((mark) =&gt...
How do I display an object from an array based on timer?
javascript|arrays|reactjs|react-hooks
0
36
2
71,225,474
71,225,474
1
true
2022-02-22T17:00:39.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I display an object from an array based on timer?<p>I'm building a music application and I'd like to display content from a specific object in an arra...
71,330,556
Calling/Subscribing to a function with parameters, that returns an observable<p>This is somewhat related to a <a href="https://stackoverflow.com/questions/71074467/rxjs-mergeall-scan-coninutes-to-accumulate/71074508#71074508">previous question</a> I asked. The feature$ function in that question returns an observable wi...
<p>The the second stream example is a bit overly complicated, your <code>features$$</code> is a Behavior subject that might continuously updating itself. Your intend is only take in parameter and process through the features array and output the found feature, the first form of the code is more appropriate.</p> <p>As t...
Calling/Subscribing to a function with parameters, that returns an observable
rxjs
0
45
1
71,331,683
71,331,683
1
true
2022-03-02T23:51:31.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calling/Subscribing to a function with parameters, that returns an observable<p>This is somewhat related to a <a href="https://stackoverflow.com/questions/71...
71,302,041
Running maths over an entire database and ranking all users<p>I have a database of <code>bets</code>. Each bet has a 'Win', 'Loss', or 'Pending' state. What I want to do is to have an SQL statement that will get the last, say, 20 bets a user has placed, find out their ROI (Total profit / Total staked * 100).</p> <p>So ...
<p>Assuming the ID of the bets table represents increasing time such that it can be used to identify &quot;last 20&quot;, then</p> <pre><code>WITH b AS ( SELECT id, user, CASE WHEN result = 'Pending' THEN 0 ELSE amount END AS amount, CASE WHEN result = 'Win' THEN amount * odds ELSE 0 END as winning...
Running maths over an entire database and ranking all users
sql
0
30
1
71,302,139
71,302,139
1
true
2022-02-28T23:09:03.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Running maths over an entire database and ranking all users<p>I have a database of <code>bets</code>. Each bet has a 'Win', 'Loss', or 'Pending' state. What ...
71,160,647
Pandas DataFrame Cross-Reference/Selective Join/Overlay?<p>What is the best/fastest way to do a selective lookup/cross-reference/overlay/partial join between two Pandas DataFrames? I'm not sure of the right terminology to use....</p> <p>Given:</p> <ol> <li>A primary table filled with numerical values and some arbitrary...
<p>One easy way is using replace , not sure about the speed</p> <pre><code>out = tb1.set_index('dte').T.replace(tb2.set_index('dte').T).T Out[172]: value1 value2 dte 2022-01 1 2 2022-02 3 102 2022-03 111 4 2022-04 5 6 </code></pre>
Pandas DataFrame Cross-Reference/Selective Join/Overlay?
python|pandas|dataframe|data-science
0
45
1
71,160,851
71,160,851
1
true
2022-02-17T15:11:05.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas DataFrame Cross-Reference/Selective Join/Overlay?<p>What is the best/fastest way to do a selective lookup/cross-reference/overlay/partial join between...
71,312,209
Panda DataFrame: How to Duplicate Rows while changing the value of a column<p>I have the following dataframe which list certain transactions</p> <p>df1</p> <pre><code>ProductId Code Cost 1 101 £1000 1 101 £2000 2 101 £1500 2 101 £1000 </code></pre> <p>However I need to change the dat...
<p>You can do <code>merge</code></p> <pre><code>out = df1.merge(df2,on = 'ProductId').assign(Cost = lambda x : x['Cost']*x['Percent']) Out[509]: ProductId Code Cost Code2 Percent 0 1 101 250.0 201 0.25 1 1 101 750.0 301 0.75 2 1 101 500.0 201 0.25 3 ...
Panda DataFrame: How to Duplicate Rows while changing the value of a column
python|pandas|dataframe
0
31
1
71,312,254
71,312,254
1
true
2022-03-01T17:11:23.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Panda DataFrame: How to Duplicate Rows while changing the value of a column<p>I have the following dataframe which list certain transactions</p> <p>df1</p> <...
71,265,422
Detect/update Python2-style code that is no longer needed<p>I maintain a moderately big open source project (~22000 lines of python code)</p> <p>Because it has been in development for a long time and was originally written for Python 2 there is a lot of unnecessarily complex code. Code that could be simplified (and uni...
<p>Yes - <a href="https://docs.python.org/3/library/2to3.html" rel="nofollow noreferrer">2to3</a> and <a href="https://github.com/asottile/pyupgrade" rel="nofollow noreferrer">pyupgrade</a>.</p> <p>You can top things off with <a href="https://pypi.org/project/flynt/" rel="nofollow noreferrer"><code>flynt</code></a> for...
Detect/update Python2-style code that is no longer needed
python|python-3.x
0
23
2
71,265,467
71,265,467
1
true
2022-02-25T11:49:07.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Detect/update Python2-style code that is no longer needed<p>I maintain a moderately big open source project (~22000 lines of python code)</p> <p>Because it h...
71,422,458
What does macro TIOCGDEV mean?<p>I am reading source code under Linux and reach this function:</p> <pre class="lang-c prettyprint-override"><code>ioctl (fd, TIOCGDEV, &amp;devnum) </code></pre> <p>But I don't find the document about the macro <code>TIOCGDEV</code> from man page, what does this macro mean ?</p>
<p>&quot;/* Get real dev no below /dev/console */&quot;</p> <p>&quot;The TIOCGDEV ioctl is a hack written to allow bootup messages to be display both on the screen and also to be logged&quot;</p> <p>&quot;Without the real device to which /dev/console is connected, blogd can not work.&quot;</p> <p><a href="https://www.m...
What does macro TIOCGDEV mean?
linux|ioctl
0
35
1
71,423,151
71,423,151
1
true
2022-03-10T10:17:58.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does macro TIOCGDEV mean?<p>I am reading source code under Linux and reach this function:</p> <pre class="lang-c prettyprint-override"><code>ioctl (fd, ...
71,361,159
How can I use a downloaded font in a java Project on different PCs?<p>I downloaded the Font &quot;Retro Gaming&quot; (<a href="https://www.dafont.com/retro-gaming.font" rel="nofollow noreferrer">https://www.dafont.com/retro-gaming.font</a>) to use it on my Java project. This project needs to run on every machine I run ...
<p>Save the font file wherever you like...place it with the rest of your game files or place it in a resource folder. It doesn't need to go somewhere special if it's just for your game. You can load the font when you need it by using the following method:</p> <pre><code>/** * Loads a Font file and returns it as a Font...
How can I use a downloaded font in a java Project on different PCs?
java|user-interface|fonts|compatibility
0
31
1
71,361,418
71,361,418
1
true
2022-03-05T09:52:51.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use a downloaded font in a java Project on different PCs?<p>I downloaded the Font &quot;Retro Gaming&quot; (<a href="https://www.dafont.com/retro-g...
71,368,583
How to conditionally change a date based on a time? Time zone differences?<p>I am using two functions to extract both the date &amp; time out of a string:</p> <p><strong>Raw String in DATA!A2:</strong> 2022-03-06T04:52:33.813Z</p> <p><code>=LEFT(DATA!$A$2,FIND(&quot;T&quot;,DATA!$A$2)-1)</code> to reformat a string int...
<h2>A-</h2> <p>Try, without any script</p> <pre><code>=value(left(A1,10))+value(mid(A1,12,12)) </code></pre> <p><a href="https://i.stack.imgur.com/rKWp0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rKWp0.png" alt="enter image description here" /></a></p> <h2>B-</h2> <p>If you want to subtract 6 ho...
How to conditionally change a date based on a time? Time zone differences?
google-sheets|google-sheets-formula
0
41
2
71,381,579
71,381,579
1
true
2022-03-06T07:58:54.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to conditionally change a date based on a time? Time zone differences?<p>I am using two functions to extract both the date &amp; time out of a string:</p...