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,342,565 | Connect to MySQL server for client failed<p>I'm writing an application to upload data for my customer's database. When I tested it on my PC, it works ok but when connecting to the client's database, it has some errors. I'm using this code to connect to MySQL:</p>
<pre><code> def connect_sql(self):
mydb = mys... | <p>Try it as following:</p>
<pre><code> def connect_sql(self):
mydb = mysql.connector.connect(
host=host,
passwd=pw,
port=port,
database=db,
user=user,
charset='utf8',
use_unicode=True
)
return mydb
</code></pre>
<p>Here's <a href="https://dev.mysql.c... | Connect to MySQL server for client failed | python|mysql|mysql-python|mysql-connector | 0 | 77 | 1 | 72,342,597 | 72,342,597 | 0 | true | 2022-05-23T02:01:51.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connect to MySQL server for client failed<p>I'm writing an application to upload data for my customer's database. When I tested it on my PC, it works ok but ... |
72,338,004 | How to find if letter exist in string SQL<pre><code>DROP TABLE IF EXISTS t_z_ksiazka CASCADE;
DROP TABLE IF EXISTS t_a_ksiazki CASCADE;
DROP TABLE IF EXISTS t_ksiazka CASCADE;
DROP TABLE IF EXISTS t_zamowienie CASCADE;
DROP TABLE IF EXISTS t_autor CASCADE;
DROP TABLE IF EXISTS t_wydawca CASCADE;
DROP TABLE IF ... | <p>You have the right idea with the subquery, and to getting the letter to use with <code>LIKE</code> can be accomplished with <code>CONCAT</code>: (as one possible way)</p>
<pre><code>select substring(nazwisko,1,1) from t_autor where id_autora=26;
</code></pre>
<p>Gives: <a href="https://i.stack.imgur.com/ZucGY.png" r... | How to find if letter exist in string SQL | sql|subquery|mysql-workbench | 0 | 77 | 1 | 72,339,708 | 72,339,708 | 0 | true | 2022-05-22T13:29:30.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find if letter exist in string SQL<pre><code>DROP TABLE IF EXISTS t_z_ksiazka CASCADE;
DROP TABLE IF EXISTS t_a_ksiazki CASCADE;
DROP TABLE IF EXIST... |
72,278,735 | Parsing JSON into Google spreadsheet (Apps Script)<p>I have a download in JSON format that I get through the API.
Example:</p>
<pre><code>{
"Employees": [
{
"User": {
"UserId": "4d132227-ea5c-4e57-b105-2f8b97872545",
"L... | <p>Try this:</p>
<pre><code>function myFunction() {
// here is your object (parsed json)
var obj = {
"Employees": [
{
"User": {
"UserId": "4d132227-ea5c-4e57-b105-2f8b97872545",
"Login": "test@gmail.com",
&q... | Parsing JSON into Google spreadsheet (Apps Script) | javascript|json|google-apps-script|google-sheets | 1 | 77 | 2 | 72,279,169 | 72,279,169 | 0 | true | 2022-05-17T18:04:56.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing JSON into Google spreadsheet (Apps Script)<p>I have a download in JSON format that I get through the API.
Example:</p>
<pre><code>{
"Employe... |
72,259,191 | C# recursive programming: jump onto previous step in code<p>I have been given the task to write a sudoku program, which solves the sudoku wikipedia example.
The method which solves the sudoku puzzle has to be a recursive method.
It first checks if the sudoku board is valid (sudoku rules: no twice occuring numbers in sa... | <p>Snipping out the relevant part:</p>
<pre><code>for (int value = 1; value < 10; value++)
{
board[nextField.Value.X, nextField.Value.Y] = value;
if(SolveSudoku(board)) return true;
// ^^ Stop if solved,
// iteration will increase value if not.
}
// reset and return false if no value for this field l... | C# recursive programming: jump onto previous step in code | c#|recursion|methods|dynamic|sudoku | 1 | 77 | 1 | 72,259,265 | 72,259,265 | 0 | true | 2022-05-16T12:26:13.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# recursive programming: jump onto previous step in code<p>I have been given the task to write a sudoku program, which solves the sudoku wikipedia example.
... |
72,313,564 | Why is fulltext index search slower than like in mysql?<p>I am using mysql.</p>
<p>I use a fulltext index for searching, I know this is faster than a like search.</p>
<p>But in my actual query, fulltext index search is much slower than like.</p>
<pre><code>#1
SELECT ...
FROM CAT
INNER JOIN DOCTOR ON CAT.DOCTORID = DOCT... | <p><code>OR</code> kills performance. Almost always it disables any use of <code>INDEXes</code> of any kind.</p>
<p>What to do...</p>
<p>Have an extra column that (redundantly) contains all the search words in it. Apply a <code>FULLTEXT</code> index on it. No <code>ORs</code>.</p>
<p>With that, <code>FULLTEXT</code>... | Why is fulltext index search slower than like in mysql? | mysql|full-text-search | 0 | 77 | 1 | 72,332,292 | 72,332,292 | 0 | true | 2022-05-20T04:20:26.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is fulltext index search slower than like in mysql?<p>I am using mysql.</p>
<p>I use a fulltext index for searching, I know this is faster than a like se... |
72,267,655 | Error in Gathering Statistics on the network traffic<p>I'm creating a function to calculate packet capture delay using Python and pcap, but this error happens. I'm taking this function from a C example as I'm new to Python. This is the error:</p>
<pre class="lang-none prettyprint-override"><code>Traceback (most recent ... | <p>The C code the OP is porting and generating an error in Python is:</p>
<pre class="lang-c prettyprint-override"><code> /* Calculate the delay in microseconds from the last sample. This value
* is obtained from the timestamp that the associated with the sample. */
delay = (header->ts.tv_sec - old_ts->tv_s... | Error in Gathering Statistics on the network traffic | python|ctypes|libpcap | 0 | 77 | 1 | 72,292,288 | 72,292,288 | 0 | true | 2022-05-17T02:50:53.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error in Gathering Statistics on the network traffic<p>I'm creating a function to calculate packet capture delay using Python and pcap, but this error happen... |
72,392,239 | How to count on Check all that apply options?<p>I have a survey which contains several Check all that apply questions. I am using Tableau to do visualization but I failed to split the data into different columns due to the limitation of Tableau Desktop(Seems you need to use Tableau Prep). So I have been thinking about ... | <p>You can <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.str.split.html" rel="nofollow noreferrer"><code>split</code></a>, <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.explode.html" rel="nofollow noreferrer"><code>explode</code></a> and count the values:</p>
<pre><code>print... | How to count on Check all that apply options? | python|pandas|string|split|tableau-desktop | 1 | 77 | 2 | 72,392,283 | 72,392,283 | 0 | true | 2022-05-26T13:00:31.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to count on Check all that apply options?<p>I have a survey which contains several Check all that apply questions. I am using Tableau to do visualization... |
72,240,909 | How do I search most common words in very big file (over 1 Gb) wit using 1 Kb or less memory?<p>I have very big text file, with dozens of millions of words, one word per line. I need to find top 10 most common words in that file. There is some restrictions: usage of only standard library and usage of less that 1 KB of ... | <p>If you can create a <em>new</em> file however big, you can create a simple <a href="https://en.wikipedia.org/wiki/AVL_tree" rel="nofollow noreferrer">disk-based tree</a> database holding each word and its frequency so far. This will cost you O(log n) each time, with n from 1 to N words, plus the final scan of the wh... | How do I search most common words in very big file (over 1 Gb) wit using 1 Kb or less memory? | c|memory|memory-management|c-standard-library | 0 | 77 | 2 | 72,241,449 | 72,241,449 | 0 | true | 2022-05-14T13:57:54.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I search most common words in very big file (over 1 Gb) wit using 1 Kb or less memory?<p>I have very big text file, with dozens of millions of words, ... |
72,298,971 | Check if root of cubic equation is complex or not?<p>I use <a href="https://github.com/mathnet/mathnet-numerics/blob/master/src/Numerics/RootFinding/Cubic.cs#L108" rel="nofollow noreferrer">this Cubic root</a> implementation.</p>
<p>I have equation #1:</p>
<pre><code>x³ -2 x² -5 x + 6 = 0
</code></pre>
<p>It gives me 3... | <p>Thank you <a href="https://stackoverflow.com/questions/72298971/check-if-root-of-cubic-equation-is-complex-or-not#comment127731050_72298971">Mark Dickinson</a>.</p>
<p>So according to <a href="https://en.wikipedia.org/wiki/Cubic_equation" rel="nofollow noreferrer">Wikipedia</a>:</p>
<blockquote>
<p>delta > 0: the... | Check if root of cubic equation is complex or not? | c#|floating-point|precision|complex-numbers|math.net | 2 | 77 | 1 | 72,308,080 | 72,308,080 | 0 | true | 2022-05-19T05:18:34.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if root of cubic equation is complex or not?<p>I use <a href="https://github.com/mathnet/mathnet-numerics/blob/master/src/Numerics/RootFinding/Cubic.cs... |
72,370,620 | Is there a way to count characters on a web page opened in a browser application from R<p>I have saved pages web pages in text (as .txt files), lots of them. These are public profile pages from a social media site. I want to do a rough measure of how much stuff is on these profile pages. When I save these text files as... | <p>This page relies heavily on javascript to render the page. I suggest looking into rselenium to process the page. RSelenium will be able to process the javascript and you would be able to use the "rvest" package to extract the information of interest.</p>
<p>Here is very quick and very dirty way to extra... | Is there a way to count characters on a web page opened in a browser application from R | r|selenium|web-scraping|rselenium|headless-browser | 1 | 77 | 1 | 72,385,130 | 72,385,130 | 0 | true | 2022-05-24T23:52:51.830Z | 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 count characters on a web page opened in a browser application from R<p>I have saved pages web pages in text (as .txt files), lots of them.... |
72,247,992 | getDoc from firestore without searching for specific uid<p>I'm having an issue getting the collection info. Using this code, I could only get the doc with a specific uid.</p>
<pre><code>const snapShot = doc(db, 'Files', 'someUID');
const getSnapShot = await getDoc(snapShot);
console.log(getSnapShot.data());
</code></p... | <p>To get all documents from a collection or documents that match a query you should use <code>getDocs()</code> instead of <code>getDoc()</code> that is used to fetch a single document as the function name suggests.</p>
<pre><code>const snapShot = collection(db, 'Files');
const getSnapShot = await getDocs(snapShot);
c... | getDoc from firestore without searching for specific uid | javascript|firebase|google-cloud-firestore | 1 | 77 | 1 | 72,248,255 | 72,248,255 | 1 | true | 2022-05-15T11:51:08.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getDoc from firestore without searching for specific uid<p>I'm having an issue getting the collection info. Using this code, I could only get the doc with a ... |
72,252,421 | C# - What are the best practices when working with DBs in Windows Applications?<p>I mostly write Windows Applications using C#. I find that when I need to implement Databases, using Data Sources, Table Adapters etc. my code becomes really untidy. I also find that when I need to do very specific processing of data, I ne... | <p>It depends on your needs, but basically it's a matter of performance and how big your project will be.</p>
<p>ORMs are designed to do things behind the scene to automate the process of mapping data object to your code and to be able to access data objects from your programming language.</p>
<p>If your application is... | C# - What are the best practices when working with DBs in Windows Applications? | c#|database|winforms | 0 | 77 | 1 | 72,252,566 | 72,252,566 | 1 | true | 2022-05-15T21:47:05.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# - What are the best practices when working with DBs in Windows Applications?<p>I mostly write Windows Applications using C#. I find that when I need to im... |
72,258,777 | Check if a column value is in a list and report to a new column<p>After <a href="https://stackoverflow.com/questions/70200151/dataframe-filtering-with-multiple-conditions-on-different-columns">this</a> discussion, I have the following dataframe:</p>
<pre><code>data = {'Item':['1', '2', '3', '4', '5'],
'Len':[142, 11, ... | <p>It might be a good idea to build an intermediate representation first, something like this (I am assuming the empty cell in the <code>Fail</code> column is an empty list <code>[]</code> so as to match the datatype of the other values):</p>
<pre class="lang-py prettyprint-override"><code># create a Boolean mask to fi... | Check if a column value is in a list and report to a new column | python|pandas|dataframe|comparison|filtering | 0 | 77 | 2 | 72,260,448 | 72,260,448 | 1 | true | 2022-05-16T11:52:28.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if a column value is in a list and report to a new column<p>After <a href="https://stackoverflow.com/questions/70200151/dataframe-filtering-with-multip... |
72,281,755 | How to join two tables based on a decimal column?<p>I found other posts where people asked about joining sql tables using decimal columns and the general answer is "try to avoid it". But here is a case that I just have to use some kind of a join (fuzzy join?) on decimal columns:</p>
<p>I have two tables, each... | <p>You can try something like this</p>
<pre><code>Select * From Table a
inner join Table b
on Abs(b.column - a.column) < 0.0000000001
</code></pre>
<p>Finding the least difference in the column values .You can define the length of decimal zeroes</p> | How to join two tables based on a decimal column? | sql|join|decimal | -1 | 77 | 1 | 72,281,839 | 72,281,839 | 1 | true | 2022-05-17T23:34:10.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to join two tables based on a decimal column?<p>I found other posts where people asked about joining sql tables using decimal columns and the general ans... |
72,291,417 | How can I use curses to respond to a key press without pausing the program to wait for an input?<p>An example of what I would like to do is the following:</p>
<pre><code>import curses
while True:
key = stdscr.getch()
if key == 119:
print("key w pressed")
else:
... | <p>In curses the window has a <code>nodelay</code> flag. If it is set to true, the getch function won't wait for user input, but will return <code>-1</code> if no input is to be read.</p>
<pre><code>import curses
stdscr.nodelay(True)
while True:
key = stdscr.getch()
if key == -1:
print(&qu... | How can I use curses to respond to a key press without pausing the program to wait for an input? | python|python-curses | 0 | 77 | 1 | 72,291,542 | 72,291,542 | 1 | true | 2022-05-18T14:50:31.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I use curses to respond to a key press without pausing the program to wait for an input?<p>An example of what I would like to do is the following:</p... |
72,278,670 | Safety of storing secrets in WASM file<p>I am quite new to WebAssembly and am trying to wrap my head around how it works.</p>
<p>From what I understand, one calls a WASM module in javascript and supplies arguments. I know that such arguments themselves are publicly viewable by the client because the invocation happens ... | <p>Yes, it is possible to reverse engineer the code of a WASM file, like with other binaries. Contained logic and data/constants can be extracted.
Hence, it is not safe to store secrets in WASM files, assuming the attacker has access to the WASM binary.</p>
<p>A tool that can be use is <a href="https://webassembly.gith... | Safety of storing secrets in WASM file | webassembly|wasm-bindgen|rust-wasm | 1 | 77 | 1 | 72,292,397 | 72,292,397 | 1 | true | 2022-05-17T17:58:19.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Safety of storing secrets in WASM file<p>I am quite new to WebAssembly and am trying to wrap my head around how it works.</p>
<p>From what I understand, one ... |
72,295,205 | How to remove padding in matplotlib subplots when using make_axes_locatable<p>I'm trying to create a 4x2 plot on a slightly non-rectangular dataset (x-axis range is smaller than y-axis range) using <code>plt.subplots</code> and assign colorbars using <code>make_axes_locatable</code> to have the colorbars nice and flush... | <p>You are plotting multiple images (which by default it tries to keep an equal aspect ratio), in which the height is greater than the width. Therefore, total height of the images > total width of the images.</p>
<p>It follows that one way to reduce the white spacing between columns is to reduce the width of the fig... | How to remove padding in matplotlib subplots when using make_axes_locatable | python|matplotlib|padding|subplot | 2 | 77 | 1 | 72,295,930 | 72,295,930 | 1 | true | 2022-05-18T19:52:18.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove padding in matplotlib subplots when using make_axes_locatable<p>I'm trying to create a 4x2 plot on a slightly non-rectangular dataset (x-axis r... |
72,300,603 | Extract Id's from String with SQL<p>I want to extract the Id's from the following string via SQL (no T-SQL)</p>
<pre><code>XY_FOO_BAR1=123;XY_FOO_BAR2=456;XY_FOO_BAR3=789;
</code></pre>
<p>The result should look like this:</p>
<pre><code>123
456
789
</code></pre>
<p>With T-SQL it would be easy but how can I solve the p... | <p>Tried with this and seems ok.
But <code>order by value</code> seems tricky</p>
<pre><code>declare @Raw nvarchar(max) = 'XY_FOO_BAR1=123;XY_FOO_BAR2=456;XY_FOO_BAR3=789;';
with List as (
select value as KeyValue from STRING_SPLIT(@Raw, ';') where value != ''
)
select (select value from STRING_SPLIT(KeyValue, '=')... | Extract Id's from String with SQL | sql|sql-server | -1 | 77 | 2 | 72,301,066 | 72,301,066 | 1 | true | 2022-05-19T07:48:04.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract Id's from String with SQL<p>I want to extract the Id's from the following string via SQL (no T-SQL)</p>
<pre><code>XY_FOO_BAR1=123;XY_FOO_BAR2=456;XY... |
72,290,175 | Identify lines/dots on white image discarding the patterns<p>I'm working on computer vision and I have an image as shown below:</p>
<p><a href="https://i.stack.imgur.com/HWIPZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HWIPZ.png" alt="tissue" /></a></p>
<p>I want to identify the black line on th... | <p>In reference to the comments, I was suggesting to apply global threshold <code>cv2.threshold()</code>:</p>
<p><strong>Code:</strong></p>
<pre><code>img = cv2.imread(r'C:\Users\524316\Desktop\Stack\tissue.png')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
threshold_value = 20
th = cv2.threshold(gray, threshold_value,... | Identify lines/dots on white image discarding the patterns | python|python-3.x|opencv|computer-vision|mathematical-morphology | 1 | 77 | 1 | 72,305,474 | 72,305,474 | 1 | true | 2022-05-18T13:31:55.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Identify lines/dots on white image discarding the patterns<p>I'm working on computer vision and I have an image as shown below:</p>
<p><a href="https://i.sta... |
72,307,133 | Mouse wheel directive is not called in Angular 13<p>I am trying to use mouse wheel directive. This is my first directive, and I can't make it work. This is the directive:</p>
<pre><code>import { Directive, ElementRef, HostListener } from "@angular/core";
@Directive({
selector: '[wheel]'
})
export class Mou... | <p>'mousewheel' is deprecated. Use 'wheel' instead.
Here is a list of HTML DOM events:
<a href="https://www.w3schools.com/jsref/dom_obj_event.asp" rel="nofollow noreferrer">https://www.w3schools.com/jsref/dom_obj_event.asp</a></p> | Mouse wheel directive is not called in Angular 13 | javascript|angular|typescript | 0 | 77 | 1 | 72,307,205 | 72,307,205 | 1 | true | 2022-05-19T15:19:22.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mouse wheel directive is not called in Angular 13<p>I am trying to use mouse wheel directive. This is my first directive, and I can't make it work. This is t... |
72,307,514 | Docusign: Postman API collection (errorCode": "INVALID_CONTENT_TYPE)<p>I am going through this <a href="https://www.docusign.com/blog/dsdev-please-mr-postman#:%7E:text=Before%20you%20run%20this%2C%20though%2C%20you%20do%20need%20to%20make%20one%20more%20change.%20Go%20to%20the%20Headers%20tab%20in%20Postman%20and%20unc... | <p>Are you trying the create envelope call that's mentioned in the guide? I checked my postman collection and for the same request it's using the content type <code>application/json</code></p>
<p>Try setting it to that and see if it works</p> | Docusign: Postman API collection (errorCode": "INVALID_CONTENT_TYPE) | docusignapi | 0 | 77 | 1 | 72,314,067 | 72,314,067 | 1 | true | 2022-05-19T15:46:27.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Docusign: Postman API collection (errorCode": "INVALID_CONTENT_TYPE)<p>I am going through this <a href="https://www.docusign.com/blog/dsdev-please-mr-postman... |
72,327,076 | datetime column of pandas multiply a number<p>I have a dataframe with a datetime column in string type, like this:</p>
<pre><code>>>> df2
date a b
0 2020/1/1 8.0 5.0
1 2020/1/2 10.0 7.0
2 2020/1/3 6.0 1.0
3 2020/1/4 6.0 3.0
</code></pre>
<p>I want use its 'date' column to generate ... | <p>Try this</p>
<pre><code>df2 = pd.DataFrame({'date': ['2020/1/1', '2020/1/2', '2020/1/3', '2020/1/4'],
'a': [8.0, 10.0, 6.0, 6.0],
'b': [5.0, 7.0, 1.0, 3.0]})
idx_list = [2,3,1,2]
# use repeat
df2['date'].repeat(idx_list)
0 2020/1/1
0 2020/1/1
1 2020/1/2
1 202... | datetime column of pandas multiply a number | python|pandas|datetime | 1 | 77 | 2 | 72,327,115 | 72,327,115 | 1 | true | 2022-05-21T06:03:20.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
datetime column of pandas multiply a number<p>I have a dataframe with a datetime column in string type, like this:</p>
<pre><code>>>> df2
dat... |
72,321,309 | How can I use the output of a module that is located at outer level of the caller module?<p>I'm working with terraform for a while and I didn't face any issues as I always followed a simple structure.
But now I've started working on another project that doesn't seem like it adheres to best practices.</p>
<p>The project... | <p>It depends from where you invoke the <code>cloudfront</code> module.</p>
<h2>Option 1</h2>
<p>If you invoke both modules, <code>service1</code> and <code>cloudfront</code> from the same parent, then you need to define a variable in <code>service1</code> and explicitly pass the value:</p>
<p><strong><code>service1</c... | How can I use the output of a module that is located at outer level of the caller module? | module|scope|terraform|output | 0 | 77 | 2 | 72,328,778 | 72,328,778 | 1 | true | 2022-05-20T15:19:25.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I use the output of a module that is located at outer level of the caller module?<p>I'm working with terraform for a while and I didn't face any issu... |
72,328,828 | Django - TypeError at /api/v1/latest-products/ FieldFile.save() got an unexpected keyword argument 'quality'<p>I don't know why, but every time I try to go to the API URL, I keep getting this error message, I think the problem is in one of these modules, but I don't know what to change.</p>
<p>models.py module found in... | <p>The conflicting point can be found at the <code>make_thumbnail</code> method:</p>
<pre class="lang-py prettyprint-override"><code>def make_thumbnail(self, image, size=(300,200)):
img = Image.open(image)
img.convert('RGB')
img.thumbnail(size)
thumb_io = BytesIO()
image.save(thumb_io, 'JPEG', qual... | Django - TypeError at /api/v1/latest-products/ FieldFile.save() got an unexpected keyword argument 'quality' | python|django|django-models|django-rest-framework | 0 | 77 | 1 | 72,329,071 | 72,329,071 | 1 | true | 2022-05-21T10:46:03.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django - TypeError at /api/v1/latest-products/ FieldFile.save() got an unexpected keyword argument 'quality'<p>I don't know why, but every time I try to go t... |
72,342,243 | Adding a numpy array to another which has different dimensions<p>I have an empty numpy array (let's call it <code>a</code>), which is for example <code>(1200, 1000)</code> in size.</p>
<p>There are several numpy arrays that I want to get sum of them and save them in the array <code>a</code>.</p>
<p>The size of these ar... | <p>If you just want to concatinate arrays:</p>
<pre><code>a = np.ones((1200,1000))
b = np.ones((1200, 500))
c = np.concatenate((a, b), axis=1)
c.shape # == (1200, 1500)
</code></pre>
<p>If you want elementwise addition, then reshape <code>b</code> to have the same dimentions as <code>a</code></p>
<pre><code>a = np.ones... | Adding a numpy array to another which has different dimensions | python|arrays|python-3.x|numpy|average | -1 | 77 | 2 | 72,342,317 | 72,342,317 | 1 | true | 2022-05-23T00:45:18.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding a numpy array to another which has different dimensions<p>I have an empty numpy array (let's call it <code>a</code>), which is for example <code>(1200... |
72,310,317 | Why does my vuetify app lose its styling when I turn it into a web component?<p>I am trying to build a web component using vuetify. However, when I embed that web component in a container, the shadow-dom loses its styling and the result is just a bunch of dull grey buttons.</p>
<p>I've created a simple example of what ... | <p>Veutify add the CSS styling to the top of the document when you use any of its components. So when your component gets wrapped inside a custom element within Shadow DOM, then all the styling provided by <code>Veutify</code> is not accessible inside shadow DOM.</p>
<p>There are two options you can try:</p>
<ol>
<li>U... | Why does my vuetify app lose its styling when I turn it into a web component? | vuetify.js|web-component|shadow-dom | 0 | 77 | 1 | 72,343,349 | 72,343,349 | 1 | true | 2022-05-19T19:47:24.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does my vuetify app lose its styling when I turn it into a web component?<p>I am trying to build a web component using vuetify. However, when I embed tha... |
72,342,957 | Laravel PHP filter Drop down Search<p>need help with the dropdown filter. my task is to separate the active, deactivate, for approval, etc. employees. so I did was I created a dropdown list filter to avoid creating another data table for every status. please help me. thank you!!!</p>
<p>this the controller</p>
<p>publi... | <p>you can write your query but remove get() function from the end .</p>
<pre><code> $user = DB::table("user_basic")
->leftjoin("user_status","user_status.status_id" , "=" , "user_basic.user_id")
->select("user_status.*", "user_basi... | Laravel PHP filter Drop down Search | php|laravel|dropdown | 1 | 77 | 1 | 72,343,353 | 72,343,353 | 1 | true | 2022-05-23T03:21:54.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel PHP filter Drop down Search<p>need help with the dropdown filter. my task is to separate the active, deactivate, for approval, etc. employees. so I d... |
72,343,227 | Out of an array of arbitrary unit vectors, what is the most efficient method of finding the two vectors that have the largest angle?<p>So I'm attempting to make a wall system like the Sims. While it is 3D, it can be simplified to 2D (think a bird's eye view). A wall is defined by two points: a starting point an an endi... | <p>This problem is equivalent to finding of the farthest pair of points, where all the points lie at unit circle.</p>
<p>Sort points - it is simpler to separate points with positive <code>y</code> (angles <code>0..Pi</code>) into the first list, and points with negative <code>y</code> into the second list,sort them by ... | Out of an array of arbitrary unit vectors, what is the most efficient method of finding the two vectors that have the largest angle? | math|lua|dot-product | 1 | 77 | 1 | 72,344,308 | 72,344,308 | 1 | true | 2022-05-23T04:18:57.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Out of an array of arbitrary unit vectors, what is the most efficient method of finding the two vectors that have the largest angle?<p>So I'm attempting to m... |
72,347,750 | How to put new string between commas in original string<p>I have this original string and I want to insert new string between two dots of original string. I did it this way, but having errors.</p>
<pre><code>String originalString ="asdASfasdlpe.hereNeedToPutNewString.asdasfdfepw";
String stringForReplace = &q... | <p>I would do it like so.</p>
<ul>
<li>from the question it looks like you want to replace the first occurrence so use <code>replaceFirst</code></li>
<li><code>(?<=\\.)</code> - look behind assertion - so start with following character</li>
<li><code>(?=\\.)</code> - look ahead assertion - so end prior to that</li>... | How to put new string between commas in original string | java | 0 | 77 | 6 | 72,350,912 | 72,350,912 | 1 | true | 2022-05-23T11:26:36.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to put new string between commas in original string<p>I have this original string and I want to insert new string between two dots of original string. I ... |
72,366,904 | Array's elements' and length's values are undefined (when getting from Firebase)<p>I am alright with getting an array from database however I cannot reach the elements of the array I got from database, neither <code>arr[0]</code>,<code>arr[1]</code>... nor <code>arr.length</code></p>
<p>That is why the conversion from ... | <p>Its because your arr type is <code>DataSnapshop</code>. DataSnapshop is not array type class you need to convert or foreach all items to new array.</p>
<pre><code>const ReadFirebase= async () => {
let topicsData;
try {
await database()
.ref(`topics/`)
.once('value')
.then(snapshot =>... | Array's elements' and length's values are undefined (when getting from Firebase) | javascript|arrays|firebase|react-native|async-await | 3 | 77 | 1 | 72,374,402 | 72,374,402 | 1 | true | 2022-05-24T17:13:10.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Array's elements' and length's values are undefined (when getting from Firebase)<p>I am alright with getting an array from database however I cannot reach th... |
72,377,756 | How to manually do `git ls-remote` with a http client<p>I want to query the latest remote HEAD commit for 10000+ https git repositories, every hour. Basically this x10000:</p>
<pre><code>remote=https://github.com/torvalds/linux
git ls-remote $remote HEAD | awk '{print $1}'
</code></pre>
<p>Most, but not all, remotes ar... | <p>I think the <a href="https://www.git-scm.com/docs/http-protocol#_discovering_references" rel="nofollow noreferrer">Discover references</a> section of the http protocol documentation is what you want.</p>
<p>If you're interacting with GitHub, you need to use the "smart" protocol, because:</p>
<pre><code>$ c... | How to manually do `git ls-remote` with a http client | git|http|curl|ls-remote | 0 | 77 | 1 | 72,378,247 | 72,378,247 | 1 | true | 2022-05-25T12:35:32.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to manually do `git ls-remote` with a http client<p>I want to query the latest remote HEAD commit for 10000+ https git repositories, every hour. Basicall... |
72,379,040 | Is it possible to see if vivado inferred blockram?<p>I have a following piece of code:</p>
<pre><code>module cw305_reg_aes #(
parameter pADDR_WIDTH = 21,
parameter pBYTECNT_SIZE = 14,
parameter pPK_WIDTH = 800 // 800 * 8
)(
input wire usb_clk,
input wire ... | <p>Block rams are reported in the synthesis log. If BRAMs are inferred there will be a section detailing what parts of the HDL produced which BRAMs of how many ports, width, etc</p>
<p>It reads like the log mentioned on the forums here: <a href="https://support.xilinx.com/s/article/61027?language=en_US" rel="nofollow n... | Is it possible to see if vivado inferred blockram? | vivado|synthesis | 1 | 77 | 2 | 72,379,619 | 72,379,619 | 1 | true | 2022-05-25T13:58:58.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to see if vivado inferred blockram?<p>I have a following piece of code:</p>
<pre><code>module cw305_reg_aes #(
parameter pADDR_WIDTH = 21,
... |
72,322,106 | mapper overwriting resolved object<p>i have a mapper which uses resolve factory to turn a dto (with its id populated) to a domain entity. It all seems to work but in the generated mapper impl, it overwrites the resolved properties from whats in the dto.</p>
<p>mapper:</p>
<pre><code>@Mapper(componentModel = "spri... | <p>an <code>@ObjectFactory</code> is used to create the object. After that mapstruct will attempt to fill it with mapping actions.</p>
<h1>Disable automapping option</h1>
<p>You can add the following <code>@BeanMapping(ignoreByDefault = true)</code> to the mapping method to disable automapping for that mapping method. ... | mapper overwriting resolved object | java|spring-boot|mapstruct | 1 | 77 | 1 | 72,388,680 | 72,388,680 | 1 | true | 2022-05-20T16:31:04.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mapper overwriting resolved object<p>i have a mapper which uses resolve factory to turn a dto (with its id populated) to a domain entity. It all seems to wo... |
72,380,748 | What is the best way to produce events with current time timestamps in Flink?<p>I am trying to understand what is the best way to achieve current time timestamps using Flink when producing a new record to Kafka</p>
<p>Does flink automatically fill the produced event with metadata containing the timestamp of the current... | <p>When initializing a <code>KafkaSink</code> you have to provide a <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/connectors/datastream/kafka/#kafka-sink" rel="nofollow noreferrer"><code>KafkaRecordSerializationSchema</code></a>, in the <code>serialize</code> method you can set the timestamp ... | What is the best way to produce events with current time timestamps in Flink? | java|apache-flink | 0 | 77 | 2 | 72,389,520 | 72,389,520 | 1 | true | 2022-05-25T15:50:55.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best way to produce events with current time timestamps in Flink?<p>I am trying to understand what is the best way to achieve current time timest... |
72,391,755 | How can use foreach loop in js file?<pre><code>$(document).ready(function() {
$("form").on("click", ".addRow", function(){
var ttr = '<div class="row add tr">'+
'<div class="col">'+
... | <p>The issues is most likely because the <code>@foreach</code> is a Laravel instruction which won't be executed inside a .js file.</p>
<p>The simple way to do what you need is to use <code>clone()</code> to copy an existing row and then append() that to the DOM where required</p>
<pre class="lang-js prettyprint-overrid... | How can use foreach loop in js file? | javascript|jquery|laravel|laravel-8 | 1 | 77 | 1 | 72,392,677 | 72,392,677 | 1 | true | 2022-05-26T12:22:28.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can use foreach loop in js file?<pre><code>$(document).ready(function() {
$("form").on("click", ".addRow", function... |
72,795,592 | ConcurrentQueue with items that have sequence value<p>I'm using a <code>ConcurrentQueue<Result></code> to store results of a certain activity that occurs in my system (ASP.NET Core 6). It works well.</p>
<p>But now I have a new requirement: I need a <code>Result.Id</code> property - a <code>long</code> value, sim... | <p>Instead of assigning the Id when adding the items, you can assign it after you have finished adding items to the queue. You can use a <code>Select</code> with index, e.g.:</p>
<pre><code>public class Item {
public int Id { get; set; }
public int Value { get; set; }
}
public static void Main()
{
var q = ... | ConcurrentQueue with items that have sequence value | c#|concurrency|queue|thread-safety|concurrent-queue | 0 | 77 | 2 | 72,796,632 | 72,796,632 | 1 | true | 2022-06-29T03:48:14.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ConcurrentQueue with items that have sequence value<p>I'm using a <code>ConcurrentQueue<Result></code> to store results of a certain activity that occu... |
72,797,054 | How to assert on a number which is comma separated in cypress<p>While writing tests on an application I have came across a problem.</p>
<p>I need to fetch a number inside a span from the DOM and then assert if the number is between a specific range.
I can do it by using</p>
<pre class="lang-js prettyprint-override"><co... | <p>You can use the javascript <code>replace</code> method to remove the comma and then add a <code>+</code> to convert it into a number, like:</p>
<pre class="lang-js prettyprint-override"><code>cy.get('#my_selector')
.invoke('text')
.then((num) => {
cy.wrap(+num.replace(/,/g, ''))
.should('be.gt', low... | How to assert on a number which is comma separated in cypress | automated-tests|cypress | 0 | 77 | 2 | 72,797,093 | 72,797,093 | 1 | true | 2022-06-29T06:59:46.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assert on a number which is comma separated in cypress<p>While writing tests on an application I have came across a problem.</p>
<p>I need to fetch a ... |
72,824,556 | Adding items in the nested array of React state<p>I'm trying to add new items to an array of an object that resides in another object of a state. Pretty nested.</p>
<p>So I tried the following way...</p>
<pre><code>// The initial data
[options, setOptions] = useState({
name: 'Name goes here'
type: 'type goes he... | <p>here is sample of what you are trying to achieve .</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const d = {
name: 'Name goes here',
type: 'type goes here',
se... | Adding items in the nested array of React state | javascript|reactjs|react-hooks|javascript-objects|use-state | 1 | 77 | 1 | 72,824,622 | 72,824,622 | 1 | true | 2022-07-01T05:01:49.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding items in the nested array of React state<p>I'm trying to add new items to an array of an object that resides in another object of a state. Pretty nest... |
72,830,216 | Visibility change on hover using CSS variable<p>I have two html elements. The second element is hidden. But when hovering on first element the second one will be visible. These are two separate elements not linked. I'm trying to do this using css variables. On hover it's not getting visible.</p>
<p>CSS</p>
<pre><code>#... | <p>You can use the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator" rel="nofollow noreferrer">General Sibling Combinator</a> <code>~</code> to target the id you want to display on hovering your other ID.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true... | Visibility change on hover using CSS variable | html|css|variables | 1 | 77 | 3 | 72,831,081 | 72,831,081 | 1 | true | 2022-07-01T13:42:34.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visibility change on hover using CSS variable<p>I have two html elements. The second element is hidden. But when hovering on first element the second one wil... |
72,837,712 | getting image from session storage and display<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function previewImage() {
var thisElement = event.target
var file = thisElement.fi... | <p>Use localStorage instead of sessionStorage if it is across tabs. <a href="https://stackoverflow.com/questions/20325763/browser-sessionstorage-share-between-tabs/20325870#20325870">browser sessionStorage. share between tabs?</a></p>
<p><a href="https://codepen.io/noobplus/pen/QWmbpZr" rel="nofollow noreferrer">Codepe... | getting image from session storage and display | javascript|html | 1 | 77 | 1 | 72,838,590 | 72,838,590 | 1 | true | 2022-07-02T08:45:54.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getting image from session storage and display<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="sn... |
72,840,913 | Selecting Rows From a Table Based on A List<p>I have this table:</p>
<pre><code>col1 <- c("1","2", "3", "4", "5")
col1 <- sample(col1, 1000, replace=TRUE, prob=c(0.2, 0.2, 0.2, 0.2, 0.2))
col2 <- c("6","7", "8")
col2 <- sample(... | <p>Not sure if you mean all of the columns should have the value from the list index or just one column.</p>
<p>Here is one solution that returns the rows where all match</p>
<pre><code>my_select <- function(index){
where<- which(apply(table_1[2:4], 1, \(x) all(x %in% sample_list[[index]])) |> t())
where
... | Selecting Rows From a Table Based on A List | r|list|data-manipulation | 0 | 77 | 1 | 72,841,164 | 72,841,164 | 1 | true | 2022-07-02T17:01:34.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Selecting Rows From a Table Based on A List<p>I have this table:</p>
<pre><code>col1 <- c("1","2", "3", "4", "... |
72,835,828 | How can I compare 2 images and delete the last one if they are the same?<p>I made a video recorder that takes screenshots each frame and saves it in a temporary folder. When I press the Stop recording button it puts it all together in one video. I now need to have my program check the latest 2 screenshots it has taken ... | <p>I found the solution, to be able to check each 2 screenshots we need the function below.</p>
<pre><code>public static List<bool> GetHash(Bitmap bmpSource)
{
List<bool> lResult = new List<bool>();
//create new image with 128x128 pixel
Bitmap bmpMin = new B... | How can I compare 2 images and delete the last one if they are the same? | c#|motion-detection | 3 | 77 | 1 | 72,844,348 | 72,844,348 | 1 | true | 2022-07-02T01:17:00.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I compare 2 images and delete the last one if they are the same?<p>I made a video recorder that takes screenshots each frame and saves it in a tempor... |
72,839,642 | Load BigQuery table from local csv file<p>I have python script that insert json data into json file then from convert json to csv.</p>
<p>The problem I want to load BigQuery table from the local csv file relating to project file instead of Google Storage.</p>
<p>as it shown in the ref: <a href="https://cloud.google.com... | <p>I am not sure I understand what you would like to achieve by loading a constant csv file kept with the source code, but you might like to try <a href="https://googleapis.dev/python/bigquery/latest/generated/google.cloud.bigquery.client.Client.html#google.cloud.bigquery.client.Client.load_table_from_file" rel="nofoll... | Load BigQuery table from local csv file | python|google-cloud-platform|google-bigquery | 0 | 77 | 1 | 72,844,650 | 72,844,650 | 1 | true | 2022-07-02T14:05:33.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load BigQuery table from local csv file<p>I have python script that insert json data into json file then from convert json to csv.</p>
<p>The problem I want ... |
72,843,004 | how to swap two picker value when both of them are same in swiftUI<p>in this code I want to change two picker values when they are same to remain this two different from each other. I try to use swap but that's not working properly.</p>
<p>for example : when first picker value is one and second is two, when I try to ch... | <p>I think there is a connection that is missing. You state</p>
<blockquote>
<p>If my change in first picker cause two picker become equal, so immediately swap them!</p>
</blockquote>
<p><strong>If you swap 2 equal values you get 2 equal values.</strong></p>
<p>Assumption:</p>
<p>What It seems you want is a solution fo... | how to swap two picker value when both of them are same in swiftUI | swift|xcode|swiftui|swap|picker | -1 | 77 | 2 | 72,845,619 | 72,845,619 | 1 | true | 2022-07-02T23:15:25.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to swap two picker value when both of them are same in swiftUI<p>in this code I want to change two picker values when they are same to remain this two di... |
72,809,593 | Using adb monkey seed across different devices/emulators<p>I am working on automating monkey testing for Android apps.</p>
<p>My question is, if I obtain the seed when monkey causes a crash, what are the requirements to use the seed to reproduce the crash again across devices?</p>
<p>Like Android os version, exact emul... | <blockquote>
<p>Is it even possible?</p>
</blockquote>
<p>That depends entirely on the nature of the crash and the steps the monkey took to trigger it on the original device.</p>
<p>For example, if launching Screen 3 crashes immediately, so long as the monkey does something that triggers your app to navigate to Screen ... | Using adb monkey seed across different devices/emulators | android|random-seed|monkey|android-device-manager | 2 | 77 | 1 | 72,850,354 | 72,850,354 | 1 | true | 2022-06-30T02:05:59.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using adb monkey seed across different devices/emulators<p>I am working on automating monkey testing for Android apps.</p>
<p>My question is, if I obtain the... |
72,860,509 | Typescript Pick by dot notation<p>Is it possible to <code>Pick</code> nested object elements via dot notation?</p>
<pre><code>interface Test {
customer: {
email: string;
name: {
firstName: string;
};
};
};
type PickedTest = PickByDotNotation<Test, "customer.name.firstName"... | <p>Looks like a nice code interview question ;) This is possible using template literal types introduced already quite a while ago. Here is how:</p>
<pre><code>type PickByDotNotation<TObject, TPath extends string> =
// If TKey has a dot, split it into two: the part before the dot and after the dot
TPath exten... | Typescript Pick by dot notation | typescript | 1 | 77 | 1 | 72,861,205 | 72,861,205 | 1 | true | 2022-07-04T17:58:30.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript Pick by dot notation<p>Is it possible to <code>Pick</code> nested object elements via dot notation?</p>
<pre><code>interface Test {
customer: {... |
72,854,314 | How to get stories that are "In Progress" for a user using JIRA REST API?<p>I'm trying to get stories that are just in progress, using userName but it lists all the stories which were assigned to the user.</p>
<p>GET request :
URL - <a href="https://jira.com/rest/api/2/search?jql=assignee=spruthvi&fields=id,key,sta... | <p>The below rest api query will give the issues that are in - "In Progress" and assigned to a specific user. This is tested on Jira Data centre <em>V8.13.x</em></p>
<pre class="lang-html prettyprint-override"><code>https://<jira-url>/rest/api/2/search?jql=assignee=<assigneeID>+AND+status=%22In%20... | How to get stories that are "In Progress" for a user using JIRA REST API? | jira|jira-rest-api | 2 | 77 | 2 | 72,864,764 | 72,864,764 | 1 | true | 2022-07-04T09:10:37.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get stories that are "In Progress" for a user using JIRA REST API?<p>I'm trying to get stories that are just in progress, using userName but it lists ... |
72,864,817 | Pass array from C# to C++<p>I am trying to pass an array from C# to a C++ DLL and then print it from C++.</p>
<p>The C# code is the following:</p>
<pre><code>[DllImport("DLL1.dll", CallingConvention = CallingConvention.StdCall)]
public static extern void GMSH_PassVector([MarshalAs(UnmanagedType.SafeArray,Safe... | <p>I don't think the marshal mechanism is able to translate a int[] to a std::vector. It's better to use language base types. Change the C++ function as</p>
<p><code>void GMSH_PassVector(int * arr, int size)</code></p>
<p>and in C# you have to instantiate a
IntPtr to hold the address of the first element of the array.<... | Pass array from C# to C++ | c#|c++ | -1 | 77 | 1 | 72,865,875 | 72,865,875 | 1 | true | 2022-07-05T06:25:21.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass array from C# to C++<p>I am trying to pass an array from C# to a C++ DLL and then print it from C++.</p>
<p>The C# code is the following:</p>
<pre><code... |
72,857,502 | great_expectations create datasource of csv files on ADLS Gen2<p>I want to run <code>great_expectation</code> test suites against <code>csv</code> files in my ADLS Gen2. On my ADLS, I have a container called "data" in which I have a file at <code>mypath/test/mydata.csv</code>. I use a <code>InferredAssetAzure... | <p>I had a mistake in my regex ... with the following pattern it works flawlessly:</p>
<pre class="lang-yaml prettyprint-override"><code> default_regex:
group_names:
- data_asset_name
pattern: (.*\.csv)
</code></pre> | great_expectations create datasource of csv files on ADLS Gen2 | python|great-expectations | 0 | 77 | 1 | 72,869,059 | 72,869,059 | 1 | true | 2022-07-04T13:25:35.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
great_expectations create datasource of csv files on ADLS Gen2<p>I want to run <code>great_expectation</code> test suites against <code>csv</code> files in m... |
72,875,412 | Can my custom method satisfy Pragma Warnings?<p>For instance, when I do <code>string.IsNullOrWhiteSpace("")</code>, this satisfies the pragma warning:</p>
<blockquote>
<p>CS8604: Possible null reference argument</p>
</blockquote>
<p>Now, if I had defined an extension method called <code>"".IsNull()<... | <p>Yes - you want one of the <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/nullable-analysis" rel="nofollow noreferrer">attributes used by null-state static analysis</a>.</p>
<p>In this particular case, I think you want <code>NotNullWhen</code>:</p>
<pre class="lang-cs prettyprin... | Can my custom method satisfy Pragma Warnings? | c#|.net-6.0|visual-studio-2022|pragma | 1 | 77 | 1 | 72,875,477 | 72,875,477 | 1 | true | 2022-07-05T20:54:55.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can my custom method satisfy Pragma Warnings?<p>For instance, when I do <code>string.IsNullOrWhiteSpace("")</code>, this satisfies the pragma warni... |
72,876,464 | Position button inside a div to the bottom right<p>I would like the button to be positioned at the bottom right of the red colored <code>div</code>. I used <code>padding-bottom</code> and <code>margin-bottom</code> properties but that does not seem to work. Could anyone please help?</p>
<p><div class="snippet" data-lan... | <pre><code>.button {
float: right;
position:relative;
transform:translate(-5px,-25px); //x and y controls
}
</code></pre> | Position button inside a div to the bottom right | html|css | 0 | 77 | 3 | 72,876,623 | 72,876,623 | 1 | true | 2022-07-05T23:24:37.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Position button inside a div to the bottom right<p>I would like the button to be positioned at the bottom right of the red colored <code>div</code>. I used <... |
72,901,939 | CucumberBackendException: No test instance<p>I have a Spring Boot 2.7.1 (but same happens with 2.6.4) project using Cucumber BOM 7.4.1.</p>
<pre><code> testImplementation(platform("io.cucumber:cucumber-bom:7.4.1"))
testImplementation group: 'io.cucumber', name: 'cucumber-java8'
testImplementation g... | <p>After some investigations in debug mode, I finally understood. I believe it's a change brought in the 7.4.1 cucumber version, as it's not happening in previous versions. I've reported it here : <a href="https://github.com/cucumber/cucumber-jvm/issues/2584" rel="nofollow noreferrer">https://github.com/cucumber/cucumb... | CucumberBackendException: No test instance | java|spring-boot|cucumber|cucumber-spring | 0 | 77 | 1 | 72,901,940 | 72,901,940 | 1 | true | 2022-07-07T17:19:06.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CucumberBackendException: No test instance<p>I have a Spring Boot 2.7.1 (but same happens with 2.6.4) project using Cucumber BOM 7.4.1.</p>
<pre><code> te... |
72,840,462 | Get files from FormData object in laravel 5.8 sent over via Axios in Vue<p>I have a <code>Laravel & Vue</code> application where I want to upload files along with other data via <code>axios</code> but when I send the form, I do not see the files there in <code>laravel</code>.</p>
<p>Here is my <code>HTML</code> for... | <h2>Issue 0 : <code>this.form.amount</code> must be moved out of <code>this.form</code>.</h2>
<p><strong>Solution :</strong> In order to fix <em>issue 1</em>, we are going to assume it was moved to <code>this.amount</code>.</p>
<h2>Issue 1 : <code>FormData</code> cannot be used inside <code>JSON</code>.</h2>
<p><strong... | Get files from FormData object in laravel 5.8 sent over via Axios in Vue | ajax|file-upload|vuejs2|axios|laravel-5.8 | 2 | 77 | 1 | 72,912,567 | 72,912,567 | 1 | true | 2022-07-02T15:55:42.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get files from FormData object in laravel 5.8 sent over via Axios in Vue<p>I have a <code>Laravel & Vue</code> application where I want to upload files a... |
72,910,215 | Changing the Label1.Text of Form1 from Form2 Button1_Click in C#<p>I am trying to change the <code>Label1.Text</code> on my <code>Form1</code> (owner) by <code>Button1_Click</code> triggered from <code>Form2</code>, but there are no changes on <code>Label1.Text</code>. It is still empty string (""). I have do... | <p>There are several ways you can do this. Passing the form or the control/variable you want to access is probably the best approach as it does not unnecessarily expose the passed control/variable and everything can be kept private.</p>
<p>However, this can be simplified if you choose to expose the control/variable in ... | Changing the Label1.Text of Form1 from Form2 Button1_Click in C# | c#|winforms | 0 | 77 | 4 | 72,918,730 | 72,918,730 | 1 | true | 2022-07-08T10:39:59.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing the Label1.Text of Form1 from Form2 Button1_Click in C#<p>I am trying to change the <code>Label1.Text</code> on my <code>Form1</code> (owner) by <co... |
72,913,784 | Read xls file containing xml data in python<p>An xls file has xml data inside it. Top portion of the file is shown below:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:of... | <p>Your file is a valid xml file. I know no automatic converter for that but Excel, but it can easily be parsed as a mere xml file, for example with BeautifulSoul.</p>
<p>If the internal format is simple enough, you could just process the <code>Worksheet</code>, <code>row</code> and <code>cell</code> tags to convert it... | Read xls file containing xml data in python | python|pandas|dataframe | 0 | 77 | 2 | 72,920,221 | 72,920,221 | 1 | true | 2022-07-08T15:34:26.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Read xls file containing xml data in python<p>An xls file has xml data inside it. Top portion of the file is shown below:</p>
<pre><code><?xml version=&qu... |
72,927,911 | NestJS: only use webpack for production build<p>When using NestJS CLI to build apps, it uses WebPack by default - which can be changed in nest-cli.json.</p>
<p>However, WebPack takes time, and most build are for development purposes, on developers' laptops. Can I set Nest CLI to only use WebPack when building for produ... | <p>The easiest way to do this is by passing <code>--tsc</code> and <code>--webpack</code> along with <code>nest start</code> and <code>nest build</code> commands like this:</p>
<pre class="lang-bash prettyprint-override"><code>nest start --tsc // start with typescript
nest start --webpack // start with webpack
</code><... | NestJS: only use webpack for production build | javascript|nestjs | 1 | 77 | 1 | 72,928,206 | 72,928,206 | 1 | true | 2022-07-10T10:49:52.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NestJS: only use webpack for production build<p>When using NestJS CLI to build apps, it uses WebPack by default - which can be changed in nest-cli.json.</p>
... |
72,929,113 | Upload file button for POST methods in Swagger for a ASP.NET Core 6 Web API?<p>I'm working on an ASP.NET Core 6 Web API. I've got Swagger configured like so in my <code>Program.cs</code>:</p>
<pre><code>builder.Services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo
{
Title = "... | <p>just do like this.
you don't need FromForm to be specified.</p>
<pre><code>[HttpPost]
[Route("upload")]
public IActionResult Post(IFormFile file)
{
}
</code></pre> | Upload file button for POST methods in Swagger for a ASP.NET Core 6 Web API? | swagger|asp.net-core-webapi | 0 | 77 | 1 | 72,929,348 | 72,929,348 | 1 | true | 2022-07-10T14:07:47.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Upload file button for POST methods in Swagger for a ASP.NET Core 6 Web API?<p>I'm working on an ASP.NET Core 6 Web API. I've got Swagger configured like so ... |
72,937,417 | Cant set state hook inside useImperativeHandle hook?<p>I want to call child function from parent and set state of a child's hook ,but I cant able to success it ,simple code is below ,setstate isnt working inside useImperativeHandle.Any help is appreciated ,thx..</p>
<pre><code> const child = forwardRef((props,ref) =&g... | <p>You should define a function to update the state and return that function via <code>useImperativeHandle</code>.</p>
<pre><code>const updatePagerTotalCount = (param) => {
setPagerTotalCount(param);
};
useImperativeHandle(ref, () => ({
childFunction1: updatePagerTotalCount;
}));
</code></pre>
<p>Now wit... | Cant set state hook inside useImperativeHandle hook? | reactjs|react-hooks | 0 | 77 | 1 | 72,937,611 | 72,937,611 | 1 | true | 2022-07-11T10:53:53.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant set state hook inside useImperativeHandle hook?<p>I want to call child function from parent and set state of a child's hook ,but I cant able to success ... |
72,930,844 | When I run "Docker ps" I can't see some container. What wrong with me?<p>I am testing docker with official doc. just following official doc.
I am using official code</p>
<p><a href="https://github.com/docker/getting-started/tree/master/app" rel="nofollow noreferrer">https://github.com/docker/getting-started/tree/master... | <p>You can run the docker command in foreground to see the logs (without the <code>d</code> flag):</p>
<pre><code>docker run -p 3000:3000 firstcontainer -> my simple app
</code></pre>
<p>and see what's the error</p> | When I run "Docker ps" I can't see some container. What wrong with me? | docker|containers | -1 | 77 | 2 | 72,938,950 | 72,938,950 | 1 | true | 2022-07-10T18:18:46.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When I run "Docker ps" I can't see some container. What wrong with me?<p>I am testing docker with official doc. just following official doc.
I am using offic... |
72,942,625 | How to unnest a single column from a nested list without unnesting all<p>I have a data frame (tibble) with multiple nested columns nested in a single list, like this example</p>
<pre><code>nested= mtcars%>%
nest(extra = c("drat", "wt" , "qsec" ,"vs", "am", &qu... | <p>You can use <code>map()</code> to grab out that column and then unnest that.</p>
<pre class="lang-r prettyprint-override"><code>nested %>%
mutate(qsec = map(extra, "qsec")) %>%
unnest_longer(qsec)
</code></pre>
<p>Notice though that this might create problems depending on what you do. This is b... | How to unnest a single column from a nested list without unnesting all | r|nested|tidyr | 1 | 77 | 2 | 72,942,766 | 72,942,766 | 1 | true | 2022-07-11T17:42:58.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to unnest a single column from a nested list without unnesting all<p>I have a data frame (tibble) with multiple nested columns nested in a single list, l... |
72,945,030 | React hooks - Update item in list after edit<p>I'm new to React Hooks. I am trying to make a small crud app, with add, edit, delete.
I have some issues getting my edit function to work. When I click the edit, the input will add the values of the element that is clicked. But how do I update the item?</p>
<pre><code>cons... | <p>So acc to your code when you click on the edit button, this function gets triggered</p>
<pre><code>const editItem = (item: any) => {
setFile(undefined);
setComment(item.comment);
setAmount(item.amount);
};
</code></pre>
<p>Now this function is updating the state and inside the input tags you are using... | React hooks - Update item in list after edit | javascript|reactjs|react-hooks|jsx|crud | 1 | 77 | 3 | 72,945,152 | 72,945,152 | 1 | true | 2022-07-11T21:54:29.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React hooks - Update item in list after edit<p>I'm new to React Hooks. I am trying to make a small crud app, with add, edit, delete.
I have some issues getti... |
72,946,492 | How to fix this "Invalid expression" term and syntax error in C#<p>I have an error in the code below please the best solution.</p>
<p>I'm using visual studio 2012</p>
<p>Errors are as follows:</p>
<blockquote>
<p>Invalid expression term '.'</p>
<p>Syntax error, ':' expected</p>
</blockquote>
<p>Thanks</p>
<pre><code>pu... | <p>The "?." (null-conditional operator) syntax is available in C# 6 and higher. Visual Studio 2012 supports C# 5 only (at least out-of-the-box, see below).</p>
<p>You might replace the syntax by an if statement:</p>
<pre><code>if (OnJobCreated != null)
OnJobCreated(this, new JobCreatedEventArgs {Id = id,... | How to fix this "Invalid expression" term and syntax error in C# | c# | -4 | 77 | 2 | 72,949,613 | 72,949,613 | 1 | true | 2022-07-12T02:40:51.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix this "Invalid expression" term and syntax error in C#<p>I have an error in the code below please the best solution.</p>
<p>I'm using visual studio... |
72,953,277 | MassTransit Kafka ConsumeException<p>How to catch and handle exception when an invalid json was sent?</p>
<blockquote>
<p>Confluent.Kafka.ConsumeException: Local: Value deserialization error
---> System.Text.Json.JsonException: '{' is an invalid end of a number. Expected a delimiter. Path: $ | LineNumber: 0 |
BytePo... | <p>There isn't a way currently. This is a known issue, but no solution yet.</p> | MassTransit Kafka ConsumeException | apache-kafka|masstransit | 0 | 77 | 1 | 72,954,618 | 72,954,618 | 1 | true | 2022-07-12T13:39:44.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MassTransit Kafka ConsumeException<p>How to catch and handle exception when an invalid json was sent?</p>
<blockquote>
<p>Confluent.Kafka.ConsumeException: L... |
72,958,788 | Comparing a file with a reference file with Python<p>I created fictional Data Frames that comprehends my doubt.</p>
<p>I have two excel spreadsheets that I want to compare, containing the data as follows:</p>
<p><strong>DataFrame to compare</strong></p>
<div class="s-table-container">
<table class="s-table">
<thead>
<t... | <p>As I understand your problem, you have a reference dataframe which contains correct product information and you want to compare this reference data against a second dataframe. In the second dataframe you want to insert a new column which indicates the result of this evaluation.<br />
So Given the reference datafram... | Comparing a file with a reference file with Python | python|pandas|openpyxl | 0 | 77 | 2 | 72,959,601 | 72,959,601 | 1 | true | 2022-07-12T21:54:19.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Comparing a file with a reference file with Python<p>I created fictional Data Frames that comprehends my doubt.</p>
<p>I have two excel spreadsheets that I w... |
72,967,906 | Visualize using the "ProgressBar" page loading and updating in CefSharp<p>Visualize using the <code>ProgressBar</code> page loading and updating in <code>CefSharp</code>.<br />
I try to do it, but nothing works.</p>
<p>Set breakpoints in the <code>DownloadHandlerSefSharp.cs</code> class<br />
in the methods:</p>
<ul>
<... | <p>IDownloadHandler will provide notifications for downloading of files, not page load notifications. Your example loads GitHub, navigate to a repository and download it's source, your methods should then be called.</p>
<p>For page load progress notifications use <a href="http://cefsharp.github.io/api/102.0.x/html/M_C... | Visualize using the "ProgressBar" page loading and updating in CefSharp | c#|winforms|chromium|cefsharp | 0 | 77 | 1 | 72,971,699 | 72,971,699 | 1 | true | 2022-07-13T14:22:01.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visualize using the "ProgressBar" page loading and updating in CefSharp<p>Visualize using the <code>ProgressBar</code> page loading and updating in <code>Cef... |
72,972,435 | How do I use the snippet() function using a FTS5 virtual table in SQLite?<p>In the <a href="https://www.sqlite.org/fts5.html" rel="nofollow noreferrer">SQLite documentation for FTS5</a> it is claimed that 5 parameters must be passed to the snippet function:</p>
<blockquote>
<p>The snippet() function is similar to highl... | <p>What I failed to understand was that I also need to pass the table name as the first parameter, like this:</p>
<pre><code>snippet(versesfts, 1, '<b>', '</b>', '...', 8)
</code></pre>
<p>Hopefully this will save someone a couple of hours.</p> | How do I use the snippet() function using a FTS5 virtual table in SQLite? | sqlite|full-text-search|code-snippets|fts5 | 0 | 77 | 1 | 72,972,436 | 72,972,436 | 1 | true | 2022-07-13T20:43:34.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I use the snippet() function using a FTS5 virtual table in SQLite?<p>In the <a href="https://www.sqlite.org/fts5.html" rel="nofollow noreferrer">SQLit... |
72,980,743 | How to fix error in sql "Execution finished with errors. Result: near "(": syntax error"?<p>How to remove all characters from / to &.</p>
<pre><code>UPDATE bal SET Perevod=substr(Perevod, INSTR(Perevod, '/.+&')-1)
WHERE INSTR(Perevod, '/.+&')>0;
</code></pre> | <p>You can use this because I believe there is no LEFT function in SQLite:</p>
<pre><code>UPDATE bal
SET Perevod = substr(Perevod, 1, INSTR(Perevod, '/')-1)
WHERE INSTR(Perevod, '/')>0;
</code></pre>
<p><a href="https://dbfiddle.uk/?rdbms=sqlite_3.27&fiddle=3ae4e7fcc759b067ea876ead5394f292" rel="nofollow norefer... | How to fix error in sql "Execution finished with errors. Result: near "(": syntax error"? | sql|database|sqlite | -2 | 77 | 1 | 72,980,817 | 72,980,817 | 1 | true | 2022-07-14T12:45:15.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix error in sql "Execution finished with errors. Result: near "(": syntax error"?<p>How to remove all characters from / to &.</p>
<pre><code>UPDA... |
72,977,723 | Rails Master Key on GitHub Actions causes ActiveSupport::MessageEncryptor::InvalidMessage<p>Anyone have experience with using <code>RAILS_MASTER_KEY</code> env with GH Actions?
Recently switched to Rails 7 from 6. Using the credentials.yml.enc to store the ActiveRecord encryption stuff. Have set <code>RAILS_MASTER_KEY<... | <p>The fix I found for this was adding the following to <code>test.rb</code> inside <code>config/environments</code></p>
<pre class="lang-rb prettyprint-override"><code> config.active_record.encryption.primary_key = "test"
config.active_record.encryption.deterministic_key = "test"
config.active... | Rails Master Key on GitHub Actions causes ActiveSupport::MessageEncryptor::InvalidMessage | ruby-on-rails|github | 1 | 77 | 1 | 72,990,300 | 72,990,300 | 1 | true | 2022-07-14T08:45:10.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails Master Key on GitHub Actions causes ActiveSupport::MessageEncryptor::InvalidMessage<p>Anyone have experience with using <code>RAILS_MASTER_KEY</code> e... |
72,992,544 | igraph in R: efficiently count number of edges between multiple sets of vertices<p>I want to calculate a matrix of edge counts for a given graph and partition of this graph into groups. The solution I have at the moment does not scale for large graphs and I wonder if it is possible to speed up the computation.</p>
<p>I... | <p>One way is to contract the two sets into single vertices, then count edges between them.</p>
<p>Contract the two sets, obtaining vertex id 1 for the first and 2 for the second:</p>
<pre class="lang-r prettyprint-override"><code>CG <- contract(G, m)
</code></pre>
<p>Now count <code>1 -> 2</code> and <code>2 -&g... | igraph in R: efficiently count number of edges between multiple sets of vertices | r|performance|optimization|cluster-analysis|igraph | 3 | 77 | 2 | 72,997,544 | 72,997,544 | 1 | true | 2022-07-15T10:24:01.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
igraph in R: efficiently count number of edges between multiple sets of vertices<p>I want to calculate a matrix of edge counts for a given graph and partitio... |
73,009,650 | ReactJS: .useSelector(...) is undefined<p>I've been following a tutorial for a while and ran into a wall trying to figure this out. Both figuratively and literally.</p>
<p>In a <code>Dashboard</code> page, I try to use <code>useSelector()</code> to get the state of the <code>goalSlice</code> component. This component i... | <p>It should be</p>
<pre><code>const { goals, isLoading, isError, message } = useSelector((state) => state.goal)
</code></pre>
<p>since you have given in your store as <code>goal</code></p> | ReactJS: .useSelector(...) is undefined | javascript|node.js|reactjs|redux | 0 | 77 | 1 | 73,009,869 | 73,009,869 | 1 | true | 2022-07-17T06:27:09.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReactJS: .useSelector(...) is undefined<p>I've been following a tutorial for a while and ran into a wall trying to figure this out. Both figuratively and lit... |
73,013,791 | How to remove item form array?<p>I have the following array in my React naitve app.</p>
<pre><code> const [items, setItems] = useState([
{ answers: [{ id: 1 }, { id: 2 }] },
{ answers: [{ id: 1 }] },
{ answers: [{ id: 1 },] },
]);
</code></pre>
<p>I want to delete item from first row with <em><strong>id ... | <p>I've expanded @sm3sher answer to allow removing answer ids at any index.</p>
<pre><code>const onDelete = useCallback((answerId=2,itemIndex=0)=>{
const newItems = [...items];
let currentItem = newItems[itemIndex]
currentItem.answers = currentItem.answers.filter(({id})=> id !== answerId)
newItems[itemInd... | How to remove item form array? | javascript|react-native | 0 | 77 | 4 | 73,014,090 | 73,014,090 | 1 | true | 2022-07-17T17:07:25.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove item form array?<p>I have the following array in my React naitve app.</p>
<pre><code> const [items, setItems] = useState([
{ answers: [{ i... |
73,007,847 | xcb: wait/poll for reply OR event<p>XCB provides functions <code>xcb_{wait,poll}_for_{reply,event}</code>, but not <code>xcb_{wait,poll}_for_reply_or_event</code>, which would be useful in the following scenario:</p>
<ol>
<li>Send a batch of requests.</li>
<li>Wait for replies. While waiting, handle incoming events.</l... | <p>The problem can be solved by <code>poll</code>ing the underlying socket as described in the question, but with <code>xcb_poll_for_event</code> in step 2 replaced by <code>xcb_poll_for_queued_event</code>. (This might still be broken in multithreaded scenarios.)</p>
<p>Alternatively, we can avoid needing to <code>pol... | xcb: wait/poll for reply OR event | c|x11|xcb | 1 | 77 | 1 | 73,015,474 | 73,015,474 | 1 | true | 2022-07-16T21:45:39.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
xcb: wait/poll for reply OR event<p>XCB provides functions <code>xcb_{wait,poll}_for_{reply,event}</code>, but not <code>xcb_{wait,poll}_for_reply_or_event</... |
73,015,262 | Is it possible to install different versions of a library in one place?<h3>The Requirement</h3>
<p>I want to have multi versions of a library installed in one place(e.g. the default system prefix path) using CMake to be used like: <code>find_package(Package 1.0.0 REQUIRED)</code>.</p>
<ul>
<li>Why just don't set some p... | <p>You are working in Config Mode of <code>find_package</code>, so the search mode <a href="https://cmake.org/cmake/help/latest/command/find_package.html#version-selection:%7E:text=%3Cprefix%3E/(lib/%3Carch,CMake)/%20(W/U)" rel="nofollow noreferrer">according to the documents</a> is like:</p>
<pre class="lang-bash pret... | Is it possible to install different versions of a library in one place? | c++|cmake | 1 | 77 | 1 | 73,020,965 | 73,020,965 | 1 | true | 2022-07-17T20:49:16.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to install different versions of a library in one place?<h3>The Requirement</h3>
<p>I want to have multi versions of a library installed in on... |
73,025,014 | How to return status code in Python without actually exiting the process?<p>I'm trying to <strong>return a status code without exiting the process</strong> of my script. Is there an <strong>equivalent to sys.exit() that does not stop execution ?</strong></p>
<p><strong>What I'd like to happen :</strong></p>
<p>If no ex... | <p>Wait until the end of your loop to return the 1 exit code. I'd do it like:</p>
<pre><code>def process_pdf_dir() -> int:
ret = 0
for file in os.listdir('pdf_files/'):
if file.endswith('.pdf'):
if not anonymiser(file):
# remember to return a warning
ret ... | How to return status code in Python without actually exiting the process? | python|bash|exit-code|sys|return-code | 1 | 77 | 1 | 73,025,072 | 73,025,072 | 1 | true | 2022-07-18T15:41:18.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return status code in Python without actually exiting the process?<p>I'm trying to <strong>return a status code without exiting the process</strong> o... |
73,028,941 | How Do i position this H1 element in the top right<p><strong>I Want to make it so the 100 appears in the top right corner of my div, I have it aligned to the right but it still appears on the bottom. Is there an easy way for me to fix it in CSS?</strong> I want it to look like the The character select cards in destiny ... | <p>The code is not clean (from a CSS perspective), however I would suggest doing <code>display:flex;</code>, <code>justify-content:space-between;</code> and <code>align-items:center;</code> on titan div, then add the first 2 heading in a div.<br><br>
Further improvements I would do is to get rid of padding from Heading... | How Do i position this H1 element in the top right | html|css | 1 | 77 | 3 | 73,029,038 | 73,029,038 | 1 | true | 2022-07-18T21:44:12.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Do i position this H1 element in the top right<p><strong>I Want to make it so the 100 appears in the top right corner of my div, I have it aligned to the... |
73,030,384 | Visual Studio Microsoft Identity Platform Configuration Stuck Loading<p>I’ve created an asp.net core mvc web app through a visual studio template and selected Microsoft identity platform as an authentication type since i'm trying to connect this to an azure b2c. I have not made any changes to the code, and I’m fully lo... | <p>This issue maybe related to permission. I have some steps you can try to solve it.</p>
<p><strong>Steps</strong></p>
<ol>
<li><p>Use current account to log in azure portal. And try to check whether you can find some app registrations items.</p>
</li>
<li><p>If you can, it seems your visual studio have some issue, yo... | Visual Studio Microsoft Identity Platform Configuration Stuck Loading | c#|visual-studio|asp.net-core-mvc|azure-b2c | 1 | 77 | 1 | 73,032,817 | 73,032,817 | 1 | true | 2022-07-19T02:10:58.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio Microsoft Identity Platform Configuration Stuck Loading<p>I’ve created an asp.net core mvc web app through a visual studio template and selecte... |
72,978,009 | Visual Studio 2022 - Error everytime any string has special characters (python)<p>I can't run code in vs2022, if any string has special characters, not even a single print (I work with python).
And this is all it takes to causes error:</p>
<pre><code>print("Všetko dobré ľščťž")
</code></pre>
<p>And this is a ... | <p>So problem wasn't in Visual Studio itself, but in python compiler. Turn out python 3.9 is not doing great with special characters.</p>
<p>So I installed python 3.7. and everything is going fine.</p> | Visual Studio 2022 - Error everytime any string has special characters (python) | python|encoding|visual-studio-2022 | 0 | 77 | 1 | 73,032,847 | 73,032,847 | 1 | true | 2022-07-14T09:10:14.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio 2022 - Error everytime any string has special characters (python)<p>I can't run code in vs2022, if any string has special characters, not even ... |
72,964,318 | Wrapping a C++ library using msl-loadlib in python<p>I am currently writing a wrapper for a C++ library. The library is a 32-bits dll file and I'm using 64-bits so I'm using <code>msl-loadlib</code>. I have a problem wrapping a function that has pointer parameters.</p>
<p>Here is the header of the function in C++</p>
<... | <p>I'm ignoring <code>msl-loadlib</code> as extraneous to the problem of calling ctypes correctly.</p>
<p>Here's an example of calling the function shown. The <code>YData</code> needs to be an array of 3 double* and then each of those pointers needs to be initialized with the next dimension of the array. Note this pa... | Wrapping a C++ library using msl-loadlib in python | python|c++|ctypes | 0 | 77 | 1 | 73,041,001 | 73,041,001 | 1 | true | 2022-07-13T09:55:08.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wrapping a C++ library using msl-loadlib in python<p>I am currently writing a wrapper for a C++ library. The library is a 32-bits dll file and I'm using 64-b... |
72,954,090 | How to enable SendGrid Reserved Substitution Tags - Python API(Unsubscribe and Display mail in browser)?<p>I use SendGrid API in Python to send emails when for the Email body I use HTML file that I prepare in advance.
I have two problems that are similar (In both I use substitution tags):</p>
<ol>
<li>I have a link to ... | <p>So off the top, unfortunately the Weblink substitution tag is only available when sending email using Marketing Campaigns, not when using any other SendGrid substitution methods.</p>
<p>In regards to the unsubscribe substitution, there are a few ways to do this with SendGrid but all of them require you first create ... | How to enable SendGrid Reserved Substitution Tags - Python API(Unsubscribe and Display mail in browser)? | python|html|email|sendgrid|sendgrid-templates | 0 | 77 | 1 | 73,110,750 | 73,110,750 | 1 | true | 2022-07-12T14:36:48.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to enable SendGrid Reserved Substitution Tags - Python API(Unsubscribe and Display mail in browser)?<p>I use SendGrid API in Python to send emails when f... |
72,979,355 | Does Homebrew cask keep apps updated in "real-time"?<p>For instance, let's say that I install Spotify with Homebrew. If a Spotify update comes out, will it also be available with brew upgrade the same way and day as if I were using the app installed via the Spotify website?</p> | <blockquote>
<p>[...] will it also be available with brew upgrade the same way and day [...]</p>
</blockquote>
<p>No, you will have to run in the command line:</p>
<pre><code>brew upgrade
</code></pre>
<p>to upgrade and wait a few days that someone push an upgrade into <a href="https://github.com/Homebrew/homebrew-cask... | Does Homebrew cask keep apps updated in "real-time"? | macos|homebrew|homebrew-cask | 2 | 77 | 1 | 73,115,104 | 73,115,104 | 1 | true | 2022-07-14T10:55:07.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does Homebrew cask keep apps updated in "real-time"?<p>For instance, let's say that I install Spotify with Homebrew. If a Spotify update comes out, will it a... |
72,888,184 | c# sum of the sums in the array<p>Got stuck on quite simple problem in my code. I need to count what I would call a nested sums of an array. Let's take as an example the array:
<code>[1,2,2,3,6]</code>
I want to sum them as:</p>
<pre><code>0 + 1 = 1
1 + 2 = 3
1 + 2 + 2 = 5
1 + 2 + 2 + 3 = 8
1 + 2 + 2 + 3 + 6 = 14
sum ... | <p>You can do this much more efficiently and more easily, by multiplying each value by its reversed index + 1</p>
<p>For example, using LINQ</p>
<pre class="lang-cs prettyprint-override"><code>int[] arr = { 1, 2, 2, 3, 6 };
var result = arr.Reverse().Select((val, i) => val * (i + 1)).Sum();
</code></pre>
<p>Note tha... | c# sum of the sums in the array | c# | 1 | 77 | 3 | 72,888,541 | 72,888,541 | 1 | true | 2022-07-06T18:13:41.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c# sum of the sums in the array<p>Got stuck on quite simple problem in my code. I need to count what I would call a nested sums of an array. Let's take as an... |
72,874,720 | Inverted Rounded Rectangle Swift<p>How would I draw an inverted rounded rectangle as shown below in Swift using a UIBezierPath? To clarify, I want to ONLY draw the shape in black.</p>
<p><a href="https://i.stack.imgur.com/jDzRl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jDzRl.png" alt="Inverted ... | <p>While most of us would simply put a white view with rounded corners on top of the black view (it is simpler and it more accurately reflects the visual result), if you really want to draw that shape, create a <code>UIBezierPath</code> that consists of the upper left arc, the upper right arc, and the add lines to the ... | Inverted Rounded Rectangle Swift | ios|swift|uibezierpath | -2 | 77 | 2 | 72,878,309 | 72,878,309 | 1 | true | 2022-07-05T19:42:08.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inverted Rounded Rectangle Swift<p>How would I draw an inverted rounded rectangle as shown below in Swift using a UIBezierPath? To clarify, I want to ONLY dr... |
72,935,128 | Why is download button disabled after aspx page is downloaded as a file on my machine?<p>I have downloaded an aspx page with a .file extension using python. The said file opens up in the web browser however the download button is disabled.
This is the URL from where I have downloaded the aspx page on my local machine: ... | <p>Well, it is a HUGE, LARGE, VAST, Mount Everest of a difference to pull some existing aspx page from a existing site.</p>
<p>that web page will be of NEAR ZERO use!!!</p>
<p>aspx web pages are custom markup, and will have c#, or vb.net code behind (code that you can't see, nor get). IIS and the .net framework will pr... | Why is download button disabled after aspx page is downloaded as a file on my machine? | html|asp.net|download|asp.net-webpages | 0 | 77 | 1 | 72,935,455 | 72,935,455 | 1 | true | 2022-07-11T07:35:49.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is download button disabled after aspx page is downloaded as a file on my machine?<p>I have downloaded an aspx page with a .file extension using python. ... |
72,870,609 | Rename file name by removing given prefix pattern<p>I have the following files in txt format:</p>
<p><a href="https://i.stack.imgur.com/ol4dv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ol4dv.png" alt="enter image description here" /></a></p>
<p><strong>Expected File Format</strong>: I want to re... | <p>You can use <code>Dict</code> for saving the count of repeating each <code>file_name</code> and use saving count in <code>Dict</code> for renaming.</p>
<pre><code>import os
import re
pattern = "a1"
path = "Files/"
dct = {} # <- adding th... | Rename file name by removing given prefix pattern | python|regex | 1 | 77 | 1 | 72,872,348 | 72,872,348 | 1 | true | 2022-07-05T13:51:50.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rename file name by removing given prefix pattern<p>I have the following files in txt format:</p>
<p><a href="https://i.stack.imgur.com/ol4dv.png" rel="nofol... |
72,928,577 | Pandoc bibliography : why is nocite not working?<p>I am trying to render a markdown document with Pandoc and leverage its bibliography capabilities.
My references are listed in a <code>main.bib</code> file, and citation rendering works flawlessly with <code>--bibliography=main.bib --citeproc</code> and the cited refere... | <p>Based on your minimal reproducible example, I could verify your problem.<br />
What did the trick for me, was adding a metadata-file <code>metadata.yaml</code> with the following content (based on the documentation):</p>
<pre><code>---
nocite: |
@*
...
</code></pre>
<p>... and added it to the compile command:</p>
... | Pandoc bibliography : why is nocite not working? | pdf|latex|markdown|pandoc|pandoc-citeproc | 1 | 77 | 1 | 73,124,819 | 73,124,819 | 1 | true | 2022-07-10T12:48:04.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandoc bibliography : why is nocite not working?<p>I am trying to render a markdown document with Pandoc and leverage its bibliography capabilities.
My refer... |
72,900,418 | What is the best way to create an object from each element in a python (numpy) array?<p>I have an array of numbers:</p>
<pre><code>num_arr = np.array([1,2,3,4,5,6,7])
</code></pre>
<p>I need to transform each number into an object:</p>
<pre><code>class MyObj:
def __init__(self, x):
self.val = x
</code></pre... | <p>To map over a numpy array, there is np.vectorize</p>
<pre class="lang-py prettyprint-override"><code>class MyObj:
def __init__(self, x):
self.val = x
num_arr = np.array([1,2,3,4,5,6,7])
vfunc = np.vectorize(MyObj)
result = vfunc(num_arr)
</code></pre>
<p><strong>Edit</strong>:</p>
<p>vectorize is not fo... | What is the best way to create an object from each element in a python (numpy) array? | python|python-3.x|numpy|oop|numpy-ndarray | 0 | 77 | 3 | 72,900,489 | 72,900,489 | 1 | true | 2022-07-07T15:20:16.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best way to create an object from each element in a python (numpy) array?<p>I have an array of numbers:</p>
<pre><code>num_arr = np.array([1,2,3,... |
73,012,261 | complex json file to csv in python<p>I need to convert a complex json file to csv using python, I tried a lot of codes without success, I came here for help,I updated the question, the JSON file is about a million,I need to convert them to csv format</p>
<p>csv file</p>
<pre><code>{
"_id": {
"... | <pre><code>import pandas as pd
null = 'null'
data = {
"_id": {
"$oid": "2e3230s314i5dc07e118c8bo"
},
"add": {
"address": {
"address_type": "Door",
"address": "kvartira 14",
... | complex json file to csv in python | python|json|pandas|csv | -1 | 77 | 1 | 73,012,864 | 73,012,864 | 1 | true | 2022-07-17T13:40:12.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
complex json file to csv in python<p>I need to convert a complex json file to csv using python, I tried a lot of codes without success, I came here for help,... |
72,958,698 | Adding group information to 3d plot in FactoMineR<p>My code this is what Im running</p>
<pre><code>library(FactoMineR); library(factoextra)
res.pca <- PCA(t(data),ncp = 10, graph = FALSE)
res.hcpc <- HCPC(res.pca, graph = FALSE)
fviz_dend(res.hcpc,
cex = 0.7, # Label size
... | <p>Here's a toy example of how you can plot the 3D map for hierarchical clustering on principle component (HCPC).</p>
<ol>
<li>add desired individual labels as rownames</li>
</ol>
<pre><code>library(FactoMineR)
iris <- data(iris)
rownames(iris) <- sprintf("A%03d", 1:150)
head(iris)
Sepal.Length S... | Adding group information to 3d plot in FactoMineR | r|pca|factominer | 0 | 77 | 1 | 73,001,831 | 73,001,831 | 1 | true | 2022-07-12T21:43:29.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding group information to 3d plot in FactoMineR<p>My code this is what Im running</p>
<pre><code>library(FactoMineR); library(factoextra)
res.pca <- PC... |
72,940,647 | C++ : curly brackets with std library type<p>I try to understand the docs for <code>std::less</code>, where the following example is given for the usage with a template.</p>
<pre><code>#include <functional>
#include <iostream>
template <typename A, typename B, typename C = std::less<>>
bool fu... | <p>This demo-code suffers from so-called <em>'uniform initialisation'</em> (broken by design, be careful with its use especially in template code!), classic way to write the same code <em>before</em> uniform initialisation is:</p>
<pre><code>std::less<int>()(5, 5.6); // others analogously
</code></pre>
<p><code>s... | C++ : curly brackets with std library type | c++|std | 1 | 77 | 3 | 72,940,901 | 72,940,901 | 1 | true | 2022-07-11T15:03:12.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ : curly brackets with std library type<p>I try to understand the docs for <code>std::less</code>, where the following example is given for the usage with... |
73,025,962 | How to fill message box on Whatsapp Web?<p>I'm trying to send a message on Whatsapp Web (<a href="https://web.whatsapp.com/" rel="nofollow noreferrer">https://web.whatsapp.com/</a>) only using Javascript, for study purposes.</p>
<p>Here is the DIV that has the message box :</p>
<p><a href="https://i.stack.imgur.com/N7t... | <p>you can use</p>
<p>update*</p>
<pre><code>// wait until paste all text
function waitForPastedData(elem, old) {
if (elem.childNodes && elem.childNodes.length == old) {
return true
}
else {
old = elem.childNodes.length
return new Promise((resolve, reject) => {
setTimeout(() => ... | How to fill message box on Whatsapp Web? | javascript|reactjs | -1 | 77 | 1 | 73,029,608 | 73,029,608 | 1 | true | 2022-07-18T16:57:01.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fill message box on Whatsapp Web?<p>I'm trying to send a message on Whatsapp Web (<a href="https://web.whatsapp.com/" rel="nofollow noreferrer">https:... |
72,834,455 | Find Customers are in only One Subscription<p>I have a table like below. Let's call it table1.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>ID</th>
<th>Subscription</th>
</tr>
</thead>
<tbody>
<tr>
<td>101</td>
<td>A</td>
</tr>
<tr>
<td>101</td>
<td>B</td>
</tr>
<tr>
<td>101</td>
<td>C</... | <p>I hope mine is readable/understandable.
<a href="http://sqlfiddle.com/#!9/c47992/7" rel="nofollow noreferrer">sqlfiddle</a></p>
<p>bucket 1:</p>
<pre><code>select distinct id from docs as d1
where d1.id in (select id from docs where id=d1.id and subscription='A')
and not exists (select id from docs where id=d1.id ... | Find Customers are in only One Subscription | mysql|sql | 0 | 77 | 3 | 72,834,552 | 72,834,552 | 1 | true | 2022-07-01T20:42:52.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find Customers are in only One Subscription<p>I have a table like below. Let's call it table1.</p>
<div class="s-table-container">
<table class="s-table">
<t... |
72,796,981 | Finding pattern in data and structuring it<p>I've a sheet where I paste data from the website, when I paste, it look like this in sheet(Page 1 and Page 2):-</p>
<p>Here Color Code cells represent the data of one plot, like <strong>address</strong>,<strong>price</strong>,<strong>area</strong> and in address there is <st... | <p>Based on a fixed order of the data, starting at the address after that the price and after that the area</p>
<p><strong>Delete unrelated data to avoid bugs</strong></p>
<pre><code>function findPatterns() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const ssname = ss.getSheetByName('Sheet1')
// ranges to p... | Finding pattern in data and structuring it | javascript|google-apps-script|zillow | 0 | 77 | 1 | 72,821,100 | 72,821,100 | 1 | true | 2022-06-29T06:54:26.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding pattern in data and structuring it<p>I've a sheet where I paste data from the website, when I paste, it look like this in sheet(Page 1 and Page 2):-<... |
72,924,796 | How does caching work in Entity Framework Core 6.06?<p>I see tons of posts about people struggling to get EF to NOT send cached data. I am sitting here wondering how they are getting it to send cached data...</p>
<p>Here are the details:
ASP.NET Core latest version on .NET 6.0 using Entity Framework Core 6.0.6.
Testing... | <p>Entity Framework relies on the mechanism of tracking (see <a href="https://docs.microsoft.com/en-us/ef/core/change-tracking/" rel="nofollow noreferrer">this</a> and <a href="https://docs.microsoft.com/en-us/ef/core/querying/tracking" rel="nofollow noreferrer">this</a>). It is not a caching per se but it can have sim... | How does caching work in Entity Framework Core 6.06? | asp.net-core|caching|entity-framework-core|.net-6.0|ncache | 0 | 77 | 1 | 72,925,114 | 72,925,114 | 1 | true | 2022-07-09T21:39:33.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does caching work in Entity Framework Core 6.06?<p>I see tons of posts about people struggling to get EF to NOT send cached data. I am sitting here wonde... |
72,784,111 | How to style a column based on condition in pandas<p>I want to make a conditional formatting, which is applied on another column in a pandas dataframe.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">ID</th>
<th style="text-align: center;">v</th>
<th style="text-al... | <p>Define a highlighter function and color values conditionally.</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
import pandas as pd
def red_or_auto(x):
# set font color to red for keys whose corresponding v is positive
# all other values have default font color
return pd.DataFrame(''... | How to style a column based on condition in pandas | python|pandas|dataframe|pandas-styles | 1 | 77 | 1 | 72,784,631 | 72,784,631 | 1 | true | 2022-06-28T09:39:12.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to style a column based on condition in pandas<p>I want to make a conditional formatting, which is applied on another column in a pandas dataframe.</p>
<... |
72,395,624 | In Palantir Foundry's Data Connection tool, what's the difference between the transaction type options?<p>When setting up a file-based sync in Data Connection, I see there are a few different options for 'Transaction Type'. What's the difference between them? When might I use them?</p> | <p>From the <a href="https://www.palantir.com/docs/foundry/data-integration/datasets/#transactions" rel="nofollow noreferrer">Foundry docs</a>:</p>
<hr />
<h3>Transaction types</h3>
<p>The way dataset files are modified in a transaction depends on the transaction type. There are four possible transaction types: <code>S... | In Palantir Foundry's Data Connection tool, what's the difference between the transaction type options? | palantir-foundry|foundry-data-connection | 2 | 77 | 1 | 72,395,625 | 72,395,625 | 1 | true | 2022-05-26T17:12:20.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Palantir Foundry's Data Connection tool, what's the difference between the transaction type options?<p>When setting up a file-based sync in Data Connectio... |
72,360,293 | an example of extending res.partner with delegation<p>I could only find res.users</p>
<p>Are there any other examples ?</p>
<p>By "with delegation" I mean with <code>_inherits</code>, not with <code>_inherit</code></p> | <p>You can find only <code>res.users</code> in all Odoo community code as delegation inheritance from <code> res.partner</code></p>
<p>You can check the <a href="https://github.com/PacktPublishing/Odoo-14-Development-Cookbook-Fourth-Edition/blob/master/Chapter04/13_inheritance_delegation/my_library/models/library_book.... | an example of extending res.partner with delegation | odoo-14 | 0 | 77 | 1 | 72,405,121 | 72,405,121 | 1 | true | 2022-05-24T09:18:12.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
an example of extending res.partner with delegation<p>I could only find res.users</p>
<p>Are there any other examples ?</p>
<p>By "with delegation"... |
72,348,472 | Cannot join two regex into one to produce a code snippet to use in VSCode<p>I am struggling with regular expressions and how to use them in snippets in VSCode and I could really use some help (I am a beginner in that area).
I have two regexp:</p>
<ul>
<li>the first one is here to remove the extension from a file path: ... | <p>In your case you can make it much simpler by using other variables (see <a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables" rel="nofollow noreferrer">snippet variables documentation</a>).</p>
<p><code>"${TM_DIRECTORY/(\\\\)/\\//g}/$TM_FILENAME_BASE"</code></p>
<p><code>TM_DIR... | Cannot join two regex into one to produce a code snippet to use in VSCode | regex|visual-studio-code|code-snippets|vscode-snippets | 2 | 77 | 2 | 72,411,533 | 72,411,533 | 1 | true | 2022-05-23T12:24:56.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot join two regex into one to produce a code snippet to use in VSCode<p>I am struggling with regular expressions and how to use them in snippets in VSCod... |
72,399,365 | Memory Safe Permutations Generator with Increasing Length Value in ThreadPoolExecutor<p>Thanks to @rici in the comments for steering me in the right direction on this. I have discovered that <code>concurrent.futures.map()</code> and <code>concurrent.futures.execut()</code> utilize immediate processing of iterables, whe... | <p>I figured out a solution. After the section of code that gets the endpoints list from github, I use the following:</p>
<pre><code># ---------------------------------------------------------------------------- #
# Function to Ping API Endpoints #
# -----------------------... | Memory Safe Permutations Generator with Increasing Length Value in ThreadPoolExecutor | python-3.x|multithreading|permutation | 0 | 77 | 2 | 72,442,543 | 72,442,543 | 1 | true | 2022-05-27T00:47:39.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Memory Safe Permutations Generator with Increasing Length Value in ThreadPoolExecutor<p>Thanks to @rici in the comments for steering me in the right directio... |
72,241,984 | Openlayers - when to use an Overlay instead of a Vector layer?<p>What is the difference between a Layer in Openlayers and an Overlay?</p>
<p>For example, If I have points that I want to show on a map, what are the pros/cons of displaying them either using a Vector Layer or an Overlay?</p>
<p>Thank you</p> | <p>Geographic vector data should almost always be displayed as a (vector) layer. Labels and other styling can be implemented via style definitions or style functions, even complex styles capable of showing more data if needed. Layers can be overlayed by other layers and overlays. Layers are very performant and capable ... | Openlayers - when to use an Overlay instead of a Vector layer? | openlayers | 0 | 77 | 1 | 72,458,292 | 72,458,292 | 1 | true | 2022-05-14T16:11:45.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Openlayers - when to use an Overlay instead of a Vector layer?<p>What is the difference between a Layer in Openlayers and an Overlay?</p>
<p>For example, If ... |
72,329,441 | Not Displaying Spaces<p>I'm very new to c++ and everything in general. I dont understand why my code doesn't work:</p>
<pre><code>#include <cstdio>
int main(){
int a;
scanf("%d", &a);
for(int i = 1; i < a; i++){
printf(" ");
}
printf("*");
}
</code></pre>
<p>what I'm ... | <p>You will have to use 3 for-loops (two of them nested inside one). The parent for loop for each row. And the nested two are for spaces and stars.</p>
<pre><code>#include <cstdio>
int main()
{
int a;
scanf("%d", &a);
for(int i=1; i<a; i++)
{
for(int j=i; j<a; j++)
... | Not Displaying Spaces | c++|for-loop|nested-loops | -1 | 77 | 1 | 72,329,564 | 72,329,564 | 1 | true | 2022-05-21T12:13:53.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not Displaying Spaces<p>I'm very new to c++ and everything in general. I dont understand why my code doesn't work:</p>
<pre><code>#include <cstdio>
in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.