Andy Andy

0

votes
0

answer
3

views

how to use eager execution to save and restore in TensorFlow?

We always use tf.train.Saver() to save and restore weights, like the following example(https://www.tensorflow.org/guide/saved_model). But how to use eager execution to save? how to change the following example? Another question, is it a good idea to use eager? I fond tf.contrib.eager.Saver in (ht...
andy
1

votes
1

answer
1.5k

views

How to access azure service bus message properties in Azure function 2

Using azure functions version 1 it was possible to accept a message as BrokeredMessage. public static void Run([ServiceBusTrigger('MySServiceBus', 'MySubscriptionName', AccessRights.Listen, Connection = 'MyConnectionString')]BrokeredMessage message, TraceWriter log) And then retrieve the properties...
Andy Rich
1

votes
1

answer
1.2k

views

Spring Boot Upgrade Error - Invalid bean definition with name org.springframework.transaction.config.internalTransactionalEventListenerFactory

In an attempt to upgrade spring boot to the latest version 2.1.1 & spring framework to 5.1.3 in a java based web application, I get the following error Invalid bean definition with name 'org.springframework.transaction.config.internalTransactionalEventListenerFactory' defined in null The complete st...
Andy Dufresne
1

votes
1

answer
21

views

How can I trigger a job with a manual click OR a commit message

We have a job (deploy to production) that we generally manually click after checking that build on staging. However, very occasionally we have an issue that we've accidentally deployed and want to get a fix out ASAP. In those case we run the tests locally (much faster) and put [urgent-fix] in our co...
Andy Jeffries
0

votes
1

answer
7

views

Pandas DataFrame Comprehensions

Problem: Add a new column to a DataFrame and populate with the values of a column from another DataFrame, depending on a condition, in one line of code similar to list comprehensions. Example code: I create a DataFrame called df with some pupil information data = {'name': ['Jason', 'Molly', 'Tina',...
Andy
1

votes
1

answer
2.5k

views

GoLang Time Formating and Converting from string

I'm quite new to Go and mainly work in C#. I am currently working on something that will be used as a command to get the next bus. Currently it does not compile because I am struggling with understanding how to use the time package in Go. I have an array of strings formatted as times when it is sche...
Andy
1

votes
2

answer
353

views

What 's the meaning of the number 1 in SIG_IGN macro definition?

#define SIG_IGN (void (*)(int))1 #define SIG_HOLD (void (*)(int))5 #define SIG_ERR ((void (*)(int))-1) I know what (void (*)(int)) means: cast unknown_name into pointer to function (int) returning void. But what's the meaning of the following 1?
Andy Hu
-2

votes
1

answer
26

views

View Python source code of the standard library and external libraries

How can I view the source code of a particular Standard Library and/or an External Library? I would like to see the Python code, not the underling C code. I am trying to find this to see how experienced programmers write their code. I already looked at the Where do I find the python standard library...
Andy
1

votes
4

answer
56

views

Can you check if a column exists and perform different actions with oracle?

My table looks like the following: id | value1 | count I have a list of value1 in RAM and I want to do the following: (if value1 exists in table){ count + 1}else{ insert new row into table} Is this possible with Oracle or do I have to take it to the code, do a for loop and execute one element of th...
Andy
1

votes
2

answer
53

views

Why this pojo program “readline” always return null?

public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new FileReader('day.txt')); BufferedWriter writer = new BufferedWriter(new FileWriter('day.txt')); System.out.println(reader.readLine()); } The day.txt I have wrote some words before execute. If I...
andy
1

votes
2

answer
52

views

Cast Null DateTime Value From Database?

I'm performing a simple SELECT statement and I'm trying to return the value from a DateTime column from a SQL Server 2012 table. The problem is that when I return a NULL DateTime value I don't know how to manage this with my code below. dtTrainingEnd = (DateTime)reader['TrainingEnd']; I've searc...
Andy
1

votes
2

answer
45

views

what is different between groupby.first, groupby.nth, groupby.head when as_index=False

Edit: the rookie mistake I made in string np.nan having pointed out by @coldspeed, @wen-ben, @ALollz. Answers are quite good, so I don't delete this question to keep those answers. Original: I have read this question/answer What's the difference between groupby.first() and groupby.head(1)? That an...
Andy L.
1

votes
2

answer
2.2k

views

JUL to SLF4j with oracle jdbc driver

I am trying to redirect java.util.logging messages logged by the oracle jdbc driver and the oracle ucp (universal connection pool) library, but not able to do so. The messages logged by my application using JUL get logged but the ones logged by the oracle libraries are not getting logged. My intent...
Andy Dufresne
2

votes
2

answer
192

views

TensorFlow 2.0 Keras: How to write image summaries for TensorBoard

I'm trying to setup an image recognition CNN with TensorFlow 2.0. To be able to analyze my image augmentation I'd like to see the images I feed into the network in tensorboard. Unfortunately, I cannot figure out, how to do this with TensorFlow 2.0 and Keras. I also didn't really find documentation o...
andy
0

votes
0

answer
15

views

Position: sticky; not working no matter what

Trying to get a class to remain sticky and constantly be in view when the user scrolls down the page, but doesn't seem to work no matter what. I tired: .entry-summary{ position: -webkit-sticky; /* Safari */ position: sticky; top: 0;} But this does nothing. The full code can be seen below and is p...
Andy
1

votes
0

answer
329

views

Bootstrap 4 Active Tab based on link

I'd like to activate a tab when a specific link clicked. This is the code sniopet from bootstrap. Home Profile Contact ... ... ... I tried using jquery: $('.tab-pane').removeClass('show active'); $('#' + activeTab).addClass('show active'); but it doesn't work at all, any help? thanks
Andy Andy
1

votes
0

answer
141

views

Custom md-icon set not working

I am trying to build a set of custom SVG icons for use with Angluar Material 1.x as described here: https://material.angularjs.org/latest/api/directive/mdIcon I have setup the .config properly using: $mdIconProvider .iconSet('social', 'App8/images/svg/social-circle.svg', 24); Using the following in...
Andy Theimer
1

votes
0

answer
122

views

gprof inside docker container -> no time accumulated

I have a project (octave-4.2.1 tarball) compiled with gcc 6.3 on debian stretch with grpof. If I run it directly on the host, gmon.out is generated and the output of gprof shows timing infos. If I build the same code with excactly the same flags inside a docker container based on stretch-lite and ru...
Andy
1

votes
1

answer
34

views

How to show a radio button one by one on php or html

I'm new to php and html and I was wondering, how having a code like below: Question Number 1 A B C D Question Number 2 A B C D Question Number 3 A B C D Question Number 4 A B C D I want to show a question one bye one with button next and with check if a value is null. What sh...
Andy Setiawan
1

votes
1

answer
36

views

Labels not displaying - why? - Using wxPython-Phoenix

I'm trying to create a simple graphical interface with wxPython-Phoenix but the widgets are not displaying and I'm not sure why. I have choose to use wx.FlexGridSizer() as the sizer to handle the widgets positioning. Attached is my code: class App_Frame(wx.Frame): def __init__(self,title=''): #Conta...
Andy
1

votes
1

answer
36

views

.htaccess regex

I'm a real beginner with regex. I think I NEARLY understand this, but having spent a day and a half on it, I can't quite get it right. At the moment my OLD domain has this rewrite: RewriteRule ^/?$ 'http\:\/\/sheepdog\-training\.com\/' [R=301,L] That successfully redirects every page on the old site...
Andy
1

votes
0

answer
316

views

PHP7 breaks SSL under opensuse Leap 42.2 apache2

I leave this up to the moderator's discretion as a learning contribution for others. My problem is solved, so it is closed AFAIAC: ITOT that executing PHP5→PHP7 under opensuse Leap 42.2 with the default software/server manager yast leads to a reproducible corruption of SSL. Documentation on reques...
Andy Lavarre
1

votes
1

answer
491

views

Infinite Scrolling using md-virtual-repeat in AngularJS Material

I'm attempting to implement infinite scrolling as documented here: https://material.angularjs.org/latest/demo/virtualRepeat However, all the examples I've found use $http.get to request an external .json document. I want to use an existing JSON array stored in a scope retrieved by another function w...
Andy Mummau
1

votes
1

answer
222

views

Batch job fails when using matplotlib [duplicate]

This question already has an answer here: _tkinter.TclError: no display name and no $DISPLAY environment variable 6 answers I try to execute the following simplified batch job on my linux machine: [email protected]:~/Test_plots# ls batch_job.txt plot.py [email protected]:~/Test_plots# more plot.py import matplot...
Andy
1

votes
1

answer
37

views

Clustering 'Like' records yii2

i am attempting to create a table for my client that has a bunch of records of a type, and i need to create a record of a 'child' type which inherits most of its fields from its parent, and that i have done. now i need to use Gridview to display that information but the child records need to be clus...
Andy
1

votes
1

answer
76

views

Fadein div for a specific time, then fadeoff

I am trying to create something like notification messages as a test. So as example I have 5 divs and this is what should happen: pick a random div fade in show/stop for 5 seconds fade out Additionally there are a few important things: It is allowed that 2 or 3 divs were displayed at the same time,...
Referee Andy
1

votes
0

answer
48

views

Return a value and skip a line after x seconds

Say I have a code like this: def bar(a): def foo(): b = 1+a c = b + 10 #line responsible for en z = b+c return z if __name__ == '__main__': # Start bar as a process p = multiprocessing.Process(target=foo) p.start() # Wait for 10 seconds or until process finishes p.join(10) # If thread is still activ...
Andy G
1

votes
0

answer
291

views

Any workaround to program incremental SGD algorithm sequentially for logistic regression?

I am trying to program incremental stochastic gradient descent (ISGD) algorithm in logistic regression. Initially, I coded respective logistic regression' loss function and its gradient, also got some idea to proceed rest of workflow. But, I have no idea how to apply sequential operation in incremen...
Andy.Jian
1

votes
2

answer
34

views

How to reduce POSIXct time to previous 15-second interval for multiple time stamps in R

I have a bunch of time stamps ( that are in a POSIXct format. The following are some examples of the timestamps I have: 2017-01-20 16:44:02 2017-01-20 17:14:59 2017-01-20 17:17:21 I am trying to get the timestamp reduced to the previous 15-second interval (00:00, 00:15, 00:30, 00:45) so the followi...
Andy
1

votes
0

answer
49

views

ActiveX Command button to create connection to existing spreadsheet

I am trying to import reports generated by a 3rd party into a summary spreadsheet. The reports are generated weekly. So to save time from importing them in manually each week I want to create a button which will create the new tab, create the new connecting, insert the table and rename the table so...
Andy
1

votes
1

answer
44

views

Trying to rewrite code for an assignment to use Command-Line Arguments in Java. I have searched the existing questions

I am a new programmer in my first Java class . Here is my code but I am getting an error Exception in thread 'main' java.lang.ArrayIndexOutOfBoundsException:0 at CmdLine.main(CmdLine.java:13) import java.util.Scanner; import java.util.Arrays; public class CmdLine{ public static void main( String []...
Andy
1

votes
0

answer
22

views

How To Move Row To New Sheet Automatically If Anything But A Specific Value

I'm curious if I could have a row move automatically to another sheet if the value is anything but a certain value. So essentially if someone changes the status on the sheet 'Follow-Ups' from the value of Follow-Up to any of the other values, it moves it to the sheet 'Motivated Sellers'. I'm trying...
Andy Pate
1

votes
0

answer
151

views

Identifying content/image type from NSImage

I have an NSImage instance and I'd like to identify the type of image it is (JPG, PNG, GIF, etc.). Is the original format of the image preserved and possible to retrieve somehow? EDIT: Answers in other questions mention using CGImageSource. However, there does not seem to be a way of extracting the...
Andy Hin
1

votes
0

answer
65

views

Python Type Error: Casting and Changing Data types aren't working

I have written a machine learning model wherein derivatives are calculated using autograd library. import autograd.numpy as np from autograd import grad # take gradient # import tangent # Prepare the data input = np.array(list(range(100)), dtype=np.float64) output = np.array([x**2 + 2 for x in list(...
Andy Markman
1

votes
1

answer
48

views

Why do not working grape api for aws sns confirmation?

I am use Grape for create API and use AWS SNS, at the moment I want send request for confirmation but my API code is not executed. The request is sent (I'm looking at the logs), but the code does not work. However it's work via POSTMAN. Found an article where it is implemented through the controller...
Andy Simon
1

votes
2

answer
33

views

Button states wont change

I am trying to change the state of buttons with jquery and bootstrap. They both just stay on the btn default after I click one. $('#content-background-disabled-btn').click((e) => { $(this).removeClass('btn-default'); $(this).addClass('btn-success'); $('#content-background-enabled-btn').removeCl...
Jim Andy
1

votes
1

answer
1.5k

views

Uncaught ReferenceError: PDFJS is not defined when initialising PDF.JS

I am trying to install PDF.JS in a CMS of sorts where the outer skeleton of the page is built for me, including the reference to jQuery (which is still version 1.10.2). I have tried adding these two lines: And the running this command: PDFJS.getDocument('/loc/testpdf.pdf'); But they return this erro...
Andy Kaufman
1

votes
3

answer
59

views

How to get and store part of id of html element

I'm working on a website that's an online version of a book. There are many versions of this book, so the website uses variable pagination to deal with various editions -- the user chooses his edition and the page numbers appear. The pages are encoded in HTML tags. So, for example: text text 2 whe...
Andy Han
1

votes
0

answer
187

views

CSS repeating-linear-gradient broken at Safari 11?

I just upgraded OSX to High Sierra, and Safari to 11.01, and my repeating linear gradient is all out of whack. Is this a known issue with the latest version of Safari? background: repeating-linear-gradient(-64deg, transparent, transparent 5px, rgba(191, 159, 209, 0.8) 1px, rgba(191, 159, 209, 0.8) 6...
Andy Westmoreland
1

votes
2

answer
30

views

select from 3 tables - use join or union? [duplicate]

This question already has an answer here: 1052: Column 'id' in field list is ambiguous 8 answers I was wanting to select certain fields from 3 different tables and link by the id_product? i can't seem to find if a join or union should be used? I have tried the following already but had the error ap...
Andy L

View additional