date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/11 | 442 | 1,748 | <issue_start>username_0: I have a custom post type on two websites and I have to export all posts in that post type and import to the second site.
So my post type is **"products"**. Actually, I can use Wordpress default import export but the problem is that it is not including the full details in the post type and not... |
2018/03/11 | 2,168 | 7,341 | <issue_start>username_0: I am trying to generate Extent report for my test run using Junit cucumber ,but i am getting error
```
"cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin "
```
My Error trace is as follows... |
2018/03/11 | 568 | 1,844 | <issue_start>username_0: I read other answer too related to this error but my question is not that how to solve it. Rather it is why there is the difference in below two snippets
```
void sortArray(int a[],int n,int x){
for(int i=0;i b)
swap(&a[j],&a[j+1]);
}
}
}
```
The other snippets does generates the error.... |
2018/03/11 | 456 | 1,611 | <issue_start>username_0: I need to remove all of the RSS feed links from a Custom Post Type in WP. I have tried this in my child theme:
```
remove_action('wp_head', 'feed_links_extra', 3 );
remove_action('wp_head', 'feed_links', 2 );
```
It successfully removes the links from the entire site, but I need the feed lin... |
2018/03/11 | 705 | 2,222 | <issue_start>username_0: pyplot is not showing the x-axis on the graph:
```
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('sitka_weather_2014.csv')
df['AKST'] = pd.to_datetime(df.AKST)
df['Dates'] = df['AKST'].dt.strftime('%b %d, %Y')
df.set_index("Dates", inplace= True)
# Plot Data
fig =... |
2018/03/11 | 586 | 1,912 | <issue_start>username_0: I have some data in python as an array as follows :
```
train = [("Great place to be when you are in Bangalore.", "pos"),
("The place was being renovated when I visited so the seating was limited.", "neg"),
("Loved the ambience, loved the food", "pos"),
("The food is delicious but not ov... |
2018/03/11 | 367 | 1,064 | <issue_start>username_0: I have a .txt file and on each line is some amount of numbers. What I need is to filtrate these which does not contain the same number. So I want the output to be only the lines which have all the numbers different. I have to use command `grep`!
Example:
```
File_input:
1 1 2 3 4 5
1 2 3 4... |
2018/03/11 | 360 | 1,070 | <issue_start>username_0: ```
def adjacentElementsProduct(inputArray):
i = 0
n = []
t = int(0)
b = int(1)
while i < len(inputArray):
noob = inputArray[t] * inputArray[b]
t += 1
b += 1
i += 1
n.append(noob)
return n
print(adjacentElementsProduct([3, 6, -2, ... |
2018/03/11 | 466 | 1,860 | <issue_start>username_0: Given: A Salesforce user is viewing an account page.
Desired Output: All Emails of Contacts related to the Account currently viewed as a List object.
My code:
```
SELECT Email FROM Contact WHERE Id IN (SELECT ContactId FROM AccountContactRelation WHERE AccountId = ApexPages.CurrentPage.getPa... |
2018/03/11 | 809 | 2,650 | <issue_start>username_0: Using Node js and Sequelize ORM, i'm getting a data set. I need to add a new attribute to received data and send it to client side. This is what i tried.
**Code Block 1**
```
var varAddOns = { "id" : 5, "Name" : "Cheese"};
global.meal.findOne(
{
where: { id: 5 }
}... |
2018/03/11 | 625 | 2,144 | <issue_start>username_0: Unable to inspect element from appium inspector for android device on Mac PC.
Mac: 10.13
Appium: 1.7.2
Appium Inspector : 1.5.3
Android Device Simulator: Pixel-2
Android Version: 8.0
I am able to inspect element for iOS (iPhone device) for the same application, but unable to inspect the eleme... |
2018/03/11 | 1,149 | 3,981 | <issue_start>username_0: Can someone help me with this Error?
* I put ADS in my project, and I'm getting this error when I try to build my project to Android.
* But if I put ADS OFFLINE, then the error disappears.
>
> CommandInvokationFailure: Gradle build failed.
> C:/Program Files/Java/jdk1.8.0\_45\bin\java.exe ... |
2018/03/11 | 1,389 | 4,217 | <issue_start>username_0: ***No need for answers anymore***, Of course, you can still post a solution.
I'm trying to create a Farfallino Alphabet encoder, but i can't wonder how to shift the string to right and insert spaces, to allow to insert new chars into the string.
This is my code:
```
void farfallinoEncoder(ch... |
2018/03/11 | 435 | 1,605 | <issue_start>username_0: So, I am trying to get along with creating chrome extension.
Something weird is happening, On clicking on my input submit, it clears my console log (more like, it refreshed my index page).
Here is my app.js page
```
var color = document.getElementById('fontColor');
var colors;
function ... |
2018/03/11 | 941 | 2,987 | <issue_start>username_0: I was trying to copy what is written in a file to a different file (with system calls) but my code seems not to work. I have first tried just printing with `printf()` the buffer but it also does not work. My guess is that I'm reading the file incorrectly.
```
#define BUF_SIZE 200
int main(int ... |
2018/03/11 | 884 | 3,481 | <issue_start>username_0: I have a simple page of data where the user fills in 2 fields (first name and last name) and clicks on a Save `AppBarButton` on a `CommandBar`.
Both these fields use `x:Bind` with `Mode=TwoWay` to load/update the values.
If the user fills in the textbox for first name, then fills in the textb... |
2018/03/11 | 835 | 3,337 | <issue_start>username_0: i am trying to use startactivityfromfragment()
i didnt find sumthing usefull for me to be a good example
until now i was able to move data(string of web url) from fragment to fragment
now its a diffrent story.. i think i need to use startactivityfromfragment()..
but dont know how
```
Bundle b... |
2018/03/11 | 904 | 3,060 | <issue_start>username_0: Before asking my question, I'll explain what this short piece of code exactly does: first you get a menu where you can make a choice, if you choose 1, it should ask for the watch time (W) views (V) then for the duration of the video (h),(m) and (s). But now when you choose 1 it gives me this er... |
2018/03/11 | 996 | 3,580 | <issue_start>username_0: Okay so I am new to coding and have been trying to get this java code to do what I want but so far I have had nothing but problems trying to get it to work correctly.
from what I can tell it gets to this portion of the code:
```
if (str.contains("
```
and the code breaks with this error:
`... |
2018/03/11 | 809 | 2,242 | <issue_start>username_0: Hey so i have a horizontal nav bar, that i made using an li tag, and when i try and fill in the background of the "active" tag the background-color will only fill in just around the word and not the entire box `
```css
#menuBar ul {
list-style: none;
margin-top: 0px;
}
#menuBar ul li ... |
2018/03/11 | 751 | 2,964 | <issue_start>username_0: I have some Internet Explorer problems with my Angular 5 app, because in the
IE 11 my get-requests to a django-REST backend are cached by the browser.
I found a [question](https://stackoverflow.com/questions/49547/how-to-control-web-page-caching-across-all-browsers) suggesting to add special c... |
2018/03/11 | 913 | 3,178 | <issue_start>username_0: How can I merge these two left joins: <http://sqlfiddle.com/#!9/1d2954/69/0>
```
SELECT d.`id`, (adcount + bdcount)
FROM `docs` d
LEFT JOIN
(
SELECT da.`doc_id`, COUNT(da.`doc_id`) AS adcount FROM `docs_scod_a` da
INNER JOIN `scod_a` a ON a.`id` = da.`scod_a_id`
WHERE a.`ver_a` IN ('AA... |
2018/03/11 | 695 | 2,739 | <issue_start>username_0: ```
```
That is the TextBlock. My expectation is when the textblock get the string inside the combobox it will set the foreground through that string
```
Red
Yellow
Green
Purple
Back
```
but I dont know what to bind any idea ?<issue_comment>username_1: I had the same problem.
Addin... |
2018/03/11 | 1,382 | 3,435 | <issue_start>username_0: There are 2 arrays `tooarray` and `moarray` what I want is list of all elements which are in `moarray` but not in `tooarray`.
```
var tooarray = [
{ catalogue_id: 23480,
parent_category_id: 23479,
user_id: 28434,
form_id: 4261,
name: 'Other'
},
{ catalogue_id: 23481,
p... |
2018/03/11 | 621 | 2,004 | <issue_start>username_0: I was trying to install the xkcd font for R on my Mac following the instructions in `vignette("xkcd-intro")`
```
> download.file("http://simonsoftware.se/other/xkcd.ttf", dest="xkcd.ttf", mode="wb")
essai de l'URL 'http://simonsoftware.se/other/xkcd.ttf'
Content type 'application/x-font-ttf' l... |
2018/03/11 | 659 | 2,140 | <issue_start>username_0: I am currently creating a form in Wordpress using gravity forms and an image plugin, that allows me to insert images instead of radio buttons. However, I would like the image to change when the radio button is checked. My issue is that I have no idea how to approach this, and how can I target t... |
2018/03/11 | 435 | 1,374 | <issue_start>username_0: I am trying to limit the iterations of a foreach loop to display only 4 items contained in a folder, instead of all, however at the moment it keeps displaying all items:
```
php
$dir = 'images';
$images = scandir($dir);
$i=0;
foreach($images as $file){
if ($i == 4) {
break;
... |
2018/03/11 | 2,096 | 8,999 | <issue_start>username_0: Advice on SQL tables, circular reference and foreign keys.
I'm very new to SQL (about a month or so), so please forgive any subsequent unfortunate naivete.
I working on a project on stories where a user can start a story and another user can add to that story.
At the moment, my two main tables... |
2018/03/11 | 1,332 | 5,565 | <issue_start>username_0: Jersey normally uses HK2 dependency injection, but I would like to use Jersey with Dagger 2. Both Dagger and HK2 implement JSR 330, which I have taken as evidence that this should be possible without too much effort. I found ways to make Jersey work with CDI (e.g. Weld), Spring DI and Guice, bu... |
2018/03/11 | 539 | 2,225 | <issue_start>username_0: hay im new in kotlin and i try to push notification in my app.
Unfortunately I'm having this error: "getSystemServise unresolved reference"
this is my code:
```
val intent = Intent()
val pendingIntent = PendingIntent.getActivity(this.activity,0,intent,0)
val notificatio... |
2018/03/11 | 2,015 | 5,400 | <issue_start>username_0: I have the following object inside an array:-
```
[
{"score": 5, "question": 0, "weight": 2},
{"score": 4, "question": 1, "weight": 2},
{"score": 3, "question": 0, "weight": 4},
{"score": 4, "question": 1, "weight": 4},
{"score": 2, "question": 2, "weight": 4},
{"score": 8, "question": 0... |
2018/03/11 | 660 | 2,124 | <issue_start>username_0: I have multiple images with the same class and I want to hide those images once file is uploaded to corresponding filed.
**jQuery**
```
$(document).ready(function() {
$('input[type=file]').change(function(){
$(".hide").hide();
});
});
```
**HTML**
```

Choose Image1:
![]... |
2018/03/11 | 506 | 1,952 | <issue_start>username_0: I am trying to convert bootstrap 4 template into reactjs bootstrap is working fine but there are other javascript plugins also and I don't know how to use .
Any suggestions would be appreciated.<issue_comment>username_1: Include the script tag in your index.html
Let's say if you want to includ... |
2018/03/11 | 538 | 1,819 | <issue_start>username_0: Starting a test from IntelliJ works fine.
The same test in gradle returns:
```
13:15:20.148 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding PropertySource 'Inlined Test Properties' with highest search precedence
╷
└─ JUnit Jupiter ✔
├─ HelloIntegrationTest ✔
│ └─ ... |
2018/03/11 | 1,188 | 3,245 | <issue_start>username_0: I am trying to find a word from consecutive strings inside a two dimensional array.
For example:
```
array = [[0,'r',0,0,0,0,0],
[0,'a',0,0,0,0,0],
[0,'p',0,0,0,0,0],
[0,'p',0,0,0,0,0],
[0,'l',0,0,0,0,0],
[0,'e',0,0,0,0,0]];
```
I want to m... |
2018/03/11 | 1,287 | 5,002 | <issue_start>username_0: I have following list view (the **item source** is set outside and a **list of strings**):
```
xml version="1.0" encoding="utf-8" ?
```
With clicking the button, I want to **delete the current item (string)** in the list. How is this possible?
Thanks for your help :)<issue_comment>username_... |
2018/03/11 | 896 | 3,368 | <issue_start>username_0: I'm programming with Codeigniter.
I have an error.
>
> A Php Error was encountered Severity: Warning Message in\_array() expect parameter 2 to be array
>
>
>
I have compared the code with another that works but I have not found the error.
[](ht... |
2018/03/11 | 292 | 1,101 | <issue_start>username_0: I want to make a Angry Birds kind of game in JavaScript.
Flat 2D soft egde game with no abstract user input or no complex animations.
The idea with this game is to learn to make games in JS, so i can make my own non rip-off game.
The question is wich graphics should I use for most efficiency... |
2018/03/11 | 357 | 1,245 | <issue_start>username_0: I know this could be easy question but I spent hours trying to figure it out with no luck!
I want to achieve the following SQL Command in Entity Framework:
```
SELECT * FROM Table1
WHERE RowID NOT IN (
SELECT SomeID FROM Table2 Where SomeID is not null)
```
I tried the following (Asp.Net C#... |
2018/03/11 | 788 | 2,106 | <issue_start>username_0: Sorry for one more to the tons of regexp questions but I can't find anything similar to my needs. I want to output the string which can contain number or letter 'A' as the first symbol and numbers only on other positions. Input is any string, for example:
```
---INPUT--- -OUTPUT-
A123asdf45... |
2018/03/11 | 414 | 1,446 | <issue_start>username_0: I have a class successors that contains a list of successors. [1, 2, 3, 4]
```
node_successors = Successors()
```
When the class is assigned to a variable, for example:
```
neigbour = node_successors
```
I want neighbour to be set to the list I have stored within the class (without having... |
2018/03/11 | 1,842 | 3,120 | <issue_start>username_0: ```
List arr = new List();
long max = 0;
long mul = 1;
string abc = @"73167176531330624919225119674426574742355349194934
85861560789112949495459501737958331952853208805511
96983520312774506326239578318016984801869478851843
12540698747158523863050715693290963295227443043557
66896648950445244... |
2018/03/11 | 1,883 | 6,246 | <issue_start>username_0: I've a CMake project. It uses the last version of Boost (1.66.0) that are supported in actual installed CMake version (3.11.0 rc2) but not in previous one (3.10.0).
If I build it with CMake from command line, everything is ok, but if I open the folder in Visual Studio 2017, I obtain an error b... |
2018/03/11 | 199 | 827 | <issue_start>username_0: I would like to provide structure to the firebase data tables. Hence, I want to create a schema (similar to mongoose) based on which the entries to the database can be written. How can this be achieved?<issue_comment>username_1: To validate the structure of data that can be written to the Fireb... |
2018/03/11 | 1,701 | 4,836 | <issue_start>username_0: I am trying to build Semantic-UI with gulp in a directory, but I get having these errors :
```
root@ks4000003:/var/www/mg.guylabbe.ca/web/inc/semantic# gulp build
[10:36:53] Using gulpfile /var/www/clients/client1/web179/web/inc/semantic/gulpfile.js
[10:36:53] Starting 'build'...
Building Sema... |
2018/03/11 | 415 | 1,554 | <issue_start>username_0: I have `User` model. One of it's attributes is *phone\_number*.
```
class User < ApplicationRecord
attr_accessor :phone_number
end
```
In `form_for @user`, I want to have two inputs: `dialing_code` and `number`. Then, when the form is submitted, I want `phone_number` to be equal to these ... |
2018/03/11 | 1,202 | 4,149 | <issue_start>username_0: I am using a custom directory structure and have specified the directory in `sourcedirectory` tag. But still I get the message `No sources to compile`. Although the build is successful.
My directory structure:
[](https://i.st... |
2018/03/11 | 1,193 | 3,995 | <issue_start>username_0: Here's the environment I'm on:
Linux goorm 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux
Selenium(3.10), geckodriver(0.19.1), Firefox58(I want the headless version so I don't think this would matter)
```
>>> from selenium import webdriver
>>>... |
2018/03/11 | 877 | 2,972 | <issue_start>username_0: I'm currently working with this code, anytime I click on the div it goes to the url...
**HTML**
```
[text]
```
**JQUERY**
```
$(function() {
toUrl = function(){
var GoToUrl = $(this).data('href');
var redirect = GoToUrl;
window.location = redirect;
... |
2018/03/11 | 953 | 3,323 | <issue_start>username_0: I'm learning about python at the moment and came across this code:
```
class Simple:
def __init__(self, str):
print("Inside the Simple constructor")
self.s = str
# Two methods:
def show(self):
print(self.s)
def showMsg(self, msg):
print(msg + ':'... |
2018/03/11 | 652 | 2,297 | <issue_start>username_0: I have a script that runs when a specific element is clicked on. The script changes the background color of a div. When the user clicks on the div the background color must change to #4aa3c3, but when the user clicks on the div again, it must change back to a #fafafa. The if statement works, bu... |
2018/03/11 | 459 | 1,459 | <issue_start>username_0: I'm currently building a time calculator for running and one of my calculators is to subtract time.
Once the user enters all of their times they'd like to subtract, it would look like this:
```
TimesList = [60, 120, 240, 600]
```
My question is how could I creates some statement to subtrac... |
2018/03/11 | 1,024 | 3,701 | <issue_start>username_0: Hey there i'm currently developing a lotto type game and one of my requirements is to record the frequency of the numbers inputted by the user and then display them if the users wishes to see them. The program also must be modular hence the functions.
My problem is that i can't seem to figure... |
2018/03/11 | 879 | 3,398 | <issue_start>username_0: I manage an offline, air gapped, dev environment that supports many different types of coding projects. My most frustrating project to maintain is our Android Studio projects.
Our dev environment is isolated with no access to the internet. When I have to bring a new machine up for a user or br... |
2018/03/11 | 471 | 1,868 | <issue_start>username_0: I have a form that I wish to change the action of, depending on what value a user selects in a drop down box.
The example code below shows each option value, I want to change the form action to whatever option value is chosen on a button press, how can I do this with JavaScript?
```
function... |
2018/03/11 | 891 | 2,750 | <issue_start>username_0: I am working on an Intranet with nested frames, and am unable to access a child frame.
The HTML source:
```html
VIS
[Buscar](/ma1/jsp/orD/queda.jsp)
BUSCAr
<body>
<p>soporte a tramas.</p>
</body>
<P>Para ver esta página.</P>
```
I locate the button "Buscar" inside of fram... |
2018/03/11 | 1,282 | 5,092 | <issue_start>username_0: I have two methods in which I want to be able to run concurrently.
```
public void bar(){
//Do some stuff which has a result
//If result is true, then stop foo().
}
public void foo()
{
for (int x = 0; x <= 100; ++x)
{
//Do some stuff...
//Execute bar, but don't... |
2018/03/11 | 649 | 2,309 | <issue_start>username_0: I have several objects like this and wonder how I can search between these, say that we got the number 1 and want to figure out what the name is.
Should I loop it or what do you guys suggest?
To make things clear, I do want to get the other objects by using the number. Is it possible?
```
... |
2018/03/11 | 868 | 3,155 | <issue_start>username_0: I'm making an attempt at looping through Course objects and displaying them to the console. For some reason however my solution doesn't seem to work, can anyone detect any obvious issues that I might be the cause for this? thanks :)
```
class Course
{
private int v1;
private string v2;... |
2018/03/11 | 1,351 | 5,111 | <issue_start>username_0: **Scenario**:
I have a model, `Customer`
```
class Customer(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
company = models.CharField(max_length=100)
```
and now I updated the `company` attribute witha `ForeignKey` relationship as below, ... |
2018/03/11 | 687 | 2,197 | <issue_start>username_0: I'm making a program using OpenCV and I need feature matching. I was previously using OpenCV3 but apparently getting SURF to work is a bit of a hassle so I switched to OpenCV2.4
I downloaded the pre-built libraries and I want to use them on Visual studio but I have a problem, when I run the pr... |
2018/03/11 | 3,150 | 10,150 | <issue_start>username_0: I have been reading about `map`, `reduce` and `filter` a lot because of how much they are used in react and FP in general. If we write something like:
```
let myArr = [1,2,3,4,5,6,7,8,9]
let sumOfDoubleOfOddNumbers = myArr.filter(num => num % 2)
.map(num => n... |
2018/03/11 | 1,061 | 3,972 | <issue_start>username_0: Swift, Can't compile, compiler will directly report error.
```
protocol Test {}
struct Test {}
// Swift compile output:
// Untitled.swift:4:8: error: invalid redeclaration of 'Test' struct Test {}
// Untitled.swift:2:10: note: 'Test' previously declared here protocol Test {}
```
Objectiv... |
2018/03/11 | 902 | 3,116 | <issue_start>username_0: I have problems with some query. I need to get max value and product\_name from that query:
```
select
products.product_name,
sum(product_invoice.product_amount) as total_amount
from
product_invoice
inner join
products on product_invoice.product_id = products.product_id
inner... |
2018/03/11 | 971 | 3,370 | <issue_start>username_0: I'm sending some 'for each checkbox checked' requests to a PHP file using jQuery.
How can I delay the requests in jQuery, like every second one request, to the PHP file?
The script sends all requests at same time.
```
var checked = []
$("input[name='checkbox[]']:checked").each(function (){... |
2018/03/11 | 2,660 | 8,192 | <issue_start>username_0: I had a computer vision project on Ubuntu 14.04 with ROS indigo and python3, then I had to move on Ubuntu 16.04 with ROS kinetic. Here I ran into multiple issues:
1) I installed opencv, but couldn't import it in python3, the error message was:
```
Traceback (most recent call last):
File "te... |
2018/03/11 | 397 | 1,224 | <issue_start>username_0: I need a recursive counter in python counting from 1 to n.
```
def countup(n):
a=1
def hoch(a,n):
if a<=n:
print(a)
a+=1
hoch(a,n)
hoch(a,n)
```<issue_comment>username_1: Here is a solution.
```
def countup(n):
if n ... |
2018/03/11 | 501 | 1,515 | <issue_start>username_0: I'm trying to be proxy but getting this error:
>
> Catchable fatal error: Object of class stdClass could not be converted to string in C:\wamp64\www\float\form.php on line 7
>
>
>
my form.php
```
php
header("Content-Type: application/json; charset=UTF-8");
$file = file_get_contents("htt... |
2018/03/11 | 510 | 1,672 | <issue_start>username_0: OK, i know this question was asked many times here, but i still don't get it, how to find the first repeated character in a string ?
I did something which was close, but it gave me all repeated characters instead of only the first one.
Here's what i did :
```
private static void stringChar(){
... |
2018/03/11 | 552 | 1,792 | <issue_start>username_0: I have a site that has cross-domain tracking and recently added new AMP functionality.
I wanted to ask you if next tracker creation is wrong?
```
ga('create', 'XX-XXXXXXXX-1', 'auto', {'allowLinker': true});
ga('create', 'XX-XXXXXXXX-1', 'auto', {'useAmpClientId': true});
```
or I should us... |
2018/03/11 | 3,224 | 9,094 | <issue_start>username_0: I am trying to read data from an ECU using the ISO 9141-2 protocol. The cable I'm using is OBD2 to USB, using a FT232R chip.
The programs that I am running are in C.
When I write commands to the serial port (ttyUSB0) it writes to it fine but when it reads back the received data it just returns... |
2018/03/11 | 3,219 | 9,060 | <issue_start>username_0: I tried coding a complete decimal to binary converter, which worked just fine and now I want to remove the unnecessary 0s from my output String, but it doesnt remove all of the 0s and I have no idea why.
Here is my code :
```
public class Converter {
private static final int[] ARRAY = {16348... |
2018/03/11 | 487 | 1,923 | <issue_start>username_0: According to here: <https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage>
The timestamp field should not be populated when a publisher sends a message to the queue. So this leads me to think PubSub attaches a timestamp automatically whenever it gets a message from a publisher. ... |
2018/03/11 | 783 | 2,745 | <issue_start>username_0: My Question:
============
How do I fetch a ***.svg*** file and use it with tag, so I could also interactively style it (on hover for example), ***and not like I did in my example*** with `![]()` tag?
Goal:
-----
Create a thumbnail view that shows the flag of each country (149 in number) on... |
2018/03/11 | 558 | 1,987 | <issue_start>username_0: What is the best way to mask / obfuscate email and phone number in Swift 4?
E.g. turning:
* `<EMAIL>` into `<EMAIL>`
* `9876543212` into `98*******2`<issue_comment>username_1: Basically, you could use a function like this. It hides all chars despite the leading and trailing two chars:
```
fu... |
2018/03/11 | 957 | 3,332 | <issue_start>username_0: I had the sentence.I use word2vec to embed word to vector.For example, consider I have a sentence of 5 words.so I get 5 different vectors(One for each word) for the sentence.Which is the best method to make the complete sentence as a single vector which I will pass to the ANN?<issue_comment>use... |
2018/03/11 | 604 | 1,958 | <issue_start>username_0: I have to get the hostname for a network device out of its config file. The file looks like:
```
...
hostname=T14Z18
ipaddress=192.168.0.1
...
```
How does one do that? I am ssh'ing into the machine.<issue_comment>username_1: With simple **`awk`** command:
```
awk -F'=' '$1 == "hostname"{ p... |
2018/03/11 | 529 | 2,366 | <issue_start>username_0: I searched for a way to do this but found no answers! I can change the background color of the buttons, but not the arrow color.
So far I've done this:
```
let alert: UIAlertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
alert.view.tintColor ... |
2018/03/11 | 746 | 2,858 | <issue_start>username_0: I want to get the result from an observable 10 times, doesn't matter if it is an error or success. Here is what I am trying
```
mPortalNetworkService.getApi()
.login(mUsername, mPassword, mEmail)
.repeat(10)
.subscribeOn(Schedulers.io())
.observe... |
2018/03/11 | 1,036 | 3,107 | <issue_start>username_0: Okay so I'm having some troubles.
I have a file with a few keywords in there. I have another file for the output.
I am trying to read each line from the first file, add a string at the end and the output to the last file.
Here's what I currently have:
```
def add(x, extend, file):
extend =... |
2018/03/11 | 383 | 1,280 | <issue_start>username_0: I'm stuck on a probably simple thing, but I just can't figure it out.
So this is the code:
```
List list = new ArrayList();
for (int i = 1; i <= 12; i++) {
list.add(new BigInteger("i"));
}
```
I get the following Exception:
>
> Exception in thread "main" `java.lang.NumberFormatException`:... |
2018/03/11 | 1,307 | 5,496 | <issue_start>username_0: Android Architectural components introduced new concept to store application data locally: [Room.](https://developer.android.com/topic/libraries/architecture/room.html)
Previously using a `ContentProvider` we can expose a database to other applications. How to we do the same with Room?<issue_c... |
2018/03/11 | 1,348 | 3,152 | <issue_start>username_0: I have few records like this in one table
```
123456/
53787899/
68239003-21/
5761289903120,7278/
574738992842/478389
```
I would like to check if `/` (slash) exists at end of the string, and if so, remove the slash from the end only... |
2018/03/11 | 750 | 2,750 | <issue_start>username_0: I have 300 entries defined in `routes` file, like so:
```
GET /url001 MyClass.myMethod
```
This works with URLs such as `http://localhost:9000/url001`
Now, I need to define two environments for these 300 links, for production and testing. The links would be like:
```
http://localhost:9000/... |
2018/03/11 | 504 | 1,963 | <issue_start>username_0: Sorry about the awful title, wasn't sure how to explain it properly.
I'm working on a project which monitors a value which changes with the environment. My `if` statement monitors for when a certain value exceeds a number and increases a counter to show that it has been triggered.
My problem... |
2018/03/11 | 325 | 1,381 | <issue_start>username_0: I created a WordPress function that will apply a cookie when someone visits the admin side of the website. In Google Tag Manager, I created a variable that watches for the cookie.
When I use preview mode, I see the variable looking for the cookie, but the value is still set to "undefined." I h... |
2018/03/11 | 1,939 | 5,360 | <issue_start>username_0: I have an oauth connection - it works well with all other requests, but one:
upload image for listings.
Here is the code:
```
$connection = $this->getEtsyConnection();
$imageApiUrl = 'https://openapi.etsy.com/v2/listings/'.$listingId.'/images';
$mimeType = mime_content_type($source_file);
$f... |
2018/03/11 | 709 | 2,041 | <issue_start>username_0: I have a code that reads a text file which has a bunch of numbers. I use the code below to access it but this only grabs the first line.
I have 99 other lines of data I want to access. How do I make it read the other 99 lines of data ?
```
fscanf(fp1,"%lf,%lf,%lf,%lf",&a,&b,&c,&d);
```<issue... |
2018/03/11 | 658 | 2,213 | <issue_start>username_0: I am having a problem with React.js and the way it deals with text stored in variable.
Here is how it would look like using DOM:
```js
let text = "Must credit to "https://indepthguide.com/" not Flickr.\nCopy Link Address: [indepthguide.com/](\"https://indepthguide.com/\")"
document.getEleme... |
2018/03/11 | 489 | 1,923 | <issue_start>username_0: I want my window to be **always** maximized. I try setting:
```
setWindowFlags(Qt::Window | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
(...)
showMaximized();
setMinimumSize(QSize(width(), height()));
setFixedSize(QSize(width(), height()));
```
So the window is opened maximize... |
2018/03/11 | 467 | 1,631 | <issue_start>username_0: I am trying to center each form. (sign in and signup ) inside their respective columns. It's OK for the first one, but not for the second one.
[](https://i.stack.imgur.com/t3Hlm.png)
Here is the css I am using. What could be wrong with it?... |
2018/03/11 | 536 | 1,932 | <issue_start>username_0: func1 , which is in an extension is not able to access func2 which is in a viewController. is there a way to make this possible ?
```
func func2() {
// do something
}
} //<-- View controller ends here
extension UIViewController {
func func1(){
func2()
}
```<issue_comment>username_1... |
2018/03/11 | 2,113 | 4,532 | <issue_start>username_0: I am new in R. Hopefully this is not a question that was asked before...
I am trying to subset a dataframe based on the criteria:
a. Highest value for certain ID
b. The value is at least twice as high as the next value on the list for the same ID.
The df looks like this (edited):
```
> e... |
2018/03/11 | 1,513 | 6,307 | <issue_start>username_0: I've a application which displays cryptocurrency prices. I have activity which calls the api class for retrieving the large JSON data.
This is the priceactivity class.
```
public class PriceActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceSt... |
2018/03/11 | 2,099 | 7,768 | <issue_start>username_0: When retrieving JSON data from SQLite , escape character "\" is showing up in the array. Initially I created the JSON array in Web-view javascript which then send to Android java to save in DB.
Below is my JSON string which I am sending to Java.
```
adtMf = [{"companyId":"12004","employeeId... |
2018/03/11 | 406 | 1,405 | <issue_start>username_0: I installed Microsoft Visual Studio 2017 on my Mac recently, hoping to use it to program in C++. It appeared to install correctly, no errors occurred, but it seems to be missing support for C++. It will only allow me to make projects using C# and F#; I don't see C++ anywhere.
Searching around... |
2018/03/11 | 572 | 1,810 | <issue_start>username_0: I have added a button in navbar. Navbar has 4 `li` elements and 4th contains button. I want to change the default color of the button I want to use custom css.
header.js:
```
class Header extends Component {
render() {
return (
[Udacity Logo](#)
* [Nanodegree](#)
* [Hire Talent](#)
... |
2018/03/11 | 478 | 1,808 | <issue_start>username_0: I cant get this right and wonder how to show the Firestore `FieldValue.serverTimestamp()` formatet individual depending on what `local` the device has.
The Firestore `timestamp` look like this
>
> Sat Mar 10 19:42:32 GMT+01:00 2018
>
>
>
```
try {
SimpleDateFormat dateFormat = new... |
2018/03/11 | 803 | 2,948 | <issue_start>username_0: I am creating a discord bot and it should be able to play music from youtube. I've already created the code to play music but i still need to download the music. When I download it I get this output:
```
Downloading (VIDEO NAME) - YouTube.mp4 to C:\Users\Laurin\source\repos\DiscordBot\Discord... |
2018/03/11 | 1,005 | 2,379 | <issue_start>username_0: i am struggling with the following problem.
I have 2 matrices, let's say A and B which dimension can change in time and I want to create a new matrix C as follows:
I want to subtract all columns in matrix B from all columns in matrix A. So if for example matrix A was [1 2;5 6;8 5] and matrix ... |