date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/05
3,042
12,510
<issue_start>username_0: I am confused about how this is used. Most examples I've seen have it given as "/signout-callback-oidc". That seems to indicate that it uses OIDC middleware in the process. What if I want to return to a specific client page? The automatic redirect isn't working when I set IdentityServer's Acc...
2018/03/05
175
629
<issue_start>username_0: How to get the value of the element size when element inspecting in browser ? I mean, how to get `402x48` via selenium or something ? [Picture](https://i.stack.imgur.com/6pIrs.png)<issue_comment>username_1: you can use selenium for this `getAttribute(arg0)` method. ``` String width = drive...
2018/03/05
644
1,777
<issue_start>username_0: I have a dictionary where the values are lists: ``` dict = {1: ['a','b'], 2:['c', 'd']} ``` I want to map the dictionary onto col1 of my dataframe. ``` col1 a c ``` If the value of col1 is IN one of the values of my dictionary, then I want to replace the value of col1 wi...
2018/03/05
811
2,620
<issue_start>username_0: Whenever I attempt to query a file using Python script, I receive the following error > > pyodbc.InterfaceError: ('IM002', u'[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)') > > > [Image of Error Message](https:/...
2018/03/05
385
1,295
<issue_start>username_0: I'm trying to compile a simple program in c++ with gsl. On our university server we have installed GSL. The main problem is, that I'm compilling: ``` g++ atest.cpp -c -lgsl -lgslcblas -c lm ``` And after that, I'm typing: ``` ./a.out ``` And I get : ``` -bash: ./a.out : No such file or d...
2018/03/05
311
1,102
<issue_start>username_0: Can someone post the correct syntax to write a clojure macro that returns a lambda? e.g. ``` (defmacro x [m] --> returns (fn [m] ...) ```<issue_comment>username_1: You're only compiling, not linking. From `man gcc`: ``` -c Compile or assemble the source files, but do not link. ...
2018/03/05
776
2,676
<issue_start>username_0: I have installed Python 3.6.4. When I import cv2, it throws this error: > > DLL load failed: The specified module could not be found. > > > I have OpenCV version 2.4.13. What should i do?<issue_comment>username_1: It's possible that you have Python 2 and 3 installed and Python 3 doesn't...
2018/03/05
976
3,248
<issue_start>username_0: I've got this code. Which works in chrome dev-tools ``` p { color: #00000070; padding: 0px 10px; position: relative; z-index: 98; } ``` and when I try to compile it i get this error ``` [19:36:38] Using gulpfile ~/job/fello/gulpfile.js [19:36:38] Starting 'sass'... Error in ...
2018/03/05
1,750
6,966
<issue_start>username_0: Has anyone ran across this error when querying with erlang odbc: > > {:error, :process\_not\_owner\_of\_odbc\_connection} > > > I am writing a connection pool and the :ODBC.connect('conn string) is ran inside the genserver and the returned pid is put into the state... But when i get that...
2018/03/05
396
1,395
<issue_start>username_0: It is possible to dynamically query an Android device for the current CPU clock similar to what is mentioned in what follows. ``` adb shell "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ``` However, it seems like there is not a similar option for GPU. I was wondering if there i...
2018/03/05
1,666
6,203
<issue_start>username_0: I'm confused by a bit of a query i'm working with. ``` select * from Table1 inner join Table2 on Table1.id1 = Table2.id1 right outer join Table3 right outer join Table4 inner join Table5 on Table4.id1 = Table5.id1 on Table3.id1 = Table5.id2 on Table1.id2 = Table5.id3 ``` I tried to ...
2018/03/05
908
3,355
<issue_start>username_0: the programme have runtime error when it want to add nodes to linked list (in executing append function). i tested 'create' and 'prepend' function they do their parts correctly. ``` #include #include struct Node { int data ; struct Node\* next ; }; struct Node\* Head=NULL ; struct Node\...
2018/03/05
1,476
4,420
<issue_start>username_0: I created my app with `npx create-nuxt-app`, then added `npm install @nuxtjs/pwa --save`. I'm including a google font in index.html with: ``` ``` I tested my app in offline mode in Chrome by clicking the "Offline" checkbox in the devtools/application tab, and reloading. Everything is cached ...
2018/03/05
480
1,558
<issue_start>username_0: I have an integer array which looks like this: ``` var _SingleScannedItemIds = []; ``` At some point I push some items inside the array itself like following: ``` _SingleScannedItemIds.push(checkbox_value); ``` Now my question here is: * How do I know if the array contains anything ins...
2018/03/05
557
1,765
<issue_start>username_0: I am having a little bit of a problem looping through HTML elements, collecting the value from data-points and checking if the passed value is less than to select and show the correct heading. ```js var percentageScore = "43"; $('.quiz-score .final-result').each(function(index) { if (perc...
2018/03/05
1,123
4,441
<issue_start>username_0: Often in Jupyter I'd move to different parts of the notebook to look at something, and when I am done I want to jump back to where I was working on previously. Right now I'd have to navigate to the closest Markdown section (through the Jupyter Notebook Extensions) and move up or down to get to ...
2018/03/05
1,342
4,947
<issue_start>username_0: I have a csv file separated by tabs: [![enter image description here](https://i.stack.imgur.com/hcfzq.png)](https://i.stack.imgur.com/hcfzq.png) I need only to focus in the two first columns and find, for example, if the pair A-B appears in the document again as B-A and print A-B if the B-A a...
2018/03/05
1,086
3,513
<issue_start>username_0: I have content blocks that each contain a title, an image, and copy. I need to vertically align the blocks so that the images line up any time they are in the same row. The code below illustrates a width at which my layout breaks. I can't make the title or copy a fixed height without breaking ...
2018/03/05
1,046
3,829
<issue_start>username_0: Under my Django project there are a few apps and all of them have unit tests. One of them that I'm working right now is supposed to be included only in dev/stage environments, so I'm enabling it using a environment variable. When this variable is present it is added to INSTALLED\_APPS and it i...
2018/03/05
948
3,310
<issue_start>username_0: My question is how I can write a method that takes an ArrayList of Doubles as a parameter and returning the Double in the array list that is closest to -3.75. I got the code down for the positive number 3.42, but I'm stuck as to modifying it to suit -3.75 ``` public static double question3(Ar...
2018/03/05
1,535
4,593
<issue_start>username_0: For example: <https://godbolt.org/g/5eUkrx> ``` void f(const int&); void g1() { const int i = 42; if (i == 42) f(i); if (i == 42) f(i); } void g2() { int i = 42; if (i == 42) f(i); if (i == 42) f(i); } ``` It seems like "f" mutating its argument should be UB, and...
2018/03/05
452
1,802
<issue_start>username_0: I have the following `formControl` as part of my Reactive Form: ``` ``` I was wondering if there were a way to set the placeholder programmatically? Something like: `this.formGroup.get('email').placeholder = 'Some value';`<issue_comment>username_1: The `placeholder` is a property of the HT...
2018/03/05
562
1,901
<issue_start>username_0: I'm trying to make csv module to parse lines containing quoted strings and quoted separators. Unfortunately I'm not able to achieve desired results with any dialect/format parameters. Is there any way to parse this: ``` '"AAA", BBB, "CCC, CCC"' ``` and get this: ``` ['"AAA"', 'BBB', '"CCC, ...
2018/03/05
502
2,118
<issue_start>username_0: **appsettings.json:** ``` { "ConnectionStrings": { "DefaultConnection": "Server=....;User ID=...;Password=....." ``` **Startup.cs:** ``` public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } public void Confi...
2018/03/05
635
2,273
<issue_start>username_0: I tend to stash changes without remembering why I stash them. I do make it a point to `git stash push -m` most of the time, but if there's a fire drill or something else that knocks me out of flow, I may forget and lose time trying to recover. Is there a way to imitate the behavior of `git co...
2018/03/05
3,239
10,380
<issue_start>username_0: Primer: I'm *extremely* new to Python. I am working on taking some Google Sheets data, and creating .xlsx sheets with it. With the code below, I am able to get Python to read the data and put it into arrays. However, I can't seem to figure out how to get openpyxl to write it to a document suc...
2018/03/05
972
3,047
<issue_start>username_0: I am trying to create a query that allows me to have the column name next to its column values that it finds. As an example: ``` SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'saverTbl' ``` The above returns all of the column names in that table like this: ``...
2018/03/05
774
2,441
<issue_start>username_0: Here is a python code to read a sequence ( 0.jpg ...1052.jpg) of images with `VideoCapture` module of `openCV`. ``` import cv2 import numpy cap = cv2.VideoCapture("/path to/RGB/I%04d.jpg",cv2.CAP_IMAGES). while(1): ret,frame = cap.read() cv2.imshow('image',frame) cv2.waitKey() pri...
2018/03/05
583
2,110
<issue_start>username_0: I am trying to render some data using 'ListItem' component in ReactJS. But the component is not getting the data. I also tried to load the data without using 'ListItem' component. In that case it is successfully rendering. So, How can i load the data using 'ListItem' component? ``` import Re...
2018/03/05
589
2,147
<issue_start>username_0: I like the idea of Haskell type synonyms, because they allow for distinguishing between abstract datatypes that share underlying representations. Unfortunately, when I write a program like ``` data Vector a = Vec a a -- Some definitions here about (+) and (*) for Vector ... type Position = V...
2018/03/05
1,490
5,193
<issue_start>username_0: In an aurelia project I have several components that import additional stylesheets, e.g. from semantic-ui. After leaving the components page, the stylesheet is still active and not removed. Is it possible to 'unload' the stylesheets?<issue_comment>username_1: Update (2018-03-27): --------------...
2018/03/05
989
2,910
<issue_start>username_0: > > 2018-03-05 18:25:08 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP > o5sm27821483pfh.51 - gsmtp 2018-03-05 18:25:08 CLIENT -> SERVER: EHLO > localhost 2018-03-05 18:25:08 SERVER -> CLIENT: 250-smtp.gmail.com at > your service, [192.168.3.11]250-SIZE > 35882577250-8BITMIME250-STARTTLS250-EN...
2018/03/05
1,366
5,165
<issue_start>username_0: I realize a very similar question was asked and closed because it wasn't specific enough and didn't specify outcomes. [Closed Off Topic](https://stackoverflow.com/questions/39914710/spring-rest-controller-returns-json-with-empty-data) Problem: JSON being returned from REST controller is empty....
2018/03/05
656
2,622
<issue_start>username_0: I am pushing to a multidimensional array here is the code: ``` modelValuesArray["input"]["'"+index+"'"] = $('.' + index).attr("value"); ``` Without the speech marks outside of index it does not work. However on the next loop it then sees it as ""index"", so does not work.. How do I push t...
2018/03/05
583
2,362
<issue_start>username_0: Is the preview of xml file is removed from Android studio 3.0.1 latest version if no then how to enable it .<issue_comment>username_1: I found an answer that was hinted on the closed post but wasn't detailed. I needed to add getters to my entity. I expected JPA/Spring to automagically add the ...
2018/03/05
799
2,485
<issue_start>username_0: I'm currently using R for data science and I'm learning Python and Pandas to expand my toolkit. I'd like to create a new column of lists within a Pandas dataframe using existing column names and values. For the following Pandas dataframe: ``` test1 test2 test3 1 0 1 1 2 ...
2018/03/05
670
2,128
<issue_start>username_0: I'm using the macro container\_of defined as: ``` #define container_of(ptr, type, member) ((type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member))) ``` the structure vector: ``` struct vector { uint32_t signature; size_t element_size; size_t size; void ...
2018/03/05
829
2,509
<issue_start>username_0: I have 20K objects and a set of features provided in a list. I need to extract those features from each object and save them into a dictionary. Each object has almost 100 features. For example: ``` # object1 Object1.Age = '20' Object1.Gender = 'Female' Object1.DOB = '03/05/1997' Object1.Weigh...
2018/03/05
607
2,385
<issue_start>username_0: Is there a way to pass arguments to google test points during run time? I know I can static arguments using ``` TEST_P(fooTest,testPointName) { } INSTANTIATE_TEST_CASE_P(InstantiationName, FooTest, ::testing::Values("blah")); ``` But in my use...
2018/03/05
672
2,320
<issue_start>username_0: I want to pass multiple values as a comma separated list to a function and accepting that list into an array variable. Something like(though it is not compilable): ``` #include void passValueAsList (int arr [],int len) { int i; for (i=0;i ``` I don't want to store list into array before p...
2018/03/05
407
1,293
<issue_start>username_0: I'm trying to use the -replace function in Powershell twice, but the only way I can accomplish this is using the following code: ``` $data = Get-Content c:\test.txt $data -replace 'A','apple' | Out-File c:\newtest.txt $data = Get-Content c:\newtest.txt $data -replace 'B','blue' | Out-File c:\n...
2018/03/05
441
1,570
<issue_start>username_0: I have two timestamps in epoch format in two columns in hive table T1. They actually represent the job start time and end time. I want to calculate the time duration for which the job ran. Hence I am casting the epoch times into timestamp datatype and subtracting them. This is giving me the out...
2018/03/05
481
1,545
<issue_start>username_0: ID | LastName | FirstName | Ordered 1 | Smith | John | 2 | Smith | Larry | 3 | Jones | Fred | 4 | Johnson | Todd | Desired result: Update the Ordered field with incremental values in alphabetical order. 1 | Smith | John | 3 2 | Smith | Larry | 4 3 | Jones | Fred | 2 4 | Johnson | Todd ...
2018/03/05
357
1,109
<issue_start>username_0: I have several strings and try to remove the leading zeros for them. I know I can use `TrimStart()` but it's wrong if all numbers are zero. ``` $Test = "00000.22" $Test = $Test.trimstart('0') ``` The result is .22 and what I expect is 0.22. How can I achieve it? Thank you.<issue_comment>user...
2018/03/05
200
856
<issue_start>username_0: I want a app that can read text on my screen and click on the text which I can pre-define in the app. App mostly capable to identify multiple texts and if anyone of them present on screen then click on that region.<issue_comment>username_1: You can't. Android doesn't have APIs for screen scrapi...
2018/03/05
867
2,646
<issue_start>username_0: Normally if I was trying to rename the columns of a dataframe in R I'd use ``` data(iris) colnames(iris)[colnames(iris) == "Petal.Length"] <- "petal_height" ``` So I thought I'd see what happened if I turned this into a simple function ``` renamer <- function(data, oldname, newname) { co...
2018/03/05
779
2,303
<issue_start>username_0: I'm trying to read strings from a file using ``` while(fscanf(fd, "%s ", word) != EOF) {} ``` Where fd is the file and word is where I'm storing the string. However, this effectively uses the whitespace as the delimeter. Currently, if I have a file that reads "this% is, the4 str%ng" it woul...
2018/03/05
662
2,388
<issue_start>username_0: I'm having trouble with a one-to-many relationship in Laravel 5.5. I have two tables, one for blog posts and one for authors. The posts table has an author\_id column and it's populated with valid author IDs for each blog post. author\_id is defined as a foreign key in the posts table migratio...
2018/03/05
392
1,499
<issue_start>username_0: I have 3 classes, **`Team`**, **`Game`** and **`Round`**. **`Game`** contains a list of **`Teams`**. **`Round`** contains a list of **`Game`**. I'm going to create multiple objects from each class. Should I create another classes for this like which contain a list of each object: ``` GameR...
2018/03/05
823
2,303
<issue_start>username_0: Where am I wrong ? I want to create a basic white pict from bytes ``` from PIL import Image if __name__ == "__main__": data = [chr(1)] * 8192 data = "".join(data) im = Image.frombytes('1', (128,64), data, 'raw') im = im.convert("RGB") im.save("image.png", "PNG") ``` But ...
2018/03/05
857
3,063
<issue_start>username_0: I'm making a call to Microsoft Graph to get the manager of a user: ``` /v1.0/name.onmicrosoft.com/users/[email]/manager ``` I'm trying to deserialize the response to a user. The response looks like this. ``` { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObject...
2018/03/05
434
1,900
<issue_start>username_0: I am new to Django and trying to figure out models. I have a question that I just cannot find the answer to. I am designing an equipment checkout app. I would like to have a data entry page (/Admin) where we can enter the equipment names and types...no problem (I think). However, I also need a ...
2018/03/05
2,264
7,444
<issue_start>username_0: Right now I have a test file that looks like this contrived example: ``` import pytest def colors(): # Expensive operation return ['red', 'yellow', 'blue'] @pytest.mark.parametrize('color', colors()) def test_colors(color): assert color != 'mauve' ``` This works fine, but since...
2018/03/05
14,735
60,964
<issue_start>username_0: Hi want to search in this array of objects. This Objects can have childrean with array of objects. These is really difficult to find a logic to find a object. I tried it with. ``` let obj = DATA.children.find(o => o.size === 4461) ``` This looks only in the first layer. I want to look in t...
2018/03/05
10,304
42,021
<issue_start>username_0: I am trying to fix my Calendar (Month-March): ``` Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 0 0 0 32 0 0 0 0 0 0 ``` 1) The first problem is that I can'...
2018/03/05
10,095
41,419
<issue_start>username_0: I've a pandas data frame which looks like below: **S.No**    **Name1**     **Name2**     **Size** 1           ABC         XYZ         12 2           BCA         XCZ         15 3           DAB         ZXM         20 How do I make a hierarcial column for all unique values in Name1 column, fo...
2018/03/05
559
1,667
<issue_start>username_0: I have a table setup as follows: ``` Key || Code || Date 5 2 2018 5 1 2017 8 1 2018 8 2 2017 ``` I need to retrieve only the key and code where: ``` Code=2 AND Date > the other record's date ``` So based on this data above, I need to retrieve: ...
2018/03/05
961
3,837
<issue_start>username_0: I'm writing a 3D modelling program in WPF and Prism using the MVVM format. I'm using canvases to show the different views (top, front, side) with grid lines. I want the user to be able to adjust the spacing between lines, and I have a TextBox that holds the value, which is bound to a property ...
2018/03/05
708
2,274
<issue_start>username_0: I want to combine rows based on `col c` from below and sum their `value` column data. The rows are color coded by how they should be combined. This needs to happen where `col a` `col b` and `date` fields match and it can only happen where `col c` = 'thing 1' or 'thing 2'. I don't want to combi...
2018/03/05
393
1,760
<issue_start>username_0: I can't create an Azure Batch service. I keep getting error: "Please assign Contributor role to "MicrosoftAzureBatch" service principal through your Subscription's Access control (IAM) blade." even after adding it to my subscription Access control (IAM): [![enter image description here](https:...
2018/03/05
267
887
<issue_start>username_0: From this code, how can I detect which element has been changed/keyup? ``` $("select, input").on('change keyup', function() { ... }); ```<issue_comment>username_1: Use `this` (see below). The `this` is the instance of the affected `HTMLElement` (the target of the event). To get the tag, ...
2018/03/05
1,008
3,488
<issue_start>username_0: I am new to Deep Learning and Tensorflow. I retrained a pretrained tensorflow *inceptionv3* model as *saved\_model.pb* to recognize different type of images but when I tried to use the fie with below code. ``` with tf.Session() as sess: with tf.gfile.FastGFile("tensorflow/trained/saved_mo...
2018/03/05
812
4,556
<issue_start>username_0: I would like to create a function that will return a documentID given a value of a field. I am getting tired of my nested functions. Is there a simple way to have one function that returns the ID ? Here is what I have been doing. It is an ugly pattern. ``` public class func getAccountItems(a...
2018/03/05
490
1,828
<issue_start>username_0: I am using Angular with RxJS observables for HTTP API calls in an Ionic/Angular application. ``` this.http .post('https://API URL', data, { headers: headers }).map(response => response.json()).subscribe( (res) => {}, (err) => {} ); ``` Requirement is that ...
2018/03/05
727
2,523
<issue_start>username_0: I have newman 3.9.3 version installed on my ubuntu box. Want to execute multiple collections from a folder but executing js file through me wired error saying > > TypeError: newman.run is not a function. > > > Here is my execution script. Any help will be appreciated. ``` #!/usr/bin/env...
2018/03/05
317
971
<issue_start>username_0: I have a JSON response from the server, in this data I have a "return line" in the text. ``` {text: "I am in the first line ↵ and I am in the second line"} ``` But when I display this in the html, there is no "return line" displayed. ``` "I am in the first line and I am in the second line" ...
2018/03/05
819
2,758
<issue_start>username_0: I'm trying to make a JSON call with async/await using Cloud Functions for Firebase. Any idea how to fix the following code? My plan is Blaze. My inspiration is <https://www.valentinog.com/blog/http-requests-node-js-async-await/> **DEPLOY ERROR** > > functions[setDetails]: Deployment error...
2018/03/05
387
1,724
<issue_start>username_0: Currently I'm using two databases to administrate users, what I'm trying to do is to update the firebaseAuth password when the user isn't logged (by sending passwordResetEmail). Then when the user changes the password (in firebase) and log in again, if the FirebaseLogin is successful I'll take...
2018/03/05
889
3,225
<issue_start>username_0: I have a table of results in my application and a box that allows a user to filter the result set by one or more values. I had to add an **optional** `needBy` date to the records so that a person could specify if they need the request to be handled by a certain date. The part I am struggling...
2018/03/05
763
2,653
<issue_start>username_0: The following code makes me click twice to navigate to the page I need. But the problem is that I only want to select the option once, and as soon as I make my selection I want to navigate to the page I need. I see that no option is selected. I have to either press enter or click again on the o...
2018/03/05
880
3,027
<issue_start>username_0: I am trying to change the holo underline color of a single EditText programmatically. I have tried all the examples I could find on SO, but nothing seems to work. Here is my latest and best attempt: EDIT: Current code: ``` txtName.Background.ClearColorFilter(); txtName.Background.SetColorFilt...
2018/03/05
1,312
4,195
<issue_start>username_0: I seem to have a problem with my "if" statements. Currently after the pause in "start" the file just closes and nothing else happens. Chances are, I have no idea what I'm doing. ``` @echo off set startnum=0 goto start :start pause set startnum="!startnum!"+1 if "%startnum%"="%0%" goto fail i...
2018/03/05
385
1,184
<issue_start>username_0: I know how to remove the leading 0 if it does not have any space in between ``` var strVal = "000001234"; strVal.TrimStart('0'); ``` will give result "1234". But i am not sure what to do with ``` var strVal ="0000 00001234"; ``` I tried: ``` strVal.Trim().TrimStart('0'); ``` but it re...
2018/03/05
755
1,904
<issue_start>username_0: I have a dataframe df1 in the form of: ``` ID V1 V2 V3 V4 1 4 0.1 0.2 0.3 2 6 0.4 0.5 0.6 3 3 0.7 0.8 0.9 4 11 1.0 1.1 1.2 5 6 1.3 1.4 1.5 ``` I would like to arrange rows with the ID column being odd, showing up at the top first, then the even ID values at the end. I...
2018/03/05
869
2,697
<issue_start>username_0: I have a loop, a setTimout and a callback. I need to use an anonymous function to keep the variables correct in the callback. I want to have the callback as a separate function because it is too large to have in the loop. This does not work: ``` for (var i = 0; i < 10; i++) { setTimeout(ca...
2018/03/05
1,169
4,105
<issue_start>username_0: I'm creating an advanced search in a project in school. I'm pretty new to JavaScript, so it might be an easy question, but every suggestion or solution is very much appreciated. We got served a JSON array which contains 15 objects in total, each containing the same keys but with different valu...
2018/03/05
881
2,875
<issue_start>username_0: I have a string coords that looks like this: "(1,2)-(5,7)" How would I go about converting this string to an array: [1, 2, 5, 7]? I have other strings with two digit values, for example: "(13,26)-(1,16)" This needs to become [13, 26, 1, 16] Any help would be greatly appreciated<issue_comme...
2018/03/05
1,920
8,219
<issue_start>username_0: I have an `SKScene` which is the overworld for my 2D game. It's like a neighborhood that the player can explore. The neighborhood is full of houses. Players can freely enter and exit houses. When the player enters a house, I call `skView.presentScene(newHouse)` to present the interior of the ho...
2018/03/05
979
3,169
<issue_start>username_0: I have a tool that accepts parameters like this (e.g. in `test.ps1`): ``` foo.exe -name="john" ``` So, each parameter is specified with a single hyphen `-`, the name, an equals `=`, and then the value of the parameter. When I invoke this exact expression from PowerShell, it executes without...
2018/03/05
627
2,651
<issue_start>username_0: I've just started using AWS a week ago. I deployed my NodeJS backend in a Docker container via Elastic Beanstalk. And a front-end Angular5 app in an S3 via CloudFront. I bought a domain name on GoDaddy and configured it to point to my CloudFront Angular5 app. I also generated an SSL certifica...
2018/03/05
476
1,819
<issue_start>username_0: I need to redirect http to https using htaccess. I tried many solutions posted here, but have no luck. I just do not know what is wrong in this file? ```html RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.\*) https://%{HTTP\_HOST}%{REQUEST\_URI} [R=301,L] RewriteBase / RewriteRu...
2018/03/05
446
1,495
<issue_start>username_0: The [Preact CLI](https://github.com/developit/preact-cli) claims it supports `CSS Modules` out of the box. So this is what I tried; Given 2 files `index.js` and `index.module.scss` in the same folder I tried this: **index.js** ``` import { h, Component } from 'preact'; import styles from './i...
2018/03/05
1,229
4,106
<issue_start>username_0: When I use terminal to run `echo $PATH` command, it will show the PATH environment variable. For example, something like this: `/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin` However, when I use `execvp()` to call it, it will only print the string "$PATH". ``` #include #include #include #...
2018/03/05
1,213
4,281
<issue_start>username_0: I have 2 tables with random numbers and i want to check which number from first table doesn't exist in second one and output it. ``` Example: First table: 2, 6, 7, 9 Second table: 0, 6, 11, 3 Output: 2, 7, 9 ``` My current code: ``` #region CompareTables int[,] TABLE1 = new in...
2018/03/05
967
3,622
<issue_start>username_0: We would like to left outer join two tables in HQL using two columns for the join. The second column for the join has no relevance at the logical level and doesn't restrict the result set in any way. It's the partition key and is used solely as an optimization to speed up the phyiscal data ac...
2018/03/05
1,820
7,389
<issue_start>username_0: Is it bad practice to return a vector element by reference? ``` class X{ vector v; public: Y& getRefFromVectorOfY(unsigned int index){ retrun v.at(index); } void addToVectorOfY(Y y){ v.push\_back(move(y)); } }; ``` While this is efficient and clean, the issue is that it breaks encapsu...
2018/03/05
756
2,250
<issue_start>username_0: How to find the `li` tags with a specific class name but not others? For example: ``` ... - no wanted - not his one - neither this one - neither this one - neither this one ... - I WANT THIS ONLY ONE ... ``` the code: `bs4.find_all ('li', class_='z')` returns several entries where the...
2018/03/05
986
3,551
<issue_start>username_0: In Drupal 7, is it possible to show a result of a DB query on each users' respective profile page, in some table? I need to do this programmatically within my existing module. So the input to the query would be the ID of a user whose profile is currently being viewed. Only to show the queried ...
2018/03/05
560
2,168
<issue_start>username_0: I have given a large binary image (every pixel is either 1 or 0). I know that in that image there are multiple regions (a region is defined as a set of neighboring 1s which are enclosed by 0s). The goal is to find the largest (in terms of pixel-count or enclosed area, both would work out for ...
2018/03/05
385
1,506
<issue_start>username_0: How to notify through email in wordpress when visitor clicks on a link that this link was pressed and/or user ip, city and country was this? I have given the link a class 'email-link'.<issue_comment>username_1: You could [Flood Fill](https://en.wikipedia.org/wiki/Flood_fill) every region with a...
2018/03/05
429
1,534
<issue_start>username_0: When I use Ajax for sending a post request I get an internal server error 500 and couldn't find a solution. Here is my view that contains the Ajax: ``` upload $(function(){ $('#btn').click(function(){ $.ajax({ url:"localhost:8000/test", type:"POST", dataType:'json', success:func...
2018/03/05
1,978
7,202
<issue_start>username_0: What is the recommended approach for installing Anaconda on Mac? I tried with `brew cask install anaconda` which after a while returns `anaconda was successfully installed!`. After that - trying `conda` command returns `command not found: conda`. Is there any post step installation that n...
2018/03/05
916
2,512
<issue_start>username_0: In R (albeit longwinded): Here is a test data.frame ``` df <- data.frame( "CHR" = c(1,1,1,2,2), "START" = c(100, 200, 300, 100, 400), "STOP" = c(150,350,400,500,450) ) ``` First I make GRanges object: ``` gr <- GenomicRanges::GRanges( seqnames = df$CHR, ranges = IRanges(start =...
2018/03/05
1,196
5,039
<issue_start>username_0: So in this maze kind of game I'm making, I will show the maze to the player for 30 seconds. What I don't want is that the player taking screenshot of the maze. I want to do something like Snapchat, or Instagram, how it detects when you take a screenshot of a snap/story. I'm using C#. It ...
2018/03/05
1,166
4,890
<issue_start>username_0: I'm trying to figure out what takes so long to load on the web application we are building. Here's the chrome developer tool network tab Why is there a gap between scripts/stylesheet and the HTML? [![Chrome Network](https://i.stack.imgur.com/I1S1T.png)](https://i.stack.imgur.com/I1S1T.png)<is...
2018/03/05
4,892
11,332
<issue_start>username_0: I have a data which has 40 days of the year and some data ``` set.seed(123) df <- data.frame(day = 1:40,rain = runif(40,min = 0, max = 3), petc = runif(40, min = 0.3, max = 8),swc = runif(40, min = 27.01, max = 117.43)) ``` I want to calculate another variable called aetc for each day which...
2018/03/05
474
1,822
<issue_start>username_0: ``` var innerValue = $('.edit-location').val(); // i am getting value from input var locationText = $('.location-text').text(); // i am getting inner text from target paragraph $('.save-button').click(function () { innerValue = locationText; // i am putting value from input to the paragra...
2018/03/05
8,366
33,626
<issue_start>username_0: I have a class that contains some QPushButtons and whenever I press a button, I want the program to display a message saying that the action has been carried out. So far I have tried to create a QMessageBox and call it within the button function below it but it doesn't work. I keep getting a co...
2018/03/05
4,750
18,837
<issue_start>username_0: I am trying to get a simple (in my mind) 2 step query from the firestore using AngularFire2 but I can't seem to understand yet what to do. ``` getProfile(): Observable{ return this.afAuth.authState.map(user => { return this.db.doc('user/'+user.uid).valueChanges(); }); } ``` I keep g...
2018/03/05
4,892
19,568
<issue_start>username_0: We are using TFS, in this case, for our project management (Work section). I have a server (TFS) with a collection (Default Collection) and a project (My Project) I have created a TFS group under that project (Consultants) Consultant permissions are then set as appropriate for their role- in...