date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/02/27
1,146
3,674
<issue_start>username_0: I have the following: ``` # script_1 from ephem import * import time, math, commands, sys, os elements = open('orbital_elements.txt') # Then does some stuff and takes information from the text file, calculating diff_x, diff_y, diff_z return diff_x, diff_y, diff_z ``` I then have a second...
2018/02/27
804
2,801
<issue_start>username_0: Given a table like this: ``` id name field 1 walt a 2 hurley b 3 jack c 4 kate a 5 sawyer a 6 john a 7 ben b 8 miles null 9 juliet c 10 jacob d 11 richard null ``` How would y...
2018/02/27
654
2,325
<issue_start>username_0: I'm brand new to amp, trying to build a new amp page, and wanted to include php to access a mysql database. However, I'm getting this error: ``` The tag '?php' is disallowed. ``` Seems I must be missing something obvious, but I find zero reference to PHP in the documentation nor here in stac...
2018/02/27
449
1,639
<issue_start>username_0: I'd like to initialize this array at the PowerShell prompt: ``` $Parameters = @{ SourcePath = 'D:\Website' TargetPath = 'wwwroot' ComputerName 'https://website:8172/msdeploy.axd?site=website' Credential = $Credential } ``` However, when I paste this command I'm prevented by a...
2018/02/27
471
1,774
<issue_start>username_0: I am using xero as my accounting software. I have one requirement that part of my application need to be integrated with xero to perform automation. Using the nodejs sdk seems so easy, but the fact is i cannot connect to xero even using the simplest example. Here is the code: ``` const xero = ...
2018/02/27
622
2,330
<issue_start>username_0: I´d like to export data to several columns in csv but I always obtain this kind of file: [csv](https://i.stack.imgur.com/vBA4U.png) I´d like to obtain two columns one "articulo" and another one "price" My pipelines: ``` import scrapy from scrapy import signals from scrapy.contrib.exporter i...
2018/02/27
1,236
3,681
<issue_start>username_0: I'd like to have text appear on the top of a div that has a border that also has a white background so you don't see the border line going through the text. I've tried adding z-index to the text but I believe since `position: relative` it doesn't matter. I'm also open to other suggestions as to...
2018/02/27
795
3,219
<issue_start>username_0: We have been using rails 5.2RC1 for a couple weeks on a small number of production apps to test ActiveStorage. We've been able to get everything working with our Heroku instances (including PDF previews), but are now running into some questions around best practices. Say we have the following ...
2018/02/27
3,196
10,497
<issue_start>username_0: I am dealing with Time and Date in Java. I am having date as : 2018-08-22T22:00:00-0500 My Time Zone offset here is -0500 How can I get the list of available Time Zone IDs? My main objective here is to set a date to a particular Time Zone. However I do not know the time zone as it is embedded...
2018/02/27
3,217
10,459
<issue_start>username_0: I used knn to do a basic predictive model build. After I run: ``` predictions = knn(train,test,cl,k=3) ``` and then output `predictions`, the R console has a dozen results per row. Such as: ``` [1] Yes No Yes Yes Yes No Yes Yes Yes No No [12] No Yes Yes Yes No No No Yes Yes Yes No ``` e...
2018/02/27
503
1,487
<issue_start>username_0: I want to remove all rows with NAs, I tried na.omit, but I still have all the "#N/A" values in my data... This is my code: ``` mydata = read.csv('file:///C:/Users/file.csv') mydata = as.data.frame(mydata) mydata[mydata$col2== "#N/A"] <- "NA" na.omit(mydata$col2) ``` What can I do? I also t...
2018/02/27
569
1,907
<issue_start>username_0: I've been working on an Arduino set up that uses both an infrared sensor and a sonic distance sensor. Since I'm using both of these, the serial port data needs to have a discernible tag from both data sets, I'm using ' cm' for the sonic sensor data. My issue is I can't figure out how to strip...
2018/02/27
476
1,530
<issue_start>username_0: I have a treeview control with three parent nodes each containing three child nodes. ``` Parent1 Child11 Child12 Child13 Parent2 Child21 Child22 Child23 Parent3 Child31 Child32 Child33 ``` How do I loop through each parent node to check whether its child nodes are ...
2018/02/27
1,064
2,434
<issue_start>username_0: I have a time column in R as: ``` 22:34:47 06:23:15 7:35:15 5:45 ``` How to make all the time values in a column into hh:mm:ss format. I have used as\_date(a$time, tz=NULL) but I am not able to get the format which I wanted.<issue_comment>username_1: Using a [tidyverse](/questions/tagged/tid...
2018/02/27
271
934
<issue_start>username_0: open modal function: ``` $(document).ready(function(){ $("#myBtn").click(function(){ $("#myModal").modal(); }); ``` });<issue_comment>username_1: You can use ng-click over button and call the function in controller ``` ``` and in controller, ``` $scope.function = open(){ $("#myMod...
2018/02/27
770
3,161
<issue_start>username_0: I got the following serivce provider: ``` class CartServiceProvider extends ServiceProvider { public function boot() { } public function register() { $this->app->singleton(\Alexxosipov\Cart\Cart::class, function($app) { return new \Alexxosipov\Cart\Cart($app[...
2018/02/27
697
2,259
<issue_start>username_0: Since it's not possible to assign values to a const after it's initialized, how can I achieve this? ``` const double input1[1000][2]; for(int i = 0; i < 1000; i++){ input1[i][0] = i; input1[i][1] = i*2; } ```<issue_comment>username_1: I don't understand why would you want to store the...
2018/02/27
854
2,865
<issue_start>username_0: I have a list of political parties: ``` x = ['Green', 'Republicans' 'Democrats', 'Independent'] ``` and then I have a file that lists out which district was won by the political party, there are roughly sixty entries. I have some starter code but I don't quite know how to continue on. ``` ...
2018/02/27
2,979
10,120
<issue_start>username_0: I am a fairly new to web developement. First I deployed a static website on my vps (Ubuntu 16.04) without problem and then I tried to add a blog app to it. It works well locally with PostgreSQL but I can't make it work on my server. It seems like it tries to connect to Postgres with my Unix u...
2018/02/27
1,491
4,496
<issue_start>username_0: There is a page my teacher is making me do where I am supposed to click on a term and match it to its definition. There are 30 words and there can only be 6 (with their matching definition so a total of 1)of them on the screen at a time. I have an array of all the words and definitions so pytho...
2018/02/27
868
2,928
<issue_start>username_0: I need to find a way to download all PDF files to be found in a given url and I found a script that supposedly accomplishes this task (I have not tested it): ``` import urllib.parse import urllib2 import os import sys from bs4 import BeautifulSoup from urllib3 import request url = "https://....
2018/02/27
783
2,763
<issue_start>username_0: I have a doubly linked list data structure, and each node within that linked list is another linked list. I'm trying to typecast the node into a linked list later in the program, but receive the error: ``` error: conversion to non-scalar type requested ``` Which I know is because I'm trying...
2018/02/27
1,165
4,536
<issue_start>username_0: I'm trying to write a program that will read in the number of values for an array, call a function to input said values and then compute the average. From there it will call another function to print off a corresponding message. The problem is that it appears to be returning what would be a mem...
2018/02/27
1,496
5,314
<issue_start>username_0: I am using apache2.4.7 on ubunbu14.02 with domain.com, right now all files on root except json under root document, I want to access url like : http sub.mydomain.com/path/randomnumbers?param=xxx to get randomnumbers and param, but couldn't unless it's http sub.mydoamin.com/ or sub.mydomian.com/...
2018/02/27
641
2,138
<issue_start>username_0: I want to get only the first letter of what is written in the input. Can help me? ``` first letter here function copyText(texteId, text1Id) { var data = document.getElementById(texteId).value; document.getElementById(text1Id).innerHTML = data; } ```<issue_comment>username_1: Yes you can s...
2018/02/27
1,006
3,429
<issue_start>username_0: I would like to generate a version of `printf` that automatically converts its `std::string` parameters to their `c_str()` values. (I find the `printf` syntax much cleaner and simpler than C++ streams). I want to use something SIMPLE. Short and simple is the only design goal. Boost has someth...
2018/02/27
904
2,838
<issue_start>username_0: I am trying to create a website header that conforms to the schematic below using Bootstrap 4: [![Colour-coded schematic of website header](https://i.stack.imgur.com/I7VRt.png)](https://i.stack.imgur.com/I7VRt.png) The code I am using to achieve this is as follows (extraneous code omitted): ...
2018/02/27
723
2,846
<issue_start>username_0: I have 2 mysql instances running side-by-side temporarily. I went to do a diff of the schemas and knew something was wrong when nothing was reported back. ``` $ diff --suppress-common-lines -y <(mysqldump --port 3307 -d accounts) <(mysqldump --port=3306 -d accounts) $ mysql --no-defaults --po...
2018/02/27
497
2,104
<issue_start>username_0: I'm using AWS's CloudFormation, and I recently spent quite a bit of time trying to figure out why the role I had created and attached policies to was not enabling my ECS task to send a message to a Simple Queue Service (SQS) queue. I realized that I was incorrectly attaching the SQS permissio...
2018/02/27
427
1,328
<issue_start>username_0: I am linking to this SweetAlert library `https://unpkg.com/sweetalert/dist/sweetalert.min.js`, and when I display an alert on mobile, it displays very small. I have increased the text size, but the success, error, warning animations are very small. How can I resize these animations, or make the...
2018/02/27
986
3,457
<issue_start>username_0: How should I import data in BigQuery on a daily basis when I have potential duplicated row ? Here is a bit of context. I'm updating data on a daily basis from a spreadsheet to BigQuery. I'm using Google App Script with a simple WRITE\_APPEND method. Sometimes I'm importing data I've already ...
2018/02/27
1,059
3,702
<issue_start>username_0: I need some help fixing this code so it could retrieve the 2 cols from the external file to load them in the `lbox_buscar`, not only the Column A. ``` Private Sub UserForm_Initialize() Dim SourceWB As Workbook Dim ListItems As Variant Dim i As Integer Application.ScreenUpdating ...
2018/02/27
640
2,267
<issue_start>username_0: Has anyone ever succeeded in getting Emmet JS snippets to work in VS Code or even in Sublime? The solution from <https://stackoverflow.com/a/16943996/2012407> did not work for me. These are my settings: ``` "emmet.includeLanguages": { "javascript": "javascriptreact", "vue-html": "htm...
2018/02/27
1,482
3,985
<issue_start>username_0: Per <https://stackoverflow.com/a/48981834/1840471>, this is an implementation of the weighted Gini coefficient in Python: ``` import numpy as np def gini(x, weights=None): if weights is None: weights = np.ones_like(x) # Calculate mean absolute deviation in two steps, for weight...
2018/02/27
350
1,243
<issue_start>username_0: I need to write my php variables correctly. ``` $query2 = mysqli_query($con,"SELECT * FROM palettes LIMIT '$starting_number, $palettes_per_page'"); ```<issue_comment>username_1: I don't think you want single quotes on your LIMIT parameters. One way is to use . to concatenate strings. Since `...
2018/02/27
763
2,429
<issue_start>username_0: Simple CSS question I have to ask as I'm not so good in CSS. I have done a popover modal function so when a user hovers over a link a modal shows like [![this](https://i.stack.imgur.com/FtMfV.png)](https://i.stack.imgur.com/FtMfV.png) but as you can see the title shows very huge, how can I mak...
2018/02/27
2,009
4,593
<issue_start>username_0: Bear with me, I know this is obviously super simple. I just can't seem to wrap my head around prolog. I have this logic problem: At the recent festival, the 100 metres heats were closely monitored. Each contestant had to run in two races so that the average place could be determined.. Only o...
2018/02/27
368
1,210
<issue_start>username_0: Using MySQL work bench where the table has an auto generated and auto incremented primary key. Now it increments from the last key by 1: > > next-key = last-key +1 > > > I wold like to increment this number by 100: > > next-key = last-key + 100 > > > Is there a way to do this in wor...
2018/02/27
1,168
3,805
<issue_start>username_0: I am attempting to create python bindings using pybind11(v2.2.2+) and cannot figure out how to invoke a C function that has a single std::initializer\_list argument. ``` void list_ints(std::initializer_list) ``` And the pybind11 binding is: ``` m.def("list_ints", &list_ints) ``` From pyt...
2018/02/27
559
1,898
<issue_start>username_0: How to go about changing value of a float according to time? For example. We have: ``` public float usdValue = 1f; ``` How to make it so value of USD changes randomly according to UTC time? Like + or - between -20% to +75% of its value during time? While its value changes every 1-5 minutes?...
2018/02/27
694
2,435
<issue_start>username_0: I have a .net Core API that I need to call a stored procedure from. I have the following code but I am told that there is a risk of SQL injection with it. I am not experienced enough to be able to identify where that threat is. How could I call this procedure in a more secure way? ``` [HttpPut...
2018/02/27
901
2,783
<issue_start>username_0: input text 5 1 5 7 10 123456789123456789 To use the binginteger because the input value is large Does not work on 123456789123456789. I don't know which is wrong. For game method, two people first decide a positive integer N and have an x that is initialized with a 1. Alice starts the game ...
2018/02/27
954
3,696
<issue_start>username_0: I'm trying to use NAudio to record 8 seconds of streaming audio, store it in `System.IO.MemoryStream`, and then play it back right after. To do this, I'm running the following code: ``` using System.IO; using NAudio.Wave; public class AudioCapture{ static WaveFileWriter wri; static b...
2018/02/27
785
2,802
<issue_start>username_0: I have a follow / unfollow button that changes the UI depending on the value of a public string. The problem is after the value of the String has changed and setState is called the UI remains the same. If I reload the page then it may change. Here is my code... ``` var friends; Future follow(...
2018/02/27
752
2,608
<issue_start>username_0: I'm currently testing a very basic socket example and even the basic test doesn't work. My Python code (server) is: ``` import socket server = socket.socket(socket.AF_INET) server.bind(("0.0.0.0", 5000)) server.listen(1) conn, addr = server.accept() ``` My Javascript code (client) is: ``` v...
2018/02/27
698
2,561
<issue_start>username_0: I have a dynamic list that gets its data asynchronously, and would like to scroll an specific element into view when the list is loaded. The list is build similar to this: ``` {{ item.title }} {{ item.content }} ``` As you can see, the items have an ID assigned that is simple a base st...
2018/02/27
630
2,119
<issue_start>username_0: I have this code ``` $string = "23 asdasdasdasd.sma(33) asda sdas asd 23 2 3 54232 23d asd"; $reg = "??"; preg_match($reg, $string, $matches); var_dump($matches); ``` I want to get this number: `33`.<issue_comment>username_1: This is not strictly angular, but you could do `document.querySe...
2018/02/27
320
1,063
<issue_start>username_0: I'm trying to keep either **All** and a group of checkboxes **(1, 2, 3)** unchecked. For example, when **All** is unchecked and **1** is checked, if I click **All**, **1** should be unchecked, and vice versa. ```html All 1 2 3 ``` I tried in this way but it doesn't work. Any su...
2018/02/27
279
898
<issue_start>username_0: I would like to round my decimal number. As I search on tutorial, We can use `round` function. Example I have this number `7.1`, when I tried to round it using ``` echo round("7.1"); ``` It will show us: `7` But now I want if `7.1` it should be `8`. Is it possible to do it?<issue_comment>...
2018/02/27
315
1,080
<issue_start>username_0: I have a custom post type named `myalbums`, so the url to archive page is `http://mysite/gallery` (I added `'rewrite' => ['slug' => 'gallery']` on it's creation). So, I want to have an alternative URL like `http://mysite/gallery/special` to see the same page but with a little filter. On one pa...
2018/02/27
455
1,747
<issue_start>username_0: it is possible to make forecasting for auto scaling in Amazon Web Server? if it possible how to implement or configure it?<issue_comment>username_1: Autoscaling can react to metrics, such as the CPU Utilization of Amazon EC2 instances, the length of an Amazon SQS queue and application latency m...
2018/02/27
785
2,457
<issue_start>username_0: Here I have a string in the format as follows: ``` Board: [Qd 6c Kc 8s Ad] Player STACKS5143 does not show cards.Bets: 0.15. Collects: 0. Loses: 0.15. Player REAGANBUSH84 does not show cards.Bets: 0.15. Collects: 0. Loses: 0.15. Player HossaRules does not show cards.Bets: 0. Collects: 0. Wi...
2018/02/27
214
930
<issue_start>username_0: I want to use the Tag Input within my web app, but I want to forbid users from adding new tags, but still retaining the functionality of removing tags. The application should be able to add tags dynamically via a separate process, and then users can remove those tags if they want to, but they ...
2018/02/27
1,708
5,222
<issue_start>username_0: I have created US map using scale. I want to add boundaries of state to emphasize the figures(color) such as IL, NH, MI, NY, ND. How I can draw the boundaries of states using my dataset? My map\_wc looks like below (it is shorted) and every state has figures in x. ``` > map_wc ...
2018/02/27
1,114
3,583
<issue_start>username_0: I have created a navbar but I cannot figure out how to center it on my webpage. Please advise, I have attached the link to the fiddle right at the bottom. Not sure what else to write as stack overflow is wanting me to provide more details before I post this. Hopefully you can answer my question...
2018/02/27
3,315
12,372
<issue_start>username_0: A typical example of a C++ iterator is a pointer, and can be used to point at an element in a C array like so: ```cpp int array[] = {1, 2, 3, 4}; int* begin = std::begin(array); //Starting iterator int* end = std::end(array) //Ending iterator for(int* i = begin; i < end; i++) { std::cout ...
2018/02/27
253
878
<issue_start>username_0: In what block do I need to put the code below and what trigger to use? ``` BEGIN if :BLOCK1.TEXTBOX is not null then SET_BLOCK_PROPERTY ('BLOCK2', DELETE_ALLOWED, PROPERTY_FALSE); end if; END; ``` What I wanted is to disable deleting if the :BLOCK1.TEXTBOX is not null.<is...
2018/02/27
581
2,234
<issue_start>username_0: I am using ExpressJS and want to stub a function that responds with an HTTP response as a part of a router. In particular, it is a request to Amazon S3 that I am trying to stub. ``` app.get('/', (req, res, next) => { s3.getSignedUrl('putObject', (err, url) => { res.json({ url: url }); ...
2018/02/27
348
1,283
<issue_start>username_0: I'm trying to figure out how to import a file in my src/assets folder. The file is called Current.jpg. The file I want to use that image in is in src/components/footer/overview folder. To me, that means I should be able to write: ``` import Current from '..../assets/Current.jpg'; ``` That ...
2018/02/27
1,009
2,612
<issue_start>username_0: I am trying to iterate through some files in a specific folder to do a specific operation in each of them (using Neuroimaging tool FSL). When I do ``` $ find /home/Desktop/MSc/ImagensMRI/T1/t1inciais/t1alzheimer/ ``` It returns a list of all the files in that folder So I did ``` $ for i ...
2018/02/27
885
2,353
<issue_start>username_0: I have a `WHERE` clause in which a `CASE` statement is used with NVL. Can someone explain the logic used in the below query? ``` SELECT * FROM employee WHERE ( CASE WHEN(employeeid IS NOT NULL AND (SELECT 1 FROM optemp a WHERE nvl(a.indicator,'`')= 'Y')) THEN 0 ...
2018/02/27
897
2,406
<issue_start>username_0: I am new to using the DOM and am trying to create this function that creates a 16x16 grid in HTML. I am using JavaScript to create the HTML and CSS. However, whenever I return the function it is undefined. What am I doing wrong? ```js const cellSize = 16; function createGrid(cellSize) { c...
2018/02/27
1,067
2,839
<issue_start>username_0: New code ive scrapped together. It is still not doing exactly what im looking for. Right now, I have a form that sends a text box and drop down file to my PHP code. The textbox works fine but the drop down doesn't send info over. The array constantly shows only the last result of "WY". Here is ...
2018/02/27
785
3,155
<issue_start>username_0: I have the following class in the Core Layer: **RequestManager:** ``` public class RequestManager: MyCarParkServiceBase, ISingletonDependency { public static List GlobalHitchRequestList = new List(); public static List GlobalCarparkRequestList = new List(); public static Dictionary> Glo...
2018/02/27
1,803
6,536
<issue_start>username_0: I want to write a function which uses many parameters, which I will call `a`, `b`, and `c`. I have four choices of implementing this in C++14. **For a new modern C++ project in 2018, which one of these styles best adheres to the philosophy of the [ISO C++](https://isocpp.org/)? Which styles a...
2018/02/27
1,681
5,895
<issue_start>username_0: I am trying to change the colors of the command prompt with two `choice` commands. I know that `choice` sets the error level, but when I select any number, only 0 is returned. What am I doing wrong? ``` choice /c 0123456789abcdef /D 0 /t 25 /n /M "Choose background color: 0:Black 1...
2018/02/27
537
1,787
<issue_start>username_0: I have a bootstrap alert that's supposed to hide if there's no text inside it. I was able to make the alert not take up the whole screen, but what's left is this small piece of it on top of the page. I've been trying out this code that I found here ([How to hide Bootstrap alert box when no mess...
2018/02/27
1,167
3,709
<issue_start>username_0: I've been banging my head against the wall for hours, poring over threads and videos trying to figure something out about this code. It will not compile unless I put "int" before calling my encrypt and decrypt functions in my if statements. If I do this, however, the program terminates before i...
2018/02/27
1,606
7,410
<issue_start>username_0: I have this service that will connect to the server and fetch notifications but unfortunately it doesn't show any notification this is the service class : ``` public class NotificationService extends Service { @Nullable @Override public IBinder onBind(Intent intent) { retur...
2018/02/27
2,183
7,203
<issue_start>username_0: I have made this simple software to connect to AWS and generate a presigned put url: ``` package main import ( "fmt" "log" "time" "github.com/minio/minio-go" "github.com/kelseyhightower/envconfig" ) // AWS contains the configuration to connect and create a presigned url ...
2018/02/27
1,779
6,538
<issue_start>username_0: This part is for setting the ids for some buttons that I have created. ``` protected void btnClicked(View view){ Button btnSelected = (Button)view; switch (btnSelected.getId()){ case R.id.btn1: btnId = 1; break; case R....
2018/02/27
1,587
4,524
<issue_start>username_0: I construct a 100\*100 matrix `k` and want to use `numpy.linalg.eig` to diagonalize it. ``` k=np.zeros((100,100)) np.fill_diagonal(k,-2) np.fill_diagonal(k[1:,:-1],1.5) np.fill_diagonal(k[:-1,1:],0.5) ``` when I try smaller matrix, such as ``` w,v=np.linalg.eig(k[:10,:10]) ``` the eigenva...
2018/02/27
923
3,395
<issue_start>username_0: I have two tables in the database, Table A and Table B. User fill up Form A that will insert new record in Table A. In Form B, the records in Table A are called as checkbox. From this form, the data will be inserted into Table B. The following code are in Form B. The data captured in this code ...
2018/02/27
771
2,983
<issue_start>username_0: Did anyone implemented EhCache 3 with Spring 4.2 (not using Spring boot). If so what are the steps to implement that? The problem is that spring-context-support (which adds Spring's cache annotations) expects the Ehcache's CacheManager to be on this classpath: net.sf.ehcache.CacheManager Howe...
2018/02/27
691
2,601
<issue_start>username_0: I'm going to load the drop-down content on keypress, without loading everything onload. But here my loadcourses() function is not getting fired. Html: ``` {{value.Name}} ``` AngulaJS code: ``` $scope.loadcourses = function () { console.log('loading from remote server'); } ```<issue_...
2018/02/27
700
2,387
<issue_start>username_0: I am very new to Python. I am trying to write a program that will take an IP address and use the search function on <https://community.spiceworks.com/tools/ip-lookup/> to search that IP and return the results to me. I wrote this: ``` import selenium.webdriver as webdriver def get_results(se...
2018/02/27
764
2,694
<issue_start>username_0: I have been working on a little AHK script to give myself a larger clipboard when copy-pasting. So far I have the following: ``` global bigboard := {} ^+c::copyToClipboard() ^+v::pasteFromClipboard() copyToClipboard() { Input, num, L1 T10 if (ErrorLevel = Timeout or RegExMatch(num, "...
2018/02/27
2,259
6,315
<issue_start>username_0: I have the below data set and would like to find the max by subset **Data Set** ``` StudentID Indicator Value 100 N 30 100 N 35 100 N 28 100 Y 20 100 N 29 100 N 60 200 N 40 200 N 35 200 Y 20 200 N 24 200 N 35 ``` I would like the result to be as below: **Result*...
2018/02/27
2,044
5,976
<issue_start>username_0: people! :D I have an html table with all my records from a database table and I want to specify on the bottom when was the table last updated (from creating, updating or deleting a record in the database table). Is there a built-in way in Laravel to do exactly that? Many thanks! Looking forw...
2018/02/27
2,105
6,025
<issue_start>username_0: when i use AVG in sql it gets 2.7500 but i only want it to get the first 2 numbers 2.7/5 on the average rating ``` $ratesavg = "SELECT AVG(round(vote_num,1)) AS myAvg FROM post_votes WHERE post_id=$post_id GROUP BY post_id"; $avgrows = mysqli_query($conn, $ratesavg); while($row = mysqli_f...
2018/02/27
2,712
7,893
<issue_start>username_0: I have been looking for a way to add the total days from two date ranges and find out how many days (Mondays 5, Tuesdays 4 etc....) and I have hit an issue. I can get the days in a date range 1/1/2018 to 1/1/2019 = 365, however, when that brakes down to days of the week I always get extra days...
2018/02/27
943
3,301
<issue_start>username_0: I am in the process of setting up a VSTS build definition. The build definition is simple. Steps : 1. get the source from VSTS Git repo's master branch 2. restore nuget packages 3. run msbuild Step 2 is setup as following : [![enter image description here](https://i.stack.imgur.com/sCLjg.p...
2018/02/27
1,028
3,997
<issue_start>username_0: I am still building programming logic and I would like to know if this code I've built is the "best possible" or if you guys have any known technique for reducing it. This is the code, the difference is on the second line of each `function()`: ``` var Run = { closeAll : function()...
2018/02/27
4,431
11,827
<issue_start>username_0: I am currently working on a website with Bootstrap. I've made a custom navbar which is slightly styled with CSS. Since I've added CSS to my navbar it didn't wanted to open anymore when collapsed. I've been searching the whole day in my code, but couldn't found the problem. When I inspect elemen...
2018/02/27
311
1,038
<issue_start>username_0: I am trying to plot distribution graph in python using `seaborn` . But I am getting error which I am not able to solve given below. Code: `sns.distplot(df['nn'])` Error: `cannot convert float NaN to integer` Is there any efficient way to solve this by plotting histogram and the distribu...
2018/02/27
1,009
3,356
<issue_start>username_0: Maybe I am doing this wrong but I'm trying to update my arrays so that they just have the most current thing submitted in them. Is there a way to do this? I can't seem to think of anything and push just adds more to the array each time. ``` $( document ).ready(function() { var divisTwo = []; ...
2018/02/27
1,452
4,162
<issue_start>username_0: Is it possible to check for the existence of an entry in a list defined by X-macro? Given the example code below, I'd like the `#if defined(GEORGE)` condition to be true. EDIT: without doing an explicit `#define GEORGE`, of course. I am hoping to have a way to check an entry in the list (in th...
2018/02/27
649
2,341
<issue_start>username_0: Hay, Is there a **simple** way to change the `title` and the `text` colour without changing the primary colour of the whole app? Here is what I got now: [![enter image description here](https://i.stack.imgur.com/Xw8yc.png)](https://i.stack.imgur.com/Xw8yc.png) I dont want to change the `tex...
2018/02/27
991
3,165
<issue_start>username_0: I have a dataframe that I need to pass as a nested json string into an email service provider api as a json string. My dataframe looks like this: ``` email_address first_name last_name <EMAIL> adam apple <EMAIL> bobby banana ``` The co...
2018/02/27
974
3,171
<issue_start>username_0: Do `h2o` estimators need to have the input data set have the same column names that they were trained on (regardless of if some columns were ignored) or is it the order that matters (in which case, can the ignored columns be replaced with other data)? Eg. When predicting on a data set with an...
2018/02/27
243
840
<issue_start>username_0: I was asked to work on this shape called the Squircle. It is very similar to a rounded rectangle or square with rounded corners. However that's not the desired shape. How can I achieve this?<issue_comment>username_1: You can create [Shape Drawable](https://developer.android.com/guide/topics/res...
2018/02/27
265
837
<issue_start>username_0: I am working with sweetalert2 to create a popup list of radio options. My list of options are more than 3 and most are longer than 5 words. So, the display output is not nice since it is displayed horizontally, as you can see in the screenshot below. What can I do so that the radio button wil...
2018/02/27
249
861
<issue_start>username_0: I am playing around with Azure API Management as a SOAP passthrough. I was hoping to get some analytics in place to preview the service. My trouble is that my client endpoint has SSL validation in place. I can't figure out how to load the .cer file in Azure to satisfy this requirement. At the ...
2018/02/27
395
1,055
<issue_start>username_0: A newbee question, but i'm realy confused... Suppose there is dataframe like this: ``` >>>test = pd.DataFrame({'a':[1,1,0,0],'b':[1,1,0,0]}) >>>test a b 0 1 1 1 1 1 2 0 0 3 0 0 ``` Running the follwing code, ``` test.loc[2:] = 1 ``` the data on the 3rd and 4th row would be set...
2018/02/27
416
1,401
<issue_start>username_0: I have deployed PagerBot <https://github.com/stripe-contrib/pagerbot> to our internal k8s cluster as a learning opportunity. I had fun writing a helm chart for it! The bot appears to disconnect from slack at an unknown time and never reconnect. I kill the pod and the deployment recreates it an...
2018/02/27
397
1,213
<issue_start>username_0: A csv file is having japanese text in it. On opening through notepad, it says its encoding is utf-8. I read on stackoverflow, for utf-8 , first read the file in single stream and then convert it into wstring. I am using below code for the conversion of string to wstring. ``` wstring sto...
2018/02/27
984
1,938
<issue_start>username_0: ``` var data= [{_id: "5a93cbd49ae761a4015f6346", nombre: "Chicago - Missouri", longitud: "-94.6807924", latitud: "38.287606"}, { _id: "5a93ca539ae761a4015f6344", nombre: "Boston - Central Falss", longitud: "-71.4111895", latitud: "41.8902971"}, { _id: "5a93ccbf9ae761a4015f6349", nombre: "Hous...
2018/02/27
726
1,747
<issue_start>username_0: In our application , in one of our microservice we will query the DB , get the result ( 100k rows ) and generate Excel using Apache POI.In couple of other services they also does the same process ( get DB rows and generate excel) . Here Excel generation process is common , IS this right design ...
2018/02/27
812
1,779
<issue_start>username_0: I have a list of (x,y) values like below. > > k = [(3, 6), (4, 7), (5, 8), (6, 9), (7, 10), (7, 2), (8, 3), (9, 4), (10, 5), (11, 6)] > > > I would like create a plot that draws lines on opposite axes like below with the assumption that the axis values are in the range 1-15. Please fin...
2018/02/27
822
1,955
<issue_start>username_0: I'm working a project which consists of creating a web application. Currently, I'm focusing on the general design and layout of the website. First of all, I want a horizontal dark grey header on the top. Below that, I want two columns, one with a navigation bar, and one with the content. [Actu...