Michael Michael

19485 questions
1

votes
1

answer
311

views

GNU version issue with gnu++0x standard

I need to compile code with two compiler versions: g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 I have a piece of code in a header file like this: template class Constant { ... /*constexpr*/ static const RealType Pi = 3.141592653589793238462643383279502884197169...
Michael
1

votes
1

answer
1k

views

API call from one Django site to another

I'm pretty new to Python/Django but I have set up an REST API for one website (siteA.com), and would like another website (siteB.com) to be able to call this API and show some results. For this I have added the Django REST Framework and Django Auth2 Provider to siteA. I can now call the API using...
Michael Nieuwenhuizen
1

votes
0

answer
6

views

Cannot import data into pdf checkbox using iText

We are using itext in Vb .net we are importing data from an excel spreadsheet and filling in the fields from the spreadsheet. We get everything except for the checkboxes, we are not sure how to handle checking them(They are Either Yes/No ) The internet says to use GetAppearanceState, but not working...
Michael
1

votes
1

answer
1k

views

xsl:character-map / xsl:output-character do not work

I need to use character transformation for my app. As example I looked at book and tried to play with example (if that matter this book Appendix A -> [2.0] section) Here is my XML (from the book): public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!")...
Michael Z
1

votes
2

answer
5.5k

views

Implementing my own ps command

I'm trying to implement my own ps command, called psmod. I can use linux system call and all utilities of the /proc directory. I discovered that all directory in /proc directory with a number as their name are the processes in the system. My question is: how can I select only those processes which a...
Michael
1

votes
1

answer
4.1k

views

SSRS - Getting this error: Numeric aggregate function on data that is not numeric

I have a report that is giving me grief about this statement: Format((Sum(Fields!Mean.Value)) / RowNumber("category_desc"), "F2") The mean field is a calculated field that is the sum of five fields in my table. Category_desc is the group. When I run the report, I get #Error in the textbox and thi...
1

votes
1

answer
1k

views

How to use GetLineReq in AXL Java Client using JAX-WS

What I'm trying to do is to obtain a Directory Number from CUCM, using the AXL API from Cisco. Here's the relevant Code: private void getNumber(){ AXLAPIService axlService = new AXLAPIService(); AXLPort axlPort = axlService.getAXLPort(); String validatorUrl = "https://mycucm:8443/axl/"; ((BindingPro...
Michael
1

votes
2

answer
569

views

Merge dicts of arbitrary depth in Jinja2

How can I recursively merge dicts in Jinja2 without having to define a custom filter? So { a: { b: 'ab', d: 'ad' } } + { a: { b: 'aX', e: 'ae' } } becomes { a: { b: 'aX', d: 'ad', e: 'ae' } } I'm migrating some Mako-templates to Jinja2. With Mako I could simply use a small python-c...
Michael Krupp
1

votes
2

answer
155

views

Remove whitespace in print function [duplicate]

This question already has an answer here: How to print variables without spaces between values [duplicate] 6 answers I have this code print "/*!",your_name.upper(),"*/"; where your_name is the data the user inputs. How can I edit the code above to tell the system to remove any whitespace? UPDATE:...
Michael
1

votes
3

answer
1.7k

views

What is the difference between IntegratedWindowsAuthentication vs Negotiate?

When setting up my owin self hosted projected I want to set it up to use authentication using windows domain. As I understand this is performed through a negotiate protocol where it tries Kerberos and fails back to NTLM if unavailable. I looked online and the code snippet looks like this public void...
Michael B
1

votes
1

answer
284

views

Best practice to throttle concurrent calls

I need advice on the best practice for throttling calls to code within an asp.net MVC web application. We have a class that handles some complex work involving calling out to Salesforce, let's call it ComplexSfLogic.cs. Salesforce has a limit of 10 concurrent requests at a time, and given the comp...
Michael La Voie
1

votes
2

answer
5.3k

views

The best way to check if a variable is a function in javascript [duplicate]

This question already has an answer here: Check if a variable is of function type 17 answers Which is a best way to check if a variable is a function? var cb = function () { return; } if (!!(cb && cb.constructor && cb.apply)) { cb.apply(somevar, [err, res]); } //VS if (!!(cb && 'function' === typeo...
Michael
1

votes
1

answer
1.5k

views

Crop image with settable center and scale in Python PIL

I would like to crop an image using PIL, although it could be some other module. I need the method to crop with a scale factor, ie 1.5 meaning that the output would be 1.5x zoomed in. Additionally, I would need to set the center where it zooms. This means setting x/2,y/2 as the center would zoom s...
1

votes
1

answer
7.9k

views

Error: Route.post() requires callback functions but got a [object Undefined]

Has a callback don't know why this isn't working...I have working user system in place and I essentially just copied that system. Don't know why one works and the other doesn't. I've omitted the irrelevant code and included the jobs in the users model file out of laziness. Error: Route.post() requir...
Michael Paccione
1

votes
1

answer
2.5k

views

Set up selenium server [closed]

I am looking for a clear and concise tutorial on how to set up selenium server on a remote host and how to use it appropriately. I am still new to some of the set up and configurations of servers in general, and the selenium documentation seems worded in a way that is meant for a higher level of und...
Michael Gibson
2

votes
1

answer
24

views

Return min value for subgroups of grouped data

Rows are grouped by the variables grp1, grp2, grp3. For each value of varD in the table below, I need to return the minimum value of varA from the minimum of all values of VarC that are >= varD? The returned value is stored in the column varX On a given row, the particular varC and varD are not pair...
Michael 96
0

votes
0

answer
27

views

Hackerrank method reference operator java throwing syntax error [on hold]

I am trying to sort a custom Student object based on the cpga field, followed by the first name if the cpgas are the same, followed by id if the first names are the same. This is my code: import java.util.*; class Student{ private int id; private String fname; private double cgpa; public Student(int...
Michael
1

votes
1

answer
1.5k

views

Is it possible to make a Chrome CustomTabs intent not open an external application?

I want the Chrome CustomTab to always open the url in the Chrome CustomTab. Even if there is an external application that the intent can go to. Right now the user is prompted if they want to open in Chrome or the external application. Is it possible to force the intent to go through Chrome? I know a...
Michael
-2

votes
0

answer
19

views

How to print multiple selections of checkboxes PHP

I'm trying to print multiple selections of checkboxes. I would like for when a user checks a checkbox or multiple, that the form will show what the user selects. For example, if a user checks shoe1, shoe2, shoe3 it will print shoe1, shoe2, shoe3. If a user checks shoe1, shoe2 it will print shoe1 and...
Michael Sippy
0

votes
0

answer
4

views

Express.js - Check if user already followed and show unfollow button

I have successfully made it so that users can follow each other. What happens when you click Follow is that it will push your user id to the followers of the user you click follow on and then it will push the id of the user you are clicking follow on in the current users following section. Now i am...
1

votes
1

answer
488

views

use sink with UTF-8 encoding

I am using R in a windows environment. When i use sink to direct the output to a file, i can't set encoding to UTF-8. sink("Umlaute.tex", append=FALSE, split=TRUE) cat("ÄÖÜäöüß") sink() How can I set output encoding to UTF-8?
Michael Schmitz
-1

votes
2

answer
39

views

Convert an array of ojects to an object

What I wanted to achieved is convert an array of object into an object. mycode var arr = data.questions var obj = {}; for (let i = 0; i < arr.length; i++) { obj[arr[i].key] = arr[i].value; } console.log(obj) result questions : [{…}] 0: {id: 44, questionaire: 90, question: "asd", input_answer: nul...
Jan Michael Dough
1

votes
2

answer
262

views

How to create BigQuery view that preserves nested RECORD field

I have a BigQuery table with this schema: |- actorEmail: string (required) |- actorCallerType: string (required) +- baseOUs: record (repeated) | |- baseOU: string...
Michael
1

votes
1

answer
382

views

Bind to ContentPage Title From ControlTemplate

I have a fairly simple Xamarin.Forms App, with a ContentPage and a ControlTemplate in an App.Xaml ResourceDictionary I am trying to bind to the ContentPage.Title Property of the parent ContentPage. however the following doesn't seem to work.. ContentPage
Michael Randall
0

votes
1

answer
24

views

How to add spacing between two radio buttons that are next to each other

I'm having difficulty adding spacing between two radio buttons that are next to each other. They are too close to each other for my liking and I feel that it would look a lot better if I added some spacing in between. I'm talking about the width, not the height of them. I've tried added padding and...
Michael Sippy
1

votes
2

answer
91

views

What is appropriate type in SQL for C# type TimeSpan [duplicate]

This question already has an answer here: What is the correct SQL type to store a .Net Timespan with values > 24:00:00? 7 answers I have class which has property type of TimeSpan. At some point I need to store value properties in database. For this purpose I need to create appropriate table in dat...
Michael
1

votes
1

answer
24

views

Is there any way to tell the linker to ignore DT_SONAME when loading a shared object?

man ld says: -soname=name When creating an ELF shared object, set the internal DT_SONAME field to the specified name. When an executable is linked with a shared object which has a DT_SONAME field, then when the executable is run the dynamic linker will attempt to load the shared object specified b...
Michael Martinez
1

votes
0

answer
6

views

Python - create a new thread

I have an Instagram bot that checks if users from a list liked each other, so I want to send them links and give them, say, 30 minutes to complete the task. I tried to do something like this, but that doesn't seem to work correctly, also I was the only person who tested it so I have no idea if it wo...
Michael
1

votes
1

answer
126

views

What are the typical use-cases of (defun (setf …)) defsetf and define-setf-expander

When developing a package, we have three possibilities to define new setf-forms: We can define a function whose name is a list of two symbols, the first one being setf, e.g. (defun (setf some-observable) (…)). We can use the short form of defsetf. We can use the long form of defsetf. We can use de...
0

votes
0

answer
5

views

Automate Login to site using Spring Boot (Spring Security) and LDAP

I am working on a Spring Boot project, which uses LDAP in Spring Security for authentication. I need to automate the login once the user hits the login page based on the roles in LDAP group provided in Spring Security. If user has any role in the group mentioned in LDAP, then it must redirect to th...
Michael
0

votes
0

answer
12

views

Javascript preventDefault() not working over https

I have a page where a submit button transmits text over websockets and then data is returned and shown on the page. I use preventDefault() to catch the event for the submit button so that the page doesn't refresh when it's pressed. This works fine over http, but for some reason when I load the site...
Michael Reiley
0

votes
0

answer
6

views

How to chunk dask array with unknown chunks

I have two dask arrays with shape X:(nan, 42), y:(nan,). I my goal is to fit these into a SGDRegressor dask-ml model. However, when I use it I am given an error saying that Cannot operate on Dask array with unknown chunk sizes. Could anyone be able to tell me what should be done. Thanks Michael
Michael Schroter
0

votes
1

answer
16

views

Vue Router previous page without reload

I'm trying to create a back button to go to the previous page using the vue-router in vuejs that would work exactly like the browser's back button. The problem is, when using history mode for the router, when I do this.$router.go(-1); it actually refreshes the page, which is quite annoying, and the...
0

votes
0

answer
7

views

Dropbox.GetFileList only returns limited number of files

I have the following code: public static void ReadAndInsertFromDropbox(string accessToken, string dropboxPath, string localPath) { Dropbox db = new Dropbox(accessToken); List allFiles = db.GetFileList(dropboxPath); allFiles.Sort(); foreach (string allFile in allFiles) { string filePath = db.Download...
Michael Potter
1

votes
2

answer
932

views

Slackware /etc/slackpkg/mirrors

Hello I am new in Linux Slackware and I have problem when I tapping: slackpkg search gcc after that got this one: You do not have any mirror selected in /etc/slackpkg/mirrors Please edit that file and uncomment ONE mirror. Slackpkg only works with ONE mirror selected. I am from Israel, How can sol...
Michael
1

votes
0

answer
7

views

Cant install pyscipopt on windows

when I run pip install pyscipopt I get the following error: build\lib.win32-3.7\pyscipopt\scip.cp37-win32.pyd : fatal error LNK1120: 311 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\link.exe'...
1

votes
2

answer
1.1k

views

Consuming both Strict and Streamed WebSocket Messages in Akka

I am experimenting with building a web socket service using Akka HTTP. I need to handle Strict messages that arrive in totality, as well as handle Streamed messages that arrive in m multiple frames. I am using a route with handleWebSocketMessages() to pass the handling of web sockets off to a flow...
Michael MacFadden
0

votes
0

answer
5

views

Python TypeError: float() argument must be a string or a number, not 'SingleBlockManager'

I would appreciate any input. I was previously able to obtain image using this code but going back through my work it is now giving me this error. Any ideas how I can fix this?Perhaps this is due to upgrading matplotlib recently? Code I am using import pandas as pd import numpy as np np.random.seed(...
Michael Fernandez
1

votes
2

answer
158

views

az login fails wih Azure DevOps Pipelines

Since Today all our build pipelines on Azure Devops fail, when trying to execute the follwoing command: az acr helm push ... The pipeline fails with following error: ERROR: Please run 'az login' to setup account. We are running on Microsoft hosted agents using Hosted Ubuntu 1604. Checking the latest...
0

votes
2

answer
958

views

BITCOIND: ThreadRPCServer incorrect password attempt from 127.0.0.1

I have my Bitcoind server running on Ubuntu 14.04. The blocks count is updated and its running well. My problem is that when I access Bitcoin RPC using this curl command curl --user user_bitcoin:pass_bitcoin --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H...
Michael Blanza

View additional