date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/04
1,076
3,574
<issue_start>username_0: I am currently using several differences forms on a single view. I am able to fill my forms but when I submit one of them, it seems that my form is invalid. I displayed the request.POST (it contains all my information) and my form (it contains my information except files parts.) Could you expl...
2018/03/04
366
934
<issue_start>username_0: I have an element with some `background-color`. When I use `element.style.backgroundColor` then I get the string like `rgb(221, 110, 43)`. How I can get, for example, **blue** value of the color (i.e. 43)?<issue_comment>username_1: You can use this regex to parse the RGB Color values. ```js v...
2018/03/04
610
2,112
<issue_start>username_0: I have a PNG. I want to trim it down to the smallest possible image while keeping the canvas square. For example, I have this non-square image with a transparent background: [![enter image description here](https://i.stack.imgur.com/zlSkM.png)](https://i.stack.imgur.com/zlSkM.png) If I run `...
2018/03/04
724
2,241
<issue_start>username_0: In the constructor of my component I've got this code: ``` AsyncStorage.getItem("@FitydeStore:weights", (err,result)=> { this.state.weightsList = result; }).then(() => { this.setState({refreshing: false}); }); ``` in console.log I've got this: ``` {"key":"Mar 4th 18","weight":"88"} `...
2018/03/04
668
2,248
<issue_start>username_0: I know that if I use `anyList = []*10` it will create a list with 10 slots, but I want to create a list with `x` slots, `x` being a number that the user created. For example: ``` anylist = [] num = int(input()) ``` If the user enters 4, I want the list `anyList` to have 4 empty slots.<issu...
2018/03/04
663
2,013
<issue_start>username_0: I'm getting this PHP error in my custom breadcrumb function: > > Warning: sprintf(): Too few arguments in /srv/bindings/56058a57d7424f84adac37ba6b03d3b7/code/wp-content/themes/inspire-spine/functions.php on line 151 > > > Here is the code: ``` if ( is_page() && $parent_id ) { if ($p...
2018/03/04
563
1,832
<issue_start>username_0: I got an issue in javascript loops. I am creating a chrome extension and even i have implement it. first i wanted to run a loop in having gap I did that but now i have an another issue and it drives me crazy. I have some Classes And I want to tell my loops that if a class has style in code th...
2018/03/04
691
2,968
<issue_start>username_0: So I am trying to make a singleton object by using a private constructor and private static final new singleton class object in the field. But I am confused as to what the methods will be. Will all methods needs to be static too? will all fields need to be static also?<issue_comment>username_1...
2018/03/04
710
1,855
<issue_start>username_0: I have got problem with assigning colnames to cell values under condition. I want to assign colname to cell value when it's equal 4. My data: ``` DT <- data.table(mtcars[1:5, -c(1:8)]) ``` My desired result: ``` DT2 = data.table(am = rep(NA, 5), gear = c("gear", "gear", "gear", NA, NA), c...
2018/03/04
980
2,549
<issue_start>username_0: How can I remove all the empty rows from my printed text using BS and Python? I'm still new, I think what I'm talking about maybe called whitespace? Current output: ``` 02:00 - 05:00 NHL: Columbus Blue Jackets at San Jose Sharks - Channel 60 02:30 - 04:30 NCAAB: Quinnipiac vs Fairfield ...
2018/03/04
2,549
9,660
<issue_start>username_0: I am using TinyMCE editor in angular my angular 5 project, and want to handle image uploads, which I am currently not able to do. Here is my current code: ``` ``` I am following this code sample <https://codepen.io/nirajmchauhan/pen/EjQLpV> , to handle image uploads. I don't understand, how ...
2018/03/04
342
1,218
<issue_start>username_0: Well, I want to deploy the [react-boilerplate](https://github.com/react-boilerplate/react-boilerplate) project to my digital ocean vps server. Command `npm run start:production` runs the application by address `http://XXX.XXX.XXX.XXX:3000/`. I'm going to run the server without port like `http:...
2018/03/04
1,020
3,848
<issue_start>username_0: Im trying to add a shadow to a button but the shadow gets added to the text of the button instead of the whole button: [![enter image description here](https://i.stack.imgur.com/Msg07.png)](https://i.stack.imgur.com/Msg07.png) Do I need to use code to achieve this? Or is it a sizing issue? I ...
2018/03/04
156
665
<issue_start>username_0: This question is clearly for example codes. Many times, when showing `std::stringstream` examples I think if I need to explicitly add `#include` .<issue_comment>username_1: The header might or might not include the header. Ultimately it is implementation dependent. You should **explicitly** i...
2018/03/04
1,349
3,441
<issue_start>username_0: I have the following table: ``` Code | Column -----+----------------------------- 152 | 12_25_62_26_65_22_88 247 | 55_56_85_52_11_45_63 369 | 45_65_25_89_52_54_96 ``` How can I write a `SELECT` query that obtains a result like this?: ``` Code | Col1 | Col2 | Col3...
2018/03/04
1,106
4,015
<issue_start>username_0: I am developing an android app that shows parks around the world and I got stack with the next problem: In my app I want the user to pick a place on the map that the new park that he is creating will be at this point, and I want other people to be able to see his park no matter from where they...
2018/03/04
728
2,491
<issue_start>username_0: I want to generate 100 million integer numbers but the code below can just generate 100 thousand numbers if I go above this number I get a stop working error. ``` #include #include #include using namespace std; int main() { const int n = 100000; int numbers[n] = {0}; srand(time(NULL)); ...
2018/03/04
883
3,169
<issue_start>username_0: I have a `Teacher` and a `Controller` class which has a list of `Teacher`s. ``` static public List teachers = new List(); ``` I have an insert form, where I should enter new teacher's data and add it in combobox. Combobox located in another form which name is `Add_New_Group`. How can I add n...
2018/03/04
608
2,092
<issue_start>username_0: my HTML is: ``` This is a test ``` My JavaScript is: ``` function change_color() { if (test_text.style.color = 'black') { test_text.style.color = 'blue'; } else { test_text.style.color = 'yellow'; } } var test_text = document.getElementById("demo"); test_te...
2018/03/04
1,976
4,414
<issue_start>username_0: I am trying to read the following input and assign the matrix from the input to a char matrix. The problem is, when I output the matrix, it outputs the character in a strange manner. What am I doing wrong? Input: ``` 10 10 PPPPPPPPPP PXXXXTPXXP PXPPPPXXXP PXXXPJPPXP PPPXPXXXXP CXXXXXPXPP PXPX...
2018/03/04
1,571
4,692
<issue_start>username_0: I'm trying out react native and `eject`ed into a full build environment. Sadly, the eject-script did not create a sensible `.gitignore` file. Not knowing a lot about app-development, I wonder what directories I could `.gitignore` here? I'm guessing: * `android/build` * `android/app/build` * ...
2018/03/04
278
1,015
<issue_start>username_0: I'm traying to retrieve the selected option from the HTML view with AngularJS, but I do not find the way since all the solutions I have seen take into account the parameter "value", but I do not have it here because I do not know the content of the option list beforehand. Here is the HTML code...
2018/03/04
929
3,320
<issue_start>username_0: I am trying to overide Djoser User registration serializer to add a custom field to user model. Following is my models.py ``` from django.db import models class User(models.Model): email = models.CharField(max_length=100, blank=False) first_name = models.CharField(max_length=100, blan...
2018/03/04
601
1,569
<issue_start>username_0: How to effectively select pandas dataframe columns which have only 1 unique value? I'm aware of DataFrame and Series.nunique()<issue_comment>username_1: I think need [`DataFrame.nunique`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.nunique.html) for boolean mask and ...
2018/03/04
1,140
5,133
<issue_start>username_0: I'm trying to create a logic in Django which checks if User had already provided certain information. If not then it creates new object and save in the databse. And information was already there then it updates the same object with the new information. I'm making some mistake because it is able...
2018/03/04
1,065
4,494
<issue_start>username_0: I am programming in c and for a homework assignment I am creating a battleship game. I have created a struct for the board (opponent board and my board), but I need a 2D array for the board. This is what I have so far ``` struct Board { char board[10][10]; int carrierHits; ...
2018/03/04
978
4,193
<issue_start>username_0: I am aware of the [answer](https://stackoverflow.com/questions/14385231/android-broadcastreceiver-auto-run-service-after-reboot-of-device) here. The solution is to use a broadcast receiver and starting a service inside of it, then registering it in the manifest. The problem is that I am coding ...
2018/03/04
865
3,567
<issue_start>username_0: Imagine you have an architecture with one producer (**P1**) and many consumers (**C1-C2-C3**). When a small java client produces messages as **M1, M2, M3** in order and another java clients (3x scaled to another machines) gets a message then writes the message to database table after calculatin...
2018/03/04
476
1,803
<issue_start>username_0: I am upgrading a modal from Bootstrap 3 to 4. I have some code which will update the options (specifically the backdrop and keyboard options) of an open modal. In Bootstrap 3 I had accomplished this by running: ``` $('.modal').data('bs.modal').options.backdrop = newBackdropValue; $('.modal').d...
2018/03/04
1,040
4,035
<issue_start>username_0: I'm trying to understand generics in Java. I'm working in Android studio. I have a `Word` class and I have an `ArrayList` of `Word` objects. ``` ArrayList words = new ArrayList<>(); ``` I tried to make a generic class like this ``` public class wordAdapter extends ArrayAdapter { public wo...
2018/03/04
833
2,369
<issue_start>username_0: I am new with Octave and I have a problem.I thought the following codes were the same, but they produces different results. What is the difference? Thanks Octave/Matlab: Difference between e^(-1\*z) and exp(-1\*z) g = 1./(1 + e^(-1\*z)); g = 1./(1 + exp(-1\*z)); Where z is a vector, element...
2018/03/04
875
2,806
<issue_start>username_0: I am calling an api through the following code, ``` System.out.println("its running"); String realTimeData = "https://api.coindesk.com/v1/bpi/currentprice.json"; HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection(); conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Macintosh...
2018/03/04
637
2,474
<issue_start>username_0: I have a use case like this: eventListReducer: will get a list of events based on date range eventDetailReducer: will get the event details based on one event id I know how to do the two above, my question: When my page loads initially, I will get a list of events based on default date range...
2018/03/04
313
1,168
<issue_start>username_0: Even this simple one doesn't seem to work and I have no earthly idea why. I'm trying to remove that class, but it doesn't really matter, because whatever I'm trying to do it's not working. I would like to know why. Here's my css: ``` ``` Here's my JavaScript: ``` functio...
2018/03/04
534
1,731
<issue_start>username_0: I am working on a project where I filter column CI for "No" and "N/A", and if there are any results I want to copy the data in A:CD from the corresponding rows. How can I select the data in A:CD? I am working with 50,000+ rows of data so any offset loops would slow down the program too much. Th...
2018/03/04
4,802
15,287
<issue_start>username_0: I have a really strange issue with some HTML I've been working with. I have two div that are each independent from each other. Although they both use the same CSS, each div has its own data inside it. I tried to create a "show more" button for each div, where clicking the button expands the div...
2018/03/04
1,953
7,499
<issue_start>username_0: I tried writing macros wherein rows are hidden based on a cell value (which is a Data Validation dropdown): ![Example Data](https://i.stack.imgur.com/qdrwr.png) Using the following code: ``` Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("C15") Then BeginR...
2018/03/04
10,883
25,314
<issue_start>username_0: We have submitted two apps recently (one new app, and one which was an update of an already published app) and got the two rejected by the iOS app review team for the following reason: > > Guideline 2.1 - Performance > Your app crashed on iPad or iPhone running iOS 11.2.5 connected to an IPv6...
2018/03/04
1,008
3,204
<issue_start>username_0: I have researched for an hour now on how to do add the zeros whenever hours, minutes or seconds are less 10, to make them, for example, "05 hours", and not just "5 hours". I have tried `if (hours < 10) { hours = "0" + hours }` and I've seen it work in a couple of websites, but it doesn't seem ...
2018/03/04
1,126
4,271
<issue_start>username_0: How would you pass info from Flutter back to Android/Native code if needed to interact with a specific API / hardware component? Are there any Event Channels that can send info the other way or something similar to a callback? 1. The [platform\_channel](https://flutter.io/platform-channels/)...
2018/03/04
582
1,940
<issue_start>username_0: I've no idea how to define two field as one field using mutator in query builder here's my code ``` $model = LoanInformation::select( 'basic_information.first_name', 'basic_information.last_name', 'loan_information.id', 'loan_information.tenor' )->join( 'basic_information', 'loan...
2018/03/04
483
1,457
<issue_start>username_0: I have a dataframe as below. ``` df = pd.DataFrame({'Title': ['x','y','z','aa'], 'Result': [2, 5, 11, 16]}) ``` I want to return a text string only including those which are more than 10. example of the result i want is below ``` From the results in df, the below returned greater than 10:...
2018/03/04
523
1,961
<issue_start>username_0: cartController in AngularJS: ``` angular.module('demo', []) .controller('Hello', function($scope, $http) { $scope.refreshCart = function() { $http.get('http://localhost:8080/rest/cart') .success(function(response) { $scope.items = response.data; }); }; $...
2018/03/04
316
1,252
<issue_start>username_0: I have the following javac task in Ant. My system environment Java version is Java 8. ``` ``` In the Java source code I use a method that requires Java 8. If I set the Java version in my system environment to Java 7, then Ant throws an error and will not compile the code. Why does it compil...
2018/03/04
723
2,933
<issue_start>username_0: Community. I've read all the posts on SQL injection even the Master one with 4K reputation, still can't grasp the concept . I tried to implement solution yet my application crashes. Please help. Below id my original code and ``` function getStudent($tname,$em) {// Init values to "" $first...
2018/03/04
453
1,364
<issue_start>username_0: Hey can you help me with my simple sql query ? **Tables** Hotel ``` id | name | country | rating 1 Bali bg 4.5 2 Beach uk 4.0 3 Blue sk 3.7 ``` Tour ``` id | id_hotel | price 1 2 250 2 2 270 3 1 250 4 1 3...
2018/03/04
533
1,665
<issue_start>username_0: So, i have this bootstrap button: ``` Some text ``` and I want to make the button text ("Some text") to have this gradient: ``` linear-gradient(to bottom right, #67b26f, #4ca2cd); ``` I tried to set the color property to add gradient using CSS, but not working. Is there a way using CSS...
2018/03/04
2,026
8,189
<issue_start>username_0: Displaying a `PDFDocument` in a `PDFView` allows the user to select parts of the document and perform actions e.g. "copy" with the selection. How can selection be disabled in a PDFView while preserving the possibility for the user to zoom in and out and scroll in the PDF? `PDFView` itself does...
2018/03/04
388
1,620
<issue_start>username_0: I'm trying to write a barebones Vulkan app on Android. I'm finding that most of Google's example apps rely on `vulkan_wrapper.h` and `vulkan_wrapper.cpp`. Google's [Vulkan documentation](https://developer.android.com/ndk/guides/graphics/getting-started.html#using) also says to use them. I woul...
2018/03/04
946
3,531
<issue_start>username_0: Here's what I want to to, below. Basically, I want to use mat-icon in angular/material to access material icons, and dynamically size them using the ngStyle directive (or a better solution if available). I need the dynamic sizing (I think) because what I need to do is to set a circular 2px bord...
2018/03/04
644
1,991
<issue_start>username_0: I need to trigger a sales order when an asset touches the top row. I need to trigger a purchase order when the asset touches the bottom line. Looking at the chart I know the right moment to fire these orders, but in the programming that I wrapped, I do not know what criteria to use to know if ...
2018/03/04
522
1,689
<issue_start>username_0: I have two related tables `Ticket` and `Status`. Every ticket can be multiple status. (Open, assigned, closed). But I want all tickets but only one status (newest date) to show. I could handle with this query on t-sql; ``` SELECT d.ticketID, statusName, c.statusDate, c.assignedTo,c.statusID ...
2018/03/04
1,075
4,232
<issue_start>username_0: I have a [one page application](https://d29o1kaag89e5d.cloudfront.net/) that I wrote using mostly vanilla js. Because is an one page application, when a user reload the page it start from the beginning, so I'm wondering if there is a way to use session storage to save user position in the page....
2018/03/04
713
2,646
<issue_start>username_0: This codes get Json data from API of exchanges, Everything goes well but I couldnt handle one thing This part of my codes is get symbols to colums, but I want them to rows ```js var url= "https://poloniex.com/public?command=returnOrderBook&currencyPair=all&depth=1"; var responseAPI = UrlFet...
2018/03/04
1,465
4,873
<issue_start>username_0: I'm building a code to fix keyboard layout situation on windows 10. With automated solution, I decided to use powershell. But the problem is that I'm pretty new in it and face certain problems. I managed to dig a script to change keyboard layouts, however it changes only to one language. As I t...
2018/03/04
357
1,307
<issue_start>username_0: I'm using angular 5 front end and django as back end. I use JWT token to communicate between django to angular. How can I get logged user details in backend using token. EG: ``` class PostSerializer(ModelSerializer): class Meta: model = PostDetail fields = [ 'title', 'upvote', ] ``` Here up...
2018/03/04
971
2,574
<issue_start>username_0: What is difference between pd.merge(staff\_df, student\_df, how='left', left\_index=True, right\_index=True) and pd.merge(staff\_df, student\_df, how='left', left\_on='Name', right\_on='Name')<issue_comment>username_1: First merge by indexes in both `DataFrames` by left join: ``` pd.merge(s...
2018/03/04
907
2,709
<issue_start>username_0: I want to take a string where there are characters that may be repeated and split the string into units of each character. So for example ``` aaaabbbabbbaaaacccbbbbbbbbaaa ``` would become ``` [ aaaa, bbb, a, bbb, aaaa, ccc, bbbbbbbb, aaa ] ```<issue_comment>username_1: A succinct way is ...
2018/03/04
2,572
8,176
<issue_start>username_0: ``` testVar = { "date": 1520053431, "location": { "lat": 39.349887, "lng": -82.116147 }, "items": [ { "macAddress": "98:90:96:9C:94:6C", "manufacturer": "intel" }, { "macAddress": "98:90:96:9C:94:52", "manufacturer": "intel" }, { "macAddress...
2018/03/04
1,394
4,854
<issue_start>username_0: I have a case statement in Cognos report studio in which if the date is 1st of the current month of previous year then it should fetch data for last whole month (1 to the last date) data of the previous year. I think it is a syntax error. Below is the code that I'm sharing.Thanks in advance! Pl...
2018/03/04
686
1,557
<issue_start>username_0: I want to split string to few cells, the str split value was alt+enter and I tried strsplit function but it doesn't work. My code: ``` library(readxl) hobiesTable <- read_xlsx("hobies.xlsx") print(hobiesTable$hobies) a <- strsplit(hobiesTable$hobies,'\r\n') print(a) ``` My table: ``` st...
2018/03/04
2,440
6,122
<issue_start>username_0: This is a modified binary search that returns the closest element from a sorted array list to the value given. How can I tweak it so that it can return the 2 closest previous and 2 closest next elements? ``` private static Long search(long value, ArrayList a) { if(value < a.get(0)) { return...
2018/03/04
773
3,161
<issue_start>username_0: I have a Kafka topic and a consumer with a consumer group assigned (a must) in a Spring Cloud application. As a requirement, in every application restart I need to start reading all received messages from the beginning. This was supposed to be achieved by the `resetOffsets` property, but it is ...
2018/03/04
1,393
6,210
<issue_start>username_0: I'm trying to connect to my Jira via the atlassian rest api java framework: ```java JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); JiraRestClient client = factory.createWithBasicHttpAuthentication(uri, userName, password); ``` But this causes a errors: `javax.net.s...
2018/03/04
270
887
<issue_start>username_0: ``` if [[ $1 =~ ^\'*\"*[\d+\w+]+\'*\"*$ ]] then echo true else echo error exit 1 fi ``` This regex seems to be correct (verified with <https://regexr.com>, and other regex sites), however, the script will evaluate to false. Any idea why? For this argument, I ...
2018/03/04
1,414
4,340
<issue_start>username_0: I am having problems to execute an older version of docker in a CentOS 7 VM. I installed docker `Docker version 17.09.1-ce` because its the version that I need, I need to run some software over it and the latest version `Docker version 17.12.1-ce` is not compatible with that, so I need to insta...
2018/03/04
765
2,250
<issue_start>username_0: I want to connect to an external database in Wordpress for a custom script. But when I run the script it stops after The connection is good it is tested by the plugin Ari Adminer. This plugin also vallidates the excistence of the tables and fields. Wordpressversion = 4.9.4 This is part of t...
2018/03/04
308
1,159
<issue_start>username_0: I want to run app with ionic view app in my real device I tried in the first time ``` ionic link ``` after ``` ionic upload ``` when i run the last command i get this error ![error](https://i.stack.imgur.com/krEyz.png) can anyone help me please ? and thanks in advance<issue_comment...
2018/03/04
2,493
9,567
<issue_start>username_0: Is it possible to tell if there was an exception once you're in the `finally` clause? Something like: ``` try: funky code finally: if ???: print('the funky code raised') ``` I'm looking to make something like this more DRY: ``` try: funky code except HandleThis: # ha...
2018/03/04
939
3,889
<issue_start>username_0: I require a properties bean to be validated at start up time and for the application to fail to start should validation fail. I have a bean which contains configuration provided by environment variables: ``` @Component public class AdminConfig { @NotNull( message = "username can't be null...
2018/03/04
247
874
<issue_start>username_0: Am I typing something in wrong for the background image not to be working? All the folders and files are in the correct spot for it to work. ``` First Project marvelous day ============= ``` --- ``` h1 { color: blue; } body { background-image: url("img/pattern.png"); } ```...
2018/03/04
534
2,248
<issue_start>username_0: I am creating an app for multiple languages. The language switching works well, except the options menu. I have this in my menu/main.xml: ``` ``` This causes my meni items have always the same titles, even I switch the language, because it takes it from XML. Now I tried it to change progra...
2018/03/04
2,344
4,091
<issue_start>username_0: I have the following (lowest) hexadecimal number: ``` 0000000000000000000000000000000000000000000000000000000000000000 ``` and would like a to increase this number by 1 until the maximum is reached: ``` FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ``` I have so far thi...
2018/03/04
563
1,977
<issue_start>username_0: What is wrong with this statement in my makefile? `folder: @mkdir -vp ".cache/vim/"{backup,swap}` I can run `mkdir -vp ".cache/vim/"{backup,swap}` on the commandline and it does exactly what it is supposed to do, ie. creating two folders, backup and swap. But for the when i run `make folder...
2018/03/04
575
1,954
<issue_start>username_0: I try to use this commands: ``` path <- "C:/Users/cfees/My Box Files/Fitness/" files <- list.files(path=path, pattern="*.csv") ``` I would like to take files which are csv and start with a name "myfile\_" I try this: ``` files <- list.files(path=path, pattern=c("myfile_","*.csv")) ``` bu...
2018/03/04
1,420
4,609
<issue_start>username_0: I would like to use the calculations from high-level (outer) function `high_lvl_fun` in in a low-level (inner) function `low_lvl_fun`. The low-level function is an argument of the high-level one (I would like to use different functions with different sets of arguments). My reproducible example:...
2018/03/04
1,068
3,750
<issue_start>username_0: I'm having some trouble getting JSON response from Microsoft custom vision API (Optical Character Recognition API) when using Android Volley request. I have used this approach with other API's without any problems, but for this API I cant get it to work. ``` String URL = "https://westcent...
2018/03/04
483
1,770
<issue_start>username_0: I have to write a function that validates a password and returns true or false. It is only true if it is 8 characters, contains a number, a upper case letter, and a symbol. This is what I have for my function file. ``` def validatepassword(pswd): for char in pswd: if char in '012...
2018/03/04
1,294
4,220
<issue_start>username_0: I am planning to convert ZonedDateTime to instant as per the below logic. Say, I am in PST timeZone and the current time is 11A.M. If I convert now( no daylight saving as of today March 04 2018) and the toInstant will be 7P.M. For the same 11 A.M, the toInstant will return 6 P.M as of April 0...
2018/03/04
2,075
7,200
<issue_start>username_0: I have tried a number of angular-adal libraries but the renew of the token is not automatic done. This the configuration I used. In package.json ``` "@types/adal": "^1.0.29", "@types/adal-angular": "^1.0.0", "adal-angular": "^1.0.17", ``` adal-angular come with two scripts `adal.js` and `...
2018/03/04
804
2,560
<issue_start>username_0: What i'm trying to achieve is searching value in array if it matches specific variable, then replace it with other variable (which is translation for this word), array value consist number and i need only to translate words without touching the number. Here is an example. ``` var arr = ["18 pa...
2018/03/04
1,643
6,117
<issue_start>username_0: I am using multer diskstorage to save a file to disk. I first save it to the disk and do some operations with the file and then i upload it to remote bucket using another function and lib. Once the upload is finished, i would like to delete it from the disk. ``` var storage = multer.diskStorag...
2018/03/04
1,231
4,497
<issue_start>username_0: I have a function which has 3 parameters. the third parameter's data type is `void*`, and there are two types of data that can be passed through it either `std::string` or `FILE*`. ``` bool MainDialog::readDataFromUrl(const std::string url, const std::string parameter, void *reply) { CURL ...
2018/03/04
835
2,369
<issue_start>username_0: Following simple code: ``` import numpy as np import seaborn as sns dist = np.random.normal(loc=0, scale=1, size=1000) ax = sns.kdeplot(dist, shade=True); ``` Yields the following image: [![enter image description here](https://i.stack.imgur.com/b8kYj.png)](https://i.stack.imgur.com/b8kYj.p...
2018/03/04
825
2,387
<issue_start>username_0: So I've made a to-do list in jQuery, whereby the 'to-do' div is an empty ul and appends list-items upon the 'add task' click event. I'd like to show a message in the 'to-do' ul when there are no items (such as "you have no tasks"). My attempt looks something like this and doesn't work: ``` if ...
2018/03/04
1,082
3,262
<issue_start>username_0: Ok so I have looked around and seen similar questions and have tried a few different things. Here is what I am trying to accomplish. I have a list of variables with float values already assigned to them. I want to be able to ask the user to chose a variable from list and add float values to exi...
2018/03/04
324
953
<issue_start>username_0: I have the following code: ``` import cats._ import cats.Functor object StudyIt { def main(args: Array[String]): Unit = { val one: Int = 1 val a = Functor[Id].map(one)(_ + 1) println(a) } } ``` As you can see, `map` expects the type of `Id[Int]` but I just past `Int` to `...
2018/03/04
644
1,912
<issue_start>username_0: I am trying to use a list to create a pandas dataframe but the list I have is not the way it is normally required to setup a pandas dataframe. I can provide an example below to show what I would be talking about. ``` listA <- ['Type', 'Style', 'Size', 'Lot Size', 'Age', 'Taxes'] listB <- ['...
2018/03/04
2,748
9,543
<issue_start>username_0: I'm trying to use `Kotlin` with the `DataBinding` but I'm stuck with this error: ``` Error:[kapt] An exception occurred: java.lang.annotation.IncompleteAnnotationException: android.databinding.BindingBuildInfo missing element enableDebugLogs at sun.reflect.annotation.AnnotationInvocationHa...
2018/03/04
670
2,027
<issue_start>username_0: I'm attempting to use Java's (Processing) enhanced for-loop in my game, however it seems I'm unable to call other classes in the the other loops. Any ideas on how to solve this? ``` void setup() { size(1000, 1000); rLife = new ArrayList(); for (int i = 0; i < rLife.size(); i++) { rLife...
2018/03/04
1,539
4,814
<issue_start>username_0: I am trying to pass arguments to an outer function that then relays them to one or more inner functions. The closest I've come to achieving this: ``` def multiply(number, factor=1): return number*factor def add(number, to_add=0): return number+to_add def multiply_add(number, *args): ...
2018/03/04
913
2,865
<issue_start>username_0: I am trying to write a small program in C but I am stuck trying to increment an `int`. ``` #include #include char \* compress(char \*input, int size){ char \*inputCopy; char compressedString[100]; snprintf(inputCopy, size, "%s", input); int i = 0; int counter; int j; while(i < siz...
2018/03/04
718
2,964
<issue_start>username_0: I'm at the start of writing a countdown timer for a football match. The code below increments 1 second at a time to 30mins. How can I count down instead of counting up; ``` //Countdown clock button Button counterBtn = (Button) view.findViewById(R.id.matchCountDownBtn); counterBtn.setOn...
2018/03/04
815
3,159
<issue_start>username_0: In my mySQL table I have two columns "Time A" (**DateTime**) and "Time B" (**TimeStamp**) and each row of the represents a different user. I would like to get the difference between Time A and B for all users in the table. Would it be better to do most of it in PHP (what the majority of the pr...
2018/03/04
799
3,207
<issue_start>username_0: Xcode 9.2, Swift 4. For a cell in a Collection View Controller, I created a subclass named CollectionViewController. I linked the cell to this subclass. I created a Label in the cell on the Main.storyboard and linked it to the subclass like this : ``` class CollectionViewCell: UICollectionView...
2018/03/04
1,751
6,405
<issue_start>username_0: I built a small web application (www.suntax.de) with vuejs and hosted on Google Firebase. I use the Firebase Hosting, Database and Functions. I use Functions to do some calculation on the backend. Everything is running now, but I had some trouble getting there and some things I would like to i...
2018/03/04
545
1,955
<issue_start>username_0: I am trying to navigate to a new page `newData[index]["title"]` when tap on listTile, how can I access newData, index and data variables out of this scope, I know I have to declare them in global scope but I tried this.index, but it doesn't work, I created a \_onTap() method but I don't have ac...
2018/03/04
1,133
3,779
<issue_start>username_0: The setup --------- If I have a program like this A header file that declares my main library function, `primary()` and defines a short simple helper function, `helper()`. ``` /* primary_header.h */ #ifndef _PRIMARY_HEADER_H #define _PRIMARY_HEADER_H #include /\* Forward declare the prim...
2018/03/04
660
2,043
<issue_start>username_0: I am attempting to learn how to assign memory in C++. I followed this answer to allocating 2-D arrays: [Copy 2D array using memcpy?](https://stackoverflow.com/questions/29375797/copy-2d-array-using-memcpy/29375830#29375830) However, when I attempt to combine this and copying memory using `std:...
2018/03/04
1,243
5,199
<issue_start>username_0: I'm curious about abstract factory pattern. From Java 8 we have default methods, does it mean that we can replace our abstract classes to interfaces? The one downside which I can see it's a case when we need non-static / final field. We can't do it interface. Could you give me some examples (ex...