date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/20 | 1,213 | 4,125 | <issue_start>username_0: I have XML similar in structure to the below example stored in a Camel header as a String:
```
xxx
aaa
bbb
ccc
John
4324234
New Book
dsdaassda
...
...
```
I would like to extract the library element into another Camel header
```
xxx
aaa
bbb
ccc
```
How can I achieve t... |
2018/03/20 | 320 | 1,125 | <issue_start>username_0: How to pass data of a hidden input through AJAX:
It's not a form, just a hidden input.
```
$.ajax({
type: 'POST',
url: 'messages-get-new.php',
data: ??????????
success: function (data) {
console.log('Submission was successful.');
console.log(data);
$con... |
2018/03/20 | 771 | 3,071 | <issue_start>username_0: I need to send the response before executing some part of the code using PHP. I am explaining my code below.
```
$name=$_POST['name'];
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$description=mysqli_real_escape_string($connect,$_POST['description']);
... |
2018/03/20 | 611 | 2,201 | <issue_start>username_0: I am trying to run `cordova emulate android` but I am getting this error. I have installed `gradle`, and I also configured `$ANDROID_HOME` path variable.
**The error message:**
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
... |
2018/03/20 | 778 | 2,760 | <issue_start>username_0: For instance, in a Kubernetes cluster environment created using kubeadm, there are management Pods with the same IP address as the host's IP address like below.
```
[root@master1 ~]# kubectl get pods -n kube-system -o wide
NAME READY STATUS RESTAR... |
2018/03/20 | 537 | 1,674 | <issue_start>username_0: >
> This is the code right here. I cant fix this thing. Please help
>
>
>
```
php
$strNewsQuery = '
SELECT TOP 15
N.[title],
C.[title] AS category,
C.[icon] AS icon,
N.[datetime],
N.[forenlink],
N.[text]
FROM [' . $_CONFIG['db_databas... |
2018/03/20 | 621 | 2,340 | <issue_start>username_0: I have input stream as wso2event on wso2 SP, and it contain timestamp and payload. Payload is in xml format. How can I parse this payload to variables? I see this doc <https://wso2-extensions.github.io/siddhi-map-xml/api/4.0.11/> but i don't know, how get incoming wso2event to sourcemapper and ... |
2018/03/20 | 1,469 | 5,018 | <issue_start>username_0: Quoted from C++ Primer 5th **19.2.1. The dynamic\_cast Operator**
>
> A dynamic\_cast has the following form:
>
>
>
```
dynamic_cast(e)
dynamic\_cast(e)
dynamic\_cast(e)
```
>
> where type must be a class type and (ordinarily) names a class that has virtual
> functions. In the first ... |
2018/03/20 | 342 | 1,381 | <issue_start>username_0: I have installed PANDAS using -> pip install --upgrade pandas.
"Requirement already up-to-date:--------"
But when I use :
```
import pandas as pd
```
on spyder this is the error
```
import pandas as pd
Traceback (most recent call last):
File "", line 1, in
import pandas as pd
ModuleNotF... |
2018/03/20 | 463 | 1,331 | <issue_start>username_0: How to create a select query on oracle that will select the present year and present year +1
sample table
```
Col1
2016-2017
2017-2018
2018-2019
2018-2019
```
```
select count(*) from tablename
where Col1 = sysdate||-||sysdate+1;
```
and the output must be 2, because the present year was... |
2018/03/20 | 734 | 2,561 | <issue_start>username_0: I got a LAMP testing server (Apache 2.4.25) and in order to test http2 I have configured SSL with a self signed certificate. Everything works except jQuery Ajax requests which works perfectly over http, but now over https it returns an error 404.
The PHP framework is codeIgniter behind.
Could... |
2018/03/20 | 363 | 932 | <issue_start>username_0: Say I have a field numCommande with a string "1610131223ZVV40" where 161013 is a date in form yymmdd.
Is there any way in SQL to extract that 13/10/2016 date from the string field ?
Thanks!<issue_comment>username_1: ```
SELECT TO_CHAR(TO_DATE(SUBSTR(Column_Name,1,6), 'YYMMDD'),'DD/MM/YYYY') F... |
2018/03/20 | 507 | 1,636 | <issue_start>username_0: I am working on a Spring-MVC application in which I am trying to stream mp3 data. Unfortunately, it's directly triggering a download whenever a byte-array of information is sent in response. I found a few other links, but most of them are tied to an user-interface, so not much useful. What are ... |
2018/03/20 | 1,307 | 5,148 | <issue_start>username_0: My question is this: what is the best way (or at least an effective way) to write to a file from multiple processes?
**Note:** I am using c++11 and I want this to run on any platform (i.e. pure c++ code only).
I have done some research and here is what I have concluded:
1. In my processes I ... |
2018/03/20 | 886 | 3,330 | <issue_start>username_0: I get the following `warning: parameter 'tupleValue' set but not used [-Wunused-but-set-parameter]`, but the parameter is explicitly used in return statement.
Does it really mean that the return value is ignored somewhere later in the call sequence and compiler is just cool enough to optimize i... |
2018/03/20 | 1,039 | 4,229 | <issue_start>username_0: first:
```
public class VolatileTest{
public volatile int inc = 0;
public void increase(){
inc++;
}
public static void main(String[] args) {
VolatileTest test = new VolatileTest();
for(int i = 0 ; i < 2 ; i ++){
new Thread(){
... |
2018/03/20 | 399 | 1,595 | <issue_start>username_0: Lets say my model looks something like this.
```
public class OrganizationDTO
{
public int Id { get; set; }
public string Name { get; set; }
public List Storages { get; set; } = new List();
}
public class StorageDTO
{
public int Id { get; set; }
public string Name { get; set; }... |
2018/03/20 | 283 | 762 | <issue_start>username_0: Im trying to get a regex to find all the parts of this string seperated by pipe. My attempt thusfar finds the 233, but when i try to catch the alphanumeric string, it fails.
```
(\d+)?|([A-Z+0-9+])?
```
The string is
```
233|LTE02ERBS00126|N/A|ULSA|1|1|263655|/company/ul_spectrum_files/MeCo... |
2018/03/20 | 700 | 2,435 | <issue_start>username_0: I am currently creating a module to execute a set of codes on hookActionProductCancel. Module is running well and I would like to send out an email after execution.
```
$template_path = $this->local_path . 'mails/';
Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')),
'xxx', //need to ch... |
2018/03/20 | 606 | 1,967 | <issue_start>username_0: I'm already using the [r2\_score](http://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html) function but don't understand how I can get the "adjusted" R^2 score from this. The description at this page doesn't mention it - maybe it's the adjusted score by default?<issue_com... |
2018/03/20 | 644 | 2,506 | <issue_start>username_0: I'm new to akka and I'm trying to use it similarly to the Executor framework to fire off some tasks asynchronously as such:
```
override def receive: Receive = {
case msg: (Int, ListMap[Double,Double], ListMap[Double,Double]) => processHour(msg._1, msg._2, msg._3)
case msg: String => p... |
2018/03/20 | 3,017 | 4,606 | <issue_start>username_0: I have a `data.frame` object in R , for which I want to have non-unique row names:
```
38.40000 41.75200 44.38400 44.18400 45.37600 37.49600 41.36800 33.93600 38.00800 42.51200 46.49600 40.48000 45.40800 46.32800 43.78400 39.88800 38.84000 40.56800 42.03200 38.89185
45.53846 50.08462 ... |
2018/03/20 | 454 | 1,797 | <issue_start>username_0: My daemon keeps querying db on a cronly basis. In every iteration, (a) the deamon makes a DB query (b) receives some documents from db (c) processes those results. I want to emit *the number of documents returned for the query* on Datadog. What is the right metric type?<issue_comment>username_1... |
2018/03/20 | 846 | 2,408 | <issue_start>username_0: I am trying to install BIND server on centos7.
I configured name.config and db.zone myroot-servers.loc .
I check named-check config and is work properly
but when I give command for named-checkzone following error occurred
**[root@localhost ~]# named-checkconf
[root@localhost ~]# sudo named-ch... |
2018/03/20 | 665 | 2,055 | <issue_start>username_0: For reference this is how the paragraph looks like.
```
{180319 arun S B} first set of chars. first chars.
{180316 yyay S B} second set of chars. second line.
{180314 ramaw S B} third line. third line. third line.
{180309 jfds S B} fouth line
{180221 shrbsd S B} fifth line.fith line part 2.
{... |
2018/03/20 | 587 | 2,011 | <issue_start>username_0: How to check if enum is equal to the one of possibility cases. Is there better solution than:
```
[.orderedAscending, .orderedSame].contains(Calendar.current.compare(date, to: range.from, toGranularity: .day))
```
In my opinion it is a little bit unclear and I looking for better.
### Edit:... |
2018/03/20 | 444 | 1,659 | <issue_start>username_0: I'm trying to configure Gitlab / Git in multi-user and multi-project mode on linux
I have two local repositories
**The problem:**
If I create a repository specifying the login in the url, the local config will contain this credential, and we can only use this one. So we lose the ability to k... |
2018/03/20 | 423 | 1,661 | <issue_start>username_0: I am trying to enable navigation in Kendo grid using arrow keys. I have seen may examples where arrow keys are used to navigate only between editable cells. There are 50+ columns in my kendo grid in which 20+ cell are editable. I have created a keydown event in databound which works fine only f... |
2018/03/20 | 3,766 | 13,033 | <issue_start>username_0: I am getting this weird error anytime i try to build apk
```
Process 'command 'C:\Users\<NAME>\AppData\Local\Android\sdk\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1
```
here is the logcat
```
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':... |
2018/03/20 | 1,206 | 3,248 | <issue_start>username_0: I trying to show the weekends between 2 dates in a formatted way.
For an example:
```
$start = strtotime(date('Y-m-d'));
$end = strtotime(2018-06-12);
for ($i = $start; $i <= $end; $i = strtotime("+1 day", $i)) {
//show weekends as
// saturday and sunday - march 24-25, 2018
// saturday - m... |
2018/03/20 | 1,394 | 2,744 | <issue_start>username_0: I'm developing a script in python2 to generate a xml file with information that is in a database (psql database), but I get the following error:
>
> Cannot serialize datetime.datetime(2018, 2, 4, 23, 5) (type datetime)
>
>
>
The code is the following:
```
for row in rows:
Jobs = ET.S... |
2018/03/20 | 1,023 | 2,071 | <issue_start>username_0: TypeError: Converting circular structure to JSON
at JSON.stringify ()
```
var userInfo = currentUser.children;
if(currentUser.type ==1){
userInfo.push(currentUser);
//console.log(typeof userInfo);
}
```
It produce me error Converting circular structure to JSON. H... |
2018/03/20 | 580 | 2,192 | <issue_start>username_0: I currently creating a program using Java + Selenium WebDriver, currently having a difficulty of looping technique in Java.
Below is my code:
Assume,
>
> rt = {Capacity Utilization,Overlay Report}
>
>
> fq = {15 Minute,Hourly,Daily}
>
>
>
Code::
```
for( String rt : rep_type ) {
... |
2018/03/20 | 344 | 1,177 | <issue_start>username_0: I am testing yesware track emails, I am sending a test email to my email address while clicking the link in the email it's showing that link is opened from my IP address also the link is opened in different IP at the same time, just worried is my email is hacked, confused any suggestions
That... |
2018/03/20 | 629 | 2,693 | <issue_start>username_0: [](https://i.stack.imgur.com/dUugb.jpg)
As you already know that **Android Oreo** introduced the new design for **media controls**, rather than selecting a singular color for the **notification based on the app's color**, medi... |
2018/03/20 | 652 | 2,373 | <issue_start>username_0: In my C++ code I get events about data that has to be inserted in the database.
The events produce different threads and I have a BlockingConcurrentQueue that is used in a producer consumer model.
Every thread writes (produces) in the queue something like:
```
INSERT INTO CHAT_COMMENTS (chat... |
2018/03/20 | 824 | 2,523 | <issue_start>username_0: I like how easy it is to write some variables to console output in C++ using `qDebug` from Qt:
```
int a = b = c = d = e = f = g = 1;
qDebug() << a << b << c << d << e << f << g;
```
Result:
```
1 1 1 1 1 1 1
```
In comparison, using `std::cout` would require me to add the spacing and new... |
2018/03/20 | 321 | 1,261 | <issue_start>username_0: Is it possible to have the Dropdown Context Menu work for the whole Table row? We can render the Dropdown using the cell render method, but that way it doesn't cover the whole table cell because of cell padding. Thus the user has to precisely click the displayed text, instead of the whole cell.... |
2018/03/20 | 954 | 3,896 | <issue_start>username_0: I am trying to get the default language from the browser and I use the following code to get it:
```
var languages = HttpContext.Request.UserLanguages;
```
Since the above is not supported with .NET Core 2 I tested with:
```
var requestContext = Request.HttpContext.Features.Get();
```
How... |
2018/03/20 | 1,056 | 4,055 | <issue_start>username_0: The condition I have is :
```
nvl(GECM_ICP_PKG.GECM_GET_PARAMETER_VALUE_FNC('GECM_SCX_VALIDATION','REN_SCX_VALIDATION',v_org_name,NULL,NULL),'N') = 'Y'
SELECT nvl(GECM_ICP_PKG.GECM_GET_PARAMETER_VALUE_FNC('GECM_SCX_VALIDATION','REN_SCX_VALIDATION',v_org_name,NULL,NULL),'N') FROM DUAL;
```
H... |
2018/03/20 | 3,178 | 8,364 | <issue_start>username_0: There is a big javascript library (~ 40 000 lines of code) and an application which uses less than **50%** of the library's code.
There is a test which utilizes all the needed functionality from the library and can produce coverage report.
How to remove programmatically every unused line of c... |
2018/03/20 | 650 | 1,927 | <issue_start>username_0: trying to get the monthly aggregated data from Legacy table. Meaning date columns are strings:
```
amount date_create
100 2018-01-05
200 2018-02-03
300 2018-01-22
```
However, the command
```
Select DATE_TRUNC(DATE date_create, MONTH) as month,
sum(amount) as amount_m... |
2018/03/20 | 1,221 | 3,178 | <issue_start>username_0: I'm trying to transform this unicode value:
>
> string\_value = u'd\xe9cid\xe9'
>
>
>
to
>
> string\_value = u'décidé'
>
>
>
I feel like I've tried everything:
```
decoded_str = string_value.decode('utf-8')
```
or
```
string_value = str(string_value)
decoded_str = string_value.... |
2018/03/20 | 917 | 3,438 | <issue_start>username_0: Sorry for bad English :)
I ran into a problem in my application. I want to implement a post search by the post title, post text, and its tags, I have a search form and I want ALL posts that contain this word in the title or text or tags to be displayed, but now it works differently, for exampl... |
2018/03/20 | 749 | 2,621 | <issue_start>username_0: I have a file that contains names of directories and some other information, but the names always come first.The file looks like this:
```
/home/user/Desktop/IS/proj_1/sch/text 4 2018-03-14 07:41:01
/home/user/Desktop/IS/file1.txt 3 2018-03-14 16:50:01
...
```
I have a variable "name" that c... |
2018/03/20 | 470 | 1,739 | <issue_start>username_0: Consider the following code:
```
auditlog.getMessages()
.stream()
.filter(m -> messageId.equals(m.getMessageid()))
.findFirst()
.orElseThrow(NoMessageFoundException::new)
```
`NoMessageFoundException` is a custom unchecked exception, extending from `RuntimeException`. When `f... |
2018/03/20 | 641 | 1,991 | <issue_start>username_0: ```
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect('hostname', username='test1234', password='<PASSWORD>')
path = ['/home/test/*.txt', '/home/test1/*.file', '/home/check/*.xml']
for i in path:
for j in glob.glob(i)... |
2018/03/20 | 739 | 2,267 | <issue_start>username_0: I have below mentioned data frame in R:
```
ID T1 T2 T3 T4 T5 T6
Jul-17 8 2 1000 1 1 15000
Jun-17 3 2 2000 5 1 25000
May-17 9 2 5000 4 1 30000
```
I want to c... |
2018/03/20 | 472 | 1,490 | <issue_start>username_0: I am using opentok for video feeding in my application.
How to integrate annotations on opentok using javascript?<issue_comment>username_1: The `glob` will not magically start working with a remote server, just because you have instantiated `SSHClient` before.
You have to use Paramiko API to ... |
2018/03/20 | 755 | 2,651 | <issue_start>username_0: I have this code
```
textureAtlas = TextureAtlas("atlas.atlas")
val box = textureAtlas.findRegion("box")
```
I want to create a texture with "box". Is it possible? box.texture return the original texture, not the regioned. Oh and I don't want to use Sprite and SpriteBatch. I need this in 3D... |
2018/03/20 | 545 | 1,955 | <issue_start>username_0: Hi Im still learning node and trying something cool with javascript nodejs.
Meanwhile I got stuck when pass separate "where" sequelize statement into one.
Okay, this is my current code :
```
var periodsParam = {};
periodsParam = {
delete: 'F',
tipe: 1,
... |
2018/03/20 | 865 | 3,612 | <issue_start>username_0: Yes, I read the other questions on the same topic, but they do not cover my issue.
We run two environments; DEV and Prod. The two were synched last week, meaning they ought to contain the same data, run the same SSIS packages, and source the same source data.
However, today we had a package o... |
2018/03/20 | 500 | 1,916 | <issue_start>username_0: I need to perform two operations on the result of JSON responses.so can we have those different operations inside single JS file? or do we need to have mapping like one JS file for one operation.
Please help on this<issue_comment>username_1: I don't recommend trying to create complicated JavaSc... |
2018/03/20 | 377 | 1,434 | <issue_start>username_0: I've got a PowerShell-Script to create a VM from an Image in Azure and in this Script I deposited a `.json` (Parameter for VM, etc.). But if I want to create more than one VM the Names of the VM, Vnet, etc. cannot be the same for every execution (have to be in the same Resource Group).
So my ... |
2018/03/20 | 395 | 1,555 | <issue_start>username_0: I am having an issue while binding the Image path to img src in angular 2.
I am saving the image in localdisk and saving the path in the database and retrieving the image path and binding to the img source tag but it is not binding. I tried to bind the local disk url directly to the image tag t... |
2018/03/20 | 706 | 2,526 | <issue_start>username_0: I am trying to have expandable list items in a table with constant header. For this I am using `Table` and `ExpansionPanel` component from React material ui 1.0.0-beta.34. However, table is not alligning well. All the body data comes under one header `TableCell`.
Here is my code.
Table compo... |
2018/03/20 | 760 | 2,614 | <issue_start>username_0: I can print the date in this format: Mon, Mar 19, 2018, but I am not sure how to get the Day of the week in this format.
Please help<issue_comment>username_1: dateFormatter.dateFormat = "EEE, MMM dd, yyyy"
For dat of week in alphabets, you use EEEE or EEE similar to MMM & yyyy for month year.... |
2018/03/20 | 1,044 | 4,017 | <issue_start>username_0: How can I return 1 or 0 using COUNT between two dates?
```
CREATE PROCEDURE [dbo].[CheckCharterDate]
@DateCheck date,
@DateCheck2 date,
@charterID int
AS
SELECT Count(StartDate)
FROM Booking
WHERE StartDate >= @DateCheck
AND EndDate <= @DateCheck2
AND CharterID = @charterID
RETURN 0
```
... |
2018/03/20 | 1,138 | 4,140 | <issue_start>username_0: I am getting error as
>
> Too few parameters expected 1
>
>
>
on below line. Please assist
```
mrs.Open sSQLSting, Conn, 3, 1
```
Complete coding
```
Dim Conn As New adodb.Connection
Dim mrs As New adodb.Recordset
Dim DBPath As String, sconnect As String
DBPath = ThisWorkbook.FullNam... |
2018/03/20 | 1,183 | 4,414 | <issue_start>username_0: I have 2 clases named Fruits and Balls. For each of them, one of the attribute is Price. I need to make a static metod that return from an mix aray only the element with the smallest Price. I have the objects f1, f2, f3, b1, b2, b3.
I've made an ArrayList list like this:
```
{ Fruit f1 = new ... |
2018/03/20 | 1,719 | 6,606 | <issue_start>username_0: I am making an app that lets the user upload PDF files and then I save them to Firebase. Now I'm trying to display them in my app, I don't want to let the user download the file, but I want it to be displayed directly in the app.
This is how I save the files:
```
private void uploadFile() {
... |
2018/03/20 | 373 | 1,339 | <issue_start>username_0: In my `swift 4` project I have `iOS 9.0` as `deployement target` and I'm using the `safe area layout guide`.
In the `storyboard`, I always give 0 as value between my main `view` top space and the `safe area` top. When I run the application in `iOS 9` or `iOS 10` I'm having a white space at th... |
2018/03/20 | 602 | 2,121 | <issue_start>username_0: Ive just installed redis and sidekiq on my app,
I Have a job to update a field on the users table when called upon,
And a job that sends an email once a week to all users.
Now if i boot up sidekiq with `bundle exec sidekiq` The job to update the users field fires off and completes but the ... |
2018/03/20 | 369 | 1,294 | <issue_start>username_0: I came across a weird issue on google chrome which seems to be new because I'm pretty sure it worked before (on older version).
```css
.container {
width: 400px;
height: 266px;
overflow: hidden;
position: relative;
border: 2px solid red;
margin-bottom: 30px;
}
iframe {
... |
2018/03/20 | 631 | 2,161 | <issue_start>username_0: **my array**
```
$data1 = array(
array(
'title' => 'My title',
'name' => '<NAME>',
'date' => 'My date'
),
array(
'title' => 'Another title',
'name' => '<NAME>',
'date' => 'An... |
2018/03/20 | 735 | 2,306 | <issue_start>username_0: First I will explain my situation:
I added react-native-multiple-select-list package to my react-native project by running: 'yarn add react-native-multiple-select-list':
```
"dependencies": {
"react-native-multiple-select-list": "^1.0.4"
}
```
The package react-native-multiple-select... |
2018/03/20 | 386 | 1,123 | <issue_start>username_0: I am new in excel-python. I wanted to export values in to excel from python. I have simple code as below.
```
import xlwt
book = xlwt.Workbook (encoding = "utf-8")
sheet1 = book.add_sheet ("sheet 1")
sheet1.write(0,0,"Display")
x = 1
m = 1
for x in range (1,9):
sheet1.write (m,0,x)
pr... |
2018/03/20 | 695 | 2,359 | <issue_start>username_0: I am using WP Job manager with Woo Subscriptions.
Now:
1. Initially, I selected a package(Woo Subscription)
2. Then I added all the details.
3. But did not submit it.
4. Came back to the site, so to buy again I need to select a package. So I selected the package and filled in details and went... |
2018/03/20 | 572 | 2,215 | <issue_start>username_0: I am trying to store the result of my read/write stored procedure in local temporary table. After creating the temp table i am writing -
```
INSERT INTO #TMP call SPName;
```
to store the result in temp table but it says **feature not supported**. Is there anyway to store the result of stor... |
2018/03/20 | 1,521 | 4,544 | <issue_start>username_0: I have a pandas dataframe:
[](https://i.stack.imgur.com/HNXlY.png)
It has around 3m rows. There are 3 kinds of `age_units`: Y, D, W for years, Days & Weeks. Any individual over 1 year old has an age unit of Y and my first grouping I want is ... |
2018/03/20 | 608 | 1,936 | <issue_start>username_0: I want to make an online appointment in my Laravel project. For that I have generated a mail function for the appointment.This mail function is working in xammp server....But not in live server.
Got this error while trying to send mail
```
GET http://sencare.com.bd/sencare.com.bd/confirm_app... |
2018/03/20 | 898 | 3,095 | <issue_start>username_0: I wonder if you can help me slim down my code.
I've built a bespoke *share* include for a client site. It works fine but I'm sure one of you clever lot can help me to make it less bulky.
I have three share URLs:
`$share_url_facebook`, `$share_url_twitter` and `$share_url_linkedin`.
Each URL... |
2018/03/20 | 361 | 1,223 | <issue_start>username_0: I runned into few examples where people share code for calculating the difference between two days.
Eg.
```
$now = new DateTime();
$itemDate->diff($now)->format("%r%a")
```
But almost always these types of posts don't really have an explanation about what format parameters are about. I'm o... |
2018/03/20 | 912 | 3,095 | <issue_start>username_0: I have a template txt file. This template needs to be written as 10 new files where I can then make amendments to each file based on certain conditions (not relevant to the question).
I read my template file as follows:
```
with open('template.txt', 'r') as template_file:
file_lines = te... |
2018/03/20 | 736 | 2,450 | <issue_start>username_0: I want to create a nested JSON format which looks something like this for my `Event` model.
```
"event" {
"quiz": {
"name": "",
"desc": "",
"events"[
{
"name": "general quiz",
"desc": ""
}]
"dance":{
"name":"",
"desc":"",
"events"[{
"name":"sol... |
2018/03/20 | 581 | 1,819 | <issue_start>username_0: I want to redirect to `https://` on my website and remove any `www.` subdomain in the url using htaccess on my WordPress site, because my security certificate doesn't cover the `www` subdomain. This is almost working:
```
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP\_HOST} ^www\.
Rewri... |
2018/03/20 | 409 | 1,251 | <issue_start>username_0: I have a library which has structure similar to this
```
class Foo {
bar(someArgument){
const baz = {"foobarbaz" : someArgument}
Object.assign(this, baz)
}
}
```
intented usage is similar to this
```
var foo = new Foo
foo.bar(myArgument)
```
How can I write a facade around t... |
2018/03/20 | 1,321 | 3,995 | <issue_start>username_0: My docker file looks like this:
```
FROM openjdk:9
VOLUME /tmp
ADD target/myjar-1.0-SNAPSHOT.jar app.jar
ENTRYPOINT [“java”,”-jar”,”/app.jar”]
```
When I run `docker build -t myjar` it builds fine.
When I run `docker run image` I get this error:
```
/bin/sh: 1: [“java”,”-jar”,”/app.jar”]: ... |
2018/03/20 | 2,392 | 9,560 | <issue_start>username_0: Are there some special things that must be considered to avoid memory leaks in [Mule Applications](https://www.mulesoft.com/de/resources/esb/what-mule-esb)?
How can we avoid memory leaks in Mule Applications?
For example; Do we actually have to remove flow variables? What must be done done ex... |
2018/03/20 | 838 | 3,202 | <issue_start>username_0: I use a header only library in my C++ project.
**When I make a change** in my code, Visual Studio starts parsing files in my solution, including the included library.
Since the library is big, parsing it is slow and **I have to wait for a long time until IntelliSense becomes relevant** again.... |
2018/03/20 | 627 | 2,332 | <issue_start>username_0: ### Code used
```
var values = [
[
'value1','value2','value3'
]
];
var body = {
values: values
};
gapi.client.sheets.spreadsheets.values.update({
spreadsheetId: '1Lofhq9R7X5wzGvO7fMViN8D8q1W3fiNxO5jjP7XL_s0',
range: 'Sheet1!A1:A4',
valueInputOption:'RAW... |
2018/03/20 | 426 | 1,499 | <issue_start>username_0: I have a problem with CarouselPage. When initializing, I assign CarouselPage.ItemSource = ....
At start i need to show second page, not first.
**My code:**
```
Weeks = new ObservableCollection
{
new Week {Days = GetDays(currentMonday.AddDays(-7)), ItemTappedCommand = JobTappedCommand},
ne... |
2018/03/20 | 316 | 1,043 | <issue_start>username_0: I am using material icons, which I love, BTW. So, I've looked at the ligatures here: <https://material.io/icons/> and been using them.
But I have a screen where two of the icons aren't showing up and I can't figure it out. Here is my HTML:
```
*arrow upward*
*arrow downward*
*clear*
*... |
2018/03/20 | 872 | 2,889 | <issue_start>username_0: I have two different contents, I want to show the contents as marquee in single line and the contents should display one after another with some delay time duration.
```
Label 1 content here
Label 2 content here
```<issue_comment>username_1: Instead of using and tags (which you shouldn't... |
2018/03/20 | 577 | 2,202 | <issue_start>username_0: The query I'm trying to do is query that taking from OrderDetails all the items that accounts bought sum them for one row and show for me how much bought from any product, what i am tring to do it is to show the itemname and the item Image
not only the id and sum
this is the query that i did:
... |
2018/03/20 | 2,993 | 9,877 | <issue_start>username_0: I'm completely new to Ruby on Rails but I think I might be missing something obvious. I'm currently working on a webapp that scrapes auction websites. The bones of the app was created by someone else. I'm currently trying to add new website scrapes but they don't seem to be working.
I have rea... |
2018/03/20 | 447 | 1,544 | <issue_start>username_0: How can I use Django 1.11 as default version in **pycharm** ?
Letting you know that I'm using **macOS** and default Django version is 2.0.3 !<issue_comment>username_1: Pycharm has nothing to do with Django version. You can just install django version you need.
Use: `pip3 install django==1.11`
... |
2018/03/20 | 836 | 3,271 | <issue_start>username_0: I am working in Magento 2.2.1, I am trying to get product-collection of a category by its category id.
Every time when i use to call [using this example](https://magento.stackexchange.com/questions/125086/get-product-collection-by-category-id-on-phtml-file-magento2), I always get an error.<is... |
2018/03/20 | 425 | 1,537 | <issue_start>username_0: I'm getting this error by executing `ng g c user`, but it also happens with `ng generate component` and I don't understand i need a help:
>
> The "c" alias is already in use by the "--collection" option and cannot be used by the "--change-detection" option. Please use a different alias.
>
> ... |
2018/03/20 | 2,399 | 8,439 | <issue_start>username_0: **TL;DR: My question is how to bundle some of my sass files into single sass file?**
I've been developing an Angular component library and I package it with ng-packagr. Let's call it `@my-lib/ngx-components`.
Consumers of my lib will import my components like `@my-lib/ngx-components/navbar`.
... |
2018/03/20 | 1,776 | 6,275 | <issue_start>username_0: This is my first post, so hi everybody! :)
I have a question regarding a schema of my database. I'm writing RESTful application using Spring. The idea is to allow user to create his own diet based on products stored in DB.
So I came to creating entity Meal, which should consist of Products an... |
2018/03/20 | 1,522 | 5,190 | <issue_start>username_0: I have a NodeJS lambda function that I run on AWS. I want to write a simple test for the `.handler` function.
**CODE**
Here is the `index.js` code:
```
// importing dependencies
var mySQLWriter = require('./mySQLWriterService');
exports.handler = function(event, context, callback) {
conso... |
2018/03/20 | 453 | 1,610 | <issue_start>username_0: I'm currently trying to make my script dynamic and looking for a way to grab my file data with wildcards.
This is my old code:
```
#process .csv into the database
if(($handle = fopen("9_filename.csv", "r")))
```
Here I just grab a file through a string. Works fine. But it's static and I nee... |
2018/03/20 | 555 | 2,108 | <issue_start>username_0: I am having a problem with my C# code. The code is designed to read RFID tags and based on the UID, tell a database what kind of process to start. The problem I am having is when I read a tag and set it to the required sleep, it stil reads tags and basically waits with executing the next proced... |
2018/03/20 | 700 | 2,361 | <issue_start>username_0: I have a index.js in a folder called "vuex" with the following
```
const module = { state, mutations, actions, getters }
export default { module, plugin }
```
state, mutations, actions were imported from another file
I'm trying to get the "state" property in another file so I
```
import m... |
2018/03/20 | 720 | 2,305 | <issue_start>username_0: ```
char td[] = {'1','0','0','1','1','1'};
char s_td[] = new char[td.length];
for(int i=0; i
```
For the given code snippet, I need `s_td[] = {0,0,0,1,0,1}`, i.e. simple XOR operation.
Instead, I am getting `{ ,0, ,1, ,1}`. As you can see it is working correctly for even positions... |
2018/03/20 | 233 | 827 | <issue_start>username_0: How to get `scalesPageToFit` behaviour for HTML content displayed in a `WKWebView` *without using JavaScript*? (disabling JS is a requirement for in our case).
Sorry for not posting any code, but I have no idea how I could achieve this. All solutions I know and all I found are based on JS. [Ex... |
2018/03/20 | 695 | 2,138 | <issue_start>username_0: I'm trying to convert this query into code igniter query. But i don't know where to start. I'm new to code igniter.Please help.
```
public function get_loginsecuritydetails($security_date,$apt_id) {
$sql = "SELECT s.* , IF( DATE( s.security_date ) = DATE( '$security_date' ) , 1, 0 ) AS ... |
2018/03/20 | 303 | 1,098 | <issue_start>username_0: This is my code:
```
interface a {}
class b{}
class c extends b implements a{}
class d extends b{}
class e{
public void makeItWork(){
b[] bees = new b[] {new c(), new d()};
for (b bee: bees){
if (bee instanceof a) {
a beeA = (a) bee;
... |
2018/03/20 | 295 | 982 | <issue_start>username_0: Trying to load an .xlsx file from url but it gives error like,
```
Fatal error: Uncaught InvalidArgumentException: File
"http://localhost/test/csvfile/samplesms.xlsx" does not exist. in
D:\wamp\www\test\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Shared\File.php on line 137
```
Loadi... |