martin-martin

15445 questions
1

votes
2

answer
73

views

Double pointer as function parameter

I was reading a page of 'Understanding and Using C Pointers' when this function appeared: void safeFree(void **pp) { if (pp != NULL && *pp!= NULL) { free(*pp); *pp = NULL; } } and an example code from it: int main(int argc, char **argv) { int* pi = (int*)malloc(sizeof(int)); *pi = 5; safeFree((void*...
Martín
1

votes
0

answer
145

views

Python/Kivy : How to pass TextBox value in .kv file from one class to another class

Can anyone tell me? I have two file test.py and test.kv. I have a textBox which id : state . How to pass state.text value in root.get_value(state.text) and get value in function of def get_value test.py from kivy.uix.screenmanager import Screen from kivy.app import App from kivy.lang import Builder...
Martin
1

votes
1

answer
551

views

UITableView - footer for section - iPhoneX

I have problem with iPhone and UITableView section footer. It is being 'hidden' behind the top cut-out section. I have this code: override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { var content = 'some long text' let footerView = UIView(frame: CGRect(x...
Martin Perry
1

votes
0

answer
211

views

UnicodeDecodeError from python 2 to 3 with .decode() and sockets

Hello i have been working on a Python code which will flash my Arduino over WiFi and i almost have it working im so close. The issue is it was created for Python 2 and i want it to run on the latest python 3. I added .encode and decode to places where socket sends or receives a string. and that work...
Edwin Martin
1

votes
1

answer
1.2k

views

Jenkins permissions denied when copying files

I'm setting up a web application using jhipster. I created a Jenkinsfile with the jhipster subgenerator which looks like this: #!/usr/bin/env groovy node { stage('checkout') { checkout scm } docker.image('openjdk:8').inside('-u root -e MAVEN_OPTS='-Duser.home=./' --volume=/var/run/docker.sock:/var/r...
Martin
1

votes
2

answer
247

views

Changing locale of UIDatePicker in Countdown Timer mode

I have UIDatePicker in CountdownTimer mode and need to change the wording of hours and min to German locale. I tried both, to set locale to German (Germany) in storyboard and in code, but both failed and the app still shows default english words for hours and min. timePicker.locale = Locale(identifi...
Martin Koles
1

votes
0

answer
42

views

PHP - Memcache for aprox. 20k small strings - out of memory

I have created simple code with memcache function CreateMemcacheName() { //lat and lon are latitude and longitude of place //user can not directly change this - it is passed from image URL //embeded in HTML site $lat = intval($_GET['lat'] * 100); $lon = intval($_GET['lon'] * 100); return 'data_{$lat...
Martin Perry
1

votes
1

answer
369

views

Jenkins build ignore tests

I am executing TestNG test with Jenkins build and Allure plugin. My problem is that if I am executing them from IDEA all test results are displayed. If I am using same configuration from Jenkins some tests are missing. XML Suite file Result from Allure when directly 'called' on results is good. Allu...
Martin Keprta
1

votes
0

answer
183

views

python/kivy : set dynamically value on on_touch_down event in TextInput from treeView

I have two files test1.py and test1.kv. There are a +Add more button.When click on +Add More button then row add dynamic. I added treeView on TextInput.But now i am confused that how to put selected treeView value(self.text) in current TextBox because every TextBox added dynamic so i don't know how...
Martin
1

votes
1

answer
139

views

OpenGL compute shader premature abort after calling glComputeDispatch

I have been trying to run a very simple counting compute shader to get a grasp on how many times my shader runs and how large of a compute array I can process. It seems that I'm either hitting some driver limit or my shader takes too long for the card to execute so it is prematurely aborted or some...
Martin
1

votes
1

answer
332

views

webpack not bundling with babel-loader and react

I am following along with a relatively older tutorial (from 2014) on RGR. I had to use an updated version of React, Webpack, and Babel so there are some differences. Everything has been working thus far except when I tried to compile JSX into webpack, it is giving me a build error. ERROR in ./public...
Kris Martin
1

votes
0

answer
74

views

Implementing FirebaseAuth in Swift 3

I'm using xcode 8 (swift 3) for creating some app, and I have problem with creating Register class. As you probably know Firebase was recently updated, so there is no tutorial for newer version. I was following this tutorial, but without success: https://www.appcoda.com/firebase-login-signup/ import...
Martin Pošmuga
1

votes
0

answer
228

views

Google PlayResolver in Unity Automated Build

I have a repository containing my game, and inside it is firebase messaging and analytics SDK imported from the .unitypackage BUT i don’t have the android dependencies installed (the ones that Play Resolver download i guess using gradle). So in a normal flow using the unity editor, play resolver w...
Martin Gonzalez
1

votes
1

answer
818

views

How do you do ROI-Pooling on Areas smaller than the target size?

I am currently trying to get the Faster R-CNN network from here to work in windows with tensorflow. For that, I wanted to re-implement the ROI-Pooling layer, since it is not working in windows (at least not for me. If you got any tips on porting to windows with tensorflow, I would highly appreciate...
Martin
1

votes
0

answer
49

views

MSXML2 restful API call returns no data on Windows Embedded Standard

I use the following code to consume restful APIs inside a PowerBASIC windows application which returns lists of contacts and tickets for a customer. The trace code produces good results on my Windows 10 Pro system. When I run the same query using POSTman on the same Windows Embedded Standard Servic...
Doug Martin
1

votes
0

answer
390

views

Angular: how to override @Component()

in our project we are building the same angular-application for different areas (lets say intranet and internet). The only thing that changes in those areas is *.scss-files. To be able to add scss-files conditionally, according to build-parameters I started overriding @Component() following this: h...
Martin-Mueller
1

votes
2

answer
347

views

How to dynamically add and remove servlets within a servlet context in Jetty 9.4.x?

I would like to add and remove servlets within a servlet context dynamically. I know how to add multiple servlet contexts dynamically using a ContextHandlerCollection. However, I need to do the same with multiple servlets within a context. Is it possible to add further servlets, once a servlet conte...
Martin
1

votes
1

answer
409

views

Link in Infobox using react-google-maps causes page reload

I'm not able to put a react-router-dom Link inside of a react-google-maps InfoBox without causing a full page reload. Here's the code for my InfoBox: import InfoBox from 'react-google-maps/lib/components/addons/InfoBox' import { Link } from 'react-router-dom'; class MyInfoBox extends Component { ......
David Martin
1

votes
0

answer
53

views

SQL Server syntax: search_condition and [ ,…n ]

Is it correct to use [ ,...n ] in context of search conditions. ::= { [ NOT ] | ( ) } [ { AND | OR } [ NOT ] { | ( ) } ] [ ,...n ] This element is used to indicate that some part of the syntax can be repeated. In this case, through commas. But I cannot imagine this in practice.
Martin
1

votes
1

answer
336

views

Bluetooth serial with C# and Mono on Raspbian?

I've been trying to create a C# Windows Forms Bluetooth serial application and then run it via Mono on my Raspberry Pi 3. I tried the following: String SelectedDevice = AvailableDevicesComboBox.SelectedItem.ToString(); BSerialPort = new SerialPort(SelectedDevice, 115200, Parity.None, 8, StopBits.One...
Martin
1

votes
1

answer
317

views

YouTube Reporting API using Service Account

Following Google's documentation you should be able to use the YouTube Reporting API without user authentication by using a Service Account. Currently I have a very simple sample that should give me a list of available Jobs, could be empty though. But I get a 403 permission denied. Request: $client...
Martin van Dam
1

votes
1

answer
244

views

Task assignment in Microsoft Graph api

I am working on an app that needs to assign tasks to user in office365. Is there a way to assign a task to a specific user without passing by Microsoft Planner? I don't want to have to create plan and buckets to assign a user to a task.
Martin O.
1

votes
2

answer
60

views

How to handle different parts of a project using GIT?

Im an electronic product designer, and my projects consist of various parts, like: Hardware design Software design Housing design Instructions Pricing Etc I have a main project folder, and every part in a separate subfolder. Right now im using GIT, and i create a new repo for every aspect of the pro...
Martin
1

votes
0

answer
66

views

Is there any trigger run before dynamic sql (as execute immediate or dbms_sql.execute)?

I'm creating a feature to allow user create proceduce, function, package and run they with some permissions (grant by this program, not database permission) save in a table. I want create a trigger run before any dynamic SQL and analyse it to prevent dangerous SQL statements from bad users? Like fol...
Martin Leung
1

votes
1

answer
242

views

dynamodb scan not working with IN condition

I'm failing to get the IN condition in my dynamodb scan call to work correctly. Background I'm trying to collect all permissions a user have based on the the roles associated with him, based on this data structure: # Users | user | roles | admin | ['system-admin', 'basic-user'] # Roles | role...
Martin Schulze
1

votes
1

answer
363

views

Bokeh Table: Horizontal ScrollBar hiding last line

I would like to be able to remove the horizontal scrollbar from the bokeh table or at least push it down so it does not hide the last row on the table. As showed on the picture, I cannot read the last row. The vertical scrollbar cannot go further down. Thanks,
Martin Garcia
1

votes
0

answer
66

views

UIWebView - cache not working

I have this code: class AdditionalDataWebView : UIWebView, UIWebViewDelegate { private var url: URL? = nil private var urlRequest: URLRequest? = nil private var lastAntiCache: String = '' override init(frame: CGRect) { super.init(frame: frame) self.delegate = self } required init?(coder aDecoder: NS...
Martin Perry
1

votes
3

answer
377

views

Import data from Excel to Word - format number with comma

I created a macro in VBA that allows me to choose a cell populated with a number and pull the number in that cell into a specific location in a word document. However, when I run the macro, the number that is populated into Word is not formatted with commas to separate thousands (e.g. looks like '10...
Ariel Martin
1

votes
1

answer
177

views

ValidationError: Cast to [undefined] failed

I have two mongoose models Game and Card which I want to connect. I followed this youtube tutorial and I'm able to CRUD games, but when I want to add a Card into the cards array, i get the following error: ValidationError: game validation failed: cards: Cast to [undefined] failed for value '[{'_id'...
Martin
1

votes
0

answer
332

views

Multivariable linear regression in JS

I am trying to perform multivariable linear regression with a single dependent variable Y and two independent variables x1, x2. This is simply an OLS regression with an additional dependent variable: Y = b0 + b1 x1 + b2 x2 I need to also calculate the correlation coefficient R^2 for this relationsh...
Martin
1

votes
1

answer
89

views

Linear regression with two independent variables in javascript

The following will output the slope, intercept and correlation coefficient R^2 for a given set of x and y values. let linearRegression = (y,x) => { let lr = {} let n = y.length let sum_x = 0 let sum_y = 0 let sum_xy = 0 let sum_xx = 0 let sum_yy = 0 for (let i = 0; i < y.length; i++) { sum_x += x[i]...
Martin
1

votes
0

answer
37

views

Create multiple xlsx files with charts Python

I'm looking for a massive python code to create xlsx files from my csv data. I need a file for a Cliente and there I need all information about the Clienteas I show you down. The point is I need to separate the csv data in Cliente and run my code for each Cliente Cliente Fecha Subastas I...
Martin Bouhier
1

votes
0

answer
265

views

How to use NamedPipeClientStream.Write with buffer size > 64K when serverName is not “.”

I created two (very) simple programs, one with a NamedPipeServerStream and the other with a NamedPipeClientStream sending data to the first one, both running on the same computer. When I change the serverName from '.' to the actual name of the computer, I can’t get it to work when calling Write wi...
Martin
1

votes
3

answer
48

views

Creating Column Based on Date Order, Rotating Dataset R

I have a dataset that looks like the following: ID= c('A','A','A','A','B','B','C','C','C') Date= as.Date(c('2017-09-24', '2017-09-26', '2017-09-23', '2017-09-30','2017-09-12', '2017-09-15', '2017-09-01', '2017-09-30', '2017-09-25')) Data= c(10,5,15,20,8,9,5,6,2) df= data.frame(ID, Date, Data) d ID...
Martin Jones
1

votes
0

answer
86

views
1

votes
0

answer
400

views

Angular2 Fullcalender: Problems with rendering a new event

Im having problems with creating a new event. My starting point was this tutorial: https://github.com/lbertenasco/ap-ng2-fullcalendar The Tutorial itself worked fine and the calendar is being displayed. But now I try to create a new event and I get an error from the console: Attempting to call a Ful...
martin-
1

votes
1

answer
117

views

bash heredoc gets corrupted(randomly) when pasted to ssh terminal [duplicate]

This question already has an answer here: How to use SSH to run a shell script on a remote machine? 13 answers I connect to a lot of Linux servers with ssh and run a health check script on each, wanted to save myself 2 secs per server when doing so. So instead of normally creating the script file:...
Martin Fejfár
1

votes
0

answer
32

views

Mercurial merge losing existing lines

I'm trying to merge a branch into the trunk. Trunk has file with code added but when I merge the branch into it, the code disappears. In the branch, the file is present but code is not. I'm using TortoiseHg for the merge. 'Discard all changes from the other revision' is unchecked and there are no me...
Bill Martin
1

votes
0

answer
53

views

HTML Polygon is trought menu

I have two problems. First I dont know how to hide polygon witch is over my menu when i move page how to hide that polygon under menu ?? Second how to delete that beige color witch is at class 'textbox' but under polygon. First problem at higher image and second at lower image. http://leteckaposta....
Martin Míňa Kunz
1

votes
1

answer
328

views

How can I deploy an ML model from ECS to Sagemaker?

I have a model which was trained locally, then transfered to AWS ECS. I would like to deploy it to Sagemaker. Currently, I do: from sagemaker.estimator import Estimator model = Estimator(image, role, 1, 'ml.c4.2xlarge', output_path='s3://{}/output'.format(sess.default_bucket()), sagemaker_session=se...
Martin Thoma

View additional