date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/01
750
2,244
<issue_start>username_0: ``` ruby version - 2.4.2 rails - 5.1 rails new my_app --webpack=react ``` when I try to start server with `foreman start -f Procfile.dev` or just `./bin/webpack-dev-server` I get following error and could not find the cause of it. Any help is appreciated. ``` /Users/shani/Wspace/myap...
2018/03/01
2,432
7,091
<issue_start>username_0: Currently my site has a transparent navbar when on scroll will change to full colour. The issue i am having is that the navbar also switches colour when the page is scrolled on the fullscreen navigation. How can i stop the navbar switching colour when the fullscreen navigation is open? Would ...
2018/03/01
368
1,389
<issue_start>username_0: I've been using yarn with a private registry in the past - however, the registry has now shut down and I want to use yarn with the official registry. Whatever I do, yarn always seems to want to connect to the old registry and there's simply no way of making it use the new one. I've already tri...
2018/03/01
557
1,773
<issue_start>username_0: I read in a book that a shorter way to iterate through a vector is as follows: ``` for (auto x : v) { cout << x << "\n"; } ``` When I tried the same out in my compiler I got two error messages stating: > > 'auto' changes meaning in C++11, please remove it range based 'for' loops only av...
2018/03/01
757
2,720
<issue_start>username_0: I am trying to retrieve database rows with their relationships. However, the local key is an array. Let me explain using an example. Lets say I have a table of countries and a table of pages. Each country can have many pages. Each page can belong to multiple countries. I do not have the flexib...
2018/03/01
1,376
3,990
<issue_start>username_0: I have a number of pairs of values (pairs of bonded atoms) for a file containing different molecules. If two pairs have a common member, it means that they are part of the same molecule. I am trying to find an efficient way in python to group the atoms depending on which molecule they belong to...
2018/03/01
529
2,301
<issue_start>username_0: Is it a good idea/practice to put static shared preferences editor in a utility class so I can call it whenever needed? The method in the utility class would look like this: ``` public static SharedPreferences.Editor editor (Context context){ final SharedPreferences sharedPrefs = Preferenc...
2018/03/01
520
2,195
<issue_start>username_0: I've setup a new application with angular 5 (latest version) and I run into the following error: ``` Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be changed for synchronous requests made from a document. ``` I can provide code if needed but the erro...
2018/03/01
482
2,099
<issue_start>username_0: I have valid adhoc provisioning profile, when I set that profile Xcode throws error "Profile doesn't include the beta-reports-active entitlement", and I don't know, why Xcode is giving this issue as adhoc profile doesn't contains beta-reports-active entitlement. If anyone has any idea about thi...
2018/03/01
1,846
6,142
<issue_start>username_0: I got a grid with JPanels, by pressing the Button on top I want a random generator to draw circles on 3 random Panels. In theory I think I have to overwrite the PaintComponent of every JPanel with a circle, put the flag on false and when I press the button an action listener puts the flag of 3...
2018/03/01
1,172
4,219
<issue_start>username_0: I need to sum the amounts (column A) belonging to a particular project (defined as Text in Column B) in the given period (date in Column C). [![Let's say that's the example:](https://i.stack.imgur.com/bO838.jpg) What I need is to be able to have a calculation in another sheet of the sum of a...
2018/03/01
1,058
3,185
<issue_start>username_0: I can only get the number of frames `CAP_PROP_FRAME_COUNT` using OpenCV. However, I cannot find the parameter to get the duration of the video using OpenCV. How to do that? Thank you very much.<issue_comment>username_1: First calculate frame per second like this ``` import cv2 as cv # cap =...
2018/03/01
844
3,076
<issue_start>username_0: I am doing a function in JavaScript that makes cubes follow the mouse movement but I need to make them go back to their original position when I hover over a specific div and stop them moving as long as the mouse is inside of that div that. If I move the mouse inside that button the cube dosen'...
2018/03/01
2,089
6,340
<issue_start>username_0: I followed the below steps in provisioner to install nvm on a new azure vm but i am unable to install. The source doesn't load the sh script. ```js { "variables": { "client_id": "{{env `ARM_CLIENT_ID`}}", "client_secret": "{{env `ARM_CLIENT_SECRET`}}", "resource_group": "{{e...
2018/03/01
1,992
5,502
<issue_start>username_0: I'm trying to put characters into my 2D array. i've defined these objects: ``` typedef struct board { char* board[25][80]; }Board; typedef struct obstacleA { int* x; int* y; }ObstacleA; typedef struct obstacleC { int* x; int* y; }ObstacleC; typedef struct obstacleB { int* x; int* y; }Obstac...
2018/03/01
432
1,181
<issue_start>username_0: I'm aware that we can enable pretty printing in gdb `set print pretty`. But is there an unset? I sometimes would like to toggle it. I couldn't find any documentation of it not any answers in Stackoverflow.<issue_comment>username_1: Use ``` set print pretty off ``` From [documentation](https:...
2018/03/01
547
1,951
<issue_start>username_0: I have this table, [![enter image description here](https://i.stack.imgur.com/DUxLt.png)](https://i.stack.imgur.com/DUxLt.png) and I want to display all the data of the clients who have the 'Campagne' A. So here is what I want :[![enter image description here](https://i.stack.imgur.com/L4b9Z.p...
2018/03/01
711
2,638
<issue_start>username_0: After automatic deskew and crop I have the following image: [![enter image description here](https://i.stack.imgur.com/vbcqX.png)](https://i.stack.imgur.com/vbcqX.png) I need to OCR this image. Right now ABBYY Engine SDK 11 For Linux produces not very well result: ``` IMerasers - www,raiyirn...
2018/03/01
191
719
<issue_start>username_0: Can we add multiple styles for different components in one xml file in drawable folder? For example, Code for one button ``` ``` Code for the other button ``` ``` Can we add the both codes in to a single xml file in the drawable folder or should we need to create two separate xml files?<i...
2018/03/01
1,862
5,771
<issue_start>username_0: In my application, I've got some parameters that I wanted to put in CSS variables using jQuery. And I wanted to read them too. I was having trouble to read the values back of the CSS variables and tried many things… before I found a solution in the “Questions that may already have your answer”...
2018/03/01
813
3,041
<issue_start>username_0: Following is xml for my **Main activity** ``` xml version="1.0" encoding="utf-8"? ``` Following is xml code for **Home fragment** ``` xml version="1.0" encoding="utf-8"? ``` Following is xml code for **Detail fragment** ``` xml version="1.0" encoding="utf-8"? ``` Now when I am calling...
2018/03/01
934
3,971
<issue_start>username_0: For testing purposes I want to be able to change which class is bound to the variable `sensor`. Normally the program would use data measured by a sensor through the `Sensor` class. However, if no sensor is connected, I can simulate its behavior using the `SensorSimulator` class. What I curren...
2018/03/01
848
3,238
<issue_start>username_0: I am using the regular expression `dEF\w+\(\w+\)=.*?;` in order to find patterns of the following form: ``` dEFPFC(pATREF)=dIDOSSEGPfc(pIDOSSeg); dEFTur(pATREF)=dIDOSSEGTurnaround(pIDOSSeg); ``` The problem is that it also taking into account patterns that have `==`. I don't want that. this...
2018/03/01
749
3,474
<issue_start>username_0: I am working with Elasticsearch and I need to query value from the document which stored as JSON formatted string. Is there any option to query form Elasticsearch which stored JSON formatted string? **Please see my use case** I am saving my application data in Cassandra and replicating these...
2018/03/01
1,223
5,479
<issue_start>username_0: So I am currently attempting to train a custom object-detection model on tensorflow to recognize images of a raspberrypi2. Everything is already set up and running on my hardware,but due to limitations of my gpu I settled for the cloud. I have uploaded my data(train & test records ans csv-files...
2018/03/01
1,584
6,850
<issue_start>username_0: I am having power BI desktop report(pbix) internal file (DataMashup), which i am trying to decode. My Aim is to create Power-BI desktop report, Data Model using any programming language. I am using Java for initial. [![enter image description here](https://i.stack.imgur.com/h7FtK.png)](https:/...
2018/03/01
460
1,681
<issue_start>username_0: I am using PyQt5 and Python 3.6.4 to design a ui for a program. It was made on a 720p monitor however now using the same code on a 4k monitor, everything is tiny apart from the text. How would I go about resizing the whole app to look the same on all monitors: (720p, 1080p, 4k, etc.) The progra...
2018/03/01
2,439
7,648
<issue_start>username_0: I have two tables and I need to generate report from them. I wrote this query that solves my task in smaller databases, but if amount of records exceeds 5-6 millions performance of the query becomes very poor ``` insert into Reconcile ([Account], [Beginning balance], [Turnover TB], [Turnover ...
2018/03/01
1,093
4,499
<issue_start>username_0: I want to define the date pattern in my application on a global level. Therefor I would like to use a properties file. Since I am already using one e.g. to set the default number of rows for a repeat control I added a ne wkey-value pair: ``` date_format_date_only=yyyy-MM-dd ``` In my applic...
2018/03/01
742
2,982
<issue_start>username_0: Is it possible to set **starting options** in **facebook messenger for pages** like example bellow: [example of expected result](https://i.stack.imgur.com/iOQuc.jpg) I figured that similar could be achieved by using messenger BOT with 'start button', multiple BOT replies with 'quick reply' but...
2018/03/01
893
3,109
<issue_start>username_0: In **C** or **C++** I know that there is something called > > undefined behaviour > > > In expression evaluation when some of the the expressions have side-effects. let's say I want to calculate the following: ``` c = 10 f() + g() + c ``` but at some point g makes c = 5.(c is a glob v...
2018/03/01
980
3,494
<issue_start>username_0: I am trying to have the user choose a month from a dropdown list displaying the months, and passes that month value (in numbers) to the controller I am having trouble making the dropdown list an action so once the user picks the month, the controller gets called. here is my index page: ``` ...
2018/03/01
447
1,634
<issue_start>username_0: I have a mini project in which the first page having title homepage but the next page contacts is click through link it retains the homepage as title. I've explicitly declared title as Contact Us but then also it shows Homepage. Here's my code: For App.js: ``` import React, { Component } fro...
2018/03/01
1,678
4,110
<issue_start>username_0: I am trying to plot contours over the north pole, using cartopy. I have used add\_cyclic\_point and this has successfully filled in the gap at the prime meridian in pcolormesh, but the contours do not cross successfully, and instead wrap all the way around the globe to connect (but it seems not...
2018/03/01
498
1,892
<issue_start>username_0: Django Widgets set HTML5 maxlength attribute, based on the Model max\_length. ``` class Publication(models.Model): name = models.CharField(max_length=255) ``` I want to remove this attribute, because is interfering with my own validation, which is more complex. I know that required att...
2018/03/01
4,256
11,889
<issue_start>username_0: Update ------ I dug deeper in dcm4che's source code and found that an `IncompatibleConnectionException` is thrown if either * a connection is "not installed" * or the types of protocols are not set or don't match. I don't know what it means that a connection is "installed" but this flag can ...
2018/03/01
199
718
<issue_start>username_0: I'm trying to run `Flutter` on Android studio but I have an issue resolving this error. I'm using last version of every thing (like as dart and flutter or plugins). > > Flutter users should run `flutter packages get` instead of `pub get` > > ><issue_comment>username_1: check `local.properti...
2018/03/01
932
3,020
<issue_start>username_0: I want to simplify code. so i make a utils.py , but Google Colaboratory directory is "/content" I read other questions. but this is not my solution [In Google's Colab notebook, How do I call a function from a Python file?](https://stackoverflow.com/questions/47345004/in-googles-colab-notebook-...
2018/03/01
207
775
<issue_start>username_0: I''m building some Jave/Junit Selenium tests to work with both Chrome and Firefox. I can't find any info on how to start the Firefox browser window in a maximised state. With Chrome I can use ChromeOptions, like: anOptions.addArguments("--start-maximized"); I can't find any way to make the s...
2018/03/01
890
2,558
<issue_start>username_0: this is my first Post on this Site. I am learning Django and Python right now and trying to create a Quiztool. I have hughe problems with creating my views and its hard for me to understand how to refine the data in a Queryset. In my Detail View I am raising this error: > > TypeError at /1/ >...
2018/03/01
239
871
<issue_start>username_0: I'm writing some script which manipulates versions of the packages in package.json. The thing which I found painful is comparing versions. Now, I represent them as strings and have some special functions which compare them which looks silly. For example: '3.1.1' and '3.1.11' So, what is prop...
2018/03/01
699
2,569
<issue_start>username_0: I have a file with the following text: ``` Oh, speak again, bright angel, for thou art As glorious to this night, being o'er my head As is a winged messenger of heaven Unto the white-upturned wondering eyes Of mortals that fall back to gaze on him When he bestrides the lazy-puffing...
2018/03/01
746
2,595
<issue_start>username_0: The following html tag displays a input field that accepts a number and also provides up, down arrows to increment, decrement the field values. My required input field is an input with the value of the cricket over, so for example, after 1.5 if I click up arrow it should get converted to 2 or 2...
2018/03/01
1,134
4,284
<issue_start>username_0: I have table T1: ``` TICKETID 1 2 3 ``` I have table T2 ``` ID TICKETID DESCRIPTION 1 1 First 2 2 Second 3 2 Automatic ``` I want to join those tables (SELECT must begin from T1 table) and to extract Last DESCRIPTION value before the Automatic value (for ex...
2018/03/01
934
3,907
<issue_start>username_0: I have a little problem with my MegaMenu, when i open a submenu (clicking on one item of main menu) i want that submenu to vanish when i click anywhere on the document body or if i choose other menu item, the the previous submenu has to close, if i click on that submenu ('ul'), or one particula...
2018/03/01
816
3,389
<issue_start>username_0: I've been struggling with boolean simplification in class, and took it to practice some more at home. I found a list of questions, but they don't have any answers or workings. This one I'm stuck on, if you could answer clearly showing each step I'd much appreciate: **Q=A.B.(~B+C)+B.C+B** I tr...
2018/03/01
676
2,109
<issue_start>username_0: Can I declare a function in postgresql which in its input parameter will convert data type of passed parameter. For example: ``` create or replace function temp(IN var1 integer, IN var2 varchar) select temp('12345','number'); ``` as passed parameter `'12345'` is a string, I want it to conve...
2018/03/01
617
1,874
<issue_start>username_0: Here's the incriminated code : ``` var openDiv = 'Share this post:'; var social = 'FB'; var closeDiv = ''; jQuery(document).ready( function(){ jQuery(".splash").after(openDiv, social, closeDiv); }); ``` It displays nicely what's in openDiv and closeDiv but what's in social is diplayed ou...
2018/03/01
617
1,801
<issue_start>username_0: I have a scenario where my Data looks like below ``` COLA 'XYZ' 'XYZ ' 'ABC PQR' 'ABC PQR ' ``` There are duplicates with same name but one have Space at the ending and then ' I want those space to be Replaced by '?' . So the data would look like ``` COLA 'XYZ' 'XYZ?' 'ABC PQR' 'ABC PQR?'...
2018/03/01
874
3,293
<issue_start>username_0: I want to test method setDay() using arguments [-1,0,24,2,32]. I know that Scanner reader can be `String test="-1 0 24 2 32"; Scanner reader=new Scanner(test);` The main problem is infinite loop and void method. How can we test this kind of code? Here is example code: ``` public NameOfThe...
2018/03/01
1,966
6,099
<issue_start>username_0: Is it possible to minimise a loss function by changing only some elements of a variable? In other words, if I have a variable `X` of length 2, how can I minimise my loss function by changing `X[0]` and keeping `X[1]` constant? Hopefully this code I have attempted will describe my problem: ```...
2018/03/01
537
1,858
<issue_start>username_0: I have a problem with transform message. I need to recieve messages in SOAP/WSDL sistem. In my case i have this structure for process the responses. [![Flow](https://i.stack.imgur.com/43Qe9.jpg)](https://i.stack.imgur.com/43Qe9.jpg) This is my flow and in trnasform message component i have th...
2018/03/01
1,231
4,510
<issue_start>username_0: Here is a snippet of the tables in question: **USER** ``` | USER_UID | FIRSTNAME | LASTNAME | abc123 bob smith def456 rob smithies ghi789 john clark ``` **EVENT** ``` | GUID | NAME | ev1 event1 ev2 event2 ev3...
2018/03/01
1,506
4,644
<issue_start>username_0: I'm try to loop some tables and run select as below: ``` set serveroutput on declare type tables_names is table of varchar2(30); type selectTable is table of varchar2(30); tName tables_names; sTableName selectTable; begin; tName := tables_names('PERIOD','SETTING','RAP','LOG'); sTableName :...
2018/03/01
2,291
9,394
<issue_start>username_0: I am new to ios developpement. I have built and apps that saves data in the core data. What I would like to do is sharing this data with my Ipad, or my kids Iphone. The devices are not on the same network or closed to each other, so the shared process will be via Email or Imessage. the app w...
2018/03/01
773
2,408
<issue_start>username_0: I have three arrays. One of them contains values I will be testing. The two others are arrays of object which might include the values of my first array under the `name` key. ``` const myArray = ["foo", "bar"]; const testArray1 = [ {name: "foo"}, {name: "bar"}, {name: "something ...
2018/03/01
373
1,430
<issue_start>username_0: I'm looking to use an API Gateway Custom Authorizer to authorization. If a user with an unauthorized token makes thousands/millions of tries will I get charged?<issue_comment>username_1: For Custom Authorizer to authorization, you will get charged whether it pass or fail as it needs to get val...
2018/03/01
571
2,501
<issue_start>username_0: I am reading up on Togaf Data Architecture. A lot of inputs are mentioned. Does the framework propose any methods or mechanisms (without being over prescriptive) what to do if the inputs are not available? What are the implications if some are not available? Preferred answers refer to Togaf. ...
2018/03/01
485
1,542
<issue_start>username_0: I'm trying to break up this array with a foreach loop, and kind of have it working, but can't quite get what I need. My array is as follows: ``` Array ( [0] => Array ( [qty] => 5 [itemId] => 247 ) [1] => Array ( [qty] => 3 ...
2018/03/01
1,047
3,304
<issue_start>username_0: I am working on the part of routing in my Angular 5 project. I did the following: 1. I created a new routes module called `routes.module.ts`: `import { RouterModule, Routes } from '@angular/router';` `import { UdemyComponent } from './udemy/udemy.component';` `const appRoutes: Routes = [ ...
2018/03/01
598
2,074
<issue_start>username_0: I have a graph with one node type 'nodeName' and one relationship type 'relName'. Each node pair has 0-1 'relName' relationships with each other but each node can be connected to many nodes. Given an initial list of nodes (I'll refer to this list as the query subset) I want to: 1. **Find all ...
2018/03/01
554
2,128
<issue_start>username_0: FirstI'm trying to display the spinner into a dialog, I'm calling the data from database into ArrayList via **getData** object and everything is working fine but in the last step I got the above error when I tried to assign the adapter to the spinner and here is my code : ``` public class ...
2018/03/01
1,022
3,471
<issue_start>username_0: I am running two Apache Ignite instances (version 2.2.0) in my single host pc, and they discover each other with no issues. What I want to do now, is to simply create an IgniteCache in this existing "pseudo cluster", preferably without starting a new instance to do so. This is the code I have r...
2018/03/01
268
734
<issue_start>username_0: SELECT SUM( `srvce_volume` ) FROM work\_order WHERE DATE( `updated_at` ) >= '2018-01-18' AND DATE( `updated_at` ) <= '2018-01-18'<issue_comment>username_1: Start learning the query builder from [here](https://laravel.com/docs/5.6/queries). You need to use the `whereDate()` and `sum()` methods...
2018/03/01
534
1,672
<issue_start>username_0: I am trying to update my `/etc/shells` file to include the path to a homebrew installed version of `bash` which resides at `/usr/local/bin/bash` `$ sudo echo /usr/local/bin/bash >> /etc/shells` returns Permission denied and attempting to manually update is not allowed as it appears to be read-...
2018/03/01
404
1,502
<issue_start>username_0: i use an external script from Air-bnb. The script causes an error in Internet Explorer. For Air bnb it is not possible to fix this script. Is there a possibility to fix it by my self? This function is not supported by IE ``` if(c.includes(r))return t ``` On this site i load the script via ...
2018/03/01
592
2,149
<issue_start>username_0: Please help, why this code doesn't work? ``` let [phones, computers, numbers, accessories, smartwatches] = cat; let names = ["phones", "computers", "numbers", "accessories", "smartwatches"]; for (let i=0; i n2.id AND n1.name = n2.name"); } ``` This is an error message: Error: ER\_PARSE\_ERR...
2018/03/01
484
1,483
<issue_start>username_0: I have installed theano with ``` conda install theano ``` on Ubuntu 16.04. Now I have import problems ``` import theano Traceback (most recent call last): File "/home/milenko/miniconda3/lib/python3.6/configparser.py", line 1138, in _unify_values sectiondict = self._sections[section] ...
2018/03/01
616
2,557
<issue_start>username_0: I have the following function in my node.js app which loops through an array and performs a certain function on it: ``` var splitStatements = ['1','2','3']; // this is simplified splitStatements.forEach(function(statement) { // `statement` is written into the database // the respo...
2018/03/01
743
2,764
<issue_start>username_0: After searching similar questions I still didn't get the error The thing is that I have a form that usually works, but the 10% of the users have this error > > array\_sum() expects parameter 1 to be array, null given > > > Form ``` 0 1 2 ``` Controller ``` $validator = Validator:...
2018/03/01
306
1,203
<issue_start>username_0: this is my error CS1061: 'analysis\_aspx' does not contain a definition for 'Button1\_Click' and no extension method 'Button1\_Click' accepting a first argument of type 'analysis\_aspx' could be found (are you missing a using directive or an assembly reference?) my code in aspx file: ``` ```...
2018/03/01
311
1,085
<issue_start>username_0: There is a string and I split it by whitespace and I want to get the last one. ``` String test = "Hey Hi Hello"; // Defining "test" String test = test.split(" ")[2]; // Now "test" is "Hello" System.out.print(test); // prints Hello ``` I should do this to get the last word of "test" String. B...
2018/03/01
416
1,269
<issue_start>username_0: i have try to print `json response` but `""` are added to my `json response` i tried below code `php` and `id` generated by `drupal field` ``` php $data = array("title"="test","body"=>"test body"); $php = json_encode($data,JSON_FORCE_OBJECT); echo json_encode(array("php"=>$php,"id"=>10)); ?>...
2018/03/01
771
2,816
<issue_start>username_0: I'm trying to automate an Android game and for that I'm using X,Y co-ordinates to make a button click, as identifying elements through ID, Xpath etc. is not possible for games. I'm using TouchAction tap(int x, int y) method (Appium Method) for achieving this. But unfortunately this method tap(i...
2018/03/01
715
2,453
<issue_start>username_0: ``` FlightType=input("Which flight would you like to fly? Type '2 Seater', '4 Seater', or 'Historic'.") # No validation included for the input FlightLen=input("Would you like to book the '30' minutes flight or the '60'") # No validation included for the input if (FlightLen==30): MaxSlot...
2018/03/01
658
2,422
<issue_start>username_0: I'm using both Express and React for my webapp, because we are migrating rendering from Handlebars to React. However we want to maintain the logic in Express and render only in React. The problem is when I want to do a redirect. This is the client.js with the logic: ``` import React from 'reac...
2018/03/01
241
882
<issue_start>username_0: I have a *jQuery* variable `inner_data` with a div stored inside. ``` hello World ``` Here is my jQuery code ``` inner_data=document.getElementById('container').innerHTML; $(inner_data).find('p').replaceWith('Welcome World '); console.log(inner_data); ``` I am not getting modified valu...
2018/03/01
286
1,168
<issue_start>username_0: I try to send a message with attachment id but the attachment doesn't show up, so I want to check it's existed or not. Is there any facebook api to do that? More detail: I created a qr image by google chart url like this ``` https://chart.googleapis.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl...
2018/03/01
447
1,722
<issue_start>username_0: I'm building a node app with mongo. I'm trying to perform basic CRUD on my app resources i.e mongo. Creating and Reading data work fine but the problem occurs when I try to update or delete data from mongo. I have used morgan to log all requests and in my console terminal, I see `%20` attached...
2018/03/01
634
1,993
<issue_start>username_0: I am trying to set env var in my docker compose file but the var does not seems to propagate to my docker. my docker-compose: ``` test: build: ./ environment: TESTVAR: "YOU ARE BEST" ``` my dockerfile: ``` FROM alpine RUN echo test variable is: $TESTVAR ``` outputs: ``` Step 1/...
2018/03/01
731
2,403
<issue_start>username_0: I'm showing an array with items of type 'request' in a table. I want to sort the columns of the table so I planned to make a click method for every column header. This methods sorts the array based on the value of the property shown in that column. ``` public sortProduct(): void { this.re...
2018/03/01
464
1,737
<issue_start>username_0: Normally we called a controller method from route like below ``` Route::get('/route_name', 'controllerName@method'); ``` But is there any way to call a helper method from route ?<issue_comment>username_1: You could [use a closure](https://laravel.com/docs/5.6/routing#basic-routing): ``` Rou...
2018/03/01
1,316
5,389
<issue_start>username_0: How to add a custom field to the frontend registration form. I already added required feilds in database by following ``` public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); $eavSe...
2018/03/01
945
4,137
<issue_start>username_0: I'm using OkHttp for sending and receiving messages through socket on Android. Creating a socket connection - ``` SocketListener listener = new SocketListener(); mOkHttpClient = new OkHttpClient.Builder() .readTimeout(0, TimeUnit.MILLISECONDS) .build(); Request request = new Request....
2018/03/01
1,316
5,485
<issue_start>username_0: I have the following to objects: ``` public class DeviceTests { public int Id { get; set; } public int? EnvironmentId { get; set; } public virtual Common.Environment Environment { get; set; } //.. other prop's } public class Environment { public int Id { get; set; } publ...
2018/03/01
606
2,031
<issue_start>username_0: When my `settings.py` has `ALLOWED_HOSTS = []` - the server works fine. But When I do `ALLOWED_HOSTS = config('ALLOWED_HOSTS')` - it gives the error: ``` DisallowedHost at /admin/login/ Invalid HTTP_HOST header: '127.0.0.1:8000'. You may need to add '127.0.0.1' to ALLOWED_HOSTS. ``` However ...
2018/03/01
1,782
5,552
<issue_start>username_0: Up to now I do simple logging to files, and if I log a multiline string, then the result looks like this: Emitting log: ``` logging.info('foo\nbar') ``` Logfile: ``` 2018-03-05 10:51:53 root.main +16: INFO [28302] foo ``` bar Up to now all lines which do not contain "INFO" or "DEBU...
2018/03/01
193
597
<issue_start>username_0: I could not select Multi-Value Select Boxes (<http://select2.github.io/select2/>) I try: ``` cy.get('s2id_e9').click() cy.get('ul li:first').contains('California').select() ``` but it does not work. **How can I select these options? Hope someone can help?**<issue_comment>username_1: ``` cy...
2018/03/01
235
751
<issue_start>username_0: I have a menu with a sub menu, when the sub menu is visible I want to add a class to parent list element. ```html * Item 1 * Item 2 * Item 3 + Sub Item 1 + Sub Item 2 * Item 4 ``` Basically, when the "lower-menu" is visible, I want to add another class to the list element "parent-li". Also...
2018/03/01
599
1,903
<issue_start>username_0: I am trying to make simple learning project where i am getting all records and displaying on html. My models are : ``` class Student(models.Model): stuName = models.CharField(max_length=100) stuCity = models.CharField(max_length=100) stuPhone = models.IntegerField(max_length=10) stuNation...
2018/03/01
630
2,670
<issue_start>username_0: Importing data from a Datatable and a column name could have multiple name values, eg. the column might be called "Name" or it could be called "First Name" or "F name" is there a more efficient way then doing lots of If else's to assign the value of a column What I have at the moment is ```...
2018/03/01
1,466
4,596
<issue_start>username_0: I am writing a SysLog Server where my program receive messages of RFC5424Format. My program has to parse the message and store the values. I have got a regular expression which is failing to parse the message. There is problem in Regular Expression.I am new to Regular expression. Any help a...
2018/03/01
2,379
8,786
<issue_start>username_0: Here's a `User` model class. This model will be container for data while registering new user, logging an already registered user and displaying profile. ``` struct User { typealias message = (Bool,String) var name: String? var username: String var password: String var im...
2018/03/01
609
1,852
<issue_start>username_0: I have Flask application deployed in server. and we are using Nginx. nginx setup is as below: ``` proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_read_timeout 25s; proxy_pass http://127.0.0.1:8000; add_header X-Cache $upstr...
2018/03/01
553
1,556
<issue_start>username_0: I found a related question here: [How can I find all of the distinct file extensions in a folder hierarchy?](https://stackoverflow.com/questions/1842254/how-can-i-find-all-of-the-distinct-file-extensions-in-a-folder-hierarchy) But my case is slightly different. Using bash on Ubuntu 14.04 Linu...
2018/03/01
294
944
<issue_start>username_0: I am building a calendar application that needs to calculate the remaining days of (1) the current week and (2) the current month. What I have tried was using the java.util.Calendar API, but it seems not to be fully supported. ``` int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH); ```...
2018/03/01
464
1,869
<issue_start>username_0: I'm using Sangria for a Play application and currently struggling to implement the schema definition. The Problem is, that the service does not return the needed object directly, it returns an EitherT containing the object. Here are some code examples *case class* ``` case class User(name:...
2018/03/01
1,233
3,582
<issue_start>username_0: So i have an array which stores hobbies for each user in an array within the object.. ``` var hobbies = [ { "id": 1, "hobbies": [] }, { "id": 2, "hobbies": [ "football" ] }, { "id": 3, "hobbies": [ "football", "basketball" ] } ] ...
2018/03/01
1,273
3,772
<issue_start>username_0: I'm new in programming and API and I want to know how can I redirect to the URL sent by an API Response like below, please take note that the merchantURL changes everytime a customer submit new transaction. ``` decision = ACCEPT reasonCode = 100 requestID = 5199043764236716204011 requestToken...
2018/03/01
1,225
4,399
<issue_start>username_0: I am new to React and I try to build a timer component. Now I have the start function working but I would also like to stop the timer by an onclick handler. The problem is that the start function uses an interval, but I don't know how to stop that interval from another function. My JS code ``...