Tom Tom

12455 questions
0

votes
0

answer
3

views

Wait for Element inside Shadow-Root to be present using Nightwatch

Using Nightwatch I am trying to clear the browser cache of Chrome which means I have to click the Confirm button on the settings page and therefore wait for it to be present. (chrome://settings/clearBrowserData) Because Chrome is using shadow-roots this isn't as simple as selecting the element using...
Tom
1

votes
1

answer
136

views

C++ placement of 'const' trouble.

First of all I would like to thank in advance anyone who answers this question. Your help is greatly appreciated. This is my first time posting here, so please forgive me if I post with bad etiquette. My question is about the method prototype: void copySubtree(Node * & target, Node * const & origi...
Tom
0

votes
1

answer
14

views

Multiple columns on left side of IN condition

This is a valid statement: SELECT foo FROM table1 WHERE column1 IN (SELECT bar FROM table2) AND column2 IN (SELECT bar FROM table2) But is there any way we can avoid repeating the SELECT bar FROM table2 statement to make it simpler and more economical? I mean something like this: SELECT foo FROM tab...
tom
1

votes
1

answer
4.3k

views

Declare a variable using IBM iSeries Navigator “Run SQL Scripts” utility

I'm new to IBM DB2, using the iSeries Navigator, IBM iSeries Access for Windows Version 5 Release 4, the "Run SQL Scripts" utility. Is it possible to use a variable in this utility? A number of Stack Overflow answers (and answers on other forums) instruct one to use code like the following: BEGIN A...
Tom Regan
1

votes
2

answer
675

views

Index and IndexMut implementations to return borrowed vectors

I've been working on a multi-dimensional array library, toying around with different interfaces, and ran into an issue I can't seem to solve. This may be a simple misunderstanding of lifetimes, but I've tried just about every solution I can think of, to no success. The goal: implement the Index and...
Tom Scogland
1

votes
2

answer
3.8k

views

Laravel Intervention/ Image Maximum execution time of 30 seconds exceeded

I have a photography website I am working on in Laravel. I utilize a package called Intervention / Image. In the sites administrative area is a place where admins can create projects then upload any number of images to that project. The problem is that if the images are sizable 4mb or bigger and the...
Tom Bird
1

votes
2

answer
157

views

NSString sizing does not account for Greek breathing marks

I've got an app that displays Greek text. I use the Cardo font for good display. In working on an AppleWatch extension and app, it was pointed out to me that some of the special characters are being cut off. This is how some example text should look (screenshot from an iPhone simulator): Here is th...
Tom Hamming
0

votes
2

answer
23

views

Populating ListView gives me weird notation [duplicate]

This question already has an answer here: javafx implementing and showing a ListView 1 answer How can I Populate a ListView in JavaFX using Custom Objects? 3 answers How do I print my Java object without getting “[email protected]”? 10 answers I have made a list where I place animals in. But...
1

votes
1

answer
761

views

SSIS - debugging not working

Recently started using Visual Studio 2012, converting SSIS packages from 2008, and seem to be unable to set breakpoints in Script Tasks. The error we're receiving says Cannot start debugging. Pre-debugging negotiations with Host failed. Cannot seem to find any information about this error, or wha...
Tom
0

votes
2

answer
13

views

Using url parameter in route to use in conditional

I'm trying to find the correct way to lay this out in laravel so that I can hit one GET route which calls a single function, but within that function I want to use data from a mysql table to determine which blade to show. Say this URL is visited with a query string parameter: www.testsite.com?email=...
Tom N.
0

votes
0

answer
2

views

Is there a work-a-round to serializing some Microsoft Graph Entities with interfaces like Domain

I wanted to generate a test program to execute against our client tenants to verify we could handle all the data our new Microsoft graph app collects. My plan was to serialize the data using XmlSerializer serializer = new XmlSerializer(typeof(List)); It failed on the first entity I tried, Microsoft...
tom.kanary
0

votes
0

answer
12

views

Where to store a reference to other data models (in mongoDB) for best performance

In my project I have users and circles. Circles can have multiple users and a user can be in multiple circles. Lastly there are events. Each event can have multiple users in one circle. Later, events will get a lot of content, so there will be a lot of stuff to load (images, comments, etc.). I was...
Tom
1

votes
1

answer
225

views

Setting priority with ActiveJob when using Delayed::Job

How do you set the delayed job priority when using ActiveJob to enqueue your jobs? class GuestsCleanupJob < ApplicationJob queue_as :high_priority def perform(*guests) # Do something later end end
Tom Rossi
0

votes
0

answer
6

views

d3 reorder group elements to a specific order

I have multiple groups inside another group and i want to reorder them in a specific order. ... ... ... ... ... Each groups inside the wrapper group has an id, right now the order of the ids are b, a, c, e, d. Say i want to order it with an array [3, 1, 4, 5, 2] then the corresponding order will be...
tom c
1

votes
2

answer
20

views

Pandas groupby fillna with first valid value (window functions)

I have a dataset where I need to fillnas conditionally, with the first value from the appropriate groupby, but I can't figure it out. import numpy as np import pandas as pd df_dict = { 'id':[1, 1, 1, 1, 2, 2, 2, 2], 'data':['A', np.nan, np.nan, np.nan, 'B', np.nan, np.nan, np.nan, 'C', np.nan, np.na...
Tom Kealy
1

votes
2

answer
41

views

Writing a loop that works for any value of N

I have a code for a 1D heat equation. Im trying to format a for loop so that the A matrix will follow a certain pattern of 1 -2 1 down the entire diagonal of a matrix that could be infinite. The pattern starts to take shape when I mess around with the initialized count at the beginning of the for lo...
Tom Hill
0

votes
0

answer
5

views

what is DynamoDB's replication type?

What is the replication type of dynamoDB? Im assuming it is peer-to-peer based on online results but can any confirm or deny?
tom dinh
0

votes
0

answer
6

views

steps for write ahead log protocol

What are the steps for write ahead log protocol? I know these are the steps, but I don't know the order they occur in. a. Updated data is persisted on disk. b. Data is updated in memory. FIRST c. The log is persisted on disk. d. The log of this update is written in the memory. Im assuming with my...
tom dinh
-1

votes
1

answer
6

views

Configuration for toolbar or any other section of Ckeditor 5 not reflecting in the UI

I am using the new ckeditor 5 component in my Angular 7 app. I have installed it successfully and able to bind the data to the ckeditor. The problem I am facing is that i am not able set the configuration of the editor. No matter what I set in the configuration doesn't reflect in the editor. Could s...
Tom
-3

votes
2

answer
31

views

When I place my doubles on top, the program doesn't run properly

Assignment: Variables This program prompts the user to enter a temperature between -58°F and 41°F and a wind speed greater than or equal to 2 then displays then displays the wind-chill temperature. // Imports util.Scanner import java.util.Scanner; public class Windchill { public static void mai...
Tom Tran
1

votes
1

answer
937

views

Openlayers ol.style.Text with multiple colors

Is there a way to set multiple font colors for ol.style.Text class for openlayers 4+? I am trying to do something like const label = new ol.style.Style({ text: new ol.style.Text({ text: 'X other text', textAlign: 'center', font: '11px roboto,sans-serif', fill: new ol.style.Fill({ color: 'white' })...
Tom
1

votes
2

answer
648

views

using a destroyed view for changeDetection in ngAfterViewInit

A private (but open source) Angular package in the organisation I work for has some code that looks like this: ngAfterViewInit(): void { setTimeout(() => { this.changeDetector.detectChanges(); // do more things }); } We implement this package in our application (the package is to introduce common co...
Tom Oakley
0

votes
0

answer
5

views

Star schemas and column oriented databases

I was wondering, why do column oriented databases support star schemas better that row oriented one? Is it because query performance is better?
tom dinh
0

votes
0

answer
5

views

Combobox - Filter list based on input text

I am trying to modify the following code to allow for a combobox where the list is automatically filtered based on your input, similar to how a filter preview narrows fields when you are filtering a table column. The code is supposed to pull in the range A1:A791 for a list of 790 items I want includ...
Tom Irlik
1

votes
1

answer
1.7k

views

Mock named exports for testing using Jest

I have a Helper.js file with several helper functions as below that is being used in different components. export function buildOptions(elem) { var oList=[]; for (var i=0; i < field.length; i++) { oList.push ( {options[i][elem]} ) } return oList; } export function B(){ ..... } Here is a comp...
tom
0

votes
0

answer
4

views

Https Front-end using Socket.io not connecting to NodeJS back-end server

I have a Debian 9 Server, server A, which serves a https page (build with ReactJS) through Nginx, the certificate was obtained using Certbot. On Server A, I also have the back-end, a NodeJS file, which I use for serving incoming socket.io connections on a specific port, and I start it up through "n...
Tom
1

votes
2

answer
512

views

How do I install PyTorch v1.0.0+ on Google Colab?

PyTorch v1.0.0 stable was released on 8 December 2018 after being announced 7 months earlier. I want get a version optimised for the hardware that my IPython kernel is running on. How do I get this version on Google Colab?
Tom Hale
1

votes
1

answer
71

views

PyTorch transfer learning with pre-trained ImageNet model

I want to create an image classifier using transfer learning on a model already trained on ImageNet. How do I replace the final layer of a torchvision.models ImageNet classifier with my own custom classifier?
Tom Hale
1

votes
1

answer
60

views

Revel and Docker container

I am attempting to create a docker container that contains the revel skeleton app. Everything seems to build OK and the container is created but when I go to localhost:9000 in my browser nothing comes up. To make sure my environment is working properly I created a simple hello world go app and crea...
Tom Vaughan
1

votes
2

answer
97

views

Clean Architecture: How to reduce complexity when writing application business rules?

Let's assume we have the following "Create User" scenario: Users can signup to the application using Facebook, Google+ or LinkedIn; The backend should retrieve some basic profile information in order to register the user(email, firstName and lastName); Users are registered with a "client Id" (Just a...
Tom Melo
1

votes
3

answer
62

views

Clone VSTS Build Definition in C#

I'm using BuildHttpClient's .GetDefinitionAsync and .CreateDefinitionAsync to clone a VSTS Build Definition. This works fine but I'd like to create the build defs in a different folder, other than the root folder of the project. I can add a folders via the "Manage Folders" link web but how can I do...
Tom
1

votes
1

answer
59

views

How to calculate the total sum end of each loop?

I am fetching the data from the table "daybook" according to date.I haved fetched data and display in the front-end also. My problem is i have two column debit and credit,it displays the amount.I have to calculate the sum of this at each end of looping. My expected result: My code: My view page code...
Tom
1

votes
2

answer
9.2k

views

how to replace a double quote with string ' \" ' in XSLT?

I have an XML in which the double quotes should be replaced with the string \". eg:teset "message"here]]> so the output should be teset \"message\"here]]> Can anybody explain how to accomplish this?
Tom Cruise
1

votes
1

answer
5.3k

views

java: Using Buffered Reader and checking if String is null

why doesn´t if (txtLine == null) { break; };work? or maybe the correct answer is why does it still set the string txtLine to null (literally). The way I understand it, it should break the moment the string is null? I don´t want it to set the string to "null". but stop when there are no mo...
Tom Lilletveit
1

votes
2

answer
209

views

Replace all attributes in Visual Studio

I have many cs files, with the next annotation: [Js(Md.pr, imo = false, tr="csc")] where the tr value is changed between each cs file. I want to delete all these annotation automaticlly. So I try to use "replace all" in Visual studion, when I choose regular expressions function. So I wrote: find wh...
Tom Avni
1

votes
2

answer
2.1k

views

Return all email metadata in Office 365 Mail REST API preview

How do I return all the metadata from the Mail REST API that is part of Office 365 APIs Preview? The msdn docs seem to be indicating that you send an Accept header with the value of "application/json;odata.metadata=full", but that results in the limited number of properties being returned and doesn...
Tom
0

votes
0

answer
3

views

Transpose data from column to column headers

Is there a way to extract data from a column and use it as a column header to show the data? I think an example may be the best way to explain: In Access Thank you.
Tom Rundle
1

votes
1

answer
25

views

How to have conditional statements in “linked” method calls?

Is there a cleaner way of writing this code? It's only the .trim() statement that differs. if (imageOptions.trim) { // Trim gm(imageBuffer, 'image.' + imageOptions.imageFormat) .gravity(imageOptions.gravity) .resize(imageOptions.imageWidth, imageOptions.imageHeight, '^') .crop(imageOptions.imageWidt...
Tom Söderlund
1

votes
3

answer
85

views

PHP named parameter

Hi I am new to php and I am facing difficulties with named parameter. I am learning form "Murach's php and sql book" Here is the code in my question, $query = 'SELECT productCode, productName, listPrice FROM products WHERE productID = :product_id'; $statement = $db->prepare($query); $statement->bi...
Tom
1

votes
1

answer
451

views

Swift ios viewDidLoad, viewDidAppear image control size different

i have noticed that an UiImageView that's set to take full width is not given its correct width before viewDidAppear. This is a bit problmatic for me because: I load in a custom logo graphic that can have any high/width This means that to keep scale (and full width) I set a height constraint to matc...
Tom

View additional