howard howard

0

votes
0

answer
3

views

How can I modify PSR2 to check that all opening braces are on the new line everywhere

I've spent a lot of time to figure out how to require the { always on the new line (including inside functions). We have several projects with altered coding standards and I would like to write phpcs-ruleset.xml, so phpcs could check this standard. I know how to write phpcs-ruleset.xml based on PSR2...
Howard
1

votes
3

answer
7.2k

views

Google App Script Adding one Day to a date

I can't figure out how to add one day to a date in Google App Script. I have this script: function dateTest() { var testDate = new Date(); var secondDate = new Date(testDate.getDate()+1); Logger.log(testDate); Logger.log(secondDate); } Which produces the following log: [16-11-30 16:35:02:499 GMT] We...
Dan Howard
1

votes
1

answer
80

views

Best practices for writing a Java library in Scala

I am planning on writing a library that will primarily be consumed from Java. However, I would like to write this in Scala. I have read most of the documentation on Java/Scala interop, but it is mostly focused on using existing libraries, rather than best practices to ensure seamless interop when wr...
John Howard
1

votes
1

answer
86

views

Feedback json format wrong

This is my feedback json string: {'name':'abc', 'cardNumber':'1234567890', 'data': [{A data},{B data}...]} I use this function to send data, then get json and encode: func uploadData(word:String){ var request = URLRequest(url: url!, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterv...
Howard
1

votes
1

answer
67

views

Agents tests OK in Dialogflow but fails when tested in Actions On Google

Agents tests great in Dialogflow but fails when tested in Actions On Google I see this error: 'sharedDebugInfo': [ { 'name': 'ResponseValidation', 'subDebugEntry': [ { 'debugInfo': 'API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \': Cannot find field.\'.', 'name'...
Howard
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
185

views

Is there an Ada implementation of Google's protocol buffers?

I'm looking for an Ada implementation for protocol buffers. Looks like it's supported in just about any language except for Ada. I did find a PhD thesis describing development of Ada protocol buffers but I need a product (commercial, freeware, shareware, whatever).
Howard Ausden
1

votes
0

answer
137

views

ReactTransitionGroup simultaneous transitions

I want to fade-out an element and simultaneously side-in a new element. Both elements have the same parent and occupy the same space - the one is replacing the other. I'm using TransitionGroup and Transition for this. The problem I'm having is that the transitions execute sequentially -- one afte...
Howard Burrows
1

votes
0

answer
187

views

Swift URLSession keep connect to server, not use dataTask

I have a problem with session connecting, with current API I notice streamTask can create a TCP/IP connection task, all I found to use the code below: let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main) session.streamTask(with...
Howard
1

votes
1

answer
220

views

How to correctly reset graph and variables after Restoring Trained Model

I found the following code and tried to implement a Saver() for confirming the trained model can in fact be loaded an used but seems some variables or something isn't getting restored correctly (suspect variable scope items). The code in question checks if the model exists, if the model doesn't ex...
Moe Howard
1

votes
2

answer
1.4k

views

Patch value of a form array at a specific index

I have constructed my form like this. this.myForm = this.fBuilder.group({ openingHoursForm: this.fBuilder.array([]) }); this.openingHoursArray = data.body.OpeningHours; this.openingHoursArray.forEach(element => { (this.myForm.get('openingHoursForm')).push(this.fBuilder.group({ Id: [element.Id], Head...
Andrew Junior Howard
1

votes
1

answer
311

views

Django: Multiple values in Radio Select Form

I've got a radio select form that displays addresses that the user has saved. Currently, when the user visits the 'select address' template, they are only shown the 'street' field for each address that they've saved. This is controlled by the 'return self.street' line below as I've established throu...
Jason Howard
1

votes
1

answer
199

views

Deny direct access to PDF files in php web folder

There is a fully running PHP site that can only be accessed when logged in with ID/password. I have been asked to add a function to the site that uploads PDF files and show existing PDF files in the browser. So I achieved this by using iframe to embed PDF files in the browser. But the problem is, th...
Howard Yang
1

votes
0

answer
24

views

Prewarming several images in same model with django-versatileimage

I'm successfully using VersatileImage for my django project to prewarm images (i.e. save images at various sizes postsave), but I've come up against a situation where I want my model to have several image fields and I'm not sure how to prewarm them as the code I'm using only seems to allow a referen...
Jason Howard
1

votes
3

answer
537

views

Passing a list into MultipleChoiceField form as initial value

I've got a field called 'service'. It stores a list of ints that are representative of the services that a company offers (1=accounting, 2=HR, etc.). Once the list is saved to the 'service' field, I want to be able to pass it in as an 'initial' value to the form so that the user can see what options...
Jason Howard
1

votes
1

answer
61

views

Display picture in MVC from SQL Server 2012 database

I've been trying too display image from my application MS SQL Server in MVC by creating an Custom Html Helper. Code of the CustomHtmlHelper below: public static class CustomHtmlHelper { public static IHtmlString Image(this HtmlHelper helper, string src, string alt) { TagBuilder tb = new TagBuilder('...
1

votes
0

answer
24

views

why do we have to select a database when we connect to a database?

Why do we have to select a database when we connect to a database? For example, when we use PDO to connect a database, we must define a database name,but in mysqli we have a function mysqli_select_db() to select another database after connecting… So is there a function like mysqli_select_db() in P...
Howard Feng
1

votes
1

answer
149

views

pdo's error with oracle

When I use PDO to connect to Oracle DBMS,I got this problem: SQLSTATE[HY000]: OCIEnvNlsCreate: Check the character set is valid and that PHP has access to Oracle libraries and NLS data (ext\pdo_oci\oci_driver.c:619). I have added ORACLE_HOME,NLS_LANG,PATH to environment variables and php's config is...
Howard Feng
1

votes
0

answer
151

views

Excel 3D maps - Reorder Layers

Seems like a silly question, but is there a way to reorder the layers in Excel 3D maps? It seems that every time I add a layer, Excel creates it as the bottom most layer but there doesn't seem to be a way to reorder the layers once they're created.
Katie Howard
1

votes
1

answer
435

views

I get the following when I try to establish a connection to MySQL. java.math.BigInteger cannot be cast to java.lang.Long

This is not from a SQL query statement, it is from a Connection statement. I am trying to connect to the MySQL database when I get this error. I have searched and have not found an answer that resolves my problem. I am trying to establish a connection to MySQL and keep getting this error; java.mat...
Howard Black
1

votes
0

answer
31

views

EF6 Code First - Informing EF that a non-nullable scalar need not be emitted as there is a DEFAULT VALUE CONSTRAINT defined

We have an EF Code First design. One of our Entities has a DateTime column, not-nullable. We've added a DEFAULT VALUE CONSTRAINT via the Migration: AddColumn( 'dbo.MyTable', 'WhenUpdated', c => c.DateTime( nullable: false, defaultValueSql: 'GETUTCDATE()')); The corresponding MyTable entity looks l...
Howard Hoffman
1

votes
1

answer
120

views

Node.js csvtojson - return result outside of function [duplicate]

This question already has an answer here: How do I return the response from an asynchronous call? 34 answers I am relatively new to this and haven't quite got my head round how this all works... Basically I am using the csvtojson function to convert a csv file into json. This works fine and outputs...
Ryan Howard
1

votes
0

answer
205

views

plyvel install on windows

I am doing data analysis on Ethereum blockchain data. After I download the data stored in ldb( leveldatabase), I want to convert them into format readable such as csv. So I install the plyvel package to read ldb format. However, it can not be installed and I do not know why. From the command line:...
Howard Jiang
1

votes
0

answer
30

views

Need some advice on JS driven Search Box

We moved around our JS and now the search box submission is just appending to the / URL. It was working at one point and now we are unsure what is now causing the page to reload instead of submitting the search. https://ce.harpercollege.edu if (document.body.contains(document.getElementById('pagePu...
Wesley Howard
1

votes
1

answer
41

views

MySQL merge multiple tables that share similar columns

I have 5 tables, each with 10+ columns. They all share some similar columns but each table has columns unique to themselves. The tables are not related to each other, meaning that one record in one table won't be able to exist in another table. Therefore, when I try to concatenate them using UNION A...
howard
1

votes
0

answer
134

views

PyQt5: Looking for example of Embedding external app window in Application

I have a largeish application I'm developing in Python3 using PyQt5. I want to do something very much like what is being done here in PyQt4: # -*- coding: utf-8 -*- import atexit from PyQt4.QtCore import * from PyQt4.QtGui import * class XTerm(QX11EmbedContainer): def __init__(self, parent, xterm_cm...
Caleb Howard
1

votes
0

answer
63

views

Node EJS - Cannot keep the data on form after submit

I have following Server.js code var result = null; app.get('/reset',function(req,res){ res.render('index',{result:''}) }) app.post('/',function(req,res){ /* some logic... */ res.render('index',{result:some_value}) }) app.listen(/* Starting Server */); Index.ejs /* 4 Text box for input */ /* 1 Text a...
howard roark
1

votes
1

answer
82

views

How can I dismiss `custominfoviewcontroller` programatically on tvOS?

On tvOS 11.0+, custominfoviewcontroller is added to AVPlayerViewController. My question is how to dismiss the whole info panel after selecting something in my custom info view controller? I tried to use dismiss(animated: true, completion: nil). Although it does dismiss the info panel, the info pane...
Howard
1

votes
2

answer
111

views

Stub a function that runs a promise

I've been attempting to write unit tests for a registration page on a new react application However I am very new to the concept of Sinon stubs/spies and have been having issues with intercepting a function call and forcing a resolve. This is my initial test: test('Success notification is displayed...
Christopher Howard
1

votes
0

answer
33

views

how to get back the origional file after using “find file at point” in emacs

what is the bindkey I can use to get the origional file back after executing the >command 'find-file-at-point' in emacs? Thanks Howard
howard
1

votes
2

answer
42

views

SharedPreferences not working in an activity

I'm trying to get SharedPreferences in an activity and set the value as title of action bar, but i can't get the value on the main_activity , but i can get the value in another one , i do't know why and how . this is my code to save SharedPreferences: public static final String Colloge_section='MyPr...
john howard
1

votes
0

answer
16

views

How to use a generic union type in a mapped type with Typescript?

I want to generate a mapped type with a generic union type. Consider the working example below type Keys = 'container' | 'body' | 'button' type Styles = { [K in Keys]: CSSProperties } This works as expected. But, if I try to make the Styles type take a generic and do the same thing it falls apart....
Brandon Howard
1

votes
1

answer
65

views

Unable to refer to Sheet row. Only return row data of current sheet

I am very new to VBA and coding in general. I am struggling with this bit of code where I would like to copy the data in row A in sheet 'System 1' and use it in my validation list. However, with this current bit of code, it seems that I am getting the row data from my current sheet and not from shee...
Matthew Howard Timmy
1

votes
0

answer
37

views

Clean methods of class based views

Can you confirm that this def clean() override does absolutely nothing in the context of a class based view? def clean(self): cleaned_data = super(UserAddressForm, self).clean() address1 = cleaned_data.get('address1') address2 = cleaned_data.get('address2') city = cleaned_data....
Jason Howard
1

votes
0

answer
41

views

How do I obtain ZPL command return value from code

How do I get return value from a printer if I called this command in vb6, on Zebra Setup Utilities it will display information regarding about the printer. I try running this command and print nothing Printer.Print '${^XA^HH^XZ}$' Printer.EndDoc
Howard F
1

votes
1

answer
46

views

Edge, Hover, and Click

This is supposed to be a fly out menu that opens up when a user hovers. This works perfectly fine within Chrome, I've tried this multiple ways (Using CSS :hover, (mousenter) and (mouseleave) the issue is - when using Edge, when hovering over my flyout menu and then clicking an item within the select...
Eddy Howard
1

votes
0

answer
46

views

Docker can't find package.json

I recently started running postgres from a docker container and migrated my backend to a separate container. Here's my docker-compose.yml file version: '3.7' services: postgres: image: postgres:9.6-alpine ports: - '5432' volumes: - postgres_data:/var/lib/postgresql/data backend: build: context: ./ d...
Howard Wang
1

votes
2

answer
800

views

Castle Windsor IOC and Order of Appearance in Config File

I'm new to Castle Windsor and am confused about the order in the config file. This is taken from the GettingStarted1 sample. The HttpServiceWatcher class takes an IFailureNotifier implementor in it's constructor. However, no matter how I order the two components that implement this interface -- A...
Howard Pinsley
1

votes
1

answer
565

views

Patterns or techniques for designing a flexible advanced search with Linq Expression Trees

I'm looking to add an 'advanced search' capability to my ASP.NET/SQL Server 2005 application. Ideally, I'd like it to be table driven. For example, if my schema changes with the addition of a new column to a table that I want to search, I'd like to have the UI reflect the addition of the new colum...
Howard Pinsley
1

votes
2

answer
42

views

What's the best way to manipulate the way entries in a data base are displayed on my web page?

I have a client I am building a small CMS for. One of the functions is that he would like to be able to pick the order in which images display on a page. In my mySql Database I have a table called image_info with the fields: index (auto incremented) img_url img_link I was thinking of adding an addi...
Howard Zoopaloopa

View additional