dave dave

11020 questions
1

votes
1

answer
56

views

Checking a checkbox based on a textbox value

The code I have here is supposed to load three separate values from three lines in a .txt file. This works fine so far. LOAD1 works well, and gets converted to an integer and then put back into the program as expected.The trouble is LOAD2. What I'm trying to do: I want this bit of code to check whet...
Dave van der Veer
1

votes
1

answer
404

views

ReactPHP - Working with Laravel and Timers

So here is a very interesting problem I am having. I am dead set on trying to figure out how to integrate a websocket client into Laravel 5.5 to allow communication over a websocket between my application and a Discord Gateway. I spooled up a new Laravel app and required this library, via composer,...
Dave
1

votes
0

answer
54

views

IBM Qradar - Hardcoded devicetypeid doesn't work with other application with same devicetypeid?

Assume my log source extension has 4001 as hard-coded value as devicetypeId. If any app installed on the same machine is already using 4001, my extension automatically gets a different ID like 4002 while installing. This creates a problem for custom property extractions and event mapping. Because my...
Tarang Dave
1

votes
2

answer
423

views

How do I record a specific application running on my Mac using ffmpeg?

I just installed ffmpeg with using home-brew on Mac HighSierra. I want to record the contents (video only is fine) of an application running on my machine (as opposed to my entire Desktop). So I tried running the below davea$ ffmpeg -f gdigrab -framerate 25 -i title=DOSBox ffmpeg version 3.4.1 Cop...
Dave
1

votes
0

answer
237

views

Display logo in my django-admin

I plugged Django-jet into my project and it works fine. I am trying to install a logo on the top left corner of my Django-admin, but it failed. I think the following answer is relevant here: Custom logo in django jet. (venv) ┌─╼ [~/Projects/Work_Projects/clients.voila6.com/v6] └────...
dave
1

votes
0

answer
62

views

AngularJS directive for Progress Flow

looking for some advice on if there are any existing AngularJS directives for a progress flow like this: The closest things I've come across are progress bars, which are mostly shown for things loading or updating. I want to code something that shows Stages and the progress to completion. Any ideas...
Dave
1

votes
0

answer
80

views

How to capture image of entire view's contents when bigger than screen

I need my app to render everything that a view controller has the potential to display (including off-screen content) except for the top and bottom navigation bars. The first image, below, shows the view controller at runtime. The action menu triggers the following code which is adapted the code sam...
Dave
1

votes
0

answer
381

views

Azure Bot service talking to Azure Logic App - 401 unauthorized

I have an Azure bot which is all developed and working fine. It currently talks to a 3rd party workflow application via a simple webhook. I am now trying to replicate this using Azure Logic App. I have a simple logic app that responds fine to requests from POSTMAN. However, when I set the Messaging...
Dave Banthorpe
1

votes
2

answer
1.3k

views

Can't Catch Error for Mongoose Model Save

I have a simple user schema: /schemas/user.js var mongoose = require('mongoose'); var Schema = mongoose.Schema; var userSchema = new Schema({ username: { type: String, required: true, unique: true }, email: { type: String, required: true, unique: true }, password: { type: String, required: true }, g...
Dave
1

votes
1

answer
50

views

ng-click doesn't work once ng-show div is moved out of overall div

I have a ng-click that shows/hides another section, which is all within the same overall div. I want to move the show/hide section to its own div, but when do this, the ng-click no longer works. My current code that works looks like this: {{$index+1}} {{item.workflow_stage}} errorIncomplete check_...
Dave
1

votes
2

answer
59

views

Codeigniter uploading an image to a path folder but in the no record in the database

I need some help, I can upload an image to a folder path but in the database there is no record that i insert an image... Here's my code ----Controller Code---- public function insert_product() { $this->form_validation->set_rules('product_name','Productname','required'); $this->form_validation->set...
Dave
1

votes
0

answer
482

views

Fetching Open Graph meta tags from a react-helmet site

I have a script that grabs Open Graph meta tags from a remote page. I'm using PHP to load the page into a DOM document and pulling out the tag content like this: if($meta->getAttribute('property')=='og:image') $og_image = $meta->getAttribute('content'); That works great for a typical page where the...
Dave
1

votes
0

answer
264

views

Inconsistencies between IoT Edge Portal and modules deployed locally to Docker

We are having some challenges around using Azure Portal to manage IoT edge devices in development. I am posting in case someone can confirm these are known issues, or supply possible workarounds. The first inconsistency is that when we have no clients connected, it will show up saying 1 under the co...
Dave Murray
1

votes
2

answer
95

views

In Github, how do I figure out what remote branches I can push to?

How do I see what branches I have access to push to? I just accepted an invitation from our admin to a GitHub project and switched to the branch where my code was localhost:myproject davea$ git checkout unit_tests_20180116 Switched to branch 'unit_tests_20180116' but when I try and push my changes,...
Dave
1

votes
1

answer
42

views

Difficulties introducing hash table lookup into pipeline

Excuse my terminology but I'm quite new to Powershell. I'm trying to write code that takes output from invoke-sqlcmd and then translates on of the objects using a hash table (from database id to database name). My code is as follows:- [email protected]{} invoke-sqlcmd -serverinstance $dsname -query 'select id=d...
Dave
1

votes
1

answer
634

views

LIbrary for Zendesk or Freshdesk in React Native?

Is there any library for installing Zendesk or Freshdesk in React Native ? Or if there is another provider who provide their React Native SDK ?
Kevin Dave
1

votes
0

answer
35

views

Issues with RewriteRule on Generic Anchor Redirect

I want to redirect any request to the root of my site to an anchor on the index. So https://example.com/foo Gets sent to https://example.com/#foo I've written this .htaccess file (it also redirects http requests to https, that part works, but is included for completeness) RewriteEngine On RewriteRul...
Dave Howland
1

votes
0

answer
141

views

Videojs-chromecast plugin fails to launch on Android platform (but works on PC platform)

I've built an html5-video webpage that uses video-js and its chromecast-plugin. When I use the resulting cast button on video-js player's control-bar, when running on Chrome-browser on Android, it fails to completely transfer over to the TV's screen. The failing symptom is that only a large blue ca...
Dave
1

votes
1

answer
577

views

Displaying console output to TextArea in JavaFX FXML App

I have a simple program along the lines of 'Hello World' that uses getText() to retrieve the contents of two textFields and prints them out to console. This works fine. I have a TextArea defined I'd like to display the output to instead. I have tried everything I have found but I'm getting all kin...
Dave Graham
1

votes
0

answer
133

views

How do I make create a socket to Stratum using a script?

I'm trying to understand teh stratum protocol and would like to try the initial step of connecting to a stratum pool. I crated an account on SlushPool and would like to make a connection using some kind of script (I figured bash). So I tried this curl -H 'Content-Type: application/json' -X POST -d...
Dave
1

votes
0

answer
244

views

How do I install a PHP library globally?

I'm running PHP 7 on Mac High Sierra with Apache . How do I install a library so that it is universally available for all my PHP scripts? I have this line in my test.php file $loop = React\EventLoop\Factory::create(); $tcp = new \React\SocketClient\TcpConnector($loop); The source code (from ReactP...
Dave
1

votes
2

answer
237

views

Does a Convolutional Layer Have an Exact Inverse

...and if so under what circumstances? A Convolutional Layer usually yields an output of lesser size. Is it possible to reverse/invert such an operation by flipping/transposing the used kernel and providing padding or likewise? Just looking at the convolutional layer's operation here - without pooli...
Dave
1

votes
1

answer
24

views

Are there disadvantages of using __slots__?

I'm using Python 3.7 and Django. I was reading about '_slots__' -- http://book.pythontips.com/en/latest/slots__magic.html . Evidently, _slots can be used to optimize memory allocation for a large number of those objects by doing this ... class MyClass(object): __slots__ = ['name', 'identifier'] de...
Dave
1

votes
1

answer
2k

views

How do I enable GMP on Mac OS X / PHP 7?

I'm using PHP 7 and Mac High Sierra. I'm trying to install and enable GMP. I installed via brew install homebrew/php/php70-gmp but when I try and enable the module through the php.ini (/usr/local/etc/php/7.0/php.ini) file, I'm failing . I tried uncommenting the line extension=php_gmp.dll but I get...
Dave
1

votes
1

answer
172

views

Databinder.eval not working with (e.Row.DataItem, “var.var”)

I'm working on an asp webforms page. I fill the columns and rows of a gridview dynamically, and with the rowDataBound event get the sum for each row and column. and it works fine, except if the column has a name like 'EN.DESARROLLO'. it seems that the Databinder.eval doesn't work if it have a '.' i...
Dave Salazar
1

votes
1

answer
38

views

GridLayout covering more than the screen size

Hello i am trying to make a design of chess board, I am using GridLayout containing buttons that corresponds to blocks of the boards. But the layout is so much bigger that it is not fitting the screen, how can i reduce the button size so that the layout fits the screen. here is the code public class...
Harsh Dave
1

votes
1

answer
685

views

How do I get Mac to install php with a php.ini file?

I'm using Mac High Sierra. I need to install php with the php.ini file installed. I ran the following command without errors: brew install php71 --build-from-source However, when I search for a configuration file, I get nothing: localhost:stratum-php-master davea$ php -i | grep 'Loaded Configurati...
Dave
1

votes
0

answer
154

views

Using CreateFile to send PDF direct to a printer ignores bold fonts

Please bear in mind that this code is running in an ISAPI module, and we would rather not mess around with changing which user the application logs in as, so the usual way of using the Printer classes is not likely to be an option. I have the following code: procedure WriteFileToPrinter(const APrint...
Dave Nottage
1

votes
1

answer
1.7k

views

Add permissions to channel for user

I've recently added this Discord bot to my server: https://github.com/critcola/discord-auto-grouping It's working great and I've modified it slightly to ensure it creates a room based on the user's name, with a user limit and under a certain category in my server. My last edit — which I can't seem...
Dave Maltby
1

votes
1

answer
594

views

How to fetch from server on Redux Rehydrate?

I'm using React/Redux and redux-persist to maintain local storage persistence. I'm looking to load an 'appSettings.json' from the server when redux-persist has finished Rehydrating the store from local storage. In the persistStore method there is a callback function that is guaranteed to come after...
Dave C
1

votes
0

answer
118

views

Best way to generate large Zip File in Rails

I am generating Zip File in background process (sidekiq) by downloading pictures from S3 url and then uploading & sending the download ZIP link via email. Production EC2 instance has 16GB RAM. It succeeds for 10 GB album and shows buff/cache (10GB) but will the same process crash for album size grea...
Dave
1

votes
1

answer
110

views

How do I catch the referer URL in my session before embarking on an authentication with Omniauth?

I'm using Rails 5. I'm using the Omniauth gem (but not Devise) for authentication with the following sites (from my Gemfile) ... gem 'omniauth-oauth2', '~> 1.3.1' gem 'omniauth-google-oauth2' gem 'omniauth-facebook' gem 'omniauth-twitter' gem 'omniauth-linkedin-oauth2' I have links on my page that...
Dave
1

votes
1

answer
496

views

Unable to query chaincode in basic-network

I am looking at the fabric-samples.git. There is a folder called fabric-samples/basic-network. I have a few questions about it. Here is a script called init.sh. What is it intended to do? After using ./generate.sh , ./start.sh to provison a basic network, I am unable to use the CLI to query cha...
Dave
1

votes
0

answer
163

views

PDB alias in commands

I'm trying to set up some automated debugging in pdb. I want to be able to specify some complicated code in an aliased commands section. The following works: # -- .pdbrc (working) alias set_bp b 270 ;; commands ;; silent ;; print('hello') ;; end However when I specify an alias inside the commands, t...
Dave Evans
1

votes
1

answer
300

views

Can I add associated object to Swift Struct?

I would like to add an additional property to the Swift String. I used this approach few times on objects, but it seems that it does not work on struct. Although, I don't get any error... This is what I tried: var str = 'Hello, StackOverflow' fileprivate struct AssociatedKeys { static var myBool = '...
Dave
1

votes
1

answer
117

views

Calling `odbc` connection within function does not display in RStudio Connection Pane

I'm working to streamline some database connections. Using the odbc package, I have successfully established a connection with one of my databases like so: library(odbc) con
Dave Gruenewald
1

votes
0

answer
131

views

AngularJS Material form validation onSubmit

I have a form that I've coded using AngularJS Material and wanted to add some form validations. The following is a snippet of my code: Title This is required. The validation works when I click on the input and leave it without typing anything. When this happens, the error message appears below th...
Dave
1

votes
1

answer
37

views

How to draw a combo graph in Google Chart vertically with dual axes at top and bottom?

I've got a Google Chart ComboGraph in vertical orientation and I'd like to display the dependent axis (horizontal one in this configuration) both at the bottom and at the top of the graph. For horizontal orientation, a hack I can use to achieve this is to create a dummy second axis - then the two ax...
Dave
1

votes
1

answer
104

views

ServiceNow: accessing widget option schema in mdDialog

I've cloned the OOTB widget-form, named it widget-form-md, and created an additional option schema for hideRelatedLists: I have a separate widget that is embedding my cloned widget-form-md and hope to display it via a Material Design modal. My client script for the modal looks like this: function x...
Dave
1

votes
1

answer
19

views

Dynamically adding method/state to a class/instance with name/value determined at runtime

I need to dynamically add a class method with a name determined at runtime, and also an internal state that is determined at runtime. Here is the simplest example I can cook up: class foo(): pass def h(self): # h() is just a placeholder until we can do setattr() state = 'none' return state setattr...
Dave M

View additional