date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/05
1,546
3,140
<issue_start>username_0: I have a dataset like the following <http://sqlfiddle.com/#!18/149382/2> And the result should be like the following ``` TripGroup Grouper1 Grouper2 Date Hour Code Description 1 6EA579BEA901 58639247D5CB 2018-02-03 00:01:00.0000000 3962X1 GARA...
2018/03/05
1,036
2,457
<issue_start>username_0: I have a bunch of portuguese zip codes, which have the format 4000-700, i need to get the latitude and longitude of those zip codes. I am trying to use this: ``` https://maps.googleapis.com/maps/api/geocode/json?address=4755-100,PT ``` But Google only returns the lat and lng of the prefix wh...
2018/03/05
2,017
6,766
<issue_start>username_0: To avoid ragged matrices, I want to design a type wrapper for lists that holds length in type. *(Please correct me if I should not call it a "length-indexed vector".)* I would like to provide it as an abstract type with smart constructors, among which would be an [`IsList`](https://downloads.ha...
2018/03/05
355
1,335
<issue_start>username_0: I have a file named cron.php that exists in the application/controllers/admin directory in my CodeIgniter project. From what I understand, the correct cron command to perform the "test" method in the cron.php file in cPanel would be: /opt/php56/bin/php /home4/username/public\_html/index.php c...
2018/03/05
1,266
5,074
<issue_start>username_0: I have the below functioning properly, but for some reason the requests seem to be executing synchronously, instead of asynchronously. My assumption now is that this is happening because of the `for record in records` for loop in the main function, but i'm not sure how to change this so that ...
2018/03/05
1,232
5,074
<issue_start>username_0: Given an `Address` at a minimum **must** have a `$firstLine` and `$postcode` but can contain optional properties, I am looking to implement a `builder` to ease the construction of an `Address`. An abridged `Address` might look like: ``` class Address { /** * @var AddressLine */ ...
2018/03/05
448
1,523
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/Rkpn4.png)](https://i.stack.imgur.com/Rkpn4.png) I get this pop and error for authencation failure azurewebsites.net:4020 error. Due to this i am unable to log in to my website. I don't know what to do and how to handle this. Kindly s...
2018/03/05
576
1,747
<issue_start>username_0: I'm new to ADF. I'm writing hybrid test scripts and I would like to know why it is not possible to find element thru its xpath on Amazon Device Farm Appium JUnit. I tested and I can do this: `action.click(By.id("menu"), "Click on menu");` But I **can't** do this: `action.click(By.xpath("//*...
2018/03/05
696
1,552
<issue_start>username_0: How can I find words which contain the first 3 characters input by a user. If the file contains words NYL000234 and other words, and user gives an input like NYL, then output would be NYL000234. Example - Text file contains - ``` 10099834 COL01139 OD 1_1_2_1 T1 10115177 COL01356 OD 1_1_3_1 T1...
2018/03/05
319
1,190
<issue_start>username_0: Most applications of ffmpeg both in terminal and code seem to be passing ffmpeg commands to the ffmpeg library with specific parameters. For example, you might run the following command to get an overlayed gif out of a video input and a png input: ``` -i i.mp4 -i me.png -filter_complex 'overl...
2018/03/05
301
999
<issue_start>username_0: I'm writing a code to get integers from the user and save them in a simple linked list until the numbers are -1 and -1. My problem is: When my list has more than 1 number, the program runs perfectly, but when it enter just one combination of numbers (1, for example) and then -1, I get a segment...
2018/03/05
810
3,175
<issue_start>username_0: I'm not sure if this is possible and no luck on researching this. I'm working on a dashboard using DC.js charts and crossfilter.js. I'm going to use a Row chart as an example. Instead of clicking on the items to filter, is it possible to do that opposite? For example. When I click on an item ...
2018/03/05
778
2,712
<issue_start>username_0: I have today installed Docker on my Ubuntu 16.04 PC, it is a dell XPS15. The client side works well, but if I launch: ``` docker version ``` It returns a `permission denied` error: ``` Client: Version: 17.12.1-ce API version: 1.35 Go version: go1.9.4 Git commit: 7390fc6 Built: Tue...
2018/03/05
827
3,052
<issue_start>username_0: This is a pretty simple question, I think, but I cannot find an answer for it here, or through online searching. I am running a count query, and am having trouble with value labels and column headings Query is ``` SELECT mail_code AS "code", COUNT(mail_code) AS "count" FROM data.base GROUP B...
2018/03/05
460
1,715
<issue_start>username_0: I have a constructor: ``` function a(x, y){\n this.array[x][y]; for(var i = 0; i ``` How would I declare this.array correctly? (this.array is supposed to be a multidimensional array.<issue_comment>username_1: **If you want to initialize that array, use this approach:** ``` ...
2018/03/05
495
1,728
<issue_start>username_0: I downloaded the bot application samples from github, and opened the luis application through visualstudio and tried to import the json file to creat a new app in luis.ai portal, but it was throwing error **"BadArgument: Version ID cannot be null or empty."**<issue_comment>username_1: Open the...
2018/03/05
659
2,272
<issue_start>username_0: I am creating a calendar program, and my aim is to save events and so on in a JSON file. What I think is the best way to do so is by storing arrays inside arrays in the JSON file (this way I can iterate through each array and load them when the program starts). First and foremost: how do I pu...
2018/03/05
1,285
3,290
<issue_start>username_0: When creating Dockerfiles using an Alpine image, I have often seen the use of either * `apk add --no-cache`, or * `apk add` followed by an `rm /var/cache/apk/*` statement. I am curious to know whether making use of the `--no-cache` flag eliminates the need to manually clear the package cache ...
2018/03/05
1,432
4,386
<issue_start>username_0: This is probably a [visual-studio-2017](/questions/tagged/visual-studio-2017 "show questions tagged 'visual-studio-2017'") bug related to this question: [Templated Variables Bug With Lambdas in Visual Studio?](https://stackoverflow.com/q/49117293/2642059) And as [mentioned in the comments](http...
2018/03/05
1,066
2,651
<issue_start>username_0: [![Shaded area required](https://i.stack.imgur.com/hUq9n.jpg)](https://i.stack.imgur.com/hUq9n.jpg) The above shaded area, according to [Wolfram](https://www.wolframalpha.com/input/?i=A+XOR+B+XOR+C+XOR+(A+AND+B+AND+C)&rawformassumption=%7B%22C%22,+%22XOR%22%7D+-%3E+%7B%22MathOperator%22%7D) is...
2018/03/05
857
2,107
<issue_start>username_0: I have the following html code for a radio button ``` Smart Calculation Based on Events ``` And I tried to use the following xpath: ``` //label[text()='Smart Calculation Based on Events']/preceding-sibling::input[@type='radio'] ``` Which is not working.<issue_comment>username_1: Python ...
2018/03/05
835
2,022
<issue_start>username_0: I want to make an wallpaper app, but I'm wondering if there is a general size of the image that should be? Didn't find any answer, want to fit all of the smartphone's. Thanks<issue_comment>username_1: Python supports sets ([more about sets](https://docs.python.org/3/tutorial/datastructures.ht...
2018/03/05
1,435
4,933
<issue_start>username_0: I have a 'gin' model that allows nested attributes for 'name' in a 'distillery' model. The nested form is working well, but I realised I'm creating 'duplicate' distillery entries. It seems 'find\_or\_create\_by' should prevent this, **but I can't get it to not create a duplicate.** As this is ...
2018/03/05
640
2,131
<issue_start>username_0: I started learning Java a month back, and I have been using Eclipse as the workspace. Although I love the layout of it, I've been having trouble with what the console outputs. Specifically, the console will automatically create new lines in the output, despite no call for the creation of a new ...
2018/03/05
3,819
14,684
<issue_start>username_0: How can I get the **serial number** of USB storage devices in **.Net Core 2.1**? I found different solutions, but sadly they don't work due the lack of Windows registry and WMI support in .Net Core. In Powershell it's really simple, but I wasn't able to find an implementation in [Powershell ...
2018/03/05
4,513
12,458
<issue_start>username_0: Hi there I have two forms that display results based on user inputed data (php/database query) into tabular format. My problem is that both of the forms are positioned on the left hand side of the page and when i run the second form it places the table in the position where the the first query ...
2018/03/05
684
2,212
<issue_start>username_0: I have this VBA code to delete rows in excel ``` Sub deleterows() i = 1 Do Until i = 150000 If ActiveCell.Value = False Then ActiveCell.EntireRow.Delete End If ActiveCell.Offset(1, 0).Activate i = i + 1 Loop End Sub ``` However this code is not deleting all the rows that contain the...
2018/03/05
605
2,084
<issue_start>username_0: I am using VueJS and trying to fire a mouseover event on two elements, one a child element of the other. I am unable to get the child mouseover event to fire. It appears the parent element is "covering" the child div and only the parent mouseover event is registered. ```js var vm = new Vue({...
2018/03/05
898
3,594
<issue_start>username_0: I've ran into something in `JavaScript` that goes completely against my intuitions. I first define a function, `Shuffle(Input_array)`, that randomizes the order of an array. I then define an array, `Words`, print it to the console, and then print the result from `Shuffle(Words)`. This is the ...
2018/03/05
669
2,753
<issue_start>username_0: I've just started using AppVeyor for continuous integration with GitHub. I've been able to add a status badge to my README.md that displays the status of the most recent AppVeyor build. However, I've only been able to display either: 1) The status of the most recent build for a particular bran...
2018/03/05
601
1,883
<issue_start>username_0: Say I have three dataframes in `my.list`, each with different numbers of rows. I would like to reorder this list so that the first element of the list is the dataframe with the highest number of rows (in the below example, `d2`). ``` d1 <- data.frame(y1 = c(1, 2, 3), y2 = c(4,...
2018/03/05
960
3,246
<issue_start>username_0: One formula for AIC is: AIC = 2k + n\*Log(RSS/n) Intuitively, if you add a parameter to your model, your AIC will decrease (and hence you should keep the parameter), if the increase in the 2k term due to the new parameter is offset by the decrease in the n\*Log(RSS/n) term due to the decrease...
2018/03/05
457
1,647
<issue_start>username_0: I want to write an application that talks to a database. The databases are created through phpmyadmin interface. I can talk to these fine through php. What I would like is to populate these databases using a powershell script. How do I connect to the database ? How do I populate a database ? I...
2018/03/05
1,250
2,474
<issue_start>username_0: ``` df = pd.DataFrame([[1.1, 1.1, 1.1, 2.6, 2.5, 3.4,2.6,2.6,3.4,3.4,2.6,1.1,1.1,3.3], list('AAABBBBABCBDDD'), [1.1, 1.7, 2.5, 2.6, 3.3, 3.8,4.0,4.2,4.3,4.5,4.6,4.7,4.7,4.8], ['x/y/z','x/y','x/y/z/n','x/u','x','x/u/v','x/y/z','x','x/u/v/b','-','x/y','x/y/z','x','x/u/v/w'],['1','4','3','2','4','...
2018/03/05
537
2,028
<issue_start>username_0: I can't figure out how to convert async await functionality in a while loop to a promise based implementation. repl showing the async await version <https://repl.it/repls/IdealisticPepperyCoding> ```js var dependency = false; function checkDependency() { return new Promise(resolve => { ...
2018/03/05
625
2,438
<issue_start>username_0: I'm trying to put together a macro which will select certain columns and paste them into a new sheet. The problem is that columns tend to be added and deleted as people see fit which throws off the absolute referencing. I have been trying to tinker with the basic macro produced using the macr...
2018/03/05
405
1,311
<issue_start>username_0: I try to download an image(png) from a api. My problem is, that for some reason only json files are accepted by ionic/angular. ``` return this.http.get(this.authKeys.serverURL, {headers: this.header, responseType: ResponseContentType.Blob}); ``` Following error occurs: ``` Argument of ty...
2018/03/05
418
1,130
<issue_start>username_0: I am using colors.jl package and have RGB values that I need to convert to hex string triplet value. What's the best way to do this? couldn't find a conversion function in colors.jl thanks<issue_comment>username_1: You can define a custom `struct` which is constructible from `AbstractRGB` and ...
2018/03/05
544
1,207
<issue_start>username_0: How to convert `DateTimeOffset` to `DateTime`? I have tried using: ``` CONVERT(VARCHAR, 2018-03-02 12:00:00.0000000 -07:00, 120) ``` but the result is: ``` "2018-03-02 12:00:00 -07:00" ``` Ex: `"2018-03-02 12:00:00.0000000 -07:00"` to `"2018-03-02 12:00:00"`<issue_comment>username_1: Yo...
2018/03/05
356
1,297
<issue_start>username_0: hi guys I need to know how do I pass the class index to a function when calling it. let's say I have 3 input tags like this one: ``` ``` Now what i want to do is just like i passed in the class name i want to pass in the class index which the function got called from. index0 should pass in...
2018/03/05
743
1,883
<issue_start>username_0: So I try to get the hash from a file. Using the [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift) library. The `truth` is the variable with the hash that I got from the VLC website, so that should be true. However, the hash I generate is different from the hash I know to be the truth....
2018/03/05
664
2,342
<issue_start>username_0: I'm making a space invader clone just to learn a little Python since I just started with it. I made a `turtle.Screen()` but everytime I run it, it instantly freezes and crashes. Does anyone know what's causing this problem? ``` import turtle from turtle import forward, right, left ...
2018/03/05
393
1,386
<issue_start>username_0: Just wanted to know, if there is a way, I can find out the list of implemented rest services which are using Jersey. Thanks<issue_comment>username_1: Once (re)indented correctly, it works for me. I suggest you get rid of all the imports you're not using as well as consolidate down to a single ...
2018/03/05
585
2,096
<issue_start>username_0: My view controller: ``` class myViewController: UIViewController { var myvar = 0 func count() { print(myvar) myvar+=1 } } ``` --- Other view controller: ``` Interval(1) { myViewController().count() } ``` --- The code above is the code I got so far. But there seem...
2018/03/05
763
2,911
<issue_start>username_0: In a non-SinglePageApp, when you click on an anchor link to another page, the javascript will cancel and the new page will load. This is a problem when I try to make asynchronous calls to google analytics attached to these anchor tags. e.g., If I have a continue link and I want a ga event to ...
2018/03/05
1,400
4,151
<issue_start>username_0: I have data like this in Excel: ``` Duration: PT7M37S PT9M30S PT2M16S PT4M22S PT31S PT15S PT3M20S PT58S PT27M50S ``` But, I want to convert it to 457 (7\*60+37) seconds. Is there any easy way to do this, because I have 22,000 samples like this?<issue_comment>username_1: Assuming your sample ...
2018/03/05
686
2,566
<issue_start>username_0: I'm trying to use AJAX to request a token. This will only be used on localhost to make the request. I've got the code: ``` $.ajax({ url: "TOKEN URL HERE", beforeSend: function(xhr) { xhr.setRequestHeader("grant_type", "client_credentials"); xhr.setRequestHeader("client_id", "ENTER ...
2018/03/05
726
2,612
<issue_start>username_0: I am fairly new to java and I need some help with my code. I am trying to replace all characters equal to the first character of the input (except the first character) with an asterisk(\*). Example: -input: 1231231231 -output: 123\*23\*23\* This is my code: ``` import java.io.*; import j...
2018/03/05
1,282
3,894
<issue_start>username_0: I wonder how to write function that returns array with constant number of members. Does it make a sense at all? I know I can do something like that: ``` float* WojtekEQgraph::_Wk_N(float k) { float comp[2]; comp[0] = cos(-2.0f * double_Pi * (float)k); // Real number comp[1] = sin(-...
2018/03/05
369
1,223
<issue_start>username_0: want to do a ``` document.getElementById('js-pjax-loader-bar') ``` from <https://github.com/facebook/react-native> And i don't know how o get it! I try: ``` const jsCode = "document.getElementById('js-pjax-loader-bar')"; return ( ); ``` Possibly the script run, but i don't know h...
2018/03/05
2,040
8,095
<issue_start>username_0: Just to start off, I'm pretty inept at Java and especially multithreading, so what I'm asking might sound a bit ordinary. I am attempting to create a program in which I create three threads which each accomplish the specific task of depicting certain values between ten integers, such as average...
2018/03/05
1,821
7,062
<issue_start>username_0: In one screen of my web app, a user has entered a numerical value which is stored in the localstorage. In the next screen the user can click a button where the localstorage value will be incremented by a value once; lets say add 5. So if the localstorage of the variable X is 5 on button click i...
2018/03/05
763
2,076
<issue_start>username_0: I have created a graph with the following code and data: ``` ggplot(data.frame, aes(x=Score, y=Year, col=Position)) + geom_smooth(method="lm", se=FALSE). Year Position Score 2010 QB 16.5 2011 QB 15.4 2012 QB 16.1 2013 QB 14.3 2014 QB 13....
2018/03/05
382
1,499
<issue_start>username_0: I'm having trouble to change both the regular and large titles of my Navigation Bar. I only want to change the font, without interfering on the font size. I tried getting the pointSize, but it's not available for NavBar titles. How can I do it?<issue_comment>username_1: There is no way to chang...
2018/03/05
366
1,450
<issue_start>username_0: I am trying to change the number of columns for a specific collection. Right now collection is set to four columns but i would like the one collection to be only two columns. How would I do this?<issue_comment>username_1: There is no way to change **only** font size. Since the font represents b...
2018/03/05
1,039
3,685
<issue_start>username_0: I am developing a REST client to connect to an external server, which I do not have access to. I've been able to successfully stablish communication using Postman and SOAPUi, and now I'm trying with Java (org.glassfish.jersey.client.ClientResponse), but to no avail, because whenever I include "...
2018/03/05
492
1,599
<issue_start>username_0: Previously, I had this: ``` $ python # version 2.7.x $ python3 # version 3.6.x ``` This was working fine. I made the idiotic mistake of trying fix something that wasn't broken and I ran these: ``` brew install python@2 brew install python@3 ``` I was thinking that this would do this: ```...
2018/03/05
407
1,432
<issue_start>username_0: I am trying run the power shell script on the remote computer, but its not working. tried below two option its fails. ``` Invoke-Command -Session $Session -FilePath "c:\ConfigureRemotingForAnsible.ps1 -CertValidityDays 3650 -EnableCredSSP -Verbose" ``` Method 2: ``` $script = [scriptblock...
2018/03/05
572
1,383
<issue_start>username_0: I would stop a while if `$sell` is GREATER than `$buy` **OR** `$k` is LESSER than 0.5 ``` $high = 0.002420; $buy = 0.0024123; $k = 1; do { $sell = $buy + ( ( $buy * $k ) / 100 ); echo ''.$sell.' con k = '.$k.' '; $k = $k-0.1; ...
2018/03/05
556
1,885
<issue_start>username_0: I have the following code that set an "x" on a cell every time I click on it in the range ("C3:C40)". The problem is it is putting the "x" in multiple cells and I want only one "x" in the range, only the clicked one. How could I change this code to make it? ``` Private Sub Worksheet_Selecti...
2018/03/05
937
3,177
<issue_start>username_0: I'm simply trying to create an admin user in mongo 3.6 and log in. I ran: ``` $mongo db.createUser( { user:"AdminMark", pwd:"<PASSWORD>", roles:[{role:"root",db:"admin"}] } ) ``` It says: `Successfully added user` Then tried to log in: ``` mongo -u AdminMark -p --authentication...
2018/03/05
697
2,730
<issue_start>username_0: I am looking for a way to get the width of an image with an Umbraco event, to validate that the image respects a certain aspect ratio before being uploaded. The thing is I don't know if casting the mediaItem to Image is even possible. How can I get the width or the height here is my event code ...
2018/03/05
976
3,462
<issue_start>username_0: I am trying to convert my swift struct to json format. There seems to be quite a few questions like this, but none of the solutions has worked for me so far. Here is my struct ``` struct Rec : Codable { var name:String var time:Int var values:[String] var jsonRepresentation :...
2018/03/05
667
2,256
<issue_start>username_0: I have a python code like this ``` x = 2 y = 1 g = 0 open = [[g, x, y]] ``` I try to convert it in Java.So I write down like this ``` ArrayList> open = new ArrayList<>(); ArrayList open1=new ArrayList<>(); open1.add(g); open1.add(x); open1.add(y); open.add(open1) ``` Is that a ri...
2018/03/05
641
2,290
<issue_start>username_0: I notice that objects drop when switching to VR mode (i.e. the cardboard glasses icon) on a phone or tablet. (verified on three different android devices) E.g. - In below example - when entering VR, the sphere drops (about 1 on coordinates). Then exiting VR, sphere is still dropped. Repeating ...
2018/03/05
811
2,634
<issue_start>username_0: I am trying to use Change Streams to lookup/monitor the changes to a mongo collection. ``` cursor = db.collection.watch(full_document='updateLookup') document = next(cursor) print document['documentKey'] ``` While using updateMany to update multiple documents at once, I'm not able to see all...
2018/03/05
1,198
4,935
<issue_start>username_0: Our product requires a static library (.lib) file to be linked as part of a Vendor's API. I have a project defined for the API which supplies a number of functions & classes, and that generates a .lib file. But for that .lib to link and be used by a client, it also needs to link against this ...
2018/03/05
1,228
4,291
<issue_start>username_0: I have a need to use the OneWire library (with DallasTemperature library) in a context where I will not know the gpio pin used by library at compile time. In all of the examples of this library, the pin is hard-coded. I have tried to use pointers to workaround this, but my test code (below) doe...
2018/03/05
1,311
4,455
<issue_start>username_0: **Code that is executed when I like a post** ``` // auth()->id() is the id of the user that liked the post $post->post_likes()->associate(auth()->id()); $post->save(); ``` **Error that occurs after the code runs** Method Illuminate\Database\Query\Builder::associate does not exist. ...
2018/03/05
492
1,556
<issue_start>username_0: The number of parameters in my case class for the data field changes dynamically. So, can a `Var` also bind a `js.Array` in Binding.scala? I tried following code without success: ``` case class Data(d: Var[js.Array[String]]) val data = Vars.empty[Data] { for (x <- data) yield { val y:...
2018/03/05
689
2,351
<issue_start>username_0: I'm on the finnishing touches my first game and are having issues returning to the main menu when the player lose the game. Main(Game) class: ``` public static void main(String[] args) throws InterruptedException { Main main = new Main(); ``` This is where the menu is added to my frame....
2018/03/05
506
1,779
<issue_start>username_0: For example: ``` export const setVisibilityFilter = (filter) => ({ type: 'SET_VISIBILITY_FILTER', filter }) ``` The name of the function `setVisibilityFilter` has camelCase. The same in the written version in uppercase characters separated by underscores: `SET_VISIBILITY_FILTER` I want ...
2018/03/05
1,180
4,178
<issue_start>username_0: I've been trying to create a simple path with Kotlin in Android Studio, but unfortunately I am unable to do so. Right now, my code looks like this: ``` lateinit var context : Context private const val PERMISSION_REQUEST = 10 fun makeDir(){ // I/O logic val filename: String = "ziemni...
2018/03/05
306
1,131
<issue_start>username_0: I am using ASP.NET Core framework to build an API with Azure Key Vault. I tried to follow this [tutorial](https://anthonychu.ca/post/secrets-aspnet-core-key-vault-msi/) but I am not able to find **Microsoft.Azure.Services.AppAuthentication** in the NuGet packages. [![enter image description h...
2018/03/05
185
802
<issue_start>username_0: Trying to find a solution for devs on our environment. I was looking for a way to run Postgres on a docker container with liquibase, pointing to a changelog file outside of the container and just couldn't find a solution. Was looking for some or be pointed in the right direction.<issue_comment>...
2018/03/05
336
1,281
<issue_start>username_0: I am pretty new to java, usually writing python code, so you can downvote me as much as you want if only it will help me with understanding. Is there more less "javish" way to swap two neighborhood elements of user-input array? Currently I have: ``` public static void main(String[] args) { ...
2018/03/05
365
1,432
<issue_start>username_0: I'm using slick slider to display 5 blocks of information. I've built it so on large screens the slider doesn't actually slide. Rather it just displays the blocks like floated divs. What I'd like to do on on mobile devices less than 768 picks is display some of the blocks and let the user swipe...
2018/03/05
1,109
4,147
<issue_start>username_0: I've created a test for the creation of a new user: ``` private static String USERS_ENDPOINT = "http://localhost:8080/users/"; private static String GROUPS_ENDPOINT = "http://localhost:8080/groups/"; @Test @DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD) public void whenCreateAp...
2018/03/05
1,319
4,189
<issue_start>username_0: Package `term`: ``` type Num interface { IsNeg() bool Add(Num) Num } type Term struct { Coeff Num Var string } ``` External package `frac64` ``` type Frac64 struct { Numer uint64 Denom uint64 Neg bool } func (a Frac64) Add(b Frac64) Frac64 { // Pretend thi...
2018/03/05
456
1,091
<issue_start>username_0: How do I efficiently turn a vector into a matrix so that the values of the vector determine the column and the element ordering determines the row, and the value assigned at those indices are determined afterwards. ``` X <- c(1,2,3,1,1,3) Y <- 1:6 Z <- myfun(X, Y) Z ## returns matrix # 1 NA...
2018/03/05
580
1,786
<issue_start>username_0: I am using Geb with Spock for my automated test. There are multiple dropdowns on the page, and I want to verify the text of all the options. I am using the following to grab the text, and it is working ``` String actualtext = ""; List options = driver.findElements(By.cssSelector("#dateFormat")...
2018/03/05
781
2,322
<issue_start>username_0: I am attempting to flatten a list using: ``` wd = ['this' , 'is'] np.asarray(list(map(lambda x : list(x) , wd))).flatten() ``` which returns: ``` array([['t', 'h', 'i', 's'], ['i', 's']], dtype=object) ``` when I'm expecting a char array: `['t','h','i','s','i','s']` Is this correct use ...
2018/03/05
881
3,322
<issue_start>username_0: I recently had to generate a BQ table out of other BQ tables. The logic was rather involved and I ended up writing a complex SQL statement. In Oracle SQL I would have written a PL/SQL procedure with the logic broken down into separate pieces (most often merge statements). In some cases I woul...
2018/03/05
1,285
4,264
<issue_start>username_0: I am having problems figuring out how to get the correct dates out of a query. I need to pull the Oldest date for each job number but since I cannot have a Order By in my sub query I am unsure what route to go. --MSSQL 2016 ``` Create Table #FOO ( Job varchar(4), CurrentMilestone varc...
2018/03/05
297
1,158
<issue_start>username_0: For some reasons, practical or not, rxjs npm package stores BAZEL.build configuration in the package, so when I'm trying to build my project (which has node\_modules folder) bazel tries automatically to build something that it's not supposed to build at all. My question would be - what is cano...
2018/03/05
1,087
2,892
<issue_start>username_0: I am new to Scala and I need a solution to my problem. Imagine I have these lists: ``` val list1 = List(1,2,3,4,5,6,7,8,9,10,11) val list2 = List(6,5) ``` And my desire is to split the first list in a List of Lists using list2 to map it. So the result would be something like this: ``` val r...
2018/03/05
1,696
5,457
<issue_start>username_0: using R programming I have two sets of data (securityj and securityc). I want to find the `cosine` similarity value between them I used this code using the `lsa library` ``` databasfile = tempfile() dir.create(databasfile) write( databasej, file=paste(databasfile, "D1", sep="/")) write( data...
2018/03/05
1,613
5,124
<issue_start>username_0: Had PIP working normally until few days ago. Not sure how. Trying to run it now and now show issues. Adding full stack bellow of the error: ``` Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self...
2018/03/05
750
2,359
<issue_start>username_0: How do I get access to the "thumburl" if I do not know the "pageid"? ``` { "continue": { "iistart": "2004-12-19T12:37:26Z", "continue": "||" }, "query": { "pages": { "30260": { "pageid": 30260, "ns": 6, "title": "File:Japanese diet inside.jpg", ...
2018/03/05
1,484
5,997
<issue_start>username_0: I'm using Firebase's Firestore to store data for my iOS app. In Firestore, I have two collections. One called `songs` and one called `playlists`. The `songs` collection contain many documents and each document has a single song info inside of it. Here's what a `songs` document looks like. [![s...
2018/03/05
649
2,304
<issue_start>username_0: Supposre I have an input array of integers. I want to split this array in multiple array based on the missing integer and append it in a new Array. I think `split` can be used here but not sure how to do it. I want `arrayFinal` only. ``` myArray = [0,1,2,4,7,8] ``` **Desired Output** ``` ar...
2018/03/05
708
2,328
<issue_start>username_0: I want to print out a formatted string based on a string that is contained within a list. However, I want to print out the formatted string to stop at a comma. Example: `a = ['Apple pie, A couple of oranges, Eggs benedict, Chocolate Milkshake']` I want my formatted string to look like this: ...
2018/03/05
669
2,343
<issue_start>username_0: I want to copy all the contents from `buf[rm]` to `temp_a` and print `temp_a` but getting Segmentation fault: 11 after running. I need to use `key[]` further in program. ``` #include #include #include #include int main() { int c = 0, rm; int i; int iter; int j = 0; int temp;...
2018/03/05
734
2,322
<issue_start>username_0: I have got 2 tables like this ``` Cities: id__| country__ -------------- _1__| 1000 _2__| 1001 _3__| 1002 Translates: id__ | city_id | name | __lang__ | _order_ ------------------------------------------------------- 1____| 1 | Dnipro | en | 2 2____| 1 ...
2018/03/05
277
889
<issue_start>username_0: I have the following bash script thowring exception: "cut: option requires an argument -- 'f'". It would cut out the 5th colunm from /etc/passwd, separated by ':' character. How should I pass the $variable to the option's parameter? ``` variable=5; cut -d':' -f$variable < /etc/passwd ```<is...
2018/03/05
447
1,504
<issue_start>username_0: I have issue with add to cart button on pages. For example [here](http://touchdowner.cz/digital-products/sound-kits/808-kits/) "add to cart" is not showing for some reason. When check in CSS class i see this CSS rule: ``` .woocommerce a.button, .woocommerce-page a.button, .woocommerce button....
2018/03/05
1,192
3,828
<issue_start>username_0: **Problem:** Our NGINX implementation has a base location for several different operation types, e.g. /analytics, /topology, ...; and each has its own *access\_by\_lua\_file* which cracks open a token that is passed in containing several things that must be verified and processed, including a n...
2018/03/05
404
1,432
<issue_start>username_0: Can you explain why a button jumps to a new line after a element? It is inline element, right? why then doesn't it stay inline? I can't put that button inside the because that constantly updates with Jquery, so it will remove (overwrite) it. Is there a way to make the button not to jump to a...
2018/03/05
266
775
<issue_start>username_0: Trying to use `gcloud` & `gsutil` from a laptop. `gcloud` can connect but `gsutil` cannot: ``` mylaptop:~ jamiet$ gcloud projects list | head -2 PROJECT_ID NAME PROJECT_NUMBER dev-99999 dev-99999 999999999999 mylaptop:~ jamiet$ gsutil ls INFO 030...
2018/03/05
282
933
<issue_start>username_0: I'm trying to learn Python and I'm running the code: ``` for car in cars: if car == 'bmw': print(car.upper()) else: print(car.title()) ``` but I'm getting this error: `for car in cars: ... if car == 'bmw': ... print(car.upper()) ... else: File "", line 4 else: ^ IndentationError...