date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/21 | 2,153 | 8,182 | <issue_start>username_0: These two middleware functions behave differently and I cannot figure out why:
Here, the error will get trapped by try/catch:
```
router.get('/force_async_error/0', async function (req, res, next) {
try{
await Promise.reject(new Error('my zoom 0'));
}
catch(err){
next(err);
}... |
2018/03/21 | 1,268 | 3,910 | <issue_start>username_0: I have a table called [database] with the following structure:
```
ID|text|section|
1 |xxxx| 1 |
2 |xxxx| 2 |
3 |xxxx| 2 |
4 |xxxx| 1 |
5 |xxxx| 4 |
6 |xxxx| 1 |
```
I'm trying to write SQL which returns the row with the second highest ID value for a given section.
i... |
2018/03/21 | 1,037 | 3,804 | <issue_start>username_0: I have a container which has created a default user, which has UID 1000.
In my Dockerfile, I am creating the user:
```
RUN groupadd sudo && useradd -G sudo -u 1000 -U ${RUST_USER}
```
Now when I run the container, unless my current user has exactly UID 1000, volume permissions are messed up... |
2018/03/21 | 805 | 3,053 | <issue_start>username_0: I have a html form:
```
```
I want to submit this form (so the request get sent to the php script) but without redirecting the page. I tried a lot of things like $.post, $.ajax, form.submit prevent defaults, etc., but without resolving my problem.<issue_comment>username_1: The dynamic mappi... |
2018/03/21 | 384 | 1,289 | <issue_start>username_0: I have an arrayList which contains employees information like employeename, grade, designation. I have a multiselect component in my view which returns an array of grades like `[1,2,3]` once we choose `grade1`, `grade2`, `grade3` from the multiselect dropdown. Is there a way to filter my employ... |
2018/03/21 | 675 | 2,666 | <issue_start>username_0: If I issue `gcloud dataproc clusters list` 0 clusters are listed:
```
$ gcloud dataproc clusters list
Listed 0 items.
```
However if I specify the region `gcloud dataproc clusters list --region europe-west1` I get back a list of clusters:
```
$ gcloud dataproc clusters list --region europe... |
2018/03/21 | 912 | 2,643 | <issue_start>username_0: I would like to use C++ `std::map` to access the value associated to a given key in log(n) time. Since the keys of a `std::map` are sorted, technically, I can access the keys by the location in the sorted order.
I know std::map does not have a random access iterator. Is there any "map like" da... |
2018/03/21 | 2,485 | 8,076 | <issue_start>username_0: I've been working on this for too long and need some help.
I'm trying to create a dictionary using faker. If it were only that simple.
Initially the dictionary is flat. A key and item. If the first letter of the key is 'B' or 'M' it will then turn that string, into a dictionary with 5 keys and ... |
2018/03/21 | 291 | 1,116 | <issue_start>username_0: I have a producer application that needs unit testing. I don't want to spin up a Zookeeper and Kafka server for this purpose. Is there a simpler way to test it using Mockito?<issue_comment>username_1: For such testing I've used EmbeddedKafka from the spring-kafka-test library (even though I was... |
2018/03/21 | 460 | 1,644 | <issue_start>username_0: I am trying to make a slider, and while the code below to calculate the widths of the slides works, it throws an error in the console. What is the correct way to loop through and a width to these elements?
Javascript
```
var calcSlideWidth = function(divId){
let slDiv = document.getElemen... |
2018/03/21 | 805 | 2,876 | <issue_start>username_0: I'm trying to speed up my updates and converting my update / set statement to a merge into / using.
Old Version
```
ALTER SESSION ENABLE PARALLEL DML;
UPDATE /*+ PARALLEL(16) */ TEST_REPORT_2 rep
SET ( title ) = (
SELECT /*+ PARALLEL(16) */ doctitle.valstr Title
FROM MV_LLATTRDATA_SHR... |
2018/03/21 | 493 | 1,829 | <issue_start>username_0: I am using Python 3.6.4 on Windows 10 with Fall Creators Update. I am attempting to read a XML file using the following code:
```
with open('file.xml', 'rt', encoding='utf8') as file:
for line in file.readline():
do_something(line)
```
`readline()` is returning a single character... |
2018/03/21 | 1,381 | 4,912 | <issue_start>username_0: If I process the input from `stdin` with `scanLeft`, the resulting output is always one line behind my last input:
```
io.Source.stdin
.getLines
.scanLeft("START:")((accu, line) => accu + " " + line)
.foreach(println(_))
```
Results in (my manual inputs are preceded by `>`):
```
> fir... |
2018/03/21 | 227 | 738 | <issue_start>username_0: The docs for [UIGestureRecognizer](https://developer.apple.com/documentation/uikit/uigesturerecognizer/1620004-reset) reference a `reset` function.
However, calling `reset()` on a `UIPanGestureRecognizer`, which is a child of `UIGestureRecognizer`, generates this error message:
>
> Value of ... |
2018/03/21 | 440 | 1,455 | <issue_start>username_0: I'm relatively new to SQL but have learned some cool stuff. I'm getting results that don't make sense. I've got a query with several subqueries and what-not but I have a windowed function that isn't working like I'm expecting.
The part that isn't working is this (simplified from the 300 line ... |
2018/03/21 | 812 | 2,791 | <issue_start>username_0: I added a button to my layout. When I try to write a callback for it, I get the following error:
```
dash.exceptions.NonExistantEventException:
Attempting to assign a callback with
the event "click" but the component
"get_custom_vndr" doesn't have "click" as an event.
Here is a list of the a... |
2018/03/21 | 703 | 2,385 | <issue_start>username_0: I'm a very beginner in docker world, and I'm not able to make two containers communicate using docker compose.
I have two containers:
* Service Registry: a simple spring boot application using Netflix Eureka to implement a service registry feature.
* API Gateway: a simple spring boot applicat... |
2018/03/21 | 355 | 1,501 | <issue_start>username_0: For some projects I do or work on sometimes it is usually best that we squash/rebase all changes into a single commit. However, I was wondering how this affects the contributions page on github.
For example, if I spent 2 months pushing changes to a project I created and then after 2 months dec... |
2018/03/21 | 1,961 | 7,638 | <issue_start>username_0: We have some code that uses Facebook Open Graph API to display some posts on our home page. It was originally developed by a previous developer and I rewrote it in ASP.NET MVC for our home page (where before it was PHP which I believe was loaded in an iframe). At that time, I used the app ID an... |
2018/03/21 | 1,894 | 7,150 | <issue_start>username_0: I meet some problems using traefik with docker and I don't know why.
With some containers, it's works like a charm and for other ones, I have an error when I try to access to these ones : Bad gateway (error 502).
Here is my traefik.toml :
```
# Service logs (here debug mode)
debug = true
log... |
2018/03/21 | 1,242 | 4,614 | <issue_start>username_0: I am trying to connect to a remote SQL Server from my Spring Boot App.
I have the login credentials inside application.properties
```
spring.datasource.url=jdbc:sqlserver://XXXXXXXXX;databaseName=ABC;integratedSecurity=false
spring.datasource.username=user
spring.datasoruce.password=<PASSWORD... |
2018/03/21 | 605 | 2,195 | <issue_start>username_0: I am loading an external svg into my Vue application as a Vue Component using the **vue-svg-loader**: <https://www.npmjs.com/package/vue-svg-loader?activeTab=readme>.
I modified the loader configuration to make sure the IDs don't get dropped:
```
{
test: /\.svg$/,
loader: 'vue-svg-loader',... |
2018/03/21 | 1,406 | 5,174 | <issue_start>username_0: I have a grid which shows records from a table. On this grid I am using customized pagination and sorting, so I need to use customized column filtering as well.
```
var expression = ExpressionBuilder.Expression(request.Filters);
```
The above code snippet gets filter condition from Kendo Gri... |
2018/03/21 | 930 | 3,527 | <issue_start>username_0: Having some issues getting strikethrough to work. Currently I'm doing the following:
```
theString.addAttributes([
NSAttributedStringKey.strikethroughStyle: NSUnderlineStyle.styleSingle.rawValue,
NSAttributedStringKey.strikethroughColor: UIColor.white
], range: NSMakeRange... |
2018/03/21 | 968 | 3,816 | <issue_start>username_0: Thanks for the tip below
• You need to go through the string one character at a time (for loop or while loop) When you hit a < you know you have hit a tag, so store the position of this character
• Keep going (in a sub-loop, preferably) until you hit a >, that's your end marker
• Now check t... |
2018/03/21 | 1,150 | 4,300 | <issue_start>username_0: When calling history.push('/packages') the url is updated but the component will not mount (render) unless the page is reloaded. If I call createHistory({forceRefresh: true}) or manually reload the page the UI is rendered correctly. How can I configure react-router-dom to load the component wit... |
2018/03/21 | 688 | 2,443 | <issue_start>username_0: I'm very new to JavaScript and I'm trying to learn some basics practicing with it.
I've got stuck with this:
```
var name = prompt('enter your name', '');
if( name == null ) {
alert('Cancelled');
} else if ( name == 'admin' ) {
alert('hi admin');
} else {
alert('I don\'t know you... |
2018/03/21 | 1,256 | 2,878 | <issue_start>username_0: I am struggling with regex to extract IP and subnet mask info from a snmp walk output. Here is how output looks like.
```
[, , , ,
```
I have organized the output in different lines just so it is easy to understand (actual output in my code is the above one without lines):
```
[,
,
,
,
... |
2018/03/21 | 892 | 3,213 | <issue_start>username_0: I have a directory that contains around 3 million files. Once a day I need to run a process that creates a separate file containing file names from that large directory that have `.html` extension. Typically, of the 3 million files that are there, 500,000 will have that `.html` extension. I am ... |
2018/03/21 | 594 | 1,908 | <issue_start>username_0: here's my code :
```
SELECT p.ID, p.post_title,
MAX(IF(pm.meta_key = 'featured_image', pm.meta_value, NULL)) AS event_imgID
FROM wpgp_posts AS p
LEFT JOIN wpgp_postmeta AS pm on pm.post_id = p.ID
WHERE p.post_type = 'product' and p.post_status = 'publish'
GROUP BY p.ID
```
event\_imgID retri... |
2018/03/21 | 720 | 2,400 | <issue_start>username_0: So I am trying to read a file using a scanner. This file contains data where there are two towns, and the distance between them follows them on each line. So like this:
Ebor,Guyra,90
I am trying to get each town individual, allowing for duplicates. This is what I have so far:
```
// Creat... |
2018/03/21 | 1,202 | 4,353 | <issue_start>username_0: I don't understand how colab works with directories, I created a notebook, and colab put it in /Google Drive/Colab Notebooks.
Now I need to import a file (data.py) where I have a bunch of functions I need. Intuition tells me to put the file in that same directory and import it with:
import da... |
2018/03/21 | 577 | 1,766 | <issue_start>username_0: I have to write a recursive function (we'll call it `arrow(n)`) which draws an arrow that works like this:
```
arrow(4)
```
Printed output :
```
*
**
***
****
***
**
*
```
where `arrow` can only take one parameter like shown above.
Is it possible only by using one parameter with recursio... |
2018/03/21 | 1,063 | 4,331 | <issue_start>username_0: My question is rather conceptual. I noticed that there are different packages for the same architecture, like x86-64, but for different OSes. For example, RPM offers different packages for Fedora and OpenSUSE for the same x86-64 architecture: <http://www.rpmfind.net/linux/rpm2html/search.php?qu... |
2018/03/21 | 1,083 | 3,419 | <issue_start>username_0: After a massive amount of headaches, I was able to get this almost functioning.
Problem: In the error/output Robocopy appears to be treating $args[4] (ref: $sourcePath) as everysingle IP in the range instead of just one object.
I'm assuming the rest of the syntax is correct, because if I swi... |
2018/03/21 | 383 | 1,482 | <issue_start>username_0: We have a private docker registry (Sonatype nexus) which holds all our private docker images. I was looking for an open source vulnerability and security scanner for scanning all the images on the private registry also I want to install the tool on the linux box and also integrate with Jenkins.... |
2018/03/21 | 328 | 1,190 | <issue_start>username_0: I need a Regex patter to Validate /A-Za-z/.
I want the pattern to have a forward slash required at the start and end of the characters. Ex: /<NAME>/<issue_comment>username_1: You can use Clair:
<https://github.com/coreos/clair>
Simply follow the instruction:
<https://github.com/arminc/clair... |
2018/03/21 | 332 | 1,235 | <issue_start>username_0: I'm trying to use input to variable to create a file using the input the filename
The only examples I've seen are print(input)
I'm new to Python but trying to write a functional program
thanks<issue_comment>username_1: You can use Clair:
<https://github.com/coreos/clair>
Simply follow the... |
2018/03/21 | 857 | 3,430 | <issue_start>username_0: I am trying to have my animation ease the screen from black to white to black again and repeat that a certain amount of times. Currently with the code I have the animation eases from black to white then jumps back to black. Is there anyway to run an animation in reverse or add an animation that... |
2018/03/21 | 858 | 2,920 | <issue_start>username_0: While programming a algorithm that makes use of only using integer arithmetic I notice that Python wasn't taking advantage of it.
So I tried the following code to see the "explicitly" declaration effect
```
import time
repeat = 1000000
start = time.time()
x = 0
for i in range(repeat):
x... |
2018/03/21 | 849 | 3,431 | <issue_start>username_0: I have some code that I do not want included in the jar file based on a condition.
My build script looks like
```
plugins {
id 'java'
id 'org.springframework.boot' version '2.0.0.RELEASE'
}
sourceSets {
main {
java {
if (project.environment == 'prod') {
... |
2018/03/21 | 1,490 | 4,311 | <issue_start>username_0: I am reviewing for an exam and have a practice problem that I'm stuck on.
I need to write the function `find_sequence(unsigned int num, unsigned int patter) {}.`
I have tried comparing `num & (pattern << i) == (pattern << i)` and other things like that but it keeps saying there is a pattern w... |
2018/03/21 | 529 | 1,687 | <issue_start>username_0: How do I convert a string array:
```
var names = [
"Bob",
"Michael",
"Lanny"
];
```
into an object like this?
```
var names = [
{name:"Bob"},
{name:"Michael"},
{name:"Lanny"}
];
```<issue_comment>username_1: Super simple [`Array.prototype.map()`](https://developer.m... |
2018/03/21 | 1,394 | 3,919 | <issue_start>username_0: I am trying to perform some analysis on data. I got csv file and I convert it into pandas dataframe. the data looks like this. Its has several columns, but I am trying to draw x-axis as date column. .
the pandas dataframe looks like this
```
print (df.head(10)
cus-id date ... |
2018/03/21 | 363 | 1,090 | <issue_start>username_0: wkhtmltopdf does not render images from other sites. I have discovered what many developers suggest just prefix an image file with :
```
file://
```
and add a full path. But this approach does not fit my needs. I need to render images from other site, because I have a separate image provide... |
2018/03/21 | 1,077 | 4,162 | <issue_start>username_0: I've been trying to use the javacscript version of the Eclipse Paho MQTT client to access the Google IOTCore MQTT Bridge, as suggested here:
<https://cloud.google.com/iot/docs/how-tos/mqtt-bridge>
However, whatever I do, any attempt to connect with known good credentials (working with other c... |
2018/03/21 | 834 | 3,067 | <issue_start>username_0: A structure TsMyStruct is given as parameter to some functions :
```
typedef struct
{
uint16_t inc1;
uint16_t inc2;
}TsMyStruct;
void func1(TsMyStruct* myStruct)
{
myStruct->inc1 += 1;
}
void func2(TsMyStruct* myStruct)
{
myStruct->inc1 += 2;
myStruct->inc2 += 3;
}
```
... |
2018/03/21 | 4,235 | 16,084 | <issue_start>username_0: I would like to prevent my application from changing its orientation and force the layout to stick to "portrait".
In the main.dart, I put:
```
void main(){
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown
]);
runApp(new MyApp()... |
2018/03/21 | 473 | 1,506 | <issue_start>username_0: I have this code
```
#Ask for word
w = input("Type in a word to create acronym with spaces between the words:")
#Seperate the words to create acronym
s = w.split(" ")
letter = s[0]
#print answer
print(s.upper(letter))
```
And I know that I need a for loop to loop over the words to get the... |
2018/03/21 | 1,149 | 4,164 | <issue_start>username_0: **The issue was different and was with how expected output was handling the json. Apologies for wasting your time.**
I have a python dictionary object which I'm trying to return in a string format so that another function does a string comparision. I have no control over the other function so ... |
2018/03/21 | 523 | 2,148 | <issue_start>username_0: Lets say you have code like this.
```
function openNewTab(url) {
const newTab = window.open(url, 'windowNameHehe');
};
```
Now every time you call this function it will open a new tab. However, if the window is already opened it will go to it and refresh/reload it. How do I stop it fro... |
2018/03/21 | 590 | 1,879 | <issue_start>username_0: I am trying to pull a specific char from a string and convert it to an int. I have tried the following code, but I am unclear why it doesn't work nor can I find a way to do the conversion.
```
int value = 0;
std::string s = "#/5";
value = std::atoi(s[2]); // want value == 5
```<issue_commen... |
2018/03/22 | 1,189 | 3,816 | <issue_start>username_0: Problem in parsing/identifying double quoted string from the big expression.
```
use strict;
use Marpa::R2;
use Data::Dumper;
my $grammar = Marpa::R2::Scanless::G->new({
default_action => '[values]',
source => \(<<'END_OF_SOURCE'),
:start ::= expression
expression ::= expression OP ... |
2018/03/22 | 609 | 1,497 | <issue_start>username_0: I have a dataset I'm working on, and one of the columns contains multiple features that are separated by a comma. The number of features in each observation varies.
```
df <- data.frame(x=c("a", "a,b,c", "a,c", "b,c", "", "b"))
x
1 a
2 a,b,c
3 a,c
4 b,c
5
6 b
```... |
2018/03/22 | 1,277 | 2,937 | <issue_start>username_0: Appreciate your help. Need to split a column filled with delimited values into columns named after its delimited values and each of these new columns are to be filled with either 1 or 0 where values are found or not.
```
state <-
c('ACT',
'ACT|NSW|NT|QLD|SA|VIC',
'ACT|NSW|NT|QLD|TAS... |
2018/03/22 | 3,385 | 10,475 | <issue_start>username_0: I have const data, and i need filter cards array by obj field company
For example by company: 'Symu.co'
```
const data = {
lanes: [
{
id: 'lane1',
header: 'Quened',
label: '',
cards: [
{id: 'Task1', title: 'Wordpress th... |
2018/03/22 | 975 | 4,068 | <issue_start>username_0: If a function's side effects are inherent within the design how do I develop such a function?
For instance if I wanted to implement a function like http.get( "url" ), and I stubbed the side effects as a service with dependency injection it would look like:
```
var http = {
"get": function( ... |
2018/03/22 | 2,278 | 5,493 | <issue_start>username_0: I have 365 daily netCDF files for the year 1980. These files are located in a folder that has data from multiple years (1979-2013).
When I open the 1980 files using,
```
files = glob.glob("/mnt/nfs/home/solomon/Data/CFSR/NetCDFs_1979-2013/Subset/data_1980*")
ds = xarray.open_mfdataset(files... |
2018/03/22 | 353 | 1,365 | <issue_start>username_0: Is there a way to get a message's content from its id? If so, how can I do that? I've read through its documentation but I found nothing.
In the documentation, it says you can get a `discord.Message`'s ID by using `.id`, but I don't have the `discord.Message` object.
Thanks.<issue_comment>use... |
2018/03/22 | 1,722 | 5,084 | <issue_start>username_0: A few years ago, a poster asked how to add regression line equation and R2 on ggplot graphs at the link below.
[Adding Regression Line Equation and R2 on graph](https://stackoverflow.com/questions/7549694/adding-regression-line-equation-and-r2-on-graph)
The top solution was this:
```
lm_eqn ... |
2018/03/22 | 1,762 | 6,045 | <issue_start>username_0: In woocommerce I have enabled Woocommerce EU VAT plugin and created a required custom checkout select field "Customer type" with 2 choices:
* Individual
* Business
Now I am trying to show and enable EU VAT field for:
* Orders amount up to `500` only
* `'customer_type'` for `'business'` only... |
2018/03/22 | 1,600 | 4,189 | <issue_start>username_0: I have made a program, that allows the user to enter the year and team, that they are on. It print the values to a data sheet. When the user click on a commandbutton, the code will print the values to a calendar.
My question is, can this be made smarter?
```
If Worksheets("DATA").Range("B2").V... |
2018/03/22 | 2,762 | 9,612 | <issue_start>username_0: I did a bit of research and I think the best way to auto-fire a Macro is to use the AutoExec method in Access.
I believe the script below will do the job.
```
Option Compare Database
'------------------------------------------------------------
' AutoExec
'
'--------------------------------... |
2018/03/22 | 1,052 | 3,012 | <issue_start>username_0: I'm relatively new to this, but here's what I'm trying to do. I have a raspberry zero connected to a raspberry pi camera, and I'm streaming this video from from the raspberry pi wirelessly via uv4l. I use this command:
sudo uv4l -f -k --sched-fifo --mem-lock --driver raspicam --auto-video\_nr ... |
2018/03/22 | 478 | 1,464 | <issue_start>username_0: I am writing a script that takes user input of however many characters and I want to put each one of the characters into its own list to be then manipulated.
```
input = AVI
```
Output:
```
A = ['A'] V = ['V'] I = ['I']
```
I was able to get it into a single list like this: ['A','V','I'] ... |
2018/03/22 | 380 | 1,468 | <issue_start>username_0: I am using javaFX in Eclispe to create a GUI application. I use SceneBuilder to edit the graphical parts. The GUI is linked with a Controller class.
I have a button in an anchorPane, and no other elements. What i want to happen is, when i click on the button, i want to load an image "sample.pn... |
2018/03/22 | 901 | 2,472 | <issue_start>username_0: I wrote this code that computes time since a sign change (from positive to negative or vice versa) in data frame columns.
```
df = pd.DataFrame({'x': [1, -4, 5, 1, -2, -4, 1, 3, 2, -4, -5, -5, -6, -1]})
for column in df.columns:
days_since_sign_change = [0]
for k in range(1, len(df[co... |
2018/03/22 | 501 | 1,802 | <issue_start>username_0: Take for instance, the method below.
```
void myFunction(Class... types) {
// Do some stuff that requires T to implement MyInterface
}
```
Now, given the method call below assuming `MyClass1` and `MyClass2` both implement `MyInterface`.
```
myFunction(MyClass1.class, MyClass2.class)
```
... |
2018/03/22 | 492 | 1,730 | <issue_start>username_0: I have a XML file in S3 contains the Schema for my table called sample:
```
xml version="1.0" encoding="UTF-8" standalone="no"?
```
I already write script as `sample.filter( x => x.contains("DATA_TYPE") || x.contains("ID"))`, and I would need to get each pair of the value for (ID,DATA\_TYPE)... |
2018/03/22 | 316 | 984 | <issue_start>username_0: This sounds silly but is there a way to create a empty array inside a Gremlin traversal?
For the query below:
```
g.V().has('person','name', 'marko').project('a', 'b').by().by()
```
I want to project `b` as an empty array. I have tried:
```
g.V().has('person','name', 'marko').project('a', ... |
2018/03/22 | 538 | 2,217 | <issue_start>username_0: I have my React Router V4 routes structured this way:
```
const isAuthenticated = () => {
let hasToken = localStorage.getItem("jwtToken");
if (hasToken) return true;
return false;
};
const AuthenticatedRoute = ({ component: Component, ...rest }) =>
isAuthenticated()
?
: }
/>... |
2018/03/22 | 501 | 2,063 | <issue_start>username_0: I want a redis cluster that every redis instance can access other instance's data i.e data should be replicated among themselves.(With out master-slave concept)
I'm trying to setup redis `RepilcaSet` in K8s. I tried to setup `slave-read-only no` in config which pods are restating continuously.... |
2018/03/22 | 926 | 3,504 | <issue_start>username_0: I have a Json file in the following format:
```
"Adorable Kitten": {"layout": "normal","name": "<NAME>","manaCost": "{W}","cmc": 1,"colors": ["White"],"type": "Host Creature — Cat","types": ["Host","Creature"],"subtypes": ["Cat"],"text": "When this creature enters the battlefield, roll a six... |
2018/03/22 | 784 | 2,656 | <issue_start>username_0: I'm trying to create a CUBESET function in Excel, but I don't know how to filter it using multiple criteria **within the same dimension**. This is what I have so far working with one criteria.
---
Example 1:
```
=CUBESET("ThisWorkbookDataModel","{[Facebook].[Bucket (C)].[All].[DPA]*[Facebook... |
2018/03/22 | 1,256 | 4,694 | <issue_start>username_0: I'm trying to alter a data source for a set of Reporting Services reports, but I can't get the Powershell to work for them. I'd appreciate any help :)
```
$server = "http://My/ReportServer/"
$dataSource = Get-RsDataSource -Path "/Data Sources/NewDataSource" -
ReportServerUri $server
$reports... |
2018/03/22 | 598 | 2,101 | <issue_start>username_0: I'm trying to progress through the Spotify developer API tutorial but when I try to access the user login page I get this error. I've triple checked that the URI in the code matches the one on MyApplications page but it still won't work.
Here's the script,
```
var express = require('express'... |
2018/03/22 | 849 | 3,080 | <issue_start>username_0: I have code on my website that uses a SweetAlert2 popup to let users request songs:
```
$('#request-song').click(async function() {
const { value: song } = await swal({
title: "Request a Song (please note song request won't be played unless we are live)",
input: 'text',
inputPlac... |
2018/03/22 | 877 | 3,147 | <issue_start>username_0: I have One table with two fields that I would like to update where each field has different conditions as follows.
```
one table: TableA
first field1: QtyToGenerate1
if QtyToGenerate1 = 0 then
QtyToGenerate1 = QtyOrdered
Else QtyToGenerate1 = QtyOrdered - QtyGenerated1
Seco... |
2018/03/22 | 956 | 2,606 | <issue_start>username_0: So I'm gathering 3 month intervals using Date\_Year and Date\_month columns but having some issues
For example, the first group is Oct-Dec 2016 which is fine. The second group is the one I'm having trouble with , Nov-Dec 2016 along with Jan 2017..
Here is the sample code:
```
SELECT
[2016_... |
2018/03/22 | 672 | 2,559 | <issue_start>username_0: I have this code in Angular
```
this.provider.getUids()
.then(uidObservable => this.uidsSubscription$ = uidObservable.subscribe((uids: string[]) => {
console.log('res', uids); // array of uids
const uidsSet = new Set(uids); // deletes duplicates
uidsSet.forEa... |
2018/03/22 | 1,156 | 4,055 | <issue_start>username_0: In my Dockerfile I need to use command substition to add some environment variables. I want to set
```
ENV PYTHONPATH /usr/local/$(python3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
```
but it doesn't work. The result is
```
foo@bar:~$ echo $PYTHONPATH
/usr/lo... |
2018/03/22 | 1,584 | 3,082 | <issue_start>username_0: I need to create a function of five variables,
* a (multiplier)
* n (sample size)
* c (increment with default 0)
* m (modulus)
* x0 (Initial seed value)
I need to generate a sequence of random numbers with the equation
* xi = (a\*xi-1 + c) (mod m), i = 1, 2, ..., n
As in the vector x = (x1,... |
2018/03/22 | 1,121 | 3,634 | <issue_start>username_0: I am trying to convert airport **GeoCoordinate** data i.e. [**IATA Code**, **latitude**, **longitude**] to **Gremlin** **Vertex** in an **Azure Cosmos DB Graph API** project.
**Vertex** conversion is mainly done through an **Asp.Net Core 2.0 console application** using **CSVReader** to stream a... |
2018/03/22 | 522 | 1,915 | <issue_start>username_0: There is an example from documentation, but it is not clear how to use in practice:
```
class Result {
constructor(public wasSuccessful: boolean, public error: T) {
}
public clone(): Result {
...
}
}
let r1 = new Result(false, 'error: 42');
```<issue_comment>username_1: According to your... |
2018/03/22 | 510 | 2,236 | <issue_start>username_0: Goal - send data to Google Analytics (don't care about Firebase Analytics).
In my App I am replacing GTM SDK (v3) with a newer version: Firebase SDK (v5) and wondering if I can pass an object as an event parameter. I.e
```
[FIRAnalytics logEventWithName:@"share_image"
para... |
2018/03/22 | 671 | 2,385 | <issue_start>username_0: `webpack-serve`: <https://github.com/webpack-contrib/webpack-serve>
`webpack-dev-server`: <https://github.com/webpack/webpack-dev-server>
They both state they're a dev server for webpack. How are they different?<issue_comment>username_1: I have not used webpack-serve but by looking at documen... |
2018/03/22 | 850 | 3,391 | <issue_start>username_0: I currently have a dataframe in R that was cleaned in order to get informative parts of some URLS. It refuses to print the first element when I request to print the whole dataframe. The dataframe looks like this:
```
print(my_data[1,])
#provided for clarity
[1] c("https:
1073 Levels: ... Zlo... |
2018/03/22 | 1,223 | 4,686 | <issue_start>username_0: I've built a modal in ReactJS which needs to be triggered by clicking an to add `.active` class to the modal .
Once class is active as `newsletterModal active` the `onClick={this.toggle.bind(this)}` is successful in removing the `active` class but how can I add the `active` class from within... |
2018/03/22 | 275 | 808 | <issue_start>username_0: In this code snippet the output I get is 24. Why is that?
```
int data[] = { 5, 6, 7, 1, 4, 0 };
int n = sizeof(data);
cout << n << endl;
```<issue_comment>username_1: `sizeof` returns 24 because you have 6 integers, each taking 4 bytes.
Upvotes: 4 [selected_answer]<issue_comment>username_... |
2018/03/22 | 1,894 | 6,032 | <issue_start>username_0: If I have an array such as:
```
["Adambb", "Andrebw", "Bob", "Billy", "Sandrab", "Xaviercb"]
```
And I type in a search box (for example) "B", how can I reorder the array in JavaScript with the results that match the string closest (also alphabetized), first?
For example, typing in "B" into... |
2018/03/22 | 1,967 | 6,102 | <issue_start>username_0: I have two tables..
```
1-Identity(id, ref1,ref2, address)
2-details(ref1,ref2,amount,u_no,u_date)
```
I want to extract the each id with sum of amount having highest u\_date and highest u\_no
i tried below--
```
Select I.id, d.amount
From identity I Inner Join
(select ref1,ref2,sum(... |
2018/03/22 | 582 | 1,884 | <issue_start>username_0: When compiling a program that uses strptime with the following:
```
gcc http_server.c -g -std=c11 -o http_server
```
I run into the this warning:
```
warning: implicit declaration of function 'strptime'; did you mean 'strftime'? [-Wimplicit-function-declaration]
```
When I run the progra... |
2018/03/22 | 962 | 3,421 | <issue_start>username_0: Given the following C API generated by Kotlin/Native:
```
#ifndef KONAN_bar_H
#define KONAN_bar_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
/* Service functions. */
void (*DisposeStablePointer)(bar_KNativePtr ptr);
void (*DisposeString)(const char* string);
bar_KBoolean ... |
2018/03/22 | 1,156 | 4,314 | <issue_start>username_0: I'm trying to make a game of tic-tac-toe.
I have one class, Player, and one nested class, Check, in it.
This is my full code:
```
class Player: # Player class
'''this is a class for the player in a tic-tac-toe game'''
def __init__(self, counter): # initialize
self.counter = counter # se... |
2018/03/22 | 596 | 1,912 | <issue_start>username_0: i can't make the sorting on this multidimensional array, i need to sort from lower to Higher by "packagenumber" value
This is my array:
[](https://i.stack.imgur.com/pOjfR.png)
[.each(function() {
var Id = $(this).val();
... |
2018/03/22 | 331 | 894 | <issue_start>username_0: I am having a hard time trying to display a number and would appreciate any help or suggestions.
```
tmp <- train[train$label == 0,]
tmp # has V17015 V17021... values.
m <- matrix(tmp[1,1:784], ncol = 28, nrow = 28)
m # m has 28 by 28 and all zeroes
m_numbers <- apply(m, 2, rev)
m_numbers
#I... |
2018/03/22 | 913 | 3,052 | <issue_start>username_0: I initialized the map like:
```
var map = new Map();
```
when i do `console.log(map)`, i get:
```
testCreateBadAppointmentRequest:
{ name: 'testCreateBadAppointmentRequest',
time: 0.02926,
status: 'Passed' },
testAppointmentRequestAPI:
{ name: 'testAppointmentRequestAPI'... |
2018/03/22 | 898 | 2,328 | <issue_start>username_0: I am trying to return a dataframe containing all of the values in each column that are less than -1.5 that has both the column header and the rowname. I basically have everything worked out, except in the final step where I replace a column that has the column numbers with the corresponding col... |