date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/20
390
1,592
<issue_start>username_0: I am new in selenium and I have configured Cucumber with Maven and create one feature file but feature file's green icon is not displayed. Can I missed some configuration? [Cucumber feature file](https://i.stack.imgur.com/198nk.png)<issue_comment>username_1: There is a plugin called **Natural 0...
2018/03/20
1,011
3,063
<issue_start>username_0: I'm trying to use `openpyxl` to read 1 column out of a Excel-file until it hits an empty cell, then it needs to stop. But i don't get it working. This is my code so far: ``` import openpyxl import os def main(): filePath = os.getcwd() + "\file.xlsx" wb = openpyxl.load_workbook(filena...
2018/03/20
1,247
3,145
<issue_start>username_0: I want to wrap after second td of my table. Here is my code: ``` | | | | | | --- | --- | --- | --- | | Row 1 col 1 | Row 1 col 2 | Row 1 col 3 | Row 1 col 4 | | Row 2 col 1 | Row 2 col 2 | Row 2 col 3 | Row 2 col 4 | | Row 3 col 1 | Row 3 col 2 | Row 3 col 3 | Row 3 col 4 | | Row 4 col ...
2018/03/20
587
2,324
<issue_start>username_0: ``` class CustomManager(models.Manager): def get_query_set(self): queryset = super(CustomManager, self).get_query_set() return queryset.filter( models.Q(expiration_date__gte=datetime.date.today()) | models.Q( expiration_date__gte=datet...
2018/03/20
423
1,299
<issue_start>username_0: I'm trying to put an array to textarea, one element in a line. But every element is an array too and I need to show it without commas. I only can show every row without commas ```js var arr = [ [1, 2], [3, 4], [5, 6] ]; outputText = document.getElementById('outputField'); outputTe...
2018/03/20
688
2,277
<issue_start>username_0: I am writing more than 6 functions and save them in my R.project. Every time, to start working using my project, I need to run each function manually one by one. Is there a way that I can load all these functions automatically?<issue_comment>username_1: You have two options: 1. Create your own...
2018/03/20
777
3,628
<issue_start>username_0: *Effective Java 3rd Edition, Item 18: Favor composition over inheritance* describes an issue with using inheritance to add behavior to a class: > > A related cause of fragility in subclasses is that their superclass can acquire new methods in subsequent releases. Suppose a program depends for...
2018/03/20
3,610
9,077
<issue_start>username_0: I have this code: ``` let result = Object.values(response.data.reduce((r,{ PO_NO, PO_LINE_NO, MATERIAL_NO, MATERIAL_NAME, PO_QTY, GRPO_QTY, GRPO_SHIPDATE }) => { r[PO_NO] = r[PO_NO] || { PO_NO, LINES: [] } r[PO_NO].LINES.push({ LINE_NO: PO_LINE_NO, PO_QTY: PO_QTY, ...
2018/03/20
548
2,191
<issue_start>username_0: I'm building protractor tests for my Angular 5 app (built with Angular CLI). My problem is that to build a test takes a lot of time - each time I run `ng e2e` I need to wait until the app is compiled. That happens lot of times, since there are lot of mistakes with incorrect selectors in my code...
2018/03/20
741
2,504
<issue_start>username_0: So this is my text file and i want to calculate the average for every year: ``` 1969 324.000 1970 330.190 1970 326.720 1970 327.130 1971 326.970 1971 331.200 1971 329.430 1971 335.770 1971 337.600 ``` And this is my Code that i got from another question but it keep...
2018/03/20
552
2,108
<issue_start>username_0: When trying to run `grunt`, I get an error message: ``` Warning: Task "default" not found. Use --force to continue. Aborted due to warnings. ``` I have already found several posts on this topic, and in each of them the problem was a missing comma. But in my case I have no idea what's wrong, ...
2018/03/20
489
1,852
<issue_start>username_0: I am trying to analyze the social network data which contains `follower` and `followee` pairs. I want to find the **top 10 users** who have the most followees using MapReduce. I made pairs of `userID` and `number_of_followee` with one MapReduce step. With this data, however, I am not sure h...
2018/03/20
548
1,821
<issue_start>username_0: I installed torch using ``` git clone https://github.com/torch/distro.git ~/torch --recursive ``` If in China, git does not seem to work so I've to download the source as a zip file. What's the difference between the two?<issue_comment>username_1: "clone" uses git software on your computer ...
2018/03/20
2,584
8,499
<issue_start>username_0: I am trying to generate job using jenkins JOB-DSL and i am unable to find a way to trigger allure report as publisher in freestylejob ``` job('ci') { publishers { allure([includeProperties: false, jdk: '', results: [[path: 'Result']]]) } } ``` I even tried to search on <https://jenk...
2018/03/20
1,722
5,427
<issue_start>username_0: I just wanted to know if there is a way to improve this for loop, by skipping those if somehow. Var `String` can have more parameters and their order can be casual. In order to replace the param with a real value, I need : 1. To split it 2. To check what parameter is and in which position...
2018/03/20
575
2,103
<issue_start>username_0: I'm trying to add an IBOutlet in swift but I only have the option to add an action. **Here is an image of what I'm talking about.** ![enter image description here](https://i.stack.imgur.com/6b6L8.png)] Is there any way I can fix this? [I can't change connection type either.](https://i.stack...
2018/03/20
1,098
2,657
<issue_start>username_0: I have an hive table like below, ``` hive> describe eslg_transaction_01; OK a1 string a2 date a3 string a4 string a5 string a6 bigint a7 double a8 double a9 double a10 bigint a11 bigint a12 bigint a13 bigint a14 bigint a15 bigint ...
2018/03/20
601
2,166
<issue_start>username_0: Trying to create folder in internal storage but code working only in oppo handset not in other brand handsets like samsung,mi etc ``` public void createPDF() { TextView dttt = (TextView)findViewById(R.id.dttt); String da = dttt.getText().toString(); final Cursor cursor = db.getDa...
2018/03/20
1,085
3,614
<issue_start>username_0: I am trying to kill a process by name which i will pass as a variable to a system command. Below is what i have: ``` my $processName=$ARGV[0]; print "$processName\n"; system(q/kill -9 `ps -ef | grep '$processName' | grep -v grep | awk '{print $2}'`/); ``` The above script throws an error: ...
2018/03/20
1,171
3,871
<issue_start>username_0: I'm trying STL in c++ now and found a question that I didn's understand. I imagine a problem that needs to show each element and how many times that it occured in a vector. Since I knew how to use vector to finish this problem, I tried to use "set" or "map" to solve the problem. ``` vector v{ ...
2018/03/20
626
2,288
<issue_start>username_0: ``` #include #define SIZE 5 void verify(int a[],int,int); int main() { int a[SIZE],target,k=0; printf("enter the array elemans:\n"); for(int i=0;i ``` when i try to find a number not in the list/array i don't get the else statement execute but rather it displays segmentation error 11 pl...
2018/03/20
842
2,781
<issue_start>username_0: I try to add the `plpython3` extension to my `timescaledb`/`postgres` (based on linux alpine) image: ``` FROM timescale/timescaledb:0.9.0-pg10 RUN set -ex \ && apk add --no-cache --virtual .plpython3-deps --repository http://nl.alpinelinux.org/alpine/edge/testing \ postgresql-plpython...
2018/03/20
933
3,052
<issue_start>username_0: I am suing restassured for automating my apis, here is my jsonResponse:- ``` { "al": [{ "aid": 1464, "_r": "Bus Stand,", "_l": "spaze it park2,", "_c": ",", "_s": "Haryana,", "co": "India,", "pc": "122001",...
2018/03/20
592
2,806
<issue_start>username_0: I'm looking for best practices for the following design: I have an abstract class and every concrete class extending that abstract class should be a singleton. Background: The concrete classes are collectors that compile and log statistics about the operation of a complex legacy system. Colle...
2018/03/20
561
1,961
<issue_start>username_0: I am trying to implement a timer for calling the function for printing the queue after specific time .I am also able to cancel the timer if the queue gets filled before that specified time and print the queue.But after that my timer object behaves abruptly causing timers to overlap for example ...
2018/03/20
1,305
4,343
<issue_start>username_0: I am learning Go and I am on channels now. I have written a simple program using channels. I have created two channels and the channels are passed to a function which is called concurrently. My expectation is to print output form both the channels but in reality only one channel output is get...
2018/03/20
923
3,501
<issue_start>username_0: In my project I have a Polymorphic relation. This relation is as followes: ``` Plugins id - integer composer_package - string Themes id - integer composer_package - string Products id - integer name - text ... commentable_id - integer commentable_type - st...
2018/03/20
2,761
8,727
<issue_start>username_0: I am trying to create a neural network model to predict whether a signature is authentic or fake. I created the data set with 1044 signatures with authentic and fake signatures. This is the code for preprocessing the images ``` DATA = '../DATASET/DATA/' IMG_BREDTH = 150 IMG_HEIGHT = 70 # help...
2018/03/20
272
951
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/w0rGt.png)](https://i.stack.imgur.com/w0rGt.png) I'm trying to filter out rows on a particular column being blank. It doesn't seem to be delegable. I'm using sharepoint list as a datasource.<issue_comment>username_1: According to the d...
2018/03/20
402
1,454
<issue_start>username_0: I'm trying to 'translate' a SQL query to Mongoose, but it fails to return any results. Here's the SQL one: ``` WHERE (( a = 1 AND b = 1) OR ( c = 1 AND d = 1)) AND (date = '2018-03-20') ``` **Here the mongo query version:** ``` $and: [ { $or: [ {$and: [{searchCode: 123}, ...
2018/03/20
905
3,406
<issue_start>username_0: I am a bit confused about new rules about copy elision and actually I am not even sure if it applies in this case. I have this: ``` template struct foo { T t; foo(const T& t) : t(t) {} ~foo() { std::cout << "destructor \n"; } } template foo make\_foo(const T& t) { return {t}; } ``` whe...
2018/03/20
251
1,058
<issue_start>username_0: I want to save different revisions of a file from MKS Integrity using the Command Line Interface. The aim is to save these two files locally and use a script I wrote to compare them. When I check the member history I can double click on the Revision Number and the file opens up in the chosen ...
2018/03/20
177
619
<issue_start>username_0: I'm trying to get the total price after the value of the quantity is changed, but it reads NaN at the console JS ``` getTotal(){ this.totalPrice= (this.price) * (this.quantity) ; console.log(this.totalPrice) } ``` HTML ``` Price Quantity Total ```<issue_comment>username_1: Try u...
2018/03/20
967
3,361
<issue_start>username_0: I have an array of people with certain information about them. I want to filter this array according to religion, gender, and record number at the same time. Is there a way to do? Here is **PEOPLE** Array: ``` { "Id": 1270, "FirstName": "name", "LastName": "<NAME>", "Re...
2018/03/20
6,529
17,245
<issue_start>username_0: I have a problem with integrating Google Play Services into my Unity game. I am sure the setup is correctly done on the google play developer console/google play API, and even Unity. Using ADB Logcat, here is my error log text : <https://hastebin.com/varilupaxi.scala> (on short, the errors are ...
2018/03/20
555
2,162
<issue_start>username_0: I am newbie i want to remove the selected item from the `spinner` and also add the new item to the `spinner`.How can i do that.What i am trying is ``` adapter = ArrayAdapter.createFromResource(this,R.array.slot , android.R.layout.simple_spinner_item); adapter.setDropDownViewResourc...
2018/03/20
622
2,520
<issue_start>username_0: I am using google maps and drawing polylines on it by passing array of coordinates on each location update. After plotting the polyline i first remove the previous one and then i am plotting new polyline based on updated coordinates array list. Problem is, google maps is plotting a separate pol...
2018/03/20
981
2,935
<issue_start>username_0: I am facing this error while making request to fetch json from api. I can get json data using the "/v1/articles' path. ``` conn = http.client.HTTPSConnection("api.xxxx.com.tr") headers = { 'accept': "application/json", 'apikey': "<KEY>" } filter = "daily" conn.reques...
2018/03/20
854
2,942
<issue_start>username_0: I am trying to take mysql dump with command: ``` mysqldump -u xxxx -p dbxxx > xxxx270613.sql ``` what is command to take mysqldump with UTF8 ?<issue_comment>username_1: Hi please try the following. ```none mysqldump -u [username] –p[password] --default-character-set=utf8 -N --routines --ski...
2018/03/20
345
1,315
<issue_start>username_0: Is there an update all command for xcodebuild command line for a svn project? I am able to perform clean build and install and launch the app. Is there a Xcode command line buildaction to perform update all so as to get the latest changes made in the source code, updated in my local workspace ...
2018/03/20
1,506
5,678
<issue_start>username_0: I'm wondering how to do the following: So, I have here an example table: ``` ID: Name: Occupation: Startdate: Enddate: 1 John Journalist 01/01/2000 01/01/2000 2 John Baker 01/01/2002 01/01/2004 3 John Butcher...
2018/03/20
1,202
4,883
<issue_start>username_0: Till now what I know from my previous usages is that, ``` git checkout -b branchName ``` creates a new branch and switches the branch to branchName the new component origin/master is the part I have got no clue about. Note: while solving a merge conflict gitHub suggested the following ...
2018/03/20
940
3,812
<issue_start>username_0: I need to upgrade an application from spring-boot-1.2.5.RELEASE to spring-boot-2.0.0.RELEASE. I have this following code: ``` @Configuration @ComponentScan @EnableAutoConfiguration(exclude = {HibernateJpaAutoConfiguration.class, RedisAutoConfiguration.class}) public class NiceBootApplicationW...
2018/03/20
1,142
3,193
<issue_start>username_0: I need a regular expression or scripting code to select all the text between two outer brackets. Example of message Body : some text(text here(possible text)text(possible text(more text)))end text the result that i want Result: (text here(possible text)text(possible text(more text))) the se...
2018/03/20
779
2,356
<issue_start>username_0: İ try to use tensorflow image retraining. <https://www.tensorflow.org/tutorials/image_retraining> train like that and it is OK: ``` D:\dev\Anaconda\python D:/dev/detect_objects/tensorflow-master/tensorflow/examples/image_retraining/retrain.py --image_dir D:/dev/detect_objects/flower_photos -...
2018/03/20
369
1,243
<issue_start>username_0: In the (Ruby) documentation of Pact, there is the possibility to add a Provider base-state in the provider states. I'm using Pact.Net and use ProviderStateMiddleware, but I can't figure out how to set up the base-state with this implementation. Is it possible to do this and/or does anyone have ...
2018/03/20
926
3,803
<issue_start>username_0: Hello I'm trying to define relationships in my migrations I'm using on delete restrict to prevent deletion of parent record when child is present. but its not working. For example I have this event table (parent) that has editions (child). I'm using event\_id in editions table with `onDelete('...
2018/03/20
591
1,643
<issue_start>username_0: When I run the following code I get an KeyError: ('a', 'occurred at index a'). How can I apply this function, or something similar, over the Dataframe without encountering this issue? Running python3.6, pandas v0.22.0 ``` import numpy as np import pandas as pd def add(a, b): return a + ...
2018/03/20
856
3,065
<issue_start>username_0: I am newly with node js, and I would like to find recursively the closest package.json. Actually, continue finding package.json until will not hit it. My folder tree ``` root/ -contarats/ -proto/ some.proto -package.json "script": { "contracts": "generate-some-contracts contracts...
2018/03/20
1,143
3,743
<issue_start>username_0: I have a filemaker database and I want to show records based on the following criteria: Show all records in which either the owner or the user is "John" and the place is "London", "Paris" or "Amsterdam" The first part is easy: ``` Enter Find Mode [Pause:Off] Set Field [mydb::Owner; "John"] N...
2018/03/20
2,275
10,467
<issue_start>username_0: In my android project, I created Generic RecyclerView's Adapter class & Viewholder class like below, Adapter class, ``` public class BaseRecyclerViewAdapter extends RecyclerView.Adapter { private ItemClickListener itemClickListener; private List extends Object objectArrayList; private in...
2018/03/20
1,077
3,521
<issue_start>username_0: This is my code, we have database called "our\_new\_database". The connection is fine, as well as the HTML Form and credentials and I still cannot insert information into the database. Table is created, I can see the columns and lines in XAMPP / phpMyAdmin. The only error I'm getting is the ...
2018/03/20
1,246
4,480
<issue_start>username_0: I am trying to trigger a Dataflow pipeline from a Cloud Function which itself is triggered upon upload of a new file in a GCS bucket. When I upload a file, the Cloud function gets triggered properly but timesout after few seconds without any Dataflow being triggered. Below is my function code: ...
2018/03/20
1,720
4,954
<issue_start>username_0: Installed SSL in hosting. after installing it tried to change redirect in .htaccess for getting https:// with greenpad lock symbol but not working what i have tried is just forcing https in htaccess files it was not working. Below is the .htaccess code already present with my script. In that i ...
2018/03/20
798
2,796
<issue_start>username_0: I want to change automatically my total when I change quantity or price. I try to use this code, but nothing happens. My products are: `this.products = this.ps.getProduct();` ``` this.form= this.fb.group({ 'total': new FormControl('', [Validators.required, Validators.nullValid...
2018/03/20
2,301
8,677
<issue_start>username_0: I've followed the tutorial on the angular site (<https://angular.io/guide/http>) but I can't achieve what I want since I have an error that I don't understand. I've put my text file in the assets doc and created a config.json file where I entered the code from the tutorial. I get errors in my s...
2018/03/20
984
3,672
<issue_start>username_0: This is my **SearchForm.js** class, `experience` prop must be array of values with `id` and `name` ``` import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; class SearchForm extends React.Component { constructor(props) { super(props) this.sta...
2018/03/20
722
2,687
<issue_start>username_0: I'm following the doc (<https://dev.office.com/reference/add-ins/excel/excel-add-ins-reference-overview>) to build an Excel add-in. The add-in needs to populate an Excel table column with either dropdown or checkbox for the user to select actions to be done on the table row. I can't seem to fin...
2018/03/20
831
2,926
<issue_start>username_0: So the question is this : we have n classes (n intervals) with start time and finish time [si , fi] and we want to find the minimum number of classrooms which we can satisfy all the classes(intervals) without any collusion the book that I'm reading says we can solve this in O(nlogn) but i ca...
2018/03/20
701
2,386
<issue_start>username_0: I just want to know if it is possible in SQL Server 2008 to know the last SP/query that generated the "begin transaction" Thank you so much for your response<issue_comment>username_1: You can sort the events (an event is either the start of a class or the end of a class) by time. This will tak...
2018/03/20
1,206
3,521
<issue_start>username_0: i am working on a web application using codeigniter. i have a problem when i request the controller like this ``` http://localhost:8080/Saffron/Product/137/test-text ``` every thing is ok but when i request the controller like this ``` http://localhost:8080/Saffron/Product/137/مهارت-های-آ...
2018/03/20
862
3,233
<issue_start>username_0: I am building a weather application with ionic 3, my problem is when the response comes back (and I know the names of its keys) when I call one of them WeatherStorm (the IDE I am using) says: > > property 'current\_observation' does not exist on type object" > > > but the application is w...
2018/03/20
353
1,189
<issue_start>username_0: I recently downloaded and setup SonarQube using these instructions: <https://docs.sonarqube.org/display/SONAR/Get+Started+in+Two+Minutes> I now want to open the Update Centre to install the C++ community plugin. However, I cannot find the Update Centre in the web interface. Can anyone please g...
2018/03/20
1,824
6,290
<issue_start>username_0: I'm facing some problem with spritekit in swift. I was following closely to online tutorials (combining different tutorials into 1 project), trying out the code when I realised my SKSpriteNodes (my "player" and "enemy") ***sometimes*** go missing when I try it out on simulator or my iphone. ...
2018/03/20
293
1,115
<issue_start>username_0: how can I upload multiple images using a single file upload control in asp.net web forms? I am able to upload a single image file using file upload control but I want to make it more dynamic to upload multiple images by using one control. Can anyone help me out in this? Thankyou.<issue_comme...
2018/03/20
1,283
5,003
<issue_start>username_0: I follow the <https://cloud.google.com/translate/docs/reference/libraries#client-libraries-usage-java> to get started java client demo. I have already `set` **authentication json** file to the environment variable `GOOGLE_APPLICATION_CREDENTIALS`. However, I got the translateException when I ru...
2018/03/20
794
3,334
<issue_start>username_0: How does multi-core processors handle interrupts? I know of how single core processors handle interrupts. I also know of the different types of interrupts. I want to know how multi core processors handle hardware, program, CPU time sequence and input/output interrupt<issue_comment>username_1: ...
2018/03/20
928
3,708
<issue_start>username_0: I am trying to select values based on the following case statment ``` CASE when ty.type ='Catalog' and zs.name='Aries' or zs.name='Leo' AND ( CASE when actual_finish_date is not null then actual_finish_date when updated_finish_date is not null then updated_finish_date else baseline_finish_dat...
2018/03/20
1,767
6,986
<issue_start>username_0: I am trying to read data from firebase using angular 2 and typescript my code ``` export class DashboardComponent implements OnInit { itemsRef: AngularFireList; items: Observable; constructor( afDatabase: AngularFireDatabase) { this.itemsRef = afDatabase.list('/user\_orders/louro');...
2018/03/20
465
1,373
<issue_start>username_0: Is there a way do get the vsphere build versing using any API/SDK/REST? I know it's possible using powershell on vcenter for that, but it'd be great if there was another option. Like described here: <https://www.virtuallyghetto.com/2017/08/powercli-script-to-help-correlate-vcenter-esxi-vsan-b...
2018/03/20
1,050
3,816
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/MAH4S.png)](https://i.stack.imgur.com/MAH4S.png) I am a beginner I want to make a top bar button that has badge like the picture above, after searching on the internet, I can make the badge on the button by implementing the `SSBadgeBut...
2018/03/20
1,404
6,049
<issue_start>username_0: We are developing a .Net Core 2.1 Web API with JWT Bearer authentication. The application itself will generate and hand out tokens which are to be send to the backend. While we have everything up and running, i.e. we can send the bearer token from Angular and test it with Postman, Swagger won...
2018/03/20
1,540
5,217
<issue_start>username_0: I have an error when retrieving json data with retrofit2 in Android Studio. Last time i was try to retrieving data with json only 1 Response model, but now i just need to retrieving json data more than 1 table from database. Error ``` java.lang.IllegalStateException: Expected a string but was...
2018/03/20
919
3,142
<issue_start>username_0: ``` | <% if !f.paid %> <%= check\_box\_tag "pin\_number[]", f.id, checked= !f.paid? %> <%end%> | <%= f.year %> | <%= f.quarter %> | <%= number\_to\_currency(f.amount, unit: "", precision: 2)%> | mergecommonrows(); setTimeout(addpaidrows,1000); function addpaidrows(){ $(document).ready(...
2018/03/20
2,520
8,510
<issue_start>username_0: Here is output.json: <https://1drv.ms/u/s!AizscpxS0QM4hJo5SnYOHAcjng-jww> i have issues in sts:AsumeRole.Principal.Service part when have multiple Services ``` Principal": { "Service": [ "ssm.amazonaws.com", "ec...
2018/03/20
1,055
3,896
<issue_start>username_0: I'm Trying to call MySQL store procedure using Hibernate - JAVA When i run the following java method to execute the procedure, my table is getting locked and not returning any response. But Procedure is success when i run as mysql command. Procedure : ``` CREATE DEFINER = `root`@`%` PROCEDUR...
2018/03/20
471
1,786
<issue_start>username_0: When I run following query in **mysql 5.5**, I can see the table has a default value `''` for the primary key even though I've not specified it ``` CREATE TABLE `test1` ( `id` VARCHAR(10), `data` VARCHAR(50), PRIMARY KEY (`id`) ); ``` When I run following query in **mysql 5.5**, I can ...
2018/03/20
1,765
6,566
<issue_start>username_0: there is a table containing a column of type `SDO_GEOMETRY` representing some points. Later a spatial query like 'show all other points within distance x' shall be executed. After pumping some data via `sqlloader` into a import-table I am going to bring these datasets into a base-table while me...
2018/03/20
664
2,409
<issue_start>username_0: I have created class models using **HTTP networking library Alamofire** which contains following data: ``` class MyData: NSObject { var name = "" var params = PublicData() func initUserWithInfo(userInfo: [String : AnyObject]) { if let name = userInfo["name"] as? String ...
2018/03/20
442
1,675
<issue_start>username_0: Using PHP and DOMDocument class to parse HTML from TinyMCE editor. I'm having issues inserting `---` elements into the editor, because DOMDocument keeps losing the rest of the code. ``` # Input: --- test input $domDoc = new DOMDocument(); $domDoc->loadHTML($input, LIBXML_HTML_NOIMPLIED | L...
2018/03/20
1,570
6,600
<issue_start>username_0: I need to check if some value is null or not. And if its not null then just set some variable to true. There is no else statement here. I got too many condition checks like this. Is there any way to handle this null checks without checking all method return values? ``` if(country != null && c...
2018/03/20
582
1,885
<issue_start>username_0: Here i want the div to be shown if the specified value is present or selected and the div should be hide if the specified value is not selected. here is my code ``` 1 2 3 4 5 Q ``` here is html ``` Count: ``` Here is the script ``` $(document).ready(function(){ $('#qarant...
2018/03/20
312
1,058
<issue_start>username_0: I `ssh` connect to a Linux server and want to save all the output from the server tty(console) to a log file, for later read/search. For example, if I do `echo "dafds"` and then `ls` in `bash`, I want the log file to have the following content, or maybe something similar: ``` bash-4.4$ echo ...
2018/03/20
280
902
<issue_start>username_0: Suppose I'm editing file **a.txt** on a buffer, then run `:E.` and from the netrw open another file, say **b.txt**. Now if I hit `CTRL`+`O`, I'm back on **a.txt** and not into the netrw explorer. `:jumps` has not registered the Netrw location. Is there any way to make netrw dir locations to...
2018/03/20
629
2,186
<issue_start>username_0: I've searched around for a while now on how to generate a shortened url (e.g. how bit.ly or goo.gl work) but have been unsuccessful. I presumed it would be something like: ``` baseN(hash(long_url)) ``` But I always end up with a very long digest instead of something short like 6 characters....
2018/03/20
663
1,979
<issue_start>username_0: My environment is: * CentOS 6.9 * Ubuntu 16.04 LTS The GNU coreutils 8.4 has the test command to check the file using `-f` option. `man test` shows > > > ``` > -f FILE > FILE exists and is a regular file > > ``` > > The definition of the "regular file" is ambiguous for me. ...
2018/03/20
347
1,388
<issue_start>username_0: I've created my own Route file using AppServiceProvider, ``` public function boot(){ $this->loadRoutesFrom('routes/test/routes.php'); } ``` The routes are working but they doesn't found the Controllers ``` Route::get('/test', 'TestController@test'); ``` ReflectionException (-1) Class ...
2018/03/20
1,118
3,360
<issue_start>username_0: I am able to work with Truffle and Ganache-cli. Have deployed the contract and can play with that using truffle console ``` truffle(development)> Voting.deployed().then(function(contractInstance) {contractInstance.voteForCandidate('Rama').then(function(v) {console.log(v)})}) undefined truff...
2018/03/20
933
3,979
<issue_start>username_0: I want to offer users of my application to download a docx file which would contain dynamic content depending on their request. I prepared a template with header, otherwise the OpenXML creation is pain in the somewhere. Now I am having trouble with editing it and returning it as FileResult in ...
2018/03/20
2,072
7,159
<issue_start>username_0: I want to show the date picker Dialog on Android. Now I can choose only Normal Date. How I can convert it to hijri(islamic) Calendar? Here is the code I am using to show the Dialog, Code to Show Date-picker Dialog ``` private void showDOBPickerDialog(Context context, String DateString) { ...
2018/03/20
1,614
4,901
<issue_start>username_0: So I was making an application using C++ Console, with multi threading as below, then I got an error 0x0000005. The first time it run it was working as usual. Can anyone help me with this problem? I am using Code::Blocks IDE with Borland C++ 5.5, and I am planning to make this into Borland C+...
2018/03/20
1,026
2,834
<issue_start>username_0: I have a table like this: ``` +-----+------+ | acc | CASE | +-----+------+ | 001 | a | | 001 | b | | 001 | c | | 002 | a | | 002 | b | | 003 | b | | 003 | c | | 004 | a | | 005 | b | | 006 | b | | 007 | a | | 007 | b | | 007 | c | | 008 | a | | 008 | ...
2018/03/20
847
2,727
<issue_start>username_0: I am currently building a UWP app which overrides user's accent colors. I changed it this way: ``` #fff001 ``` Now every control in the app uses this accent color, which is pretty great! But then the Permission Dialog still has the user's accent color. For example, I use Blue as ...
2018/03/20
1,577
6,310
<issue_start>username_0: I have two tables that I want to join. Both tables are containing some varchar columns that I use to join them. However, running queries to make calculations using varchar columns in order to join, is a slow process. So, I would like to transform these varchar columns to unique integer ids so t...
2018/03/20
807
2,699
<issue_start>username_0: I want to create a local inverted theme (modern browsers). Color shades are set using CSS Vars (CSS custom properties). Some elements have more contrast, others are low contrast. Now the inverted container has a black background. Everything within there, should be reversed. Dark grey should be ...
2018/03/20
1,468
4,697
<issue_start>username_0: i have 3 tables customers, times and sales i want to find out all the customers income yearly condition is that customers with no children and income must be greater than a limit we are set my table structure customers ``` CREATE TABLE `customers` ( `customer_id` int(11) DEFAULT NULL, `acc...
2018/03/20
696
1,960
<issue_start>username_0: In my case I have a list of dicts that contains other several list of dicts. ``` l = [{ 'a': [ { 'b': 4} ] }, { 'a': [ { 'b': 3} ] }] ``` What I would technically like to do would be to sort using the path ['a'][0]['b'] using the sort filter of jinja2. Is it possible in some...
2018/03/20
627
2,509
<issue_start>username_0: I am working on angular 2 project and I am having an issue when I am trying to change the list . NgFor not recognizing the changes , and displaying only the list loaded at first time . here is an example code when I am loading all list and imminently after loading I reset it with null . the vi...
2018/03/20
450
1,079
<issue_start>username_0: The objective of task required to produce an array output such that `output[i]` is equal to the sum of all the elements of nums except `nums[i]`. Eg: given `[6,7,8,9]`, return `[24,23,22,21]`. `Input = [6,7,8,9]` The calculation behind is ``` 0+7+8+9 = 24 6+0+8+9 = 23 6+7+0+9 = 22 6+7+8+0 ...
2018/03/20
1,141
3,956
<issue_start>username_0: I'm trying to create a script to download subtitles from one specific website. Please read the comments in the code. Here's the code: ``` import requests from bs4 import BeautifulSoup count = 0 usearch = input("Movie Name? : ") search_url = "https://www.yifysubtitles.com/search?q="+usearch b...