mark mark

19349 questions
1

votes
2

answer
451

views

Matplotlib x-axis overlap

I have two lists, x_axis which is list of time in the format of '12:30:00'. The y-axis is percent values. I need to plot all the values on a graph, however since x-axis string is too long they overlap. Is there anyway I can have matplotlib not show every single time on x-axis? Any help would be appr...
1

votes
2

answer
36

views

POST method is not working on same page PHP

I know this is asked question however I have tried almost steps but its not working. I know there is a silly mistake somewhere need an experts eye. My code: // if(isset($_POST['country'])) if($_SERVER['REQUEST_METHOD'] == 'POST') { $country = $_POST['country']; echo ''; echo 'alert(' Officer Alread...
mark
1

votes
1

answer
21

views

can't remove an event listener I attached

I have attached an event listener in a module using document.addEventListener('keydown', () => this.clickCatcherFunction(target_id)); but when that function is executed, the line document.removeEventListener('keydown', () => this.clickCatcherFunction()); doesn't remove the listener. Next time a ke...
Mark
1

votes
1

answer
39

views

How can you identify all permissions granted to an application using Microsoft Graph & C#?

I've searched the internet and SO and have only found one answer to the same question; but it was specific to Android programming and I didn't see a clear way to port it to C#. I would like to know how this could be done using C#. Code snippets or an actual example would be great. Basically, I have...
Mark
1

votes
1

answer
41

views

How to pre-populate Room database at first run? [duplicate]

This question already has an answer here: How to populate Android Room database table on first run? 4 answers I am creating an android app in java that uses room SQLite to store data. The app have two tables: CoursesTable StudentsTable I want to add default values for course_name entity so wh...
Mark.222
0

votes
0

answer
13

views

Proper way to manipulate date string with wrong year, but correct time

I'm having to hit an API I have no access to fixing and I need to start a timer showing how long someone has been in a queue for. The date I get back is in this format 1556214336.316. The problem is the year always shows up as 1970, but the time is the correct start time. I need to calculate the...
Mark
1

votes
1

answer
12

views

Exercise with for cycle

Hi everyone I'm new to the forum I'm trying to learn Javascript I should do this simple exercise with the for loop, in practice given an array containing email addresses, on a variable entered by the user via prompt I have to verify that the inserted email is contained in the array and then print th...
Mark
1

votes
0

answer
13

views

java WatchService max of 512 registered directories

I'm using the java WatchService on a Windows box to monitor a network drive, it appears to max out at 512 directories after which even though it registers the folders it doesn't appear to be getting any events from them? It does get events from directories 0-511 though? Is this a limitation in the A...
Mark Gargan
1

votes
3

answer
1.7k

views

Inner Join between table and a subquery on the same table

SQL server 2012. Edit: my original query was more complex than it should be, since I tried to do a Distinct query on a subset of the fields in the table and join that on the table itself to get the other (text) fields. the following query does the trick as well: SELECT DISTINCT p1.id ,p1.Name ,CAST(...
Mark Hagers
1

votes
2

answer
338

views

Custom User Testing in Django

I have a Django application and the custom user - want to test it (do unit testing). My custom user is emailuser, which consists of e-mail and password fields. I want to set up something of such national mplayer, give it a field and a password. But my code below does not work. settings.py AUTH_USER_...
mark
0

votes
1

answer
29

views

Setting background image is breaking submit button

Have the following css to set the background image on a single page app (Angular) .page::before { content: ''; position: absolute; background-size: cover; width: 100%; height: 100%; background-image: url('../../assets/weird.png'); opacity: 0.2; } ... /* button */ #submit-button { position: center; b...
Mark Locklear
0

votes
3

answer
24

views

Wanted to select from a table but it's ignoring it

I want to have a select statement that takes a table parameter of IDs. The desired behavior is that if there are no elements in the table, get all of the values but if there are elements in the table, only select those who's values match the ID parameter of the table. My where clause looks like this...
mark b
1

votes
1

answer
40

views

Trying to setParent during update function gives error

I am trying to spawn a star at a set time interval in Unity. But I would like to parent these stars not to clutter my inspector. But when I try to do this it gives 'NullReferenceExeption: Object reference not set to an instance of an object.' I have used this type of code elsewhere succesfully befor...
Mark
2

votes
1

answer
10

views

Table data returning empty values after web scraping

I tried to web scrape the table data from a binary signals website. The data updates after some time and I wanted to get the data as it updates. The problem is, when I scrape the code it returns empty values. The table has a table tag. I'm not sure if it uses something else other than html because i...
Mark Gacoka
1

votes
2

answer
75

views

Why is the combobox doubling its items when being created?

I'm creating a combobox programmatically as follows: var cbo = new ComboBox(); cbo.HandleCreated += (s, e) => { cbo.DataSource = mylist; }; When I do the above, the combobox displays double the items contained in the list. However, when I do the following, the combobox displays the correct number of...
Ivan-Mark Debono
1

votes
1

answer
90

views

Converting 32-bit integer value to unsigned 16-bit integer

What does the C standard say about: uint32_t a = 0x11223344; uint16_t b = a; When printed, I am getting 0x3344, which makes sense; so this must be legal and correct behaviour?
Mark
1

votes
1

answer
60

views

How to convert an RPGLE function prototype to be called from a 'C' program?

I have an existing RPGLE function that I need to call from a C ILE program. It returns a data structure, and I don't seem to be able to work out what the C prototype, and hence call would look like? I have tried to extract the essence of the problem below. dcl-s idT int(10) template; dcl-s param1T c...
Mark Humphreys
1

votes
2

answer
49

views

Extracting the nth element from each list and storing it in a new column [duplicate]

This question already has an answer here: Python Pandas: selecting element in array column 2 answers I've a dataframe (called 'df') which contains a column called 'grades'. This column contains a list of grades. The data in this column is of type 'object'. student_id grades 0 11 [A,A,...
Mark Kennedy
1

votes
2

answer
140

views

ElasticSearch - Failed to parse content to map - Unexpected character ('\"'

Wondering if you can help, I'm having issues with my code in Elasticsearch that is giving out an error. My code is below and the output is also below, any help is greatly appreciated. curl -X PUT 'localhost:9200/_mapping/jdbc' -H 'Content-Type: application/x-ndjson' -d ' { 'mappings': { 'jdbc' :...
Mark Staples
1

votes
1

answer
45

views

Unit tests for kubernetes controller

I'm trying to write a controller and I'm having a few issues writing tests. I've used some code from the k8s HPA in my controller and I'm seeing something weird when using the testrestmapper. basically when running this test with a breakpoint here I see the mappings are returned. When I do the sam...
Mark
1

votes
1

answer
34

views

Can COMMENTS in Postgres contain line breaks?

I have a very long comment I want to add to a Postgres table. Since I do not want a very long single line as a comment I want to split it into several lines. Is this possible? \n does not work since Postgres does not use the backslash as an escape character.
Mark Smith
1

votes
2

answer
58

views

Extracting JSON values from a SQL Server NVARCHAR column

I'm trying to extract the values, but the always return NULL. DECLARE @TestTable TABLE ( JSON_Column NVARCHAR(MAX) ) INSERT INTO @TestTable VALUES ( (SELECT 111111 AS idTest1, 222222 AS idTest2 FOR JSON PATH) ); SELECT JSON_Column, JSON_VALUE(JSON_Column,'$.idTest1') AS idTest1, JSON_VALUE(JSON_Col...
Mark
1

votes
4

answer
46

views

How to query in sql from three table in one statement?

I have three tables as shown below. How to get (in one query statement) the 'product _name' that has been ordered by the user_id =1 ? (product_name for 1 ,2,3 that user_1 ordered) ?
Mark.222
1

votes
1

answer
30

views

Can you get file path from StreamReader object?

Is it possible to get the path that was used in the StreamReader constructor from the StreamReader object? using (StreamReader fileStream = new StreamReader(filePath)) { string path = fileStream.??? }
Mark Nugent
0

votes
4

answer
24

views

optimize 32-bit value construction

So, I have the following code: uint32_t val; if (swap) { val = ((uint32_t)a & 0x0000ffff) | ((uint32_t)b
Mark
0

votes
0

answer
12

views

MySqlDataAdapter doesn't fill DataTable

I would like to fill a DataTable object from MySql query, and display with DataGrid. The display part of my code works well (It shows a custom DataTable). Somehow the DataTable fill method won't work for me (i copied it from stackoverflow). If i fill up DataTable from List with this function is work...
Mark Ferenczi
1

votes
1

answer
32

views

Is it possible to combine 2 SELECT statements to be used in an INSERT INTO statement? [duplicate]

This question already has an answer here: Insert into table variable with union 2 answers I have the following SQL script (simplified): DECLARE @table TABLE (col1 int, col2 int, col3 int); INSERT INTO @table SELECT id, 1, amount FROM transactions WHERE customerId = 10; INSERT INTO @table SELECT TOP...
Ivan-Mark Debono
-2

votes
1

answer
14

views

Trouble with imports

I have a folder containing my python project. I'm having trouble importing files I need to draw from ->big folder | |___________ | ->files to draw from | | | |_________x.py | | | |_________y.py | |___________ | -> main f...
Mark S
1

votes
0

answer
40

views

Tensorflow CIFAR10 slows down every 100th step

System information OS: Linux Ubuntu 16.04 TensorFlow installed from: Have tried both binary and source TensorFlow version: 1.4.0-19-ga52c8d9, 1.4.1 Python version: 2.7.12 CUDA/cuDNN version: 8.0.61 Hardware: GPU: NVIDIA GeForce GTX 1080 Ti (11GB), RAM: 64GB, CPU: Intel i7-6850K Exact command to repr...
Mark Sonn
1

votes
0

answer
539

views

Azure Function Key Vault Attribute Binding

Can you use key vault secrets instead of appsettings.json on attribute bindings e.g. [FunctionName('QueueMessageHandler')] public static void Run( [QueueTrigger(queueName: '%queueName%', Connection = '%connection%')]string myQueueItem) { *** function code here *** } so my variables %queueName% and...
Mark West
1

votes
1

answer
608

views

How to interpret the output of H2O .predict method for random forest classification?

When I use the predict method on my trained model I get an output that is 1 row and 206 columns. it seems to have 206 values ranging in values from 0-1. This sort of makes sense as the model's output is categorical variable with values 0 and 1 as possible values. But I don't get the 206 values, as I...
mark_maker
1

votes
0

answer
39

views

How to find out if Tensorflow is built from binary or source?

Is there a way to find out if the version of Tensorflow installed on a computer is built from binary or source with Ubuntu 16.04?
Mark Sonn
1

votes
0

answer
267

views

Why can I load a module in GHCi, while Atom can't find it?

I'm using Haskell with Stack and Atom on Windows 10. Sometimes, I like to just write a stand-alone .hs file to play around with various things. When I do that, I prefer to interact with it using GHCi. Usually, I start it from Git Bash: $ stack ghci --color never From here, I can add modules: Prelude...
Mark Seemann
1

votes
1

answer
70

views

Change Button Color based Comparison Modal Input Value And Target Input Value

I tried to google around to find a way to change button colour for below case: Let’s say I have an onclick Button where I click and it opens a modal box which contains an Input box and a Submit Button. If I input β€œ90” in the Input box and submit it It will compare with my target value β€œ100β...
Mark Kho
1

votes
1

answer
333

views

mutt - difference between account-hook and folder-hook

What is the difference between account hooks and folder hooks in Mutt? If I understand Mutt correctly, it can only have one IMAP connection open at a time. So why can't I just let an account hook to set up everything? What needs to be set in account hooks and what should be left for folder hooks and...
Mark Howard
1

votes
1

answer
58

views

Is user IP needed to make Google Analytics see a single visitor from both the tag and the Measurement Protocol?

I wish to use the Google Analytics Measurement Protocol to supplement the information GA stores about a visitor that was already constructed client side, using the GA tag. I might want to set a Custom Dimension for a user, or to record an event, or something else. In my case, I can store and pass t...
Mark Reddin
1

votes
1

answer
40

views

How run modal and arithmetic operator for several buttons

I have an issue with adding addition buttons for a modal and arithmetic operator control. Please see my code for detail. It works when I have only one button. Once I added the second button, the arithmetic operator control is not working right. Is there a better way to run several buttons with onl...
Mark Kho
1

votes
1

answer
806

views

Debugging Topshelf Service

I am using Topshelf to create a Windows service which uses the chrome Selenium driver to manipulate and parse various webpages. While the service code runs fine from a normal (NetCore2) console test application, there's a problem when it runs under the Win32 console app that Topshelf requires. Unfor...
Mark Olbert
1

votes
1

answer
517

views

SQL Server 2014 linked server to Pervasive database

I'm trying to create a linked server from SQL Server to a Pervasive database. I have the 64-bit System DSN configured and working: ODBC DSN set-up and setting up the linked server thus: Linked server set-up with security set to 'Be made without using a security context' (which is correct). Clicking...
Mark McArdle
1

votes
0

answer
45

views

How to get reproducible output with Google Closure Compiler

When I use Google Closure Compiler (simple mode) all functions/fields names are mangled (A, B, etc etc). That's nice, but I notice when I recompile the names are different. This means my diffs for version control often become very big, but contain useless changes. Is there something you can provide...
Mark Knol

View additional