date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/02 | 283 | 1,066 | <issue_start>username_0: I am trying to see if a certain file was created today. I am using Python. Does anyone have an idea on how the python code for this should be?
I did some research, and people suggested timedelta. However, I was confused on how to use this check whether its made today.
Would appreciate any h... |
2018/03/02 | 517 | 1,757 | <issue_start>username_0: I'm beginner at Haskell, for my homework I have to write fuctions in 2 versions: with and without using sectioning. One of this function should return True if argument is greater than 100, and False otherwise.
The function without sectioning works well:
```
f5 x | x>100 = True
| otherwi... |
2018/03/02 | 460 | 1,751 | <issue_start>username_0: My development environment on Windows includes substed folders, i.e. the folder **c:\MyBuild** may be substed to a drive letter, say **t:**
In a Ubuntu subsystem terminal, I can bind the folder to a mount, as this
```
sudo mount --bind /mnt/c/MyBuild /mnt/t
```
This works fine in the curre... |
2018/03/02 | 1,114 | 4,413 | <issue_start>username_0: I got interested in GA and want to do my own.
This is the task, I want to achieve:
I got a "world" 16x16 fields. I create 16 bots with random genes. Each gene is an array with 4 numbers from 1-19(16-19 will turn the bot direction and 1 - 15 is the amount of field the bot will go in a spec... |
2018/03/02 | 997 | 3,768 | <issue_start>username_0: I have the following function in a .NET Core 2.0 app.
```
public DataTable CallDb(string connStr, string sql)
{
var dt = new DataTable();
var da = new SqlDataAdapter(sql, connStr);
da.Fill(dt);
return dt;
}
```
How to convert it to an async function?
```
public async Task Ca... |
2018/03/02 | 1,996 | 5,623 | <issue_start>username_0: So I was able to create a 'flip-card' element; however, my issue is that I am trying to scale the entire element using transform: scale() so that about halfway through the rotation, I want the element to begin expanding to a bigger size/scale.
Just not sure if I use animations, multiple anima... |
2018/03/02 | 666 | 1,969 | <issue_start>username_0: I'm trying to add the Navbar.png as a background image to the navbar.
I have the image located in assets/img/navbar.png
I've tried everything and it won't show up! Any suggestions?
I tried adding the background image to other classes and tags but it doesn't show up for anything. What am I do... |
2018/03/02 | 1,106 | 4,080 | <issue_start>username_0: I am having trouble copying the contents of a `List` to `List`. These are defined as below:
**`List` is**:
```
public class TemplateSection
{
public string SectionName { get; set; }
public List MyTemplateItems { get; set; }
}
public class MyTemplateItem
{
public string ItemName { ge... |
2018/03/02 | 399 | 1,398 | <issue_start>username_0: I am trying to print a string one word per line using a loop. For example if the string is, 'I need practice', the string should print:
I'\n'
need'\n'
practice
My code so far looks like this:
```
phrase=input('enter a phrase: ')
for char in phrase:
print (char, end ='')
if char == ''... |
2018/03/02 | 1,081 | 2,569 | <issue_start>username_0: I have these two pandas dataframes I created and cleaned from online data, and I was trying to merge them based on their dates, which are all by month. However, the first dataset has its days on the last day of the month, whether the second dataset is based on the first day of the month.
```
... |
2018/03/02 | 994 | 2,545 | <issue_start>username_0: Been having trouble with figuring this one out. This is my first Scilab homework, so I'm still a novice.
Table 1 will convert °F to K
1. Request the user to input the number of elements you want in a vector. Call this variable “Increment1”.
2. Use the linspace function to create a vector fro... |
2018/03/02 | 229 | 1,000 | <issue_start>username_0: I have a super weird problem. I am building a program and I have distributed it after building in release mode (At least is says release mode on the top to the left of the local windows debugger button). However, when my users try to run it, it says that they need vcruntime140D.dll and crtbaseD... |
2018/03/02 | 370 | 1,383 | <issue_start>username_0: I have two different API endpoints. One returns a `Cards` object, the other an Array of `Cards` objects. What I want to do is get the first Card as the first element in the Array from the second endpoint. Is there any way to do that? Both are observables returned from `HTTPClient`, so maybe it ... |
2018/03/02 | 444 | 1,913 | <issue_start>username_0: I have a console application where the user currently has to click 'sign-in' to acquire a token for the Microsoft Graph application.
Is it possible to make this an 'auto login'?
I can see the AcquireTokenAsync method has a few overloads:
```
public static string GetAccessToken()
{
// Cr... |
2018/03/02 | 430 | 1,655 | <issue_start>username_0: I'm attempting to create a function over multiple lines. Parameters of the challenge: function returns 'barbarian' and only 2 characters per line. I keep trying to use a fat arrow to declare my function, but fat arrows don't seem to work if you don't have them connected.
My current work:
```
... |
2018/03/02 | 251 | 794 | <issue_start>username_0: I am using `readline` to read line-by-line from a file and want to detect the end of the file.
```
var fs = require('fs'),
var readline = require('readline');
var rd = readline.createInterface({
input: fs.createReadStream('/path/to/file'),
output: process.stdout,
console: false
});
rd.... |
2018/03/02 | 705 | 2,368 | <issue_start>username_0: Say I've got an `ArrayList` of size 500 and then I want to effectively concat strings with indexes (starting from 1): 1-100, 101-200, ..., 401-500 strings (so I want to get 5 strings instead of 500). I thought I could use `StringBuilder` and then use `.toString` but `.toString()` method of `Str... |
2018/03/02 | 776 | 3,150 | <issue_start>username_0: I am aware that we can read excel `.xls` file using following way
* OleDB : But we are not allowed to install OleDB driver on server.
* Interop : But we are not allowed to install MS Office on server.
* ExcelDataReader : 3rd party packages or DLL are not allowed to use.
We can use `FileStream... |
2018/03/02 | 628 | 1,808 | <issue_start>username_0: I was taking inspiration from this post <https://stackoverflow.com/a/16157433/3880362>. The only thing that it did not do was increment the value of each key as it was populated. I.e.
I have:
```
$Hash => {
'Val1' => 1,
'Val2' => 1,
'Val3' => 1
};
```
When I want
```
$H... |
2018/03/02 | 880 | 2,099 | <issue_start>username_0: Is there a way to get a negative number with binary assignment without the warning while preserving the other, more valid warnings. Or am I thinking about this wrong?
```
const NEG: i32 = 0b1000_0000_0000_0000_0000_0000_0000_0000;
// -2147483648
```
```none
warning: literal out of range ... |
2018/03/02 | 3,058 | 9,521 | <issue_start>username_0: Suppose I had an array:
```
[1, 8, 5, 6, 10, 9, 11, 12];
```
I want to sort it by ascending order, but find out the maximum groups I would need to sort. In this example, the answer would be:
```
[1], [8,5,6], [10,9], [11], [12]: so 5
```
[3, 2, 1] would come out to be 1 because the enti... |
2018/03/02 | 2,587 | 9,128 | <issue_start>username_0: How can I check the battery level of a connected bluetooth device? The device shows the battery level on Android so I'm assuming the device supports the [GATT-based Battery Service](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.battery_service.xml).... |
2018/03/02 | 2,451 | 8,630 | <issue_start>username_0: I see examples on the web where people have things like click events that they handle with function calls in the components themselves then change state directly by doing basic things like:
```
saveCourse(event) {
this.setState({saving: true});
}
```
I had thought that when using react-red... |
2018/03/02 | 1,214 | 4,765 | <issue_start>username_0: I am new to **JavaScript**. I see lot of places `return` and `render` being used just want to know what's the difference between them.<issue_comment>username_1: In react, render is a method that tell react what to display. return in a method or function is the output of the method or function.
... |
2018/03/02 | 1,142 | 4,201 | <issue_start>username_0: For my graduate thesis I need to create a dataset of poker actions to test models with. I wrote a function that reads a text file with [information about the hand](https://en.wikipedia.org/wiki/Hand_history) and returns a `list`, which I append to a pandas data frame.
I have about 1500 files a... |
2018/03/02 | 702 | 1,540 | <issue_start>username_0: This is probably a very basic question. But I have trouble figuring out the solution. So, I have 3 variables called `x`, `y` and `z`.
```
x<-c(0,0,1,1)
y<-c(21,0,3,NA)
z<-c(10,15,NA,12)
d<-data.frame(x,y,z)
```
Now I want to create a variable which takes the value `1` if any of the following... |
2018/03/02 | 489 | 1,326 | <issue_start>username_0: I know this will involve javascript and php.
I am trying to make a survey for a two week summer camp I'm running.
I need to limit the responses to the individuals involved (need to not be public), but I also need the individual responses to be anonymous within that scope. I would prefer it be m... |
2018/03/02 | 518 | 1,815 | <issue_start>username_0: There is a container component which holds an Image. This container is supposed to be **behind** text in a different container component. Both container components are at the same depth from Root element. Explaining the exact structure is a bit complicated.
The gist of the issue is that zIndex... |
2018/03/02 | 1,520 | 5,141 | <issue_start>username_0: Here is my first attempt at keeping track of whether the control key (`ctrl`) is being pressed while the mouse is over a :
```
...
```
That seems like it'd be extremely bad for performance, because every time the user moves the mouse, this code needs to fire. Ideally, there would be code t... |
2018/03/02 | 420 | 1,382 | <issue_start>username_0: I am confused on why it is displaying the original input and the reversed input together as one. I have played around with the
`word += input[i];`
part and still cannot figure it out. Any help?
```
var words = [];
function displayWords() {
$(".wordsView").empty();
for (var i = 0; i ... |
2018/03/02 | 374 | 1,186 | <issue_start>username_0: When saving a histogram like this:
```
x = randn(10000,1);
h = histogram(x)
saveas(gcf, 'test','epsc')
```
The resulting postscripts contains some form of raw
bitmap. That looks really ugly, when embedded in a pdf.
How can I save a histogram as a vector graphic?<issue_comment>username_1: I... |
2018/03/02 | 484 | 1,814 | <issue_start>username_0: I've been reading the Artifactory documentation and I'm struggling to understand how a workflow with Git LFS would work or why I would want to use Git LFS with it. Would you only use Git LFS with it if you want to selectively download full large files?
In my case I have a bunch of large files ... |
2018/03/02 | 1,331 | 4,781 | <issue_start>username_0: I've been stuck with this problem in python for some time now:
I need to create a list of methods inside a class that do almost the same thing but with different instance member variables.
So my first attempt is something like this:
```
from functools import partial
class Operations:
def... |
2018/03/02 | 1,525 | 5,769 | <issue_start>username_0: I am having a very hard time connecting all the documentation on django and django rest framework on how to create a view and serializer that allows for a foreign key.
edit:
I might have an answer here:
<http://www.django-rest-framework.org/api-guide/relations/#writable-nested-serializers>
... |
2018/03/02 | 824 | 2,896 | <issue_start>username_0: I have a very simple `vue` component I'm using that I want to pass information into via props. In the HTML it looks like:
```
```
The component looks like this:
```
Example Component
I'm an example component.
export default {
props: ['sourceKey', 'destinationKey'],
mounted() {
this... |
2018/03/02 | 336 | 1,406 | <issue_start>username_0: Can someone please point me in the right direction for listing all open issues that are in repos owned by the user? Thanks in advance.<issue_comment>username_1: I think I've figured it out. Please let me know if there's a more optimal answer.
```
query {
search(first: 100, type: ISSUE, query... |
2018/03/02 | 543 | 1,756 | <issue_start>username_0: I've written the python script below to convert hexadecimal to decimal.
It seems to work fine, at least as long as the hexadecimal has less then 8 characters .
What did I do wrong ? Tnx !
```
""" converts hexidecimal to decimal"""
def HextoDec (string):
ret = 0
for i in string :
... |
2018/03/02 | 748 | 2,549 | <issue_start>username_0: I have created a trait called Animal and two classes, Dog and Cat. Both Dog and Cat have companion classes that store the number of lives they have. My Cat object has 9 lives and my Dog object has 1 life. I want to add a function to the Animal trait called isAlive and implement there. The isAli... |
2018/03/02 | 226 | 813 | <issue_start>username_0: I just got started using react-native and I am seeing an issue with overflow property, from my research I came to know the android by default has overflow: 'hidden', How do I overcome this issue?<issue_comment>username_1: It is an open bug, not yet resolved. You can nenver have `overflow:'visib... |
2018/03/02 | 673 | 2,251 | <issue_start>username_0: In vim, neovim, when getting listings of mappings (eg :map), or when looking at self-defined or system defined variables (:let or :set), the results are display in a 'more' pager window.
There is probably some dim-recesses-of-time reason why (in vim) 'more' is used to display data - not vim. ... |
2018/03/02 | 796 | 2,799 | <issue_start>username_0: I'm new to Java and seem to be struggling with switch statements. It all looks correct to me, can't figure it out. All help is deeply appreciated.
```
public static String chooseMedicine()
{
System.out.println("Choose a medicine to prescribe for the patient.");
int medi... |
2018/03/02 | 462 | 1,635 | <issue_start>username_0: I can do this:
```
$.ajax({
type: "GET",
async: true,
url: '/someurl/',
dataType: 'json',
success: function (data) {
console.log(data);
}
});
```
Web:
```
Route::get('/someurl','MyController@myfunction');
```
And it works ju... |
2018/03/02 | 636 | 2,703 | <issue_start>username_0: I am, for the first time, implementing file uploads using S3 (in this case specifically user profile avatar images) using [Flysystem](https://flysystem.thephpleague.com/). I'm currently at the point where I have created an S3 bucket, and a user can upload an image, which is then visible online ... |
2018/03/02 | 684 | 1,588 | <issue_start>username_0: It is been a while since last time I used grep and I could use some help.
Here is what I am trying to do. For an out as the following:
```
('Predicted:', [(u'n02504458', u'African_elephant', 0.99588591), (u'n01871265', u'tusker', 0.004068926), (u'n02504013', u'Indian_elephant', 4.499541e-05)... |
2018/03/02 | 5,298 | 16,775 | <issue_start>username_0: In a project I'm trying to use the WebUSB API available in Chrome to print using a Zebra LP2844 printer.
I succeeded on OSX without issues and eventually on Ubuntu and on ChromeOS thanks to [this post](https://stackoverflow.com/questions/47695160/failed-to-claim-interface-0-device-or-resource-... |
2018/03/02 | 832 | 2,645 | <issue_start>username_0: Im writing a cordova app and need to isolate these google phones to adjust styling
given this:
[](https://i.stack.imgur.com/5CTTe.png)
Im struggling to differentiate between any of the Google Pixel Phones.
```
@media only ... |
2018/03/02 | 685 | 2,801 | <issue_start>username_0: I have a function to go out from account:
```
exports.logout = function(req,res){
req.session.destroy( err => {
if(err)
console.log(err);
res.redirect("/login");
});
};
```
To use socket.io and express together I have a middleware:
```
io.use(function(so... |
2018/03/02 | 585 | 2,342 | <issue_start>username_0: How do I pass one `data-attribute` value to another?
I have the following input:
```
```
Where I need to transfer the value of `data-price-package-value-id-0` to the following element:
```
-
```
[Image Preview](https://i.stack.imgur.com/CP9VW.png)
Here's the JavaScript I have so far:
... |
2018/03/02 | 1,026 | 3,986 | <issue_start>username_0: Yeah i kinda didn't know how to type the title well...
I've a node server which recives an image via post form. I then want to send this image to Microsoft vision and the same Google service in order to gether information from both, do some stuff, and return a result to the user that has access... |
2018/03/02 | 1,324 | 3,981 | <issue_start>username_0: Currently, I have a table that is storing historical data in the following fashion. I have no control over this server or how the data is stored.
```
ID | FName | LName |Stuff| More
--------+---------+---------+-----+------
1,2,3,4 | j,p,g,r | l,m,h,s | ,,, | a,,b,
```
I need to ... |
2018/03/02 | 1,331 | 4,649 | <issue_start>username_0: ```
If trigger = "Reconcile" Then
If InStr(XXlist, checkmi) > 0 Then
If checkmi = "XX1000" Then
a = a + 1
Call XX1000Check(location, a, checkmi)
End If
If checkmi = "XX1001" Then
Call XX1001Check(location, checkmi)
... |
2018/03/02 | 707 | 2,727 | <issue_start>username_0: Here is my sample document structure
{
```
id: "abc"
config: [
{
feature_id: f1,
properties: [
{
id: 1
todo: "check the microwave"
}
{
id: 2
... |
2018/03/02 | 766 | 2,698 | <issue_start>username_0: I'm trying to implement photo slider in the wordpress in a local host machine according to the following code:
<https://github.com/devfreelex/sliderdevmean>
and the video
<https://www.youtube.com/watch?v=_nSPiKWWmhs>
the issue is the following:
in the index page I have the html code:
```
... |
2018/03/02 | 787 | 2,654 | <issue_start>username_0: I'm writing a Vue app that uses vue-apollo to interact with graphql. I'm wondering if it's possible to stub the graphql requests. I thought this should work:
```
it('should access a story', function() {
cy.server();
cy.route('http://localhost:3002/graphql', {
data: {
St... |
2018/03/02 | 810 | 2,726 | <issue_start>username_0: I am trying Django for an upcoming project and going through a tutorial and running into issue with defining URL paths. Below is the project structure showing the urls.py at the project root.
The ***urls.py*** in my ***timer*** package is pretty simple:
```
from django.urls import path
from .... |
2018/03/02 | 797 | 2,658 | <issue_start>username_0: I am trying to run GNU Make on a Makefile say Makefile1 that includes another Makefile2. Here is how Makefile1 looks like
```
include absolute_path to Makefile2
target_from_Makefile2: Dependencies
run_target_from_Makefile2
```
and here is how Makefile2 looks like
```
run_targ... |
2018/03/02 | 295 | 1,233 | <issue_start>username_0: I am developing a Spark-Kafka Streaming program where i need to capture the kafka partition offsets, inorder to handle failure scenarios.
Most of the devs are using Hbase as a storage for offsets, but how would it be if i use a file on hdfs or local disk to store offsets which is simple and ea... |
2018/03/02 | 859 | 3,065 | <issue_start>username_0: I'm trying to perform an AJAX post but I keep getting a null FromBody in my .NET controller. I think it has to do with how I'm formatting my AJAX post.
When I attempt to post with AJAX I get a null FromBody.
```
var data = {
Date: "2016-12-01",
BurnIdx: 23,
BurnStatIdx1: 3,
... |
2018/03/02 | 605 | 2,595 | <issue_start>username_0: I've found some strange behavior. If SelectedItem is SettingsItem then cannot deselect it from code
XAML:
```cs
```
CS:
```
private void Button_Click(object sender, RoutedEventArgs e)
{
nv.SelectedItem = null;
}
```
And that is all. I don't understand why code doesn't work for Settin... |
2018/03/02 | 459 | 1,183 | <issue_start>username_0: I have an array like so:
```
const r1 = 1.5;
const r4 = 2.7;
const r5 = 5.8;
const r6 = [r1, r4, r5];
document.write(r6);
```
And I need to add the following elements at the end of the array `r6`: `1` `2` `3` `4` `5` `6` `7` `8` `9` `10` .... up to `101` by using For Loop and print this out ... |
2018/03/02 | 443 | 1,429 | <issue_start>username_0: i hopte that someone will helpe me.
This will sound ridiculously, but i trying to solve this problem for 2-3 days...
I want my footer on the bottom of the page.
If i have little content i want my footer on bottom of the screen, but if there is many content i want my footer on the bottom of the ... |
2018/03/02 | 1,236 | 3,858 | <issue_start>username_0: Here is how my dataset looks like:
```
Name | Country
---------------
Alex | USA
Tony | DEU
Alex | GBR
Alex | USA
```
I am trying to get something like this out, essentially grouping and counting:
```
Name | Country
---------------
Alex | {USA:2,GBR:1}
Tony | {DEU:1}
```
Works, but slow o... |
2018/03/02 | 254 | 820 | <issue_start>username_0: I am searching for a keyword using SQL server and Regex Functionality.
we have a data like leaky gas, leaked gas, and leaking gas.
```
SELECT [Text field]
FROM [Global database]
text field is like '%leak[a-z]{1,3} gas%'
```<issue_comment>username_1: SQL Server does not support regular exp... |
2018/03/02 | 978 | 3,548 | <issue_start>username_0: I have an issue where I need a vector of const char\* but for some reason whenever I try adding something nothing happens. Here is the code sample in question.
```
std::vector getArgsFromFile(char\* arg) {
std::ifstream argsFile(arg);
std::vector args;
while (!argsFile.eof()) {
std::string... |
2018/03/02 | 1,569 | 4,866 | <issue_start>username_0: I am getting an error of Negative dimension size when I am keeping height and width of the input image anything below 362X362. I am surprised because this error is generally caused because of wrong input dimensions. I did not find any reason why number or rows and columns can cause an error. Be... |
2018/03/02 | 417 | 1,464 | <issue_start>username_0: I would like a link to select a specific option of a select statement without having to select it first. Just to be clear, I am not trying to have one button/link trigger whichever option has been selected before, I want multiple links trigger one select option each as an alternative to using t... |
2018/03/02 | 651 | 2,572 | <issue_start>username_0: ```
from sklearn.model_selection import train_test_split
```
I have a question about the train\_test\_split function from sklearn. First, why do we split the data??? and were do we get the testing data from. Do we just chop the data in half and use some of it to train and some of it to test??... |
2018/03/02 | 640 | 2,447 | <issue_start>username_0: how do I use python to find the natural log of a user's input?
```
import math
def log_e(power_of_e):
math.log = power_of_e
exponent = math.log
return exponent
my_number = float(input('Enter a number and I will give you it\'s natural logarithm:'))
print (log_e(my_number))
```<is... |
2018/03/02 | 446 | 1,605 | <issue_start>username_0: I'm working on an operating system related project now and there is one step which requires to check whether a hexadecimal number starts with `3` or not, using C.
Currently my idea is to convert that hexadecimal number into a string and check the initial character but just cannot find out any... |
2018/03/02 | 844 | 2,320 | <issue_start>username_0: I have a dataset with clicks and impressions, I aggregated them by the day of week using groupby and agg
```
df2=df.groupby('day_of_week',as_index=False, sort=True, group_keys=True).agg({'Clicks':'sum','Impressions':'sum'})
```
Then I was trying to plot them out using subplot
```
f, axes = ... |
2018/03/02 | 1,138 | 4,162 | <issue_start>username_0: I am trying to use inversify with typescript and node.js. I am currently using node.js version 6.9.1, typescript version 2.6.2, and ECMAScript 6. When I try to run the node.js application, I keep receiving the following error, "TypeError: Reflect.hasOwnMetadata is not a function".
Following do... |
2018/03/02 | 308 | 1,111 | <issue_start>username_0: How would one go about proving/disproving the language {⟨A⟩∣A is an NFA and L(A)={0,1}∗}
is/isn't decidable?
I assumed at first since it was an NFA involved it would be decidable, but since there is no input string to simulate does this change things? If so, how? I can't think of a turing mach... |
2018/03/02 | 2,670 | 7,089 | <issue_start>username_0: I am trying to pull out images from a webpage using:
Python 2.7 + Selenium (using FireFox) + Beautiful Soup.
The page loads dynamically, hence, I'm using Selenium for screen scraping. Everything looks great on the front end, however, when all the images I loaded, and I look at the HTML, I can'... |
2018/03/03 | 1,993 | 6,529 | <issue_start>username_0: I feel certain it must be possible to use SFINAE (possibly with Macros) to static\_assert() that arbitary code will *not* compile.
There are some complex cases in my code-base, where i have a class that I want to forbid taking temporaries (I believe the pattern is):
```
class(const class&& tm... |
2018/03/03 | 230 | 756 | <issue_start>username_0: I have been unable to write a working ERC 721 contract.Can someone help me with a sample ERC 721 contract that works? I have been learning for about a week now and I haven't made much progress.<issue_comment>username_1: I found the answer [here](https://ethereum.stackexchange.com/a/41545/33731)... |
2018/03/03 | 282 | 1,029 | <issue_start>username_0: I'm developing a WebExtension compatible with chrome and FF, but in firefox I'm not able to see the variables or functions of the content scripts in the console.
In chrome you can change the scope of the console to see what your extension sees.
Is there a workaround in firefox to be able to d... |
2018/03/03 | 302 | 1,287 | <issue_start>username_0: I have the following Parent Component that contains several Child components:
```
class Parent extends React.Component {
render() {
}
}
```
I want to have pagination in the Parent class that shows maximum 3 Child components per 'page'. Is there a way to do that without a complex backe... |
2018/03/03 | 1,475 | 5,602 | <issue_start>username_0: I've been reading some Haskell code and keep seeing functions that look something like this:
```
ok :: a -> Result i w e a
ok a =
Result $ \i w _ good ->
good i w a
```
Why is a lambda used? Why wouldn't you just write the following?:
```
ok :: a -> Result i w e a
ok a =
Res... |
2018/03/03 | 436 | 1,527 | <issue_start>username_0: I have a function inside an object inside a Class.
The object of the class is initialized and I want to call the function, but the function need a variable defined on the constructor of the Class.
```js
class someClass {
constructor() {
this.foo = "bar";
this.print = {
va... |
2018/03/03 | 285 | 959 | <issue_start>username_0: In the following example, how to I make the opacity of "blue" to be 1?
```html
My mother has
blue
eyes and my father has
dark green eyes.
```<issue_comment>username_1: Something like this maybe?
```html
class someClass {
constructor() {
let that = this;
this.foo = "bar";
... |
2018/03/03 | 1,696 | 5,745 | <issue_start>username_0: I drew a canvas with consecutive rectangles each with it's own linear-gradient, but I am unable to make the linear-gradient show up on the rectangles except in the first rectangle. Each rectangle is the same size and every rectangle should have the same linear gradient. I was able to make only ... |
2018/03/03 | 932 | 2,978 | <issue_start>username_0: I am running a 'just in time' webinar, where the webinar will be shown every '15, '30,' 45 and '60 past the hour.
I have a countdown timer configured to count down to the next quarter hour, but I also want the text to display something like:
'Next Webinar at 10:15AM'
At the moment, the text... |
2018/03/03 | 962 | 3,526 | <issue_start>username_0: I have a button click command in Katalon Studio where I use scrollIntoView to bring a button into view and then click the button.
```
((JavascriptExecutor) functiondriver).executeScript("arguments[0].scrollIntoView({block: \"nearest\"});", buttonelement);
WebUI.delay(4)
WebUI.click(findTes... |
2018/03/03 | 981 | 3,928 | <issue_start>username_0: I am having trouble trying to understand the Kubernetes authentication model, specially what "users" are.
Suppose I am on a computer, which is inside a kubernetes cluster. I want to do a request to the API server, using `kubectl`.
So:
- I need to have the public key from the api-server HTTPS ... |
2018/03/03 | 9,338 | 19,064 | <issue_start>username_0: Simple implementations of `acosf()` can easily achieve an error bound of 1.5 ulp with respect to the infinitely precise (mathematical) result, if the platform has support for fused multiply-add (FMA). This means results never differ by more than one ulp from the correctly rounded result in roun... |
2018/03/03 | 520 | 1,968 | <issue_start>username_0: Note I am aware that this is a bad practice. I am just trying to learn how JS works.
I added a function under `Number.prototype`:
```
Number.prototype.times = function(f){
for(let i=0; i
```
and try to invoke it by:
```
3.times( ()=>console.log("Hello") ) //ERROR AS EXPECT... |
2018/03/03 | 559 | 1,875 | <issue_start>username_0: I have been attempting to load a webpage in iOS to no avail. I have used the same code on other view controllers in the project but all it shows for this page is the blank white screen. Here is my code:
```
import UIKit
import WebKit
class FirstViewController: UIViewController {
@IBOutle... |
2018/03/03 | 1,614 | 6,273 | <issue_start>username_0: I'm developing an android app that reads data from API then show these data in multi-choice dialog. However, when I click the button the dialog is empty. I think that maybe the program executes the next lines of code before volley returns the response. I searched a lot but I didn't understand h... |
2018/03/03 | 1,859 | 8,234 | <issue_start>username_0: I'm trying to test my spring OAuth2 authorization and authentication in my spring boot application using spring's MockMvc class. The fundamental issue I'm facing is the fact that my custom authentication provider is never called even if I have registered it as one of the authentication provider... |
2018/03/03 | 4,668 | 9,876 | <issue_start>username_0: I have **dataset1** which has two columns `ID` and `Application_SubmittedDate`. The Application\_SubmittedDate column is a date/time column.
```
ID Application_SubmittedDate
6972 2001-05-30 16:57:00
6972 2003-03-08 12:30:00
6972 2006-03-22 17:43... |
2018/03/03 | 1,190 | 4,187 | <issue_start>username_0: Given such a binary number, I would like to access each element in the number.
For example, I use the following code to access the 3rd element:
```
bin(125) # '0b1111101'
bin(125)[::-1][3]
```
Yes, it works. But I am not sure whether this is a good way or not. It looks dangerous and I wonder... |
2018/03/03 | 1,231 | 4,418 | <issue_start>username_0: I have a query like this
```
select house, street, town, 10 as weight
from addresses
where
house match query,
street match query,
city match query
union all
select house, street, town, 5
from addresses
where
street match query,
city match query
```
And I want the ... |
2018/03/03 | 1,380 | 4,611 | <issue_start>username_0: I am looking for a way to alter an objects attribute depending upon a value parsed to a method. For example:
```
class Character(object):
def __init__(self, hp, mp, st, ag):
self.hp = hp
self.mp = mp
self.st = st
self.ag = ag
def increase_stat(self, sta... |
2018/03/03 | 1,091 | 3,451 | <issue_start>username_0: Let say I have a very simple class with a date field like the following. How can I create its object?
```
import java.util.Date;
public class Test {
public Test(Date date) {
System.out.println("The date is " + date);
}
public static void main(String[] args) {
Test t1 =... |
2018/03/03 | 867 | 2,717 | <issue_start>username_0: I am trying to do a simple date difference calculation that returns a Year and Month value. The code the I have now is:
```
Private Sub Form_AfterUpdate()
Dim IntegerYears As Long
Dim IntegerMonths As Long
IntegerYears = DateDiff("yyyy", Me.DeemedFilingDate, Now())
IntegerMonths = DateDif... |
2018/03/03 | 514 | 1,774 | <issue_start>username_0: I have enabled azure web authentication in my web application and when unauthenticated users tried to access it, azure redirects it to `https://example.azurewebsites.net/.auth/login/aad/callback` page and shows the message "You do not have permission to view this directory or page."
For non-a... |
2018/03/03 | 800 | 2,908 | <issue_start>username_0: I'm working with `node-red`, on boilerplate IBM cloud. I know that there is a way, changing the value of enviroments variables(NODE\_RED\_USERNAME and NODE\_RED\_PASSWORD), to change username and password of the editor flow. But, what about UI dashboard? I mean using dashboard nodes. Forbid acc... |
2018/03/03 | 1,379 | 3,833 | <issue_start>username_0: I have a list of actors:
```
name <- c('<NAME>','<NAME>','<NAME>')
age <- c(26 , 32, 56)
postcode <- c('4011', '5600', '7700')
actors <- data.frame(name, age, postcode)
name age postcode
1 <NAME> 26 4011
2 <NAME> 32 5600
3 Jolie Hope 56 7700
```
I also have an edge ... |
2018/03/03 | 1,558 | 4,501 | <issue_start>username_0: I have a dataframe like so:
```
ID | Node 1 | Node 2 | Node 3
a | 1 | 0 | 1
b | 0 | 1 | 1
c | 1 | 0 | 0
d | 1 | 1 | 1
e | 0 | 1 | 1
```
I want to change it so that I can turn it into a network chart, where connections bet... |
2018/03/03 | 904 | 2,754 | <issue_start>username_0: Hello I wanted to ask how to retrieve the last value in a jsonPath
```
{
"testing": [
{
"transactionId": "5a99dcf84b7f633a5489805d",
"trackingId": "555112",
"tn": "6095555112",
"customerName": "John",
"customerLastName": "... |