I am using operator-sdk version v0.11.0. But when I try to create new project using --cluster-scope option it does not recognize that option and fails with unknown option cluster-scope. I am new to operators. Any idea what am I missing.
Unfortunately, --cluster-scope option is removed now, refer here for more details. But don't worry you can adjust cluster scope through this configuration, Operator SDK: Operator Scope
. I hope it help you. Thanks.
Related
How do I use Googlemaps in Yii2 ?
I am not able to follow the Usage placed in http://www.yiiframework.com/extension/yii2-google-maps-library
Installation has been done, but I am getting error
Class 'dosamigos\google\maps\LatLng' not found
Could anyone provide a tutorial/examples where Yii uses Google Maps ?
Normally the use directive for third party extensione start with vendor
could be you must add the vendor to the use where you use these class.
try using
use vendor\dosamigos\google\maps\LatLng;
use vendor\dosamigos\google\maps\services\DirectionsWayPoint;
use vendor\dosamigos\google\maps\services\TravelMode;
use vendor\dosamigos\google\maps\overlays\PolylineOptions;
use vendor\dosamigos\google\maps\services\DirectionsRenderer;
use vendor\dosamigos\google\maps\services\DirectionsService;
use vendor\dosamigos\google\maps\overlays\InfoWindow;
use vendor\dosamigos\google\maps\overlays\Marker;
use vendor\dosamigos\google\maps\Map;
use vendor\dosamigos\google\maps\services\DirectionsRequest;
use vendor\dosamigos\google\maps\overlays\Polygon;
use vendor\dosamigos\google\maps\layers\BicyclingLayer;
I am trying to configure a spring-ldap context source and I find the following example in the documentation:
<ldap:context-source
username="cn=Administrator"
password="secret"
url="ldap://localhost:389"
base="dc=261consulting,dc=com" />
I would like to be able to specify the userid/password and, if possible, the url and port elsewhere (like a JNDI reference from a datasource). I can't find any context source example or spec in the documentation (or in google) that has this sort of configuration. Can I do it and how?
Beyond using a properties file, no.
You can instantiate the class: org.springframework.ldap.core.support.LdapContextSource internally in your application and then set the values: url, base, userDn, password, referral, etc.
In the spring-ldap samples you will find how to use it. Here is an example!
I hope it helps!
I often see Grails sample code where the programmer has called a method called encodeAsHTML(). I figure I should probably use this in my Grails applications (for security reasons, I assume?), but I was wondering when I should use this method. What objects/properties/etc. are candidates for the encodeAsHTML() method?
Thank you!
Use encodeAsHTML() (or encodeAsJavaScript, etc) for everything that you've got from user. For every string that could be modified by user (got from input form, from request parameter, from external API call, etc)
See also:
https://en.wikipedia.org/wiki/Cross-site_scripting
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
I am not sure when this was introduced to Grails, but if in Config.groovy you set grails.views.default.codec="html" then encodeAsHTML() is called whenever you use ${} in GSPs.
Source: http://alwaysthecritic.typepad.com/atc/2010/06/grails-gsp-html-escaping-confusion.html
I need to implement switch from one window to another in IE. However, element driver doesn't support getWindowHandle function.
I assume it might be just configuration problem or settings, though I don't know how to fix it.
Please, any suggestions.
I'm working with c# - Visual Studio
You haven't said which language bindings you're using, but based on a comment you posted, it looks like you're using C#. The method names are slightly different for each language binding. From this answer:
The object, method, and property names in the .NET language bindings
do not exactly correspond to those in the Java bindings. One of the
principles of the project is that each language binding should "feel
natural" to those comfortable coding in that language.
So you have to do a little translation if you're trying to copy-paste Java code. In this case, you want the combination of the WindowHandles property (to look for the new window handle) and the CurrentWindowHandle property of the driver. You can find full API documentation for the .NET bindings at the project's Google code site.
I am going to make wild guess:
Try to initialize your driver like this:
WebDriver driver = new FirefoxDriver(); //assume you use firefox
The interface WebDriver supports that method. Do not forget to store the handle somewhere ;)
String myWindow = driver.getWindowHandle();
BTW that method should return you actual window If you need all windows you probably should use getWindowHandles() method
If this does not work, please provide more info:
what error exactly are you getting?
How do you initialize WebDriver?
What version of selenium are you using?|
What type of driver are you using?
I cant see the System.data.datatableextensions in the reference list and hence not getting intellisence for CopyToDataTable method to return dataset from linq through aweb service.
Namespace: System.Data
Assembly: System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)
http://msdn.microsoft.com/en-us/library/bb396189.aspx
--Jocke
If you go to the documentation of the CopyToDataTable method you will see at the very top the name of the assembly you need to reference. It is System.Data.DataExtensions.dll . If you don't have the documentation installed on your machine, you can find it simply by googling for CopyToDataTable. It is the first answer returned