ng-file-upload issue on IE9 - after uploading one file receiving error - ng-file-upload

var prevFiles = ((ngModel && ngModel.$modelValue) || attr.$$ngfPrevFiles || []).slice(0);
I am getting an error that the result of this statement does not have a slice method.

Without knowing too much about the module I have a theory:
The first evaluation (ngModel && ngModel.$modelValue), when true, returns a Boolean which does not have a slice method.

There was an issue filed in Github about this https://github.com/danialfarid/ng-file-upload/issues/1139
Reportedly fixed in release 10.0.3.

Related

Lack of null inequality support in Firestore's PHP SDK

We are able to run null inequality just fine on the JavaScript SDK (client or admin), but we are unable to in PHP? To me it seems this is a backend feature which is already supported by Firestore, but throws an error in PHP.
->where('preorders', '!=', null)
Uncaught InvalidArgumentException: Null and NaN are allowed only with operator EQUALS.
Whereas the equivalent in JS SDK works just fine.
query(q, where('preorders', '!=', null))
Since I cannot open an issue in google's PHP SDK repo here, is there any way we can find a reason as to why this is not possible?
The documentation says, :
“A field exists when it's set to any value, including an empty string (" "), null, and NaN (not a number). Note that null field values do not match != clauses, because x != null evaluates to undefined.”
Explanation : Yes, even if we add an empty string, null,( supported data type in Firestore) or NaN, it doesn't mean that the field doesn't exist. It definitely exists and holds one of those values. And coming to when we compare x != null in where clauses, x != null evaluates undefined, but for non-exist fields. And undefined is not a supported data type in Firestore, according to this Firestore supported data type.
So we can compare .where(x!=null) and it is supported, but it evaluates to undefined for non-existent fields.
As mentioned in similar thread, the version release of v7.21.0 in Firestore JS SDK supports the != operator with where clause from version 7.21.0
But while digging deeper in the documentation, I found that php5 supports != operator as you can see in the code snippet, but the php8 does not support != operator yet and the workaround is using not-in instead of it as shown in this code snippet.
Maybe you are trying to use php version >5 and hence the error.
There is already an open issue on this, in GitHub. You may follow the link for updates and changes or you can create a new request here.

The || function isnt working when checking for user id

if (message.content.startsWith('!'))
{
if(message.author.id !== ('490510038469705747') || message.author.id !==('752606131569950800)') || message.author.id !==('422003274045063179') || message.author.id !==('395291950690861057'))
return message.channel.send('!You aint my master! ._.');
}
this code doesnt work, and it always just says You aint my master to anyone thats running the command
please help
i am using discord.js with visual studio code
You should be using && instead of ||. When you're using ||, the if statement will pass even if only one of the parameters resolves to true. If you use &&, the if statement will only pass if ALL of the parameters resolve to true.
Additionally it seems you've got a stray parenthese in one of your strings message.author.id !==('752606131569950800)').

Adding logical or gate in jasper report

I want static text to be printed only if any one or more of the textField has a value.
I have tried with following code but goal is not achieved. Following code is not working when all the textField is empty except the last one (HAEMATOLOGY_BASOPHILS). I think with following approach once boolean false is returned rest of the logical or gate is not getting executed.
<printWhenExpression>< ![CDATA[((!$F{HAEMATOLOGY_NEUTROPHILS}.isEmpty()) || (!$F{HAEMATOLOGY_EOSINOPHILS}.isEmpty()) || (!$F{HAEMATOLOGY_BASOPHILS}.isEmpty()))]]></printWhenExpression>
<text><![CDATA[Differential Count]]></text>
PS : My english is not good. So, sorry for the grammatical error.

How to get current member in a Razor macro

I have asked this question on the Our Umbraco forums, however I wanted to also increase my chances of getting a solution by posting the same question here.
The issue I have is that, inside a Razor macro, I'm unable to get the current Member who is accessing the site. I have tried the following methods:
Calling Member.GetCurrentMember(), but this returns NULL.
Calling Membership.GetUser(), but this returns NULL
Calling UmbracoEnsuredPage.CurrentUser returned NULL;
Is there another way to get the current Member seeing how the above methods do not work in my case?
var m = Membership.GetUser();
That should work, just verified it myself on 4.7.1; it will return NULL if you are not logged in as a member, but when you log in it should get you what you want.
Just a slight change from #E.J.Brennan if the NULL is an issue you can check if you are logged on before trying to GetUser():
if (umbraco.library.IsLoggedOn())
{
m = Membership.GetUser();
}
Starting from v7 you can use the MembershipHelper
#Members.CurrentUserName
#Members.GetCurrentMember()
#Members.GetCurrentMemberId()
Now it's even easier, in the surfaceController you can use just one line:
var member = ApplicationContext.Current.Services.MemberService.GetById(Members.GetCurrentMemberId());
If Members MembershipHElper isn't accessible:
var memberShipHelper = new MembershipHelper(UmbracoContext.Current);
var member = ApplicationContext.Current.Services.MemberService.GetById(memberShipHelper.GetCurrentMemberId());

Perl: how to validate successful call to "XML::eXistDB::RPC"

i am writing a small perl app using the eXist database, and i am wondering is:
how can i see that my call
my $eXist = XML::eXistDB::RPC->new( destination=>$eXist_db, repository=>$bank, user=>"admin", password=>"pass" ) ;
is successful or not ?
thanx
When object initialisation fails, it will be messaged through Log::Report, so hook into that.
This only happens if the programmer to neglected to set either rpc or destination parameter. The new constructor will always return an object instance.
According to the docs:
All methods return a LIST, where the
first scalar is a return code (RC).
When that code is 0, all went well.
Otherwise, the code represent the
transport error or the exception
(refusal) as reported by the server
logic. In either case, the second
scalar in the returned list contains
the error message. For instance,
Maybe this applies also for the constructor, try:
my ($rc,$eXist) = XML::eXistDB::RPC->new( destination=>$eXist_db, repository=>$bank, user=>"admin", password=>"pass" );
now, if $rc != 0 there was an error.