date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/09 | 426 | 1,385 | <issue_start>username_0: I am trying to show the one line sentence followed by three dots (...) if the range goes beyond the line size.
I have used the below CSS which works fine on Mozilla and Chrome but does not work on IE 11.
```
display: block;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 20px;
```
... |
2018/03/09 | 678 | 1,370 | <issue_start>username_0: I have 2 lists:
```
xs = [[0.6666666865348816, 0.800000011920929, 0.800000011920929, 0.5333333611488342, 0.5333333611488342],
[0.6428571343421936, 0.7142857313156128, 0.7333333492279053, 0.5714285969734192, 0.5714285969734192],
[0.6666666865348816, 0.8666666746139526, 0.7333333492279053,... |
2018/03/09 | 704 | 2,705 | <issue_start>username_0: I am trying to upload a pdf file and an image in php mysql but it seems that the move\_uploaded\_file function can only work with one file. I have tried to make it work with both files but it doesn't seem to me working. It moves just the images to the target folder and adds both image name and ... |
2018/03/09 | 408 | 1,888 | <issue_start>username_0: 1. There is a master branch with code from last release.
2. There is a dev branch.
3. Developers will create a new branch locally and work on feature branch.
4. They will write unit tests on their feature branch, if everything works well, they will send a pull request to dev branch.
5. The pull... |
2018/03/09 | 1,496 | 5,163 | <issue_start>username_0: I'm trying to develop a function in a library that looks for the caracters '<', '>' and '&'; and substitutes them for `<`, `>` and `&`.
So far, I've developed this function:
```
char *sXMLspecialReplace(char *rawString) {
char *old_pointer = rawString;
int new_index = 0;
/*In most cases... |
2018/03/09 | 329 | 1,347 | <issue_start>username_0: I want to know what is the best way to develop a website in MODX but using GIT in team.
How I understand everything, MODX saves the template, chunk, snippets and also other stuff directly to the DB and if a Team member who works on the same project, makes changes inside MODX manager those chan... |
2018/03/09 | 615 | 2,351 | <issue_start>username_0: My html code like this :
```
\* Name
\* Address
```
I'm using `required` HTML5 attribute to validate fields.
If user does not input text, it will display HTML5 error.
I want to disable the submit button if any of the required fields are left empty.
How can I do it?<issue_comment>usern... |
2018/03/09 | 838 | 3,039 | <issue_start>username_0: I am looking at this <https://github.com/lorenwest/node-config>, and it seems to do everything I need. However I am wondering if it's possible to specify multiple config files based on their categories.
Is this possible to do this?
```
./config
default-aws.json or aws-default.json
prod... |
2018/03/09 | 518 | 2,276 | <issue_start>username_0: I want to store some data in the database. Then using those data I will answer the queries for the user using Dialog flow.
Any idea on implementing these<issue_comment>username_1: You will need to use a webhook to do [fulfillment](https://dialogflow.com/docs/fulfillment). In your webhook, you ... |
2018/03/09 | 944 | 3,297 | <issue_start>username_0: I am sending a POST request to an API, Curl returns 200 and the correct response.
When Implementing with GuzzleHttp\Client, I get a 400 Bad request, what is wrong with my formatting.
here is my code using Laravel Returns 400 Bad Request:
```
$client = new Client();
$URI = 'http://api.exampl... |
2018/03/09 | 2,101 | 5,586 | <issue_start>username_0: I need to display sub-sub-menu on hover of my sub-menu. So far I did code to display menu -> sub-menu on menu click, but to proceed I want a functionality to display sub-sub-menu on hover of my sub-menu. Can somebody help me to achieve the same?
```js
var ddmenuitem = 0;
function jsddm_open(... |
2018/03/09 | 2,746 | 8,591 | <issue_start>username_0: I have been using a Microservices architecture for develop my software, and I have running my services using Docker Compose, but my problem is when the new services were created I have to add them into the docker-compose.yml, and then I got about 200+ hundred lines of code inside the docker-com... |
2018/03/09 | 1,963 | 7,909 | <issue_start>username_0: Given the input array.
```
let data = [
{
name: 'Name',
countries: [
{
name: 'Country1',
competitions: [
{
name: 'Competition1',
matches: [
{ details: 'details' },
{ details: '... |
2018/03/09 | 1,275 | 4,480 | <issue_start>username_0: I am using angular 5.I want to show my rating number into star rating. How can i do this? I saw alot of tutorials for star rating, but they only worked when a user gave them rating. I just only want my number to show as star rating of a user. Here what i am doing.
app.component.html
```
i... |
2018/03/09 | 1,060 | 3,716 | <issue_start>username_0: I am struggling to insert the records from my table1 to my table2. They have similar structure but some columns are different. For example they would be like:
```
Table1:
|A|B|C|D|E|F|
Table2:
|A|C|E|F|
```
Now what I want to do is take the data from table 1 and insert only the matching fie... |
2018/03/09 | 973 | 2,587 | <issue_start>username_0: I have a dataframe like this
[](https://i.stack.imgur.com/UoVRP.png)
and when I apply a function on it like this
median = Top15['% Renewable'].median(axis=0)
```
def func(Top15):
if (Top15['% Renewable'] >= median):
... |
2018/03/09 | 592 | 2,189 | <issue_start>username_0: I need to call a bash Script Out of my Python Script.
```
import subprocess
subprocess.call("path/to/script.sh")
```
This is working, but the Script is starting another programm and therefore wont Exit. So my main Loop is blocked by the subprocess.
Is there a way to call the Script as Thr... |
2018/03/09 | 853 | 3,082 | <issue_start>username_0: How can I compare two the same types against each other in JavaScript?
So `a == b` should return *true*, because they are both `arrays`.
So it doens't matter what the contents of the variable are. The comparison should be something like this;
```
var a = [];
var b = [];
var c = "this is a s... |
2018/03/09 | 1,270 | 4,783 | <issue_start>username_0: I want to add shadow for the line in my chart.
My code is like so
```
import { Line } from 'vue-chartjs'
import Chart from 'chart.js'
let draw = Chart.controllers.line = Chart.controllers.line.extend({
draw: function() {
let ctx = this.chart.chart.ctx;
ctx... |
2018/03/09 | 118 | 422 | <issue_start>username_0: We can comment multiple line in xml using below,
```
```
Can anyone please let me know if we can do this using a shortcut in Eclipse (Neon 4.6.1). If yes what is this shortcut ?<issue_comment>username_1: For commenting multiple lines, you can use
Ctrl + Shift + /
Upvotes: 1 <issue_comment>u... |
2018/03/09 | 151 | 529 | <issue_start>username_0: I would like to do something like this in TypeScript:
```
public wait(element){
var EC = protractor.ExpectedConditions;
browser.wait(EC.visibilityOf(element), 5000);
}
```
but I get the message "[ts] Property 'element' does not exist on type 'BasePage'"
How to do this better?<issue_c... |
2018/03/09 | 1,140 | 2,819 | <issue_start>username_0: I have the method
```
double TrainingSession::CalcCalorieBurnGross()
{
int VO2_max = 48, seconds, H, t1, t2, t3;
std::string text;
std::ifstream hrdata("hrdata.txt");
std::getline(hrdata, text);
while(std::getline(hrdata, text))
{ // while running through each line of the text
... |
2018/03/09 | 879 | 2,820 | <issue_start>username_0: It's a very basic question, I would just like to understand a little better how this operator actually works.
This code is taking a number from the user and then getting the sum of the individual digits:
```
Console.WriteLine("Please enter a number: ");
int number = Convert.ToInt32(Console.R... |
2018/03/09 | 825 | 2,756 | <issue_start>username_0: I have Video and Playlist models. To boost the process of displaying a thumbnail for the Playlist - I've made a column named 'thumbnail'. I would like it to be updated anytime when playlist is updated (because there's a lot of such situations in different parts of my app), so I tried to use cal... |
2018/03/09 | 312 | 975 | <issue_start>username_0: I have two numpy arrays with floating point values and I am trying to find the indices where the numbers are approximately equal (floating point comparisons).
So something like:
```
x = np.random.rand(3)
y = np.random.rand(3)
x[2] = y[2]
# Do the comparison and it should return 2 as the ind... |
2018/03/09 | 596 | 2,358 | <issue_start>username_0: I've read a lot of C++ and Java code of machine learning where each hidden layer is called inside a for loop. Why is the pattern *Chain of Responsability* never used ? What is its disavantages ?
-Classic approach:
```
std::vector layers(10);
for(Layer& hidden : layers)
hidden.activation();
... |
2018/03/09 | 228 | 797 | <issue_start>username_0: we are using the carousel with some HTML markup (not images). We need to turn off the indicators, but `[showIndicators]="false"` does not hide them.
We have tried passing in a `bool variable`, a hard coded `false`, etc. We even tried to hide the indicators with external CSS, but the indicator... |
2018/03/09 | 2,635 | 8,356 | <issue_start>username_0: The `hypot` function, introduced into C in the 1999 revision of the language, calculates the hypotenuse of a right triangle given the other sides as arguments, but with care taken to avoid the over/underflow which would result from the naive implementation as
```
double hypot(double a, double... |
2018/03/09 | 1,449 | 4,865 | <issue_start>username_0: I have a Spring-boot application which throws an ArrayIndexOutOfBoundsException during context initialization. This happens somewhere deep in the bowels of Spring.
I've located the cause to `ConfigurationClassParser`, method `processDeferredImportSelectors`, line 547:
```
String[] imports =... |
2018/03/09 | 502 | 1,842 | <issue_start>username_0: I'm trying to discover how Java manages memory.
I'm learning which part of memory holds static methods and static variables. They said PermGen memory holds static variables and static methods, which is a part of non-heap memory(picture below).
[
```
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
a1 b1 d1 d2 d3 d4 d5 na na e2
a1 b2 d2 d4 d1 e2 na e1 na na
a1 b3 d5 d3 d1 d4 na na e1 e2
a2 c1 e1 e2 na e3 na d2 d1 d4
a2 c2 d2 d4 d... |
2018/03/09 | 514 | 1,688 | <issue_start>username_0: I am trying to add a column to DataFrame depending on whether column value is in another column as follow:
```
df = df.withColumn('new_column', when(df['color']=='blue' | df['color']=='green', 'A').otherwise('WD'))
```
after running the code I obtain the following error:
```
Py4JError: An e... |
2018/03/09 | 982 | 3,475 | <issue_start>username_0: In our application, the Active MQ failover url looks like this:
```
failover:(tcp://localhost:9125?useInactivityMonitor=false&wireFormat.maxInactivityDuration=0,tcp://localhost:9126?useInactivityMonitor=false&wireFormat.maxInactivityDuration=0)?randomize=true
```
The app tries to connect to... |
2018/03/09 | 596 | 2,456 | <issue_start>username_0: is there any way to store dynamic variable on session?
i tried this way
```
public dynamic MSG
{
get
{
var obj = _context.HttpContext.Session.GetString("MSG");
return string.IsNullOrEmpty(obj) ? null : JsonConvert.DeserializeObject(obj);
}
set
{
if (value == null)... |
2018/03/09 | 636 | 1,708 | <issue_start>username_0: I would like to get max values from subarrays in array1 array.
```
var array1 = [[4, 2, 7, 1], [20, 70, 40, 90], [1, 2, 0]];
let one = array1.slice(0,1);
let two = array1.slice(1,2);
let three = array1.slice(2,3);
console.log(one);
console.log(two);
console.log(three);
```
in result I ha... |
2018/03/09 | 736 | 2,360 | <issue_start>username_0: I am using `shiny` in R and want to render more than once when using `observeEvent` in server.R
I don't understand why this does not work:
```
library(shiny)
my_UI <- fluidPage(
fluidRow(actionButton("test", "test")),
fluidRow(textOutput("out"))
)
my_Server <- function(input, output) {
... |
2018/03/09 | 754 | 2,439 | <issue_start>username_0: First of all I didn't know anything about the potential existence of such file in the context of an Angular 5+ Project. I have a running Angular 5 project which doesn't have this manifest.json file in it. I decided to add [service worker](https://angular.io/guide/service-worker-intro) facility ... |
2018/03/09 | 432 | 1,619 | <issue_start>username_0: I have one option disabled in select tag
```
Status
Select Status
Reinitiated
Suspended
Terminated
Resigned
Status is required
```
I have tried to the below to fetch the value of disabled option
```
inputvalue = $('#employee_status option[disabled]:selected').val();
```... |
2018/03/09 | 1,649 | 6,067 | <issue_start>username_0: On a private repository from gitlab, when I run `git clone git@git.privateserver.local:group/project-submodule.git` the clone completes successfully.
As part of the cloning process, **I'm asked** for the passphrase of my private key.
When I run
`submodule update --init "group/project-submod... |
2018/03/09 | 1,703 | 4,226 | <issue_start>username_0: I want to extract strings with labels from text data in python.I have written following code written , but this replaces the actual data with the string , i want to extract that
```
import re
def replace_entities(example):
# dd mm yyyy
example = re.sub("(\d{1,31}(:? |\-|\/)\d{1,12}(:? |\... |
2018/03/09 | 1,018 | 3,116 | <issue_start>username_0: How can I Select distinct [Case Owner], [Case Number] from the following query?
```
WITH RandomCaseNum AS
(
SELECT [Date/Time Closed]
,[Case Owner]
,[Case Number]
,ROW_NUMBER(... |
2018/03/09 | 532 | 2,057 | <issue_start>username_0: I have an EditText and I want to when a user typed a non-digit character except `,` the edittext delete that character `.` for example I want editText to accept text like this: 5451,56589,7545
and when the user typed a non-digit character like 454d54 the "d" character was deleted and just 45... |
2018/03/09 | 286 | 1,050 | <issue_start>username_0: I have several input fields (number), being the last one (disabled) the result of they're sum or subtraction. All of them have currency mask, including the total field. The issue is that when filling them, the total field won't assume the decimals, only if I enabling it, type a number. Then the... |
2018/03/09 | 363 | 1,209 | <issue_start>username_0: when exiting application developed under Qt, I am getting following error:
```
file:///C:/Qt/5.10.0/mingw53_32/qml/QtQuick/Controls/Private/Control.qml:90:
ReferenceError: parent is not defined
```
from component defined as simply as this:
```
import QtQuick 2.8
import QtGraphicalEffects 1.... |
2018/03/09 | 872 | 2,326 | <issue_start>username_0: I want to format the Time.Now function to show YYYY-MM-DD HH:MM:SS instead of: "2018-03-09 09:47:19 +0000" The function needs to be placed within the Time.Now function.
```
require ‘roo’
require ‘roo-xls’
require ‘byebug’
file_name = ARGV.first || “Template.xlsx”
excel_file = Roo::Spreads... |
2018/03/09 | 1,553 | 5,817 | <issue_start>username_0: ```
{
"batchcomplete": "",
"query": {
"pages": {
"25675557": {
"pageid": 25675557,
"ns": 0,
"title": "Cricket",
"extract": "Cricket is a bat-and-ball game played between two teams of eleven players each ... |
2018/03/09 | 667 | 2,283 | <issue_start>username_0: So i have a simple question; I want to display the `System.Windows.Visibility` Enum in a ComboBox. However i don't seem to find the path to it. Searched like a crazy man but couldn't find anyone who know the path to this enum.
I'm aware that this can be done in code (and already have it workin... |
2018/03/09 | 640 | 2,066 | <issue_start>username_0: I currently have a simple header, main, footer structure in my angular project and would like to make the main-component a flex-box in order to arrange all given components horizontally with equal width. Additionally I want to change the flex-direction, when the screen width is lower than 700px... |
2018/03/09 | 392 | 1,480 | <issue_start>username_0: I want to test my error message in my android app. My error check only happens when the focus of my editText changes.
```
@Test
fun wrongFirstname(){
onView(withId(R.id.txtFirstNameRegister)).perform(typeText(""))
//here I need to lose my focus
onView(withId(R.id.t... |
2018/03/09 | 899 | 2,995 | <issue_start>username_0: I have a ReactJS app, with CSS styles set for the placeholder values inside of text inputs using SASS. The following code works without problem (I've ommitted styles for other browser vendors, so I'll only show webkit):
```
*::-webkit-input-placeholder {
color: rgb(126, 126, 126);
tran... |
2018/03/09 | 555 | 1,923 | <issue_start>username_0: If we use same application in multiple tabs, both application uses the same localstorage for storing ngIdle.expiry and one application extends the session of other one. Is there any work around to fix this issue in current version, like configure sessionstorage instead of localstorage or like c... |
2018/03/09 | 309 | 975 | <issue_start>username_0: I am currently facing an import issue with `pandas.tools.plotting`. I try to import the scatter matrix via
```
from pandas.tools.plotting import scatter_matrix
```
But I get the following error message from visual studio code:
>
> [pylint] E0611:No name 'scatter\_matrix' in module
> 'panda... |
2018/03/09 | 157 | 503 | <issue_start>username_0: ```
var string = "
```<issue_comment>username_1: You need to use this line of code to import pandas scatter\_matrix. As seen in the [docs](https://pandas.pydata.org/pandas-docs/stable/visualization.html#scatter-matrix-plot) of pandas visualization.
```
from pandas.plotting import scatter_mat... |
2018/03/09 | 253 | 863 | <issue_start>username_0: I am working on file upload with on change event.Getting an error file is not defined.
```
//html file
//controller file
$scope.file={};
$scope.uploadedFile=function(event,args){
$scope.files=[];
$scope.$apply(function () {
$scope.files.push(args.file);
... |
2018/03/09 | 2,782 | 9,589 | <issue_start>username_0: My question is Global variable is `undefined` when the `ngOnIt` , `AfterViewInit` method is called.
I'm fetching data from json file which is in asset folder. I have successfully passed the data to `gotodef()` function with one parameter. And from that `gotodef()` function I'm returning the var... |
2018/03/09 | 1,892 | 6,458 | <issue_start>username_0: I am writing a code where we need several kinds of stack. Like `stack, stack>, stack>, stack>` etc.
I have a base class which contains a virtual function foo(...list of arguments...). This base class is being used as parent for multiple derived classes whose foo() works on different types of s... |
2018/03/09 | 3,619 | 11,413 | <issue_start>username_0: i have this task that is server for my application:
```
"tasks": [
{
"label": "f1",
"type": "shell",
"command": "gunicorn",
"args": [
"main:api"
],
"isBackground": true,
},
]
```
is mapped on key "F1", now, if this task is a... |
2018/03/09 | 408 | 1,234 | <issue_start>username_0: I have an array in the following structure
```
Array ( [members] => Array (
[0] => Array ( [nr] => 2 [email] => email1 )
[1] => Array ( [nr] => 6 [email] => email2 )
[2] => Array ( [nr] => 3 [email] => email3 )
)
[title] => List members
)
```
I want to delete items [3] => ... |
2018/03/09 | 798 | 2,835 | <issue_start>username_0: I have a v-data-table that gets its data from a vuex-store. The data thats displayed is controlled by a v-select on the same page. So when a user selects a company in the v-select the v-data-tables data gets updated with users.
My problem is that when a user selects a company in the v-select a... |
2018/03/09 | 577 | 1,951 | <issue_start>username_0: In python, I'd like to recover the number of bytes during a request.
I did something like this (with requests module):
```
r = requests.get("https://google.fr/")
```
Not really this but this looks like. I'd like to know how many bytes the request requires and returns.
Thanks !!<issue_comm... |
2018/03/09 | 1,527 | 5,481 | <issue_start>username_0: After about 15 years writing CSS, I'm still discovering things I don't understand...
Below is a simple page with an `h1` element that is 2000px wide. As expected, this causes the page to have a horizontal scrollbar.
But the problem is, the parent `div.wrapper` does not expand to the width of ... |
2018/03/09 | 424 | 1,322 | <issue_start>username_0: When the first line breaks in mobile, I want to start let the second line start from where the first begins. Any ideas how to reach this on a list?
Codepen: <https://codepen.io/altos/pen/KoKEba>
```
* [Link 1 - Lorem ipsum dolor sit amet, consetetur sadipscing elitr](#)
* [Link 2 - Lorem ip... |
2018/03/09 | 1,748 | 3,731 | <issue_start>username_0: I have this list:
```
[{"id": "<KEY>", "smile_conf":
"99.91191864013672", "mouthopen_conf": "97.74097442626953", "smile":"False",
"camid": "p2.jpeg"},{"id": "11a6343897504c219ddec864914444", "smile_conf":
"99.913333672", "mouthopen_conf": "97.74097442626953", "smile": "True",
"camid... |
2018/03/09 | 2,155 | 3,688 | <issue_start>username_0: I have the following list with multiple data frames
with length of each dataframe in a list is 2.
Now i want select the first column of the data frame which one is longest row in a dataframe and select
the second column of the all dataframes in a list
Here is dataset.
```
> dfs
$a
x ... |
2018/03/09 | 1,984 | 5,593 | <issue_start>username_0: I wrote this code that simply sums a list of n numbers, to practice with floating point arithmetic, and I don't understand this:
I am working with float, this means I have 7 digits of precision, therefore, if I do the operation 10002\*10002=100040004, the result in data type float will be 1000... |
2018/03/09 | 1,046 | 4,220 | <issue_start>username_0: Please consider this classical approach, I have simplified it to highlight the exact question:
```
#include
#include
using namespace std;
class Test
{
public:
void modify()
{
std::lock\_guard guard(m\_);
// modify data
}
private:
/// some private data
std::mutex m\_;
};
```
This ... |
2018/03/09 | 971 | 3,166 | <issue_start>username_0: I have a function that needs to return the id of a country.
My list is an array of objects :
```
{
id: 2,
code: "AL",
name: "Albania"
}...
```
Here is my function to get the id needed from country
```
getCountryID(countryName) {
return country_list_with_id.forEach(... |
2018/03/09 | 980 | 3,018 | <issue_start>username_0: I tried followed many articles, but the final ISO string is always with the date wrong:
input: 15/03/2018
output: basing on my timezone, an ISO String
```
c.data.due_date_date = moment(c.data.due_date, "DD-MM-YYYY").toDate();
console.log('ADD TASK toDate', c.data.due_date_date);
c.data.due_d... |
2018/03/09 | 844 | 2,997 | <issue_start>username_0: I am setting up a website with Drupal, the website is deployed on the live server through bitbucket pipelines. Normally when I browse to myurl.com/user it redirects me to myurl.com/user/login however now I get this error:
```
Redirects to external URLs are not allowed by default, use \Drupal\... |
2018/03/09 | 5,377 | 9,365 | <issue_start>username_0: I want to resample a DataFrame to every five seconds, where the time stamps of the original data are irregular. Apologies if this looks like a duplicate question, but I have issues with the interpolation lining up to the timestamps of the data, which is why I include my DataFrame in this questi... |
2018/03/09 | 1,868 | 3,404 | <issue_start>username_0: I have data in the following form:
```
[('06/03/2018 17.35.18.211', 'param_a', 1),
('06/03/2018 17.35.19.211', 'param_b', 1),
('06/03/2018 17.35.20.211', 'param_c', 1),
('06/03/2018 192.168.127.12', 'param_a', 2),
('06/03/2018 17.35.22.211', 'param_b', 2),
('06/03/2018 17.35.22.211', 'par... |
2018/03/09 | 1,310 | 4,235 | <issue_start>username_0: First i will explain what i have implemented so far :-
User will select an answer in radio buttons and hit “Check answer” which would display 1. text Correct (Green) or Incorrect (Red) in first answer field and 2. the actual correct answer in the “Solution”(answer) field (Green).
My issue is It... |
2018/03/09 | 683 | 2,743 | <issue_start>username_0: I have two fragments on a viewpager. Since one fragment has EditTexts on it and the other has just graphics on it, I would like to hide the keyboard when I switch onto the graphic fragment.<issue_comment>username_1: You could use a static method for this in a sort of Utils class inside your Xam... |
2018/03/09 | 843 | 3,002 | <issue_start>username_0: I am new to **registrykeyexists(root,key)** method of Advapi32util which checks whether registry key "**key**"(key that is passed to registrykeyexists) is present in windows registry under the root.
Root that i am passing is "HKEY\_LOCAL\_MACHINE".
Key is something that looks like "SOFTWARE\AB... |
2018/03/09 | 229 | 1,063 | <issue_start>username_0: I am wondering what considerations can lead to choosing package-configurations over project-configurations (or vice-versa) on Sql Server 2012.
I for example was told that using package-configurations it was easier to migrate ETL's from one machine to another.
edit: the question is about pack... |
2018/03/09 | 1,918 | 6,478 | <issue_start>username_0: This is to define a custom loss function in Keras. The code is as follows:
```
from keras import backend as K
from keras.models import Sequential
from keras.layers import Dense
from keras.callbacks import EarlyStopping
from keras.optimizers import Adam
def custom_loss_function(y_true, y_pred)... |
2018/03/09 | 210 | 810 | <issue_start>username_0: I have an IFrame inside an angular route view. When I trigger a state change in the router via `navigateByUrl` the `window.onbeforeunload` function inside the IFrame ins't triggered. Same for `addEventListern("beforunload",...)`.
First question:
Why isn't it triggered?
Second:
Is there a way... |
2018/03/09 | 611 | 1,546 | <issue_start>username_0: From library `mgcv`
i get the points to plot with:
```
fsb <- fs.boundary(r0=0.1, r=1.1, l=2173)
```
if with standard graphic package i plot fsb and then i add lines i get :
```
x11()
plot(fsb)
lines(fsb$x,fsb$y)
```
[. but the expand/collapse icon is appearing in the left side of the first column's value.
How can I change that to appear in the right side of first column's value.
Also wa... |
2018/03/09 | 372 | 1,331 | <issue_start>username_0: so for a school project, I'm making an app but I'm just stuck on the last point.
I predesigned a background for my app in photoshop and imported it into Android Studio.
In this background, I already put the buttons and my plan was to, in the android studio, just put the buttons on it and it'll ... |
2018/03/09 | 246 | 999 | <issue_start>username_0: I have created a HDI cluster and its associated storage account using Azure CLI 2.0 and ARM template.
Now I want to the delete the cluster using Azure CLI 2.0. But I don't find command option to delete it.
In Azure CLI 1.0 , I will delete a cluster using the following:-
```
azure hdinsight c... |
2018/03/09 | 598 | 2,366 | <issue_start>username_0: I want an SQL query to round up to the nearest .49 or .99
I currently have it written to round up to .99 no problems, using the FLOOR or TRUNCATE function
```
UPDATE wp_postmeta
SET meta_value=meta_value*1.39
WHERE meta_key='_saleprice' OR meta_key='_price';
UPDATE wp_postmeta
SET meta_value... |
2018/03/09 | 742 | 2,234 | <issue_start>username_0: I am using AngularJS 1.5.3
I have a list of items that I want to display in my view.
Every 2 items I want to show a new div underneath the first one.
```
{{ event.times }}
```
For example, this is the result I want to see:
[
{
c.forEach((k,v) -> {
p = m.getMin(c);
sky.add(p);
c.remove(p.getNom());
});
}
```
This throws a `java.util.ConcurrentModificationException`.
How can I fix that ?<issue_comment>username_1: Why don't you have bootstrap to do it ?
```
{{ event.times ... |
2018/03/09 | 548 | 2,101 | <issue_start>username_0: I want to end a dialog for a particular user proactively. I see APIs to send message and start a dialog proactively using the address of the conversation. Is there any API to end a current/particular dialog for that conversation (preferably using the address of the conversation) proactively. I ... |
2018/03/09 | 350 | 981 | <issue_start>username_0: I have this:
```
D-T4-0.txt
A-2.txt
C-3-1.txt
B-X1-3.txt
E-2-4.txt
```
and I wish to order as follows:
```
D, C, A, B, E
```
I need to look at the last number in each (before .txt) `D-0, C-1, A-2, B-3, E-4`.
It's possible?<issue_comment>username_1: ```
for i in `awk -F- '{print $NF}'... |
2018/03/09 | 370 | 1,007 | <issue_start>username_0: I can't calculate the factorial of 365 by using `factorial(365)` with the R logial, I think the capacity of this logicial don't allow it. How can I do with an other method?<issue_comment>username_1: You can use `lgamma(x+1)` to get the natural log of factorial.
```
factorial(365)
# [1] Inf
# W... |
2018/03/09 | 608 | 2,162 | <issue_start>username_0: I am having a hard time understanding the behavior of the following code. Closing the file descriptor p[0] makes the program exit (since otherwise the parent process just waits on the child processes in all eternity). It doesn't make sense to me because the child processes are running an infini... |
2018/03/09 | 1,466 | 4,184 | <issue_start>username_0: The output should be displayed as `LUNG`,`KIDNEY`,`SKELETON>J169>U` and `E`, `CREATININE:no` instead of `>LUNG,KIDNEY,SKELETON>J169>U and E`, `CREATININE:no`
How to achieve this using javascript? i,e ">" is the first character in each line needs to be removed.
I have used string replace and st... |
2018/03/09 | 1,062 | 3,329 | <issue_start>username_0: My main pages are at "main.mysite.com".
Customer access site by "customer.mysite.com" which contains only a subset of the main pages.
When customer request page "customer.mysite.com/data.php", I want to check first if the file is in "customer.mysite.com" subdomain, if yes, then serve that page,... |
2018/03/09 | 792 | 2,732 | <issue_start>username_0: I have a dataframe with two columns `specialty` and `keywords`. I use the following code in order to extract values from column `keywords` if there is a match is found between `search terms` with any value in column `specialty`:
```
speciality <- c("Emergency medicine","Allergology","Anesthes... |
2018/03/09 | 5,215 | 19,941 | <issue_start>username_0: I have an object and inside is array of objects, I want to merge the objects which have same `InquiryNo` and inside I want to add the `Quantity` (first convert it to integer and then add) and concatenate `ProductDesc` with `', '`. I tried doing it but I am getting wrong sums and some wrong `Pro... |
2018/03/09 | 738 | 2,034 | <issue_start>username_0: This is the shortest I came up with, after extensive googling and studying the sources:
```
let mut buf = [0u8; 200];
for elem in buf.iter_mut() {
*elem = 0;
}
```
Is there really no way to make this a one-liner, like `buf.set_all(0)`?<issue_comment>username_1: >
> Is there really no wa... |
2018/03/09 | 490 | 1,656 | <issue_start>username_0: I'm using the markdown previewer in VSCode and would like the ability to highlight some text in an ".md" file and wrap it in a "" tag so that it displays highlighted when you view the markdown file in its rendered format.
Is there a quick and easy way to do this?<issue_comment>username_1: In y... |
2018/03/09 | 543 | 1,648 | <issue_start>username_0: I have an array of objects being passed to my controller with this structure:
```
[
{
"id": 1,
"fruit_ids": [1, 2, 3]
},
{
"id": 2,
"fruit_ids": [4, 5, 6]
},
]
```
The root object, is not a `{}`, and instead is a array. I'm not sure how to writ... |
2018/03/09 | 3,548 | 13,517 | <issue_start>username_0: I am trying out the new Firebase/Crashlytics setup and seem to run into a weird issue.
* I have one Android code base with multiple product flavors and each flavor is a separate individual app.
* all of these apps are registered in Fabric (from the past)
* all of these apps are added in Fireba... |
2018/03/09 | 413 | 1,564 | <issue_start>username_0: How to fix status code 409 for translate job.
There are two types of problems I am facing.
1. Sometimes API returns error status code 409(conflict)
2. Sometimes it continuously gives in progress status and never completes or fails even.
Once any of the above error occurs, any subsequent job ... |
2018/03/09 | 544 | 2,134 | <issue_start>username_0: Due to slow synchronization on my testing website, I need to wait the page until is fully loaded. I have tried several elements waits like:
```
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(50));
wait.Until(ExpectedConditions.ElementExists(By.XPath("//input[@placeholder=... |
2018/03/09 | 1,257 | 4,218 | <issue_start>username_0: I have two entities with unidirectional `one to many` relationship.
```
@Entity
public class Basket {
@Id
@GeneratedValue
private Long id;
private int capacity;
}
@Entity
public class Item {
@Id
@GeneratedValue
private Long id;
private String name;
@Ma... |
2018/03/09 | 1,177 | 4,633 | <issue_start>username_0: I am developing an Android app with Xamarin Android in Visual Studio.
I have a MainActivity which will be nothing more than 2 buttons to login or register. Once one of those buttons is tapped a new activity is started like this:
```
sign_in_button.Click += delegate
{
var login_activity... |