date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/14
1,560
5,583
<issue_start>username_0: I have a map with a lot of sprites. I could add a material to the sprite with diffuse shading and than add lots of lights. But that won't give me the result I want. And is performance heavy. --- Examples -------- In the first image you can see that light is generated by torches. It's expandi...
2018/03/14
826
3,332
<issue_start>username_0: I'm trying to make axios working with a request interceptor. However before a request is made the interceptor is not triggered. What could be going wrong here? I've red already a lot about this problem but not found a solution so far. Could use some help here! This is my code: ```js import...
2018/03/14
278
1,054
<issue_start>username_0: please i am trying to search the all column that (dcountry ="France") as example, as illustrated in picture: ![enter image description here](https://i.stack.imgur.com/XnnJQ.png) i try that code, but not work: ``` MyFirebase.db.child("Developer").orderByChild("dcountry") .startAt(...
2018/03/14
754
2,632
<issue_start>username_0: I am having a design issue here. I have the following below structure. ``` trait Table object Table1 extends Table object Table2 extends Table // and so on till Table200 ``` I have command line interface where the user specifies the table name that needs to be executed. So the problem I am h...
2018/03/14
1,544
7,721
<issue_start>username_0: Here is my Firebase structure [![Firebase JSON](https://i.stack.imgur.com/7iMHr.png)](https://i.stack.imgur.com/7iMHr.png) I'm trying to select all the IDs with the same date and populate a recycler view with it, here is my code snippet: ``` private void updateValues() { if(rAut...
2018/03/14
1,163
4,054
<issue_start>username_0: So I transform paragraph into a string and try to count letters but... HTML: ``` example text a ``` JavaScript ``` function alert(){ var str = document.getElementById('text').outerHTML; var counta = str.match(/a/g).length; var countd = str.match(/d/g).length; var county = str.match(/y/g)...
2018/03/14
532
1,700
<issue_start>username_0: Consider the following cell array: ``` A={1:3,[20,40],100} A = 1×3 cell array {1×3 double} {1×2 double} {[100]} ``` I'd like a way to retrive the linear index of the values stored it, for example if I flatten the array using: ``` [A{:}] ans = 1 2 3 20 40 ...
2018/03/14
1,001
3,566
<issue_start>username_0: I want to use the [GetTempFileName](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364991(v=vs.85).aspx) function to generate a random file name but without creating the file itself when the function gets called. I want to use that function to use the name itself (and without the ex...
2018/03/14
466
1,566
<issue_start>username_0: I need to know if there is a way to create this part dynamically. Or, is it even possible? Using "Contians" will not work in this situation. ``` (x.Letter!= "a") && (x.Letter!= "b") && (x.Letter!= "e") ``` The "a", "b", "c" will be generated out of a ListBox using a for loop. There can be an...
2018/03/14
1,384
5,196
<issue_start>username_0: I am having trouble figuring out how I can update the component with the new data from the database after the edit function has been run and the update to the database was successful. I have tried doing `this.forceUpdate()` but that doesn't work. I heard about using `this.setState()` but I don...
2018/03/14
517
1,672
<issue_start>username_0: I want to execute the following R chunk, but when I generate the PDF of the RMarkdown I don't want to include the Loading messages. **Knitr Setup chunk** `{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) knitr::opts_knit$set(progress=FALSE)` **Load Packages** ``` ```{r, warning=...
2018/03/14
397
1,218
<issue_start>username_0: These are the inputs I have: ``` ab_something#123 something else#15 zy_s0meth1ng third nothing ``` The output I need is: ``` something something else s0meth1ng third nothing ``` The closest I got was this `(?:.._|^)(.*)(?:#[0-9]*|$)` but this still captures the suffix.<issue_comment>usern...
2018/03/14
1,082
3,357
<issue_start>username_0: I am trying to read the lParam x and y coordinates from WM\_MOVE win32 message and getting strange values. I need to extract them from the lParam IntPtr somehow. <https://msdn.microsoft.com/en-us/library/windows/desktop/ms632631(v=vs.85).aspx> Thanks<issue_comment>username_1: Coordinates in W...
2018/03/14
273
994
<issue_start>username_0: I have a vsts build definition in which I try to set the PATH environment variable using PowerShell (and before I tried cmd) task, so that in a later vsTest task, the tests could run an exe from that path, however setting the PATH using the ps\cmd tasks doesn’t seem to work, I tried a few optio...
2018/03/14
206
739
<issue_start>username_0: I'm working with regex of python and I'm trying to get a match for what comes before a certain word. For example in the string "match.function" i'm only interested in the 'match'. how should i write the regex? thanks<issue_comment>username_1: Set the process environment variable by calling [l...
2018/03/14
525
2,125
<issue_start>username_0: I am working on a console Hangman game in c#. I am trying to compare user inputted letter against the letters in the random word I have generated. Error i get is "Operator "==" cannot be applied to operands of type "string" and "char". What other ways could I go about doing this? Ive googled a ...
2018/03/14
616
2,047
<issue_start>username_0: I am having a bit of trouble reading data from a CSV file as an integer. Here is an example of my CSV file: ``` Col1 Col2 Col3 Header Header Header Header 1 1,000,000 BLANK 2 500,000 BLANK 3 200,000 ``` What I am wanting to do is read in the data from 'Col3' (...
2018/03/14
1,765
4,233
<issue_start>username_0: I have an array through whose contents I need to iterate and prep up a new array. I need to do this multiple times, and I don't need to keep the old data once I'm done with it within the inner loop. Essentially: ``` double array[dim]; double temparray[dim]; /*initialise array*/ for(...){ ...
2018/03/14
1,826
4,356
<issue_start>username_0: I want to scape to html some json in request but it doesn´t work, I get an error when decoding json ``` import ( "html/template" "encoding/json" "net/http" "io" "io/ioutil" "log" ) func anyFunction(w http.ResponseWriter, r *http.Request) { body, err := ioutil.Read...
2018/03/14
776
2,946
<issue_start>username_0: VSCode is complaining about the use of `va_start` in the following *currently working* function. ``` void _log(int level, const char *format, ...) { va_list arglist; va_start(arglist, format); writelog(level, format, arglist); } ``` After searching around, I found a reference to ...
2018/03/14
1,113
3,788
<issue_start>username_0: I have the following: ``` import sqlite3 # connecting to the database conn = sqlite3.connect("illness.db") question_data = [ { "question1": "Have you consumed Alcoholic drinks in the last 24 hours?t", "choices": {"a": "Yes", "b": "No"}, "answer": "a" }, { "question2": "Anot...
2018/03/14
1,566
5,172
<issue_start>username_0: I´m trying to learn Redux, so: I'm going through Action creators, actions, reducers, dispatchers... Now, I´m trying to learn how to generate x-state based on other states. For the case, names and hobbies. I've the types, const: `NAMES` and `HOBBIES` which are used by my action creators which ...
2018/03/14
526
2,074
<issue_start>username_0: After update API (27) in Android OREO this code is no longer working: ``` public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); view.loadUrl("javascript:(function() {document.getElementById(\"imPage\").style.display='none';})()"); } ``` I have al...
2018/03/14
803
3,000
<issue_start>username_0: I am receiving this error in Android Studio: ``` Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex ``` With this app gradle file: ``` apply plugin: 'com.android.application...
2018/03/14
1,231
3,606
<issue_start>username_0: This is a common, basic task, so it would be good to know an appropriate way to do this. A similar program in C++ might look like this ([ref](https://www.geeksforgeeks.org/command-line-arguments-in-c-cpp/)): ``` #include using namespace std; int main(int argc, char\*\* argv) { for (int i =...
2018/03/14
301
1,169
<issue_start>username_0: Sorry for confusing you with the terms. I may not be explaining correctly. I have created a new field called Request Title (refname:SAM.OI.Requesttitle) and my Work Item Type name is Request Details. Note: Not using refname System.Title. Please see below screen shot. for my custom WIT.. Ente...
2018/03/14
270
963
<issue_start>username_0: I am currently using the below code to define an array from the active workbook ``` Dim MyRangeArray As Variant MyRangeArray = Array(Sheet1.Range("A4:N19"), Sheet2.Range("A4:N19")) ``` I want this array to reference data from another workbook instead of the workbook which has the code. The ...
2018/03/14
333
1,110
<issue_start>username_0: For example we have class `a` and `b`, and following is the markup ```css body { position: relative; } .b { position: absolute; top: 0px; } ``` ```html This is class a class b ``` Is there a way so that the part of class `a` that is being overlapped by class `b` can be hi...
2018/03/14
1,291
4,381
<issue_start>username_0: I would like to print a string representing a Date, using a specific timezone, locale, and display options. Which one of these should I use? 1. [Intl.DateTimeFormat.prototype.format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/format) 2. [Da...
2018/03/14
995
3,086
<issue_start>username_0: I'd like my parent div to expand the height of the content, as my content will be dynamic. However, the content must be (I think) positioned absolutely so they can overlap each other vertically. I've concluded I'll have to use JS to find the offset from the top to the bottom of the last eleme...
2018/03/14
703
2,508
<issue_start>username_0: I am trying to package(maven package) and run(java -jar file.jar) a project that contains both java and kotlin code. I have followed the tutorial at: <https://michaelrice.com/2016/08/hello-world-with-kotlin-and-maven/> `kotlin source src/main/kotlin java source src/main/java` the file I am tr...
2018/03/14
550
1,836
<issue_start>username_0: How to write a SQL statement (in SQL Server) to get a row with minimum value based on two columns? For example: ``` Type Rank Val1 val2 ------------------------------ A 6 486.57 38847 B 6 430 56345 C 5 390 99120 D 5 329 1...
2018/03/14
2,298
10,228
<issue_start>username_0: I am trying to write an AppleScript to be triggered by hotkey in Keyboard Maestro on MacOS What I want to do, and please do not suggest **ANYTHING ELSE**, **such as hide all**, or hide functionality. I am looking for **minimize all** open windows functionality, ***including the animation***. ...
2018/03/14
2,378
10,097
<issue_start>username_0: Say I have 3 lists of the same dimensions which contains elements of velocity, distance and time. ``` V = [1, 2, 3, 4, -5, 4, 3, 2, 1] D = [10, 9, 8, 7, 6, 5, 4, 3, 2] T = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ``` If I want to find the minimum velocity in my V list I can just do ``` ...
2018/03/14
2,389
10,176
<issue_start>username_0: I don't do much with VB and need some help to count/tally up the number of instances of a given value. Data is in Column A and sorted by the value so all results are together just need a ongoing count till value changes or cell is blank. Example of Sheet ![](https://i.stack.imgur.com/3ZwlZ.j...
2018/03/14
262
1,016
<issue_start>username_0: When declaring a variable as dynamic: ``` dynamic var myProperty: Bool = true ``` is there any advantage or change in behavior by also adding the @objc marker? ``` @objc dynamic var myProperty: Bool = true ```<issue_comment>username_1: In Swift 4, `dynamic` variables will give a compilatio...
2018/03/14
447
1,810
<issue_start>username_0: In my controller I have a loop that iterates through an arraylist and displays the attributes belonging to each object in the arraylist and I am wondering what should I put in my thymeleaf code because at the moment it is only displaying the information of the first object in the arraylist. M...
2018/03/14
487
1,629
<issue_start>username_0: I've just started to practice and I cant find any info. Why is "o" defined as blank and later reappearing in other line of code as different.Thank you in advance. ```js function TriangleOfStars() { for (var i = 1; i <= 10; i++) { var o = ""; for (var j = 1; j <= i; j++) { o...
2018/03/14
422
1,728
<issue_start>username_0: I have a problem when rotating my Android App after doing some basic interactions, I keep getting a null error; ``` java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference ``` Whilst I know what the e...
2018/03/14
885
2,952
<issue_start>username_0: I want to have two names for the same atom in Prolog: ``` player(thomas). player(william). teamOfPlayer(thomas, redSocks). teamOfPlayer(william, redSocks). tom :- thomas. will :- william. teamOfPlayer(will, X). ``` I'd like to be able to refer to William using "william" atom and using "will...
2018/03/14
1,577
4,614
<issue_start>username_0: Suppose we have a list `cid = [1,1,1,2,2]`. The goal is loop over the list and each time replace the element at the cursor position with each one from a pool of candidates. The pool is all other elements not equal to the one in focus plus one more which is not contained in `cid`. For example fo...
2018/03/14
525
1,737
<issue_start>username_0: I would like to select the label "`Autres méthode de paiement`" by using jQuery: Here is a JSFiddle example: <https://jsfiddle.net/0dnd6qj4/> ```html - Autres méthode de paiement ```<issue_comment>username_1: Need to select the label with jQuery? No problem. Use the tag selector, like this: ...
2018/03/14
504
1,622
<issue_start>username_0: I have tried a few things to try to get this to work. I was looking at this -- [Laravel Blade - pass variable via an @include or @yield](https://stackoverflow.com/questions/33938362/laravel-blade-pass-variable-via-an-include-or-yield) -- question about how to pass variables between blades but I...
2018/03/14
1,319
3,628
<issue_start>username_0: I have a task to update a scala array like this: ``` val input = Seq[2, 1, 5, 4, 5, 1, 8, 4] ``` `input` is the array which needs to be updated. `label` is the index from which the elements in the array should be updated accordingly. The updated rule for the elements is ``` new_value = th...
2018/03/14
894
2,878
<issue_start>username_0: I'm trying to update the Table `LIQUIDITYACCOUNT` using the field `QUANTITY` which belongs to the table `STOCKACCOUNT`. Both tables have foreign key CLIENT\_ID. ``` update lq set lq.AMOUNT = lq.AMOUNT + ( st.QUANTITY % @num) * @rompu from LIQUIDITYACCOUNT lq inner join STOCK...
2018/03/14
1,068
3,914
<issue_start>username_0: I am setting up a simple Nextjs boilerplate but can't seem to get the styled-components to work. In my file Header.tsx: ``` // Core Module Imports import Link from "next/link"; import * as React from "react"; // Styled-Component Imports import styled from "../theme/theme"; class Header exten...
2018/03/14
3,702
9,657
<issue_start>username_0: I understand that normal function pointer contain the start address of the function being pointed to so when a normal function pointer is used, we just jump to the stored address. But what does a pointer to an object member function contain? Consider: ``` class A { public: int func1(int v...
2018/03/14
1,083
4,217
<issue_start>username_0: I've set up an application stack running on Google Kubernetes Engine + Google Cloud SQL. When developing locally, I would like my application to connect to a postgres database server running *outside* the cluster to simulate the production environment. It seems that the way to do this is by de...
2018/03/14
1,539
5,448
<issue_start>username_0: Why does the code snippet below print out `0`? However, `i` is correctly updated to `1` without the `for` loop. ``` package main import ( "fmt" "time" ) func main() { var i uint64 go func() { for { i++ } }() time.Sleep(time.Second) fm...
2018/03/14
418
1,531
<issue_start>username_0: In Objective-C, I would use the following code to identify an instance of a class and the function being called in the console. ``` NSLog(@"[DMLOG - %@] %@", NSStringFromSelector(_cmd), self); ``` This would return something like the console out below, where I would get an instance ID to tra...
2018/03/14
594
2,167
<issue_start>username_0: The `java.nio.ByteBuffer` class has a `ByteBuffer.array()` method, however this returns an array that is the size of the buffer's capacity, and not the used capacity. Due to this, I'm having some issues. I have a ByteBuffer which I am allocating as some size and then I am inserting data to it....
2018/03/14
2,633
7,217
<issue_start>username_0: I am trying to use RSelenium with Docker, and everything appears to be working, except that I cannot see the firefox browser. I don't think there is anything in my code requiring it to be headless, but that must be the case. Is there a way to make it viewable like it was when using `RSelenium::...
2018/03/14
2,257
6,549
<issue_start>username_0: I have a problem with my Angular 4, Firebase, AngularFire ionic app with observable that makes firebase request. The problem is that the first time i click on the view the cards doesn't load, but if i went to other page and come back and i click again then the images loads with no problem but ...
2018/03/14
2,138
6,156
<issue_start>username_0: I have a node js app that gets me a another site's html source into a variable (result.body) I want to get the value of an input tag. ``` ``` I have tried using jsdom like this: ``` const jsdom = require("jsdom"); const { JSDOM } = jsdom; const dom = new JSDOM(result.body); console.log("d...
2018/03/14
324
1,267
<issue_start>username_0: I wanna stop ballerina program in the middle of some logic. How can I stop a running program in ballerina using code? I'm looking for something equivalent to System.exit(0) in java.<issue_comment>username_1: You could throw a runtime exception. Upvotes: 1 <issue_comment>username_2: I believe y...
2018/03/14
1,038
2,198
<issue_start>username_0: I would like to know what is a best practice or a neat code if I have a very complex format recorded in Excel. For example ``` bad_format = c(1969*,--1979--,1618, 19.42, 1111983, 1981, 1-9-3-2, 1983, “1977”,“1954”, “1943”, 1968, 2287 BC, 1998, ..1911.., 1961) ``` There ...
2018/03/14
685
3,203
<issue_start>username_0: I am trying to verify an Admin created a user through password-reset-challenge using AWS Cognito generated a temporary password and I can't find the way or an example on how to use a temporary password and set new passwords for new users in javascript.<issue_comment>username_1: The Amazon Cogni...
2018/03/14
1,569
5,367
<issue_start>username_0: I just started getting into programming and I have been trying to solve this puzzle, but unfortunately I couldn't find any answers related to this anywhere, so here it goes: 1) Given n numbers (using prompt), show the highest and lowest numbers of the set. ``` var highest = 0, **lowest = 0**;...
2018/03/14
2,222
8,464
<issue_start>username_0: Imagine I have something that looks like this: ``` Stream stream = Stream.of(2,1,3,5,6,7,9,11,10) .distinct() .sorted(); ``` The javadocs for both `distinct()` and `sorted()` say that they are "stateful intermediate operation". Does that mean that internally the stream will do something li...
2018/03/14
2,388
9,166
<issue_start>username_0: I need help getting two ImageViews to collide, I looked around on this website and many youtube videos and think I have found one solution to my problem. I found some code from another person post, [how to detect when a ImageView is in collision with another ImageView?](https://stackoverflow....
2018/03/14
558
1,840
<issue_start>username_0: Wondering is following code ever possible in Haskell? ``` equal :: a -> b -> Bool equal a b = a == b ```<issue_comment>username_1: No, the type of `(==)` requires its arguments to be of the same type ``` (==) :: Eq a => a -> a -> Bool ``` You ask if it's possible (to test equality between ...
2018/03/14
553
1,960
<issue_start>username_0: Consider the following code: ``` const log = ({a,b=a}) => console.log(a,b); log({a:'a'}) ``` The variable `b` is assigned the value `a`. This does work when transpiling it to es5, but I am not entirely sure if this is valid es6 syntax. Am I allowed to do this kind of default value assignm...
2018/03/14
778
2,889
<issue_start>username_0: How to run [Psiphon](https://www.psiphon3.com) from command line (to connect to a proxy server) and make it be applied to curl only (keeping other programs' connections un-proxy-ed)? **Purpose:** I'm using a script (written in perl) that uses **curl** by calling CMD command lines to perform w...
2018/03/14
513
1,939
<issue_start>username_0: I am applying Decision Tree to a data set, using sklearn In Sklearn there is a parameter to select the depth of the tree - dtree = DecisionTreeClassifier(max\_depth=10). My question is how the max\_depth parameter helps on the model. how does high/low max\_depth help in predicting the test...
2018/03/14
356
1,164
<issue_start>username_0: How can I bind a property only when a variable is set to `true`? ```html {{ icon }} {{ title }} export default { name: 'list-tile-text-icon', props: ['icon', 'title', 'route'], data: () => ({ isItemSelected: false }), created() { this.isItemSelected = window.location.href === this...
2018/03/14
1,603
3,973
<issue_start>username_0: I have the following `reprex` list of 10 sample matrices: ```r # Sample of 10 3*3 matrices z1 <- matrix(101:104, nrow = 2, ncol = 2) z2 <- matrix(201:204, nrow = 2, ncol = 2) z3 <- matrix(301:304, nrow = 2, ncol = 2) z4 <- matrix(401:404, nrow = 2, ncol = 2) z5 <- matrix(501:504, nrow = 2, nco...
2018/03/14
850
3,169
<issue_start>username_0: A data collection app that used `LocationManager` directly was updated to use `FusedLocationProviderApi`. With `LocationManager`, most devices quickly report 5m accuracy or better when collecting location. With `FusedLocationProviderApi`, the best accuracy ever reported is 10m. I have just in...
2018/03/14
2,798
10,420
<issue_start>username_0: I'm trying to use Eclipse write Spring boot application, however it encounter the following error: ``` ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package. 2018-03-15 12:16:19.833 WARN 30196 --- [ main] ConfigServletWebServerA...
2018/03/14
589
2,330
<issue_start>username_0: i am new with NDK , and would like some help from you. I am trying to run this [Project](https://github.com/ayuso2013/face-recognition-as) but it keeps me showing the Error `Invalid DT_NEEDED entry "../../lib/lipopencv_core.so"`. This may be happening because i am using the .so files compiled b...
2018/03/14
553
2,197
<issue_start>username_0: The code below works, but I would like to know if there is a way to optimize it. The if..else statement has redundant code. I'm not familiar enough with array.reduce / array.map { } yet. I have two arrays containing characters. I would like to count the number of deletions necessary in either/...
2018/03/14
1,900
7,049
<issue_start>username_0: It defaults to my safari but would like to change it to chrome. I looked in preferences, but there doesn't seem to be an option for that. Any ideas?<issue_comment>username_1: If you are using the live server extension <https://github.com/ritwickdey/vscode-live-server> it has this setting: > >...
2018/03/14
364
1,161
<issue_start>username_0: I'm trying to do npm install for firebase but I keep running into errors... I tried with npm version 5.6.0 and 5.7.1 I even tried installing assert-plus but that also failed (similar error to below). Any suggestions? ``` vagrant [polaris]> npm install firebase npm ERR! path /vagrant/polaris/no...
2018/03/14
991
2,583
<issue_start>username_0: I'm trying to replace the `panel.smooth` for argument `panel` in `pairs()` with a regression line drawing function instead of lowess line, with no success. I tried to create function `reg` and place it for argument `panel` but that does not work? Any fix? ``` reg <- function(x, y) abline(lm(y...
2018/03/14
861
2,149
<issue_start>username_0: I'm trying to add all the values of an object into one variable for the total, but I seem to be concatenating them instead? ``` binance.depth("BNBBTC", (error, depth, symbol) => { a = 0; for (value in depth.bids){ a += value; }; console.log(a); }); ``` This is the output: ``` 00.0...
2018/03/14
685
2,436
<issue_start>username_0: I've run into a weird problem with Visual Studio 2017 (Enterprise, version 15.5.2) that I can only replicate on one specific machine. The problem doesn't occur on other development machines. Given a file `foo.resources.json` with the following contents: ```js { "FooReparatur": "Reparatur...
2018/03/14
509
2,029
<issue_start>username_0: I'm trying to make a shooter game with different enemy and I'm trying to kill a boss with multiple hits but I can't see how I can do it. Can anyone explain it to me please?<issue_comment>username_1: The problem is that you're keeping track of the boss's health inside of `projectileDidCollideWit...
2018/03/14
681
2,257
<issue_start>username_0: How can I write an SQL query to find those authors who has co-authored some paper together. schema : ``` Authors ( authorID, firstName, ); Papers ( paperID, title, ); PaperbyAuthor ( authorID FOREIGN KEY REFERENCES Authors, paperID FOREIGN KEY REFERENCES Papers ); `...
2018/03/14
886
3,406
<issue_start>username_0: I'm submitting a form to a Lambda function deployed by serverless, here's the yml: ``` functions: hello: handler: handler.hello events: - http: POST hello ``` Now my hello function is: ``` module.exports.hello = (event, context, callback) => { const response = { statu...
2018/03/14
1,185
3,554
<issue_start>username_0: I am trying to do use a "clip path" on an image with a rounded path. I know there is a possibility to use svg clip paths, but I thought its not possible making it really responsive - so I decided to use the svg graphic on the div underneath the image - but I still have problems with mobile view...
2018/03/14
1,318
4,133
<issue_start>username_0: I have done several searches on this but sadly due to the type of query I am after it invariably gives me PHP answers. I will revert to code to generate the script but the more I think about it I know there *must* be a simplier way to do it in a single query which will be much faster. My Code...
2018/03/14
750
2,834
<issue_start>username_0: **CommentsCollection** ``` class CommentsCollection extends ResourceCollection { public function toArray($request) { return [ 'data' => $this->collection ]; } } ``` **CommentsController** ``` public function index() { $post = Post::find(1); re...
2018/03/14
323
997
<issue_start>username_0: I want to use ViewBag value in JQuery. Does anyone provide me some idea how to do that. ``` //My code Cost@ViewBag.Cost //JQuery var original = $("#spCost").val; ``` I also tried: ``` var original = '@ViewBag.Cost'; ``` But, currently, it is showing no value in `original`. Please ...
2018/03/14
387
1,200
<issue_start>username_0: I wrote the below JPQL. ```sql select e.name from emp e where e.date = nvl(:date,select max(date) from emp e where e.id=1); ``` When I pass the date value, it should run the JPQL with the given date value. If I don't pass any date value then the JPQL should run with `max(date)`. But getting...
2018/03/14
741
2,604
<issue_start>username_0: I have the following models: ``` class Venue(models.Model): name = models.CharField(max_length=100) description = models.CharField(max_length=1000, null=True, blank=True) streetaddress1 = models.CharField(max_length=150) streetaddress2 = models.CharField(max_length=150 ,null=T...
2018/03/15
417
1,370
<issue_start>username_0: The issue I have is that when I parse a JSON string, which correctlyreturns an array of elements, I try to push a new element to the array with empty values. The problem here is: ``` console.log('addons ', this.categories[this.editingId - 1].addons); console.log('parsed ', JSON.parse(this.cat...
2018/03/15
1,293
4,239
<issue_start>username_0: I'm plotting image outline points [using this threshold method](https://stackoverflow.com/questions/7011801/image-outline-points-generator), but my outline has straight line segments. I want to plot the angle to the vertical at each point, so I really need curves. I can get smooth curves usin...
2018/03/15
1,270
4,639
<issue_start>username_0: I have been trying to create a slideshow on one of the web pages I've been creating. I have created a div with a unique class name that is targeted in order to change the background image using JavaScript. So far, I have been able to do the following: 1. Capture the div where I want to change ...
2018/03/15
955
3,662
<issue_start>username_0: I am working on a windows forms app and trying to connect to a sharepoint site. I do not have sharepoint installed on my PC so from my googling I have leant that I must use client side code. When I right click references in my project and go to add reference the only one that has Sharepoint is...
2018/03/15
870
3,413
<issue_start>username_0: When `Span` was announced, I wanted to use it in a parser for my toy programming language. (Actually, I'd probably store a `Memory`, but that's beside the point.) However, I have grown used to switching on strings: ``` switch (myString) { case "function": return TokenType.Function...
2018/03/15
830
2,588
<issue_start>username_0: I have the following object: ``` { name: ["Jimmy","Jill"], age: [23, 42], location: { city: ["LA", "NYC"] } ``` For every object key there is an array value with 2 entries (always). What I'm trying to do is to recreate the object by plucking the 2nd item in the arrays. But I want this to hap...
2018/03/15
988
3,249
<issue_start>username_0: I have been setting up some tests with Nightwatch. I ran the following basic test on their website. ``` module.exports = { 'Search on google': (browser) => { browser .url('http://www.google.com') .waitForElementVisible('body', 1000) .setValue('in...
2018/03/15
826
2,602
<issue_start>username_0: I am making a rota spreadsheet in Excel 2016 and would like a formula tied to a dropdown list to ignore an "Annual Leave" item in the list rather than do a calculation. I have a drop down called "start time" and one called "finish time". So for example I choose a start time from `5:30am` and a...
2018/03/15
630
2,129
<issue_start>username_0: I have the following code. What it does is that on click of an `li`, the dropdown for it will slide down. If another `li` beside it is clicked, another drop down menu slides down then the previous drop down slides back up. However, if I were to click on the same `li` to "open" and "close" it, ...
2018/03/15
381
1,348
<issue_start>username_0: I am trying to write the line: `const reg = new RegExp('\.js$');` but my VSCode deletes the `\` from my regex on save. Is this a setting, or some issue with a plugin? Searched online, but wasn't finding any relevant answers. For reference, plugins installed are: - Angular v5 Snippets - Beaut...
2018/03/15
1,560
3,411
<issue_start>username_0: So I currently have a function that outputs sound barrier for the input height. ``` def soundbarier (y): if 0 < y < 1524: S = 340.3 elif 1524 < y < 3048: S = 334.4 elif 3048 < y < 4572: S = 328.4 elif 4572 < y < 6096: S = 322.2 elif 6096 <...
2018/03/15
878
3,104
<issue_start>username_0: I tried to do something similar today. I was surprised it didn't compile. ``` struct Test { // v----- Remove me to compile // /* static constexpr auto get_test1 = [](Test const& self) { return self.test; // error, Test is incomplete }; // */ // Handwritten versio...
2018/03/15
401
1,552
<issue_start>username_0: I am using last version of PGP Guzzle HTTP... Very simple test done : ``` use GuzzleHttp\Client; $client = new Client(); $res = $client->post('https://MYAPI/cards/XXX/credit',[ 'headers' => ['Authorization' => 'Token MYTOKEN'], 'json' => [ "amount" => 10, ...
2018/03/15
517
1,673
<issue_start>username_0: I'm trying to learn how to use Retrofit2, and this is the URL I have to generate: `(baseUrl)/repositories?q=language:Python&sort=stars&page=1` This is the method I'm using: ``` Call> javaRepos( @Query("language") String language, @Query("sort") String sort, @Query("page") int page ); ``...
2018/03/15
993
3,156
<issue_start>username_0: Still learning web dev so here is my question. I am wondering why when using a container class at the very beginning of my layout, and when adding a row with two Col-md-6 columns, the content extends past the container. The two columns with the forms inside extend past the jumbotron on both sid...
2018/03/15
575
2,041
<issue_start>username_0: I am trying to execute this code and it shows 'NoSuchElementException' this error. So can anyone help me for this ? Code: ``` from selenium import webdriver from selenium.webdriver.common.keys import Keys driver= webdriver.Chrome() page=driver.get("http://www.awgp.org") banner_tell=driver.f...