date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/22
746
2,010
<issue_start>username_0: I'm using an R Notebook and I'd like my plots to automatically save to disk when the code is run, as well as display inline. [knitr: include figures in report \*and\* output figures to separate files](https://stackoverflow.com/questions/27992239/knitr-include-figures-in-report-and-output-figu...
2018/03/22
1,115
3,257
<issue_start>username_0: ```html [Home](index.html) Home ``` Is there any logical difference between the two anchors created above? Any performance difference or how GET method is invoked? I looked the request/ response headers for both anchors, and they are almost same, only extra '?' in request URL when is us...
2018/03/22
779
3,021
<issue_start>username_0: I've got a global npm package installed, [TileServer](https://github.com/klokantech/tileserver-gl), that I run as service through command line. I'd like to convert this to a guest executable in service fabric, but I'm having trouble implementing. Pre-Guest executable, I would invoke the follow...
2018/03/22
760
2,774
<issue_start>username_0: I'm using sample codes from documentation and I'm trying to connect to server using Prosys OPC UA Client. I have tried opcua-commander and integration objects opc ua client and it looks like server works just fine. Here's what is happening: 1. After entering endpointUrl, client adds to url `-...
2018/03/22
795
2,845
<issue_start>username_0: I am running this code snippet in linux terminal using nodejs. Although the (key, value) pair is correctly set, the code prints undefined. Any explanation or work around for this problem? ``` function trial() { var obj1 = {}; var obj2 = {}; obj1.fund = 1; obj1.target = 2; o...
2018/03/22
198
660
<issue_start>username_0: I would like to fade an entity in A-Frame and I can't seem to find a solution using the documentation. Any help would be appreciated Thanks!<issue_comment>username_1: For a-frame 0.9.0+ check out Kevins anwser. is deprecated since then. --- You could use changing the `material.opacity` attr...
2018/03/22
805
3,005
<issue_start>username_0: I am trying to send an object from my component which is from the input of the user to the service I have. This is my code.. > > Sample.html > > > ```html Subject {{subject.title}} Date Proceed ``` > > Sample.ts > > > ```js public attendanceSet = {} proceed(attendanceSet) ...
2018/03/22
396
1,323
<issue_start>username_0: I'm looking for a fast and effective way to draw a QPixmap with QPainter, but have the pixmap appear darker then normal. Is there some sort of filter or effect that can be applied to either the QPixmap or QPainter while drawing to create this effect?<issue_comment>username_1: You don't have pix...
2018/03/22
1,142
4,360
<issue_start>username_0: I'm very new to C# so please excuse me if i'm asking stupid question or i'm making my question incorrectly. Here is my code: ``` using UnityEngine; using System; namespace DuloGames.UI { [Serializable] public class UISpellInfo { public int ID; public string Name; ...
2018/03/22
742
2,317
<issue_start>username_0: I created a toy application that adds vertices and edges to a CosmosDB graph collection, and prints the consumed RUs for each request. This is the output: ``` Running g.V().drop() RUs: 34.88 //clean slate Running g.V('1').addE('knows').to(g.V('1')) RUs: 1.97 //don't actually create any edge...
2018/03/22
630
2,845
<issue_start>username_0: I've inherited a lotus notes application and one of the things that really irks me is every function/sub/property has onerror statements and errorhandler labels that aside from typos all do the exact same thing. Additionally, and unfortunately this application has gone through several revisions...
2018/03/22
1,057
4,009
<issue_start>username_0: When using `System.Threading.Tasks.Dataflow`, if I link block `a` to block `b`, will the link keep `b` alive? Or do I need to keep a reference to `b` around to prevent it from being collected? ``` internal class SomeDataflowUser { public SomeDataflowUser() { _a = new SomeBlock...
2018/03/22
1,150
3,604
<issue_start>username_0: ``` { "uri" : "http://www.edamam.com/ontologies/edamam.owl#recipe_f9e656dd9d2b4db9816340687d01722c", "calories" : 38, "totalWeight" : 113.25, "dietLabels" : [ "LOW_FAT" ], "healthLabels" : [ "SUGAR_CONSCIOUS", "VEGAN", "VEGETARIAN", "PEANUT_FREE", "TREE_NUT_FREE", "ALCOHOL_FREE" ]...
2018/03/22
2,358
7,503
<issue_start>username_0: First off, I want to be able to encrypt some data in one of my Java Class and write it in a text file on the phone. Then my Unity class in c# read it, decrypt it and the data can be used. At the moment, my java class can encrypt and decrypt his own data. My C# can do the same as well. Problem...
2018/03/22
891
3,389
<issue_start>username_0: I am trying to set an initial state for a component, from a prop that I have passed through. The prop is passed from App.js where it is populated from an API call. When I check for a value for the component state there is none. How could this be? Here is code setting initial state from [ListB...
2018/03/22
690
2,603
<issue_start>username_0: Can anyone help how to hide the field and title if the value is not there. For example if there is no Fax No., it should not show the title name "Fax:" also. ``` php $name = get_sub_field('name'); $address = get_sub_field('address'); $fax = get_sub_field('fax'); ? ###### php echo (isset($na...
2018/03/22
1,464
4,589
<issue_start>username_0: This question may look like a duplicate but I am facing some issue while extracting country names from the string. I have gone through this link [link][Extracting Country Name from Author Affiliations](https://stackoverflow.com/questions/5318076/extracting-country-name-from-author-affiliations)...
2018/03/22
681
2,433
<issue_start>username_0: In my TaskList.vue I have the code below: ``` * export default { data(){ return{ tasks: [], newTask: '' } }, created(){ axios.get('tasks') .then( response => (this.tasks = response.data) ); Echo.channel('task').listen('TaskCreated', (data) => { this.tasks.push(data.task.bod...
2018/03/22
713
2,166
<issue_start>username_0: I have many files to loop through. In each file I have to filter out specific values. Example. I have to filter out numbers `1, 3, 5, 7, 9` and keep everything else beginning ``` 1 2 3 4 9 11 15 ``` result ``` 2 4 11 15 ``` I came up with this code, but it proved to be useless as its n...
2018/03/22
742
2,630
<issue_start>username_0: I have two different dataframes populated with different name sets. For example: ``` t1 = pd.DataFrame(['<NAME>', '<NAME>', '<NAME>', '<NAME>'], columns=['t1']) t2 = pd.DataFrame(['<NAME>', '<NAME>', '<NAME>', '<NAME>'], columns=['t2']) ``` I need to find the intersection between the two dat...
2018/03/22
512
1,568
<issue_start>username_0: How I can maximize chrome browser window size to make it fit with using screen size? I have tried doing that using the function `driver.maximize_window()`. It only maximize height but not width. The version I'm using is: selenium-server-standalone-3.11.0.jar and python 3.6.4 Here's the code ...
2018/03/22
356
1,014
<issue_start>username_0: My regex should allow a-z, A-Z, 0-9, single quote ('), space ( ), question mark (?), dash (-), full-stop (.). The regex looks like this. But, it also flags underscore, ampersand as valid characters. ``` ^[\.\w?\-' ]+$ ``` How do i fix this?<issue_comment>username_1: `'`inside a character c...
2018/03/22
1,260
4,998
<issue_start>username_0: I am relatively new to using Promises and MongoDB / Mongoose, and am trying to chain a flow through several database queries into an efficient and reliable function. I want to know if my final function is a good and reliable way of achieving what I want, or if there are any issues or any impro...
2018/03/22
853
2,319
<issue_start>username_0: I've looked through the forums and can't seem to figure this out. I have the following data. I assume the answer lies in the "groupby" function but I can't seem to work it out. ``` Date Hour Value 3DAverage 1/1 1 57 53.33 1/1 2 43 42.33 1/1 3 ...
2018/03/22
433
1,100
<issue_start>username_0: how to convert reshape 1D numpy array to 2D numpy array and fill with zeroes on the columns. For example: Input: ``` a = np.array([1,2,3]) ``` Expected output: ``` np.array([[0, 0, 1], [0, 0, 2], [0, 0, 3]]) ``` How do I do this?<issue_comment>username_1: Create a fu...
2018/03/22
425
1,172
<issue_start>username_0: I need to select an anchor element within an HTML document. The only issue is that I cannot find a single ID or Class within the document. Whenever I run ``` document.querySelector('a') ``` Or ``` document.querySelectorAll('a') ``` I get the error: > > Object doesn't support property...
2018/03/22
261
1,013
<issue_start>username_0: K8s has this feature to [encrypt secret data](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/), which requires modification of kube-apiserver config, how can i do this in GKE?<issue_comment>username_1: Short answer is, you can't. The Kubernetes Engine master is managed by Goo...
2018/03/22
715
2,755
<issue_start>username_0: Currently working on an ASP.NET web application. I would like to deploy to Azure App Service but when running on App Service, the connection to my Azure SQL server can not be found. [![enter image description here](https://i.stack.imgur.com/XczGP.png)](https://i.stack.imgur.com/XczGP.png) Whe...
2018/03/22
961
2,979
<issue_start>username_0: example: ``` var A = function (z) { this.z = z } // attach 1 method A.prototype.sayHay = function(message) { this.message = message console.log(message) } // attach 2 methods ????? A.prototype.sayHay.protorype.inReverse = function () { // how to avoid the first console.log consol...
2018/03/22
503
1,930
<issue_start>username_0: I am trying to render the response of a simple api I've created but when I try to iterate through the items, it comes as undefined. I know it has to do with asynchronous programming but can't figure out how to solve it. Could anybody help ? ```js import React from 'react'; export default cla...
2018/03/22
481
1,766
<issue_start>username_0: I have a list of files in which I need to select few lines which has CommonChar in them and work on creating a dictionary. The lines in a file which I am interested in look like these: ``` CommonChar uniqueName field value CommonChar uniqueName field1 value1 CommonChar uniqueName1 field v...
2018/03/22
833
3,133
<issue_start>username_0: I have a class with embedded Id ``` @Entity @Table(name="account_table") Public class AccountLink { @EmbeddedId private AccountLinkKey accountLinkKey; //Rest of code } @Embeddable Public class AccountLinkKey { //Rest code here @ColumnName(name="i am hiding") private String segAccount; @Co...
2018/03/22
1,229
4,389
<issue_start>username_0: at the moment I have over 150k thumbnails uploaded on my server. All 150k images are stored in different directories like this ( 2018/03/22/image1/image1.jpg ). By checking with tools like GTmetrix or PingDom I noticed that each image can be losslessly compressed to have around 5% of reduce fo...
2018/03/22
624
1,829
<issue_start>username_0: I have an array of objects, each with non correlative ids. I would like to know if it is possbile, given an integer, to find the next closest id value object. Example ``` const array = [{id: 4}, {id: 10}, {id: 15}] ``` given any value `x`, if `10 < x <= 15`, it should return `15` given an...
2018/03/22
813
2,549
<issue_start>username_0: I have a view that i created that reads from a table as well as includes hard coded values. The view was created as expected except i want to order by a column in the definition of the view. View: ``` create VIEW [dbo].[RPTLV_PICKIDS] ( [Fixed], [Item], [Desc] ) AS select 0, 'test...
2018/03/22
804
2,416
<issue_start>username_0: i have some text being piped to sed (any other tool is okay). I want to extract the line which ends with a question mark and the line before that. how can we achieve this? eg text ``` & 434.0K - .... What are you trying to filter out of screencap's output? Student xcvdgfdg srrtgg ```<issue...
2018/03/22
1,486
4,946
<issue_start>username_0: I need to accept a user name and return the password and user ID to determine whether or not they have access to a particular Form in a project. I have searched for a solution and viewed similar questions on this site, but to no avail. Please, help if you can. The parameter values returned w...
2018/03/22
320
1,043
<issue_start>username_0: How to convert an EPS file to PNG and specify the size of the PNG? ``` convert file.eps -resize 800x1200 file.png ``` This converts the EPS but with the wrong dimensions sample EPS file <https://ufile.io/zrv3n><issue_comment>username_1: Either ignore aspect ratio with `!` ``` convert file....
2018/03/22
898
3,096
<issue_start>username_0: I'm getting an error when I try to create an sql table which I can't fix: ``` CREATE TABLE IF NOT EXISTS `#__websitemanager_magazine` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `date` DATE NOT NULL DEFAULT '', `m...
2018/03/22
839
2,922
<issue_start>username_0: Im working with a Particle Photon to make a digital watch + alarm clock. I am using a TFT screen, and i have drawn some digits on it which i can increment and change "digit index" with some buttons that i connected to my Photon - with the purpose of setting the time of a scheduled alarm. The fu...
2018/03/22
697
2,646
<issue_start>username_0: I wrote a python program and trying to debug it but I can't get rid of following error message. What am i doing wrong ? I will appreciate your help. Problem seems to be lines but I have already declared lines as an array. ``` NameError Traceback (most recent ca...
2018/03/22
649
2,796
<issue_start>username_0: I am updating an array of Realm objects: ``` for offer in offers { if(offer.isReward == isReward){ offer.isSeen = true } } ``` but it is throwing an error: `Attempting to modify object outside of a write transaction - call beginWriteTransaction on an RLMRealm instance firs...
2018/03/22
789
3,016
<issue_start>username_0: I have the following Java regex (https://.\*?/api/FHIR/DSTU2/) to match a URL in the following pattern <https://somserver.esm.somedomain.edu/TST/api/FHIR/DSTU2/> in a large JSON result, and replace it with another URL like <https://api.anotherdomain.edu/FHIR/DSTU2/>. The URL I'm replacing o...
2018/03/22
457
1,721
<issue_start>username_0: I'm combining two tables with an inner join where the Primary ID is the movie ID, and I'd like to group them by number of movies per actor per year. However - possibly because the movie ID is the primary key - the results that I'm getting aren't correct. Below is my code. The DB is from iMDB, i...
2018/03/22
1,096
3,348
<issue_start>username_0: I have a simple html document, containing one parent div and two additional divs (one is left and the other one is right, both of them having max-width: 200px). What I want to achieve, is having the height of this two divs equal while the left one contains text and the other one an image, both...
2018/03/22
989
2,898
<issue_start>username_0: So I have this javascript function, and I want to convert it to a java function. This is the original function: ``` function mailExistsCheck() { request({ uri: "https://iag.ksmobile.net/1/cgi/is_exist", method: "POST", headers: { 'User-Agent': "FBAndroidSDK.0.0.1", DONE ...
2018/03/22
818
2,895
<issue_start>username_0: How is it possible to pass an array of elements as well as keeping the `data` attributes using jQuery? currently I've got the following: ``` $('body').on('click', '.selectItem', function() { data: { 'hash': $(this).data("hash"), 'id': $(this).data("id"), 'inspect': ...
2018/03/22
1,900
6,328
<issue_start>username_0: Problem: -------- Jupyter is not able to save, create (I imagene delete) any file type. But I can load them fine An example of creating file --------------------------- Creating File Failed An error occurred while creating anew file. > > ''' Unexpected error while saving file: untitled.tx...
2018/03/22
2,025
5,457
<issue_start>username_0: I am trying to utilize the MAX() OVER PARTITION BY function to evaluate the most recent receipt for a specific part that my company has bought. Below is an example table of the information for a few parts from the last year: ```none | VEND_NUM | VEND_NAME | RECEIPT_NUM | RECEIPT_ITEM | RECE...
2018/03/22
1,141
3,418
<issue_start>username_0: How to make this syntax below more efficient because i have to update more than 20 fields for one record? ``` UPDATE TRANS SET A = @XA WHERE UNIQX = @XUNIQX AND STS_TRANS = 0 and A <> @XA UPDATE TRANS SET B = @XB WHERE UNIQX = @XUNIQX AND STS_TRANS = 0 and B <> @XB UPDATE TRANS SET C = @X...
2018/03/22
1,087
3,198
<issue_start>username_0: here is a link : <https://api.nanopool.org/v1/etn/balance/etnkGqH26XNVZ9cJv7jh95Dwj7LYPupYX5F5QVf85icHXq2sRJcXSxDT6SL4gD2Vn1WBKi5wqd9x5En2LLmDhnKs8pqrcM75VJ> to a json file and i would like to get the data on java. So how can i download the file or parsing it directly from internet ? Thank you...
2018/03/22
551
2,218
<issue_start>username_0: I have a big table in redshift I need to automate the process of archiving monthly data. The current approach is as follows(Manual): 1. unload the redshift query result to s3 2. create new backup table 3. copy files from s3 to redshift table 4. remove data from the original table I need to ...
2018/03/22
988
3,557
<issue_start>username_0: our project is now over, we only have two weeks to give back the project for our final year's studies at University. Our teacher told us that now that development phase was over we would have to go deploy it in production phase. We used ReactJS for the frontend (hosted in localhost://3000) and...
2018/03/22
2,818
5,091
<issue_start>username_0: I have an array($coords) in php which contains some coordinates. ``` print_r($coords) ``` gives `Array ( [0] => 80.23338342111089 ,26.52748985468579 [1] => 80.21915925983853 ,26.51065783417543 [2] => 80.23036859334592 ,26.49785585262899 [3] => 80.24667293123426 ,26.51075259323626 [4] => 80...
2018/03/22
750
2,804
<issue_start>username_0: I'm currently working on an angular 5 application. I try to alter a member variable of my component in an input on the view and use the variable in my component after the change. My structure is as follows: **Folder**: my-test * my-test.component.html * my-test.component.css * my-test.compon...
2018/03/22
1,313
4,624
<issue_start>username_0: I'm able the read a simple json file which has a key value pair and the code is ``` import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.j...
2018/03/22
874
3,705
<issue_start>username_0: ``` class TimerFactory { var second: Int = 0; var timer: Timer = Timer(); init(second: Int) { if(second > 0) { self.second = second; } } func runTimer(_ vc: ViewController) -> Void { self.timer = Timer.scheduledTimer(timeInterval: 1, ta...
2018/03/22
789
2,671
<issue_start>username_0: I have a series of 3 SVG elements inside a wrapper element and I have rotated this wrapper by -90 deg with a CSS transform. I'm trying to get it so the yellow containing block is pinned to the left of the screen, so I can then alter how far from the left (% or vw) this yellow wrapper sits. I...
2018/03/22
686
2,020
<issue_start>username_0: ``` var people = [ { name: "Mike", age: 12, gender: "male" },{ name: "Madeline", age: 80, gender: "female" } ] ``` How do i Loop through the array and log to the console "old enough" if they are 18 or older, and "not old enough" if thy aren't 18. how do i do it...
2018/03/22
774
2,437
<issue_start>username_0: I have a question regarding the use of tf.cond. I am trying to run 2 images through a CNN and only backprop using the lower cross entropy loss value. The code is as follows: `train_cross_entropy = tf.cond(train_cross_entropy1 < train_cross_entropy2, lambda: train_cross_entropy1, lambda: tra...
2018/03/22
933
3,858
<issue_start>username_0: I'm using the PowerShell syntax: ``` Start-Process -FilePath $file -ArgumentList $argList -NoNewWindow -Wait ``` The process being started is an installer, which installs a Windows service and then starts up that service, then the process stops. What's happening is that my script is hanging ...
2018/03/22
773
2,742
<issue_start>username_0: I want to have my own method in JavaScript which can be able to access some property of the preceding method/function Eg: ``` //default var arr = [1,6,3,5]; alert(arr.length); ``` This will alert the length of arr. But I want to use my custom method instead of the **length** method say **le...
2018/03/22
1,141
3,821
<issue_start>username_0: I have a project and the professor gave us some code. There is a line in the code that has me confused: ``` arrayListName.sort(null); ``` what does the call to `sort(null)` do exactly? The doc says: "If the specified comparator is null then all elements in this list must implement the Comp...
2018/03/22
1,752
5,359
<issue_start>username_0: I am going to record video but it's not working ``` public void startRecord() { if (preVideo()) { mRecorder.start(); } isRecording = true; } public boolean preVideo() { if (mCamera == null) { return false; } mRecorder = new MediaRecorder(); mRecord...
2018/03/22
1,111
4,271
<issue_start>username_0: There are so many ETL tools out there. Not many that are Free. And of the Free choices out there they don't appear to have any knowledge of or support for ArangoDB. If anyone has dealt with the migration of their data over to ArangoDB and automated this process I would love to hear how you acco...
2018/03/22
427
1,430
<issue_start>username_0: I am able to connect to IONIC DEVAPP via my personal computer but unable to connect it when hosted on the office laptop even on my home wifi network. I can see my app on both office and personal laptop. ``` $ionic serve -c ``` I am able to access the Devapp hosted URL via my browser ``` ht...
2018/03/22
633
2,227
<issue_start>username_0: ``` string name[size] = {"<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>"...
2018/03/22
1,278
4,848
<issue_start>username_0: My Code: ``` protected void Page_Load(object sender, EventArgs e) { ABC ABCDetails; if(condition) { //ABCClient is a soap service that returns ABCDetails which consists of an array[] ABCDetails.ABCLineItemsAuto which is a list but for some reason it...
2018/03/22
1,032
3,860
<issue_start>username_0: Is it correct to access variables from a child class in a parent class? Is this a good OOP approach? I don't need to create instances of Animal class, but if I will, the `make_sound` method will raise `AttributeError`, which is bothering me. ``` class Animal: def make_sound(self): ...
2018/03/22
850
2,637
<issue_start>username_0: Why this code returns the error: java.lang.NullPointerException ``` Object obj = null; Long lNull = null; Long res = obj == null ? lNull : 10L; ``` But the following way works without any errors: ``` Object obj = null; Long res = obj == null ? null : 10L; ```<issue_comment>username_1: In t...
2018/03/22
795
2,685
<issue_start>username_0: When trying out express-session, I couldn't retrieve anything from my previous entries when I stored a variable to a session. Not only that, my session ID has changed. Why is this? Here is my server.js: ``` const express = require('express') const session = require('express-session') const b...
2018/03/22
364
1,196
<issue_start>username_0: I am making a python program where I need to inspect individual four letter parts of a variable. If the variable is for example **help\_me\_code\_please** it should output **ease** then **e\_pl** etc , I attempted it with ``` a=0 b=3 repetitions=5 word="10011100110000111010" for x in range (1,...
2018/03/22
301
1,105
<issue_start>username_0: I have a `loginActivity` and a `MainActivity` I have used `SharedPreferences` to store some values in some variables in the `loginActivity`. Now I want to use these values(They're `boolean` values) in MainActivity without re=opening MainActivity. How do I do this? Also, the `SharedPreference...
2018/03/22
536
2,161
<issue_start>username_0: When designing a HTTP RESTful API is it ok to have parameters with default values when they are omitted? or is that confusing? for example: `/posts?categories=20,21,18` is missing a `limit` parameter, so we set the limit to `limit=100` by default `/posts?categories=20,21,18&limit=200` set...
2018/03/22
542
2,169
<issue_start>username_0: My goal is to hide each row that contains a cell filled with red. Here is my code: ``` Sub AstInv() Dim myTable As ListObject Dim myArray As Variant Set myTable = ActiveSheet.ListObjects("Sheet2") Set myArray = myTable.ListColumns("Código de Barras2").Range For Each cell ...
2018/03/22
299
1,087
<issue_start>username_0: I am in the process of migrating an NDK application from AOSP 7 to 8 and right away I have two (related) issues. 1) I used to build my module with `mm -B`, but now it seems `-B` is no longer an accepted option. 2) How can I do a clean of just my module? [This answer](https://stackoverflow.com...
2018/03/22
278
1,052
<issue_start>username_0: I am trying to parse information from a html page which looks like this: Column 1 | Column 2 | Column 3 .... This is the code I have so far: ``` from bs4 import BeautifulSoup as BS import urllib.request html=urllib.request.urlopen(url) soup=BS(html,"lxml") ``` But I can't seem to figure ou...
2018/03/22
780
2,483
<issue_start>username_0: I'm trying to print each element individually, which is fine but also repeat each element based on position eg. "abcd" = A-Bb-Ccc-Dddd etc So my problems are making print statements print x times based off their position in the string. I've tried a few combinations using len and range but i of...
2018/03/22
483
1,731
<issue_start>username_0: What I'm trying to do is something like this: ``` var textareas = document.getElementsByTagName("textarea"); var inputs = document.getElementsByTagName("input"); var selects = document.getElementsByTagName("select"); var concatenated = textareas.concat(inputs).concat(selects); for(var i = 0;...
2018/03/22
683
2,220
<issue_start>username_0: I am trying to understant the switchs and args in awk and sed For instance, to get the number next to nonce in the line form the file response.xml: ``` WWW-Authenticate: ServiceAuth realm="WinREST", nonce="1828HvF7EfPnRtzSs/h10Q==" ``` I use by suggestion of another member ``` nonce=$(sed ...
2018/03/22
1,280
3,963
<issue_start>username_0: How can I validate that a `String` encodes a valid American Social Security Number (SSN), with a pattern like `123-45-6789`, using Swift? Validate means to check if the given string matches a pattern `123-45-6789`.<issue_comment>username_1: **Simply:** Step1. create a method: ``` func isVali...
2018/03/22
1,427
4,668
<issue_start>username_0: I can't drop databases or collections using Hibernate OGM. I've tried using these native queries but an exception is thrown for both ``` entityManagerFactory = Persistence.createEntityManagerFactory("myPersistence-unit"); EntityManager entityManager = openEntityManager( entityManagerFactory); ...
2018/03/22
1,612
5,285
<issue_start>username_0: I have a following example simple page: **App.js**: ``` export default class App extends React.Component { render() { return }; }; ``` **ArticlesPage.js**: ``` export default class ArticlesPage extends React.Component { constructor(props) { super(props); }...
2018/03/22
1,407
4,274
<issue_start>username_0: I have a bootstrap image gallery with lightbox and I'd like to show the close button X on the modal lightbox. This is my HTML: ``` [![](https://farm1.staticflickr.com/665/23578574946_b6f90e1ca8_k.jpg)](https://farm1.staticflickr.com/665/23578574946_b6f90e1ca8_k.jpg) ``` And this is my JS:...
2018/03/22
1,516
4,302
<issue_start>username_0: I was inspired by this [post](https://stackoverflow.com/questions/8523374/mysql-get-most-recent-record?answertab=votes#tab-top). But what I'm going to solve is more complex. In the table below we have three columns, `id`,`rating`,`created`, call it `test_table`, ``` +----+--------+----------...
2018/03/22
1,342
4,579
<issue_start>username_0: I read somewhere that to find the real latency of the ram you can use the following rule : ``` 1/((RAMspeed/2)/1000) x CL = True Latency in nanoseconds ``` ie for DDR1 with 400Mhz clock speed, is it logical to me to divide by 2 to get the FSB speed or the real bus speed which is 200Mhz in t...
2018/03/22
1,291
4,209
<issue_start>username_0: ``` df1 <- data_frame(time1 = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), time2 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), id = c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j")) df2 <- data_frame(time = sort(runif(100, 0, 10)), C = rbinom(100, 1, 0.5)) ``` For every...
2018/03/22
801
2,947
<issue_start>username_0: I have the following class **Room** and the enum class **Direction**, how would I write a method to pick a random key from the HashMap **exits** and return it, or return `null` if there are no exits in that Room? ``` public class Room { private String description; private HashMap exits; // st...
2018/03/22
575
2,100
<issue_start>username_0: *With Android Studio 3.0 / android\_gradle\_version = '3.0.1' / gradle-4.5* Let's say I have two android modules ``` module-base module-a ``` When I want to access sources from module-base in module-a , I just need to write this in my module-a.gradle ``` dependencies { implementation p...
2018/03/22
658
2,511
<issue_start>username_0: I do not have the best understanding of SQL, doing my best to learn. I have built two separate queries, and I am looking to take the result from query 1 and divide it by query 2. I have used the union statement with my two queries. ``` select * from (select count(*) as Numerator ...
2018/03/22
663
2,117
<issue_start>username_0: How can I save the state of my toggle button using userdefaults? Here is the code, please help me. ``` import UIKit class LawFigure: UIViewController { //Outlets: @IBOutlet weak var likeButton: UIButton! //Variables: var isButtonOn = false override func viewDidLoad() { super.viewDidLoa...
2018/03/22
624
2,039
<issue_start>username_0: This is a follow-up on [this question](https://stackoverflow.com/questions/19125091/pandas-merge-how-to-avoid-duplicating-columns?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) I have two dataframes that I want to merge, but I want to avoid to have duplicate columns,...
2018/03/22
2,206
7,479
<issue_start>username_0: I want to compute the maximum value of a function in python, then print the maximum value, as well as values of the variables at that maximum. I think I have gotten pretty far. In my example below, the function is just the values from `x` multiplied by the values from `y` multiplied by the val...
2018/03/22
1,121
4,189
<issue_start>username_0: * List item I am a newbie to python. I wanted to know Instead of asking the user to give input file with a path, how can I automatically select input files one after another the from a folder. i.e, it should pick the first image file from the folder, do some processing, then pick the 2nd file,...
2018/03/22
1,033
3,957
<issue_start>username_0: Here is my code: ``` Labs var left = $('.entry-content').width(); $('.entry-content').scrollLeft(left); ![](map.png) ``` I want the scroll to display to the far right automatically when the user visits the page. Currently it scrolls to the left by default. Please tell me what's wrong wi...
2018/03/22
446
1,656
<issue_start>username_0: I have a function that has a select statement. I want this function to return a value which will be assigned to a cell, but I keep getting errors. Here is my code that calls the select statement function: ``` Sub ChangeSizes() For i = 2 To 50 Range("G" & i) = LookupSize(Range("G" ...
2018/03/22
563
2,414
<issue_start>username_0: I'm trying to [verify transaction results](https://docs.connect.squareup.com/payments/checkout/setup#optional-add-code-to-receive-and-verify-the-transaction) on the redirect URL after the [Square Checkout process](https://docs.connect.squareup.com/payments/checkout/overview#verify-transaction-r...
2018/03/22
380
1,465
<issue_start>username_0: Why is this working ``` val foo: kotlin.collections.List = java.util.ArrayList() ``` The `ArrayList` is not inheriting the Kotlin `List`, is it?<issue_comment>username_1: That's because `kotlin.collections.List`, among other types, is a [mapped type](https://kotlinlang.org/docs/reference/jav...
2018/03/22
931
3,352
<issue_start>username_0: I'm trying to learn how to use SoapUI to integrate Web Services to my website. I've been trying to follow PHP's documentation, but it is very confusing. My question is: how can I translate this soap code to PHP, so I can call the SOAP function. This is what I got so far: ``` $wsdl = "http://...
2018/03/22
381
1,133
<issue_start>username_0: `list = [[1,'abc'], [2, 'bcd'], [3, 'cde']]` I have a list that looks like above. I want to parse the list and try to get a list that only contains the second element of all lists. `output = ['abc','bcd','cde']` I think I can do it by going over the whole list and add only the second elemen...