date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/10 | 1,693 | 5,729 | <issue_start>username_0: I am new to spring Boot and spring when i try to run the following code i am getting `NullPointerException`.
```
@SpringBootApplication
public class cardApplication implements CommandLineRunner{
private JourneyService journeyService;
public static void main(String[] args) {
SpringApplic... |
2018/03/10 | 950 | 3,682 | <issue_start>username_0: I am having problems trying to push a .zip artifact from Team City to Octopus Deploy and would like to requisition some help with this.
Using the "OctopusDeploy: Push packages" runner on Team City, I am trying to push the artifact "Release.%MajorVersion%.%MinorVersion%.%build.number%.zip" to o... |
2018/03/10 | 761 | 2,338 | <issue_start>username_0: I've two tables **Documents** and **poi\_data**. Documents contains two types of forms **ETP** and **FP10**. I want to count both type of forms based on numbers and sum of two alias shown in below query. Unfortunately its not working.
```
Document Table (id,title ,type ,status)
poi_data Table ... |
2018/03/10 | 1,966 | 8,053 | <issue_start>username_0: I am using `Spring Boot` and trying to implement factory design pattern in it. The issue is that when the objects of `QuarterLevelStudentInternship` and `QuarterLevelMou` are created, the autowired dependencies declared inside those classes are set to null, so it throws me `NullPointerException... |
2018/03/10 | 1,377 | 5,624 | <issue_start>username_0: ```
updateUserDetails(ename,ejobtitle,edept,eunit,equal,eaqser,empid)
{
let url = GlobalVariable.BASE_API_URL + "api/updateUserProfile";
let headers = new Headers({'Content-Type':'application/json'});
let options = new RequestOptions({headers:headers});
const body =
{"empno":emp... |
2018/03/10 | 335 | 762 | <issue_start>username_0: I have a string 12345678 and I want to convert it into a list [1,2,3,4,5,6,7,8] in python.
I tried this method :
<issue_comment>username_1: You can use `map`:
```
list(map(int, '12345678')) # [1, 2, 3, 4, 5, 6, 7, 8]
```
Or a list ... |
2018/03/10 | 542 | 1,612 | <issue_start>username_0: In the question we're asked to remove all even numbers from an array, hence I tried to create a function:
```
import numpy as np
A = np.array([2,3,4,5])
def remove_even(A):
if ((A[0])/2) != int: #check if the first value is an integer when divided by 2
A = A[0:len(A)+1: 2]
... |
2018/03/10 | 719 | 2,777 | <issue_start>username_0: I am following the exercises in the C language book. I am in the first chapter where he introduces loops. In this code:
```
#include
/\* copy input to output; 1st version \*/
int main() {
int c, n1;
n1 = 0;
while ((c = getchar()) != EOF) {
if (c == '\n') {
++n1;
}
printf("%d\n", n1)... |
2018/03/10 | 2,242 | 8,990 | <issue_start>username_0: I am creating my first simple budgeting app. Basically, I take a few user inputs like monthly income & savings goal. Then they click "start", & the app calculates stuff such as, their daily budget etc.
Here I'm running into trouble. After all the calculations, I display "how much you can spen... |
2018/03/10 | 731 | 2,734 | <issue_start>username_0: I'm trying to figure out how to deselect a selected item of a multi-select box if another option is chosen. In the following scenario I just want the option 'admin' (default value) to be deselected if any of the other options (or all of the other options) are chosen.
*Simply: Admin is selected... |
2018/03/10 | 659 | 2,363 | <issue_start>username_0: I'm working on the Free code camp project, but I've hit a snag. I cannot get the paragraph text below the image to center. I have the set to grid 4.
```
<NAME>
==============
*"The man who stands for the people"
-----------------------------------*
... |
2018/03/10 | 1,779 | 6,055 | <issue_start>username_0: Android thing run time exception:
>
> java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/things/pio/PeripheralManager;
>
>
>
**Manifest file:**
```
```
Error logcat:
```
01-01 00:00:53.293 1326-1326/com.example.androidthings.simplepio E/AndroidRuntime: FAT... |
2018/03/10 | 1,178 | 3,869 | <issue_start>username_0: This is a problem I have encountered in a tech interview. You have 500,000 files in a directory, which is configured so that they are always in alphabetical order. They have names as such:
* Afile
* Bfile
* File00000001
* File00000002
...
You want to rename all the files **while preserving t... |
2018/03/10 | 2,859 | 8,960 | <issue_start>username_0: I found a similar question to mine here but the accepted answer did not fix my issue.
>
> [Bring element to front using CSS](https://stackoverflow.com/questions/15782078/bring-element-to-front-using-css)
>
>
>
I have made custom check boxes and I am trying to bring them to the front. Here... |
2018/03/10 | 391 | 1,434 | <issue_start>username_0: During any action with Entity framework wizard on MySQL connection - it crushes on second page without any errors.
Problem is the same as in [Entity Framework wizard crashes on MySQL](https://stackoverflow.com/questions/28140079/entity-framework-wizard-crashes-on-mysql)
We have tried all adv... |
2018/03/10 | 1,323 | 5,039 | <issue_start>username_0: The [wxWidgets hello world example](http://docs.wxwidgets.org/trunk/overview_helloworld.html) does not provide sufficient information to build wxWidgets in any one particular environment.
The [Code::Blocks wxWidgets hello world example](http://wiki.codeblocks.org/index.php/WxWindowsQuickRef) d... |
2018/03/10 | 448 | 1,593 | <issue_start>username_0: In Firestore I have a collection of items with an owner.
The owner can be a user, who should be allowed to read his documents.
With a `userId` you could do like this:
```
allow read, write: if resource.data.userId == request.auth.uid;
```
But with an `owner` reference field there is seemin... |
2018/03/10 | 310 | 1,104 | <issue_start>username_0: How do I get the amount of users who reacted with emoji to a specific message
```
message.channel.fetchMessage(message.id).then(function(r){
return console.log(r.reactions.filter(a => a.emoji.name == '')).users.size
})
```<issue_comment>username_1: Both these rules work for me in Simulato... |
2018/03/10 | 1,296 | 3,626 | <issue_start>username_0: I am trying to build a simple responsive two columns template, and the two paragraphs are suppose to stack one another when the width being reduced to 1000px. However, I realized that two paragraphs have been pushed to the left and only have 50% of the width just before the screen size being re... |
2018/03/10 | 435 | 1,560 | <issue_start>username_0: In my directory i have app.js And Index.htmml ; I am trying to set cookies from App.js; I have tried:-
```
var express = require('express'),
app = express(),
http = require('http'),
cookieparser = require ('cookie-parser'),
httpServer = http.Server(app);
app.use(express.static(__dirna... |
2018/03/10 | 371 | 1,204 | <issue_start>username_0: What does `struct{...} x, y, z;` mean in C programming language?
Related article:
[Article](https://i.stack.imgur.com/w1iXv.png)
Could you please give examples about it.
```
struct {int a;} x, y;
int main()
{
x.a=0;
y.a=1;
return 0;
}
```
There is no error.
```
struct {...} x, y;
int mai... |
2018/03/10 | 416 | 1,680 | <issue_start>username_0: public class WebViewActivity extends AppCompatActivity {
```
WebView webview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
webview = new WebView(this);
webview.setWebViewClient(n... |
2018/03/10 | 332 | 1,202 | <issue_start>username_0: I wanted to get the `indexOf` the middle string but if I use `indexOf` it returns only the first one, and if I use `lastIndexOf` it returns the last one.
So, I am trying to get the item in the middle.
Is it possible with `indexOf` in JavaScript?
```
var items = ['One', 'One', 'One'];
console... |
2018/03/10 | 1,684 | 6,908 | <issue_start>username_0: I want to create a Restaurant object that can have multiple menus. Each menu can have multiple categories, and each category can have multiple items. Each item will have a name, price, and description.
```
--Company--
-Menu ONE-
-Menu Name-
-Category ONE-
-Category Name-
... |
2018/03/10 | 1,403 | 5,413 | <issue_start>username_0: How can I retain the functionality of the code below without repeating the commented lines?
```
def my_round(number, place=10):
digit_list = [digit for digit in str(number)]
rounded_number = ''
round_list = [10 ** i for i in range(10)]
zeros = str(place).count('0')
for i i... |
2018/03/10 | 1,230 | 4,756 | <issue_start>username_0: I want to add video and voice call to my web application developed with python.
I searched about it on internet, I found that I can do it with WebRTC, but this work is done with JavaScript, but I don't know how to do this work with python?
I'm using Sanic as a web framework in python 3.6.
On t... |
2018/03/10 | 1,345 | 5,080 | <issue_start>username_0: I am developing an order transaction where a user can order a product. Once they clicked the 'add to cart' button, it will be able to save on the database in how many times they want with the same order id. Order id is like a transaction id.
My problem is that whenever I want to display the it... |
2018/03/10 | 523 | 1,817 | <issue_start>username_0: I am using this code to convert a date `03/01/2018 12:00 AM` to `2018-03-01` in C#:
```
DateTime startDate = DateTime.ParseExact(TextBox1.Text.ToString(),
"yyyy-mm-dd",
System.Globalization.CultureInfo.InvariantC... |
2018/03/10 | 1,121 | 2,923 | <issue_start>username_0: Just wrote some newbie css kind of code. I don't know how to fit the image inside the border! I want to fit the water icon inside the circular border! Please run the snippet below
```css
.notice {
position: relative;
margin: 1em;
background: #f3fff2;
padding: 1em 1em 1em 2em;
bo... |
2018/03/10 | 1,013 | 2,692 | <issue_start>username_0: I have a python dictionary in this format:
```
{('first', 'negative'): 57, ('first', 'neutral'): 366, ('first', 'positive'): 249, ('second', 'negative'): 72, ('second', 'neutral'): 158, ('second', 'positive'): 99, ('third', 'negative'): 156, ('third', 'neutral'): 348, ('third', 'positive'): 27... |
2018/03/10 | 940 | 3,940 | <issue_start>username_0: I use the react native latest version of 0.54.0 and Whenever run the apps on iOS there is found warning about deprecate the lifecycle methods. and also please update the components.
**Warning :**
**componentWillMount is deprecated and will be removed in the next major version. Use componentD... |
2018/03/10 | 801 | 3,382 | <issue_start>username_0: I am using creative bootsrap theme where the background image occurs in navbar and it changes only when i scroll.
i dont want the navbar to change when scrolled it should be default with white background which occurs when i scroll.
here is the link for the template
<https://startbootstrap.com/t... |
2018/03/10 | 1,169 | 4,482 | <issue_start>username_0: I have a Cars table(sql server) for my parking management application in which each car record is to be assigned unique Slot automatically by app upon checkin.
I'm struggling in implementing it. The concept is that I will keep '1' value in a variable "slotx" and will then figure out using quer... |
2018/03/10 | 452 | 1,272 | <issue_start>username_0: Traceback (most recent call last):
File "run\_summarization.py", line 327, in
`tf.app.run()`
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 126, in run `_sys.exit(main(argv))`
File "run\_summarization.py", line 306, in main
`batcher = Batcher(FLAGS.dat... |
2018/03/10 | 517 | 1,915 | <issue_start>username_0: As an exercise, I came up with an idea of the following Django project: a web app with literally one button to scrape room data from Airbnb and one text area to display the retrieved data in a sorted manner.
Preferably, for scraping I would like to use Selenium, as there is no API for this pag... |
2018/03/10 | 792 | 2,251 | <issue_start>username_0: ```
[{"key":"0.75","value":"3/4","Default_Value":"0"},
{"key":"0.875","value":"7/8","Default_Value":"1"},
"key":"1.75","value":"1 3/4","Default_Value":"0"}]
```
i have json array how to append this json has option to selection list
here is how i want to append
```
3/4
7/8
1 3/4
```
and ... |
2018/03/10 | 1,069 | 3,152 | <issue_start>username_0: I'm trying to find the screen names in each line of text eg. screen\_name: CoinLibre2009. After finding every screen name I have to replace each screen name with the original first character then exactly four asterisks (\*\*\*\*) and then the last character. For example the screen name CoinLibr... |
2018/03/10 | 811 | 2,276 | <issue_start>username_0: I have pasted a json file below, want to get the inner most levelID value(ie **ff808181620ce25501620d08e4dc0061**) and the parent of it(**ff808181620ce25501620d08e4b9005e**). Tried $.levelID[3];$.levelID[4] correspondingly for variable names: levelID & parentlevelID but failed the get the value... |
2018/03/10 | 970 | 2,766 | <issue_start>username_0: I am trying to deploy war file using spring boot app usng maven plugin in heroku.
The error code that I am getting on deploying it is:
>
> 2018-03-10T05:47:07.563714+00:00 heroku[router]: at=error code=H14
> desc="No web processes running" method=GET path="/favicon.ico"
> host=patiyati.her... |
2018/03/10 | 875 | 2,935 | <issue_start>username_0: I have a problem I can't solve in Python. The question is hard to even put into words, so see the example below.
```
phoneBook = {"Joe":12, "Jason":13, "Johnny":14}
for i in range(0, len(dir(phoneBook))):
if "__" not in dir(phoneBook)[i]:
print(help(phoneBook.dir(phonebook)[i]) + ... |
2018/03/10 | 796 | 2,854 | <issue_start>username_0: I am making a website where a user can change particular parts of their site. But before they can submit changes, I want them to be able to preview them. I have thought about taking the innnerHTML of the whole page and then editing that function. Maybe there is a way in which I can still search... |
2018/03/10 | 1,854 | 4,883 | <issue_start>username_0: The following question is on python 3.6. Suppose I have lists of sets, for example
```
L1 = [{2,7},{2,7,8},{2,3,6,7},{1,2,4,5,7}]
L2 = [{3,6},{1,3,4,6,7},{2,3,5,6,8}]
L3 = [{2,5,7,8},{1,2,3,5,7,8}, {2,4,5,6,7,8}]
```
I need to find all the intersection sets between each element... |
2018/03/10 | 708 | 1,580 | <issue_start>username_0: add array element if get duplicate element in php
```
$a=[3.00,3.00,8.00,3.00,13.00]
$b=[0.11,0.45,0.22,0.90,0.44]
```
the result should be:
```
$c=[3.00,8.00,13.00]
$d=[1.46(0.11+0.45+0.90),0.22,0.44]
```<issue_comment>username_1: You can do that with a loop, like this:
```
$C,D; //That ... |
2018/03/10 | 795 | 3,073 | <issue_start>username_0: I am developing an angular application using angular 5. I wanted to use "MatTableDataSource" from angular- material. But i am getting this error
Unexpected value 'MatTableDataSource' imported by the module 'AppModule'. Please add a @NgModule annotation.
I search for a solution for this probl... |
2018/03/10 | 370 | 1,341 | <issue_start>username_0: I am using Python Selenium. When I try this:
```
try:
element = driver.find_element_by_xpath('--path--').text.encode('ascii','ignore')
except NoSuchElementException:
pass
print element
```
But, when element does not exist, shown error
```
NameError: name 'element' is not defined
`... |
2018/03/10 | 382 | 1,637 | <issue_start>username_0: I am running into problems at smaller device widths where a div becomes more square, and less landscape. The div's background image is set to `background-size: cover;` so it only occupies about the top 60% of the height of the div and 100% of the width.
How do I set a background image to cover... |
2018/03/10 | 1,013 | 4,201 | <issue_start>username_0: private static field numberOfPlayersInOfflineGame has a property.
```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameData
{
private static int numberOfPlayersInOfflineGame;
int NumberOfPlayersInOfflineGame
{
get
{
... |
2018/03/10 | 1,024 | 3,419 | <issue_start>username_0: I have a register service which is handled by Nodejs. This service is working on 3001 port. I try to connect this service from React Native application. But always returns
>
> ReactNativeJS: [TypeError: Network request failed]
>
>
>
My component and package.json code is below. Also, I re... |
2018/03/10 | 684 | 2,240 | <issue_start>username_0: How to show all the dates from the past 7 days starting from the current day . For eg : if today is 10/3/2018 . I want the output to be
```html
10/3/2018
9/3/2018
8/3/2018
7/3/2018
6/3/2018
5/3/2018
4/3/2018
```
Now the main thing is that my table does not have entry for all the dates ... |
2018/03/10 | 832 | 2,759 | <issue_start>username_0: Am trying to place `UILabel` in to `UIImage`, i am able to change the label frame width and height
But am unable to change X and Y values someone please help me to change the x and y values.
This is the way i call the method
```
self.imfFront.image = generateImageWithText(text: "Hello World !... |
2018/03/10 | 247 | 737 | <issue_start>username_0: ```
{{box}}
```
How to display item in alternate color ? alternate color for every row item.?<issue_comment>username_1: You can use even odd properties of ngFor
```
```
Here oddStyleClass and evenStyleClass will define background color or any other style you want to apply
Upvotes: 0 <iss... |
2018/03/10 | 757 | 2,392 | <issue_start>username_0: This is my Map
```
HashMap> hmap = new HashMap<>();
```
I want to retrieve a `Set` from my `Map` and add an element to it.
```
Set val = hmap.get(key);
val.add(newElement); //NPE
hmap.put(key, val);
```
but I get `NullPointerException` on the `val.add` line
This is probably trivial, but ... |
2018/03/10 | 787 | 2,472 | <issue_start>username_0: When I run ./node\_modules/.bin/webpack-dev-server to build, this error happens
```
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-... |
2018/03/10 | 902 | 3,223 | <issue_start>username_0: I am fairly new to using Google's Colab as my go-to tool for ML.
In my experiments, I have to use the 'notMNIST' dataset, and I have set the 'notMNIST' data as `notMNIST.pickle` in my Google Drive under a folder called as `Data`.
Having said this, I want to access this '.pickle' file in my Go... |
2018/03/10 | 1,461 | 4,641 | <issue_start>username_0: I am trying to make a Machine Learning Project(An Integer Sequence Predictor). ML code is a python script. I am trying to make a express route to handle the stdin and stdout of the python script and send response according to that.
I am spawning the python script as the app starts.
```
let p ... |
2018/03/10 | 464 | 1,509 | <issue_start>username_0: I have table with rows with 2 inputs and button, I want to enable the button when the two inputs are enabled,
```js
$(document).ready(function() {
$(this).find('.save-btn').prop('disabled', true);
$('.input').keyup(function() {
$row = $(this).closest('tr');
var value = $row.find(... |
2018/03/10 | 400 | 1,286 | <issue_start>username_0: Why is while loop showing 2 different outputs?
```
$a=1;
while ($a++ <4) {
echo $a. "
";
} // output is 2 3 4 but (4 is not less than 4 )
$a=1;
while (++$a <4) {
echo $a. "
";
} // output is 2 3
```
Please, can someone explain me the ... |
2018/03/10 | 856 | 3,662 | <issue_start>username_0: I have a parent component which is a flat list which contains a header `HeaderComponent`. This `HeaderComponent` is a custom component that I have created which contains 2 child components of its own. Whenever i refresh the list, I am passing a boolean to the `HeaderComponent` as props which ge... |
2018/03/10 | 903 | 3,813 | <issue_start>username_0: I know the best place to add constraints is viewDidLoad, but for a custom view, especially for custom cells, I'd like to hide all these layout details to itself, without exposed to its controller. And I don't want VC to send message to its view, because it contributes a little to coupling, whic... |
2018/03/10 | 547 | 2,418 | <issue_start>username_0: I read few books, but still didn't understand why its considered as linear. Not sure because of appearance or sequential access or something else. If possible please explain in some logical terms.<issue_comment>username_1: Data structures fall into two categories: Linear and Non-Linear. A data ... |
2018/03/10 | 753 | 2,822 | <issue_start>username_0: Below is a function to return a numerical max of a given formula from a certain x range
Everything works fine as follows.
```
MAX_FN_XY = function(Fn, x1 = 0, x2 = 100)
{
x = seq(x1, x2, by= 0.001)
i = which.max(Fn(x))
x_max = x[i]
y_max = Fn(x[i])
return (c("X*" = x_m... |
2018/03/10 | 811 | 2,563 | <issue_start>username_0: ```
class Example{
public static void main(String args[]){
final int x=100;
final int y;
y=100;
int z=100;
int a,b,c,d;
if(x>0){a=0;}
if(y>0){b=0;}
if(z>0){c=0;}
if(100>0){d=0;}
System.out.println(a);//Line 1
System.out.println(b);//Line 2
Sy... |
2018/03/10 | 513 | 1,665 | <issue_start>username_0: I am trying to append a list by reading values using instances,
```
class Class_Name:
def __init__(self,input):
self.input = input
self.mylist = []
input.mylist.append(self)
if __name__ == "__main__":
val1 = Class_Name("Value_1")
val2 = Class_Name("Value_2... |
2018/03/10 | 302 | 993 | <issue_start>username_0: Complete the design of a function called pyramid that takes a natural
number n and an image, and constructs an n-tall, n-wide pyramid of
copies of that image. I am trying to design HtDF but i am facing a difficulty on how stack the images vertically in DrRacket. Looking for assistance.<issue_co... |
2018/03/10 | 293 | 910 | <issue_start>username_0: ```
php echo do_shortcode('<p[mb_board name="friends" style=""]');?>
php echo do_shortcode('<p[mb_board name="recommend" style=""]');?>
```
Only one of the two is implemented. How do I implement both?<issue_comment>username_1: Use the functions `below` and `above`.
See <http://docs.racket-l... |
2018/03/10 | 1,327 | 4,230 | <issue_start>username_0: It is possible to *pass* an argument to a function running in another thread, by **reference**.
Is it possible to *return* a result from a function running in another thread, by **reference**. If so, how?<issue_comment>username_1: Yes, but be very be careful cause each thread may using the sam... |
2018/03/10 | 1,762 | 5,903 | <issue_start>username_0: I am using `NSNotificationCenter` to send local notifications in my code and working in both Objective-C and Swift. I'm posting notifications from Objective-C And receiving in Swift. But the methods that I added in notification getting called multiple times and added observer only in `viewDidLo... |
2018/03/10 | 1,399 | 4,351 | <issue_start>username_0: i have a test and i get this question : <https://prnt.sc/ip3z7n>
and this is my answer
```
#include
using namespace std;
int main ()
{
int grade,counter=0;
for(int counter;counter<10;counter++)
{
cout<<"Enter the grade: ";
cin>>grade;
if(grade>=60)
cout<<"Passed \n";
else
cout<<"Fa... |
2018/03/10 | 4,202 | 14,526 | <issue_start>username_0: I recently learned about promotion and decided to try writing vectors.
```
{-# LANGUAGE DataKinds, GADTs, KindSignatures #-}
module Vector where
data Nat = Next Nat | Zero
data Vector :: Nat -> * -> * where
Construct :: t -> Vector n t -> Vector ('Next n) t
Empty :: Vector 'Zero t
... |
2018/03/10 | 601 | 1,831 | <issue_start>username_0: Ok, I am probably missing the simple solution once again, but frustration is quickly setting in. What I want to do is be able to set the space between the list items. My problem is I cannot seem to override the space created by the h3 tag.
```
* ### The Oscar is only worth $1
* ### It tak... |
2018/03/10 | 508 | 1,692 | <issue_start>username_0: I am picking values from a column `TRANSAMT` from the table `GLPJD`. The value can be negative in the table but when it's negative, I have to make it positive and when its positive, I leave it like that. The result being returned in NULL, what is left in the query. It is a subquery
```
declare... |
2018/03/10 | 1,398 | 4,667 | <issue_start>username_0: I am using docker compose to run a sbt process which connect to rabbitmq-server . Following is my docker compose file : -
```
version: "3"
services:
web:
# replace username/repo:tag with your name and image details
image: abhishekkumargaya/messanger
ports:
- "1883:1883"
... |
2018/03/10 | 300 | 1,043 | <issue_start>username_0: If the height of scrollview not set. then scrollview will not scrollable.
To make it scrollable. I set height statically in code like this.
```
scrollView.contentSize = CGSize(width: self.view.frame.size.width, height: 1000)
```
Is there any way i can set height dynamically??<issue_comment>... |
2018/03/10 | 666 | 2,419 | <issue_start>username_0: Below is my code that work fine in android and ios 11 with front camera while when i use rear camera it gives error
**below works**
```
video: { width: 400, height: 200, facingMode: "user" }
```
**Below not works**
```
video: { width: 400, height: 200, facingMode: "environment" }
```
*... |
2018/03/10 | 470 | 1,721 | <issue_start>username_0: I have two models: `Event` and `Ticket`. I have implemented `Many to Many` relationship between them:
```
/**
* Get the tickets for the events.
*/
public function tickets()
{
return $this->belongsToMany('App\Ticket');
}
```
And:
```
/**
* The tickets that belong to the event.
*/
pu... |
2018/03/10 | 329 | 1,262 | <issue_start>username_0: Say I scheduled a task for time t2 in future
t1 < t2 < t3
What if server get crashed at time t1. Will the task scheduled to execute at t2, still executes, if servers restarts before time t2 ( t1 < t < t2 ) ?
What if server crashes at t1 and restarts at t3 and say, server was down at t2. Will ... |
2018/03/10 | 1,257 | 5,071 | <issue_start>username_0: I have create a custom `OwnerDraw` inherited `ToolTip` control into a `Class` and I have also add some **custom properties**. My `TextRenderer` looks like this:
```
TextRenderer.DrawText(e.Graphics, e.ToolTipText, Me.Font, e.Bounds,
Me.ForeColor, Me.BackColor,
... |
2018/03/10 | 1,307 | 3,617 | <issue_start>username_0: Based on my code I want to push each row's inputs to each array. If it is row1, it should push all the input values of row 1 to array `a1`. The second row's inputs should be pushed to array `a2` and so on.
This is mainly for performance optimization of my code since the rows of my real code a... |
2018/03/10 | 2,747 | 9,157 | <issue_start>username_0: Yesterday I have tried to install Magento 2. When trying to access the front end I got plenty of errors both on the front end of the site and the Magento 2 admin. Since this is my first time I am not quite sure what are those errors and how to resolve them. Can you please help?
**Storefront:**... |
2018/03/10 | 459 | 1,448 | <issue_start>username_0: I have an array of ids
`given_ids = [1,2,3,4,5,6]`
I want to get all the ids from given\_ids which don't exist in Table.
I can do:
`present_ids = Model.where(id: given_ids).pluck('id')
req_ids = given_ids - present_ids`
But this will be very heavy on the server if `given_ids` size increas... |
2018/03/10 | 4,826 | 16,500 | <issue_start>username_0: I am hitting an HTTP server concurrently with multiple connections. I'd like to throttle the clients in response to servers indicating that requests are coming in too fast. I do not wish to change the HTTP library I am using but rather I'd like to extend it.
To that end, **how do I implement a... |
2018/03/10 | 649 | 1,924 | <issue_start>username_0: I did a MATLAB code and I am trying to do it in C++ using Eigen library.In my MATLAB code I had to do a particular function like this
```
M=10;
s1 = zeros(20,M);
for i=1:M
s1(:,i) = i*i;%some function
s1(:,i) = s1(:,i)/std(s1(:,i));
end
```
I am confused on using .colwise() and is there... |
2018/03/10 | 895 | 3,356 | <issue_start>username_0: I have did a little research around "Google", "YouTube", "Facebook" and "Stack Overflow" and I haven't found what I was looking for. So, I need your guidance. :)
I want program to ask user input "PASSWORD" and every time user inputs wrong password the program asks password again, and again, an... |
2018/03/10 | 562 | 2,230 | <issue_start>username_0: Running a method to insert some data into a table EventsManaged using an sql query which returns an error
>
> "incorrect syntax near 'WHERE'"
>
>
>
but I can't see my mistake?
The method is in an EventDAL and being called from an open form. I used breakpoints and checked the correct ty... |
2018/03/10 | 481 | 2,016 | <issue_start>username_0: For example I have some synchronous functions that I want to run in another thread. I found the way with closure like this. Is there any more efficient and beautiful way if i don't want to create any new functions? Am I reinventing the wheel or is it alright?
```
class Program
{
static voi... |
2018/03/10 | 682 | 2,255 | <issue_start>username_0: Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
```
polls/ [name='index']
admin/
```
The current path, polls/, didn't match any of these.
My code is...
from (app)polls urls.py
```
from django.urls import path
from . import views
urlpatterns = [
... |
2018/03/10 | 458 | 1,648 | <issue_start>username_0: I want to map mappings for documents in index. For that, I have created mappings with properties as of now.
But I also want to get the size of documents, for that, I found out that I need to enable "\_size" field as shown here :
<https://www.elastic.co/guide/en/elasticsearch/plugins/current/map... |
2018/03/10 | 1,039 | 4,522 | <issue_start>username_0: We have an Apps Script that is installed in five G Suite accounts. I am invoking the app scripts from the Java code that is being deployed in Google App Engine. I have stored the five refresh tokens in a properties file and set them in GoogleCredential in a round robin fashion before invoking t... |
2018/03/10 | 1,985 | 5,563 | <issue_start>username_0: I would like to perfectly align these plots :
[](https://i.stack.imgur.com/sxwpj.png)
Here is the R code :
```
library(tidyverse)
library(gridExtra)
groupes <- tribble(~type, ~group, ~prof, ~var,
1,1,1,12,
... |
2018/03/10 | 3,158 | 9,888 | <issue_start>username_0: I am trying to implement a DNN Classifier with an estimator as shown in this tutorial: <http://nbviewer.jupyter.org/gist/yufengg/7dd4170cc730ce418a1dcd141532ec6e>
However, whenever I run the code, I am getting this lengthy error message:
Traceback (most recent call last):
File "/Users/vivekr... |
2018/03/10 | 711 | 2,302 | <issue_start>username_0: Can anyone help please?
This is my code.I want to add an alt option for images but everything I try is throwing errors.
I have tried studying the php handbook and have tried copying code from other questions but so far no luck.
```
php
$servername = "localhost";
$username = "logosewe_5";
$pass... |
2018/03/10 | 821 | 2,437 | <issue_start>username_0: I am performing an outer join on two DataFrames:
```
df1 = pd.DataFrame({'id': [1, 2, 3, 4, 5],
'date': [4, 5, 6, 7, 8],
'str': ['a', 'b', 'c', 'd', 'e']})
df2 = pd.DataFrame({'id': [1, 2, 3, 4, 6],
'date': [4, ... |
2018/03/10 | 367 | 1,310 | <issue_start>username_0: This is my table :
```
id positive positive2 positive3 positive4 negative negative2 negative3
--- --------- --------- --------- -------- --------- --------- -----------
1 6 0 0 0 0 1 3
```
I take a positives count fr... |
2018/03/10 | 530 | 1,820 | <issue_start>username_0: The firebase doc sys this is how it is supposed to be done:
curl -X PATCH -d '{"last":"Jones"}' \
'<https://[PROJECT_ID].firebaseio.com/users/jack/name/.json>'
But I dont know how to convert this to a rest based request.
TO be clear I need to send a web request from javascript/java, hence I... |
2018/03/10 | 597 | 2,141 | <issue_start>username_0: When clickevent is fired, I want it to redirect/open new page in same tab. The new tab would be '/Waiting', however even after click event is fired, it stays in the same page. While doing manually by going to browser's localhost, it works though. Also, even after 10 secs, it doesn't load.
```
... |
2018/03/10 | 727 | 2,597 | <issue_start>username_0: I have a stream of `Event`s
```
public class Event {
Location location;
double turnout;
//... other fields & getters
}
```
And a statistics class `EventStatistics`
```
public class EventStatistics {
// Stats properties e.g. turnout standard deviation/median
public Event... |
2018/03/10 | 673 | 1,890 | <issue_start>username_0: Here's what I have:
```
dbd7868 (HEAD -> master) commit 3
19ea7e8 commit 2
5b4baae commit 1
```
I want all files to be in the exact same state as they were in `commit 2`. Here's what I tried:
```
git checkout 19ea7e8
git commit -m "reverted to commit 2"
```
But this was the result:
```
H... |
2018/03/10 | 321 | 1,345 | <issue_start>username_0: I am integrating twitter login in my app. I am able to get session and access token successfully.Its also giving me email, user name. But I need user first name ,last name and user image.How can I get user profile details.I have written following code:
```
ivTwitterLogin.setOnClickListener(v -... |
2018/03/10 | 1,265 | 4,061 | <issue_start>username_0: I am trying to parse a CSV but i am getting some issues. Below is the code i used for parsing CSV:
```
let fileURL = Bundle.main.url(forResource: "test_application_data - Sheet 1", withExtension: "csv")
let content = try String(contentsOf: fileURL!, encoding: String.Encoding.utf8)
let parsedCS... |
2018/03/10 | 361 | 1,064 | <issue_start>username_0: How can i make a function that stops the program when a key is pressed?(the function needs to run as a thread).I tried this but doesn't work
```
_getch() == true;
if(_getch() == true){
exit(0);
}
```<issue_comment>username_1: You can use the [ncurses](ftp://ftp.gnu.org/pub/gnu/nc... |