date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/20
1,434
4,937
<issue_start>username_0: ``` $e = $ErrorActionPreference $ErrorActionPreference="stop" $E_Subnet_1 = '10.0.1' $E_Subnet_2 = '10.0.2' $O_Subnet_1 = '10.11.1' $O_Subnet_2 = '10.11.2' $D_Subnet_1 = '10.12.1' $D_Subnet_2 = '10.12.2' $Ethernet0 = 'Ethernet0' $All_Subnets = @("$E_Subne...
2018/03/20
614
2,198
<issue_start>username_0: Completely new to VBA coding but working on a project. Need help! I have a set of dates in Column J. I have to manually enter dates in cells B3, C3, D3 .... so on till K3. If the dates in the cells B3 to K3 (only if values are present in these cells) match the date in column J then i have to a...
2018/03/20
1,195
3,595
<issue_start>username_0: I have a flat array like this, I'm supposed to build a flat array for it. The object will be an children property of it's parent object if the pid is not null. How should I do this? ``` var a = [ {id: 1, pid: null}, {id: 2, pid: 1}, {id: 3, pid: 1}, {id: ...
2018/03/20
1,112
3,402
<issue_start>username_0: I currently have this setup and it works fine as I get the `first_name` in the URL as desired: ``` resources :pilots, param: first_name, constraints: { first_name: /.*/ } def to_param first_name end ``` How can I do this with two parameters - so a `first_name` and a `last_name` in th...
2018/03/20
984
3,033
<issue_start>username_0: I am trying to figure this out. My goal is to have the two `buttons`... the `yes` and `no` buttons to show **below** the text. I can change the html ofcourse, but I want/need to do it with **CSS only**. Possible? ```css .box { background-color: yellow; } .yes { background-color: gree...
2018/03/20
378
1,300
<issue_start>username_0: I am using Pythonnet to call a C# function which returns a clr Object ( an **n** x **m** matrix). In python the type is **System.Object[,]**. How can I convert this variable to a Pandas DataFrame or something more manageable? Thank you.<issue_comment>username_1: At the end the only solution I ...
2018/03/20
381
1,155
<issue_start>username_0: ``` Ep 12 ``` I want to add another div like "ep" div in span with class "dub" with javascript or Jquery<issue_comment>username_1: ``` var newDiv = document.createElement('div'); newDiv.classList.add('class-name'); document.getElementsByClassName('bar')[0].append(newDiv); ``` Upvotes: -1...
2018/03/20
1,132
4,848
<issue_start>username_0: I have a program which executes things asynchronously using a ThreadPoolExecutor. I use CompletableFutures in Java 8 to schedule these tasks and then have them executed by the threads available in the thread pool. My code looks like this: ``` public class ThreadTest { public void print(...
2018/03/20
1,550
4,348
<issue_start>username_0: I've written a function to simulate genetic drift and i'm wanting to loop it over various values of t (number of generations), however whenever I do this I get the following error: ``` locifreq<-runif(49, .4, 0.8) gen<-1:100 for (i in 1:length(gen)){ pop[i]<-lapply(locifreq,wright.fisher,30...
2018/03/20
379
1,532
<issue_start>username_0: We have an Oracle server in sister-company that is a bottleneck for our SQL Server-based business process. When we use SSIS to query all tables we need, it completes in 5 hours (millions of records, but very few changes). Business wants data refresh slightly faster. How to replicate the data f...
2018/03/20
673
2,250
<issue_start>username_0: I am trying to update the emails of all customers who are located in the 'United States' by referencing the Country table however I keep getting returned an error: Error Code: 1054. Unknown column 'country' in 'IN/ALL/ANY subquery' ``` Update Customer Set email = concat(substr(first_name,1,1),...
2018/03/20
520
1,657
<issue_start>username_0: I have to do a file comparison but I want you to exclude the comments for now it gives me a result like this. At the moment I am using: `diff -b -B [patch] [patch]` which gives me: ``` < # < # WeblogicHost bgri.wls.ri < # WeblogicPort 20015 < # SetHandler weblogic-handler < # < 45c39,43 ``...
2018/03/20
3,487
10,923
<issue_start>username_0: I need to get day of year (day1 is 1rst of january), week of year, and month of year from a dart DateTime object. I did not find any available library for this. Any idea ?<issue_comment>username_1: Day of year ``` final date = someDate; final diff = now.difference(new DateTime(date.year, 1, 1...
2018/03/20
3,992
13,474
<issue_start>username_0: ``` void Bst_DeleteStudent(struct BstStudent** root, char student_name[]){ struct BstStudent* current = *root; struct BstStudent* parent = NULL; int flag = 0; int i; while(current != NULL){ if(strcmp(current->name, student_name) > 0){ parent = current; ...
2018/03/20
1,374
4,191
<issue_start>username_0: I am trying to create a package in Oracle, but i am getting the following errors: > > > ``` > PLS-00323 > PLS-00371 > > ``` > > The package code is: ``` CREATE OR REPLACE PACKAGE mahalanobis_distance_package AS max_d NUMBER; TYPE tbnumber IS TABLE OF NUMBER INDEX BY ...
2018/03/20
3,180
10,052
<issue_start>username_0: I have been working on a hangman game in the console with JavaScript and I can't seem to figure out how to get it to randomly select past the first 2 categories. I know it must be an easy solution but I can't seem to figure it out. This is my start game function where the problem is ``` funct...
2018/03/20
670
2,213
<issue_start>username_0: I have class with property `this.eyes`. Code Below. As you can see in first case in `data.num` saved value in second reference. In my project I have no needs to array, so I need somehow to make first sample to save reference like second one. Any idea how? ```js // Warning! Pseudo Code // Samp...
2018/03/20
603
2,459
<issue_start>username_0: I am stuck at accessing the installation page, can't seem to get it to work, it always gives me a 500 Internal Server Error error. I have looked into some of the similar question solutions but they didn't work.<issue_comment>username_1: Following error you have given in your post's comment sho...
2018/03/20
622
2,517
<issue_start>username_0: I installed tensorflow on my mac and now I can't seem to open anaconda-navigator. When I launch the app, it appears in the dock but disappears quickly. When I launch anaconda-navigator the terminal I get the following error(s). KeyError: 'pip.\_vendor.urllib3.contrib'<issue_comment>username_1:...
2018/03/20
619
1,941
<issue_start>username_0: when I m running sails -v, sails lift or even installing npm I m getting this error Please help - ``` Error: Cannot find module 'commander' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at...
2018/03/20
807
2,826
<issue_start>username_0: What would be the vanilla JS equivalent of :has in this jQuery selector? ``` $('.main-container').children('.analytics:has(a)').not('#promo') ``` Within `.main-container`, I'm trying to select all `.analytics` elements without an id of "promo" that contain tags. **What I've tried:** ``` d...
2018/03/20
266
1,234
<issue_start>username_0: I know that a good way to store data like db passwords, etc. is via environment variables, but setting environment variables manually for every server instance created is time consuming. I'm planning to deploy my project to the cloud (using aws ebs or heroku). where should I store my db passw...
2018/03/20
456
1,651
<issue_start>username_0: I have a problem with FOSUserBundle and HWIOauthBundle. I use custom `UserChecker` to check whether user is banned (custom table in database as I need a ban history). When I use Facebook to log-in my `CustomChecker` is not used. It does work when I'm using login and password as authentication. ...
2018/03/20
384
1,496
<issue_start>username_0: When I try to drag a MySQL table to a DataSet after successfully adding a connection to a database in Server Explorer, I receive two error messages, one after the other: > > "Some updating commands could not be generated automatically. The database returned the following error: Unexpected err...
2018/03/20
354
1,193
<issue_start>username_0: I want to trigger a function when has an specific class, in this case `Clicked` so I want to return the alert `(unliked)` **HTML** ``` ``` **JQUERY** ``` $(".social").find(".LikePost").trigger("click"); /*when has class "clicked"*/ alert("unliked") ``` **TRIGGERED FUNCTION** ``` $('.Lik...
2018/03/20
503
1,802
<issue_start>username_0: The purpose of the app is to check whether a student is absent or present. For testing purposed. I have this code on my app. HTML ---- ``` Students Present Absent Present Absent ``` TS -- ``` attendance: any[] = [{ 'studentName': [], 'status': [] }] ``` Current, I am usin...
2018/03/20
815
2,706
<issue_start>username_0: hashmap key includes registration number and hashmap value includes owners name. Here is my code: ``` public static void main(String[] args) { HashMap data = new HashMap<>(); Scanner reader = new Scanner(System.in); data.put("AAA-111", "Jack"); data.put("BBB-222", "Matt"); data.put("...
2018/03/20
469
1,582
<issue_start>username_0: Is there a way to use the new "async" javascript keyword to replace async.map from the async module? Basically I want to avoid using the async module if possible. For example, read many files at once, then do something when all the files have been read.<issue_comment>username_1: Yes, generally ...
2018/03/20
1,948
7,175
<issue_start>username_0: I have a terraform file that creates an EC2 instance along with a couple of volumes: ``` resource "aws_instance" "generic" { count = "${lookup(var.INSTANCE_COUNT, var.SERVICE)}" ami = "${var.AMI}" instance_type = "${lookup(var.INSTANCE_TYPE, v...
2018/03/20
1,803
6,575
<issue_start>username_0: I am hosting a mongo database on [mlab](https://mlab.com), and I have an extremely simple program to insert a document into an existing collection. Insertion works for me in JS but not in Python for some reason. This is what it looks like in Python: ``` from pymongo import MongoClient client ...
2018/03/20
619
1,753
<issue_start>username_0: IN the Linnworks API documentation and Start and End Date is required for one of the API requests. The format for this is as follows; ``` 2018-02-19T16:57:07.0049771+00:00 ``` I am unsure on this formatting. Is this a default formatting of some sort or would I need to construct it? If I n...
2018/03/20
870
3,052
<issue_start>username_0: While reviewing a PR today I saw this in a class: ``` public bool ?Selected { get; set; } //question mark in front of property name ``` I suspected that the developer meant this ``` public bool? Selected { get; set; } //question mark at end of type ``` I was surprised that this even co...
2018/03/20
908
3,288
<issue_start>username_0: Consider the following ``` use namespace; class name impl... { use Trait; } ``` How would I go about it, if I would like to extract either the `use` from before the class definition or the one after? Well in the above example it would be simple enough, but if it should also work on an...
2018/03/20
788
1,717
<issue_start>username_0: I have a dataset of 4 attributes like: ``` taxi id date time longitude latitude 0 1 2/2/2008 15:36 116.51 39.92 1 1 2/2/2008 15:46 116.51 39.93 2 1 2/2/2008 15:56 116.51 39.91 3 1 2/2/2008 16:06 116.47 39.91 4 1 2/2/2008 16:16 116.47 39.92 ``` datatype o...
2018/03/20
1,562
6,241
<issue_start>username_0: The [docs](https://developers.facebook.com/docs/instagram-api/getting-started#instagram-api) say (step 4): > > In the App Review for Instagram section, click Add to Submission for each permission your App will need from its Users. instagram\_basic is required. instagram\_manage\_comments, ins...
2018/03/20
930
3,777
<issue_start>username_0: How do I update a parent object if children are changed? I have entity City that has children Street. I would like save in City entity total kilometers of streets. ``` City id | name | total 1 | example | 1000 Street id | city_id | name | kilometers 1 | 1 | first | 800 2 | 1 ...
2018/03/20
989
3,574
<issue_start>username_0: How to tell to jQuery tabledit that the rows are changed? The buttons only generated for existing rows, when I add a new row (for example using jQuery), the table buttons doesn’t appear in the new row. I saw in tabledit code, that there is possibility to switch between view and edit mode (maybe...
2018/03/20
430
1,521
<issue_start>username_0: I am new to the Semantic-UI-React framework, and recently ran across a problem that I can't seem to fix. I have a Log in & Sign up Modal on my home page. When the LogIn And Sign Up button is triggered, the Modal pops up. However, I cannot get it to appear in the center of the page. It is on the...
2018/03/20
1,023
4,157
<issue_start>username_0: In my Flink code I am using a custom input format, which throws an exception. It seems I need an instance of `RuntimeContext`, but how can I get one? My format class looks like this: ```scala MyInputFormat extends org.apache.flink.api.common.io.DelimitedInputFormat[T]{ @transient var lineCoun...
2018/03/20
2,443
8,078
<issue_start>username_0: After many years, I'm finally cleaning up my .vimrc and digging into how the settings really, really work. I spent a lot of the day trimming cruft and reading help files. Now I'm down to a pretty minimal .vimrc that I'm pretty comfortable with -- and I believe I understand what each thing in i...
2018/03/20
1,254
3,879
<issue_start>username_0: Ok so I'm trying to write a script to save the config on my network devices. I'm going wrong somewhere and I'm not sure where. It won't send the final confirmation "y" character, but I think it's due to what I'm telling it to expect. Current code: ``` import pexpect import sys import os impor...
2018/03/20
363
1,391
<issue_start>username_0: Imagine I had the following model ```py class Post(models.Model): name = models.CharField(max_length=20) body = models.TextField() class Meta: permissions = permission_generator() ``` and what I want is that the `permission_generator()` to generate the tuple ``` ( ...
2018/03/20
1,216
4,449
<issue_start>username_0: My boss recently purchased a code signing certificate from Comodo. I now have the task of making it work in VS2013 using Strong Name Key signing and perhaps as a post-build event, too. He did the whole purchasing process on the same machine (Windows 8.1 64-bit laptop) and using the same browser...
2018/03/20
1,079
3,264
<issue_start>username_0: I'm learning about regex. If I want to find all the 5 letter words in a string, I could use: ``` import re text = 'The quick brown fox jumps over the lazy dog.' print(re.findall(r"\b[a-zA-z]{5}\b", text)) ``` But I want to write a simple function whose argument includes the string and the le...
2018/03/20
1,015
3,991
<issue_start>username_0: The context ----------- I'm building my own library of code for dealing with ElasticSearch, using the Tirexs package. This is my first time heading deep into macros, dependencies, use, import and several other of the most advanced features Elixir offers. For that I have define a `Document` st...
2018/03/20
436
1,798
<issue_start>username_0: I'm currently learning about JS objects and trying to perform basic subtraction on a property that is then outputted via a method. However, the object method returns value of NaN even though `typeof` tells me `currentAge` and `currentYear`are numbers. What am I doing wrong and How can I get my ...
2018/03/20
583
2,388
<issue_start>username_0: I've made a table with geometrical figures and a for loop for printing out the name of figures that have right angle, but I would like to print out one random name for this figure that matches the condition and if it's possible create another table that contains only figures that match the cond...
2018/03/20
738
2,991
<issue_start>username_0: Given a site, AJAX components on the page and I need to wait till the whole page is fully loaded. Here is my wait method using JavascriptExecutor checking document.readyState: ``` public void waitForLoading2() { WebDriverWait wait = new WebDriverWait(driver, timeOut); if(!driv...
2018/03/20
952
3,460
<issue_start>username_0: I have my form defined as follows in the PHP file : ``` First name: Last name: Submit Top Test ``` The following functions is called when the button is clicked. ``` function submit(){ var formdata = $("#testForm").serializeArray(); var sendJson = JSON.stringif...
2018/03/20
719
2,876
<issue_start>username_0: In a laravel controller I currently have these two variables which are pulling from a their respective models. ``` $guests = Person::where('id', $id) ->with('languages') ->get(); $languages = Language::pluck('name')->toArray(); return view(...
2018/03/20
311
1,108
<issue_start>username_0: I have 2 different divs inside an id. (screenshot below). I want to select each `itslocked` div and append it to the last so the normal div should appear on the top and all `itslocked` div appears after that. [![enter image description here](https://i.stack.imgur.com/hvaBw.png)](https://i.sta...
2018/03/20
741
2,180
<issue_start>username_0: I have to sum two numbers (integers) in LaTeX. I also have to "print" the process of sum. So it would look like 5+2=7 in text. Any ideas? My code so far: ``` \newcommand{\Sum} {\newcounter{cnt} \setcountter{cnt}{1+1} } ```<issue_comment>username_1: In LaTeX, first you have to define a counter...
2018/03/20
965
3,296
<issue_start>username_0: I wrote a rest controller to return an image associated with a primary key. Now I wanted to load this image in the browser and I am running into issues: (1) If I type a GET URL to the image the browser (FireFox and Chrome) don't display the image but they are seeing all the headers properly. A...
2018/03/20
644
2,009
<issue_start>username_0: i have a struct such as ``` typedef struct bignum { long number_of_digits; char *digit; } bignum; ``` and i want to declare an array of type bignum, the array size is going to be changed dynamically , so i used `malloc()` , `realloc()` can i shrink the array using `realloc()` with o...
2018/03/20
1,565
4,563
<issue_start>username_0: Let's say I have a unsorted set of items: ``` input = set([45, 235, 3, 77, 55, 80, 154]) ``` I need to get random values from this input but in a specific range. E.g. when I have ``` ran = [50, 100] ``` I want it to return either 77 or 55 or 80. What's the fastest way to get this for lar...
2018/03/20
926
3,292
<issue_start>username_0: I'm trying to consume a webservice using JAX-WS client and https. The problem now is that i successfully created an instance of the service and get the port of the service but when trying to consume a service using that port it gives connection timeout. ``` > com.sun.xml.internal.ws.client.Cl...
2018/03/20
1,418
4,460
<issue_start>username_0: I am using reactplayer for a youtube video which uses iframe. I am trying to scale the video to my div and I want it to be responsive. I put a `width` and `height` at `100%` on the ReactPlayer, and I have a wrapper div that I put height and width on, but the reactplayer does not fit the div. ...
2018/03/20
544
1,858
<issue_start>username_0: I have a website that loops music on load, but it is too loud. I have a slider bar to change the music volume, but how would I default it to 25% of the slider? [WEBSITE](http://prova.city) ``` If you are reading this, it is because your browser does not support the audio element. function...
2018/03/20
711
2,548
<issue_start>username_0: I'm trying to attach BluePrism to a PowerShell process and input some character. [![enter image description here](https://i.stack.imgur.com/OhO5f.png)](https://i.stack.imgur.com/OhO5f.png) Currently, I can launch PowerShell and get the PID by using C#, yet I'd like to actually attach the Powe...
2018/03/20
845
2,450
<issue_start>username_0: Please help me articulate this question better by reading my scenario and question. I am wondering if the following scenario is possible: I have a table like this: ``` ID # of APPLES 1 3 2 15 3 87 4 56 ``` And another table like this: ``` ID Description 1 I have %d Apples 2 You have %d ...
2018/03/20
951
2,403
<issue_start>username_0: New react enthusiast here needing a little bit of help. So I have this set of array store in a state called **projects** ``` 0:{id: 1, title: "Business Web", category: "Web Design", deleted_at: "0000-00-00 00:00:00"} 1:{id: 2, title: "Social App", category: "Mobile Development", deleted_at: "...
2018/03/20
502
1,794
<issue_start>username_0: I'm trying to write documentation for a Module function like this: ``` /** * Usage: * * ``` * @NgModule({ * imports: [ * BrowserModule, * ..., * ThisModule.forRoot({ * name: 'Name', * version: '1.0', * ], * }), * ``` ...
2018/03/20
326
1,300
<issue_start>username_0: I want to create a messagebox or ContentDialogue which can be easily dragged with mouse like this: [![enter image description here](https://i.stack.imgur.com/sSowf.png)](https://i.stack.imgur.com/sSowf.png) How can I do this ?<issue_comment>username_1: Unfortunately the `ContentDialog` design...
2018/03/20
1,321
3,916
<issue_start>username_0: ``` df.cleaned <- df[-which(str_detect(df, "Not found")),] ``` "df" refers to a data frame, that consists of multiple columns and rows. A lot of the elements in this data frame have certain character words in them. What I'm looking to do, is to remove all those values that contain the words ...
2018/03/20
1,434
4,248
<issue_start>username_0: Here's a short explanation of the situation: I have an Ubuntu 14.04 VPS from DigitalOcean and I'm trying to install an EV SSL from Comodo for my domain. I've installed Sentora which uses Apache - 2.4.3 which a bit older than 2.4.8 (there's a small difference to what we enter into the VirtualHo...
2018/03/20
1,435
4,667
<issue_start>username_0: UPDATE: Reformatted the whole question I have a database with individual Formula 1 race results. Each driver gets points for the according to the place they finish in. Now I want to build a table with all combined points from all races for every driver. So basically a "driver standings" table....
2018/03/20
643
2,185
<issue_start>username_0: This is my code: ``` from random import shuffle def scramble(sentence): split = sentence.split() shuffle(split) return ' '.join(split) for i in range(20): reply = ['hi',scramble('me too thanks')] print(reply) ``` I'm trying to print either a scrambled version of the senten...
2018/03/20
1,038
3,143
<issue_start>username_0: I'm trying to make a script/program where I can find matching IP Addresses in two text files: * One text file that contains a list of IP addresses (1.1.1.1) * One text file that contains a list of subnets (1.1.1.0/28) And I want to use regex and I'm not really sure how to do it. Example: `...
2018/03/20
1,206
4,045
<issue_start>username_0: I'm building a BitTorrent client application in Java and I have 2 small question: 1. Can torrent contain folders? recursively? 2. If a torrent contains `n` files (not directories - for simplicity), do I need to create `n` files with their corresponding size? When I receive a piece from a peer,...
2018/03/20
803
2,817
<issue_start>username_0: I'm starting with OpenCL programming and learning about the differences between a texture buffer (also called image) and a regular buffer. From what I undersand, one of these differences is the fact that a texture fetch is cached, and with 2D locality. The question is: where is this texture ca...
2018/03/20
974
3,278
<issue_start>username_0: I am learning JavaScript and I am trying to program a small game. I want that something in my game moves consistently while I hold down a key. This is what I came up with so far: ``` document.onkeydown = onKeyDownListener; function onKeyDownListener(evt) { var keyCode = evt.which || ev...
2018/03/20
1,026
3,723
<issue_start>username_0: I am running the following code. I want to calculate accuracy of my ANN for test data. I am using windows platfrom, python 3.5 ``` import numpy import pandas as pd from keras.models import Sequential from keras.layers import Dense from keras.wrappers.scikit_learn import KerasRegressor from sk...
2018/03/20
564
2,050
<issue_start>username_0: I am in the process of brushing up my C++ after 4-5 years and while going through this video (specific problem point screenshot attached), the speaker mentions that the code to **print a linked list** is actually doing a **call by value**. But as far as my knowledge of pointers goes, isn't the...
2018/03/20
398
1,463
<issue_start>username_0: I've created a new site within IIS and pointed to my local Documents directory ``` C:\Users\name\Documents ``` via ``` http://localhost:8080/ ``` The error I'm getting is > > HTTP Error 401.3 - Unauthorized > > > I've checked the properties of the Documents folder under Security. f...
2018/03/20
416
1,413
<issue_start>username_0: I have a string: ``` sen = '0.31431 0.64431 Using drugs is not cool Speaker2'; ``` I am trying to write code that will generate: ``` cell = {'0.31431','0.64431', 'Using drugs is not cool', 'Speaker2'}; ``` The problem is that I don't want to use the number of words in `'Using drugs is no...
2018/03/20
1,262
3,680
<issue_start>username_0: As I know, the k fold cross validation is to partition the training dataset into k equal subsets and each subset is different. The R code for k-fold validation which is from R-bloggers is attached below. This data have 506 obs. and 14 variables. According to the code, they used 10 folds. **My q...
2018/03/20
795
3,000
<issue_start>username_0: I'm currently following a rabbitmq tutorial and running into an issue. No matter how close I follow the tutorial I keep getting this error when trying to run my send.py and receive.py: ``` pika.exceptions.ConnectionClosed: Connection to 127.0.0.1:5672 failed: [Errno 61] Connection refused ```...
2018/03/20
540
1,472
<issue_start>username_0: I have this matrix `mat=matrix(rnorm(15), 1, 15)` [1x15] and I want to use the function `apply` to calculate the sum of rows in matix `mat` e.g. ``` [,1] [,2] [,3] [,4] [1,] 1 2 3 0 #the sum is then 6 ``` Here is my code: ``` mat=matrix(rnorm(15), 1, 15) apply(mat[,1:15],1...
2018/03/20
432
1,293
<issue_start>username_0: Trying to parse the JSON content from AWS SQS. First converting a string to JSON String and then to JSON Object. What is the correct way to handle this scenario ? ``` // JSON from SQS var x='{"Message":"{\"default\":{\\\"key1\\\":\\\"value1\\\",\\\"key2\\\":\\\"value2\\\"}\"}","Timestamp":...
2018/03/20
854
3,637
<issue_start>username_0: I'm learning React Native and I was looking up how to make a promise chain with an API call as referenced here: <https://facebook.github.io/react-native/docs/network.html#handling-the-response>. In looking how to get user permissions, I looked at the docs page for it (<https://facebook.github....
2018/03/20
466
1,733
<issue_start>username_0: I'm trying to make an abstract class, and one of the methods that its children must override should return an instance of the child class. ``` class JsonSerializable { public: virtual fromJson(string jsonStr) const = 0; }; class ConcreteSerializable : public JsonSerializable { public: C...
2018/03/20
520
1,984
<issue_start>username_0: I want to get value of input[text] in my controller when data is changed as this source code: ``` (function () { 'use strict'; var app = angular.module('app', ['ngMaterial']); app.controller('ScanDataCtrl', function ($scope) { $scope.getScannedData = function () { ...
2018/03/20
617
2,207
<issue_start>username_0: I'm trying to access some webpage multiple times but each time I'll use different parameters. Here's an example of what I'm trying: ``` var codes = [1, 2, 3, 4, 5] for(i = 0; i <= codes.lenght; i++){ window.open('http://localhost/applicationame/execute/cod/'+codes[i],'_self'); } ``` (I...
2018/03/20
1,145
3,671
<issue_start>username_0: As you can see below I have a sample JSON array object. That's how I want the JSON structure to look like at the end. I want the object generated dynamically based on the anchor tags which are inside a list. As you can see, the title is the name (html()) of the anchor tag and URL is the href at...
2018/03/20
2,184
7,095
<issue_start>username_0: I've a Zebra ZT610 and I want to print a label, in pdf format, containing multiple pages and then have it cut on the last page. I've tried using the delayed cut mode and sending the ~JK command but I'm using a self written java application to do the invocation of printing. I've also tried to ad...
2018/03/20
6,000
19,776
<issue_start>username_0: I'm working on a project that involves a `boost::beast` websocket/http mixed server, which runs on top of `boost::asio`. I've heavily based my project off the [`advanced_server.cpp`](http://www.boost.org/doc/libs/1_66_0/libs/beast/example/advanced/server/advanced_server.cpp) example source. It...
2018/03/20
1,359
5,634
<issue_start>username_0: Is there a programming language that doesn't compile, but rather just translates into another language? I apologize if this is a stupid question to ask, but I was just wondering if this would be a literal shortcut in creating a programming language. Wouldn't it be easier (probably not speedy) b...
2018/03/20
949
3,262
<issue_start>username_0: My friends and I have minecraft server and we want to add JavaMail plugin with `Maven` , We added 2 jar files: Mail.jar Activation.jar With this code: ``` package com.parlagames; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mai...
2018/03/20
746
3,199
<issue_start>username_0: I have a Web Api where I use *Owin Token Authentication*, as you know you have this method for authentication by default ``` public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { //here you get the context.UserName and ...
2018/03/20
1,762
5,207
<issue_start>username_0: I'm using with a smaller piece of code to test functionality for a larger (beginner) program, but I have a problem displaying the token I've pulled out of a string. I found and used: ``` #include #include int main() { char \*string, \*found; string = strdup ("1/2/3"); printf("Original st...
2018/03/20
849
2,677
<issue_start>username_0: I have a collection of python scripts, that I would like to be able to execute with a button press, from a web browser. Currently, I run `python -m http.server 8000` to start a server on port 8000. It serves up html pages well, but that's about all it does. Is it possible to have it execute a ...
2018/03/20
432
1,493
<issue_start>username_0: This is my first question and first website ever, a total beginner so I hope I'm doing it right :) I made a table with pictures. I added height and width to each, like this: ``` | ``` It worked, but then I tried to delete the sizes and use my external CSS file instead. So i changed it ...
2018/03/20
782
2,831
<issue_start>username_0: All: I am pretty new to Apache POI, I wonder if I want to use the builtin function from excel VBA, how can I do that? For example: In VBA, I can write something like: ``` Dim month as String month = MonthName( Month( Sheets1.Range("C12") ) ) ``` How can I use that function in Apache P...
2018/03/20
2,155
7,351
<issue_start>username_0: I have an email field that only gets shown if a checkbox is selected (boolean value is `true`). When the form get submitted, I only what this field to be required if the checkbox is checked (boolean is true). This is what I've tried so far: ```js const validationSchema = yup.object().shape({ ...
2018/03/20
2,909
6,967
<issue_start>username_0: Trips ``` id,timestamp 1008,2003-11-03 15:00:31 1008,2003-11-03 15:02:38 1008,2003-11-03 15:03:04 1008,2003-11-03 15:18:00 1009,2003-11-03 22:00:00 1009,2003-11-03 22:02:53 1009,2003-11-03 22:03:44 1009,2003-11-14 10:00:00 1009,2003-11-14 10:02:02 1009,2003-11-14 10:03:10 ``` prompts ``` i...
2018/03/20
2,008
5,953
<issue_start>username_0: I would like to pull 1000 samples from a custom distribution in R I have the following custom distribution ``` library(gamlss) mu <- 1 sigma <- 2 tau <- 3 kappa <- 3 rate <- 1 Rmax <- 20 x <- seq(1, 2e1, 0.01) points <- Rmax * dexGAUS(x, mu = mu, sigma = sigma, nu = tau) * pga...
2018/03/20
2,235
6,407
<issue_start>username_0: I'm trying to do 2 things in a carousel in Bootstrap 4 1- Shadow in img text, in carousel-caption use this dark effect below the text 2- Indicators in circle format and with a number inside This 2 things just like this IMG: <https://i.stack.imgur.com/SAfg5.png> I've trid this: ``` /\* sha...
2018/03/20
575
2,217
<issue_start>username_0: I have been working on a Spring Boot project using Maven. I need to write logs for system activity. I have been following this example for log4j [Example](https://www.mkyong.com/logging/log4j-hello-world-example/) This is the code: ``` import org.apache.log4j.Logger; public class HelloExamp...
2018/03/20
1,944
4,858
<issue_start>username_0: I know this is a recurrent question, so I apologize in advance for cross-posting. I am having trouble reading a model output `.csv` file that looks more or less like this (the original file has about 14,000 rows, but the columns are as they look here): ``` time x y z w ...
2018/03/20
886
2,663
<issue_start>username_0: I am trying to center the AddThis inline follow buttons. By default they left align. The code for the follow buttons is: ``` ``` I tried adding them within a div like so: ``` ``` I added the following CSS but it made no difference, they still align to the left. ``` .center_aift { wi...