date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/06
1,385
3,827
<issue_start>username_0: I am trying to add the toggleClass but it's not working. i also tried to add or remove the class using the hasClass. there is also same problem. ```js $(document).ready(function() { $(".srch-btn").click(function() { $(".srch-inpt").toggleClass("expanded"); }); }); ``` ```css .box ...
2018/03/06
2,345
4,779
<issue_start>username_0: I've been looking to do this with sed, awk, or cut. I am willing to use any other command-line program that I can pipe data through. I have a large set of data that is comma delimited. The rows have between 14 and 20 columns. I need to recursively concatenate column 10 with column 11 per row s...
2018/03/06
424
1,422
<issue_start>username_0: Let's say I have a class: ``` class MyRealClass { get propOne() { return stuffFromTheServer; } } ``` When testing, I want to achieve this functionality: ``` const mockClass = { get propOne() { return someStuff; } } jasmine.spyOnProperty(mockClass, 'propOne', 'get'); ``` By doing some...
2018/03/06
1,399
3,564
<issue_start>username_0: This question is related to the following post: [Replacing Numpy elements if condition is met](https://stackoverflow.com/questions/19766757/replacing-numpy-elements-if-condition-is-met). Suppose i have two, one-dimensional numpy arrays `a` and `b`, with 50 rows each. I would like to create an...
2018/03/06
583
2,198
<issue_start>username_0: I'm having trouble with an ImageIcon array. When I click the JButton on the swing gui the last image of the imageicon is displayed. I want to be able to keep clicking the button and have the image displayed and have it go through all the imageicons in the array. How can this be accomplished? ...
2018/03/06
608
2,107
<issue_start>username_0: I'm looking for a ReactJS version of this, when my component reaches top of page. The jQuery way is very simple, I would like it to stay that simple.. ``` $(window).on('scroll', function() { if($(window).scrollTop() > element.offset().top) { } }); ```<issue_comment>username_1: ``` co...
2018/03/06
766
3,260
<issue_start>username_0: I have seen in many languages basically to implement stacks they take help of other data structure. Ex: If we need to implement stacks in python we cant take advantage of lists. A very simple example ``` class Stack(object): def __init__(self): self.stack = [] def isEmpty(self): ret...
2018/03/06
1,137
4,572
<issue_start>username_0: I want to include headers in the request events in Application Insights and found the following post that has a solution for application with a HttpContext. I'm working with a Nancy application where the request headers are stored in the NancyContext. Problem is that Nancy doesn't provide a sta...
2018/03/06
646
2,533
<issue_start>username_0: I've the following postman request: [![enter image description here](https://i.stack.imgur.com/oiKXx.jpg)](https://i.stack.imgur.com/oiKXx.jpg) [![enter image description here](https://i.stack.imgur.com/VFwFn.jpg)](https://i.stack.imgur.com/VFwFn.jpg) Which returns me as expected an URL: [![en...
2018/03/06
586
1,620
<issue_start>username_0: I´m creating a info DIV like bootstrap´s modal. Here is my example, try to resize the result space. <https://jsfiddle.net/p1csbjy9/2/> This is the CSS code: ``` @media (min-width: 300px) and (max-width: 670px) { #infoWindow { min-height: 200px; background-color: #eee; position:...
2018/03/06
586
1,960
<issue_start>username_0: Every cell in my `UITableView` has an `amountValue` value stored in `CoreData`. My table view is a wallet so the final step is to add every `$` and display the grand total as the `wallet value`. I am trying to iterate through every `amountValue` occurence in my `tableView` without success. He...
2018/03/06
677
1,718
<issue_start>username_0: I am working on getting a Balanced mean from a table in r. In the table below I would like to return the mean for each location but if there is more then one total for a "Name" per location I would like to take the mean for that than get the mean. ``` Name Loc Total Jeff IA 17 Jill IA...
2018/03/06
929
3,928
<issue_start>username_0: I am developing a Flutter app but wondering what should I do when calling async code from UI - let's say the build method of a UI widget. For example, my app connects Firebase through a service class, which uses Async-Await style to grab records from Firebase. Using await ensures my service cl...
2018/03/06
1,027
4,117
<issue_start>username_0: I'm getting into object oriented programming and for a college assignment I have to make a simple Memory game. The memory game itself i have created and it works. Now I want to make it so that the user has to 'login' so that I can save his username later on. I'm stuck at this because i'm still...
2018/03/06
729
2,485
<issue_start>username_0: Edit: add .h file. ``` #pragma once #include "Screen.h" #include "../IniParams.h" class AtcParamsMenu : public Screen { public: AtcParamsMenu(ScreenManager *screenMgr, MenuTypes MenuType, IniParams *Params); ~AtcParamsMenu(); private: enum eFields { make, model, connector }; vo...
2018/03/06
710
2,505
<issue_start>username_0: I have a static variable declared in a header file and initialized in the corresponding cpp file. What I'm trying to do is accessing that variable from another cpp file. This is the code: **AkOcclusionObstructionService.h** ``` class AkOcclusionObstructionService { public: static float O...
2018/03/06
549
1,935
<issue_start>username_0: I cannot find the answer, so maybe someone will be able to help me. I don't understand why I can't call ptr->other(). THX ``` class A { public: A(){} virtual ~A(){} virtual void fun(){ cout<<"fun A"<fun(); ptr->other(); //it doesn't work :( } ```<issue_comment>username_1: Use have to i...
2018/03/06
662
2,238
<issue_start>username_0: Is there a way to group all metrics of an app by metric names? A portion from a query listing all metrics for an app (i.e. `{app="bar"}`) : ``` ch_qos_logback_core_Appender_all_total{affiliation="foo",app="bar", instance="baz-3-dasp",job="kubernetes-service-endpoints",kubernetes_name="bar",kub...
2018/03/06
612
1,979
<issue_start>username_0: I am writing a Python code that determines whether a year is a leap year. I think my algorithm is fine, but the result of my code is not as desired. ``` def isLeapYear(n): if n % 400 == 0: print ("The year", n, "is a leap year:") return True if n % 100 == 0: print ("The year", n, "...
2018/03/06
503
1,755
<issue_start>username_0: I am using a customized version of fullCalendar. I would like my initial display and page reloads to display the following month. So the current month is March, when I bring up the calendar I would like to see April as the default month. I see this block of code. ``` var date = new Date(); va...
2018/03/06
1,704
6,606
<issue_start>username_0: I know that in order to compare two strings in C, you need to use the `strcmp()` function. But I tried to compare two strings with the `==` operator, and it worked. I don't know how, because it just compares the address of the two strings. It shouldn't work if the strings are different. But the...
2018/03/06
457
1,357
<issue_start>username_0: I am trying to have awk search for exact matches except for leading and trailing special characters and whitespace. e.g. searching for 'Hello': ``` Matches: $%#@!@@[Hello ^%.! hello world ``` but WONT match: ``` helloworld ``` I have partial matches working like so: ``` (tolower($0) ...
2018/03/06
822
2,782
<issue_start>username_0: I'm trying to aggregate 3 rows to one row (select the latest record). But I still get 3 records instead of 1. Any thoughts ? \*\* SQL Server\*\* ``` select [TotalTechPremium] From Premiumfile where [TimeDate Stamp] = (select Max([TimeDate Stamp]) From Premiumfile ...
2018/03/06
221
702
<issue_start>username_0: What is the best way - if there is any at all, without using js - to force all `td` that belong to one `col` to obtain properties that are specified in the `col`? A simple ``` ``` does not seem to have any impact on the underlying table cells content.<issue_comment>username_1: Using css an...
2018/03/06
359
891
<issue_start>username_0: Here is my example: ``` library(dplyr) my_df <- data.frame(col_1 = c(1,2,4), col_2 = c('2017-12-1', '2015-11-2', '2011-2-5')) my_df$col_2 <- as.POSIXct(my_df$col_2) out <- ifelse(my_df$col_1 ==2, my_df$col_2+ as.difftime(3, units = 'days'), NA) print(out) ``` It produces: ``` NA 1446703200...
2018/03/06
823
3,163
<issue_start>username_0: I am making an entirely client-side html file that exports .txt files based on the contents of its many text areas and text fields. The problem arise when I try to import that same .txt file back into the page, as of now its populates all the text areas with the same content while I would like ...
2018/03/06
401
1,377
<issue_start>username_0: I have a MacOS app that has been working fine for around a year. An NSTextField on a screen containing 20 NSTextFields started aborting with "unexpectedly found nil while unwrapping an Optional value". So far, I've done the following: * Removed and reassigned the textfield's IBOutlet link * De...
2018/03/06
441
1,819
<issue_start>username_0: I understand that both suppress evaluation of a symbol or expression. But the backtick is used for macro definitions while the apostrophe is used for symbols (among other things). What is the difference, semantically speaking, between these two notations?<issue_comment>username_1: Backticks all...
2018/03/06
549
2,071
<issue_start>username_0: I am trying to compare two arrays.where if it is true it needs to print the string.since it need to print only one time but the string is printing three times .where i have stored three values in both arrays.can you guys spot and tell me what is wrong. ``` for (int i = 0; i < n; i++) { if ...
2018/03/06
536
1,618
<issue_start>username_0: I have this very specific use case where I want to check if a String contains 2 lower case letters, concatenated by a variable number of digits and a "-abc". The "-abc" part must not be variable and should always be "-abc". So in the end only the number of digits can be variable. It can be l...
2018/03/06
409
1,278
<issue_start>username_0: Hi i´m trying to use the text widget to put a link to local file, but dint work, and I dont know why: I use this: ``` [Drive C](file:///D:/) ``` but if I link to real url it works fine: ``` [Google](http://www.google.com) ```<issue_comment>username_1: You are close instead of `(?=.*[0-9]...
2018/03/06
418
1,580
<issue_start>username_0: I have a question regarding the `#include` preprocessor directive in C++. In my program I would like to include a header file from another directory. For this I have used the full path, example: ``` #include "full/path/to/my/header.hpp" ``` Now it turns out that `header.hpp` itself has an ...
2018/03/06
1,399
5,092
<issue_start>username_0: I am new to python and currently work on data analysis. I am trying to open multiple folders in a loop and read all files in folders. Ex. working directory contains 10 folders needed to open and each folder contains 10 files. My code for open each folder with .txt file; ``` file_open = glob...
2018/03/06
1,907
6,912
<issue_start>username_0: Consider please ``` int main(void) { int a; int b; int* pa = &a int* pb = &b int e = pa == pb; } ``` Is this well-defined? `pa` and `pb` are not pointing to elements in the same array.<issue_comment>username_1: If I may quote the [c11](/questions/tagged/c11 "show questio...
2018/03/06
915
3,656
<issue_start>username_0: In my webapp running in Tomcat, I have two Spring 5.0.2 classes that implement `SmartLifecycle`. They start as expected, but don't stop. I see the following in my log file: ``` INFO o.s.c.s.DefaultLifecycleProcessor$LifecycleGroup [localhost-startStop-2] Stopping beans in phase 2147483647 DEBU...
2018/03/06
519
1,543
<issue_start>username_0: I Would like to remove all occurences of the below pattern in my string. ``` SUPPLEMENTAL LOG GROUP "SAMPLESL" ("PIKEY") ALWAYS, SUPPLEMENTAL LOG GROUP "SAMPLE2" ("UIKEY") ALWAYS, ``` How do I create a regular expression for this? Essentially, I do not want any SUPPLEMENTAL LOG GROUP stat...
2018/03/06
785
2,706
<issue_start>username_0: When using the Format Document command I'd like to change how the code formats. I'm completely new to VSCode and I'm still having trouble navigating the settings, so easy to understand replies would be very helpful. Currently the code is formatting like this: ``` void start () { //Do stuff her...
2018/03/06
343
1,461
<issue_start>username_0: In the guide, you can see that these steps are necessary: ``` // Obtain the FirebaseAnalytics instance. mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); Bundle bundle = new Bundle(); bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id); bundle.putString(FirebaseAnalytics.Param.ITEM_...
2018/03/06
368
1,462
<issue_start>username_0: Currently I'm working with a Java back-end server which needs a specific external API: <http://repo.ehealth.fgov.be/artifactory/maven2-cache/be/fgov/ehealth/connector/connector-packaging-technical/3.14.2/> The problem I am currently facing is as follows: I compile the dependency with gradle a...
2018/03/06
649
2,511
<issue_start>username_0: I have `import 'semantic-ui-css/semantic.min.css'` in `index.js`, [as instructed by Semantic UI](https://react.semantic-ui.com/usage#semantic-ui-css-package). Before I did `yarn eject` (to enable CSS modules with `create-react-app`) everything worked fine, but as soon as I did I got the follow...
2018/03/06
353
934
<issue_start>username_0: Let G be my "master data frame" with multiple columns including "id". Let S[i] be multiple files containing only 1 column = "id". "id" in G and S[i] are the same. I want to create H[i] which is a subset of G. H[i] contains all columns in G BUT only observations in S[i] (or "ids" in S[i]). Ex...
2018/03/06
661
2,358
<issue_start>username_0: Does anyone know if there is a way to hide the last item in the form for a multi-valued field, so that only the "add-more" button shows, and no empty deltas are shown. I already tried hiding the item if it is empty in hook\_form\_alter, but then the add-more button adds two items. It seems that...
2018/03/06
679
2,244
<issue_start>username_0: I have a form of multiple checkboxes with each corresponding numeric values. I want the PHP to show the sum of the values from only the checked checkboxes. If checkbox 1 has a value of 80; checkbox 2 has 21; and checkbox three has 15; then as an example, if the user only checked checkboxes 3 an...
2018/03/06
746
2,509
<issue_start>username_0: I have an internal tool that lets me edit configuration files and then the config files gets synced to Google Storage (`* * * * * gsutil -m rsync -d /data/www/config_files/ gs://my-site.appspot.com/configs/`). How can I use these config files across multiple instances in Google App Engine? (I...
2018/03/06
1,028
3,876
<issue_start>username_0: I've started developing an application in JavaFX and I've run in an issue, I could find very little helpful information about: The spacing of between characters in Linux is very uneven. I'm not talking about the width of different characters but of the spaces between the characters. It's visib...
2018/03/06
2,013
8,469
<issue_start>username_0: Consider the following controller: ``` public class SubmissionController : Controller { public SubmissionController() { } public IActionResult Post() { RecurringJob.AddOrUpdate(() => InitiateSubmission(), Cron.Minutely); return Ok("Periodic submission trigger...
2018/03/06
1,297
3,928
<issue_start>username_0: managed to get the JSON data with ``` $R= Invoke-WebRequest -Uri $url -Headers $headers -ContentType "application/json" -Method Get -UseBasicParsing $x = $R.Content | Out-String | ConvertFrom-Json ``` now I've a JSON file like this : ``` { "id": 1000, "name_with_namespace": "myProje...
2018/03/06
1,079
3,579
<issue_start>username_0: I built my scene in three js and everything was working properly when I rendered the scene on the . But now I need the scene to be on a div, 70% of the viewport to be specific, the other 30% being a left side panel with some info. I replaced every `window.height` and width for the width and hei...
2018/03/06
854
2,949
<issue_start>username_0: I am trying to get my fairly typical JavaScript (React) app to run in dev mode on AWS Cloud9. I successfully cloned my repo (using https ugh), installed my npm packages, and can run scripts in the console. However, I don't know how to run and access the app in dev mode. There are a plethora of ...
2018/03/06
398
1,464
<issue_start>username_0: I tried to install Apache HTTPD via Homebrew with `brew install apache2`, it worked well with default configuration <http://localhost:8080> However, once I added more virtual host, to another folder (actually just clone the www folder to new one), and then tried to access to that new virtual ho...
2018/03/06
425
1,446
<issue_start>username_0: I want to make my bot send a welcome message when he joins a Guild, but i don't know how, tried to do something but it didn't worked. How can I do that? Code that not worked: ``` client.on('guildCreate', guild => { message.channel.send('¡Hola! Soy el bot de Pepelui85, mi prefix aquí es "*...
2018/03/06
732
2,178
<issue_start>username_0: For example, say I wanted to write a method to switch the first two elements of a list, but only if the second is greater than the first. I initially tried to do something like: ``` static void swapFirstTwo(List extends Comparable list) { if(list.get(0).compareTo(list.get(1)) > 0) { ...
2018/03/06
386
1,512
<issue_start>username_0: I am trying to load a module conditionally and the condition seems to work however webpack still makes the conditional module part of the bundle when the condition is false, here is the import code: ``` if (process.env.FEAT_SUPPORT === 'on') { require('feature'); console.log('Enabled') } ...
2018/03/06
253
977
<issue_start>username_0: If it does, is this code executed before the code of the file in which it is included or is it executed paralelly?<issue_comment>username_1: `require` by design can be invoked in any place in the code, so this will add a new module inside the bundle. If you want to split that require into a sep...
2018/03/06
878
2,741
<issue_start>username_0: I am currently having a query that results like this **A,B,C,D, E** = item *numbers* = weight 1. **A** *15* 2. **B** *23* 3. **C** *10* 4. **D** *8* 5. **E** *88* ``` use Algorithm::Bucketizer; my $b = Algorithm::Bucketizer->new( bucketsize => 30); for my $i (1..10) { $b->add_item($i, ...
2018/03/06
1,057
3,239
<issue_start>username_0: I have written a snippet to find the string in the list of tuples. Just out of curiosity, I would like to know whether it can be improved or not. Any feedback or ideas would be greatly appreciated. I have the following list ``` final_artist_filenames = [] files = ['102257.jpg','752232...
2018/03/06
676
2,128
<issue_start>username_0: I've to pass an `ids` array from a page to another page. I create `$ids` in PHP and I use use this with jQuery in this way: ``` var ids = php echo json_encode($ids); ?; jQuery(ids).each(function() { filters.push('ids[]=' + jQuery(this)); }); ``` The URL result is the following: ``` htt...
2018/03/06
538
1,802
<issue_start>username_0: I have a binary image of separated spots. [![Source binary image of sports](https://i.stack.imgur.com/tLp3g.png)](https://i.stack.imgur.com/tLp3g.png) Is there any ImageJ plugin that could construct convex hull of all spots? Or could you recommend another program, not ImageJ, that can do thi...
2018/03/06
361
1,406
<issue_start>username_0: If I have the function, ``` def parse_datetime(s, **kwargs): """ Converts a time-string into a valid :py:class:`~datetime.datetime.DateTime` object. Args: s (str): string to be formatted. ``**kwargs`` is passed directly to :func:`.dateutil_parser`. ...
2018/03/06
948
2,939
<issue_start>username_0: ``` def outcome(p1, p2): x = '' if p1 == p2: x = 0 return x elif p1 == "rock" and p2 == "scissors" or p1 == "scissors" and p2 == "paper" or p1 == "paper" and p2 == "rock": x = 1 return x elif p2 == "rock" and p1 == "scissors" or p2 == "scissors" a...
2018/03/06
704
2,303
<issue_start>username_0: I'm having a problem here with this code: ``` int main(int argc, **argv) { ... char *dirlog ... dirlog = malloc(sizeof(getenv("LOG")+strlen("/logfile.log"))); dirlog = strcat(getenv("LOG"),"/logfile.log"); o = strlen(dirlog); ... free(dirlog); } ``` The code compiles but when...
2018/03/06
803
3,001
<issue_start>username_0: The following onload event doesn't fire in IE11 and Microsoft Edge 40: The `onload` does fire if you give the element a valid `rel="stylesheet"`: What is a working fallback solution for `rel="preload"` on Internet Explorer/Edge?<issue_comment>username_1: After some digging I found a solution...
2018/03/06
330
1,164
<issue_start>username_0: Have a similar question to [gradle bootRun works and java -jar does not](https://stackoverflow.com/questions/47446281/gradle-bootrun-works-and-java-jar-does-not) I build my project with `./gradlew bootRun` My project works when I run it with `./gradlew bootRun` but not with `java -jar build/l...
2018/03/06
602
2,146
<issue_start>username_0: I have created a 3d animated model, which I managed to run in threejs. ``` var loader = new THREE.FBXLoader(); loader.load( 'model.fbx', function ( object ) { object.mixer = new THREE.AnimationMixer( object ); mixers.push( object.mixer ); console.log(object.animati...
2018/03/06
405
1,314
<issue_start>username_0: I am currently working on a code to copy the filtered results of column CJ and paste them in column F. When I attempt to paste it is only pasting in the unfiltered areas and is removing the rest of the column's cells. Any idea of the correct code? ``` With ActiveSheet With Intersect(.Rang...
2018/03/06
578
2,447
<issue_start>username_0: I am trying to subscribe to the Notify feature of my Adafruit board in order to get some data. The device successfully connects to my c# application. However when I try to perform this operation: ``` await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacter...
2018/03/06
575
2,278
<issue_start>username_0: I have json data like this code below: ``` { "all": [ { "ModelId": 1, "name": "ghe", "width": 2 }, { "ModelId": 2, "name": "ban", "width": 3 }] } ``` I try to get the `modelId` and convert it to String but it's not working with ...
2018/03/06
2,223
8,673
<issue_start>username_0: I am developing ARM template to deploy an App Service Environment v2 configured with an Internal Load Balancer (ILB ASE). Is there a way to grab the Virtual IP (VIP) address that the Internal Load Balancer gets from the vnet it is attached to as an output? When I look at the properties of the A...
2018/03/06
1,003
3,482
<issue_start>username_0: I suppose this is not something difficult but i wonder if there is any function or any optimal way. Consider that after an image process i have a matrix-image with 0 everywhere and 1 at the contour. Now i want to **find the x y along that contour line** The important is that eg **[ x(2) y...
2018/03/06
1,084
3,473
<issue_start>username_0: I have data which contains user, eventdate and sessions.I want to separate users who had atleast 3 sessions and came back for new session within 3 days. ``` user eventdate session A 2018-02-05 1 A 2018-02-05 2 A 2018-02-06 3 A 2018-02-10 4 `...
2018/03/06
426
1,484
<issue_start>username_0: My code only works with *jQuery 1.7* but my site is now using *1.9.2*. I've tried the migrate plugin but didn't worked out. The idea is to auto focus one of the fields I have on my page on key press ONLY when no other is focused. ```js $('body').on('keydown', function() { if ($(':focus:n...
2018/03/06
443
1,546
<issue_start>username_0: I have ng-model to my input field like below. ``` {{FirstName}} ``` Now in my controller `console.log $scope.FirstName` is the correct values I give in my view. But when I try to load the `$scope` into a **JSON** like structure I get undefined. ``` myApp.controller('GlobalCtrl', functio...
2018/03/06
866
1,744
<issue_start>username_0: someone can help me, I need to exclude some repeated values, the result is: [![this is my result](https://i.stack.imgur.com/VOk19.jpg)](https://i.stack.imgur.com/VOk19.jpg) There are some rows with null values and in that case I named 'No Informado'. In line from 26 to 32 there is the same v...
2018/03/06
1,151
4,424
<issue_start>username_0: As twig renders prior to any javascript, I'm running into what feels like a minor problem. I need to set a variable in twig that I receive from JSON array, but I'm running into some problems, and I feel like this should be simple. The data is fed to twig through symfony through a json array, ...
2018/03/06
535
2,341
<issue_start>username_0: I'm trying to use a `ValueTransformer` (né `NSValueTransformer`) in Swift that is being used by the first window that my application opens. Value transformers need to be registered with `ValueTransformer.registerValueTransformer(_:forName:)` before they can be queried by the user interface runt...
2018/03/06
443
1,458
<issue_start>username_0: I am working on a small calendar application and practicing MySQL queries for finding available time slots based on the answer provided by flaschenpost > > [mysql show time slots avaliable and time slots busy from table](https://stackoverflow.com/questions/16459756/mysql-show-time-slots-avali...
2018/03/06
2,004
7,895
<issue_start>username_0: I'm trying to redirect using PHP header/even a JavaScript work around call inside php to my clients.php webpage. The problem is that PHP header/the work around loads the webpage flawlessly but the Javascript still isn't ran. Additional notes is that after the header or even Javascript redirec...
2018/03/06
875
2,374
<issue_start>username_0: My data seems to be like this: ```js const myObj = { "incidents": [{ "id": 4, "fullName": "edsadas", "address": "Bagbaguin, Pandi, Bulacan", }, { "id": 5, "fullName": "reasdsa", "address": "Dalig, Balagtas, Bulacan", }, { "id": 6, "fullName": "d...
2018/03/06
474
1,611
<issue_start>username_0: I am trying to get the analytics data from an API using expressjs. The data is in JSON format. The point is that I want to display the result in the view. I am able to get the data in the console, but I am not able to do that in the view. Here is what I have tried so far: app.js ``` var expr...
2018/03/06
519
1,898
<issue_start>username_0: How do I call setState with the previous state plus an additional value in a controlled component? The typical example is: ``` Increment() { this.setState((prevState, props) => ({counter: prevState.counter = props.step}) } ``` However, how do you update the state based on the prevState ...
2018/03/06
1,939
7,460
<issue_start>username_0: This is my first question on stackoverflow, and I am earnestly open to feedback on how/where/when to ask better questions and how to contribute to stackoverflow better. **Background:** My ultimate goal is to graph projected equipment usage by date at various test labs. I have identical eq...
2018/03/06
620
1,559
<issue_start>username_0: Ok, so I am trying for a **long** time to do this program. My question is can i sort a portion/slice of the list using the `sorted` command. Ok for more context the aim of my program is it inputs a list of tuples that are arbitrarily arranged and sorts it first by the second element then by th...
2018/03/06
2,921
10,837
<issue_start>username_0: I've encountered a few errors while working on a round by round script for a game on browser, sorry for my spelling mistakes. I have a function with a while separated in three parts as the following (full JavaScript): ``` function turn(player, monster){ //player and monster are object ...
2018/03/06
573
2,319
<issue_start>username_0: I want to create a Developer Variable to the workspace in Blockly, but I cannot find the necessary function/method. I do not want to create the variable over a button. The variable should be included even if there is no block in the workspace. With these two functions I can get the already ...
2018/03/06
681
2,852
<issue_start>username_0: I'm trying to make a login screen and made a database with Firebase by Google. The way I tried to make accounts in database is just by making a new child which is "Users" and then the next child would be a user (which is uniquely defined with a unique username). Then, user has other attributes ...
2018/03/06
1,010
4,092
<issue_start>username_0: I am endeavoring to update / streamline my code pertaining to Auto Layout vs NSConstraints, however it seems to be baffling me for now. I have some Swift 3 code which slides in a UIView on the tap of a button, however the UIView is controlled with NSconstraints and works fine. - ``` @IBAction...
2018/03/06
5,346
13,142
<issue_start>username_0: EDIT: Reduced the size of the dataset ===================================== A sample data: ``` df <- data.frame(loc.id = rep(1:10, each = 80*36), year = rep(rep(1980:2015, each = 80), times = 10), day = rep(rep(1:80, times = 36),times = 10), rain = runi...
2018/03/06
436
1,855
<issue_start>username_0: Hi I'm currently trying to load several network images and they often fail to load on android. I'm trying to use onError to diagnose why but can't seem to get it to work. I've tried using it as ``` onError={(e) => console.log(e} ``` and ``` onError(error){ console.log(error) } onError=...
2018/03/06
412
1,812
<issue_start>username_0: Im downloading project from start.spring.io with Maven Java 2.0.0 with Web,JPA,Vaadin. Opening it in Intellij with Java SDK 9, pressing run, and having this error ``` Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-03-06 1...
2018/03/06
317
1,183
<issue_start>username_0: I am trying to insert in my database the data contained in a .csv file. I am using XAMP. I dont know where I have to locate or configure the path in order to make MySQL find the file.<issue_comment>username_1: Go to localhost/phpmyadmin create a database and select that database you will find "...
2018/03/06
1,970
5,459
<issue_start>username_0: I have code written in HTML, CSS and JS for a Three.js scene showing a 3D headmodel and marks on it. It works on my Angular project. I was also able to get it to work in my Xamarin Forms project for both Android and iOS by just adding the HTML code into a webview. However, when I try to do t...
2018/03/06
490
1,826
<issue_start>username_0: I am facing a strange behavior with nested [generators](https://docs.python.org/3/glossary.html#term-generator). ``` def empty_generator(): for i in []: yield def gen(): next(empty_generator()) print("This is not printed, why?") yield list(gen()) # No Error next(emp...
2018/03/06
1,686
5,103
<issue_start>username_0: I have a function that I have create to display fruits and vegetables. The function is supposed to return several elements simultaneously, but I keep kitting a snag trying to return values. My code is: Can anyone see the error in my function? ```js function fetchDetails() { var x = documen...
2018/03/06
2,481
7,689
<issue_start>username_0: I have found this pen on codepen. I would like to use this effect, but in a grayscale. Could anyone help me? Thanks in advance! ```js // Create a HTML div Element called 'page' var page = document.createElement('DIV'); // Gives the page variable full height page.style.height = '100vh'; /...
2018/03/06
746
2,375
<issue_start>username_0: I'm working through this book <http://nand2tetris.org/book.php> that teaches fundamental concepts of CS and I got stuck where I'm asked to code an AND chip and test it in provided testing software. This is what I've got so far: ``` /** * And gate: * out = 1 if (a == 1 and b == 1) * ...
2018/03/06
877
2,404
<issue_start>username_0: Are there any impacts or repercussions if the dos2unix command is run on Java source files, right before they are compiled? The Java files would be downloaded from a CVS repository in Linux and then compiled to a jar by an Ant script. Thanks.<issue_comment>username_1: No. All it does is deal wi...
2018/03/06
1,564
4,770
<issue_start>username_0: I am working on an assignment for one of my classes, and I need help with the following: Using Javascript, I must create divs for every book (50 total, example of one below) in a JSON object, and place the image, title, and description of each book inside the newly created divs. Here is the e...
2018/03/06
748
2,549
<issue_start>username_0: The Google Maps idle event is supposed to fire "when the map becomes idle after panning or zooming." ([Google Maps JavaScript API V3 Reference](https://developers.google.com/maps/documentation/javascript/reference/3/#Map), [Events example page](https://developers.google.com/maps/documentation/j...
2018/03/06
923
3,308
<issue_start>username_0: I wrote the following code in c# and after a lot of tries I still face the same error in the commented line > > error message: "method name expected" > > > so please can you tell me the appropriate way to send the "tmp" variable for my LoadSpeceficSontrol function. any help is appreciate...
2018/03/06
557
2,055
<issue_start>username_0: I am trying to understand getArgs but I am getting a weird behavior that I am not understanding. Here is my program: ``` getMyArgs :: IO [String] getMyArgs =do x <- getArgs return x ``` I run this and get: ``` *Main> hello <- getMyArgs *Main> ``` Why doesn't it return m...