dave dave
11040 questions
-1
votes
0
answer
7
views
Cannot find default config in AndroidStudio 3.4
Since upgrading to 3.4, I can't seem to find a GUI way to edit the 'defaultConfig' info. Do I have to edit the Gradle file directly? I can edit my two 'Flavors' fine, but not the defaults. Thoughts?
1
votes
3
answer
137
views
JSON to Python objects
I am deliberating about how to transfer the complex information from a JSON API response to (several) Python objects. I have included the (lengthy) model response below. Note that some values are not always included in the response, and some values are a list of dictionaries.
Is there an 'easy' way...
0
votes
1
answer
20
views
How do I exclude dates from angular material datepicker?
I am using Angular Material and I have a dynamic array of dates that I wish to exclude from my datepicker. In addition I am also trying to exclude Saturdays. How can I return multiple dates with my matDatepickerFilter?
Keep in mind that I cant hardcode each item of the array individually because the...
1
votes
2
answer
49
views
How to set a prefix for all print() output in python?
I am printing to a console in python. I am looking for a one off piece of code so that all print statments after a line of code have 4 spaces at the start. Eg.
print('Computer: Hello world')
print.setStart(' ')
print('receiving...')
print('received!')
print.setStart('')
print('World: Hi!')
Output...
1
votes
2
answer
47
views
Getting column information from system MS SQL Server
When I am using the below SQL statement to retrieve the column information of a SQL Server database. I am getting more columns than there actually are I presume this is because of the system columns that are there also.
SELECT
c.name Field,
t.name Type,
c.Precision,
c.Scale,
c.max_length,
c.is_nu...
1
votes
1
answer
48
views
Read multiple hash keys and keep only unique values
If I have data in Hiera like:
resource_adapter_instances:
'Adp1':
adapter_plan_dir: '/opt/weblogic/middleware'
adapter_plan: 'Plan_DB.xml'
'Adp2':
adapter_plan_dir: '/opt/weblogic/middleware'
adapter_plan: 'ODB_Plan_DB.xml'
'Adp3':
adapter_plan_dir: '/opt/weblogic/middleware'
adapter_plan:...
1
votes
1
answer
29
views
How do I reference the “many” of “one-to-many” relationships in Django/Python?
I'm using Python 3.7 and Django. I have the below two models ...
class Article(models.Model):
title = models.TextField(default='', null=False)
class ArticleStat(models.Model):
article = models.ForeignKey(Article, on_delete=models.CASCADE, related_name='articlestats')
elapsed_time_in_seconds = model...
0
votes
0
answer
3
views
Getting a random number in a function in OCAML OR Telling compiler to evaluate function each time
I'm new to OCAML and was playing around with putting a marker on a random 5X5 square. I've written the example program below. 'silly_method1' works but notice that it takes an argument. I don't really have argument to pass in for what I want. I'm just asking for a random number to create my robo...
0
votes
0
answer
5
views
How to build a amount screen for flutter?
Is anyone knows how to build a screen in flutter like the image below?
.
The initial digit will start from '0.00' and it keep adding the digit when you keep pressing on the number pad.
I really need help on this. thanks
0
votes
1
answer
11
views
Knowing when I can skip to any point in an audio file without buffering / delay in playback
I'm loading an MP3 on my webpage using audio = new Audio(). But I'd like to know that when setting audio.currentTime, the audio will skip to any point in the file -near the end or wherever -without any delay in playback. Ie I want to know when the MP3 has downloaded in its entirety.
Can I use the A...
0
votes
0
answer
6
views
How to dynamically bind img using props
I am trying to bind dynamically the img using props but image is not displaying due to path.
I tried using require but unable to do so i.e require('[email protected]/assets/logo.png')
Am I doing correct way?
{{ title }}
Image is not displaying.
0
votes
0
answer
25
views
Assign PHP Value Based Off Input Value
I'm trying to take an input value and assign it to a PHP array. I believe I need to use AJAX, but I keep getting caught up because I need to use PHP to call to the API.
Just in case that's confusing: I need the user to be able to type in the area code and in the dropdown list the array will call out...
1
votes
1
answer
117
views
Freshly cloned Tika build fails
I am trying to install Apache Tika on Windows and am running mvn install as per the instructions
When I do so I get a failure as shown below:
Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
1
votes
1
answer
456
views
ASP.NET Boilerplate Plugin Module or Dynamic Module
I am a .NET developer and currently, I am trying to learn ASP.NET Boilerplate. I came across PlugIn Modules and I got the idea that it can be used for module dependency, but they have these lines that I am trying to understand:
The AbpBootstrapper class defines the PlugInSources property which can b...
1
votes
4
answer
353
views
Duplicate key in provisioning profile causes build failure: error MSB4018
My Xamarin build tasks are failing in my Azure Dev Ops pipeline with:
error MSB4018: The 'DetectSigningIdentity' task failed unexpectedly.
error MSB4018: System.ArgumentException: An item with the same key has already been added. Key: com.apple.developer.associated-domains
On opening the provisionin...
1
votes
2
answer
88
views
Angular 7 - Change value of received data from database
In app.component.ts I receive data via API:
export class AppComponent implements OnInit{
constructor(private http: HttpClient){}
items: Object;
getApi(){
return this.http.get('https://reqres.in/api/user');
}
ngOnInit(){
this.getApi().subscribe( data => {
this.items = data
console.log(this.items)
})...
1
votes
3
answer
47
views
Equivalent of @foreach($variable as $key => $var) in Vue.js
As we all know, this works in laravel...
@foreach ($titles as $key => $title)
{{ $title }}
{{ $links[$key] }}
@endforeach
...whereas its purpose above is to output a single link for each single title. My question is this; How will I be able to do that in Vue.js in Laravel? I'm new in vue and I'd re...
-2
votes
0
answer
27
views
Is it possible to start a new line for a number of characters?
Is it possible to start a new line for a number of characters? I need to use it in any embed. For my discord bot.
1
votes
3
answer
44
views
Newtonsoft JSON DefaultSettings per Assembly
In order to automatically trim all input strings and remove new lines, I developed an implementation of JsonConverter and registered it in Startup with
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Converters = new List
{
new StringTrimmer()
}
};
This works, but the string trimme...
0
votes
0
answer
10
views
How to zoom in on cursor point in Mandelbrot Set?
I'm currently trying to implement a zoom feature for the Mandelbrot Set code I've been working on. The idea is to zoom in/out where I left/right click. So far whenever I click the screen, the fractal is indeed zoomed in. The issue is that the fractal is rendered not at the origin-- in other words, i...
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...
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,...
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...
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...
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]
└────...
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...
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...
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...
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...
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_...
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...
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...
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...
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,...
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...
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 ?
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...
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...
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...
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...