I'm running a command to get the below output:
bash-3.2$ /usr/g1_listuser
Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total
( 25 + 2 ) / 27 5 0 0 0 5
UDTNO USRNBR UID USRNAME USRTYPE TTY TIME DATE
1 14310 10889 webspher phantom none 08:46:13 Feb 16 2017
2 8327 10889 webspher phantom none 23:45:21 Feb 15 2017
6 26704 30797 t576278 udt pts/1 04:21:29 Feb 16 2017
7 8735 10889 webspher phantom none 23:45:25 Feb 15 2017
8 29590 10889 webspher phantom none 03:34:29 Feb 16 2017
9 29340 10889 webspher phantom none 09:47:34 Feb 16 2017
10 28627 10889 webspher phantom none 09:47:19 Feb 16 2017
11 9850 10889 webspher phantom none 23:45:41 Feb 15 2017
12 28805 10889 webspher phantom none 09:47:24 Feb 16 2017
13 8957 10889 webspher phantom none 23:45:29 Feb 15 2017
14 3487 10889 webspher phantom none 09:47:20 Feb 14 2017
15 24327 32027 p101468 udt pts/3 15:00:12 Feb 15 2017
16 29631 10889 webspher phantom none 09:47:38 Feb 16 2017
18 9644 10889 webspher phantom none 23:45:36 Feb 15 2017
20 29073 10889 webspher phantom none 03:34:25 Feb 16 2017
21 29838 10889 webspher phantom none 03:34:33 Feb 16 2017
22 26728 10889 webspher udt none 08:00:18 Feb 13 2017
23 21835 10889 webspher phantom none 02:00:42 Feb 16 2017
25 12188 10889 webspher phantom none 08:45:33 Feb 16 2017
26 1138 10889 webspher phantom none 03:34:47 Feb 16 2017
27 21458 10889 webspher phantom none 02:00:37 Feb 16 2017
28 20834 10889 webspher phantom none 02:00:29 Feb 16 2017
29 20961 10889 webspher phantom none 02:00:32 Feb 16 2017
30 1561 10889 webspher phantom none 03:34:51 Feb 16 2017
31 7668 10889 webspher phantom none 04:02:21 Feb 16 2017
32 20998 10889 webspher phantom none 02:00:33 Feb 16 2017
33 21461 10889 webspher phantom none 02:00:37 Feb 16 2017
41 10980 10889 webspher udt none 09:00:39 Feb 13 2017
42 3276 10889 webspher phantom none 04:00:43 Feb 16 2017
43 12985 10889 webspher udt none 04:07:30 Feb 15 2017
The result I'm trying to get is a count per USRNAME and min date/time associated, I built the below command:
/usr/g1_listuser | grep -v 'Licensed' | grep -v '(' | grep -v 'UDTNO' | awk 'BEGIN {FS=OFS=SUBSEP=" "}{arr[$4]+=1;date=$7$8$9$10;min_date="999999999";if(min_date>date){min_date=date};}END {for (i in arr) if (i != null) print i,min_date,arr[i];}'
That output the below:
webspher 31
p101468 1
t576278 1
Which doesn't display the date and time properly. Any help is welcome.
Machine: sun4u sparc 5.10 Generic_150400-32
Related
I'm trying to create the Xamarin.iOS bindings for the HERE SDK 4:
sudo xcode-select -s /Applications/Xcode_12.4.app
cd heresdk-navigate-ios-4.11.0.0.8255/heresdk.xcframework/ios-arm64
sharpie bind -sdk iphoneos14.4 -framework heresdk.framework
but I only receive this error:
Parsing 1 header files...
Binding...
System.BadImageFormatException: Invalid Image
File name: '/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll'
at (wrapper managed-to-native) System.Reflection.Assembly.LoadFrom(string,bool,System.Threading.StackCrawlMark&)
at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00002] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/Assembly.cs:367
at Sharpie.Bind.Massagers.XamarinApiMappingMassager.Initialize () [0x0002c] in /Users/runner/work/1/s/Sharpie.Bind/Massagers/XamarinApiMappingMassager.cs:50
no types were parsed that could be bound
This is the content of the folder heresdk.framework:
% cd heresdk.framework
% ls -la
total 789992
drwx------ 21 672 May 3 17:07 .
drwx------ 4 128 May 6 14:03 ..
-rw------- 1 5755 Apr 6 10:53 HERE_logo_full.svg
-rw------- 1 5815 Apr 6 10:53 HERE_logo_full_inverted.svg
drwx------ 3 96 May 3 17:06 Headers
-rw------- 1 799 Apr 6 10:52 Info.plist
drwx------ 4 128 May 3 17:06 Modules
drwx------ 3 96 May 3 17:06 _CodeSignature
-rw------- 1 6106 Apr 6 10:53 arrow_cap_medium.obj
drwx------ 9 288 May 3 17:07 geoviz
-rw------- 1 404087792 Apr 6 11:16 heresdk
-rw------- 1 3793 Apr 6 10:53 location_indicator_halo.obj
-rw------- 1 11521 Apr 6 10:53 location_indicator_halo.png
-rw------- 1 20180 Apr 6 10:53 location_indicator_navigation.obj
-rw------- 1 81093 Apr 6 10:53 location_indicator_navigation.png
-rw------- 1 81058 Apr 6 10:53 location_indicator_navigation_gray.png
-rw------- 1 40165 Apr 6 10:53 location_indicator_pedestrian.obj
-rw------- 1 45677 Apr 6 10:53 location_indicator_pedestrian.png
-rw------- 1 45907 Apr 6 10:53 location_indicator_pedestrian_gray.png
drwx------ 4 128 May 3 17:06 magma
drwx------ 47 1504 May 3 17:07 voice_assets
Any ideas what I might missed?
Sorry to say that, we are currently not supporting xamarin. but some customer have implemented that support on their own in the past. Could you please refer the xamarin official doc
https://learn.microsoft.com/en-us/xamarin/?WT.mc_id=dotnet-35129-website
I have a time series object ts. I have mentioned the entire object here. It has data from Jan 2013 to Dec 2017 for all years. I am trying to find the daily average value so that the value is divided by the number of days in a month.
Expected output
The first value for Jan 2013 in ts is 23770, I want the value to be 23770/31 where 31 is the number of days in Jan, second value for Feb 2013 is 23482. I want the value to be 23482/28 as 28 was the number of days in Feb 2013 and so on
Tried so far:
I know monthdays() can do this. Something like ts/monthdays() .Monthdays() returns number of days in a month. I am not able to implement it here. Read about this tapply somewhere but it is not giving me desired result, since i need values corresponding to each month year combination.
ts
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2013 23770 23482 23601 22889 23401 24240 23873 23647 23378 23871 22624 23496
2014 26765 27619 26341 27320 27389 27418 26874 27005 27538 26324 27267 27583
2015 28354 27452 28336 28998 28595 28338 27806 28660 27226 28317 28666 28574
2016 30209 30659 31554 30248 30358 31091 30389 30247 31227 31839 30602 30609
2017 32180 32203 31639 31784 32375 30856 31863 32827 32506 31702 31681 32176
> cycle(ts_actual_group2)
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2013 1 2 3 4 5 6 7 8 9 10 11 12
2014 1 2 3 4 5 6 7 8 9 10 11 12
2015 1 2 3 4 5 6 7 8 9 10 11 12
2016 1 2 3 4 5 6 7 8 9 10 11 12
2017 1 2 3 4 5 6 7 8 9 10 11 12
Using tapply since i read it , but this is not giving desired output
tapply(ts_actual_group2, cycle(ts_actual_group2), mean)
1 2 3 4 5 6 7 8 9 10 11 12
28255.6 28283.0 28294.2 28247.8 28423.6 28388.6 28161.0 28477.2 28375.0 28410.6 28168.0 28487.6
I am not able to implement it here.
I'm not sure why you couldn't. The monthdays function from the forecast package, when applied to a ts object, returns the number of days in each month of the series. The object returned is a time-series of the same dimension as the input. So you can simply divide them.
library(forecast)
ts/monthdays(ts)
Jan Feb Mar Apr May Jun Jul
2013 766.7742 838.6429 761.3226 762.9667 754.8710 808.0000
2014 863.3871 986.3929 849.7097 910.6667 883.5161 913.9333
2015 914.6452 980.4286 914.0645 966.6000 922.4194 944.6000
2016 974.4839 1057.2069 1017.8710 1008.2667 979.2903 1036.3667
2017 1038.0645 1150.1071 1020.6129 1059.4667 1044.3548 1028.5333
monthsdays(ts) # Accepts a time-series object
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2013 31 28 31 30 31 30 31 31 30 31 30 31
2014 31 28 31 30 31 30 31 31 30 31 30 31
2015 31 28 31 30 31 30 31 31 30 31 30 31
2016 31 29 31 30 31 30 31 31 30 31 30 31
2017 31 28 31 30 31 30 31 31 30 31 30 31
When building qtdeclarative, I get the following artifacts:
drwxr-xr-x 6 4.0K Mar 8 21:17 cmake/
-rw-r--r-- 1 2.1M Mar 8 21:19 libQt5QmlDevTools.a
-rw-r--r-- 1 706 Mar 8 21:19 libQt5QmlDevTools.la
-rw-r--r-- 1 1.1K Mar 8 21:19 libQt5QmlDevTools.prl
-rw-r--r-- 1 761 Mar 8 21:07 libQt5Qml.la
-rw-r--r-- 1 1.1K Mar 8 21:07 libQt5Qml.prl
lrwxrwxrwx 1 18 Mar 8 21:12 libQt5Qml.so -> libQt5Qml.so.5.6.3*
lrwxrwxrwx 1 18 Mar 8 21:12 libQt5Qml.so.5 -> libQt5Qml.so.5.6.3*
lrwxrwxrwx 1 18 Mar 8 21:12 libQt5Qml.so.5.6 -> libQt5Qml.so.5.6.3*
-rwxr-xr-x 1 5.1M Mar 8 21:12 libQt5Qml.so.5.6.3*
-rw-r--r-- 1 924 Mar 8 21:12 libQt5Quick.la
-rw-r--r-- 1 998 Mar 8 21:16 libQt5QuickParticles.la
-rw-r--r-- 1 1.3K Mar 8 21:16 libQt5QuickParticles.prl
lrwxrwxrwx 1 29 Mar 8 21:17 libQt5QuickParticles.so -> libQt5QuickParticles.so.5.6.3*
lrwxrwxrwx 1 29 Mar 8 21:17 libQt5QuickParticles.so.5 -> libQt5QuickParticles.so.5.6.3*
lrwxrwxrwx 1 29 Mar 8 21:17 libQt5QuickParticles.so.5.6 -> libQt5QuickParticles.so.5.6.3*
-rwxr-xr-x 1 752K Mar 8 21:17 libQt5QuickParticles.so.5.6.3*
-rw-r--r-- 1 1.3K Mar 8 21:12 libQt5Quick.prl
lrwxrwxrwx 1 20 Mar 8 21:16 libQt5Quick.so -> libQt5Quick.so.5.6.3*
lrwxrwxrwx 1 20 Mar 8 21:16 libQt5Quick.so.5 -> libQt5Quick.so.5.6.3*
lrwxrwxrwx 1 20 Mar 8 21:16 libQt5Quick.so.5.6 -> libQt5Quick.so.5.6.3*
-rwxr-xr-x 1 5.2M Mar 8 21:16 libQt5Quick.so.5.6.3*
-rw-r--r-- 1 887 Mar 8 21:16 libQt5QuickTest.la
-rw-r--r-- 1 1.3K Mar 8 21:16 libQt5QuickTest.prl
lrwxrwxrwx 1 24 Mar 8 21:16 libQt5QuickTest.so -> libQt5QuickTest.so.5.6.3*
lrwxrwxrwx 1 24 Mar 8 21:16 libQt5QuickTest.so.5 -> libQt5QuickTest.so.5.6.3*
lrwxrwxrwx 1 24 Mar 8 21:16 libQt5QuickTest.so.5.6 -> libQt5QuickTest.so.5.6.3*
-rwxr-xr-x 1 167K Mar 8 21:16 libQt5QuickTest.so.5.6.3*
-rw-r--r-- 1 997 Mar 8 21:17 libQt5QuickWidgets.la
-rw-r--r-- 1 1.3K Mar 8 21:17 libQt5QuickWidgets.prl
lrwxrwxrwx 1 27 Mar 8 21:17 libQt5QuickWidgets.so -> libQt5QuickWidgets.so.5.6.3*
lrwxrwxrwx 1 27 Mar 8 21:17 libQt5QuickWidgets.so.5 -> libQt5QuickWidgets.so.5.6.3*
lrwxrwxrwx 1 27 Mar 8 21:17 libQt5QuickWidgets.so.5.6 -> libQt5QuickWidgets.so.5.6.3*
-rwxr-xr-x 1 97K Mar 8 21:17 libQt5QuickWidgets.so.5.6.3*
drwxr-xr-x 2 4.0K Mar 8 21:17 pkgconfig/
I am however looking for libQt5Declarative.so. Is there a build flag I can set somewhere to build this artifact?
It seems there are RPMs out there that contain this file so surely there must be a way to build it: https://rpmfind.net/linux/rpm2html/search.php?query=libQt5Declarative.so.5
According to the documentation, Qt Declarative has been renamed to Qt Quick 1, since Qt 5. So, you have to link with libQtQuick.so, instead.
But, it has been removed in Qt 5.6. You should port your app.
Good afternoon
I have a time series
v2<-c(12,13,15,17,18,12,11,12)
which run from July 1996 to October 1997, just the months between July and October
when I try to convert to time series with
v2.ts<-ts(v2, frequency=12, start=c(1996,7), end=c(1997,10))
It yields me this result
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1996 12 13 15 17 18 12
1997 11 12 12 13 15 17 18 12 11 12
what parameters can I use to make it like:
Jul Aug Sep Oct
1996 12 13 15 17
1997 18 12 11 12
Thanks in advance for the help
A ts series must be regularly spaced but the output shown has points that are one month apart except between Oct of the first year and July of the second year so it is not of that form.
There are several packages that can represent irregularly spaced series. With the zoo package it would be done like this:
library(zoo)
z <- as.zoo(v2.ts)
z[cycle(z) %in% 7:10]
## Jul 1996 Aug 1996 Sep 1996 Oct 1996 Jul 1997 Aug 1997 Sep 1997 Oct 1997
## 12 13 15 17 18 12 11 12
If you are not looking for a time series but just a matrix with the indicated elements then:
tapply(c(v2.ts), list(floor(time(v2.ts)), cycle(v2.ts)), c)[, 7:10]
## 7 8 9 10
## 1996 12 13 15 17
## 1997 18 12 11 12
My question is trivial but some how I cannot find how to sort numbers. I would like it to be order by group and rank (1,2,3,4,5,6,7,8,9,10,11,12,13,14)
means <- ddply(Data, ~Group ~rank, summarise, mean=mean(Foo))
#My column types
str(means)
#'data.frame': 56 obs. of 3 variables:
# $ Group: chr "dEC" "dEC" "dEC" "dEC" ...
# $ rank : chr "1" "10" "11" "12" ...
# $ mean : num 41.4 67.4 NA 65.9 71.3 ...
#means
Group rank mean
1 dEC 1 41.37500
2 dEC 10 67.37500
3 dEC 11 NA
4 dEC 12 65.88889
5 dEC 13 71.33333
6 dEC 14 69.87500
7 dEC 2 60.87500
8 dEC 3 65.75000
9 dEC 4 66.00000
10 dEC 5 64.50000
11 dEC 6 70.25000
12 dEC 7 66.75000
13 dEC 8 65.12500
14 dEC 9 68.75000
15 Sham - dEC 1 46.90909
16 Sham - dEC 10 67.54545
17 Sham - dEC 11 68.90909
18 Sham - dEC 12 70.00000
19 Sham - dEC 13 68.36364
20 Sham - dEC 14 71.27273
21 Sham - dEC 2 55.72727
22 Sham - dEC 3 62.09091
23 Sham - dEC 4 61.54545
24 Sham - dEC 5 66.09091
25 Sham - dEC 6 67.63636
26 Sham - dEC 7 66.09091
27 Sham - dEC 8 65.90909
28 Sham - dEC 9 65.81818
#Desired results
#Ordered means
Group rank mean
1 dEC 1 41.37500
7 dEC 2 60.87500
8 dEC 3 65.75000
9 dEC 4 66.00000
10 dEC 5 64.50000
11 dEC 6 70.25000
12 dEC 7 66.75000
13 dEC 8 65.12500
14 dEC 9 68.75000
2 dEC 10 67.37500
3 dEC 11 NA
4 dEC 12 65.88889
5 dEC 13 71.33333
6 dEC 14 69.87500
15 Sham - dEC 1 46.90909
21 Sham - dEC 2 55.72727
22 Sham - dEC 3 62.09091
23 Sham - dEC 4 61.54545
24 Sham - dEC 5 66.09091
25 Sham - dEC 6 67.63636
26 Sham - dEC 7 66.09091
27 Sham - dEC 8 65.90909
28 Sham - dEC 9 65.81818
16 Sham - dEC 10 67.54545
17 Sham - dEC 11 68.90909
18 Sham - dEC 12 70.00000
19 Sham - dEC 13 68.36364
20 Sham - dEC 14 71.27273
The rank column was not numeric. So, we convert that to 'numeric' from 'character' class and order the columns 'Group' and 'rank'
means[with(means, order(Group,as.numeric(rank))),]
Or another option would be arrange from plyr (as commented by #Wistar)
library(plyr)
arrange(means, Group, as.numeric(rank))
If we are using dplyr, all the steps can be chained together (not tested)
library(dplyr)
Data %>%
group_by(Group, rank) %>%
summarise(mean=mean(Foo)) %>%
arrange(Group, as.numeric(rank))