date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/21
867
3,682
<issue_start>username_0: ``` func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let cell = tableView.dequeueReusableCell(withIdentifier: "CollectionDetailsItem", for: indexPath) as? CharacterCollectionDetailsTableCell else { fatalError("Dequeued cell is no...
2018/03/21
1,083
4,251
<issue_start>username_0: I have a child view being programmatically being presented by its parent view. I want to set the CenterXAnchor for the child view to be constrained to the parent's CenterXAnchor, but I want the child view to have a specific height and width. ``` childViewController.view.centerXAnchor.constrai...
2018/03/21
722
2,551
<issue_start>username_0: I need different progress bars for each image upload for my Angular4 application. (Storing with AngularFireStore) **My component** ``` percentageArray = []; startUpload(event: FileList) { Array.from(event).forEach(file => { if (file.type.split('/')[0] != 'image') { alert('Dieses Da...
2018/03/21
593
2,094
<issue_start>username_0: I am trying to add an image viewer canvas with zoom controls etc. [ngx-imageviewer](https://github.com/hallysonh/ngx-imageviewer) seems to provide what I need but I cannot get it to work as I get the following error when I try to do an AOT build with angular-cli > > 'client:157 Error during t...
2018/03/21
940
3,166
<issue_start>username_0: i have Table1 ,in this table users can charge their account ``` userid action amount 1 Deposit 10000 1 removal 500 2 Deposit 20000 2 removal 13000 ``` now i want take select remaine charge for every user. Sum(a...
2018/03/21
4,263
6,862
<issue_start>username_0: So, I'm refactoring an old R script to Python that converts a hex string to an array of numbers (the hex string comes from a proprietary database and the numbers end up being coordinates). I've refactored all of the code successfully, except for converting the raw binary output into decimal nu...
2018/03/21
1,310
4,360
<issue_start>username_0: I'm trying to use ***@tornado.web.stream\_request\_body*** for upload files. But I have a problem with upload large files. For example, when I upload PDF file larger than 100 MB (<https://yadi.sk/i/rzLQ96pk3Tcef6>) it loads incorrectly and it doesn't open in viewers. Code example: ``` MAX_S...
2018/03/21
1,233
4,172
<issue_start>username_0: I'm trying to use GoToMeeting's API and making a POST request to create a meeting. At the moment, I'm just trying to hardcode the body of the meeting and send headers but I'm receiving and I'm invalid JSON error and not sure why. Here's the code for that route: ``` app.post('/new-meeting', (re...
2018/03/21
954
3,520
<issue_start>username_0: I have a project which I need to ask the user to introduce at least 5 valid full names (until 10 full names or if the user introduce "fim"). Each full name needs to have at least 2 names with 4 characters each and the full name is only valid if it doesn't exceed 120 characters. I need to create...
2018/03/21
1,097
4,459
<issue_start>username_0: I'm trying to print the progress of data transfer while using multipeer connectivity. The `progress` information is available on the receiver side, in the `didStartReceivingResourceWithName` method and on the sender side, in the `sendResource` method. Here is how I have implemented the receiver...
2018/03/21
428
1,260
<issue_start>username_0: I have three tables: Table One: Users Table Two: Roles Table Three: UserInRoles * Users --- ``` UserID | FullName -------------------------------------------------- 07DCEE4A-6598-42E1-95C6-0390FF8BB534 | <NAME> ``` * Roles --- ``` RoleID --------------...
2018/03/21
657
2,333
<issue_start>username_0: I am using a customer express server with Next.js. It's running within a container. I am doing an http request with `isomorphic-fetch` to get data for my render. I'd like to do `localhost` when running on server and `mysite.com` when running on client. Not sure the best way to accomplish this. ...
2018/03/21
475
1,420
<issue_start>username_0: I am trying to multiply each element of an array by an integer (along the first dimension). The tricky thing is that this integer will change for each element. An example : ``` test <- array(dim = c(3,5,7)) test[1,,] <- 1 test[2,,] <- 10 test[3,,] <- 100 vec <- c(1,2,3) ``` The result I wa...
2018/03/21
682
1,971
<issue_start>username_0: How can I get something like this to work? I want `all = sum(onecycle, twocycle)`, without having to type it all out. ``` library('dplyr') library('english') ex <- data.frame(onecycle = 1:10, twocycle = sample(1:10), recycle = sample(1:10), gvar = rep(1:5, each = 2)) ex %>% mutate(all = su...
2018/03/21
928
2,822
<issue_start>username_0: I cant find a clear (to a newbie like me) answer to this online. If I create a spark df (using pyspark if that matters, I dont think it does) like: ``` new_df = spark.sql ("select * from old_df) print(new_df.count()) ``` **1) Does new\_df exist now due to the count() command?** **2) If I ...
2018/03/21
1,296
3,311
<issue_start>username_0: I have a pandas dataframe like this: ``` +-----+----------+ | No | quantity | +-----+----------+ | 1 | 100.0 | | 2 | 102.3 | | 3 | 301.2 | | 4 | 100.6 | | 5 | 120.9 | | ... | ... | +-----+----------+ ``` How can I calculate the probability for each value that i...
2018/03/21
882
2,887
<issue_start>username_0: I have used this one script but some 01523 values in CSV in write 1523. ``` $file = fopen('demosaved.csv', 'w'); // save the column headers fputcsv($file, array('Column 1', 'Column 2', 'Column 3', 'Column 4', 'Column 5')); // Sample data. This can be fetched from mysql too $data = array( arr...
2018/03/21
329
1,170
<issue_start>username_0: I have this code: ``` transform(searchData: Array, searchResultContentType: string) { if (searchData == undefined) { return; } return searchData.filter((item) => item.ContentType == searchResultContentType); } ``` My console prints: ``` ERROR TypeError: searchData.filter is not a fun...
2018/03/21
327
1,258
<issue_start>username_0: I am making a JFrame application in Java , I'm using the Application designer to insert components in my JFrame. In a Jtextarea , I would like to display some text but that text is returned by a function that I wrote in my class. So I thought I can just call the function in the JTextarea value ...
2018/03/21
670
2,135
<issue_start>username_0: Is there a good way to check if all items in an array are of the same type? Something that does this: ``` [1, 2, 3, 4] // true [2, 3, 4, "foo"] // false ```<issue_comment>username_1: You can use Array.every to check if all elements are strings. ``` arr.every( (val, i, arr) => typeof val ==...
2018/03/21
952
3,062
<issue_start>username_0: I have two dataframes (DF1 and DF2) ``` DF1 <- as.data.frame(c("A, B","C","A","C, D")) names(DF1) <- c("parties") ``` DF1 ``` parties A, B C A C, D ``` . ``` B <- as.data.frame(c(LETTERS[1:10])) C <- as.data.frame(1:10) DF2 <- bind_cols(B,C) names(DF2) <- c("party"...
2018/03/21
673
1,660
<issue_start>username_0: with data frames like below, I want to use a for loop to iterate through each data frame and add some new column say `new` & `new1` to the data frames `d1` and `d2`. Below is what I have tried. ``` d1 <- data.frame(y1 = c(1, 2, 3), y2 = c(4, 5, 6)) d2 <- data.frame(y1 = c(3, 2, 1), y2 = c(6, 5...
2018/03/21
539
1,433
<issue_start>username_0: I'm trying to add and start a state in Phaser JS but I'm getting a weird error. Here is the code: ``` var game = new Phaser.Game(800, 600, Phaser.AUTO); var GameState = { preload: function(){ }, create: function(){ }, update: function(){ } }; game.state.add('GameState', GameState); game.s...
2018/03/21
1,992
4,325
<issue_start>username_0: So, here is the deal: I have this code bellow and it produces multiples results, how do i put all this results in a single document? I was wondering if it was possible to make all of this a list of links. It's comming this way ``` ['http://acervo.estadao.com.br/pagina/#!/20171101-45305-nac-1-p...
2018/03/21
847
3,109
<issue_start>username_0: I'm working on angular 5 Reactive Forms : I had this error : *There is no directive with "exportAs" set to "ngModel"* I saw in others forums that problem can be for many reasons : misspelling in the HTML template , forgetting to import "FormsModule" or "ReactiveFormsModule", .... I checked ...
2018/03/21
541
1,837
<issue_start>username_0: I want to be able to feed a initial state to a network via a placeholder and TensorFlow only allow array or tensor to be feed (And I don't know how to create a zer initiale state tuple) . But the `tf.nn.dynamic_rnn` function recquire a tuple of size 3. In the answer of this post: [How do I set ...
2018/03/21
169
587
<issue_start>username_0: I want to console.log multiply, what am I doing wrong? ``` × var doms = document.getElementsByTagName('button'); const data = doms.dataset.action; console.log(data); ```<issue_comment>username_1: You can do it this way: ``` var doms = document.getElementsByTagName('button'); conso...
2018/03/21
1,214
3,308
<issue_start>username_0: I have this table: ``` VAT | Email1 | Email2 000 | <EMAIL> | <EMAIL> 000 | <EMAIL> | - 000 | <EMAIL> | <EMAIL> 000 | - | <EMAIL> ``` I want this result: ``` VAT | Emails 000 | <EMAIL>, <EMAIL>, <EMAIL>, <EMAIL> ``` How can I do this in SQL? Note that I want to concatenate values f...
2018/03/21
733
2,666
<issue_start>username_0: I have a **$character property** in my entity Foo. The property is an entity itself (AppBundle\Entity\Character). When I serialize Foo, I don't want to have the whole entity Character to be serialized: I need just the nickname of the Character. I wrote this in AppBundle\Entity\Foo: ``` /** ...
2018/03/21
530
1,872
<issue_start>username_0: I included the line `using namespace std;`on top of my code. Now consider the declaration `int a,b,c;`.Is above code an equivalent to `int std::a,std::b,std::c;`? If so, consider the following example: If I declared(defined) a namespace `Hi` after the line `using namespace std;`. Is `Hi` a par...
2018/03/21
730
2,545
<issue_start>username_0: **Schemas** ``` class Parent: relationship(ChildA) #One-to-Many relationship(ChildB, lazy="joined") #One-to-Many relationship(ChildC, lazy="joined") #One-to-Many class ChildA: parent_id array_of_enums id class ChildB: parent_id class ChildC: ...
2018/03/21
1,872
5,726
<issue_start>username_0: In Python I normally use functions like *vstack*, *stack*, etc to easily create a 3D array by stacking 2D arrays one onto another. Is there any way to do this in C++? In particular, I have loaded a image into a Mat variable with OpenCV like: ``` cv::Mat im = cv::imread("image.png", 0); ``` ...
2018/03/21
315
1,209
<issue_start>username_0: Why can you still submit a form even though the function returns false? ```js function submit() { return false; } ``` ```html account : ```<issue_comment>username_1: [preventDefault()](https://api.jquery.com/event.preventdefault/) work great to prevent default action like clics or ...
2018/03/21
875
3,238
<issue_start>username_0: I'm encountering the following error: *"Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled for all zones)."* when opening IE using Selenium WebDriver. In Java (using sele...
2018/03/21
997
3,855
<issue_start>username_0: I am trying to save the text contents of a `TextView` when my app closes, so I am trying to save that info in the `onDestroy` method, and then set them in the `onCreate` method. I have written the following 2 functions to get rid of the boilerplate of getting and putting a value in the shared ...
2018/03/21
1,252
3,158
<issue_start>username_0: I have a matrix (`pred_matrix`, dim = 1e6, 250), the rows are "pixelstacks" of 250 NDVI values of a Landsat scene, from which i did a "fuzzy cmeans" classification witch 6 centers (classes), stored in the list `results`. I want now to plot a random subset of each class of the 1e6 rows. This is ...
2018/03/21
484
1,311
<issue_start>username_0: I am trying to extract the index values from a dataframe (`df1`) that represent a range of times (start - end) and that encompass the times given in another dataframe (`df2`). My required output is `df3`. ``` df1<-data.frame(index=c(1,2,3,4),start=c(5,10,15,20),end=c(10,15,20,25)) df2<-data.fr...
2018/03/21
500
1,943
<issue_start>username_0: For a project I must use Java 6, so I set my eclipse compiler setting to 1.6 (JDK compliance level). However, I included `java.nio.file.Files` which is a Java 7 library and I am not getting any complaints. I can ensure that my project specific setting is set to 1.6. I even changed my entire w...
2018/03/21
823
3,133
<issue_start>username_0: So, I want the user to be able to build a treeview by himself. The treeview basically contains two kinds of items: * item (`MenuItem` inheriting `TreeviewMenuItem`) * submenu (`MenuSubmenu` inheriting `TreeviewMenuItem`, contains a `List`) Treeview uses an **ItemsSource** which is a `List...
2018/03/21
829
2,995
<issue_start>username_0: I'm trying to convert a function writing on jquery to javascript vanilla i know that .each() is .forEach() on pure javascript but i dont understand what i'm missing with my code ! here the jquery code : ``` addClickItems: function(classe) { $(classe).each(function (index) { $(cla...
2018/03/21
1,349
5,683
<issue_start>username_0: I did use this documentation: <https://autofaccn.readthedocs.io/en/latest/advanced/interceptors.html> to implement Interface Interceptors. To handle my async calls I used the IAsyncInterceptor interface described here: <https://github.com/JSkimming/Castle.Core.AsyncInterceptor> The registrat...
2018/03/21
1,165
4,908
<issue_start>username_0: I have a ViewPager with 3 tabs, in each of these tab I can have 2-3 or 4 sub tabs. When opening the activity, all the tabs (all the fragments) are loaded. Some of the fragments are asking some permissions (can be same permission for different fragment). My main problem is all the request perm...
2018/03/21
397
1,308
<issue_start>username_0: I am trying to build a RegEx that picks urls that end with "/topic". These urls have a different number of folders so whereas one might be www.example.com/pijamas/topic another could be www.example.com/pijamas/strippedpijamas/topic What regular expression can I use to do that? My attempt is ^w...
2018/03/21
1,093
3,229
<issue_start>username_0: I am trying to use the python module `limmbo` (<https://github.com/HannahVMeyer/limmbo>) with R via the `reticulate` R package. I have successfully installed `limmbo` with Anaconda2. I'm now trying to use the function `limmbo$core$vdbootstrap$LiMMBo$runBootstrapCovarianceEstimation`, as in my c...
2018/03/21
1,129
3,803
<issue_start>username_0: So, I'm learning python with the book: *"How to think like a computer scientist: Learning with python 3"* and this came out: My problem is in the last `elif` and `else`. how can we compare two string types with <. Both the `bigger_vocab` list and `book_words` are string types and I cant under...
2018/03/21
729
1,709
<issue_start>username_0: Assuming I have a matrix / array / list like `a=[1,2,3,4,5]` and I want to nullify all entries except for the max so it would be `a=[0,0,0,0,5]`. I'm using `b = [val if idx == np.argmax(a) else 0 for idx,val in enumerate(a)]` but is there a better (and faster) way (especially for more than 1-d...
2018/03/21
897
3,403
<issue_start>username_0: I want to observe changes of a property with RxJS. ``` interface Test { required: boolean; toObserve: boolean; } class TestClass { @Input() subject: Subject; registerHandlers() { this.subject.filter(element => element.required).subscribe(next => // Observe a property of every elemen...
2018/03/21
238
841
<issue_start>username_0: I want to display a section in my html file only if a variable(passed from a django view) equals "abc". I sort of think that javascript can be of help here but not sure how- new to both. How can this be achieved?<issue_comment>username_1: You can do this directly from the template without invo...
2018/03/21
1,148
4,414
<issue_start>username_0: I have the following JSON ``` ds = [{ "name": "groupA", "subGroups": [{ "subGroup": 1, "categories": [{ "category1": { "value": 10 } }, { "category2": {} }, ...
2018/03/21
1,988
6,999
<issue_start>username_0: I'm rendering a Collada (\*.dae) file with `ARKit`. As an overlay of my `ARSCNView` I'm adding a `SKScene` that simply shows a message bubble (without text yet). Currently, I know how to modify the position of the bubble so that it looks like it's always at the feet of my 3D model. I'm doing l...
2018/03/21
877
3,213
<issue_start>username_0: Is it possible to rotate tomcat access logs based on size? Going through the [Appendix](https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html), I couldn't find such an option. These are the only access log options I'm seeing: ``` server.tomcat.access...
2018/03/21
589
1,850
<issue_start>username_0: For example: ``` ex.com/read?id=1 ``` should open ``` ex.com/route.php?action=read&id=1 ``` but url won`t changing.<issue_comment>username_1: Try this : ``` RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)\?id=(.+)\sHTTP.*$ RewriteRule ^(.*)$ /route.php?action=$1&id=%...
2018/03/21
373
1,144
<issue_start>username_0: When date was 2018-03-21 19:40, i tried following code ``` var date = new Date(); console.log(date); ``` Output : ``` 2018-03-21T16:40:53.755Z ``` Server is missing for 3 hours as you see. I fixed it by adding 3 hours but I think it's not a good way. How can i fix this problem with bette...
2018/03/21
492
1,724
<issue_start>username_0: I'm trying to get the server time from the firebase with the following code: ``` let timestamp = ServerValue.timestamp() let today = NSDate(timeIntervalSince1970: timestamp/1000) ``` But this gives me an error saying: > > Binary operator '/' cannot be applied to operands of type '[Any Hash...
2018/03/21
887
2,228
<issue_start>username_0: My input file contains a multithreaded output from an API and looks like: ``` i-12a: True^M i-4e6: False^M SSH error 1.1.1.1 i-678 i-9we: True^M i-890: True^M SSH error 172.16.31.10 i-001 i-007: False^M SSH error None i-001 i-007: False^M i-1ae: True^Mi-3644h: True^M ``` The SSH Error wi...
2018/03/21
3,722
10,128
<issue_start>username_0: This is my first post on this stackoverflow site. I'm trying to grab the java versions/spark versions/ pip list and anaconda list from multiple servers using bash script. In which I have already tried few attempts but it doen't help much.. Please take a look and help me in this.. ``` set -x #!...
2018/03/21
436
1,575
<issue_start>username_0: I have defined object in data of vue component like this: ``` export default { components: {..} data: () => { filter: ({ from: 2017, to: 2018 } }), computed: mapState({ fooObjects: (state) => { console.log(this.filter) // print undefined } }), ... ...
2018/03/21
1,496
4,493
<issue_start>username_0: I'm trying to wrap my head around this as looking online this code though basic from what i can understand as no knowledge of VBA, Should at least just put in the search bar for google the word I put in. But it doesn't seem to am I missing something or have I done it completely wrong any pointe...
2018/03/21
418
1,395
<issue_start>username_0: I have a file in custom\_target.config. I have a shell script that is going to read through this config file. The config file is split up by the name of the file and the target directory I am trying to move it to. I was wondering what the best way is to split line in the file and start moving t...
2018/03/21
651
2,326
<issue_start>username_0: I am attempting to create a reactJS state that has an empty array in it on construction. Once i receive a message, that is a JSON object, I would want to create a key in that array and store that received message as the value under that key. for example. I have array x =[] JSON\_obj = {"da...
2018/03/21
897
3,364
<issue_start>username_0: I have a list of Publication objects: ``` public class Publication { public List Authors { get; set; } } ``` I would like to group my publication objects by their authors using LINQ. My solution uses a dictionary and looks like this: ``` var dict = new Dictionary>(); foreach (var publ...
2018/03/21
965
2,702
<issue_start>username_0: I am stuck with a problem in Regex where I need to search all the available alphanumeric sequences in a document. A document can have more than one such sequences. I am doing it in Python. So for example if the document is like "some blah blah blah with id X12354, id 1234Z and id 12P555. All a...
2018/03/21
1,079
3,709
<issue_start>username_0: When running Mocha, i get the error: > > Error: Promise rejected with no or falsy reason > > > on the promise function i'm trying to write tests for. I have a class like this: ``` class Parser { constructor(jobName, jobExchange) { this.jobName = jobName; this.jobExchange = th...
2018/03/21
519
2,054
<issue_start>username_0: Take a look at this code: ``` public class ThreadTest { public static void main(String[] args) { new Thread(new Runnable() { @Override public void run() { while(true) { //some code here } } ...
2018/03/21
588
2,190
<issue_start>username_0: I am trying to create a program which calculates prime numbers from 1 to 1000. I believe the code is having trouble either creating or joining the pthreads. I keep getting a core dump error. My main concern is in the second for loop where I am joining the pthreads. Is this the correct way to ch...
2018/03/21
563
1,943
<issue_start>username_0: I am working on parsing a MapInfo TAB Format file in Java. It consists of a set of four files viz .TAB, .ID, .MAP and .DAT. After searching on web I came across a parser provided by GeoTools at this repository: <https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/jav...
2018/03/21
299
1,267
<issue_start>username_0: We are five students working in the same project.This project was created with Netbeans, and we have a repository on gitHub. I want to use Intellij and the four team members are using NetbeansIDE so can i work on this repository using Intellij IDE, without break the repo...if yes how can i do i...
2018/03/21
552
2,247
<issue_start>username_0: I would like to add a translation option to our website but other than embedding the google translate widget (which doesn't look great) I can't find how to do this. I am looking to style it to suit our website similar to what they have done on this site (not ours) <https://www.visitscotland.co...
2018/03/21
740
2,648
<issue_start>username_0: Is there any way to turn off the option `Use Strict Mode for Redirect URIs` in a Facebook app? It seems that as of March 2018 this property automatically is turned on and is greyed out so cannot be disabled. Facebook seems to disallow authentication unless the exact URL is mentioned in `Valid O...
2018/03/21
959
2,866
<issue_start>username_0: So I'm creating an 8 ball program that prompts the user for a question will then spit out a response. The project I have states that the answers must be in txt file, so I created this ``` file = open("Ball_response.txt","w") file.write("YES, OF COURSE!") file.write("WITHOUT A DOUBT, YES") fi...
2018/03/21
1,359
5,566
<issue_start>username_0: When using the `AVPlayerViewController`, the user is allowed to select whether the subtitles are on a specific language, `off`, or set to `auto`. Setting the `requiresFullSubtitles` property I can force the display of subtitles, but that is not what I want. Is there a way to detect what the us...
2018/03/21
1,046
3,936
<issue_start>username_0: With docker, I try to setup a traefik backend using HTTPS port 443, so communication between the traefik container and the app container (apache 2.4) will be encrypted. I got an `Internal Server Error` if i activate `traefik.protocol=https` and `traefik.port=443` on my docker container. This i...
2018/03/21
542
1,920
<issue_start>username_0: When trying to make a GraphQL request I get the following [error](https://i.stack.imgur.com/SEVfa.png). I am running an express server on port 3002. I am also running express-graphql on the express server with the "/graphql" endpoint. I am using the apollo-client from a react app. I have tr...
2018/03/21
541
1,948
<issue_start>username_0: I'm learning to build [pdfium project](https://pdfium.googlesource.com/pdfium/). Following [the instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#visual-studio) I get 57 dlls in my out\ directory. However I cannot find the pdfium.dll which ...
2018/03/21
462
1,644
<issue_start>username_0: PHP 5.6 was working fine in my Mac Sierra I tried to upgrade to 7.0 than it stopped working. when I try to run localhost safari it shows not connected to server error.<issue_comment>username_1: *In your ExpressJS app on node.js, do the following with your routes:* ```js app.use(function(req, r...
2018/03/21
837
3,189
<issue_start>username_0: I have a JSON field object ``` {path: 'field', children: []} ``` that can be nested like this: ``` $scope.fields = [{path: 'field1', children: [{path: 'field1.one', children: []}, {path: 'field1.two', children: []}]}, ...
2018/03/21
1,442
4,427
<issue_start>username_0: I have four elements. I need element number 3 to float left, while the remaining elements float right. [![example](https://i.stack.imgur.com/EykzV.png)](https://i.stack.imgur.com/EykzV.png) Additional Factors ------------------ * Columns are not equal width. * Cannot use `position: absolute`...
2018/03/21
1,204
3,722
<issue_start>username_0: I have created a python program with gui using tkinter. In the file there are several calls to external text files. I wanted to make a standalone executable using pyinstaller but the executable formed gives an error which is something of the sort "Script cant be executed" ( I don't remember the...
2018/03/21
412
1,516
<issue_start>username_0: Given a component, with a form declaration ``` ngOnInit() { this.form = this.fb.group({ address: [""], }); } ``` An two input controls on a form, both referencing the same control. ``` ``` How do I keep the input values the same in each of the controls. Updating each input element...
2018/03/21
329
904
<issue_start>username_0: How can I get the value of `list` `code` elements? ``` def test(argu): print(argu) code = [5,10,15] length =len(code) for i in range(0,length): test("code[%d]" %i) ``` Expected output: ``` 5 10 15 ``` Acutal output: ``` code[0] code[1] code[2] ```<issue_comment>username_1: `%` ...
2018/03/21
220
813
<issue_start>username_0: I have added a parameter to select either fiscal or calendar year. I have a year over year line graph and since the fiscal year begins in July I would like July to be the first month listed on the axis when fiscal year is selected. Right now the months display January to December.<issue_comment...
2018/03/21
269
836
<issue_start>username_0: I have a map of maps (immutable) ``` private val map = mutable.Map[String, mutable.Map[String, MyObject]]() ``` and I wonder why ``` map.get(id).get(name) ``` returns `MyObject` while ``` map.get(id) ``` returns `Option[String, MyObject]]` I want to get `Option[MyObject]` out of ma...
2018/03/21
373
1,207
<issue_start>username_0: I have a data frame like: ``` cat.c1 cat.c2 cat.c3 name 0 tony NaN NaN groupA 1 Magoo {} NaN groupA 2 Jon NaN {} groupA ``` Queries such as ``` df...
2018/03/21
1,323
4,274
<issue_start>username_0: I have this code in my function.php, how can i dispaly this field value in admin mail order? Thanks! ``` //1.1 Display field in admin add_action('woocommerce_product_options_inventory_product_data', 'woocommerce_product_custom_fields'); function woocommerce_product_custom_fields(){ global...
2018/03/21
492
1,466
<issue_start>username_0: So I have an array of items and I want to grab the number item in the last array, I need the able to grab it in the last item, I feel like this is pretty simple but I tried using the end() function and it do not seem to work, here is the example array: ``` Array ( [0] => stdClass Object ( ...
2018/03/21
169
658
<issue_start>username_0: I have 2 Routes like the following ``` ``` However since the `:organizationId` matches with anything when I go to /organizations/create it loads both Component1 and Component2. I want it to load the second component only when the url is like "/organizations/5". What is an ideal fix for th...
2018/03/21
775
2,894
<issue_start>username_0: On a daily basis, I save my web pages files on a public drive. I then have to send a direct link of the html file to the client. To do so, I tend to manually convert all the backslashes "\" from the folder directory into forward slashes "/" as well as adding "http://" at the beggining. Exampl...
2018/03/21
919
2,634
<issue_start>username_0: So I want to create a web page where there will be images on the left and text on the right. I tried with margin and text-align but those things don't seem to work. Here is my HTML. ```css .content { min-height: 690px; background: url("background.png"); background-size: 100% 100%; ...
2018/03/21
1,899
6,064
<issue_start>username_0: I have two input boxes with id `no1` and `no2`. I have to put two integer values on both inputs and show their sum without using any button. My code works, but it shows only the individual values, not the calculated sum. How can I show my addition value In real time when user is just typing? ...
2018/03/21
1,012
3,403
<issue_start>username_0: I'm building a simple rotator that rotates three pieces of advice for a website. I want it to fade out/in and adding/removing classes to do that. In the JavaScript debugger, it works perfectly, because it is given time to step through all of the calls, but in actual execution, it is very choppy...
2018/03/21
761
2,485
<issue_start>username_0: In the filter I am implementing there is a step doing some reduction over the boundary of square domain ``` RDom r(0, filter_size, 0, filter_size); r.where( (r.x == 0 || r.x == filter_size - 1) || (r.y == 0 || r.y == filter_size - 1)); ``` However this makes domain traversal `O(filte...
2018/03/21
626
1,913
<issue_start>username_0: We have a table `Things` with instances belonging to table `Projects` via `thing.project_id`. When querying an instance of `Things`, we are returning a json representation of the parent `Project` record as a value on that instance. Currently it looks like: ``` SELECT t.id, ( SELECT row_to_...
2018/03/21
826
2,045
<issue_start>username_0: I've run to a error. I've been trying to append a text file to itself like so: ``` file_obj = open("text.txt", "a+") number = 6 def appender(obj, num): count = 0 while count<=num: read = file_obj.read() file_obj.seek(0,2) file_obj.write(read) count+=1 ...
2018/03/21
1,106
2,823
<issue_start>username_0: I have two pandas DataFrames that contain numeric and non-numeric values. I want to divide one by the other, but keep the non-numeric columns. Here is a MWE: ``` a = pd.DataFrame( [ ['group1', 1., 2.], ['group1', 3., 4.], ['group1', 5., 6.] ], columns=['Gro...
2018/03/21
2,412
9,694
<issue_start>username_0: I am experimenting with GKE cluster upgrades in a 6 nodes (in two node pools) test cluster before I try it on our staging or production cluster. Upgrading when I only had a 12 replicas nginx deployment, the nginx ingress controller and cert-manager (as helm chart) installed took 10 minutes per ...
2018/03/21
2,072
5,989
<issue_start>username_0: I'm trying to set up Protractor for a new project. Our requirements encompass end-to-end tests on most popular Browsers (Chrome, Firefox, IE, Safari). After 15 seconds setting up Chrome tests I've gotten stuck a whole day trying to get the Firefox drivers to work. Here's my current configurati...
2018/03/21
963
3,525
<issue_start>username_0: I have a Python package (Python 3.6, if it makes a difference) that I've designed to run as 'python -m *package* *arguments*' and I'd like to write unit tests for the \_\_main\_\_.py module. I specifically want to verify that it sets the exit code correctly. Is it possible to use runpy.run\_mod...
2018/03/21
750
2,300
<issue_start>username_0: ``` def newactivation(x): if x>0: return K.relu(x, alpha=0, max_value=None) else : return x * K.sigmoid(0.7* x) get_custom_objects().update({'newactivation': Activation(newactivation)}) ``` I am trying to use this activation function for my model in keras, but I am ha...
2018/03/21
2,595
7,535
<issue_start>username_0: The Haskell aviary combinators lists [(=<<)](http://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary-Functional.html#v:-61--60--60-) as: ``` (a -> r -> b) -> (r -> a) -> r -> b ``` Is there an official bird-name for this? Or can it be derived via the pre-existing ones?<issue_co...
2018/03/21
262
1,148
<issue_start>username_0: I'm trying to provision a server with a Chef project that relied on an older version of the mysql cookbook (5.6.3). As this particular version is not compatible with anything newer that Ubuntu 14.04, I tried updating to the latest version (8.5.1) which lead to the same error. I understand that ...