Bootstrap Date Picker : Failed to appendChild on Node - twitter-bootstrap-3

Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
Getting above error, when I trying to use eonasdan-datetimepicker in my page.Included files are in the following order,
jquery.js
moment.js
transition.js
collapse.js
bootstrap-min.js
bootstrap-datetimepicker.js
In Script,
$('#monthpicker').datetimepicker({
viewMode: "years",
format: 'MM/YYYY'
});
But,Not getting date selection drop down.
Note: Included bootstrap-datetimepicker.css,bootstrap.min,css

Related

org.openqa.selenium.JavascriptException: javascript error: missing ) after argument list error when updating session storage key value using Selenium

If key value length is 11808 Unable to update session storage key value using selenium automation
Small length key values are setting but long length key values getting JS error
Manually it is working but using selenium automation getting JS error.
setItemInsessionStorage method using:
java.lang.AssertionError: org.openqa.selenium.JavascriptException: javascript error: missing ) after argument list
This error message...
java.lang.AssertionError: org.openqa.selenium.JavascriptException: javascript error: missing ) after argument list
...implies that there is a syntax error within the Javascript line of code.
A bit of more information about your usecase interms of your code block would have helped us to analyze the error in a better way. However in majority of the cases, this error is observed in the following cases:
Incase the " marks are not escaped properly. As an example:
onclick="(canLaunch('" + v.LibraryItemId + " '))"
^ escape character is missing
Ideally, the line should be:
onclick=\"(canLaunch('" + v.LibraryItemId + " '))\"
Incase the function() passed are not closed properly. As an example:
$(document).ready(function(){
}
Ideally, the line should be:
$(document).ready(function(){
});

GraphQL error: Field error: value is not an instance of Date

After I've installed redis-server and graphql-redis-subscriptions I receive the following error [GraphQL error]: Message: Field error: value is not an instance of Date, Location: [object Object], Path: messageAdded,createdAt [Error: GraphQL error: Field error: value is not an instance of Date] If I remove createdAt from query everything works fine.
scalar Date I am using in types schema

SyntaxError: Failed to execute 'evaluate' on 'Document':

Can anyone please tell me, if there is any mistake with my xpath. I have made it dynamic, to accept values from the parameter passed.
Xpath used in my code as :
wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath("//div[#id='categories_block_left']/div[1]/ul[1]/li/a[contains(text(),'"+subCategory+"')]/Preceding-sibling::span[1]")));
Xpath I am getting on run time in the console after execution:
//div[#id='categories_block_left']/div[1]/ul[1]/li/a[contains(text(),'Tops')]/Preceding-sibling::span[1]
If I try to inspect above(runtime) by mentioning xpath in Firpath console, it is getting detected. But selenium is not able to detect this element.
Here is page URL:
http://automationpractice.com/index.php?id_category=3&controller=category
In the eclipse console I am getting error as :
Expected condition failed: waiting for presence of any elements located by By.xpath: //div[#id='categories_block_left']/div[1]/ul[1]/li/a[contains(text(),'Tops')]/Preceding-sibling::span[1]
SyntaxError: Failed to execute 'evaluate' on 'Document':

SSIS XML Source Error - Input string was not in a correct format

I have an attribute tlost with the definition below in the XSD file. I have tried both use="required" and use="optional".
<xs:attributeGroup name="defense">
<xs:attribute name="tlost" use="required" type="xs:decimal"/>
</xs:attributeGroup>
In the XML document I am trying to import I will get a value like the following:
<defense ast="0" category="special_team" tlost="0" int="0"/>
I am executing an SSIS package that takes the tlost value and inserts it into a sql database table. The column in the database table has a datatype of DECIMAL(28,10) and allows nulls.
When I execute the package, the previous values work perfectly and the data is inserted. However, when I get a value where tlost="" in the XML file, the package fails and the record is not inserted.
In the data flow path editor, the data type for tlost is DT_DECIMAL. When I check the Advanced Editor for the XML Source, the Input and Output properties have a data type for tlost as decimal [DT_DECIMAL].
I can't figure out why this is failing. I tried to create a derived column and cast it as a (DT_DECIMAL, 10) data type. That didn't work. I tried to check for a null value and replace with 0 if null, that didn't work. So I just ignored the column all together and in the Derived Column task, I replaced the tlost column value with (DT_DECIMAL, 10) 0 to just insert a 0 value and ignore whatever is in the xml file, and the job still failed with the following error message:
Error: 0xC020F444 at Load Play Summary Tables, XML Source [1031]: The error "Input string was not in a correct format." occurred while processing "XML Source.Outputs[defense].Columns[tlost]".
Error: 0xC02090FB at Load Play Summary Tables, XML Source [1031]: The "XML Source" failed because error code 0x80131537 occurred, and the error row disposition on "XML Source.Outputs[defense].Columns[tlost]" at "XML Source.Outputs[defense]" specifies failure on error. An error occurred on the specified object of the specified component.
Error: 0xC02092AF at Load Play Summary Tables, XML Source [1031]: The XML Source was unable to process the XML data. Pipeline component has returned HRESULT error code 0xC02090FB from a method call.
Error: 0xC0047038 at Load Play Summary Tables, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on XML Source returned error code 0xC02092AF. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
Please help. I have exhausted everything I can think of to fix this issue. I am processing hundreds of files, and I can't keep fixing bad data files every time this issue occurs.
Can you please try these
1 - Change to data type to string in xsd and before loading into tables take care of data type conversion.
2 - If possible generate the xsd by passing your xml and then verify the data type and use it accordingly ...
rest of the xsd can be changed accordingly...
below is screen grab of what I tried. hope it helps]1

Datetime parsing in Apache Pig

I'm trying to parse a Date in a Pig script and i got the following error "Hadoop does not return any error message".
Here is the Date format example : 3/9/16 2:50 PM
And here is how I parse it :
data = LOAD 'cleaned.txt'
AS (Date, Block, Primary_Type, Description, Location_Description, Arrest, Domestic, District, Year);
times = FOREACH data GENERATE ToDate(Date, 'M/d/yy h:mm a') As Time;
You can see the data file here
Do you have any idea ?
Thanks
EDIT:
It look like the error is caused by the STORE command on "times".
If I do a DUMP then I got:
ERROR 1066: Unable to open iterator for alias times
It happen only when I use the ToDate function, I have other scripts that work perfectly.
First of all, you need to specify the loader in the LOAD statement:
USING PigStorage('\t')
I assumed that you're using tab separator.
Than if you have no schema specify the schema with type!
So you're load statement will be sg like this:
data = LOAD 'SO/date2parse.txt' USING PigStorage('\t') AS (Date:chararray, Block:chararray, Primary_Type:chararray, Description:chararray, Location_Description:chararray, Arrest:chararray, Domestic:chararray, District:chararray, Year:chararray);
For now I just use chararray type for everything, but you have to specify the type what is the right representation for you.
After this the date conversion just works fine as you wrote:
(2016-03-09T23:55:00.000Z)
(2016-03-09T23:55:00.000Z)
(2016-03-09T23:55:00.000Z)
My test script:
data = LOAD 'SO/date2parse.txt' USING PigStorage('\t') AS (Date:chararray, Block:chararray, Primary_Type:chararray, Description:chararray, Location_Description:chararray, Arrest:chararray, Domestic:chararray, District:chararray, Year:chararray);
times = FOREACH data GENERATE ToDate(Date, 'M/d/yy h:mm a') As Time;
DUMP times;
UPDATE:
Some explanation
By the way the default loader is pig storage
PigStorage is the default load function for the LOAD operator.
but it's nicer to specify.
The original issue caused by the lack of datatype
If you don't assign types, fields default to type bytearray
so the ToDate failed on the input type.