Jack-Jack

10324 questions
1

votes
1

answer
1.4k

views

How to set the blur level of a view background

To set the transparency level of a view background we use mView.getBackground().setAlpha(mViewTransparencyLvl); How to set the blur level of a view background? Knowing that the background is a shape drawable not an image. Knowing that the user controls the blur degree. Knowing that this view is over...
Jack
1

votes
1

answer
792

views

Count Triplets error on hackkerank

Link to count triplets problem Below on the following code the hackerrank website says the answer is incorrect, however when I run the code on my local machine. Specifically test case 2, which is an array of 100 1s and has a triplet multiplier of 1, The expected output is supposed to be 161700, and...
jack parsons
1

votes
1

answer
50

views

Dont serve requests before site is warmed up on Azure

Is it possible to have some kind of timeout to make sure site is warmed app after website is scaled out or instance was restarted in Azure? We are hosting Sitecore website on Azure Webapp and wouldn't like any requests to be handled by instance before its warmed up and instead served by other health...
Jack Spektor
1

votes
4

answer
35

views

Python Print list on separate lines

I'm trying to print my leader board out however its printing it on one line instead of multiple. So far this is my code: cursor.execute('SELECT username, score FROM Players order by score DESC limit 5') topscore = cursor.fetchall() topscore = list(topscore) print(topscore) And when it runs it output...
Jack Vincent
1

votes
1

answer
26

views

Loop not running with new variables when multi threading

I am currently working on my final year college project and I am stuck on what I think is a threading issue. I want to be able to run my method multiple times but each time it gets ran it should update a variable with new values. I am querying an API to get userID and then passing it into my main me...
0

votes
3

answer
24

views

How can I get this argument?

Hello I have this code using HTML : {...} And Here is my code in Javascript : $(document).on('click', '.test_test', function (e) { ... }); And this is my function : function test(){ ... } The problem is that I would like to put my function test() like this : $(document).on('click', '.test_test', fu...
Jack Peter
0

votes
1

answer
13

views

How to transition to a new viewController after Firebase Authentication?

I have successfully implemented Firebase pre-built UI. It includes providers for google, facebook, email, and phone. Launching the app brings you to a viewController with a login button. Clicking the button brings up the authUIController. After signing in to one of the providers, the authUIControlle...
Jack K.
0

votes
3

answer
456

views

Registered URLs in a router not working

I am attempting to have several views in a router that is used in a url, and the urls don't seem to work at all. I followed the instructions on http://www.django-rest-framework.org/api-guide/routers/, but my code doesn't appear to work. My intention is to be able to access the views through these ur...
Jack Cole
-3

votes
1

answer
13

views

Array or Json to String

change the string to array is $string = '[{'name':'jack','address':'who knows'},{'name':'jill','address':'who knows too'}]'; $array = json_decode($array,true); but what if it's reversed change array to string $array = [{'name':'jack','address':'who knows'},{'name':'jill','address':'who knows too'}];...
jack williams
4

votes
1

answer
52

views

top = $this.css(“top”) returning an object versus element value

I have a HTML object: 1:1 But for some reason... When I access it's top property in jQuery through the following code: $tile = $('[data-x=1][data-y=1]'); top = parseInt( $tile.css('top') ); Then print it using the following: console.log(top); It gives me this in the browser: Window {postMessage: ...
Jack Hales
-1

votes
1

answer
17

views

Navigation between WPF pages

button is executed it will bring the user to the next page (Home.xaml)
Jack McLaughlin
1

votes
2

answer
1.3k

views

knex like query dynamically add

`let add_query = '.andWhere('company_name', 'like','%marker%')'; knex('franchisee').where('franchisee_name', 'like', '%jackmarker%')${add_query} .then((resp) => { console.log('resp >>',resp) })` Hear i want to execute like query using knex npm in node js. I take variable add_query using this variabl...
jack
1

votes
2

answer
47

views

How can I extract table defintion from BigQuery

I want to duplicate specific table schema without the data. Basically create a clean table with different name. Say original table orders as: a integer b string c float I want to create: orders-copy as: a integer b string c float BigQuery offers the COPY option from the UI but this also copy the d...
jack
1

votes
2

answer
48

views

Prevent Select Input value change conditionally

I have this vue component: the value of the select input is bound to the Vuex store like this: computed: { curDocType: { get () { return this.$store.state.curDocType }, set (value) { this.$store.commit('setcurDocType', value) } } } What I can't figure out is how to conditionally prev...
Jack Casas
1

votes
1

answer
56

views

How do I behave responsibly when fetching a URL provided by user?

What problems am I likely to face / what should I consider? I'm starting from a point of rate-limiting per user, maybe overall, possibly per domain. I guess I'll parse_url(), make sure I set reasonable timeouts, etc. Is there a big class of security hole I need to watch out for?
Bobby Jack
1

votes
1

answer
438

views

React Component Rendering Twice

So like the title says my homepage of my application is rendering twice for some reason and I am not sure why. From my BrowserRouter I am initially calling one JS file and from there I call my HomePage component and React Router but then my page is rendering twice and I am not sure why. My Browser R...
Jack
1

votes
1

answer
70

views

Direction flag usage in 8086

I have read in my book that when the SI register is less than the DI register (in string manipulation), then the direction flag equals 0 else the direction flag equals 1. But I have also read that instructions normally don't change the direction flag, so what is the exact usage of it? Should we set...
jack.math
1

votes
1

answer
114

views

How to decode JSON that has multiple lists that are unnamed in Swift [duplicate]

This question already has an answer here: Decoding JSON array of different types in Swift 3 answers I am trying to decode a JSON string but it seems to have multiple lists that do not have any names/keys that I can call with my structs. From what I can tell (with the little knowledge I have) there...
Jack Welch
1

votes
3

answer
59

views

Pandas: return feature names if variable is true

I have a list of ~2M strings and a list of ~800 words. I have created a dataframe with strings as rows and words as columns. With the exception of the string variable, all of the other variables are true or false values corresponding to whether or not the word is in the string. There are no missing...
Jack Reimer
1

votes
5

answer
61

views

Show multiples of a given number within a range

How can I fix the following code in better way (alternative way to iterate range from first element to last element? My goal is to write kotlin code in most efficient and simplest way I am looking someone tell me instead of n/7 what should I write to get the same result of code val numList = 1..20...
Jack
0

votes
0

answer
2

views

Want to extract the link annotations and replace the text for the annotation link

I have a pdf which has links to internal or external resources, I am able to extract all the links in the pdf but i have issues with extracting exact text which the link is linked/referred to and modifying the text which has the link linked to.
Mr Jack
-1

votes
0

answer
21

views

Improvement the code for fastreport in delphi

I use the following code for fastreport But the code does not work for me I have no idea how to correct the code and I'm not very skilled in working with Delphi I would appreciate it if you help me procedure TfrmLossRun.btnPrnLossClick(Sender: TObject); var s0,s1,s2 : String; begin with UserSession...
Jack Crowder
1

votes
1

answer
275

views

How can I fix the following error in Xcode: Key Commands must all have a Title, Key, and Selector? [duplicate]

This question already has an answer here: Key Commands must all have a Title, Key and Selector 3 answers I have been trying to figure out why I am getting this error: Key Commands must all have a Title, Key, and Selector. Every time I open a new project, this error occurs before I change anything....
Jack Nordquist
1

votes
1

answer
32

views

Android Layouts within layouts and making a slideable/scrollable strip within my android app

Im a beginner in android development and a bit stuck, I would like to have a strip in part of my main layout which gets dinamicaly filled and where the user can scroll it sideways to get the info while staying within the main layout. Im currently using a horizontal linearLayout and adding texViews t...
Jack
1

votes
1

answer
188

views

Cannot resolve method realm.insert and realm.copyFromRealm

My goal is to display the received data from the Internet in a RecyclerAdapter. But when I tried to do this, I get an exception. I tried to make this code myService.getFromNet(name) .subscribeOn(Schedulers.io()) .map(Cook::getPizza) .flatMap(cooks -> { Realm.getDefaultInstance().executeTransaction(r...
Jack Fortok
1

votes
0

answer
259

views

About use minio in angular project

import * as Minio from 'minio'; export class MinioClient{ minioClient = new Minio.Client({ endPoint: '54.223.109.***', port: 80, secure: true, accessKey: 'KM1W4S0TGK3T43YUMW**', secretKey: 'Z/2lurXwZieIguM7MQcQCEZ8CdUBBc7V0fOkKw**' }); getListBuckets():void{ this.minioClient.listBuckets(function(err...
Jack Chen
1

votes
1

answer
146

views

Neo4j 3.3.1- Custom APOC Procedures failing

I am trying to write my own procedures in Neo4j 3.3.1 version using APOC. As an exercise I stared with returning all node id's. Since I am new to java environment facing issues to run it successfully. Below is my java code to return the node id's. package example; import java.io.File; import java.u...
Jack Daniel
1

votes
1

answer
31

views

Access caller script's __filename from within a module function

I'm using node.js. I would like to access the filename of a script from within a module function called by that script. For example, exampleModule.js: module.exports = function(){ console.log(__filename); // more code which may also use the filename }; example.js var exampleModule = require('./examp...
Jack Robinson
1

votes
0

answer
161

views

What steps are required to migrated the gocd/go-server to a new system

I'm trying to move my gocd/go-server to a more powerful box. It's currently dockerized, but in short, i use a host volume, so i just rsync'd my whole project from system A to System B. Composer Service Entry: go-server: restart: unless-stopped image: gocd/gocd-server:v17.12.0 ports: - '8153:8153' -...
Jack Murphy
1

votes
0

answer
36

views

Want to pass a filepath as a parameter to a stored procedure but is saving to the default location and naming it the first letter of the parameter

Instead of creating the backup at the specified filepath, which works when being run just as a normal query in SSMS, it creates the backup in the default location and calls the file 'N' in this case but when I have change the file path to remove the N it then calls it an apostraphe. My Stored Proced...
Jack Tyler
1

votes
0

answer
169

views

Using spreadsheets.values.update method Google API using HTTP Request

I wish to use the following API to update one cell: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update I was unable to get the API library to work with my package, so I've been using HTTP requests for other situations. Here is a similar approach for this situation:...
Jack Robson
1

votes
0

answer
191

views

continuous variable as random effect in proc mixed

I could use some help understanding the interpretation of a continuous variable random effect. I understand the interpretation of fixed effect and categorical random effect. But SAS seems to allow continuous random effect as well (code below). I understand how random effects are supposed to be categ...
jack
1

votes
1

answer
90

views

Imageview constrained to bottom of toolbar filling toolbar

Im using a constraint layout with an imageview inside it and I constain the top of the imageview to the bottom of the toolbar, I want the image to fill the rest of the screen though depending on screen size, so I set the imageviews hieght and width to math-parent and also scaleType=fitXY. The probl...
Jack
1

votes
1

answer
73

views

AppWidgetHostView touch events not working properly

As you know AppWidgetHostView doesn't handle long press well and when using registerForContextMenu(host view) it doesn't open. I created a custom host view derived from AppWidgetHostView and override touch events to show context menu. But the side effects are bad, not because my code, but because th...
Jack
1

votes
1

answer
145

views

How can I make my Single Page Application (SPA) based on React render conditionally?

I am making a personal website based on ReactJS. Since this is a Single Page Application, I want to make my website be rendered conditionally. That is the Render should render each section on my page at different time when users scroll down to view different section on my page, because I want my com...
Jack Lau
1

votes
0

answer
94

views

Custom move for VRP using Optaplanner

I've been reading some SO posts and the OptaPlanner documentation but still not sure how exactly to implement the CustomMove and CustomMoveFactory. My use case is vrp with pickup and delivery with time window. I started with the TWVRP example and made some modifications. I read the description of P...
Jack Tsai
1

votes
1

answer
52

views

redirect to login page if haven't login in a post request

app.post('/customer/goods/available/disableGoods', auth.restrict, auth.acl([__FEATUREENUM.FP_SALE_GOODS]), postDisableGoodsHandler);} exports.restrict = function (req, res, next) { logger.enter(); if (req.session.operator) { if (req.url.indexOf('customer') > -1 && req.session.operator.operatorType...
Jack.Z
1

votes
0

answer
1.2k

views

KeyboardAvoidingView not working

this.setState({ availableBalance })} ref={(input) => this._availableBalance = input} returnKeyType='next' onSubmitEditing={() => this._focusInput('_sendToAddress')} value={this.state.availableBalance}/> this.setState({ sendToAddress })} ref={(input) => this._sendToAddress = input} returnKeyType='ne...
jack
1

votes
1

answer
46

views

How to handle nested synchronous promises

Here is the example JSON: test = [ [ { 'name': 'Test1.1', 'flow': [ { 'send': 'test1.1.1', 'receive': [...] }, { 'send': 'test1.1.2', 'receive': [...] }, ] }, { 'name': 'Test1.2', 'flow': [ { 'send': 'test1.2.1', 'receive': [...] }, { 'send': 'test1.2.2', 'receive': [...] }, ] } ], [ { 'name': 'Test...
Jack
1

votes
1

answer
26

views

RegEx Query return nth match

Basically, I have a regex expression in an Access query which pulls a product code from a long string of text. There is up to 10 codes in each string and I need ten fields in my query to pull each of the ten codes. So far I can only get it to pull the first or last code by changing Global = True|Fa...
Jack Diamond

View additional