Josh C Josh C

1

votes
1

answer
32

views

Inconsistent ENOENT on npm rebuild looking for serverless

Context I have a Lambda function which uses a native node module (node-snowball) that requires compilation to run. as I am running macOS the compiled code that runs on my local machine will not run in AWS Lambda's Amazon Linux environment. For that reason I am using Docker and the lambci/lambda:buil...
Josh
1

votes
1

answer
93

views

Downloads start to get encased in Quotes

I have recently experienced an issue with code that was working fine but then started to include quotes around the filename. We have recently upgraded our server to PHP 7.2 and think this might be the cause of the change but was wanting to see if anyone might know for sure. We are running Laravel 5....
Josh
0

votes
0

answer
16

views

How to remove an edge attribute in python-igraph

I want to remove an edge attribute from a Graph object in python-igraph. The equivalent igraph R function is cleverly called delete_edge_attr. I haven't been able to find an equivalent function/method in Python... is there one? If not, is there another way to do it? (I tried a simple g.es['edge_attr...
Josh
0

votes
0

answer
3

views

How to get header in swaggerLume?

i want to get the header which has bearer apitoken. I already define the header in annotation in my controller, but when I tried it in swagger, the swagger cann't get the header. Here is my controller : /** * @SWG\SecurityScheme( * @SWG\Swagger( * schemes={'https'}, * @SWG\SecurityDefinition...
Josh Parinussa
1

votes
1

answer
434

views

Sencha ExtJs gridcolumn formatter datetime make uppercase

I have an object that has a date column in the it inside an ArrayStore. I then bind that ArrayStore to a grid using the store property. Currently i am using the following string formatter to display the dt in a custom format: formatter: 'date('d M Y')'. This work with no issue and the dates appear a...
Josh
3

votes
1

answer
37

views

Use Typescript to output plain JS, not a module?

For example ... index.ts import { x } from './other-funcs'; function y() { alert('test'); } x(y); other-funcs.ts export function x(callback: () => void): void { callback(); } I'd like to compile index.ts and have it result in a JS file which can be directly included in an HTML file, e.g. , and have...
Josh M.
1

votes
1

answer
36

views

Why is a subquery in a WHERE statement so slow in MYSQL?

The following query takes a little over 1 second to complete and returns 24k results. SELECT DISTINCT (ad_name) FROM marketing.fbk_ad_stats_daily AS marketing WHERE date_start >= subdate(CURRENT_DATE,30) and spend >1 When I use said query as a condition in the following WHERE statement: SELECT name,...
Josh Flori
1

votes
2

answer
4k

views

Powershell Out-File: Force encoding to Ascii

I am attempting to normalize a set of TAB-delimited logfiles using Powershell. Here is the current script: (Get-ChildItem *.csv) |%{ #Store the name of the file & date $Name = $_.basename $FileDate = $_.CreationTime #Prepends the following to each message: unique Identifer, Hostname, date (Get-Conte...
Josh Brower
1

votes
2

answer
4.5k

views

How to synchronize data between multiple clients on Node.js Server

The following diagram is a basic representation of a web application I am creating. The basic operation of the application is as follows: Client sends request for data from node.js server Server receives request. Server fetches data from database. Server sends data back to client as JSON string. Cli...
Josh
1

votes
2

answer
1.7k

views

Google Cloud Platform Storage error: “Locked Domain Expired” when trying to access my storage items

I am currently hosting some static .css, .js, .tff, and image resources for my site in the google cloud platform storage buckets. I am able to access these resources for up to approximately 20 minutes after uploading them. After about 20 or so minutes I get a 401 error message when I try to access t...
Josh L
1

votes
2

answer
672

views

Create a custom conditional render directive in Vue.js

I'm trying to work out how I can make a custom Vue conditional directive. I know I could just write a global method and call it inside a v-if, but for code clarity I'd like to have a custom directive. The aim is to decorate an element with the directive and pass a Guid to it (it's all for handling c...
Geek Josh
1

votes
1

answer
1.1k

views

Triggering an Interface in Kotlin for Android

There is a specific implementation of interface when it comes to using Kotlin for Android: triggering an interface from a fragment. Consider the common scenario where a Fragment must communicate a UI action to the parent Activity. In Java, we would define the interface, create a 'listener' instance...
Josh Ribeiro
-1

votes
0

answer
16

views

How to use the Trial Period field on stripe c#

I am currently trying to make my users subscribe and have a trial period on it based on what it's set on the Products -> pricing plan where it says subscriptions to this plan will automatically start with a free trial of the length but when I invoke the subscription it shows it as active instead of...
Josh
1

votes
4

answer
34

views

SQL query comparing column between 2 found sets

I have one table, we'll call it BUS and it has two columns called DATE and TAG I want to do two finds, as shown below Query 1 select * from BUS where DATE < '2009-03-01' & Query 2 select * from BUS where DATE >= '2009-03-01' I want to compare these two found sets, and delete any rows where the TAG...
Josh
2

votes
2

answer
20

views

How to properly run a method within a method in a class (python)

def main(): class BMI: def __init__(self, firstName, lastName, age, height, weight): self.firstName = firstName self.lastName = lastName self.fullName = firstName + ' ' + lastName self.age = age self.height = (height * 0.025) ** 2 self.weight = weight * 0.45 def setFullName(self, firstName, lastName...
Josh Chingas
1

votes
2

answer
44

views

How do I make linked references to sections of the same document using Markdown where the heading title is a sentence with spaces?

While this works 1. [Notifier system requirements](#requirements) This does not work 1. [Deployment steps](#steps to deployment) Steps to deployment and requirements are the header/section titles in my README.md file.
Josh Uzo
0

votes
2

answer
10

views

SQL query that looks at multiple rows for a column value

I'm trying to craft a query that selects rows based off a repeat value in a column Row 1: Row 2: Row 3: Row 4: Record_Key = 1 Record_Key = 1 Record_Key = 2 Record_Key = 3 Type = 'AED' Type = 'ACD' Type = 'AED' Type = 'AED' I only want to selec...
Josh
1

votes
1

answer
1.5k

views

latitude and longitude of current position in openlayer

I am trying to get the current location latitude and longitude values. is there any method to get lat and long values? I am trying to put maker by getting latitude and longitude value of current position.
v. josh
1

votes
1

answer
39

views

Passing a class as type

I am trying to pass in a type object to pass to the serializer. internal void SerializeXML(Object ObjType, String XMLRoot, Object Output, String Filename) { XmlSerializer serializer = new XmlSerializer(typeof(ObjType), new XmlRootAttribute(XMLRoot)); StreamReader reader = new StreamReader(System.Ref...
Josh Gager
1

votes
1

answer
38

views

Catch-22 UNIX Shell Zsh

I was fooling around with .zshrc files, and now I am locked out of my terminal with 'No such shell function 'accept-line''. It would be easy to just go and undo the change in the .zshrc file, but my terminal autoloads into zsh, so there is no way to edit the dotfile. I have looked all around for a w...
Josh Cho
1

votes
2

answer
345

views

How to store an Elixir function in Ecto?

I want to have a database table that has an 'action' field. I would like to store a Elixir function in the field. Is this possible? The function will always only take one parameter.
Josh Petitt
1

votes
2

answer
104

views

My fork() never equals 0

I have this code where my fork() never equals 0, so it never executes the code inside my if(pubpid == 0){} statement. #include #include #include #include #include #define MAX_VAL 256 #define MAX_ENTRIES 1000 pid_t pubpid, subpid, ATPpid; char *subconnect; char *pubconnect; char *subaccept...
Josh
1

votes
2

answer
93

views

ServiceStack + Azure Cloud Service (CloudConfigurationManager)

We've recently converted our ServiceStack application to an Azure Cloud Service. We're finding that, internally, ServiceStack is not aware that it needs to load configuration settings (like oauth.RedirectUrl) using CloudServiceConfiguration manager instead of ConfigurationManager. Is there a way t...
josh-sachs
1

votes
4

answer
1.1k

views

Trying to create grouped variable in python

I have a column of age values that I need to convert to age ranges of 18-29, 30-39, 40-49, 50-59, 60-69, and 70+: For an example of some of the data in df 'file', I have: and would like to get to: I tried the following: file['agerange'] = file[['age']].apply(lambda x: '18-29' if (x[0] > 16 or x[0] <...
Josh
1

votes
1

answer
148

views

UIPopoverController Button, Prevent Dimming Overlay?

When presenting a UIPopoverController from a UIButton the entire screen behind the popover is dimmed. Is it possible in some way or another to prevent the presenting button (the one pressed to show the popover) from being dimmed?
Josh Kahane
1

votes
2

answer
79

views

Deleting a node from a doubly linked list

This is my current code which i have messed with so how im dealing with the first item or only item are wrong, which are the first 2 parts to this function. For some reason i am getting memory errors if i just try to set node=node->next_.. i would assume this would be the easiest way but when i thro...
Josh Bair
1

votes
1

answer
37

views

Anonymous function arguments and the order they are passed

Explanation: Something I have not been able to get my head around with anonymous functions is their arguments. Say we are using jQuery.each(); I know that if we call each() and use what I would call an anonymous callback function i.e. $.each('p', function(index, item){ I can 'grab' the index and th...
Josh Stevenson
1

votes
2

answer
697

views

How Can I Save A Boolean In NSDefaults When A Button Is Pressed?

I've coded a night and day button theme. If the user presses the day button, GlobalData.DayBool = true, and GlobalData.NightBool = false. When they press the night button, GlobalData.DayBool = false and GlobalData.NightBool = true. The background changes to night or white, depending on which one is...
Josh Schlabach
1

votes
2

answer
1.1k

views

How to connect to a https URL using HttpsURLConnection

I am trying to post some data to a https URL, so I used the code I found in http://developer.android.com/reference/javax/net/ssl/HttpsURLConnection.html: KeyStore keyStore = ...; String algorithm = TrustManagerFactory.getDefaultAlgorithm(); TrustManagerFactory tmf =TrustManagerFactory.getInstance(al...
Josh
1

votes
1

answer
649

views

Angularjs ng-if with ajax request

I'm new to angularjs and trying to figure out how to show/hide navbar elements depending on permissions. I'm currently getting the permissions via an ajax request: mycloudControllers.controller('HeaderController', ['$scope', '$http', function($scope, $http) { $http.get('/api/header').then(function(d...
Josh Davis
1

votes
2

answer
208

views

Animating a UIButton to fullscreen

so I have a very simple button that when clicked goes to fullscreen and when clicked again goes back to the same position it was initially in. For some reason it works perfectly without the animation. When I uncomment the animation part when I initially click the button it does nothing, the second t...
Josh Reed
1

votes
2

answer
686

views

Using the bunny gem, how do I block until either a message is received or a timeout expires

I'm using the bunny ruby gem to send and receive messages to a rabbitmq server. How do I synchronously pop a message off the queue while putting a timeout on how long I wait (i.e. if no message arrives after 3 seconds, stop blocking)? One obvious solution would be to just loop over pop calls until...
Josh Rickard
1

votes
4

answer
3.6k

views

AngularJS: CSS Animation On Click (ngClick)

I've seen several questions related to CSS animations 'on click' in Angular when researching this, but generally without any solid or definitive answers. I want to know the best practice way to achieve a CSS animation when clicking on an element in an AngularJS environment (1.x). Specifically, lets...
Josh
1

votes
1

answer
353

views

Change UIVisualEffectView Colour Beyond Light/Dark?

Is it possible to change the colour of the UIVisualEffectView beyond the standard extra light, light and dark? I need to achieve the shade between that of light and dark presets.
Josh Kahane
1

votes
1

answer
257

views

JMS Serializer Error: Using $this when not in object

I am working on a payment processing page. We are using Authorize.net to process the transactions. I have imported Authorize's php library and all of its dependencies. When I try to process a test transaction I get the following error: Fatal error: Using $this when not in object context in /home/ti...
Josh Curren
1

votes
2

answer
41

views

List item fade when navigating

I have a group of list items that I control through 'Next' and 'Prev' buttons. The code shows five list items at a time, if there are more you can click 'Next' and you'll see another five - if you click 'Prev' you'll see the previous five...pretty simple operation and it works. You can see a live ex...
Josh Rodgers
1

votes
2

answer
773

views

Migrating from Spring monolith application to OSGI

We have been building two suites of applications for the last 10 years using Spring as our dependency injection. We also use spring-batch and spring-amqp. We are now looking to move to OSGI so that our monolithic applications can be separated into bundles so that we can be more agile. The two suites...
Josh Chappelle
1

votes
1

answer
1.7k

views

Capture a single image and save it Kinect v2

I have a small problem that I am sure has an easy fix but I am having difficulty finding an example or working code. I am programming in Visual Studio using C#. I am trying to capture an image from the Kinect (v2) device. The device is already working as its intended in my programme and is displayin...
Josh Robertson
1

votes
2

answer
369

views

Check if any inputs are focused or active not in a form

I can't use a form in this situation, but I have a group of inputs elements. I have a table row and each td is an input. Once one loses focus I want to check to see if any others are active, if not i want to run some code. js $(document).on('blur', '.table-row', function(e) { var $tr = $(e.currentT...
josh
1

votes
2

answer
234

views

Escaping semicolon and quotes in orientdb update operation

I'm running into strange errors when trying to update strings with both semicolons and quotes. For example, the following sql fails with the error: 'java.lang.IllegalStateException: Missing closed string character: ''', position: 64: UPDATE #26:185 SET description = 'Text'; However, if removed the...
Josh

View additional