Polymer core-animation stopped working - animation

Hi i have recently updated polymer to 0.5.1 and my core-animation stopped working.
Here is my core-animation element:
<core-animation duration="400" fill="forwards" id="show">
<core-animation-keyframe>
<core-animation-prop name="opacity" value="0.7"></core-animation-prop>
</core-animation-keyframe>
</core-animation>
and js code:
var show = this.$.show;
show.target = this.$.img;
show.play()
The problem is that this doesn't work at all. In chrome console i get error Uncaught #<Object> which is caused by line 63 in effect.js:
61 if (group[0].offset != 0 || group[group.length - 1].offset != 1) {
62 throw {
63 type: DOMException.NOT_SUPPORTED_ERR,
64 name: 'NotSupportedError',
65 message: 'Partial keyframes are not supported'
66 };
67 }

It looks like with 5.1, you need at least two keyframes, one for starting value and one for ending value.

Related

Substrate Build a dApp Tutorial - TypeError: Cannot read property 'query' of undefined

I was able to to run a local substrate node on my machine, finishing the first few tutorials - but am running into a problem with the "build-a-dapp" tutorial (https://substrate.dev/docs/en/tutorials/build-a-dapp/).
Its possible to successfully run the adjusted node. Building the custom front end is something of a two step process in the tutorial.
First running the "old" front end used in the very first build-your-own-node tutorial. Which is then started with yarn start - works fine. Afterwards the App.js file is adjusted, after saving it should switch to the new setup with the PoE UI elements. However, it drops the following error message for me:
TypeError: Cannot read property 'query' of undefined
142 | export default function TemplateModule (props) {
143 | const { api } = useSubstrate();
> 144 | return (api.query.templateModule && api.query.templateModule.proofs
145 | ? <Main {...props} /> : null);
146 | }
Compiled version:
212 | const {
213 | api
214 | } = Object(_substrate_lib__WEBPACK_IMPORTED_MODULE_2__["useSubstrate"])();
> 215 | return api.query.templateModule && api.query.templateModule.proofs ? /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_5__["jsxDEV"])(Main, { ...props
| ^ 216 | }, void 0, false, {
217 | fileName: _jsxFileName,
218 | lineNumber: 145,
I run it on iOS, all the other tutorials worked just fine, I already deleted everything and worked myself again through the tutorial to make sure I did not miss anything - is there any issue with the call of templateModule? Would appreciate any kind of help in this issue.
Cheers,
Martin

Why won't Scilab open an image file?

I am trying to work with image files under Scilab, and I get stuck at the very beginning, unable to load an image file.
I have searched the help system as well as the Web, tried two versions of Scilab (because some of the answers I found say that 6.0 is incompatible with some image functions) and still drew a blank. Whatever I try, the imread function is simply not there.
Here is what I get:
Under Scilab 6.0.2:
--> clear
--> atomsSystemUpdate()
Scanning repository http://atoms.scilab.org/6.0 ... Done
--> atomsInstall("SIVP")
atomsInstallList: The package "SIVP" is not registered.
Please check on the ATOMS repository that it is available for Scilab 6.0 on Windows.
If it is, run atomsSystemUpdate() before trying atomsInstall(..) again.
at line 52 of function atomsError ( C:\Program Files\scilab-6.0.2\modules\atoms\macros\atoms_internals\atomsError.sci line 66 )
at line 78 of function atomsInstallList ( C:\Program Files\scilab-6.0.2\modules\atoms\macros\atoms_internals\atomsInstallList.sci line 117 )
at line 233 of function atomsInstall ( C:\Program Files\scilab-6.0.2\modules\atoms\macros\atomsInstall.sci line 249 )
--> atomsInstall("IPCV")
ans =
[]
--> disp( atomsGetInstalled() );
!IPCV 4.1.2 user SCIHOME\atoms\x64\IPCV\4.1.2 I !
--> im=imread("Kratka220.tif")
Undefined variable: imread
Under Scilab 5.5.2:
-->clear
-->atomsSystemUpdate()
Scanning repository http://atoms.scilab.org/5.5 ... Done
-->atomsInstall("SIVP")
ans =
[]
-->atomsInstall("IPCV")
atomsInstallList: Pakiet IPCV nie jest dostępny.
<this is Polish for "Package IPCV is not available"; I installed 5.5.2 in Polish>
!--error 10000
at line 51 of function atomsError called by :
at line 76 of function atomsInstallList called by :
at line 233 of function atomsInstall called by :
atomsInstall("IPCV")
-->disp( atomsGetInstalled() );
column 1 to 4
!SIVP 0.5.3.2 user SCIHOME\atoms\x64\SIVP\0.5.3.2 !
column 5
!I !
-->im=imread("Kratka220.tif")
!--error 4
Niezdefiniowana zmienna: imread
<this is Polish for "undefined variable">
What am I doing wrong?
After atomsInstall you have to restart Scilab to load the toolbox.

Error loading an H2O model and then predict

I am able to save an H2O model, load it again and then show it...
# save the model
model_path_2 = h2o.save_model(model=my_xgboost_2, path="tmp/mymodel", force=True)
print (model_path_2)
>>>/home/dell/Documents/Enigma/tmp/mymodel/XGBoost_model_python_1503367354328_27
# load the model
saved_model_2 = h2o.load_model(model_path_2)
but I cannot use it to predict.
saved_model_2.predict(test)
>>>xgboost prediction progress: | (failed)
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-100-fa76fd498ee6> in <module>()
----> 1 saved_model_2.predict(test)
/home/dell/anaconda3/lib/python3.6/site-packages/h2o/model/model_base.py in predict(self, test_data)
130 j = H2OJob(h2o.api("POST /4/Predictions/models/%s/frames/%s" % (self.model_id, test_data.frame_id)),
131 self._model_json["algo"] + " prediction")
--> 132 j.poll()
133 return h2o.get_frame(j.dest_key)
134
/home/dell/anaconda3/lib/python3.6/site-packages/h2o/job.py in poll(self, verbose_model_scoring_history)
75 if (isinstance(self.job, dict)) and ("stacktrace" in list(self.job)):
76 raise EnvironmentError("Job with key {} failed with an exception: {}\nstacktrace: "
---> 77 "\n{}".format(self.job_key, self.exception, self.job["stacktrace"]))
78 else:
79 raise EnvironmentError("Job with key %s failed with an exception: %s" % (self.job_key, self.exception))
OSError: Job with key $03017f00000132d4ffffffff$_927b7278904ecf169173d48a23de4c10 failed with an exception: java.lang.NullPointerException
stacktrace:
java.lang.NullPointerException
I can, however, predict on the model without saving it. I am using Python 3.6.1, and H2O 3.14.0.1 on Ubuntu 16.04.
This is a known issue with H2O's XGBoost implementation and should be fixed soon. It does not affect other H2O models.

How to get the name of a Mono function from a stack using Windbg

I am trying to debug a mono application using WinDbg. The application hangs in an infinite loop inside the C# code that WinDbg is not able to decode internally.
I know I can use the function mono_pmip() to translate a stack address to the name of the function
I'm using .call mono!mono_pmip(0x63a0630) (verified as available using x *!*pmip*), but I still can't get the output of the function, I get an access violation instead.
This is the stack:
34 018feee8 071824eb 0x71824eb
35 018fef08 07181f4c 0x71824eb
36 018fef28 0717fd8a 0x7181f4c
37 018fef68 071708ae 0x717fd8a
38 018fefc8 07170328 0x71708ae
39 018ff078 0716efa5 0x7170328
3a 018ff0e8 0716ed4c 0x716efa5
3b 018ff108 18de8f88 0x716ed4c
3c 018ff1b8 18de75ff 0x18de8f88
3d 018ff208 18de6f6f 0x18de75ff
3e 018ff238 18de660c 0x18de6f6f
3f 018ff2f8 18de60ce 0x18de660c
40 018ff328 18de6033 0x18de60ce
41 018ff348 18ddf586 0x18de6033
42 018ff3e8 18ddebc6 0x18ddf586
43 018ff408 18dde13e 0x18ddebc6
44 018ff418 063a0630 0x18dde13e
45 018ff450 100f1328 0x63a0630
46 018ff480 1005d984 mono!mono_jit_runtime_invoke+0x214 [c:\buildslave\mono\build\mono\mini\mini.c # 4936]
47 018ff4a4 0035e9ce mono!mono_runtime_invoke+0x51 [c:\buildslave\mono\build\mono\metadata\object.c # 2623]
the same function actually works if I use the immediate windows in Visual Studio
(char*)mono.dll!mono_pmip((void*)0x63a0630)
0x15ebf258 " Login.Login:OnClickLoginButton () + 0x4b (21FF75F8 21FF765C) [06E26E70 - Unity Root Domain]"
still I need to make it run in Windbg :(
I wonder if I have to execute the call on the same thread of the call stack I want to debug.
I realised I never answered this question. (char*)mono.dll!mono_pmip((void*)address) is available only on the mainthread, so I had to select the main thread first from the thread list.

Parse "key cannot be nil" error on [PFObject saveInBackground] (Cocoa)

I'm trying out the Parse SDK in an existing Mac OS X application. I followed the setup steps in the Parse Quickstart guide, including adding an import for the Parse library to my AppDelegate .m file and calling:
[Parse setApplicationId:kParseApplicationID clientKey:kParseClientKey];
in the applicationDidFinishLaunching method. The two constants I use are defined in a Constants file which is also imported.
Towards the end the guide says: "Then copy and paste this code into your app, for example in the viewDidLoad method (or inside another method that gets called when you run your app)"
So I imported the Parse header file into my main view controller .m file and copied and pasted their code into its viewDidLoad method:
PFObject *testObject = [PFObject objectWithClassName:#"TestObject"];
testObject[#"foo"] = #"bar";
[testObject saveInBackground];
When this runs, I hit an exception whose message is "setObjectForKey: key cannot be nil" on that last line. Not on the previous line where I'm actually setting the object for the key. Furthermore, if I stop on the previous line and PO testObject, testObject.allKeys, or testObject[#"foo"], they all show non-nil values for the key "foo". And still furthermore, if I move this code to the end of the AppDelegate's applicationDidFinishLaunching method, the code executes without any errors, and the TestObject shows up in my Parse application dashboard.
Can somebody tell me what I'm doing wrong? I'd really like to explore further, but this is a real blocker for me.
Here's the console log from a slightly more involved OS X app, also occurring on [ParseObject saveInBackgroundWithBlock:]:
2015-06-03 16:55:56.046 TestApp [15795:15954566] An uncaught exception was raised
2015-06-03 16:55:56.046 TestApp [15795:15954566] *** setObjectForKey: key cannot be nil
2015-06-03 16:55:56.046 TestApp [15795:15954566] (
0 CoreFoundation 0x00007fff8fb0103c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff978e476e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8f9e7c66 -[__NSDictionaryM setObject:forKey:] + 1174
3 ParseOSX 0x000000010011adbb __74-[PFMultiProcessFileLockController beginLockedContentAccessForFileAtPath:]_block_invoke + 129
4 libdispatch.dylib 0x000000010026cd43 _dispatch_client_callout + 8
5 libdispatch.dylib 0x000000010026e0b1 _dispatch_barrier_sync_f_invoke + 348
6 ParseOSX 0x000000010011ad15 -[PFMultiProcessFileLockController beginLockedContentAccessForFileAtPath:] + 127
7 ParseOSX 0x00000001000f61ea +[PFObject(Private) _objectFromDataFile:error:] + 207
8 ParseOSX 0x000000010010f231 +[PFUser(Private) _getCurrentUserWithOptions:] + 611
9 ParseOSX 0x00000001000fc4bd -[PFObject(Private) saveAsync:] + 118
10 ParseOSX 0x00000001000e1d25 -[PFTaskQueue enqueue:] + 188
11 ParseOSX 0x00000001000ff06b -[PFObject saveInBackground] + 121
12 ParseOSX 0x00000001000ff270 -[PFObject saveInBackgroundWithBlock:] + 49
13 TestApp 0x0000000100001827 +[SBTParseTranslation saveDBObjectToParse:] + 183
14 TestApp 0x0000000100031fb4 -[SWBMainWindowViewController showRecordForItem:] + 3124
15 TestApp 0x0000000100031268 -[SWBMainWindowViewController showRecordForID:] + 184
16 TestApp 0x0000000100031080 -[SWBMainWindowViewController finishLoad] + 448
17 TestApp 0x0000000100030eb1 -[SWBMainWindowViewController loadData] + 97
18 TestApp 0x0000000100030dd5 -[SWBMainWindowViewController viewDidLoad] + 725
This was caused by a case of confusion on my part. I work mostly on iOS projects, where applicationDidFinishLaunching can typically be counted on to have run before viewControllers load. Apparently that isn't the case in OS X apps.
In short, I was calling the ParseObject save methods before [Parse setApplicationID: clientKey] had been called.
In my case ios7 was crashing with saveInBackground since podfile contained:
platform :ios, '8.0'
and deployment target was 7.0. I replaced with
platform :ios, '7.0'
then clean and build again

Resources