I have used mauron85/react-native-background-geolocation for tracking the location of the user on my react native app. It is working fine while the app is on fore ground. The location is exact on regular interval. But if the app goes to background, the location is not the same, rather is moved from the previous location even though the device is not moved. Following is my configuration - BackgroundGeolocation.configure({ desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, notificationTitle: 'Background tracking',...
Wednesday, October 17, 2018
Rails Devise API - Login route responds with `You need to sign in or sign up before continuing.`

I'm currently using Devise with my Rails API app to authenticate users using devise-jwt. This is what my User model looks like: class User < ApplicationRecord devise :database_authenticatable, :registerable, :jwt_authenticatable, jwt_revocation_strategy: JWTBlackList end And config/routes.rb is set up like this: Rails.application.routes.draw do devise_for :users, path: '', path_names:...
Calling multiple methods with same name using SoapClient
I have a SOAP webservice and in SOAP UI I see that there are methods with the same name. So, for example, there are 2 CreateNewContact methods, one of which takes 3 parameters and the other 4. Below are the stubs generated by SOAP UI Method 1 Stub: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rfp="http://test.com/testWebservice/"> <soapenv:Header/> <soapenv:Body> <rfp:CreateNewContact_FullName> <!--Optional:--> <rfp:fullName>?</rfp:fullName>...
Android location manager error 'Exiting with error onLocationChanged line 152 “1”'
I have a location manager in my Android app that sometimes works. Sometimes I'll run the app and it will get location updates (with some errors). Sometimes I'll run it and it will just throw this error every couple seconds without receiving any location updates: E/IzatSvc_PassiveLocListener: Exiting with error onLocationChanged line 152 "1" Here is my class for managing location events: package com.company.AppName; import android.app.job.JobParameters; import android.app.job.JobService; import android.content.Context;...
Move IIS Logs to AWS s3 bucket
I have a requirement to upload IIS logs 7 days older to AWS S3 Bukcet. By using below code I am able to access AWS folders under bucket Import-Module "C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell\AWSPowerShell.psd1" $AKey = "" $SKey = "" $source = "C:\inetpub\logs\LogFiles\*" $outputpath = "C:\scripts\Logs\logs3.txt" Set-AWSCredentials -AccessKey $AKey -SecretKey $SKey function Get-Subdirectories { param ( [string] $BucketName, [string] $KeyPrefix, [bool] $Recurse ) @(Get-S3Object...
Tuesday, October 16, 2018
Hide Navigation Controller Search Bar & opened Large Title programmatically

I have a tableView. I set the all settings about searchController ( Search Bar in Large Navigation Bar ) - ( open / close when scroll tableview ). I implemented rightBarButtonItem which name is 'Close' . I want to hide/close tableView and Search Bar with programmatically. I can hide tableView but not SearchBar. When I do isHidden for SearchBar , The Large Navigation Bar doesnt shrink to normal size. Pic 1. Opened search bar with...
Django: Sessions not working as expected on Heroku
Users keep getting logged out and sessions are not persisting on my Django app on Heroku. Users can log in, but they will be randomly logged out—even on the /admin/ site. Is there anything I'm doing wrong with my Django/Heroku config? Currently running Django 1.11.16 on Standard Dynos. settings.py SECRET_KEY = os.environ.get("SECRET_KEY", "".join(random.choice(string.printable) for i in range(40))) SESSION_COOKIE_DOMAIN = ".appname.com" CSRF_COOKIE_DOMAIN = ".appname.com" SECURE_SSL_REDIRECT = True # ... MIDDLEWARE_CLASSES...
How to connect two random people in a single thread using Laravel Broadcasting
I'm creating a random real-time chat, like Omegle. I'm having trouble to connect two random people in a private thread using a wait list. What would be the best way to do it using Laravel Broadcasting and Laravel Job? For example: Route::get('/start', function () { // add me to the wait list // wait for another person // find another person // remove me and another person from the wait list // dispatch event App\Events\AnotherPersonFound::dispatch($anotherPerson, $threadId); }); 0 Answe...
Call to undefined function Illuminate\Filesystem\finfo_file()

I have the following error showing up in my laravel.log file on a website I have running. How can I pin down where the error originates from? As the stack trace is so short I am unsure where to start. [2017-07-03 16:05:13] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined function Illuminate\Filesystem\finfo_file()' in /home/uksacbor/laravel-projects/attestation/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:254...
Improving Postgres performance on graph-like queries of multi-level self-joins (comparison to Neo4j)

One of the claims Neo4j makes in their marketing is that relational databases aren't good at doing multi-level self-join queries: I found the code repository corresponding to the book that claim is taken from, and translated it to Postgres: CREATE TABLE t_user ( id bigserial PRIMARY KEY, name text NOT NULL ); CREATE TABLE t_user_friend ( id bigserial PRIMARY KEY, user_1 bigint NOT NULL REFERENCES t_user, user_2 bigint...
Constant Validation Accuracy with a high loss in machine learning
I'm currently trying to do create an image classification model using Inception V3 with 2 classes. I have 1428 images which are balanced about 70/30. When I run my model I get a pretty high loss of as well as a constant validation accuracy. What might be causing this constant value? data = np.array(data, dtype="float")/255.0 labels = np.array(labels,dtype ="uint8") (trainX, testX, trainY, testY) = train_test_split( data,labels, test_size=0.2, ...
VBA, Date formatting issue

I have a code that 1) compares dates from Col X to Col Y. 2)paste dates to col Y if there is no match between columns. Column X my format looks like 08/15/2013 09/12/2013 10/03/2013 But when it pastes to column Y it goes, 15/08/2013 12/09/2013 03/10/2013 How can I format my paste to go to dd/mm/yyyy. Added more code to show array: ReDim PasteArr(1 To 1, 1 To 6) subcount = 1 For Cell1 = 1 To UBound(DataArr(),...
componentOne windows flexgrid automation using CodedUI C#
I have only compiled exe application which i need to automate. It has c1.win.c1flexgrid of ComponentOne as Grid. I am using CodedUI to automate this application. When using Coded UI Record & Playback, it do not highlight or find any row or column but only outer body of this flexgrid which is grid name. If i try to get its children, it return zero whereas, i can see there are lot of rows and columns in this FlexGrid. I tried to get current patterns of this control using AutomationElement object and it returned me...
Monday, October 15, 2018
Google Play and Launcher launched separated activities
Let's say I have a simple app, with a SplashScreenActivity and a MainActivity. Below is part of my AndroidManifest.xml: <activity android:name=".front.activities.splashscreen.SplashScreenActivity" android:launchMode="standard" android:screenOrientation="portrait" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> ...
Remove one of the two play button on google drive iframe embed
Can anybody help me on this, when I embed a google drive video using an iframe it has two play button, how to remove one of this? This happens only in Chrome and Safari so please test it on those browsers. <iframe src="https://drive.google.com/file/d/1mNaIx2U3m7zL9FW-wksaI1m_rL5Oh47v/preview" width="400" height="300" allowfullscreen="true"></iframe> As you can see on the iframe that you have to click the play button twice. Also I cannot use html5 player since most of the videos are large. here is my fiddle...
How to ignore the specific CSS codes coming from the WordPress plugin stylesheet?
I am working on a WordPress website built on custom theme in which I want to ignore some specific CSS codes coming from wordpress plugin style sheet. Here is the link for that wordpress plugin style sheet. The CSS codes from the above Wordpress plugin style sheet which I want to ignore is: @media screen and (max-width: 575.98px) .gv-table-view tr:first-of-type { border-top: 1px solid #ccc; } @media screen and (max-width: 575.98px) .gv-table-view tr { display: block; position: relative; padding: 1.2em...
'commit' changes on webserver to Github repo using PHP not working
I'm trying to write a little PHP script that can spot all the changes to a local git repo on my web server and push them up to my (private) Github repo. Pushing and pulling from the Github repo using Atom works perfectly, pushing changes to the web server using a webhook works perfectly, pushing and pulling updates on the web server via the command line works perfectly, my problem is trying to commit and push updates on the web server to my Github repo using PHP. How do you do this? If I have to change, add or even delete...
DialogFragment with multiple fragments/views

How can I display a dialogfragment with multiple fragments one after the other with animation? The use case I have is: DialogFragment is showing with fragment 1. It has a "next" button User clicks next The same dialogFragment displays fragment 2 with a slide in animation. Any pointers would help. Thank you in advance. This is the base dialogfragment I am using public class BaseDialogFragment extends DialogFragment { ...
TeamCity prevent simultaneous branch builds

I have a Git setup with the typical master --> develop --> feature structure. I have 5 TeamCity (v8.1) build agents. Is it possible to configure TeamCity so that if multiple people commit to develop at the same time, the develop branch won't run concurrent builds? Part of our CI process is deploy-on-success, so I don't want two builds to be deploying to the same endpoint at the same time. (I would want this setup for all...
How to align a View to center without changing children's position?

<View style={{height: '100%', width: '100%'}}> {OtherContent} <ScrollView> <View style={{flexDirection: 'row', flexWrap: 'wrap', padding: 20}}> {children} </View> <ScrollView> </View> I want the View inside ScrollView to be in center of the screen without changing it's children position Children: <View style={Styles.docsContainer}> {arr.map((document,...
use webpack plugin with Mocha tests
I've used create-react-app to create an app, and ejected the config. In webpack.config.dev.js and webpack.config.prod.js, I've configured the NormalModuleReplacementPlugin like so: new webpack.NormalModuleReplacementPlugin(/(.*)CUSTOMER(\.*)/, function(resource) { const customerName = process.env.REACT_APP_CUSTOMER; resource.request = resource.request.replace(/CUSTOMER/, customerName); }) The purpose of this is to replace imports such as import config from '../config/customer/CUSTOMER'; with import config from...