How do I stop play bar jitteryness in jPlayer? - jplayer

I'm having some issues with my play bar being super jittery on a site's implementation.
Getting this thing functioning and styled the same in a jsfiddle, so I have to apologize for not having one.
The example is here: http://mindevo.com/geewhiz/music-tracks.html
When you start playing the seek bar bounces very jittery and continues to do so the entire time.
How can I prevent this jitteryness?
Here is my initialize function (this page is actually a fall-back for the real AJAX-loaded page which resides on http://mindevo.com/geewhiz/ ) and for now includes only the example tracks for jplayer.
function startPlaylist() {
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
mp3:"http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3"
},
{
title:"Your Face",
mp3:"http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3"
},
{
title:"Cyber Sonnet",
mp3:"http://www.jplayer.org/audio/mp3/TSP-07-Cybersonnet.mp3"
},
{
title:"Tempered Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
},
{
title:"Song 5 Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
},
{
title:"8 Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
}
], {
swfPath: "../../dist/jplayer",
loopOnPrevious: true,
supplied: "mp3",
loop: true,
wmode: "window",
useStateClassSkin: true,
autoBlur: false,
smoothPlayBar: true,
keyEnabled: true,
preload: "auto"
});
}

Actually, setting "smoothPlayBar: false" solves this problem.
I am leaving this here for anyone else experiencing a jittery play-bar.

Related

My vs code will flicker when I save. I turned on black and flake8 and formatonSave. Why does it flicker? How to stop it?

I have the following workspace settings for my Django project in VSCODE.
{
"folders": [
{
"path": "."
}
],
"settings": {
"python.pythonPath": "/Users/kim/.pyenv/versions/3.7.7/bin/python3.7",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.tabSize": 4,
"[javascript]": {
"editor.tabSize": 2
},
"[json]": {
"editor.tabSize": 2
},
"[markdown]": {
"editor.tabSize": 2
},
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintArgs": ["--enable=unused-import", "--enable=W0614"],
"python.formatting.provider": "black",
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"workbench.iconTheme": "vscode-icons",
"editor.formatOnSave": true
}
}
You can see how it flickers as I press Cmd+S to save the file. From this gif
Why does this flickering happen? I can understand if it happens once. But it will flicker back and forth. As if vscode is formatting on save between two different formats and cannot make its mind.
How do I properly solve this issue?
Ok I realized I found the issue and solution.
Basically the issue is that there are two formatters used to sort the imports.
I use the answer in this github comment
https://github.com/microsoft/vscode-python/issues/6933#issuecomment-543059396
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.python": true
}
},
"python.formatting.blackArgs": ["--line-length", "88"],
"python.sortImports.args": [
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=88",
],
Notice I change the organizeImports to organizeImports.python.
Also I added a "python.formatting.blackArgs": ["--line-length", "88"]. This is to be consistent with the line-length.
It was suggested in another issue for the same problem. I tried that alone but didn't work. So I combined that with the sortImports args

MongoDB query that contain at least one of filters specified in an object

I have a collection in MongoDB that is structured like this:
"5d33488672886334cd21904xx": {
"ownerId": "5d333551k99951924fb3208",
"createdAt": 1582456098,
....phone
....email
....etc
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": true,
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"selectionAdvice": true,
"institutionsBusinesses": true
}
}
"5d33488672886334cd21904xx": {
"ownerId": "5d333d344d46ed924fb3208",
"createdAt": 99999995,
....phone
....email
....etc
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": false,
"houseSitting": false,
"dogSitting": false,
"training": true,
"trainingEquipment": false,
"selectionAdvice": true,
"institutionsBusinesses": true
}
}
i am sending filters from the front end like so :
{
"filters": {
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"washing": false,
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"selectionAdvice": false,
"institutionsBusinesses": true
}
}
}
i want to get all the documents that answer the filters and not EXACT match .
Example:
if i am a dog walker service named "Xdog" , who give all the 6/6 activities (secActivities)
in the front end , when user select 2/6 filters i miss this "Xdog" service.
i get to a function who return only the document that specify EXACT match and its not good because
i am missing the services who actually answer this 2/6 filters..
right now i am sending and spreading the "filterBy" variable into the find() function .
Any suggestion would be great i am weak in Databases commands.
Sorry for my poor English!
The way to do partial match is with $or, but I don't think that will do what you actually want.
The example query you showed above is looking for dog walking services that do not provide washing or selectionAdvice services. Your description suggests that you do not want to consider these 2 services because the user did not specify them. In that case, leave these 2 out of the query entirely, using the user selections to add only the relevant fields, like:
.find({
"mainActivities": {
"dogWalking": true
},
"secActivities": {
"houseSitting": true,
"dogSitting": true,
"training": true,
"trainingEquipment": true,
"institutionsBusinesses": true
}
}
If the filters object is already built, you would need to remove the properties that are false. See How do I remove a property from a JavaScript object?

Not able to crawl JSON from script tag using XPATH python

I encounter the JSON data in a script tag. I want the JSON data available in that script tag. Is there any possible way to do it.
I have tried a few tweaks regarding it but couldn't get an idea for the script tag.
html code:
<div id="staticid" class="a-section a-spacing-none a-padding-none">
<script type="a-state" data-a-state="{"key":"turbo-checkout-page-state"}">{"turboWeblab":"RCX_CHECKOUT_TURBO_DESKTOP_NONPRIME_87784","strings":{"TURBO_CHECKOUT_HEADER":"Buy now: 1byone Fake TV Simulator Anti-Burglar and Theft Deterrent with LED Light","TURBO_LOADING_TEXT":"Loading your order summary"},"inputs":{"a":"B017SJR6JS","quantity":"1","requestId":"P2JG384YYYBDM166PD5N","customItemPrice":"","oid":"dwC1O6h7HNFmAorkhv9i8nvDzUpdCtjNPCatSnP1kq1INA1KtQHHN%2F233KfCXVMuFL%2BF5rUWX5RBDz19uhFQqPVIanAuuf10V2zoV61qaytpGMPXObsZ8mHCnUFkWVEEcC7GM102R3Wk%2FB1j5q2%2FcVWrlbfu8S7n","sessionId":"260-4039899-0659318","addressId":"add-new"},"configurations":{"isSignInEnabled":true,"initiateSelector":"#buy-now-button","prefetchEnabled":true},"buttonID":"buy-now","eligibility":{"prime":false,"canOneClick":false,"preOrder":false,"stockOnHand":70,"isEligible":false,"primeShipping":true,"customerDefaults":false,"canBuyNow":true},"turboWeblabTreatment":"T1","timeout":"5000"}</script>
</div>
Python code:
parser.xpath("//div[#id='staticid']/script")
This returns an empty list.
Output expected:
{
"turboWeblab": "RCX_CHECKOUT_TURBO_DESKTOP_NONPRIME_87784",
"strings": {
"TURBO_CHECKOUT_HEADER": "Buy now: 1byone Fake TV Simulator Anti-Burglar and Theft Deterrent with LED Light",
"TURBO_LOADING_TEXT": "Loading your order summary"
},
"inputs": {
"a": "B017SJR6JS",
"quantity": "1",
"requestId": "P2JG384YYYBDM166PD5N",
"customItemPrice": "",
"oid": "dwC1O6h7HNFmAorkhv9i8nvDzUpdCtjNPCatSnP1kq1INA1KtQHHN%2F233KfCXVMuFL%2BF5rUWX5RBDz19uhFQqPVIanAuuf10V2zoV61qaytpGMPXObsZ8mHCnUFkWVEEcC7GM102R3Wk%2FB1j5q2%2FcVWrlbfu8S7n",
"sessionId": "260-4039899-0659318",
"addressId": "add-new"
},
"configurations": {
"isSignInEnabled": true,
"initiateSelector": "#buy-now-button",
"prefetchEnabled": true
},
"buttonID": "buy-now",
"eligibility": {
"prime": false,
"canOneClick": false,
"preOrder": false,
"stockOnHand": 70,
"isEligible": false,
"primeShipping": true,
"customerDefaults": false,
"canBuyNow": true
},
"turboWeblabTreatment": "T1",
"timeout": "5000"
}

flot: How to hide multy-yaxes

in my "overview" simple-line-chart, I do not want to display yaxes.
The following code does not help:
yaxes: { show: false, ticks: [] }
It probably works for yaxis, but not for yaxes.
I guess I need to hide each axis, but how do I do it?
The yaxes property needs an array of objects (one for each axis). So, use
yaxis: { show: false, ... }
for one axis and
yaxes: [ { show: false, ... }, { show: false, ... }, ... ]
for multiple axes.

Sencha Architect View Disappearing after first setActiveItem

Here is the problem. I have a view
Ext.define('Journal.view.CreateGoal', {
extend: 'Ext.form.Panel',
It is part of main
Ext.define('Journal.view.Main', {
extend: 'Ext.Container',
requires: [
'Journal.view.GoalList',
'Journal.view.CreateToDo',
'Journal.view.Choice',
'Journal.view.CreateGoal'
],
config: {
layout: {
type: 'card'
},
items: [
{
xtype: 'GoalList'
},
{
xtype: 'createtodo'
},
{
xtype: 'choice'
},
{
xtype: 'creategoal'
}
]
}
});
I have a button in GoalList that fires
var createGoalForm= Ext.create('Journal.view.CreateGoal');
console.log('create goal view');
Ext.Viewport.setActiveItem(createGoalForm);
The first time I press that button, everything is fine.
If I have used a back button that triggers either of these
Ext.Viewport.setActiveItem(0);
or
Ext.Viewport.setActiveItem(Journal.view.GoalList);
The next time I press the button I do not see the contents of createGoalForm
The console.log still fires, so it's getting into the function.
I tried several methods such as
Ext.Viewport.setActiveItem(Journal.view.CreateGoal);
and a few others. Each version I have tried, the first time I go to the view its fine, every other time its blank.
I have changed the autoDestroy setting to no avail.
So what am I doing wrong?
Thanks

Resources