date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/26 | 1,666 | 4,839 | <issue_start>username_0: I am trying to update every line that has an "enjoy-clojure?" that returns true "sanity-rating" to -2 (i.e johnny's sanity-rating would be updated to -2)
```
(def student-database
{ 0 {:enjoy-clojure? false, :name "jimmy",:sanity-rating 9}
1 { :enjoy-clojure? true, :name "johnny",:sanity... |
2018/02/26 | 642 | 2,392 | <issue_start>username_0: I'm making a hobby project and I've got the following model:
```
from django.contrib.auth.models import User
from django.db import models
class Group(models.Model):
name = models.CharField(blank=False, max_length=25)
description = models.CharField(max_length=50, blank=True)
user =... |
2018/02/26 | 428 | 1,403 | <issue_start>username_0: I'm trying to join 5-6 tables which has the same columns but the data isn't related. For example, Table 1 contains Customer 1,2,3 - Table 2 contains Customer 4,5,6 and so on but none of them containts the same Customer. How can I join these 6 tables and get all the data in one table?<issue_comm... |
2018/02/26 | 965 | 3,912 | <issue_start>username_0: Is it possible to use a projection and in some related object use it's own projection?
For example, a have `Exam`, that has `List`. I'd like to request a list of exams (which I have a `@projection`), but I'd like to define the attributes to be retrieved for each related `Question`<issue_commen... |
2018/02/26 | 1,489 | 4,824 | <issue_start>username_0: I am currently stuck with my RPS program in that it will not properly store the number of times the user loses, or ties with the computer. For instance, when I run the program and enter "q" to quit I get the following output:
>
> Enter R, P, S, or Q (for quit)
>
>
> q
>
>
> You won 0 time... |
2018/02/26 | 1,297 | 4,682 | <issue_start>username_0: I am using [FDTake](https://github.com/fulldecent/FDTake) (the pod wont be too important for this question but still) to select videos from Photos which works fine. However, I would also like to be able to edit videos and limit their length to about 12 seconds. To do so I looked at the code of ... |
2018/02/26 | 3,111 | 11,100 | <issue_start>username_0: I have a design in which I have to draw half of the border around a text. The method I am using to hide half of the border around the box forces me to use an absolutely positioned child element, which goes out of the flow of the relatively positioned parent. The consequence is that, when the le... |
2018/02/26 | 615 | 2,467 | <issue_start>username_0: I'm trying to use this library in ASP.NET Core: <https://github.com/infusion/jQuery-webcam> to get the picture taken from a webcam.
In this example, [MVC Capture webcam image, save file path of image to the database](https://stackoverflow.com/questions/40371106/mvc-capture-webcam-image-save-fi... |
2018/02/26 | 616 | 2,895 | <issue_start>username_0: I have - or rather had - a working Spring application, running within IntelliJ. It contains several classes annotated with `@Configuration`, and several `@Component` beans. At some point, the following happened:
1. Intelli started showing errors in the code editor stating "*Could not autowire.... |
2018/02/26 | 663 | 2,519 | <issue_start>username_0: Help Needed: How to get the Decimal (REAL) number Only in an string in using an Excel formula or VBA?
I have in "column A" a string with just one decimal number on it. I want to extract that decimal (REAL) number ONLY but it is extracting the first number on the string. See below for details...... |
2018/02/26 | 2,777 | 5,677 | <issue_start>username_0: As per below details, dataframe has company-wise numbers. Dict has custom weightages. Company 'A' has 7 rows, so I would like to fetch custom weightages from dict with key as 7 and create 'custom\_weights' as a new column. Latest date will have highest weightage.
Similarly for Company 'B' and... |
2018/02/26 | 1,167 | 4,549 | <issue_start>username_0: I've received several text files, where each file contains thousands of lines of text. Because the files use Unicode encoding, each file ends up being around 1GB. I know this might sound borderline ridiculous, but it unfortunately is the reality:
[
So you see there is the div wit... |
2018/02/26 | 289 | 1,157 | <issue_start>username_0: I am building a static library with Visual Studio 2012 (C++), and want to give it to someone with Visual Studio 2017 so they can build their app and link against it. I will also provide the header files for them to use (but no source code that builds the library). The question is, will they be ... |
2018/02/26 | 560 | 1,677 | <issue_start>username_0: I'm trying to make an iterator that prints the repeating sequence
```
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, ...
```
I want an iterator so I can use .next(), and I want it to loop around to 0 when .next() is called while the iterator is at 9.
But the thing is that I'll probabl... |
2018/02/26 | 283 | 1,108 | <issue_start>username_0: It looks like for Rails5/RSpec systems tests, the default is to use `selenium-webdriver` gem to take screenshots when a spec fails. Is there a way to configure the format of the filename for the screen shot that gets taken? I've seen this is possible with `capybara-screenshot` gem, but I'm not ... |
2018/02/26 | 2,802 | 9,757 | <issue_start>username_0: I'm new to powershell and I want to check if file in readable and regular. In unix we can do it in one line by using -f & -r. For example the following shell script function accepts filename as argument and checks the readability and regularity of file, whats the powershell equivalent for this?... |
2018/02/26 | 197 | 693 | <issue_start>username_0: Does anyone know a method that allows you to replace all the characters in a word with a single character?
If not, can anyone suggest a way to basically print \_ (underscore) the number of times which is the length of the string itself **without** using any loops or ifs in the code?<issue_comm... |
2018/02/26 | 513 | 1,723 | <issue_start>username_0: Please explain why I receive this error when trying to sort array of objects:
`usort() expects parameter 1 to be array, object given`
Screenshot of array: <http://prntscr.com/ik3ira>
Screenshot of error: <http://prntscr.com/ik3dte>
```
function cmp($a, $b)
{
return strcmp(count($a->... |
2018/02/26 | 1,056 | 3,059 | <issue_start>username_0: I'm stuck with this problem that takes me forever, I am making a portfolio website and I want to display the projects that I have done. I'm messing around with positions and centering but I can't seem to get it right.
What I want is to have the image and text vertically and horizontally center... |
2018/02/26 | 1,217 | 4,083 | <issue_start>username_0: I am trying to take the two matrices as input from the keyboard and then trying to print out their sum on screen using C functions. I have been mind-numbing with this code for many hours and still not getting where am I going wrong. It is printing the two matrices all perfect but it's not summi... |
2018/02/26 | 470 | 1,722 | <issue_start>username_0: I am supposed to write a few lines of code to create a conditional expression (ternary operation) that evaluates to string "negative" if user\_val is less than 0 and "non-negative" if 0 or greater than 0.
The code I currently have prints "negative" when the number is less than zero but when a... |
2018/02/26 | 1,043 | 3,568 | <issue_start>username_0: I'm having trouble getting the Angular 5 Validators.pattern to work. I've tried every regex that SHOULD normally work, but it's not working. I read that Validators.pattern requires a different format, but I can't seem to find it...
Any ideas what the Validators.pattern should be to
(1) allow ... |
2018/02/26 | 1,237 | 4,033 | <issue_start>username_0: I am receiving the following string from an api:
```
{ "CallTime" : "2018-02-23T16:00:01.806Z" }
```
In my database, I want to store all date/times in zulu time. To accomplish this, I am using `DateTime.Parse` to convert this string into a `DateTime` object. Then, I use the `ToUniversalTime(... |
2018/02/26 | 4,153 | 12,516 | <issue_start>username_0: Given a list of arbitrarily deep nested lists of arbitrary size, I would like a flat, depth-first iterator over all elements in the tree, but with path indices as well such that:
```
for x, y in flatten(L), x == L[y[0]][y[1]]...[y[-1]].
```
That is
```
L = [[[1, 2, 3], [4, 5]], [6], [7,[8,... |
2018/02/26 | 835 | 2,895 | <issue_start>username_0: I've been following this tutorial to implement a live chat system into my Django project. so far it has gone well and i've fixed any issues which have come up but this one stumped me.
```
2018-02-26 19:45:34,241 - ERROR - worker - Error processing message with consumer TestApp.consumers.ws_rec... |
2018/02/26 | 487 | 1,866 | <issue_start>username_0: If you have a pure HTML/JS project, that does not require any kind of compilation or anything - but the deploy is basically just to copy the files to a web app - how do you do that?
I already have 20+ .Net projects set up for Continuous integration and Deployment, and it works great - but I ca... |
2018/02/26 | 604 | 2,216 | <issue_start>username_0: I'm using the jQuery select2 library and have tags enabled so that I can dynamically add options to the dropdown list. However, I would like to customize what the tag option looks like so that it is clear that choosing it will add the option. This is my setup:
```
$field.select2({
data: res... |
2018/02/26 | 3,691 | 11,897 | <issue_start>username_0: Trying to achieve something like this : <https://www.muicss.com/examples/v1/example-layouts/responsive-side-menu/index.html>
I've seen some examples online using other versions of bootstrap, but they all change the css too much, which makes it harder to learn bootstrap.
I was wondering if in ... |
2018/02/26 | 495 | 1,841 | <issue_start>username_0: I'm working on an angular 4 project with multiple environment files
* environment.prealpha.ts
* environment.alpha.ts
* environment.beta.ts
* environment.production.ts
There are large amounts of common lines with these files, how can I call/use a single common file and use a single specific en... |
2018/02/26 | 899 | 3,212 | <issue_start>username_0: I've got problem with css in VueJs. Sorry for poor description, but I have no idea what I'm doing wrong.
My css in style scoped works generally fine in vuejs, I can normally address idis and classes.
The problem is when I want to change for example value of internal css of an element of vue... |
2018/02/26 | 1,244 | 4,391 | <issue_start>username_0: I have the following custom transformation (kotlin):
```
private class IconTransformation : BitmapTransformation() {
companion object {
private const val ID = "com.example.widget.IconView\$IconTransformation"
private val ID_BYTES = ID.toByteArray()
private const va... |
2018/02/26 | 1,595 | 5,800 | <issue_start>username_0: I've added this piece of code to my program recently and now it seems to crash because it runs out of memory.
**This is what I've observed:**
While executing this piece of code for multiple times (1000 times.)
the memory will double or even triple. When I manually hint the Garbage collector i... |
2018/02/26 | 1,988 | 7,285 | <issue_start>username_0: Situation
---------
I'm currently writing constructors for pushing data to the database.
One of those constructors looks like this:
```js
/**
* Timestamp
*
* @constructor
*/
function Timestamp() {
this.timestamp = new Date().getTime();
this.date = new Date().toUTCString();
}
... |
2018/02/26 | 1,550 | 4,762 | <issue_start>username_0: I have the following tables:
>
> svc\_sms:
>
>
> sms\_pk | sms\_title
>
>
>
AND
>
> svc\_sms\_msg:
>
>
> msg\_pk | sms\_text | msg\_status | sms\_pk (FK to svc\_sms.sms\_pk)
>
>
>
I want to query and group all rows from `svc_sms_msg` by msg\_status, so I do:
```
SELECT sms.... |
2018/02/26 | 991 | 3,193 | <issue_start>username_0: I'd like to know how one would go about shuffle in-place the values in a specified "rectangle" of values in a DataFrame. For example, say I'd like to shuffle the values in the rectangle of data defined by columns 4 to 7 AND rows 12 to 18, inclusive. The idea is to scramble the values in those c... |
2018/02/26 | 1,065 | 3,430 | <issue_start>username_0: I would like to create an observable for `users` resource. I want to create it in a way that when I get events as `newUser` or `updateUser` my `users` array is updated accordingly.
```
const usersList = new Observable(USERS_ARRAY) // Returns list of users
const newUser = new Observable([NEW_US... |
2018/02/26 | 1,107 | 3,563 | <issue_start>username_0: I have `-`list in ng-repeat and this list is updated every second. In list I have few fields and action buttons with ng-click directive. So every second when data is updated in list `-` list is rendered again and in this moment ng-click is not firing, probably because in this small specific mom... |
2018/02/26 | 683 | 2,498 | <issue_start>username_0: I am trying to add an input field for child object in thymeleaf by jquery but I could not get the child object value in the controller.
Here's my code
>
> Parent class TestList
>
>
>
```
private String inputField;
private List projectTasks = new ArrayList<>();
public TestList() {
pro... |
2018/02/26 | 1,619 | 6,043 | <issue_start>username_0: I have the following code (**EDIT: Updated the code so everyone can compile it and see**):
```
import UIKit
struct Action
{
let text: String
let handler: (() -> Void)?
}
class AlertView : UIView
{
init(actions: [Action]) {
super.init(frame: .zero)
for action in a... |
2018/02/26 | 1,210 | 4,555 | <issue_start>username_0: I have a datagrid template column that uses a DatePicker in the cell editing template:
```
```
I want to set some properties in code for this DatePicker. I know the column is not in the visual tree so how do I reference the DatePicker in code behind?<issue_comment>username_1: **Short answer*... |
2018/02/26 | 604 | 2,013 | <issue_start>username_0: I'm creating a "guess the word" game for my intro to programming class. It uses parallel tuples where one list is the random words & the second list is the corresponding hints for those words. The game is supposed to print one of the random words with underscores in place of the vowels (ex: J\_... |
2018/02/26 | 602 | 1,806 | <issue_start>username_0: If I check collisions between circles, for example
```
int x2 = 100;
int y2 = 100;
int r2 = 10;
int count = 0;
boolean checkOnce = false;
void setup() {
size(200, 200);
}
void draw() {
background(0);
int x1 = mouseX;
int y1 = mouseY;
int r1 = 10;
if (!checkOnce){
checkColl... |
2018/02/26 | 876 | 2,354 | <issue_start>username_0: given the following table:
```
create table xx (start_time datetime, end_time datetime, label varchar(100));
insert into xx values
('20180101 08:00', '20180103 08:00', 'test 1'),
('20180101 06:30', '20180101 08:00', 'test 2'),
('20180101 10:00', '20180102 08:00', 'test 3');
```
I have to g... |
2018/02/26 | 697 | 2,359 | <issue_start>username_0: It's pretty strange in below code, It gives me different `Sum` of one Enumerable Range.
Why?
```
var num = Enumerable.Range(-10000, 20001).Reverse().ToList();
Action task1 = () =>
{
Console.WriteLine($"Sum 2: {num.Sum()}");
};
Action task2 = () =>
{
num.Sort();
Console.WriteLin... |
2018/02/26 | 809 | 2,333 | <issue_start>username_0: I need to convert this kind of output:
```
samaccountname: displayname
samaccountname2: displayname2
```
to something like this:
```
{
"samaccountname": "displayname",
"samaccountname2": "displayname2"
}
```
Could you please give me a hand?
Thanks!
BTW, this is the output of an LDAP Sea... |
2018/02/26 | 778 | 2,251 | <issue_start>username_0: I have two tables, A and B, B is 1 x 4 tables (Type, Freq, max, min) which is the output from proc mean. I want to add max and min to Table A, for each record, so there is no statement like on a.key=b.key, because I just want to add columns of the same numbers to table A. What should I do?<issu... |
2018/02/26 | 318 | 1,161 | <issue_start>username_0: I am able to compare 2 xml files using XMLUNIT 2.5 DiffBuilder. I want to ignore certain elements using withNodeFilter. But the withNodeFilter accepts only 1 element. Is there a way to ignore more that one element for comparison.
```
DiffBuilder.compare(DocB)
.withTest(docA)
.withNodeFilter(n... |
2018/02/26 | 206 | 795 | <issue_start>username_0: I am using Angluar with material design, i am facing some issue, so the question is how to make material slider disabled on some specific value
```
```
I need to show it on my component with some specific value that comes from db, and can not be changed until it will change into db.<issue_co... |
2018/02/26 | 276 | 1,109 | <issue_start>username_0: I deployed a Docker image on a Google Compute Engine virtual machine instance (see [containers on compute engine](https://cloud.google.com/compute/docs/containers/deploying-containers)). I would like to perform **regular**, **automatic** backups of this instance and it's disks.
[Container-Opti... |
2018/02/26 | 819 | 2,507 | <issue_start>username_0: So I have a container which I want to evenly space things out left to right and vertically center them. I would also like to add vertical dividers to between the content that would stretch if content gets longer.
This divider works just fine if content is not vertically centered:
```css
secti... |
2018/02/26 | 1,285 | 3,312 | <issue_start>username_0: I am trying to convert a `Vec` to a `String` for display. I have tried to use `from_uf8` and `from_iter` with no luck.
```
use rust_base58::{ToBase58, FromBase58};
let address = String::from("1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH");
let _hash160 = address.from_base58();
let mut s = String::from_... |
2018/02/26 | 1,183 | 3,198 | <issue_start>username_0: I am looking for a way to read the content of a file into a variable to later on use it in FileMaker. I have done this manually by creating a new table field and add the file into the database as record and then use import record to save it as a field. However, I wonder if there is a better way... |
2018/02/26 | 1,258 | 3,530 | <issue_start>username_0: I have created an API that contains many pieces of information related to each "User". By default "User" only have a model containing e-mail, password, username and lang.
So I have created a "UserInfo" API/Model that contains firstName, lastName, age, address and so on.
I want to give non-admin... |
2018/02/26 | 1,011 | 3,232 | <issue_start>username_0: Here is a sample script using random numbers instead of real elevation data.
```
library(gridExtra)
library(spatstat) #im function
elevation <- runif(500, 0, 10)
B <- matrix(elevation, nrow = 20, ncol = 25)
Elevation_Map <- im(B)
custom <- colorRampPalette(c("cyan","green", "yellow", "orange"... |
2018/02/26 | 866 | 2,862 | <issue_start>username_0: I am using http module of metricbeats to monitor jmx. I am using http module instead of the jolokia module because it lacks wildcard support at this point. The example configuration in the documents is as follows.
```
- module: http
metricsets: ["json"]
period: 10s
hosts: ["localhost:80"... |
2018/02/26 | 867 | 2,872 | <issue_start>username_0: I am new to coding and still trying to learn python coding.
I am trying to write a program that generates 5 random numbers and stores in a list. My output should end up like this: [2, 34, 23, 5, 22]
I am trying to find the average, lowest, and highest number from the list. I tried a few other... |
2018/02/26 | 887 | 2,831 | <issue_start>username_0: **So I upload my site to digitalocean and when I went to the admin page the CSS was not showing**
I visit all these sites but nothing seems to work
[Django doc-static files](https://docs.djangoproject.com/en/2.0/howto/static-files/)
[Pythonanywhere-DjangoStaticFiles](https://help.pythonanyw... |
2018/02/26 | 4,677 | 18,405 | <issue_start>username_0: I am very familiar with "legacy" Spring 4 applications. By "legacy" I mean without using Spring Boot and using application-context.xml files along with annotations. However, I am a newbie with Spring Boot and Configuration classes.
I am creating a new Spring Boot application, and moving some c... |
2018/02/26 | 734 | 2,317 | <issue_start>username_0: I'm trying to return a `struct` from a function.
It looks like this..
```
struct read(struct returnera returnDuo, struct vara varuArray[]) {
char varunr[LISTNUMBER], varunamn[LISTNUMBER];
FILE *varuLista;
varuLista = fopen(returnDuo.filnamn, "r");
if(varuLista!=NULL) {
... |
2018/02/26 | 582 | 1,805 | <issue_start>username_0: I have the following dataset created for this example
```
/*sample data*/
data have;
input subj param value visit$ base;
cards;
1 1 50 scr .
1 1 55 rand 55
1 1 . 1 55
1 1 . 2 55
1 2 120 ... |
2018/02/26 | 677 | 2,616 | <issue_start>username_0: Please considering this follow code, I can't update `inputVal` when I using a Keypress event handler.
```js
import React, { Component, Fragment } from 'react';
import List from './List';
import './ListTodos.css';
class Todos extends Component {
constructor(props) {
super(pro... |
2018/02/26 | 1,088 | 3,904 | <issue_start>username_0: I need to get the current width of an image, so I tried my hand at some javascript. Note, I'm working on Zen Cart, so adding classes to img src is not an option as images are output using code such as
```
php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SU... |
2018/02/26 | 996 | 3,767 | <issue_start>username_0: We have a project hosted in VSTS which consumes a NuGet package that we have hosted in a private NuGet feed behind our firewall.
Accessing the feed from withing the network is fine, and we can locally restore dependencies and build the project.
When configuring a VSTS build we have selected a... |
2018/02/26 | 1,252 | 4,506 | <issue_start>username_0: I have the following error that pops up when I try to run the emulator:
>
> Emulator: emulator: ERROR: Unknown AVD name [Nexus\_5X\_API\_27], use
> -list-avds to see valid list.
>
>
> Emulator: Process finished with exit code 1
>
>
>
Given that I just created the avd, can you help me u... |
2018/02/26 | 1,596 | 5,601 | <issue_start>username_0: I am trying to collect values from a number of input fields in a form by iterating of the inputs and then storing them as key/value pairs in a array of objects. However i am struggling to find an efficient way of doing this that does not involve a long set if if else or switch statement.
**Con... |
2018/02/26 | 2,364 | 7,474 | <issue_start>username_0: I have two network interfaces (wifi and ethernet) both with internet access. Let's say my interfaces are `eth` (ethernet) and `wlp2` (wifi). I need specific requests to go through `eth` interface and others through `wpl2`.
Something like:
```
// Through "eth"
request.post(url="http://myapi.co... |
2018/02/26 | 689 | 2,181 | <issue_start>username_0: So I am working on a report that has to show total 'pts' in a table based on the performance of certain groups of work.
Right now I have a PowerPivot that Sums Actuals, Forecasts, and the Variance. Then I have separate formulas that filter on each group so that I get a variance % based on each... |
2018/02/26 | 552 | 1,694 | <issue_start>username_0: I have a monad stack for responses from my components implemented with the cats monads transformers:
```
type FutureEither[A] = EitherT[Future, Error, A]
type FutureEitherOption[A] = OptionT[FutureEither, A]
```
the result is effectively:
```
Future[Either[Error, Option[A]]]
```
How can ... |
2018/02/26 | 247 | 838 | <issue_start>username_0: I want to make my own game 2D using Unity and I want to edit maps using tiled, but when I use tiled I get low quality I don't know how to get good quality.
[](https://i.stack.imgur.com/eBk64.png)
settings sprite
[![enter imag... |
2018/02/26 | 3,786 | 16,235 | <issue_start>username_0: Android Oreo has imposed many restrictions on running background service. Services now don't behave like normal in Oreo as they used to before.
But what if I have to run a service in background for long periods of time.
I am developing an application to launch the flashlight when user shakes... |
2018/02/26 | 587 | 1,535 | <issue_start>username_0: Can we somehow convert dates such as `"November 2017", "December 2017"` to date? I tried to import csv data, but received factor columns.
I tried the following code, but was not successful.
```
as.POSIXct(as.character(dat$Date), format = "%B %Y")
```<issue_comment>username_1: A quick solutio... |
2018/02/26 | 526 | 1,992 | <issue_start>username_0: I have a custom button component, like this (simplified):
```
@Component({
selector: 'my-button',
template: `
`
})
export class MyButtonComponent {
@Output() public onClick: EventEmitter = new EventEmitter();
handleClick(e) {
this.onClick.emit(e);
}
}
```
Normal use case... |
2018/02/26 | 277 | 1,008 | <issue_start>username_0: new to SQL. I searched around but could not find the answer. I have a table
```
Name Status1 Status2
A Canceled same_day
B Cancelled Cancelled
C Completed Completed
D Completed Completed
```
I want to return a table where Status1 not in the set ('Cance... |
2018/02/26 | 514 | 1,709 | <issue_start>username_0: I have a class HillfortStore in this package:
```
package org.wit.hillforts.models
```
Messed up the package name in the class (missing the 's'):
```
package org.wit.hillforts.model
```
Imported class into other classes with wrong package name, it works just fine:
```
import org.wit.hill... |
2018/02/26 | 605 | 2,173 | <issue_start>username_0: I am building an restful API using ASP.NET Core with Cosmos DB. There's a GetItemById request that needs a partition key.
```
public static async Task GetItemAsync(string itemId, string name)
{
try
{
Document document =
await client.ReadDocumentAsync(UriFactory.CreateDocumentUri(Databas... |
2018/02/26 | 1,251 | 4,530 | <issue_start>username_0: I am trying to get hold of a JSONArray by using StringRequest in Android along with the POST-method.
The php-script is written like:
```
$statement = mysqli_prepare($con, "SELECT * FROM tickets WHERE user_id > 5 AND completed = 1");
mysqli_stmt_bind_param($statement, "i", $UID);
mysql... |
2018/02/26 | 1,411 | 4,906 | <issue_start>username_0: I have a simple array
```
Array[4][
"A",
1,
"A1",
13
]
```
But how can i parse an JSON array when it contains both int and string? I have no problem converting all the values inside to string if they aren't already, but i can't find any function to do this.
Thanks.<issue_comment>user... |
2018/02/26 | 419 | 1,283 | <issue_start>username_0: I'm not sure why the following code is giving me incorrect answers in MS access:
```
IIf([Due Date]-[Receipt Date] Between "15" And "100000","15 + days before due date",
IIf([Due Date]-[Receipt Date] Between "7" And "15","Less than 15 days before due date",
IIf([Due Date]-[Receipt Date] Betwee... |
2018/02/26 | 1,464 | 5,230 | <issue_start>username_0: I am trying to create a way to navigate my log files and the main features I need are:
1. search for strings inside log file (and returning line of occurrences).
2. pagination from line `x` to line `y`.
Now I was checking Logstash and it was looking great for my first feature (searching), but... |
2018/02/26 | 1,096 | 4,181 | <issue_start>username_0: I have a module with a number of exported classes which all extend one base class. Each of these classes have a method called getOutput(). These classes match the structure of an API so I cant change it. The API returns a list and in that list can be any one of these classes (expect for the bas... |
2018/02/26 | 1,658 | 5,487 | <issue_start>username_0: I have one row in a table where the N value is 1 and not 0. This field is called active\_duty\_manager and I want to pull back the row where the value is 1 so I can get the user credentials.
When I query the table using the following code:
```
var params = {
AttributesToGet: ['... |
2018/02/26 | 967 | 3,428 | <issue_start>username_0: Suppose you have a class:
```
@Entity(name = "Person")
public class Person{
@Column(name = "iAge")
private int _age;
}
```
What I am doing to expose access methods is:
```
@JsonProperty("age")
public int getAge() {
return _age;
}
@JsonProperty("age")
public void setAge(int _a... |
2018/02/26 | 886 | 3,250 | <issue_start>username_0: So I'm trying to generate a random number between negative and positive range because I need to give an object a position on the x axis. I've tried with **arc4random** and **arc4random\_uniform** but it doesn't work. I need a way to generate a random position on the x axis, negative and positiv... |
2018/02/26 | 315 | 1,021 | <issue_start>username_0: I have a file with an structure similar to this one:
```
```
I've been trying to use `grep` or `xmllint` to show **only** the log tag where an specific value is provided (i.e. 30). My idea is that, by searching the number 30 or John it retrieves the entire log entry where those values exist.... |
2018/02/26 | 1,606 | 4,562 | <issue_start>username_0: I'm looking for a way to show a histogram of values (`time2`) with binwidth equal to 1, I think, and have the color of each observation ("count") be mapped to a second variable (`diff`).
[](https://i.stack.imgur.com/rElV8.png)... |
2018/02/26 | 265 | 1,042 | <issue_start>username_0: I'm using Liferay DXP. When using the Apache Felix gogo shell, **I cannot find how to do a clear-screen?** Just like cls in windows and clear on Mac / Linux. Screen grows very long and I have to do close the terminal manually and then open it up again. Hitting CTRL / CMD + C on Windows / Linux ... |
2018/02/26 | 1,098 | 4,497 | <issue_start>username_0: I'm trying to get a more concrete understanding of MVC and keeping the controller layer as thin as possible.
One thing I keep asking myself is "Where should I call modelname->save()?"
Looking at the Laravel documentation, they set data to the model and call save in the controller which doesn... |
2018/02/26 | 536 | 1,841 | <issue_start>username_0: I have this code:
### Sidebar.jsx
```
class Sidebar extends Component {
render() {
return (
{ this.props.children }
);
}
}
class Item extends Component {
render() {
return (
**{ this.props.name }**
);
}
}
export { Sidebar, Item };
```
### index.js
```
ex... |
2018/02/26 | 1,058 | 3,360 | <issue_start>username_0: Currently i'm rebuilding my website and i'm using the Wordpress customizer for setting up some homepage specific data into their corresponding sections.
I already have the data in place at the Wordpress backend but i'm having trouble splitting things up in the frontend.
I'm able to get all th... |
2018/02/26 | 297 | 1,191 | <issue_start>username_0: I've been working on a Django project, I'm using Pycharm as my IDE, the problem is that , firstly I don't have a CSS file type in the new file section, also I don't have autocomplete for bootstrap so I have to write everything manually which really is a pain in the ass.
Any help would be much a... |
2018/02/26 | 330 | 1,271 | <issue_start>username_0: I wanna send a csv file in repose of graphql query.
I am using Apollo server and Apollo client and Reactjs.
(send a csv file from server to client)
can anybody give me an idea how can I implement it?<issue_comment>username_1: the Graphql responses JSON format only if you like to download files... |
2018/02/26 | 355 | 1,094 | <issue_start>username_0: I have a dataframe with one column like this:
```
Value
xyz123
123
abc
def
```
I want to remove any rows that contain numbers so I end up with a dataframe like this:
```
Value
abc
def
```
I have tried
```
df = df[df['Value'].str.contains(r'[^a-z]')]
```
but I got this error:
"TypeErro... |
2018/02/26 | 2,159 | 4,121 | <issue_start>username_0: ```
SELECT [ItemKey]
,[Location]
,[QtyOnHand]
,[UpdatedOnHandQty]
,AffectedDate
FROM [Test].[dbo].[INCos]
where ItemKey = '20406'
order by ItemKey, year(AffectedDate)
```
Here are the results:
```
ItemKey UpdatedOnHandQty AffectedDate
20406 1594.03 2013-12-27 0... |
2018/02/26 | 704 | 2,154 | <issue_start>username_0: How do I free the 'v struct' on the next program?
```
#include
#include
struct Quaternion{
double r;
struct Q\_vec{
double x;
double y;
double z;
} v;
};
int main(void){
struct Quaternion\* q1Ptr = malloc(sizeof(struct Quaternion));
q1Ptr->r = 1.0;
q1Ptr->v.x = 2.0;
q1Ptr->v.y =... |
2018/02/26 | 367 | 1,110 | <issue_start>username_0: I am getting an error `No matching signature for operator >= for argument types: STRING, INT64. Supported signatures: ANY >= ANY at [1:60]` when I run this `R` script to fetch some data from `BiqQuery`.
This is where I get the error:
```
a <- dbGetQuery(db,
paste0("select * from dta.tbl wher... |
2018/02/26 | 1,182 | 3,481 | <issue_start>username_0: I'm trying to populate a dataframe with the result of a for-loop, but I'm missing something. I've looked at the past questions about this, but I can't get my head around the solution, so...
The fictional data:
```
df <- data.frame(RA = c(rep("14005", 3), rep("14158", 3), rep("15458", 2), rep(... |
2018/02/26 | 2,401 | 5,274 | <issue_start>username_0: I have a piece of code, but I want to pull up the performance. My code is:
```
lis = []
for i in range(6):
for j in range(6):
for k in range(6):
for l in range(6):
lis[i][j] += matrix1[k][l] * (2 * matrix2[i][j][k][l] - matrix2[i][k][j][l])
print(lis)
... |