jim jim

1

votes
0

answer
61

views

My $HOME/.magic magic number is not found

I'm working on a software system on a Linux PC where a number of files will be 'typed' using magic numbers as described in the man pages: file(1) and magic(5). The system will have its own magic numbers, presumably stored in /usr/share/misc/magic, but that is not the issue at this point. At this tim...
Jim
1

votes
0

answer
26

views

Django model field _('name')?

I'm reading the django.contrib.auth.models.py file and I see this being done all over the place: name = models.CharField(_('name'), max_length=255) I believe 'name' is the option designating the name of the database column to use for this field. But what does surrounding it with _('...') mean? And...
Jim
1

votes
1

answer
36

views

React/Redux pattern for demoable apps

I've been searching around for a while on this, but as of yet haven't found anyone else trying it. So I'm asking for feedback and critique - both on if this seems reasonable, and if there's a better established pattern for it. Basically, I want to be able to easily publish a 'demo' version of a reac...
Jim Thomason
1

votes
1

answer
224

views

Should the data in batch be balanced?

I'm training a deep learning model to predict three emotion(joy, sadness, anger) by feeding content of tweet. I encounter a problem is that my model can learning well on sadness, joy but very bad on joy. I think the reason why is that my train dataset is unbalanced. Data size in joy: 196952, sadnes...
Jim
1

votes
0

answer
4.2k

views

TCP Provider: An existing connection was forcibly closed by the remote host

I'm having problems with SQL clients randomly disconnecting from the server with a TCP connection forcibly closed error message. Setup is as follows: SQL 2014 Express running on Windows Server 2008. Clients are Wi-Fi connected Microsoft Surface 3-Standard or 4-PRO's, running Windows 10 release 1703....
Jim
1

votes
3

answer
372

views

TKinter python 3.x resizing an image

I would like to resize an image using TKinter. Please note that I will not be using PIL for this. How can I currently have this image, which works fine. logo = PhotoImage(file='logo_dribbble-01_1x.PNG') label = Label(f1,image=logo, borderwidth=0, highlightthickness=0) label.pack() I would like to r...
jim bob
1

votes
2

answer
46

views

Handling arbitrary text blocks in an Xtext grammar

In an effort to better understand Xtext, I'm working on writing a grammar and have hit a roadblock. I've boiled it down to the following scenario. I have some input such as this: thing {abc} {def} There may be keywords (e.g.'thing') followed by other language elements (e.g. ID) in braces. Or, the...
Jim S.
1

votes
2

answer
231

views

Ideas to encrypt/obfuscate results in a Presto query?

Scenario: I have a Presto table that I will be querying and sending results to various semi-trusted parties. These semi-trusted parties will analyze the data and return results back to me. Some of the data in this table is 'semi-private'— nothing that could cause real harm if it were discovered, b...
Jim Heising
1

votes
1

answer
25

views

active record sorting by two columns at same time (not one, then the other)

So I'm stumped on this one. I know this is dumb example, but it gets the point across. Lets say I have a model called cars and there are three columns, personal, business, and color. The first two columns hold license plate numbers, and the last one obviously the color Now I want to display this mod...
Jim Kilborn
1

votes
1

answer
37

views

Trying to have pass variables on select change action

I am trying to to an on the fly database update of a select field but there can be more than one instance on the page of this field. I had this working for a single on change select field change, but with more than one I am simply passing the values for the first one. I have in the past dealt with...
Jim Starkweather
1

votes
2

answer
36

views

remove lines from a list that contain a duplicate zeroth element

I am trying to figure out how to identify duplicate elements in a list of lines that has been split into four elements per line. I then need to keep the line with the original element and remove all lines containing the duplicate element. For example: 123, jon, doe, $50 123, bob, smith, $25 456, jan...
Jim Gallagher
1

votes
1

answer
47

views

Determining dependencies on a javascript file in an MVC 5 application?

Other than searching for keywords across the project files, is there a more deterministic way to find dependencies of a particular javascript library in an MVC project? I should add that I'm supporting an already existing application that's been handed down over the years and gone through several te...
Jim
1

votes
2

answer
33

views

Button states wont change

I am trying to change the state of buttons with jquery and bootstrap. They both just stay on the btn default after I click one. $('#content-background-disabled-btn').click((e) => { $(this).removeClass('btn-default'); $(this).addClass('btn-success'); $('#content-background-enabled-btn').removeCl...
Jim Andy
1

votes
0

answer
120

views

Windows Authentication in a WCF service hosted in Azure

I have a WCF service hosted in an Azure Web App. I turned on Azure Active Directory. My binding is set up as so: This should cause it to prompt for a user name and password. Instead I get : The authentication schemes configured on the host ('Anonymous') do not allow those configured on the bindin...
Jim Wilcox
1

votes
0

answer
109

views

How to represent foreign key lookup table in Django unit test?

I'm building three Django models that will allow users to create lists of items that represent activities (e.g. movies, concerts, and sporting events) they want to attend. Since each user can include one or more items (i.e. activities) in a list and multiple users may have the same item (activity) i...
Jim
1

votes
0

answer
41

views

abstract method used without implementation

I was learning the Room Database for Android app development through a tutorial and came across an abstract method being used without its implementation. Following are the files: AppDatabase.java @Database(entities = {Contact.class}, version = 1) public abstract class AppDatabase extends RoomDatabas...
Jim
1

votes
1

answer
197

views

google maps grey box on *ngIf [duplicate]

This question already has an answer here: Google Maps is grey 7 answers I have a component. @Component({ selector: 'panda-map', template: ` ` }) export class PandaMapComponent implements OnInit { @Input() height: string = '400'; @Input() scroll: boolean = false; map: google.maps.Map; constructor( p...
Jim
1

votes
0

answer
555

views

Spring Boot 2.0 web flux custom authentication — how to?

There are plenty of examples of minimal configurations of Spring Boot 2.0 security which compile or don't depending on which milestone or release candidate you try. What is a minimal configuration that is not HTTP Basic, that will (1) let me access the HTTP request (headers, cookies, etc.) and also...
Jim Flood
1

votes
1

answer
230

views

MongoDB query in nested key value and compare inside value list

My database looks like { '_id' : ObjectId('5a8351093cf24e144d8fef24'), '__type' : 'TrafficIncident:http://schemas.microsoft.com/search/local/ws/rest/v1', 'point' : { 'type' : 'Point', 'coordinates' : [ 37.410883, -95.71027 ] }, ... } { '_id' : ObjectId('5a8351093cf24e144d8fef25'), '__type' : 'Traffi...
Jim Xu
1

votes
1

answer
561

views

basic angular 5 karma test fails

Given the following test sanity.spec.ts: describe('karma sanity check', () => { it('1+1=2', () => expect(1 + 1).toBe(2)); }); Karma produces this: 27 02 2018 09:17:53.641:INFO [bundler.karma-typescript]: Bundled imports for 3 file(s) in 2162 ms. 27 02 2018 09:17:53.645:WARN [karma]: No captured brow...
Jim
1

votes
0

answer
87

views

Is Shiro Native Session Management Compatible With JSF SessionScoped CDI Beans

Am having a problem with Shiro native session management and JSF CDI SessionScoped beans. Am using Shiro 1.4.0 and Payara 4.1.1.171 (build 137). This is kind of a complicated interaction, so I have created a very simple scenario to demonstrate the problem (see code below). Here is what is happening:...
Jim McClure
1

votes
0

answer
417

views

Firebase Angular Cannot read property 'uid' of null on signOut()

Each time a user logs in, the they get the console error Error: Uncaught (in promise): TypeError: Cannot read property 'uid' of null TypeError: Cannot read property 'uid' of null Each time a user logs out, they get the error TypeError: Cannot read property 'uid' of null. Has anyone seen this before...
Jim Bistis
1

votes
0

answer
31

views

c# .aspx page Record Navigation

I have a simple .aspx page with navigation buttons but though First & Last buttons work OK, Next & Previous only move between records 1 & 2 for some reason I cannot work out. I am still a bit of a newcomer to C# and ASP.NET, but this seems so basic it's embarrassing! I am using SQL Server 2012 and V...
Jim Farnworth
1

votes
0

answer
165

views

Docker build in dind not producing the same result as local docker build

I have been trying to set up a gitlab ci using shared runners. My .gitlab-ci.yml looks like this: image: docker:latest # When using dind, it's wise to use the overlayfs driver for # improved performance. variables: DOCKER_DRIVER: overlay2 GCP_PROJECT_ID: example-12345 IMAGE_NAME: test services: - do...
Jim Theorell
1

votes
0

answer
255

views

Xamarin Android and Microsoft.Extensions.Logging

I have created a 'Blank App (Android)' project from the template in visual studio 2017 community. If I add the Microsoft.Extensions.Logging version 1.1.2 nuget package and start/debug the project on my Android 7.0 device, everything works. If I do the exact same thing but add version 2.0.0 (latest...
Jim
1

votes
1

answer
241

views

rsync --exclude issue when using bash variable [duplicate]

This question already has an answer here: Why do bash parameter expansions cause an rsync command to operate differently? 2 answers I need to copy a source directory to under a destination directory with rsync in bash, with excluding files having specific extensions (.qcow2). It works properly when...
Jim Raynor
1

votes
0

answer
79

views

Perl - How to validate Chinese character input from web form?

My web page uses Charset UTF-8 to allow Chinese character input in a textarea form field. I want to test if the input contains a certain character. I've writtena test script to see how Perl is going to handle the Chinese input. It's not finding the match when there is a known match. Here is my...
Jim_1234
1

votes
0

answer
127

views

In airflow, have others noticed a longer delay between tasks in a subdag vs tasks in the main dag

I'm running airflow 1.9.0. I put together a dag with all tasks simply having a 1 second sleep. I have 20 of the tasks running in the main dag, 20 more running in a subdag and then 20 running in a sub-subdag. There is a 2-3 second delay between the end of a task in the main dag and the beginning of...
Jim Skufca
1

votes
0

answer
88

views

Why does this SwiftCharts line chart jump when starting to pan to the right

I'm creating a chart using SwiftCharts based on the Trendline example provided with the library. In my application, I'm charting weight lifting events showing the single highest lift weight on each distinct day. In my example, I'm charting 4 Bench Press events. The chart renders when the view contr...
Jim
1

votes
1

answer
292

views

Laravel 5.5 autocomplete method returns a 500 error in one place not another

I have a simple form to get an autocomplete of an author's name from a table of several thousand. In my simple form I have: authors: The javascript is: $(function() { $( '#authors' ).autocomplete({ source: 'autocompleteAuthors', minLength: 3, select: function(event, ui) { $('#q').val(ui.item.value)...
Jim
1

votes
0

answer
23

views

V93k testmethodlimits section in .tf file is incorrect for SpecSearch

After loading my test program I'm getting a 93k SmarTest inconsistency error for a SpecSearch Test Method. Origen inserts a parameter labeled Functional in the testmethodlimits section of a .tf file when it should be SpecSearch_Test. I add the correct parameter to my .tf file the inconsistency is...
Jim
1

votes
1

answer
139

views

Change url on window scroll

I want to get an url change while I'm scroll the window, instead changing the menu class I got reference from here https://codepen.io/anon/pen/LdLgNo and i modify a bit just add some push state, but the problem is i have a fixed header so i want to change it when it hit this height which is 75px in...
Jim John
1

votes
0

answer
23

views

FAT16 - Timestamp for last modification of entire FAT table, or way to determine whether cluster chain has changed less than O(n)?

Is there a timestamp somewhere for the last time the FAT table has been changed? I need a way to flatten cluster chains (for constructing NewtonOS VBOs, which uses a single object that then has pointers to other objects/sectors). Or a particular cluster chain, other than traversing the whole thing...
Jim Witte
1

votes
0

answer
50

views

Template deduction fails when using conversion operator but explicit casting works

I'm trying to implement swizzle vectors in C++ with template programming. With swizzle vectors I mean vectors similar to hlsl and glsl vectors where for example if you have a vector v = (1,2,3,4) and do v.xxyz it produces the vector (1,1,2,3). This involves a data structure that is similar to the e...
Jim Nilsson
1

votes
1

answer
301

views

Why doesn't my line chart display its data?

I'm trying out @danielgindi's Charts framework to create a Line Chart but my data won't display on the chart: I started with the CombinedChartViewController demo because I wanted some of the features that it has. My plan was to remove the chart data types I didn't need and leave the LineChartData. B...
Jim
1

votes
2

answer
125

views

Django REST framework 2 example not working

I'm working the very first example of the Django REST framework (version 2). I've followed the Installation and Example instructions to the letter but when I open the API in my browser at http://127.0.0.1:8000/ per their instructions, I get the error shown below. What am I doing wrong? This examp...
Jim
1

votes
2

answer
586

views

Resource in layout xml but compiler error with “not found”

I have had some success with trying to get a sound synthesizer app to work. It worked fine on simulator, but always crash on the 8th time on my mobile phone (OS 7.0, simulator OS 6.0, API level 21, or OS 5.0). The error message was convoluted. I only remember the red-highlighted lines with 'AudioFli...
Jim Tan
1

votes
1

answer
140

views

MvvmCross Binding a decimal to a text field on an MvxDialogFragment

I have a MvxDialogFragment that I use to pop up a dialog and ask for a numeric entry with a decimal place. If I simply bind to the Text event, then every time a type a number it formats the number and the next number comes up in the wrong spot. i.e. You want to type in 10.00 You type the 1 1.00 sho...
Jim Wilcox
1

votes
0

answer
74

views

Spring Boot 2 - Seems like proxyTargetClass=true is being ignored (cannot cast proxied entities)

This is a spring-boot-starter-web and hibernate/jpa project. In some of my JPA entities, in my equals() implementations, I need to cast the object being compared to the concrete entity class. However, I'm getting proxied entities that cannot be cast because, I suppose, it is using interfaces instead...
Jim Ott
1

votes
2

answer
3.2k

views

.NET Core - 404 error on server only

I have a very simple .NET Core test application that runs on my development machine but causes a 404 when run on my server under IIS 10. Initially, the goal was to return a few database records in JSON, like a web service. However, to narrow the field of search for the error, I have changed the app...
Jim S

View additional