date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/07
3,218
9,347
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/61NAY.png)](https://i.stack.imgur.com/61NAY.png) I made this button in Photoshop. I have plenty of graphic UI experience, but not much coding besides python and html/css. I figured I would use javascript to animate the button being c...
2018/03/07
837
3,284
<issue_start>username_0: I need help with my assignment. I am not allowed to use any functions other than loops, if statements, cout, cin, basic operators and basic string. Arrays are not allowed. I need to sort a list of names from a file by alphabetical order and output which names would be at the front and back of t...
2018/03/07
509
1,794
<issue_start>username_0: I want my class to be able to update my employees. How should I do it? ``` class emmploye: account=0 def __init__(self, name, salary): self.name=name self.salary=salary def update(self): self.account=account+salary ```<issue_comment>username_1: Following your code, ...
2018/03/07
814
3,159
<issue_start>username_0: I am trying to see Loading progress as follows, but it does not show up. **View.cs** ``` ViewModel.SelectedCommand.Execute(null); ``` **ViewModel.cs** ``` public ICommand SelectedCommand { get { return new MvxAsyncCommand(async () => { // the following does n...
2018/03/07
816
2,684
<issue_start>username_0: I have a `struct` that has one or more `struct` members. Each member is expected to implement a `Validator` interface. I want to use reflection to iterate over all `struct` members and call the interface's `Validate()` method. For example: ``` package main import "fmt" import "reflect" type...
2018/03/07
2,416
7,759
<issue_start>username_0: I deployed a Django website using this tutorial <https://jee-appy.blogspot.com/2017/01/deply-django-with-nginx.html> The website can be accessed from the internet, www.simplesol.com When I try to make a POST request, it fails and I get a 502 error. In my nginx-error.log file I get this er...
2018/03/07
234
945
<issue_start>username_0: Windows socket close(closesocket) function generates RST. On linux when I call close function to close a tcp socket it goes through fin/ack from both client server and the socket gets closed. But on windows winsock, whenever i call closesocket it always generates RST message. I tried using s...
2018/03/07
980
3,502
<issue_start>username_0: I am using the following AJAX to make a call to a PHP function: ``` $.ajax({ url : 'php/jstranslator.php', type : 'post', data : {'action' : 'campaignnamecheck', 'newcampaignname' : campaignname, 'oldcampaignname' : oldcampaignname }, success : function(r...
2018/03/07
917
3,454
<issue_start>username_0: I am working on a CRUD angularApp but getting weird error under Chrome dev tools. Below is full error: ``` error: [ng:areq] http://errors.angularjs.org/1.3.2/ng/areq?p0=DbController&p1=not%20a%20function%2C%20got%20string at angular.js:38 at Nb (angular.js:1577) at ob (angular.js:1587) ``` I...
2018/03/07
635
1,977
<issue_start>username_0: I have a very simple bit of code that is acting a bit unusual. ``` col1=[0.1,0.2,"x",0.3,0.1] for x in col1: if x=="x": lo=col1.index("x")-1 hi=col1.index("x")+1 if col1[lo]>col1[hi]: col1[lo]="x" else: col1[hi]="x" ``` Running it ...
2018/03/07
470
1,577
<issue_start>username_0: In the next code: ``` return connectDropTarget( {`Works with ${allowedDropEffect} drop effect`} {isActive ? 'Release to drop' : 'Drag a box here'} , ) ``` what is the use of ...style for? I can't see any variable declared as style.<issue_comment>username_1: It means that the pr...
2018/03/07
2,335
7,965
<issue_start>username_0: I'm looking for a comprehensive list of the valid selectors I can use to access child components / DOM elements via `@ViewChild` and `@ContentChild`. Say I have a child `HelloComponent`: I know I can add a template `#ref` and query for it, like so: ``` @ViewChild('myHello') myHello: HelloCo...
2018/03/07
871
3,345
<issue_start>username_0: I need to compare huge, multiple time nested, complex java object. There are no circular references (ufff). Adding "equal" method to each class takes weeks. I got the idea that maybe serializing these objects to array of bytes, and then comparing these arrays can be easier. Very simplified ex...
2018/03/07
698
2,641
<issue_start>username_0: Is there some function or syntax construction to make next examples work? Invoke `Hash#values_at` function with an `Array` argument: ``` h = {"a" => 1, "b" => 2, "c" => 3} ary = ["a", "b"] h.values_at(*ary) # Error: argument to splat must be a tuple, not Array(String) ``` Pass `Hash` to ini...
2018/03/07
572
2,176
<issue_start>username_0: I am trying to implement a dynamic condition on a JSON Object. After searching for a while, I am not able to find any resources which can meet my needs. In the below fashion, I am getting the JsonObject dynamic string into jsonObject variable. ``` string inputFromAPI = client.GetStringAsyn...
2018/03/07
5,449
18,530
<issue_start>username_0: When I run `cordova build android --buildConfig xxxx --release`, I get the following error: ``` ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex ``` The strange thing is I use two macOS mach...
2018/03/07
878
3,331
<issue_start>username_0: I have looked on multiple stack overflow posts regarding this issue and attempted to implement those fixes to no avail. Neither of the top two answers from this question worked [NSURLSessionDataTask not executing the completion handler block](https://stackoverflow.com/questions/19368651/nsurlse...
2018/03/07
789
3,060
<issue_start>username_0: This code bothers me. Below, I'm trying to find the first instance of a specific type of ViewController in a NavigationController's stack. Simple. But when I've found it, I have to then cast it to the type I just looked for, which seems redundant to me. ``` func popToFirstViewController(ofType...
2018/03/07
2,467
9,709
<issue_start>username_0: I am sure someone out there has already done this, but I have yet to find any documentation with regard to the Microsoft implementation of JWT. The official documentation from Microsoft for their JWT library is basically an empty page, see: <https://learn.microsoft.com/en-us/dotnet/framework/s...
2018/03/07
963
3,155
<issue_start>username_0: When I use this loop: ``` while Start_time_hours == Start_time_hours and Start_time_minutes == Start_time_minutes: Start_time_minutes += 5 Start_time_hours += (Start_time_minutes / 60) Start_time_minutes %= 60 if Start_time_hours == 23 and Start_time_minutes == 55: ...
2018/03/07
630
2,389
<issue_start>username_0: Below is my code snippet generating an XML in Java. I am using jdk1.8.0\_152 and the following sample is used to construct an XML element. ``` DocumentBuilder dBuilder= DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(new InputSource(new StringReader(xml...
2018/03/07
638
2,125
<issue_start>username_0: just want to ask if anyone knows why I cant convert an entire picture into decimal. Problem: after about 180 couts it turns 0 for the rest of the pixels. Code: ``` #include #include int main() { char unsigned charTemp = 0; int unsigned intTemp = 0; std::fstream file; file.open("PIC....
2018/03/07
488
1,916
<issue_start>username_0: How does one avoid code duplication when using something like computed properties across multiple components? An example is that I have a computed property to get the parent route name - it's pretty simple: ``` computed: { parent_route () { return this.$route.matched[0].name } } ``` ...
2018/03/07
317
1,121
<issue_start>username_0: Is there any way to copy a string like this and put it into an array? String s = "Hello"; -> String[] s = {"Hello", "Hello"}; The array must copy what's inside of s.<issue_comment>username_1: You could create a method like ``` public String[] copyString(String s, int nr) { String[] arr =...
2018/03/07
1,152
4,113
<issue_start>username_0: I'm trying to format a column of numbers in Google Sheets using the API (Sheets API v.4 and Python 3.6.1, specifically). A portion of my non-functional code is below. I know it's executing, as the background color of the column gets set, but the numbers still show as text, not numbers. Put ano...
2018/03/07
551
2,058
<issue_start>username_0: can someone tell me how can i change css class property by javascript? example: ``` .winner { background-color: white; } ``` How can I change value of class winner background-color. When I write: var some = document.querySelector("winner"); I get button with class winner. I want this cla...
2018/03/07
3,052
10,463
<issue_start>username_0: I am getting the below error while sending keys. Result Message: ``` System.InvalidOperationException : unknown error: call function result missing 'value' (Session info: chrome=65.0.3325.146) (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windo...
2018/03/07
1,228
3,536
<issue_start>username_0: So I have this piece of code ``` let var1: any; var1 = 'hello'; let var2: number = var1; ``` For some reason typescript is NOT complaining that I am trying to assign a variable of type `any` to a `number`. Does anybody know is there is a compiler or tslint rule that forbids this?. Yes I now ...
2018/03/07
1,713
4,627
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/o5q4g.png)](https://i.stack.imgur.com/o5q4g.png) I have to clean up this autogenerated string, what regex can I use to clean up some of this so to give you clear example I need to go from this ``` body {\r\n \r\n backgrou...
2018/03/07
1,000
3,558
<issue_start>username_0: I am wondering if it is possible to create html files from a list. For example, I want to create an html file for each letter of the alphabet. Is it possible to create a list in notepad or excel such as: * a * b * c * d * etc. and then run a program or code that would output a bunch of files ...
2018/03/07
2,729
9,877
<issue_start>username_0: I'm a Haskell beginner and have chosen it to solve a programming task for my class, however my solution is too slow and doesn't get accepted. I'm trying to profile it and was hoping that I could get some pointers from more advanced Haskellers here. The only other solution in my class that got ...
2018/03/07
779
2,678
<issue_start>username_0: I'm trying to make a `User` class, however I'm getting an error output whenever I try to compile this code: ``` #ifndef LOGIN_H #define LOGIN_H #include /\* Classes \*/ class User { std::string username, password; public: void set\_user\_username (std::string); void set\_user\_password...
2018/03/07
867
3,034
<issue_start>username_0: I am trying to install tensorflow on windows 10 and I am following this link: <https://www.tensorflow.org/install/install_sources> I have successfully installed bazel. The problem is when I use this command ``` $ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package ``` ...
2018/03/07
814
3,063
<issue_start>username_0: "Setup Failed" Recursion too deep; stack overflowed 0x800703E9. I have windows 10 and newest visual studio version. I have tried rebooting to make sure I have as many resources as possible. I have 4g ram.<issue_comment>username_1: Please re-run the VS community 2017 installer or go to Control ...
2018/03/07
429
935
<issue_start>username_0: Just a quick question around how I can split a variable. I have a created a data frame called d. R code is shown below. ``` x1 = c(1, 2, 3, 4) x2 = c(5, 6, 7, 8) x1x2 = paste(x1, x2, sep = ",") x3 = c(10, 20) x4 = c(100, 200, 300, 400, 500) d = data.frame(expand.grid(x1x2, x3, x4)) ``` F...
2018/03/07
887
2,230
<issue_start>username_0: I have a trivial problem that I have solved using loops, but I am trying to see if there is a way I can attempt to vectorize some of it to try and improve performance. Essentially I have 2 dataframes (DF\_A and DF\_B), where the rows in DF\_B are based on a sumation of a corresponding row in D...
2018/03/07
7,769
26,167
<issue_start>username_0: I am creating a Ionic App, emulating it in Browser works fine, but as soon as i try to build it on android it fails. Looks like some error with AATP, but i cant realy figure out, why this happens... Here is the Error Log: ``` Running app-scripts build: --platform android --target cordova [0...
2018/03/07
584
2,025
<issue_start>username_0: I'm working on using fastlane screengrab/snapshot to take screenshots of my android and ios app. When I run them locally on terminal, they work perfectly, but when I run them from jenkins, they fail. I'm using macOS. **Android:** ``` /Users/shared/Library/Android/sdk/tools/emulator -avd ...
2018/03/07
846
3,108
<issue_start>username_0: I am running eslint and it is recommended to return a value whenever an arrow function(lambda function) is used. Well that makes sense. However, I come across a case that is hard to walk around. ``` Dict = {} Instances = [/* an array of items where items is a dictionary that contains data */] ...
2018/03/07
677
2,059
<issue_start>username_0: In Pandas I'm transposing the data and want to name the column. My current data is: ``` alpha bravo charlie 0 public private public 1 prodA prodB prodB 2 100 200 300 ``` After transposing and renaming the columns, the output is: ``` df.transpose() df.column...
2018/03/07
496
1,933
<issue_start>username_0: I'm using liquibase 3.5.5 with postgresql. All my tables are being created in a specified schema, however when liquibase tried to generate the DDL, it is appending "public." in front of the referencesTableName. I've tried making the table name "identity.users", but it just tries to create publi...
2018/03/07
716
1,790
<issue_start>username_0: This should be really simple but I can't figure it out. How do I extract the details for Stu? So I want to see Name: Stu, Age:14, Weight: 99.5 ``` pets_2 = {'Name': {'Molly', 'Stu', 'Henry'}, 'Age':{10, 14, 2}, 'Weight':{101, 99.5, 90.3}} ``` Side-question, is this the co...
2018/03/07
958
3,380
<issue_start>username_0: I have the following code: ``` class Mylist(list): def __init__(self,lst=[]): self.lst=list(lst) def append(self,item): self.lst.append(item) m=Mylist([1,2]) m.append(3) m ``` Intuitively, this code should print [1,2,3] or maybe [3]? but definitely not []. I am wond...
2018/03/07
895
3,228
<issue_start>username_0: I want to make my application so that when it has been maximized the control will automatically position itself it the right place. [![enter image description here](https://i.stack.imgur.com/NxzvN.png)](https://i.stack.imgur.com/NxzvN.png)<issue_comment>username_1: As `MyList` inherits from `l...
2018/03/07
428
1,348
<issue_start>username_0: I am planning to check if a given input is an integer. `gets.chomp` gets input as a string, and I convert it into an integer using `to_i`. If I input `abcd` and check using `class` or `is_a(Integer)`, it always says it's an integer. ``` x = gets.chomp.to_i if x.is_a?(Integer) puts "It's an...
2018/03/07
657
2,304
<issue_start>username_0: I am attempting to install PyOCR on my computer running Windows 7. I have installed Tesseract-OCR 3.05 for Windows and have added the directory containing Tesseract (C:\Program Files (x86)\Tesseract-OCR) to the PATH user variable, the Path System Variable, and created the new system variable TE...
2018/03/07
801
2,942
<issue_start>username_0: EDIT : Does not work on external hosting AND on localhost… So I must be doing something wrong. I am working with Code Igniter and I have a view. My view page shows no error, but doesn't show the data I requested either. Everythings fine with my config and database I guess... Any idea ? Am I ...
2018/03/07
512
1,759
<issue_start>username_0: `^(all|contact|all,contact|contact,all)$` do not allow `all,all` or `contact,contact` or `all,contact,all`, etc. I need to be able to have an equivalent pattern, but I want to reduce because I may have more elements in the future and finding all possible combinations would be difficult. eg w...
2018/03/07
642
2,382
<issue_start>username_0: I was following one of the Youtube API's samples provided by *Google*, but so far without much success. This particular API requires authorized access (OAuth 2.0), and therefore I had to get the `secrets` JSON file from the Google API Console, holding the required information for the `OAuth2` o...
2018/03/07
377
1,282
<issue_start>username_0: Hi just signed up to amazon s3, and I have uploaded images, my question is should I save css and js, files in s3 our can this cause some issues with the site<issue_comment>username_1: A bit un-regexlike, but would it not be easier and possibly more performant to just `split()` on the `,` charac...
2018/03/07
450
1,556
<issue_start>username_0: ``` instead of asking the user to input three numbers. ``` I wrote a for loop to generate 3 random numbers but I did not know how to pass the three numbers to the constructor. it is fine if anyone can use another way to pass a three random numbers to the constructor. ``` Random dice = ne...
2018/03/07
183
582
<issue_start>username_0: Suppose I have 2 pandas series, which I perceive as column vector in linear algebra `x1` and `x2` I want to do the operation `x1 * x2^T`, which is a column vector multiply with a row vector to produce a matrix (pandas dataframe). What is the best procedure for this?<issue_comment>username_1: ...
2018/03/07
1,916
5,399
<issue_start>username_0: I have been trying to create a Kendo grid with dynamic column values based on a date item as part of the response data. The data I have looks like this: ``` [ { Date: '01-01-2018', Name: 'Foo', Value: 1000}, { Date: '02-01-2018', Name: 'Foo', Value: 2000}, { Date: '03-01-2018', Na...
2018/03/07
712
1,984
<issue_start>username_0: I see questions asked on truncating the leading zeros, but nothing found to solve my issue. I have a array of strings representing days returning from an api call. Ex: ``` arr= ["061-094", "0561-0960", "000-005", "180+"]; arr.map(function(d){ {d} days // this returns 061-094 days }); ``` ...
2018/03/07
929
3,121
<issue_start>username_0: In AWS, I'm trying to save a file to S3 in Python using a Lambda function. While this works on my local computer, I am unable to get it to work in Lambda. I've been working on this problem for most of the day and would appreciate help. Thank you. ``` def pdfToTable(PDFfilename, apiKey, fileExt...
2018/03/07
882
2,895
<issue_start>username_0: I'm building a workflow on circleci 2.0 and so far jobs are running until it gets to android job. At the build step `./gradlew assembleRelease` it fails stating that an ENV VAR is not set: ``` Unzipping /home/circleci/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2....
2018/03/07
269
931
<issue_start>username_0: In my project on one computer with VS2017 Version 15.5.4 I have the ability to run a custom tool on Resources.resx [![this menu with the option to run a custom tool](https://i.stack.imgur.com/RUbWJ.gif)](https://i.stack.imgur.com/RUbWJ.gif) On another computer with VS2017 15.5.6 I have [![th...
2018/03/07
456
1,935
<issue_start>username_0: I've add several annotations with custom annotation view, but I have a reference only to the marker and not to the annotation view itself. So how can I change the annotation view elements?<issue_comment>username_1: You should store the annotations in a variable and when you want to change their...
2018/03/07
659
2,440
<issue_start>username_0: Example: expand(new int[]{3, 2, 5}) -> {0, 0, 0, 1, 1, 2, 2, 2, 2, 2} I am trying to have it make a a new array to print the index of say 3, 3 times. So 3 would be 0,0,0. ``` public static int[] expand(int[] input) { int c = 0; int[] myArray = new int[sum(input)]; if(input.leng...
2018/03/07
856
2,911
<issue_start>username_0: I am fetching a column from a Dataframe. The column is of `string` type. `x = "[{somevalues, id:1, name:'xyz'}, {address:Some Value}, {somevalue}]"` & so on.. The data is stored as a string. It can be easily represented as a list. I want the output to be: ``` LIST of [ {somevalues, id:1, na...
2018/03/07
1,044
3,310
<issue_start>username_0: I have access to ``` com.amazonaws.services.lambda.runtime.Context; ``` object and by extension the invoked function Arn. The arn contains the account Id where the lambda resides. My question is simple, I want the cleanest way to extract the account Id from that. I was taking a look co...
2018/03/07
1,585
5,167
<issue_start>username_0: I am working on a React project and attempting to pull JSON data from an API. I have a searchbar and I want to make it so the user can type a term into the searchbar and then that term is sent to a NASA API and returns the appropriate results. The NASA API looks like [this](https://images-api....
2018/03/07
668
2,606
<issue_start>username_0: Problem: Common antd components (such as Button) are being duplicated across multiple chunks, instead of being extracted into a separate file, and thus being downloaded more than once by the end user. I'm using create-react-app in conjunction with react-app-rewired and it's injectBabelPlugin ...
2018/03/07
529
2,120
<issue_start>username_0: I've got 3 images in the screen. Each image should display a different form in the SAME POSITION in the screen and hide the other 2 forms. Image1: When clicked show form1 and hide form2 and form 3 Image2: When clicked show form2 and hide form1 and form 3 Image3: When clicked show form3 and h...
2018/03/07
252
780
<issue_start>username_0: I have a dataframe in pandas containing 11 columns. These columns are all named "subsidence". I would like to rename the columns "subsidence 1", "subsidence 2", "subsidence 3" etc. Is there a quicker way to do this than using `df.rename`.<issue_comment>username_1: You can set `df.columns` dire...
2018/03/07
1,242
5,017
<issue_start>username_0: We need to display the play button on video window if video is paused even if video buffer has enough data (this will happen in safari browser as Safari doesn't allow to play the videos without user intervention). I added event listener for pause event. The code is as given below (please note t...
2018/03/07
775
3,128
<issue_start>username_0: I am building some functions to create my JSON using the sign-client PHP API and Models. I am create an envelope on docusign using the API and sending signers emails where they go to docusign to sign. I am not using embedded signing. I am doing this all though the API and plan to get and API pl...
2018/03/07
778
2,998
<issue_start>username_0: I have a vector that has random strings as elements. I am trying to loop through to find strings that are not a length of 2. If they are not a length of 2 then it should be removed from the vector. For some reason, my code is not removing all of the strings that are not a length of 2. I have t...
2018/03/07
395
1,294
<issue_start>username_0: I have a template sequence like this: ``` val template = Seq(0,0,0,0,0,0,0,0,0,0) ``` I have another sequence which contains the index should be modified, like this: ``` val indices = Seq(1,3,7) ``` I want to modify the template sequence, in the way that, if the element's index is in the ...
2018/03/07
1,158
3,733
<issue_start>username_0: I'm trying to kick off multiple processes to work through some test suites. In my bash script I have the following `printf "%s\0" "${SUITE_ARRAY[@]}" | xargs -P 2 -0 bash -c 'run_test_suite "$@" ${EXTRA_ARG}'` Below is the defined script, cut down to it's basics. SUITE\_ARRAY will be a list ...
2018/03/07
964
2,867
<issue_start>username_0: I have included these header files, even then too, I am getting this error ``` #include #include #include error: implicit declaration of function ‘ntohll’ [-Werror=implicit-function-declaration] uint64\_t bits = ntohll(\*(uint64\_t \*)tmp); ```<issue_comment>username_1: `ntohll` is not a...
2018/03/07
388
1,542
<issue_start>username_0: I am trying to download an object/ file from AWS S3 to the local computer. I would like to provide the user with the opportunity to provide the local path. In HTML we have the ``` and ``` elements to provide the user with the option to select a file from the file system for upload. How d...
2018/03/07
435
1,569
<issue_start>username_0: i have created a cloudformer template, such as below "template\_test, 2018-03-08 07:19:05, CREATE\_COMPLETE, AWS CloudFormer Beta - template creation prototype application" then i created a stack from it, such as below "CloudFormerLaunchedStack, 2018-03-08 07:45:46, ROLLBACK\_COMPLETE, stac...
2018/03/07
471
1,775
<issue_start>username_0: I have a method in Unity that loops through a set of `GameObject`s to see which of them has a bool `isClosestLadder` set to `true`. If one of them has that bool set to `true`, it returns the position of that object. ```c# public Vector3 FindNearestLadder() { for (int i = 0; i < GetCo...
2018/03/07
367
1,343
<issue_start>username_0: I have two files new.txt and new2.txt. I want to find the differences between these two files and was thinking to use git diff for the same but I couldn't. This is what I have done till now and respective errors - 1. git init in the local directory. 2. git diff new.txt new2.txt => produced no...
2018/03/07
862
3,358
<issue_start>username_0: I couldn't find a question that specifically targets the issue I'm having hence this question is being asked. I have an array that holds 5 numbers: ``` var numbers = [0,1,2,3,4]; ``` Once a number is clicked on the frontend (website), the number is removed from the array using the below cod...
2018/03/08
668
2,532
<issue_start>username_0: I'm trying to use a continueURL for firebase and need to whitelist domains. In order to test this, I want to add a localhost domain to test against, but it seems like there is no way to get around the fact that it needs to be a valid domain. Can anyone help?<issue_comment>username_1: If you mea...
2018/03/08
608
2,049
<issue_start>username_0: My current setup starts with a function that is ostensibly in `.bashrc` (`.bash_it/custom/funcs.bash` to be precise) ``` #!/usr/bin/env bash function proset() { . proset-core "$@"; } ``` `proset-core` does some decrypting of secrets and exports those secrets to the session, hence the need ...
2018/03/08
920
2,693
<issue_start>username_0: I have two data-frames in python. ``` data_A Name X Y A 1 0 B 1 1 C 0 0 data_B Name X Y A 0 1 B 1 1 C 0 1 ``` I would like to overlap these heatmaps, where if it is a 1 in data\_frame A, then the tile is colored purple (or any color), but if it's a 1 in da...
2018/03/08
811
2,706
<issue_start>username_0: I'm trying to build a simple array of multiple fields in each record (or item), such as a table of (name,sex,id, etc) or (surname, name, phone-no) etc In this case, I'd like to store the filename, filesize (and optionally filedate,etc) of each entry in a directory. One field in each recor...
2018/03/08
702
2,672
<issue_start>username_0: *Edit: Rendering the skybox before all other objects in the scene fixed this problem.* I've seen the question [here](https://stackoverflow.com/questions/10042412/glenablegl-depth-test-nothing-rendered/40816523) but adding ``` glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ``` doesn't ...
2018/03/08
2,460
6,687
<issue_start>username_0: I'm trying this: ``` import pandas as pd import sqlite3 import datetime, pytz #nowtime=datetime.datetime.now(pytz.utc) nowtime=datetime.datetime.now() print(nowtime) df = pd.DataFrame(columns=list('ABCD')) df.loc[0]=(3,0.141,"five-nine",nowtime) df.loc[1]=(1,0.41,"four-two",nowtime) print(d...
2018/03/08
1,805
5,900
<issue_start>username_0: I am trying to copy a folder on a Google Team Drive to another location, but my script keeps getting an error. The full script is below. I basically want to copy an Excel file "Google Drive:Team Drives:Company -Sync Folder:0000-1\_E.xlsx" to a location that is defined by the script. The offen...
2018/03/08
404
1,376
<issue_start>username_0: ``` import {observable} from 'mobx'; let obj = observable({foo: 5}); ``` This creates an observable object with a property called `foo`. If I do, ``` obj.foo = 9; ``` The change will be tracked as expected. However, what I want to overwrite *all* the values of `obj`? How can I do that? L...
2018/03/08
1,490
5,786
<issue_start>username_0: I am looking create a social-media feed using Firebase. My data is structured like this: ``` users: { uid: { ... // details } } friends: { uid: { friends: { // sub collection fuid: { ... // details } } } }` posts: { postId: { postedBy: u...
2018/03/08
1,229
4,822
<issue_start>username_0: I am using Git, had created a branch named logging, did a bunch of changes, got code reviewed and then pushed them upstream. Now, our main developer after review merged the branch. But after some time he found conflicts and had to unmerge the branch. Now, I am screwed. The upstream branch loggi...
2018/03/08
1,160
4,492
<issue_start>username_0: How to move BigQuery data to long term storage? How to move the historic data to long-term storage in Google Cloud?<issue_comment>username_1: I ended up solving this issue by leveraging Firebase Functions. I have two collections, one is called `Posts` and the other is called `Feeds`. When a us...
2018/03/08
964
3,382
<issue_start>username_0: I'm trying to figure out how to get the first N strings from a txt file, and store them into an array. Right now, I have code that gets every string from a txt file, separated by a space delimiter, and stores it into an array. However, I want to be able to only grab the first N number of string...
2018/03/08
1,447
3,072
<issue_start>username_0: I have a list of lists: ``` list_of_lists = [] list_1 = [-1, 0.67, 0.23, 0.11] list_2 = [-1] list_3 = [0.54, 0.24, -1] list_4 = [0.2, 0.85, 0.8, 0.1, 0.9] list_of_lists.append(list_1) list_of_lists.append(list_2) list_of_lists.append(list_3) list_of_lists.append(list_4) ``` The position is m...
2018/03/08
480
1,187
<issue_start>username_0: sample data ``` ID Verification time_created time_updated 70000 us 9/12/16 11:25 2/21/17 22:41 70000 us 9/12/16 11:25 4/3/17 14:20 70000 us 9/12/16 11:25 4/4/17 22:08 70000 v 9/12/16 11:25 4/4/17 23:38 70000 v 9/12/16 11:25 6/22/1...
2018/03/08
635
2,404
<issue_start>username_0: my site have many will call api I need to prevent double click on those button. here is what I did ``` .disable { pointer-events: none; } $(document).ready(function(e) { $('a').click(function(){ $(this).addClass('disable'); setTimeout(function(){ $(this...
2018/03/08
1,939
6,824
<issue_start>username_0: I get following error while running the command "ionic cordova build android --stacktrace" : ``` :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings FAILED ERROR: In Font...
2018/03/08
3,731
12,054
<issue_start>username_0: I am currently working on a project in which I am unrolling the last warp of a reduction. I have finished the code above; however, some modifications were done by guessing and I'd like an explanation why. The code I have written is only the function kernel4 ``` // in is input array, out is whe...
2018/03/08
873
3,158
<issue_start>username_0: I would like to run a command before and after each target in a makefile. so something like this ``` pre: @echo pre @echo running | mailx -s "Start {target}" <EMAIL> post: @echo post @echo post | mailx -s "Finish {target}" <EMAIL> j: long_running_command && ...
2018/03/08
1,423
3,708
<issue_start>username_0: I'm trying to build a page where 1 div will be chosen according to the page width. I've checked and rechecked my whole code from upside down and can't seen to figure out what's wrong. For example, we have: 1 2 3 4 5 If the page is over 800 pixels width, then it will only display the div 5. If...
2018/03/08
711
2,220
<issue_start>username_0: This is probably easy to do but I can't seem to get my head around it. I have a user table that has a next\_payment DATETIME column which gets update every month. I would like a query to get all the users where their next\_payment DATETIME is in one day from the current datetime. I tried somet...
2018/03/08
2,048
8,300
<issue_start>username_0: I'm expecting Angular to wait until my `loadConfig()` function resolves before constructing other services, but it is not. **app.module.ts** ```ts export function initializeConfig(config: AppConfig){ return () => config.loadConfig(); } @NgModule({ declarations: [...] providers:...
2018/03/08
593
2,506
<issue_start>username_0: I am searching for the best solution of the following: 1. I need to give somebody access to one (out of many) specific database on my MySQL server through PhpMyAdmin or a similar tool. 2. I am not allowed to create a new MySQL user account. 3. Therefore I am thinking of creating a cover-up use...
2018/03/08
383
1,557
<issue_start>username_0: In my Objective-C iOS app I'm creating PDF files using the code: ``` UIGraphicsPDFRenderer* renderer = [[UIGraphicsPDFRenderer alloc] initWithBounds:pdfSize]; NSData* outputPdfData = [renderer PDFDataWithActions:^(UIGraphicsPDFRendererContext * _Nonnull context) { [context beginPage]; ...
2018/03/08
801
2,955
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/EusnR.jpg)](https://i.stack.imgur.com/EusnR.jpg) I'm trying to make an application as in the image. The user types in the form and the right image is filled with the typed content. On completion click on "ok" and an image with the resu...