How to remove the 'WARNING: CSS Error parsing': - css

There is a warning everytime I run the program, I don't know where the problem is because at [1, 19] of all of my css files I have a comment. I tried to fix this by removing the comment and it made no difference. Please help.
WARNING: CSS Error parsing '*{-fx-font-family: ;}: Unexpected token ';' at [1,19]
[]1

In javaFx you can use CSS with two ways : you can customise your fxml file by using scene builder or by according a css file.I had the same problem ,when the JavaFX CSS parser encounters a syntax error, a warning message is emitted which conveys as much information as is available to help resolve the error. For example
WARNING: com.sun.javafx.css.parser.CSSParser declaration Expected
'' while parsing '-fx-background-color' at ?[1,49]
The cryptic '?[1,49]' pertains to the location of the error. The
format of the location string is
[line, position]
If the error is found while parsing a file, the file URL will be given. If the error is from an inline style (as in the example above), the URL is given as a question mark. The line and position give an offset into the file or string where the token begins. Please note that the line and position may not be accurate in releases prior to JavaFX 2.2.
Applications needing to detect errors from the parser can add a listener to the errors property of com.sun.javafx.css.StyleManager. This is not public API and is subject to change.
I think you add a value by using scene builder and you are adding ; to your value and this is not acceptable in scene builder you need to remove ;.
To resolve your problem ,go to your fxml file in your IDE ,i think you are using Netbeans and click right button of mouse --> edit , you can find your warning.

Related

Xamarin Android Fragment Inflation, Binary XML file line #1: Binary XML file line #1: Error inflating class fragment

I have been following a book on Xamarin Android development and I am getting an issue when inflating a fragment. The error message states
"Binary XML file line #1: Binary XML file line #1: Error inflating class fragment". This error is being thron in the OnCreate of the Activity for the ListFragment. If anyone wishes to look at the code I have wrapped PoiListActivity in a try catch block to get this error.
From what I can tell, my layouts have correct axml and I'm not getting any build errors indicating the C# code is fine. If anyone is able to help, it would be greatly appreciated as I've been battering my head for a few days and it's blocking me from learning further.
Code can be found here
Book being followed is this
To have more info on what's going on, better output the entire exception and not just its message. Or simply remove the try/catch block to see the full error in debug output. The inner exception tells us:
Android.Views.InflateException: Binary XML file line #1: Error inflating class fragment --->
Java.Lang.RuntimeException: Content has view with id attribute 'android.R.id.list' that is not a ListView class
This means you need to add android:id="#android:id/list" to the ListView in PoiListFragment.axml. For more info, please see here.
Next time when asking a question, please provide more info like indicating the file name, including some code, etc.

HtmlUnit Doesn't Recognize Valid CSS

So, I just started using HtmlUnit (literally just now), and I've already run into an error. I have some simple code:
fun getPage() { val page: Page = WebClient().getPage("http://htmlunit.sourceforge.net") }
However, it throws an extremely long error:
WARNING: CSS error: 'http://htmlunit.sourceforge.net/css/apache-maven-fluido-1.5.min.css' [9:90176] Error in declaration. '*' is not allowed as first char of a property.
Jan 24, 2018 4:14:58 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error
WARNING: CSS error: 'http://htmlunit.sourceforge.net/css/apache-maven-fluido-1.5.min.css' [9:91151] Error in declaration. '*' is not allowed as first char of a property.
Jan 24, 2018 4:14:59 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
WARNING: Obsolete content type encountered: 'text/javascript'.
Jan 24, 2018 4:15:00 PM com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
//continues the above sequence a lot, and then ends with:
SEVERE: runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: :x).] sourceName=[http://htmlunit.sourceforge.net/js/apache-maven-fluido-1.5.min.js] line=[25] lineSource=[null] lineOffset=[0]
I looked at the link provided by the error, and it seems to contain a lot of asterisks inside of their CSS. 194, to be exact (including asterisks used in the commented area). I also experimented with loading other web pages, and it appears to be that it has issues understanding that the CSS of web-pages is valid.
Am I doing something wrong, or should I just tell it to ignore CSS? (I'm not sure if that's possible, but I would prefer it.)
At first regarding the css warning
it is a warning
see star hack for more info about this
if you still think this is valid css please open an CSSParser issue and i will have a look
Second: An invalid or illegal selector was specified....
This is really common if you are testing pages with HtmlUnit. The background is that many javascript libs (like sizzle used by jQuery) doing some checks to figure out what features are supported by your browser. And the output you see is the result of one of this checks. This one tries to figure out, if the javascript select method is able to work with a special kind of css-selectors. There is a try-catch around this selector usage in the javascript code and if the selector fails (in fact this happens in many browsers) the features is not available and the lib falls back to some other way to do the selection. The reason for seeing this in the error log is part of HtmlUnit history. This lib was initially designed for web testing and based on this the lib logs every javascript exception at the moment the exception is thrown (even if the exception is catched/handled later on). So you can more or less ignore this; the HtmlUnit does not stop working because of this.

Ruby/Selenium/Watir-Webdriver: "path is not absolute" error for absolute path

document_name ='TestDoc'
document_path = ("/Users/Me/QA/Project/Documents/#{document_name}")
File.new ("/Users/Me/QA/Project/Documents/#{document_name}") # => File is created
filename_field.send_keys("#{document_path}")
filename_field.send_keys :tab # => To Trigger event but where error occurs
filename_field = browser.file_field(:name, 'file') declared in a module elsewhere.
As far as I can tell, I have provided an absolute path for the filename to upload the file but when the tab key is sent, an error occurs of:
Selenium::WebDriver::Error::UnknownError: unknown error: path is not absolute:
With an odd squiggly symbol in RubyMine that I've never seen before. Any ideas?
Update:
I added
puts filename_field.value
# => C:\fakepath\TestDoc
Spoke to one of the developers and she said "Browser does it to fake things out, so the filesystem isn't exposed". Not sure if that helps solve my issue or I'm SOL?
That error comes from Chromedriver, and comes from sending an incorrect path string to a file element. Since :tab is not a path, it is correctly raising an error.
You shouldn't need to send a tab; just sending the path of the file should accomplish what you need.
I see many small strange things in your code.
Why
document_path = ("/Users/Me/QA/Project/Documents/#{document_name}")
Not
document_path = "/Users/Me/QA/Project/Documents/#{document_name}"
Why
filename_field.send_keys("#{document_path}")
Not
filename_field.send_keys(document_path)
But the main question is why you are using send_keys instead of set?
I failed to reproduce your problem. Maybe it will be possible if you will provide your html. But i suggest you to try:
filename_field.set(document_path)
Because you can easily check it even with irb send_keys is acting differently in firefox and in chrome for example. So maybe problem with it.
Another suggestion
That is a much more weak idea. But...
Try to clear value before changing it. You can do it with javascript:
b.execute_script("arguments[0].value=''", field)
I had the same issue with Chromedriver 2.26.436421 and it was solved when I removed the code which was sending the tab key.
With previous Chromedriver sending tab key was required to trigger the change event on the file input but with latest one it seems like it is only causing issues and the change event gets triggered without it.

Microsoft InfoPath Error? Cannot open

Just wondering if anyone can help me with an InfoPath problem I've got. I have a form that I am unable to open, originally displaying the message below.
The form definition (.xsf) file contains elements, attributes, or structures that are not valid.
Error details:
The keyref 'ruleSet_41' does not resolve to a key for the Identity Constraint '{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}ruleset_name_key'.
 
Line 1539, Position 3
--^
I have managed to clear this by removing ruleSet_41 from the manifest.xsf file but the message I am now receiving is shown below.
The following file is referenced in the .xsf file but is not part of the form: myschema.xsd
 
This is stopping me opening the form.
Does anyone have any ideas, anything would be much appreciated.
Many thanks, Jamie.
Remove the button that contains the RuleSetAction.
There would also look, open the file "myschema.xsd" will have been a reference to "ruleSet_41". Also delete it from the .xsd

Compiler Error Message: CS0103: The name 'Database' does not exist in the current context [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Razor-based view doesn't see referenced assemblies
I am a Newbie in ASP.net
I am trying to connect to a database and I keep getting this error
**Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Database' does not exist in
the current context
Source Error:
Line 1: #{
Line 2: var db = Database.Open("demo"); '
Line 3:
Line 4:
Source File: c:\Users\Ayoya\Documents\My Web Sites\demo\Page.cshtml
Line: 2
**
Can anyone tell me whats wrong?
Thank you
The compiler's already telling you what's wrong - it doesn't know what you mean by Database. Is that mean to be a property of the page, or is it the name of a type with a static Open method? It's not clear from the code itself, and obviously the compiler can't find the name either.
Work out what name you mean, then work out why the compiler can't see it, then fix that. If you need more help on any of these steps, you'll need to provide more information.
(As an aside, I completely agree with dbaseman: putting database calls in your view is a bad idea.)
If you're opening a database in your Razor view, that is completely the wrong approach. Your logic should go in the Controller, not the View. Consider creating a "view model" class that contains all the data needed for your view, and populate that class from the Controller.
Probably the reason this piece of code isn't working is that you will need to specify the full namespace of Database. I'm not sure what that class is, though; if it's in a separate DLL, you'll have more problems. Again, though, you should circumvent this problem by putting your database logic in the controller.

Resources