cannot find symbol import android.app.Person - codenameone

I am building my own notification tray natively in Android. I am trying to use the less-obsolete android.app.Notification resources (instead of the now-deprecated NotificationCompat ones)
In one case I want to build a MessagingStyle with a bitmap icon. To do this, the class android.app.Person is required. (MessagingStyle doesn't support bitmat icons in NotificationCompat)
Looking at the docs I can see that android.app.Person was added in API level 28. CN1's build server throws the error cannot find symbol import android.app.Person. Is this because CN1 targets SDK 27, am I correct? Can I use some build hint to include a higher one that allows me to use android.app.Person?
Thanks

Seems it works when adding build hint android.buildToolsVersion=28

Related

dynamically require/import different component modules in React Native depending on build config

I'm working on a React Native project where we will need to build two different flavours of the app, which mostly the same but vary in a few small features. I wanted to see if there was a way to do this through babel somehow, by having different files named similarly for each build and triggering differetn builds by setting and environment variable. This would be similar to the way that React Native does for having custom js files for iOS and Android like this:
my-component.android.js
my-component.ios.js
so my different build flavours would look like this:
my-component.flavourA.js
my-component.flavourB.js
or even
my-component.flavourA.android.js
my-component.flavourB.android.js
my-component.flavourA.ios.js
my-component.flavourB.ios.js
I am trying to find a way of using babel to change the require() function (and import statements) such that the correct files are resolved from a simple require call of:
require('./my-component');
depending on which FLAVOUR environment variable is set. Or:
import * from './my-component';
I have looked at trying to use a combination of babel-plugin-module-resolver, babel-plugin-replace-require and babel-preprocessor but I'm not able to work out if this even possible without writing my own babel plugin.
Is there an easier way of achieving this that I am missing?

Is it possible to customize the skin on Zeppelin?

Is it possible to customize the skin on Zeppelin? In otherwords, replace the Zeppelin logo with something else?
Yes, it is possible very much.
As you know Apache Zeppelin (incubating) is an open source project, so need just to:
clone it from github.com/apache/incubator-zeppelin
make modifications inside zeppelin-web sub-module
it is a standard Angular web-application, so you can change anything
build it
That is basically it.
There are at least 2 companies who are known to successfully follow these steps.
As already mentioned in bzz's answer: it is possible to customise the UI of zeppelin. Here are some more details:
Check out zeppelin source code (e.g. from GitHub https://github.com/apache/zeppelin ). Then:
To customize the front page (which has a "Welcome to Zeppelin" on it): edit zeppelin-web/src/app/home/home.html
To customise the navbar (which contains a small zeppelin logo and the word zeppelin): edit zeppelin-web/src/components/navbar/navbar.html
To customise the color scheme edit zeppelin-web/src/app/home/home.css
For the navbar color you need to change the entries for navbar-inverse, but many other elements (e.g. interpreter titles) use the same color.
After that you need to rebuild zeppelin mvn clean install -DskipTests (note that you may need to force reload in the browser).
See 'how to set a notebook as homepage' in the documentation.
In a notebook you can do whatever formating you like including html.

appengine cloud storage compile error in demo project

Following https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/getstarted
fails when deploying
goapp deploy -oauth
with
app.go:78: cannot use google.AppEngineContext(c) (type "golang.org/x/oauth2".Option) as type "github.com/golang/oauth2".Option in function argument
I'm able to get the demo project to run by altering the import lines 33-34 in google.golang.org/cloud/examples/storage/appengine/app.go from
"github.com/golang/oauth2"
"github.com/golang/oauth2/google"
to
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
Most importantly, is this the right way to "fix" this (and should the demo project be / or have been updated by google?)
And if anyone has insight, if you could provide some context as to why there are (as it appears to me) multiple ways to refer to the same package that would be great as well.
Yes, the go subrepositories have been moved to golang.org/x/...
See the announcement: https://groups.google.com/forum/#!msg/golang-nuts/eD8dh3T9yyA/l5Ail-xfMiAJ
The problem with identifying the canonical import path will be addressed in Go 1.4: https://docs.google.com/document/d/1jVFkZTcYbNLaTxXD9OcGfn7vYv5hWtPx9--lTx1gPMs
It seems there is indeed a problem with the examples. The oauth library refers to the golang.org/x/... paths with the recent commit.

asp.net pages can use class library but site won't compile

I am using VS2012 Update 3 and have a solution containing three visual basic projects a class library, a conosole app, and an IIS website.
The website has a reference to the library project. The library compiles fine and automatically places the latest dll in the bin folder of the website.
This was all working without issue before this week.
My web pages are able to import and use the class library. I get proper intellisense and the pages browse or eventually browse showing they are using the library. This week sometimes I get a type not defined error with browsing but after waiting it works. But the compile is always a fail now.
When compiling sometimes the errors show in the error list then eventually disappear but at ALL times when building the errors show up in the output tab as:
SomeCodeBehindFile.aspx.vb(#,#) error BC30002: Type 'SomeTypeInMyLibrary' is not defined.
Error BC30002 - Type XXX is not defined did not help. I tried using fully qualified variable types versus using the import. I tried changing the identity on the app pool to Network Service which has read permission on the whole site.
I've also tried Visual Studio's build > Clean Solution and deleting all files from windows' framework Temporary ASP.NET Files.
The only thing I may have done to irritate VS would have been renaming one of my asp files and its class names/page directive attributes manually but I have done this before without issue. I got paranoid and deleted that file and re-added it also. I also have 3 pages complaining about types not being defined now.
Was really perplexed for awhile. It also got worse with the pages using the library permanently refusing to browse. Though if I copied the library and erroring pages in another web app it would work! Not knowing what went off the rails I started a fresh VB web site and was back in business for awhile but then it started again. I did not connect what I did that actually caused the grief in my 2nd site. For a 3rd time I started a fresh web site this time using C#. Going great again up until that point I kept shooting myself. Thankfully the C# compiler gave a more helpful error message: "A using namespace directive can only be applied to namespaces; 'StaffPlusLibrary' is a type not a namespace". Grrr the problem was I kept adding a help page to the site related to the class library and called the page StaffPlusLibrary.aspx. I am careful not to name pages the same as existing classes but it did not register in my mind I was about to create a page using the same name as my library's root namespace. So the page created a class using the same name as the namespace. The ambiguity I introduced was not apparent until C#.

switchLanguage does not load translated item using LinguaPlone

I am still struggling getting LinguaPlone to work.
I have set up two language root folders /de (for German) and /en using /##language-setup-folders. I've created two folders, /de/texte/ and /en/articles and defined the latter as translation of the former.
In portal_languages in the ZMI I have set:
Allowed languages: English, German
Negotiation Scheme: [x] Use cookie for manual override
all other options are unchecked
I do get a language selector rendered, but when I click on "English", which calls /de/texte/switchLanguage?set_language=en, I get an English UI, but the location is still /de/texte.
And even though the breadcrumbs say You are here: Home › texte, Home actually still points to /de instead of /en.
I've searched the web, but apart from some older rant on LinguaPlone I could not find what I've been possibly missing.
How do I configure LinguaPlone to actually load the linked translation when switching languages?
Edit:
Plone 4.0.2
Zope 2.12.13
LinguaPlone 4.0
You have indeed the wrong language selector. There have been recurring reports about this but so far nobody found out why and how it happens. The correct language selector overrides the Plone default one by being defined for the ILinguaPloneProductLayer layer. This browser layer should be active as soon as you have the "LinguaPlone" skins folder as part of your skin layers.
You could try to reorder the skin layers in your theme by going to "http:///portal_skins/manage_propertiesForm" and moving LinguaPlone to the top, right after "custom".
If you have a theme of your own and defined any extra browser layers, those could possibly interfere as well, but it's hard to tell in what exact ways.
I think you have the wrong language selector.
There is a basic language selector viewlet that is shipped with Plone ("plone.app.i18n.locales.languageselector" in plone/app/i18n/locales/browser/configure.zcml). It just switches the language of the Plone interface (not the content). This is the language selector that links to "switchLanguage".
When you install LinguaPlone, it overrides the Plone language selector with it's own.
The LP selector is not supposed to link to "switchLanguage", but the URL of the content item in the target language (with the ?set_language parameter).
This viewlet is defined in Products/LinguaPlone/browser/configure.zcml
Perhaps LP is not correctly installed, or something is overriding the viewlet ?
The reason for this behaviour is that LinguaPlone 4.0 is not compatible with the "Plone Classic Theme" on Plone 4.0.2.
Switching to the "Sunburst Theme" solves the problem: the language selector links point to the correct URIs then.

Resources