date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/11
558
2,160
<issue_start>username_0: I have a link that, If I click on it while is set with `.m` the class changes to `.n`, But if I click on it again, once It is supossed to have changed, it doesnt show up the alert...what is wrong? HTML ``` [enlace] ``` JQUERY ``` $(".m").on('click',function(){ ...
2018/03/11
1,173
4,211
<issue_start>username_0: Let's say that I have a few functions that perform business logic on some data: ``` function addEmployees(data, numberOfNewEmployees){ // Business logic... data.employeeCount += numberOfNewEmployees; return data; } function withdrawFunds(data, withdrawAmount){ // Business logi...
2018/03/11
1,236
4,308
<issue_start>username_0: I have the following `data.table` called `D`. ``` ngram 1 in_the_years 2 the_years_thereafter 3 years_thereafter_most 4 he_wasn't_home 5 how_are_you 6 thereafter_most_of ``` I need to add a few var...
2018/03/11
1,071
3,980
<issue_start>username_0: I've tried a variety of solutions and I can't find something that works. My problem is that I want to be able to put a deployment key (what GitHub calls a *personal authorization token* or *personal OAuth token*) into an encrypted variable in my Travis settings for the repository so that the co...
2018/03/11
1,108
4,169
<issue_start>username_0: I am using setTimeout in mocha test suite to insert a 20 seconds delay before making the last post call of the it() in the describe block. Although, I am using done() , still I am getting below error on terminal : error: timeout of 2000ms exceeded. for async tests and hooks, ensure "done()" is...
2018/03/11
1,425
4,268
<issue_start>username_0: I'm having some trouble with a script that I need to plot the TE and TM modes of a circular waveguide. Everything is based on these formulas: [![enter image description here](https://i.stack.imgur.com/ybuhe.png)](https://i.stack.imgur.com/ybuhe.png) Right now I'm focused on the TE modes and...
2018/03/11
1,047
3,645
<issue_start>username_0: `sentence = "Very disorganized and hard professor. Does not come to classes on time, she grades tough, does not help on anything. She says come for help but when you go to her office hour, she is not there to help."` I want to break this sentence into parts from full stop, comma, and & but. th...
2018/03/11
1,036
3,011
<issue_start>username_0: I have managed to write a file with some data inside it. However, no matter what I do I can only get one output file for the final iteration of the code when I would like different output files with different names per iteration of the while loop (which changes the initial condition of S0): ``...
2018/03/11
575
1,760
<issue_start>username_0: For example if I have : ``` ``` And I use Javascript/Jquery to set its value: ``` $('#search').val('someThing'); ``` Is there is an event to detect this action like `keyup,click,input, ..`?<issue_comment>username_1: Create a counter within the while loop and increment it each iteration th...
2018/03/11
961
2,288
<issue_start>username_0: I have a huge `gzipped` file, which I want to extract certain lines of it, according to a range in its second column. The start of a `file1.txt.gz` is: ``` zcat file1.txt.gz | head 1 1001 F K 999 1 1002 N G 340 1 1003 H B 889 1 1004 D F 399 1 1005 C X 311 2 1002 E F 233 2 1002 F C 334 3 1001 ...
2018/03/11
925
2,986
<issue_start>username_0: I'm trying to write an algorithm to calculate the factorial of a number using recursive function. This is my code : ``` #include #include #include using namespace std; int factorial(int n) { cin >> n; if (n == 1) return 1; return n\*factorial(n - 1); } int main() { int n = 0; cout<<"...
2018/03/11
1,313
4,148
<issue_start>username_0: so basically I'm trying to understand how a time complexity of Bitonic Sort should be calculated and best and worse case scenarios decided using Cost and Time and then adding and multiplying values. As an example: I tried first calculating complexity of Insertion sort. ``` void sort(i...
2018/03/11
514
1,317
<issue_start>username_0: I'm trying to create a time structure on my dataframe. I've got a dataframe with a column called 'day', df['day'] spans from 1 to 365 with missing numbers, it looks like ``` df = pd.DataFrame({'day': [1,2,2,2,3,4,5,5,8,8,9,9,10,11,11,12,13]}) ``` I'd like to create a new column 'weekOfthe...
2018/03/11
1,293
3,694
<issue_start>username_0: I have a matrix with a single non-zero entry; ``` InfectionMatrix = zeros(10,10); InfectionMatrix(5,5) = 1; ``` I want to look at this matrix find all the elements that have the value 1 then increase the value of surrounding elements by 0.125 ``` for k = 1:1:8 for j = 1:1:10 for...
2018/03/11
1,941
5,110
<issue_start>username_0: I am currently trying to set up a XAMPP web server running a Wordpress website using this tutorial: <https://code.tutsplus.com/articles/how-to-setup-a-wordpress-development-environment-for-windows--wp-23365> After everything went perfect, upon completing the final step, the core HTML of my wor...
2018/03/11
429
1,648
<issue_start>username_0: I'm trying to fetch data from the internet via aws rds and aws lambda, but I get an error when trying to do so: > > "errorMessage": "HTTPSConnectionPool(host='news.google.com', port=443): Max retries exceeded with url: /news/headlines?hl=tr≷=TR&ned=tr\_tr (Caused by NewConnectionError(': Fail...
2018/03/11
2,036
7,526
<issue_start>username_0: Let say I'm in `C++`, and I have this pseudo-interface (an `abstract class` with only `pure virtual methods`): ``` class IErrorLog { public: virtual bool closeLog() = 0; }; class FileErrorLog : public IErrorLog { public: FileErrorLog(){} ~FileErrorLog(){} bool closeLog() { ...
2018/03/11
413
1,248
<issue_start>username_0: I updated the composer just now, and I think it messed something up, I cannot access any pages, and it just throws this error, but I'm not even using DateTime anywhwere!? and that timestring changes if I refresh the page. please help. > > DateTime::\_\_construct(): Failed to parse time string...
2018/03/11
647
2,480
<issue_start>username_0: I have a view with 2 tableview and several textfield, I have implemented an extension to hide the keyboard: The keyboard hides when I touch the screen but I would like to disable UITapGestureRecognizer when I touch the TableView, otherwise I can not interact with the cells. ``` extension UIVi...
2018/03/11
916
3,113
<issue_start>username_0: This a generic question for a common problem, let's describe it as easy as I can... Suppose I have: ``` class A { def x() = //do something with e def e() = //do something else } ``` basically a simple class where method `x()` is calling method `e()`. The logic of x() and e() are pretty c...
2018/03/11
713
2,518
<issue_start>username_0: After reading user data from user agent, i use customized href link for all android users to open SMS app with predefined receiver number and body. ``` Base test [TEST](sms:+12345?body=Lorem%20ipsum) ``` I works perfectly with default SMS app, but more users starterted using Messenger and ot...
2018/03/11
690
2,346
<issue_start>username_0: If I create a simple Makefile in an Rstudio Text File: ``` graphic1.jpeg : mouse.csv graphic1.R Rscript graphic1.R ``` It will not execute. I get the error message, "Makefile:2: \*\*\* missing separator. Stop." because the tab in line 2 is not really a tab. If I edit the Text File in Te...
2018/03/11
808
2,880
<issue_start>username_0: I came across the following behavior today and had a question regarding its inner workings. I had a vector of strings that I needed to convert to filesystem paths, and I did so with the copy method, knowing it would call the appropriate string constructor. ``` std::vector strings; std::vector...
2018/03/11
862
2,445
<issue_start>username_0: Consider my data in a Pandas Series ``` s = pd.Series('1az wb58 jsui ne3'.split()) s 0 1az 1 wb58 2 jsui 3 ne3 dtype: object ``` I need it to look like: ``` 1 3 5 8 a b e i j n s u w z 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 ...
2018/03/11
719
2,488
<issue_start>username_0: I have a site that I want to expose to a bunch of colleagues that serves as an interface for some Machine learning tools. I’ve made the site in Django 2.0 and would like to serve it from a small windows PC under my desk, and then from a more dedicated server once it’s operational. I’ve had a ...
2018/03/11
1,781
5,885
<issue_start>username_0: I would like understand how the type signature works, in other words: I am baffled by the output I get from `:type`. ``` :type (+) (+) :: Num a => a -> a -> a ``` Why is it not ``` :type (+) (+) :: (Number, Number) -> Number ``` instead? I understand that ``` (+) :: Num a => a -> a ->...
2018/03/11
1,618
5,419
<issue_start>username_0: I have a C# class and data table. DataTable: ``` +---------+-----------------+---------------+---------+---------+--------------+ | Pers_Id | Pers_First_Name | Pers_Last_Name| OrderNu | OrderId | Pers_Update | +---------+-----------------+---------------+---------+---------+--------------+ |...
2018/03/11
1,464
5,016
<issue_start>username_0: I have a textfile and want to print the lines between two other lines, using Python 3.5 on Windows. I want to print the characters of a drama to another file. The textfile looks like this: ``` ... Characters: Peter, the king. Anna, court lady. Michael, caretaker. Andre, soldier. Tina, baker. F...
2018/03/11
529
1,313
<issue_start>username_0: I have a vector **x=[7 8 8 8...]** and the correspont vector **y=[13 14 15 16...]** , which give me some points , like in the picture below [![enter image description here](https://i.stack.imgur.com/kCPTV.png)](https://i.stack.imgur.com/kCPTV.png) Now **I want to create two (or N generally) ne...
2018/03/11
189
611
<issue_start>username_0: How can I make a stub that returns it's own arguments, like so: ``` var stub = sinon.stub().returns(???); var result = stub('foo'); //result = foo ``` This will be nested so I can't return nothing and then check stub.getCall...<issue_comment>username_1: Try this ```js stub.returnsArg(0); ...
2018/03/11
872
2,647
<issue_start>username_0: There is a problem that I need to do, but there are some caveats that make it hard. Problem: Match on all non-empty strings over the alphabet {abc} that contain at most one `a`. *Examples* > > a > > abc > > bbca > > bbcabb > > > > *Nonexample* > > aa > > bbaa > >...
2018/03/11
759
3,072
<issue_start>username_0: I have an app which connects to a firebase database and download all items then the items are displayed in tables like this: [![enter image description here](https://i.stack.imgur.com/HvOAD.png)](https://i.stack.imgur.com/HvOAD.png) This table is only shown if Im logged in but as soon as I mov...
2018/03/11
1,095
3,985
<issue_start>username_0: I want to know complexity (Big-O notation) of the built-in 'sort' function that the Clojure programming language provides, I did my search about it on the [clojuredocs page](https://clojuredocs.org/clojure.core/sort) but I did not find anything about it. Thanks in advance.<issue_comment>userna...
2018/03/11
6,928
21,682
<issue_start>username_0: I downloaded the example from [Spring Data MongoDB 2.0 - Reactive examples](https://github.com/spring-projects/spring-data-examples/tree/master/mongodb/reactive). I'm failing to understand how to make it work. --- I set up a cluster in [cloud.mongodb.com](http://cloud.mongodb.com) and they s...
2018/03/11
604
2,786
<issue_start>username_0: So lets say I have class: SurfaceLoad.cs ``` public class SurfaceLoad : Load { private double force; public double Force{ get => force; set{force = value;}} public SurfaceLoad(double f){ Force = f; } public SurfaceLoad(){ Force = 0.0; } } ``` And I h...
2018/03/11
204
747
<issue_start>username_0: I am trying to run sonar-runner.bat from my java project location. When it build > > ERROR: Caused by: Please provide compiled classes of your project with sonar.java.binaries property > > > and says BUILD FAILURE. [![enter image description here](https://i.stack.imgur.com/qyAD3.png)](...
2018/03/11
559
2,066
<issue_start>username_0: I have a global variable called: `char clientes_dni[]`. I am calling (from the main) a function like: `comprobarExistenciaDNI(clientes_dni)`. My function `comprobarExistenciaDNI` is: ``` bool comprobarExistenciaDNI(char DNI[]) { /// Change to lower DNI last word DNI[8] = tolower(DNI[8...
2018/03/11
427
1,489
<issue_start>username_0: I just started learning JavaScript. I have a question. When there are more than 160 characters, I do not want to type characters. How can I solve this problem? ```html i = 0; function olay() { i += 1; if (i > 160) { document.getElementById("sonuc").innerHTML = "Warning. Over 160 cha...
2018/03/11
587
1,795
<issue_start>username_0: I have to join 3 queries from same table. I have tried this code: ``` SELECT t1.`board` ,t1.`price` ,t2.`price` ,t3.`price` from boardtype t1 RIGHT JOIN(SELECT `price` from boardtype WHERE `acnonac`='ac' AND `roomtype`='single') t2 on t1.`board` = t2.`board`...
2018/03/11
404
1,261
<issue_start>username_0: I need to add support to my application for a new language. My application shows HTML webpages in an internal `CHtmlView` browser control. I have looked through the language codes [here](https://www.w3schools.com/tags/ref_language_codes.asp) for: * Sranantongo But it is not listed. What lan...
2018/03/11
282
1,290
<issue_start>username_0: From the docs it seems to me that it is using a embedding matrix to transform a one-hot encoding like sparse input vector to a dense vector. But how is this different from just using a fully connected layer?<issue_comment>username_1: Summarizing the answer from comments to here. The main differ...
2018/03/11
411
1,545
<issue_start>username_0: I have a global object with various properties whose values are strings. When a user types a string into an HTML input, I'm using javascript to assign that string to a variable. I need to convert that string to a property name and return the string associated with that property. For example: ...
2018/03/11
389
1,519
<issue_start>username_0: I am new to python and I want to know if we can upload files from our local system to box.com? Or else can we take help from any mediator like Jenkins to upload this files?<issue_comment>username_1: I don't know if I understood your question correctly, but there is a package for python to conne...
2018/03/11
317
849
<issue_start>username_0: I have a list ``` MyList <- lapply(1:10, function(i) list(x=i, y=i^2)) ``` that I can grab elements from using `function()` ``` sapply(MyList, function(i) i$x) ## works ``` that I would like to grab using brackets ``` sapply(MyList, [['x']] ) ## does not work ``` Bracket notation is mo...
2018/03/11
618
1,782
<issue_start>username_0: i've problem calling child method from parent using `refs` [![enter image description here](https://i.stack.imgur.com/Knkrt.png)](https://i.stack.imgur.com/Knkrt.png) Here my parent component: ``` import TwModal from './TwModal' export default { props: { videoId: { type: String, requir...
2018/03/11
856
2,762
<issue_start>username_0: So my question is what would be a good way to get a yes no response from a user using j option pane and then if that answer is correct then looping back through my program. Right now my program asks you if you want to sell or buy stuff and then it goes from there. Ideally I would like to ask if...
2018/03/11
1,207
3,379
<issue_start>username_0: I am using the following regex ``` (http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])? ``` and it's showing me a url but I want to show only URLS that contain ``` /video/hd/ ``` The following correction of the Regex above did not deal correctly with slashe...
2018/03/11
1,649
4,835
<issue_start>username_0: I am looking for a way to express interoperability between a class `A` and built-in integer types while keeping high flexibility in my code. E.g, I would like to be able to use `operator &` freely between (`A` and `A`), (`A` and `int`), (`int` and `A`) and (`int` and `int`), i.e. I want to have...
2018/03/11
1,966
6,635
<issue_start>username_0: I have got 16 divs of the same class name in html document in the following fashion ``` 30m + 15s --------- 60m + 0s -------- Custom ------ ``` I want to create onclick method that returns h2 text content from particular div. I tried to solve this by using following javascript code. `...
2018/03/11
1,925
6,650
<issue_start>username_0: I have two datasets regarding whether a sentence contains a mention of a drug adverse event or not, both the training and test set have only two fields the text and the labels{Adverse Event, No Adverse Event} I have used weka with the stringtoWordVector filter to build a model using Random Fore...
2018/03/11
1,479
5,503
<issue_start>username_0: I just can't get what I'm doing wrong with DataGrid grouping. I have a minimal application like this: ``` public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); List data = new List(); var rnd = new Random(); for (int i = 0; i < ...
2018/03/11
648
2,170
<issue_start>username_0: I am using particle js as a background image.Now ``` Particles Background ==================== ``` I have to set position attribute of `.text` as `absolute`. Otherwise the section remains hidden. I don't seem to understand why others become hidden. I can't use `absolute` as it will break ...
2018/03/11
605
1,905
<issue_start>username_0: I am trying to find and amend each tag in an array using the following: ``` re = /(?![]()![]() ``` Thi successfully matches all image tags properly and I can add content before and after the backreference, but is there away to add something within? (i.e. when I want to add attributes to the t...
2018/03/11
468
1,482
<issue_start>username_0: Angular says to me this error when i try tu use one interface and i dont know why. ``` file: '*******/movies.component.ts' severity: 'Error' message: 'Type '{ title: string; id: string; }' is not assignable to type 'Movie'. Property 'consructor' is missing in type '{ title: string; id: string...
2018/03/11
2,453
5,608
<issue_start>username_0: I want to make a `pandas Dataframe` with following columns. ``` my_cols = ['chrom', 'len_of_PIs'] ``` and following values inside specific columns: ``` chrom = pd.Series(['chr1', 'chr2', 'chr3']) len_of_PIs = pd.Series([[np.random.randint(15, 59, 86)], [np.random.randint...
2018/03/11
1,196
4,704
<issue_start>username_0: I'm trying to connect my game to Google Play Games Services, but when I try to login, it always returns me an error code 8 (internal error). The code is copy pasted from [Google example:](https://github.com/playgameservices/android-basic-samples/blob/master/TypeANumber/src/main/java/com/goo...
2018/03/11
1,139
4,203
<issue_start>username_0: I'm loading jQuery PrettyPhoto from a CDN. I've got this JS to enable post navigation from the keyboard: ``` // Add keyboard navigation for the next & previous post buttons $(document).keydown(function (e) { var url = false; if (e.which == 37) { // Left arrow key code url = $...
2018/03/11
861
3,199
<issue_start>username_0: I'm making a react application that shows details about the pokemon you searched. So I have a Home component which has an input field + submit button. I want to render my api call in my Main component. The question that I have is : How can I pass the value from this input field that is locate...
2018/03/11
670
2,668
<issue_start>username_0: I am using the LSTM cell in Tensorflow. ``` lstm_cell = tf.contrib.rnn.BasicLSTMCell(lstm_units) ``` I was wondering how the weights and states are initialized or rather what the default initializer is for LSTM cells (states and weights) in Tensorflow? And is there an easy way to manually s...
2018/03/11
1,060
3,214
<issue_start>username_0: I'm working on a portfolio, and everything is fine, except every text element is behaving as the link in my last button. This is true of all other pages of content as well, and applies in other areas to both images and text. Here is the html for the page: ``` [Photo](http://students.purchase...
2018/03/11
3,820
10,583
<issue_start>username_0: I have been having trouble finding a fix for getting PyAudio installed on my machine. I have tried a few different solutions and i do have the prerequisite library "portaudio" installed using homebrew. I have also looked for solutions to the gcc error that appears at the bottom of the output an...
2018/03/11
957
2,796
<issue_start>username_0: Is it possible to do a cross join using linq where the number of joins is not known in advance? I have this: ``` var arrays = new List(); ``` If I know I have three lists I can do: ``` var oQuery = from x in arrays[0] from y in arrays[1] from z in arrays[2] select new {x, y, z}...
2018/03/11
658
1,959
<issue_start>username_0: i have a file simple.txt. with contents as below: ``` a b c d c d ``` I want to check which pair 'a b' or 'c d' has maximum occurrence? I have written this code which gives me output of individual occurrence of each word : ``` cat simple.txt | tr -cs '[:alnum:]' '[\n*]' | sort | uniq -c | ...
2018/03/11
678
2,009
<issue_start>username_0: I have a basic CSS questions about stretching a shape across the width of a browser.[enter image description here](https://i.stack.imgur.com/40MCt.png) I want to place the rectangle between the two triangles. This is my HTML: ``` ``` This is my CSS: ``` #monitor_top_left { wid...
2018/03/11
1,083
4,076
<issue_start>username_0: I have error in my app, because I use findOne() method. Below my simple code. In User class my id is String email and that's id I'm trying to use in my class UserService like this : ``` public User findUser(String email){ return userRepository.findOne(email); } ``` but I have this error...
2018/03/11
2,919
8,909
<issue_start>username_0: For example: > > input: A = [ 6 4 3 -5 0 2 -7 1 ] > > > > > output: 5 > > > Since 5 is the smallest positive integer that does not occur in the array. --- I have written two solutions to that problem. The first one is good but I don't want to use any external libraries + its O(n)\*...
2018/03/11
310
1,364
<issue_start>username_0: I am trying to access the component(Class instance) of NavigationButton and SearchBar in ActionBar from the component(Class instance) of a tabItem in a TabView. How do I do this? ``` ```<issue_comment>username_1: One Possible way to accomplish this is to use a service, bind your references fr...
2018/03/11
720
2,718
<issue_start>username_0: I had some code written yesterday in situ on site yesterday and all was working fine. Without any change to the codebase today it has ceased to work. ```js let $feTurb = $('#feturbulence'); let timeline = new TimelineMax({ repeat: -1, yoyo: true })...
2018/03/11
1,611
4,787
<issue_start>username_0: I encounter a question on the interview and it was challenging. The topic was based in Decision analysis. The question is that Let's assume we have a tuple; ``` (15, 8, 8, 3) ``` And we want to create all sums of all combinations one by one without repeating and summing same numbers such as...
2018/03/11
371
1,472
<issue_start>username_0: Firestore here explains, how I can use simple classes to directly use them with firestore: <https://firebase.google.com/docs/firestore/manage-data/add-data> How can I mark a field as excluded? ``` data class Parent(var name: String? = null) { // don't save this field directly var ques...
2018/03/11
3,554
11,446
<issue_start>username_0: I want to loop through the data that I scrape with cheerio Example input data: ``` 11 aug 2017 Arsenal - Leicester City 12 aug 2017 Watford - Liverpool Crystal Palace - Huddersfield Town Everton - Stoke City ``` What I want to create as final result is a json file: ``` { ...
2018/03/11
437
1,487
<issue_start>username_0: Hi all I am using Bootstrap 4 and have a column with an image like below: ``` ![]({movie.Poster}) ``` My issue is I want to center the image as above when the screen size activates col-xs-12 and col-sm-5 but when screen is bigger such as col-md-4 or col-lg-3 I don't want to center the imag...
2018/03/11
418
1,368
<issue_start>username_0: I tried to install & execute old vue project. The problem is when I execute `npm install` there are many errors. I dont know why, because some time ago the projects worked without errors: error file : <https://gist.github.com/scaltro/5f6b04c3c1fa192989ddbb1c8707e233><issue_comment>username_1...
2018/03/11
409
1,336
<issue_start>username_0: ``` var sum1 = 0 func calculatorMath(arg1: Int, arg2: Int) -> Int { sum1 = arg1 + arg2 return sum1 } calculatorMath(20,50) ``` //the problem is "Missing argument labels 'arg1:arg2:' in call". What do I need to do?<issue_comment>username_1: Yes, the `mx-auto` class is re...
2018/03/11
1,054
4,243
<issue_start>username_0: When I capture the contents of an MTKView into a UIImage, the resulting image looks qualitatively different, as shown below: [![MTKView vs UIImageView of the same](https://i.stack.imgur.com/GKqaR.jpg)](https://i.stack.imgur.com/GKqaR.jpg) The code I use to generate the UIImage is as follows: ...
2018/03/11
2,128
5,404
<issue_start>username_0: When I try running the very simple code snippet from www.matplotlib.org, ``` from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ## for Palatino and other serif fonts use: #rc('font',**{'family':'serif','serif':['Palatino']}) rc('text', usetex=True) impo...
2018/03/11
770
2,383
<issue_start>username_0: I'm wondering why any image I put in this div container with display flex is automatically stretched out? And if I were to set a width for it, I can't center it with `justify-content`. ```css #container { display: flex; justify-content: center; } #container div { padding: 25px; ...
2018/03/11
1,603
5,232
<issue_start>username_0: I am trying to implement a TCP server using C in Linux. I want this server to accept incoming data forever from multiple clients and at the same time send some data back to each connected client in every 3 seconds. My problem is I don't know how to properly do `send()` in a different process t...
2018/03/11
906
2,381
<issue_start>username_0: ``` hexadecimal1 <- function(x) { y <- integer(0) while (x >= 16) { r <- x%%16 x <- x%/%16 y <- c(r, y) if(r==10) { r<- "A"} if(r==11) { r<- "B"} if(r==12) { r<- "C"} if(r==13) { r<- "D"} if(r==14) { r<- "E"} if(r==15) { r<- "F"} } y <- c(x, y) y } ``` I am...
2018/03/11
934
2,492
<issue_start>username_0: `a` is an array of shape `(N, M, D) == (20, 4096, 6)`. `b` is an array of shape `(N,) == (20,)`. I would like to insert the values of `b` to `a` such that each value in `b` is appended element-wise to the `D` dim in `a` (7th element in `a`). So `c` would be such an array, of shape `(20, 4096...
2018/03/11
719
2,068
<issue_start>username_0: i am trying to use the Docker Image for Keycloak but I seem to be unable to set a schema for the tables that are created in PostgreSQL. Currently all tables end up in the public schema. Is there a way that i can instruct Keycloak to create the tables inside a schema?<issue_comment>username_1:...
2018/03/11
725
2,003
<issue_start>username_0: How to stretch an input text to fit all width of the parent bootstrap column? ```html Pull Firmware ``` [![DevTools screen](https://i.stack.imgur.com/DTdgw.jpg)](https://i.stack.imgur.com/DTdgw.jpg)<issue_comment>username_1: How about this: ``` hex <- function(x) { if(x==0) return("0...
2018/03/11
775
3,382
<issue_start>username_0: Let's say you have three models, `Organization`, `OrganizationUser`, and `User`. You need to handle the following reqs: 1. When a user creates an organization, they should become a user associated with that organization (a row in `OrganizationUser` table). 2. If any of the operations above f...
2018/03/11
811
2,834
<issue_start>username_0: Is there any way to reference `self` with Swift 4's new `KeyPath`s? Something like this works fine, we can address a property of an object: ```swift func report(array: [Any], keyPath: AnyKeyPath) { print(array.map({ $0[keyPath: keyPath] })) } struct Wrapper { let name: String } let ...
2018/03/11
880
3,119
<issue_start>username_0: I'm learning Java with Android by creating Hacker News reader app. What I'm trying to do is: 1. Send a request to `/topstories`, return `Observable>`, emit when request finishes. 2. Map each `storyId` to `Observable` 3. Merge Observables into one entity, which emits `List`, when all requests...
2018/03/11
444
1,707
<issue_start>username_0: **I have one tab activity that contain 3 tabs.** I have one **edittext** and **button** in my activity, one **textview** in fragments. Whenever I need to change the fragment **textview** I simply add some text in **edittext** and click the button after. That text should appear in the fragment...
2018/03/11
547
2,151
<issue_start>username_0: I'm learning Symfony 4 right now and I came across this documentation about file upload in the controller page that I got confused. ``` public function new(Request $request) { $product = new Product(); $form = $this->createForm(ProductType::class, $product); $form->handleRequest($r...
2018/03/11
1,002
3,440
<issue_start>username_0: Is there a way to handle errors in a python list comprehension. Preferably I would have something like this where the last two values are represented by `None`: ``` values = [try i ["row"] except KeyError None for i in [{"row" : 1}, {"Row" : 0}, {}]] ``` This throws a syntax error and the on...
2018/03/11
606
2,033
<issue_start>username_0: I have a lot of html tables that share the same 15 columns along with custom columns that are specific for each table. I would like to create these common 15 columns as a component that takes in a set of data and shows up as the 15 td's without a wrapper. I can't figure out how to create an Ang...
2018/03/11
830
2,895
<issue_start>username_0: I need to process two types of files in a directory - `.txt` and `.gz`. There are two types of open statements for this purpose: **.gz** files: ``` with gzip.open(file_name, 'rt', encoding='utf-8') as f: line = next(f) while line: some code ``` **.txt** files: ``` with open...
2018/03/11
733
2,630
<issue_start>username_0: I have this code in a function: ``` self.playlist.currentMediaChanged.connect(lambda: self.songChanged()) ``` and it calls this function: ``` def songChanged(self): if self.playlist.mediaCount != 0: print(QMediaContent(self.playlist.currentMedia())) self.statusBar().show...
2018/03/11
849
2,458
<issue_start>username_0: I have some horizontal lines, made using `div` elements. All of them animate by using CSS, to set the transition, and JS, to set the new `width`. Here's my current code and result: HTML: ``` ``` CSS: ``` .lines-horizontal { position: relative; width: 0%; transition: width 2s; heigh...
2018/03/11
740
2,200
<issue_start>username_0: This is on Rstudio. I understand the usual meaning of "Origin must be supplied" errors and can fix it. But this one is a bit tricky. Received ~500 lines of R code from somebody who left. I aligned the input CSV according to her spec, verified with her testing CSV file using str(). Everything ...
2018/03/11
836
2,896
<issue_start>username_0: I am new to deep learning and currently working on using LSTMs for language modeling. I was looking at the pytorch documentation and was confused by it. If I create a ``` nn.LSTM(input_size, hidden_size, num_layers) ``` where hidden\_size = 4 and num\_layers = 2, I think I will have an ar...
2018/03/11
1,221
3,735
<issue_start>username_0: I'm trying to get a basic ES6 `import`/`export` working with Webpack 4, and Webpack can't seem to resolve my module, though per the error message it's looking right at it: ``` $ make ./node_modules/.bin/webpack --mode production src/app.js -o dist/bundle.js Hash: 6decf05b399fcbd42b01 Version: ...
2018/03/11
1,343
4,848
<issue_start>username_0: Best to explain with an example :) Let's say I have a the tables ``` CREATE TABLE dbo.Customer ( CustomerId INT PRIMARY KEY, Name NVARCHAR(50) ) CREATE TABLE dbo.ShoppingBasket ( ShoppingBasketId INT PRIMARY KEY, CustomerId INT NOT NULL FOREIGN KEY dbo.Customer(CustomerId), ...
2018/03/11
846
2,984
<issue_start>username_0: I'm trying to get back into development, trying to set up Symfony on a shared hosting server with GoDaddy. I am going through the tutorial with Symfony 4 (Here: <http://symfony.com/doc/current/page_creation.html>) but the `URL.co.uk/lucky/number` is throwing a 404. I set the exact same URL ro...
2018/03/11
506
1,783
<issue_start>username_0: Following [this question](https://stackoverflow.com/questions/29447715/react-native-fixed-footer) on fixed footer with a ScrollView, I'm trying to implement a fixed footer on the screen with a [FlatList](https://facebook.github.io/react-native/docs/flatlist.html). I have tried to use the answer...
2018/03/11
450
1,369
<issue_start>username_0: I want to render a directed graph like: ``` A ^ ^ / \ / \ B C ``` But no matter what order I put the statements in, dot insists on generating an image that looks like: ``` B C \ / \ / v v A ``` I've tried specifying the port, but then the edges ...
2018/03/11
1,190
4,248
<issue_start>username_0: I when try to implement a Room Database, I get the following error: ``` java.lang.RuntimeException: cannot find implementation for com.udacity.gradle.builditbigger.Database.HilarityUserDatabase. HilarityUserDatabase_Impl does not exist at androi...