Ionic Lab, 404 Not Found - ionic-framework

When I try to run "ionic lab", nothing bad happened in the terminal:
ng run app:serve --host=0.0.0.0 --port=8100
ionic-lab http://localhost:8100 --host localhost --port 8200 --app-name ion-Dev --app-version 0.0.1
[INFO] Development server running!
Lab: http://localhost:8200
Local: http://localhost:8100
External: http://192.168.0.108:8100
DevApp: ion-Healthbook#8100 on MacBook-Air-de-Jonathan.local
Use Ctrl+C to quit this process
[INFO] Browser window opened to http://localhost:8200!
[ng] Date: 2018-08-11T19:17:47.922Z
[ng] Hash: 2107c976feaae9ab2daf
[ng] Time: 33926ms
[ng] chunk {common} common.js, common.js.map (common) 21.6 kB [rendered]
[ng] chunk {create-checklist-checklist-module} create-checklist-checklist-module.js, create-checklist-checklist-module.js.map (create-checklist-checklist-module) 21.4 kB [rendered]
[ng] chunk {create-doctor-doctor-module} create-doctor-doctor-module.js, create-doctor-doctor-module.js.map (create-doctor-doctor-module) 37.8 kB [rendered]
[ng] chunk {create-patient-patient-module} create-patient-patient-module.js, create-patient-patient-module.js.map (create-patient-patient-module) 37.4 kB [rendered]
[ng] chunk {edit-doctor-doctor-module} edit-doctor-doctor-module.js, edit-doctor-doctor-module.js.map (edit-doctor-doctor-module) 40.7 kB [rendered]
[ng] chunk {edit-patient-patient-module} edit-patient-patient-module.js, edit-patient-patient-module.js.map (edit-patient-patient-module) 39.6 kB [rendered]
[ng] chunk {listview-checklist-checklist-module} listview-checklist-checklist-module.js, listview-checklist-checklist-module.js.map (listview-checklist-checklist-module) 24.5 kB [rendered]
[ng] chunk {listview-listview-module} listview-listview-module.js, listview-listview-module.js.map (listview-listview-module) 75.9 kB [rendered]
[ng] chunk {login-login-module} login-login-module.js, login-login-module.js.map (login-login-module) 10.4 kB [rendered]
[ng] chunk {main} main.js, main.js.map (main) 54.8 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 226 kB [initial] [rendered]
[ng] chunk {profile-checklist-checklist-module} profile-checklist-checklist-module.js, profile-checklist-checklist-module.js.map (profile-checklist-checklist-module) 24.2 kB [rendered]
[ng] chunk {profile-doctor-send-send-module} profile-doctor-send-send-module.js, profile-doctor-send-send-module.js.map (profile-doctor-send-send-module) 20.9 kB [rendered]
[ng] chunk {profile-profile-module} profile-profile-module.js, profile-profile-module.js.map (profile-profile-module) 276 kB [rendered]
[ng] chunk {profile-proxy-edit-edit-module} profile-proxy-edit-edit-module.js, profile-proxy-edit-edit-module.js.map (profile-proxy-edit-edit-module)28.7 kB [rendered]
[ng] chunk {profile-proxy-new-new-module} profile-proxy-new-new-module.js, profile-proxy-new-new-module.js.map (profile-proxy-new-new-module) 26.6 kB [rendered]
[ng] chunk {profile-proxy-send-send-module} profile-proxy-send-send-module.js, profile-proxy-send-send-module.js.map (profile-proxy-send-send-module)20.9 kB [rendered]
[ng] chunk {profile-send-send-module} profile-send-send-module.js, profile-send-send-module.js.map (profile-send-send-module) 19.3 kB [rendered]
[ng] chunk {profile-send-template-template-module} profile-send-template-template-module.js, profile-send-template-template-module.js.map (profile-send-template-template-module) 13.5 kB [rendered]
[ng] chunk {129} 129.js, 129.js.map () 19.1 kB [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.98 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 68.9 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.44 MB [initial] [rendered]
[ng] chunk {0} 0.js, 0.js.map () 45.6 kB [rendered]
[ng] chunk {1} 1.js, 1.js.map () 43.2 kB [rendered]
[ng] chunk {2} 2.js, 2.js.map () 45.4 kB [rendered]
[ng] chunk {3} 3.js, 3.js.map () 43.1 kB [rendered]
[ng] chunk {4} 4.js, 4.js.map () 2.43 kB [rendered]
[ng] chunk {5} 5.js, 5.js.map () 2.31 kB [rendered]
[ng] chunk {6} 6.js, 6.js.map () 207 kB [rendered]
[ng] chunk {7} 7.js, 7.js.map () 201 kB [rendered]
[ng] chunk {8} 8.js, 8.js.map () 209 kB [rendered]
[ng] chunk {9} 9.js, 9.js.map () 203 kB [rendered]
[ng] chunk {10} 10.js, 10.js.map () 13.5 kB [rendered]
[ng] chunk {11} 11.js, 11.js.map () 21.6 kB [rendered]
[ng] chunk {12} 12.js, 12.js.map () 21.7 kB [rendered]
[ng] chunk {13} 13.js, 13.js.map () 9.13 kB [rendered]
[ng] chunk {14} 14.js, 14.js.map () 9 kB [rendered]
[ng] chunk {15} 15.js, 15.js.map () 9.12 kB [rendered]
[ng] chunk {16} 16.js, 16.js.map () 9 kB [rendered]
[ng] chunk {17} 17.js, 17.js.map () 11.1 kB [rendered]
[ng] chunk {18} 18.js, 18.js.map () 10.9 kB [rendered]
[ng] chunk {19} 19.js, 19.js.map () 11.2 kB [rendered]
[ng] chunk {20} 20.js, 20.js.map () 10.9 kB [rendered]
[ng] chunk {21} 21.js, 21.js.map () 6.71 kB [rendered]
[ng] chunk {22} 22.js, 22.js.map () 6.63 kB [rendered]
[ng] chunk {23} 23.js, 23.js.map () 6.71 kB [rendered]
[ng] chunk {24} 24.js, 24.js.map () 6.63 kB [rendered]
[ng] chunk {25} 25.js, 25.js.map () 23.4 kB [rendered]
[ng] chunk {26} 26.js, 26.js.map () 22.8 kB [rendered]
[ng] chunk {27} 27.js, 27.js.map () 23.2 kB [rendered]
[ng] chunk {28} 28.js, 28.js.map () 22.6 kB [rendered]
[ng] chunk {29} 29.js, 29.js.map () 9.62 kB [rendered]
[ng] chunk {30} 30.js, 30.js.map () 9.51 kB [rendered]
[ng] chunk {31} 31.js, 31.js.map () 9.33 kB [rendered]
[ng] chunk {32} 32.js, 32.js.map () 9.24 kB [rendered]
[ng] chunk {33} 33.js, 33.js.map () 14.4 kB [rendered]
[ng] chunk {34} 34.js, 34.js.map () 14.2 kB [rendered]
[ng] chunk {35} 35.js, 35.js.map () 14.6 kB [rendered]
[ng] chunk {36} 36.js, 36.js.map () 14.3 kB [rendered]
[ng] chunk {37} 37.js, 37.js.map () 9.76 kB [rendered]
[ng] chunk {38} 38.js, 38.js.map () 9.65 kB [rendered]
[ng] chunk {39} 39.js, 39.js.map () 7.21 kB [rendered]
[ng] chunk {40} 40.js, 40.js.map () 7.05 kB [rendered]
[ng] chunk {41} 41.js, 41.js.map () 19.5 kB [rendered]
[ng] chunk {42} 42.js, 42.js.map () 19.2 kB [rendered]
[ng] chunk {43} 43.js, 43.js.map () 19.2 kB [rendered]
[ng] chunk {44} 44.js, 44.js.map () 19 kB [rendered]
[ng] chunk {45} 45.js, 45.js.map () 36.6 kB [rendered]
[ng] chunk {46} 46.js, 46.js.map () 36.4 kB [rendered]
[ng] chunk {47} 47.js, 47.js.map () 17.1 kB [rendered]
[ng] chunk {48} 48.js, 48.js.map () 16.5 kB [rendered]
[ng] chunk {49} 49.js, 49.js.map () 17 kB [rendered]
[ng] chunk {50} 50.js, 50.js.map () 16.5 kB [rendered]
[ng] chunk {51} 51.js, 51.js.map () 5.7 kB [rendered]
[ng] chunk {52} 52.js, 52.js.map () 2.44 kB [rendered]
[ng] chunk {53} 53.js, 53.js.map () 2.41 kB [rendered]
[ng] chunk {54} 54.js, 54.js.map () 13.1 kB [rendered]
[ng] chunk {55} 55.js, 55.js.map () 13.1 kB [rendered]
[ng] chunk {56} 56.js, 56.js.map () 18.4 kB [rendered]
[ng] chunk {57} 57.js, 57.js.map () 18 kB [rendered]
[ng] chunk {58} 58.js, 58.js.map () 18.3 kB [rendered]
[ng] chunk {59} 59.js, 59.js.map () 18 kB [rendered]
[ng] chunk {60} 60.js, 60.js.map () 24.5 kB [rendered]
[ng] chunk {61} 61.js, 61.js.map () 23.3 kB [rendered]
[ng] chunk {62} 62.js, 62.js.map () 24.3 kB [rendered]
[ng] chunk {63} 63.js, 63.js.map () 23.1 kB [rendered]
[ng] chunk {64} 64.js, 64.js.map () 14.2 kB [rendered]
[ng] chunk {65} 65.js, 65.js.map () 14.1 kB [rendered]
[ng] chunk {66} 66.js, 66.js.map () 16.2 kB [rendered]
[ng] chunk {67} 67.js, 67.js.map () 16 kB [rendered]
[ng] chunk {68} 68.js, 68.js.map () 21.7 kB [rendered]
[ng] chunk {69} 69.js, 69.js.map () 21.2 kB [rendered]
[ng] chunk {70} 70.js, 70.js.map () 21.6 kB [rendered]
[ng] chunk {71} 71.js, 71.js.map () 21.2 kB [rendered]
[ng] chunk {72} 72.js, 72.js.map () 16.3 kB [rendered]
[ng] chunk {73} 73.js, 73.js.map () 16.4 kB [rendered]
[ng] chunk {74} 74.js, 74.js.map () 2.8 kB [rendered]
[ng] chunk {75} 75.js, 75.js.map () 19.6 kB [rendered]
[ng] chunk {76} 76.js, 76.js.map () 19.1 kB [rendered]
[ng] chunk {77} 77.js, 77.js.map () 2.93 kB [rendered]
[ng] chunk {78} 78.js, 78.js.map () 2.95 kB [rendered]
[ng] chunk {79} 79.js, 79.js.map () 15.7 kB [rendered]
[ng] chunk {80} 80.js, 80.js.map () 15.6 kB [rendered]
[ng] chunk {81} 81.js, 81.js.map () 14 kB [rendered]
[ng] chunk {82} 82.js, 82.js.map () 7.3 kB [rendered]
[ng] chunk {83} 83.js, 83.js.map () 7.25 kB [rendered]
[ng] chunk {84} 84.js, 84.js.map () 17.3 kB [rendered]
[ng] chunk {85} 85.js, 85.js.map () 21.1 kB [rendered]
[ng] chunk {86} 86.js, 86.js.map () 19.8 kB [rendered]
[ng] chunk {87} 87.js, 87.js.map () 19.6 kB [rendered]
[ng] chunk {88} 88.js, 88.js.map () 19 kB [rendered]
[ng] chunk {89} 89.js, 89.js.map () 13.4 kB [rendered]
[ng] chunk {90} 90.js, 90.js.map () 13 kB [rendered]
[ng] chunk {91} 91.js, 91.js.map () 12.8 kB [rendered]
[ng] chunk {92} 92.js, 92.js.map () 12.5 kB [rendered]
[ng] chunk {93} 93.js, 93.js.map () 9.05 kB [rendered]
[ng] chunk {94} 94.js, 94.js.map () 1.6 kB [rendered]
[ng] chunk {95} 95.js, 95.js.map () 12.2 kB [rendered]
[ng] chunk {96} 96.js, 96.js.map () 11.7 kB [rendered]
[ng] chunk {97} 97.js, 97.js.map () 12.2 kB [rendered]
[ng] chunk {98} 98.js, 98.js.map () 11.7 kB [rendered]
[ng] chunk {99} 99.js, 99.js.map () 9.68 kB [rendered]
[ng] chunk {100} 100.js, 100.js.map () 9.7 kB [rendered]
[ng] chunk {101} 101.js, 101.js.map () 32.2 kB [rendered]
[ng] chunk {102} 102.js, 102.js.map () 30.3 kB [rendered]
[ng] chunk {103} 103.js, 103.js.map () 33.6 kB [rendered]
[ng] chunk {104} 104.js, 104.js.map () 31.5 kB [rendered]
[ng] chunk {105} 105.js, 105.js.map () 6.61 kB [rendered]
[ng] chunk {106} 106.js, 106.js.map () 6.59 kB [rendered]
[ng] chunk {107} 107.js, 107.js.map () 10.5 kB [rendered]
[ng] chunk {108} 108.js, 108.js.map () 10.3 kB [rendered]
[ng] chunk {109} 109.js, 109.js.map () 10.5 kB [rendered]
[ng] chunk {110} 110.js, 110.js.map () 10.3 kB [rendered]
[ng] chunk {111} 111.js, 111.js.map () 16.4 kB [rendered]
[ng] chunk {112} 112.js, 112.js.map () 16.1 kB [rendered]
[ng] chunk {113} 113.js, 113.js.map () 20.1 kB [rendered]
[ng] chunk {114} 114.js, 114.js.map () 19.7 kB [rendered]
[ng] chunk {115} 115.js, 115.js.map () 19.1 kB [rendered]
[ng] chunk {116} 116.js, 116.js.map () 18.9 kB [rendered]
[ng] chunk {117} 117.js, 117.js.map () 9.46 kB [rendered]
[ng] chunk {118} 118.js, 118.js.map () 14.7 kB [rendered]
[ng] chunk {119} 119.js, 119.js.map () 1.28 kB [rendered]
[ng] chunk {120} 120.js, 120.js.map () 2.36 kB [rendered]
[ng] chunk {121} 121.js, 121.js.map () 1.39 kB [rendered]
[ng] chunk {122} 122.js, 122.js.map () 8.11 kB [rendered]
[ng] chunk {123} 123.js, 123.js.map () 9.87 kB [rendered]
[ng] chunk {124} 124.js, 124.js.map () 4.64 kB [rendered]
[ng] chunk {125} 125.js, 125.js.map () 1.8 kB [rendered]
[ng] chunk {126} 126.js, 126.js.map () 3.94 kB [rendered]
[ng] chunk {127} 127.js, 127.js.map () 6.35 kB [rendered]
[ng] chunk {128} 128.js, 128.js.map () 10.5 kB [rendered]
[ng] ℹ 「wdm」: Compiled successfully.
But in the browser I don't see anything, in the console shows this error:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8200/build/ionlab/ionlab.z0nyl9ye.js
package = "#ionic/lab": "^1.0.6"
If I use "ionic serve" everything works fine.
Maybe If I could change the port of ionic lab.
I'm using Ionic Lab on Ionic 4.0.5.
Thanks!

to solve the problem go to the folder
Path_to_your_project\node_modules\#ionic\lab\www\build\ionlab
and rename the file ionlab.925lkwi9.js to ionlab.z0nyl9ye.js.
Now it should work.

Related

how to fix ceph warning "storage filling up"

i have a cluster ceph and in monitoring tab dashboard show me warning "storage filling up"
alertname
storage filling up
description
Mountpoint /rootfs/run on ceph2-node-03.fns will be full in less than 5 days assuming the average fill-up rate of the past 48 hours.
but all devices is free
[root#ceph2-node-01 ~]# ceph osd df
ID CLASS WEIGHT REWEIGHT SIZE RAW USE DATA OMAP META AVAIL %USE VAR PGS STATUS
0 hdd 0.01900 1.00000 20 GiB 61 MiB 15 MiB 0 B 44 MiB 20 GiB 0.30 0.92 0 up
3 ssd 0.01900 1.00000 20 GiB 69 MiB 15 MiB 5 KiB 53 MiB 20 GiB 0.33 1.04 1 up
1 hdd 0.01900 1.00000 20 GiB 76 MiB 16 MiB 6 KiB 60 MiB 20 GiB 0.37 1.15 0 up
4 ssd 0.01900 1.00000 20 GiB 68 MiB 15 MiB 3 KiB 52 MiB 20 GiB 0.33 1.03 1 up
2 hdd 0.01900 1.00000 20 GiB 66 MiB 16 MiB 6 KiB 50 MiB 20 GiB 0.32 1.00 0 up
5 ssd 0.01900 1.00000 20 GiB 57 MiB 15 MiB 5 KiB 41 MiB 20 GiB 0.28 0.86 1 up
TOTAL 120 GiB 396 MiB 92 MiB 28 KiB 300 MiB 120 GiB 0.32
MIN/MAX VAR: 0.86/1.15 STDDEV: 0.03
what should i do to fix this warning?
this is bug or ...?

How to debug SwiftUI Widget memory issue?

I'm creating a widget in swiftui, with a prefilled mock json, stored locally.
Mock JSON has following data:
{
"id":"111",
"title":"some dummy title",
"date":"1609865285",
"thumbnail":"mock4"
}
and mock4 image is stored in the Assets folder.
I load the mock data in the timeline method as follows:
for mockItem in storyManager.getMockData() {
let item = WidgetFeedItem(newsData: mockItem)
items.append(item)
}
let entry = FeedItemEntry(date: Date(), items: entries)
if let nextDate = Calendar.current.date(byAdding: .minute, value: 15, to: Date()) {
let timeline = Timeline(entries: [entry], policy: .after(nextDate))
completion(timeline)
}
struct WidgetFeedItem: Hashable {
var newsTitle = ""
var newsDate = Date()
var newsID = ""
var newsimageURL = ""
var articleLink = ""
var deviceName = ""
init(newsData: NSDictionary) {
newsID = newsData.getStringForKey("id")
newsTitle = newsData.getStringForKey("title")
newsDate = newsData.getDateForKey("date")
deviceName = newsData.getStringForKey("device_name")
newsimageURL = newsData.getStringForKey("thumbnail")
articleLink = newsData.getStringForKey("link")
}
}
my widgetui is also a simple one:
var body: some View {
ZStack {
VStack {
header
Spacer()
largeBody
Rectangle().fill(Color("separatorColor")).frame(height: 1).padding(.horizontal, 20)
Spacer()
}
getHeaderIcon()
}
}
var header: some View {
ZStack {
if let url = getDeepLink(.none, .header) {
Link(destination: url) {
getHeaderBackground()
getHeaderLabel()
}
}
}
}
var largeBody: some View {
ForEach(entry.items, id: \.self) { item in
HStack {
if let url = getDeepLink(item, .storySubtitle) {
Link(destination: url) {
getImage(item)
getHeadlines(item)
Spacer()
}
}
}.padding(.leading, 20)
.padding(.trailing, 50)
}
}
func getHeaderBackground() -> some View {
VStack {
if isGreenApp() {
Rectangle().fill(LinearGradient(gradient: Gradient(colors: [Color("gr1"), Color("gr2")]), startPoint: .top, endPoint: .bottom)).frame(height: 36)
}
else {
Rectangle().fill(Color("WidgetBackground")).frame(height: 36)
}
}
}
func getHeaderLabel() -> some View {
VStack {
HStack {
Text(getHeaderTitle()).foregroundColor(.white).font(headerFont)
Spacer()
}.padding(.leading, 15)
}
}
func getHeaderIcon() -> some View {
VStack {
if let url = getDeepLink(.none, .header) {
Link(destination: url) {
HStack {
Spacer()
Image("headerIcon").resizable().frame(width: 35, height: 35, alignment: .center).padding(.trailing, 20).padding(.top, 20)
}
}
}
Spacer()
}
}
func getHeadlines(_ item: WidgetFeedItem?) -> some View {
VStack(alignment: .leading) {
Text(item?.newsTitle ?? "").font(titleFont).foregroundColor(Color("textColor")).fixedSize(horizontal: false, vertical: true).lineLimit(3)
Text(item?.newsDate.articleDateFormatForWidget() ?? "").font(subtitleFont).foregroundColor(Color("textColor"))
}
}
func getImage(_ item: WidgetFeedItem?) -> some View {
return HStack {
Image("newsImage")
.data(url: URL(string: item?.newsimageURL ?? "")!).frame(width: 80, height: 50)
}
}
Everything works great, except this setup crashing everytime I try to reload the widget, and observe the memory on Leaks Instrument.
Intially memory consumption is well below 15MB, but after second reload, it jumps to 30MB and crashes.
All the assets I have in local folder did NOT exceed more than 2.5MB and 1.0MB for the custom fonts.
Debuggin MemoryGraph:
I exported the memorygraph at the time of crash, and I got the following info:
Summary:
Physical footprint: 34.4M
Physical footprint (peak): 34.4M
----
ReadOnly portion of Libraries: Total=505.5M resident=218.4M(43%) swapped_out_or_unallocated=287.1M(57%)
Writable regions: Total=615.1M written=24.3M(4%) resident=33.2M(5%) swapped_out=0K(0%) unallocated=581.9M(95%)
VIRTUAL RESIDENT DIRTY SWAPPED VOLATILE NONVOL EMPTY REGION
REGION TYPE SIZE SIZE SIZE SIZE SIZE SIZE SIZE COUNT (non-coalesced)
=========== ======= ======== ===== ======= ======== ====== ===== =======
Activity Tracing 256K 32K 32K 0K 0K 32K 0K 1
CoreAnimation 16K 16K 16K 0K 0K 0K 0K 1
CoreUI image data 5632K 5632K 5632K 0K 0K 0K 0K 1
Foundation 784K 784K 784K 0K 0K 0K 0K 5
IOKit 224K 224K 224K 0K 0K 0K 0K 14
Kernel Alloc Once 32K 16K 16K 0K 0K 0K 0K 1
MALLOC guard page 128K 0K 0K 0K 0K 0K 0K 8
MALLOC metadata 240K 208K 208K 0K 0K 0K 0K 11
MALLOC_LARGE 1632K 1632K 1632K 0K 0K 0K 0K 30 see MALLOC ZONE table below
MALLOC_LARGE metadata 16K 16K 16K 0K 0K 0K 0K 1 see MALLOC ZONE table below
MALLOC_NANO 512.0M 2128K 2128K 0K 0K 0K 0K 1 see MALLOC ZONE table below
MALLOC_SMALL 48.0M 1008K 976K 0K 0K 0K 0K 6 see MALLOC ZONE table below
MALLOC_TINY 7168K 592K 576K 0K 0K 0K 0K 7 see MALLOC ZONE table below
Performance tool data 32.9M 19.8M 19.7M 0K 0K 0K 0K 10 not counted in TOTAL below
STACK GUARD 96K 0K 0K 0K 0K 0K 0K 6
Stack 3728K 304K 272K 0K 0K 0K 0K 6
Stack (reserved) 544K 0K 0K 0K 0K 0K 0K 1 reserved VM address space (unallocated)
Stack Guard 16K 0K 0K 0K 0K 0K 0K 1
VM_ALLOCATE 2608K 1504K 1488K 0K 0K 0K 0K 5
VM_ALLOCATE (reserved) 16K 0K 0K 0K 0K 0K 0K 1 reserved VM address space (unallocated)
__AUTH 1946K 1898K 82K 0K 0K 0K 0K 264
__AUTH_CONST 14.8M 8245K 3432 0K 0K 0K 0K 389
__DATA 9926K 5739K 944K 0K 0K 0K 0K 381
__DATA_CONST 12.9M 9.8M 80K 0K 0K 0K 0K 394
__DATA_DIRTY 1325K 1245K 661K 0K 0K 0K 0K 319
__FONT_DATA 4K 0K 0K 0K 0K 0K 0K 1
__LINKEDIT 152.2M 28.7M 0K 0K 0K 0K 0K 8
__OBJC_CONST 2883K 2883K 13K 0K 0K 0K 0K 237
__OBJC_RO 71.2M 55.0M 0K 0K 0K 0K 0K 1
__OBJC_RW 2896K 1805K 13K 0K 0K 0K 0K 1
__TEXT 353.3M 189.7M 80K 0K 0K 0K 0K 414
__UNICODE 588K 528K 0K 0K 0K 0K 0K 1
mapped file 31.9M 4592K 48K 0K 0K 0K 0K 9
shared memory 48K 48K 48K 0K 0K 0K 0K 3
unused but dirty shlib __DATA 268K 268K 268K 0K 0K 0K 0K 74
=========== ======= ======== ===== ======= ======== ====== ===== =======
TOTAL 1.2G 323.5M 15.9M 0K 0K 32K 0K 2603
TOTAL, minus reserved VM space 1.2G 323.5M 15.9M 0K 0K 32K 0K 2603
VIRTUAL RESIDENT DIRTY SWAPPED ALLOCATION BYTES DIRTY+SWAP REGION
MALLOC ZONE SIZE SIZE SIZE SIZE COUNT ALLOCATED FRAG SIZE % FRAG COUNT
=========== ======= ========= ========= ========= ========= ========= ========= ====== ======
DefaultMallocZone_0x10227c000 512.0M 2128K 2128K 0K 15522 888K 1240K 59% 1
MallocHelperZone_0x102254000 55.6M 3216K 3168K 0K 1056 2559K 609K 20% 43
QuartzCore_0x1023b0000 1024K 32K 32K 0K 7 1888 30K 95% 1
=========== ======= ========= ========= ========= ========= ========= ========= ====== ======
TOTAL 568.6M 5376K 5328K 0K 16585 3449K 1879K 36% 45
Heap Info:
Physical footprint: 34.4M
Physical footprint (peak): 34.4M
----
Process 409: 3 zones
All zones: 16585 nodes malloced - Sizes: 1024KB[1] 64KB[1] 48KB[1] 32KB[4] 16KB[23] 13KB[4] 12KB[1] 10KB[2] 9KB[1] 8.5KB[7] 8KB[18] 6.5KB[1] 5KB[5] 4.5KB[3] 4KB[13] 3.5KB[6] 3KB[13] 2.5KB[15] 2KB[25] 1.5KB[40] 1KB[20] 1008[1] 960[1] 944[1] 896[1] 880[1] 864[15] 848[1] 832[1] 800[9] 784[9] 768[2] 752[5] 688[6] 672[1] 656[32] 640[8] 624[1] 608[15] 592[2] 576[3] 544[22] 528[14] 512[52] 480[53] 464[12] 448[3] 432[12] 400[10] 384[18] 368[173] 352[60] 336[39] 320[12] 304[9] 288[35] 272[29] 256[76] 240[36] 224[21] 208[224] 192[66] 176[97] 160[140] 144[84] 128[523] 112[920] 96[617] 80[858] 64[1638] 48[3851] 32[5588] 16[974]
Found 491 ObjC classes
Found 483 Swift classes
Found 143 CFTypes
-----------------------------------------------------------------------
All zones: 16585 nodes (3531952 bytes)
COUNT BYTES AVG CLASS_NAME TYPE BINARY
===== ===== === ========== ==== ======
3327 1837840 552.4 non-object
1948 62336 32.0 Class.data (class_rw_t) C libobjc.A.dylib
1011 32352 32.0 NSMutableDictionary ObjC CoreFoundation
973 172160 176.9 NSMutableDictionary (Storage) C CoreFoundation
857 43008 50.2 CFString ObjC CoreFoundation
571 27408 48.0 Class.data.extended (class_rw_ext_t) C libobjc.A.dylib
458 120336 262.7 CFData ObjC CoreFoundation
454 21792 48.0 NSMutableArray ObjC CoreFoundation
437 13808 31.6 NSMutableArray (Storage) C CoreFoundation
346 17888 51.7 Swift closure context Swift <unknown>
267 44640 167.2 Class.methodCache._buckets (bucket_t) C libobjc.A.dylib
256 15120 59.1 __NSMallocBlock__ ObjC libsystem_blocks.dylib
231 7392 32.0 NSDictionary ObjC CoreFoundation
231 3696 16.0 NSDictionary.cow (struct __cow_state_t) C CoreFoundation
228 80304 352.2 NSDictionary (Storage) C CoreFoundation
176 5632 32.0 NSNumber ObjC CoreFoundation
134 8704 65.0 Class.data.methods (method_array_t) C libobjc.A.dylib
133 6784 51.0 _ContiguousArrayStorage<AGAttribute> Swift libswiftCore.dylib
104 13280 127.7 _ContiguousArrayStorage<DisplayList.Item> Swift libswiftCore.dylib
100 43312 433.1 NSDictionary ObjC CoreFoundation
88 8448 96.0 TypedElement<AccessibilityProperties.ViewTypeDescription> Swift SwiftUI
81 4560 56.3 __NSMallocBlock__ ObjC libsystem_blocks.dylib
80 3216 40.2 NSArray ObjC CoreFoundation
72 4608 64.0 TypedElement<AccessibilityProperties.TraitsKey> Swift SwiftUI
69 4384 63.5 _ContiguousArrayStorage<ViewTransform.Chunk> Swift libswiftCore.dylib
69 3312 48.0 Chunk Swift SwiftUI
69 3312 48.0 _ContiguousArrayStorage<ViewTransform.Chunk.Tag> Swift libswiftCore.dylib
68 3264 48.0 _ContiguousArrayStorage<CGFloat> Swift libswiftCore.dylib
66 1056 16.0 NSArray ObjC CoreFoundation
59 19360 328.1 CFDictionary (Value Storage) C CoreFoundation
58 5568 96.0 TypedElement<AccessibilityProperties.LabelKey> Swift SwiftUI
57 912 16.0 NSSet ObjC CoreFoundation
55 2640 48.0 NSKeyValueObservance ObjC Foundation
52 4352 83.7 CFString (Storage) C CoreFoundation
49 10192 208.0 UITraitCollection ObjC UIKitCore
47 22560 480.0 ResolvedStyledText Swift SwiftUI
47 16544 352.0 _ContiguousArrayStorage<AccessibilityNodeAttachment> Swift libswiftCore.dylib
47 2256 48.0 __SharedStringStorage Swift libswiftCore.dylib
47 1504 32.0 NSConcreteMutableAttributedString ObjC Foundation
47 752 16.0 NSMutableRLEArray ObjC Foundation
44 2816 64.0 CFDictionary ObjC CoreFoundation
44 1408 32.0 AGSubgraph CFType AttributeGraph
41 2624 64.0 TypedElement<AccessibilityProperties.InputLabelsKey> Swift SwiftUI
40 1840 46.0 Class.data.properties (property_array_t) C libobjc.A.dylib
36 13440 373.3 CFDictionary (Key Storage) C CoreFoundation
36 2304 64.0 OS_os_log ObjC libsystem_trace.dylib
35 4496 128.5 _ContiguousArrayStorage<PreferencesOutputs.KeyValue> Swift libswiftCore.dylib
35 1120 32.0 NSAttributeDictionaryEnumerator ObjC UIFoundation
34 2048 60.2 _ContiguousArrayStorage<AccessibilityNode> Swift libswiftCore.dylib
33 3696 112.0 CUIRenditionKey ObjC
I actually posted only part of heap log, due to body limit on SO.
How do I go forward from here and debug more and find why my widget is eating more memory ?
Note: It is only crashing whenever I try to profile in instruments. In normal cases, the memory consumption stayed below 12MB.
Sometimes profiler doesn't show some memory issues. You can try to look at the pictures. For example backgrounds: try to use 1px templates instead of large pictures:
And code:
.background(
Image("1px_background")
.resizable()
.aspectRatio(contentMode: .fill)
)

GIMP get current image reference number to operate on current image

I have more than one image open, and I'd like to run scrip-fu functions on the currently selected image. How can I get the image reference number to the currently selected image so I can use the reference in other functions (e.g. (gimp-image-width 7))? I'm using GIMP 2.10.12.
Using (gimp-image-list) lists all the image references:
> (gimp-image-list)
(12 #(12 11 10 9 8 7 6 5 4 3 2 1))
I've been using (gimp-image-latest) for this, which should work for the general case
(define (gimp-image-list-items)
(cadr (gimp-image-list)))
(define (gimp-image-latest)
(aref (gimp-image-list-items) 0))
(define img (gimp-image-latest))
Then it's in img. E.g.:
> (gimp-image-get-layers img)
(283 #(770 769 768 767 766 765 764 763 762 761 760 759 758 757 756 755 754 753 752 751 750 749 748 747 746 745 744 743 742 741 740 739 738 737 736 735 734 733 732 731 730 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 703 702 701 700 699 698 697 696 695 694 693 692 691 690 689 688 687 686 685 684 683 682 681 680 679 678 677 676 675 674 673 672 671 670 669 668 667 666 665 664 663 662 661 660 659 658 657 656 655 654 653 652 651 650 649 648 647 646 645 644 643 642 641 640 639 638 637 636 635 634 633 632 631 630 629 628 627 626 625 624 623 622 621 620 619 618 617 616 615 614 613 612 611 610 609 608 607 606 605 604 603 602 601 600 599 598 597 596 595 594 593 592 591 590 589 588 587 586 585 584 583 582 581 580 579 578 577 576 575 574 573 572 571 570 569 568 567 566 565 564 563 562 561 560 559 558 557 556 555 554 553 552 551 550 549 548 547 546 545 544 543 542 541 540 539 538 537 536 535 534 533 532 531 530 529 528 527 526 525 524 523 522 521 520 519 518 517 516 515 514 513 512 511 510 509 508 507 506 505 504 503 502 501 500 499 498 497 496 495 494 493 492 491 490 489 488))

Clojure with boot-clj and Emacs - minimal application

How to get to run a minimal Clojure app with boot-clj and Emacs?
I installed the Boot application and ran boot -h twice. Then I got this
s#Lux:~$ boot -V
#http://boot-clj.com
#Mon Feb 04 00:23:28 CET 2019
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.8.2
s#Lux:~$
My Emacs is of the version as follows
GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-09-15, modified by Debian
I installed cider, clojure-mode and projectile.
I configured Emacs with a tutorial of this https://github.com/boot-clj/boot/wiki/Cider-REPL#a-better-way
and got a configuration file:
s#Lux:~$ cat ~/.emacs.d/init.el
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(custom-set-variables
'(cider-boot-parameters (quote "cider repl -s wait"))
'(package-selected-packages (quote (projectile clojure-mode-extra-font-locking cider))))
s#Lux:~$
Then I typed out this
C-x C-f ~/Dropbox/Clojure/myapp2/src/myapp2/core.clj
and the file opened.
Here you are the file's code:
s#Lux:~$ cat ~/Dropbox/Clojure/myapp2/src/myapp2/core.clj
(ns myapp2.core
(:gen-class))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
s#Lux:~$
The file is in a project generated by a boot-clj command boot -d boot/new new -t app -n myapp2
Then I typed out this M-x cider-jack-in and got an error:
line: 1
error in process sentinel: Could not start nREPL server: Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.10.0
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.10.0
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.10.0
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1032
boot.core/run-tasks core.clj: 1022
boot.task.built-in/fn/fn/fn/fn built_in.clj: 492
clojure.core/deref core.clj: 2228
...
boot.task.built-in/fn/fn/fn built_in.clj: 489
clojure.core/apply core.clj: 646
...
boot.core/launch-nrepl core.clj: 1313
boot.repl/launch-nrepl repl.clj: 60
boot.repl-server/start-server repl_server.clj: 68
boot.repl-server/->mw-list repl_server.clj: 59
...
clojure.core/mapcat core.clj: 2674 (repeats 2 times)
clojure.core/apply core.clj: 646
...
clojure.core/map/fn core.clj: 2644
boot.repl-server/->mw-list repl_server.clj: 55
boot.repl-server/->var repl_server.clj: 49
...
clojure.core/require core.clj: 5796 (repeats 2 times)
clojure.core/apply core.clj: 648
...
clojure.core/load-libs core.clj: 5758
clojure.core/load-libs core.clj: 5774
clojure.core/apply core.clj: 648
...
clojure.core/load-lib core.clj: 5717
clojure.core/load-lib core.clj: 5736
clojure.core/load-lib/fn core.clj: 5737
clojure.core/load-one core.clj: 5697
...
clojure.core/load core.clj: 5876
clojure.core/load core.clj: 5892
clojure.core/load/fn core.clj: 5893
...
refactor-nrepl.middleware/eval2021 middleware.clj: 1
refactor-nrepl.middleware/eval2021/loading--auto-- middleware.clj: 1
...
clojure.core/require core.clj: 5796 (repeats 2 times)
clojure.core/apply core.clj: 648
...
clojure.core/load-libs core.clj: 5758
clojure.core/load-libs core.clj: 5774
clojure.core/apply core.clj: 648
...
clojure.core/load-lib core.clj: 5717
clojure.core/load-lib core.clj: 5736
clojure.core/load-lib/fn core.clj: 5737
clojure.core/load-one core.clj: 5697
...
clojure.core/load core.clj: 5876
clojure.core/load core.clj: 5892
clojure.core/load/fn core.clj: 5893
...
refactor-nrepl.ns.resolve-missing/eval14613 resolve_missing.clj: 1
refactor-nrepl.ns.resolve-missing/eval14613/loading--auto-- resolve_missing.clj: 1
...
clojure.core/require core.clj: 5796 (repeats 2 times)
clojure.core/apply core.clj: 648
...
clojure.core/load-libs core.clj: 5758
clojure.core/load-libs core.clj: 5774
clojure.core/apply core.clj: 648
...
clojure.core/load-lib core.clj: 5717
clojure.core/load-lib core.clj: 5755
clojure.core/apply core.clj: 648
...
clojure.core/refer core.clj: 4087
clojure.core/refer core.clj: 4119
java.lang.IllegalAccessError: info-clj does not exist
clojure.lang.ExceptionInfo: info-clj does not exist
line: 1
But when I removed the
'(cider-boot-parameters (quote "cider repl -s wait"))
line from the configuration, restarted Emacs, run cider-jack-in, cider started successfully. So I could run Clojure commands such as (range 5) etc.
But when I tried to run the application and put out (-main) it crashed and an info that an error took place and the main symbol could not be resolved:
user> (-main)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: -main in this context, compiling:(*cider-repl Clojure/myapp2:localhost:45545(clj)*:43:7)
user>
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (24 frames hidden)
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling *cider-repl Clojure/myapp2:localhost:45545(clj)* at (43:7)
Compiler.java: 6688 clojure.lang.Compiler/analyze
Compiler.java: 6625 clojure.lang.Compiler/analyze
Compiler.java: 3766 clojure.lang.Compiler$InvokeExpr/parse
Compiler.java: 6870 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6669 clojure.lang.Compiler/analyze
Compiler.java: 6625 clojure.lang.Compiler/analyze
Compiler.java: 6001 clojure.lang.Compiler$BodyExpr$Parser/parse
Compiler.java: 5380 clojure.lang.Compiler$FnMethod/parse
Compiler.java: 3972 clojure.lang.Compiler$FnExpr/parse
Compiler.java: 6866 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6669 clojure.lang.Compiler/analyze
Compiler.java: 6924 clojure.lang.Compiler/eval
Compiler.java: 6890 clojure.lang.Compiler/eval
core.clj: 3105 clojure.core/eval
core.clj: 3101 clojure.core/eval
main.clj: 240 clojure.main/repl/read-eval-print/fn
main.clj: 240 clojure.main/repl/read-eval-print
main.clj: 258 clojure.main/repl/fn
main.clj: 258 clojure.main/repl
main.clj: 174 clojure.main/repl
RestFn.java: 1523 clojure.lang.RestFn/invoke
interruptible_eval.clj: 83 nrepl.middleware.interruptible-eval/evaluate/fn
AFn.java: 152 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 646 clojure.core/apply
core.clj: 1881 clojure.core/with-bindings*
core.clj: 1881 clojure.core/with-bindings*
RestFn.java: 425 clojure.lang.RestFn/invoke
interruptible_eval.clj: 81 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 50 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 221 nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
interruptible_eval.clj: 189 nrepl.middleware.interruptible-eval/run-next/fn
AFn.java: 22 clojure.lang.AFn/run
ThreadPoolExecutor.java: 1149 java.util.concurrent.ThreadPoolExecutor/runWorker
ThreadPoolExecutor.java: 624 java.util.concurrent.ThreadPoolExecutor$Worker/run
Thread.java: 748 java.lang.Thread/run
1. Caused by java.lang.RuntimeException
Unable to resolve symbol: -main in this context
Util.java: 221 clojure.lang.Util/runtimeException
Compiler.java: 7164 clojure.lang.Compiler/resolveIn
Compiler.java: 7108 clojure.lang.Compiler/resolve
Compiler.java: 7069 clojure.lang.Compiler/analyzeSymbol
Compiler.java: 6648 clojure.lang.Compiler/analyze
Compiler.java: 6625 clojure.lang.Compiler/analyze
Compiler.java: 3766 clojure.lang.Compiler$InvokeExpr/parse
Compiler.java: 6870 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6669 clojure.lang.Compiler/analyze
Compiler.java: 6625 clojure.lang.Compiler/analyze
Compiler.java: 6001 clojure.lang.Compiler$BodyExpr$Parser/parse
Compiler.java: 5380 clojure.lang.Compiler$FnMethod/parse
Compiler.java: 3972 clojure.lang.Compiler$FnExpr/parse
Compiler.java: 6866 clojure.lang.Compiler/analyzeSeq
Compiler.java: 6669 clojure.lang.Compiler/analyze
Compiler.java: 6924 clojure.lang.Compiler/eval
Compiler.java: 6890 clojure.lang.Compiler/eval
core.clj: 3105 clojure.core/eval
core.clj: 3101 clojure.core/eval
main.clj: 240 clojure.main/repl/read-eval-print/fn
main.clj: 240 clojure.main/repl/read-eval-print
main.clj: 258 clojure.main/repl/fn
main.clj: 258 clojure.main/repl
main.clj: 174 clojure.main/repl
RestFn.java: 1523 clojure.lang.RestFn/invoke
interruptible_eval.clj: 83 nrepl.middleware.interruptible-eval/evaluate/fn
AFn.java: 152 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 646 clojure.core/apply
core.clj: 1881 clojure.core/with-bindings*
core.clj: 1881 clojure.core/with-bindings*
RestFn.java: 425 clojure.lang.RestFn/invoke
interruptible_eval.clj: 81 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 50 nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 221 nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
interruptible_eval.clj: 189 nrepl.middleware.interruptible-eval/run-next/fn
AFn.java: 22 clojure.lang.AFn/run
ThreadPoolExecutor.java: 1149 java.util.concurrent.ThreadPoolExecutor/runWorker
ThreadPoolExecutor.java: 624 java.util.concurrent.ThreadPoolExecutor$Worker/run
Thread.java: 748 java.lang.Thread/ Show: Project-Only All
So it looks like cider cannot find the -main function. Perhaps I should type cider-jack-in command in another place? But where? And the cider-boot-parameters issue is also strange. How to run any Clojure application with boot-clj and emacs-25. (The problem occurred also at emacs26 and emacs27).
I reinstalled Debian, installed boot and emacs25.
Then created a configuration file:
s#Windown:~/Dropbox/Clojure/myapp2$ cat ~/.emacs.d/init.el
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cider-boot-parameters (quote "repl -s wait"))
'(package-selected-packages
(quote
(clojure-mode projectile clojure-mode-extra-font-locking cider))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
s#Windown:~/Dropbox/Clojure/myapp2$
Then installed cider, clojure-mode and projectile. Then it worked.
Version Info
s#Windown:~/Downloads2$ boot -V
#http://boot-clj.com
#Mon Feb 04 13:34:49 CET 2019
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.8.2
s#Windown:~/Downloads2$
This is GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-09-15, modified by Debian
Emacs Package Library
projectile 20190126.1117 installed Manage and navigate projects in Emacs easily
clojure-mode 20190105.1043 installed Major mode for Clojure code
cider 20190125.1339 installed Clojure Interactive Development Environment that Rocks

Connecting points in qqplot in MATLAB

I am trying to plot a qqplot graph for different data samples. I am able to draw it for individual data samples. How can I draw a qqplot graph for multiple data samples? Also, I want to connect all the points with a line and color for each data set to differentiate them. How can I achieve this in MATLAB?
I am getting the output as below:
I am trying to get the output in the below format(qqlplot for 4 samples).
I am loading the data from csv file into matlab.
Next, drawing the graph using the function qqplot(1mb);
Data Set1:(variable size: 1mb)
379
398
474
541
656
673
684
712
749
751
770
782
788
829
837
864
886
919
935
946
991
993
995
1000
DataSet2: (variable size: 512kb)
313
406
443
534
558
561
613
645
649
699
705
732
737
748
752
755
766
774
780
795
796
802
806
823
842
846
872
873
889
904
915
936
966
983
993