Erlang and current date time - time

I would like to get a current date time with erlang.
I have tried using the code below;
{{Year,Month,Day},{Hour,Min,Sec}} = erlang:localtime().
But sometimes it got an error like '** exception error: no match of right hand side value {{2012,5,6},{23,40,58}}'
Looks like there is a problem with 1 digit. I try searching couple of webs but still cannot find a way to cope this.
I believe this is quite an easy one but as a erlang newbie, I cannot resolve this. I try my best.
Env:
Erlang {"OTP APN 181 01","R15B01"} installed with windows binary version
Windows XP
Thanks in advance,

No, there is no problem with 1 digit. It should match perfectly well (check with {{Year,Month,Day},{Hour,Min,Sec}} = {{2012,5,6},{23,40,58}}). Most likely you have already assigned one of the variables to something earlier in the function.

Related

String indices must be integers not str? What's going on here

My Code:I'm learning to write the basic intro to a finance program that I found on YouTube. All necessary packages have been installed and updated just to make sure. In line 19 using the get_data_yahoo function is the way I'm calling upon the stock variable wrong?
Thanks
I tried updating all packages involved, closing the program, tried to change the stock variable to read as an integer using int(stock) nothing has worked.

Ruby - Change timezone globally

I'm currently writing a program in Ruby in which I've to get the current time (from my machine). The problem in here is, that I'm two timezones ahead and just decrement the hours by 2.
GMT+2 - 2 = GMT+0
Now my question would be, if there's any smarter way in doing so?
I wasn't able to find anything.
Just to give another example from another language:
date_default_timezone_set('GMT+0');
It sets the default timezone to GMT+0, but I guess it's kinda self explanatory. :)
Found it:
t = Time.now.getlocal('+00:00')

Corenlp server shows different NER result from local 3.8 version

I uses the sentense
He died in the day before yesterday.
to process corenlp NER.
On the server, I got the result like this.
And in local, I uses the same sentence, got the result of
He(O) died(O) in(O) the(O) day(TIME) before(O) yesterday(O) .(O)
So, how can I get the same result like the server?
In order to increase the likelihood of getting a relevant answer, you may want to rephrase your question and provide a bit more information. And as a bonus, in the process of doing so, you may even find out the answer yourself ;)
For example, what url are you using to get your server result? When I check here: http://nlp.stanford.edu:8080/ner/process , I can select multiple models for English. Not sure which version their API is based on (would say the most recent stable version, but I don't know). Then the title of your post suggests you are using 3.8 locally, but it wouldn't hurt to specify the relevant piece in your pom.xml file, or the models you downloaded yourself.
What model are you using in your code? How are you calling it? (i.e. any other annotators in your pipeline that could be relevant for NER output)
Are you even calling it from code (if so, Java? Python?), or using it from the command line?
A lot of this is summarised in https://stackoverflow.com/help/how-to-ask and it's not that long to read through ;)

free-jQgrid "loading" message still remains

Since my app is online for to be tested by customer, I often meet this problem and I have to click several times on "Tiers" menu to hope it will disappear and give hand.
Here is a snapshot of the trouble :
WHen I use my app on local server (wampserver) I never meet this trouble.
I have several grids in my app and none displays this message online.
Firebug says "jquery.jqgrid.min.js" has error in line 344 (?). Used version is 4.13.5-pre dated 2016-08-27 and hosted server runs with php 5.6.8
Does somebody already met this type of trouble ?
If somebody can take some time to help me, I can give by email login and pass to test app online.
Many thanks for your kind help.
Cheers
JiheL
Thank you for reporting the issue. It would be helpful if you report the error using jquery.jqgrid.src.js instead of jquery.jqgrid.min.js, but I suppose that the only place in the code, which could produce the error is the piece of code with if ($input[0].tagName.toUpperCase() === "SELECT" && $input[0].multiple) {... (see here).
I posted the fix just now, which should eliminate the error. It includes the additional test if ($input.length > 0) {...} (see the line). I would still recommend you to examine the name and index values in colModel of your grids. It seems that your current code uses the filter with names or index, which is not from colModel or which uses some special characters. It's the only reason of the error, which one can see in console of your picture.

How to put in mathematica what I want: setting error?

I downloaded mathematica 9 a while ago, and when I put I try to try something like 'f[x]={{1,2}}', My screen instead reads 'f8x8 = ;;1,2??'. While typing it also switches notation as if it is displaying the wrong way.
I keep getting the following error as well: 'The stretchable character 0x5b in the Mathematica2Mono font (size 13) has a repeating piece (0x81) that is zero size.'
Does anyone know what this means or how to remedy the situation? I'm new to mathematica and am struggling to get to anything remotely familiar. I have uninstalled and reinstalled as well.
Contact Wolfram support. They provide whatever it takes to get it installed and running.
http://www.wolfram.com/support/contact/

Resources