Id int64 34.6M 60.5M | Title stringlengths 15 150 | Body stringlengths 33 36.7k | Tags stringlengths 3 112 | CreationDate stringdate 2016-01-01 00:21:59 2020-02-29 17:55:56 | Y stringclasses 3
values |
|---|---|---|---|---|---|
58,909,097 | Prevent function taking const std::string& from accepting 0 | <p>Worth a thousand words:</p>
<pre><code>#include<string>
#include<iostream>
class SayWhat {
public:
SayWhat& operator[](const std::string& s) {
std::cout<<"here\n"; // To make sure we fail on function entry
std::cout<<s<<"\n";
return *this;
}... | <c++><string><std><implicit-conversion> | 2019-11-18 06:34:30 | HQ |
58,911,507 | keycloak bearer-only clients: why do they exist? | <p>I am trying to wrap my head around the concept of <code>bearer-only</code> clients in Keycloak.</p>
<p>I understand the concept of public vs confidential and the concept of service accounts and the <code>grant_type=client_credentials</code> stuff. But with <code>bearer-only</code>, I'm stuck.</p>
<p>Googling only ... | <keycloak> | 2019-11-18 09:31:27 | HQ |
58,912,460 | Auriez-vous une solution pour détecter les erreurs de memoire dans un programme en C? | Salut,
je suis actuellement en train de recoder certaines fonctions de la lib C et je suis confronté à un problème de type "détection d'erreur mémoire".
Pour la fonction strcpy,
...
char *my_strcpy(char *str1, char *str2)
{
int i = 0;
for (; str2[i] != 0; i++)
... | <c> | 2019-11-18 10:27:06 | LQ_EDIT |
58,912,672 | How to access Rest APIs mentioned in Cotroller class of a Jar file in my Spring Boot Application | I am new to Spring / Spring Boot.
In my Spring Boot Application, I have a **JAR** file which has a Controller class and corresponding Service Interface (not class). I have implemented the Service interface and created a Service class with some logic. Now I want to access the APIs (/v1/getDetails) present in Controll... | <java><spring><spring-boot> | 2019-11-18 10:38:11 | LQ_EDIT |
58,913,428 | What alternatives are there to Hibernate Validator's @SafeHtml to validate Strings? | <p>As stated in the JavaDocs, it will be removed in a future release.
Is there any alternative library which works similarly via annotations?</p>
| <java><hibernate-validator> | 2019-11-18 11:19:51 | HQ |
58,914,523 | Return multiple values from dictionary, python | I've this dictionary
`{'people': [{'name': 'Christina Koch', 'craft': 'ISS'}, {'name': 'Alexander Skvortsov', 'craft': 'ISS'}, {'name': 'Luca Parmitano', 'craft': 'ISS'}, {'name': 'Andrew Morgan', 'craft': 'ISS'}, {'name': 'Oleg Skripochka', 'craft': 'ISS'}, {'name': 'Jessica Meir', 'craft': 'ISS'}], 'number': 6, 'm... | <python><string><list><sorting><dictionary> | 2019-11-18 12:24:26 | LQ_EDIT |
58,915,131 | CAN I USE BOTH PYRHON2 AND PYTHON3 TO DEBUG IN PYCHARM | I'v already install python3 in my windows, but recently i need to use python 2 for a project. I created a new environment in my anaconda, but in pycharm I when wanted to debug the python2 code, a problem occured:
*(Connection to Python debugger failed
Socket operation on nonsocket: configure Blocking)*
I can and... | <python><pycharm> | 2019-11-18 12:59:46 | LQ_EDIT |
58,915,746 | SQL Server select multiple entries from a single column into a single row result | <p>I need to extract some system user data from table "userrole" into a configuration record, but these user permissions are held in a single column and identified by a different roleid.</p>
<p>So my userrole data table looks like this,</p>
<pre><code>UserID RoleID Discriminator
int int NVarChar
3483 1 Pat... | <sql><sql-server><select><row><col> | 2019-11-18 13:31:09 | LQ_CLOSE |
58,917,659 | difference between npm run and nmp start? | <p>we have a lot of ts code which we can compile and run via "npm run dev". This allows us to hit the test js code via localhost. however, in the chrome debugger, 90% of the code is not visible (anonymous), and code which is not is too generic (such as find) to figure out how the thing which the debugger is showing a... | <javascript><npm> | 2019-11-18 15:14:51 | LQ_CLOSE |
58,919,064 | Why in C++ do static_cast<unsigned> of negative numbers differ if the number is constant or not | <p>What's the C++ rules that means <strong>equal</strong> is <em>false</em>?. Given:</p>
<pre><code>float f {-1.0};
bool equal = (static_cast<unsigned>(f) == static_cast<unsigned>(-1.0));
</code></pre>
<p>E.g. <a href="https://godbolt.org/z/fcmx2P" rel="noreferrer">https://godbolt.org/z/fcmx2P</a></p>
<p... | <c++><casting> | 2019-11-18 16:31:45 | HQ |
58,919,753 | CSS - how to target only one element with desired class in div? | <div class="menu">
<ul>
<li>
<ul class="sub-menu">
<li>
<ul class="sub-menu">
<li></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
Could You please tell me how to target just f... | <html><css><css-selectors> | 2019-11-18 17:11:40 | LQ_EDIT |
58,920,848 | Creates a text on a site and retrieves it? c# | <p>I would like to know if there is a text editor or a file uploader/downloader (like pastebin or mega) but for C# program</p>
<p>I explain myself: I am making a program for my college, I would like that when everyone opens my program, that everyone is the same text file, that it can be modified and then saved and whe... | <c#><file> | 2019-11-18 18:33:50 | LQ_CLOSE |
58,921,593 | (Java)How can I check if an 2d array contains a certain line? | If given a 2D array, for example int[][] arr = {{2,3}, {53, 2}, {23,13}}; how can i check if the row {53, 2} exist in the array?
I have the following code:
```
int[][] arr = {{1, 3}, {2, 2}, {2, 5}, {3, 1}, {3, 4}, {3, 7}, {4, 3}, {4, 6}, {5, 2}, {5, 5},
{5, 8}, {6, 4}, {6, 7}, {7, 3}, {7, 6}, ... | <java><arrays> | 2019-11-18 19:28:23 | LQ_EDIT |
58,922,602 | i cannot use my arraylist in class fragment | i try to use arraylist in fragment
my arraylist not work in fragment class.
please help me fix this
before i use this code in main activity, and then i added menu fragment i move this code to this fragment
and then my **arraylist** get error
```
public class HomeFragment extends Fragment {
RecyclerView... | <java><android><android-fragments><arraylist> | 2019-11-18 20:42:23 | LQ_EDIT |
58,923,552 | count only letter abcdefghijklmnopqrstuvwxyz in a list | How to count only letter abcdefghijklmnopqrstuvwxyz in a list in alphabetical order without "Counter"??
For example
input
['Bro', 'lo', '27', 'b']
output
[['b', 1], ['l', 1], ['o', 2], ['r', 1]]
| <python><python-3.x> | 2019-11-18 22:00:46 | LQ_EDIT |
58,924,617 | componentWillReceiveProps has been renamed | <p>I'm using Material ui SwipeableViews That use ReactSwipableView package, I'm getting this error on the console</p>
<blockquote>
<p>react-dom.development.js:12466 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See for details.</p>
<ul>
<li>Move data fetching code or si... | <reactjs> | 2019-11-18 23:50:54 | HQ |
58,929,997 | trying to use bulksms,com api using guzzle in laravel but returning erros | i have been trying to use guzzle for sending bulk sms from bulksms.com and it is returning this error,guzzlehttp\exception\clientexception client error: post https://api.bulksms.com/v1/messages resulted in a 401 full authentication is required to access this resource response: : "type" "https://developer.bulksms.com/js... | <php><laravel><guzzle><laravel-5.8><bulksms> | 2019-11-19 08:53:37 | LQ_EDIT |
58,930,851 | android: button click error (string array) | When I select an item with a spinner and click the button, I want to create a program that generates an array of choices with the spinner, such as 5 to add random numbers and float them in a textview. There are no errors, but when running, click the button to exit the program. Which part is the problem? The entire code... | <android><button> | 2019-11-19 09:40:02 | LQ_EDIT |
58,932,620 | c# open another form from current form button click | <p>I want to open another form on button click and it is image viewer form and i want to enter data on first form with reference as second form but not working, all controls are there on second form itself even in minimization , after closing that form only allowing to enter data on first form.</p>
| <c#><asp.net><.net><winforms><desktop-application> | 2019-11-19 11:06:46 | LQ_CLOSE |
58,933,420 | hello i want to open a file (pdf,docx) in the browser with nodejs ,can any one help me out please . for example with php i'can do it like bellow a | $doc = Document::findOrFail($id);
$path = Storage::disk('local')->getDriver()->getAdapter()->applyPathPrefix($doc->file);
$type = $doc->mimetype;
Log::addToLog('Document ID '.$id.' à été consulté');
if ($type == 'application/pdf' || $type == 'image/jpeg' ||
$type == '... | <node.js> | 2019-11-19 11:48:17 | LQ_EDIT |
58,934,022 | React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template | <p>While executing <code>npx react-native init MyProject</code> I ran into the following error:</p>
<pre><code>✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
</code></pre>
<p>Which seems to be... | <ios><react-native><npm> | 2019-11-19 12:21:36 | HQ |
58,934,303 | Convert letters to lowercase from an array in JS | <p>I have the following code:</p>
<pre><code>var str = "abcabcABCABC"
var chars = str.split("");
var lettersCount = {};
for (var i = 0; i < chars.length;i++)
{
if (lettersCount[chars[i]] == undefined )
lettersCount[chars[i]] = 0;
lettersCount[chars[i]] ++;
}
for (var i in lettersCount)
{
console... | <javascript><uppercase><lowercase> | 2019-11-19 12:37:01 | LQ_CLOSE |
58,936,470 | Why my <div class="header"> doesn't display full width 100% in smallscreen | <p><a href="https://i.stack.imgur.com/kGvkD.jpg" rel="nofollow noreferrer">enter image description here</a></p>
<p>Here is the problem</p>
| <html><css> | 2019-11-19 14:37:19 | LQ_CLOSE |
58,936,628 | PHP - PDO OOP MySQL database connection is being repeated, is that a normal behavior? | <p>I am using a class for db connection like this...</p>
<pre><code>class Dbh
{
private $host;
private $dbName;
private $password;
private $dbUser;
private $charset;
protected function connect ()
{
$this->host = 'localhost';
$this->dbName = 'test';
$this->p... | <php><mysql><oop><pdo> | 2019-11-19 14:46:33 | LQ_CLOSE |
58,937,509 | Is there a better solution to this JavaScript code? | I'm trying to create QR codes in tables.
Links from which i need QR code is in div tag innerHTML.
<script type="text/javascript">
function myfunction() {
// PAGE 1 STARTS
// ROW 1
var TextInsideA2 = document.getElementById('A2').innerHTML;
document.getElementById('barcodeA2... | <javascript> | 2019-11-19 15:28:03 | LQ_EDIT |
58,939,470 | Removing the Hardcoded MYSQL connection string | [this it the connection string that is hardcoded][
ost <<" DRIVER=SQL Server Native Client 11.0; SERVER=Avchar-D\\ENTERPRISE2014;Database="<< czDataSourceName << ";Uid=da; Pwd=P@ssw0rd10;Integrated Security=SSPI;Persist Security Info=False";
| <c++><sqlconnection><hardcoded> | 2019-11-19 17:12:06 | LQ_EDIT |
58,942,470 | Having trouble compiling an ultimate tic tac to code I found because it is in a different coding language than what I am learning | <p>I have a code that I want to run (mega tic tac toe code) that I got from the description of a video, however its in a different language that i am used to (Im learning java and the code is in C#) so I don't know how I should go about compiling this code. I messed around with some of the more well known compilers li... | <c#><compilation> | 2019-11-19 20:41:05 | LQ_CLOSE |
58,943,242 | How to take backup of a Bigquery view script using BQ? | I need to take backup of a view while testing the new bug fixes in the same bq view script. can i use a script to do so?
Also how to I pass table name as a argument in the BQ script? | <google-bigquery> | 2019-11-19 21:42:36 | LQ_EDIT |
58,944,555 | How to strip every character from a string except numeric characters and decimal point | <p>'US $109.90/ea' should become '109.90'</p>
| <javascript><regex> | 2019-11-19 23:44:46 | LQ_CLOSE |
58,944,956 | How do I read content from a .txt file and then find the average of said content in java | I was tasked with reading a data.txt file using the scanner import. The data.txt file looks like this:
```
1 2 3 4 5 6 7 8 9 Q
```
I need to read and find the average of these numbers, but stop when I get to something that is not an integer.
This is the code that I have so far.
```
public static double fileAv... | <java><file><java.util.scanner><average><throws> | 2019-11-20 00:38:45 | LQ_EDIT |
58,945,950 | how to get different columns by joining two tabl | Problem:
I am trying to join table1 and table2 to get the wk_nmbr for begin_date and end_date.
**table1**
begin_date,
end_date
**table2**
cal_date,
wk_nmbr
**Condition:**
table1.begin_date=table2.cal_date and
table1.end_date=table2.cal_date
**expected result in table 3:**
begin_date,
wk_nmbr_... | <sql><sql-server> | 2019-11-20 02:56:59 | LQ_EDIT |
58,951,770 | Grid System Horizontal Order | <p>Is there any way I can accomplish the following order without adding any div's?</p>
<p><strong>t1 t2 t3</strong></p>
<p><strong>d1 d2 d3</strong></p>
<pre><code><dl>
<dt>t1</dt>
<dd>d1</dd>
<dt>t2</dt>
<dd>d2</dd>
<dt>t3</dt>
<dd>d3</d... | <html><css><bootstrap-4><grid> | 2019-11-20 10:13:09 | LQ_CLOSE |
58,952,835 | How do i extract or cut particular data from file | Linux | | I have a Scenario where I want to cut only particular data from file
My file contain below data
/f/demo/Dummy/g/STSE/abc.xml:262:123: <NAME ="ABC_BCD">
/f/demo/Dummy/g/STSE/cde.xml:263:ABX: <NAME ="ABC_BCDXXXXX OBH=TYPE">
/f/demo/Dummy/g/STSE/12a.xml:264:2:456: <NAME ="ABC_BCD... | <shell><sed> | 2019-11-20 11:03:42 | LQ_EDIT |
58,953,776 | i can't solve my Error i'm doing CHECKBOX in recyclerview | '''
package com.example.project.Holder;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
imp... | <android> | 2019-11-20 11:53:39 | LQ_EDIT |
58,954,935 | How to set a checkbox based on a string | <p>I have a function which reads some data from a txt file and than writes the data into my project.</p>
<p>My problem is that i can't fill my checkboxes because they don't recognize strings.</p>
<p>For example</p>
<pre><code>CheckBox1.IsChecked = File.ReadLines(filename).Skip(0).Take(1).First();
</code></pre>
<p>I... | <c#><wpf> | 2019-11-20 12:59:18 | LQ_CLOSE |
58,955,733 | How can I Avoid NaN,While adding numbers from Array in Java Script? | <p><strong>While I get Inputs from text box,and adding those input if i leave space then my result comes with NAN.</strong></p>
| <javascript> | 2019-11-20 13:39:17 | LQ_CLOSE |
58,958,328 | Is there any way to have text size change with window size? | <p>I need <code>font-size</code> to be relative to the windows size. Is there any way that I can do that?</p>
| <javascript><html><css> | 2019-11-20 15:48:06 | LQ_CLOSE |
58,960,843 | How to detect division by zero using std::error_code | <p>I want to detect division by zero using std::error_code. Without the use of exceptions. How can I do that? Write some simple examples.</p>
| <c++><math><std><divide> | 2019-11-20 18:10:51 | LQ_CLOSE |
58,961,900 | While Loop stops working before condition C++ | <p>The while loop should stop at 12 but ends at 9. Also, please ignore I spelled inches incorrectly.</p>
<pre><code>int main() {
double rainFall[12];
int i = 0;
while(rainFall[i] > 0 && i < 12 ){
cout << "Enter your rainfaill in incehs for month #" << i + 1 << ": " ;
... | <c++> | 2019-11-20 19:24:18 | LQ_CLOSE |
58,962,573 | C language : 0xC0000374: A heap has been corrupted (parameters: 0x77AAB960) | The code bellow sometimes throws exceptions similar to:
Exception thrown at 0x779CC19E (ntdll.dll) in Matriks.exe: 0xC0000005: Access violation reading location 0x0000001D.
I'm new to C and just learned to use pointers. Any tips ? Are there other problems in my code that are worth criticizing ?
```
#include <s... | <c> | 2019-11-20 20:10:45 | LQ_EDIT |
58,963,394 | Best way to find how many times an item in a list repeats in a row, in C#? | <p>Given a list, for example:
<code>List<int> _ = new List<int>() { 1, 1, 1, 3, 3, 4, 4, 1, 1, 8, 8, 8, 5, 6, 7, 7, 7, 7, 8, 8 };</code></p>
<p>What would be the best / fastest / most efficient way to find how many times an item repeats in a row, in C#?
For this list, the result I'd be looking for is somet... | <c#><list><iteration> | 2019-11-20 21:08:06 | LQ_CLOSE |
58,967,161 | How to populate a dictionary's value with a list using for loop while? | <p>I wonder how to populate a dictionary's value, for example, having a list with 1000 values or even up to 1000, using for loops while</p>
<pre><code>dict = {}
values= [1,1,1,1,1,1,1,1,1,1,..,1]
dict={'x':[1,1,1,1,1,1,1,1,1,1,..,1]}
</code></pre>
| <python><list><dictionary> | 2019-11-21 04:07:06 | LQ_CLOSE |
58,970,558 | Java NullPointerException on concatenating Double types but not on String types | <pre><code> Double d1 = null;
Double d2 = null;
System.out.println(d1+d2);//throw NullPointerException
String s1 = null;
String s2 = null;
System.out.println(s1+s2);//doesn't throw any exception prints nullnull
</code></pre>
<p>Since both Double and String are of type Object then why Doubl... | <java><nullpointerexception> | 2019-11-21 08:41:30 | LQ_CLOSE |
58,971,126 | PHP is not recognizing file upload extension | <p>I have the following array sent by ajax when echoed in php</p>
<pre><code>[file] => Array
( [name] => XXXX.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\phpC5F2.tmp
[error] => 0 [size] => 25245 )
</code></pre>
<p>and the following code to process the upload:</p>
<p... | <php><html><ajax><pdf> | 2019-11-21 09:12:45 | LQ_CLOSE |
58,971,397 | For loop using more than one list in Python | <p>I'm looking for solution to my problem. At the moment I have two list of elements:</p>
<pre><code>column_width = ["3", "3", "6", "8", "4", "4", "4", "4"]
fade = ["100", "200", "300"]
</code></pre>
<p>What I want to achieve is to create for loop which wil give me following output:</p>
<pre><code>column-3-fade-100
... | <python><loops><for-loop><nested> | 2019-11-21 09:26:16 | HQ |
58,971,881 | Remove the web apps using google apps script | Suppose i have list of web apps in Google admin console. I want to remove the webapps from the list.I know i can remove my webapp from admin console one by one.
But i want to remove(or revoke) the web apps using google apps script. Can we do it? if yes,can you please post the code.
Thanks.
| <google-apps-script><google-admin-sdk><gsuite> | 2019-11-21 09:50:15 | LQ_EDIT |
58,974,054 | How to this box in C? | %@@@%
%...%
%...%
%...%
%@@@%
Where is my mistake pls let me know i am beginner i just started programing. I would apreciate your help
#include<stdio.h>
int main(){
int i,j,num;
scanf("%d", &num);
for(i=0;i<num;i++){
for(j=0;j<num;j++){
if((i==0)||(i==num... | <c> | 2019-11-21 11:35:31 | LQ_EDIT |
58,974,315 | hi, i have a page with side navbar, i want to move this side navbar when i change the page direction to rtl | I have a page which has one sidebar to open different pages. It is working as desired with direction left to right but I want to move this sidebar to the right side when i change the page direction to right to left.
Following is the HTML of my page.
I have searched on internet but I did not get any solution.
From my... | <html><css> | 2019-11-21 11:48:34 | LQ_EDIT |
58,974,616 | Finding out if a big number is a perfect square numbers using C# | <p>Is there a fast and simple way to write a program in C#, that finds out if a big (something like 25 digits big) number is a perfect square or not?</p>
<p>Perfect squares are the numbers: 0^2=0,1^2=1,2^2=4,3^2=9,4^2=16,...</p>
| <c#><math><numbers><square><largenumber> | 2019-11-21 12:03:11 | LQ_CLOSE |
58,975,182 | Deprecation: Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated | <p>I'm using Symfony 4.3.8 and I can't find any information about thoses deprecations :</p>
<blockquote>
<p>User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.</p>
<p>Creating Doctrine\ORM\Mapping\Underscor... | <symfony><doctrine-orm><doctrine> | 2019-11-21 12:33:35 | HQ |
58,976,425 | AAPT: error: attribute android:requestLegacyExternalStorage not found | <p>collection error in AndroidManifest.xml</p>
<p>AAPT: error: attribute android:requestLegacyExternalStorage not found.</p>
<p>Although the attribute is there but it writes an error</p>
<p>My AndroidManifest.xml</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas... | <android> | 2019-11-21 13:42:03 | HQ |
58,976,666 | Java class is despite new ...; not called up | <p>I have a problem with call up a class. I'm programming in Eclipse and I have another Java Program, which works very well, but I can't see any difference. Here is the code of the Main class:</p>
<pre><code>public class Main {
public static void main(String[] args) {
new Var();
... | <java><paintcomponent> | 2019-11-21 13:57:13 | LQ_CLOSE |
58,976,715 | Find first occurrence of a string in a String array in Typescript/Javascript | <p>I have an empty string array. I push into it new strings, and I do this one by one. Then, it will happen that the string I'm pushing is already in the array, and I want to find the index of that original string and split the array in the range:</p>
<p><code>[start, index_of_firstString]</code>.</p>
<p>So if we hav... | <javascript><arrays><typescript><duplicates> | 2019-11-21 14:00:24 | LQ_CLOSE |
58,979,526 | How to set ADC for MC9S08QG8 micro controller in C language | <p>Im new to coding in C language and I don't know how to activate the Analogue to Digital converter on the QG8 micro controller. Its quite outdated tech as far as I'm aware as I'm struggling to find any code for it. The overall project is to create a Voltmeter using a potential divider, so I'm having a voltage going f... | <c><microcontroller><electronics> | 2019-11-21 16:29:59 | LQ_CLOSE |
58,981,896 | Why does it show none at the end? Once i call the main function? How does the code need to be improved to not have it show none at the end? | <p>Once i call the main function I get none at the end. How does the code need to be improved to not have it show none in the end of the function call.
<a href="https://i.stack.imgur.com/H0oEa.png" rel="nofollow noreferrer">def count_spaces, then call main function to count number of spaces</a></p>
| <python><function> | 2019-11-21 18:55:26 | LQ_CLOSE |
58,982,286 | Spring Security 5 Replacement for OAuth2RestTemplate | <p>In <code>spring-security-oauth2:2.4.0.RELEASE</code> classes such as <code>OAuth2RestTemplate</code>, <code>OAuth2ProtectedResourceDetails</code> and <code>ClientCredentialsAccessTokenProvider</code> have all been marked as deprecated.</p>
<p>From the javadoc on these classes it points to a <a href="https://github.... | <java><spring-boot><spring-security><spring-security-oauth2> | 2019-11-21 19:20:03 | HQ |
58,982,603 | How to properly step by step install java and javafx in Intellij on Linux? | <p><br> I think I am not alone who doesn't know how to properly download Java and JavaFX on Linux. And how make it works in IntelliJ Idea <br><br>
So my questions are: <br></p>
<ol>
<li>I'm looking for Java JRE or Java SDK?</li>
<li>Must Java and JavaFX be at same version?</li>
<li>How I will connect it with IntelliJ<... | <java><linux><javafx><sdk> | 2019-11-21 19:40:20 | LQ_CLOSE |
58,985,626 | IndexOutOfBounds: Why does low keep going past high | <p>I keep getting an IndexOutOfBounds error for the if statement down below and I don't know why. low is initially 0, high is set to 24, and the size of the ArrayList is 25. </p>
<pre><code> for(int i = low + 1; low <= high; i++){
if(list.get(i).compareTo(list.get(pivIndex)) < 0){ //this l... | <java><for-loop><arraylist><indexoutofboundsexception><quicksort> | 2019-11-22 00:10:32 | LQ_CLOSE |
58,988,269 | How to convert multi String array to string array in swift | <p>var names:[[String]] = [["google"],["yahoo"],["facebook"]]</p>
<p>var convertNames:[String] = []</p>
<p>//how to convert names multi String array to convertNames String Array</p>
| <swift><multidimensional-array> | 2019-11-22 05:53:37 | LQ_CLOSE |
58,989,076 | Use default predicate in WHERE method | <p>Can I use a default predicate in the <code>where</code> method?</p>
<p>In my db I have a column <code>IsDeleted</code> for every tables. Is there a way when i get some data like this</p>
<pre><code>_dbContext.Person.Where(x => x.Age > 35).FirstOrDefault();
</code></pre>
<p>it will also use another predicate... | <c#><linq> | 2019-11-22 06:59:08 | LQ_CLOSE |
58,989,993 | Can I convert numbers to amount of characters in python | Hi just wondering if I can convert a number like 3 into a string wich gives me the amount of characters in a input. Like: 3 = --- and 6 = ------
Thanks in advance, Thijs | <python> | 2019-11-22 08:08:44 | LQ_EDIT |
58,992,060 | Java - How to get items out of a list with String Arrays | <p>How do I get a specific item out of a "List" at a specific index?</p>
<pre><code>private List<String[]> rows;
</code></pre>
| <java><list><get> | 2019-11-22 10:16:48 | LQ_CLOSE |
58,993,190 | What does `{...}` mean in a python 2 dictionary value printed? | <p>While debugging a python program I had to print the value of a huge dictionary on a log file. I copy-pasted the value and when I assigned it in the python 2 interpreter I got <code>SyntaxError: invalid syntax</code>. What? How was that possible? After a closer look I realised the dictionary in the file was something... | <python><dictionary><printing><ellipsis> | 2019-11-22 11:19:27 | LQ_CLOSE |
58,993,381 | Portuguese Vehicle plate verification | I want to validate if a plate of a portuguese car is valid.
Portuguese Plate is XX-XX-XX alpha numeric.
It's Alpha numeric but you can´t have a number and a Char on the same position
Example : A5-99-AB -> It's wrong / 55-99-AB-> it's right
| <javascript><outsystems> | 2019-11-22 11:29:28 | LQ_EDIT |
58,993,845 | c# Transfer multiple records in list in class | I want to pass class to front angular app from backend c#
for that I made special class where I pass some params. PLease take a look at the last one.
There is seperate table in DB which stores pics. And I want to pass list of pictures with other data. for that in transfer class I tried to declare list of piclass.
... | <c#><list><class> | 2019-11-22 11:59:06 | LQ_EDIT |
58,994,348 | Flutter How to not show the [] Brackets of a list when being displayed as a text? | <p>I am trying to display a list rendered in text. But when I do I see the []</p>
<p>I have tried the following.</p>
<pre><code>Text(hashList.toString().replaceAll("(^\\[|\\])", ""))
</code></pre>
<p>Brackets are still there.</p>
| <flutter><dart> | 2019-11-22 12:29:41 | LQ_CLOSE |
58,994,456 | How to return multiple results from store procedure using dapper | I have two tables Attributes and Types. Both I need to return at the same time using store proc in dapper. | <asp.net-mvc><sql-server-2012><dapper> | 2019-11-22 12:36:32 | LQ_EDIT |
58,996,344 | Learned how to make responsive HTML Emails from scratch using HTML & CSS. What's next? | <p>Looking at jobs online most of them have: Experience using MailChimp or Oracle responsys. Are these what most HTML Email developers use at work? </p>
<ul>
<li>Also I tested my code using the free <a href="https://putsmail.com/tests/new" rel="nofollow noreferrer">https://putsmail.com/tests/new</a> on gmail and hot... | <html><css><html-email><mailchimp><email-templates> | 2019-11-22 14:31:21 | LQ_CLOSE |
58,998,337 | When adding string to Hashtable, string gains unrecognizable characters | <p>So currently I have a hash table that I create and populate it with keys and values</p>
<pre><code>Hashtable m_hash = new Hashtable();
</code></pre>
<p>I then have a string that I have created with a value that will replace a specific value in the hash table.</p>
<pre><code>string birthday = "1979/01/01"
</code><... | <c#><string><hashtable> | 2019-11-22 16:36:58 | LQ_CLOSE |
58,999,218 | Public alias for non-public type | <p>I wonder if it is valid C++ :</p>
<pre><code>class Test {
struct PrivateInner {
PrivateInner(std::string const &str) {
std::cout << str << "\n";
}
};
public:
using PublicInner = PrivateInner;
};
//Test::PrivateInner priv("Hello world"); // Ok, private... | <c++><alias><access-modifiers> | 2019-11-22 17:38:42 | HQ |
58,999,621 | Make website remain in desktop view both on mobile view | <p>I want my site to have the exact same desktop view on mobile, any possible solution is okay.To get exactly what I meant, open bithubpay.com on your mobile and desktop, they both got the same view.
I will tag many options because I don't know where the solution will come from</p>
| <javascript><jquery><html><css> | 2019-11-22 18:10:17 | LQ_CLOSE |
59,000,503 | PHP/MySQLi: Get recent 10 entries from all tables | Is there any way to get last entry from all tables? I even did not find way to query all tables, tried this: [code]SELECT * FROM *[/code]. | <php><mysql> | 2019-11-22 19:21:05 | LQ_EDIT |
59,002,108 | Is there a better way to convert string list having nan values to list | input list = `'[12,2,4,nan,0]'`
ouput = `['12','2','4','nan','0']`
One option is yaml.safe_load(), But it's too slow. I am looking for a efficient way to transform. | <python><python-3.x><parsing> | 2019-11-22 21:41:34 | LQ_EDIT |
59,002,745 | c#, get and set for class property seems to have no effect | <p>so in my little c# console-program, i have i have this class, where I use get and set methods for my properties</p>
<pre><code>class myClass
{
public int ID { get; set; }
public string value { get; set; }
public myClass(int ID, string value)
{
this.ID = ID;
this.value = value;
}... | <c#> | 2019-11-22 22:47:15 | LQ_CLOSE |
59,002,746 | How do you keep taking input as constantly C++ | Let's say that the input is like this:
2
xsad
sadsad
There are no constraints so how do you create a loop function that will keep on going that will store each of those in a string.
Like the first number is the amount of lines of strings. How do you create a loop function that would read the first number ex: 100... | <c++> | 2019-11-22 22:47:33 | LQ_EDIT |
59,003,612 | Extend SwiftUI Keyboard with Custom Button | <p>I'm trying to find a way to add a key or button to the SwiftUI numberPad. The only
references I have found say it is not possible. In the Swift world I added a toolbar
with a button to dismiss the keyboard or perform some other function.</p>
<p>I would even build a ZStack view with the button on top but I can't fin... | <ios><xcode><keyboard><swiftui> | 2019-11-23 00:56:51 | HQ |
59,005,951 | I can't create a struct with the data retrieved from request | <p>I'm trying to get the values passed by json in my API, example below:</p>
<p><a href="https://i.stack.imgur.com/R9bMI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R9bMI.png" alt="Insomnia data"></a></p>
<p>The code:</p>
<p><a href="https://i.stack.imgur.com/wYAZj.png" rel="nofollow noreferre... | <json><go><struct><mux><insomnia> | 2019-11-23 08:42:39 | LQ_CLOSE |
59,007,007 | Is there an equivalent of "tools:layout=" for FragmentContainerView? | <p>In order to be able to see the content of a certain view inside a fragment when previewing a layout in Android Studio, it is possible to do <a href="https://developer.android.com/studio/write/tool-attributes#toolslayout" rel="noreferrer">this</a>:</p>
<pre class="lang-xml prettyprint-override"><code><MainLayoutV... | <android><android-studio> | 2019-11-23 11:12:24 | HQ |
59,009,048 | What are the possible ways that test cases can be written for Set() type of method | I'm completely new to writing unit test cases for the code using ```xUnit```. I'm unsure of what else can be tested for my method ```TranslateResponse()``` . It basically checks the type of translator and calls the translator's associated ```set()``` method.
```
public async Task TranslateResponse(Policy response)
... | <c#><unit-testing><mocking><moq><xunit.net> | 2019-11-23 15:13:37 | LQ_EDIT |
59,009,184 | What technology can mainframe folks learn and work in the future | <p>Can anyone please let me know what technology we can shift after reaching 10 years of experience(I.T) in mainframes. Can we learn the skills Python, Cloud(AWS/AZURE/Openstack), Data science or _ with mainframes?</p>
<p>Any suggestions on this.</p>
| <generics><mainframe> | 2019-11-23 15:29:52 | LQ_CLOSE |
59,014,656 | Css fille issue | I have tried too many times to link the css file externally but it doesn't work yet. It is working fine with internal css and inline css but not with external css. I have checked too many times the name, location and folder of that file but still not find any solution. Here are some codes of mine.
<!-- language: ... | <html><css> | 2019-11-24 04:26:43 | LQ_EDIT |
59,015,801 | Horizontally and vertically flexbox css not working | <p>I'm trying to center the below HTML vertically and horizontally but it's not working vertically, only horizontally. Please could someone help explain why it's not working?</p>
<pre><code><body>
<header class="nav">
<img class="icon" src="./img/eiffel-tower.svg" attr="Icon made by Monkik f... | <css><flexbox> | 2019-11-24 08:13:42 | LQ_CLOSE |
59,016,061 | Please help on Arduino | I wrote a program for Arduino for object avoiding using three ultrasonic sensors but it is giving error in compile. Can anyone suggest why is the error coming and how I can resolve it:
int trigPin = 6;<br/>
int echoPin = 7;<br/>
int trigPin = 8;<br/>
int echoPin = 9;<br/>
int trigPin = 10;<br/>
int echoPin = 11... | <c++><arduino> | 2019-11-24 08:55:11 | LQ_EDIT |
59,018,001 | when should we use semaphore vs Dispatch group vs operation queue ? [Swift iOS] | when should we use semaphore vs Dispatch group vs operation queue ?
i am aware of part how all of them works, but i am not sure when to use which option. since all of the things i can achieve with semaphore can also be achieved through dispatch group and also through operation queue.
Is there any specific area w... | <ios><swift><multithreading> | 2019-11-24 13:13:11 | LQ_EDIT |
59,018,462 | Why is a commit not showing on the github repo but I can provide a working link to said commit? | <p>So I have been trying to figure out why <a href="https://github.com/mwoolweaver/tweetStats/commit/a0e70c7b7aba44e62c69edbff022a6d6452f7ee6" rel="nofollow noreferrer">this commit</a> is not showing anywhere? </p>
| <github> | 2019-11-24 14:02:37 | LQ_CLOSE |
59,018,601 | Can I tell C# nullable references that a method is effectively a null check on a field | <p>Consider the following code:</p>
<pre><code>#nullable enable
class Foo
{
public string? Name { get; set; }
public bool HasName => Name != null;
public void NameToUpperCase()
{
if (HasName)
{
Name = Name.ToUpper();
}
}
}
</code></pre>
<p>On the Name=Name.To... | <c#><nullable-reference-types> | 2019-11-24 14:16:49 | HQ |
59,019,259 | how to invoke the _Verify_range in vector in c++? |
my code
```c++
#include <iostream>
#include <vector>
#include <algorithm>
using std::vector;
using std::cout;
using std::endl;
using std::back_inserter;
int main(void) {
vector<int> coll1 {1, 2, 3, 4};
vector<int> coll2;
copy(coll1.begin(), coll1.end(), back_inserter(coll2));
c... | <c++><vector><visual-c++> | 2019-11-24 15:26:45 | LQ_EDIT |
59,019,435 | Submit form to fill up the last recent ID row [MySQL] | <p>Lets say I have this table:</p>
<pre><code>------------------
ID | Car |
------------------
25 | Honda |
.. | ... |
.. | ... |
.. | ... |
123 | Toyota |
------------------
</code></pre>
<p>How to start fill in at row 124 instead of filling up row 1 til row 24 first? Assumi... | <php><mysql> | 2019-11-24 15:45:54 | LQ_CLOSE |
59,020,090 | How do I set the value of a key in on array as the key in an other array | I am trying to get the value("feature_1") of a key("name") from the array("data") and set the value of that key as the key to another array("asset") which has an array as value. Is that possible ?
Example :
```
//input:
data: {
name: "feature_1",
value_a: 1,
value_b: 2
}
//Output:
ass... | <javascript><arrays><json> | 2019-11-24 16:51:37 | LQ_EDIT |
59,022,821 | Matlab - Incorrect dimensions for raising a matrix to a power | <p>Suppose we have <code>a=60</code> and <code>B=60</code>. I am trying to calculate this area:</p>
<p><a href="https://i.stack.imgur.com/qE4bT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qE4bT.png" alt="enter image description here"></a></p>
<p>when I try this:</p>
<pre class="lang-matlab pre... | <matlab><vector><angle><area> | 2019-11-24 21:56:28 | LQ_CLOSE |
59,022,859 | Multiply by transposing rows by date in R | I want to convert this table :
[![enter image description here][1]][1]
to that table with **R**
[![enter image description here][2]][2]
In brief : converting the time periods between start date and end date to months table vertically
Thanks!
[1]: https://i.stack.imgur.com/7s8SQ.png
[2]: https... | <r><date><dataframe><reshape> | 2019-11-24 22:01:06 | LQ_EDIT |
59,022,968 | Java array inheritance not recognized by subclass | <p>I am working on a project where several classes have to inherit information. I am currently trying to get a subclass to inherit and work with an array from a superclass. The subclass isn't doing anything when I try to access the array. I can return the array after the information is read from the text file and place... | <java><arrays><inheritance> | 2019-11-24 22:16:09 | LQ_CLOSE |
59,023,616 | Why isn't `std::mem::drop` exactly the same as the closure |_|() in higher-ranked trait bounds? | <p>The implementation of <a href="https://doc.rust-lang.org/std/mem/fn.drop.html" rel="noreferrer"><code>std::mem::drop</code></a> is documented to be the following:</p>
<pre class="lang-rust prettyprint-override"><code>pub fn drop<T>(_x: T) { }
</code></pre>
<p>As such, I would expect the closure <code>|_| ()<... | <rust><closures><traits><type-inference><higher-kinded-types> | 2019-11-25 00:00:17 | HQ |
59,023,891 | Loading script in functions.php Wordpress | <p>So I'm trying to put some javascript into my functions.php and run it from there but everytime I do that I get an error on my page when site is reloaded... </p>
<p>"Parse error: syntax error, unexpected 'wp_enqueue_script' (T_STRING) Local Sites\custom-site\app\public\wp-content\themes\theme\functions.php on line 3... | <javascript><php><wordpress> | 2019-11-25 00:44:53 | LQ_CLOSE |
59,024,519 | C# array include symbol | <p>I have list of items:</p>
<pre><code>Apple\3
Orange\8
Kivi\9
</code></pre>
<p>I wish to add these items in C # array:</p>
<pre><code>string[] fruit={"Apple\3","Orange\8","Kivi\9"};
</code></pre>
<p>But it return me error as the backslash not acceptable ("\"), by the way the backslash is a must to include, anyone... | <c#> | 2019-11-25 02:35:13 | LQ_CLOSE |
59,030,500 | How google tracks me without using mobile my internet data plan? | I'm developing an app that can shows all the bus lines in my city, i'd like to show if the bus is crowed or not, and even get the bus position by another user that is inside it.
But I don't want to use all the internet plan from my users, i see that google does that, he know when a restaurante or bar has people ther... | <google-maps><tracking> | 2019-11-25 11:14:36 | LQ_EDIT |
59,030,668 | How do I insert a Machine Name info a path? | So my goal is to put a MachineName string into the path location.
Here = MachineName1
string MachineName1 = Environment.MachineName;
Path = @"C:\Users\ Here \AppData\Local\Secret\Secret"; | <c#><string><path> | 2019-11-25 11:22:50 | LQ_EDIT |
59,031,273 | REIMPLEMENTING SPLIT FUNCTION IN C | How can i rewrite the following code into the one below but be able to can the delimiter on each call to the function. I am trying to split line into an array of char*
CODE 1:
```
char *split(const char *string)
{
char *words[MAX_LENGTH / 2];
char *word = (char *)calloc(MAX_WORD, sizeof(char));
... | <c><arrays><string><pointers> | 2019-11-25 11:54:40 | LQ_EDIT |
59,031,968 | how to apply for-loop in between string data to create an order in shopify through api | <pre><code>string data = @"
{
""order"": {
""line_items"": [
{
""variant_id"":" + varientid_arr[0] +@",
""quantity"":" + quantity_arr[0] + @"
}
],
""... | <c#><string><api><loops><shopify> | 2019-11-25 12:33:50 | LQ_CLOSE |
59,033,156 | JavaScript code not working with "toLowerCase" on equating it with value received from prompt | <pre><code>let browser = prompt('Enter browser name','Enter here..');
if (browser.toLowerCase=='edge') {
alert('You got the Edge!');
}
else if (browser.toLowerCase=='chrome' || browser.toLowerCase=='firefox' || browser.toLowerCase=='safari' || browser.toLowerCase=='opera') {
alert('Okay we support these browse... | <javascript><loops><prompt><lowercase> | 2019-11-25 13:39:39 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.