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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,198,624 | How to call blazor onclick method with static render mode<p>How to call onclick method while rendering component as a static html? I mean, is there any workarounds in JavaScript?</p>
<pre><code>@(await Html.RenderComponentAsync<Awesome>(RenderMode.Static))
</code></pre>
<p>And the Awesome.razor</p>
<pre><code><... | <p>Like <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.rendering.rendermode?view=aspnetcore-6.0#fields" rel="nofollow noreferrer">the docs</a> say:</p>
<blockquote>
<p>Static : Renders the component into static HTML</p>
</blockquote>
<p>That means an <code>@onclick</code> will never work... | How to call blazor onclick method with static render mode | javascript|c#|.net|razor|blazor | 0 | 88 | 1 | 72,198,969 | 72,198,969 | 1 | true | 2022-05-11T09:29:28.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call blazor onclick method with static render mode<p>How to call onclick method while rendering component as a static html? I mean, is there any worka... |
72,182,453 | How to unit test createQueryBuilder<p>I have this method:</p>
<pre><code>public function findAllBy(?string $categoryId): array
{
$qb = $this->entityManager->createQueryBuilder()
->select('p')
->from(Product::class, 'p');
if (null !== $categoryId) {
$q... | <p>As you should <a href="https://8thlight.com/blog/eric-smith/2011/10/27/thats-not-yours.html" rel="nofollow noreferrer">not mock what you don't own</a>, my suggestion is to avoid unit tests in this kind of scenarios.
Moreover I would not use (abuse) a mock (a test double in general) as you're testing the implementati... | How to unit test createQueryBuilder | symfony|phpunit | 0 | 61 | 1 | 72,199,024 | 72,199,024 | 1 | true | 2022-05-10T07:44:29.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to unit test createQueryBuilder<p>I have this method:</p>
<pre><code>public function findAllBy(?string $categoryId): array
{
$qb = $this->... |
72,199,061 | Pass an object to null if some values are empty<p>I have an object :</p>
<pre><code> contact:{
email: ""
firstName: ""
id: 800
lastName: ""
phone: ""
title: "MS"
url: "/api/contacts/800"
}
</code></pre>
<p>I would like to pass the whole ... | <p>I don't know if it is what you are expecting but you can try this :</p>
<pre><code>let contact = {
email: "",
firstName: "",
id: 800,
lastName: "",
phone: "",
title: "MS",
url: "/api/contacts/800"
};
if (
contact.email === "" ||
... | Pass an object to null if some values are empty | javascript | 0 | 31 | 1 | 72,199,181 | 72,199,181 | 1 | true | 2022-05-11T10:00:15.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass an object to null if some values are empty<p>I have an object :</p>
<pre><code> contact:{
email: ""
firstName: ""
id: 800
... |
72,182,137 | Custom hook doesn't work when called on button click<p>I'm having trouble on finding what is wrong with this SQL statement. I'm using <code>pyodbc</code> latest and <code>ODBC Driver 17 for SQL Server</code>, here is the statement:</p>
<pre><code>insert_sql = """MERGE VehicleDistanceReport trg
... | <p>Your <code>WHEN MATCHED</code> clause is wrong, as the <code>WHERE</code> should be a condition. Also no pooint updating <code>Ic_Siparis_No</code> as it's the joining condition anyway</p>
<pre class="lang-sql prettyprint-override"><code>WHEN MATCHED AND trg.NodeGroup LIKE N'%AĞIR%' OR trg.NodeGroup LIKE N'%MAKİNE%'... | Custom hook doesn't work when called on button click | sql-server|pyodbc | 0 | 20 | 1 | 72,199,186 | 72,199,186 | 1 | true | 2022-05-10T07:19:51.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Custom hook doesn't work when called on button click<p>I'm having trouble on finding what is wrong with this SQL statement. I'm using <code>pyodbc</code> lat... |
72,199,192 | Searching for match in pandas dataframe<p>With the following csv file</p>
<pre><code>id,name,cy,in
0,MD,4,16
2,MD,10,20
3,YD,5,14
4,ZD,10,14
</code></pre>
<p>I have written the following code to create a new dataframe.</p>
<pre><code>df = pd.read_csv('test.csv', usecols=['id', 'name', 'cy', 'in'])
df2 = pd.DataFrame(co... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.isin.html" rel="nofollow noreferrer"><code>Series.isin</code></a> for get all <code>id</code> in <a href="http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#boolean-indexing" rel="nofollow noreferrer"><code>boolean... | Searching for match in pandas dataframe | python|pandas | 0 | 39 | 2 | 72,199,263 | 72,199,263 | 1 | true | 2022-05-11T10:09:12.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Searching for match in pandas dataframe<p>With the following csv file</p>
<pre><code>id,name,cy,in
0,MD,4,16
2,MD,10,20
3,YD,5,14
4,ZD,10,14
</code></pre>
<p... |
72,197,713 | How to display custom links in WordPress with wp_nav_menu?<p>I'm creating an one-page custom theme. I'm struggling with a custom menu, because I want to display custom links.</p>
<p>I've registered menu in functions.php file</p>
<pre><code>function register_my_menus() {
register_nav_menus(
array(
'header-me... | <p>You have register header menu with header-menu key and trying to get it by key of top-menu which is not possible. You have to use the header-menu key to add and get a header menu. we have updated the code. you can use this code.</p>
<pre><code><?php
wp_nav_menu( array(
'theme_location' => 'header-menu',
... | How to display custom links in WordPress with wp_nav_menu? | wordpress|navigation|wordpress-theming | 0 | 78 | 1 | 72,199,612 | 72,199,612 | 1 | true | 2022-05-11T08:21:40.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display custom links in WordPress with wp_nav_menu?<p>I'm creating an one-page custom theme. I'm struggling with a custom menu, because I want to disp... |
72,198,815 | Return value from cursor FOR LOOP calculation using DBI<p>I'm trying to understand how to return a calculated value from a SQL query that involves a cursor FOR LOOP using DBI. As an example, I use the <em>mtcars</em> dataset loaded into an Oracle database (v19c). It looks like this:</p>
<pre class="lang-r prettyprint-o... | <p>Like I said in comment this is one way to do it (my example is on scott@hr):</p>
<pre><code>create or replace type sum_type is table of number;
create or replace function your_sum_fun
return sum_type PIPELINED is
v_sum number:=0;
begin
for i in (SELECT salary FROM employees)loop
v_sum:=v_sum+i.salary... | Return value from cursor FOR LOOP calculation using DBI | sql|r|oracle|dbi | 0 | 56 | 1 | 72,199,633 | 72,199,633 | 1 | true | 2022-05-11T09:43:37.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return value from cursor FOR LOOP calculation using DBI<p>I'm trying to understand how to return a calculated value from a SQL query that involves a cursor F... |
72,199,659 | Unhandled Exception: NoSuchMethodError: The method '[]' was called on null. while parsing json<p>i have a json object that includes an object that could be null.
here is my json:</p>
<pre><code>I/flutter (23570): ║ {
I/flutter (23570): ║ elements: [
I/flutter (23570): ║ {
I/flutter (23570): ║ ... | <p>This line you get error because <code>json</code> is <code>null</code></p>
<pre><code>firstName: json['firstName']
</code></pre>
<p>You should change this fromJson function like this :</p>
<pre><code>factory UnitOwner.fromJson(final Map<String, dynamic>? json) => UnitOwner(
firstName: json?['firstNa... | Unhandled Exception: NoSuchMethodError: The method '[]' was called on null. while parsing json | flutter|dart | 0 | 36 | 1 | 72,199,734 | 72,199,734 | 1 | true | 2022-05-11T10:45:16.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unhandled Exception: NoSuchMethodError: The method '[]' was called on null. while parsing json<p>i have a json object that includes an object that could be n... |
72,181,955 | SSMS localdb to Power BI Gateway not connecting<p>I have SSMS installed on my laptop along with a localdb I created:</p>
<p><a href="https://i.stack.imgur.com/SVRvW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SVRvW.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.img... | <p>Try to install and use the normal SQL Server instead of LocalDB. When connecting to LocalDB, the necessary SQL Server infrastructure is automatically created and started, but I'm not sure that the Power BI Gateway supports that.</p> | SSMS localdb to Power BI Gateway not connecting | powerbi|ssms|powerbi-datasource|power-bi-report-server | 0 | 80 | 1 | 72,199,756 | 72,199,756 | 1 | true | 2022-05-10T07:04:03.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SSMS localdb to Power BI Gateway not connecting<p>I have SSMS installed on my laptop along with a localdb I created:</p>
<p><a href="https://i.stack.imgur.co... |
72,199,217 | How to run path setting script in vscode terminal at startup?<p>I have a script which sets path variables. I have to run this script manually every time I start a new terminal instance.</p>
<p>I am looking for an automated way to run this script at startup for every terminal instance.</p>
<p>I have tried the below appr... | <p><code>cmd.exe</code> uses different arguments</p>
<pre><code>{
"terminal.integrated.profiles.windows": {
"Command Prompt": {
"path": "cmd.exe",
"args": [
"/K",
"h:\\all-languages-env.cmd"
]
}
},
&q... | How to run path setting script in vscode terminal at startup? | visual-studio-code|terminal|command-prompt | 0 | 65 | 1 | 72,199,766 | 72,199,766 | 1 | true | 2022-05-11T10:11:03.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to run path setting script in vscode terminal at startup?<p>I have a script which sets path variables. I have to run this script manually every time I st... |
72,199,642 | Calculate a column based on several values in different column<p>My pandas df looks like something like this:</p>
<pre><code>company ID quarter metric
12 31-12-2019 54.3
12 30-09-2019 48.2
12 30-06-2019 32.3
12 30-03-2019 54.3
23 31-12-2018 54.3
23 ... | <p>The function <code>df['annual'] = df[::-1].rolling(4).sum()[1]</code> would be able to solve your problem.</p>
<p>The function creates calculates the sum of the number of columns of each variable in the dataframe from top to bottom, hence the <code>[::-1]</code>.
The function outputs a dataframe so the last column i... | Calculate a column based on several values in different column | python|pandas|dataframe | 0 | 28 | 1 | 72,199,803 | 72,199,803 | 1 | true | 2022-05-11T10:43:55.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate a column based on several values in different column<p>My pandas df looks like something like this:</p>
<pre><code>company ID quarter metric
... |
72,197,420 | std::time() and its dependence on daylight saving<p>I have a requirement to lock a user, if 3 consecutive login attempts are failed within 15 minutes. I am going to check with the following formula, if third login attempt fails.</p>
<pre><code> if (first_login_attemp_time + 900 <= std::time(nullptr))
{
... | <p>The <a href="https://en.cppreference.com/w/cpp/chrono/c/time" rel="nofollow noreferrer"><code>std::time</code></a> returns UTC time that does not follow daylight saving policies of local authorities. So about daylight savings there are no worries.</p>
<p>Like the cited reference article says most systems implement <... | std::time() and its dependence on daylight saving | c++|c++11 | 0 | 71 | 1 | 72,199,804 | 72,199,804 | 1 | true | 2022-05-11T07:59:34.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
std::time() and its dependence on daylight saving<p>I have a requirement to lock a user, if 3 consecutive login attempts are failed within 15 minutes. I am g... |
72,199,817 | How to apply css by parent to child component in angular<p>I have an <code>Angular 13</code> app & a couple of components structure look as below</p>
<ol>
<li><p>logo component</p>
<pre><code><svg enable-background="new 0 0 2014 1674.641" version="1.1"
viewBox="0 0 2014 1674.641" x... | <p>Since component style are encapsulated by default. you should use <a href="https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep" rel="nofollow noreferrer">::ng-deep</a> to disable view-encapsulation for that rule</p>
<pre><code>::ng-deep .appHeader svg {
width: 20rem;
height: 3.5rem;
}
<... | How to apply css by parent to child component in angular | css|angular|angular13 | 0 | 67 | 1 | 72,199,884 | 72,199,884 | 1 | true | 2022-05-11T10:58:27.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply css by parent to child component in angular<p>I have an <code>Angular 13</code> app & a couple of components structure look as below</p>
<ol... |
72,198,391 | how to make Highcharts React redraw without changing data<p>I need highcharts to adapt its width to the parent's width. So if we change the parent's width without changing the data, the chart should resize.
But since the data is the same, it doesn't happen.</p>
<p>It seems to work if we resize the browser's screen, but... | <p>From Highcharts API:</p>
<blockquote>
<p><strong>reflow([e])</strong></p>
<p>Reflows the chart to its container. By default, the chart reflows automatically to its container following a window.resize event, as per
the chart.reflow option. However, there are no reliable events for div
resize, so if the container is r... | how to make Highcharts React redraw without changing data | javascript|reactjs|highcharts | 0 | 480 | 2 | 72,199,959 | 72,199,959 | 1 | true | 2022-05-11T09:13:23.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make Highcharts React redraw without changing data<p>I need highcharts to adapt its width to the parent's width. So if we change the parent's width wi... |
72,197,813 | Object of type <> is not JSON serializable Django REST Framework<p>I am trying to create a search function inside my class-based view using Django Rest Framework, but it does not seems to work.</p>
<p>when I try to search for some customers it gives me an error:</p>
<pre><code>raise TypeError(f'Object of type {o.class.... | <p>As i wrote in comment under your question, you should serialize queryset</p>
<pre><code>class staff_search_partial(generics.ListAPIView):
renderer_classes = [JSONRenderer, TemplateHTMLRenderer]
template_name = 'BankApp/staff_search_partial.html'
serializer_class = CustomerSerializer
permissions_class... | Object of type <> is not JSON serializable Django REST Framework | django|serialization|django-rest-framework|django-class-based-views | 0 | 591 | 3 | 72,200,039 | 72,200,039 | 1 | true | 2022-05-11T08:30:12.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Object of type <> is not JSON serializable Django REST Framework<p>I am trying to create a search function inside my class-based view using Django Rest Frame... |
72,200,040 | How to chain methods inside the ruby group_by arguments<p>I have a list of slot time instances called <code>slots</code>, with a start time column.</p>
<p>I want to group these slots by <code>start_time.to_date</code> but i cant find the syntax to chain these methods together.</p>
<p>The error i am currently getting by... | <p>You will need to define the group_by block</p>
<pre><code>slots.group_by {|slot| slot.start_time.to_date }
</code></pre> | How to chain methods inside the ruby group_by arguments | ruby-on-rails|ruby | 0 | 34 | 1 | 72,200,131 | 72,200,131 | 1 | true | 2022-05-11T11:13:54.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to chain methods inside the ruby group_by arguments<p>I have a list of slot time instances called <code>slots</code>, with a start time column.</p>
<p>I ... |
72,199,785 | Hero images with captions in grid view<p>I have a GridView of Hero image buttons. I would like to add a caption under each, however if I try to put the Hero in a Column like with the 'MenuGrp' class in the code below the image disappears. I f I try to do it all in the MenuButton class there is an error not allowing put... | <p>Wrap with Expanded widget, then you will able to see the image</p>
<pre><code> class MenuGrp extends StatelessWidget {
final String indexStr;
final String labelStr;
const MenuGrp(this.indexStr, this.labelStr, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column... | Hero images with captions in grid view | flutter|flutter-layout | 0 | 126 | 1 | 72,200,164 | 72,200,164 | 1 | true | 2022-05-11T10:56:33.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hero images with captions in grid view<p>I have a GridView of Hero image buttons. I would like to add a caption under each, however if I try to put the Hero ... |
72,198,534 | Running Python Script from Terminal on Raspberry fails but running in IDE is fine<p>I've written a Python Script on my Raspberry Pi and its working really fine when running over Thonny IDE. But when i want to start it from Terminal it has a lot of import errors. Ive already added the environment comment on the start of... | <p>I guess, that your "threading.py" file which is located in the desktop directory. That very likely causes the circular import error since subprocess wrongly imports your own module instead of the python native threading module.</p>
<p>Your problem should be solved, when you rename your threading.py file to... | Running Python Script from Terminal on Raspberry fails but running in IDE is fine | python|terminal|raspberry-pi|script|thonny | 0 | 100 | 1 | 72,200,166 | 72,200,166 | 1 | true | 2022-05-11T09:24:12.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Running Python Script from Terminal on Raspberry fails but running in IDE is fine<p>I've written a Python Script on my Raspberry Pi and its working really fi... |
72,200,163 | update sql to update lowest hierarchical data for each row in a table<p>I have a table as shown below</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">id</th>
<th style="text-align: center;">previous_id</th>
<th style="text-align: right;">latest_id</th>
</tr>
</thea... | <p>You can use a correlated hierarchical query and filter to get the leaf rows:</p>
<pre class="lang-sql prettyprint-override"><code>UPDATE table_name t
SET latest_id = (SELECT id
FROM table_name h
WHERE CONNECT_BY_ISLEAF = 1
START WITH h.id = t.id
... | update sql to update lowest hierarchical data for each row in a table | sql|oracle|performance|sql-update | 0 | 33 | 2 | 72,200,273 | 72,200,273 | 1 | true | 2022-05-11T11:22:12.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
update sql to update lowest hierarchical data for each row in a table<p>I have a table as shown below</p>
<div class="s-table-container">
<table class="s-tab... |
72,198,103 | What the difference between rds.DatabaseInstance and rds.IDatabaseInstance?<p>What I want to do is here</p>
<ul>
<li>Making new RDS Aurora for Production</li>
<li>Using already exist RDS Mysql for Staging</li>
<li>I need to give these secret to ECS</li>
</ul>
<p>My idea is here below,</p>
<p>Making <code>dbCluster</cod... | <blockquote>
<p>How can I solve this?</p>
</blockquote>
<p>Return a read-only reference to the RDS MySQL's secret using the <a href="https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.Secret.html#static-fromwbrsecretwbrpartialwbrarnscope-id-secretpartialarn" rel="nofollow noreferrer">Secret.from... | What the difference between rds.DatabaseInstance and rds.IDatabaseInstance? | amazon-web-services|amazon-rds|aws-cdk | 0 | 121 | 1 | 72,200,334 | 72,200,334 | 1 | true | 2022-05-11T08:51:05.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What the difference between rds.DatabaseInstance and rds.IDatabaseInstance?<p>What I want to do is here</p>
<ul>
<li>Making new RDS Aurora for Production</li... |
72,200,232 | Why can't EF Core 3.1 not able to determine the relationship<p>Earlier I had the following classes with relationship</p>
<pre class="lang-cs prettyprint-override"><code> [Table("User")]
public class User
{
// Base properties
[Key]
public int UserId { get; set; }
publ... | <p>The problem here is that EF does not know which FK (<code>UserId</code> or <code>VerifierId</code>) should be mapped to the <code>UserRoles</code> property of the <code>User</code> class.</p>
<p>You need to define which foreign key should be used</p>
<pre><code>[InverseProperty(nameof(UserRole.User))]
public ICollec... | Why can't EF Core 3.1 not able to determine the relationship | c#|entity-framework-core|ef-core-3.1 | 0 | 27 | 1 | 72,200,386 | 72,200,386 | 1 | true | 2022-05-11T11:27:11.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't EF Core 3.1 not able to determine the relationship<p>Earlier I had the following classes with relationship</p>
<pre class="lang-cs prettyprint-over... |
72,199,702 | Jest : Test method in reactjs component<p>I have functional component FilterBar -</p>
<pre><code>const FilterBar=()=>{
....
....
useEffects..
states...
function apiCallToFilters()
{
...
...
}
...
..
}
</code></pre>
<p>Since entire code cannot be shared , I have shared a structure and a method which I want to... | <p><code>Enzyme</code> - the library that gives programmatic access to a component instance's properties can only give access to properties that are accessible from outside as it cannot violate JavaScript's encapsulation principles.</p>
<p>I cannot see what kind of a component you are using from in your example code, b... | Jest : Test method in reactjs component | javascript|jquery|reactjs|jestjs | 0 | 62 | 1 | 72,200,388 | 72,200,388 | 1 | true | 2022-05-11T10:49:29.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jest : Test method in reactjs component<p>I have functional component FilterBar -</p>
<pre><code>const FilterBar=()=>{
....
....
useEffects..
states...
... |
72,200,558 | Moving div with jQuery under parent's sibling<p>I'd like to move .tiletitle between .date and .department. I tried using e.g. $(".tiletitle").appendTo($(".oneline")) but there are multiple .oneline elements on the page. How do I target the parent's sibling and put it between .date and .department?`<... | <p>You could do it like this:</p>
<pre><code>$('.sub-section .date').after(function() {
return $(this).closest('.sub-section').find('.tiletitle')
})
</code></pre>
<p>This should also ensure that it works inside you have multiple sub-sections</p>
<p><strong>Demo</strong>
<div class="snippet" data-lang="js" data-hide="... | Moving div with jQuery under parent's sibling | jquery | 0 | 28 | 1 | 72,200,617 | 72,200,617 | 1 | true | 2022-05-11T11:51:03.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Moving div with jQuery under parent's sibling<p>I'd like to move .tiletitle between .date and .department. I tried using e.g. $(".tiletitle").appen... |
72,200,295 | Uncaught TypeError: Cannot read properties of undefined (reading 'id')<p>I get undefined because <code>item</code> from <code>cartitems</code> is not undefined, how can I fix it?</p>
<p>1.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pr... | <p>this can fix your issue:</p>
<p>1- you didnt return anything from map</p>
<p>2- it's better to use function type in set state for cartitems</p>
<pre><code>function app() {
const [cartitems, setCartitems] = useState([])
const onAddToCart = (product)=>{
const exist = cartitems.find((item)=> {
r... | Uncaught TypeError: Cannot read properties of undefined (reading 'id') | javascript|reactjs|react-hooks | 0 | 3,776 | 3 | 72,200,640 | 72,200,640 | 1 | true | 2022-05-11T11:31:41.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Uncaught TypeError: Cannot read properties of undefined (reading 'id')<p>I get undefined because <code>item</code> from <code>cartitems</code> is not undefin... |
72,200,612 | get the non nan value from columns<p>I have a dataset that looks something like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>col_1</th>
<th>col_2</th>
<th>col_3</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>nan</td>
<td>nan</td>
</tr>
<tr>
<td>nan</td>
<td>1</td>
<td>nan</td>
</t... | <p>If you have at most one non-NA value per row, you can use:</p>
<pre><code>df.stack().droplevel(1).reindex_like(df)
</code></pre>
<p>output:</p>
<pre><code>0 0.0
1 1.0
2 NaN
3 1.0
dtype: float64
</code></pre> | get the non nan value from columns | python|pandas|dataframe | 0 | 25 | 2 | 72,200,660 | 72,200,660 | 1 | true | 2022-05-11T11:55:11.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get the non nan value from columns<p>I have a dataset that looks something like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr... |
72,200,004 | October CMS, I can't make Subscribe form by Magic forms plug-in<p>I have a October CMS setup and I have a Subscribe form in footer.</p>
<p>Footer is a <code>default.htm</code>' partial into <code>Layouts</code>.</p>
<p>I override <strong>Generic Ajax Form</strong> html with a partial, it's path <code>partials\subscribe... | <p>I guess you should be using <code>{{ __SELF__ }}::onFormSubmit</code> handler instead of <code>{{ __SELF__ }}::onSubscribeSubmit</code>.</p>
<p>from the plugin's perspective, there is no such event handler <code>onSubscribeSubmit</code>.</p>
<p>You can use <code>{{ __SELF__ }}::onFormSubmit</code> handler for <code>... | October CMS, I can't make Subscribe form by Magic forms plug-in | octobercms|octobercms-plugins | 0 | 62 | 1 | 72,200,661 | 72,200,661 | 1 | true | 2022-05-11T11:10:53.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
October CMS, I can't make Subscribe form by Magic forms plug-in<p>I have a October CMS setup and I have a Subscribe form in footer.</p>
<p>Footer is a <code>... |
72,200,539 | Failed to compute cache key: "/films" not found: not found?<p>Failed to compute cache key: "/films" not found: not found ?
My app structure:</p>
<p><a href="https://i.stack.imgur.com/uch3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uch3c.png" alt="enter image description here" /></a></... | <p>The Dockerfile for your app is within the ~/Documents/films local directory. When you build your Docker image from the ~/Documents/films, this folder is the build context that is referred to by relative path <code>.</code> (e.g. <code>./data</code>) so it is not found by its full name (e.g. films)</p>
<p>You should ... | Failed to compute cache key: "/films" not found: not found? | docker|flask | 0 | 182 | 1 | 72,200,728 | 72,200,728 | 1 | true | 2022-05-11T11:49:44.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failed to compute cache key: "/films" not found: not found?<p>Failed to compute cache key: "/films" not found: not found ?
My app structure:</p>
<p... |
72,200,237 | Rego Object matching and comparison<p>I'm trying to match the domain key ("domain":"example.com") from the given input, and return an error if the values are not identical. This is what I've thought of so far, but I can't seem to match the domain key, thus the tests are failing. Any advice would be ... | <p>The <code>x</code> and <code>y</code> values retrieved by the <code>walk</code> function will be strings, so <code>err := x - s</code> isn't going to work. If you want a set of values, you could wrap the <code>walk</code> call in a set comprehension to get a set of all values:</p>
<pre><code>ses_missing_dkim[msg] {
... | Rego Object matching and comparison | open-policy-agent|rego | 0 | 86 | 1 | 72,200,809 | 72,200,809 | 1 | true | 2022-05-11T11:27:45.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rego Object matching and comparison<p>I'm trying to match the domain key ("domain":"example.com") from the given input, and return an err... |
72,196,607 | Does each e.g. wordpress subdomain have a unique IP?<p>Webhosting sites like wordpress or godaddy have several subdomains like <a href="https://hello.wordpress.com/" rel="nofollow noreferrer">https://hello.wordpress.com/</a> . Does each of them have a unique IP-address (v4 or v6)? If not, how does routing work?</p>
<p>... | <p>You have an A record for each subdomain, so you can point it to the same IP address or a different one.</p>
<p>The routing of the sites is just done with the server configuration, I can't speak for GoDaddy or WordPress as I don't know what stack they are using.</p>
<p>I believe a standard Apache server would have th... | Does each e.g. wordpress subdomain have a unique IP? | wordpress|url-routing | 0 | 16 | 1 | 72,200,834 | 72,200,834 | 1 | true | 2022-05-11T06:51:54.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does each e.g. wordpress subdomain have a unique IP?<p>Webhosting sites like wordpress or godaddy have several subdomains like <a href="https://hello.wordpre... |
72,200,768 | php Find the start of week 16 in 2010<p>Ok so I want to get the Monday of week 16 in 2010 (more precisely to week $week of year $year). here is what I have in my test.php file</p>
<pre><code>$week = 16;
$year = 2010;
$dateString = $dateString = 'Start of week ' . $week . ' in ' . $year;
$date = strtotime( $dateString )... | <p>I'd recommend using the builtin <code>\DateTime</code> class.</p>
<p>Inspired by the answer <a href="https://stackoverflow.com/questions/4861384/php-get-start-and-end-date-of-a-week-by-weeknumber">here</a> I tested the following code:</p>
<pre class="lang-php prettyprint-override"><code><?php
function getStartDa... | php Find the start of week 16 in 2010 | php|strtotime | 0 | 22 | 2 | 72,200,875 | 72,200,875 | 1 | true | 2022-05-11T12:04:37.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php Find the start of week 16 in 2010<p>Ok so I want to get the Monday of week 16 in 2010 (more precisely to week $week of year $year). here is what I have i... |
72,200,488 | Pass in a string from txt file into pd.read.csv<p>I have a txt file of strings consisting of 2 rows 1 column in which I want to pass in the first row string into pd.read.csv</p>
<pre><code>import pandas as pd
data = pd.read_csv('datainput.txt', header=None)
data.columns = ["a"]
print(data.iloc[0])
df = pd.r... | <p>Why not just read in the file as is?</p>
<pre><code>from pathlib import Path
xl_path, outT = Path("data.txt").read_text().split("\n")
df = pd.read_excel(xl_path)
</code></pre> | Pass in a string from txt file into pd.read.csv | python|pandas | 0 | 53 | 2 | 72,200,975 | 72,200,975 | 1 | true | 2022-05-11T11:45:36.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass in a string from txt file into pd.read.csv<p>I have a txt file of strings consisting of 2 rows 1 column in which I want to pass in the first row string ... |
72,200,313 | Grid space-between leaving a gap on the right when several rows<p>When I apply grid display and justify-content: space-between to my layout, which contains several rows, the items on the right-hand side have a right margin that's the size of the grid gap space-between gives me.
How to avoid that gap and make the very r... | <p>Is this your desired result? It has no gaps now. Minmax() setted to img width.</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-css lang-css prettyprint-override"><code>.Countries {
display: grid;
grid-templat... | Grid space-between leaving a gap on the right when several rows | css|css-grid | 0 | 228 | 1 | 72,200,982 | 72,200,982 | 1 | true | 2022-05-11T11:32:47.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grid space-between leaving a gap on the right when several rows<p>When I apply grid display and justify-content: space-between to my layout, which contains s... |
72,145,646 | Sharepoint: Lookup against a large list with CAML Query<p>I have a SharePoint List (list_dls) which has all the Email addresses. The list has a single column with Field name "Title". I need to validate that the Item in the "LookupField" is contained in the 'list_dls'. The list has over 5000 emails, ... | <p>First, go to the SharePoint list "list_dls" and create a new index for Title column (maybe is already done)</p>
<p><a href="https://support.microsoft.com/en-us/office/add-an-index-to-a-list-or-library-column-f3f00554-b7dc-44d1-a2ed-d477eac463b0" rel="nofollow noreferrer">https://support.microsoft.com/en-us... | Sharepoint: Lookup against a large list with CAML Query | javascript|sharepoint|caml | 0 | 113 | 1 | 72,201,058 | 72,201,058 | 1 | true | 2022-05-06T17:57:53.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sharepoint: Lookup against a large list with CAML Query<p>I have a SharePoint List (list_dls) which has all the Email addresses. The list has a single column... |
72,194,501 | NLP how to speed up spelling correction on 147k rows filled with short messages<p>Trying to speed up spelling check on large dataset with 147k rows. The following function has been running for an entire afternoon and is still running. Is there a way to speed up the spelling check? The messages has already been case tre... | <p>Additionally to what @Amadan said and is definitely true (autocorrect does the correction in a very ineffective way):</p>
<p>You treat each word in the giant dataset as if all words in it are looked up for the first time, because you call <code>spell()</code> on each word. In reality (at least after a while) almost ... | NLP how to speed up spelling correction on 147k rows filled with short messages | python|nlp|nltk | 0 | 86 | 2 | 72,201,135 | 72,201,135 | 1 | true | 2022-05-11T01:35:01.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NLP how to speed up spelling correction on 147k rows filled with short messages<p>Trying to speed up spelling check on large dataset with 147k rows. The foll... |
72,191,963 | Filling area with different colors when line cross some limit Plotly<p>Trying to create chart that will have two lines on 1.01 and 1.00 that will go across the chart, I want to change color when line go above 1.01 to green and when its between 1.01 and 1.01 to yellow and when below 1.00 to red.</p>
<pre><code>chartData... | <p>One possible way to achieve that is by modifying your line to insert new points where your line intersects the limiting y-values, and then applying masks with <code>np.nan</code>, like this:</p>
<pre><code>import plotly.graph_objects as go
import numpy as np
def modify_coords(x, y, y_lim):
"""If ... | Filling area with different colors when line cross some limit Plotly | python|charts|plotly | 0 | 121 | 1 | 72,201,136 | 72,201,136 | 1 | true | 2022-05-10T19:22:33.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filling area with different colors when line cross some limit Plotly<p>Trying to create chart that will have two lines on 1.01 and 1.00 that will go across t... |
72,190,996 | Creating scrollbars in an HTML PaperJS canvas element for use with paper.view.zoom<ul>
<li>We have a PaperJS canvas that is set to 100% width/height</li>
<li>Users can zoom and pan</li>
<li>Users can add content to the canvas at various places within the canvas regardless of zoom/pan state</li>
<li>We want to add scrol... | <p>You would have to do what you commented on the end of your question.</p>
<ul>
<li>Set initial height of scroll bar to <code>const scrollHeight = view.height</code></li>
<li>Create an update function and attach it to <code>view.onFrame</code></li>
<li>In update function update scroll objects height depending on curre... | Creating scrollbars in an HTML PaperJS canvas element for use with paper.view.zoom | javascript|html5-canvas|scrollbar|zooming|paperjs | 0 | 44 | 1 | 72,201,274 | 72,201,274 | 1 | true | 2022-05-10T17:56:01.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating scrollbars in an HTML PaperJS canvas element for use with paper.view.zoom<ul>
<li>We have a PaperJS canvas that is set to 100% width/height</li>
<li... |
72,201,112 | Map response string to an Object from POST request<p>I am trying to write a function that makes a Post requests and it returns as body data a person object. Normally would be used GET operation for this, but I am constrained to use POST because some technicalities.</p>
<pre><code> // HttpClient client = new HttpClien... | <p>In order to deserialize the content from JSON, you can use the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.json.httpcontentjsonextensions.readfromjsonasync?view=net-6.0#system-net-http-json-httpcontentjsonextensions-readfromjsonasync-1(system-net-http-httpcontent-system-text-json-jsonseriali... | Map response string to an Object from POST request | c#|.net | 0 | 263 | 1 | 72,201,277 | 72,201,277 | 1 | true | 2022-05-11T12:31:13.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map response string to an Object from POST request<p>I am trying to write a function that makes a Post requests and it returns as body data a person object. ... |
72,201,075 | INSERT INTO via SQLAlchemy/MySQL doesn't work when executed with parameters<p>I have a basic flask API with a POST method and others. It's running queries against a MySQL database. This is the relevant part of the code:</p>
<pre><code>from flask import Flask, Response, request
from sqlalchemy.sql import text
from flask... | <p>It looks like your values aren't making it into the <code>%s</code> portions of your string which is causing the problem.</p>
<p><a href="https://docs.sqlalchemy.org/en/14/core/tutorial.html#using-text-fragments-inside-bigger-statements" rel="nofollow noreferrer">From the documentation </a> it seems that maybe you s... | INSERT INTO via SQLAlchemy/MySQL doesn't work when executed with parameters | python|mysql|flask|sqlalchemy | 0 | 177 | 1 | 72,201,330 | 72,201,330 | 1 | true | 2022-05-11T12:28:30.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
INSERT INTO via SQLAlchemy/MySQL doesn't work when executed with parameters<p>I have a basic flask API with a POST method and others. It's running queries ag... |
72,201,319 | Aggregating by average on 2 conditions while accounting for NA<p>I've the following table</p>
<pre><code>Data = structure(list(Countries = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("China", "India", "V... | <p>With <code>dplyr</code>:</p>
<pre><code>Data %>%
group_by(Countries, Year, Food) %>%
summarise(Price = mean(Price, na.rm = TRUE), .groups = 'drop') %>%
filter(!is.na(Price)) %>%
arrange(Food, Countries, desc(Year))
#> # A tibble: 13 × 4
#> Countries Year Food Price
#> <fct>... | Aggregating by average on 2 conditions while accounting for NA | r|dataframe|dplyr|tidyverse|aggregate | 0 | 43 | 4 | 72,201,401 | 72,201,401 | 1 | true | 2022-05-11T12:46:00.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Aggregating by average on 2 conditions while accounting for NA<p>I've the following table</p>
<pre><code>Data = structure(list(Countries = structure(c(1L, 1L... |
72,201,022 | Collapse multiple rows in pandas dataframe and convert data from long to wide afterwards<p>I have a dataframe with repetitive names of people</p>
<p>Input:</p>
<pre><code>{'name': {0: 'John Smith', 1: 'John Smith', 2: 'John Smith', 3: 'John Doo', 4: 'John Doo', 5: 'John Doo'}, 'journal': {0: 'Journal1', 1: 'Journal2', ... | <p>You can use <code>pivot_table</code>:</p>
<pre><code>df_out = df.pivot_table(index='name', columns='journal', dropna=False)
df_out.columns = df_out.columns.map('{0[1]}_{0[0]}'.format)
df_out.reset_index()
</code></pre>
<p>output:</p>
<pre><code> name Journal1_is_editor_in_chief_2019 Journal2_is_editor_in_c... | Collapse multiple rows in pandas dataframe and convert data from long to wide afterwards | python|pandas|collapse | 0 | 131 | 1 | 72,201,407 | 72,201,407 | 1 | true | 2022-05-11T12:24:45.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Collapse multiple rows in pandas dataframe and convert data from long to wide afterwards<p>I have a dataframe with repetitive names of people</p>
<p>Input:</... |
72,201,365 | C89: declare large const array, then use it, then initialize it<p>This is purely for readability. I want to have a very large constant array of values, but it makes my file a lot less pleasant to read. So I'd like to have that array initialized after use, though I want it to be constant. I know this is probably impossi... | <p>First of all what you're doing is not initialization, it's plain assignment. And you can't assign to an array. And you can't have general statements outside of functions. If you want to initialize the array, you need to do it when defining the array.</p>
<p>With that said, you have to remember (or learn) that any de... | C89: declare large const array, then use it, then initialize it | arrays|c|c89|static-initialization | 0 | 97 | 3 | 72,201,486 | 72,201,486 | 1 | true | 2022-05-11T12:48:42.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C89: declare large const array, then use it, then initialize it<p>This is purely for readability. I want to have a very large constant array of values, but i... |
72,197,190 | Oracle Apex Checkbox Group, disable item option<p>It is possible to disable one option of checkbox group? I have created an <em>P100_CREATE_PT</em> item and disable one option using JavaScript:</p>
<pre><code>const nodeList = document.querySelector("#P100_CREATE_PT_0");
if(nodeList) {
nodeList.disabled = 'd... | <p>I can confirm that this doesn't work if the disabled value is the first checkbox. On page submit it does not set the value of the checkbox.</p>
<p>However the value is sent correctly in an on-change dynamic action.
So a workaround is to set a hidden item on change of the checkbox and use that in the page submit.</p> | Oracle Apex Checkbox Group, disable item option | oracle-apex | 0 | 210 | 1 | 72,201,626 | 72,201,626 | 1 | true | 2022-05-11T07:41:13.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle Apex Checkbox Group, disable item option<p>It is possible to disable one option of checkbox group? I have created an <em>P100_CREATE_PT</em> item and ... |
72,197,944 | flask session - TypeError: 'type' object does not support item assignment<p>I'm trying to verify a user using flask session. The problem is that whenever I try to assign a value to my session, I get the error:</p>
<blockquote>
<p>TypeError: 'type' object does not support item assignment</p>
</blockquote>
<p>I have seen... | <p>You are trying to assign the value to Session object.</p>
<p>If you check the example on the <a href="https://github.com/fengsp/flask-session/blob/master/examples/hello.py" rel="nofollow noreferrer">project's repo</a>, you'll see it assigns the value to <a href="https://flask.palletsprojects.com/en/2.1.x/api/#flask.... | flask session - TypeError: 'type' object does not support item assignment | python|authentication|flask|session | 0 | 245 | 1 | 72,201,695 | 72,201,695 | 1 | true | 2022-05-11T08:40:35.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
flask session - TypeError: 'type' object does not support item assignment<p>I'm trying to verify a user using flask session. The problem is that whenever I t... |
72,189,367 | Linking R with AMD BLIS Library (in Ubuntu)<p>I would like to link the AMD BLIS library with R to perform some benchmarking/profiling. It seems that R does not need to be compiled specifically against other BLAS implementations. For example, other BLAS libraries (OpenBLAS, Intel MKL, Atlas) simply need to be installed ... | <p>I ran into the same problem as you last week. From my understanding, R needs to get compiled with BLIS. I did the configuration step like this: <code>./configure --with-blas="-lblis -I{PATH_TO_BLIS}/include -L{PATH_TO_BLIS/lib" --with-lapack="llapack"</code>. I think it is necessary to specifiy <... | Linking R with AMD BLIS Library (in Ubuntu) | r|blas | 0 | 127 | 1 | 72,201,818 | 72,201,818 | 1 | true | 2022-05-10T15:44:51.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Linking R with AMD BLIS Library (in Ubuntu)<p>I would like to link the AMD BLIS library with R to perform some benchmarking/profiling. It seems that R does n... |
72,201,739 | If I launch this insert twice<p>If I launch this insert twice, it adds duplicate products to me.
how do I add if something has changed?</p>
<pre><code>INSERT INTO db1 ("Drink") VALUES
('Cola'),
('Rom'),
('Sprite'),
('Fanta'),
('Vodka');
</code></pre> | <pre><code>INSERT INTO db1 ("Drink")
select
drinks.drink
from
(
VALUES
('Cola'),
('Rom'),
('Sprite'),
('Fanta'),
('Vodka')
)
as drinks(drink)
where not exists (select 1 from db1 where db1.drink=drinks.drink)
</code></pre> | If I launch this insert twice | sql | 0 | 29 | 1 | 72,201,824 | 72,201,824 | 1 | true | 2022-05-11T13:15:30.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If I launch this insert twice<p>If I launch this insert twice, it adds duplicate products to me.
how do I add if something has changed?</p>
<pre><code>INSERT... |
72,200,595 | SQL Error [42883]: ERROR: operator does not exist: text || boolean when calling Redshift Stored Procedure<p>new to Redshift and I'm having an issue with calling a stored proc from redshift. I created a new SP based on an existing one since there's an additional parameter. The parameter is BOOL type so I want to pass in... | <p>You can only concatenate strings together and you are trying to concatenate a string with a Boolean.</p> | SQL Error [42883]: ERROR: operator does not exist: text || boolean when calling Redshift Stored Procedure | sql|amazon-redshift | 0 | 350 | 1 | 72,201,897 | 72,201,897 | 1 | true | 2022-05-11T11:54:04.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Error [42883]: ERROR: operator does not exist: text || boolean when calling Redshift Stored Procedure<p>new to Redshift and I'm having an issue with call... |
72,201,161 | django returns MultiValueDictKeyError at / 'q'<p>django returns <strong>MultiValueDictKeyError at /
'q'</strong> in my dashboard template when I'm trying to add search functionality into my app. I want when a user type something on the search input to return the value that user searched for. but i endup getting an erro... | <p>try this</p>
<pre><code>query = request.GET['q']
query = request.GET.get('q', '') # use get to access the q
</code></pre>
<blockquote>
<p>The get() method returns the value of the item with the specified key.</p>
</blockquote> | django returns MultiValueDictKeyError at / 'q' | django|django-views|django-templates | 0 | 37 | 1 | 72,201,998 | 72,201,998 | 1 | true | 2022-05-11T12:34:48.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django returns MultiValueDictKeyError at / 'q'<p>django returns <strong>MultiValueDictKeyError at /
'q'</strong> in my dashboard template when I'm trying to ... |
72,201,932 | Trying to write a Cypress UI test that uses a passed string<p>I'm attempting to write a Cypress test that uses a string passed through by a different function.
The other function simply calls the cypress function and passes a string.
This seems to be possible from what I've seen in documentation but I can't figure out ... | <p>I see you are using single quote instead of backtick for string interpolation. If it's not a typo you need to correct that</p>
<pre><code>When('I click the button ""', function (string) {
// Clicks a button that test defines by title
cy.get(`button[title=${string}]`).click
});
</code></pre> | Trying to write a Cypress UI test that uses a passed string | javascript|cypress|ui-automation | 0 | 29 | 1 | 72,202,025 | 72,202,025 | 1 | true | 2022-05-11T13:28:22.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to write a Cypress UI test that uses a passed string<p>I'm attempting to write a Cypress test that uses a string passed through by a different functio... |
72,201,905 | How to move a variable outside build?<p>How do I move a variable that uses a context outside of the build method so that it is created once?</p>
<pre><code>class _EventListState extends State<EventList> {
@override
Widget build(BuildContext context) {
final eventNotifier = EventInherited.of(context).event... | <p>You can use the <code>late</code> modifier.</p>
<pre><code>class _EventListState extends State<EventList> {
late final eventNotifier = EventInherited.of(context).eventNotifier;
@override
Widget build(BuildContext context) {
...
</code></pre> | How to move a variable outside build? | flutter|dart | 0 | 36 | 3 | 72,202,044 | 72,202,044 | 1 | true | 2022-05-11T13:26:16.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to move a variable outside build?<p>How do I move a variable that uses a context outside of the build method so that it is created once?</p>
<pre><code>c... |
72,201,302 | How to change font color in Flutter?<p>I want make it so when the menu is selected outside the white borders the font color of the letter changes to black instead of white, I tried to change it but I couldn't, if someone takes a look at the code would know where to put the adjustment?</p>
<pre><code>ListView.builder(
... | <p>Try below code, remove <code>const</code> keyword for <code>TextStyle</code></p>
<pre><code>title: Text(
_item['titulo'],
style: TextStyle(color: (controller.selectedIndex == index ) ? Colors.black : Colors.white),
),
</code></pre> | How to change font color in Flutter? | flutter | 0 | 53 | 1 | 72,202,060 | 72,202,060 | 1 | true | 2022-05-11T12:44:17.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change font color in Flutter?<p>I want make it so when the menu is selected outside the white borders the font color of the letter changes to black in... |
72,199,815 | How to find the best matching dates on two dataframes in r?<p>I have two dataframes <code>insitu</code> and <code>model</code>:</p>
<pre><code>dput(head(insitu,20))
structure(list(ID = c("AUR", "AUR", "AUR", "AUR", "AUR", "AUR",
"LAM", "LAM&quo... | <pre><code>library(data.table)
setDT(insitu)
setDT(model)
insitu[, key := D_SOS]
model[, key := EVI_SOS]
setkey(insitu, ID, key)
setkey(model, ID, key)
model[insitu, roll = "nearest"][, .(ID, D_SOS, EVI_SOS, D_EOS, EVI_EOS)]
# ID D_SOS EVI_SOS D_EOS EVI_EOS
# 1: AUR 2016-05-08 2016-... | How to find the best matching dates on two dataframes in r? | r|dataframe|date|matching | 0 | 71 | 1 | 72,202,083 | 72,202,083 | 1 | true | 2022-05-11T10:58:25.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find the best matching dates on two dataframes in r?<p>I have two dataframes <code>insitu</code> and <code>model</code>:</p>
<pre><code>dput(head(insi... |
72,202,009 | Module won't get initialized<p>I'm running a project in pycharm having the following structure:</p>
<pre><code>main_folder/
venv
main.py
second_folder/
module1.py
third_folder/
__init__.py
module2.py
module3.py
</code></pre>
<p>I'm trying to import modules... | <p>You need a dot to indicate here package::</p>
<pre><code>#in third_folder/__init__.py
from .module2 import *
from .module3 import *
</code></pre>
<p>again::</p>
<pre><code>#in second_folder/module1.py
from .third_folder import *
</code></pre>
<p>Pycharm is a bit weird when dealing with PYTHONPATH, you will need to d... | Module won't get initialized | python|python-3.x | 0 | 35 | 1 | 72,202,114 | 72,202,114 | 1 | true | 2022-05-11T13:32:58.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Module won't get initialized<p>I'm running a project in pycharm having the following structure:</p>
<pre><code>main_folder/
venv
main.py
second_f... |
72,201,974 | Unknown option when running mix release<p>I've just upgraded Elixir from 1.7.4 to 1.10.4 on my build server and I'm getting this error:</p>
<pre><code>** (Mix) Could not invoke task "release": 2 errors found!
--env : Unknown option
--no-tar : Unknown option
</code></pre>
<p>The command remained the same as be... | <ol>
<li>These flags are not needed for release. <code>env</code> is already specified by <code>MIX_ENV=prod</code>, <code>tar</code> won’t be built.</li>
<li>Before issuing <a href="https://hexdocs.pm/mix/1.10.4/Mix.Tasks.Release.html" rel="nofollow noreferrer"><code>mix release</code></a> one must prepare the source ... | Unknown option when running mix release | elixir|phoenix | 0 | 88 | 1 | 72,202,141 | 72,202,141 | 1 | true | 2022-05-11T13:30:46.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unknown option when running mix release<p>I've just upgraded Elixir from 1.7.4 to 1.10.4 on my build server and I'm getting this error:</p>
<pre><code>** (Mi... |
72,201,758 | Update collection view after computing view models in background<p>I receive data items from my API, on a specific serial queue, that I use to calculate the view models to display in a collection view. The simplified code is:</p>
<pre><code>var viewModels: [ViewModel] = [] // read and written on main queue
var _view... | <p>Crashes not necessarily, but this can lead to inconsistency. As <code>_viewModels</code> is declared outside the scope of <code>didReceive</code>, it is a shared resource that can be modified each time you enter <code>didReceive</code>. After dispatching this to the main thread, some other thread can enter in <code>... | Update collection view after computing view models in background | ios|swift|thread-safety | 0 | 20 | 1 | 72,202,173 | 72,202,173 | 1 | true | 2022-05-11T13:16:07.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update collection view after computing view models in background<p>I receive data items from my API, on a specific serial queue, that I use to calculate the ... |
72,201,323 | Matplotlib / Mplfinance - how to change line width<p>maybe someone knows what I need add here to change line width?</p>
<pre><code>mpf.plot(df4, type='candle', style='yahoo', volume=True, hlines=[12,4], )
</code></pre> | <p>Vertical and horizontal lines can be set in dictionary format. Line widths are specified in tuple format.</p>
<pre><code>mpf.plot(df,
type='candle',
style='yahoo',
volume=True,
hlines=dict(hlines=[12,4], linewidths=(2,3.5)))
</code></pre>
<p><a href="https://i.stack.imgur.com/GC... | Matplotlib / Mplfinance - how to change line width | matplotlib|mplfinance|linewidth | 0 | 206 | 1 | 72,202,239 | 72,202,239 | 1 | true | 2022-05-11T12:46:21.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Matplotlib / Mplfinance - how to change line width<p>maybe someone knows what I need add here to change line width?</p>
<pre><code>mpf.plot(df4, type='candle... |
72,201,456 | How to get a post{} section executed in a nested stage{} block in Jenkins?<p>How do I get the following <code>post</code> section to run?
The idea is to generate parallel running stages as per the contents of <code>myList</code>.</p>
<pre><code>stage("Dynamic stages"){
steps{
stageMap = [:]
script {... | <p><code>post{}</code> is only available in declarative pipeline, but not within a scripted section of a declarative pipeline. You can use <code>try{} catch{}</code> instead.</p>
<p>There is another error: You are using loop variable <code>element</code> within a closure, which doesn't work as expected. The closure cap... | How to get a post{} section executed in a nested stage{} block in Jenkins? | jenkins|groovy|jenkins-pipeline|jenkins-groovy|jenkins-declarative-pipeline | 0 | 117 | 1 | 72,202,281 | 72,202,281 | 1 | true | 2022-05-11T12:55:57.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get a post{} section executed in a nested stage{} block in Jenkins?<p>How do I get the following <code>post</code> section to run?
The idea is to gene... |
72,202,133 | Can I use AUTO_INCREMENT in my laravel project?<p>I have an Eloquent model that has a column that is a number composed of various codes and at the end a number that should increment automatically. This last number is the same number I use to define the primary key of my model, so my question is:</p>
<p>Is there a way t... | <p>you can create a function that returns the next id (autoincrement) of your table and the insert the entry in your table;</p>
<pre><code>$code1 = $this->getCode1();
$code2 = $this->getCode2();
$autoIncr = $this->getNextAutoincrement();
$final_code = $code1 . $code2 . $autoIncr;
//Insert in your table
$r... | Can I use AUTO_INCREMENT in my laravel project? | mysql|laravel|eloquent|laravel-8 | 0 | 42 | 1 | 72,202,301 | 72,202,301 | 1 | true | 2022-05-11T13:40:52.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I use AUTO_INCREMENT in my laravel project?<p>I have an Eloquent model that has a column that is a number composed of various codes and at the end a numb... |
72,197,852 | When handle all promises and other stuff, Get request not returning data, still sending<p>I am trying to query some data in my data. But when I send get request to my server, It's not returning anything. But when I console log my data is printed on the console. I handle all promises and other stuff. But the results are... | <p>When you add <code>@Res()</code> to the route handler, you are telling Nest that you want to use the <a href="https://docs.nestjs.com/controllers#library-specific-approach" rel="nofollow noreferrer">library-specific approach</a> and you'll handle sending the response on your own. If you don't need any underlying eng... | When handle all promises and other stuff, Get request not returning data, still sending | node.js|asynchronous|promise|nestjs | 0 | 23 | 1 | 72,202,349 | 72,202,349 | 1 | true | 2022-05-11T08:32:50.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When handle all promises and other stuff, Get request not returning data, still sending<p>I am trying to query some data in my data. But when I send get requ... |
72,197,677 | FSCalendar How To Understand If User Scrolled the Calendar Page<p>I hid the fscalendar header (previous, current and next date texts) and added two buttons (next and previous month) and label which shows month name of current fscalendar page. I'm trying to change month name label's text when user scrolled the page. I h... | <pre><code>calendarCurrentPageDidChange(yourfsCalender)
</code></pre>
<p><strong>To get Month Name</strong></p>
<pre><code>func calendarCurrentPageDidChange(_ calendar: FSCalendar) {
let currentPageDate = calendar.currentPage
let month = Calendar.current.component(.month, from: currentPageDate)
let monthNam... | FSCalendar How To Understand If User Scrolled the Calendar Page | ios|swift|fscalendar | 0 | 217 | 1 | 72,202,386 | 72,202,386 | 1 | true | 2022-05-11T08:19:31.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FSCalendar How To Understand If User Scrolled the Calendar Page<p>I hid the fscalendar header (previous, current and next date texts) and added two buttons (... |
72,201,710 | PostgreSQL: Efficiently aggregate a list query result into JSON object<p>I need to return a result from a query in which I match one row from a table, then aggregate in JSON from up to 500,000 text values that reference that row.</p>
<ul>
<li>The JSON must be a map where the names are data points. It needs to be a key:... | <p>Join to the aggregated result:</p>
<pre><code>SELECT
table_a.id,
table_a.name,
table_a.description,
table_a.created,
table_a.createdby,
table_a.modified,
table_a.modifiedby,
b.items
FROM table_a
LEFT JOIN (
select table_a_id, jsonb_agg(table_b.item) as items
FROM table_b
... | PostgreSQL: Efficiently aggregate a list query result into JSON object | json|postgresql|postgresql-14 | 0 | 134 | 1 | 72,202,404 | 72,202,404 | 1 | true | 2022-05-11T13:13:20.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL: Efficiently aggregate a list query result into JSON object<p>I need to return a result from a query in which I match one row from a table, then a... |
72,197,870 | hive convert array<map<string, string>> to string<p>I have a column in hive table which type is <code>array<map<string, string>></code>, I am struggling how to convert this column into <code>string</code> using hql?</p>
<p>I found post here <a href="https://stackoverflow.com/questions/64788778/convert-mapst... | <p>Building off of the original answer you linked to, you can first explode the array into the individual maps using <code>posexplode</code> to maintain a positition column. Then you can use the method from the original post, but additionally group by the position column to convert each map to a string. Then you collec... | hive convert array<map<string, string>> to string | sql|hive|hiveql|analytics | 0 | 408 | 1 | 72,202,478 | 72,202,478 | 1 | true | 2022-05-11T08:34:28.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
hive convert array<map<string, string>> to string<p>I have a column in hive table which type is <code>array<map<string, string>></code>, I am str... |
72,202,128 | How to pull a docker image after tag<p>Is it possible to <code>docker pull</code> from a private repository if you tag a new name and delete the original one?</p>
<p>For example,</p>
<pre><code>docker pull harbor.mycompany.com/something/batman:1.0 # pull from remote repo
docker tag harbor.mycompany.com/somet... | <p><code>docker pull</code> <em>always</em> needs a registry-qualified name. If you don't provide one, it defaults to <code>docker.io/library/...</code> as a prefix. Tagging a local image with another name doesn't keep any memory of where the original image might have come from.</p>
<p>I'd recommend always using the ... | How to pull a docker image after tag | docker | 0 | 161 | 1 | 72,202,527 | 72,202,527 | 1 | true | 2022-05-11T13:40:34.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pull a docker image after tag<p>Is it possible to <code>docker pull</code> from a private repository if you tag a new name and delete the original one... |
72,201,823 | Syntax error in conditional expression and near `then' in Ubuntu terminal<p>I'm just learning terminal commands, I'm trying to create my own command, but I have the following problem</p>
<pre><code> ./myFile: line 10: syntax error in conditional expression
./myFile: line 11: syntax error near `then'
./myFile: line 11... | <p>Firstly, the expression <code>[[ $NAME1 ]]</code> is not valid, or at least, does not do what you think it does. I believe you are trying to determine if the user actually typed in a string. To do this, you should either test for a non-empty string (<code>[[ -n ${NAME1} ]]</code>) or test for a string length greater... | Syntax error in conditional expression and near `then' in Ubuntu terminal | bash | 0 | 79 | 1 | 72,202,562 | 72,202,562 | 1 | true | 2022-05-11T13:21:15.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Syntax error in conditional expression and near `then' in Ubuntu terminal<p>I'm just learning terminal commands, I'm trying to create my own command, but I h... |
72,201,785 | how maven version working, can't update ojdbc8 version<p>Example code:<br />
<a href="https://github.com/yszzu1/mvn-version-test" rel="nofollow noreferrer">https://github.com/yszzu1/mvn-version-test</a></p>
<h1>Question:</h1>
<h2>1. why the admin-module always <strong>using ojdbc8 19.3.0.0</strong> ?</h2>
<pre class="l... | <p>That is how dependency management works in maven.</p>
<ol>
<li>you have defined direct ojdbc8 dependency for db-module and it does work as expected</li>
<li>for admin-module the situation is "bit different":</li>
</ol>
<ul>
<li>it depends directly on db-module, and ojdbc8 is now a transitive dependency</li... | how maven version working, can't update ojdbc8 version | maven|ojdbc | 0 | 217 | 1 | 72,202,640 | 72,202,640 | 1 | true | 2022-05-11T13:18:01.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how maven version working, can't update ojdbc8 version<p>Example code:<br />
<a href="https://github.com/yszzu1/mvn-version-test" rel="nofollow noreferrer">h... |
72,201,933 | Merging 2 scripts<p>I've been tasked with compiling a list of all our security groups and grabbing specific information about these groups but I cannot for the life of me figure out how to get all the information onto one Csv.</p>
<p>This does a great job at getting all the bulk items I need from these groups.</p>
<pre... | <p>For this you'll want to use a <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_calculated_properties?view=powershell-7.2" rel="nofollow noreferrer">calculated property</a> expression when calling <code>Select-Object</code>:</p>
<pre><code>Get-ADGroup -Filter * |
Whe... | Merging 2 scripts | powershell|scripting|active-directory | 0 | 36 | 1 | 72,202,657 | 72,202,657 | 1 | true | 2022-05-11T13:28:22.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merging 2 scripts<p>I've been tasked with compiling a list of all our security groups and grabbing specific information about these groups but I cannot for t... |
72,202,579 | Update value of key in Object in nested array of objects in MongoDB<p>I am trying to update data of "array1.array2._id": ObjectId("627a6fab60dc3c523b396af1") and Set Name to John But it's updating in all array2's first element's name to John.</p>
<pre><code>db.getCollection('tests')
.updateOne({ &qu... | <p>Based on <a href="https://stackoverflow.com/questions/72128886/how-to-update-the-value-to-the-nested-object-array-in-mongodb-document/72131000#72131000">this great answer</a> by @R2D2, you can do:</p>
<pre><code>db.collection.update({
"array1.array2._id": ObjectId("627a6fab60dc3c523b396af1")
},... | Update value of key in Object in nested array of objects in MongoDB | arrays|mongodb|mongoose|mongodb-query|nested-loops | 0 | 177 | 1 | 72,202,796 | 72,202,796 | 1 | true | 2022-05-11T14:10:47.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update value of key in Object in nested array of objects in MongoDB<p>I am trying to update data of "array1.array2._id": ObjectId("627a6fab60d... |
72,202,881 | Reconstruct columns by alternatively putting the values in column -> pandas<p>I have the following dataframe:</p>
<pre><code>df1=[[1,1,2,2],[3,3,4,4]]
df1 = pd.DataFrame(df1)
0 1 2 3
0 1 1 2 2
1 3 3 4 4
</code></pre>
<p>I want to reconstruct this dataframe so it looks like the following:</p>
<pre><code>... | <p>You can <code>reshape</code> it</p>
<pre><code>out = pd.DataFrame(df1.to_numpy().reshape((-1,2)))
Out[545]:
0 1
0 1 1
1 2 2
2 3 3
3 4 4
</code></pre> | Reconstruct columns by alternatively putting the values in column -> pandas | pandas|numpy | 0 | 17 | 1 | 72,202,960 | 72,202,960 | 1 | true | 2022-05-11T14:31:18.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reconstruct columns by alternatively putting the values in column -> pandas<p>I have the following dataframe:</p>
<pre><code>df1=[[1,1,2,2],[3,3,4,4]]
df1 =... |
72,202,809 | Access JSON column<p>How can I access values in the <code>status</code> and <code>date</code> columns stored as JSON?
Please, have a look at an example row below.</p>
<p><code>{"1":{"status":true,"date":"2022-03-30"},"3":{"status":true,"date":"2... | <p>Demo:</p>
<pre><code>set @j = '{"1":{"status":true,"date":"2022-03-30"},"3":{"status":true,"date":"2022-03-30"}}';
select json_extract(@j, '$."1".status') as status;
+--------+
| status |
+--------+
| true |
+--------+
</cod... | Access JSON column | mysql|mysql-json | 0 | 31 | 1 | 72,203,081 | 72,203,081 | 1 | true | 2022-05-11T14:26:14.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Access JSON column<p>How can I access values in the <code>status</code> and <code>date</code> columns stored as JSON?
Please, have a look at an example row b... |
72,201,193 | Save only unique elements from Flux<><p>I'm pretty new with reactive programming and I have difficulty with understanding how to implement such simple logic as:</p>
<ul>
<li>check if element is existed in database table</li>
<li>add element if it's missing</li>
</ul>
<p>So, in my code I have a Flux<> with address... | <p>You can do something like that.
if address is found in fb you do Mono.emtpy this will not continue the stream if not found you emit the element so the stream continue and than you save in db</p>
<pre><code> public void run(String... args) throws Exception {
Flux.just("address1","address2","... | Save only unique elements from Flux<> | java|spring|spring-webflux|spring-data-r2dbc | 0 | 61 | 1 | 72,203,148 | 72,203,148 | 1 | true | 2022-05-11T12:37:23.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Save only unique elements from Flux<><p>I'm pretty new with reactive programming and I have difficulty with understanding how to implement such simple logic ... |
72,202,713 | Access elements of dataframe from uploaded CSV file in R Shiny for SliderInput arguments<p>I would like to upload a CSV file to a Shiny app and have the values that are in the CSV file to be updated for the <code>value</code>, <code>min</code>, and <code>max</code>, on input sliders in the UI. This seems like a simple... | <p>Try this,</p>
<pre><code>library(shiny)
ui <- fluidPage(
fileInput("filename", "Choose CSV File", accept = ".csv"),
tableOutput("contents"),
sliderInput(inputId = 'num_1', label = "a", value = 1.5, min = 0, max = 5),
sliderInput(inputId = 'num_2', label =... | Access elements of dataframe from uploaded CSV file in R Shiny for SliderInput arguments | r|shiny | 0 | 28 | 2 | 72,203,175 | 72,203,175 | 1 | true | 2022-05-11T14:19:22.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Access elements of dataframe from uploaded CSV file in R Shiny for SliderInput arguments<p>I would like to upload a CSV file to a Shiny app and have the valu... |
72,202,467 | Need advice on repeating a table primary key on multiple linked tables as foreign key<p>I'm looking for a second opinion from maybe someone with more experience with SQL.</p>
<p>So I have a database that looks like this :</p>
<blockquote>
<p>Company has multiple Clients which has multiple Projects which has multiple Ta... | <p>If I understand correctly, what you are buildng is a <em>multitenant</em> system, where your companies are the tenants. If that is the case then there are no red flags - on the contrary, your main concern is to isolate data belonging to different companies in the most efficient and most secure way.</p>
<p>I find <a ... | Need advice on repeating a table primary key on multiple linked tables as foreign key | sql|postgresql|relational-database | 0 | 32 | 1 | 72,203,194 | 72,203,194 | 1 | true | 2022-05-11T14:03:09.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need advice on repeating a table primary key on multiple linked tables as foreign key<p>I'm looking for a second opinion from maybe someone with more experie... |
72,202,919 | How to conditionally render headerLeft using React Native navigation?<p>I have a component that returns a <code><Stack.Navigator></code> that contains a couple of screens. I also have a custom <code>headerLeft</code> element that executes a function on click. Now I am trying to hide the headerLeft if I am on the ... | <p>You will need to override the group/navigator options in stack screens.</p>
<pre><code><Stack.Screen
name="EnterEmail"
options={{
headerTitle: () => headerTitle,
headerLeft: {} // hide the header
}}
component={EnterEmail}
/>
</code></pre>
<p>I've create a <a href="https://snack.ex... | How to conditionally render headerLeft using React Native navigation? | react-native|react-navigation | 0 | 117 | 2 | 72,203,258 | 72,203,258 | 1 | true | 2022-05-11T14:34:03.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to conditionally render headerLeft using React Native navigation?<p>I have a component that returns a <code><Stack.Navigator></code> that contains ... |
72,203,321 | How to use a specific commit in flutter app?<p>I forked a package from GitHub and had several commits on it. I want to use a specific commit in a project. How to use a specific commit in my project.</p> | <p>See <a href="https://dart.dev/tools/pub/dependencies#git-packages" rel="nofollow noreferrer">Package dependencies > Dependency sources > Git packages</a> in the Dart docs:</p>
<blockquote>
<pre><code>dependencies:
kittens:
git:
url: git@github.com:munificent/kittens.git
ref: some-branch
</cod... | How to use a specific commit in flutter app? | git|flutter | 0 | 182 | 2 | 72,203,404 | 72,203,404 | 1 | true | 2022-05-11T15:01:04.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use a specific commit in flutter app?<p>I forked a package from GitHub and had several commits on it. I want to use a specific commit in a project. H... |
72,203,480 | Javascript parsing a string that might or might not be valid JSON inside? (extracting an array from a string)<p>I have a property of an object which is always a string. The string however might just be regular characters or it might contain a stringified array of values.</p>
<p>If its a regular string of characters the... | <p>Using a <code>try</code>/<code>catch</code> in this situation is just fine. I wouldn't assign an initial value to the <code>extractedVal</code> variable, though, since you're reassigning it in both branches, just remove that <code>= ''</code> initializer.</p>
<p>You <em>could</em> change it slightly:</p>
<pre><code>... | Javascript parsing a string that might or might not be valid JSON inside? (extracting an array from a string) | javascript|json | 0 | 22 | 1 | 72,203,523 | 72,203,523 | 1 | true | 2022-05-11T15:11:09.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript parsing a string that might or might not be valid JSON inside? (extracting an array from a string)<p>I have a property of an object which is alway... |
72,181,468 | When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder<p>I have a very strange issue with Eslint and Angular. Every time I run <em><strong>ng lint</strong></em> I get errors such as:</p>
<blockquote>
<p>An unhandled exception occurred: Cannot read conf... | <p>Found the complete solution based on Idan Rokach's answer. I ended up adding <code>"lint": "eslint --ext .js,.ts src"</code> to <code>package.json</code> to only perform linting on the <code>src</code> folder. Still not sure what the underlying root cause was, but at least this works.</p> | When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder | angular|typescript|visual-studio-code|eslint|eslintrc | 0 | 1,101 | 2 | 72,203,540 | 72,203,540 | 1 | true | 2022-05-10T06:13:34.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder<p>I have a very strange issue with... |
72,202,953 | Is there a way to shift over cells to the left in excel using VBA?<p>Is there a way to count the values in each column under the year and down to the last name, and if the count is 0, then shift the column on the right over into its place? For example, column 2020 has no values. Can I take 2021 and any succeeding colum... | <h2>Remove Blank Data (Entire) Columns</h2>
<pre class="lang-vb prettyprint-override"><code>Sub RemoveBlankDataColumns()
Dim ws As Worksheet: Set ws = ActiveSheet ' improve!
Dim rg As Range: Set rg = ws.Range("A1").CurrentRegion
Dim rCount As Long: rCount = rg.Rows.Count - 1
Dim drg As R... | Is there a way to shift over cells to the left in excel using VBA? | excel|vba | 0 | 30 | 1 | 72,203,554 | 72,203,554 | 1 | true | 2022-05-11T14:36:00.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to shift over cells to the left in excel using VBA?<p>Is there a way to count the values in each column under the year and down to the last na... |
72,198,625 | With AWS SQS, why do subsequent calls to ReceiveMessageAsync not return any messages?<p>Firstly, I know that when using SQS to process messages, I should be deleting messages after processing them. However, I would assume that if I have multiple threads, each thread should be able to receive messages, process them, an... | <p>If multiple messages in your FIFO queue have the same Message Group ID, then in order to ensure FIFO ordering of the messages, once you retrieve some of those messages with that group ID the rest of the messages will not be visible until you delete the ones you have retrieved from the queue.</p> | With AWS SQS, why do subsequent calls to ReceiveMessageAsync not return any messages? | c#|amazon-web-services|amazon-sqs | 0 | 160 | 1 | 72,203,604 | 72,203,604 | 1 | true | 2022-05-11T09:29:34.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
With AWS SQS, why do subsequent calls to ReceiveMessageAsync not return any messages?<p>Firstly, I know that when using SQS to process messages, I should be ... |
72,201,783 | Graph - Algorithm to position nodes<p>I am trying to create a dynamic graph where users can add new nodes using <a href="https://www.eclipse.org/elk/" rel="nofollow noreferrer">ELK.js</a></p>
<p>The graph is a tree that has one root node. I am trying to set the position of nodes in a row using <strong>(x,y)</strong> po... | <p>You could approach this as follows:</p>
<p>When a new node is the first one on its level, give it 0 as its x-value.</p>
<p>When it is not the first, find out what its immediate two siblings are on that level (one at the left, one at the right of the node). In some cases you'll need to traverse from the node via one ... | Graph - Algorithm to position nodes | graph|tree | 0 | 39 | 1 | 72,203,652 | 72,203,652 | 1 | true | 2022-05-11T13:17:47.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Graph - Algorithm to position nodes<p>I am trying to create a dynamic graph where users can add new nodes using <a href="https://www.eclipse.org/elk/" rel="n... |
72,202,059 | Should you render components / select elements in each `test()/it()` block or globally?<p>In <code>react-testing-library</code> you have to render your react component before executing some tests on its elements.</p>
<ol>
<li><p>For several tests on the same component, should you avoid
rendering the component multiple ... | <p>Each test should be as atomic as possible, meaning that it should not be using anything that other tests are also using and should run with a fresh state. So relating that to your examples, the first one would be the correct pattern.</p>
<p>When you have a test suite that contains sharable state between unit tests ... | Should you render components / select elements in each `test()/it()` block or globally? | reactjs|jestjs|react-testing-library | 0 | 94 | 1 | 72,203,728 | 72,203,728 | 1 | true | 2022-05-11T13:36:17.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should you render components / select elements in each `test()/it()` block or globally?<p>In <code>react-testing-library</code> you have to render your react... |
72,203,193 | How to split a string from the for loop to get the beginning and the rest of it?<p>I have this file:</p>
<pre><code>v1 test
v2 test test test
v3 test test
v4 test test test test test test
v5 test
</code></pre>
<p>How to split the first word from the rest in a for loop? I need this result:</p>
<pre><code>B: v1
E: test
... | <p>You were very close, but you need to specify a second token in order to use it. Thankfully, using <code>tokens=1,*</code> does exactly what you want, setting <code>%%s</code> to the first token and <code>%%t</code> to the rest of the line.</p>
<pre><code>for /f "tokens=1,*" %%s in ('type file.txt') do (
... | How to split a string from the for loop to get the beginning and the rest of it? | windows|batch-file|cmd | 0 | 27 | 1 | 72,203,785 | 72,203,785 | 1 | true | 2022-05-11T14:54:02.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to split a string from the for loop to get the beginning and the rest of it?<p>I have this file:</p>
<pre><code>v1 test
v2 test test test
v3 test test
v4... |
72,203,408 | Derive a Dataframe from existing one<p>I need some help here. In this DataFrame I need to perform a series of calculations by grouping column'cnpj'</p>
<p>What I have as input:</p>
<pre><code> cnpj valor_cota ln_ativo ln_IBX CDI tracking
0 cat1 1114.7521 0.027152 -0.003659 23.893879 ... | <p>You can pass multiple functions to <code>apply</code>; then construct a DataFrame with the result:</p>
<pre class="lang-py prettyprint-override"><code>grouped = df.groupby('cnpj').apply(lambda g: [v1(g),v2(g),v3(g),v4(g),v5(g),v6(g),v7(g),v8(g),v9(g)])
out = pd.DataFrame(grouped.tolist(), index=grouped.index,
... | Derive a Dataframe from existing one | python|pandas|dataframe | 0 | 41 | 1 | 72,203,816 | 72,203,816 | 1 | true | 2022-05-11T15:06:23.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Derive a Dataframe from existing one<p>I need some help here. In this DataFrame I need to perform a series of calculations by grouping column'cnpj'</p>
<p>Wh... |
72,203,623 | If conditionals with not and startswith()<p>I'm trying to add some manual garbage collection at the end of my script, but for some reason when I iterate through <code>dir()</code> it is still picking up names that start with <code>"blob"</code> even though I've tried to specify not to do so. Reason for doing ... | <p>The issue is that you want to delete all variables where the name does not start with <code>"_"</code>, <strong>AND</strong> the name does not start with <code>"blob"</code>. However, your code is deleting variables where the names do not start with <code>"_"</code> <strong>OR</strong> ... | If conditionals with not and startswith() | python | 0 | 44 | 1 | 72,203,819 | 72,203,819 | 1 | true | 2022-05-11T15:22:05Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If conditionals with not and startswith()<p>I'm trying to add some manual garbage collection at the end of my script, but for some reason when I iterate thro... |
72,203,532 | calling method from Angular2 template results in NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked<p>I would like to call a method from the template, but the call results in NG0100.</p>
<p>How shall I do this properly in Angular2 ?</p>
<p>This is the ts file:</p>
<pre><cod... | <p>You can use Pipes in Angular, for example:</p>
<pre class="lang-js prettyprint-override"><code>import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
@Pipe({
name: 'random'
})
export class RandomPipe implements PipeTransform {
transform(value: any, ...args: any[]): any {
re... | calling method from Angular2 template results in NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked | angular|methods | 0 | 102 | 2 | 72,203,867 | 72,203,867 | 1 | true | 2022-05-11T15:15:22.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
calling method from Angular2 template results in NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked<p>I would l... |
72,203,723 | How to override grid-template-areas<p>How can I make a div that overrides all the template areas and goes to the front, so that the item6 will be displaying in front of all the other items.</p>
<p>I tried to with grid-row-start and grid-row-end but it doesn't seem to work</p>
<p><div class="snippet" data-lang="js" data... | <p>There is no <code>grid-column-start: 0</code> they all start with <code>1</code>.</p>
<p>Also you have to specify the <code>grid-columns</code> to be covered.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html ... | How to override grid-template-areas | html|css | 0 | 61 | 1 | 72,203,987 | 72,203,987 | 1 | true | 2022-05-11T15:28:39.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to override grid-template-areas<p>How can I make a div that overrides all the template areas and goes to the front, so that the item6 will be displaying ... |
72,203,975 | How to use pd.DataFrame.replace on a column containing lists<p>I am having trouble with pandas replace-function. Let's say we have an example dataframe like this:</p>
<pre><code>df = pd.DataFrame({'State': ['Georgia', 'Alabama', 'Tennessee'],
'Cities': [['Atlanta', 'Albany'], ['Montgomery', 'Huntsvil... | <p>Try:</p>
<ol>
<li><code>explode</code> to split the list into individual rows</li>
<li><code>replace</code> each column using the relevant dictionary</li>
<li><code>groupby</code> and <code>agg</code> to get back the original structure</li>
</ol>
<pre><code>>>> output = df.explode("Cities").replac... | How to use pd.DataFrame.replace on a column containing lists | python|pandas|list|dataframe|replace | 0 | 28 | 1 | 72,204,065 | 72,204,065 | 1 | true | 2022-05-11T15:45:42.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use pd.DataFrame.replace on a column containing lists<p>I am having trouble with pandas replace-function. Let's say we have an example dataframe like ... |
72,203,647 | Negative histogram y-values in Racket<p>I am trying to plot a set of values that includes both positive and negative numbers in Racket. I have tried using the <code>discrete-histogram</code> function from <code>plot</code>:</p>
<pre><code>(plot
(discrete-histogram '(A B C) '(1.2 0.2 -0.4)
#:y-min -0.5))
</... | <p><a href="https://docs.racket-lang.org/plot/renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._discrete-histogram%29%29" rel="nofollow noreferrer"><code>discrete-histogram</code></a> has one required argument <em>cat-vals</em>, so you should use <code>'((A 1.2) (B 0.2) (C -0.4))</code> or (if you already have li... | Negative histogram y-values in Racket | plot|scheme|racket | 0 | 38 | 1 | 72,204,121 | 72,204,121 | 1 | true | 2022-05-11T15:23:33.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Negative histogram y-values in Racket<p>I am trying to plot a set of values that includes both positive and negative numbers in Racket. I have tried using t... |
72,203,833 | Saving Values from ExcelDataReader DataSets<p>I'm using C# to read an Excel file using <code>ExcelDataReader</code> and <code>ExcelDataReader.DataSet</code>. I'm not too familiar with parsing DataSets so I was wondering how to save the values from each row in a particular column in the Excel. I need the code to pull al... | <p>You have to iterate throught the rows of the table and then get the column 0 value.</p>
<pre><code>foreach (DataRow row in dataset.Tables[0].Rows)
{
Console.WriteLine(row[0]);
}
</code></pre>
<p>This will write all the values from the first column (index 0).</p> | Saving Values from ExcelDataReader DataSets | c#|excel|dataset | 0 | 91 | 1 | 72,204,124 | 72,204,124 | 1 | true | 2022-05-11T15:35:21.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Saving Values from ExcelDataReader DataSets<p>I'm using C# to read an Excel file using <code>ExcelDataReader</code> and <code>ExcelDataReader.DataSet</code>.... |
72,194,276 | Message Collector first Message<p>I'm using the<code>createMessageCollector</code>. It is collecting messages, but the problem is, that it is not getting the first message sent in the channel.</p>
<pre><code>const filter = m => m.content.toLowerCase() === message.content.toLowerCase();
const collector = message.... | <p>I'm going to assume that you want the message from the same channel, so I changed your filter a bit, but the filter needs to be passed into the collector like below:</p>
<pre class="lang-js prettyprint-override"><code>const filter = m => m.channel.id === message.channel.id
const collector = message.channel.create... | Message Collector first Message | node.js|discord|discord.js | 0 | 51 | 2 | 72,204,182 | 72,204,182 | 1 | true | 2022-05-11T00:46:32.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Message Collector first Message<p>I'm using the<code>createMessageCollector</code>. It is collecting messages, but the problem is, that it is not getting the... |
72,203,459 | Python: Move all outlook emails to different folder<p>I'm working on a project that involves scraping data from emails that come in.</p>
<p>The part I'm stuck on is, after I bring the messages into local memory, I'm trying to move the emails from the original location to an archive folder because this process will be r... | <p>First of all, I'd recommend using the <a href="https://docs.microsoft.com/en-us/office/vba/api/outlook.namespace.getdefaultfolder" rel="nofollow noreferrer">GetDefaultFolder</a> method to get the Inbox folder and only then deal with subfolders.</p>
<pre><code>tempBox = folder.Folders.Item('Inbox')
</code></pre>
<p>T... | Python: Move all outlook emails to different folder | python|outlook|win32com|office-automation | 0 | 226 | 2 | 72,204,214 | 72,204,214 | 1 | true | 2022-05-11T15:10:04.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: Move all outlook emails to different folder<p>I'm working on a project that involves scraping data from emails that come in.</p>
<p>The part I'm stuc... |
72,204,176 | How do condition mid-string<p>I have a string in my psobject and it will only apply for 10 devices but not the 11th one. How do I construct a string and not include one variable if it's the 11th one?</p>
<p>This is what works for the first 10 in my foreach:</p>
<pre><code>$INFO_Tab = New-Object psobject -Property $([o... | <p>Wrap the <code>if</code> statement in a subexpression <code>$()</code>:</p>
<pre><code>"sdkDesc in $(if($currentDevice -ne 'Scanner'){"$BaseName "})$($cppFile)"
</code></pre> | How do condition mid-string | string|powershell|conditional-statements | 0 | 44 | 2 | 72,204,274 | 72,204,274 | 1 | true | 2022-05-11T15:59:35.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do condition mid-string<p>I have a string in my psobject and it will only apply for 10 devices but not the 11th one. How do I construct a string and not... |
72,201,596 | Web Maps - Responsibilities of frontend & backend<p>When using web map services such as Leaflet/Openlayers etc, are different raster layers fetched separately and laid on top of each other client-side, or are they composed on the server side?</p>
<p>Thank you</p> | <p>It depends if you make a separate request for each layer then the server will generate one image for each layer. However, if you make a request with several layers in it then the server will send back one combined image for all the layers, this is usually fastest.</p> | Web Maps - Responsibilities of frontend & backend | leaflet|gis|openlayers | 0 | 71 | 1 | 72,204,291 | 72,204,291 | 1 | true | 2022-05-11T13:05:48.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Web Maps - Responsibilities of frontend & backend<p>When using web map services such as Leaflet/Openlayers etc, are different raster layers fetched separatel... |
72,204,103 | How do you observe LiveData outside a fragment<p>I have a TextView inside a Fragment. Using LiveData I am able to change the text from within the fragment. By using a button in the MainActivity (outside the fragment) I am trying to change the text in the TextView, but it is not working. Can someone help. Here is my cod... | <p>In your <code>fragment</code> you've created <code>viewModel</code> using your <code>fragment</code> as the <code>owner</code>,</p>
<pre><code>viewModel = ViewModelProvider(this).get(ViewModel::class.java)
</code></pre>
<p>Whereas to communicate with the <code>activity</code> you need to create <code>viewModel</code... | How do you observe LiveData outside a fragment | android|android-fragments|android-livedata | 0 | 268 | 2 | 72,204,297 | 72,204,297 | 1 | true | 2022-05-11T15:54:36.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you observe LiveData outside a fragment<p>I have a TextView inside a Fragment. Using LiveData I am able to change the text from within the fragment. B... |
72,161,405 | Input 0 of layer "global_average_pooling1d" is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 16)<p>I just started to learn Tensorflow and got an error. I watched a <a href="https://www.youtube.com/watch?v=IpYmz3_BUM0&list=PLzMcBGfZo4-lak7tiFDec5_ZMItiIIfmj&index=7" rel=... | <p>I could solve this problem. model.predict doesn´t accept normal Lists. I just replaced it with an Numpy array.</p>
<pre><code>test_review = test_data[0]
prediction = model.predict(np.array([test_review]))
print("Review: " + decode_review(test_review))
print("Prediction: " + str(prediction[0]))
pr... | Input 0 of layer "global_average_pooling1d" is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 16) | tensorflow|keras|layer|predict|sequential | 0 | 232 | 2 | 72,204,368 | 72,204,368 | 1 | true | 2022-05-08T13:18:41.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Input 0 of layer "global_average_pooling1d" is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 16)<p>I just started t... |
72,200,739 | Plot stacked barchar in Plotly with fixed order based on second column<p>I have a dataframe that looks like this:</p>
<pre><code>index, start, end, bar_len,name,color, gr
1,2300000.0,5300000.0,3000000.0,p36.32,#949494, g1
2, 5300000.0,7100000.0,1800000.0,p36.31,#FFFFFF, g1
3, 7100000.0,9100000.0,2000000.0,p36.23,#9494... | <p>You can build it using plotly graph_objects. Code below to do the needful. <strong>Note:</strong> In the dataframe, I changed the color to <code>HEX CODE</code> which is #FF0000 for RED and #0000FF for BLUE. I have used only <code>bar_len</code>, <code>color</code> and <code>gr</code> columns. Adopted from this <a h... | Plot stacked barchar in Plotly with fixed order based on second column | python|pandas|plotly|plotly-python | 0 | 55 | 1 | 72,204,446 | 72,204,446 | 1 | true | 2022-05-11T12:02:31.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plot stacked barchar in Plotly with fixed order based on second column<p>I have a dataframe that looks like this:</p>
<pre><code>index, start, end, bar_len,n... |
72,204,298 | How to add space between consecutive headings which contains consecutive paragraphs and reduce the space between heading and paragrph<p>I have a multiple headings with consecutive paragraph tags. The space between each paragraph and a heading should be very less where as the space between headings should be very high. ... | <p>Why not just set the margin between the ehader and the paragraph to 0? You can use the <code>+</code> selector to select the next element:</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-css lang-css prettyprint-... | How to add space between consecutive headings which contains consecutive paragraphs and reduce the space between heading and paragrph | html|css | 0 | 20 | 1 | 72,204,478 | 72,204,478 | 1 | true | 2022-05-11T16:09:42.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add space between consecutive headings which contains consecutive paragraphs and reduce the space between heading and paragrph<p>I have a multiple hea... |
72,204,423 | automatically rename columns in pandas based on two indices in loops<p>I want to automatically rename the column names of a dataframe in pandas using two loops. The indices name should include "C" + "a number between 1 and m" + "a number between 1 and n".</p>
<p>For example, I want to rena... | <p>You can use a nested for loop that in range that will give the desired results</p>
<pre><code>m = 3
n= 4
lst = [f"C{num}{num2}" for num in range(1, m + 1) for num2 in range(1, n + 1)]
</code></pre>
<p>You use a +1 in the for loop because range is non-inclusive</p> | automatically rename columns in pandas based on two indices in loops | python|pandas|rename | 0 | 28 | 1 | 72,204,487 | 72,204,487 | 1 | true | 2022-05-11T16:19:07.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
automatically rename columns in pandas based on two indices in loops<p>I want to automatically rename the column names of a dataframe in pandas using two loo... |
72,204,502 | Docker-Compose NGINX and PHP - Can server html files but php gives bad gateway<p>I am trying to run nginx and php in docker-compose. I am able to build the containers and when I browse to an html file in my browser nginx serves it. But when I try to browse a php file I just get 502 Bad Gateway.</p>
<p>I'm aware that it... | <p>9090 is an exposed port. That means you can reach localhost:9090 for the PHP container but not for internal container communication.</p>
<p>Change your site.conf:</p>
<p>fastcgi_pass php:9090; => fastcgi_pass php:9000;</p> | Docker-Compose NGINX and PHP - Can server html files but php gives bad gateway | php|docker|nginx | 0 | 47 | 1 | 72,204,620 | 72,204,620 | 1 | true | 2022-05-11T16:25:17.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Docker-Compose NGINX and PHP - Can server html files but php gives bad gateway<p>I am trying to run nginx and php in docker-compose. I am able to build the c... |
72,204,318 | map function vs for loop puppeteer package in nodejs<p>i´ve been trying puppetter package in nodejs, and when i use data function works pretty different in contrast to for loop</p>
<p>here is what im talking about:</p>
<p>map function</p>
<pre><code>data.map(async(info) =>{
let browser = await puppeteer.laun... | <p>if you want to make it work in the same way you have to change your first code in this way</p>
<pre><code>const promises = data.map(async(info) =>{
let browser = await puppeteer.launch({ ignoreHTTPSErrors: true });
let page = await browser.newPage();
await page.goto(info.url, { waitUntil: ... | map function vs for loop puppeteer package in nodejs | javascript|node.js|reactjs|npm | 0 | 61 | 2 | 72,204,633 | 72,204,633 | 1 | true | 2022-05-11T16:10:39.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
map function vs for loop puppeteer package in nodejs<p>i´ve been trying puppetter package in nodejs, and when i use data function works pretty different in c... |
72,195,397 | Is it possible to make a Solana program the signer for a transaction?<p>I'm trying to write a Solana program with one instruction, <code>MintOne</code>, that mints a single token to a provided account.</p>
<p>It seems I need to do something like this:</p>
<ol>
<li>Create a token with the spl-token CLI</li>
<li>Authoriz... | <blockquote>
<p>Is it possible for a Solana program to be a signer?</p>
</blockquote>
<p>Not directly, no.</p>
<p>Any time where you would want a Solana program to sign a transaction, use a Program Derived Address (PDA) instead. PDAs are just like public keys, so they can be mint authorities or anything else that an ac... | Is it possible to make a Solana program the signer for a transaction? | rust|solana|anchor-solana | 0 | 470 | 1 | 72,204,669 | 72,204,669 | 1 | true | 2022-05-11T04:23:27.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to make a Solana program the signer for a transaction?<p>I'm trying to write a Solana program with one instruction, <code>MintOne</code>, that... |
72,193,234 | X-Ray import json result from Jenkins to new test execution under a test plan<p>i would like to import the results of the execution on an existing test plan but each time in a new test execution
i have the below on jenkings</p>
<pre><code> stage("Publish XRay Results to JIRA") {
// publish result... | <p>Whenever you import test results from a Cucumber JSON report, Xray will process the tags on the scenarios to look for the corresponding Test issues in Jira. It will also look at a the Feature section, and see if there's a tag there referring to a Test Execution issue; if that's the case, Xray will update the results... | X-Ray import json result from Jenkins to new test execution under a test plan | jenkins-pipeline|jenkins-plugins|jira-xray|x-ray | 0 | 343 | 1 | 72,204,678 | 72,204,678 | 1 | true | 2022-05-10T21:41:09.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
X-Ray import json result from Jenkins to new test execution under a test plan<p>i would like to import the results of the execution on an existing test plan ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.