jason .

10554 questions
1

votes
4

answer
3.8k

views

Android WebView getFavicon() returning null

I'm trying to get the favicon of the loaded page after using WebView webView = new WebView(getActivity()); webView.loadUrl("http://" + url); I'm attaching the asynchronous WebViewClient to the WebView to get the favicon after it loads webView.setWebViewClient(new WebViewClient() { @Override public v...
Jason Hu
1

votes
2

answer
1.7k

views

“DataReader.GetFieldType(…) returned null” on Azure Website

I have a website running on Azure. I am pulling back data from a SQL Server database table that has a column of type "Geography". This causes an error of "DataReader.GetFieldType(...) returned null Sources on the web say that I have to include Microsoft.SqlServer.Types.dll which I have added to we...
Jason Geiger
1

votes
1

answer
518

views

EasyNetQ - Message order of delivery

From RabbitMQ - Message order of delivery Section 4.7 of the AMQP 0-9-1 core specification explains the conditions under which ordering is guaranteed: messages published in one channel, passing through one exchange and one queue and one outgoing channel will be received in the same order that they w...
Jason Kealey
1

votes
1

answer
27

views

Why is my If-Else statement defaulting to “else”?

I'm new to JavaScript and have just been toying with this little IF-ELSE exercise. Essentially, slots 1 thru 4 are static to experiment with the || operator. The const 'testSlot' is one that I've altered as time passes to try and execute the "else if" segment of my code; e.g, if it's 9:10 PM I've j...
Jason B
1

votes
3

answer
20

views

Group by date range in pandas dataframe

I have a time series data in pandas, and I would like to group by a certain time window in each year and calculate its min and max. For example: times = pd.date_range(start = '1/1/2011', end = '1/1/2016', freq = 'D') df = pd.DataFrame(np.random.rand(len(times)), index=times, columns=["value"]) How...
Jason
1

votes
1

answer
1.4k

views

Having time_zone_select default to system timezone

How can I use the ActionView::Helpers::FormOptionsHelper method time_zone_select and have the selected value default to the current (system) timezone? This works fine: time_zone_select( "user", "time_zone", nil, :default => "Pacific Time (US & Canada)" ) How can I replace Pacific Time (US & Canada)...
Jason Crystal
1

votes
2

answer
96

views

Why is my div lower than the others when contented?

I have been trying out with div overflows. And I am encountering the problem that the div is not displaying 'normally'. This is a simple HTML and CSS and I hope someone can explain me the problem? I was expecting that the boxes to be displaying in the same line. hihi ... http://codepen.io/ycmjason/p...
Jason Yu
1

votes
1

answer
949

views

f:param value is returning null both with commandButton and also commandLink

I am doing a simple navigation example in jsf as i am a beginner. i am always getting null when accessing the f:param value in the managedBean using ManagedProperty home.xhtml JSF Tutorial! Using JSF outcome Navigation.java package com.jason.jsf; import java.util.Map; import javax.faces.bean.Manage...
Jason
-4

votes
1

answer
24

views

Eclipse compile error shown incorrectly (Can only iterate over an array or an instance of java.lang.Iterable) [duplicate]

This question already has an answer here: Error: can only iterate over an array or an instance of java.lang.Iterable 2 answers I'm experiencing a really weird issue in Eclipse (Photon 4.8). I have some code that uses the for (Object x : ObjectList){} logic and all of a sudden it's throwing a compil...
Jason Schade
-3

votes
3

answer
24

views

'dataframe' object has no attribute 'iteruples' [on hold]

I am trying to read in data row by row from a dataframe but I get the following error: 'dataframe' object has no attribute 'iteruples'. The print call right before the loop works as expected and prints out my dataframe. def read_in_data(mydataframe): print(mydataframe) for row in mydataframe.iterupl...
Jason
0

votes
0

answer
8

views

Reading a continuous stream of json objects with boost / socket iostreams

I have a client (that I can modify) that currently sends data in the form of a continuous stream of JSON objects with no non-whitespace delimiters between objects, e.g.: { "value": 123 } { "value": 456 } { "value": 789 } I'm trying to learn how to use boost's property trees and socket iostreams to w...
Jason C
0

votes
0

answer
3

views

Azure Function Binding Expression to access a dictionary value

I am trying to create the bindings in a function.json file that will enable the input of a Cosmos DB document depending on the Service Bus message that triggers the Function. I want to use a value in the UserProperties dictionary of the Service Bus message. The documentation tells me that this is av...
Jason Steele
0

votes
0

answer
4

views

Pycharm debugging -> save watches variable names

Is there a way to save the variable names in watches? every time I debug, the list goes empty and I have to put in the same variables.
jason
0

votes
2

answer
21

views

setInterval won't call function

I'm trying to create a sort of ecosystem where objects spawn over time. However, when I try using setInterval to increase the amount it doesn't work. It works when I call the function on its own, but not when I use setInterval. var plantSpawn = 5; function createPlants() { setInterval(reproducePlant...
Jason Ryan
0

votes
0

answer
7

views

Is it possible to block a PowerShell module from running on anything less than Windows 8?

I've written many modules but have come across a case where I want to block my module from running on operating systems lower than Win8. I realize I can write a function to check Get-CimInstance -ClassName Win32_OperatingSystem, however I'm curious if the module manifest has any 'tricks' to block ce...
Jason Shave
0

votes
0

answer
11

views

Variable Not Defined After Conditions

This is supposed to be a passcode generator program in Python 3. import string from random import * print("Type Yes or No For The Following Questions:") letters = raw_input("Do you want letters in your passcode?" ) if raw_input == 'Yes': chars1 = string.ascii_letters elif raw_input == 'No': chars1...
Jason Walia
1

votes
2

answer
55

views

Tidyverse mutation difficulties with factors

library(tidyverse) library(lubridate) library(stringr) df YrMo #> #> 1 2014-01 #> 2 2014-02 I'm trying to create a second column YrMo2 utilizing some tidyverse functions. The two expected outputs are 2014-Jan and 2014-Feb but I instead get NA. df %>% mutate( YrMo2 = factor(YrMo, levels...
Jason Hunter
1

votes
4

answer
3.4k

views

svn: differences between tags and a revision number reference

This is a similar but not identical question to What do you use the svn tags directory for anyways?; there are some subtleties here that I want to understand. Besides the following features: referencing a particular state of a file tree with a name rather than a number modifying name-number associat...
Jason S
1

votes
3

answer
2.7k

views

Forcing Focus for Desktop Applications built in .NET

I have a production application that I always want to force focus on. Sometimes the users will accidentally click off the form and the blue focused window will turn gray. I have a timer that fires every 30 seconds and I want to programatically give focus back to the form so that it goes from gray ba...
Jason Shoulders
0

votes
0

answer
6

views

Mount single file from volume using docker-compose

For local dev I need to mount a different config file in a Docker container. This is easy with the command line -v $(pwd)/bla.yaml:/location/bla.yaml. Is it possible to do this from a volume an a docker-compose file?
Jason Leach
1

votes
2

answer
6.8k

views

Cocos2d-x - Understanding positioning sprites on screen

Can anyone provide some basic pointers on placing CCSprites on screen? Example: CCSize s = CCDirector::sharedDirector()->getWinSize(); With s, say I wanted to position a sprite on the very bottom of the screen starting at 0, think something like grass. if I am running at 1024 x 768, middle is: set...
Jason
1

votes
4

answer
52

views

How to broadcast a 1d array to an N-D array in Python

I'm missing something here. I have a 1-D array that I want to broadcast to an N-D array, and it's not working: >>> import numpy as np >>> np.broadcast_to(np.arange(12),(12,2,2)) Traceback (most recent call last): File "", line 1, in File "c:\app\python\anaconda\2\lib\site-packages\numpy\lib\stride_...
Jason S
1

votes
3

answer
1.4k

views

how to change navbar color when nav-toggle is clicked

I need help changing my bootstrap navbar color when navbar-toggle is clicked. it just wont work. $( ".navbar-toggle" ).click(function() { $( ".navbar" ).css( "background","yellow" ); })
Jason Smith
1

votes
1

answer
242

views

Install extensions after building VSCode from source

I have built vscode from source because I want to work on adding a new feature to it. Unfortunately, I can't seem to be able to install extensions. I built a .deb package using the gulp task, and installed it It's missing the 'Install Extension' menu and a few others. The version I am running as of...
Jason Pleau
1

votes
1

answer
662

views

Handling DisambiguationError?

I'm using the wikipedia library and I want to handle the DisambiguationError as an exception. My first try was try: wikipedia.page('equipment') # could be any ambiguous term except DisambiguationError: pass During execution line 3 isn't reached. A more general question is: how can I find the error...
Jason
1

votes
2

answer
806

views

regex or replace() with wildcard?

I have a string: a (45:45) b (65:40) ccc (blah$#) I want to remove everything that are inside the (), including the () to look like this: a b ccc I was going to try to wrestle with re but thought maybe it could be done with a wildcard and replace(). I want to avoid re if possible.
jason
1

votes
2

answer
841

views

InsertOrUpdate vs. InsertOrMerge in Azure Storage Tables, what is the difference?

After looking at the Microsoft documentation for both of these methods, I don't see any difference between two, or maybe I've missed something. I've experimented a little with InsertOrMerge, but all it does it replace the old data with the new data.
Jason Roner
1

votes
0

answer
18

views

Start audio while app is in the background after extended periods of time (Android 7+)

We are working on a (ionic) Cordova based app that has to play an alarm sound when it receives certain data from a Bluetooth peripheral. Functionality wise it is similar to "Tile" All of this works fine while the app is in the foreground. It will also work in the background but only for a short per...
Jason Schot
1

votes
1

answer
359

views

Custom title bar color on Windows 10 desktop app

I have a hybrid WinForms/WPF desktop application running on Windows 10 that still targets .NET 3.5. It has a day mode, dusk mode, and night mode. In night mode everything basically goes red on black, but the title bars still default to white. In Settings > Personalization > Colors > Show accent colo...
Jason
1

votes
2

answer
48

views

How to format data passed to stored procedure to be used with IN clause?

For example, let's say I have the following stored procedure: CREATE PROCEDURE [dbo].[get_Members] @IsActive INT, @Gender VARCHAR(MAX) AS SELECT first_name, last_name, gender FROM members WHERE is_active IN (@IsActive) AND gender IN (@Gender) GO And I have the following c# code to call this stored...
Jason Ayer
1

votes
2

answer
71

views

How does `blogdown::serve_site()` setup its local server (Apache/Python/something else)?

If I use the R Studio Addins > Serve Site, or alternatively blogdown::serve_site(), am I setting up an Apache/Python/etc. server on my local machine? Or is something else happening? How does R Studio and/or blogdown setup this local web server? I'm trying to recreate this setup without having to us...
Jason Hunter
1

votes
2

answer
38

views

Excel VBA to automatically capitalise causing error when pasting

The code below is causing an error when I paste information onto the sheet. Private Sub Worksheet_Change(ByVal Target As Range) Dim A1 As Range Set A1 = Range("A:I") If Not Intersect(Target, A1) Is Nothing Then Application.EnableEvents = False Target.Value = UCase(Target.Value) Application.EnableEve...
Jason F
1

votes
1

answer
37

views

Concatenating a Input Variable into another with strings

Trying to figure out if possible to using os.listdir on a remote PC. I want to have user input for a computer name and then take that and use os.listdir to list a certain directory on that PC. import os def listdirtory(): computername = input("What is the computer name? ") completepath = "\\" + comp...
Jason Lucas
1

votes
2

answer
69

views

Angular 6 : Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays

I have a component loading a local json file (contains only name) from assets folder.Since HttpClient takes care of formatting data as json, so didn't use map here. import { Component } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import...
Jason
1

votes
1

answer
40

views

How do I highlight certain points with custom ggplot package ggQC?

library(tidyverse) library(ggQC) set.seed(5555) Golden_Egg_df
Jason Hunter
1

votes
1

answer
43

views

Increase distance between axis line and plot lines on ggplot

How do I increase the distance between the axis.line.y below and the blue geom_hline below? I want a gap between the two, I don't want them kissing as shown on the plot. library(tidyverse) ggplot(mpg, aes(cty, hwy)) + geom_point() + geom_hline(yintercept = 25, color = "blue") + theme_minimal() +...
Jason Hunter
0

votes
0

answer
4

views

Why ec2:Get* not in AmazonEC2ReadOnlyAccess

I found that the aws managed policy - ReadOnlyAccess has "ec2:Get*" permission, but AmazonEC2ReadOnlyAccess not has. Why? AmazonEC2ReadOnlyAccess ReadOnlyAccess
Jason Gao
1

votes
0

answer
12

views

Joining on datetime64[ns, UTC] fails using pandas.join

I'm trying to join two pandas.DataFrames on a datetime64[ns, UTC] field and it's failing with a ValueError (described below) that is not intuitive to me. Consider the example: >>> import pandas as pd >>> import numpy as np >>> >>> s_1 = pd.Series(np.random.randn(2,), index=['1981-12-10', '1984-09-1...
Jason Strimpel
1

votes
1

answer
19

views

My program crashes when I try to delete a pointer

Whenever I try to delete a pointer I get the "windows error noise" and then my program just freezes but never officially crashes. void addIngredient(char ** & ingredients, int & numOfIng) { char * str = nullptr; char **tempArr = new char*[numOfIng]; numOfIng++; //init tempArr to nullptr for (int i =...
Jason Adam
1

votes
2

answer
493

views

not printing my code in if /else statement

So im creating jeapordy in java, and i dont care that i spelt it wrong(if i did) but i only have one question coded so far with only one answer, and it asks the question but only prints out you are wrong even if the answer is right. it is asking the first history question and the answer is george, b...
jason

View additional