Skip to content

Instantly share code, notes, and snippets.

View bibhas's full-sized avatar

Bibhas Acharya bibhas

  • Kathmandu, Nepal
View GitHub Profile
// blox.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <time.h>
#include "common/log.h"
#include "sigsegv.h"
#define TOTAL_FAULTS 0x4000
1,10,1,11,1,13,1,12,1,1,9
2,11,2,13,2,10,2,12,2,1,9
3,12,3,11,3,13,3,10,3,1,9
4,10,4,11,4,1,4,13,4,12,9
4,1,4,13,4,12,4,11,4,10,9
1,2,1,4,1,5,1,3,1,6,8
1,9,1,12,1,10,1,11,1,13,8
2,1,2,2,2,3,2,4,2,5,8
3,5,3,6,3,9,3,7,3,8,8
4,1,4,4,4,2,4,3,4,5,8
%% Citation Request:
%% This breast cancer databases was obtained from the University of Wisconsin
%% Hospitals, Madison from Dr. William H. Wolberg. If you publish results
%% when using this database, then please include this information in your
%% acknowledgements. Also, please cite one or more of:
%%
%% 1. O. L. Mangasarian and W. H. Wolberg: "Cancer diagnosis via linear
%% programming", SIAM News, Volume 23, Number 5, September 1990, pp 1 & 18.
%%
%% 2. William H. Wolberg and O.L. Mangasarian: "Multisurface method of
@bibhas
bibhas / Keycodes.swift
Created December 21, 2021 10:08 — forked from swillits/Keycodes.swift
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
diff --git a/Mac/JMVisibilityManager.m b/Mac/JMVisibilityManager.m
index 423c684..9620bc5 100644
--- a/Mac/JMVisibilityManager.m
+++ b/Mac/JMVisibilityManager.m
@@ -238,9 +238,19 @@ - (void)setMenubarIcon:(NSImage *)newMenubarIcon
if (gotLeftClick && gotCommandKey) // let the system handle re-arrangement of the icon
return event;
- if (gotLeftClick && gotShiftClick)
+ if (event.window == self.statusItem.button.window && gotLeftClick && gotShiftClick)
diff --git a/Mac/JMVisibilityManager.h b/Mac/JMVisibilityManager.h
index 94ad685..9dcafcd 100644
--- a/Mac/JMVisibilityManager.h
+++ b/Mac/JMVisibilityManager.h
@@ -36,6 +36,7 @@ typedef NS_ENUM(uint8_t, templateSettingEnum)
CONST_KEY_DECLARATION(VisibilitySettingDidChangeNotification)
CONST_KEY_DECLARATION(VisibilityAlertWindowDidResignNotification)
+CONST_KEY_DECLARATION(VisibilityShiftLeftClickNotification)
//
// JMVisibilityManager.m
// CoreLib
//
// Created by CoreCode on So Jan 20 2013.
/* Copyright © 2020 CoreCode Limited
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitationthe rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT
diff --git a/Mac/JMVisibilityManager.m b/Mac/JMVisibilityManager.m
index d311006..af67e8f 100644
--- a/Mac/JMVisibilityManager.m
+++ b/Mac/JMVisibilityManager.m
@@ -169,7 +169,6 @@ - (BOOL)visibleInMenubar
}
-
- (void)setDockIcon:(NSImage *)newDockIcon
diff --git a/Mac/JMVisibilityManager.m b/Mac/JMVisibilityManager.m
index d311006..af67e8f 100644
--- a/Mac/JMVisibilityManager.m
+++ b/Mac/JMVisibilityManager.m
@@ -169,7 +169,6 @@ - (BOOL)visibleInMenubar
}
-
- (void)setDockIcon:(NSImage *)newDockIcon
//
// CoreLib.h
// CoreLib
//
// Created by CoreCode on 12.04.12.
/* Copyright © 2020 CoreCode Limited
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitationthe rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWIS