Tom Tom

16721 questions
0

votes
0

answer
2

views

How display chart axis in normal layout (Y-Vertical, X-horizontal)? (Auto-replace error with axis layout) [C# WindowsForms]

I try to print a point chart (WindowsForms) in normal layout (I mean axis X is horizontal, and axis Y is vertical), but when I do it, it auto changed axis location. After print I've got X in vertical and Y in horizontal. image -> https://ibb.co/7KvdfXr (I dont have 10 reputation rank...) How display...
Tom Mro
1

votes
1

answer
124

views

UITests failing when run in group but succeed when run independently

I'm currently working on a project with many asynchronous code and I'm writing the UITests for this project. During the development I run them one by one but never in a group. So I thought the tests are succeeding. But when testing them all together most of them are failing. I implemented the setup...
Tom Kuschka
1

votes
2

answer
199

views

Can Jenkins build only one python package in a monorepo with multiple packages?

Suppose there is a monorepo with several independently buildable python packages in different directories, something the format shown below, where foo and bar are independently buildable. Now suppose someone pushes code to a git repository where this is hosted, and the code revisions live within onl...
Tom
1

votes
2

answer
51

views

Assign values with for loops to pandas DataFrame columns

I am a Python beginner and have a problem with a for loop. I want to assign a list of numbers to different DataFrame columns. Manually, I can assign my values with the correct code, but copy and paste isn't a good style for programming. The correct manual code looks like this: df = pd.DataFrame(colu...
Tom
1

votes
1

answer
28

views

Component not accepting camelCase names

My issue here lie with me trying to make a navbar component, some data must be shared from the main page to the component, and while spending a few hours researching into how to use components, i can find nowhere that can explain why i cant use camelCase variable names to bind data. Can anyone point...
Tom Edwards
1

votes
1

answer
163

views

Primefaces RequestContext under 7.0

My pre-7.0 Primefaces application has this code: RequestContext.getCurrentInstance().execute('window.open('myUrl');'); I understand that RequestContext is no longer available in 7.0. What is the equivalent to perform the same action?
Tom T
1

votes
2

answer
28

views

Javascript clone/append either affects the wrong image or all images

I have a pretty basic function that gets a result set of images based on search input function appendSomeItems(url, id, name, style) { return ' ' + name + ' ' + style + ' '; } This works perfectly fine, and it is called in another function that basically gets up to 10 images from the result set and...
Tom N.
1

votes
2

answer
40

views

is there a way to override model methods in django?

I have a model like this: class Car(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4) create_date = models.DateTimeField('date added', auto_now_add=True) modify_date = models.DateTimeField('date modified', auto_now=True) ... def last_tracked_location(self): ... try: url = '...
Tom
1

votes
2

answer
32

views

Struggling to add text inside path SVG objects

I have converted a jpeg to SVG using Illustrator. Within the six circles I wanted to be able to center some text that I could customize. I have tried the following code and nothing is appearing. At this stage I am not sure where I am going wrong as I followed previous advice I have seen on stackover...
Tom J
1

votes
2

answer
67

views

Is an x86 CPU in kernel mode when the CPL value of the CS register is equal to 0?

The last two bits of the CS register contain the Current Privilege Level (CPL), which can contain either the value 0 or 1 or 2 or 3. If the value of CPL is 0, does that mean the CPU is in kernel mode (and hence can do everything)? or are there other things that must apply in order for the CPU to be...
Tom
1

votes
2

answer
17

views

Merging datasets of which only some columns match

I want to merge about 27 different datasets. For each of these datasets there are many identical columns, but also many columns that are not identical. I would like the identical columns to 'stack' while the non-identical columns are simply added. Let's assume that datasets 1 and 2 look as follows:...
Tom
1

votes
3

answer
41

views

cassandra partition and clustering key

Is is possible to have a column as a partition and clustering key? For example, Create table citylist2 ( city varchar, loc list, pop int, zip varchar, state varchar, primary key (city,city,zip)) WITH CLUSTERING ORDER BY (city ASC, zip DESC); results in: InvalidRequest: Error from server:...
tom dinh
0

votes
2

answer
27

views

Check for undefined failing in Angular 7

I am trying to do an undefined check on number variable in Angular 7. Though the value is undefined it doesnt satisfy the condition. Could you tell me where I am going wrong. public init(val: string, selectedClassficationId: number) { this.Mode = val; if (selectedClassficationId !== undefined) { thi...
Tom
0

votes
1

answer
8

views

Setting Orderline Pricelevel to Custom using SuiteScript 2.0

I'm trying to set the amount of a discount using suitescript. I can add the discount line but I need to be able to set it to discount amount. Current Code salesOrder.setCurrentSublistText({ sublistId : 'item', fieldId : 'item', text : ECOM_BUNDLE }); salesOrder.setCurrentSublistText(...
Tom Hanson
-3

votes
0

answer
14

views

Remove text after space( on every X row

I would like to use regex to remove everything after the 'space(' in the reference row or every 4th row or would it be 3rd row. I tried the following regex ^(reference: ).*(\(.+?\)) which removes the entire row or I tried \(.+?\) which matches everything inside a parenthesis but i can't workout how...
Tom Han
1

votes
1

answer
1.3k

views

Is it possible to download an audio file and play it using React Native Expo?

I have audio files hosted on a server that I'd like my app to access after authenticating. Users send a GET request which includes an authentication token, and the server returns the binary audio data. As far as I can see there is no way to save this 'blob' as an audio file to the filesystem. The cu...
Tom
0

votes
3

answer
38

views

Java best practice: Nested maps

I need to store a table of data for something like the following: ID, Month, Value1, Value2 I am currently using: List should I convert it to something like the following for readability: List where: public ObjectA { private ID; private Map map; } public ObjectB { private int value1; private int val...
tom
1

votes
1

answer
32

views

Use of “Paste” with “- - -” in Bash/Shell

I came across several lines for reformatting text files like this paste - - - - < file.fq | cut -f 1,2 | ... I couldn't figure out what the - - - does to the paste command. How does the number of dashes matter?
Tom M.
1

votes
1

answer
53

views

C# how find the extra ) or ( parentheses in string, and replace them with @

C# how find the extra ) or ( parentheses in string, and replace them with @ sample input )(more))) ((((more))) ((((more)) (about)((index)(more))) (about)((index)(more)()) (about)(((index)(more) (about)(((index)(more (about)(((index)(more))))) sample output @(more)@@ @(((more))) @@((more)) (about)((i...
M.Tom
1

votes
2

answer
43

views

How to make oblique endings of after and before elements?

you can see a pic below (I am really bad at painting, sorry for that). I don't know how to make these (I guess) box-shadows (pink in the picture) only on two corners, but their ending is oblique. Because what I think, those borders (red in the picture) on corners can be made with after and before el...
Tom
1

votes
3

answer
38

views

Flutter banner does not fit

I have a problem with banner widget. To demonstrate it I have made some demonstration code. What I want is to have a banner in the top right corner of a container, but it is ugly, as it overflows its child (pls. see the attached image). Here is my code: class TestPage extends StatelessWidget { @over...
Tom
1

votes
2

answer
66

views

Order given elements with SQL ORDER BY

Given: SELECT projectID, urlID, COUNT(1) AS totalClicks, projectPage, (SELECT COUNT(1) FROM tblStatSessionRoutes, tblStatSessions WHERE tblStatSessionRoutes.statSessionID = tblStatSessions.ID AND tblStatSessions.projectID = tblAdClicks.projectID AND (tblStatSessionRoutes.leftPageID = tblAdC...
Tom Gullen
1

votes
1

answer
402

views

Finding <T> in IList<T> using reflection [duplicate]

This question already has an answer here: How to get the type of T from a member of a generic class or method? 17 answers I'm working on a project where I have to reflect through data models to find out what type is in each property on a data models. I have the code working for all cases except fo...
photo_tom
-2

votes
2

answer
148

views

Keeping Delphi DFM files in sync with their PAS files

I have a Delphi project with a lot of DFM files and matching PAS files. I can compile the PAS by just rebuilding the project, but how do I rebuild and keep the DFM files in sync with their PAS files? Right now I am getting a lot of '[Variable.field] does not have a corresponding component. Remove th...
Tom Kelly
1

votes
1

answer
92

views

Java Spark: com.mongodb.spark.config.writeconfig issue

I am trying to connect with MongoDB via java spark connector and I am getting an error 'com.mongodb.spark.config.writeconfig', when I submit the jar and run the jar in spark shell. Here the error screenshot: Could you please help me to resolve this issue. I have tried this as well, but no success. $...
Tom Swayer
1

votes
0

answer
55

views

Does Realm respects “Writable and Executable Segments (Enforced for API level >= 26)”

According to Android 8.0 Behavior Changes there was a change in NDK that has the following statement In apps targeting Android 8.0 (API level 26), native libraries no longer load if they contain any load segment that is both writable and executable. I am not sure what it means, but I am curious if...
Tom Koptel
1

votes
0

answer
388

views

How to set, Laravel Queue Payload format

How to set, Laravel Queue Payload format. I don't want to change the source code. source code: File Path: vendor\laravel\framework\src\Illuminate\Queue\Queue.php /** * Create a payload for an object-based queue handler. * * @param mixed $job * @return array */ protected function createObjectPaylo...
tom lee
1

votes
3

answer
720

views

How to handle deadlock in Doctrine?

I have a mobile application and server based on Symfony which gives API for the mobile app. I have a situation, where users can like Post. When users like Post I add an entry in ManyToMany table that this particular user liked this particular Post (step 1). Then in Post table I increase likesCounter...
Tom
1

votes
1

answer
64

views

How do I manipulate python numpy values in a separate C++ plugin

I'm trying to send the data of a numpy array in Python to a separate C++ plugin. Is it correct to just send the address I get from __array_interface__['data'][0] to a C++ plugin, and create a double pointer from it there? I'm assuming that since it's a flattened array, all the values are aligned w...
Tom
1

votes
1

answer
334

views

C# Take window/desktop screenshot using SlimDX

I am new to SlimDX and I've heard that there is a way to capture screenshots using this library. The reason I want to use SlimDX is that I want to capture screenshots much faster than Graphics.CopyFromScreen() so that I can make a livestream app running at higher framerates. I have some code I foun...
Tom Lenc
1

votes
2

answer
44

views

How to access the contents of a directory passed in the URL parameters passed to a browser

First off, for Chromecast reasons, I want to, currently, limit the solution to the Chrome browser. What I'd like to do is package up a directory of images, with a launcher batch file (cmd or sh) and an html file. The html file is to be completely self contained, with no imports. The bat file would c...
Tom Kimpton
1

votes
1

answer
1.9k

views

IDX10214: Audience validation failed. ADFS .Net

I'm validating against my ADFS server and am getting the following error message. 'IDX10214: Audience validation failed. Audiences Did not match: validationParameters.ValidAudience' This link shows my code--its a very simple proof-of-concept for authenticating within the visual studio IDE. It tak...
Tom McDonald
1

votes
1

answer
299

views

Create a random bijective function which has same domain and range

Create a random bijective function which has same domain and range. By random bijective function I mean a function which maps the elements from domain to range using a random algorithm (or at least a pseudo-random algo), and not something like x=y. The domain and range can be a very small set someti...
tom
1

votes
0

answer
279

views

plupload - issue with chunk size

I've just starting out using plupload and have tried the basic example and the PHP chunked example. These seem to work fine when I keep my chunk_size to 2048kb However, if I increase this value the webpage shows the file has uploaded correctly but the upload folder either doesn't show the file or on...
Tom
1

votes
2

answer
295

views

Code analysis changes if SonarQube full analysis report enabled in VSTS

I've been setting up SonarQube analysis for one of our builds in VSTS, and I've noticed that there's a difference in the code analysis / build warnings if the advanced option 'include full analysis report in build summary' is enabled in VSTS. We have a custom ruleset enabled for our local builds in...
Tom Anderson
1

votes
0

answer
43

views

Refactoring PHP script for adding new SELECT query for insert

I have a working PHP script that currently runs SQL queries to pull data from different tables in INSERT/UPDATE one single table. It's working fine but I now need to add a new select query to it and after a bit of refactoring I'm only needing to use one sql server connection now which helps me in te...
Tom N.
1

votes
3

answer
41

views

Issue with searching for strings in text in Powershell

I am building a script to monitor backups with Ahsay in PowerShell and have run into an issue with identifying backup types, it works by checking for certain keywords in the first few lines of the log file, and I want to have it so that if it contains the word 'File List' but also contains the word...
Tom Halverson
1

votes
0

answer
70

views

Scipy.stats binned_statistic_dd for 3D closest-to-centroid per bin

Action Select closest to centroid for each bin in binned 3D point set. Attempts Using binned_statistic_dd from scipy.stats I tried to take the binned mean of this 3D pointset. However, it will only compute the mean for one of the dimensions at a time. import numpy as np from scipy.stats import binne...
Tom Hemmes
1

votes
2

answer
39

views

Issues with validating fields in constructor of a subclass

I am now learning about Java's inheritance. I have total of 3 questions, and thank you for your support. 1st question: Can I validate a class's fields in its constructor? 2nd question: Some people recommended me to throw an exception for validation. Does it mean throwing an exception to the calle...
Tom_the_cat
1

votes
1

answer
137

views

How to use the get method with multiple hosts in fabric v2?

I have a fabfile that run several tasks on the hosts. This results in the creation of a file result.txt in each of the hosts. Now I want to get all these files locally. This is what I tried: from invoke import task @task def getresult(ctx): ctx.get('result.txt') I run with: fab -H host1 host2 host3...
Tom Cornebize

View additional