date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/16 | 2,271 | 7,917 | <issue_start>username_0: Is there any way to detect IE browser with React and either redirect to a page or give any helpful message. I found something in JavaScript, but not sure how would I use it with React+TypeScript.
`var isEdge = !isIE && !!window.StyleMedia;`<issue_comment>username_1: This is the service I alway... |
2018/03/16 | 483 | 1,538 | <issue_start>username_0: I'm working on a project and I need to select a different .txt every time based on the input.
This is what I have:
```
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
string hp, att, def, vel, spec;
string answer, monster;
do
{
cout << "Which ... |
2018/03/16 | 968 | 4,138 | <issue_start>username_0: I've read several dozen posts, many dating back years, and cannot come up with a modern, safe and reliable way to update a special value in several thousand records as a single query.
I loop over all the records in the table, determine a DateTime value based on some special logic and then run ... |
2018/03/16 | 870 | 3,624 | <issue_start>username_0: Understandably, PWAs (Progressive Web Apps) are added to home screen after the user visits the web app in a supported browser and clicks on "Add to Home Screen". This works fine for publicly available PWAs.
Thinking of Enterprise Android applications, which needs to be installed to thousands o... |
2018/03/16 | 1,094 | 4,601 | <issue_start>username_0: I did a lot of research now to find out the exact differences and trade-offs between a React Native project, CRNA and an Expo project.
My main guidance was [this](https://stackoverflow.com/questions/39170622/what-is-the-difference-between-expo-and-react-native/49324689#49324689)
However I sti... |
2018/03/16 | 1,024 | 4,311 | <issue_start>username_0: I need to upload a file to Google Cloud Storage and make it public immediately.
I use `createWriteStream`.
If I try to write a file and after a finish immediately call `makePublic` - I get an error about that no such object.
For now, I use setTimeout with `makePublic` callback, but it's a hacky... |
2018/03/16 | 898 | 3,951 | <issue_start>username_0: Here is my query:
```
select CASE WHEN ATTRIBUTE_SOURCE is NULL THEN
ELSE ATTRIBUTE\_SOURCE END AS ATTRIBUTE\_SOURCE,
\*
from ()
```
The calculation is working fine, the problem is the resulting table has two `ATTRIBUTE_SOURCE` columns, one from the original table and another that is adde... |
2018/03/16 | 386 | 1,341 | <issue_start>username_0: I am trying to implement a screen with a map and on top on the map it should have a textbar displaying text but for some reason my textbar always goes below the google map view.
I tried to look up for relateable questions but no success with their answers. The picture is attached below to give ... |
2018/03/16 | 710 | 2,680 | <issue_start>username_0: I'm using the generic `IdentityUser` class for my user model and with using `string` as primary key everything works fine, but I would like to use `long`as key type. So, I'm using the generic version of IdentityUser. Now I discovered that the UserManager has the following definition:
```
publi... |
2018/03/16 | 349 | 1,184 | <issue_start>username_0: I tried this code, expecting it to use IPython's `display` function:
```
import pandas as pd
data = pd.DataFrame(data=[tweet.text for tweet in tweets], columns=['Tweets'])
display(data.head(10))
```
But I get an error message that says `NameError: name 'display' undefined`. Why? How do I ma... |
2018/03/16 | 921 | 3,471 | <issue_start>username_0: I'm doing Selenium JAVA tests for mobile using the Chrome driver with its emulator. The problem is that I can't use the most advanced mobile devices like iPhone 7,8 etc even-though its in my drop-down list when manually testing in the devtools.
This is the driver init. that works perfectly wit... |
2018/03/16 | 662 | 1,746 | <issue_start>username_0: Is there a way to do a merge in pandas limiting the columns you want to see?
What I have:
df1
```
ID Col1 Col2 Col3 Col4
1 1 1 1 D
2 A C C 4
3 B B B d
4 X 2 3 6
```
df2
```
ID ColA ColB ColC ColD
1 1 1 1 D
2 A C X 4
3 B ... |
2018/03/16 | 522 | 1,361 | <issue_start>username_0: I have a small issue. I have a json file which I fetch data from.
When I print\_r() the data, I see the field I want. But trying to call them, only 2 on 3 works, one seems to not be fetch-able.
Here the code, if someone have an idea about what's wrong:
Original JSON :
```
[
{
"ņame": "Xcoin... |
2018/03/16 | 379 | 1,037 | <issue_start>username_0: I am trying to show a `div` element only whenever user inputs some text in a different field.
**Text Field:**
**Div:**
```
div class="col-xs-12 text-left" id="continue" style="display: none;">
Continue
```
**JaveScript:**
```
if($('feedUrl').val()){
$('#continue').show();
}
```
... |
2018/03/16 | 625 | 1,938 | <issue_start>username_0: I've hacked my way around this issue, but I'd like to implement a better code. I'm trying to determine the last date where a non-zero financial event occurs. Note that this is a stripped and altered XML for brevity so excuse any formatting oddities. The actual XML I'm using has Change amounts f... |
2018/03/16 | 552 | 1,743 | <issue_start>username_0: I need to order by date edited or date posted.
For example if an item date posted is 2018-03-16 20:40:00 and another item date edited is 2018-03-16 21:40:00 I want to show first the item that is closest time to current in date posted or date edited.
I tried this:
```
"SELECT * FROM table ORDE... |
2018/03/16 | 398 | 1,339 | <issue_start>username_0: I have tried expressions with suppressMessages(expr), suppressWarnings(expr),
but they keep outputting messages.
eg:
```
suppressWarnings(ksvm(y~., data=data, type='C-svc', cross=5, kernel=kernel))
```
keeps generating this message.
>
> Setting default kernel parameters
>
>
>
How do I... |
2018/03/16 | 571 | 2,008 | <issue_start>username_0: I am in a virtualenv and trying to run through pip installs. I know the code works because outside the virtualenv this code has worked. I am running on a Windows 10 machine. Using the Git Bash terminal or the regular command prompt (have tried as admin and regular user).
I am trying to run
`pi... |
2018/03/16 | 1,326 | 4,464 | <issue_start>username_0: My app (compiled with VS20**15**) loads a 3rd party DLL(compiled with VS20**08**). Running the app in release requires only the redistributables for VS2008 and VS2015 from the MS webpage on the target machine.
Running the app in debug mode (e.g. on another developer machine) requires the **deb... |
2018/03/16 | 3,005 | 11,171 | <issue_start>username_0: I'm creating a basic android app to learn. below i have the main activity that creates a few textViews on create. I'm trying to clean my project up by putting that large chunk of code in another file called "CreateCategories.java" then call a function, class, or something that runs that code. h... |
2018/03/16 | 536 | 1,687 | <issue_start>username_0: when I run the test, I get the following error:
```
({"Object.":function(module,exports,require,\_\_dirname,\_\_filename,global,jest){import React from 'react';
^^^^^^
SyntaxError: Unexpected token import
```
It makes sense, since all the lines of "import React" or "import Enzyme", are mar... |
2018/03/16 | 918 | 3,310 | <issue_start>username_0: I am using the git mergetool command to fix conflicts. However I have thousands of conflicts, is there way to simplify this so I get everything from the remote?
I am asked to enter c, d or a in the command.
```
{local}: deleted
{remote}: created file
Use (c)reated or (d)eleted file, or (a)b... |
2018/03/16 | 890 | 3,295 | <issue_start>username_0: Im a beginner in Java so sorry in advance if I dont understand certain words.
I keep having the error: Cannot resolve symbol @EnableEurekaServer... When I manually type in the import line for eureka server, the word "cloud" is highlighted red in:
```
import org.springframework.cloud.netflix.... |
2018/03/16 | 806 | 2,925 | <issue_start>username_0: ```
public class ItemStore {
private Dictionary> \_items = new Dictionary>();
public void AddItem(object item) {
var type = item.GetType();
if (!\_items.ContainsKey(type)) {
\_items[type] = new List();
}
\_items[type].Add(item);
}
public IEnumerable GetItems() {
if(!\_items.Conta... |
2018/03/16 | 380 | 1,308 | <issue_start>username_0: I have a query that returns following values:
```
TemplateCode Total
1418 35
7419 31
7418 31
8325 17
15623 17
4997 17
```
I want all the rows with top 3 `Total` values
In my query if I include `LIMIT 3` in the query then i... |
2018/03/16 | 867 | 3,320 | <issue_start>username_0: I have a helper method to get the Display Name of an enum:
```
public static string GetDisplayName(this Enum @enum)
{
return @enum.GetAttribute()?.GetName();
}
```
I'm trying to make a Dictionary out of the enum names as keys, with the values as the display names using this code:
```
pu... |
2018/03/16 | 559 | 1,934 | <issue_start>username_0: I'm using the neo4j browser to search for a node in my graph by label. I know the node exists and the label on the node is correct, but when I specify the label on the node, neo4j can't find it.
More specifically, I use the following cypher query in the neo4j browser:
```
match (a:Foo) wher... |
2018/03/16 | 363 | 1,332 | <issue_start>username_0: I know that Jquery can do:
```
$('#div').on('click', function() {
//do something
});
```
What I want to do is check for a click without calling a function in a conditional, something like this:
```
if ($('#div').on('click') && //another conditional) {
//do something
}
```
Without ... |
2018/03/16 | 571 | 2,004 | <issue_start>username_0: I am new to cordova. Trying to work out with it but when I check requirements it says Android Target not installed while I have installed SDK in Android Studio.
Required information for troubleshooting can be found [here](https://www.pastebin.com/ALd4Bizw).
I am using Windows 8.1 32 bit insta... |
2018/03/16 | 1,469 | 3,333 | <issue_start>username_0: Assume I have the following list:
```
list(c(1:5,NA,NA),NA,c(NA,6:10))
[[1]]
[1] 1 2 3 4 5 NA NA
[[2]]
[1] NA
[[3]]
[1] NA 6 7 8 9 10
```
I want to replace all `NA`s with `0`:
```
[[1]]
[1] 1 2 3 4 5 0 0
[[2]]
[1] 0
[[3]]
[1] 0 6 7 8 9 10
```
I was originally thinking `... |
2018/03/16 | 1,517 | 5,273 | <issue_start>username_0: I have a react app that uses react-router with a Router that looks like:
```
```
The app is hosted using Firebase hosting.
If I open my website and click around such that the router takes me to /map/uid, it loads fine. But if I close the browser and then try to explicitly navigate to `/map/... |
2018/03/16 | 1,193 | 4,092 | <issue_start>username_0: If I have a number that is 1,234.56, I need to format with no decimal, no comma & leading zeros. The output I'm seeking would be 000123456.<issue_comment>username_1: What about specyfying the `basename` in `Router`? Something along this:
```
```
Upvotes: -1 <issue_comment>username_2: For me I... |
2018/03/16 | 985 | 3,188 | <issue_start>username_0: I am trying to get **cumulative** counts of users and AUM by month. However, a user can have multiple goals, which correspond to accounts, and accounts can have multiple positions.
<http://sqlfiddle.com/#!15/f3c59/2>
As you can see, this doesn't work because user 1 is in 2/1/18 with 300 AUM ... |
2018/03/16 | 287 | 1,035 | <issue_start>username_0: I am using Font Awesome icons in a page I am developing, and while the `fas` icons work fine, the `fab` icons do not. Instead, with the `fab` icons, I get a blank square. I currently have both the Font Awesome CDN link and a link to the local `fontawesome-all.min.css` file. I have disabled AdBl... |
2018/03/16 | 586 | 2,232 | <issue_start>username_0: Suppose I have a method that issues a `POST` and then calls an appropriate callback function in order to handle the response:
```
myService.verify(id, verificationCallback);
function verificationCallback(err, response) { ... }
```
Maybe this question is two-fold. There seems to be 2 implici... |
2018/03/16 | 623 | 2,241 | <issue_start>username_0: I have a dataset that contains 81 columns with person id, 79 binary variables and a cost variable:
```
id h1 h2 h3 ... h79 cost
1 1 0 1 1 15
2 1 1 1 1 80
3 0 1 1 0 10
...
```
each person id have one row of records. Now I want to choose which of the two h(... |
2018/03/16 | 554 | 1,997 | <issue_start>username_0: I am using pyodbc to create or drop table. And I wrote a function to drop table if table has already existed. Please look at my syntax below
```
try:
cur.execute('Drop table {}'.format(table_name))
except ProgrammingError:
cur.execute(create_table)
```
However, I got error message :
... |
2018/03/16 | 1,164 | 4,614 | <issue_start>username_0: In Swift, we can create a custom UICollectionViewCell as follows:
`class MyCell : UICollectionViewCell {}`
Next, if we have the method:
`override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {}`
which expects us to retur... |
2018/03/16 | 509 | 2,143 | <issue_start>username_0: I have been reading recently about a new technology called Google Flutter, which is used to develop mobile apps(Android/iOS) with a programming language called Dart.
All that being said, do I have to learn Dart as a strong prerequisite to build apps with flutter(which makes sense) or I will l... |
2018/03/16 | 1,622 | 5,248 | <issue_start>username_0: I have a dataframe in R that includes a column for distance (12th column) and whether or not there is a match at that distance (13th column). 1 represents a match, 0 represents no match.
For example:
```
distance match
1 0
1 1
1 1
2 1
2 0
3 ... |
2018/03/16 | 742 | 2,628 | <issue_start>username_0: I know C++11 provides [alignof](http://en.cppreference.com/w/cpp/language/alignof), [alignas](http://en.cppreference.com/w/cpp/language/alignas) and [align](http://en.cppreference.com/w/cpp/memory/align), but in this case I want to check an input buffer that is already allocated.
I know also t... |
2018/03/16 | 639 | 2,000 | <issue_start>username_0: We are currently using a simulation package that outputs data to an Excel spreadsheet. The output cannot be customized to the level that fits the company standards. The good news is that the spreadsheet's format is locked. And the data I need is located in (15) different cells that are scattere... |
2018/03/16 | 504 | 1,418 | <issue_start>username_0: I want to show all the records in the file, for example all the codes but it only shows me the first record.
**demo.xml**
```
xml version="1.0" encoding="UTF-8"?
`1000001`
The Name
The Brand
The Category
The Color
The Size
0
4
5
2
3
`1000002`
The Name
The Brand
The Category... |
2018/03/16 | 408 | 1,326 | <issue_start>username_0: I'm trying to write a php function to check a variable only contains characters from the alphabet, so far I have the following code:
```
if(!preg_match('/[a-z]/i', $name)){
$valid = FALSE;
}
```
It only returns false if there are no alphabetic characters in the string to be checked... What... |
2018/03/16 | 958 | 3,389 | <issue_start>username_0: I have a ESP8266, which I use to log weather data over MQTT. Because I want to save some power, I decided to use DeepSleep. Since I want to log the data, it would be good if I could send new entries every minute.
This used to work with my old sketch, where I had all data acquisition tasks in t... |
2018/03/16 | 741 | 2,452 | <issue_start>username_0: I am trying to make a C++ program that accepts a username and password from the user and matches it to the ones that are already stored in the variables. For the password, I am using the \* (asterisk) character to appear instead of the actual characters for privacy.
```
#include
#include
#in... |
2018/03/16 | 353 | 1,339 | <issue_start>username_0: My problem is for how do i test a Webrequest timeout . My C# code is making a SOAP service call to a 3rd party vendor whose code i do not have . When their service goes down , most of my application URLs also go down as well.
So I thought of adding a timeout ; and read this blog as well which ... |
2018/03/16 | 446 | 1,654 | <issue_start>username_0: guys do you have some answer on this a strange bug ? I moved my project from another server and i configured all but i watching some bug Laravel give me a this error :
```
FatalErrorException in /public_html/app/Http/Controllers/GameController.php line 718:
Call to undefined function App\Http\... |
2018/03/16 | 477 | 1,168 | <issue_start>username_0: I have a list of dictionaries I wish to sort in python by a key 'id'.
```
items = [{'id' : 883},{'id' : 547},{'id' : 898},{'id' : 30},{'id' : 883}]
```
I wish to sort them in a specific order based on this sorting order given:
```
[30, 883, 547, 898]
```
How would I go about doing this in... |
2018/03/16 | 477 | 1,250 | <issue_start>username_0: i would like to output a calculation of two input fields into a third, while it is typed in (keyup, i think?). The following is just a visual example, cause I don't know how to do it better:
```
$(document).ready(function() {
var n1 = $("#n1").val();
var n2 = $("#n2").val();
var sum = ((n1 + ... |
2018/03/16 | 594 | 2,337 | <issue_start>username_0: I have an app that's having some issues on chromebooks and want to stop serving the app to those devices. What's the best way to prevent chromebooks from getting the app?
From the docs there seems to be these solutions:
<https://developer.android.com/topic/arc/manifest.html>
>
> 1) Exclude s... |
2018/03/16 | 1,502 | 4,995 | <issue_start>username_0: So, a method would be to `cout<<"";` if the condition is false but I don't feel like it's the right way and `break` doesn't seem to work. Is there something I should know ?
```
template
T get(const string &prompt) {
cout<>ret;
return ret;
}
int main()
{
vectorx;
for(int i=0;i<1000;i++) x... |
2018/03/16 | 836 | 3,259 | <issue_start>username_0: I have some app.
I wrote and tested it on Android 5.1. When I tried to run my app on Android 6.0 I've got the exception. The exception appeare after I try to bind a FloatingActionButton and set OnClickListener because of null. FindViewById returns null when I try to get it with FrameLayout fro... |
2018/03/16 | 1,005 | 3,100 | <issue_start>username_0: I build up an array with a counter when a function is true.
So if it were true 3 times in a row, the array looks like [1,2,3]. If the function is not true there is a gap in the counter and could look like this [1,2,3,5].
In another function I need to determine if the array length is > 2 and t... |
2018/03/16 | 868 | 2,654 | <issue_start>username_0: Let's say I have these 3 models
```
class Restaurant(models.Model):
name = models.CharField(...)
class Eater(models.Model):
name = models.CharField(...)
class Transaction(models.Model):
eater = models.ForeignKey('Eater', related_name='transactions')
restaurant = models.ForeignKe... |
2018/03/16 | 427 | 1,359 | <issue_start>username_0: I have a sequence of strings which I get in following format:
* Project1:toyota:Corolla
* Project1:Hoyota:Accord
* Project1:Toyota:Camry
As you can see middle section of the string is not consistent case (for Corolloa, it is listed as toyota). I need to change above as follows:
* Project1:**... |
2018/03/16 | 698 | 2,479 | <issue_start>username_0: Below is my console log:
```
jy03154586@ubuntu:~/Works$ docker build -t ui .
Sending build context to Docker daemon 50.18MB
Step 1/9 : FROM node:carbon-alpine as build
---> adc4b0f5bc53
...
Step 9/9 : COPY --from=build /app/dist /usr/share/nginx/html
---> 997cc6252b83
Successfully built 997... |
2018/03/16 | 998 | 4,571 | <issue_start>username_0: I'm new to automating webpage access, so forgive what is probably a remedial question. I'm using C#/Windows.Forms in a console app. I need to programmatically enter the value of an input on a webpage that I cannot modify and that is running javascript. I have successfully opened the page (trigg... |
2018/03/16 | 904 | 2,938 | <issue_start>username_0: How can I split this?
```
'Symptoms may include:Absent or small knucklesCleft palateDecreased skin creases at finger jointsDeformed earsDroopy eyelidsInability to fully extend the joints from birth (contracture deformity)Narrow shouldersPale skinTriple-jointed thumbs'
```
Desired Output shou... |
2018/03/16 | 1,005 | 3,268 | <issue_start>username_0: I am trying to understand processes in C. I currently want to create shell-like structure which - after pressing a shortcut like `Ctrl`+`C` or `Ctrl`+`Z` will kill all its subprocesses but will stay alive. My code looks like this:
```
#include
#include
#include
#include
#include
#include ... |
2018/03/16 | 824 | 2,935 | <issue_start>username_0: I noticed that button gets classes cdk-focused and cdk-program-focused added *after* the dialog it triggered is closed. If I click anywhere effect disappears.
**app.component.html** [fragment]
```
delete
```
[](https://i.stack.imgur.com/... |
2018/03/16 | 2,916 | 10,007 | <issue_start>username_0: I have a program that installs an updated database monthly into a special software we use. I get an .exe, run it, the .exe "installs" a bunch of DBF/CDX files into a folder, and then "hooks up" the database info into our software somehow.
Here is what the "installation" output folder looks li... |
2018/03/16 | 669 | 2,166 | <issue_start>username_0: I have made a page (on Shopify) and I made there a fixed "go to top" arrow on the left bottom. It's okay, but when I scroll to the page bottom the arrow is will be in front of the footer, and I want it to stay above the footer.
Here is the code that I use:
```js
$(document).ready(function() {... |
2018/03/16 | 1,311 | 4,075 | <issue_start>username_0: I'm doing a parser for build outputs, and I'd like to highlight different patterns in different colors. So for example, I'd like to do:
```
sed -e "s|\(Error=errcode1\)|\1<\_red>|" \
-e "s|\(Error=errcode2\)|\1<\_orange>|" \
-e "s|\(Error=.\*\)|\1<\_blue>|"
```
(so it higlights errcode1 in... |
2018/03/16 | 282 | 825 | <issue_start>username_0: Here is my query:
```
select col1, col2, (as col3) from
```
may return `NULL`, in which case I want to set `col3` to `col2`. I know I could do this with a `CASE` statement:
```
select col1, col2,
CASE WHEN () is NULL col2
ELSE () END AS col3
from
```
However, that approach executes twic... |
2018/03/16 | 249 | 922 | <issue_start>username_0: I'm working on a legacy webforms app. I've added a new radmenuitem to an existing radmenu (see link2 below) but I can't see it when I compile and run the page. The existing link, Link1, appears just fine. I can even change Link1 and see the changes when testing. Link2 doesn't show. I've tried f... |
2018/03/16 | 2,000 | 7,476 | <issue_start>username_0: I am trying to setup a SPA where I can pass data from my appsettings.json to my clientside on server render. I followed the steps to configure SSR using the new SpaServices Templates
<https://learn.microsoft.com/en-us/aspnet/core/spa/angular>
However I am not understanding how to accomplish t... |
2018/03/16 | 1,762 | 6,586 | <issue_start>username_0: I need to accomplish something very simple: copy a complete column to the next column to the right in the same worksheet (I have around 300 of those columns in one sheet of a workbook) meaning that the macros has to copy every odd column in range to next even column so that I end up having a ra... |
2018/03/16 | 840 | 3,302 | <issue_start>username_0: I have a question about PKCE (RFC 7636). OAuth clients that use the authorization code grant have two components: (1) the portion on the resource owner's device that initiates the authorization request and (2) a redirection endpoint on a server that can accept and send HTTPS messages.
The PKCE... |
2018/03/16 | 1,302 | 3,316 | <issue_start>username_0: I have a 1d vector and want to generate a matrix based on the pairwise comparison of the vector in TensorFlow. I need to compare each element in the vector to all the others (including itself), and if they are identical, the corresponding matrix value will be 1, and -1 otherwise. For example, t... |
2018/03/16 | 672 | 2,149 | <issue_start>username_0: This is the javascript to generate a random hex color:
```
'#'+(Math.random()*0xFFFFFF<<0).toString(16);
```
could anyone talk me through it?
I understand how the Math.random works (as well as the to String at the end), but I don't understand the syntax after that. Questions I have:
1. ... |
2018/03/16 | 792 | 3,334 | <issue_start>username_0: I have a view that shows the details of a specific conference (name, description, price, etc).
To show each info I use: `{{$conf->name}}, {{$conf->descrption}}, etc.`
But in the case of price, the conference don't have a price. Each conference can have many registration types. Each registrati... |
2018/03/16 | 1,012 | 3,735 | <issue_start>username_0: I am new to using templates with structures. My main goal is to have auto variable inside structure.
More importantly, I am using a library function of Funct.Methd(const auto, &Handler). Here as you can see, in the place of the first argument, I would like to pass (based on some criteria) any... |
2018/03/16 | 947 | 3,449 | <issue_start>username_0: I have code something like this.
```
new Vue({
el:'#app',
data:{
cars:[
{
name:'',
make:''
}
]
},
methods:{
addToArray(nameOfTheArray){ //here nameOfTheArray is the string "cars"
//so here I have to do something like this
this.cars.... |
2018/03/16 | 1,018 | 3,552 | <issue_start>username_0: I have a web application where I am querying an InterSystems Cachè database. The query is:
```
SELECT TOP 10 "x_med_orders"."bnf_chapter","x_active_inpatients"."ward","x_active_inpatients"."lnkpid", "x_med_orders"."drug_description", "x_med_orders"."start_date", "x_med_orders"."discontinue_dat... |
2018/03/16 | 879 | 3,237 | <issue_start>username_0: I want to show the fixed row as a last line in the scollable table. The row can be outside the table but fixed to the table and it should not scroll when user scoll's the table. I tried using below css code but couldn't fix the issue. The row highlighted in red color i want to make it fixed and... |
2018/03/16 | 1,494 | 4,348 | <issue_start>username_0: An example 404 URL:
`http://ip.address/static/admin/css/base.css`
I'm not sure what I did wrong. Here's the associated files:
settings.py
```
STATICFILES_DIRS = [
'/home/username/sitename/sitenameenv/lib/python3.5/site-packages/django/contrib/admin/static',
]
STATIC_URL = '/static/'
STATI... |
2018/03/16 | 324 | 1,157 | <issue_start>username_0: In this excample
```
std::shared_ptr ptr = new obj("old");
ptr.reset(new obj("new"));
```
the constructor of the `obj("new")` will called first, then the destructor of the `obj("old")` will be called.
Is there a way to destruct `obj("old")` first then construct `obj("new")` later? (other ... |
2018/03/16 | 589 | 1,831 | <issue_start>username_0: I have a want to save my python script's result into a txt file.
My python code
```
from selenium import webdriver
bro = r"D:\Developer\Software\Python\chromedriver.exe"
driver=webdriver.Chrome(bro)
duo=driver.get('http://www.lolduo.com')
body=driver.find_elements_by_tag_name('tr')
for post ... |
2018/03/16 | 837 | 2,984 | <issue_start>username_0: Lets say I have a function that query some table `company.workers`, for example (pseudo code):
```
def sql_query(dept, prof, hireDate):
q = """SELECT *
FROM company.workers
WHERE department = {0}
AND profession = {1}
AND hire_date > {2}""".... |
2018/03/16 | 871 | 3,244 | <issue_start>username_0: I started learning Swift few weeks ago and in one lesson (Arrays and for .. in loops) I had to make func that counts votes and gives an answer.
So I made this code thinking thats it but this error pops in -> "Type 'Bool' does not conform to protocol 'Sequence'"
here's the code:
```
func prin... |
2018/03/16 | 588 | 1,621 | <issue_start>username_0: Suppose I have the following DataFrame:
```
>>> df
val1 val2 val3
key
1 1 1 1
2 2 2 2
3 3 3 3
```
Now I want to select columns `val1`, `val2`, and (here's the kicker:) `val4`
```
>>> df[["val1", "val2", "val4"]]
KeyError: "['val4'] not in index"
```... |
2018/03/16 | 1,497 | 5,414 | <issue_start>username_0: I am trying to make a clicker game in HTML and JavaScript, and when I click the button to give me money, nothing happens. I tried printing it to the console, and it returned as NaN once, and once I clicked the button again, nothing happened. Here is the code:
```
[Click for Money](#)
Mon... |
2018/03/16 | 2,737 | 8,802 | <issue_start>username_0: I have this response with [httpie](https://github.com/jakubroztocil/httpie) when an user is logged:
```
chat-api$ http :3000/signup username=tomatito password=123
HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
ETag: W/"01df... |
2018/03/16 | 813 | 2,630 | <issue_start>username_0: I have a Raspberry Pi connected to a VPN via openvpn. Periodically, the connection drops, so I use the following script:
```sh
#!/bin/bash
ps -ef | grep -v grep | grep openvpn
if [ $? -eq 1 ] ; then
/sbin/shutdown -r now
fi
```
I added it to crontab (using `sudo crontab -e`), I want ... |
2018/03/16 | 326 | 1,021 | <issue_start>username_0: Why does the code below work (`&ds` is `12345678910`), but when I change `cats` to `cat`, `&ds` is just blank? I would expect changing `cats` to `cat` would mean `&ds` is `1 2 3 4 5 6 7 8 9 10`.
```
data new;
length ds $500;
ds = "";
do i = 1 to 10;
ds = cats(ds, i, " ");
end;
ca... |
2018/03/16 | 624 | 1,986 | <issue_start>username_0: I have two ArrayLists (list1 & list2). I would like to see if any 1 (or more) of the objects in list2(which are strings) occur in list1.
So, for some examples:
```
List list1 = Arrays.asList("ABCD", "EFGH", "IJKL", "QWER");
List list2 = Arrays.asList("ABCD", "1234");
//Should result in true, ... |
2018/03/16 | 869 | 2,695 | <issue_start>username_0: I have a scilab function that looks something like this (very simplified code just to get the concept of how it works):
```
function [A, S, Q]=myfunc(a)
A = a^2;
S = a+a+a;
if S > A then
Q = "Bigger";
else
Q = "Lower";
end
endfunction
```
And I get the expected resul... |
2018/03/16 | 650 | 2,155 | <issue_start>username_0: I would like to write a JavaScript library using ES6 modules to manage submodules.
I would also like to be able to use it in both front-end applications (with babel and webpack) and NodeJS back-end projects.
Is there a way to "build" the library, written with ES6 modules, in order to use it a... |
2018/03/16 | 1,818 | 4,815 | <issue_start>username_0: I am building an accordion three level menu. I have zero knowledge in writing this other than what I've read through blogs on this site and others and copied from existing accordions.
I was able to build a successful two level accordion but I cannot post two separate two level accordions on o... |
2018/03/16 | 780 | 2,215 | <issue_start>username_0: Suppose I have the following:
```
df = pd.DataFrame({'a':range(2), 'b':range(2), 'c':range(2), 'd':range(2)})
```
I'd like to "pop" two columns ('c' and 'd') off the dataframe, into a new dataframe, leaving 'a' and 'b' behind in the original df. The following does not work:
```
df2 = df.pop... |
2018/03/16 | 801 | 2,630 | <issue_start>username_0: I built a Union query in Access that takes results from two separate queries and joins them together. It's working fine but the results are not being grouped by Sales, Cost, and Profit, where I am trying to sum on those three fields.
Here is my code:
```
SELECT
Store,
count( [MASTER CREDIT ... |
2018/03/16 | 708 | 2,460 | <issue_start>username_0: So from what I have read/researched and applied in my programs I have not put any output specific methods in my classes. As in it is bad practice to do so.
For example for when creating a method I do this:
```
public string Greeting() {
return $"Hello {Name}"; //Name is a property of the cl... |
2018/03/16 | 1,491 | 5,010 | <issue_start>username_0: I am trying to map a .img file, and I am not sure why my code is not working.
Here is my code, and when I run the code I keep getting my error, that p is equal to MAP\_FAILED
```
int diskinfo(int argc, char* argv[]){
void *p;
char *size
if (argc < 2) {
printf("Please put ./... |
2018/03/16 | 998 | 3,490 | <issue_start>username_0: I want to move a NULL *std::unique\_ptr* to a *std::shared\_ptr*, like so:
```
std::unique_ptr test = nullptr;
std::shared\_ptr test2 = std::move(test);
```
As far as I know it should be legal to do so, and it does run fine in Visual Studio 2015 and GCC.
However, I can't do the same with a ... |
2018/03/16 | 2,114 | 5,020 | <issue_start>username_0: I'm trying to split a record by underscore. Originally it was about `_` and `.` as FS and only for the first column. But right now it appears that no splitting works at all?
```
cat test_file.tsv
mg.reads.per.gene_bcsZ_A1.tsv contig_21128 476
mg.reads.per.gene_bcsZ_A1.tsv contig_3712 ... |
2018/03/16 | 631 | 2,014 | <issue_start>username_0: I have a pdf file with multiple pages, but I am interested in only a subgroup of them.
For example, my original PDF has 30 pages and I want only the pages 10 to 16.
I tried using the function split\_pdf from tabulizer package, that only splits the pdf page to page (resulting in 200 files, one ... |
2018/03/16 | 2,244 | 6,712 | <issue_start>username_0: VScodeDebugGoAppEngine
======================
Hello World tutorial that shows how to setup VS Code to debug Golang App Engine code with Visual Studio (aka VScode )
This is using using the Helloworld code from AppEngine documentation:
```
go get -u -d github.com/directmeasure/VScodeDebugGoApp... |
2018/03/16 | 294 | 1,090 | <issue_start>username_0: ```
db.collection("accounts").findOne({Nickname: { $regex : new RegExp(player, "i") }}, function(err, result) { }
```
Is what I currently have, the problem is that I get everything that is a substring of the player variable. But I want only exact, albeit case-insensitive matches.<issue_commen... |
2018/03/16 | 2,028 | 4,079 | <issue_start>username_0: I want to scrape data from specific rows of [this table](https://www.n2yo.com/passes/?s=39090&a=1). I want the orange/gold rows only.
Previously, I used this code provided by SIM to scrape the whole table information and I manipulated it afterwards:
```
from selenium.webdriver import Chrome
f... |