date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/01 | 830 | 3,091 | <issue_start>username_0: Having the following object
```
class Parser
{
public:
Parser(ComponentFactory * const factory): _factory(factory) {};
~Parser() = default;
void parse() const {
_factory->setFoo("foo");
}
private:
Factory * _factory;
};
```
My function `parse()` is specified as ... |
2018/03/01 | 1,357 | 5,638 | <issue_start>username_0: I added custom html form in magento2 page. In magento2 default contact form will be there, it will work normally.But my custom email not send. How to send the custom mail with user and admin?<issue_comment>username_1: **1. Create new html file**
/app/code/VendorName/ModuleName/view/frontend/em... |
2018/03/01 | 1,024 | 3,180 | <issue_start>username_0: I can't combine the use of lapply and paste to combine two columns for multiple dataframes contained within a list. I've looked through multiple sources, but can't find the answer.
This answer
[Apply paste over a list of vectors to get a list of strings](https://stackoverflow.com/questions/29... |
2018/03/01 | 467 | 1,406 | <issue_start>username_0: Is is necessary to check for a property value changed before calling `RaisePropertyChanged` or does it already know if it really needs to raise it ? See below.
```
public string Reason
{
get { return pReason; }
set
{
//Is this if statement needed or beneficial?
if (... |
2018/03/01 | 496 | 1,852 | <issue_start>username_0: Does librdkafka c++ library have a mock server for unit testing that doesn't require you to spin up a kafka server? If it does not, then is there a lightweight kafka server that is simple and easy to use with it?
Do the examples and unit testing in the librdkafka library require a kafka server... |
2018/03/01 | 489 | 1,480 | <issue_start>username_0: I need to replace this
```
}, <-here there is a \n
{
```
with
```
}{
```
Doesn't matter about \n
I've tried this :
```
sed "s/},\n{/}{/g"
```
but doesn't work.
I've tried other strange solutions but don't work as well because in the file there are a lot of others rows th... |
2018/03/01 | 608 | 1,850 | <issue_start>username_0: So I have a table that contains multiple employee's assigned to a desk. I need help figuring out a way to show all of the desks for the employee.
Currently, I am using this query which seems close but it is pulling every desk.
I would like it to look something like this:
```
|fk_employee| ... |
2018/03/01 | 2,502 | 8,246 | <issue_start>username_0: ```
//imports, etc.
@Entity
@Table(name = "TSTRANS")
@SqlResultSetMappings(
{
@SqlResultSetMapping(name = TS_TRANS_EMP_STAT,
classes = {
@ConstructorResult(
... |
2018/03/01 | 615 | 2,606 | <issue_start>username_0: I am using Spring JpaRepository for CRUD implementation in one of my App screens. As a part of that, I am developing a feature where user can save all Car entities or nothing (should roll back) into database. I am not sure how do I achieve this functionality using Spring Boot, Spring Rest, Spri... |
2018/03/01 | 1,120 | 4,298 | <issue_start>username_0: I have combined an asynchronous function with a callback because I need the asynchronous function to await another asynchronous function. The callback throws an error which I need to catch. How can I catch an error thrown in a callback called by the asynchronous function? The try-catch block in... |
2018/03/01 | 969 | 3,651 | <issue_start>username_0: I dowloaded a Flutter sample code for [Catalog](https://github.com/flutter/flutter/tree/master/examples/catalog) from git, which showing me a warning,
>
> 'package get' has not been run
>
> 'Pub get' has not been run
>
>
>
What does it mean? How to solve it? Should I ignore this warni... |
2018/03/01 | 3,815 | 11,089 | <issue_start>username_0: Can a single x86 instruction toggle a boolean value between '0' and '1'?
I thought of following ways but all result in two instruction with -O3 flag of gcc.
```
status =! status;
status = 1 - status;
status = status == 0 ? 1: 0;
int flip[2] = {1, 0};
status = flip[status];
```
Is there ... |
2018/03/01 | 823 | 3,118 | <issue_start>username_0: Can someone explain why this is happening?
I have created a headers exchange and bound it to three queues with different arguments as following:
[](https://i.stack.imgur.com/BMivS.png)
Then I try to publish a message where *... |
2018/03/01 | 1,139 | 4,797 | <issue_start>username_0: I have created a registration form.
But when I submit I have the following error message
>
> The key "\_username" must be a string, "NULL" given
>
>
>
here is my controller
```
public function connexion(Request $request, AuthenticationUtils $authUtils, UserPasswordEncoderInterface $pas... |
2018/03/01 | 743 | 3,051 | <issue_start>username_0: I do not want my question to be mistaken for deleting a row or deleting blanks.
In a number of cases I have come across excel files that have an excessive amount of rows or columns. I would like to know how to remove the extra rows entirely.
For example the excel file currently in question h... |
2018/03/01 | 624 | 2,568 | <issue_start>username_0: I Have two SELECTS (with bootstrap-select) with the same values (e.g. GREEN, YELLOW, BLUE, WHITE). But I don't want select the same values on the both SELECTS. If I have 'BLUE' on the first one, when I choose BLUE on the second, the first should change to default "*--please make your choice--*"... |
2018/03/01 | 2,639 | 4,630 | <issue_start>username_0: Consider this simple data frame:
```
test <- data.frame(v1=c(7,3,1,5,9,0,2),v2=c("A","C","E","C","B","K","F"))
```
[](https://i.stack.imgur.com/nMNpj.png)
I can easily take the subset where v1>3 or the subset where v1>5, bu... |
2018/03/01 | 1,382 | 6,111 | <issue_start>username_0: I have a workflow that I'll describe as follows:
```
[ Dump(query) ] ---+
|
+---> [ Parquet(dump, schema) ] ---> [ Hive(parquet) ]
|
[ Schema(query) ] ---+
```
Where:
* `query` is a query to an RDBMS
* `Dump` dumps the result ... |
2018/03/01 | 580 | 2,044 | <issue_start>username_0: I have a database that cannot use multiple schemas due to some legacy software on it, and it needs to share space with a new Django application. Django's built-in tables names conflict with some of the existing ones, so I wanted to add a prefix to all of the table names.
I found various stacko... |
2018/03/01 | 438 | 1,355 | <issue_start>username_0: I have two arrays that are inside `foreach` loop, I want to merge them to one key and value.
let the first array "*array1*" inside `foreach`:
```
$array1 = ['x', 'y', 'z'];
```
let the second array "*array2*" inside `foreach`:
```
$array2 = ['a', 'b', 'c'];
```
Expected output should be ... |
2018/03/01 | 489 | 1,841 | <issue_start>username_0: I am attempting to put data from an SQL table from a remote server in a dropdown list. I need the information to update as the DB updates.
This is my Controller
```
public class HomeController : Controller
{
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Si... |
2018/03/01 | 349 | 1,305 | <issue_start>username_0: I'm trying to: **show/hide** an `![]()` tag. When **mouse is over**, it should **hide** the element and when **mouse leave** it should **show** it the tag back.
What i've tried:
```
![]()`
```
The problem: When the **mouse is over** ng-mouseleave is fired at the same time, making the elem... |
2018/03/01 | 614 | 1,942 | <issue_start>username_0: I have created a startup Linux script for a board that runs Debian jessie Armbian 8.1. I need at startup to run at command in a modem attached to it via USB interface. I've put the script inside rc.local:
```
#!/bin/sh -e
cd /home/user/Script/
sh script.sh
exit 0
```
In the folder Script I h... |
2018/03/01 | 788 | 3,286 | <issue_start>username_0: I am trying to set up app state with authenticated: true and user data.
Reducer gets to be triggered (I can see console.log) but it is returning initial state (isAuthenticated: false, user: {})
Thunk is working fine as far as I know
Props I am getting in component is {isAuthenticated: false, ... |
2018/03/01 | 1,263 | 5,658 | <issue_start>username_0: I am learning ZF3, i am trying to add InfoController to the Album module. would my URL be ....../album/info? I am getting 404 error occurred. I have seen [<NAME>'s post](https://stackoverflow.com/questions/16932781/multiple-controller-in-one-module-in-zend-framework) and implemented exactly the... |
2018/03/01 | 588 | 2,514 | <issue_start>username_0: I created 3 custom dimensions through Google Tag Manager (added them as Data Layer Variables). Then, I added custom fields to my pages for these 3 custom dimensions.
After waiting about 24 hours, I checked the three custom dimensions on Google Analytics and two of them have showed up for all ... |
2018/03/01 | 274 | 1,029 | <issue_start>username_0: I am using windows 10. I successfully installed NotesSQL 9.0 but unable to add ODBC driver and getting the such a error:
`The setup routines for the Lotus Notes SQL driver (*.nsf) ODBC driver could not be loaded due to system error code 126: The specified module could not be found. (C:\NotesSQ... |
2018/03/01 | 265 | 1,011 | <issue_start>username_0: I recently started using JMockit. So far it's very nice. But I find myself writing something like this over and over.
```
@Test
public void testFoo() {
new Expectations() {
x.foo(); result = "1"; // expectation common to all test cases
x.bar(); result = "2"; // varying... |
2018/03/01 | 271 | 1,097 | <issue_start>username_0: I am currently making an app where I need to store large amounts of data persistently, much of which is contained within custom classes.
I am used to using UserDefault for storing data, but I have read that UserDefault doesn't work well with large amounts of data. What are my options, and is ... |
2018/03/01 | 1,946 | 5,873 | <issue_start>username_0: Flutter project showing me a warning `'Packages get' has not been run` with suggested solutions,
* Get Dependencies
* Upgrade Dependencies
* Ignore
As suggested by [Darky](https://stackoverflow.com/users/8394265/darky), in this [answer](https://stackoverflow.com/a/49056175/5638630) to go ahea... |
2018/03/01 | 979 | 3,363 | <issue_start>username_0: I have a simple docker stack with three containers : a mysql one, a php-fpm one and a nginx.
I just want to be able to execute my doctrine migrations and a symfony command every time my container is created.
Currently, i got an error like : "entrypoint.sh not found" when i type **docker logs ... |
2018/03/01 | 838 | 2,937 | <issue_start>username_0: I have a list of objects on my Firebase database, and the key for each object is a timestamp. I can get the last one using `limitToLast(1)`, and the data snapshot I get is:
```
{ key = time_stamps, value = {1510768441759={id=f454445c6e880df31e, coordinates={latitude=-4.1461734, longitude=20.59... |
2018/03/01 | 530 | 1,273 | <issue_start>username_0: I like to split an array into first half and its second half. I tried following code, but it does not work:
```
A = [1,2,3,4,5,6]
B = A[:len(A)/2]
C = A[len(A)/2:]
```
The error message says:
```
TypeError: slice indices must be integers or None or have an __index__ method
```
Supposedly,... |
2018/03/01 | 2,284 | 7,667 | <issue_start>username_0: I've got a `b-table` element on a page that currently displays a bunch of data from a database. At the moment it is paginated, but feedback has indicated that they would rather have all the information displayed in a single scrolling view. I can do this, but the problem is that if I set a conta... |
2018/03/01 | 842 | 3,113 | <issue_start>username_0: I'm having trouble accessing a method in a hierarchy when each class contains a method with the same name.
```
class A {
constructor(private name: string) { }
notify() { alert(this.name) }
}
class B extends A {
constructor() {
super("AAA")
}
notify() {alert("B")... |
2018/03/01 | 651 | 2,120 | <issue_start>username_0: Below is a PL/SQL I'm working on
```
declare
v_sql varchar2(500);
BEGIN
for t in (
SELECT distinct ID
FROM TABLEB
) loop
for c in (
select * from (
select 'delete from ' as test
from dual
union all
select 'TABLEA'|... |
2018/03/01 | 260 | 654 | <issue_start>username_0: If I have a 2D array of indices:
```
i = np.array([[0, 0], [1, 1]])
```
And a 2D array I want to index:
```
a = np.array([[1, 2], [3, 4]])
```
How can I index the array to get a 1D array like the following?
```
np.array([1, 4])
```<issue_comment>username_1: You can use:
```
a[i.T[0], i... |
2018/03/01 | 784 | 2,952 | <issue_start>username_0: I need to render a long text within a one line. and an image in the end of the line (tight end of the screen).
Given a very long text, I have to simply truncate it.
The text should now go into a second line because it is too long.
please see my code.
how can avoid pushing the nice emoji out o... |
2018/03/01 | 719 | 2,669 | <issue_start>username_0: I have the following query that returns all the people of the register that have the type 'C' and the number of rows for each person with the type 'C'. Each person can have type 'C' or type 'V'
```
select count(type), number_document
from register
where type = 'C'
group by number_document ;... |
2018/03/01 | 1,411 | 4,010 | <issue_start>username_0: i am trying to read more than 1 line csv file,i've been sucessful to read 1 line csv file,can some one give me and example to read more than 1 line csv file?
here's the input sample :
```
Nama,Gaji,Zakat,Gaji Bersih
Ali,1234567,,
Sofyan,2345678,,
Kholimi,3456789,,
```
here's my 1 line csv re... |
2018/03/01 | 573 | 2,157 | <issue_start>username_0: ```
$title = $xpath->query("span[@class='item_list']",$item)[0];
```
I can't figure out why it only works when I omit this line on my web host. localhost seems normal and functional as intended. This is used on a template in Wordpress 4.9.4. I have no idea what the PHP version of the host is.... |
2018/03/01 | 5,630 | 10,143 | <issue_start>username_0: Sample of dataset:
```
library(dplyr)
sample <- structure(list(Rank = c(15, 17, 20, 2, 16, 8, 21, 5, 13, 31, 22, 18, 2, 19, 11, 11, 8, 7, 12, 9, 5, 23, 17, 16, 15, 14, 4, 20, 13, 2), Athlete = c("<NAME>(BEL)", "<NAME>(ESP)", "<NAME>", "<NAME>", "<NAME>", "<NAME>(FRA)", "<NAME>", "<NAME>(FRA)"... |
2018/03/01 | 1,838 | 5,424 | <issue_start>username_0: I can package a JAVA project I've written. One which uses the `Gson` library for JSON features. I'm very new to JAVA so I could be making a dumb mistake but here's what I've assumed:
In the source code I have:
```
import com.google.gson.Gson;
```
and then use this import like so:
```
Gson ... |
2018/03/01 | 1,409 | 3,843 | <issue_start>username_0: I'm trying to draw a line using gimp scripting. In the following script: I create a new image 512x512 and a I try to draw a diagonal (0,0)->(512,512).
But the image (tmp.xcf) remains transparent.
What am i doing wrong ?
```
(define (drawdiagonal W H)
(let* (
(img 0)
(bg 0)
... |
2018/03/01 | 1,862 | 6,507 | <issue_start>username_0: Let's say i have 2 cases classes:
```
case class Money(amount: Int, currency: String)
case class Human(name: String, money: Money)
```
is there a nice way to "translate" a list of strings to class Human? smth like:
```
def superMethod[A](params: List[String]): A = ???
val params: List[Any]... |
2018/03/01 | 623 | 2,316 | <issue_start>username_0: As education exercise on sending digital signals, I'm trying to code the pulse train for a servo without using the servo.h library.
The servo is a 9g micro servo. Hardware is correct, as many examples using servo.h work fine.
I have the following code. The problem is that the servo jerks arou... |
2018/03/01 | 770 | 2,191 | <issue_start>username_0: I would like to know what are the triples that are in a repository but that are not included in other repository.
But for doing this, I would need to reference the two repositories in a federated query.
I'm using Allegrograph.<issue_comment>username_1: With AllegroGraph there are 2 ways this ... |
2018/03/01 | 432 | 1,417 | <issue_start>username_0: I really need your help with this,
How can I select the adjacent table cell from my select box and insert some text?
It seems that the following code is not working as I thought it would, starting at the reference point whose classname is .selectbox and maybe there is better way of doing this... |
2018/03/01 | 945 | 2,762 | <issue_start>username_0: I have the following query:
```
select t1.a,
t1.b,
t2.c,
....
from table1 t1,
table2 t2,
...
where ...
and condition1
and condition2
and
case
when (t1.a in ('aa', 'bb') and
t1.e = t2.e) then
true
when (t1.a in ('cc', 'd... |
2018/03/01 | 558 | 1,948 | <issue_start>username_0: What I'm trying to do is write a bot with discord.io, the problem is, that when I came to making a command to set nicknames, I ran into a problem, I knew that I am supposed to use the `message.substring(1).split(' ');` syntax, but I don't know how to take the now split message string and put th... |
2018/03/01 | 1,046 | 4,145 | <issue_start>username_0: I have a fiddle here: <https://jsfiddle.net/419r62t8/1/>
```
View.prototype.render = function (viewCmd, parameter) {
var that = this;
var viewCommands = {
showEntries: function () {
that.$todoList.innerHTML = that.template.show(parameter);
},
removeI... |
2018/03/01 | 703 | 2,754 | <issue_start>username_0: In this code the table is created in the up method and deleted in the down() method. When I run the migration, the table is created but not deleted. In what way can I trigger the down method, so that I get a better understanding on how the two methods work?
```
php
use Illuminate\Support\Faca... |
2018/03/01 | 1,010 | 3,926 | <issue_start>username_0: Why it error when i make userName is public:
>
> Error:(2, 5) Kotlin: Platform declaration clash: The following
> declarations have the same JVM signature
> (getUserName()Ljava/lang/String;):
> fun (): String defined in User
> fun getUserName(): String defined in User
>
>
> Error:(4, 5... |
2018/03/01 | 1,187 | 4,382 | <issue_start>username_0: I am attempting to make a put request in django rest framework. My view is inheriting from the RetrieveUpdateDestroyAPIView class.
I am using angular on the front end django rest on the back end.
Here is the error:
```
Failed to load resource: the server responded with a status of 405 (Meth... |
2018/03/01 | 1,029 | 3,234 | <issue_start>username_0: I'm trying to get data from a mysql database using an object which is, in fact, a variable:
```
try {
$mysqlcon = new PDO($dbserver, $db['user'], $db['pass'], $dboptions);
// Selecting database "user" to get data about a specific client
if(($user_data = $mysqlcon->query("SELECT * FROM $dbname.... |
2018/03/01 | 254 | 966 | <issue_start>username_0: ```
SELECT manager.ename AS "Mgr Name", ( Select COUNT(*)
FROM emp worker
WHERE worker.mgr = manager.empno
) AS "Total Emp"
FROM emp worker, emp manager
WHERE worker.mgr = ma... |
2018/03/01 | 430 | 1,612 | <issue_start>username_0: I'm trying to use `Delegates.observable()` in order to get notified when a change on a `MutableList` has happened.
```
val items: MutableList by Delegates.observable(startingItems) {
\_, old, new ->
Log.e("observable", "${old.size} -> ${new.size}")
}
```
but nothing is happening whenever ... |
2018/03/01 | 615 | 2,174 | <issue_start>username_0: Basically I'm receiving an output like this from my azure ws output:
```
{
'Results': {
'WSOutput': {
'type': 'table',
'value': {
'ColumnNames': ['ID', 'Start', 'Ask', 'Not', 'Passed', 'Suggest'],
'ColumnTypes': ['Int32', 'Int... |
2018/03/01 | 825 | 2,493 | <issue_start>username_0: I am trying to make a class that will be able to send data and then receive them.
Right now, it is working only for the first send/receive and with another attempt to `.send()` it will throw an error below.
```
>Traceback (most recent call last):
File "main.py", line 31, in
zq.send(arr)
... |
2018/03/01 | 658 | 2,161 | <issue_start>username_0: Consider a table Person:
```
| name | wealth |
|------| ------ |
|Abby | 12 |
|Ben | Null |
|Carl | 5 |
|Diane | Null |
```
We want to sort the rows by wealth, descending, i.e. to get `(Abby, Carl, Ben, Diane)`, but Django's `order_by` function sorts them by Null first:
```... |
2018/03/01 | 628 | 2,237 | <issue_start>username_0: This is my code. I am trying to dynamically update the input field with the formatted number.
```js
$("#money").keyup(function() {
var x = this.value;
var y = parseInt(x).toLocaleString();
this.value = y;
});
```
```html
```
Thank you!
EDIT: Changed to type="text" still sam... |
2018/03/01 | 887 | 2,962 | <issue_start>username_0: I'm writing a script using `BeautifulSoup` to extract text from elements; it works well until I encounter a element that contains tags, in which case it only captures the text BEFORE the first tag. How can I edit my code to capture all of the text?
My code:
```
coms = soup.select('li > di... |
2018/03/01 | 821 | 3,181 | <issue_start>username_0: I get a **10 digit** timestamp from a json file and I've just figured out that this is Unix time *in seconds and not in milliseconds*.
So I went to my DateUtils class multiplied the timestamp in seconds with 1000, in order to convert it to timestamp in milliseconds.
When I tried to test isTod... |
2018/03/01 | 632 | 1,879 | <issue_start>username_0: I have data from subjects currently structured like
```
df <- data.frame(subject.ID = 1:6,
questionA = as.factor(c("SA", "A", "D", "SD", "A", "N")),
questionB = as.factor(c("A", "A", "D", "SD", "A", "N")),
questionC = as.factor(c("SA", "A", "A", "SD", "A", "SD")))
```
wh... |
2018/03/01 | 1,383 | 4,665 | <issue_start>username_0: In one of my packages I use the `.onAttach` hook to run some R code and then use `assign` to make the value available as one of the package variables. I do it because `variable` depends on the content of some file, which can change between one session and the other. The code I use is like:
```... |
2018/03/01 | 1,043 | 2,975 | <issue_start>username_0: I have an array of pointer-to-member functions in class A and need to access the elements in class B. My problem is either always getting a 1 returned when trying to access an array element or types not matching with each other.
What I've got so far is:
A.h:
```
#include
class A {
public:... |
2018/03/01 | 555 | 1,712 | <issue_start>username_0: I am trying to get the characters between a URL like so in postgreSQL:
>
> www.abc.com/hello/xyz
>
>
> www.abc.com/hi/pqr
>
>
> www.abc.com/yellow/xyz
>
>
>
I want to get
>
> hello
>
>
> hi
>
>
> yellow
>
>
>
This is what I have so far:
```
select distinct substring(url,... |
2018/03/01 | 436 | 1,481 | <issue_start>username_0: In ARKit the 3D model has two parts: the 3D object(scn, dae, obj,...) and material file (png). But is there anyway to have an 3D object with material embedded already (without set diffuse in code)?
Thank you.<issue_comment>username_1: One method uses `regexp_split_to_array()`:
```
select (rege... |
2018/03/01 | 548 | 2,121 | <issue_start>username_0: Is there a CSS rule that would match elements based on their width? If not, would it be interesting to propose that in the standard?
One could do something like `code:max-width(200px) { white-space: nowrap; }` to have all small code tag force line break.
I know I could use some js.<issue_comm... |
2018/03/01 | 552 | 1,877 | <issue_start>username_0: I have a package that I am trying to install via `pip install allen-bradley-toolkit`. The package is failing with the following reason.
[](https://i.stack.imgur.com/VTpKY.png)
The problem seems to related to the fact that pip... |
2018/03/01 | 931 | 3,741 | <issue_start>username_0: What are good arguments in favor to use or not to use Keycloak behind Api gateway (Kong)?<issue_comment>username_1: Is not a good practice, a good Enterprise API Gateway has the obligation to meet (or give you the access to customize) all the advanced authentication and authorization standards ... |
2018/03/01 | 757 | 2,977 | <issue_start>username_0: I need an EditText to only allow letters and capitalize the first character.
To only allow letters, I set the property
`android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "` in the XML layout and it worked properly. Then, I also set the property `android:inputType="textCapSe... |
2018/03/01 | 293 | 1,014 | <issue_start>username_0: I am trying to check if the the variable $userSelection is not having value 1, 2 or 3, then I display error message. Tried the following and other combinations, but no luck.
```
if [ $userSelection -ne 1 || $userSelection -ne 2 ] || [ $userSelection -ne 2 || $userSelection -ne 3 ]
then
ec... |
2018/03/01 | 1,844 | 7,319 | <issue_start>username_0: I am creating a quiz with multiple choice questions. The questions and answers are loaded from an external xml file. The number of answer options is not consistent. It can vary. I am loading the data from the xml file and convert it to a global JSON object that the quiz app can access. Is there... |
2018/03/01 | 1,463 | 5,720 | <issue_start>username_0: For a rich web application, I need keyboard shortcuts. Because there are many different keyboard layouts, they have to be configurable. Unfortunately, I can't figure out a way to map keyboard events to **human-readable shortcut names** such as `Ctrl + Alt + Y` or `Alt + \`.
The `keypress` even... |
2018/03/01 | 4,075 | 13,854 | <issue_start>username_0: When I press the run button in Android Studio, my app compiles but shows this error (redacted):
```none
Error:Program type already present: android.arch.lifecycle.LiveData
```
[(Full log)](https://pastebin.com/wS4nxXBu)
I've tried deleting the `.gradle` folder, then going to `Build > Clean ... |
2018/03/01 | 591 | 2,775 | <issue_start>username_0: I have an e-commerce website and I need to display products in homepage based on user interest like advertisement showing on facebook and google based on the search we did on the internet.
Is there any API from facebook or google or any website for fetching user interests?
I have wondered ho... |
2018/03/01 | 635 | 2,145 | <issue_start>username_0: Using Bootstrap 4, I am trying to add a image inside of a smaller div and want to center the image and hide the area that overflow the parent div. How can I do this?
Here is a snippet:
```html

Sample
======
Sample Text
[Sample](#)
```
**Edit:... |
2018/03/01 | 542 | 1,839 | <issue_start>username_0: one\_two\_three\_four\_five.rtf
I need five in A variable
I need four in B variable
And remaining in C variable
Should read from the last character
Note after 2 underscore from the last. There could be many underscores but should take has C variable.
Is it possible?<issue_comment>username... |
2018/03/01 | 2,159 | 7,767 | <issue_start>username_0: This is a snippet of my code. The `Textview` acts as buttons and have `Onclicklistner` on them. When cpu1000 `Textview` is clicked it leads to the `cpu_g1000` class for which the code is shown below.
```
public class Game_1000 extends AppCompatActivity implements View.OnClickListener{
private... |
2018/03/01 | 1,303 | 4,792 | <issue_start>username_0: I added a user-defined column `hasAvatar` to the aspnetusers table.
but how can i get the information of the current user, when i am in the `_LoginPartial.cshtml` ?
I want to get the information like
```
@if (myUser(User).hasAvatar==true)
{
..avatar
}
else
{
please login
}
```<issu... |
2018/03/01 | 784 | 2,891 | <issue_start>username_0: >
> ERROR: /home/gabr0/Escritorio/Andorid/packages/apps/OwlsNest/src/com/aosip/owlsnest/advanced/ScreenStateToggles.java:187.26: The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments (int, new OnclickListener(){})... |
2018/03/01 | 918 | 3,306 | <issue_start>username_0: UPDATE: I have this Private API request to get a customer metafield data that sends a request to the shopify admin.
```
const {getAccessToken} = require('./auth')
const request = require('request')
const {shopFromPermanentDomain} = require('./helpers')
const getCustomerMetafields = ({... |
2018/03/01 | 371 | 1,131 | <issue_start>username_0: I wrote a simple function to hopefully calculate the total of negative values but failed. Ideally, when I passed a vector into the function, it should give the total count of negative values. Can anyone help, please?
My code:
```
arg <- c(rnorm(50, 0))
neg <- 0
count.negative.fun ... |
2018/03/01 | 281 | 943 | <issue_start>username_0: I want to create a simple social app. On this app, users can communicate via the internet. It will be a simple connection - notification sends from one to other users. (ex. user A sends a notification to user B. User B see a notification from user B).
How the best achieve this communication? I... |
2018/03/01 | 352 | 1,445 | <issue_start>username_0: Having the Method/Action *ObtainValue*, I want to assign a different name to the method when it is called, so I use the *ActionName* attribute
```
[ActionName("GetValueByID")]
public string ObtainValue(int id)
{
return "value";
}
```
But I can also use the *Route* att... |
2018/03/01 | 928 | 2,463 | <issue_start>username_0: I've got a df:
```
import pandas as pd
import numpy as np
df = pd.DataFrame({"price":[1.1,66.3,11,15.2,1.1],
"qty":[14,2,1,10,1],
"c_h":['cheese','ham','ham','cheese','ham'],
"qual":['good','good','bad','good','bad']})
```
The df lo... |
2018/03/01 | 692 | 2,634 | <issue_start>username_0: I've created a virtual device `Nexus_5X_API_27_x86`. Running through Android Studio it runs fine.
I added `ANDROID_HOME` to point towards `C:\Users\USERNAME\AppData\Local\Android\Sdk`, since Appium wants this defined. And `%ANDROID_HOME%\tools;` to PATH as according to <https://developer.andr... |
2018/03/01 | 419 | 1,629 | <issue_start>username_0: In Info.plist I have already added `NSSpeechRecognitionUsageDescription` with string. But it still shows the same error:
>
> This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSSpeechRecognitionUsageDes... |
2018/03/01 | 373 | 1,125 | <issue_start>username_0: For a list of words, how can I access each alphabet of the word. For example
```
food = ['eel', 'egg', 'yam', 'nut', 'oats']
```
I need to retrieve each food by its individual letters and make it into a list, i.e.
```
each_food[1] = ['e', 'e', 'l']
each_food[2] = ['e', 'g', 'g']
```
Any ... |
2018/03/01 | 720 | 2,140 | <issue_start>username_0: This works, but it seems overly complicated:
```
s1 = list(set(['red', 'gold', 'black', 'gold']))
s2 = ['golden', 'blackstone', 'golden', 'goldlike', 'blackstone', 'golden', 'redline', 'red']
lst = []
for i in s1:
for j in s2:
if j.startswith(i):
lst.append(i)
lst2 = ... |
2018/03/01 | 1,638 | 5,353 | <issue_start>username_0: I have built a tree from which I want to collect all the Leaf types:
```
Branch [] (Branch [0] (Leaf [0,1]) (Branch [0] (Leaf [0,2]) (Branch
[0] (Leaf [0,3]) (Leaf [0])))) (Branch [] (Branch [1] (Leaf [1,2])
(Branch [1] (Leaf [1,3]) (Leaf [1]))) (Branch [] (Branch [2] (Leaf
[2,3]) (Leaf [2])) ... |
2018/03/01 | 1,603 | 6,247 | <issue_start>username_0: I think the Redux holds a lot of great value however the main issue for me lies with how reducers are written today:
```
const addToDoReducer = (state, action) => {
switch (action.type) {
case ADD_TODO:
return Object.assign({}, state, {
todos: todos(stat... |
2018/03/01 | 625 | 1,761 | <issue_start>username_0: I want to user JavaScript to generate the previous four Sundays from the current date.
For example, if current date is
**2018-3-1**, I want to get 2018-2-25, 2018-2-18, 2018-2-11, 2018-2-4.
I have this code but it only gave me the previous Sunday of the current date.
How can I get the p... |
2018/03/01 | 989 | 3,959 | <issue_start>username_0: I'm pretty new to Azure/OAuth2 so apologies if this is a simple problem. My head's spinning though and I'd appreciate some pointers.
I'm developing a command line utility for use in a high performance compute cluster. This utility needs to access a REST API which is secured using Azure's OAuth... |
2018/03/01 | 4,496 | 9,188 | <issue_start>username_0: How to implement without loop an operation on bitmasks, which for two bitmasks `a` and `b` of width `n` gives bitmask `c` of width `2 * n` with following properties:
* `i`-th bit in `c` is set only if there is `j`-th bit in `a` and `k`-th bit in `b` and `j + k == i`
C++ implementation:
```
#... |
2018/03/01 | 1,052 | 1,889 | <issue_start>username_0: I came across the following problem.
Is there a fast python built-in method to do the following:
```
Input: sets {1,2}, {3,4}, {6,7,8}
Output: sets {1,3,6}, {1,3,7}, {1,3,8}, {1,4,6}, {1,4,7}, {1,4,8}, {2,3,6}, {2,3,7}, {2,3,8}, {2,4,6}, {2,4,7}, {2,4,8}
```
Thanks!<issue_comment>username_... |
2018/03/01 | 1,069 | 4,067 | <issue_start>username_0: I essentially want to implement these commands in Golang:
```
cd somedir ; zip -r ../zipped.zip . * ; cd ..
```
I'm trying to zip folders and files within a parent directory without including the parent directory. This post is similar:
<https://askubuntu.com/questions/521011/zip-an-archive... |
2018/03/01 | 444 | 1,437 | <issue_start>username_0: I have been using `curl -i http://website.com` for a long time. It's great, it reports the response headers and information.
I also use a tool `jq` which parses and pretty prints JSON. I'd like to do the following:
```
curl -i http://website.com | jq -r .
```
The problem with this is that t... |
2018/03/01 | 1,848 | 6,848 | <issue_start>username_0: Wanted to add an answer to what I learned after researching and succeeding with this issue.
I have a Microsoft O365 account where I run my business. I am using Microsoft Teams so my executive team can see information and emails specific to that function. For instance, Human Resources. That tea... |