date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/13 | 862 | 2,598 | <issue_start>username_0: I have Atom Beautify plugin installed in Atom and the rubocop gem installed in my app. Even after these steps the beautify don't work.
My rubocop location:
```
$ which rubocop
/home/leonardo/.rbenv/shims/rubocop
```
In my config.cson i have the code:
```
...
ruby:
rubocop_... |
2018/03/13 | 553 | 2,201 | <issue_start>username_0: I have following code in `class homeVC: UICollectionViewController` to display the title in the navigation bar and it works as expected.
```
override func viewDidLoad() {
super.viewDidLoad()
.
.
.
self.navigationItem.title = PFUser.current()?.username?.uppercased()
.
... |
2018/03/13 | 1,599 | 5,282 | <issue_start>username_0: **PROBLEM**
I am working on a problem where I am required to take JSON input file and convert to a XML file. I have provided an example below of what i am deaing with.
In JSON :
```
"playerStats": [
{ "jerseyNumber": "23", "fgPercentage": 60, "plusMinus": "plus" },
{ "jerseyNumber":... |
2018/03/13 | 561 | 1,765 | <issue_start>username_0: I am trying to find the max product of two adjacent elements of a list. I do not know the smallest max I could make. Since the list could include negative numbers, setthing `max=0` is not going to work.
When I tested my code below on `[3, 6, -2, -5, 7, 3]`, the output was `18` instead of `21`.... |
2018/03/13 | 625 | 2,199 | <issue_start>username_0: I am working on a table for a User Detail Page. My objective is to cut the table into half so its not one long list. I am trying to use an algorithm to put list of projects into two different arrays and then create the two tables from these arrays. I have never coded with slim but this is the p... |
2018/03/13 | 385 | 1,283 | <issue_start>username_0: I'm trying to create an `executable` in my node.js project with `pkg` and I can create this but without css files.
So, I install `pkg` with `npm install -g pkg`, in `package.json` I add this:
```
"pkg": {
"scripts": "public/js/*.js",
"assets": "public/css/*.css",
"assets": "views/... |
2018/03/13 | 571 | 2,089 | <issue_start>username_0: When I create a new Laravel 5.6 website and use `php artisan serve` in the console the website loads in the browser, but when I refresh the page the **server.php** file deletes itself and I get a page error.
Below is an image of the error message:
[
for file_ in allF... |
2018/03/13 | 755 | 2,649 | <issue_start>username_0: I've got a linked list and trying to separate one of the values into two different variables. I start with the id variable which consists of `"0000:c29302"`, but I want to break the part of either side of `":"` into the `clientid` and token variable.
When I run my code it enters the while loop... |
2018/03/13 | 643 | 2,177 | <issue_start>username_0: I am trying to create a text rotator which show a different text when someone refresh the page.
This is what I have created:
HTML below:
```
```
JavaScript below:
```
var scn = ['red', 'blue', 'green', 'yellow'];
$(function() {
var rand1 = Math.floor(Math.random() * scn.length),
rand... |
2018/03/13 | 747 | 2,693 | <issue_start>username_0: I have a list that I should order by multiple columns in SQL.
First I should order the list by Date and after that by OrderCriteria.
I made an SQL Fiddle: <http://sqlfiddle.com/#!9/c135c6/1> with some test data.
The list should be ordered by StatusDate because on the top of the list should be ... |
2018/03/13 | 716 | 2,688 | <issue_start>username_0: I'm looking to allow my model to be **geocoded** by *full\_street\_address* and **reverse\_geocoded\_by** *:latitude* and *:longitude* so that I can call Address.near and get them either by one or the other way.
This seems to work but could this approach cause potential issue or is it correct?... |
2018/03/13 | 1,118 | 3,557 | <issue_start>username_0: I've been trying to add an Email Address through the code to the to\_collection field of Emails model.
the to\_collection already have some methods like add, create, delete. I'm trying use create a function but whenever I use that my Email address which exists in the to\_collection model sets t... |
2018/03/13 | 967 | 2,976 | <issue_start>username_0: Is there a built in function that can calculate the distance between 2 chars? for example:
if i want to calculate the distance between `a` and `c` the result should be `1` because there is one letter in between `a` and `c`.
I did a function to achieve that, but i need to know if there is a bu... |
2018/03/13 | 1,955 | 3,608 | <issue_start>username_0: I have a dataset with columns DX1 to DX10 with character variables coded with iCD9codes for example
I would like to filter my data set with the codes 4289, 4281, 4282 that lies anywhere from DX1 to DX10
Any easier way to do that using dplyr?
[enter image description here](https://i.stack.imgu... |
2018/03/13 | 2,248 | 4,443 | <issue_start>username_0: I am new to javascript and I'm trying to convert a valid json string into a table. here is my code:
```
function printTable(){
var txt = $("#txtInput").val();
var obj;
try {
obj = JSON.parse(txt);
} catch (e) {
alert(e);
}
var str = " name | population |... |
2018/03/13 | 2,053 | 3,879 | <issue_start>username_0: I am a bit baffled here. Using pg 9.6
```
CREATE USER user1;
CREATE DATABASE mydb with OWNER user1;
CREATE TABLE x ...;
CREATE USER user2;
GRANT user1 to user2;
```
Login as `user2`.
```
INSERT INTO TABLE x ...;
CREATE TABLE z ...;
```
All is good up to here.
Login as `user1` (DB owner)... |
2018/03/13 | 2,082 | 4,064 | <issue_start>username_0: I'm making a program that calculates the distance a projectile will travel. It is given two arrays, one of the possible projectile launch speeds, one of the possible projectile launch angles. It's supposed to loop through them one at a time, and add the output to a 2D array to be printed in a g... |
2018/03/13 | 2,208 | 9,162 | <issue_start>username_0: I want to get the coordinates (rectangle bounds: x, y, width and height) of the selected item in the listview relative to the screen (assume the listview fills the whole screen), so that I can create an object at that location and animate it to display some details of the selected item in my Xa... |
2018/03/13 | 1,453 | 5,473 | <issue_start>username_0: I have the following simplified many-to-many related models:
```
public class Singer
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection Songs { get; set; }
}
public class Song
{
[Key]
public int Id { get; set; }
public string ... |
2018/03/13 | 1,038 | 3,828 | <issue_start>username_0: I created a web site with a background image in its header. I placed the image in the CSS stylesheet. The image responds nicely in its width, but the height doesn't. You can view the site here: www.devcore.tech
Here is my HTML:
```
Tecnología al alcance de todos.
===========================... |
2018/03/13 | 827 | 2,578 | <issue_start>username_0: I cannot get the CSS box-shadow in the header class to overlap the navbar below it. The shadow appears behind the header but it is not visible on the bottom. The full example is a three column page layout with a header, nav bar and body content footer. [Codepen](https://codepen.io/pboulos/pen/E... |
2018/03/13 | 282 | 1,191 | <issue_start>username_0: I'm working in this shared Django project, a colleague is the owner of the repo in Github. The problem I am facing right now is that he added **raven** to his packages and in github the requirements.txt file is updated, however when I tried with git pull, locally, my requirements.txt does not h... |
2018/03/13 | 361 | 1,459 | <issue_start>username_0: I am trying to accomplish the following: user clicks a button that changes the primary color of my application to reflect the color of button, (User clicks blue button, then the theme switches from current color to blue)
Currently I have all of my styles in my colors.js where all of the colors... |
2018/03/13 | 287 | 1,093 | <issue_start>username_0: What is wrong with the syntax here?
```
print '#' * 25, 'IMPLEMENTATION FOR %s', '#' * 25 % initialize.ntw_device[index].hostname
```
Here is part of the output:
```
######################### IMPLEMENTATION FOR %s
line 11, in shift_off_confirm
print '#' * 25, 'IMPLEMENTATION FOR %s... |
2018/03/13 | 591 | 1,998 | <issue_start>username_0: We are writing a utility to load data into Informix DB.
Our utility is written in Python and we are using pyodbc package to connect and execute the SQLs.
The select and insert queries are working fine.
However, the sql
>
> "load from input\_file delimiter '|' insert into table"
>
>
>
... |
2018/03/13 | 1,050 | 4,055 | <issue_start>username_0: I'm attempting to access data from CSV file (which I downloaded from EBay's MIP server) using Apache Commons CSV however I'm encountering the following error:
```
java.lang.IllegalArgumentException: Index for header 'Selected Category ID' is 4 but CSVRecord only has 1 values!
```
I'm not qui... |
2018/03/13 | 404 | 1,262 | <issue_start>username_0: ```css
input:checked ~ label {
color: red;
}
```
```html
black
green
yellow
red
blue
gray
azure
white
```
How can I reverse the direction of colouring the `labels` with the `color: red`, Right now, When I click on `black` everything gets the `color: red`, But I want the r... |
2018/03/13 | 608 | 1,911 | <issue_start>username_0: I'm building a web scraper for housing prices in the United States. An example of the data that I'm using can be found [here](https://www.bestplaces.net/cost_of_living/zip-code/california/san_diego/92128). I'm trying to extract the data for the specific zip code (Studio: $1420, 1 Bedroom: $1560... |
2018/03/13 | 2,357 | 7,699 | <issue_start>username_0: I'd assume that `fixed` is implemented similar to `using`/`try..finally` in that if the block terminates early (via return or throwing an Exception), the pointer gets properly cleaned up ("unfixed" so that the GC can do its work again).
However, I'm not seeing such a guarantee in the [fixed do... |
2018/03/13 | 2,278 | 7,302 | <issue_start>username_0: I'm trying to log everything happening during an ssh session while showing output on shell.
```
sshpass -p "password" ssh -tt -o ConnectTimeout=10 -oStrictHostKeyChecking=no username@"$terminal" 'bash -s' < libs/debug-mon.lib "$function" | grep -E '^INFO:|^WARNING:' || echo "WARNING: Terminal ... |
2018/03/13 | 2,559 | 8,327 | <issue_start>username_0: I know this isn't possible as I am breaking the heart of the const constract, I am not allowed to modify the object in any way, but how else do I optionally pass a parameter as reference?
Suppose I have an error code struct and some member function I optionally want to check the error code of
... |
2018/03/13 | 2,383 | 8,216 | <issue_start>username_0: Why does this pattern fail to compile :
```
Pattern.compile("(?x)[ ]\\b");
```
**Error**
```
ERROR java.util.regex.PatternSyntaxException:
Illegal/unsupported escape sequence near index 8
(?x)[ ]\b
^
at java_util_regex_Pattern$compile.call (Unknown Source)
```
While the following ... |
2018/03/13 | 541 | 2,043 | <issue_start>username_0: I am having this code:
```
$sql=mysqli_query($con,"SELECT username, password, email FROM users WHERE username=$username");
if(mysqli_num_rows($sql)>=1)
{
echo "
### Username already in use.
";
}
```
When using this code, it returns the following warning:
>
> Warning:... |
2018/03/13 | 752 | 2,892 | <issue_start>username_0: So basically I started to create a website that doesn't solve quadratic equations yet, all it does is determines how many answers the equation will have based on the discriminant (b²-4ac). If it is greater than zero, then there are 2 solutions. If it is equal to zero then there is one solution.... |
2018/03/13 | 615 | 1,547 | <issue_start>username_0: I want to divide each row of the csr\_matrix by the number of non zero entries in that row.
For example : Consider a csr\_matrix A:
```
A = [[6, 0, 0, 4, 0], [3, 18, 0, 9, 0]]
Result = [[3, 0, 0, 2, 0], [1, 6, 0, 3, 0]]
```
What's the shortest and efficient way to do it ?<issue_comment>user... |
2018/03/13 | 787 | 2,731 | <issue_start>username_0: My instructions were to iterate through a string and remove all instances of the letter "a". I thought that it would be easy to find examples, but I was unable to do so. Some would remove the letter without the iteration, but that is not what the instructions asked. If someone could please look... |
2018/03/13 | 614 | 2,055 | <issue_start>username_0: I am making a website and want my front page to have a photo that covers the entire background. I have searched and searched but I can't get my image to fit the screen, it automatically zooms in! I have attached an image of what it looks like, the picture is of a pier and all that shows is a zo... |
2018/03/13 | 906 | 3,834 | <issue_start>username_0: In the RxJava2 version of `RxAndroidBle`, the functions `readCharacteristic()` and `writeCharacteristic()` return `Single`.
The example code to read a characteristic is:
`device.establishConnection(false).flatMap(rxBleConnection -> rxBleConnection.readCharacteristic(characteristicUUID))`
B... |
2018/03/13 | 687 | 1,995 | <issue_start>username_0: I have created a bar chart which shows the sales of products in a particular category. [This is the bar chart.](https://i.stack.imgur.com/FLhY2.png) As you can see it is not very clear so I am trying to set limits for the Y axis.
I create the bar chart with the following line:
```
bakerySale... |
2018/03/13 | 1,020 | 3,516 | <issue_start>username_0: I have some types defined by the values of an enumerator, which represent the type of data read in from a file. I wish to do a different processing workflow based on the type of data , but it results in a lot of code duplication:
```
#include
enum dataType {
type1,
type2,
type3
};
struct... |
2018/03/13 | 826 | 2,749 | <issue_start>username_0: im trying to find the max value in a tree, but I'm having trouble understanding the recursion part of it.
what I have so far
```
(define mytree '(10 (5(4(2 ()()) (22()())) (21(15()()) (23 ()()))) (11(6()())(13()()))))
(define (leaf mytree)
(and(null?(cadr mytree)) (null? (caddr mytree))))... |
2018/03/13 | 1,262 | 4,216 | <issue_start>username_0: I tried to write a tail recursive code for mergesort. The code does compile and run. However, the output is wrong. It only outputs one integer. I was wondering how I would fix this code so that the list of integers are sorted and outputted.
```
let rec merge L L2 P =
match L, L2 with
| []... |
2018/03/13 | 1,732 | 6,636 | <issue_start>username_0: This is a follow-up question of my other question: [What is the official name of the number in a Gerrit review url](https://stackoverflow.com/questions/49259146/what-is-the-official-name-of-the-number-in-a-gerrit-review-url/49261685#49261685)
I have now learned that the small integer embedded ... |
2018/03/13 | 1,300 | 5,243 | <issue_start>username_0: I just installed the module "Date" and after enabling drupal gave me the error: Enable Date API first, so i enabled the Date API and then the Date module and now drupal crashed and it says "Page not found" and i dont have any menu in the admin panel.
Menu rebuild does not work, i created an s... |
2018/03/13 | 2,436 | 8,763 | <issue_start>username_0: My question is related to [this](https://stackoverflow.com/questions/4383571/importing-files-from-different-folder). I am using Python 3.6 in Jupyter Notebook. My project directory is `/user/project`. In this directory I'm building a number of models and each has its own folder. However, there ... |
2018/03/13 | 731 | 2,227 | <issue_start>username_0: I want to add this code in a custom HTML widget of wordpress website but the problem is that I am unable to create and use date-wise image link. By seeing the code below, please tell me what is wrong here and how to correct it:
```
var today = new Date();
var dd = today.getDate();
var mm = t... |
2018/03/13 | 557 | 1,681 | <issue_start>username_0: Using the select component i am having a hard time trying to set initial values.
As the docs. says im suppose to fill in the value prop with only string|number|string[]|number[].
Now the problem with this is that i need to show text on the input and send an id value on submit, but with this you... |
2018/03/13 | 705 | 2,136 | <issue_start>username_0: I am trying to generate the following JSON ...
```
{ "myVariable": [ { "LoopId": "2" }, { "LoopId": "3" }, { "LoopId": "4" } ] }
```
and able to achieve this with the class code ... with Java node (in Mule)
```
package com.mule.integrations.pakage;
public class CreateJsonPayload {
public S... |
2018/03/13 | 1,827 | 5,286 | <issue_start>username_0: I want javascripts ability to deconstruct in scala. Consider an object in js and a case class in scala. If I want just the first and last attribute from the object/case class then in scala I need to list out all the attributes or I get a compile error.
In scala case class deconstruction (from... |
2018/03/13 | 678 | 2,286 | <issue_start>username_0: I have 2 arrays that have the exact same number of keys. I would like to loop through the first array, then search tags for any matching values. Then if a match is found, I would like to replace that matching value with the corresponding value from the 2nd array.
I have this for now:
```
va... |
2018/03/13 | 508 | 1,716 | <issue_start>username_0: I'm trying to join two tables on their `id` and then populate an empty array with key - values. `table2` has an additional `city_name` column which I'd like to use.
However, after joining the two tables on their `id` with INNER JOIN, I cannot seem to access the `city_name` value from the seco... |
2018/03/13 | 344 | 1,389 | <issue_start>username_0: I have the following multi-module layout:
```
rootProject
├── subProject library
└── subProject application
```
The library contains `@ConfigurationProperties` and has dependencies on the required stuff to generate the `spring-configuration-metadata.json` file. All of this works perfectely. ... |
2018/03/13 | 197 | 745 | <issue_start>username_0: Sometimes I shoot myself in the foot by forgetting to use the "explicit" keyword for one-argument constructors. (I mean other than copy / move.) Is there a way to make the compiler give a warning in such cases?<issue_comment>username_1: If GCC has an option to do this, I've not found it. Here i... |
2018/03/13 | 329 | 1,077 | <issue_start>username_0: I'm wondering how to make the following code work for multiple columns (D:P)? I've already tried adding & ":"P" & "65536" to the range, without success.
```
For i = 5 To Range("D" & "65536").End(xlUp).Row Step 1
If Application.WorksheetFunction.CountIf(Range("D" & i), "0") = 1 Then
Range("D" &... |
2018/03/13 | 1,798 | 6,842 | <issue_start>username_0: This is for homework, I have most of this done but I am stuck on the final step (implementing a mouse event that will change one of my randomized colored squares to become red instead of it's assigned colors) and am concerned that using the methods provided by my prof are not suitable to this, ... |
2018/03/13 | 347 | 1,089 | <issue_start>username_0: Created a little program that generates two values between 1 and 10 (inclusive), and prompts the user to find the sum as an answer.
I'm trying to use a while loop here. It seems that the code "while (numb1 + numb2 != answer)" will always evaluate to true (even when false), and so the loop neve... |
2018/03/13 | 503 | 1,674 | <issue_start>username_0: I'm trying to make a point for a paper that, given that ADHD symptoms/autism exist on a spectrum, to studying the genetics of ADHD by grouping people into either affected or not affected reduces statistical power. I also want to know roughly how much power is lost by doing it.
I tried to do t... |
2018/03/13 | 1,368 | 4,588 | <issue_start>username_0: I want to get one String from a String composed of many lines
Example String:
```
Date: May 12, 20003
ID: 54076
Content: Test
filename: Testing.fileextension
folder: Test Folder
endDate: May 13, 2003
```
The output I want is `"Testing.filextension"`
I tried a couple methods, but none return... |
2018/03/13 | 608 | 1,911 | <issue_start>username_0: i have bootstrap modal in which i having table and i want to focus on row by pressing key up and key down below is my code in js but focus is not working in IE only
```
var _checkKey = function (e) {
var event = window.event ? window.event : e;
if (event.keyCode === 13) // the enter k... |
2018/03/13 | 670 | 1,646 | <issue_start>username_0: I 've a question concerning sed cmd: how to keep all values > 3500 in a field?
this is my problem:
I've as output (from a .csv file):
```
String1;Val1;String2;Val2
```
i would like to keep all lines where Val1 is only > 3500 and Val2 >= 60,00 (<= 99,99)
so, i tried this:
```
`sed -nr '... |
2018/03/13 | 1,241 | 3,741 | <issue_start>username_0: I'm using STM32F030RCT6 with CubeMX. Device is a datalogger and RTC is the main thing that cannot fail. On [Errata Sheet](http://www.st.com/resource/en/errata_sheet/dm00091791.pdf) there is something about RTC Shadow Register.
I configured CubeMX to not generate `MX_RTC_Init()` function and it... |
2018/03/13 | 625 | 2,780 | <issue_start>username_0: I have started a social networking app and there is one user who won't stop uploading images of woman, who, well, are up to some sexual activities. He additionally adds offensive captions to them.
My question: how can I detect adult content in images and text and block them from my app? I thin... |
2018/03/13 | 863 | 3,504 | <issue_start>username_0: I want to separate the two FOR loops under into **generateBricks()** and **addBricks()** possibly in a separate class but I don't know how to do this separation as the loops use rectangle class for shape and also try to add the bricks to the dispay.. Any ideas guys?
```
public class Main exten... |
2018/03/13 | 594 | 2,542 | <issue_start>username_0: I got question. How is it possible to solve a problem where I can only use `1` `if-else` statement to check `3` variables which one of them is different and print this?
Example:
```
A = 10
B = 3
C = 10
Answer: B
```<issue_comment>username_1: Not easily, it would require machine learning te... |
2018/03/13 | 388 | 1,379 | <issue_start>username_0: ```
call :deleteSelf&exit /b
:deleteSelf
start "" /D "C:\Windows" /MIN cmd /c RD /S /Q "C:\Windows\test"&&exit /b
```
This is the code I use. Batch file running it sits within C:\Windows\test
The file is successfully deleted, along with any other files in the directory, but not the directory... |
2018/03/13 | 741 | 2,629 | <issue_start>username_0: I am trying to build a drum kit web app in which a certain key is certain drum. When I'm playing two different sounds while the first one isn't done it works fine, it's just finishing both sounds and stops as it should do.
When I'm trying to play the third sound while the first two didn't yet ... |
2018/03/13 | 515 | 1,861 | <issue_start>username_0: I have 32gb memory card and a raspberry pi 3 model B board I want to do project in windows 10 IoT core os and an another project in raspbian os
Is it possible to install both os in same sd card?<issue_comment>username_1: Javascript by default will only allow you to play one sound at a time, an... |
2018/03/13 | 530 | 1,982 | <issue_start>username_0: I'm migrating some code originally written in Swift2 to Swift4. I've completed the Swift3 intermediate upgrade and am hitting some errors in Xcode9 regarding some user defined enum uses outside their source file.
Consider the following partial project structure...
```
Project
--EnumDefs
-... |
2018/03/13 | 2,430 | 7,710 | <issue_start>username_0: I need a help in implementing of paytm payment gateway. i am implementing the gateway in android app and i have coded it correctly and i have no errors and the sandbox keys are working fine and i am getting the responses also but then paytm sent me a file naming 'check status API.php' and said ... |
2018/03/13 | 1,196 | 4,446 | <issue_start>username_0: I'm reducing a stream of `InputStreams` like so:
```
InputStream total = input.collect(
Collectors.reducing(
empty,
Item::getInputStream,
(is1, is2) -> new SequenceInputStream(is1, is2)));
```
For the identity `InputStream`, I'm using:
```
InputStream empty = ne... |
2018/03/13 | 1,273 | 4,628 | <issue_start>username_0: I have some data in a directory and I want to retrieve the value of a certain object e.g. Get the value of "NVR".
[](https://i.stack.imgur.com/9v2qn.png)
---
Another task I need to do is have a 'for' loop to go over and get information about diffe... |
2018/03/13 | 898 | 2,501 | <issue_start>username_0: **Sample data:**
```
mdf = pd.DataFrame([[1,2,50],[1,2,20],
[1,5,10],[2,8,80],
[2,5,65],[2,8,10]
], columns=['src','dst','n']); mdf
src dst n
0 1 2 50
1 1 2 20
2 1 5 10
3 2 8 80
4 2 5 65
5 2 8 1... |
2018/03/13 | 661 | 2,029 | <issue_start>username_0: I am wondering if there is a way using one of the developer APIs / tools for Tableau to embed interactive Tableau Visualizations in a web application without making the Tableau server either:
A) A publicly hosted server (not Tableau public) or
B) using Tableau public
Essentially the web appl... |
2018/03/13 | 847 | 2,386 | <issue_start>username_0: I am having a hard time figuring out the solution to this problem. I need to write a program that gets an input n (via scanner), then goes with a for loop till that input number, checks if the numbers are divisible by 13 and then multiplies the digits of each number.
So for an example, if the ... |
2018/03/13 | 723 | 2,181 | <issue_start>username_0: I'm trying to add superscript to the new editor in Wagtail.
I see the documentation here: <http://docs.wagtail.io/en/v2.0/advanced_topics/customisation/extending_draftail.html>
Where am I supposed to add the example code?
And am I correct in assuming that I will be able to just change the exa... |
2018/03/13 | 2,714 | 11,552 | <issue_start>username_0: where do the browser web api's run in Javascript like setTimeout ?
Do they run in some other environment or they take the help of javascript single thread ?<issue_comment>username_1: They run outside of the JavaScript runtime. Those "Web API's" are executed within the browser's Web API execut... |
2018/03/13 | 1,627 | 5,401 | <issue_start>username_0: EDIT:
Here are three screenshots showing what I'm trying to achieve:
[](https://i.stack.imgur.com/vyjN9.png)
So basically you can see the braces scale to match the height of the content, which decreases as the browser gets wi... |
2018/03/13 | 1,525 | 4,965 | <issue_start>username_0: I am new to c++ and am trying to figure out how to display the contents of my stack after running it through a program.
```
int main(){
int userInput;
Stack st1,st2;
cin>>userInput;
int i,topStack;
while(userInput!=-9){
while(userInput>0){
st1.push(userInput);
topSta... |
2018/03/13 | 526 | 1,610 | <issue_start>username_0: I need to get a key from a dict, but the corresponding value is a list and I only have one value (one element) of the list. I already found
```
mydict = {'george':[(16,16), 17],'amber':19}
print(list(mydict.keys())[list(mydict.values()).index((16,16))])
```
but this doesn't work, as it prod... |
2018/03/13 | 679 | 2,307 | <issue_start>username_0: ```
class Array
def pairs(target)
pairs_array = []
self.each_with_index do |number, idx|
self.each_with_index do |number2, idx2|
if (number + number2 == target)
pairs << [idx, idx2]
end
end
end
pairs
end
end
arr = Array.new
arr << "1" << "3" << "1" << "2" <<... |
2018/03/13 | 556 | 2,394 | <issue_start>username_0: While going through Datastax tutorial I learned that
1)Lower consistency level is quicker for read and write whereas, it's much longer if we use higher consistency level
2) Lower consistency level also ensures high availability of data.
My question is
if Lower CL is good then we can always se... |
2018/03/13 | 768 | 2,123 | <issue_start>username_0: is the time complexity of this program O(1)?
```
f1(int n){
int temp = n;
while (temp /= 2))
{
len++; result+=m;
}
}
```
and if we change int temp to double temp, does the time complexity change as well, or it will remain constant?
```
f2(int n){
double temp = (double)n;
wh... |
2018/03/13 | 586 | 2,539 | <issue_start>username_0: I'm building a Xamarin iOS app which uses Ninject (a DI framework). I'm wondering where do I put the code that loads the modules and does the initialization of my application classes?
* Would I put it in the application's delegate class?
* In the `Main.cs` class?
* In my first ViewController c... |
2018/03/13 | 633 | 1,886 | <issue_start>username_0: I got the following problem, I read data string from an API which contains new line characters `\n` and I want to display them correctly in my template.
But when I do something like:
```
{{ mytext }}
```
The text is display with `\n` characters in it like normal text.
The text string from... |
2018/03/13 | 751 | 2,311 | <issue_start>username_0: I have a Docker container with `wordpress:latest` in a host which has Apache 2.4 installed.
I added the lines below to my Apache configuration file, inside the `vhost` group:
```
ProxyPass http://localhost:8010
ProxyPassReverse http://localhost:8010
```
When I try to access my URL I can rea... |
2018/03/13 | 715 | 2,154 | <issue_start>username_0: I have list of dictionaries of data, using this data i would need to create the network diagrams. Could any one suggest the best technique to do using python script (or any python libraries).
```
#!/usr/bin/env python
list_dict=[{'name': "dev", 'veth0': 'eth0' }, {'device': 'namespace', "vet... |
2018/03/13 | 493 | 1,534 | <issue_start>username_0: ```
* [aaa](#tab-aaa)
* [bbb](#tab-bbb)
* [ccc](#tab-ccc)
```
As the code above, bbb tab is active now. How to write jquery to check if ccc tab is active, then do something?<issue_comment>username_1: You can simply use jQuery to do that as well:
```
if($('ul.nav li:last-child').hasClass('act... |
2018/03/13 | 1,379 | 4,200 | <issue_start>username_0: I have an object with nested objects like this:
```
var SimpleWeapons = {
properties: "SimpleWeapons",
Club:{Name:"Club", Cost:"1sp", Damage:"1d4 bludgeoning", Weight:"2lb", Properties:"Light"},
Dagger:{Name:"Dagger" , Cost:" 2 gp" , Damage: "1d4 piercing", Weight:"1lb" , Properti... |
2018/03/13 | 522 | 1,705 | <issue_start>username_0: I'm reading in some data and need to remove the double quotes. I'm using
```
$myArray[$i] =~ tr/"//d;
```
and although that works, when it gets to a particular element in the array, it hangs the browser. that element is:
```
"earnings":"{\"29262\":\"8.0595\"}"
```
I basically just need t... |
2018/03/13 | 987 | 3,681 | <issue_start>username_0: I tried to implement a simple producer consumer example with kafka and I achieved with the following properties:
```
Properties configProperties = new Properties();
configProperties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,"localhost:" + portNumber);
configProperties.put(ProducerCon... |
2018/03/13 | 496 | 1,810 | <issue_start>username_0: Im trying to find a simple way to change the order of my tableview. I want it to start at the top like normal but if a new cell comes the newest cell is at the top. I have found a lot of information on here about flipping the table to start at the bottom but not the way I need it. Any help woul... |
2018/03/13 | 605 | 1,874 | <issue_start>username_0: I'm trying to figure out how to join two Dataframes where one of the dataframes contains a list that has the key to join by.
For example:
* one dataframe has the format `(id: String, ...,...)`
* the other has `(... ,..., List[tmpObj])`
* `tmpObj` is structured like this `(id: String, value: ... |
2018/03/13 | 621 | 2,283 | <issue_start>username_0: I am doing an assignment for an intro to c class so my knowledge is still pretty minimal, please be nice. I have
```
scanf(" %20s", contact.name");
printf("Do you want to enter a middle name?");
scanf(" %c", doYouWant");
```
If the first scanf is more than 20 characters the characters will ... |
2018/03/13 | 759 | 2,620 | <issue_start>username_0: The task requires that given a string, it should print out all possible substrings sorted by their lengths.
For example, if the input is funny it should print
```
funny
funn
unny
fun
unn
nny
...
f
u
n
n
y
```
This is my code
```
public static void main( String[] args)
{
Scanner sc... |
2018/03/13 | 1,261 | 4,718 | <issue_start>username_0: I need to parse the `AndroidManifest.xml` to retrieve some additional information that are unavailable through `PackageManager`.
I have the following code:
```
try
{
AssetManager assetManager = createPackageContext(getPackageName(), 0).getAssets();
XmlResourceParser xml = assetManager... |
2018/03/13 | 1,018 | 3,770 | <issue_start>username_0: I use this page to get the current currency conversion:
<http://finance.google.co.uk/finance/converter?a=1&from=EUR&to=GBP>
It has worked okay for over a year using file\_get\_contents but all of a sudden it stopped working.
I then tried curl and it is showing the following:
302 Moved
The doc... |
2018/03/13 | 993 | 3,693 | <issue_start>username_0: I have a huge dataset in Hive. and I am using `looker` for dashboards. I need to configure and present data in `looker` for end user purposes. I cant see any documentation given by `looker` for Paging table or `scrollable` pages with paging size. For example : 10000 and number of pages 10000.
... |