Andreas

1

votes
1

answer
439

views

Google Cloud: How to list granted permission for user or service account?

Is it possible to get a list of all permissions that have been granted (specifically or transitively) to a user or GCP service account, ideally filtered by resource, through gcloud or the web UI?
Andreas Jansson
1

votes
4

answer
37

views

How to round down decimal number in javascript

I have this decimal number: 1.12346 I now want to keep only 4 decimals but I want to round down so it will return: 1.1234. Now it returns: 1.1235 which is wrong. Effectively. I want the last 2 numbers: '46' do round down to '4' and not up to '5' How is this possible to do? var nums = 1.12346; nums...
Andreas
1

votes
2

answer
39

views

Can someone explain the intuition of loops when used on dataframes?

I want to fully understand what each line of code does as I am currently not 100% sure. The code is from a tutorial series I am watching from PythonProgramming.net. I believe the first 'If' statement is adding columns to the act_min_wage dataframe and then renaming them? The 'else' statement seems...
Andrew Andreas
1

votes
3

answer
12k

views

Error in Android studio java.io.FileNotFoundException

I got error when I want to debbuging usb at my phone I cant display my code on android studio in my phone and the error looks like this: please help me I am using android studio 2.0 and my phone is ASUS Fone-Pad 8.0. Error:java.io.FileNotFoundException: C:\Users\Andrezs\AndroidStudioProjects\HappyS...
1

votes
1

answer
52

views

String can't be converted to a double

I have a strange problem. I start by showing the error that I get in a sortLIST function, - which seems strange. The problem occurs for the string 'i' as seen in the debug error which is separated by ','. The first argument is 0.48 which is a double. Anyway the error says: Input string was not in a...
Andreas
1

votes
1

answer
49

views

Sleep function in javascript/node.js [duplicate]

This question already has an answer here: What is the JavaScript version of sleep()? 72 answers I am trying to create a 'sleep' function where I like to wait 10 seconds before continue with next command. This doesn't work. No sleep is occuring. How can I put it nicely in a function like I do below...
Andreas
1

votes
0

answer
137

views

Any Chance to make CodeMirror play on Android Chrome?

I understand CodeMirror has issues on mobile and behavior varies with extensions in use. However, for me it seems pretty much unusable everywhere I encounter it on Android. Have a look at Kotlin Koans and try the Backspace key. Amongst other things, I get gobbledygock and a bunch of newlines. I did...
Andreas Steffan
1

votes
0

answer
24

views

graph-refactoring of an TEI-xml-Textgraph

I'm trying to do a graph-refactoring to a TEI-XML-textfile which I imported into neo4j. For importing this XML you need this special apoc-library (only version 3.2, thanks to Stefan Armbruster): https://seafile.rlp.net/f/bf9fbe3cde30491ea26a/?dl=1 Then you can import a sample graph, which consists o...
Andreas Kuczera
1

votes
1

answer
81

views

How to hash GET parameters in url before show in url?

I have simple html form in my website: Enter message id And when I enter id and click to 'Encode' button showed my added ID. How I can show id parameter in hash way to user? Example functions for encode and decode:
Andreas Hunter
1

votes
1

answer
343

views

Why doesn't Python 3 find installed packages (e.g. BeautifulSoup4)?

Using Ubuntu 16.04 with Python 3.5 I get import errors for some packages, e.g. 'BeautifulSoup4' or 'requests'. Both libraries are installed from the Ubuntu repositories: $ dpkg --get-selections | grep -E 'python3-req|python3-bs' python3-bs4 install python3-requests...
Andreas N
1

votes
0

answer
25

views

VisualDiagnostics.VisualTreeChanged event without attached debugger?

In WPF there is an event VisualDiagnostics.VisualTreeChanged that triggers every time a new element is added to the visual tree (anywhere). The problem is that this only works when a debugger is attached to the process. Is there any way of getting around this limitation? Any other similar event that...
Andreas Zita
1

votes
0

answer
52

views

Why the working code for check chekboxes does not work in the template?

I have work with inbox messages. I use this template for example inbox. And in that inbox have HTML button code with check all messages checkbox: And in div block inside table have message list: Subject 1 Message text 1 11:09 pm Subject 2 Message text 2 09:09 pm I have simple javascript code for che...
Andreas Hunter
1

votes
4

answer
71

views

Why the code works on the first template but does not work on the second template

I have simple routes group in my web.php file: Route::group(['prefix' => 'inbox', 'middleware' => 'auth'], function(){ Route::get('/', ['uses' => '[email protected]',])->name('inbox'); Route::get('/message/{id?}', '[email protected]')->name('message'); Route::get('/read/{id?}', 'InboxContr...
Andreas Hunter
1

votes
2

answer
214

views

WASAPI: Identify non-active channels on loopback recording

I have a DSP software which captures the audio playing using the WASAPI api in shared loopback mode. hr = _pAudioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_LOOPBACK, 0, 0, _pFormat, 0); This part works fine, but now I want to be able to detect the number of channels actually pl...
Andreas Arvidsson
1

votes
1

answer
287

views

MemoryMappedFiles: persistance and inter process communication

I have an issue with memorymappedfiles. 1) Each time I request a file (with the same name), I seem to get a new file. The bytes I wrote are not present on next access. I only managed to fix that by persisting the object, which I thought should not be needed. 2) As for inter process communication, I...
Andreas Reiff
1

votes
0

answer
58

views

How to validate data against a GraqhQL type

Having a GraphQL schema and some JSON object, is there a way to check if the object is a valid type in the schema. The only thing that I've found so far is isValidJSValue which only expects GraphQLInputType.
Andreas Köberle
1

votes
1

answer
266

views

Robolectric not handling getApplicationContext() correctly - NPE

I've been running some tests on an android application using Robolectric and it's been working well until now. My application passes the result of getApplicationContext() to a constructor, but Robolectric should be ensuring the value of this is not null as I am using the BuildActivity() method. The...
Andreas Lärfors
1

votes
0

answer
113

views

Self-made Yahoo query for Finance data - error with pandas read_csv

Since the yahoo api does not work I tried a tiny python script to mimic a csv download. Unfortunately I get back: HTTP Error 401: Unauthorized But when I just copy paste the URL into the browser it downloads just fine. This is the code I use: import pandas as pd import datetime as dt import request...
Andreas K.
1

votes
1

answer
1.2k

views

Laravel DB query builder with LEFT JOIN using a RAW expression

I would like to left join data from a many-to-many relationship. In my first attempt to solve the problem I ended up with the situation described at How can a LEFT OUTER JOIN return more records than exist in the left table? Now I thought that I concatenate the values from the many-to-many relatio...
Andreas
1

votes
1

answer
33

views

Function parameter: Get name of undefined variable

If one of my functions get an undefined parameter passed, I want to get the name of the variable outside the function so I can better troubleshoot the undefined variables. I.e.: var myVar = document.getElementById('myTable').dataset.tablename; //myVar: undefined testVar(myVar); testVar(param1) { if...
Andreas
1

votes
1

answer
31

views

sql query needs a specific order by

My query without any order will result in: owner parent target key value operator childOP ----- ------ ------ --- ----- -------- ------- 267582 6 19 0 0 4 -1 267582 6 19 0 267582 32 4 267582 6 19 0...
Andreas B
1

votes
1

answer
407

views

neo4j apoc merge nodes to one specific node

In our graph we have some nodes of persons which are connected with SAME_AS-edges, because they all mean the same person. One of the nodes, with the name-property starting with a major character and a number is the main node, to which all others should be merges to. Any help would be great.
Andreas Kuczera
1

votes
1

answer
55

views

Custom Actionbar optionButton not showing in Android 4.4

I have made a custom optionButton icon on the action bar. This worked fine but on my old tablet with android 4.4 only shows the standard icon. I have set the icon with: @drawable/icon_option Any ideas how I can fix that? Edit: My Menu xml: mipmapitems in project folder: inflate option menu: @Overrid...
Andreas
1

votes
1

answer
318

views

Group consecutive rows in a pandas dataframe by conditioning on hitting max value in another column

I have a pandas dataframe indexed by a time series with columns of GPS latitude and acceleration for a satellite orbiting the Earth. This latitude oscillates between maximum and minimum values with a constant time period as expected. What I want to do is integrate the acceleration column over each o...
Andreas Ioannou
1

votes
0

answer
904

views

Mocking default exported function with Jest says it wasn't called but it was

[EDIT - POSSIBLE SOLUTION] So I realised that my componentWillMount is an async method since it is using an async fs wrapper to do fs operations. So I made the beforeEach function argument async and awaited on the Enzyme.shallow. This seems to have worked. It just came to me that if it's async maybe...
Andreas Andreou
1

votes
1

answer
35

views

python: multiplication in for loop skipped on second iteration

I am trying to implement the Sieve of Euler (as described on programmingpraxis.com).I have code that runs fine on the first iteration, however on the next iteration my multiplication is skipped for some reason that escapes me (probably just missing some python-behavior there that is common sense to...
Andreas_B
1

votes
1

answer
829

views

Tensorflow: How to access sparse tensor value by index

I want to access the values of a sparse tensor by indices in constant access time. For example, if I have the sparse tensor represented by: sparse = tf.SparseTensor(indices=[[0, 0], [1, 2]], values=[1, 3], dense_shape=[3, 4]) I would like an operation similar to this: assert sparse[0,0] == 1 assert...
Andreas Forslöw
1

votes
0

answer
130

views

Visual Studio project dependency

My background is in Java, and I will start working on a project written in Visual C++. This Visual C++ project is dependent on several other internal and external projects. Most of them are internal company's projects and exist on my organisations internal Git repository. And some of them, while ext...
andreas
1

votes
0

answer
35

views

Buttons in Bootstrap (3) are getting rendered without any default padding when using React

I'm currently learning React and I'm trying to render some buttons in my app. However, when they're rendered in the page they all show all grouped together and without the default margin. Image of buttons rendered without default margin using React I'm unable to reproduce this problem when I render...
Andreas L Orozco
1

votes
1

answer
176

views

Performance Issue with dynamic SQL query in Excel

I want to create a dynamic SQL query in Excel towards redshift/postgres DBs to enhance a dynamic list of elements with several columns. Basically I want to be able to copy/type in a list of IDs into excel like the following: Id ------ AAC123 ABB203 AEF678 AEK232 BCE123 BFG304 Ideally the SQL query w...
Andreas
1

votes
0

answer
59

views

WPF - Get ElementName for the EventTrigger from other DataTemplate in one xaml file

Good morning, Could you please give me advice how would be better to resolve the issue with Binding of elements form different DataTemplates. I have two DataTemplate(s) in one common xaml file. In one of them I need to add the EventTrigger with appropriate binding to the command in ViewModel. I very...
Andreas Petrov
1

votes
0

answer
64

views

update sonarqube to 7.0 not possible because of sonar-10131 fix

I was trying to update to sonarqube 7.0 (from 6.7.2) The fix for ticket SONAR-10131 'purge of db Table Project measures is incomplete', prevents us from updating. The running time for each statement takes longer then 14 hours, and we have 492 projects. The number of rows for table project_measures...
Andreas Zschorn
1

votes
1

answer
46

views

Could I reuse UICollectionView? don’t want to create collectionView again and again

Could I reuse UICollectionView for multiple collectionViews in same VC or in different VCs or in UISplitViewController? Don’t want to create UICollectionView again and again.
Andreas
1

votes
0

answer
81

views

WinForms bad TabOrder with GroupBox, same tab order doubly assigned

I have a dialog with a group box inside (group box top right, tab order 9). I try now to set the tab order over the whole dialog, including the group box. My changes inside the group box seem not to be reflected. I also wonder since 9.0 and 9.1 seem to be doubly assigned, and that is exactly the pla...
Andreas Reiff
1

votes
2

answer
447

views

How to change the time zone in the model without touching the main time zone of the framework?

How can be changed timezone on created_at field of User model? For example now app timezone is UTC and I must change timezone created_at field to Europe/Paris and updated_at field timezone to Europe/London before save data to database. I have sample code to change field timezone. But I don't know wh...
Andreas Hunter
1

votes
0

answer
34

views

How to show link to all objects with same foreign key from Django Admin change page

I am trying to link directly from the change page of a Company Year in Django Admin to the other changepages of Company Year that have the same Company as a foreign key. Currently I have a link from the change page to the company page, and there I have links to all Company Years related to this comp...
Andreas
1

votes
0

answer
348

views

Azure App Service custom deployment (kudu) - permission denied

I've an App Service running in Azure, it's only a simple node.js app. I wanted to use a custom deployment script (because I've to execute npm install in a subdirectory) as it is described here: https://github.com/projectkudu/kudu/wiki/Customizing-deployments https://github.com/projectkudu/kudu/wiki/...
1

votes
1

answer
105

views

vim tags navigation, change the sort order using VIM or CTAGS

I have a simple problem… I have a tags file for c(c++) sources and I want to navigate through the tags using vim. My tags include sources and header, because I use the 'header (.h)' for the documentation and the 'sources (.c)' for the code. My problem is that I want get the 'sources (.c)' first an...
Andreas Otto
1

votes
0

answer
330

views

pyodbc not working in web-service container, Azure Model Management

I am trying to create a web-service via Azure Model Management and am struggling. I've followed the instructions and have managed to operationalize locally in a Docker container. My 'score.py' file includes a query to a SQL database using pyodbc. This functions perfectly when I test this on my loc...
Andreas
1

votes
0

answer
164

views

Google Maps iOS SDK. How to hide a marker label when overlapping another marker?

I’m looking to replicate the behavior of the Google Maps app, where labels are dynamically hidden if they overlap other labels or icons. Like this: Both labels showing One label showing My current setup is a GMSMapView with GMSMarkers that have custom icons (UIImages): Custom marker and label Sinc...

View additional