date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/15
2,608
8,967
<issue_start>username_0: I need to work with an intricate configuration of repositories. I have 5 of them: 1. A remote central repository on machine 1. 2. My local repository on my notebook (machine 2). 3. A bare repository on machine 3. 4. A repository on machine 3. 5. A repository on machine 4 where we do code revie...
2018/03/15
357
1,204
<issue_start>username_0: I an having trouble understanding why the "square" class isn't relative to the parent, "container". i.e - I set the container to have a height of 200px; the "square" class is inside the container, and is floated left. When I set margin-top to be 5%, it is not the 5% of 200px but something e...
2018/03/15
361
1,198
<issue_start>username_0: I have the following json file in mongodb: ``` { "_id" : ObjectId("59de156faf75d539b47e8db3"), "user" : "user1", "item" : { "32a1fsd32asfd65asdf65" : { ... }, "32a1fsd32asfd555" : { }, ... } } ``` I want to perform a query and delete one of the two items. As a matt...
2018/03/15
3,680
11,958
<issue_start>username_0: I need to join many tables on one main table, from which I need all the rows. Should I do left join for all of them in the same query or should I use temp tables, physical intermediary tables or window functions? Currently the query will take very long time to complete for some 85K rows with ...
2018/03/15
515
1,951
<issue_start>username_0: I want to integrate Firebase Crashlytics into my Android game (developed using Cocos2D-X engine). I have followed the steps mentioned in [this link](https://firebase.google.com/docs/crashlytics/get-started). I'm getting following error when building the project using Android Studio: ``` ERRO...
2018/03/15
1,015
4,291
<issue_start>username_0: I have a loop that creates 34 buttons, how would i set a different onclick for each one? ``` while(i<34) { Button btnTag = new Button(this); btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)...
2018/03/15
931
3,877
<issue_start>username_0: How do i set counter for separate 3 buttons that will increase by 5, 10, 20 if clicked. Suppose, Button A will count 5 if clicked Button B will count 10 if clicked Button C will count 20 if click and, It will Increase on Every Click.....<issue_comment>username_1: ``` public void createButto...
2018/03/15
681
2,145
<issue_start>username_0: I have an object like this: ``` myObject: { items: [{ title: '140', isActive: true, }, { title: '7', isActive: false }, { title: '10', isActive: false }] } ``` Which I'm using like this: ``` ``` This is how the component looks like: ...
2018/03/15
754
2,502
<issue_start>username_0: I'm trying to Graph Excel data using ChartJS. Visual Studio is saying that `List does not contain a definition for Answers.` I can't find anything wrong with my code, though. Though, I've only been using VS for the past two days. Can someone look at my code and maybe find a mistake, or two?...
2018/03/15
702
2,280
<issue_start>username_0: I'm trying to use ip-api.com/php but there's a very slow response on my server and I figured out that it is because of the file\_get\_contents So basically, I have a pretty simple script (got from github I think) ``` function get_ip() { //Just get the headers if we can or else use th...
2018/03/15
771
2,626
<issue_start>username_0: There are 2 divs. div1 and div2. Initialy, div1 is shown and div2 is hidden. Onclick of a button, div1 has to be hidden and div2 should be displayed in the place of div1.<issue_comment>username_1: I would have done like below in simple HTML and JQuery as below: ``` function ToggleDiv() { ...
2018/03/15
984
3,501
<issue_start>username_0: newbie here... my root view controller has the following code: ``` func showVC1() { let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil) let vc1 = storyBoard.instantiateViewController(withIdentifier: "first") self.present(vc1, animated:true, completion:nil) } fun...
2018/03/15
1,201
4,189
<issue_start>username_0: Ok, so currently I've got kubernetes master up and running on AWS EC2 instance, and a single worker running on my laptop: ``` $ kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready master 34d v1.9.2 worker Ready 20d v1.9.2 ``...
2018/03/15
917
2,872
<issue_start>username_0: I'm trying the following tutorial. [Automatic serverless deployments with Cloud Source Repositories and Container Builder](https://cloudplatform.googleblog.com/2018/03/automatic-serverless-deployments-with-Cloud-Source-Repositories-and-Container-Builder.html) But I got the error below. ``` $...
2018/03/15
1,055
3,268
<issue_start>username_0: Flexdashboard allows to specify three sectors for its gauges: "danger", "warning" and "success". I want to use 5 gauge sectors to show in which interval my observed value lies. I calculated confidence intervals with alpha 0.2 (80 %) and 0.01 (99 %) and use this to define 5 sectors: ``` Sector ...
2018/03/15
1,092
4,549
<issue_start>username_0: Why can't I make second constructor using switch case statements that refer input to the first constructor? It shows error "Constructor call must be the first statement in a constructor using this". So it seems that I have to retype assignments from 1st constructor for every case statement in t...
2018/03/15
1,198
4,410
<issue_start>username_0: I looked through the internet and couldn't really get an answer, if I have a process that is heavy on CPU usage, and I would like to present a progress bar while it's running (so the program will not get in the state of "not responding") on another thread probably, how do I do that?<issue_comme...
2018/03/15
593
2,094
<issue_start>username_0: I am using react router in and I want to disable the to attribute in a certain state. I passed empty string, but that doesn't disable the link instead it takes to the base route of the page. I even tried to pass null but that breaks the code. Is it even possible to do so? ``` ```<issue_commen...
2018/03/15
1,238
4,792
<issue_start>username_0: I need to save user information from a register form to mongodb. Everything works well except the image file. I am using Multer for uploading images from form to server. Also to show that image in the profile page once the user logged in. Below is the code: signup.ejs: ``` Profile Pictu...
2018/03/15
998
4,080
<issue_start>username_0: I am using nodeJS and mongodb in one of my project. I am trying to save data in multiple collection in one save button. The code which I am using to achieve this is as follow: ``` var lastInsertId; loginData={ userName: req.body.txtUsername, password: <PASSWORD>, acti...
2018/03/15
1,191
4,025
<issue_start>username_0: I'm currently in the process of updating some apps to the latest Swift 4 syntax and have run into a problem, and I'm sure I'm just missing something really obvious. Initially my code was as follows: ``` let indices : [Int] = [0,1,2,3] //let newSequence = shuffle(indices) let newSe...
2018/03/15
546
2,316
<issue_start>username_0: Dear Stackoverflow Users, I haven't seen any examples regarding this question, but I should probably mention my plan first. I have three different pages, that basically share many FormGroups. Their differences are basically minimal, maybe one or two FormControls. Of course, I could basically...
2018/03/15
1,341
4,816
<issue_start>username_0: Inspecting memory leakage on one of my apps, I've found that the next code "behaves strange". ``` public String DoTest() { String fileContent = ""; String fileName = ""; String[] filesNames = System.IO.Directory.GetFiles(logDir); List con...
2018/03/15
845
2,917
<issue_start>username_0: See the code snippet below: ``` #include using std::vector; int main() { vector a; auto &⁢=--a.end();//what?the hint tell me it deduces a lvalue reference type! } ``` We all know that a self-defined class with `operator --` returns a **xvalue** when the operand itself is a rvalue, like `--...
2018/03/15
459
1,733
<issue_start>username_0: My Xamarin form apps was running like 5 minutes ago then all of sudden it stop working. The apps close instantly after it started. Below shows message display at Visual studio output, ``` Assembly Loader probing location: 'System.Buffers'. Could not load assembly 'System.Buffers' during start...
2018/03/15
477
1,657
<issue_start>username_0: I'm working on a simple comments removal script in PHP. What I'd like to do is loop this entire script for all the files in the same directory. At this point I'm not concerned with subdirectories or subfolder. This example only has 1 file. I know we need to do a do..while loop but what would be...
2018/03/15
994
2,923
<issue_start>username_0: Analysing project with this command ``` .\gradlew sonarqube \ -Dsonar.host.url=http://my.url \ -Dsonar.login=login --stacktrace ``` Getting this error > > org.gradle.execution.TaskSelectionException: Task '\' not found in root project 'JavaLint' > > > And here is my gradle file `...
2018/03/15
687
2,134
<issue_start>username_0: I have a Javascript Array filled with mean Values and I want to insert them into a collection with a field named "mean". The Field "mean" already exists and has already values in them and now I want to update them with the values of the Array. To be more specific: I want the first Value of the ...
2018/03/15
1,270
3,955
<issue_start>username_0: I have a dataframe with columns: 1. `diff` - difference between registration date and payment date,in days 2. `country` - country of user 3. `user_id` 4. `campaign_id` -- another categorical column, we will use it in groupby I need to calculate count distinct users for every `country`+`campa...
2018/03/15
1,525
5,941
<issue_start>username_0: Suppose I'm trying to create a collector that aggregates data into a resource that has to be closed after usage. Is there any way to implement something similar to a `finally` block in a `Collector`? In the successful case this could be done in the `finisher` method, but there does not seem to ...
2018/03/15
1,246
4,278
<issue_start>username_0: I am running the following query: ``` SELECT * INTO dbo.2015_10_2_cs FROM dbo.2015_10_2 IF NOT EXISTS (SELECT type FROM sys.indexes WHERE object_id = object_id('dbo.2015_10_2_cs') AND NAME ='cci' AND type = 5) BEGIN CREATE CLUSTERED COLUMNSTORE INDEX cci ON dbo.2015_10_2_cs DROP...
2018/03/15
1,314
2,896
<issue_start>username_0: I have a list of data frames, I want to add a column to each data frame and this column would be the concatenation of the row number and another variable. I have managed to do that using a for loop but it is taking a lot of time when dealing with a large dataset, is there a way to avoid a for ...
2018/03/15
1,646
3,373
<issue_start>username_0: i am trying to hold some data of $i variable using cut command in another variable like ip and port number so that i can store both ip and port into database but this output creating issue to hold data due to next line please help.. ``` foo=( $(grep logs data.txt) ) for i in "${foo[@]}...
2018/03/15
601
2,284
<issue_start>username_0: I have a function that uses the params keyword to allow me to pass multiple objects to it: ``` public IEnumerable GetMyObjects(params FilterObject[] filters) return service.GetObjectsFromDatabase(filters); } ``` So it can be called like: ``` GetMyObjects(filter1, filter2, filter3); ``` M...
2018/03/15
948
4,112
<issue_start>username_0: **I am trying to merge the videos from the array of avssets but I am able to get only first and last video. Videos between the array are showing black area. Check the code I am using.** ``` func mergeVideoArray() { let mixComposition = AVMutableComposition() for videoAsset in video...
2018/03/15
1,226
4,594
<issue_start>username_0: I am new to SAPUI5. Currently I am trying to create a simple app, showing a table based reporting with data from an SAP-system (odata). I use the SAP Web IDE as environment. In the first attempt, I used the standard control sap.m.table. The worked fine for me. Now I wanted to use a simple sort...
2018/03/15
1,075
3,374
<issue_start>username_0: How to find in the text file using Vim how many times specific word repeats. For example, I want to see how many times word "name" repeats in the code: ``` "collection": "animals", "fields": [ { "field": "id", "name": "" }, { "field": "age", ...
2018/03/15
1,044
3,714
<issue_start>username_0: ``` $scope.populateMap=[{name: "ABC", code: "123"}, {name: "XYZ", code: "345"}] ``` //Want to send model name + value of model Currently sending ngObject.MainObj.specificFormatObj HTML ``` {{i.name}} ``` JS ``` // CONTROLLER CODE JSON parse object to get name and code GOT parsedObj $s...
2018/03/15
1,999
8,101
<issue_start>username_0: Django provides a really nice feature called `makemigrations` where it will create migration files based on the changes in models. We are developing a module where we will want to generate custom migrations. I haven't found much info about creating custom migrations in the Django docs. There i...
2018/03/15
596
2,091
<issue_start>username_0: I have problem with `HWIOAuthBundle` and `vk.com`, everything works, but some time ago I found face to face with error, after oAuth with `vk.com` ``` 'Cannot register an account.' ``` I found this place `vendor/hwi/oauth-bundle/Controller/ConnectController.php:106` ``` if (!($error ...
2018/03/15
2,730
9,160
<issue_start>username_0: I have a complex model written in Matlab. The model was not written by us and is best thought of as a "black box" i.e. in order to fix the relevant problems from the inside would require rewritting the entire model which would take years. If I have an "embarrassingly parallel" problem I can us...
2018/03/15
482
1,830
<issue_start>username_0: I'm doing a research about how memory is managed in RTEMS using an ARM-based Xilinx Zynq. The program runs on two cores with SMP. I have read about memory barriers and out-of-order execution paradigm, I concluded that a barrier or a fence is a hardware implementation rather than software. RAM...
2018/03/15
467
1,519
<issue_start>username_0: My current url is: <https://localhost:8080/MyApp/manager/dashboard> Within the above url I want to fetch only <https://localhost:8080/MyApp/> part. Is there any way to fetch this without hard coding anything?<issue_comment>username_1: If you want to get the domain name and application name ...
2018/03/15
876
2,378
<issue_start>username_0: The following below is a portion of our logs from our application in production. We are using **log4j** With configuration: ``` [INFO ] 2018-03-10 15:47:16.905 [WebContainer : 23] Logger - [INFO ] 2018-03-10 15:47:16.905 [WebContainer : 23] Logger - [INFO ] 2018-03-10 15:49:27.320 [WebContai...
2018/03/15
952
3,060
<issue_start>username_0: I'm trying to work which IP addresses comes from a certain company. There are 4 different groups of IP addresses with different ranges for each company. On sheet 1, in column (A) has all of the IP addresses listed and on sheet 2 there are 4 columns with each company name and their range of IP...
2018/03/15
355
1,170
<issue_start>username_0: This is something that's been bugging me for a while... So far I've been working around it by committing and pushing via terminal, but it would be nice to get it sorted. In Xcode, there are two remotes listed in the source control navigator of my project. [![](https://i.stack.imgur.com/euvKE.p...
2018/03/15
1,805
6,781
<issue_start>username_0: In natural language it is quite common to have quotation marks within quotation marks, as in, for example: (1) "This sentence is not a "sentence" " (2) "‘S’ is true in language L iff S" (2) is in fact important for any Tarskian truth-definition (Tarski argued the truth of every instance of (...
2018/03/15
1,938
5,934
<issue_start>username_0: C# 7.2 introduced [reference semantics with value-types](https://learn.microsoft.com/en-us/dotnet/csharp/reference-semantics-with-value-types), and alongside this Microsoft have developed types like [`Span` and `ReadOnlySpan`](https://github.com/dotnet/corefxlab/blob/master/docs/specs/span.md) ...
2018/03/15
2,689
8,211
<issue_start>username_0: I am new to Hadoop and learning few mapreduce program. I was trying to read a CSV file using a Mapper class. The CSV contains header and the values till 20 columns. The strange thing is while reading the CSV file the program was working fine till the point where I am reading the 17th index but ...
2018/03/15
1,042
3,996
<issue_start>username_0: Is there any way of seeing the full logcat log? I have an error in my app but I don't have time to see it because lots of text appears after the error and goes past the limit of lines in the logcat. So even if I go to the top the error is already gone.<issue_comment>username_1: Ok, so while I w...
2018/03/15
494
1,849
<issue_start>username_0: The way we are used to debug a running "IISExpress" process in .Net Framework is by attaching a process by the name "iisexpress.exe" in Visual Studio. But attaching the iisexpress process is not working in .Net core. It shows the message - "The breakpoint will not currently be hit. No symbols h...
2018/03/15
563
2,044
<issue_start>username_0: What's the difference between storing files (images) in `public/images` folder and storing them in `storage/app/public`?<issue_comment>username_1: The `public/images` is a webroot directory. This means that it can be accessed via a web browser `mozilla, chrome, etc...` The `storage/app/public...
2018/03/15
1,265
4,717
<issue_start>username_0: I have created a new project including c++ ndk. So it automatically created a `CMakeLists.txt` file and a `cpp` directory. But When I created a new directory named `jni` and tried to put `test.c`, `Android.mk` and `Application.mk` files on it, I got this error message when I wanted to sync my p...
2018/03/15
380
1,208
<issue_start>username_0: I have an SCNText node displayed in the AR screen. I am trying to animate it by using SCNAction property. But it is not working properly. Is there any other way to animate the node? Also if I want to insert an image in place of the text what should I do? I know I can't add it as a geometry. S...
2018/03/15
676
3,227
<issue_start>username_0: I have a javascript code that i use to change the contents of a jsp page dynamically.But the code i giving a **not a function error** when using the javascript function.Event i tried to use the jquery expression but i am getting error for that to.i am including the script at the end to the body...
2018/03/15
365
1,229
<issue_start>username_0: I'm having trouble creating a vector of vectors of objects. The goal is to get something like a chessboard, with each of the fields beeing an object which can then be accessed by using the vector. ``` #include using namespace std; class raster; class field{ int x, y; public: field(int x,...
2018/03/15
405
1,352
<issue_start>username_0: I have two versions of python ( 2.7 and 3.6.4) installed on `ubuntu 16.04`. Now I only want to work on 3.6. I want to install few packages like `pandas` and `psycopg2`. I tried to install it with `pip3 install pandas` and it shows successfully installed. However, when I am trying to import ...
2018/03/15
360
1,176
<issue_start>username_0: I'm implementing a button to refresh a value on my HTML page and I put a refresh icon inside the button. And by doing this I saw that i could use a glyphicon : ``` ``` or use an image : CSS: ``` .buttn{ background:transparent url(/reload.png) no-repeat left; } ``` HTML: ``` ``` What...
2018/03/15
345
1,218
<issue_start>username_0: I made a tableview with some labels, the labels all have a border so it looks like a nice table. However, if the label text is aligned to the right, the text is directly placed against the border. I've tried adding a space after the text, but it seems like Android just trims these spaces. Is ...
2018/03/15
393
1,306
<issue_start>username_0: Why after moving dev server to production all authentication requests begun returning with 401 status: ``` // $request contains 'passport' and 'username' fields $request->request->add([ "client_id" => 'env('PASSPORT_CLIENT_ID')', "client_secret" => 'env('PASSPORT_CLIENT_SECRET')', ...
2018/03/15
297
970
<issue_start>username_0: Can someone say how to push data from hive to hdfs. I could find how to export data from hdfs to hive but not regarding hive to hdfs. Any help great thanx..<issue_comment>username_1: Have you tried virtual environments? [revelant documentation](http://docs.python-guide.org/en/latest/dev/virt...
2018/03/15
453
1,348
<issue_start>username_0: I am using below code for sending mail with cc and bcc. ``` $headers="From: $name <{$fromAddress}>\r\n". "Reply-To: <EMAIL>\r\n". "Cc: <EMAIL>\r\n". "BCC: <EMAIL>\r\n". "MIME-Version: 1.0\r\n". "Content-type: text/html; charset=UTF-8"...
2018/03/15
4,117
11,078
<issue_start>username_0: I am looking for the fastest way to convert a stream of integers into a list that counts consecutive ones and zeros. For example the integers `[4294967295,4194303,3758096384]` are at bit level: ``` 11111111111111111111111111111111 11111111111111111111110000000000 0000000000000000000000000...
2018/03/15
3,588
9,890
<issue_start>username_0: I am doing facebook login in iOS(swift) . I have already done all the stuff related to pod install carefully, but while importing 'FacebookLogin' I am getting error like "No Such Module FacebookLogin". I had gone through all the possible options, but I couldn't get a satisfactory solution yet....
2018/03/15
854
2,434
<issue_start>username_0: I am trying to create calendar table using this PL/SQL script from Oracle site: [Date Dimension Data Generator](https://livesql.oracle.com/apex/livesql/file/content_D483FJ633JTDU61TWX2N71EC3.html) Everything works good, but I cannot run statement from section 5: ``` SELECT * FROM TABLE(UDF_C...
2018/03/15
734
2,470
<issue_start>username_0: The `File::Temp` module is not deleting the file on exit. I create a temp file and pass that file to other functions in which the file is opened for reading and writing. Here is the code : ``` #!/usr/bin/perl use strict ; use warnings ; use Data::Dumper; use File::Temp qw/ tempfi...
2018/03/15
439
1,273
<issue_start>username_0: My gitlab CI is as follows: ``` stages: - test cache: key: ${CI_COMMIT_SHA} paths: - mymark test: stage: test script: - ls -l - echo "hi" > mymark - ls -l tags: - myrunner only: - dev ``` The file `mymark` is created by the build scripts: ``` $ ls -l ...
2018/03/15
2,141
5,345
<issue_start>username_0: I am looking to count consecutive day spells for each individual person. My tables: ``` CREATE TABLE Absence( Date Date, Code varchar(10), Name varchar(10), Type varchar(10) ); INSERT INTO Absence (Date, Code, Name, Type) VALUES ('01-10-18', 'S', 'Sam', 'Sick'), ('01-11-18','S', 'Sam', 'Sic...
2018/03/15
410
1,556
<issue_start>username_0: I'm making C# application for Universal Windows Platform (UWP) and I would like to bind manually to the xaml element from the properties (Create Data Binding... after clicking on rectangle next to ie. Content in Button Properties). Binding is of course working when I type `Content={Binding Te...
2018/03/15
381
1,110
<issue_start>username_0: Any one tell me how to filter date from json date format. I want to disply like eg,wed, 07 Mar 2018. My code is, ``` {{item.date}} ``` my json is, ``` "date": "Wed, 07 Mar 2018 00:00:00 PST", ```<issue_comment>username_1: use pipe "|" here is the link to the documentation <https://doc...
2018/03/15
642
2,379
<issue_start>username_0: ``` [Vue warn]: Property or method "onlyNumbers" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. {{ input.placeholder}} {{ select.placeholder }} ``...
2018/03/15
1,497
6,077
<issue_start>username_0: I'm using Laravel 5.6 and yajira datatables plugin. I want to display user status in one of the columns which is a number from 0-5 in the database but I want to show and display it in the column as words, (New, Updated, Initial, etc.) Method to make the datatable: ``` public function usersDa...
2018/03/15
1,342
5,595
<issue_start>username_0: I followed [this](https://github.com/Grishu/BackgroundLocationUpdate/blob/master/app/src/main/java/com/google/android/gms/location/sample/locationupdates/MainActivity.java) to Get Location Coordinates For Every 10 Seconds So Now Here I want to Change the Activity to Service So that I will sta...
2018/03/15
670
2,184
<issue_start>username_0: I am trying to importTA-Lib in python but getting an error: > > Traceback (most recent call last): > File "", line 1, in > File "/home/arque/anaconda3/lib/python3.6/site-packages/talib/**init**.py", >line 43, in > from .\_ta\_lib import ( > ModuleNotFoundError: No module named 'talib.\_...
2018/03/15
995
3,457
<issue_start>username_0: I'm writing a method that returns a `Set`. The set may contain 0, 1, or 2 objects. The string keys are also quite small (maximum 8 characters). The set is then used in a tight loop with many iterations calling `contains()`. For 0 objects, I would return `Collections.emptySet()`. For 1 object,...
2018/03/15
636
2,336
<issue_start>username_0: I have a view that that I have written in HTML and PHP that is like the following: ``` Please select php foreach ($categories as $contents ) {? php echo $contents-name;?> php }? ``` Now, I want to get `php echo $contents-name;?>` when the onChange function is called. I tried to resolve it...
2018/03/15
519
1,863
<issue_start>username_0: Trying to get a reference to a radio group defined in the xml file. Usually I use `findViewById(R.id.idAll);` to get a reference to a ui object. Cant figure out how to do it for a `RadioGroup`.<issue_comment>username_1: ```html Please select First Second function submitTheForm(sel) {...
2018/03/15
582
2,154
<issue_start>username_0: I'm having a requirement of draw a border around a parent layout in `Xamarin.Android` it can be any layout like `FrameLayout`, `LinearLayout` etc. I have achieved this by using GradientDrawable - Which is just like setting a background for the layout with a shape. So my requirement will be a...
2018/03/15
752
2,398
<issue_start>username_0: Trying to deploy a Flask app on Heroku, used to work perfectly with other apps, but now when I try to upgrade the db with: ``` >:heroku run python manage.py db upgrade ``` I get the following error: ``` Traceback (most recent call last): File "manage.py", line 121, in manager.run() Fil...
2018/03/15
177
683
<issue_start>username_0: when user swipe my app from recent apps, how can we show notification, any help appreciated.<issue_comment>username_1: This happened to me ! Here is how I solved the problem: I logged into my dyno using ``` heroku ps:exec ``` Then I went to my migrations folder, and the env.py was not th...
2018/03/15
477
1,463
<issue_start>username_0: How do I check if a MongoDB id is a valid BSON? This is what I have at the moment ``` public function findOne($id=""){ if($BSON_id = new \MongoDB\BSON\ObjectId($id)){ $user = $this->collection->findOne([ '_id'=> new \MongoDB\BSON\ObjectId($id) ]); if(!$user){ return false; } ...
2018/03/15
413
1,583
<issue_start>username_0: Some day ago i'd write for asking what was the problem about onclick event doesn't activate when i clicked in a specific area of the browser. After check a guide i find it the problem end also the rappresentation of my simply test is trivial, i've known the mechanism for activating a particular...
2018/03/15
235
903
<issue_start>username_0: I wrote the following code to toggle between showing and hiding content. This works fine. ```html Simple collapsible Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercit...
2018/03/15
482
1,953
<issue_start>username_0: I have only one edit text field to accept email or phone number. how to change the input type based on the 1st character ? based on user input i need to perform different operations.. The main thing is i should identify whether that is email or phone number. how to do this?<issue_comment>userna...
2018/03/15
367
1,597
<issue_start>username_0: What I need to do is share location from one android device and show it on another device(not necessarily android, even web would be fine). I can think of following solutions as of now. 1. Use GPS to get latitude and longitude from android device and send it to a server after fixed intervals(e...
2018/03/15
364
1,275
<issue_start>username_0: I have try to use php to get Github release's tag\_name,but in vain. The link is [Latest Release](https://api.github.com/repos/carry0987/Messageboard/releases/latest) ``` php ini_set('user_agent', 'Mozilla/4.0 (compatible; MSIE 6.0)'); $json =file_get_contents("https://api.github.com/repos/...
2018/03/15
566
2,102
<issue_start>username_0: Using this JSON object as an example: ``` { data: [ { type: "animal" name: "dog" consumes: "dog food" }, { type: "plant" name: "cactus" environment: "desert" } ] } ``` Note the `animal` and `plant` types have some different properties a...
2018/03/15
536
2,130
<issue_start>username_0: I am trying to launch chromium browser with selenium python on windows 8. Added `binary_location` as chromium binary location which is appdata. But still chromedriver starts google chrome instead of chromium. If I uninstall google chrome, then chromedriver by default launches chromium. But w...
2018/03/15
1,369
4,023
<issue_start>username_0: I want to count the average value of the odd numbers from a list of numbers. I have a starting code to count the average, but I don't know how can I choose only the odd numbers from the list? Here is my code: ``` var numberArray = [1,2,3,4,5,6], thisTotal=0,thisAverage=0; for (var i=0; i ``...
2018/03/15
548
2,103
<issue_start>username_0: Using `For Each` loop I measure the size of "X" labels from a `FlowLayoutPanel` control: ``` For Each _Label As Label In _FlowLayoutPanel.Controls Dim _TextSize As System.Drawing.Size = TextRenderer.MeasureText(_Label.Text, _Label.Font) _Label.Size = New Size(_TextSize.Width, _TextSize...
2018/03/15
676
2,397
<issue_start>username_0: I am having a dataframe like ``` x y _ _ 1 10 2 30 3 50 4 24 5 36 6 45 ``` I want to append another column z which will be depending on the value of y. So i created a function ``` def GiveNumVal(col: Column) => Integer = { if(Column>=0 && Column<15){ return 1; ...
2018/03/15
1,209
4,004
<issue_start>username_0: I want to make a portable `opencv` application which the dependency is added to maven file `pom.xml`. Simplified code is : ``` import org.opencv.core.Mat; public class Builder { public static void main(String[] args) { nu.pattern.OpenCV.loadShared(); System.loadLibrary...
2018/03/15
157
484
<issue_start>username_0: I am using `^(?= %)(.*?)(?=%)` regex for find out all the elements between % . Test string is `"Hey %firstName% %lastName%"`. It works fine on chrome but fails on mozilla and ie.<issue_comment>username_1: If the only thing you need is to get the text bettween the %, you can try this: ``` \%(....
2018/03/15
835
2,991
<issue_start>username_0: I'm using PowerMockito and @PrepareForTest annotation for my test class. When I do this, Sonar says none of the branches have been covered. However, my other test classes that don't use PowerMockito works well. here is my pom looks like ``` org.powermock powermock-api-mockito 1.6.2 test ...
2018/03/15
510
1,883
<issue_start>username_0: How to change the time zone from UTC to Arabian Standard Time in Azure virtual machine running the windows server?<issue_comment>username_1: I'm afraid that you would not be able to change the time Zone actually. Even if you changed it onece, the time zone would revert to UTC after restarting. ...
2018/03/15
450
1,738
<issue_start>username_0: I need a HTML division `div` that is visible only when print is given i.e. `Ctrl`+`P` is pressed and not visible in the normal page view ... I tried the below method. But it is not working. Is there anybody who know about it ```css @media print { .print_only { display: bl...
2018/03/15
1,701
6,321
<issue_start>username_0: I am working on an android app. I want to retrieve json data into an ArrayList of my data model called Expert. Here is the code on the onCreate() method ``` mExpertsList = new ArrayList(); loadData(); Log.v("RESPONSE", Integer.toString(mExpertsList.size())); ``` Here is the code in the fun...
2018/03/15
367
1,321
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/zaXa3.png)](https://i.stack.imgur.com/zaXa3.png) I have created a 2D project. The images I used for sprites are all with high resolution. However I do not know what settings I have changed today, the sprites in game window started look ...
2018/03/15
834
2,775
<issue_start>username_0: I want to write a query that would return data if and only if it has all the `ids` that the subquery would return What I've tried: ``` SELECT * FROM main_table WHERE id IN ( SELECT id FROM sub_table WHERE SOMECODITION) ``` but it returns once it finds at least one matching row in sub query ...
2018/03/15
1,317
4,956
<issue_start>username_0: Below is my HTTP post request to get the auth token, the headers are not getting set, in chrome I don't see the headers under request headers. [![enter image description here](https://i.stack.imgur.com/AHqXf.jpg)](https://i.stack.imgur.com/AHqXf.jpg) What I also observed is, if I add only the...