jon jon

0

votes
0

answer
3

views

How to normalizing data from the server in easy way in ngrx

I'm using ngrx/redux pattern in my app. In Normalizing State Shape article, is it written that I should create a 'table' for each object and link between them by an id. for example: posts = [{ id, author, comments: ['commentId1', 'commentId2'....] }] comments = [{ id: 'commentId1', comment: '..' }...
Jon Sud
0

votes
0

answer
4

views

Build grpc in qT for iOS / Android Targets from Mac

I am having undefined errors when attempting to build qt app in Xcode for iOS target. Errors are lib issues with arm64 and undfined grpc methods. I added the protobuf 3.7.1 lib root project folder and referenced in pro file. Also, added grpc 1.20 cpp libs. Now I am not sure if my cross platform com...
Jon
1

votes
1

answer
52

views

Tool to track SQL schema like infrastructure as code?

I have been using AWS Cloudformation and Terraform to manage cloud infrastructure as code (IAC). The benefits are obvious. 1) Template file to concisely describe your infrastructure 2) Versioning 3) Rollbacks I also have a PostgreSQL DB where I can dump the schema into a single file. Now, it would b...
Jon Vogel
1

votes
1

answer
23

views

MKMapView not full screen with TabBar

I am making a simple app to display various things and on one of the tabs I like for it to display a map of your current location. It seems for some reason, even though in Xcode the controller is stretched towards the bottom, it looks like when run in the simulator, an area of unused space and I am...
Jon Weinraub
0

votes
0

answer
38

views

Javascript Pop-up alert - Days countdown Inside alert (7 - 0 days)

I have a pop-up alert in JS and HTML that has to popup if a ticket is older than 7 days. When the ticket does pop up, a user has another 7 days to respond to the ticket, so it accumulates to a total of 14 days. My issue is as follows: If the pop-up appears, it must show in the alert that a person h...
0

votes
1

answer
17

views

Passing arguments to a Python function within a function

In the case shown below I have a function titled func1() that resides in func3(), where func3() is solving for the value of an ODE using the Euler method. def func1(x, y): return y * np.log(y) / x def func3(x, y, step_size, func): dydx = func(x, y) new_x = x + step_size new_y = y _ step_size * dydx...
Jon
1

votes
3

answer
77

views

Name of a Data Structure

Here is the problem description: I have an object that represents a unit of work (Uploading a large amount of data to a server). The objects should be processed (Uploaded) in a FIFO sequence (Queue) one at a time. Once an object is done being processed it needs to signal to the next object in line t...
Jon Vogel
1

votes
2

answer
35

views

How to exclude code from production in build-time?

How do I exclude typescript code from webpack bundle during build-time? For example, I have this line of code in app.ts (nodejs application): const thisShouldNotBeInProductionBundleJustInDevBundle = 'aaaaaaa'; I want when I build my app using webpack configuration to exclude this code.
Jon Sud
1

votes
3

answer
52

views

C++ ambiguous constructor when using typedefs

Are there any elegant solutions to the following problem involving ambiguous types when overloading functions in C++? I want to have two different types: 'distance' and 'angle' which semantically mean different things but which may in fact have the same type. When trying to do this in C++ I run up a...
Jon Deaton
0

votes
2

answer
20

views

How to find documents inside ref object without an id?

I have two documents in mongodb: export const Category = mongoose.model('Category', new mongoose.Schema({ name: { type: String }, })); export const SubCategory = mongoose.model('SubCategory', new mongoose.Schema({ name: { type: String }, category: { type: mongoose.Schema.Types.ObjectId, ref: 'Catego...
Jon Sud
1

votes
1

answer
53

views

AngularJS Component to Watch and Display Notification when UiRouter Route Changes

I have two components on my page: Navigation component and Form component. I want to notify the user if they navigate away from the page (via clicking on the Navigation component or pressing the browser 'back' button) if the form is dirty. I have already implemented the dirty checks, but I don't kno...
Jon
1

votes
1

answer
284

views

how to speed up flipclock and stop at a certain point?

I'm currently using Flipclock.js to start a counter when the user scrolls past a certain point. I'm looking for a way to speed this up so it rapidly counts to a time (say 5 minutes, within 5 seconds) and then stop. Essentially I need more of an animation effect than an actual counter. Has anyone had...
Jon L
1

votes
0

answer
52

views

Capture paste into HtmlEditorExtender TextBox and modify it

My goal is to capture the pasted data into a TextArea attached to an HTMLEditorExtendor and remove all the html, then put that modified data into the control. Is this possible? I've tried to grab the OnPaste event but it doesn't seem to fire. This is what I have so far: $(document).ready(function ()...
Jon Glazer
1

votes
0

answer
28

views

Maintain source formatting with column reorder Excel VBA

I have been importing data from a downloaded report into a working-copy excel workbook for some time now, but someone higher up than me recently decided to change the report that I download for my information. The easiest solution seems to be to re-order the information in the report workbook befor...
Jon
1

votes
2

answer
196

views

Overriding generic abstract method to return specific type

I have an abstract class that is the below method signature: protected abstract TResponse Handle(T command) In a class that overrides this I have something like the below: protected override TResponse Handle(ListFilmsByIdCommand command) { return 9; } However this fails to compile as it cannot conve...
Jon
1

votes
0

answer
758

views

CoreData Sync with CloudKit or iCloud

I'm using Swift 4 and I have 3 to 4 CoreData entities in my project. I want to sync CoreData with iCloud for sharing on other devices and also for a backup of data. I have seen more questions on StackOverflow related this but not found any solution in Swift 3 or Swift 4. I think CoreData to iCloudKi...
Jon Striker
1

votes
1

answer
27

views

best way for add scope reference in function

hi guy what the best way for add scope obj reference to a function. my example , i have a super object. var SuperObj = new PIXI.sprite(); SuperObj.action = new subObj(); SuperObj.action.actionFunction = function(){// need to acces to SuperObj}; when i add function stuf to action, i need add a scoped...
jon
1

votes
1

answer
59

views

Write to multiple cells in Google sheets

is there anyway to write to multiple cells with just one line of code? Instead of: response_sheet.getRange('B1').setValue('Name'); response_sheet.getRange('B6').setValue('Evaluators:'); response_sheet.getRange('A9').setValue('Ownership'); something like: response_sheet.getRange([['B1'],['B6'],['A9']...
Jon
1

votes
0

answer
251

views

Time-dependent rank autocorrelation in pandas

I have a MultiIndex pandas DataFrame of this schematic form (although the real dataframe I'm working with has millions of rows): import pandas as pd df = pd.DataFrame([['Alpha', 'a', 1,10], ['Alpha', 'a', 2,20],['Alpha', 'a', 3,30], ['Alpha', 'b', 1,50],['Alpha', 'b', 2,60],['Alpha', 'b', 3,10], ['A...
Jon
1

votes
0

answer
26

views

Realm policies and user graph

This is an architecture question regarding the Realm Platform. First, I think Realm is great. I'm a huge advocate. I'm trying to convince my team to get the enterprise addition and sync it with our postgresql backend. Here is what I need to be able to explain: Lets say you have a chat application al...
Jon Vogel
0

votes
1

answer
14

views

Convert text with tabs to a valide JSON with regex

I try to convert this plain txt exported from a audio sofware (audacity) 0.147652 0.983684 noing_grf 2.316547 3.609503 boing_4r4 To a valid json objet format like this { 'noing_grf': { start: 0.147652, end: 0.983684 }, 'boing_4r4': { start: 2.316547, end: 3.609503 }, } The pattern i try...
jon
1

votes
2

answer
504

views

Opening .xlsm files not opening via .bat file (cmd prompt)

I recently started experiencing an issue with a series of .bat files I schedule to open via the 'Task Scheduler' in Windows 10. These tasks and batch files were working perfectly for over a year and now they are giving me fits. Here is the code in the batch file which I created in Notepad and saved...
Jon
1

votes
1

answer
64

views

Trying to make a local copy of an existing wordpress site

I'm using WAMP to try and make a local copy of a rather large wordpress site. After some struggle with the database i moved all the files from the ftp: to my www/ wamp folder. Now when i try to open the pages i get: localhost is currently unable to handle this request. HTTP ERROR 500 BUT i can ope...
1

votes
0

answer
35

views

Securing ActiveMQ REST API

Has anyone configured ActiveMQ REST API access in such a way that the username created in jetty-realm.properties does not have any access to the Admin Console? If so, does anyone have any sample jetty.xml and jetty-realm.propeteis examples that they are willing to share? Thanks in advance!
Jon Terrones
1

votes
0

answer
86

views

matplotlib format_coord text is wrapping

I'm using Matplotlib's Axes.format_coord to show the y-coords of several curves at the same time, and the text is long enough that it wraps to a new line, which is only partially visible. Here's an image of the bottom edge of a figure showing the issue. Is there a way to increase the length of the s...
Jon
1

votes
0

answer
536

views

How to sign a JWT token for OAuth client credentials for Office 365 in Java / JJWT? “Client assertion contains an invalid signature”

I am following this guide to the client credentials flow and this guide to the JWT token needed. The ultimate objective is to access calendar information through the Microsoft Graph API. Calls to the Graph API need to be authenticated with an access token which is obtained from the Microsoft token...
Jon Moore
1

votes
0

answer
91

views

autofac registration in webapi some singleton components some per request

Our framework has the following structure: webapi project basic CQRS project Nhibnerate configuration project The solution uses Autofac to wire up all the classes. The api will load all assemblies and register all the modules in those assemblies. Most of the modules simply look for all interfaces a...
Jon
1

votes
1

answer
34

views

Refresh Page with URL Hash after Submitting Form with jQuery Tabs

Im a long time self taught user, just never had an issue that wasnt already answered in some form or another. Awesome community thank you all! So I am dumbfounded as to why javascript will not properly refresh my page. I have a very large page that I use with jquery and vertical tabs tagged with ur...
Jon
1

votes
0

answer
80

views

Merging Two Derived Tables in SQL

Through the following SQL query, I am getting the table below SELECT COUNT(Specialist_Category.Specialist_ID), Specialist_Category_Name.Specialist_Category_Name FROM Specialist_Category, Specialist_Category_Name WHERE Specialist_Category.Category_ID = Specialist_Category_Name.Specialist_Category_I...
Jon Goe
1

votes
0

answer
24

views

Ipython double prompt after error within spyder

I am using Ipython 6.1.0 / python 3.6.2 in the anaconda distribution. Within the spyder 3.2.3 iPython console, after an error, I get two input prompts, which prevents pdb being used in post-mortem mode [pdb.pm()]. Standalone ipython works fine. Does anyone know a fix for this?
Jon Loveday
1

votes
0

answer
90

views

jinja2 for loop dynamic variable

I am trying to use a jinja2 for loop with an array variable whose name is dynamic. The template is london: stations: - station: name: waterloo - station: name: paddington paris: stations: - station: name: nation I want to parse this using something like {% for station in country.capital.stations %}...
Jon Godden
1

votes
0

answer
106

views

Turning Visualizer's getFft() into a float[] representing a bar spectrum

I'm currently struggling with a number of DSP concepts when trying to make sense of the data returned from the Visualizer class's getFft() method. Ultimately I'm looking to accomplish something like this: float[] getBarSpectrum(int barCount) { _visualizer.getFft(_myByteArrayFftBuffer); // Stuff to c...
Jon Halliday
1

votes
1

answer
25

views

counting down showing one result at a time in a div

So I have this snippet of code I made that simply counts down from a number X by subtracting 4 until it cant subtract 4 any more and still get a number greater than or equal to 1. $start = '2647'; for($i = $start; $i >= 1; $i-=4) { echo $i . ' '; } Now, I need help styling it. Right now it just s...
jon
1

votes
2

answer
160

views

Converting a SQL contains query for Entity Framework

I am currently converting some SQL to C# code against Entity Framework and have come up against an issue with a keyword search query. The (very) simplified query ultimately looks like this: SELECT * FROM SomeTable WHERE CONTAINS(Col1, Col2, Col3, ''word'') As per the docs https://docs.microsoft.com/...
Jon L
1

votes
2

answer
49

views

MySQL Query Needs Optimization?

I have a couple of queries that serve their purposes but since I'm not an expert and just dabble here and there, I'm wondering if these queries can be optimized. I'm asking because it seems that as more records are added, the time it takes for the queries to complete also seem to increase. SELECT u....
Jon Davis
1

votes
0

answer
16

views

Python PyFPDF Change Of Image Causes A Crash

I am using a PHP script to call a Python script using the passthru() command. The Python script outputs a PDF. I am attempting to change an image in the header section of the PDF. However whatever I change it to the Python script seems to crash when called via passthru. If I call it on the command l...
Jon Farmer
1

votes
2

answer
42

views

Appending HTML Block to Selector with Variables

We have a fairly simple function called alert which basically creates an alert card (HTML element) anytime it is triggered. For reference we are using Eel to pass variables from Python and run this in a chrome wrapper. eel.expose(alert); function alert(serial, time_key, card_color, screen_msg, ping)...
Jon
1

votes
0

answer
84

views

Google maps scale custom tiles

I use google maps for my iOS app which primarily displays custom tiles. I subclass the GMSSyncTileLayer and request the tile using URLSession.shared when I get the data back I pass it to the receiver like this: let image = UIImage(data: D) ?? kGMSTileLayerNoTile receiver.receiveTileWith(x: x, y: y,...
Jon Vogel
1

votes
0

answer
19

views

Synchronize threads without modifying the parent class

I`m working with the following design in Python 2.7: a master class a child class which extends Thread the master class starts a number of children In each child, I need to call a method from the master class, but that method works correctly only if all the children are started. I tried to sync the...
Jon Lajoie
1

votes
1

answer
21

views

Return select statement without phone area code

I'm stuck and I can't seem to think how you would do this, but for example, how would format my phone number with out the first 3 digits. SELECT VendorContactFName + ' ' + SUBSTRING(VendorContactLName, 1, 1) + '.' AS [Contact], VendorPhone AS Phone FROM Vendors
Jon C

View additional