John John

38568 questions
1

votes
1

answer
311

views

How to set custom font with specific size to Web View in iOS?

I am trying to set Open sans with size 15 to a UIwebview. But i am not able to implement that successfully. This is what i have been trying so far let content = '' + jsonObject.stringValue + '' self.webViewOutlet.loadHTMLString(content, baseURL: nil) Can someone help to implement this Thanks in ad...
Jobins John
1

votes
1

answer
328

views

Android Robo test cannot find element

I want to use Robo test from google firebase for my application. My application needs login process. I want to use resource and value mapping system. I filled in the form like this However, test report says that there are no such resource names Resource name was copied from android UI Automator Vie...
John
1

votes
0

answer
143

views

How to design a line deleting function for Tetris game?

I am trying to build a Tetris game in javaScript and HTML. I ran into problems with my function for removing the full lines. It sort of works, but not every time and not as I expected. I am not a professional programmer, I am learning to code just for fun. My knowledge of javaScript is limited and m...
Radek John
1

votes
0

answer
138

views

Extend gcdwebserver to Support HTTPS

I'm looking for an embeddable IOS web server that supports HTTPS. Has anyone attempted to extend gcdwebserver to support SSL? Or has anyone got specific advice on how to go about it?
John MacLean
1

votes
0

answer
232

views

Querying output media devices (with labels) impossible on a machine with no input media devices?

I need to list the available audio output options on the user's machine. For this, the MediaDevices.enumerateDevices method can be used, which returns a Promise of an array of MediaDeviceInfo elements: let devices = await navigator.mediaDevices.enumerateDevices(); Now I need to display a selection d...
John Weisz
1

votes
0

answer
70

views

How to call a generic method from c# in clojure

I have a generic method in c# like UseStartup in c# and i want to use it in clojureclr, now i have create a ns like (ns myapp.startup (gen-class :name myapp.Startup)) but i wonder how to pass it to the c# generic method
John Smith
0

votes
0

answer
31

views

Cordova webintent limitation

i am using cordova webintent in my project for updating internally. which is working fine with android 6. I have this new device which is in android 9 and when i try to update my app it says Failed to open android intent. I have been searching the net if theres a limitation of cordova plugin webinte...
1

votes
1

answer
314

views

Overriding Clone() method in Java [duplicate]

This question already has an answer here: Is protected method in super class visible in sub class in a different package? [duplicate] 2 answers I know I should implement the Cloneable interface and then override the clone() method of the Object class in Test, and this is not my problem . I just do...
John
1

votes
0

answer
92

views

Can be integrated jquery textcomplete with tinymce?

I use jquery-textcomplete in my site. It work well with default textarea's but not work with tinymce. Can be integrated jquery-textcomplete with tinymce? In the official website jquery-textcomplete post or example integration with wysiwyg editor not said. Thanks for answering! $('#textcomplete').te...
John
1

votes
2

answer
54

views

How can be returned input register using only array lower case words in jquery textcomplete?

I use jquery textcomplete in my project. Is it possible to return the input register using a word array only in lowercase. I looked in Google Translate the approximate functional and there too the input result does not return at input. There, the search is performed with any word entry register, but...
John
1

votes
1

answer
213

views

Tips for reducing size of .dylib and .so

I'm trying to compile the SDK manually, but the generated .dylibs and .so are over 70mb in size: ➜ lib ✗ pwd /Users/gond/opencv/build/lib ➜ lib ✗ du -h . 71M This is the command I'm using: cmake -D CMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -D CMAKE_INSTALL_PREFIX=/usr/local .. Is there any way t...
John M.
1

votes
2

answer
321

views

Ngrx: Property '[Symbol.observable]' is missing in type 'Store<boolean>' error

I'm using NGRX v4.1.1 in an Angular v5 app (with 'strictNullChecks': true, though it doesn't appear to matter). I'm seeing an error with the store. Given the following: showLists: Observable; constructor(private store: Store) {} ngOnInit() { this.showLists = this.store.select('contactsFeature', 'con...
John
1

votes
1

answer
36

views

JTextArea Output

Good Evening, What can I do to have the output from jTExtArea like in the console? You can see the image how it is, I use .append to show the output in jTextArea Image Code: public void actionPerformed(ActionEvent e) { if (e.getSource() == b1) { for (int i = 0; i < a.pattern_cnt; i++) { for (int j =...
John Coffey
1

votes
0

answer
83

views

CLR Assembly in SQL Server Error “Timeout Exceeded” when executed in stored procedure, runs fine in new query window

I have this stored procedure, we'll call 'wrapper', that calls another procedure to build an XML message then executes a CLR Assembly to send that XML message to a web service. The web service should then return a message saying success or failure. The issue is, the assembly is exceeding its timeout...
John Donahue
1

votes
1

answer
1.3k

views

VS2017 MYSQL SQLDataSource - Object reference not set to an instance of an object

So, I am trying to run a query using SQLDataSource on VS with MYSQL, and whatever the query is, I get the same error which is Object reference not set to an instance of an object. The SQLDataSource is already connected to the database, so there is nothing wrong with my connection string. Web.config...
John Doe
1

votes
0

answer
89

views

Bypass the faulty gcc “-mcygwin” argument, when building a library on python-3.4 on windows, through cygwin

I have the following problem: I want to build an external library of python on Windows through a script that uses gcc. When the script reaches the command: python setup.py build --compiler=cygwin, the following command is generated (that crashes): C:\cygwin64\bin\gcc.exe -mcygwin -mdll -O -Wall...
John Sig
1

votes
1

answer
100

views

Player 1 invites Player 2 to play a game with Phoenix Channels

I'm creating a card game in Phoenix with 2 players using Phoenix channels and GenServer. This is what my Game Struct looks like: schema 'games' do field :winner, :integer field :player_1, :id, default: nil field :player_2, :id, default: nil field :status, :string ## VIRTUAL FIELDS ## field :player_...
Frederick John
1

votes
0

answer
27

views

Is there a more efficient method than this to calculate the volume of an advanced 3D object?

In a project I'm planning to calculate the volume of an advanced 3D object by creating an array of 1x1 unit squares which make up a grid, passing that grid through the object and, every 1 unit of distance, running collision detection on each square with the object, so essentially we're really creati...
john doe
1

votes
0

answer
1.3k

views

using restSharp with example

following the example I found from the bottom comment in RestSharp simple complete example I am using the tutorial http://pawel.sawicz.eu/restsharp/ to learn about restSharp. I have little api experience so forgive me if this Q is silly but Im working on an existing Windows Service project in VS 201...
John
1

votes
0

answer
526

views

Angular 4 app on S3 denied access after redirect

I've built a simple angular 4 app that uses firebase as my authentication. And I use loginWithRedirect because loginWithPopup didn't work really on my cell phone. But the problem I'm running into is the redirect leaves the page, obviously, to authenticate, and then comes back to mysite.com/login bu...
John
1

votes
0

answer
82

views

.htaccess - redirect folder url to a file, and keep original address in address bar, whether the original url had a trailing slash or not

If a user goes to a URL formatted to look like a directory (http://www.example.com/myfolder/) I need the webserver to display a file and pass the folder name into the querystring, so it actually loads (http://www.example.com/file.php?folder=myfolder) I have got this working if a user types in (http:...
john avison
1

votes
0

answer
76

views

How to send List of Expression to Aggregate Function in Spark JAVA API

I'm trying to execute below code using Spark JAVA api. sampleDS=sampleDS .select(col('column1'),col('column2'),col('price1')col('price2')) .groupBy(col('column1'),col('column2')) .agg(expr('sum(price1)').as('MainPrice'),expr('sum(price2)').as('ExtPrice')) .sort(col('column1'),col('column2')); But t...
John Humanyun
1

votes
3

answer
567

views

Laravel On Demand Notification error “Undefined index: name”

Laravel 5.5.28 I'm using a Laravel's On Demand Notification to send out an email of a simple form submission to a central address. I have followed the laravel docs here I have mailtrap set up in the env file. The code in my controller: use Notification // set at top of class $submission = FormSubm...
John Halsey
1

votes
1

answer
87

views

Java MultiThread: unexpected execution time

I'm currently checking the behaviour of multithreading in Java and I'm getting an unexpected result. Here's what I'm doing: Generating 50 random adjacency matrices with a size of 600x600 and save them to a .txt file Reading these matrices and running Floyd Warshall algorithm with N threads (from 1 t...
John F
1

votes
2

answer
392

views

i have trained MNIST with accuracy 99.2% but with wrong predictions

I have been using this program to predict my handwritten images to predict a number using previously trained data. The following is the program. please help me out.im new to this This code is used for image processing: import numpy as np import matplotlib.image as mpimg img=mpimg.imread(/images.png...
john joy
1

votes
1

answer
428

views

Can not make a java.lang.reflect.Method constructor accessible when converting object to json with gson

This is my first attempt trying to use GSON. And I'm getting this error. Can not make a java.lang.reflect.Method constructor accessible This is the code I use to create my json: SoundEffects soundEffect = new SoundEffects('test', 'test'); String json = new Gson().toJson(soundEffect); This is the cla...
John Betohn
1

votes
1

answer
31

views

Controller in Directive is not getting read

It prints 1, but doesn't print 2 and 3. What is wrong here? 'use strict'; console.log('1'); module.exports = TestDirective; TestDirective.$inject = []; function TestDirective() { console.log('2'); return { restrict: 'E', scope: { user: '=', onComplete: '&', hideSubmitButton: '=?' }, templateUrl: '/t...
John Creed
1

votes
0

answer
84

views

Selenium reuse brower from 2 different application

I'm trying to open 2 different tabs in the same browser session from 2 different application. I'm using Firefox v57.0, Geckodriver v0.19.1, Selenium v3.8.0.0 The 2 apps are playing in the same time. I'm just trying to open a new tab from app 2 X seconds after App 1 open the first tab. App 1: Firefo...
John Daves
1

votes
0

answer
213

views

Using python3 locally while running pyspark3 jupyter kernel

Does anyone know how to change the specific instance of python invoked in the %%local spark magic when running a pyspark3 kernel in jupyter? When running the PySpark3 kernel that ships with sparkmagic, I often want to pull data down to my local machine and do some calculations there. However, the...
John
1

votes
1

answer
575

views

python 3 requests 'ascii' codec can't encode character

this is the same question asked a million times on SO but I can't find a situation exactly like mine: import requests url = 'https://markets.ft.com/data/indices/tearsheet/summary?s=TR0000:TOR' response = requests.get(url) print (response.text) I get the following error: UnicodeEncodeError: 'ascii' c...
Ry John
1

votes
2

answer
21

views

is it possible to define 2 separate route pointing to one resource controller?

i am having a challenge with my route. is it possible to define 2 separate route pointing to one resource controller? Route::prefix('artist')->middleware('role:artist')->group(function () { Route::get('/', '[email protected]'); Route::get('/dashboard', '[email protected]')->name('artis...
john
1

votes
4

answer
830

views

Gecko driver issue

am unable to open browser using geckodriver 3.8.1 and selenium oxygen and firefox 57.0.4(32 bit) version package Selenium_JavaFundamentals; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class opengmail { public static void main(String[] args) { // TO...
john dst
1

votes
0

answer
127

views

System.Byte[] on Datagridview

I am getting data from oracle database to datagridview. The column type in Oracle is = RAW(8 BYTE) However when i bind this to datagrid it doesn't show the values. It just shows System.Byte[] in all rows for that column. Example real value is = 000000006F478320 Also i found the data type mapping ho...
john true
1

votes
0

answer
76

views

vba faster performance array shuffling algorithm

I am running the below algorithm on an array of 100k items (I would like to expand it to 1m if possible) and am facing performance issues. I would like to reduce the processing time down to a few seconds. I am pretty sure the first loop is causing the code to slow down. Is it possible to automatical...
John Analytics
1

votes
0

answer
195

views

multipart/form-data ASP.NET Web API 2 - cannot bind data with BindModel (ViewModel) in action

I added this line to my WebApiConfig config.Formatters.XmlFormatter.SupportedMediaTypes.Add(new System.Net.Http.Headers.MediaTypeHeaderValue('multipart/form-data')); (From my research I found that this is the only way to receive data and file at the same time, PS: Can I send JSON data and file data...
john
1

votes
0

answer
15

views

mysql 5.5.42 - locking internally when using “wrong” utf-8 characters in utf-8 varchar column

I have very strange behaviour, clearly a bug. I use utf8_bin as charset for my table. I now had the case that I tried to insert a string that contains these HEX codes: 'f0 9f 87 a8 f0 9f 87 a6' That's '🇨🇦' When I try to update a row with that I get a duplicate key violation. But there is...
John
1

votes
1

answer
31

views

C# SMTP Mail sending failed on othercomputer

I had an app which sends mail when being run. When I run this app on my computer the email sending operation successfuly completed ( I run it on both visual studio and as .exe) and I receive the mail ,but when I send my app to my friend as an .exe app (both version got tried 'published' and 'debug f...
John Spring
1

votes
0

answer
91

views

While loading image sequence in an array, pygame.error: Out of memory

I have an animated background, and because loading the image every frame takes way to long I created an array in which I load all the images on startup. self.spriteArrayBG = [] i = 1 while i
John Cadac
1

votes
0

answer
183

views

Pass SVG path to Highcharts for Customer Symbol

I took a look at this How to add new symbols in Highstock chart? as well as the Highcharts page that is essentially what the answers to that question have copy/pasted as answers. My issue is a bit different and I cannot find any answer to. I already have an SVG path so using the renderer function ar...
John Stewart
1

votes
1

answer
31

views

How to update a part of an array sub document in MongoDB

I have this document in my mongodb collection: { '_id': 'YLRM9Wi7f6tp6qNbS', 'sessionId': 'hLDkkJKR4Muik6tbe', 'userId': 'ZYoG4cH8HcCDPMDGr', 'shopId': 'J8Bhq3uTtdgwZx3rz', 'workflow': { 'status': '', 'workflow': ['String'] }, 'billing': [Object], 'discount': 0, 'tax': 0, 'items': [ { '_id': 'JwR233...
John Kennedy

View additional