date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/10 | 432 | 1,533 | <issue_start>username_0: I am new to Thymeleaf. I have a spring-boot project where I am trying to display some attributes value which has been set from spring controller.
```
@Controller
public class HomeController {
@RequestMapping(path = "/info", method = RequestMethod.GET)
public String info(Model model) {
... |
2018/03/10 | 236 | 827 | <issue_start>username_0: In my forms.py I have a custom ModelForm that contains a `save()` method:
```
def save(self):
bus = super().save(commit=False)
datei = self.upload.name
original_dateiname = datei.name
extension = original_dateiname.split('.')[-1]
a = Datei.objects.create(file=datei, orig... |
2018/03/10 | 330 | 1,040 | <issue_start>username_0: I'm trying to get the different values form two array.
I used the `difference()` method from lodash, but this does not keep into account quantities.
For instance, i have these two array:
```
var arr1 = [10018, 12285, 12285, 2405, 2413];
var arr2 = [10018, 2405, 12285];
```
if I call `differ... |
2018/03/10 | 564 | 2,107 | <issue_start>username_0: Swift's way to create a red button:
```
let button: UIButton = {
let button = UIButton()
button.backgroundColor = .red
return button
}()
```
With my extension (kotlin's approach):
```
let button: UIButton = UIButton().apply(){ this in
this.backgroundColor = UIColor.red... |
2018/03/10 | 869 | 2,702 | <issue_start>username_0: I have a list of points: `[(x, y), (x, y), (x ,y) ... (x, y)]`.
I want the `k` nearest points to `(0, 0)`.
I'm trying to implement something like in [this](https://www.careercup.com/question?id=15974664) link. However, I am implementing the algorithm incorrectly, and I'm not sure where it's go... |
2018/03/10 | 879 | 2,451 | <issue_start>username_0: I'm writing the following code to calculate consolidated grades of student to manage their Transcript, but not getting desired output, could someone help me in this,Thanx!
```
def transcript(coursedetails, studentdetails, grades):
studentdetails.sort()
coursedetails.sort()
grades.s... |
2018/03/10 | 425 | 1,794 | <issue_start>username_0: The black screen is visible for a moment at the start of the app in android devices. I've tested in all of my recent apps and it is there. In some devices, the black screen appears a bit longer especially in oreo.
Have a look at the video [here](https://youtu.be/xQRxh7WCO50)
```
How can I so... |
2018/03/10 | 1,320 | 4,064 | <issue_start>username_0: Update: I realize now that errors can occur when you scale down your code and then post a question. This is the same question but with the sample code matching the true situation. I also learned that you don't need the line continuation "\" when your python expression is ending in a comma ",".
... |
2018/03/10 | 2,436 | 8,042 | <issue_start>username_0: Can I make different snippets of `eval`ed Perl code share the same lexical scope and yet get their return values?
**Background**
Perl's eval command evaluates a string as Perl code and upon success returns the value of the last statement in that code. However, lexical variables created in tha... |
2018/03/10 | 1,197 | 4,291 | <issue_start>username_0: I have a large graph object with many nodes that I am trying to graph. Due to the large number of nodes, many are being drawn one over another. This in itself is not a problem. However, a small percentage of nodes have node attributes which dictate their colour.
Ideally I would be able to draw... |
2018/03/10 | 859 | 2,672 | <issue_start>username_0: For instance, in my project directory, I have:
```
|--bar.js
|--dir
|--foo.txt
|--readfile.js
```
readfile.js:
```
const fs = require('fs');
var foo = fs.readFileSync('foo.txt', 'utf8');
console.log(foo);
module.exports = {foo};
```
Running `node readfile.js`, everything works pe... |
2018/03/10 | 430 | 1,314 | <issue_start>username_0: When I installed the 'New XAMPP with PHP 7.2.2 & 7.1.14' and followed steps in this tutorial [XAMPP-VM for Mac - tell us what you think](https://www.apachefriends.org/blog/new_xampp_20170628.html)
.At this time I can see the phpmyadmin at my localhost 8080 port, however, when try to change my w... |
2018/03/10 | 638 | 2,221 | <issue_start>username_0: I'm new to JavaScript, and am learning to develop with an Express server on Glitch.com. I am running into issues with my Fetch API POST request, where it keeps returning a JSON.parse error when I try to send it a JSON object.
```
SyntaxError: JSON.parse: unexpected character at line 1 column ... |
2018/03/10 | 1,040 | 4,256 | <issue_start>username_0: I have been working on a launch database for SpaceX and I have successfully parsed my data but the function to create and add the data to the cell is not working. I have added the delegates and data sources but I still cannot find out why it won't run.
```
import UIKit
struct launchData : Dec... |
2018/03/10 | 757 | 2,848 | <issue_start>username_0: I have a big problem.
I scrolled in the UICollectionView.
When the drawing area is scrolled too much, the arrangement order has become disjointed.
I do not want to change the order even though scrolling.
What should I do?
help me.
```
let titles = ["1","2","3","4","5","6","7","8", "9", "10"... |
2018/03/10 | 726 | 2,669 | <issue_start>username_0: I have two modules, and I need to import one from another. In first module, I need to only declare variable and load (if its not loaded). In second, just read this variable and use that (if not loaded, in another module load it)
First module:
run\_engine.py:
```
#run_engine.py
import matlab... |
2018/03/10 | 366 | 1,124 | <issue_start>username_0: [](https://i.stack.imgur.com/CKyzF.jpg)i need to show total amount. first and second text box value sum should be display in total text box. have any way to do it.
```html
Total
```<issue_comment>username_1: You need to h... |
2018/03/10 | 2,395 | 8,090 | <issue_start>username_0: I'm trying to code a Media Response in a Custom Payload with no luck. I'm surely doing something wrong but I have no idea :) The Media Response does not show up when testing. (Please note that I'm trying this in an english action). Here's the JSON code:
```
{
"platform": "google",
"type": ... |
2018/03/10 | 1,713 | 5,922 | <issue_start>username_0: I've just started playing with Flutter in VSCode. I also installed the Dart Plugin.
Running the demo app I read in the terminal
[](https://i.stack.imgur.com/hgdP1.png)
Is this the only way to hot-reload the app? I mean I shou... |
2018/03/10 | 1,888 | 6,214 | <issue_start>username_0: I want to cache a function that takes a list as a parameter, but when I try to do so with the [`functools.lru_cache`](https://docs.python.org/3/library/functools.html#functools.lru_cache) decorator, it fails with `TypeError: unhashable type: 'list'`.
```
import functools
@functools.lru_cache... |
2018/03/10 | 358 | 670 | <issue_start>username_0: I know the command is `date +%s -d "xxx"`
But how do I convert `11/03/2018 02:44:58` to epoch ?
```
root@AngelBeats:~# date +%s -d "11/03/2018 02:44:58"
date: invalid date '11/03/2018 02:44:58'
```<issue_comment>username_1: Edit: For Linux
```
date --date="11/03/2018 8:15:00" +"%s"
```
>... |
2018/03/10 | 419 | 1,387 | <issue_start>username_0: [`Child::kill`](https://doc.rust-lang.org/std/process/struct.Child.html#method.kill) sends a `SIGKILL`, but how can I send any other signal such as `SIGTERM`? I can probably use `libc` and its signal API, but is there a better way to do this?<issue_comment>username_1: The [`nix`](https://docs.r... |
2018/03/10 | 1,134 | 4,628 | <issue_start>username_0: I'm trying to obtain the steps from the last 7 days, but I could not find how to do it. *What i would like to receive is an array of 7 elements in which every element is a Day with it respectives total steps*. I currently have this code, which obtains today's steps:
```
//Gets the steps
func g... |
2018/03/10 | 612 | 2,149 | <issue_start>username_0: All of a sudden I started getting "Permission Denied" issues when trying to run any gcloud commands such as `gcloud components update` -- the issue was avoided if I ran `sudo gcloud components update` but it's not clear to my why the sudo command is suddenly required? I have actually been tryin... |
2018/03/10 | 757 | 1,842 | <issue_start>username_0: **Set-up**
I'm looking for all the integer pairs `(x,y)` in 2 closed sets: `[822,2000]` and `[506,1231]` such that `x/y=1.624`.
---
**Code so far**
I tried,
```
a = [[(x,y)] for x in range(822,2001) and y in range(506,1232) if x/y = 1.624]
```
But this gives a `SyntaxError: invalid synta... |
2018/03/10 | 737 | 3,133 | <issue_start>username_0: I've been recently learning 'events' and 'delegates' in C#.
Now I have a question that I didn't find the answer to, anywhere else.
As we all know every event is created based on a specific delegate. At first I thought that events are like delegate instances, but then I figured out that they ar... |
2018/03/10 | 672 | 2,728 | <issue_start>username_0: ```html
test
table > tr > th {
color: red;
}
| a | b |
| --- | --- |
```
I just can't see why the text in the cells are not red. Could you show me what i am missing.<issue_comment>username_1: An event is basically a list of methods to be invoked. Thus, delegate is nothing but kind of ... |
2018/03/10 | 1,854 | 7,256 | <issue_start>username_0: I have an array of objects and I want to iterate over them. One object of this array looks like this:
```
var people = [
{
"firstName": "YYY",
"lastName": "XXX",
"number": "123456789",
"attribute": ["strong", "quick", "stupid"]
},
{
"firstName": "AAA",
"lastName": "BBB"... |
2018/03/10 | 593 | 1,995 | <issue_start>username_0: I've been trying for ages to solve this problem but I have been unable to. What i'd like to do is have a certain div show on the webpage when a certain radio button is selected. I have been able to do this when the form is submitted but i'd rather not have to rely on submitting it.
```
True ... |
2018/03/10 | 1,194 | 4,575 | <issue_start>username_0: This question is about this code:
```
entityEntry.Property("WhateverProperty").CurrentValue = 1;
```
I answered [this question](https://stackoverflow.com/questions/49202615/audit-trail-with-entity-framework/49202785) yesterday and if you notice in the comments to the question (not the answer... |
2018/03/10 | 985 | 3,893 | <issue_start>username_0: I'm creating a store (hypothetical) using local storage. I have this code saving what item you put into your cart. It gets the name of the book from the value set in the button.
This is stored in an external .js file. The issue im having is that i can add one book, go back to the browsing page... |
2018/03/10 | 1,747 | 7,226 | <issue_start>username_0: Please don't mark it as a duplicate of [this](https://stackoverflow.com/questions/39911518/visiblity-of-expanding-last-view-in-the-expandable-recyclerview).
I am trying Collapsable `CardView` but the last card when expanded doesn't push its content upwards, rather the user has to explicitly s... |
2018/03/10 | 423 | 1,363 | <issue_start>username_0: I have the following class in a Rails 4 project:
```
app/components/x2xfoo/bar/klass.rb
```
with `klass.rb` being:
```
module X2XFoo
module Bar
class Klass
end
end
end
```
The problem is that the Rails autoload mechanism does not find this constant:
```
$ bundle exec rails c... |
2018/03/10 | 241 | 810 | <issue_start>username_0: What do I need to correct in the code so that the loop will stop when the user stops entering data?
```
while(scanf("%i", #)){
printf ("%#o %d 0x%X\n", num, num, num);
}
```<issue_comment>username_1: Create or adjust `config/initializers/inflections.rb`:
```
ActiveSupport::Inflecto... |
2018/03/10 | 630 | 1,780 | <issue_start>username_0: I have the following heatmap made by Holoviews. I need to change x ticks to change the period of x ticks. [0,2,4,...] instead of [0,1,2,3,4,..]
```
data = [(i, j, i*j) for i in range(10) for j in range(10)]
hv.HeatMap(data)
```
[Change from this graph](https://i.stack.imgur.com/pSA2y.png)
... |
2018/03/10 | 796 | 2,686 | <issue_start>username_0: How to resize (height and width) of an IconButton in Flutter? Seems like it takes a default width and height. There is not height or width property.
```
new IconButton(
padding: new EdgeInsets.all(0.0),
color: themeData.primaryColor,
icon: new Icon(Icons.clear, size: 18.0),
onP... |
2018/03/10 | 970 | 3,286 | <issue_start>username_0: I have a HTML page that just has a table in it that I would like to span the entire of the body and have scrollbars when it needs to scroll horizontally or vertically.
This is what I have for the styling of the table:
```css
table {
box-shadow: inset 0 0 10px #000;
position: absolute;
... |
2018/03/10 | 1,510 | 3,470 | <issue_start>username_0: I'm trying to do a conditional sum on a data.table and managed to do it currently in a messy way. I was wondering if it would be possible to do it more elegantly?
Consider the following:
```
library(data.table)
stock_profile <- data.table(Pcode = c(123456L, 234567L, 345678L, 456789L, 567891L,... |
2018/03/10 | 603 | 1,631 | <issue_start>username_0: I am using DateTimePicker in my project. I want to change the language. How can I run it using the <https://github.com/jquery/jquery-ui/blob/master/ui/i18n/datepicker-tr.js> plugin in this example. Thanks in advance ..
```
$('#appoimentDate').datetimepicker({
format: "dd.mm.yyyy hh:ii"... |
2018/03/10 | 658 | 1,821 | <issue_start>username_0: I have a specific problem, that I was trying to find all over the Internet, but with no luck.The user will chose a model of a man(image view) and by moving its position, the blur effect will appear from up to down/ right to left on the man. Basically, I need to use blur effect on an image view,... |
2018/03/10 | 1,237 | 3,483 | <issue_start>username_0: I'm trying to set the ValidFrom range for the current record in a temporal table. I'm doing this because I'm rebuilding history from another system (non SQL) into a data warehouse so the current version of records may be "as of" a date that's in the past. If I can't get this to work, my fall ba... |
2018/03/10 | 515 | 1,926 | <issue_start>username_0: What technologies do I need to use to send notification from the node.js server to the android client.For example, user `A` adds user `B` to friends, at this time user `B` should receive a notification to his android device that user `A` wants to add it to friends. I'm new to node.js, could you... |
2018/03/10 | 506 | 1,709 | <issue_start>username_0: Given a (m,n) numpy array A, I would like to construct the (m-1,n-1) numpy array B such that B[i,j] equals
```
A[i+1,j+1]+A[i,j]-A[i+1,j]-A[i,j+1]
```<issue_comment>username_1: On the server side you need something to work with Google's Cloud Messaging service, for instance the `node-gcm` mo... |
2018/03/10 | 495 | 2,020 | <issue_start>username_0: I got for example the following structure of a class.
```
class Company(object):
Companycount = 0
_registry = {}
def __init__(self, name):
Company.Companycount +=1
self._registry[Company.Companycount] = [self]
self.name = name
k = Company("a firm")
b = ... |
2018/03/10 | 608 | 2,284 | <issue_start>username_0: ```
php
require_once("Connection.php");
class DisplayJsonData{
function getAllJsonData(){
$connection = new Connection();
$conn = $connection-getConnection();
$jsonData = array();
try{
$sqlQuery = "SELECT * FROM DataTable";
$get... |
2018/03/10 | 401 | 1,267 | <issue_start>username_0: i want to strip a url with PHP but i can't figure out how to do it.
I thought about explode() but the problem is, what parameter can i use?
Because i need to have every single piece of the url to use it later on in the
script.
I specificaly need this parts splitted:
1. http:// or https://
2.... |
2018/03/10 | 399 | 1,201 | <issue_start>username_0: I am having trouble in parsing the JSON object, not sure where I am wrong?
Here is HTML:
```
{{myInfo.docs[0].FIRST\_NAME}}
```
Here is Angular:
```
var myApp = angular.module('myApp', []);
function MyCtrl($scope) {
$scope.getName = function(user) {
return "Names";
};
$scope.... |
2018/03/10 | 1,415 | 4,742 | <issue_start>username_0: Now I'm getting frustrated :( This is my very first attempt at using vue.js which after jQuery, is the second JS framework I'm learning since I came to this planet. I have the following HTML:
```js
var main = new Vue({
el: ".main-content",
data: {
heading: "First Vue Page",
usd... |
2018/03/10 | 1,967 | 7,159 | <issue_start>username_0: I´m currently working on my semester work and this is a piece of my code. As you can see there is a for loop with some if statements where I am working with a structure. I was thinking of converting this for loop onto a while loop but I´m not quite sure how. Maybe someone may give me a hint?
... |
2018/03/10 | 2,247 | 7,586 | <issue_start>username_0: I know this question is maybe a bit boring. But I'm searching now for serveral hours and find no way to combine the solutions I found on the Internet.
So I hope someone here would like to help me out.
I have a simple Image slider and I need a counter that says maybe "Image 2 of 3".
As I said... |
2018/03/10 | 895 | 3,690 | <issue_start>username_0: I was hoping somebody could point me in the right direction for a project I would like to do. My intention is simple, to have a GUI that allows a user to input a string, that string fills into a pre-determined line of command line text, runs through the command line and returns what is printed ... |
2018/03/10 | 917 | 2,857 | <issue_start>username_0: The default `Data.List.sort` [is implemented using merge sort](https://hackage.haskell.org/package/base-4.10.1.0/docs/src/Data.OldList.html#sort). I have a huge list of almost sorted data. I figured using insertion sort would be much more beneficial. This was not the case unfortunately.
Edit: ... |
2018/03/10 | 332 | 1,304 | <issue_start>username_0: I wanted to generate multiple random number sets and test them using conventional random number testing suites. I came across the NIST suite of testing, Diehard suite and a few other commonly mentioned ones.
These seemed to be pretty old. Are there any newer test suites that are deemed better... |
2018/03/10 | 522 | 1,695 | <issue_start>username_0: ```
data = cursor.fetchone ( )
while data is not None:
data = str(data)
print(data)
data.split(",")
for index in data:
if index.startswith("K"):
print(index, end=';')
data = cursor.fetchone()
```
Here is the relevant part of my code. The data is retriev... |
2018/03/10 | 1,578 | 4,876 | <issue_start>username_0: I have below mentioned datafram:
```
Month Fig1 Fig2
Mar-17 10 12
Feb-17 25 18
Jan-17 10 15
Dec-16 11 18
Nov-16 10 15
```
I want to create a colorful bar graph for this, i have tried below mentioned code but it didn't work.
```
bargraph <- ggplot(dat... |
2018/03/10 | 1,256 | 2,751 | <issue_start>username_0: I have a .txt file that has names followed by numbers. For Example
```
namesToRatings = {}
with open("example.txt") as document:
for line in document:
print(line)
```
Would output:
```
Simon
5 0 0 0 0 0 0 1 0 1 -3 5 0 0 0 5 5 0 0 0 0 5 0 0 0 0 0 0 0 0 1 3 0 1 0 -5 0
0 5 5 0 5... |
2018/03/10 | 973 | 2,434 | <issue_start>username_0: I have a page on my angular4 and i want to change the div content that displays using \*ngIf, based of the url that comes through.
So if url is homepage it should hide a particular div and let another one show
if url is about it should show a particular div and hide another
Thanks guys.. any... |
2018/03/10 | 211 | 760 | <issue_start>username_0: There is a possibility, of run code only if clicked the one button? As long as do not click on the button, code is not running, but if is clicked, the code is starting running.
Show the div block if click is button is not working, because code is on the background running, if clicked the butto... |
2018/03/10 | 726 | 2,488 | <issue_start>username_0: I've created a list within a list from a file and the format basically is List= [[a,b,c][d,e,f][g,h,i].....], i want to access always the second element of each list (b,e,h...) and with the code below it works up until 83 whereas the length of the list is 255, after those 83 elements python tel... |
2018/03/10 | 993 | 3,225 | <issue_start>username_0: There is one same question in StackOverflow with this link:
[How to generate temporary URLs in Django](https://stackoverflow.com/questions/1360101/how-to-generate-temporary-urls-in-django)
But the accepted answer code is for Python 2 and I converted it to Python 3:
```
import hashlib, zlib
im... |
2018/03/10 | 215 | 855 | <issue_start>username_0: I am wondering how is the best way to store link like route('index') in the database, so if I change the url structure to not edit manually all links in the database.
What is the best practice for doing that on Laravel ?
Thanks !<issue_comment>username_1: wooot don't do this ! The helper "rou... |
2018/03/10 | 670 | 2,660 | <issue_start>username_0: I have got a CSV file from a client where some cell contains multiple commas (,). So after splitting by comma, getting wrong value for some cells.
Example:
for cell value of 187,859,049 I am getting 187. But I need 187,859,049.
**My code for splitting comma\_**
```
String line = ""... |
2018/03/10 | 500 | 1,771 | <issue_start>username_0: I am using Laravel 5.6.7 with vue.js for form validation. I have successfully installed using `npm install vee-validate@next --save`
```
Please select Role
{{RoleRecord.Role}}
{{ errors.first('Role\_ID') }}
UserName
{{ errors.first('User Name') }}
Save Changes
export default {
... |
2018/03/10 | 487 | 1,774 | <issue_start>username_0: After encountering this code:
[](https://i.stack.imgur.com/bJtNf.png)
I was confused about the usage of both `.apply` and `lambda`. Firstly does `.apply` apply the desired change to all elements in all the columns specified o... |
2018/03/10 | 480 | 1,761 | <issue_start>username_0: Let me first say, I am beginner with iOS programming and dealing with one of the older project. As per my question title, I was searching, at which place in Storyboard my UIView exist that defined in header file?
Here is overview:
[ {
const options = {
params: ne... |
2018/03/10 | 632 | 2,389 | <issue_start>username_0: I have a problem with Mangoose and NodeJS. I explain :
* I have a MongoDB "babyfootdb" and the connection with Mongoose is OK.
* Inside the DB, I have a collection named players.
I just want to add a test document, a player (name, email, password) in the collection "players".
But it's not wor... |
2018/03/10 | 408 | 1,186 | <issue_start>username_0: Have an object which I am trying to handle in jQuery if the details contain a text. Searched all around but nothing works, for instance this doesn't work:
```
if(typeof data.details[0].text !== "undefined") {JScode}
```
Format 1 (json):
```
data = {kod: 4007, text: "Test.", details: []}
``... |
2018/03/10 | 2,011 | 7,492 | <issue_start>username_0: I am designing a App which requires a login page and then if the login is successful it should load up a new screen. This is the code here:
```
import java.util.ArrayList;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.ge... |
2018/03/10 | 1,453 | 4,194 | <issue_start>username_0: I have given points `(a, b)` and then I have given points `(x, 0)`.
Now for each point `(x, 0)` I make lines with all points `(a, b)` (see image).
For each point `(x, 0)` I have to return indexes of thease point/points `(a, b)`
which y-intercept of line through this point/points and point `(... |
2018/03/10 | 1,119 | 3,661 | <issue_start>username_0: I have node express server, the server working correctly on windows system. But on debian always return index.html.
When I go to localhost:port/ its retrun index.html, index.html load some js files and images(fav ico) - content of this files is ALWAYS content of index.html... so.. where is a p... |
2018/03/10 | 511 | 1,722 | <issue_start>username_0: Basically what i want to do is clicking my button and immediately hide this button and make appear another.
My two buttons are:
```
Add to favorites
Delete from favorites
```
Please i need a solution only with vue.js<issue_comment>username_1: You can condition the exibition of each `button... |
2018/03/10 | 715 | 2,291 | <issue_start>username_0: I have two strings:
```
['Renewables\n', '17.9% (3,951 MW)\n']
['Solar\n', '27.4% (1,081 MW)\n', 'LATEST SYSTEM\n', 'GENERATION\n', '4,738 MW\n', 'THERMAL GENERATION\n', '(COAL, GAS, OTHER)\n', '54 %\n', 'RENEWABLE\n', 'GENERATION\n', '47.61 %\n']
```
But the only data I want from each is th... |
2018/03/10 | 924 | 2,149 | <issue_start>username_0: I have a DataFrame with customer\_id, date, product\_id that they bought. I want to convert this DataFrame to 2 dictionary
```
customer_id date product_id
1 10/3/2017 1234
2 11/3/2017 4321
1 10/3/2017 7384
2 10/3/2017 1234
```
I want the... |
2018/03/10 | 441 | 1,625 | <issue_start>username_0: I am trying to use the goland ide for my go project. My project directory structure is like this
```
/Users/me/workspace/src/github.com/mynamespace/myproject
```
Now the myproject directory consists of a glide.yaml file which downloads all the dependencies inside the vendor folder when I do
... |
2018/03/10 | 292 | 1,067 | <issue_start>username_0: I have a few lines of HTML code :
```html
This is the target text
```
How to select everything inside the using Regular Expression ?
The end result should be :
```html
This is the target text
```<issue_comment>username_1: Choose Open Directory and select `/Users/me/workspace/src/gi... |
2018/03/10 | 577 | 2,344 | <issue_start>username_0: I'm trying to play by-the-book and have a hard time grasping if there is some single line of thinking about this...
Lets say I have usual `ShoppingCart`. As user browse the shop he can add `ShoppingCartOrderLines` to cart. Each step is saved to DB. Lets imagine, for whatever reason, that there... |
2018/03/10 | 618 | 2,005 | <issue_start>username_0: My question is if Destination in Tokyo Discount 200 per Travelers who stays at least 5 nights.
```
if($destination == "Barcelona")
{
$airFare = 875;
$perNight = 85;
}
else if($destination == "Cairo")
{
$airFare = 950;
$perNight = 98;
}
else if($des... |
2018/03/10 | 472 | 1,595 | <issue_start>username_0: I have this query
```
$categories = Category::with('products')
->OfListed() // this is my scope has nothing to do with my issues.
->orderby('id', 'desc')
->take(10)
->get();
```
It works half way! meaning:
>
> **I get my categories with their... |
2018/03/10 | 439 | 1,770 | <issue_start>username_0: I have button which is using class customButton. This button function is after 10 touches automatically disable itself.
I have issue with it, on last touch it will take color from isHighlighted and not from isEnabled. How would you fix this?
Many thanks.
```
class customButton: UIButton {
ov... |
2018/03/10 | 791 | 2,230 | <issue_start>username_0: When I try to `vertical-align: middle` an icon (`![]()`) next to some text, the icon is always a little bit too low (see example). How can I fix this so it is vertically centered with the text.
### Example:
```css
p {
font: 10pt Arial, sans-serif;
}
.icon {
vertical-align: middle;
}... |
2018/03/10 | 722 | 2,111 | <issue_start>username_0: My GCP account has always had a project named WHI-SelfServ. It seems to be the default login account, but I can't find any explanation or documentation of what it is.
Can the WHI-SelfServ project be used to deploy clusters, or should I create a separate project for that?<issue_comment>username... |
2018/03/10 | 530 | 1,922 | <issue_start>username_0: I'm using nircmd to change my primary display between my first and second monitor by using two batch files on my desktop; one to set primary display to the first monitor, and the other to set primary display to the second.
I was wondering if there was a way to check which display is the curre... |
2018/03/10 | 738 | 2,641 | <issue_start>username_0: this is my first time posting a question on this forum. I have been struggling with writing a query in Microsoft Access for a week now and I hope someone here can help me out. I am building a time attendance application using fingerprint in vb6.
The table looks like this:
<https://i.stack.im... |
2018/03/10 | 324 | 979 | <issue_start>username_0: In MATLAB I can create monotonically spaced vectors as in the examples below using the `:`, colon, operator. How can I do this in Python in a similarly concise manner?
```
>> x=1:10
x =
1 2 3 4 5 6 7 8 9 10
```
or
```
>> x=0:2:10
x =
0 2 ... |
2018/03/10 | 1,231 | 4,382 | <issue_start>username_0: Consider the following code:
```
let value = "ABCDE"
for letter in value {
print(letter)
}
```
This prints:
```
A
B
C
D
E
```
Now consider the hypothetical code that when it finds a '2', it skips 2 forward in the loop. Here's pseudo-code showing what I'm asking...
```
let value = "A... |
2018/03/10 | 785 | 2,347 | <issue_start>username_0: I'm working with a dataframe in R which has one column $Z$. I'm looking to add an extra column $X$ which consists of $0.5$ and $-0.5$, which indicate two
different groups. My goal is to have as many people in group $0.5$ as in group $-0.5$. I've tried looking for solutions, but the only thing ... |
2018/03/10 | 654 | 1,954 | <issue_start>username_0: How to share a YouTube video with a specific start and end time on Accelerated Mobile Pages (AMP)?<issue_comment>username_1: With the `sample` function I am creating a random order of rows. So I give your df rownames and the second df rownames. Than I am assinging 500 values with -0.5 and the r... |
2018/03/10 | 291 | 801 | <issue_start>username_0: How can I implement data-structure in c++ that behaves like Javascript objects having key value pairs.
```
var a = {
"key1" : value1,
"key2" : value2,
}
console.log(a["key1"]);
```<issue_comment>username_1: If you want list of key value pairs, [std::map](http://en.cppreference.com/w/c... |
2018/03/10 | 1,735 | 6,544 | <issue_start>username_0: Authenticating server Api is the problem
I am trying to create an API in laravel and and Angular App in 2 different server. I am not getting a good article which can explain me step by step process.
The problem I am facing is I am not sure what to do with the client\_secret I am sure I need ... |
2018/03/10 | 688 | 2,538 | <issue_start>username_0: I've been trying a lot to run this code, but unfortunately it didn't seem to work; It says
>
> Uncaught TypeError: Cannot read property `value` of `null`
>
>
>
I noticed that `getElementById().value` is the culprit but it prints results without error when I run another file on the same `b... |
2018/03/10 | 688 | 2,504 | <issue_start>username_0: I've been scouring the web for a solution to this seemingly simple problem, but I always run into `FileNotFoundException`. I am using Java 8 on Eclipse Oxygen and can't retrieve my `txt` file from either absolute path or relative path. As suggested in other [SO answers](https://stackoverflow.co... |
2018/03/10 | 600 | 2,253 | <issue_start>username_0: whats wrong with this query ?, i run it in my vb net app but i get "syntax error (missing operator) ", i copied from working sql query generated from access 2016 app.
query :
```
Dim sqlquery As String = "Select tblCommissionsP.IDCommissionP, tblCategoryProducts.Nama, tblEmployees.Na... |
2018/03/10 | 318 | 1,129 | <issue_start>username_0: I have a dataset of people who like shops. and shops located in regions. The people also live in the regions.
I need to find the users who Don't like all of the shops located in the SAME region in which they live.
If i get the count of shops the user likes in their region, and get the amount ... |
2018/03/10 | 1,596 | 5,383 | <issue_start>username_0: I have a question strictly based in regards to performance while iterating through two different arrays.
My first array is composed in the following way, objects consisting of an {id, number}
```
var arr1 = [{id: 1, number: 7}, {id: 2, number: 5}];
```
My second array is composed of the sam... |
2018/03/10 | 671 | 2,191 | <issue_start>username_0: I have a Spring Boot 2.0.0 REST service where I'm trying to enable Sleuth and Zipkin to send traces to my localhost Zipkin server.
The app worked fine unti I add the two dependencies `spring-cloud-starter-sleuth` and `spring-cloud-sleuth-zipkin` to my pom.xml. Once I did that, I'm now getting ... |
2018/03/10 | 470 | 1,623 | <issue_start>username_0: I am a newbie with Starcounter and I am trying to create a project by that. But unfortunately I have faced to an error when I try to create a simple hello world project! (I must use 2.3.1 version)
[](https://i.stack.imgur.com/t... |
2018/03/10 | 560 | 2,189 | <issue_start>username_0: I am trying to return an service response from within a function, however the function returns the values before the service execution is ended and hence I always get a null value in return.
I tried using callbacks but not working though I haven't tried promises. Can I use them inside another ... |
2018/03/10 | 457 | 1,712 | <issue_start>username_0: I have a program which needs to initiate an `unordered_map` with 100M+ entries. Is it true tha as long as the machine has large enough memory, we can declare a local variable as large as we want? Or there is some (tunable) upper bound on the size of the local variable even when the machine has ... |
2018/03/10 | 644 | 1,860 | <issue_start>username_0: I'm trying to sort `6` numbers input by the user using a bubble sort algorithm. My program has to be modular so I've written the program as a separate function but I keep getting two errors and I have no idea how to correct them.
`Error 1.` `Lvalue required in function sort_Nums(int *)`
`Err... |