date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/28 | 528 | 1,966 | <issue_start>username_0: Say I have an array of integers `xs` taking values from `0` to `max`, and I need to sort it in O(n) time, so I can't just do `(sort xs)`.
Is there a way to do it with the `frequencies` function?
In another language I would then do a `for` to iterate over integers from `0` to `max`, and for ea... |
2018/02/28 | 807 | 3,109 | <issue_start>username_0: I'd like to add an ImageView from my MainActivity to another xml file (layout.xml) pragmatically, i'v tried this code but it doesn't work, here's the code source of Mainactivity, activity\_main.xml and layout.xml:
Mainactivity :
```
public class MainActivity extends AppCompatActivity {
Linear... |
2018/02/28 | 935 | 3,732 | <issue_start>username_0: First off I want you to understand that I know in 99.9% of situation a unit test with dependencies is not wanted, however I think this is that 0.1%.
The situation is I am working on a framework for selenium based automation tests for a website. I have methods to perform different actions ie. l... |
2018/02/28 | 1,747 | 6,616 | <issue_start>username_0: I'm building a list using a RecyclerView. When the user clicks the '+' button in the toolbar an AlertDialog is launched that prompts the users to add an item in the list. I've built the AlertDialog in a separate class that extends DialogFragment. How can I make so that the item is added to the ... |
2018/02/28 | 771 | 2,866 | <issue_start>username_0: I am trying to send data to php file then echo the word "Hello!" when i call a function in javascript, however, no message appear, i guess there is en error in the calling, can you guide me please?
Here is my code:
Javascript:
```
function asyncpost_deviceprint() {
var xmlhttp = false;
if... |
2018/02/28 | 917 | 3,137 | <issue_start>username_0: I have a table that contains all of the posts. I also have a table where a row is added when a user likes a post with foreign keys user\_id and post\_id.
I want to retrieve a list of **ALL** of the posts and whether or not a specific user has liked that post. Using an outer join I end up getti... |
2018/02/28 | 754 | 2,711 | <issue_start>username_0: These are my entity models:
```
public class Student
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Password { get; set; }
public... |
2018/02/28 | 659 | 2,330 | <issue_start>username_0: In my java program I want to perform stack operation like push and pop. I also want to push string in stack operation but when I try to push string. I get error mentioned in screenshot. How should I change push method in order to run the program successfully.
**code ::**
```
public class Data... |
2018/02/28 | 408 | 1,264 | <issue_start>username_0: I have a string in Python like this:
```
a = "one house"
```
For my program I need to convert that one into a literal 1, which I use the **word2number** library for in Python.
Except, when I convert it, I get this.
```
a = "one house"
a = w2n.word_to_num(a)
print(a)
>> 1
```
I want to re... |
2018/02/28 | 988 | 3,466 | <issue_start>username_0: In the following code, the vector loses all its content before calling the print method.
I am assuming the destructor is called before the print statement.
Could anyone let me know why a destructor is called before the object is going out of scope.
```
#include
#include
using namespace ... |
2018/02/28 | 1,000 | 3,408 | <issue_start>username_0: I have a massive dataset, and I want to add a factor to each value based on another factor. Currently, my data look like this:
```
Type Value
1 Wild 68.51
2 Wild 91.94
3 Captive 72.58
4 Hybrid 85.38
```
But I want to add another column of factors - {Austr... |
2018/02/28 | 505 | 1,625 | <issue_start>username_0: Why does my boolean return `True` when I expect `False`?
String `a` is "7582 + group by 1,2; ERROR: File ACT2EST.SUMMARY\_CFS.DATA does not exist."
My code expression is `"WARNING" and "ERROR" in a`; this evaluates to `True`.
I apply the same code, `"WARNING" and "ERROR" in b`, to another s... |
2018/02/28 | 941 | 3,565 | <issue_start>username_0: Could you help me with a Hive Query Efficiency problem? I have two queries working for the same problem. I just cannot figure out why one is much faster than the other. If you know please feel free to provide insight. Any info is welcomed!
**Problem**: I am trying to check the minimum value of... |
2018/02/28 | 1,047 | 4,050 | <issue_start>username_0: I am getting the following exception when starting a Stateful Service which prevents the service from fully starting. How do I resolve this exception and get the service to start?
>
> System.InvalidCastException
> HResult=0x80004002
> Message=Unable to cast COM object of type 'System.\_\_Co... |
2018/02/28 | 948 | 3,044 | <issue_start>username_0: I've been out of this loop for 5 hours. My scanf method does not work.
Here is my loop.
I could not execute library's strcmp so I wrote myself.
```
int string_compare(char str1[], char str2[])//Compare method
{
int ctr=strlen(str1);
int ctr2=strlen(str2);
int counter=0;
... |
2018/02/28 | 716 | 2,106 | <issue_start>username_0: I am wondering how efficient / is working the volatile declaration. In the following code:
```
volatile char var1 = * (volatile char *) 0x2000000;
printf("%d \n", var1 + 1);
```
It means that every time I am using the variable "var", it will be loaded from the address memory 0x2000000, but i... |
2018/02/28 | 535 | 1,680 | <issue_start>username_0: Given a list `x = [1,0,0,1,1]`I can use `random.shuffle(x)` repeatedly to shuffle this list, but if I try to do this a for loop the list doesn't shuffle.
For example:
```
x = [1,0,0,1,1]
k = []
for i in range(10):
random.shuffle(x)
k.append(x)
return x
```
Basically, `k`contains ... |
2018/02/28 | 984 | 3,077 | <issue_start>username_0: I am trying to read this input txt file with my C code:
```
4 3
1.4 4.6 1
1.6 6.65 1
7.8 1.45 0
7 -2 2
```
and separate them into rows and columns so that I can sort. I tried doing that but I kept getting weird numbers.
So I tried printing out the rows and columns after I read them from th... |
2018/02/28 | 402 | 1,352 | <issue_start>username_0: I tried to use `pip list` and `pip freeze` without success.
It might be something obvious but I am not able to find it so far.<issue_comment>username_1: The answer to this could vary somewhat depending on your platform but generally:
```
$ pip show jinja2
Metadata-Version: 1.0
Name: Jinja2
... |
2018/02/28 | 534 | 1,944 | <issue_start>username_0: I am trying to create a script where i create a virtualenv if it has not been made, and then install requirements.txt in it.
I can't call the normal source /env/bin/activate and activate it, then use pip to install requirements.txt. Is there a way to activate the virtualenv and then install my... |
2018/02/28 | 201 | 782 | <issue_start>username_0: I'm trying to make a game on Roblox where you are a camera director set in a 1950's movie theater and you have to try and sneak propaganda into the movie the perfect amount of times so you don't get fired and I want to make it so I can play a video on the screen but I have no clue how. Any help... |
2018/02/28 | 338 | 1,314 | <issue_start>username_0: I am using mobile vision API and successfully able to detect text in all supported languages.
Now I want to determine the langue of detected text i.e if its English, French etc. I have explored the API documentation but I am not able to find any method to get that.
I am following [this sample]... |
2018/02/28 | 1,954 | 5,788 | <issue_start>username_0: I have been cracking my head over this one. I've searched all over and all I seem to find are issues with the same error messages but involving either building complete iphone apps or dealing with header files, all sorts of stuff.
I was just writing a simple C++ program, I wanted all the class... |
2018/02/28 | 1,582 | 5,953 | <issue_start>username_0: I am setting up Spoon for Android UI Testing using the [gradle-spoon-plugin](https://github.com/jaredsburrows/gradle-spoon-plugin) using the Spoon 2.0.0 snapshot. My project is set up using Android Gradle plug-in 3.0.1.
When taking screenshots via `spoonRule.screenshot(activity, "hello")`, I g... |
2018/02/28 | 3,023 | 12,422 | <issue_start>username_0: I'm looking to migrate from listening to the Play Store's INSTALL\_REFERRER intent, to using the new [Google Play Install Referrer Library](https://developer.android.com/google/play/installreferrer/library.html).
I am struggling to find a way to test this new library without first having to ad... |
2018/02/28 | 984 | 3,132 | <issue_start>username_0: How can I print two lines after the context i am interest in using python.
Example.fastq
```
@read1
AAAGGCTGTACTTCGTTCCAGTTG
+
'(''%$'))%**)2+'.(&&'/5-
@read2
CTGAGTTGAGTTAGTGTTGACTC
+
)(+-0-2145=588..,(1-,12
```
I can find the context of interest using...
```
fastq = open(Example.fastq, "... |
2018/02/28 | 351 | 1,228 | <issue_start>username_0: I am currently writing a small documentation on Github Wiki. I have a repo for my example codes and would like to cite some lines from examples codes in my wiki.
Rather than writing a code block statically, I simply want to "get 1st to 5th lines of code from this file", so when ever I update t... |
2018/02/28 | 783 | 2,548 | <issue_start>username_0: I have a project that needs to get the data from lines 2 to 4
**Sample data**
```
1Type
2DELL LAPTOP
3HP LAPTOP
4ASUS LAPTOP
1ACCESSORIES
2DELL MOUSE
3HP MOUSE
4ASUS MOUSE
```
**My code**
```
Dim myStreamReader As New IO.StreamReader("C:\tmp\Parts.txt")
Dim myStreamWriter As New IO.... |
2018/02/28 | 1,116 | 4,504 | <issue_start>username_0: I'm trying to start a child process in .NET and redirect its output to a named pipe. Attempts to write to stdout in the child process should block until a client actually reads from the named pipe.
Here is my code:
```
using System;
using System.Diagnostics;
using System.IO.Pipes;
namespace ... |
2018/02/28 | 639 | 2,323 | <issue_start>username_0: I'm attempting to go through and modify multiple users in AD with PowerShell. I want to add/update a field to give the full path to their computer. Hete's the script I have so far...
```
Get-ADUser -Filter * -SearchBase 'OU=CCG,OU=CCG-Users,OU=CCG-All-PCs-and-Users,OU=CCG,OU=Departments,DC=ser... |
2018/02/28 | 812 | 2,725 | <issue_start>username_0: I have a [Google Spreadsheet](https://docs.google.com/spreadsheets/d/1yZfvre907zi4VFz4fgQVdL1i8uWZDn7dmG-BWVbQXTQ/edit?usp=sharing) that has 2 sheets, People & Companies:
If a cell in **Column B** of **People** matches the text in a cell of **Column A** in **Companies** then I need the content... |
2018/02/28 | 840 | 3,238 | <issue_start>username_0: I am writing a macro in VBA Word that is copying data from an excel file and pasting the data in the Word file using predefined bookmarks.
I have two different groups of bookmarks in Word and, based on the action to perform, the macro is first deleting the bookmarks not needed for that specific... |
2018/02/28 | 1,004 | 4,102 | <issue_start>username_0: I've managed to succesfully setup a Visual Studio Python project. I now want to share this project with other developers through source control (the company I work at uses [SVN](https://subversion.apache.org/)).
As I want to avoid each of my colleagues having to manually setup the same Python ... |
2018/02/28 | 445 | 1,672 | <issue_start>username_0: I have the following situation where I need to create a launch configuration and along with it define an EBS block device. According the documentation <https://www.terraform.io/docs/providers/aws/r/launch_configuration.html#ebs_block_device> it says that it is possible to encrypt the volume but... |
2018/02/28 | 325 | 1,083 | <issue_start>username_0: I am currently creating a website for a school assignment and have had trouble inserting a background image.
Html:
```
Like a Veggie
| |
| --- |
| [Home](index.html) |
| [About Me](aboutme.html) |
| [Time Table](timetable.html) |
| [Wierd links](mylinks.html) |
|
```
Css:
```
bo... |
2018/02/28 | 2,550 | 9,260 | <issue_start>username_0: Example of what I'm trying to do
================================
In MS Office it is possible to get intellisense for **both** of these things: `Application.Documents(1).` and `Application.Documents.`
I'm trying to do the same for my own classes, I think this is called overriding?
I'm getti... |
2018/02/28 | 715 | 2,723 | <issue_start>username_0: For example, downloading of PDF file:
```
axios.get('/file.pdf', {
responseType: 'arraybuffer',
headers: {
'Accept': 'application/pdf'
}
}).then(response => {
const blob = new Blob([response.data], {
type: 'application/pdf',
});
FileSaver.saveAs(blob... |
2018/02/28 | 796 | 2,885 | <issue_start>username_0: I want to send let's say 1GB data in 32 bits chunk so inside the for-loop I'm doing `send(client_sock, buffer, tinfo->bufferSize, 0);` Which is fine. But then after that, I'm receiving the response which is throwing an `error`(as below) after the 1st iteration. If I put the `recv` out side `for... |
2018/02/28 | 323 | 1,210 | <issue_start>username_0: Hey I'm developing a simple smart contract on solidity and I crashed into a problem. Everytime I try to run setWord function I get an error "transact to HelloWorldContract.setWord errored: Error encoding arguments: SyntaxError: Unexpected token h in JSON at position 2" What could be the problem... |
2018/02/28 | 548 | 2,050 | <issue_start>username_0: **Edit: It was a !@#$ typo. In addition to the whitespace, the problem view used a hyphen where the naming convention required an underscore. Somehow I missed it.**
I'm using Powershell to test queries on certain SQL Server tables and views, one of which has whitespace in its name. The schema ... |
2018/02/28 | 181 | 675 | <issue_start>username_0: In a column of 7000 rows there are 11 NA's. I want to replace those NA's with the product of two other columns in my data frame
The column with NA's is `TOTALCHARGES` and the two columns I want to multiply are `TENURE` and `MONTHLYCHARGES`.<issue_comment>username_1: Try using the syntax:
```
... |
2018/02/28 | 2,262 | 7,120 | <issue_start>username_0: I have a series with some strings in a pandas dataframe. I would like to search for the existence of that string within an adjacent column.
In the below example I would like to search for if the string in 'choice' series is contained within the 'fruit' series, returning either true (1) or fals... |
2018/02/28 | 100 | 336 | <issue_start>username_0: Need to have query to have distinct item and sum of that item.
GroupBy works for me
Thanks,<issue_comment>username_1: This is a simple SUM:
```
SELECT name, SUM(count)
FROM MyTable
GROUP BY name
```
Upvotes: 1 <issue_comment>username_2: ```
Select name, sum(count)
From table
Group by name
... |
2018/02/28 | 447 | 1,407 | <issue_start>username_0: 'Copied this code from the Django tutorial into my app's urls.py file...
```
from django.urls import path
from . import views
app_name = 'polls'
urlpatterns = [
path('', views.index, name='index'),
path('/', views.detail, name='detail'),
path('/results/', views.results, name='result... |
2018/02/28 | 543 | 1,876 | <issue_start>username_0: I'm trying to print in browser console with JS my JSON response from PHP.
I saw many posts here and at another sites, but I can't do it.
I have a JSON like that
```
{"0":{"codigo_intervencao":"Apoio Emocional - 5270"},"1":{"tempo":"30"},"2":{"codigo_intervencao":"Apoio Emocional - 5270"},"3":... |
2018/02/28 | 3,976 | 16,869 | <issue_start>username_0: I'm still learning Git, and I understand that a branch is a copy of the master repository that allows you to make changes without harming things on the master repo while also allowing multiple people to make changes on their own branch.
However, let's say you have a server that hosts a web ap... |
2018/02/28 | 3,893 | 16,461 | <issue_start>username_0: i can get richtext from textbuffer with this:
```
exported = self.textbuffer.serialize(
self.textbuffer,
self.textbuffer.register_serialize_tagset(),
start_iter,
end_iter
... |
2018/02/28 | 474 | 1,737 | <issue_start>username_0: I have 2 databases on their own server.
I want to compare a **FIRSTNAME** and **LASTNAME** columns that is located in a table on each database.
If the first database has a firstname and lastname combo that matches the firstname and lastname columns in the second database, I want to display th... |
2018/02/28 | 399 | 1,578 | <issue_start>username_0: I have a Kotlin function that will take a while, and will then return a result (It downloads and parses a file).
I run it from Flutter like this:
```
void click() {
platform.invokeMethod('runMyLongFunc').then((a) {
print("Done");
setState(() {});
});
}
```
What should I do for t... |
2018/02/28 | 1,896 | 6,538 | <issue_start>username_0: I run `composer install` I got this error, telling me to use `composer update`
```
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may b... |
2018/02/28 | 735 | 2,753 | <issue_start>username_0: I am fairly new to SharePoint and I was not able upload a file to SharePoint successfully.
Currently, I am only able to add javascript to the HTML Source section of SharePoint [SharePoint HTML Editor](https://i.stack.imgur.com/BrZeh.png), but not able to call the file or upload the file to Sh... |
2018/02/28 | 833 | 2,906 | <issue_start>username_0: I am new to tkinter and have been using:
```
from tkinter import *
```
but have read this is bad practice.
I rewrote a very small bit of code to start using the following:
```
import tkinter as tk
```
However when I run the rest of the code. I get the error:
`label.place(relx=0.4, rely=... |
2018/02/28 | 899 | 3,496 | <issue_start>username_0: This seems like a bug in this API, though I don't know where to report it. So I am posting here for help. Mozilla docs here [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
If `window.location.href` contains a `#` then `URLSearchParams.get` fails to retrieve... |
2018/02/28 | 982 | 3,726 | <issue_start>username_0: I started angularjs 2 days ago (...)
I'm currently asking myself how to create a function that fetches my firebase data and depending on the child, it returns a string.
Seems pretty simple when I say it, but harder to do...
I could fetch the data one by one but the problem is that there are ... |
2018/02/28 | 713 | 2,817 | <issue_start>username_0: I am trying to get token amount of an ETH address in the browser. I have tried it with **web3.getBalance()** method but it only gets ETH amount.
I need to get token amounts under an ETH address. For example, this address has more than 30 token types, I have to get the amount of a specific one:... |
2018/02/28 | 735 | 2,935 | <issue_start>username_0: I am writing a function that takes 3 inputs, if all 3 inputs are floats and/or integers it returns the average of the 3, otherwise it returns them as a list.
This is what I have:
```
def list3(a,b,c):
"""if all inputs are int/float return average"""
l = [a, b, c]
for t in l:
... |
2018/02/28 | 282 | 1,114 | <issue_start>username_0: I love ES6 syntax and this new object oriented stylish approach, which is easier for me to code that way. But it's just a preference, because I'm new to JavaScript. I just want to know the pros and cons of using Babel in terms of performance (if any) and maintenance in the future, readability, ... |
2018/02/28 | 250 | 1,009 | <issue_start>username_0: Is it possible to deploy an Azure App Service Environment with Terraform? I can seem to find a provider specifically for that so was not sure if it could be accomplished with the azurerm\_app\_service resource.<issue_comment>username_1: Seems like a duplicate. [Is it okay to use babel-node in p... |
2018/02/28 | 433 | 1,457 | <issue_start>username_0: Trying to edit the question so that it is more clear, this code here should print the string and its length, but instead of printing the length of 12, it is only printing 1. The argument (char \*s) cannot be changed and the condition of the while loop has to be based on `s = s + 1` increment, t... |
2018/02/28 | 1,375 | 4,333 | <issue_start>username_0: I don't understand python's behavior, I've got many the same errors:
>
> File "./start.py", line 20, in print2
>
> item.print2()
>
> RuntimeError: maximum recursion depth exceeded
>
>
>
My code is the following:
```
#!/usr/bin/python
class Component:
def print2(self):
... |
2018/02/28 | 1,183 | 3,704 | <issue_start>username_0: [](https://i.stack.imgur.com/Cm1Uc.jpg)
Hello I'm trying to add information on **Transcations** while simultaneously upadting the **Date** on my **Users** child. But one problem I'm experiencing right now is that, I'm having a... |
2018/02/28 | 1,742 | 4,578 | <issue_start>username_0: I am new to scala spark, I have a CSV file as given below.
```
R001, A, 10, C, 30, D, 50, X, 90
R002, E, 40, F, 70, G, 80, H, 90, J, 25
R003, L, 30, M, 54, N, 67, O, 25, P, 85, Q, 100
```
How do I convert it to Pair RDD with first value of row as Key and having the numeric values skipped?
... |
2018/02/28 | 501 | 1,721 | <issue_start>username_0: Is it possible to import a color from one CSS class to another? Or create some sort of global color define and then use it in multiple classes so that doesn't have to be updated in multiple places if you want to change a color?
For example say I have a CSS class that I want to use for specific... |
2018/02/28 | 1,450 | 5,936 | <issue_start>username_0: Maybe the question is a contradiction, but is it correct in DDD to start the development from the use cases, and then you develop the domain model that will support those services?
If the design is driven by the domain (as DDD says), it is supposed that you develop the domain model first (by u... |
2018/02/28 | 1,069 | 4,408 | <issue_start>username_0: I'm just starting to use kotlin along side with Spring Boot to develop a simple web application.
Let´s take a simple data class object
```
@Entity
data class User (name: String) {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
var id: Long = -1
}
```
and a Controller
```... |
2018/02/28 | 287 | 979 | <issue_start>username_0: windows 10
atom
hydrogen
get the following error message when try to run hydrogen.
>
> No kernel for grammar JavaScript found
>
>
> Check that the language for this file is set in Atom and that you have
> a Jupyter kernel installed for it.
>
>
>
What to do to get hydrogen working ?<is... |
2018/03/01 | 2,562 | 6,249 | <issue_start>username_0: I am stuck on how to fix this problem, I think i understand the problem which is that the gson is in the incorrect format e.g. missing Bsid in this case. How would i fix it so if this problem so it doesnt happen again?
```
Error:E/AndroidRuntime: FATAL EXCEPTION: main
Process: , PID: 32171 com... |
2018/03/01 | 1,387 | 3,904 | <issue_start>username_0: On OSX El Captain 10.11.6, I have
```
$ VirtualBox --help
Oracle VM VirtualBox Manager 5.0.16
```
I'm trying to uninstall `virtual box` but getting following ...
```
brew cask uninstall --force virtualbox
Error: undefined method `<=' for nil:NilClass
Did you mean? <=>
Follow the instructi... |
2018/03/01 | 1,509 | 5,546 | <issue_start>username_0: thanks for taking a look at this. I confess I have been dabbling with parallel processing in python for all of 1 week now so I apologize if there is an obvious solution I missed. I have a piece of code that I would like to run several different instances of of a mp.pool(). Those that were on th... |
2018/03/01 | 951 | 3,729 | <issue_start>username_0: I am a bit new to numpy and I am trying to calculate the pairwaise distance between some of the elements of a numpy array.
I have a numpy n x 3 array with n 3D cartesian coordinates (x,y,z) representing particles in a grid. Some of these particles move as the program runs and I need to keep tr... |
2018/03/01 | 1,926 | 6,457 | <issue_start>username_0: I am having trouble visualizing a multidirectional graph with parallel edges in networkx so I have resorted to using pydot, but I am having two issues
1) I cant seem to understand why the node positions are not being fixed I would like to plot them at the x and y specified coordinates
2) How d... |
2018/03/01 | 1,414 | 5,672 | <issue_start>username_0: I am attempting to create a TCP server that accepts messages on port 5002 from an external program. However, it is not receiving messages from the external program.
```
@Bean
public TcpReceivingChannelAdapter inbound(AbstractServerConnectionFactory cf) {
TcpReceivingChannelAdapter adapter =... |
2018/03/01 | 520 | 1,964 | <issue_start>username_0: We have just upgraded some software we have from ServiceStack 4.0.62 to ServiceStack 5.0.0.0.
For some reason ormlite's encoding management seem to have changed.
Code that simply saves a DTO with a string field containing special characters (e.g Ø ← ↑ → ↓ ↔ ↕~ Σ ∂ φ) that used to work in 4.0.... |
2018/03/01 | 912 | 2,929 | <issue_start>username_0: I have a SQL table with unique IDs, a date of service for a health care encounter, and whether this encounter was an emergency room visit (ed = 1) or a hospital admission (hosp = 1).
For each unique ID, I want to identify ED visits that occurred <= 1 calendar day from a hospital stay.
Thus I... |
2018/03/01 | 631 | 2,213 | <issue_start>username_0: I have looked up some questions relating to this topic, but can't seem to find what I need:
I have 2 tables, and I would like to append information from the main table to the other matching one criteria from both. so in one table I have zip code information, I want to append all the users fro... |
2018/03/01 | 614 | 2,217 | <issue_start>username_0: I need to dynamically change the img src by calling a function that returns the image path, but when I use the code below, the image element shows as `![]()`
**component.ts:**
```
getMedia(row) {
this.sharedDataService.inventoryRows.forEach(function(elem){
if(row.vin === elem.vin){
... |
2018/03/01 | 1,987 | 7,307 | <issue_start>username_0: This is what I'm trying to make:
[](https://i.stack.imgur.com/x266f.png)
In the Flutter docs for Text Fields (<https://flutter.io/text-input/>) it says you can remove the underline by passing `null` to the decoration. However... |
2018/03/01 | 1,945 | 7,101 | <issue_start>username_0: I need to remove the rows with uneven numbers in a dataframe using a for-loop and a if else statement but i don't know how to remove a row if it's meets a condition.
so far i have this:
```
for (i in as.integer(substr(My_columns[,6],18,18))){
if((i %% 2) == 0) {
}
else {
}
```<issue... |
2018/03/01 | 1,994 | 7,441 | <issue_start>username_0: ```
doAsync {
doSomethingAsync()
uiThread {
doSomethingUiThread()
}
}
```
Based on the code above. I understand that `doAsync` creates a thread and executes the code inside its block in that new thread. Also, that `uiThread` executes its block code in the main UI thread. B... |
2018/03/01 | 705 | 2,307 | <issue_start>username_0: How would I multiple insert statements together? There's 8 different descriptions that I want to insert. For example:
```
insert into table (
p_number, description, period
)
select p.p_number, g.description, g.period,
from other_table p
,('desc1' as description
... |
2018/03/01 | 679 | 2,322 | <issue_start>username_0: I'm making a Windows Form Application.
Well, C# programming is new to me and maybe this is a silly question, but how I can apply `ReadOnly` property in multiple textbox elements? I tried this code:
```
public void DoReadOnly(Control control){
foreach (Control c in control.Controls){
... |
2018/03/01 | 438 | 1,826 | <issue_start>username_0: We're planning to build a web service to retrieve and send data to an external application.
Someone suggested we use the ASP.NET MVC project. Thing is, we won't have a view. All we're doing is a query and returning the output to the caller. I questioned the use of this project.
He responded ... |
2018/03/01 | 536 | 1,943 | <issue_start>username_0: This is a sample code of what I'm trying to work on. I think it's probably a simple thing but the teachers on the front end course I'm in don't have an answer for me (either in the "here's the format to use" or "here's the proper way to do what you're trying here".)
```
var part1 = {
type ... |
2018/03/01 | 550 | 2,106 | <issue_start>username_0: When I run the code below I get the error:
TypeError: 'NoneType' object has no attribute '**getitem**'
```
import pyarrow
import pandas
import pyarrow.parquet as pq
df = pq.read_table("file.parquet").to_pandas()
df = df.iloc[1:,:]
df = df.dropna (how="any", inplace =... |
2018/03/01 | 953 | 3,735 | <issue_start>username_0: I'm trying to share a string value from sibling components(light-switch to navbar). My problem is that the property `themeColor` is not getting updated when I emit the new value from my DataService.
Here is my structure for my App.Component.html:
```
```
I'm trying to use a DataService:
`... |
2018/03/01 | 687 | 2,252 | <issue_start>username_0: I can't execute `print` function in the class:
```
#!/usr/bin/python
import sys
class MyClass:
def print(self):
print 'MyClass'
a = MyClass()
a.print()
```
I'm getting the following error:
```
File "./start.py", line 9
a.print()
^
SyntaxError: invalid syntax
```... |
2018/03/01 | 1,121 | 3,897 | <issue_start>username_0: We are using Chart.js (version 2.6.0) for a bar chart in an Angular 5 application and the client wanted us to disable hover events for chart interactions(they only wanted the bar to change and the tooltips to show up when the user clicked on a bar).
in the bar chart options object, we have the... |
2018/03/01 | 595 | 2,099 | <issue_start>username_0: Within an svg tag, there multiple image elements, showing thumbnail images. Because of the large number of images, the page loading tooks a long time. So I want to implement an easy lazy load like [<NAME>’s Simple Image Lazy Load and Fade](https://www.sitepoint.com/five-techniques-lazy-load-ima... |
2018/03/01 | 1,756 | 6,598 | <issue_start>username_0: I am trying to set up a navigation when logged out (forgot password, signup/login) compared to when logged in (home, sign out, lots of stuff).
I am at a complete loss as to how to do this. All the suggestions I see drop out one part of the system, a single page to show a login, but that doesn'... |
2018/03/01 | 864 | 2,805 | <issue_start>username_0: First thanks for your help.
I just started working with tsql and I got a problem with performance.
I have two tables **table1** and **table2**, **table2** give me a lot f patterns that I got check if I find in each row of **table1**, if it happen I save to another column in **table1**.
So I ... |
2018/03/01 | 1,267 | 4,351 | <issue_start>username_0: I am attempting to run a for loop in a function that is designed to count the vowels in a user inputted string. However, the error "builtins: TypeError" keeps appearing. I have tried simply using the length of the string, using the len function, but the error simply won't go away, and the code ... |
2018/03/01 | 1,197 | 3,885 | <issue_start>username_0: I have an (m x n) grid where each edge has the same unit length of 1. Each run starts from the start-point (0, 0) and moves to the endpoint (m, n). Each run can only move rightwards or upwards, i.e. no backward travel allowed, and hereby each run must consist of a length of exactly (m+n).
How... |
2018/03/01 | 1,236 | 4,033 | <issue_start>username_0: ```
local RS = game:GetService("ReplicatedStorage")
local Event = Instance.new("RemoteEvent", RS)
Event.Name = "PunchEvent"
local function FiredEvent(Player)
local Character = game.Workspace:WaitForChild(Player.Name)
local Animation = RS:WaitForChild("Animations"):GetChildren()[math.ra... |
2018/03/01 | 591 | 1,676 | <issue_start>username_0: New to Python and am trying to use BeautifulSoup to pull the "ETH Balance" from the an etherscan.com webpage with this code:
```
import bs4, requests
res = requests.get('https://etherscan.io/address/0x93673eeed88fda9423b8037374164383df54aec1')
res.raise_for_status()
soup = bs4.BeautifulSoup(... |
2018/03/01 | 452 | 1,920 | <issue_start>username_0: My app is highly based on `CLLocation` timestamp. I found that `CLLocationManager` updates location in ~1s intervals. It's not enough for my app. Is it possible to configure `CLLocationManager` to update location in shorter intervals or should I look for other approach (timers + ask manually fo... |
2018/03/01 | 2,322 | 6,743 | <issue_start>username_0: The data that I'm using looks like this:
```
csv1 = pd.DataFrame({'D': [1-10, 2-10, 3-10, 4-10,...], #dates
...: 'C': [#, #, #, #,...]} #values
csv2 = pd.DataFrame({'D': [3-10, 4-10, 5-10, 6-10,...], #dates
...: 'C': [#, #, #, #,...]} #values
csv3 = pd.DataFrame... |
2018/03/01 | 859 | 2,572 | <issue_start>username_0: I'm running the following code to find the sum of the first 10,000,000 prime numbers.
How can I optimize it such that it doesn't take forever to obtain the result(the sum of prime numbers)?
```
sum=0
num=2
iterator=0
while iterator<10000000:
prime = True
for i in range(2,num):
... |
2018/03/01 | 860 | 3,227 | <issue_start>username_0: [In HTML 4.01, the height could be defined in pixels or in % of the containing element. In HTML5, the value must be in pixels.](https://www.w3schools.com/tags/att_iframe_height.asp)
Why was this decision made? Is there some concern that setting `height: 100%;` will have some negative consequen... |
2018/03/01 | 2,019 | 5,649 | <issue_start>username_0: I have a Table1 below in SQL.
```
ID | Provider | AdviserName | PolicyNumber |
---|----------|---------------|--------------|
1 | Asgard | <NAME> | A1 |
2 | Asgard | <NAME> | A2 |
3 | BT | <NAME> | B1 |
4 | BT | <NAME> | B2 ... |
2018/03/01 | 515 | 2,022 | <issue_start>username_0: How does the `u` log in the value of the coordinate of the mouse?
```
div = document.querySelector('.div');
div.addEventListener('mousemove', function yo(u) {
console.log(u);
});
```
This logs the value of x and y coordinate of the mouse.<issue_comment>username_1: From the MDN:
<https://... |