I have a with getCmp in extjs 3 - extjs3

I wanted to ask about the definition of
Ext.getCmp('').root.reload();
Ext.getCmp('').getForm().reset();
Ext.getCmp('').focus(false, 500);
Ext.getCmp('').getSelectionModel().getSelectedNode();
Ext.getCmp('').getForm().setValues();
Ext.getCmp('').getSelectionModel().getSelectedNode();
and function of Ext.getCmp

you can check:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext-method-getCmp
Also, getCmp is not recommended for the coding. But do helpful for the learning, debug and hack. I like this screencast:
http://www.sencha.com/forum/showthread.php?109307-Screencast-quot-The-dangers

Related

Why can't I see any help in osgi console?

When I type help in the osgi console of my application : nothing happens :(. SS gives me the bundle list, lb also, scr:list, the service list etc. But help : nothing !
Here is my conf (launch.bndrun) :
-runfw: org.eclipse.osgi;version='[3.16.100.v20201030-1916,3.16.200.v20210226-1447]'
-runee: JavaSE-1.8
-runprovidedcapabilities: ${native_capability}
-resolve.effective: auto
-runbundles: \
org.eclipse.paho.client.mqttv3;version='[1.2.5,1.2.6)',\
org.avm.device.api;version=snapshot,\
org.avm.device.afficheur;version=snapshot,\
org.avm.device.common;version=snapshot,\
org.avm.device.driver.afficheur;version=snapshot,\
org.avm.device.driver.girouette;version=snapshot,\
org.avm.device.girouette;version=snapshot,\
org.apache.servicemix.bundles.junit;version='[4.13.0,4.13.1)',\
org.avm.device.driver.gps;version=snapshot,\
org.avm.device.gps;version=snapshot,\
org.avm.device.comptage;version=snapshot,\
org.avm.device.driver.comptage;version=snapshot,\
org.avm.device.audio;version=snapshot,\
org.avm.device.driver.audio;version=snapshot,\
org.avm.device.driver.io;version=snapshot,\
org.avm.device.io;version=snapshot,\
org.avm.device.driver.modem;version=snapshot,\
org.avm.device.modem;version=snapshot,\
org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\
org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\
org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\
org.apache.commons.commons-fileupload;version='[1.4.0,1.4.1)',\
org.apache.commons.commons-io;version='[2.8.0,2.8.1)',\
org.apache.felix.webconsole;version='[4.6.0,4.6.1)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.felix.scr;version='[2.1.24,2.1.25)',\
org.eclipse.equinox.cm;version='[1.5.0,1.5.1)',\
org.eclipse.equinox.console;version='[1.4.300,1.4.301)',\
org.eclipse.osgi.services;version='[3.10.0,3.10.1)',\
org.eclipse.osgi.util;version='[3.6.0,3.6.1)',\
org.eclipse.equinox.device;version='[1.1.100,1.1.101)'
-runrequires: \
bnd.identity;id='org.apache.servicemix.bundles.junit',\
bnd.identity;id='org.eclipse.osgi',\
bnd.identity;id='org.apache.felix.gogo.shell',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
bnd.identity;id='org.apache.felix.gogo.runtime',\
bnd.identity;id='org.eclipse.equinox.console',\
bnd.identity;id='org.eclipse.equinox.cm',\
bnd.identity;id='org.eclipse.paho.client.mqttv3',\
bnd.identity;id='org.apache.felix.scr',\
bnd.identity;id='org.apache.felix.webconsole',\
bnd.identity;id='org.apache.felix.http.jetty',\
bnd.identity;version='latest';id='org.avm.device.api',\
bnd.identity;version='latest';id='org.avm.device.common',\
bnd.identity;version='latest';id='org.avm.device.driver.afficheur',\
bnd.identity;version='latest';id='org.avm.device.driver.girouette',\
bnd.identity;version='latest';id='org.avm.device.driver.gps',\
bnd.identity;version='latest';id='org.avm.device.driver.comptage',\
bnd.identity;version='latest';id='org.avm.device.driver.audio',\
bnd.identity;version='latest';id='org.avm.device.driver.io',\
bnd.identity;version='latest';id='org.avm.device.driver.modem',\
bnd.identity;version='latest';id='org.avm.device.afficheur',\
bnd.identity;version='latest';id='org.avm.device.girouette',\
bnd.identity;version='latest';id='org.avm.device.gps',\
bnd.identity;version='latest';id='org.avm.device.comptage',\
bnd.identity;version='latest';id='org.avm.device.audio',\
bnd.identity;version='latest';id='org.avm.device.io',\
bnd.identity;version='latest';id='org.avm.device.modem',\
bnd.identity;id='org.apache.felix.http.servlet-api',\
bnd.identity;id='org.apache.commons.commons-fileupload',\
bnd.identity;id='org.eclipse.equinox.device'
-runproperties: \
osgi.console,\
logback.configurationFile=${fileuri;${.}/logback.xml}
I try to change -runfw with felix and but then I can't find a suitable bundle implementing org.osgi.service.device ; but help works in this case.
So to summerize either my application doesn't work or I can't have help.
It might be something obvious that I missed, but I don't see it (2 days, I'm on it !!).
Thanks for any advice.
If you have a problem like this, the approach is always to remove, remove, remove. You keep removing bundles until the problems is solved. The last step you did usually puts some light on why the help did not work. And if you end up with only the Gogo bundles, it is easy to diagnose for people like me.
I would start to remove first :
org.eclipse.equinox.console;version='[1.4.300,1.4.301)',\
You now seem to have 2 shells. Should still have help though. So it is not a full explanation.
I've written a replacement for org.apache.felix.gogo.command that includes a help. Maven coordinates:
biz.aQute:biz.aQute.gogo.commands.provider:1.7.0
It also includes many more commands. Source code is on github

How to use authorization in lumen

I followed this docs.
https://lumen.laravel.com/docs/5.5/authorization
Actually I dont know where to define the Gate
in register() or in boot() function
After that also it say: Class 'App\Providers\Gate' not found
And what is the correct one in 3 of these?
Illuminate\Auth\Access\Gate
Illuminate\Support\Facades\Gate
Illuminate\Contracts\Auth\Access\Gate
For the 'Checking Abilities', the docs said :
if (Gate::allows('update-post', $post)) {
But I cannot use that in my route file.
The question here is how to use gate in route?
Please support me. I'm new with this.
Thanks.
you should use this Illuminate\Support\Facades\Gate
**remember** everything that you use trough `::` like Gate::allows or
Route::get or something like that is `Facade` so for import use the uri that
contains `Facade`
Here is good tutorial which explain how to use `Gate`, hope it can be usefull
https://laravel-news.com/authorization-gates
https://code.tutsplus.com/tutorials/gates-and-policies-in-laravel--cms-29780
https://www.grafikart.fr/tutoriels/laravel/gates-policies-867

How does babel option ""auxiliaryCommentBefore" or "auxiliaryCommentAfter" work?

I installed Babel("babel-cli": "^6.26.0") and and made a .babelrc like
{
"auxiliaryCommentBefore": "testBefore",
"auxiliaryCommentAfter": "testAfter"
}
and also made a simple test.js like
var a = 5;
and finally run babel test.js.
It secceded but no comment above is attached..
My expectation is something like below.
testBefore
var a = 5;
testAfter
Is there anything required missing??
The honest answer to your question is "they don't" :D
The specific behavior of those two options are extremely under-defined and I would love to rip them out of Babel entirely, and I would except that I don't want to needlessly break existing users when they upgrade.
If you need to annotate some input code in a particular way, you should write your own Babel plugin to inject whatever you need instead.

How significant is the order with jQuery's trigger-method?

I want to provide a way to use an on-event handler from the outside of a plugin. Problem is, that the trigger will not fired if I provide them in wrong order.
For example, this works:
$(window).on('foo:bar', function(){
alert(true);
});
$(window).trigger('foo:bar');
...this, however does not:
$(window).trigger('foo:bar');
$(window).on('foo:bar', function(){
alert(true);
});
Any ideas how the second approach can work?
Update
Here it works: http://www.benplum.com/projects/rubberband/
You cannot. You want to eat cake before baking it.
UPD: You're misinterpreting the code at http://www.benplum.com/projects/rubberband/
Here is a jsfiddle with proof that it doesn't work like you're thinking: jsfiddle.net/zerkms/z5Mya/
Note about code: I've forked the library and added trivial console.log here: https://github.com/zerkms/Rubberband/blob/master/jquery.bp.rubberband.js#L77

Eclipse plugin like Intellij's InspectionGadget?

is there a plugin for eclipse like the InspectionGadget for Intellij?
On Intellij when you write some code that can be simplify you have a warning message/dialog on the editor and you have information to how to change the code.
Just a very simple example:
private int foobar(){
int test = someCalculation();
return test;
}
i get a warning message that this code can be changed to
return someCalculation();
and other similar helps.
Thanks.
As for as code analysis FindBugs is pretty good.. But that should not work with following example :)
No, I don't think there is.