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 |
|---|---|---|---|---|---|
54,966,569 | Linq Group with inside array element | ```
a = new { Key = new[] {1, 2} };
b = new { Key = new[] {2, 3} };
c = new { Key = new[] {3} };
```
I want a linq func that will got the result below, after `new [] {a, b, c}.func(x => x.Key)`
```
new KeyValuePair[] {
{ Key = 1, Value = new [] { a } },
{ Key = 2, Value = new [] { a, b } },
{ Key = ... | <c#><linq> | 2019-03-03 07:30:54 | LQ_EDIT |
54,966,984 | how to extract meaning of thw word using the oxford api in python | i am using the oxford api to get the meaning of a word in python .
here is my code
import requests
import json
app_id = '2a878969'
app_key = '215d68e146462106de8196ff58e059c2'
language = 'en'
word_id = 'help'
url = 'https://od-api.oxforddictionaries.com:443/api/v1/entries/'+ langu... | <python><json> | 2019-03-03 08:34:44 | LQ_EDIT |
54,967,714 | Probability density algorythm | I'm not sure that the name for what I need is ***probability density*** but anyway.
I'd like to find a function or algorythm for generating random numbers in the specified range with specified chance and linear change.
For example specified range and chances are: [Chart of chances][1]
Range from -10 to 15.
... | <javascript><algorithm><random> | 2019-03-03 10:10:03 | LQ_EDIT |
54,969,451 | how to get all videos duration before or without playing the video using jquery or javaScript | Hello I have problem in my code to getting duration of all videos. error showing me undefined below my code please help me anyone for that.
$("video").each(function(){
var duration = $(this).attr('duration');
alert(duration);
});
its giving me undefined alert please tell me where i doing wr... | <javascript><jquery><html> | 2019-03-03 13:44:57 | LQ_EDIT |
54,969,765 | I have to detect the end of line in a file tou count the number of comma separated strings in a line | I have a file which looks like this.
2,1,4,6,7
1,2,3,6,5
Now i have to count the the digits in a single line ignoring the comma. For eg the first line has 5 digits so does the second line. The no of digits can vary in each line. I used getline with comma delimeter. But then still i dont know when the line ends. The ... | <c++><delimiter-separated-values> | 2019-03-03 14:18:49 | LQ_EDIT |
54,971,149 | UI5 Javascript code not working, semantic | my Code is not working ... i guess it is a problem with a semicolon?
Can anyone help me... i've try to fix this code now for days :(
It's a problem of the syntax, not the semantic...
I guess its a problem with the parentheses or semicolon on one point.
In the program i got the error: "parsing error:unexpeted token ... | <javascript><sapui5> | 2019-03-03 16:39:51 | LQ_EDIT |
54,971,746 | can't link to js and css in local directory | <p>I have a laptop that rarely has internet connection. But I need Bootstrap and jQuery, so I decided to create local jQuery file and download Bootstrap and link to them in html file. So I use <code><link rel="stylesheet" href="D:/Bootstrap-4.3.1/css/bootstrap.min.css"></code> but it doesn't work. Same with jQuer... | <javascript><css> | 2019-03-03 17:37:05 | LQ_CLOSE |
54,972,227 | How Inheritance works in C# | <p>I have a code </p>
<pre><code>using System;
namespace ExploreOOP
{
class Program
{
static void Main(string[] args)
{
Base1 b1 = new Derived1();
Derived1 d1 = new Derived1();
b1.write();
d1.write();
Console.WriteLine();
... | <c#><oop><inheritance> | 2019-03-03 18:26:56 | LQ_CLOSE |
54,972,613 | Why can't delete the right node? | <p>i have some code here. I'm using linked list in this code. We can add note, displas it and also delete. The problem occur when i want to delete something.
1. create one node, then try to delete it. It can detect and delete the node.
2. create two node, then i try to delete the 1st one. but it delete the second.
I re... | <c++> | 2019-03-03 19:06:38 | LQ_CLOSE |
54,973,061 | Why is a password-protected root account a security issue in Amazon EC2? | <p>just asking this out of curiosity. i set up a free EC2 instance last night and as i was ssh-ing around the file system, i realized the root password hadn't been set, and that there was no <code>sudo</code> password. this is shocking to me, as i'm used to always setting a root/<code>sudo</code> password during the in... | <linux><amazon-web-services><security><amazon-ec2> | 2019-03-03 19:54:26 | LQ_CLOSE |
54,973,733 | SQL How to query for earliest stock price? | <p>I have a table that has rows for various stock prices at various times of the day for many different companies. Each row is a stocks price at a particular time of day. The times are not the same for each stock. </p>
<p>I can't figure out how to query for the price of each stock at the earliest time point. </p>
<p... | <mysql><sql> | 2019-03-03 21:04:37 | LQ_CLOSE |
54,976,177 | C++ Array Index | <p>I'm trying to make a black jack like card program in c++, but one of the restrictions is that the array of the cards has to contain both the suit and value of the card, i.e 2H, 3H, 2C, 3C, and so on. How would I do this?</p>
| <c++><arrays><indexing> | 2019-03-04 03:17:47 | LQ_CLOSE |
54,977,121 | cannot resolve symbol 'R' in android studio 3.3.1 | I am using android 3.3.1. I am currently taking an android development bootcamp online course on udemy. After I cloned the project from github to android studio (bitcoin-ticker), after the graddle files synchronize and project is loaded, when I open the MainActivity in java, I get R in red saying cannot resolve symbol ... | <android><android-studio> | 2019-03-04 05:24:59 | LQ_EDIT |
54,978,504 | Best Website to record logs like progress, errors, bugs, requests | <p><br>
I am looking for a website, where I can invite all my developers <br> and they can create a log of the apps they are making . <br>
I will also be inviting tester for same project so that they can also create a bug log, or report error and request a developer to look and examine it. <br>
basically I want a websi... | <ios> | 2019-03-04 07:32:07 | LQ_CLOSE |
54,978,961 | Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener on a null object reference at SignUpActivity.onCreate | <p>I tried to click the signup button in the loginactivity but when click the button in the app, it will jump out and give an error like this, it's true that there are questions similar to the one I'm asking, but I really tried all the solutions you proposed but it does not work for me.</p>
<p>The error:</p>
<pre><co... | <java><android><null><invoke> | 2019-03-04 08:04:40 | LQ_CLOSE |
54,979,083 | I want to filter Nested JSON wich contain array also | {
"data": {
"typeList": [
{
"name": "Important"
},
{
"name": "Govt"
},
{
"name": "Bank"
},
{
... | <angular><typescript><pipe> | 2019-03-04 08:13:42 | LQ_EDIT |
54,979,943 | Getting value outside (for) loop | I need to get values of Z variable outside a `for` but when i print it in console from inside the loop it gives correct values, while i printing it from outside the loop, it gives one value of value that supposed to be returned
fetch('http://open.mapquestapi.com/elevation/v1/profile?key=tHXSNAGXRx6LAoBNdgjjLycOh... | <javascript> | 2019-03-04 09:11:45 | LQ_EDIT |
54,981,508 | Slicing words from string | <p>I have a string that has words and spaces,</p>
<pre><code>var version = "One Forty Six 1.1 V2 (10 kilo / 20 kilo) (2000 - 2005)"
</code></pre>
<p>I want to extract</p>
<pre><code>One Forty Six 1.1 V2
</code></pre>
<p>out of it.
What is the best practice of doing it? How can i use <strong>.slice</strong> to extra... | <javascript><jquery> | 2019-03-04 10:40:57 | LQ_CLOSE |
54,982,956 | use java print binary tree from left to right fashion | like this
99
97
92
83
71
69
49
44
40
32
28
18
11
and it require
Recursively call outputTree with the right subtree of the current node and
totalSpaces + 5
Use a for sta... | <java> | 2019-03-04 12:08:45 | LQ_EDIT |
54,983,844 | using regex to match integer in C# | <p>I want a regex to match strings like "1" , "15000" and "15000." as integer, but do not match "15000.0"</p>
<p>I have tried:</p>
<pre><code>[0-9]+(\\.|[0-9]+)?
</code></pre>
<p>but failed</p>
<p>How to write this regex in C#</p>
| <c#><regex> | 2019-03-04 13:00:49 | LQ_CLOSE |
54,984,382 | How to remove duplicates from inked list which repeats double number of times(C++)? | I've been trying to create own linked list class on C++. My task is remove all nodes which data repeats double number of times in list and store only one node if data repeats odd number of times. I've written function removeDuplicates(), but my program crashes when i try to use the function. Implementation here:
... | <c++> | 2019-03-04 13:33:16 | LQ_EDIT |
54,984,708 | android text to speech not speeking |
the problem i am having is when i set tts.speak using the s string variable it works perfectly however when i use the text i pass in with the function call it does not work both string veriables are the exact same
private void speek(final String text){
tts = new TextToSpeech(this, new TextToSpeech.O... | <java><android><text-to-speech> | 2019-03-04 13:53:19 | LQ_EDIT |
54,984,764 | javascript's object: Get only the first key of an object | <p>I'm trying currently to get only the first key of an object for my process. It would allow me to make some comparisons with the root of different objects. </p>
<p>currently I use a loop and break at the first instance. Maybe there is more relevant way to achieve this goal? </p>
<p><div class="snippet" data-lang="j... | <javascript> | 2019-03-04 13:56:57 | LQ_CLOSE |
54,984,957 | golang append syntax error: missing statement after label | <pre><code> fmt.Print("Text to send: ")
text, _ := readerConsole.ReadString('\n')
sizen := (int)(unsafe.Sizeof(text))
fmt.Print(sizen)
var bs []byte
binary.BigEndian.PutUint32(bs, sizen)
b := []byte(text)
a: = append(bs, b...)
</code></pre>
<p>Go formatter says error
"syntax error: mis... | <go><append> | 2019-03-04 14:09:21 | LQ_CLOSE |
54,985,407 | Variable could't be recognized by server | <pre><code><pre>
$query = "select * from user WHERE username = '$username'";
$query_run = mysqli_query($con,$query);
</pre>
</code></pre>
<p>When I execute the program it show me this message. Undefined variable: con in </p>
| <php> | 2019-03-04 14:35:00 | LQ_CLOSE |
54,985,419 | How to implement a simple notification system in Rails? | <p>I would like to implement a simple notification system in Rails(no gem). Let's say I have a blog app using Devise for auth, and on a post posted by user A(logined) there is a "Like" button, if another user, user B clicks on that button, I would like to notify user A with a simple notification like: "User B liked you... | <ruby-on-rails> | 2019-03-04 14:35:58 | LQ_CLOSE |
54,985,658 | Join two tables with additional field in one table | <p>I would like to join together two tables with additional columns.</p>
<p>First table is for number of products despatched by product</p>
<pre><code>** Table 1 - Despatches **
Month ProductID No_despatched
Jan abc 10
Jan def 15
Jan xyz 12
</code></pre>
<p>The second... | <sql><sql-server><tsql><join> | 2019-03-04 14:49:09 | LQ_CLOSE |
54,986,422 | Does a javaScript file always have to be named main.js when using it for website? | <p>I am making a website for a school project. I am currently linking my sign up page to send information to my firebase database (it works so far). But I was wondering if I could have multiple .js files for the same website in the same folder. I started out with a "main.js" file, linked it to my signUp.html. Then, I t... | <javascript> | 2019-03-04 15:31:24 | LQ_CLOSE |
54,989,828 | cannot use file (type *multipart.FileHeader) as type []byte in argument to ioutil.WriteFile | I'm trying to upload multiple files in the same golang function. Here is my code:
func PhotoCreatePOST(w http.ResponseWriter, r *http.Request) {
var err error
r.ParseMultipartForm(32 << 20) // 32MB is the default used by FormFile
fhs := r.MultipartForm.File["files"]
var fileNames []string
v... | <go><file-upload> | 2019-03-04 18:59:05 | LQ_EDIT |
54,990,034 | Getting todays date in a specific date format in a react application | I will like to get todays date in the format below in a react.js application.
"2019020420"
I am able to get the current date with this function. How can I modify this such that
it will give me the above date format.
getCurrentDate() {
var tempDate = new Date();
var date = tempDate.getFullY... | <javascript><reactjs> | 2019-03-04 19:12:08 | LQ_EDIT |
54,990,096 | Excel - VBA: want to split a folder with large number of files | I am in a strange situation... I get a large number of files (XML or Excel)... I store it in a folder.
But, I need to split it into smaller batches and give it to my team members, so that they can work on those files.
So, I want to create a Macro that can split the folder (for example 1000 files) into about 10 fo... | <excel><vba> | 2019-03-04 19:16:12 | LQ_EDIT |
54,990,985 | Can't access to data in S3 with Lambda | I´m using Javascript for a few months and my code runs well in local but I have always the same problem in a lambda function.
I cant show any data from s3.getObject.
This is an simple code that doesnt run on lambda function.
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
exports.myHan... | <javascript><node.js><amazon-web-services><aws-lambda> | 2019-03-04 20:23:38 | LQ_EDIT |
54,991,504 | how convert double to string | <pre><code>public String solve() {
ss = log(pow(y, -sqrt(abs(x)))) * (x + y / 2) + sin(atan(z));
result = toString(ss);
return result;
}
</code></pre>
<p>Don't get how do I convert <code>ss</code> to string. I neen return result in String format</p>
| <java><android><types> | 2019-03-04 21:03:40 | LQ_CLOSE |
54,991,724 | Joining a list in python with different conditions and separator | <p>I have a list of integer</p>
<p><code>a=[1,2,3,4,5,6,7,8,9]</code></p>
<p>and i must create a string with the integers separated by spaces and every five number i must add a '\n'</p>
<p><code>string='1 2 3 4 5\n6 7 8 9\n\n'</code></p>
<hr>
<p>I have tried with a join like that:</p>
<p><code>string=' '.join(a)<... | <python> | 2019-03-04 21:20:02 | LQ_CLOSE |
54,991,892 | Ruby on Rails Developed Applications | <p>I'm looking to develop a desktop (not server) web application and I have been comparing Ruby on Rails vs Django. Question is, with Django the client needs to install Python 2.5, does the client need to install anything to execute a Ruby on Rails application?
Thanks....</p>
| <python><ruby-on-rails><django> | 2019-03-04 21:34:02 | LQ_CLOSE |
54,992,431 | Cant get past - Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional Value | <p>I know this topic has been discussed before. Im beginner so I tried my best but couldn't get past the error. I am following youtube tutorial on making an app to use iOS camera. I believe they used swift 3 and older iOS so Im guessing that's the issue here. I took their source code and still got same error.<a href="h... | <ios><swift> | 2019-03-04 22:17:29 | LQ_CLOSE |
54,992,856 | Is this explanation of ternary operator valid? | <p><strong>Question:</strong></p>
<ul>
<li>I want to know if this explanation of the ternary operator is valid.</li>
</ul>
<blockquote>
<p>var = (condition) ? set value if condition one : set value of condition two;</p>
</blockquote>
<p>If the condition is something than the value of the variable will be something... | <c++><operators><conditional-statements> | 2019-03-04 22:53:33 | LQ_CLOSE |
54,993,159 | C# - Access - Problems with double queries | I'm trying to execute 2 query in one button click.. It doesn't seem to work and just closes automatically.. Does anyone can help me or explain to me why my code doesn't work? Here's the code:
test = 1;
{
connection.Open();
string strTemp = " [StudentNum... | <c#><ms-access> | 2019-03-04 23:26:15 | LQ_EDIT |
54,994,980 | parsing specific strings from xml to a sql db in javascript | i am looking for the best way to parse a specific string from a xml page.
the page in question will have lots of links all with a prefix video and i want to save the number after video/ also has to be a specific line where the video is located.
eg. <vidloc>http://example.com/video/12345/myvid.mp4
so i want to ... | <javascript><xml-parsing> | 2019-03-05 03:27:46 | LQ_EDIT |
54,996,154 | PHP Fatal error: Cannot use try without catch or finally | <p>I am getting the following error on my web page<strong>Fatal error: Cannot use try without catch or finally <em>in apply-for-job.php on line 13</em></strong> and I cant find the error myself pleas I need help Thanks. Bellow is my code:-</p>
<pre><code><?php
include 'connect.php';
if(isset($_POST['apply'... | <php> | 2019-03-05 05:45:41 | LQ_CLOSE |
54,997,550 | List of int get the records up to a certain value | <p>I have a <code>List<int></code> and I need all the first records that total reaches a value</p>
<p><code>List<int> Values= new List{10,30,70,50,60};</code>
and value is 100 so i need list with 10,30,70 how can i get it with linq</p>
| <c#><.net><linq> | 2019-03-05 07:33:06 | LQ_CLOSE |
54,999,098 | Check any new Latitude and Longitude is within 100 meter range or not? from my current location | <p>I have data set with shops Latitude and Longitude, how do i find shops in 100 meter range from my current location(latitude,longitude)?</p>
| <javascript><php><html> | 2019-03-05 09:09:20 | LQ_CLOSE |
55,000,634 | Decompress array of byte, unknown compression C# | In database I have blob column with chart data. I
The data was compressed, unfortunately I tried different solutions and none worked.
Here is example from database:
5a 49 50 08 52 00 00 78 9c ed 9c 0b 54 56 55 fe (...)
After converting to ascii, the first three characters are "ZIP" (the fourth character ... | <c#><zip><compression> | 2019-03-05 10:28:00 | LQ_EDIT |
55,000,733 | Calculate matrix hash value | as part of my final year project, I am testing the Bouncycastle library on SHA-3.
I find the source code to calculate the hash value of a string:
String input = "hello" ;
SHA3.DigestSHA3 digestSHA3 = new SHA3.Digest256();
byte[] digest = digestSHA3.digest(input.getBytes());
Sy... | <cryptography> | 2019-03-05 10:32:54 | LQ_EDIT |
55,001,143 | Swift UIButton Click To Show UIPickerView and Select ID show on Button Title | MY Scenario, I am trying to create `button` click to open `pickerview` and selected picker data show on button title using swift. Here, `Toolbar` also I would like to add into the pickerview controller.
let button = UIButton(type: .custom)
button.setTitle("",for: .normal)
button.frame = CGRect(x: ... | <ios><swift><uipickerview><uipickerviewcontroller> | 2019-03-05 10:54:06 | LQ_EDIT |
55,003,278 | How to delete rows that have up to 6 variables that are nont NA in R | <p>Hello so I want to delete some rows from a data frame. In the dataframe 5 of the variables have value always. And the others may have or have NA value. So I want to keep only the rows that Have at least 6 variables with value. </p>
<p>I tried using dropna(df, thresh=6) but this I think works only in python and I co... | <r><algorithm><statistics> | 2019-03-05 12:52:02 | LQ_CLOSE |
55,005,976 | Efficient way to loop through spark dataframe and determine counts of column values as types | <p>I have a spark dataframe, I would like to loop through each column in the dataframe and determine the count of datatypes(int, string, boolean, datetype) for each column. NOT the column type overall, but the counts of each value as it's own type. So for example</p>
<pre><code>col_1|col_2|col_3
aaa
bbb
14
16
tru... | <scala><apache-spark> | 2019-03-05 15:14:35 | LQ_CLOSE |
55,007,256 | Decimal Rounding in VB.NET | I have a project where I need to round a decimal in the following manner:
If the number is between 12.01 up to 12.49 then it should round to 12.00
If the number is between 12.50 and 12.99,it should round to 13.00
I have tried function Math.Abs and Math.Round but could not achieve the exact results as required abov... | <vb.net><decimal><rounding> | 2019-03-05 16:21:40 | LQ_EDIT |
55,008,138 | Find all ranges of consecutive numbers in array | <p>Given a sorted array of numbers, how do you get ranges of consecutive numbers? The function should return ranges and single numbers as a string. Example:</p>
<pre><code>function findRanges(arrayOfSortedNumbers) {
// logic here
}
findRanges([1, 3, 4, 5, 7]) => (expected output: "1, 3-5, 7")
findRanges([1, 2, ... | <javascript><arrays><algorithm><ecmascript-6> | 2019-03-05 17:10:23 | LQ_CLOSE |
55,009,675 | C++: passing object reference as parameter gives error: no matching function for a call to class::function() | <p>Passing an object reference as parameter gives me the error:<br>
<code>No matching function for a call to i2cController::i2cController</code></p>
<p>I've also tried passing a pointer, and creating the i2cController with new.<br>
Both tries gave me the same result.<br>
Why is it even complaining about a call to i2cC... | <c++><arduino><arduino-esp8266> | 2019-03-05 18:54:46 | LQ_CLOSE |
55,009,887 | Want to get all clic with jQuery | So here's my problem : I have 3 rows of div with 3 div inside.
<div class="arbre-decisionnel">
<div class="entree-un">
<h3>Vous êtes...</h3>
<div class="premier-choix-entree-un choix" id="femme">
<p>Une femme ?</p>
</div>
<div class="deuxieme-choix-entree-un choix" id="h... | <javascript><jquery> | 2019-03-05 19:08:40 | LQ_EDIT |
55,009,932 | take input until input positive number | <p>Take two integers p & q ... Sum should be printed of p to next q numbers including p .. if q <= 0 , then it will take the value of q again ...</p>
<p>Input :::: 3 2
Output :::: 7 (p=3 & q = 2 ..... So from 3 to next 2 numbers are 3 & 4 as it will be included in the sum ... Now we will have to print t... | <java> | 2019-03-05 19:12:07 | LQ_CLOSE |
55,010,606 | wieird beahaviour of String Pointers | code here
#include <stdio.h>
int main()
{
char*m ;
m="srm";
printf("%d",*m);
return 0;
}
the output is 115 can someone explain why it gives 115 as output | <c><string><pointers> | 2019-03-05 19:59:13 | LQ_EDIT |
55,011,647 | Ansible dictionnary lookup | I'm trying to generate some nginx config to implement a reverse proxy setup for various docker containers.
The nginx config generation is, tentatively, generated using the below ansible playbooks.
The first block is a dictionnary which contains some metadata for my containers.
The second block is a list of task wh... | <loops><data-structures><ansible> | 2019-03-05 21:11:37 | LQ_EDIT |
55,011,954 | How to configure setCustomValidity for selectize in onchange event? | How to configure setCustomValidity for selectize in onchange event?
every think is ok, but setCustomValidity does not work.
var countyPhoneCodeId = '#county_phone_code';
$(countyPhoneCodeId).selectize({
maxItems: 1,
labelField: 'name',
valueField: 'code',
render: {
... | <javascript> | 2019-03-05 21:33:22 | LQ_EDIT |
55,012,400 | How to check if two numbers are equal in javascript | <p>Let's say we have an array:
<code>let arr = [10,10,5,11,5]</code></p>
<p>How could I check for all the numbers that are equal? ( basically duplicates )</p>
<p>What i thought of is a forEach and compare every number but that's not very optimal. A filter ? Maybe. Anyone has any good ideea that would be optimal?</p>
| <javascript><node.js> | 2019-03-05 22:11:22 | LQ_CLOSE |
55,012,667 | I wanna to add a photo on sphere ARKit Swift 4 just like this photo in bio | [enter image description here][1]**enter image description here**
I wanna to add a photo on sphere ARKit Swift 4 just like this photo in bio
[1]: https://i.stack.imgur.com/lAnaA.png | <ios><swift4><arkit> | 2019-03-05 22:32:12 | LQ_EDIT |
55,013,660 | Python code to remove duplicates in a 2D list | <p>Suppose I have a list [[1,0], [14,12], [13,6], [1,0], [12,8], [13,6]]
I want the output as [[1,0], [14,12], [13,6], [12,8]]</p>
<p>Please help me out with a solution code in python.</p>
| <python> | 2019-03-06 00:23:27 | LQ_CLOSE |
55,013,760 | Checking if the first character of a string is lower case | <p>I am trying figure out how to change the character at position 0 of a string to uppercase if it is lower case. I am sorry if this is a dumb question, but it is stumping me. Something like this:</p>
<pre><code>String myString = "hello";
if( //string position 0 is lowercase )
{
char myChar = myString.charAt(0);
... | <java> | 2019-03-06 00:37:19 | LQ_CLOSE |
55,013,989 | C sharp Namespace | I am pretty new to C# but I have worked a little bit for my classes. When I worked in C sharp for classes, our teacher used to tell us the namespaces that we needed for completing the assignment.
I wanted to know where do I find all the collection of the namespace for C sharp.
One of my friends directed me to thi... | <c#><asp.net-mvc> | 2019-03-06 01:08:38 | LQ_EDIT |
55,015,086 | docker run throw error `No such file or directory` when use 2 commands | <p>I found that if I use two commands, the second command cann't read the file in volume, (while the first can read it.) like that:</p>
<pre><code>[root@iZu51 test]# echo 'hello world' >> /data/test/a.txt
[root@iZu51 test]# docker run --rm -v /data/test:/data debian:stretch-slim cat /data/a.txt
hello world
[root... | <linux><docker> | 2019-03-06 03:30:55 | LQ_CLOSE |
55,015,259 | Collapse and expand div without scrollbars appearing | <p>I am using Jquery to try to collapse a div. The element to be collapsed sits above a footer on the page, as illustrated below:</p>
<p><a href="https://i.stack.imgur.com/0Lvt3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Lvt3.png" alt="Initial state"></a></p>
<p>I have a button on the page ... | <javascript><jquery><css> | 2019-03-06 03:50:49 | LQ_CLOSE |
55,015,365 | how to formating data to produce sankey diagram using NetworkD3 library R | I have this [data][1], and I'm trying to produce a Sankey Diagram using the NetworkD3 package with this simple code:
sankeyNetwork(Links = landuse$links, Nodes = landuse$nodes, Source = "source",
Target = "target", Value = "value", NodeID = "name",
units = "km²", fontSize = ... | <r><sankey-diagram><htmlwidgets><networkd3> | 2019-03-06 04:02:24 | LQ_EDIT |
55,015,371 | how to make responsive screen resolution? | <p>can some one help , i want to make website like youtube for streaming video ,
but i have a problem , i want make 5 div in 1 rom in 1920x1080 , and auto reduced to 4 , 3,2,1 if the screen get smaller </p>
<p>this the picture example</p>
<p><a href="https://i.stack.imgur.com/tdPAl.jpg" rel="nofollow noreferrer">ent... | <javascript><html><css> | 2019-03-06 04:02:48 | LQ_CLOSE |
55,016,291 | when i am installing loopback cli then getting these error in reactjs | [when i install npm install -g loopback-cli than showing this error i have set environment variable like this C:\Python27\python.exe;C:\Program Files\nodejs\ ][1]
[1]: https://i.stack.imgur.com/laiiO.png | <reactjs><loopback> | 2019-03-06 05:40:59 | LQ_EDIT |
55,016,344 | how to count the duplicate integer using hash map in java | <p>suppose there are an array [1,2,4,5,1,6,1,5,1,7,8,1]
and i want to find the repeated number in array like 1 is repeated 5 time how we can get using hash map .</p>
<p>Other Question
we can find repeated number in array without using key in hash map </p>
| <java><collections> | 2019-03-06 05:45:09 | LQ_CLOSE |
55,016,389 | I want to map array2 values to array1 indexes those have values 3 and 5 and want to output array like this-Array | Array1 ( [0] => [1] => [2] => 3 [3] => [4] => 5 [5] => [6] => )
Array2 ( [0] => URD [1] => ISL )
I want to map array2 values to array1 indexes those have values 3 and 5 and want to output array like this- Array ( [0] => [1] => [2] => URD [3] => [4] => ISL [5] => [6] => )# solution please** used this meth... | <php> | 2019-03-06 05:49:08 | LQ_EDIT |
55,016,720 | store names values in array without duplicacy(first check whether it has same value if same then not add in array if not then added.) | [Hi guys please help me, i want to add names in array but without duplicacy at specific loaction.
if the array has same value then it is not added into the array or vice versa
Any kind of help is Appreciated.][1]
[1]: https://i.stack.imgur.com/OPMK5.png | <java><arrays> | 2019-03-06 06:14:33 | LQ_EDIT |
55,018,158 | nodejs use local variable into object title | <p>I'm wondering why my variables do not recognized into my object title?
I'm using query variable like this :</p>
<pre><code>var query_type = req.query.type; // age (12)
var query_search = req.query.search; // name (robert)
var map = {
query_type : query_search
}
</code></pre>
<p>When I try to print the map, t... | <javascript><arrays><node.js><variables> | 2019-03-06 07:56:55 | LQ_CLOSE |
55,019,138 | Sorting JavaScript Object by Secific property value | If I have a JavaScript object such as:
var currencies= {
"EUR": 100,
"CHF": 15,
"GPB": 75,
"JPN": 116,
"EUR": 12,
"JPN": 15,
"USD": 55,
"CHF": 22,
"USD": 100,
};
Is there a way to sort them in this specific order
var currencies= {
"EUR": 12,
"EUR": 100,
"USD": ... | <javascript><arrays><json><sorting><object> | 2019-03-06 09:00:54 | LQ_EDIT |
55,020,622 | MS Access: find rows with different fields in from two tables | In MS Access:
I am trying to compare two tables with:
- TABLE1.docnumb1 = TABLE2.docnumb2
- looking for: TABLE1.sum <> TABLE2.sum2
But query retrieves an error: syntax error in from clause (or when creating left join I get an error that JOIN isn't supported):
SELECT docnumb1, sum FROM Table1
JOIN Table2 ON ... | <ms-access> | 2019-03-06 10:16:46 | LQ_EDIT |
55,021,996 | SQL: How do I list all of customer ID that had their first 2 orders exactly in the sequence of: first order being hat, second order being sunglasses? | <p>I am new to SQL and I am trying to figure out the query:
How do I list all of customer ID that had their first 2 orders exactly in the sequence of: first order being hat, second order being sunglasses?</p>
<p>Thanks!</p>
| <sql><google-bigquery> | 2019-03-06 11:27:37 | LQ_CLOSE |
55,022,044 | i am developing small inventory model i trying to send mail if stock is less...please help me where to write and how | simple pdo mail function
as on stock is column name, when stock is less than 10 then mail should go automatically in pdo please help me without SMTP
include_once('database-config.php');
$email="abc@gmail.com";
$query = "SELECT slno, itemname FROM item WHERE as on stock = 10";
foreach ($dbh->query($query) a... | <pdo> | 2019-03-06 11:29:54 | LQ_EDIT |
55,022,366 | getting Invalid json error when I am decoding below data using json_decode in PHP | <p>[{\\"field_display_txt\\":\\"New custom field phone\\",\\"field_value\\":0},{\\"field_display_txt\\":\\"New custom field\\",\\"field_value\\":\\"test_zapier\\"},{\\"field_display_txt\\":\\"New custom field select\\",\\"field_value\\":\\"1\\"}]</p>
| <php> | 2019-03-06 11:45:35 | LQ_CLOSE |
55,022,750 | @Autowired object is always null | <p>I've started playing with spring data elasticsearch and have been looking at the example <a href="https://github.com/eugenp/tutorials/tree/master/persistence-modules/spring-data-elasticsearch" rel="nofollow noreferrer">here</a>.</p>
<p>I am having trouble understanding how <code>@Autowired</code> works. Consider th... | <java><spring><spring-boot><autowired><spring-data-elasticsearch> | 2019-03-06 12:05:47 | LQ_CLOSE |
55,023,656 | How can I extract the specific words from a string in Python? | I need a program to accept a string and extract specific words get an output like this in Python?
Input string:
My name is somename. I am from India and I'm an Engineer.
Output should be:
Name : Somename
Locaion : India
Profession : Engineer
Please can anyone help me regarding this. | <python> | 2019-03-06 12:56:33 | LQ_EDIT |
55,026,674 | How can i update status field as approved ; when i click on a button using php? |
<script src="jquery.js">
function UpdateRecord(id)
{
jQuery.ajax({
type: "POST",
url: "update.php",
data: 'id='+id,
cache: false,
success: function(response)
{
alert("Record successfully updated");
}
});
}
</script>
| <php><jquery><ajax> | 2019-03-06 15:29:06 | LQ_EDIT |
55,028,503 | updating table in sql | <p>I have data from an sql query which i need to update in a table. Im saving the output of this query as a csv file. When i do load this file in sql though using the import export wizard, the data is all jumbled up as the columns have shifted in a lot of cases. So unrelated data is updated in many columns. </p>
<p>Wh... | <mysql><sql><sql-server> | 2019-03-06 17:03:00 | LQ_CLOSE |
55,029,140 | Cast individual elements of a Tuple C# .Net 4.0 | I have this:
Tuple<double?, double?, double?, int, int, int> R1;
and need this:
Tuple<double, double, double, int, int, int> R1a;
How can this be done? I appreciate your help! | <c#><tuples> | 2019-03-06 17:38:35 | LQ_EDIT |
55,029,835 | How to increment int every 5seconds that won't block my UI? | <p>I have Array <code>String[] announcement = new String[20];</code> that has 20 value, I want to retrieve each of them every 5 seconds. I can't find any solution how to make increment every <strong><em>5 Seconds without blocking my UI.</em></strong></p>
| <java><javafx><javafx-8><javafx-2> | 2019-03-06 18:23:11 | LQ_CLOSE |
55,031,933 | C# Calculating Slots hit with AOE in a 4x3 Array | I'm not exactly what terminology to even use to look this up, and I figure the best way to explain it is with an example image.
I have a game field made up of 12 (numbered 1-12) slots, 4 wide and 3 deep, I need to be able to take the main slot number hit and get the numbers of it's neighboring slots for an Area of E... | <c#> | 2019-03-06 20:52:08 | LQ_EDIT |
55,032,411 | How do you find duplicate strings in a list? | <p>I have a list with several stings, with some being duplicates. I need to pull out all the duplicate strings and append them into a new list. How can I do that?</p>
<pre><code>list_i = ['a','b','a','c','a','c','g','w','s','c','d','a','b','c','a','e']
</code></pre>
| <python><python-3.x> | 2019-03-06 21:27:09 | LQ_CLOSE |
55,032,675 | Change dates to first day of the month in R | <p>How do I change my dates to the first day of the month...so 3/31/19 becomes 3/1/19, 2/28/19 becomes 2/1/19, and so on.</p>
<p>Thanks</p>
| <r><date> | 2019-03-06 21:46:05 | LQ_CLOSE |
55,034,715 | How do I access integers within an element of a list? | <p>Hi I am new to python and trying to do couple of small tasks in data manipulations. Please note this is not homework, I am aware of this forum. I just do not know how to access a digit within an element hence I do not have any code to start with:</p>
<p>I have a list</p>
<pre><code>numbers = [865, 1169, 1208, 1243... | <python><list><function><sorting><tuples> | 2019-03-07 01:31:43 | LQ_CLOSE |
55,034,908 | How to Change Multiple lines of Numbers with URL in PHP | <p>I have a list of Numbers I want to change it in URL. </p>
<pre><code><?php
$data "3337315417
3353100401
3337353827
3362572506";
?>
</code></pre>
<p>I want to change all of above listed numbers with URLs like below.</p>
<pre><code><a href="https://wa.me/3337315417" >3337315417</a>
<a href="h... | <php><url> | 2019-03-07 02:00:26 | LQ_CLOSE |
55,035,645 | Suppose that n women check their coats at a concert | <p>I have a seemingly difficult algorithm that I must construct, and I'm not sure where to even start. Here it is:</p>
<p>Suppose that n women check their coats at a concert. However, at the end of the night,
the attendant has lost the claim checks and does not know which coat belongs to whom.
All of the women came dr... | <algorithm><sorting> | 2019-03-07 03:35:09 | LQ_CLOSE |
55,036,279 | how can i make the user input become a variable and then have that variable be used in a later function? this is my code: | I can't figure out what im doing wrong, i wanted to make a program that allowed the user to pick a stock ticker and a couple of other inputs, and then get real time data that immediately went back into the program and would display the stock info and stuff. theres a lot of code there, i wanted to make a stock program t... | <python><pandas><tkinter> | 2019-03-07 04:47:45 | LQ_EDIT |
55,036,972 | How to take a build of python project to deploy it as a website for public | i am very much interested to learn python nd do more projects in it. As a starting a did a small django app. it runs an my local machine successfully. I need to know how o take a build of my project to deploy it as a web site forpublic
I used python .6.6, django, pycharm
did my project in Windows 10 | <python><django><windows><build><pycharm> | 2019-03-07 05:56:08 | LQ_EDIT |
55,038,253 | Want to print string contains 3 letters followed by 7 digits | <p>I am having an String like this </p>
<pre><code>"ATS0657882\nPRX1686559\n name: something,hello"
</code></pre>
<p>Now i want to do is only get the "ATS0657882","PRX1686559", and so on,</p>
<p>How can i do this, i used lot of ways but i cant find the solution.</p>
| <java><android> | 2019-03-07 07:28:22 | LQ_CLOSE |
55,040,855 | Adding a coded animation in Splash Screen iOS Swift 4 | <p>I've been trying to add one of this coded cool animations I found <a href="https://iosexample.com/fancy-and-beautiful-loaders-for-you-awesome-apps/" rel="nofollow noreferrer">https://iosexample.com/fancy-and-beautiful-loaders-for-you-awesome-apps/</a> in my launch screen (splash screen) when my app first starts. My ... | <ios><swift><xcode><swift4><launch-screen> | 2019-03-07 09:57:41 | LQ_CLOSE |
55,043,185 | How to make a word of all letters in a list? (Python) | <p>How can I make a word from all the letters in a string?</p>
<p>For example:
(this is my list)</p>
<blockquote>
<p>["h","e","l","l","o"]</p>
</blockquote>
<p>And I want this as output:</p>
<blockquote>
<p>hello</p>
</blockquote>
| <python><list> | 2019-03-07 11:54:58 | LQ_CLOSE |
55,043,462 | the redirection page doesnt work proper ?in php with phpmyadmin | i have written my code in php as well as in html for my final project which is the the course registration system for the collage my problem is if i need to redirect the page for one user it works but later when i used the switch statement for redirect a different pages based on role by retrive the data from the phpmya... | <php><html><mysql> | 2019-03-07 12:10:07 | LQ_EDIT |
55,045,225 | SQL join 2 tables where data is not intersecting | <p>I have 2 tables, one for storing a post and the other for users that has liked the post.</p>
<p>I want to fetch the posts only where user has not liked it.</p>
<p>Example</p>
<p><strong>Posts Table:</strong> </p>
<p>post_id, title</p>
<p><strong>Like Table:</strong></p>
<p>like_id, post_id, u... | <mysql><sql> | 2019-03-07 13:39:45 | LQ_CLOSE |
55,048,971 | OutofBounds Exception | <p>I am trying here to measure how many white spaces there are in text typed in a JTextArea. I am getting an outofbounds exception. Why so? </p>
<pre><code>Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at C... | <java><swing><char> | 2019-03-07 16:49:11 | LQ_CLOSE |
55,049,408 | How to pause loop after x loops for x seconds | <p>How can I pause my loop after x loops for x seconds?</p>
<p>My loop reads a list of IP addresses line by line. After 50 loops it should pause x seconds till the loop continues.</p>
| <bash> | 2019-03-07 17:12:00 | LQ_CLOSE |
55,050,297 | Inserting an iframe to a specific location on top of a png | <p>I have a png:
<a href="https://i.stack.imgur.com/plSBJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/plSBJ.png" alt="enter image description here"></a></p>
<p>I need to insert the iframe into the laptop screen.</p>
| <javascript><html><css> | 2019-03-07 18:11:47 | LQ_CLOSE |
55,050,371 | How do you pronounce NGRX? | <p>My dev team is creating an application with Angular NGRX.</p>
<p>When talking about it I'm not sure how to say it.</p>
<p>Do I say each letter? N-G-R-X</p>
<p>Or is it like "engrex"?</p>
<p>Or maybe "Angular Redux"?</p>
<blockquote>
<p>How do you pronounce NGRX?</p>
</blockquote>
| <angular><rxjs><ngrx> | 2019-03-07 18:16:38 | LQ_CLOSE |
55,050,855 | Error "request for member 'nombreIntr' in 'jugadorActual'" Help please :v | It simple one class one obj and still don't know why isn't running...
Help
class jugador{
public:
string nombreIntr(string intr);
private:
string nombre;
};
string jugador::nombreIntr(string intr){
nombre = intr;
return nombre;
}
main(){
jugador jugadorActual();
//G
cout <... | <c++> | 2019-03-07 18:49:53 | LQ_EDIT |
55,051,970 | Ruby - The integers in the array are either entirely odd or entirely even except for a single integer | You are given an array (which will have a length of at least 3, but could be very large) containing integers.
The array is either entirely comprised of odd integers or entirely comprised of even integers except for a single integer N.
Write a method that takes the array as an argument and returns this “outlier” N... | <ruby> | 2019-03-07 20:03:23 | LQ_EDIT |
55,052,905 | C# framework 2.0 Return two value from method | <p>i create a dll with C# framework 2.0 and want use that in another applications...
but i have a problem
i cannot return two value from method
for example: </p>
<pre><code> public string Two_String_Returner()
{
int aa = 50;
string bb = "Hello";
return aa.ToString();
return b... | <c#><methods><return> | 2019-03-07 21:15:38 | LQ_CLOSE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.