date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/05
928
3,115
<issue_start>username_0: Have Two Django Apps. **Work** and **Blog** The Blog App template folder has the **index.html** Here is the **view.py** from **work** ``` from django.shortcuts import render from . import models from work.models import Work from blog import views # Create your views here. def work_(request...
2018/03/05
348
1,219
<issue_start>username_0: I created a menu to wordpress dashboard ``` add_menu_page( __('locations'), __('Locations'), 'manage_options', 'manage-locationss', 'locations_page'); function locations_page() { require_once(locations.php); } ``` I want to add a style sheet to this page only , Is there is a function t...
2018/03/05
932
3,649
<issue_start>username_0: I want to find out the similar clinical terms in two list with abundant spelling errors. Now I am using SequenceMatcher to find it as most similar. Example: ``` from difflib import SequenceMatcher def similar(a, b): return round(SequenceMatcher(None, a, b).ratio()*100, 1) print similar('h...
2018/03/05
775
3,014
<issue_start>username_0: I'm trying to transform the following XML file, to remove each node if followed by a node. ``` xml version="1.0" encoding="UTF-8"? ``` With the following xslt transformation, I was able to remove only the first occurrence of the node: ``` xml version="1.0" encoding="UTF-8"? ...
2018/03/05
5,751
9,953
<issue_start>username_0: I have a dataset of dates and maintenance qualifications. I need to get the time since last maintenance touch. I read about the `shift()` but my previous rows will be variable. here is a sample dataset. ``` Leg_ID SeqNum MX_IN_Local_Date_Time MX_OUT_Local_Date_Time RON ROD mxTouch mxT...
2018/03/05
1,477
5,515
<issue_start>username_0: I have a working grammar and have implemented a listener (in Java). I can display the parse tree in the console with indentation however what I would like is to export it to a JSON structure so that it can be used in any generic viewer. Is there an already made method that can do this or will ...
2018/03/05
1,596
5,791
<issue_start>username_0: I am working on embedded system application. I want to copy from source to destination, skipping constant number of bytes. For example: `source[6] = {0,1,2,3,4,5}` and I want destination to be {0,2,4} skipping one byte. Unfortunately `memcpy` could not fulfilled my requirement. How can I achiev...
2018/03/05
841
3,030
<issue_start>username_0: Using this, it is possible to take the badges from a specific user of Stack Overflow: ``` library(stackr) badges <- stack_users(9371451, "badges", num_pages=100000, pagesize=100) ``` How can I add a parameter to take also the timestamp that the badge was awarded to the user? And if possible...
2018/03/05
428
1,331
<issue_start>username_0: for example: I have a list and a column i.e, ``` words = ["Processing", "Rocketing", "Rocking", "Rocked", "Processed"] root_word first_word second_word 0 Process Processing Processed 1 Rocket Rocketing Rockets 2 Rock Rocking Rocked ``` now I want to get output...
2018/03/05
1,387
4,760
<issue_start>username_0: I want to alter the contents of a string in a function, for example ``` function appendSeparating(s, s2, separator) { if (s != "") s += separator; s += s2; } ``` I'd like to have s altered on return but as string is a primitive is being passed by value so the modifications do...
2018/03/05
1,017
4,096
<issue_start>username_0: I tried everything and searched about the related topic and nothing works.. Here's my code ``` { byte[] images = null; FileStream fs = new FileStream(imgLocation, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs...
2018/03/05
1,220
4,356
<issue_start>username_0: I am developing an application that relies completely on Socket.io. As we all know NodeJS by default runs only on one core. Now I would like to scale it across multiple cores. I am finding it difficult to make socketio work with PM2 Cluster Mode. Any sample code would help. I am using Artiller...
2018/03/05
563
1,445
<issue_start>username_0: I have an arrays: ``` a = [1, 1, 1, 1] ``` Which should be merged with an array of arrays: ``` b = [[0],[0],[0],[0]] ``` To form a third: ``` c = [[0,1],[0,1],[0,1],[0,1]] ``` One way I have thought would be to run a `.forEach` on `a` and concatenate to each object of `b`. however, I'...
2018/03/05
429
1,227
<issue_start>username_0: ``` def get_letter_grade(score): if score >= 90: return "A" elif score >= 80: return "B" ``` Im expecting the input for "score" to be a number only. To do that would I simply use "score = int" ``` def get_letter_grade(score): score = int if score >= 90: ...
2018/03/05
432
1,342
<issue_start>username_0: I am wanting to split up an application I have into multiple different applications. I want to start with the presentation layer and the logical layer. I want the HTML, CSS and JS all in it's own application but then have the backend code (API) run in it's own application. I don't understand is...
2018/03/05
908
2,483
<issue_start>username_0: I have a data.frame where each row is a group of people, between 2 and 8. From this I want to create a graph showing all people as vertices and the edges showing that these two people occured in one row in my original data.frame. The graph is not a problem, just the creation of the edgelist. My...
2018/03/05
443
1,571
<issue_start>username_0: I am trying to remove all kinds of special symbols from each word in the given string `sen` but I'm not able to figure a method in python to properly achieve it. ``` import string def LongestWord(sen): maxlen = 0 count = 0 words = sen.split() for word in words: ''.joi...
2018/03/05
1,164
2,815
<issue_start>username_0: I have calculated this hc index for every 24 values of a 24x24 square matrix (a). It returns a vector (hc) with 24 values. ``` hc<-vector("numeric",24L) for (i in 1:24) { hc[i]<- -sum((c(a[,i])/colSums(a)[i])*log((c(a[,i])/colSums(a)[i]), base = 2)) } ``` I want to calculate this for eac...
2018/03/05
1,071
3,973
<issue_start>username_0: I wonder if there are any legitimate reasons to return unique pointers by reference in C++, i.e. `std::unique_ptr&`? I've never actually seen that trick before, but the new project I've got seems to use this pattern *a lot*. From the first glance, it just effectively breaks / circumvents the "...
2018/03/05
1,308
5,102
<issue_start>username_0: I have a C++ project in which I have the following line: ``` #include ``` I am using the `CURL` library to access IMU data from a sensor. I prepared a `CMakeLists.txt` file that looks like this: ``` cmake_minimum_required(VERSION 3.5.1) project(imu_data_access_cmake_test) set(CMAKE_CXX_STA...
2018/03/05
2,535
10,457
<issue_start>username_0: **Context:** When a user (conference creator) creates a conference he can create a registration form for that conference. So he accesses the page "<http://proj.test/conference/edit/1/questions>" to edit the form to the conference with id 1. In this page he can associate the existing questions...
2018/03/05
2,108
8,072
<issue_start>username_0: On my website I am trying to use media quieres to specify a mobile size, tablet size, and desktop size. Well, when I make edits to the tablet it applies those edits to the whole page instead of just when its sized to a tablet. What can I do to stop this and continue with the responsive design. ...
2018/03/05
1,829
5,721
<issue_start>username_0: I've spent hours trying to figure out why I'm getting the following compiling error: ``` ~/src/example/build $ make -- Downloading GMock / GTest version 1.8.0 from git -- Configuring done -- Generating done -- Build files have been written to: /home/user/src/example/build [ 5%] Performing up...
2018/03/05
685
2,214
<issue_start>username_0: Change colors ------------- I'm trying to use Vue with Nuxt and Vuetify for the styles, on Vuetify exists many templates, one of them brings all. I tried to add colors on /assets/style/app.styl without effect. Also on /plugins/vueitfy.js add something like: ``` Vue.use(Vuetify, { theme:...
2018/03/05
974
3,592
<issue_start>username_0: I have a pandas data frame in which I want to simplify duplicates (on one column, here the first) by adding a 'count' column (here the last column, preset with "1" for the line I am in). My data frame looks like this: ``` df = pandas.DataFrame([["a", ..., 1], # last row always 1 (this will be ...
2018/03/05
730
2,623
<issue_start>username_0: In Puppeteer, we can select an option of a dropdown by providing the value as a parameter: ``` page.select('select#idOfSelect', 'optionValue'); ``` Is there a function to select an option based on its text and not from its value?<issue_comment>username_1: There is no such method in Puppetee...
2018/03/05
1,049
4,265
<issue_start>username_0: The error I'm getting is: ``` The thread 0xffc has exited with code 0 (0x0). Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll Exception thrown: 'System.IO.IOException' in Anjuna1.dll Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll Microsoft.AspNet...
2018/03/05
1,048
4,077
<issue_start>username_0: I'm trying to secure a REST API using JWT tokens. For saving encoded user password I'm trying to use bcrypt for encoding. However when I'm trying to autowire BCryptPasswordEncoder, I'm getting following error : ``` Could not autowire. No beans of BCryptPasswordEncoder type found. Check autowir...
2018/03/05
790
3,179
<issue_start>username_0: I am quite new to Node.js and already frustrated due to nested callbacks which make it very hard to read the code and troubleshoot for typos. As you can see below, I have 2 associated models (Blog and Comment) and app.get method which I create Comment for a Blog post. ``` Model Structure: B...
2018/03/05
530
1,969
<issue_start>username_0: I define a custom tool in Jenkins and I would like to run it during a build. In "<https://wiki.jenkins.io/display/JENKINS/Custom+Tools+Plugin>" I see the following : "Then, you just need to add the tool requirement to your job's Build Environment" but I cannot find such an option anywhere. Whe...
2018/03/05
731
2,955
<issue_start>username_0: I try to aggregate two streams like that ``` val joinedStream = finishResultStream.keyBy(_.searchId) .connect(startResultStream.keyBy(_.searchId)) .process(new SomeCoProcessFunction) ``` and then working on them in `SomeCoProcessFunction` class like that ``` class SomeCoProcessFunction ...
2018/03/05
1,016
3,238
<issue_start>username_0: I thought I solved this problem two years ago but now since a couple of weeks I get harassed by the Google Search Console with "Index Coverage" referring to the /index.php of my homepage (all variants of my website are listed in the Search Console and I have a canonical URL in the head part). A...
2018/03/05
2,096
7,982
<issue_start>username_0: I am trying to modify the code below: ``` public static string ToCsv(this IEnumerable list, List keyIndicators, List inTreatmentCohort) { var type = typeof(T); var props = type.GetProperties(); //Setup expression constants var param = Expression.Parameter(type, "x"); var doublequote = Ex...
2018/03/05
1,306
4,328
<issue_start>username_0: I'm trying to combine two lists into a csv, and have it output a line per each line of a second list. a.csv ``` 1 2 3 ``` b.csv ``` a,x b,y c,z ``` Output: c.csv ``` 1|a|x 2|a|x 3|a|x 1|b|y 2|b|y 3|b|y 1|c|z 2|c|z 3|c|z ``` So for each line of "a" c...
2018/03/05
986
2,896
<issue_start>username_0: I am attempting to get a div, `bar-grow` to be `width: 80%;` of the header above it. Right now, it is taking 80% width of the parent container. I am unsure how I change this so that it is working how I want it. Any suggestions? ```css .header-wrap { border: 1px solid black; } .header { ...
2018/03/05
874
2,776
<issue_start>username_0: I am trying to use google tag manager to have a tag that will fire every time the user submits the form and lands on the thank you page. In this scenario, I know an option is to use the Trigger: Page View, and then specify the thank you page URL in the conditional statement. However, since thi...
2018/03/05
619
2,467
<issue_start>username_0: I am trying to figure out which of the two objects require more memory. By checking this reference now I see a null costs 4 to 8 bytes [Java - Does null variable require space in memory](https://stackoverflow.com/questions/2430655/java-does-null-variable-require-space-in-memory) But no idea h...
2018/03/05
274
1,049
<issue_start>username_0: Working on a site that contains OpenGraph tags. However, when trying to share one of those pages, the Facebook preview isn't populating properly: For example: <https://www.hkinsurance.com/2018/03/noise-reduction-restaurant/> OG Tags: ``` ```<issue_comment>username_1: You need to enter your ...
2018/03/05
291
1,143
<issue_start>username_0: Forgive me if there's already been an answer to this somewhere, but I haven't seen anything definitive in the docs. Is there a limit to the size of the connection pool? I have a situation where there could be 100s or 1000s of connections open at once - should the connection pool be used for th...
2018/03/05
259
1,031
<issue_start>username_0: When loading the page automatically iframe also loading, it must not have to do like that When i click button, then only iframe need to load but in iframe there is url Can you give me example in jsfiddle, please ``` Load ```<issue_comment>username_1: You need to enter your page url and click...
2018/03/05
325
1,333
<issue_start>username_0: I am writing Java code which creates the server resources required by the application. I have done it in Jython and I did it similarly in Java but its not working. I need the Java code to create websphere variable using the ConfigServiceProxy. I tried 1. configService.createConfigData(sessio...
2018/03/05
889
3,091
<issue_start>username_0: Because I dont find puppeteer native function for set a dropdown option as selected based on text and not on value, I am tryiong to write it by myself ``` async function setSelectName(page, selector, valText) { return await page.evaluate((data) => { console.log(JSON.stringify(data));...
2018/03/05
1,599
5,036
<issue_start>username_0: I expect the following program to be completely memory-bound in terms of performance (the arrays are way bigger than the L3-cache). Therefor I expected the sum of the long array to take almost twice as much time as the sum of the int array. But they take both almost the same time: ``` int s...
2018/03/05
973
3,366
<issue_start>username_0: This is my interface: ``` interface MyInterface { a: string b: string } ``` I have `objectA` from this interface: ``` const objectA: MyInterface = { a: val1, b: val2 } ``` I then have a function that reads an API response and creates a mapping as follows: ``` const crea...
2018/03/05
909
3,150
<issue_start>username_0: I was about to write code like this: ``` std::list mylist; // ... std::list::iterator it; for(it = mylist.begin(); it != mylist.end(); ++it) { // ... if(some condition) mylist.erase(it); } ``` But I realized, this code is wrong: `mylist.erase(x)` will invalidate the iterator `it`, so t...
2018/03/05
962
3,470
<issue_start>username_0: I don't quite understand how this works. I guess a large part of it is because I'm used to C and its low-level data structures, and programming at a higher level of abstraction takes some getting used to. Anyway, I was reading *The Ruby Programming Language*, and I came to the section about ran...
2018/03/05
1,041
3,186
<issue_start>username_0: I need to find the sentence from the file, which had the greatest number of characters, but I can't find the index for start the sentences( I know that my problem is in this part ``` (if ((n == '?')||(n == '!')||(n == '.')) { newIndex = index; } ``` But I don't know how to improv...
2018/03/05
1,036
3,819
<issue_start>username_0: I have a "multipliers" table that has a foreign key "push\_id" pointing to records in the "pushes" table. This is a many to one relationship. Some push records don't have multipliers, but others do. What I'm trying to accomplish is a SQL query that selects the latest push record which has mult...
2018/03/05
914
3,140
<issue_start>username_0: when I make `git log --pretty=oneline 2.0.7..2.1 -- wp-includes/functions.php` as an exemple between two tags (releases), I found a number of commits 106 commits realised between them. But it is weird when I see the version1: 2.0.7 released on *2007-01-15 20:51:28 +0000* and the version2: 2.1 r...
2018/03/05
987
2,995
<issue_start>username_0: I have homework to write assembly code for checking if number is odd or even. I have this code ``` code_seg SEGMENT ASSUME cs:code_seg, ds:data_seg; mov ax, 11; test ax, 1; end: jmp end; code_seg ENDS ``` And to check if number is even I look if zero flag is set. I know that th...
2018/03/05
864
2,609
<issue_start>username_0: In blogger or blogspot we can add html or javascript tag from layout then add gadget. How to enable a div on the basis of different countries?<issue_comment>username_1: sadly am not very experienced with assembly, but in pseudocode there is a feature called "mod" which gives the remainder of a ...
2018/03/05
390
1,293
<issue_start>username_0: This may sound like a simple question but I have never used the `||` operator to check for `NULL` with another possible value. Is there a difference in how C# responds to: ``` if (a == "Hello" || a == null) ``` versus: ``` if (a== null || a == "Hello") ```<issue_comment>username_1: > > Is...
2018/03/05
1,009
2,159
<issue_start>username_0: I have a data frame like this: ``` Month Amount 1/31/2014 793 2/28/2014 363 3/31/2014 857 4/30/2014 621 5/31/2014 948 6/30/2014 385 ``` I would like to apply a function (x\*0.5) to the third and sixth rows in this data frame. The results will overwrite the data currently in the...
2018/03/05
1,845
5,754
<issue_start>username_0: ``` public static boolean setupAlarm(String flightName, long columnId, int time,int requestCode, Context context) { AlarmManager alarmManager; FlightTimeObject timeObject = DataCheckingUtils.getConvertedTime(time); try { alarmManager = (AlarmManager) context.getSystemServi...
2018/03/05
1,006
3,664
<issue_start>username_0: I have no idea why this is not working. Seems like such a simple concept. I have some classes being toggled when a button is clicked. These classes just control the display of text `open menu` and `close menu`. That part is working, however, I need to have some additional scripts run when the b...
2018/03/05
882
2,706
<issue_start>username_0: Consider that I have a code that returns a double array. When run, the result returned at the command window a result looks like this: ``` mpc.gen= 1 100 344 34 5 2 433 223 45 2 3 333 432 12 3 4 213 233 12 3 ``` What I want to do is create a MATLAB script which...
2018/03/05
306
1,001
<issue_start>username_0: I'm currently trying to run the systrace tool for analysing my ui performance. I setup my environment as described here: <https://developer.android.com/studio/command-line/systrace.html#syntax> But when I try to run ``` python systrace.py --time=10 -o mynewtrace.html gfx ``` in the Android ...
2018/03/05
836
2,514
<issue_start>username_0: I am writing a code that will encrypt a list of String entered by user. these lists will be encrypted and then it will be decrypted. But once it will reach the part of encryption it gives me this error. > > > > > > Traceback (most recent call last): File "C:/Users/dana/Desktop/q2.py", line...
2018/03/05
2,258
7,873
<issue_start>username_0: I have a program where I am parsing sql scripts in order of the file directory. The idea from the team was that changes or additions to the sql scripts were done in order, and so the folders are named from 0 to 12. So I need to parse through these folders in numerical order, however when they a...
2018/03/05
534
2,069
<issue_start>username_0: I'm diving more into Prototypal Inheritance with JavaScript. When Object.Create() is in use to create objects, can someone show what is going on under the hood? Does Object.Create() depend on new and constructor functions behind the scenes?<issue_comment>username_1: Object.create does not call ...
2018/03/05
239
867
<issue_start>username_0: I am using gridview to show the data and in the gridview itself I have some action buttons like Edit Delete and Preview for picture view. but I don't want the text "Preview" on my preview button, i want (fontawesome icon) instead the text(preview). My code is here.... ``` ``` the code for th...
2018/03/05
235
954
<issue_start>username_0: [CompletableFuture.completedFuture()](https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/CompletableFuture.html#completedFuture-U-) returns a `CompletedFuture` that is already completed with the given value. How do we construct a `CompletableFuture` that is already completed except...
2018/03/05
668
2,327
<issue_start>username_0: I have a big project, I try to refactor to ES6 modules right now. To make further development easier, I wanted to introduce index files, which just export all modules within the directory: **index.js:** ``` export { default as ModuleA } from './moduleA' export { default as ModuleB } from './...
2018/03/05
781
2,597
<issue_start>username_0: I am developing code to generate PDF from HTML code using library MPDF. For HTML Code I am reading from external HTML file. But its not working for larger HTML code size. Is there any way to fix it or do we have any other library which supports my functionality. For larger html file giving err...
2018/03/05
1,377
3,570
<issue_start>username_0: I have a file (file.txt) that contains some text like: * 000000000+000+0+00 * 000000001+000+0+00 * 000000002+000+0+00 and I am trying to check each line to make sure that it follows the format: character\*9, "+", character\*3, "+", etc so far I have: ``` #!/bin/ksh file=file.txt line_number...
2018/03/05
1,411
5,911
<issue_start>username_0: I am reading "Item 6: Eliminate obsolete object references" of Effective Java second edition. Below is the code snippet. ``` //Can you spot the "memory leak"? public class Stack { private Object[] elements; private int size = 0; private static final int DEFAULT_INITIAL_CAPACITY = ...
2018/03/05
342
1,262
<issue_start>username_0: im working on a python/flask website on Azure which connects to a ms sql db. Some requests produce the following error: *D:\home\python361x64\python.exe - The FastCGI process exceeded configured request timeout* I assume that this is a timeout problem but i cant find a way to configure the re...
2018/03/05
364
1,265
<issue_start>username_0: im very new to programming, trying to learn C and cant figure out how to create/use a simple function. Im trying to create a function called stringtest and then call it into the main and simply make the string strA print ABC. ``` void stringtest(char strA[20]) { strA = "ABC"; } int main...
2018/03/05
566
2,332
<issue_start>username_0: I tried the below code to download one file successfully but unable to download all the list of files ``` client.getObject( new GetObjectRequest(bucketName, "TestFolder/TestSubfolder/Psalm/P.txt"), new File("test.txt")) ``` Thanks in advance Update I tried the below code but gett...
2018/03/05
858
2,290
<issue_start>username_0: I have below mentioned dataframe: DF1 ``` T1 ID Type 1 A L 2 B Y 3 C B 4 D U 5 E Z ``` DF2 ``` T1 ID Type 1 A L 2 B Y 3 F K 4 G I 5 H T ``` Now i want to merge `DF1` and `DF2` but every row should be unique in `New_Data` based on `I...
2018/03/05
586
1,511
<issue_start>username_0: I need to apply a function to a subset of columns in a dataframe. consider the following toy example: ``` pdf = pd.DataFrame({'a' : [1, 2, 3], 'b' : [2, 3, 4], 'c' : [5, 6, 7]}) arb_cols = ['a', 'b'] ``` what I want to do is this: ``` [df[c] = df[c].apply(lambda x : 99 if x == 2 else x) for...
2018/03/05
520
2,099
<issue_start>username_0: I want to get the `propertyInfo` by the path that look like this: ``` string path = "window.position.x"; ``` Here an example: ``` PropertyInfo p = typeof(WindowManager).GetProperty(path); ``` the WindowManager has a property called "window", which has a property called "position" which ag...
2018/03/05
590
2,153
<issue_start>username_0: I want to perform a linear search though a[] and append the result to b[]. Here is my code: ``` public class sorting { static int a[]={10,12,14,2,1,3}; static int b[]=new int[a.length]; public static void fn() { for(int i=0;ia[j]){ b[i]=a[j]; } } } } ``` I am getting outp...
2018/03/05
594
2,349
<issue_start>username_0: I am attempting to define and new column called `End Year` that is the calculation of another column plus a number representing number of years. For some reason my script does not recognize the new column called `Allocation Year` using the excerpt below SQL statement in SQL Server 2008. Note th...
2018/03/05
218
848
<issue_start>username_0: I have a project which I need to debug in another solution. I'm trying to generate a PDB file, but its not getting generated. However, a .PSSYM file is getting generated. Things that I have already tried: * Set the Configuration to Debug * Set Build > Advanced > Debug Info > FULL * Clean and R...
2018/03/05
400
1,532
<issue_start>username_0: I want to use the validator for an express project. How do I import just two subsets of the packages directly? Like: ``` import {isEmail, isEmpty} from 'validator'; ``` or importing each on a separate line. I just want to know if there is another option apart from import validator from '...
2018/03/05
1,383
4,288
<issue_start>username_0: I have a data table and response is coming from the API. Now I want to display that information in that data table. The response is as below ``` [ { "server_id": "172.16.58.3", "domain": null, "count_date": "2018-03-02", "bounce_count": "281494", "de...
2018/03/05
557
1,779
<issue_start>username_0: I have the following: ``` location /ron-swanson-quotes/ { return 301 /ron-swanson/; } ``` And a SSR React next.js app. The rewrite here works for people visiting the site externally but not if I click on a internal link. Is nginx capable of listening to what happens in node or does...
2018/03/05
1,757
6,012
<issue_start>username_0: The project I'm working on has System.Net.Http version 4.3.3 installed, according to NuGet. It had a binding redirect in the Web.config file to redirect it to version 4.2.0.0, which worked for some reason: ``` ``` I changed it to point to 4.3.3.0 which is the version NuGet says is installed:...
2018/03/05
540
1,845
<issue_start>username_0: I got a helper method: > > has\_permission? > > > In a Module called: > > module ApplicationHelper > > > Inside app/helpers. I also have an IntegrationTest which includes it: ``` include ApplicationHelper ``` My Integration test calls one of my controllers via get request. On c...
2018/03/05
912
3,235
<issue_start>username_0: I'm currently working on a project in PHP which will be using an API to get information about my customers. The API returns the information in JSON which I then convert into an array. The data consists of a big array with smaller arrays inside of it. Each smaller array holds information for eve...
2018/03/05
539
2,024
<issue_start>username_0: I have an `ActiveDataProvider` which includes several models. Now I need to remove one of these models. Let's say my `ActiveDataProvider` called `$allproducts` has 6 models. Now I need to remove model 4 from `$allproducts`. How can I achieve this? I am trying to loop in the ActiveDataProvider ...
2018/03/05
574
2,319
<issue_start>username_0: I'm working on a Android app which have feature of nearby friends. So each user have list of friends stored in a Firebase real time database. Also their locations are saved there while they are moving around. **What I want to do?** I want to compare all the user freinds locations with the u...
2018/03/05
1,070
3,932
<issue_start>username_0: I am seeking to make a script I have written more portable. Several of the tools used in my script require that certain modules be installed. I have been able to have the script install the modules on its own, but would like to have a mechanism that would check if they are already installed a...
2018/03/05
846
2,777
<issue_start>username_0: I feel one of the mind hurdles in learning haskell is that `data` sometimes defines functions as data. ``` data Person = Person { name :: String, age :: Int } ``` This is intuitive and resembles other languages. But in ``` newtype StateT s m a = StateT { runStateT :: s -> m (a,s) } ...
2018/03/05
384
1,548
<issue_start>username_0: I am facing an issue while giving the connectionstring to get it connect to PostgreSQL through the `AddDbContext()` method in ConfigureServices method of Startup.cs I'm getting this error while calling the function `options.UseNpgsql()` (see the image below). I have seen other questions reg...
2018/03/05
492
1,965
<issue_start>username_0: When adding a new user to a group in my `SignalR Hub`, how do I check to see if the user has already been added to that particular group? Do I even need to worry about this? In my `SignalR` based chat app, there are multiple chat rooms and a user can participate in multiple rooms simultaneousl...
2018/03/05
405
1,285
<issue_start>username_0: I have an object in my Angular.io or IONIC ``` {name:"<NAME>", city:"selangor", phone:"0123456789"} ``` and use the following code but it's not working: ``` this.restaurant.name.toUpperCase(); ``` I need to convert `food panda` to `FOOD PANDA`. How can I do that?<issue_comment>username_1...
2018/03/05
367
1,400
<issue_start>username_0: Why am I not able to see responses in Charles Proxy when debugging an app? It is very strange, all certificates have been installed on my laptop and trusted, same for my devices, and I am still getting `SSL Proxying not enabled for this host`, even though I have the enable SSL box ticked. I ...
2018/03/05
743
2,219
<issue_start>username_0: trying to get my code to print out everything in the text file using my class, but it is only printing the last line. Any ideas on how to get my loop working so it does every line? there are 3 lines and they are comma delimited. ``` Class Cars: def __init__(self,color, model, year): ...
2018/03/05
1,106
3,601
<issue_start>username_0: Given the following types: ``` type Trip = { From: string To: string } type Passenger = { Name: string LastName: string Trips: Trip list } ``` I'm using the following builders: ``` type PassengerBuilder() = member this.Yield(_) = Passenger.Empty [] member \_\_.LastName(...
2018/03/05
694
2,782
<issue_start>username_0: I have a react component like ``` const Example = () => (...); ``` Using react-navigation I would normally apply navigation options by saying ``` Example.navigationOptions = { options }; ``` With typescript I am getting the error `[ts] Property 'navigationOptions' does not exist on type...
2018/03/05
372
1,357
<issue_start>username_0: The default flash message in Sonata admin bundle adds the key and value to the message: Item "AppBundle\Entity\Users:00000000342d9b58000000004a2ab3f9" has been successfully created. Could someone tell me how to get rid of the key and just have the value displayed? Thank you.<issue_comment>use...
2018/03/05
1,302
2,072
<issue_start>username_0: im using numpy.linespace to help generate bins for data. I want 20 bins between 0 and 1,000,000, each 20k in size. numpy.linespace is giving uneven bin sizes. ``` bins = np.linspace(start = 0, stop =1000000, num = 50, dtype = 'int64') ``` This gives bins like below (first 5 bins) ``` 2.040...
2018/03/05
898
3,930
<issue_start>username_0: I'd like to get the name of the current loaded ViewController as String. I got this code which is working quite fine: ``` if let window = UIApplication.shared.delegate?.window { var viewcontroller = window!.rootViewController if(viewcontroller is UINavigationController){...
2018/03/05
1,637
5,603
<issue_start>username_0: I have a function like this ``` private void goToSalesActList(View view) { CustomerActivity ca = (CustomerActivity)view.getTag(); Intent intent = new Intent(this, SalesActListActivity.class); Bundle bundle = new Bundle(); bundle.putParcelable(Const.OBJ_USER, user); bundle...
2018/03/05
313
1,038
<issue_start>username_0: I have two tables, concessionaire and bills. concessionaire has many bills but I only want to get the latest bill for previous bill purpose. Can you help me how can I do it? Here is my template ``` @foreach($dataUser as $User) | {{$User->id}} | {{$User->bill->newrec}} | @endforeach ``` ...
2018/03/05
182
577
<issue_start>username_0: i've been doing a post request from my view, but the controller doesn't receive the form values. **view**: ``` ``` **Controller**: ``` public function busca_vaga() { print_r($_POST);exit; } ``` **Result**: Array ( ) What is going on?<issue_comment>username_1: Use [last](https://...
2018/03/05
315
1,061
<issue_start>username_0: I have following array: ``` [{value: 0, label: 'January'}, ... {value: 11, label: 'December'}] ``` with all months which I need filter by quarter (1, 2, 3, 4) so when I have quarter 1 need months January, February, March. Is possible filter this array for some range? I tried this: ``` ...
2018/03/05
865
2,845
<issue_start>username_0: Freezing scrolling in a tableview with images from download URL. Pictures are downloaded from the Internet. Loads well. But when scrolling down all. ``` class WebcamViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UISearchResultsUpdating { @IBOutlet var tableView...