martin-martin

11690 questions
1

votes
4

answer
475

views

How to use Hibernate Search without an underlying database?

Is it possible to use hibernate search features without using hibernate core for the database stuff? I want to create a Bean with standard Hibernate-Search annotations and store everything by hand for testing purposes (and I don't want to create the Hibernate Tables for testing). For a class to be a...
Martin Braun
1

votes
2

answer
1.2k

views

Apache downloads the php file after updating php version from 5.3.28 to 5.4.25

I am running php on Debian 6 with mod_fcgid with DotDeb packages. Once I upgraded php to version 5.4.25, apache downloads the php files as it does not recognize the handlers. I am not updating any config files. Once I revert back to 5.3.28 it works ok. I am not able to track anything in the error lo...
Martin Taleski
1

votes
2

answer
908

views

MarshalByRefObject becoming “disconnected at server” even while sponsored

I am writing a game which supports mods, for safety I am sandboxing the mods into a separate AppDomain from the game engine (so I can restrict the capabilities of mods separately from the engine). However, objects in the scripting domain which the engine keeps a reference to keep getting garbage col...
Martin
1

votes
2

answer
671

views

Leaflet - onEachFeature mouseover update innerHTML of table

I am trying to add a mouseover event to my map: The aim is to display some of the polygon properties in a table outside the map when I hover over them. But it doesn't seem to work. Any ideas? My JS knowledge is very poor, I thought it might work with a code like this: ... function mouseoverfunction(...
maRtin
1

votes
1

answer
3.2k

views

import Robot Library with variable arguments

I have a Robot library implemented in python (myLibrary.py), which needs to be initialized with a variable number of arguments (e.g. fileNames): class myLibrary: def __init__(self, *files): And I have a Robot keyword file (myKeywords.txt), which is using that python library: *** Settings *** Library...
Martin Perzl
0

votes
2

answer
35

views

Converting PHP 5.6 code to 5.4 - unexpected '.'

i have prestashop module that is compatible only with PHP 5.6+, but my site is running PHP 5.4, so i am converting the code to PHP 5.4 I have this problem i cant figure out. Its: syntax error, unexpected '.', expecting ')' public static $files = array ( '15527491986d870fa01b8ac01c3aae85' => __DIR__...
Martin Duricky
1

votes
2

answer
920

views

CGContextDrawImage - EXC_BAD_ACCESS and MapOverlayRenderer

I have MapOverlayRenderer. Sometimes, I got EXC_BAD_ACCESS on CGContextDrawImage My image setter method to set overlay image -(void)SetImageRef:(CGImageRef)imageRef { CGImageRelease(_imageReference); _imageReference = CGImageCreateCopy(imageRef); } My draw method - (void)drawMapRect:(MKM...
Martin Perry
1

votes
1

answer
2.1k

views

Read metadata with FFMPEG

I'm looking for a way to print a video or audio file metadata using FFMPEG. I tried the following command: ffmpeg -i DirtyLove.mov And got the following result: ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers built on Feb 16 2015 18:01:39 with Apple LLVM version 6.0 (clang-600.0....
Martin Delille
1

votes
2

answer
1.6k

views

How to properly use gofstat in R?

I'm trying to write a bit of code in R that takes sample data from Excel and identifies the most fitting distribution to the data, and then the parameters for said distribution. After a bit of Googling, I decided to try fitdistrplus for fitting the distributions, and saw that gofstat is a function t...
Martin
0

votes
0

answer
3

views

gtk: how to change the angle of a GtkLabel in CSS

I want to change the angle of a GtkLabel in CSS from .config/gtk-3.0/gtk.css. What the name of the CSS property to change?
1

votes
1

answer
304

views

How to pick the right LoadFamily function in revitpythonshell

revitpythonshell provides two very similar methods to load a family. LoadFamily(self: Document, filename:str) -> (bool, Family) LoadFamily(self: Document, filename:str) -> bool So it seems like only the return values are different. I have tried to calling it in several different ways: (success, new...
Martin Ericsson
1

votes
1

answer
5.3k

views

Fragment was not found at expected path

Eclipse shows this message below, but the file is there: Fragment "”main_header.jsp”" was not found at expected path /test-webapp/src/main/webapp/WEB-INF/pages/”main_header.jsp” test-webapp/ `-- src |-- main | |--webapp | | |--WEB-INF | | | |--pages | | | | |--main.js...
martin
0

votes
0

answer
14

views

Python3: list comprehensions and stack frames

Consider this function: def quux(): i = 42 print([i for x in [1]]) Result: [42] Therefore, I assume that local vars are visible in list comprehensions. Now consider this: def foo(): return currentframe().f_back.f_locals["i"] def quux(): i = 42 print([foo() for x in [1]]) Result in: KeyError: 'i' I...
Martin Sustrik
0

votes
0

answer
3

views

Can I configure multiple certificates on my GKE/Istio Gateway?

I am using the prepackaged Istio on GKE, which comes with a pre-configured ingress gateway that takes a single SSL certificate. Is there a way to add additional certificates to Google's standard configuration which will survive reset by their configuration tool and persist through upgrades? The Isti...
Martin R
1

votes
1

answer
520

views

how to implement complex models in aframe

I'm pretty new to aframe and the ECS-modeling technique, so I probably didn't fully grasp how the architecture should be used. I want to model something like a robotic arm: in a simplified version that is a base, on top of that a rotator and the arm itself. The model is loaded from a single json-fil...
Martin Schuhfuß
3

votes
4

answer
109

views

How can I override user.groups in a custom account model in Django to implement a “virtual” group?

I have a custom account class in a Django app using PermissionsMixin: class Account(AbstractBaseUser, PermissionsMixin): Our CMS calls various .groups methods on this class in order to ascertain permissions. We essentially want to override the queryset that is returned from .groups in this custom Ac...
Martin Eve
1

votes
2

answer
59

views

Can SELECT get different results within one transaction using Read Committed Isolation Level?

So here is full paragraph from postgresql 9.6 docs about Read Committed Isolation Level: Read Committed is the default isolation level in PostgreSQL. When a transaction uses this isolation level, a SELECT query (without a FOR UPDATE/SHARE clause) sees only data committed before the query began; it n...
Martin Zinovsky
1

votes
1

answer
28

views

JS Strict Mode - Accessing boolean variable

So I've looked all over Stack Overflow and found similar questions, but couldn't find one that I could apply to mine. I'm in strict mode, and I have defined a variable (loaded = false), and trying to do an if/else statement based on where it's true or false... and after it runs once, I want it to s...
Chase Martin
1

votes
3

answer
76

views

Create a row for every day in a date range?

I have a table like this: +----+---------+------------+ | id | price | date | +----+---------+------------+ | 1 | 340 | 2018-09-02 | | 2 | 325 | 2018-09-05 | | 3 | 358 | 2018-09-08 | +----+---------+------------+ And I need to make a view which has a row for every day. Somethi...
Martin AJ
1

votes
3

answer
60

views

ArrayList Integer - calculate average grade without considering extreme values

How to calculate average grades (arithmetic method) in such a way that the extreme grades (6) will be removed from list - and the smallest (1) will be removed from list? import java.util.*; import java.lang.*; import java.io.*; class ListOfGrades { public static void main (String[] args) throws jav...
Martin - Plane
-1

votes
1

answer
22

views

How to prevent direct access to files in folder?

A have a webpage with separated "subdir" with this structure: mywebpage /subdir/system/ - here are php forms files, index.php The index.php calls file1.php in /system. Then other files in /system are called by "submits". I can't write correct .htaccess to prevent calling these /system/ directly by t...
Martin Sereday
-1

votes
1

answer
11

views

g++ compilation with linked libraries

I'm new to g++ and am trying to compile / run the example c++ code found on this page: https://docs.microsoft.com/en-us/windows/desktop/psapi/enumerating-all-processes Compiling the code with g++ -o ex.exe ex.cpp Doesn't work, so i'm pretty sure I'm missing something, like I need to link the Psapi...
Martin
2

votes
2

answer
63

views

Firebase Firestore - Query for posts in a big collection where groupId should match a value in an array

I am having troubles with firebase using the cloudstore .where query. I want to query a big collection of documents (in my case posts) but I only want to query the posts in which the groupId matches any of the groups that the user is in. The reason for this is that I want to query a combined feed fo...
Martin Kjellberg
0

votes
0

answer
15

views

How to mock the raising of a delegate on an interface that only has a setter?

I'm trying to mock an interface using Moq, but I can't see how to do it. The interface looks something like this: public delegate void MyDelegate(int i); public interface MyInterface { void Method(int i); MyDelegate MyDelegate { set; } } I am testing a component that takes an instance object of with...
Martin Brown
0

votes
1

answer
17

views

How to sum annual data in a csv of daily data with many years of data

Using a csv of daily data I am trying to find the annual total precipitation for every year. My csv has many years worth of data. I've tried AnnualMaxPRCP=df3.resample('AS').sum() but this also sums my year column. How can I sum just the Precip column? df = pd.read_csv("Current2.csv") df['Date']=pd...
Megan Martin
1

votes
1

answer
408

views

Two gitlab-ci runners for one project

I used to have a project on github with a travis and an appveyor integration service configured. Thus I was able to make sur my project was compiling ok on both OSX and Windows plateform. I'm now working with gitlab and ci runners. I have two runners configured: One on a OSX machine One on a Windows...
Martin Delille
1

votes
1

answer
437

views

Connect Sap Cloud Platform hana database with Web-IDE Database explorer

Has anyone managed to browse a cloud hosted SAP Hana database using the database explorer in the full stack web IDE that is as well available on the SAP cloud platform? I can connect using my cloud foundry credentials but for some reason, I receive an empty list of HDI containers and cannot select a...
Martin Horvath
1

votes
2

answer
47

views

How to read POST request parameters in nuxtjs?

is there some simple way how to read POST request parameters in nuxtjs asyncData function? Thanks a lot. Here's an example: Form.vue: submitting previous form routes to following nuxt page: Clickout.vue async asyncData(context) { // some way how to get the value of POST param "id" return { id } }
Martin Rázus
1

votes
1

answer
25

views

How to programmatically query a p2 repository for information and artifacts?

I have a bunch of different p2 repositories I want to query for information programmatically. What types of bundles/features do they provide? What type of licenses (if any) are paired with the bundles? And I'd like to simply download jars. In other words, I want to programmatically query and downlo...
Martin
1

votes
1

answer
76

views

How to generate all possible sample paths in Julia from vectors of unequal length

I have 5 vectors t1,...,t5, of respective unequal lengths n1, .. ,n5. How can I generate an (n1*...*n5)x(5) matrix in Julia, which would be:
Chris Martin
1

votes
1

answer
50

views

Java generics upper bounded wildcard restriction

Can someone explain what's the difference between these two snippets of code ? 1) private Collection getAnimal() { return null; } 2) private Collection
Martin Čuka
0

votes
1

answer
22

views

Apache: Invalid command 'Krb5Keytab'

I am setting up Apache2 2.4.25 on Debian stretch. My conf contains following lines: AuthType Kerberos Krb5Keytab /etc/apache2/auth_kerb.keytab KrbVerifyKDC off when I restart Apache, I get this error: Invalid command 'Krb5Keytab', perhaps misspelled or defined by a module not included in the server...
Martin Vegter
0

votes
0

answer
6

views

How can I return polymorphic data with Grape Enttity and Swagger?

I have a polymorphic tag and want to search ambigous items by this tag. How can I return this whith Grape Entity? class Tag < ActiveRecord::Base belongs_to :taggable, polymorphic: true end class Article < ActiveRecord::Base has_many :tags, as: :taggable end class Post < ActiveRecord::Base has_many :...
Martin M
0

votes
0

answer
10

views

wso2 api manager artifact association error multi tenant

So we have set up a api manager with a identity server as a key manager. Carbon.super is the only tenant that can create APIs in api manager, with no issues. Internal/everyone have been granted with every permission on their tenants, users on different tenants can log onto the api manager publisher...
Martin B
0

votes
2

answer
68

views

Effective way to loop in Python

I am trying to find an optimal way to execute the below loop statement I have the below code that works just fine where in I check for length of a column and perform actions accordingly. However I am unable to optimise the code but have to create this long if statements Given below is the code I ha...
scott martin
0

votes
0

answer
3

views

NHibernate QueryOver syntax with multiple tables

I have some problems with NHibernate QueryOver Syntax. I am not able to convert the following SQL to NHibernate QueryOver Statement: "select m.* " + "from authmodule m inner join authmoduleassignment ma on m.Id = ma.module_id " + "inner join authroleassignment ra on ma.role_id = ra.role_id " + "inn...
1

votes
1

answer
756

views

Google Oauth 2.0 redirect_uri_mismatch - Port changed on callback

I'm using Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync() to authenticated a Google account, the problems is that Google returns a 400 error after I've logged into my Google account: The redirect URI in the request: http://localhost:40745/authorize/ did not match a registered r...
Martin Lindgren
1

votes
1

answer
1.5k

views

“Ambiguous mapping found” when one @Controller extends another @Controller

I have a ImportAction class which serves as a parent class for several type-specific import controllers, such as ImportClientsAction and ImportServicesAction. ImportAction is a Spring MVC annotated @Controller class and has @RequestMapping-annotated methods to pull up a menu of import options and en...
Martin Carney
-1

votes
1

answer
49

views

How to convert delay to millis

I have a simple code with delays. I'd like to know how to convert this code to millis? Is there a function to do so? long revers = 1000; void setup() { pinMode(D1, OUTPUT); pinMode(D2, OUTPUT); } void loop() { digitalWrite(D1, LOW); delay(revers); digitalWrite(D2, HIGH); delay(...
Martin
1

votes
1

answer
528

views

Counta + Filter function on Google spreadsheet cannot give me a Zero

I am trying to use FILTER and COUNTA in Google spreadsheet. Spreadsheet The formula in E1 is =COUNTA(filter($A$1:$A$12,$A$1:$A$12>=$C1,$A$1:$A$12
Martin Li

View additional