date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/07
470
1,796
<issue_start>username_0: I am trying to combine classes using ng-class. I want to use `save` class plus `firstClass` if `something = First`. I am pretty new to angular and have been doing some reading on how to use ng-class but have not been able to find a solution. Is there a better way to approach this? ``` Do {{...
2018/03/07
13,016
19,671
<issue_start>username_0: **Versions:** Kubernetes `v1.9.2` running in GCE (kube-up.sh) Container-Optimized OS `10032.88.0` --- **Symptom:** Our COS nodes show the following in their `google-ip-forwarding-daemon.service` logs: ``` Mar 07 13:43:28 kube-minion-0fqw google-ip-forwarding[935]: INFO Changing eth0 IPs fro...
2018/03/07
551
2,477
<issue_start>username_0: I have a CustomRewriter implementing CSharpSyntaxRewriter. Within either the VisitClassDeclaration or VisitMethodDeclaration I need to check for ANY Interfaces that the class might implement. The reason is that VisitMethodDeclaration is looking for methods that make data calls and is adding a...
2018/03/07
517
2,197
<issue_start>username_0: I inherited a query that needs modifying. The query seems standard with a 'Select field1, field2 from TABLE\_A where blah, blah, blah....' Then it has the following statements as a part of the query: ``` HAVING (SUM(CASE WHEN S.LVLP1 NOT IN...
2018/03/07
1,030
3,467
<issue_start>username_0: ``` from collections import defaultdict phn_dictionary = {"actual": [], "predicted": []} phn_dict = defaultdict(lambda: phn_dictionary) phn_dict["qwe"]["actual"].extend([123,456]) phn_dict >>>defaultdict(>, {'qwe': {'actual': [123, 456], 'predicted': []}}) phn\_dict["asd"]["actual"].extend([...
2018/03/07
863
2,952
<issue_start>username_0: I have already made all of the proper imports and I have tried looking for answers from other posts but it seems to not quite fit my issue. I am trying to randomly send a message, which I can do. However I can not seem to delete the messages after a certain cool down time. The cool down time is...
2018/03/07
1,016
3,734
<issue_start>username_0: I'm trying to make something similar to google/apple maps screen in flutter. I just started experimenting in Flutter and I have a hard time understand that "Draggable widget". Could someone give me example code how they made their slide-up view, I can learn from? I can't find any.<issue_comment...
2018/03/07
1,176
4,090
<issue_start>username_0: I have a database that I'm searching through that is sometimes updated by another person. The way it is updated is terrible, but I can't change it. What happens is the updated numbers contain a "-1" or "-2". For example, ``` ID 1 2 3 4 ``` Whenever one ID is updated, a new row is created lik...
2018/03/07
1,162
4,282
<issue_start>username_0: I have two hashmaps (resources and neededResources). Goal is to reduce the amount of resources hashmap, but that can only happen if it has enough of both resource. ``` // String = name of resources available // Integer = amount of resources available Map resources = new HashMap<>(); resour...
2018/03/07
865
3,179
<issue_start>username_0: Most elegant solution required please. We all deal with objects that can be constructed incrementally throughout their lifecycle. Passing object references is the most useful way of dealing with objects, as mutations affect the original rather than just a copy. For example: ``` const bigObjec...
2018/03/07
1,987
4,647
<issue_start>username_0: So I have a dataset with 49 rows and 109 features, where the data is formatted so that each entry has a mean and sd value. Here is a sample: ``` > head(score_data[,1:4]) # A tibble: 6 x 4 Variable Overall `18 to 29` `30 to 39` ...
2018/03/07
1,233
3,057
<issue_start>username_0: I want to do something like this: [How to make a unique in R by column A and keep the row with maximum value in column B](https://stackoverflow.com/questions/14335733/how-to-make-a-unique-in-r-by-column-a-and-keep-the-row-with-maximum-value-in-col) Except my `data.table` has one key column, a...
2018/03/07
549
1,780
<issue_start>username_0: I have followed the steps in the official docker tutorial for getting up and running with django: <https://docs.docker.com/compose/django/> It works fine until I have to run ***docker-compose up*** It doesn't directly give me an error, but it won't run the server either, stopping at this poin...
2018/03/07
734
2,624
<issue_start>username_0: Is it somehow possible to call every instantiation of a template function without knowing what will get instantiated at write-code-time? ``` #include template void print\_size\_of() { std::cout << sizeof(T) << "\n"; } int main() { print\_size\_of(); print\_size\_of(); //won't work but m...
2018/03/07
552
1,981
<issue_start>username_0: I have a super basic example that I wrote based on the [demo](https://github.com/bvaughn/react-virtualized/blob/master/source/Table/Table.example.js), and it's not working: ``` import React from 'react'; import { Table, Column, } from 'react-virtualized' function MyTable(props) { return...
2018/03/07
542
1,801
<issue_start>username_0: I am trying to make my code print "Hello World" in Swift 4 by selecting just one of the three numbers in the array and I get the error listed in the title. ``` func newFunc() { let employees = [1, 2, 3]? if employees == [1] { let printthis = "Hello World!" print(printth...
2018/03/07
1,081
4,541
<issue_start>username_0: I have and Application which has a **singleton** that stores information across the whole app. However, this is creating some data race issues when using the singleton from different threads. Here there is a very dummy and simplistic version of the problem: **Singleton** ``` class Singleton...
2018/03/07
522
1,502
<issue_start>username_0: I have a string named "Time" which is `"01:20:23 01:25:36"` in the format `min:second:millisecond`. I need to do a subtraction by using these two time values. The result should be `00:05:13` (5 seconds and 13 milliseconds) How can I do this in Python?<issue_comment>username_1: You'll want...
2018/03/07
222
862
<issue_start>username_0: In order to construct GeoJson, a package uses: ``` import matplotlib._cntr as cntr ``` While using matplotlib 2.2.0 it returns ``` ImportError: No module named _cntr ``` How it should be imported? With previous version of Matplotlib, specially 2.1.0 it works.<issue_comment>username_1: `_...
2018/03/07
587
2,256
<issue_start>username_0: To build the References direct in MS-Access is no Problem. To do it with UCanAccess results in a "net.ucanaccess.jdbc.UcanaccessSQLException:...". ``` Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); Connection connection = DriverManager.getConnection("jdbc:ucanaccess://e:/TestDB.accdb;m...
2018/03/07
572
2,187
<issue_start>username_0: I'm using this code to grab the instance of Internet Explorer from word VBA and scraping some values from a webpage. I'm looping through 4 items (just in case, sometimes I've accidentally grabbed something called "Windows Explorer", which I have no idea what that is) to grab Internet Explorer. ...
2018/03/07
629
2,406
<issue_start>username_0: I'm currently working on a problem which compares three different machine learning algorithms performance on the same data-set. I divided the data-set into 70/30 training/testing sets and then performed grid search for the best parameters of each algorithm using GridSearchCV and `X_train, y_tra...
2018/03/07
881
3,203
<issue_start>username_0: Running the following from a command line to launch a process on remote computer ``` wmic /node:remotemachine /user:localadmin process call create "cmd.exe /c C:\temp\myfolder\test.bat" ``` basically it's just ``` echo Some Text > output.txt ``` I tested by double clicking the batch fi...
2018/03/07
1,426
4,500
<issue_start>username_0: I have an `Oracle` column of data type `NUMBER`(10,8). I need to validate the input data via `java regex` before the storing the data in tables. As per oracle's data type, valid values include: * 10 digits * 2 digits . 8 digits * 3 digits . 7 digits * 4 digits . 6 digits * no digits . 8 digits...
2018/03/07
604
2,027
<issue_start>username_0: I am trying to write a complex unattended install script that installs from a network directory. I'm running PS in administrator mode with bypass security. When I run: `Start-Process "\\192.168.5.7\MSChart.exe" -ArgumentList "/q" -Wait` I get: [![Security Warning](https://i.stack.imgur.com/...
2018/03/07
1,400
3,131
<issue_start>username_0: I know this question is asked for several times, but none of the answer fits with my need. So I have this string > > Sep=1, V\_Batt=7.40, I\_Batt=-559.63, V\_SA=7.20, I\_SA=-0.55, I\_MB=500.25, V\_5v=4.95, I\_5v=446.20, V\_3v=3.28, I\_3v=3.45, S=0, T\_Batt=25.24, T\_SA1=22.95, T\_SA2=-4.8...
2018/03/07
854
3,188
<issue_start>username_0: my linter constantly bugs me with unused variable warning, for the following class that I have created: ``` class LockGuard(object): def __init__(self, mutex): self.mutex = mutex self.mutex.acquire() def __del__(self): self.mutex.release() ``` in code, I get ...
2018/03/07
541
2,223
<issue_start>username_0: I have this RestController in spring, most of the time it is working just fine ``` @RestController @RequestMapping("/restful/submitPrinterData") public class SubmitPrinterDataController { @RequestMapping(method = RequestMethod.POST) public ResponseEntity SubmitPrinterData(@RequestBody Pri...
2018/03/07
778
2,519
<issue_start>username_0: I'm currently working on a drill from stroustrups book. The drill requires that you read a double each time through a loop and use 2 variables to keep track of the smallest and largest values read so far. Here's my attempt, but it doesn't work quite so well at the moment. Any help will be appre...
2018/03/07
1,211
3,835
<issue_start>username_0: I create a table named xyzcodes. It is a constraint for the other table, Industry. When I run the create script for Industry, I get the following error. ``` Msg 1776, Level 16, State 0, Line 1 There are no primary or candidate keys in the referenced table 'XYZCODES' that match the referencin...
2018/03/07
1,136
3,968
<issue_start>username_0: I have a Django model called `CheckIn` with (among others) two fields, `min_weeks` and `max_weeks`. I would like to build in validation such that `min_weeks` is always less than or equal to `max_weeks`. Following <https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddo#django.db....
2018/03/07
1,026
4,271
<issue_start>username_0: My scenario is difficult too explain in just a short title, so here's an example: I have multiple tables "birthday\_event", "meeting\_event", "dinner\_event" and they have multiple children in a table called "attendees". Essentially, I have 3 distinct One-to-Many relationships: "birthday\_even...
2018/03/07
336
1,070
<issue_start>username_0: I have an embedding matrix - that is a list of same size embedding vectors. Each embedding correspond to a sentence. I have a pandas dataframe where each row represents a sentence, and I would like to add to this dataframe a new column that contains the embedding of each sentence. I tried: ``...
2018/03/07
854
3,188
<issue_start>username_0: I have an UITableView, in each cell it's have some label and a button. I want to get all label value when I click the button. How to do this? Thank you.<issue_comment>username_1: Create `IBAction` method for the button inside the cell custom class and inside it print ``` print("label text :...
2018/03/07
1,038
3,941
<issue_start>username_0: I am using TFS 2018. I successfully created a "Hello World" MVC and SQL Server project. I was able to build and release the project to the target server. To make sure I had the method down correctly, I created a second "Hello World" MVC project. I was able to build it successfully. The only pr...
2018/03/07
591
2,026
<issue_start>username_0: I saw this code: ``` const boxTarget = { drop({ allowedDropEffect }) { return { name: `${allowedDropEffect} Dustbin`, allowedDropEffect, } }, } ``` It seems drop is a function and its parameter `{ allowedDropEffect }` will be an object? a class? how drop could b...
2018/03/07
854
3,047
<issue_start>username_0: I know this has been asked multiple times on here, but I would like some input. The web app I'm working on displays a table from a database via Freemarker. It includes a submit button to delete entries from that database. The button works fine for sending requests, but I wanted to have it auto...
2018/03/07
698
2,560
<issue_start>username_0: I want to get all class names in .java file.But i can't determine TypeDeclaration is a class or something. I try to use following code snippet and I get error ``` if (type instanceof Class)) {return packagePrefix + type.getName();} ``` Error:TypeDeclaration cannot be converted to Cla...
2018/03/07
681
2,349
<issue_start>username_0: Our web application needs a dashboard that will have multiple cards on it. These cards would be links to other apps / pages etc, we specifically want to use bootstrap 3 as we do not the time and energy to upgrade to bootstrap 4 any suggestions code examples would be helpful.<issue_comment>usern...
2018/03/07
1,565
5,349
<issue_start>username_0: I have two columns in a Spark SQL `DataFrame` with each entry in either column as an array of strings. ``` val ngramDataFrame = Seq( (Seq("curious", "bought", "20"), Seq("iwa", "was", "asj")) ).toDF("filtered_words", "ngrams_array") ``` I want to merge the arrays in each row to make a si...
2018/03/07
1,407
3,399
<issue_start>username_0: As I'm learning a bit more and more about NodeJs (I'm from C# world) I've made a very simple test so I could learn about expressJs request handling flow as: ``` const express = require('express'); const uuid = require('uuid'); const app = express(); const doSomething = (res, start, id) => { ...
2018/03/07
709
1,714
<issue_start>username_0: How do I turn a decimal from the decimal module into a string exactly so I can loop through in a list? Or is there another method that would work better when trying to work out the number of decimal places something is accurate to (ignoring trailing zeros at the end). ``` import decimal numbe...
2018/03/07
399
1,787
<issue_start>username_0: I'd like to introduce the usage of CloudKit in an app I am developing. As a first step I'd use it for handling push notifications when certain records are inserted in the public database. So in my app I would create a CKQuerySubscription for each record type I'd like to monitor. My question is...
2018/03/07
1,605
8,525
<issue_start>username_0: I'm writing tsqlt against a proc that can be run against various parameter values. I initially built a proc that populates fake tables - and then 1 tsqlt test per possible value (ended up with 35 tests and they each worked). What I would like to do is reduce these into 1 test (since they are a...
2018/03/07
804
3,131
<issue_start>username_0: I have few questions for the following code sample. ``` class HypotheticComparators { class Pair { private U left; private T right; public U getLeft() { return left } public T getRight() { return right; } } class User { private String name; private Integer age; public String...
2018/03/07
777
2,829
<issue_start>username_0: Does anyone know if there is a way to configure custom buckets for specific attachments? ``` class MyModel < ApplicationRecord ... has_one_attached :logo, bucket: 'custom_bucket' ... end ```<issue_comment>username_1: There isn’t, sorry. Active Storage is designed for use with a si...
2018/03/07
420
1,403
<issue_start>username_0: We have several projects that need to include a few static DLL. Therefore the project files include code like this: ``` ``` **Expected:** We expected that the two dlls; `abc123.dll` and `def456.dll` would befound in the nupkg file. **Actual:** However, the nupkg doesn't include the `abc12...
2018/03/07
637
1,964
<issue_start>username_0: 1st time poster. The following VBA script breaks a work macro everytime. I've tried different syntaxes to fix, but getting the same result. The code is supposed to look through all data cells in column L, looking for the string, "ERROR". If found, copy that cell and the one to the right over ...
2018/03/07
588
2,129
<issue_start>username_0: I'm using Spring with Java 8. I have a string with parameters and I am not sure how should I updates the parameters by list of params. ``` String message = "Today is {0} and {1} is happy"; List params = Arrays.asList("Sunday", "Uri", "Dan"); ``` I would like to know with which operator sh...
2018/03/07
1,257
5,579
<issue_start>username_0: ***Question:*** How to set/Inject resources lazily like how it is done using the XML config in Java config. We have spring batch program that is currently using XML configuration for uploading multiple files using the `MultiResourcePartitioner`. This works as intended see below config. ``` xm...
2018/03/07
575
1,800
<issue_start>username_0: A similar question has been asked before, and I am using the solution from that question, but it isn't working 100%. Here is my code: ``` #include #include #include using namespace std; int main () { string hexStr1 = "ffff"; short s1; stringstream ss1; ss1 << hex << hexStr1; ss1 >> s...
2018/03/07
3,053
10,493
<issue_start>username_0: --- UPDATE: March 12, 2018 1:44pm CST --------------------------------- After creating a website called <http://vbfiddle.net> to implement and test @ctwheel's VBScript solution in a browser (MS IE 10+ with Security set to "Medium", instructions on that website for how to set it up for you to ...
2018/03/07
1,486
4,978
<issue_start>username_0: I have a method which returns record from a database based on a id's. Now I need to fetch records for 1000 records and I feel like it is not a good practice to write all id's in the in clause manually. Is there a tool where I paste the id's and it gives me like this id in ('123', '456', and so ...
2018/03/07
787
2,170
<issue_start>username_0: I get a json response from a ajax request, the response is the follow: ``` { 1: { id: 1, title: "departure1 - arrival1", start: "2018-01-01 12:01:00" }, 2: { id: 2, title: "departure2 - arrival2", start: "2018-02-01 12:02:00" } } ``...
2018/03/07
913
2,791
<issue_start>username_0: This seems simple enough but I do not know what I am missing. I have this dropdown ``` My Lessons [Math](#) [Science](#) [History](#) [English](#) ``` And this is the css for that dropdown. ``` .dropdown{ position: relative; display: inline-block; } .dropdown__btn{ backgr...
2018/03/07
1,222
4,749
<issue_start>username_0: I have a Python 3 script similar to the following: ``` def transaction(write=False): def _transaction_deco(fn): @wraps(fn) def _wrapper(*args, **kwargs): env.timestamp = arrow.utcnow() with TxnManager(write=write) as txn: ret = fn(*ar...
2018/03/07
2,081
7,646
<issue_start>username_0: Webpack 4 has added a new feature: it now supports a `sideEffects` flag in the `package.json` of the modules it is bundling. From [Webpack 4: released today](https://medium.com/webpack/webpack-4-released-today-6cdb994702d4) > > Over the past 30 days we have worked closely with each of the f...
2018/03/07
9,037
21,034
<issue_start>username_0: I'm new to canvas, and am trying to create a floating particle animation that looks realistic. Currently, I am creating 400 particles that are spread randomly over the 400x400 canvas. Then, in each `requestAnimationFrame`, I am adjusting the `x` and `y` coordinates like so: ``` this.particle...
2018/03/07
1,507
5,246
<issue_start>username_0: I have upgraded my web application's packages, this upgrade seems to have broken my build. I first received an error telling me to install the webpack CLI, > > The CLI moved into a separate package: webpack-cli. Please install > 'webpack-cli' in addition to webpack itself to use the CLI. > ...
2018/03/07
664
2,445
<issue_start>username_0: I'm trying to remove the current timestamp from my Terminal (macOS) using ZSH. I am using oh-my-zsh & I have the theme "pure" configured. A timestamp appears on the very right of each line in brackets and I cannot figure out how to remove it. **Example:** [Timestamps are highlighted in red on...
2018/03/07
2,338
8,188
<issue_start>username_0: I was trying to do this music player app. I've created a relative layout for each position in a 2x2 grid layout, and inside each relative layout, I put one seekbar and one button. For each button I'd like to play a different music, and the seekbar above the button should be used to set the mus...
2018/03/07
618
1,876
<issue_start>username_0: I add a dynamic date `'", dt, "'`for my code as follow. I first put the date as string, and then paste into sqlQuery. ``` today<-Sys.Date() monthStart <- function(x) { x <- as.POSIXlt(x) x$mday <- 1 as.Date(x) } dt_date<-monthStart(today)-1 dt<-as.character(dt_date) df<-sqlQuery(db2,pa...
2018/03/07
469
1,716
<issue_start>username_0: I have an excel sheet with overview (first tab), there are two columns - company\_name and price and there are about 50 following sheets (named as individual companies). I'd like to generate the overview automatically. So when new sheet with company name is added it will be added in the overv...
2018/03/07
491
1,756
<issue_start>username_0: I want to have an `a` tag with an `href` and an `onclick` function, but when the user clicks the link I don't want the browser to go to the `href` but just execute the `onclick`. I tried the following: ```js function testFunc() { document.getElementById("testDiv").innerHTML = "it works!"; ...
2018/03/07
276
955
<issue_start>username_0: I have 3 Model named `User` , `Post` , `Comment` and this models are related. **User Model :** This model has many Post model. **Post Model :** This model belongs to User model and has many Comment model. **Comment Model :** This model belongs to Post model and User model. Now the question ...
2018/03/07
927
2,906
<issue_start>username_0: Data: ``` EMAIL,NAME,KEY,LOCATION <EMAIL>,Joe,ABC,Denver <EMAIL>,Jane,EFD,Denver ... ``` Overall goal: Script that takes in which fields I care about and produce multiple files with all unique columns in the data. E.g.: ``` myScript.sh NAME LOCATION ``` Produces: ``` Joe_Denver.csv - con...
2018/03/07
180
723
<issue_start>username_0: I would have thought this would be a question I could find the answer to with a quick Google search, but I can't. I have connected to my EC2 instance via an SSH client but now I would like to disconnect, but I have no idea how.<issue_comment>username_1: Simply typing the `exit` command will log...
2018/03/07
163
610
<issue_start>username_0: What is the output of the following program? ``` #include void main() { printf("hello",printf("world")); } ```<issue_comment>username_1: Simply typing the `exit` command will log you out of your instance. Hope this answers your question. Upvotes: 6 [selected_answer]<issue_comment>username_...
2018/03/07
969
3,029
<issue_start>username_0: ```js /* TASK: create a function that merges an array of arrays into one, and then pushes the strings into the str array and push the numbers into the num array. The values are not being pushed into the str or nums array even though the typeof operator is working in the if statement. Why? *...
2018/03/07
303
891
<issue_start>username_0: I have to show that ``` lg n! = Theta(n lg n) ``` But I have to do this without using the Stirling Formula. I know how to do this with the Stirling formula but I cannot do it without it, can anyone give me a hint on how can I achieve this goal?<issue_comment>username_1: Consider using the p...
2018/03/07
459
1,542
<issue_start>username_0: I am trying to extract the time from a datetime column in my Amazon Redshift database (Postgresql 8.0). I have already referred to previous questions such as [this](https://stackoverflow.com/questions/47069483/extracting-time-from-timestamp-in-sql). But I am getting an unusual error. When I tr...
2018/03/07
794
2,295
<issue_start>username_0: Ok I'm trying to get the dates for the previous week in Python assuming the week starts on Sunday and Ends on Saturday. Through google and trial and error, I have this: ``` def get_week_days(year, week): d = date(year,1,1) if(d.weekday()>3): d = d+timedelta(7-d.weekday()) ...
2018/03/07
610
1,577
<issue_start>username_0: I want to insert a pandas dataframe into another pandas dataframe at certain indices. Lets say we have this dataframe: ``` original_df = pd.DataFrame([[1,2,3],[4,5,6],[7,8,9]]) 0 1 2 0 1 2 3 1 4 5 6 2 7 8 9 ``` I can then change values at certain indices as following: ``` or...
2018/03/07
1,272
2,717
<issue_start>username_0: I have been able to do what I want with one command one line, but I do know there must be some more elegant way to do what I am doing. Please tell me what your methods are... I would like to learn more sophisticated way of processing text files... Original file is a vcf file looks like this ...
2018/03/07
597
1,841
<issue_start>username_0: My assignment is to print a set of numbers from min to max (the user inputs min and mix) but every third number to print an "x" instead. I'm not sure how to set it up. My friend suggested using count++ but i can't get it to work properly. It runs but it doesn't display any X's. ``` #include #...
2018/03/07
361
1,150
<issue_start>username_0: I'm able to make graph calls to get all items in a list but how can we get/filter items inside a list folder ?<issue_comment>username_1: You need to create `count` before loop, as in your code you create new one on every iteration, and print X instead of `i` not together: ``` int count = 0; fo...
2018/03/07
822
2,747
<issue_start>username_0: How do I make the following horizontal instead of the (apparent default) of vertical? It is located within navigation.component.html within my Angular 5.2.7 application that was generated via Angular-CLI 1.7.2. The documentation link included in the comment does not discuss how to layout a Mate...
2018/03/07
723
2,747
<issue_start>username_0: I need help with some rather easy macro, but I can't do that. So all I want is to switch between filters - I have two possibilities, by example two colours - black and white, and I only want to have one of them in the moment (I want to add button, so it will work as switch). Here is the situati...
2018/03/07
840
3,675
<issue_start>username_0: How would I call a function outside of my jQuery AJAX? I'm assuming I need to bind `this`, but I'm not sure where or how many times. ``` mylib = { do_the_ajax: function(data){ $.ajax({ url: "the_internet", method: "DELETE"...
2018/03/07
816
2,815
<issue_start>username_0: I am creating a hotel program which has an array filled with objects (Room), and each Room is filled with a customer name. I used an exchange sort to sort the array alphabetically, however I keep getting an error that Room cannot be converted into a String. I am fairly new to Java and I am stru...
2018/03/07
159
555
<issue_start>username_0: I have assigned an rgba color with transparency value of 0.2 to my menu, it works fine on chrome and safari, but on firefox and IE the menu turns to white. Attached in the link to website <http://www.lensshare.io/><issue_comment>username_1: You can use instead of `rgba` use `rgb` and `opacity:0...
2018/03/07
708
2,607
<issue_start>username_0: I have a webpage which I am building using React JS. The webpage displays a list of images in the `map` function within `render`. When I click on the image, as would be expected from my code, a border appears around every image in the `map` function. However, I only want a border to appear for ...
2018/03/07
620
2,173
<issue_start>username_0: How can I appy the same properties (styling actually) to multiple elements in Android? I know how to do it with CSS and HTML. Then you have classes. Is there an equivalent for Android?<issue_comment>username_1: You can define your style in `res/values/styles.xml` You can define it like that :...
2018/03/07
2,003
5,620
<issue_start>username_0: I need to set the value of one column based on the value of another in a Pandas dataframe. This is the logic: ``` if df['c1'] == 'Value': df['c2'] = 10 else: df['c2'] = df['c3'] ``` I am unable to get this to do what I want, which is to simply create a column with new values (or chan...
2018/03/07
3,236
9,665
<issue_start>username_0: I have the following dataset: ``` df <- data.frame(dens = rnorm(5000), split = as.factor(sample(1:2, 5000, replace = T)), method = as.factor(sample(c("A","B"), 5000, replace = T)), counts = sample(c(1, 10, 100, 1000, 10000), 5000, replace = T)) ``` I ha...
2018/03/07
1,292
4,437
<issue_start>username_0: I have coded the following which changes the image source and does some attempt of a nice fadeout and fadein when changing the image source but it is not perfect and trying to make it smooth. The issues I'm facing are: 1. The fading between image changes are messy, should fadeout, change ima...
2018/03/07
1,583
5,385
<issue_start>username_0: In Code.org's App Lab editor, we recently started seeing this error in Chrome 64: ``` Uncaught DOMException: Failed to read the 'rules' property from 'CSSStyleSheet' ``` The error is thrown in this function designed to detect whether CSS media queries are being used by the browser, on the li...
2018/03/07
1,444
4,791
<issue_start>username_0: table(skill) [![enter image description here](https://i.stack.imgur.com/ro6t8.png)](https://i.stack.imgur.com/ro6t8.png) have many skills, columns type boolean(0,1),by laravel i want to get the names of columns if skills value equal 1 and user\_id equal 1, without say the name of column beco...
2018/03/07
3,362
11,314
<issue_start>username_0: I am new in tensoflow and I want to adapt the MNIST tutorial <https://www.tensorflow.org/tutorials/layers> with my own data (images of 40x40). This is my model function : ``` def cnn_model_fn(features, labels, mode): # Input Layer input_layer = tf.reshape(features, [-1, 40, 40...
2018/03/07
538
1,422
<issue_start>username_0: I am trying to do some machine learning practice, but the ID column of my dataframe is giving me trouble. I have this: ``` 0 LP001002 1 LP001003 2 LP001005 3 LP001006 4 LP001008 ``` I want this: ``` 0 001002 1 001003 2 001005 3 001006 4 001008 ``` My idea is ...
2018/03/07
641
1,902
<issue_start>username_0: Lets say I start with a dataframe that looks like this: ``` Group Val date 0 home first 2017-12-01 1 home second 2017-12-02 2 away first 2018-03-07 3 away second 2018-03-01 ``` Data types are [string, string, datetime]. I would like to get a dataframe that...
2018/03/07
547
2,315
<issue_start>username_0: I am looking at creating automation test cases for a VueJS application that will be supported across several different desktop browsers and mobile (iOS and Android) browsers. I have came across several options including Protractor, Test Cafe, Nightwatch, and Cypress. Cypress is only supported w...
2018/03/07
824
2,729
<issue_start>username_0: I've tried to get linux list of my all files and directories in specified path to json format using ls and jq. Desired output: [![enter image description here](https://i.stack.imgur.com/P1Ipm.png)](https://i.stack.imgur.com/P1Ipm.png) this is all what I have... ls | jq -R '[.]' | jq -s -c 'ad...
2018/03/07
1,785
3,331
<issue_start>username_0: First time i ask something here. I am kind of 'blocked'. I have an array composed of n x n arrays (lets take n=3 for simplification): ``` [ [ [ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8] ], [ [9, 10, 11], [12, 13, 14], [15, 16, 17] ],...
2018/03/07
1,704
3,376
<issue_start>username_0: I'm trying to submit a form in ruby on rails that i made, but keep getting de next error. Ruby on Rails form: param is missing or the value is empty my form ``` <%= form_for @test do |f| %> <%= f.text\_field :first\_name %> <%= f.text\_field :last\_name %> <%= f.submit "Create"...
2018/03/07
2,367
7,715
<issue_start>username_0: I'm trying to reimplement .NET's [`Process.Exited`](https://msdn.microsoft.com/en-us/library/system.diagnostics.process.exited(v=vs.110).aspx) Event but I've been unsuccessfully so far. No error is returned by the application doesn't open. What am I missing? ``` #include #include static voi...
2018/03/07
2,170
8,199
<issue_start>username_0: I'm building a very simple quiz and I've hit a small wall. So my structure is that I've made 5 questions (using radio buttons) giving the correct radio button an ID, and then in JavaScript I'd target those radio buttons. But the answers I'd store in a array. I've tested it out on the first ques...
2018/03/07
2,459
9,122
<issue_start>username_0: I am working on an Android application that uses a Google Spreadsheet as a database. The application should GET, APPEND and UPDATE values in a spreadsheet, using the Sheets API v4. The first two functions are working fine but I have difficulties updating a specific row. I need to find a row th...
2018/03/07
599
2,146
<issue_start>username_0: In [the docs](https://aws.amazon.com/glue/pricing/) it's said that AWS allocates by default 10 DPUs per ETL job and 5 DPUs per development endpoint by default, even though both can have a minimum of 2 DPUs configured. It's also mentioned that Crawling is also priced on second increments and wi...
2018/03/07
598
2,039
<issue_start>username_0: What would be the most appropriate collection to use for this scenario, based on the latest version of .NET/C#? I need to return a mapping of group id's with user id's. So consider a mapping like the example below where group 111 has 2 users 222 and 444: ``` 111 222 111 444 555 222 ``` A Key...