Stephen

1

votes
1

answer
24

views

appending list names to columns of data.frames within

I have imported a list of data.frames in1 in1 % set_names(basename(.) %>% gsub('_R1_001.bg.gz.bismark.cov.gz', '', .) %>% gsub('CpG_', '', .)) %>% map(readr::read_tsv, n_max = 3, col_names = c('chr', 'start', 'end', 'score', 'ref', 'alt')) A small example of in1 (few files, few rows) looks like...
1

votes
2

answer
48

views

How do I split this array object?

I'm new to PHP and trying to troubleshoot some legacy code. echo ' **** REQ: '.$requirement.PHP_EOL; echo ' **** REQ ##: '.get_object_vars($requirement).PHP_EOL; $myArray=explode(',',$requirement); print_r($myArray); The output of this gives me: **** REQ: Requirement=[equipment,N] **** REQ: Array Ar...
Stephen
1

votes
0

answer
180

views

can't install LWP::Parallel::UserAgent on Windows (Strawberry Perl)

When I try to install LWP::Parallel::UserAgent using CPAN on Windows (Strawberry Perl v5.16.3), I get the below error. I think it might not be only me, because reports MSOUTH/ParallelUserAgent-2.62.tgz shows that it fails for most/all of the CPAN Testers on Windows. Still, it seems like it should be...
Stephen
1

votes
1

answer
37

views

How to create a parallel linear computation in one layer with TensorFlow?

I have inputs with size [batch_size, height, width]. Here I want to do several different parallel linear transformation in one layer, i.e., x = tensor([batch_size, height, width]) y = [W1*x, W2*x, W3*x,...,Wn*x] I noticed that there are fully_connected and layer.dense in TensorFlow but they can only...
Stephen Tsui
1

votes
0

answer
99

views

how to search all public jsfiddle code?

I visited the JSFiddle web site, was looking for an option to search all public fiddles. Could not find it. Does jsFiddle have a search facility? I would like to search all public fiddles, looking for use of a specific API. thanks,
1

votes
1

answer
19

views

ASP.NET user control and grid view

IN dot net, User control has a drop down when it is changed. The grid needs to be changed, but the grid is not inside user control? How can we achieve it?
Daniel Stephen
1

votes
0

answer
66

views

Responsive Grid CSS Issue on safari

Ive implemented a responsive grid based on this post How to add responsive behaviour to the asp:GridView its works well, however there are some rendering issues in desktop and mobile safari. i know im probably missing something trivial like a vendor prefix. any help would be much appreciated. .char...
stephen
1

votes
3

answer
37

views

Is there a name for a pattern that keeps remote UI elements synced based on model changes?

I want to research existing solutions for a particular software pattern that I believe must be very common in today's world of disconnected software. I'm not having any luck searching online for a way of describing it and am wondering if there is a way of describing the pattern that I'm not aware of...
Stephen Ellis
1

votes
0

answer
48

views

Stock_quote version 2.0.0

I'm currently having issues with gem stock_quote version 2.0.0. I have installed the gem using 'bundle install' and included the necessary code snippet as below. However, When I ran the code from the browser using 'localhost:3000' on chrome, the server terminates suddenly with the following error....
Kel Stephen
1

votes
0

answer
22

views

Create SDK (or Library) from existing Android App (APK) that can be included in other Android Apps

I have an existing Android App that we now want to leverage as an SDK (or whatever is the equivalent on Android, a library?), so that the application could be included in another Android App as a library. The concept is that we provide a 'wrapper' class that customers make calls to, which would then...
1

votes
2

answer
45

views

Creating Objects in Iterator with React.js

I have an array let ability = ['100', '500' , '90' , '90' , '90' , '90' , '90' , '90' , '90' , '90'] I'm creating objects in an iterator and want to pass each value of the array to through the props of 'Progress Circle'. So the width of the first object is 100 the width of the second is 500 and so o...
Stephen Thomas
1

votes
1

answer
208

views

ScalaMock - Mocking higher order functions

I need some help with how to mock higher order functions inside classes using ScalaMock import org.scalamock.scalatest.MockFactory import org.scalatest.{FlatSpec, Matchers} class TestSpec extends FlatSpec with MockFactory with Matchers { class Foo { def foo(f: () ⇒ String) = 'this is foo' } val fo...
1

votes
1

answer
119

views

Toggle out of stock items on front end - woocommerce

I wish to include a button on the website so that users can toggle out of stock items on and off. By default, I want the out of stock items to be false. When the user browses around I need the setting he applies to be consistent. Is this possible? This is what I have till now: /* * ADDING A SIMPLE B...
Stephen Said
1

votes
1

answer
328

views

Kafka partitions affect performance

Why do a large number of partitions affect performance of a Kafka cluster? What are the best practice to manage and monitor partitions? What is the best practice on partition count in a cluster?
Stephen L.
1

votes
2

answer
76

views

Parsing an XML file Python

As a pretty new Python learner, I have set myself a mini project to parse the highways England xml file. so far my code is: #!/usr/bin/python import urllib2 varresponse = urllib2.urlopen('http://m.highwaysengland.co.uk/feeds/rss/AllEvents.xml') from xml.etree import ElementTree as et tree = et.pars...
Stephen Moran
1

votes
0

answer
50

views

Why does CFRunLoopActivity behave differently in iOS and MacOS?

I use the same code in the iOS and macOSX two platforms to test, view the Runloop's activity switch, found that the results of the two platforms are not the same, what is the reason.s Code: 1.create RunLoop Observer CFRunLoopObserverContext context = {0,(__bridge void*)self, NULL, NULL, NULL}; _obse...
Stephen Lee
1

votes
1

answer
472

views

Deploying .net core 2.1 on AWS ec2

Firstly I am new to aws and need some help. I am trying to deploy an .net core 2.1 angular 6 web site to an ec2 instance. I have copied the code to the server and build it using the powershell console. I have tested the site using dotnet run and the site runs on https://localhost:5001/. The security...
1

votes
2

answer
58

views

How can a Vue component behaves differently in different states?

I'm new to Vue framework. Currently I am working on a little project that can create and edit a directed graph online. I wish some components can have different action for a event in different state. For a requirement about a graph's node as example, if the application is in the edit state, you can...
Stephen.W
1

votes
1

answer
30

views

Unable to display emoji expressions after the rotation of the canvas in the Safari and Chrome browsers on the Mac platform

MacOS:10.13.2 Chrome:67.0.3396.99 Safari:11.0.2 (13604.4.7.1.3) I rotate the canvas to display the text, the normal text is displayed normally, but the text content cannot be displayed when it is an emoji expression. var mCanvas = document.createElement('canvas'); document.body.appendChild(mCanvas);...
Stephen Lee
1

votes
0

answer
59

views

FieldInfo.GetValue() can crash your program; how does one avoid this?

It appears that certain calls to FieldInfo.GetValue() can outright crash your program with some versions of Mono/.NET (or at least the Mono version packaged with Unity). Specifically, when given an instance of System.Globalization.CultureInfo, attempting to evaluate the field 'Systen.Int32* calenda...
Stephen Smolley
1

votes
1

answer
43

views

How do you perform a RegExp query on a URL in ElasticSearch?

I'm trying to perform (what I consider to be) a simple RegExp query in ElasticSearch, but for the life of me I can't get it to work. Here is said query, { 'query': { 'regexp':{ 'request_url': '/somepage/[0-9]+/[a-z]+' } } } Where this query seems to break is when I include a forward slash / characte...
Stephen Melrose
1

votes
1

answer
59

views

Error 404 after inserting URL rewrite rule in web.config?

I want to redirect all url with uppercase to it lowercase version. For example: https://www.droidafrica.net/Phone/Tecno-Spark-2-Go-Edition/ to https://www.droidafrica.net/phone/tecno-spark-2-go-edition/ I put the code below in web.config. It worked after applying changes, but most of the featured im...
1

votes
1

answer
47

views

Save data from new table row in local storage

I created an html table that automatically adds a new row from an input form. When I test it out, the new row is added but after I refresh the page, it's gone. How can I save the new row in local storage so I can keep the new data. var table = document.getElementById('orders'); var row = table.inser...
Stephen Lu
1

votes
1

answer
132

views

Firefox table border collapse bleed in

I have a table with a thead and a tbody. I add a border-bottom to the thead and a background-color on the td in the tbody there seems to be some bleed in. This only happends in firefox : Requirements : It needs to look exactly the same in chrome firefox You can't use empty cells border-collapse can...
Stephen
1

votes
2

answer
51

views

SQL Server calculated column using group by

I'm attempting to create a calculated column using 3 columns from a separate table grouped by a foreign key in SSMS. What I have is a linking table called OrderLines that links the Orders and Products tables. The OrderLines table contains a RowID(PK), ItemPrice, Quantity, and OrderID(FK). The Orders...
Stephen
1

votes
1

answer
37

views

Scipy interp2d function produces z = f(x,y), I would like to solve for x

I am using the 2d interpolation function in scipy to smooth a 2d image. As I understand it, interpolate will return z = f(x,y). What I want to do is find x with known values of y and z. I tried something like this; f = interp2d(x,y,z) index = (np.abs(f(:,y) - z)).argmin() However the interp2d obj...
Stephen
1

votes
0

answer
50

views

LuaC Library: Access violation with certain function(s)

I've written a relatively basic C++ lua module using Visual Studio 2017. It exports functions from an application which can then be called from a lua script running within said application. It appeared to work fine for the most part, except for the fact that functions with more than two parameters r...
Stephen P.
1

votes
0

answer
32

views

How Can I Set Object Metadata in Google Cloud Storage With Rails' ActiveStorage?

For instance I see that Google Cloud Storage allows me to set the following metadata on an object: (The default fields are): Content-Type Content-Encoding Content-Disposition Content-Language Cache-Control Does Rails' ActiveStorage GCSService (as of 5.2.0) provide any interface for this?
Stephen Marsh
1

votes
1

answer
43

views

what is \ used for in PHP namespace or class elements

I been working on PHP framework for many years that I maintain for our internel closed source project. While I updating this and keeping to coding standards with PHP 7 I notice that alot of developers use \ in there classes and namespaces that are called within the code. for example class ClassName...
Stephen Bishop
0

votes
0

answer
6

views

JIRA REST API endpoint / query for a given user's notifications?

Hello - I'd really appreciate some assistance on finding either a good sequence of queries, or an endpoint to get a list of notifications for a given JIRA user. Building a React app for this. Some of types of notifications I'm interested in for a user : New comments on Task where where user is Repo...
Stephen
1

votes
0

answer
33

views

laravel auth for commands and tasks

I have a design issue in my Laravel 5.6 app I could do with some guidance on. I need to create a custom command to be able to run a scheduled task from. The command will retrieve some sensitive data, and store it. Currently, the controller that retrieves and stores the data requires auth to invoke...
Stephen Stack
1

votes
1

answer
536

views

Web Scraping into Excel

I would like to create a spreadsheet that I can refresh and pull in each weeks English premier League fixtures, each week I would like to refresh this and see the weeks future fixtures. I have tried to use the import function from Data/From Web and selected the box with the table of fixtures however...
Stephen
1

votes
1

answer
261

views

Instantiating a hibernate Configuration throws error: Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

I am fairly new to the hibernate framework and I'm creating a simple application with a Udemy course. I've continually been getting a 'java.lang.NoClassDefFoundError' on the following stack. It appears that when I create a org.hibernate.cfg.Configuration object the exception is thrown. Any guidance...
Stephen Collins
1

votes
1

answer
932

views

No location change upon connected-react-router push() from within the react-redux connect()

Dispatching the push action which was defined in mergeProps parameter of the react-redux connect() dispatches redux action but does not trigger url page change. I also wrapped the withRouter around the redux container but no seems to help. //connect.js import { Component } from './Component'; import...
Stephen Isienyi
1

votes
0

answer
111

views

Symfony 3.4 application using Guard authentication, how to additional add http basic auth?

I've got a Symfony 3 application using Guard authentication:- security: providers: Provider: id: AppBundle\Provider\CustomerProvider firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: anonymous: ~ logout_on_user_change: true stateless: false logout: path: logout succes...
Stephen
1

votes
1

answer
57

views

Sort Collection of Objects with Objects for values

I'm trying to sort, by a single value, a collection of objects that themselves have objects for their values. To be clear, I want to sort my results by the name string in each object's value object. This is different from other questions (I believe... including the one that is listed above as 'Possi...
Stephen Thracian
1

votes
2

answer
35

views

Output returning false when should be true

I'm trying to move a folder from one machine to another machine using the script to output the result in a csv file saying it has or not. At the moment i can see that it has by looking at the machine the folder has been moved to but when opening the CSV file it returns false. Everything goes over fi...
stephen Stewart
1

votes
1

answer
103

views

Is there a database agnostic way to execute a stored procedure with params

Using Entity Framework Core 2.1 I have code that calls a stored procedure, passing in some params. During execution we are using Sql Server and everything works as expected. Our test cases however, run using Sqlite. Is there a decent way (without overly polluting the code with unwanted code added on...
Stephen
1

votes
1

answer
60

views

Android Toolbar/ActionBar set View initial state

My App has a Toolbar serving as an action bar with a menu inflated in onCreateOptionsMenu(). One of those menu items shows the state of a service we use. I can change the text and color of that view without issue, but I cannot reliably set the the initial state, because when I try to set the initi...
Stephen M
1

votes
0

answer
15

views

I would like search results to only return if it matches the whole word not just part of it (jquery search)

I have a search function on my website where the user can search different keywords and then objects with those tags attached will populate underneath the search bar. My problem is I would it to only return results that match the entire word. Right now if I search 'male' for example it will return r...
Jon Stephen

View additional