Android Studio: how to increase set ANDROID_LINT_MAX_VIEW_COUNT - warnings

My Android application, being prepared in Android Studio 3.5.3, has a layout with more than 80 different views (and this number will grow). So, the warning layout has too many views appears. I'd like to increase variable ANDROID_LINT_MAX_VIEW_COUNT up to 100 (as it is advised in the warning), but I cannot find where it can be done. Menu File->Settings->inspections does provide option Perfomance->Application size->layout has too many views describing this warning, so it is possible to suppress it. However, I'd like just to increase ANDROID_LINT_MAX_VIEW_COUNT, not to suppress it at all. I've found an advice to create environment variable ANDROID_LINT_MAX_VIEW_COUNT setting it to 100, but it does not work.
Thanks for any idea

ANDROID_LINT_MAX_VIEW_COUNT is indeed an environment variable. After setting it to a proper value, Android Studio has to be restarted, that I didn't. After restarting, the warning layout has too many views disappeared.

Related

NativeScript, Code Sharing and different environments

Note: this is not a dupe of this or this other question. Read on: this question is specific to the Code-Sharing template.
I am doing some pretty basic experiments with NativeScript, Angular and the code sharing templates (see: #nativescript/schematics).
Now I am doing some exploration / poc work on how different "build configuration" are supported by the framework. To be clear, I am searching for a simple -and hopefully official- way to have the application use a different version of a specific file (let's call it configuration.ts) based on the current platform (web/ios/android) and environment (development/production/staging?).
Doing the first part is obviously trivial - after all that is the prime purpose of the code sharing schematics. So, different versions of the same file are identified by different extensions. This page explain things pretty simply.
What I don't get as easily is if the framework/template supports any similar convention-based rule that can be used to switch between debug/release (or even better development/staging/production) versions of a file. Think for example of a config.ts file that contains different parameters based on the environment.
I have done some research in the topic, but I was unable to find a conclusive answer:
the old and now retired documentation for the appbuilder platform mentions a (.debug. and .release.) naming convention for files. I don't think this work anymore.
other sources mention passing parameters during the call to tns build / tns run and then fetching them via webpack env variable... See here. This may work, but seems oddly convoluted
third option that gets mentioned is to use hooks to customize the build (or use a plugin that should do the same)
lastly, for some odd reason, the #nativescript/schematics seems to generate a default project that contains two files called environment.ts and environment.prod.ts. I suspect those only work for the web version of the project (read: ng serve) - I wasn't able to get the mobile compiler to recognize files that end with debug.ts, prod.ts or release.ts
While it may be possible that what I am trying to do isn't just supported (yet?), the general confusion an dissenting opinions on the matter make me think I may be missing something.. somewhere.
In case this IS somehow supported, I also wonder how it may integrate with the NativeScript Sidekick app that is often suggested as a tool to ease the build/run process of NativeScript applications (there is no way to specify additional parameters for the tns commands that the Sidekick automates, the only options available are switching between debug/release mode), but this is probably better to be left for another question.
Environment files are not yet supported, passing environment variables from build command could be the viable solution for now.
But of course, you may write your own schematics if you like immediate support for environment files.
I did not look into sharing environment files between web and mobile yet - I do like Manoj's suggestion regarding modifying the schematics, but I'll have to cross that bridge when I get there I guess. I might have an answer to your second question regarding Sidekick. The latest version does support "Webpack" build option which seems to pass the --bundle parameter to tns. The caveat is that this option seems to be more sensitive to typescript errors, even relatively benign ones, so you have to be careful and make sure to fix them all prior to building. In my case I had to lock the version of #types/jasmine in package.json to "2.8.6" in order to avoid some incompatibility between that and the version of typescript that Sidekick's cloud solution is using. Another hint is to check "Clean Build" after npm dependency changes are made. Good luck!

ChromeDriver prevent detection

From various other questions here on SO etc. it is clear that one of the main reasons for websites being able to detect Selenium/ChromeDriver is being used, is the javascript property
document.$cdc_asdjflasutopfhvcZLmcfl_
Is there anyway to prevent this property being created (that does not involve a custom build of ChromeDriver)? Like for example disabling this cache somehow? It would really be preferrable without a custom build. Perhaps with a configuration option of randomizing the property name.
Or would it be possible to somehow through the driver something like this:
delete document.$cdc_asdjflasutopfhvcZLmcfl_;
Initial testing seems to indicate that this does not work. Perhaps because a new cache is created just after executing this script, or similar.

Octave disable automatic broadcasting

I have some code which Octave spits me out many
warning: product: automatic broadcasting operation applied
I think this automatic broadcasting could be the problem in my code, which doesn't work yet, but that message is so non informative, it doesn't help me locate the problem at all. I'd rather like Octave to simply fail, error at the specific location of that broadcast, so that I can manually go there, understand why it was broadcasting there and then fix my code. Also, even if my code doesn't not work because of this mistake, but because of some other mistake, in any other programming language I'd also go there and fix it, since I don't like to rely on something automatically differently interpreted, but want to have clean code.
How do I disable that annoying behavior (generally, all the time, everywhere) and make Octave tell me where the mistake is?
Also, even if my code doesn't not work because of this mistake, but because of some other mistake, in any other programming language I'd also go there and fix it, since I don't like to rely on something automatically differently interpreted, but want to have clean code.
The warning for automatic broadcasting was added in Octave 3.6 and has been removed in Octave 4.0. The reason for throwing a warning is that automatic broadcasting was a new feature in 3.6 that could catch users by surprise.
But it is meant to be used like a normal operator, not to be an accident. The fact that using it was throwing a warning made it sound like it was something that needs to be fixed on the code. So don't feel like it.
Newer Octave versions of Octave will not throw that warning by default. You might as well disable the warning now:
warning ("off", "Octave:broadcast");
How do I disable that annoying behaviour (generally, all the time, everywhere) and make Octave tell me where the mistake is?
You can't disable automatic broadcasting, that would make Octave stop working. It would be the equivalent of, for example, disabling addition and expect Octave to continue working normally.
You seem to think that automatic broadcasting is the source of your mistake. That cannot be. Automatic broadcasting does not cause a different result. If you were to disable automatic broadcasting you would simply get an error about nonconformant dimensions.
Therefore, assuming you never intended to make use of broadcasting, your program is not working because of some other mistake happening before automatic broadcasting (usually a function returned a row vector and you expected a column vector, or vice-versa).
However, you are obviously using an old version of Octave and at that time broadcasting was not much used yet. You can make it throw an error instead of a warning and maybe it will still work fine (specially if you don't use Octave packages because they used automatic broadcast more than Octave core). You can do this with:
warning ("error", "Octave:broadcast");
warning('error');
Will set all warnings to be treated as errors.
For more see the documentation on that, there seems to be a way to set only specific warning as error, or maybe have it display the position, which causes the warning.
Note. All commands set octave parameters for a specific session only. There are certain files where such commands can be written so that these options become default.

Set Start Program in Visual Studio Express

I want to run Nuint in Visual, so I set
<StartAction>Program</StartAction>
<StartProgram>$(NUNIT_PATH)\nunit.exe</StartProgram>
<StartArguments>Test.dll</StartArguments>
<StartWorkingDirectory>Test\bin\Debug</StartWorkingDirectory>
in my csproj file. But it stll does not work.
Those entries look correct for the project file. The most likely cause of the problem is that $(NUNIT_PATH) isn't properly set and hence gets evaluated to nothing. This would cause Visual Studio to look for nunit.exe in the Test\bin\Debug directory.
To test this try hard coding the full path to the nunit.exe binary into the file.
<StartProgram>C:\the\path\nunit.exe</StartProgram>
If this works then the NUNIT_PATH value isn't properly set.
Unfortunately the Express editions don't support the StartAction mechanism. See MSDN How to: Change the Start Action for Application Debugging.
I'm looking for alternatives though ;-)
Update see also SO-a/10572249/717355: Try http://www2.wealth-lab.com/Wiki/kbDebugExpress.ashx step 13 for a suggestion on making MSVC think its debugging your code directly. - Untried.

How to remove the useless unconfigured items in matrix build of Jenkins/Hudson

I use Jenkins to configure my multiconfiguration build, which is like a snapshot.
The Axes I use are:
Labels: Mac10.6, Mac10.7, and Windows
Platforms: Mac10.6, Mac10.7, WinXP, Win7, and WinServer2008
Tasks: _App_Installer_, ATS, and so on
It is clear that it makes no sense for WinXP to build on label Mac10.6. Although it is shown as diabled/unconfigured, it still confuses people.
So is there any way to remove the useless configuration?
Inside the matrix/multiconfiguration plugin there is a field to filter out the combination available from the combination checkbox.
If you want to only execute windows with windows platform :
label=="Windows" && (platform=="WinServer2008" || platform=="WinXP" || platform=="Win7")
Of course in your case you'll have to handle a huge expression but it's doable.
I hope this helps you!
I had a similar problem. The workaround (by no means complete) was the following:
Separate builds for unrelated platforms (Mac, iOS, and Windows, for example) into different jobs.
Conduct a code review with the team explaining to them how matrix builds work.
But the truth of the matter that I also would like to see the matrix entries that do not pass the filter as blank, not disabled.