A. T

1

votes
0

answer
38

views

What does: “error: invalid command 'bdist'” mean?

I'm trying to convert a python script into a standalone executable, and it stops at 'error: invalid command 'bdist''with both cx_freeze as well as with py installer. I can not find what this error means, would you have any suggestions? As requested in the comment, this is the main code, in Renaming_...
a.t.
1

votes
1

answer
120

views

Reflection: get static vars of class in Swift?

Given a simple class like: class Foo { static var can: String? { didSet { 5+4 } } static let haz: String } How do I implement a method within Foo that enumerates over can and haz; without explicitly writing them out again? - E.g.: so I can print('key: '\(key\)' has value: '\(value)'') BTW: Noticed t...
A T
1

votes
1

answer
212

views

Access container started at Docker Compose step from Hosted Linux Agent on Azure VSTS

I am using VSTS build step Docker Compose v 0.* on Hosted Linux Agent. Here is my docker-compose: version: '3.0' services: storage: image: blobstorageemulator:1.1 ports: - '10000:10000' server: build: . environment: - ENV=--tests volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - '8080:80...
A T
1

votes
1

answer
35

views

How to split text when read from file to Listview c++?

This code shows all text in first column of ListView, but I need to split it by columns. I tried to write Split('|') after ReadLine() but it gives an error. String^ textFile = String::Concat('C:\\p.txt'); StreamReader^ reader = gcnew StreamReader(textFile); do { listView1->Items->Add(reader->ReadLi...
A.T.
1

votes
1

answer
1.3k

views

Dismiss mat-sidenav on click outside

I'm trying to close my sidebar whenever user clicks somewhere not in it. I've tried two-way data-binding and now I'm trying with rxjs' Subject AppTemplate AppComponent openedSubject = new Subject(); @HostListener('click', ['$event']) clickedInside($event) { this.openedSubject.next(false); } SidenavC...
A T
1

votes
0

answer
176

views

Getting a pop-up with attribute info from WMS

I am new to javascript and web mapping and after searching through the internet, this is still not clear to me. I am building a basic web map using leaflet. I have three layers (streets, states and street info) that I uploaded to Geoserver as shapefiles. My script shows them correctly and I can sho...
A.T.
1

votes
3

answer
631

views

Eclipse -Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.1-bin.zip'

I am trying to create a new gradle project in eclipse Due to security reasons, Eclipse cannot download any plugins/software I get the below error , when i try to create a gradle project, unable to find valid certification path to requested target Could not install Gradle distribution from 'https:...
A_T
1

votes
0

answer
104

views

Usage of CPU/GPU while using Stitching() in OpenCV & OpenCL

Specs : Visual Studio 2017 ; OpenCV 3.4 I am trying to run the stitching algorithm of OpenCV on my computer GPU. To do that I use the OpenCL library, which is inclued in a transparant API in OpenCV (https://www.learnopencv.com/opencv-transparent-api/). I am monitoring my GPU and CPU activity using...
A.T.
1

votes
4

answer
864

views

Longest common substring constrained by pattern

Problem: I have 3 strings s1, s2, s3. Each contain garbage text on either side, with a defining pattern in its centre: text1+number1. number1 increases by 2 in each string. I want to extract text1+number1. I have already written code to find number1 How would I extend an LCS function to get text1? #...
A T
1

votes
1

answer
287

views

Is portable class libraries are beneficial for window 8 store apps

Is portable class libraries are beneficial for window 8 store apps. I am trying to create an architecture for Window 8 App in which i have WCF Restful service for data. My problem is i don't want to create proxy classes for each entity in Window 8 project, so i want to use Datalayer in which i have...
A.T.
1

votes
2

answer
137

views

AngularJS partials with URLs in directives - best practice?

I quite like how angular-ui has created ui-routes, which provides named routes (among other things). Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best practice. Foo haz bar With the following logic: if `foo.html` is file: contents of foo.html elif `$scop...
A T
1

votes
1

answer
790

views

“Value does not fall in expected range” List collection and not in Observable collection

This is my working code, private ObservableCollection _Users; public ObservableCollection Users { get { return _Users; } set { _Users = value; RaisePropertyChanged(()=> Users); } } Users = new ObservableCollection(); for (int i = 1; i Users); } } Users = new List(); for (int i = 1; i Though,...
A.T.
1

votes
3

answer
63

views

Python dictionary lookup returning multiple results?

I have a written a simple class with an __init__ emulating a switch/case flow: class Foo(object): def bar(self): print 'hello bar' def haz(self): print 'hello haz' def nothing(self): print 'None' def __init__(self, choose_me): {'foo': self.bar(), 'can': self.haz() }.get(choose_me, self.nothing()) if...
A T
1

votes
1

answer
681

views

convert all images to PNG

I need a dynamic solution to convert a unknown image format to .png in java. Will .getType() help me out here, it seems only to return numbers. The converted image should later be stored in a folder, but I guess that is easly done in the ImageIO.write(). It's just that with converting an unknown im...
G.O.A.T
1

votes
1

answer
187

views

Why are uri paths not redirected to index.php by my .htaccess only for https / ssl?

I am getting an 404 error only for HTTPs when the URL has a uri path that must be redirected to index.php for proper routing. Examples: 200 => https://localhostcl.idinteractive.co/ 200 => http://localhostcl.idinteractive.co/ 200 => http://localhostcl.idinteractive.co/login 404 => https://localhos...
E.A.T
1

votes
1

answer
376

views

Scope inheritance fails with multiple-named views?

It breaks when moving from (Plnkr): .state('home', {url: '/home', template: '{{parentProp}}', controller: function ($scope) {$scope.parentProp = ['home'];}}) To (Plnkr): .state('home', {url: '/home', views: {'': {template: '{{parentProp}}'}}, controller: function ($scope) {$scope.parentProp = ['home...
A T
1

votes
1

answer
380

views

JOOQ Support for Axis2 WebServices

I have an SOA application with Axis2 Web Service, and I am using JOOQ to create my entities and access the database. In my data service file I have the following code: public Contact[] findContactByName(String name) { try { Contact[] result = new ContactFacade().findContactsByName(name); return...
M.A.T.
1

votes
1

answer
998

views

boto EC2 find all Ubuntu images?

How do I find all Ubuntu images available in my region? Attempt: from boto.ec2 import connect_to_region conn = connect_to_region(**dict(region_name=region, **aws_keys)) if not filters: # Not as default arguments, as they should be immutable filters = { 'architecture': 'x86_64', 'name': 'ubuntu/imag...
A T
1

votes
2

answer
2k

views

Touch file then write to it in Node

How do I touch a file before writing to it? Attempt fs = require 'fs' os = require 'os' path = require 'path' json_filepath = path.join os.tempdir(), 'cache', 'foo.json' module.exports = (cb) -> fs.open json_filepath, 'w', 438, (err) -> # Touch, also tried with node-touch return cb err if err? f...
A T
1

votes
2

answer
4.2k

views

invalid_client: The OAuth client was not found

Was trying to use their Python API, however received this error: Failed to create bucket: invalid_client: The OAuth client was not found. In case it was an issue with my configuration, I tried with the gsutil, tested with: gsutil du Your 'Oauth 2.0 User Account' credentials are invalid. Please run $...
A T
1

votes
2

answer
549

views

Restart Bottle app (programmatically)

How do I restart my Bottle app programmatically? def error_handler(error): if error.message == 'connection already closed': RESTART_BOTTLE_SERVER() # This will reacquire connection
A T
1

votes
1

answer
199

views

Using MATLAB shared library in visual studio c++

I have a m-file in MATLAB.It calulates normxcorr2 between an image and a template as follow: function norm_res = TMatch(temp,image) c = normxcorr2(temp,image); norm_res = max(c(:)); when I running this m-file from MATLAB command line with two images as image and template, it gives me 0.8076 as a res...
s.a.t
1

votes
1

answer
224

views

The right way for multithreading in c++ with using of boost library

I've got a C++ dll and I've used boost library to implement multithreading and then I’d like to use this dll in a C# program. I did it and my program is running as I expected and there isn’t any problems in my system. When I create an installer with using of Advanced Installer and install it as...
s.a.t
1

votes
1

answer
57

views

How to restart program after interruption?

How can I start my program again after interruption and kill the previous process? What I have to write in my function? Or maybe another way to restart program in itself exists? this_program.sh: trap 'mySig' SIGINT mySig() { ./this_program.sh }
A. T
1

votes
2

answer
91

views

virtualenv directory from script

This used to work, but now both give the same result: $ python -c 'from pip import __file__ as pip_loc; print pip_loc,' /usr/local/lib/python2.7/dist-packages/pip/__init__.pyc $ /tmp/.venv/bin/python -c 'from pip import __file__ as pip_loc; print pip_loc,' /usr/local/lib/python2.7/dist-packages/pip/...
A T
1

votes
1

answer
1.7k

views

Oracle SQL Developer - Format setting like toad

how to make SQL Developer to format my PL/SQL code like TOAD. Because every time, I need to get help from other peers to format my PL/SQL code.
A_T
1

votes
1

answer
346

views

node_modules in AngularJS 2 [ng cli] without System.config

How do I include node_modules without System.config with AngularJS 2 projects generated with ng? Attempts (in src/index.html): Project setup: npm install -g angular2-cli ng init npm install npm install --save [email protected] npm start Note: [by default] there is neither systemjs.config.js no...
A T
1

votes
2

answer
801

views

How to list all the tags, on a remote, that reference a commit or one of its descendants?

How to list all the tags, on a remote, that reference a commit or one of its descendants? I'm looking for something equivalent to git branch -r --contains , but for remote tags only.
A.T.
1

votes
2

answer
58

views

C# WPF - How to make a .dll of a namespace to use in other programs?

I have just created a namespace, with a set of windows, that tell the user about updates, that I would like to use in many of my applications. I would like to just package the namespace as a .dll, and just use these windows wherever I please, without having to manually add any .xaml or .cs files, ju...
A T
1

votes
1

answer
1.1k

views

how to use environment variable in batch file

I am noob in using batch files, Ok I have added visstudio system variable with value C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe so echo %visstudio% will give me the path of visual studio in cmd. Now how could I use this variable so that I can run application from my...
A.T.
1

votes
1

answer
540

views

Accurately debugging a called Userform in VBA excel 2016

I was wondering whether there is a smarter/more accurate method of debugging userform initializations in VBA that are called from a specific module. Because when I write an erroneously piece of code in the Userform_initialisatize, I the error I receive states an error, but not where it occurs, the h...
a.t.
1

votes
1

answer
24

views

Using `interface I { foo: string; bar: number; }` as namespace `(can: I.foo)`?

Given a simple interface like: interface IHaz { foo: string; bar: number; } What's the best way of enabling: export const f = (a: typeof IHaz.foo, b: typeof IHaz.bar) => {}; (my actual code has more complex interfaces as types for foo/bar; and my f is specialised to handle a subset of IHaz… so I d...
A T
1

votes
1

answer
1k

views

Install Cartopy & dependencies on Windows

I want to install Cartopy on Windows, which has some dependencies according to http://scitools.org.uk/cartopy/docs/latest/installing.html#installing. When using pip install cartopy in the cmd prompt, it gives an error where it wants me to install GEOS 3.3.3 and Proj4 4.9.0. I've downloaded geos-3.6...
A T
1

votes
1

answer
160

views

SSH into scaled out Azure app service for container

How to get access to the specific instance of the scaled out to N instances Azure web app running a Linux container? Portal allows to SSH into one of the existing instances but never tells which one you are in.
A T
1

votes
1

answer
257

views

Binary classifier Keras callback for sensitivity and specificity?

How do I get sensitivity and specificity, when class_mode='binary'? - My current solution works for class_mode='categorical': from keras.callbacks import Callback import numpy as np from sklearn.metrics import confusion_matrix class SensitivitySpecificityCallback(Callback): def on_epoch_end(self, ep...
A T
1

votes
1

answer
0

views

Gradle Error URI has an authority component

I am trying to install gradle .when i try to execute gradle -v command. I get the below error java.lang.IllegalArgumentException: URI has an authority component at java.io.File.(File.java:423) at org.gradle.internal.classloader.ClasspathUtil.getClasspathForClass(ClasspathUtil.java:68) at org.gradl...
A_T
1

votes
1

answer
0

views

Maven- Remove a Jar while building from lib folder

i have added a jar like below com.ibm.ws.runtime com.ibm.ws.runtime 1.0 system ${basedir}/WebContent/WEB-INF/lib/com.ibm.ws.runtime.jar but in the war file creation , i don't want this in the lib folder. I know that scope tag with provided value would do that, but here the scope is already defined a...
A_T
1

votes
2

answer
0

views

Pytorch Argrelmax function (or C++)

I'm trying to find the equivalent pytorch (or C++) for scipy.signal.argrelmax(), which finds the peaks in a 1D array with some padding. https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.signal.argrelmax.html Here's what I've come up with and it is faster than scipy.signal.argrelmax -...
C a t
1

votes
2

answer
0

views

Drag and Drop Orientated CMS for an Intranet?

I'm looking for a Drag & Drop orientated Content Management System for use as an Intranet site. Also required is CAS integration for Active Directory support. Basically I want AD users to get different Intranet pages based on the GP group. I would also like for them to be able to customize their hom...
A T
1

votes
3

answer
1.1k

views

Stored procedure for dynamic query in SQL Server

I want to create a procedure which returns a table on the basis of input of parmeters as fields and operator ...how can I use operator selection which is passed as a parameter string ALTER PROCEDURE dbo.sp_getStaffRecord ( @deptname varchar(50), @dob date, @active bit, @salary int, @firstname varcha...
A.T.

View additional