dewanup007/stackoverflow-nova-data
Annamoradnejad, I., Habibi, J., & Fazli, M. (2022). Multi-view approach to suggest moderation actions in community question answering sites. Information Sciences, 600, 144-154. @article{annamoradnejad2022multiview, title={Multi-View Approach to Suggest Moderation Actions in Community Question Answering Sites}, author={Annamoradnejad, Issa and Habibi, Jafar and Fazli, Mohammadamin}, journal = {Information Sciences}, volume = {600}, pages = {144-154}, year = {2022}, issn = {0020-0255}, doi =… See the full description on the dataset page: https://huggingface.co/datasets/dewanup007/stackoverflow-nova-data.
15
1,Unnamed: 0.2,Unnamed: 0.1,Unnamed: 0,Id,Title,Body,Tags,CreationDate,Y,system281,81,81,9871,39236863,Restrict scipy.optimize.minimize to integer values,"<p>I'm using <code>scipy.optimize.minimize</code> to optimize a real-world problem for which the answers can only be integers. My current code looks like this: </p>3 4<pre><code>from scipy.optimize import minimize5 6def f(x):7 return (481.79/(5+x[0]))+(412.04/(4+x[1]))+(365.54/(3+x[2]))+(375.88/(3+x[3]))+(379.75/(3+x[4]))+(632.92/(5+x[5]))+(127.89/(1+x[6]))+(835.71/(6+x[7]))+(200.21/(1+x[8]))8 9def con(x):10 return sum(x)-711 12cons = {'type':'eq', 'fun': con}13 14print scipy.optimize.minimize(f, [1,1,1,1,1,1,1,0,0], constraints=cons, bounds=([0,7],[0,7],[0,7],[0,7],[0,7],[0,7],[0,7],[0,7],[0,7]))15</code></pre>16 17<p>This yields: </p>18 19<pre><code>x: array([ 2.91950510e-16, 2.44504019e-01, 9.97850733e-01,20 1.05398840e+00, 1.07481251e+00, 2.60570253e-01,21 1.36470363e+00, 4.48527831e-02, 1.95871767e+00]22</code></pre>23 24<p>But I want it optimized with integer values (rounding all <code>x</code> to the nearest whole number doesn't always give the minimum). </p>25 26<p>Is there a way to use <code>scipy.optimize.minimize</code> with only integer values?</p>27 28<p>(I guess I could create an array with all possible permutations of <code>x</code> and evaluate f(x) for each combination, but that doesn't seem like a very elegant or quick solution.)</p>29",<python><optimization><scipy><minimize>,2016-08-30 20:49:44,HQ,"30This a stack overflow question from between 2016-2020 and it can be classified into three categories:31* HQ: High-quality posts without a single edit.32* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.33* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.34You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 35**Do not add any explanation, just give the category as output**."36715,715,715,10684,39536144,libsystem_symptoms.dylib missing in Xcode 8,"<p>I just updated to Xcode 8, and I can no longer build xml2-based applications. If I build a simple file and try to build it as follows:</p>37 38<pre><code>c++ myapp.cc `xml2-config --cflags` `xml2-config --libs`39</code></pre>40 41<p>...I get the following error message:</p>42 43<pre><code>ld: file not found: /usr/lib/system/libsystem_symptoms.dylib for architecture x86_6444</code></pre>45 46<p>It doesn't matter what's in myapp.cc (mine is just a main routine that returns 0). The root problem seems to be that Apple removed /usr/lib/system/libsystem_symptoms.dylib in Xcode 8, but many of the .tbd files in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib still point to it. Has anyone else run into a problem like this?</p>47",<xml><xcode><macos>,2016-09-16 16:24:07,HQ,"48This a stack overflow question from between 2016-2020 and it can be classified into three categories:49* HQ: High-quality posts without a single edit.50* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.51* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.52You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 53**Do not add any explanation, just give the category as output**."54913,913,913,14977,41319089,SQL SERVER 2012,"I want to fetch specific values from a string for Ex: String 1 {cm_documentation_.chk_phone_call_physician}=1 & {cm_documentation_.txt_phone_call_code}=""99441"" & ({cm_documentation_.txt_units_mins}!="""" & ({local.units_mins}<5 |{local.units_mins}>10) | {cm_documentation_.txt_units_mins}="""")55 56String 2:{@This}=""93015"" | {@This}=""78454"" | {@This}=""78453"" | {@This}=""78452"" | {@This}=""78451"" | {@This}=""78480"" | {@This}=""78478"" | {@This}=""78465"" | {@This}=""78499"" | {@This}=""78492"" | {@This}=""78491"" | {@This}=""78459""57 58I wan to fetch values after = symbol 59Result: 609944161930156278454637845364.65.66.67.68.69.70.71So on.....",<sql><sql-server><tsql><sql-server-2012>,2016-12-25 06:16:38,LQ_EDIT,"72This a stack overflow question from between 2016-2020 and it can be classified into three categories:73* HQ: High-quality posts without a single edit.74* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.75* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.76You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 77**Do not add any explanation, just give the category as output**."78501,501,501,2341,35452074,"Why does Spark job fail with ""Exit code: 52""","<p>I have had Spark job failing with a trace like this one:</p>79 80<pre><code>./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr-Container id: container_1455622885057_0016_01_00000881./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr-Exit code: 5282./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr:Stack trace: ExitCodeException exitCode=52: 83./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.util.Shell.runCommand(Shell.java:545)84./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.util.Shell.run(Shell.java:456)85./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)86./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)87./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)88./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)89./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at java.util.concurrent.FutureTask.run(FutureTask.java:262)90./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)91./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)92./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr- at java.lang.Thread.run(Thread.java:745)93./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr-94./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr-95./containers/application_1455622885057_0016/container_1455622885057_0016_01_000001/stderr-Container exited with a non-zero exit code 5296</code></pre>97 98<p>It took me a while to figure out what ""exit code 52"" means, so I'm putting this up here for the benefit of others who might be searching</p>99",<apache-spark><yarn><spark-dataframe>,2016-02-17 09:04:04,HQ,"100This a stack overflow question from between 2016-2020 and it can be classified into three categories:101* HQ: High-quality posts without a single edit.102* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.103* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.104You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 105**Do not add any explanation, just give the category as output**."106836,836,836,24574,46113078,Pandas - add value at specific iloc into new dataframe column,"<p>I have a large dataframe containing lots of columns.</p>107 108<p>For each row/index in the dataframe I do some operations, read in some ancilliary ata, etc and get a new value. Is there a way to add that new value into a new column at the correct row/index?</p>109 110<p>I can use .assign to add a new column but as I'm looping over the rows and only generating the data to add for one value at a time (generating it is quite involved). When it's generated I'd like to immediately add it to the dataframe rather than waiting until I've generated the entire series.</p>111 112<p>This doesn't work and gives a key error:</p>113 114<pre><code>df['new_column_name'].iloc[this_row]=value115</code></pre>116 117<p>Do I need to initialise the column first or something?</p>118",<python><pandas><numpy>,2017-09-08 09:26:08,HQ,"119This a stack overflow question from between 2016-2020 and it can be classified into three categories:120* HQ: High-quality posts without a single edit.121* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.122* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.123You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 124**Do not add any explanation, just give the category as output**."1251019,1019,1019,11464,39823924,"""if"" multiple conditions in javascript","<p>I'm new to javascript and I'd just like a simple explanation of how to use ""if"" with multiple conditions in javascript.</p>126 127<p>I've seen stuff like this:128if (condition1 && condition2)129and130if (condition1) || (condition2)</p>131 132<p>To my understanding, && is basically ""and"", and || is basically ""or"". Please correct me if I'm wrong.</p>133 134<p>But would you use these if you wanted to test more than 2 conditions?135And are there any other marks besides && and || ?136Also, if you were to have a much larger list of conditions. Let's say 10 or 20, then is there a better/proper way to test them other than sticking them all in if() seperated by && and || ?</p>137",<javascript>,2016-10-03 02:43:37,LQ_CLOSE,"138This a stack overflow question from between 2016-2020 and it can be classified into three categories:139* HQ: High-quality posts without a single edit.140* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.141* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.142You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 143**Do not add any explanation, just give the category as output**."144454,454,454,14807,41243883,C/C++ convert int to char (ASCII value),"I am trying to convert an `int` to a `char` using ASCII value. the `int` is randomly generated between `97` and `122` (from a to z).145 146So my question is all about how to make a random number between 97 and 122 and how to convert this value to a char.147(before I was able to make it easily but it's been a while I didn't code in C/C++, so I don't remember well how it works)",<c++><ascii>,2016-12-20 13:48:52,LQ_EDIT,"148This a stack overflow question from between 2016-2020 and it can be classified into three categories:149* HQ: High-quality posts without a single edit.150* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.151* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.152You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 153**Do not add any explanation, just give the category as output**."154971,971,971,40336,56111992,How to get all tweets in twitter through code?,"<p>What is the best way to retrieve all tweets by all users in twitter? Ideally using python code and API calls. I understand that Twitter don't make tweets older than a time frame available for us to download. I don't care about them. But all tweets that are available to us for download.</p>155",<python><twitter>,2019-05-13 12:05:58,LQ_CLOSE,"156This a stack overflow question from between 2016-2020 and it can be classified into three categories:157* HQ: High-quality posts without a single edit.158* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.159* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.160You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 161**Do not add any explanation, just give the category as output**."162598,598,598,1966,35294854,How can we check the whole sql database for login username and password in mvc3 c#,"I have more than one table in my sql server database.each table is for each users named developers, designers, users and so on.my home page contain a login screen.when user try to login with their username and password then it automatically check whether the username and password belongs to the database.if yes it redirect to a page else prompt an error.I need whole database check instead of one table because there is only one login page for all users.thanks",<c#><sql-server><asp.net-mvc-3>,2016-02-09 14:42:13,LQ_EDIT,"163This a stack overflow question from between 2016-2020 and it can be classified into three categories:164* HQ: High-quality posts without a single edit.165* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.166* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.167You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 168**Do not add any explanation, just give the category as output**."169840,840,840,16207,41879824,"Adding text to my div, shifts my div down.","[Image][1]170 171 172 [1]: https://i.stack.imgur.com/sa9xN.png173 174I tried to do vertical-align: top; on my div id, and nothing will move every thing stays the same. I tried to add position absolute and that wont work either. Am I missing something else?",<html><css>,2017-01-26 17:52:19,LQ_EDIT,"175This a stack overflow question from between 2016-2020 and it can be classified into three categories:176* HQ: High-quality posts without a single edit.177* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.178* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.179You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 180**Do not add any explanation, just give the category as output**."1811312,1312,1312,7137,37886276,provideRouter and RouterConfig not found in new @angular/router 3.0.0-alpha.3^,"<p>I am migrating an angular2 app to RC2 and trying to use the router's version 3 alpha.</p>182 183<p>I have followed the set up of the <a href=""http://plnkr.co/edit/ER0tf8fpGHZiuVWB7Q07?p=preview"">plunker given</a> by the <a href=""https://angular.io/docs/ts/latest/guide/router.html"">angular docs</a> for routing184 But i keep getting the following errors:</p>185 186<blockquote>187 <p>/@angular/router/index""' has no exported member 'provideRouter'</p>188 189 <p>/@angular/router/index""' has no exported member 'RouterConfig'</p>190</blockquote>191 192<p>when trying to use the following imports in my app.router.ts file:</p>193 194<pre><code>import { provideRouter, RouterConfig } from '@angular/router';195</code></pre>196 197<p>I am using typescript in visual studio with commonjs module format.</p>198 199<p>Here are the dependecies from my packages.json</p>200 201<pre><code>""@angular/common"": ""2.0.0-rc.2"",202""@angular/compiler"": ""2.0.0-rc.2"",203""@angular/core"": ""2.0.0-rc.2"",204""@angular/http"": ""2.0.0-rc.2"",205""@angular/platform-browser"": ""2.0.0-rc.2"",206""@angular/platform-browser-dynamic"": ""2.0.0-rc.2"",207""@angular/router"": ""3.0.0-alpha.3"",208""@angular/router-deprecated"": ""2.0.0-rc.2"",209""@angular/upgrade"": ""2.0.0-rc.2"",210""systemjs"": ""0.19.27"",211""core-js"": ""^2.4.0"",212""reflect-metadata"": ""^0.1.3"",213""rxjs"": ""5.0.0-beta.6"",214""zone.js"": ""^0.6.12"",215""angular2-in-memory-web-api"": ""0.0.12""216</code></pre>217 218<p>Even if I set the angular/route to the npm cdn in my system.config.js like so:</p>219 220<blockquote>221 <p>'@angular/router': '<a href=""https://npmcdn.com/@angular/router@3.0.0-alpha.3"">https://npmcdn.com/@angular/router@3.0.0-alpha.3</a>'</p>222</blockquote>223 224<p>I still get the error.</p>225 226<p>I even tried using the alpha.4, alpha.5 and latest alpha.6 version.</p>227 228<p>I tried deleting the nodule module folder and forcing the npm install to get new files.</p>229 230<p>QUESTION:</p>231 232<p>Can someone help me figure out why the exported memebers <strong>provideRouter</strong>, <strong>RouterConfig</strong> can not be found?</p>233 234<p>Thanks</p>235",<angularjs><typescript><angular><npm><angular2-routing>,2016-06-17 16:27:25,HQ,"236This a stack overflow question from between 2016-2020 and it can be classified into three categories:237* HQ: High-quality posts without a single edit.238* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.239* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.240You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 241**Do not add any explanation, just give the category as output**."242275,275,275,39129,55177928,How do you check a checkbox in react-testing-library?,"<p>I cant seem to find much/any docs on this really simple thing I'm trying to achieve</p>243 244<p>I have a dropdown that is <code>display: none</code>. when I click a checkbox it becomes <code>display: block</code>245all I'm trying to assert is when I click the checkbox, it shows the dropdown</p>246 247<pre><code> expect(getByLabelText('Locale')).toHaveStyle(`248 display: none;249`)250 251getByLabelText('Locale').checked = true252 253expect(getByLabelText('Locale')).toHaveStyle(`254 display: block;255`)256</code></pre>257 258<p>the code works as expected but the test is failing on the second expect block saying: it should still be <code>display: none</code></p>259 260<p>is the correct way to assert this?</p>261 262<p>when I click the checkbox it updates 2 attributes in my object to <code>true</code> which is how it renders in the code. when I manually pass these attributes the test still fails but it fails in the first expectation. </p>263 264<p>I feel like I need to do something like <code>setProps</code></p>265 266<p>I have now tried to use <code>renderWithRedux</code> but it doesn't seem to be firing my action creator correctly?</p>267 268<p>is <code>fireEvent.click(queryByTestId('LocaleCheckbox'))</code> the best thing to try and update a checkbox?</p>269",<javascript><reactjs><react-testing-library>,2019-03-15 07:54:06,HQ,"270This a stack overflow question from between 2016-2020 and it can be classified into three categories:271* HQ: High-quality posts without a single edit.272* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.273* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.274You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 275**Do not add any explanation, just give the category as output**."276225,225,225,14333,41014513,Windows Service with .NET Core,"<p>Is there a way to develop a windows service (able to start on boot etc...) with .NET Core?</p>277 278<p>All tutorials and instructions I find utilize System.ServiceProcess.ServiceBase which can not be found and added for some reason in Visual Studio 2015?</p>279 280<p>I also try to avoid using 3rd party tools/libraries like SrvStart. Something like Topshelf would be acceptable but seems to be not available for .NET core.</p>281 282<p>And it would be great if the service could run under windows and linux. </p>283 284<p>Any ideas how I could achieve this?</p>285",<windows-services><.net-core>,2016-12-07 10:04:27,HQ,"286This a stack overflow question from between 2016-2020 and it can be classified into three categories:287* HQ: High-quality posts without a single edit.288* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.289* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.290You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 291**Do not add any explanation, just give the category as output**."29288,88,88,33499,51094795,Is leaked memory freed up when the program exits in golang?,"<p>Before you claim a repeat <a href=""https://stackoverflow.com/questions/2975831/is-leaked-memory-freed-up-when-the-program-exits"">question</a>, I've read all those answers, but my question is focus to golang specific.293With the golang proverb <a href=""https://blog.golang.org/share-memory-by-communicating"" rel=""nofollow noreferrer"">Don't communicate by sharing memory; share memory by communicating</a> I wonder if there is a different by how golang manage the memory</p>294",<go>,2018-06-29 05:24:16,LQ_CLOSE,"295This a stack overflow question from between 2016-2020 and it can be classified into three categories:296* HQ: High-quality posts without a single edit.297* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.298* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.299You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 300**Do not add any explanation, just give the category as output**."301910,910,910,12537,40268647,How to connect raspberry pi to internet?,"<p>Here i have connected my raspberry pi to my laptop using the ethernet cable.302Inside the raspberry pi boot SD card i have opened the file cmdline and added the following information at the end of the file.</p>303 304<pre><code>ip=169.254.1.1305</code></pre>306 307<p>Now i have connected my raspberry pi to the laptop using the ethernet cable and used putty to connect to this device by using the ip address 169.254.1.1 and port 22 using SSH.</p>308 309<p>Everything is working fine , i have accesed the file system.310But now i wanted to access the intenet so i have entered the command </p>311 312<pre><code>ping 8.8.8.8313connect:Network in unreachable314</code></pre>315 316<p>How to access to the internet?How to approach this problem?Any suggestions.</p>317 318<p>Tutorial followed : <a href=""https://www.youtube.com/watch?v=Ioih6MHNNqc"" rel=""nofollow"">Youtube link</a></p>319",<linux><networking><ssh><raspberry-pi><debian>,2016-10-26 17:31:21,LQ_CLOSE,"320This a stack overflow question from between 2016-2020 and it can be classified into three categories:321* HQ: High-quality posts without a single edit.322* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.323* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.324You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 325**Do not add any explanation, just give the category as output**."3261348,1348,1348,7992,38291374,Getting the ClaimsPrincipal in a logic layer in an aspnet core 1 application,"<p>I'm writing an aspnet core 1 application.327Using a bearer token authentication I have the User property inside the controller with the correct identity. However I cant seem to find a way to grab with identity as I did before using the <code>ClaimPrincipal.Current</code> static.328What is the current best practice to get this data inside the BL layers with out passing the ClaimPrincipal object around?</p>329",<asp.net><.net>,2016-07-10 11:27:51,HQ,"330This a stack overflow question from between 2016-2020 and it can be classified into three categories:331* HQ: High-quality posts without a single edit.332* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.333* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.334You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 335**Do not add any explanation, just give the category as output**."3361202,1202,1202,24500,46075822,how to reverse n characters of n parts in string using java,"<p>For example, string = ""ABCDEFGH"". if n=2, then output should be ""BADCFEHG""; if n=3, output should be ""CBAFEDHG"".337I know i should use stringbuilder to reverse, but how can i split the string to n parts and then reverse each part?</p>338",<java><string><reverse>,2017-09-06 12:54:15,LQ_CLOSE,"339This a stack overflow question from between 2016-2020 and it can be classified into three categories:340* HQ: High-quality posts without a single edit.341* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.342* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.343You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 344**Do not add any explanation, just give the category as output**."345267,267,267,15045,41341409,Where is `CV_HAAR_SCALE_IMAGE` in OpenCV 3.1.0 with Python 3.5?,"<p>I get this error.</p>346 347<pre><code>AttributeError: module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE'348</code></pre>349 350<p>After upgrading my OpenCV to 3.1.0.351I have tried these.</p>352 353<pre><code>cv2.cv.CV_HAAR_SCALE_IMAGE354</code></pre>355 356<p>And also this.</p>357 358<pre><code>cv2.CV_HAAR_SCALE_IMAGE359</code></pre>360 361<p>But still same error. I go here, <a href=""http://docs.opencv.org/3.1.0/d9/d31/group__objdetect__c.html#ga812f46d031349fa2ee78a5e7240f5016"" rel=""noreferrer"">http://docs.opencv.org/3.1.0/d9/d31/group__objdetect__c.html#ga812f46d031349fa2ee78a5e7240f5016</a> but I could not find any information of to which object the constants stored in.</p>362",<python><opencv>,2016-12-27 08:12:08,HQ,"363This a stack overflow question from between 2016-2020 and it can be classified into three categories:364* HQ: High-quality posts without a single edit.365* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.366* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.367You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 368**Do not add any explanation, just give the category as output**."369406,406,406,44043,59450094,How can i hide request header and parameters for rest api,"I am using laravel and vue js.370In vue js, i am requesting api using axios.371when i inspect and get request header and parameters in browser and it is possible to request in Postman.372Everyone can request any apis after login because it is possible to get header and parameters.",<javascript><php><laravel><vue.js><networking>,2019-12-23 04:13:20,LQ_EDIT,"373This a stack overflow question from between 2016-2020 and it can be classified into three categories:374* HQ: High-quality posts without a single edit.375* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.376* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.377You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 378**Do not add any explanation, just give the category as output**."379584,584,584,24948,46279505,Add extra properties in Custom Exception to return to AJAX function,"<p>I have a custom exception class as follows:</p>380 381<pre><code><Serializable>382Public Class SamException383 Inherits Exception384 Public Sub New()385 ' Add other code for custom properties here.386 End Sub387 Public Property OfferBugSend As Boolean = True388 389 Public Sub New(ByVal message As String)390 MyBase.New(message)391 ' Add other code for custom properties here.392 End Sub393 394 Public Sub New(ByVal message As String, ByVal inner As Exception)395 MyBase.New(message, inner)396 ' Add other code for custom properties here.397 End Sub398 399End Class400</code></pre>401 402<p>I'm using this for certain cases in returns from AJAX responses.</p>403 404<p>In the error function of my AJAX response I am determining that the error is of my custom type like this:</p>405 406<pre><code>.... 407ajax code....408.error = function (xhr, text, message) {409 var parsed = JSON.parse(xhr.responseText);410 var isSamCustomError = (parsed.ExceptionType).toLowerCase().indexOf('samexception') >= 0;411 .... etc....412</code></pre>413 414<p>This allows me to post back a specific response to the client if the error is of my custom type.</p>415 416<p>BUT... I can't seem to get it to post out the extra property <code>OfferBugSend</code> to the client for the AJAX code to handle this case differently.</p>417 418<pre><code>console.log(""OfferBugSend: "" + parsed.OfferBugSend) 419</code></pre>420 421<p>is showing undefined, and if I check the response, this is because <code>xhr.responseText</code> only contains the properties:</p>422 423<pre><code>ExceptionType424Message425StackTrace426</code></pre>427 428<p>These properties are from the base class <code>Exception</code> but it is not passing my custom class properties...</p>429 430<p>How can I make that happen?</p>431",<vb.net><exception><exception-handling><custom-errors><custom-error-handling>,2017-09-18 12:39:17,HQ,"432This a stack overflow question from between 2016-2020 and it can be classified into three categories:433* HQ: High-quality posts without a single edit.434* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.435* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.436You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 437**Do not add any explanation, just give the category as output**."4381066,1066,1066,16043,41803765,"Expected view to be called with a URL keyword argument named ""pk""","<p>I'm writing a test for a Django Rest Framework view following closely the <a href=""http://www.django-rest-framework.org/api-guide/testing/"" rel=""noreferrer"">testing documentation</a></p>439 440<p>Here's my simple test: </p>441 442<pre><code>def test_patient_detail_api_opens(self):443 factory = APIRequestFactory()444 view =PatientDetailApi.as_view()445 request = factory.get(reverse('api_pacjent', kwargs={'pk' :1}))446 force_authenticate(request, user=self.user)447 response = view(request)448 self.assertEqual(response.status_code, 200)449</code></pre>450 451<p>This test fails with the following message: </p>452 453<pre><code>AssertionError: Expected view PatientDetailApi to be called with a URL keyword argument named ""pk"". Fix your URL conf, or set the `.lookup_field` attribute on the view correctly.454</code></pre>455 456<p>I fail to understand why this is happening and how to fix this. </p>457 458<ul>459<li>The <code>pk</code> kwargs is there in the URL, </li>460<li>according to the docs there's no need to add the <code>lookup-field</code> value explicitly if it defaults to <code>pk</code>, </li>461<li>the view opens correctly and yet this test fails... </li>462</ul>463 464<p><strong>Can somebody please explain why this error occurs?</strong> </p>465 466<p>Here's the relevant code:</p>467 468<p>the 'main' <code>url.py</code>:</p>469 470<pre><code>urlpatterns = [471 url(r'^pacjent/', include('pacjent.urls')),472] 473</code></pre>474 475<p><code>pacjent.urls</code> looks like this:</p>476 477<pre><code>url(r'^api/szczegoly/(?P<pk>\d+)/$', PatientDetailApi.as_view(), name=""api_pacjent""),478</code></pre>479 480<p>And <code>PatientDetailApi</code> is this:</p>481 482<pre><code>class PatientDetailApi(generics.RetrieveUpdateAPIView):483 model = Patient484 serializer_class = PatientDetailsSerializer485 queryset = Patient.objects.all()486 487 authentication_classes = (SessionAuthentication, BasicAuthentication)488 permission_classes = (IsAuthenticated,) 489</code></pre>490",<python><django><testing><django-rest-framework><django-generic-views>,2017-01-23 10:10:12,HQ,"491This a stack overflow question from between 2016-2020 and it can be classified into three categories:492* HQ: High-quality posts without a single edit.493* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.494* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.495You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 496**Do not add any explanation, just give the category as output**."4971238,1238,1238,36222,52905696,Warning: mysqli_close(): Couldn't fetch mysqli,"<p>I'm getting this error:</p>498 499<pre><code>Warning: mysqli_close(): Couldn't fetch mysqli in sendinvoice.php on line 54500</code></pre>501 502<p>Here is my code:</p>503 504<pre><code> <?php505include 'dbconfig.php';506ob_start();507 508$taxcb = $_POST['taxcb'];509$taxrate = $_POST['taxrate'];510$bcctocb = $_POST['bcctocb'];511$bcctotxt = $_POST['bcctotxt'];512$duedate = $_POST['duedate'];513$issuedate = $_POST['issuedate'];514$additemscb = $_POST['additemscb'];515$additemname = $_POST['additemname'];516$additemprice = $_POST['additemprice'];517$q = $_POST['rowid'];518 519$sql=""SELECT * FROM clients WHERE id = '"".$q.""'"";520 521$result = mysqli_query($conn,$sql);522 523while($row = mysqli_fetch_array($result)) {524 525 526$to = $row[email];527$subject = ""Invoice Test "" . date('m/d/Y h:i:s a', time());528include 'invoice.html';529$message = ob_get_clean();530 531// Always set content-type when sending HTML email532$headers = ""MIME-Version: 1.0"" . ""\r\n"";533$headers .= ""Content-type:text/html;charset=UTF-8"" . ""\r\n"";534 535// More headers536$headers .= 'From: <billing@example.com>' . ""\r\n"";537if ($bcctocb == ""y""){538$headers .= 'BCC: ' . $bcctotxt . ""\r\n"";539}540 541mail($to,$subject,$message,$headers);542 543$sql = ""UPDATE clients SET last_billed='"" . date(""Y-m-d H:i:s"") . ""' WHERE id="" . $q;544 545if ($conn->query($sql) === TRUE) {546 echo ""New record created successfully"";547} else {548 echo ""Error: "" . $sql . ""<br>"" . $conn->error;549}550 551$conn->close();552 553}554 555mysqli_close($conn);556 557?>558</code></pre>559 560<p>I only want it to update the MySQL entry if everything was successful. I suspect it's an error with having two MySQL things going on at once, is there a more efficient way to combine them? </p>561",<php><mysql><mysqli>,2018-10-20 12:34:18,LQ_CLOSE,"562This a stack overflow question from between 2016-2020 and it can be classified into three categories:563* HQ: High-quality posts without a single edit.564* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.565* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.566You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 567**Do not add any explanation, just give the category as output**."568289,289,289,10306,39399563,MySQL Workbench 6.3 (Mac) hangs on simple queries,"<p>I am using MySQL Workbench 6.3.7 build 1199 CE (64 bits) on a Mac with OS X Yosemite 10.10.5. I am connecting to an Amazon RDS MySQL instance.</p>569 570<p>When I enter a simple query such as</p>571 572<pre><code>select * from `devices`;573</code></pre>574 575<p>and click the lightning-bolt-with-cursor icon, the query starts, indicated by the spinner activating next to the ""SQL File 4"" tab in the following screenshot. However, the query doesn't complete and it just hangs. The white-hand-in-red-stop-sign icon is disabled.</p>576 577<p><a href=""https://i.stack.imgur.com/rtr7a.png""><img src=""https://i.stack.imgur.com/rtr7a.png"" alt=""screenshot of MySQL Workbench in hung state""></a></p>578 579<p>I can only force quit MySQL Workbench from this point on. If I try to do a regular quit, nothing happens.</p>580 581<p>How can I consistently run a simple query on my database? Sometimes it works (maybe 10% of the time), but it mostly just hangs.</p>582",<mysql-workbench>,2016-09-08 20:22:01,HQ,"583This a stack overflow question from between 2016-2020 and it can be classified into three categories:584* HQ: High-quality posts without a single edit.585* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.586* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.587You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 588**Do not add any explanation, just give the category as output**."5891156,1156,1156,16048,41806047,"How to develop antivirus, I want a book for reference","<p>I want to develop antivirus software but I do not know how to make.</p>590 591<p>I tried to search book of antivirus SW, but there's no book for reference.</p>592 593<p>If you know the good reference to develop antivirus SW, plz let me know.</p>594",<antivirus>,2017-01-23 12:09:34,LQ_CLOSE,"595This a stack overflow question from between 2016-2020 and it can be classified into three categories:596* HQ: High-quality posts without a single edit.597* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.598* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.599You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 600**Do not add any explanation, just give the category as output**."601232,232,232,13289,40583569,Would this be a valid C I/O library?,"<p>I have a question. I want to create a simple C I/O library, and I wish to check whether the method I am using is the correct one. The code is effectively pseudocode, so ignore the syntax.</p>602 603<pre><code>Simple I/O Library:604Output is 0x0000605Input is 0xFFFF606 607void writeChar (char* po) {608 char* ph = 0x0000609 char po;610 *ph = po611}612 613char readChar () {614 char* pi = 0xFFFF615 char in616 in = *pi617 return in618}619</code></pre>620 621<p>**Update:**Sorry if I wasn't clear. This is for an memory-mapped I/O system. The values are simply examples. I just wanted to test if the idea is valid.</p>622 623<p><strong>One More Question:</strong> I would like to understand the difference between memory access and port access. What, if any, changes would be required to access a port instead of a memory location, assuming a port-mapped I/O system this time.</p>624",<c++><c>,2016-11-14 07:13:46,LQ_CLOSE,"625This a stack overflow question from between 2016-2020 and it can be classified into three categories:626* HQ: High-quality posts without a single edit.627* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.628* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.629You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 630**Do not add any explanation, just give the category as output**."631475,475,475,10857,39597804,How I can use refs to change styling class in ReactJS?,"<p>I'm trying to change background of a <code>div</code> when color value changes. Here is my function which receives color value:</p>632 633<pre><code>ChangeColor(oColor) {634 this.props.ChangeColor(oColor);635 console.log(""Refs: "", this.refs.colorPicker.className);636 },637</code></pre>638 639<p>Here is css class</p>640 641<pre><code>.colorPicker {642 padding-right: 25px;643 background: #000;644 display: inline;645 margin-right: 5px;646 }647</code></pre>648 649<p>and here is my div element whose background needs to update on run-time.</p>650 651<pre><code><div ref='colorPicker' className={this.GetClass(""colorPicker"")} />652</code></pre>653 654<p>I'm not sure about refs synatx so please help to fix this issue. Thanks.</p>655",<javascript><css><reactjs><css-modules><refs>,2016-09-20 15:14:51,HQ,"656This a stack overflow question from between 2016-2020 and it can be classified into three categories:657* HQ: High-quality posts without a single edit.658* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.659* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.660You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 661**Do not add any explanation, just give the category as output**."662471,471,471,13430,40635131,Need recommendation for Audio/video player libraries in java,"<p>I am working on a project where I need to create a Video/audio player in java that will allow a user to select a file they want to play and it to play that file. In the future, I am going to get the program to print the conversation of the audio/video file in real time, So i need to some how to create a video/audio player which has a elapsed time which I can be extract for the other component of the software.</p>663 664<p>I wondered if anyone could suggest some libraries for me to use or give me any advice they think could help me!</p>665 666<p>Thanks in advance!</p>667",<java><user-interface><audio><video><video-player>,2016-11-16 14:50:31,LQ_CLOSE,"668This a stack overflow question from between 2016-2020 and it can be classified into three categories:669* HQ: High-quality posts without a single edit.670* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.671* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.672You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 673**Do not add any explanation, just give the category as output**."6741366,1366,1366,40740,56474190,How to read and convert a protected object to an associative array in PHP,"<p>I am working with an api which answers the requests with ""protected"" data object</p>675 676<p>like this</p>677 678<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">679<div class=""snippet-code"">680<pre class=""snippet-code-html lang-html prettyprint-override""><code>(681 [id:protected] => id:NYhXwGRVDzAAAAAAAAAA62682 [name:protected] => 5cf8cdd54328c.EDF683 [rev:protected] => 014a0000000150eaacf0684 [size:protected] => 25136208685 [server_modified:protected] => 2019-06-06T08:25:00Z686 [has_explicit_shared_members:protected] => 687 [data:protected] => Array688 (689 [name] => 5cf8cdd54328c.EDF690 [path_lower] => /5cf8cdd54328c.edf691 [path_display] => /5cf8cdd54328c.EDF692 [id] => id:NYhXwGRVDzAAAAAAAA125693 [client_modified] => 2019-06-06T08:25:00Z694 [server_modified] => 2019-06-06T08:25:00Z695 [rev] => 014a0000000150eaacf0696 [size] => 25136208697 [is_downloadable] => 1698 [content_hash] => 86442139304784e3b18d1d46f1b20bc48847699 )700)</code></pre>701</div>702</div>703</p>704 705<p>I have converted the object to array with the following code</p>706 707<pre><code>$metadata = (array)$file->getMetadata();708</code></pre>709 710<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">711<div class=""snippet-code"">712<pre class=""snippet-code-html lang-html prettyprint-override""><code>Array713(714 [*id] => id:NYhXwGRVDzAAAAAA44554715 [*name] => 5cf8cdd54328c.EDF716 [*rev] => 014a0000000150eaacf0717 [*size] => 25136208718 [*media_info] => 719 [*sharing_info] => 720 [*path_display] => /5cf8cdd54328c.EDF721 [*client_modified] => 2019-06-06T08:25:00Z722 [*server_modified] => 2019-06-06T08:25:00Z723 724 [*data] => Array725 (726 [name] => 5cf8cdd54328c.EDF727 [path_display] => /5cf8cdd54328c.EDF728 [id] => id:NYhXwGRVDzAAAAAAA23382729 [client_modified] => 2019-06-06T08:25:00Z730 [server_modified] => 2019-06-06T08:25:00Z731 [rev] => 014a0000000150eaacf0732 [size] => 25136208733 [is_downloadable] => 1734 [content_hash] => 86442139304784e3b18d1d46f1b20bc4884735 )736 737)</code></pre>738</div>739</div>740</p>741 742<p>But when i try to print the value <code>print_r($metadata['*size']);</code> </p>743 744<blockquote>745 <p>Notice: Undefined index: *size in C:\xampp\htdocs\Proyectos\kardion\kardion\sistema\download.php on line 28</p>746</blockquote>747 748<p>I think it will be a very easy answer but I have no idea how to do it</p>749",<php>,2019-06-06 09:00:48,LQ_CLOSE,"750This a stack overflow question from between 2016-2020 and it can be classified into three categories:751* HQ: High-quality posts without a single edit.752* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.753* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.754You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 755**Do not add any explanation, just give the category as output**."7561354,1354,1354,10978,39638329,Remove last value in an array elements," <?php 757 $values = ""aaa,bbb,ccc,ddd,"";//Remove last comma758 $values = ""aaa,bbb,,,"";//Remove all commas before bbb like aaa,bbb759 ?>760 761How to remove commas in this example",<php>,2016-09-22 11:53:47,LQ_EDIT,"762This a stack overflow question from between 2016-2020 and it can be classified into three categories:763* HQ: High-quality posts without a single edit.764* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.765* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.766You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 767**Do not add any explanation, just give the category as output**."768822,822,822,26211,47004511,Image is not coming up on my webpage,"The image tag will not work. Not sure if I'm missing something or I added the image tag In incorrectly. The image is in the same folder, so there's no problem in inserting the picture. 769 770 771 772 773 774 <!DOCTYPE html>775 <html lang=""en"">776 <head>777 <meta charset=""UTF-8"">778 <meta name=""description"" content=""type the content description here"" />779 <meta name=""keywords"" content=""type, keywords, here"" />780 <link rel=""stylesheet"" href=""text.css"" type=""text/css"" />781 <style type=""text/css"">782 h1.align1 {text-align: center;}783 h2.align2 {text-align: center;}784 h3.align3 {text-align: center;}785 </style> 786 </head>787 788 <body style=""background-color: black;""> 789 <h1 class=""align1"" style=""color: yellow;""><font size=""8""> TEXT </h1>790 <hr style=""white"" />791 <h2 class=""align2"" style=""color: red;""><font size=""10""> TEXT </h2>792 <hr style=""white"" />793 <h3 class=""align3"" style=""color: blue;""><font size=""10""> TEXT </h3> 794 795 796 797 798 <img src=""years1.jpg"" />799 800 801 802 803 804 805 806 807 </body>808 </html>",<html><css>,2017-10-29 19:45:39,LQ_EDIT,"809This a stack overflow question from between 2016-2020 and it can be classified into three categories:810* HQ: High-quality posts without a single edit.811* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.812* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.813You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 814**Do not add any explanation, just give the category as output**."815246,246,246,27940,48301257,How to install oracle-java8-installer on docker debian:jessie,"<p>I am trying to install java 8 through oracle-java8-installer on a debian:jessie docker container. The following is my Dockerfile:</p>816 817<pre><code>FROM debian:jessie818 819ENV JAVA_VERSION 1.8.0820 821RUN echo ""deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"" > /etc/apt/sources.list.d/webupd8team-java.list822RUN echo ""deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"" >> /etc/apt/sources.list.d/webupd8team-java.list823RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886824RUN echo ""debconf shared/accepted-oracle-license-v1-1 select true"" | /usr/bin/debconf-set-selections825RUN apt-get update826RUN apt-get install -y --force-yes vim827RUN apt-get install -y --force-yes oracle-java8-installer828</code></pre>829 830<p>Yet this gives:</p>831 832<pre><code>Connecting to download.oracle.com (download.oracle.com)|23.63.224.171|:80... connected.833HTTP request sent, awaiting response... 404 Not Found8342018-01-17 12:31:05 ERROR 404: Not Found.835 836download failed837Oracle JDK 8 is NOT installed.838dpkg: error processing package oracle-java8-installer (--configure):839 subprocess installed post-installation script returned error exit status 1840Errors were encountered while processing:841 oracle-java8-installer842E: Sub-process /usr/bin/dpkg returned an error code (1)843The command '/bin/sh -c apt-get install -y --force-yes oracle-java8-installer' returned a non-zero code: 100844</code></pre>845 846<p>I have found many similar issues described online, but none of the proposed solutions worked for me. Any idea?</p>847",<docker><java-8><debian><debian-jessie>,2018-01-17 12:32:42,HQ,"848This a stack overflow question from between 2016-2020 and it can be classified into three categories:849* HQ: High-quality posts without a single edit.850* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.851* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.852You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 853**Do not add any explanation, just give the category as output**."85498,98,98,15114,41368685,Xcode 8.2 cannot set entitlements membership,"<p>I am trying to configure universal links on my App, but is not working. I read that a common cause of universal links are not working is that the entitlements file is not include in the build.</p>855 856<p>But I am not able to set the target membership of my entitlements (screenshot bellow), all the checkbox are disable.</p>857 858<p><a href=""https://i.stack.imgur.com/1wzs6.png"" rel=""noreferrer""><img src=""https://i.stack.imgur.com/1wzs6.png"" alt=""enter image description here""></a></p>859",<ios><xcode><ios-universal-links>,2016-12-28 19:43:26,HQ,"860This a stack overflow question from between 2016-2020 and it can be classified into three categories:861* HQ: High-quality posts without a single edit.862* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.863* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.864You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 865**Do not add any explanation, just give the category as output**."866156,156,156,5656,37133200,Is DMARC the end of email forwarding?,"<p>I'm using a fair bit of email forwarding on a number of domains and the latest p=reject policy of AOL is causing me some problems and also a lot of confusion. My understanding of DMARC is that it's based on DKIM & SPF with a reporting layer. I understand that SPF is a problem with forwarding but as long as the SPF is set to ~all soft fail then that isn't a show stopper. I also thought DKIM could pass through forwarding without problems as long as you don't mess with the headers much. However I'm finding that certain emails from AOL being forwarded by MailGun are failing DMARC when they land at GMail. MailGun say its due to a sender/from mismatch error. Can anyone elaborate on whether email forwarding is doomed as DMARC takes hold or are MailGun just not forwarding properly?</p>867",<email><mailgun><forwarding><email-forwarding><dmarc>,2016-05-10 08:35:14,HQ,"868This a stack overflow question from between 2016-2020 and it can be classified into three categories:869* HQ: High-quality posts without a single edit.870* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.871* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.872You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 873**Do not add any explanation, just give the category as output**."874915,915,915,5226,36915804,"REGEX notepad ++; ""Http: //www.abc.jpg"", ""http: //www.xyz.jpg"", ""http: //www.123.gif"" extension of Internet addresses to separate the links?","REGEX notepad ++; ""Http: //www.abc.jpg"", ""http: //www.xyz.jpg"", ""http: //www.123.gif"" extension of Internet addresses to separate the links !?",<html><regex><hyperlink><jpeg>,2016-04-28 13:14:23,LQ_EDIT,"875This a stack overflow question from between 2016-2020 and it can be classified into three categories:876* HQ: High-quality posts without a single edit.877* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.878* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.879You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 880**Do not add any explanation, just give the category as output**."881272,272,272,34107,51471314,How to apply ensemble modelling approach for each group in data set?,"Suppose , I have a data set which consists of variables like population age, life expectancy,gender , country, year(monthly data for each year). I would like to predict life expectancy (years) by each country. How can I apply ensemble modelling approach and scale it across all the countries?I am using R882 883Thanks884",<r><machine-learning><statistics><ensemble-learning>,2018-07-23 03:42:03,LQ_EDIT,"885This a stack overflow question from between 2016-2020 and it can be classified into three categories:886* HQ: High-quality posts without a single edit.887* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.888* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.889You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 890**Do not add any explanation, just give the category as output**."891524,524,524,29614,49092532,Cant Update an sql value,"<p>i'm trying to update a value on mysql database, but i cant do it, i'm receiving succefully the data from the table, but on update it says 'connection error' i don't know what i'm missing</p>892 893<p>Panel.php </p>894 895<pre><code> <?php896 require_once 'funciones/mysql.php';897 898 $lista = $conexion->query(""SELECT id, Nombre, apellidoPaterno FROM bomberos"");899 900 if ($lista->num_rows > 0) {901 902 while ($row = $lista->fetch_assoc()) {903 echo ""id: "" . $row[""id""] . "" - Name: "" . $row[""Nombre""] . "" "" . $row[""apellidoPaterno""] . ""<br>"";904 ?>905 <table class=""table table-bordered"">906 <tr>907 <td>908 <img src='images/bomberos/<?php echo $row['id']; ?>.jpg' height=""10%"" width=""10%"" style=""opacity: 0.5;""/><br /><?php echo $row['Nombre'] . "" "" . $row[""apellidoPaterno""]; ?>909 <br />910 <div class=""icon-container"">911 <form method=""post"" action=""funciones/disponible.php"">912 <input type=""hidden"" name=""idBombero"" value=""<?php echo $row['id']; ?>"">913 <button type=""submit""></button>914 </form>915 </div>916 </td>917 </tr>918 </table>919 <?php920 }921 } else {922 echo ""0 Resultados"";923 }924 $conexion->close();925 ?>926</code></pre>927 928<p>mysql.php</p>929 930<pre><code> <?php931//Datos de la conexion932$servidor = ""localhost"";933$usuario = ""root"";934$contraseña = """";935$basedatos = ""sidesp"";936//crear conexion937$conexion = new mysqli($servidor, $usuario, $contraseña, $basedatos);938//revisar conexion939if ($conexion->connect_error) {940 die(""conexion fallida: "" . $conexion->connect_error);941}942?>943</code></pre>944 945<p>disponible.php</p>946 947<pre><code><?php948require_once 'mysql.php';949$consulta = ""UPDATE 'estados' SET 'estado'='1' WHERE 'id'='"".$_REQUEST['idBombero'].""'"";950if ($conexion->query($consulta) === true) {951 return ""Exito!"";952}else{953 return ""Fallo!"";954}955</code></pre>956 957<p>and... what's the best way to secure all of it?, i mean anti sql injections or decoding</p>958",<php><mysql>,2018-03-04 06:10:02,LQ_CLOSE,"959This a stack overflow question from between 2016-2020 and it can be classified into three categories:960* HQ: High-quality posts without a single edit.961* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.962* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.963You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 964**Do not add any explanation, just give the category as output**."9651443,1443,1443,32267,50432556,Cannot use JSX unless the '--jsx' flag is provided,"<p>I have looked around a bit for a solution to this problem. All of them suggest adding <code>""jsx"": ""react""</code> to your tsconfig.json file. Which I have done. Another one was to add <code>""include: []""</code>, which I have also done. However, I am still getting the error when I am trying to edit <code>.tsx</code>files. Below is my tsconfig file.</p>966 967<pre><code>{968 ""compilerOptions"": {969 ""module"": ""commonjs"",970 ""target"": ""es5"",971 ""allowJs"": true,972 ""checkJs"": false,973 ""jsx"": ""react"",974 ""outDir"": ""./build"",975 ""rootDir"": ""./lib"",976 ""removeComments"": true,977 ""noEmit"": true,978 ""pretty"": true,979 ""skipLibCheck"": true,980 ""strict"": true,981 ""moduleResolution"": ""node"",982 ""esModuleInterop"": true983 },984 ""include"": [985 ""./lib/**/*""986 ],987 ""exclude"": [988 ""node_modules""989 ]990}991</code></pre>992 993<p>Any suggestions would be helpful. I am using babel 7 to compile all the code with the env, react and typescript presets. If you guys need more files to help debug this, let me know.</p>994",<reactjs><typescript><jsx><tsx>,2018-05-20 07:17:28,HQ,"995This a stack overflow question from between 2016-2020 and it can be classified into three categories:996* HQ: High-quality posts without a single edit.997* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.998* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.999You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1000**Do not add any explanation, just give the category as output**."10011458,1458,1458,19040,43173918,"I'm trying to create a Java program to create and write a text file, but","<pre><code>public static void main(String[] args) {1002 File newTxt = new File(""C:/Users/cauan/Desktop/newTxt.txt"");1003 1004 if(newTxt.exists()) System.out.println(""The file already exists!"");1005 else {1006 try{ 1007 newTxt.createNewFile();1008 FileWriter fw=new FileWriter(newTxt);1009 BufferedWriter bw = new BufferedWriter(fw);1010 1011 bw.write(""This is my Prog"");1012 }1013 catch(Exception e){e.printStackTrace();}1014 } 1015} 1016</code></pre>1017 1018<p>This is my code.... But i dunno why am i getting an error :/</p>1019",<java>,2017-04-02 21:47:56,LQ_CLOSE,"1020This a stack overflow question from between 2016-2020 and it can be classified into three categories:1021* HQ: High-quality posts without a single edit.1022* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1023* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1024You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1025**Do not add any explanation, just give the category as output**."1026709,709,709,19760,43537520,How do I extract a type from an array in typescript?,"<p>Is there a way to declare a type in typescript that 'extracts' the inner type of an array?</p>1027 1028<p>Example: </p>1029 1030<p>Let's say I already have something like this in my codebase:</p>1031 1032<pre class=""lang-typescript prettyprint-override""><code>export interface Cache {1033 events: Event[],1034 users: User[]1035}1036type CacheType = Event[] | User[];1037 1038//or maybe: 1039// type TypeOfProperty = T[keyof T];1040// type CacheType = TypeOfProperty<Cache>; 1041</code></pre>1042 1043<p>What I want is something which would be equivalent to this: </p>1044 1045<pre class=""lang-typescript prettyprint-override""><code>type InnerCacheType = Event | User;1046</code></pre>1047 1048<p>But without manually retyping it every time I add something to <code>Cache</code> or <code>CacheType</code></p>1049 1050<p>Is this possible in Typescript?</p>1051",<typescript><types>,2017-04-21 08:21:45,HQ,"1052This a stack overflow question from between 2016-2020 and it can be classified into three categories:1053* HQ: High-quality posts without a single edit.1054* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1055* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1056You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1057**Do not add any explanation, just give the category as output**."105816,16,16,33094,50862825,"Python, printing words from a list one at a time","<p>I have the following code that prints the 3 words in the list over and over again. I'm trying to figure out how to print one word from the list, then wait for user intervention (like a key press) then print the second word and so on. I think it is probably an easy solution, but I just can't seem to figure it out at this time. I'm new at this. Thanks in advance.</p>1059 1060<pre><code>list = [""foo"",""bar"", ""baz""]1061 1062i = 01063 1064while i < len(list):1065 element = list [i]1066 i += 11067 print(element)1068 if i == 3:1069 i = 01070</code></pre>1071",<python-3.x>,2018-06-14 17:19:41,LQ_CLOSE,"1072This a stack overflow question from between 2016-2020 and it can be classified into three categories:1073* HQ: High-quality posts without a single edit.1074* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1075* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1076You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1077**Do not add any explanation, just give the category as output**."1078128,128,128,6295,37445838,Returning values in Elixir?,"<p>I've recently decided to learn Elixir. Coming from a C++/Java/JavaScript background I've been having a lot of trouble grasping the basics. This might sound stupid but how would return statements work in Elixir? I've looked around and it seems as though it's just the last line of a function i.e.</p>1079 1080<pre><code>def Hello do 1081 ""Hello World!""1082end1083</code></pre>1084 1085<p>Would this function return ""Hello World!"", is there another way to do a return? Also, how would you return early? in JavaScript we could write something like this to find if an array has a certain value in it:</p>1086 1087<pre><code>function foo(a){1088 for(var i = 0;i<a.length;i++){1089 if(a[i] == ""22""){1090 return true;1091 }1092 }1093 return false;1094}1095</code></pre>1096 1097<p>How would that work in Elixir?</p>1098",<function><elixir>,2016-05-25 19:17:29,HQ,"1099This a stack overflow question from between 2016-2020 and it can be classified into three categories:1100* HQ: High-quality posts without a single edit.1101* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1102* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1103You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1104**Do not add any explanation, just give the category as output**."1105696,696,696,42500,57948062,how can open another activity by action buttons in the dialog box which is opened with a button?,"<p>I am trying to make an app where I open a dialog box with a button. Then the dialog box would have two action buttons which opens two different activities.</p>1106",<java><android><android-studio>,2019-09-15 20:46:33,LQ_CLOSE,"1107This a stack overflow question from between 2016-2020 and it can be classified into three categories:1108* HQ: High-quality posts without a single edit.1109* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1110* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1111You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1112**Do not add any explanation, just give the category as output**."1113205,205,205,31091,49798102,Boostrap collapse not working,"Attempting to use Boostrap collapse in a form and it is non-responsive. Copy & pasted directly from the Boostrap website but still does not work. Please help!1114 1115 1116 <a class=""btn btn-primary"" data-toggle=""collapse"" href=""#collapseExample"" role=""button"" data-target=""firstname"" aria-expanded=""false"" aria-controls=""collapseExample"">1117 Test1118 </a>1119 <form>1120 <div class=""form-row mb-1 collapse"" id=""firstname"">1121 <div class=""form-group col-md-6"">1122 <input type=""email"" class=""form-control"" placeholder=""Legal first name"">1123 </div>1124 </div>1125 <div class=""form-group col-md-6"">1126 <input type=""password"" class=""form-control"" id=""inputPassword4"" placeholder=""Legal last name"">1127 </div>1128 </div>1129 </form>",<twitter-bootstrap><forms>,2018-04-12 13:39:28,LQ_EDIT,"1130This a stack overflow question from between 2016-2020 and it can be classified into three categories:1131* HQ: High-quality posts without a single edit.1132* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1133* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1134You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1135**Do not add any explanation, just give the category as output**."11361163,1163,1163,2913,35705165,I want to learn the inbuilt classes and methods in java libraries? please guide,"<p>Please give some to-do task and techniques to learn inbuilt classes and methods in packages! I want to became a successful java developer!</p>1137",<java><javadoc>,2016-02-29 16:58:55,LQ_CLOSE,"1138This a stack overflow question from between 2016-2020 and it can be classified into three categories:1139* HQ: High-quality posts without a single edit.1140* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1141* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1142You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1143**Do not add any explanation, just give the category as output**."11441318,1318,1318,21732,44626452,html select option display value with empty color div and display value,"i need the html select option dispaly value with empty color div and display value.1145 1146how do we do that with html,js or jquery?1147 1148i attached png value i need like that.1149 1150Thanks.[this is what i need]1151 1152 1153 [1]: https://i.stack.imgur.com/OysaJ.png",<javascript><jquery><html>,2017-06-19 09:10:26,LQ_EDIT,"1154This a stack overflow question from between 2016-2020 and it can be classified into three categories:1155* HQ: High-quality posts without a single edit.1156* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1157* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1158You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1159**Do not add any explanation, just give the category as output**."11601023,1023,1023,33018,50820688,Using 'ref' on React Styled Components is not working,"<p>I am having difficulty using <code>ref</code>s with Styled Components. When I try to access them in my class methods like below, I get the following error:</p>1161 1162<blockquote>1163 <p>Edit.js:42 Uncaught TypeError: this.....contains is not a function</p>1164</blockquote>1165 1166<pre><code> constructor(props) {1167 ....1168 this.setWrapperRef = this.setWrapperRef.bind(this);1169 this.handleClickOutside = this.handleClickOutside.bind(this);1170 }1171----------1172 setWrapperRef = (node) => {1173 this.wrapperRef = node;1174 }1175 handleEdit = (e) => {1176 e.preventDefault();1177 this.props.onEdit(this.props.id, this.state.title);1178 }1179----------1180<Wrapper onSubmit={this.handleEdit} ref={this.setWrapperRef}>1181 ...1182</Wrapper>1183</code></pre>1184 1185<p>I found the code from <a href=""https://stackoverflow.com/questions/32553158/detect-click-outside-react-component"">this question</a></p>1186 1187<p>What am I doing wrong here?</p>1188",<javascript><reactjs><dom><ref><styled-components>,2018-06-12 15:22:58,HQ,"1189This a stack overflow question from between 2016-2020 and it can be classified into three categories:1190* HQ: High-quality posts without a single edit.1191* LQ_EDIT: Low-quality posts with a negative score, and multiple community edits. However, they still remain open after those changes.1192* LQ_CLOSE: Low-quality posts that were closed by the community without a single edit.1193You are a technical assistant who will classify the question from users into any of above three categories. Respond with only the category name: HQ, LQ_EDIT, or LQ_CLOSE. 1194**Do not add any explanation, just give the category as output**."1195837,837,837,40439,56210479,count only if field is filled,"I have a question about an sql query i want to make. Supose i have an column with the follow values in table: school with column: grades.1196 1197 SUI grades | Score1198 2 9 21199 2 9 1200 5 4 1