sw

HPUX SW Recovery Handbook - Crash Dumps

大憨熊 提交于 2019-12-03 23:06:56
先来点理论基础 系统crash时,HPUX会尝试将物理内存(core)或是物理内存的部分的映像保存到dump设备上,这个dump设备是预先定义好的。然后,在紧接着的操作系统重起过程中,名为savecrash的工具被rc-script自动调用,将内存映像及当前kernel由dump设备拷贝到文件系统中。完成后,你就可以通过调试工具对其进行分析。如下图. Crash事件 - Crash events 一个非正常的系统重起就叫做crash. 有很多原因会导致系统crash; 硬件的不正常工作,软件混乱甚至电源故障。 在一个正确配置的系统中,这些通常会导致一个crash dump被保存下来。操作系统记录每个crash事件的原因,通常每个CPU都会有一个crash事件。同一个CPU有多个事件也是可能的。 共有三种类型的Crash: PANIC, TOC and HPMC : PANIC PANIC类型的crash说明这是由HPUX 操作系统触发的(软件Crash事件). 我们将它分为直接panic与非直接panic(direct and indirect panics). 直接panic是由一个子系统在检测到一个不可恢复的错误时直接调用panic()核心进程,例如: . panic ("wait_for_lock: Already own this lock!"); . panic ("m

How to load font from InputStream in SWT?

匿名 (未验证) 提交于 2019-12-03 09:19:38
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I need to load font ( .otf or .ttf ) file from java Resource or InputStream in SWT. org.eclipse.swt.graphics.Device.loadFont(String path) allows me ( example ) to load font from font file path (and it works), but there is no corresponding method to load it from any other source. I was thinking of using java.awt.Font.createFont(int fontFormat, InputStream fontStream) and then building org.eclipse.swt.graphics.FontData and org.eclipse.swt.graphics.Font objects out of AWT java.awt.Font object. Since I haven't tried that option yet (I

Help me convince higher-ups to allow switching to .Net 3.5 (from 2.0)

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been sold on the fun of using linq in areas other than pure database interaction. (See Calling fellow code nerds - Alternatives to Nested Loops? ). We are stuck on 2.0. I have told the powers that be about the ease of updating to 3.5 (we have already migrated to VS2008) but they are wanting a list of "benefits" for upgrading. Can those that have experience in 3.5 help provide some talking points for the benefits of updating an existing app to 3.5? UPDATE: Found an additional reason: Microsoft's inclusion of Charting tools for Asp.Net

Custom Firebase Data Service Class : Swift 3

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm searching for a clean way to retrieve (and sometimes save) data from Firebase in Swift. It's annoying me that all my database calls are written in the middle of the view controller code. So I'm looking for some kind of custom data service class. I found this tutorial that's close to what I want: http://www.mobilecyberpunks.com/?p=82 . They promised a Part II but I cannot find this second part, so I guess this was never made. In this second part they promised to cover retrieving and saving data with this custom data service (which is the

Correct way to call “realloc” in Swift with a Float array?

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying figure out what size to send "realloc" when I call it through Swift. It seems that I have to add an extra byte , but I don't understand why. typealias Floats = UnsafeMutablePointer<Float> let FLOAT_SIZE = sizeof( Float ) func floats_realloc( floats:Floats, qty_of_floats:Int ) -> Floats { let KLUDGE = 1 // Why? let qty_of_bytes = ( qty_of_floats * FLOAT_SIZE ) + KLUDGE let realloced_floats = Floats( realloc( floats, UInt( qty_of_bytes ) ) ) return realloced_floats } If I set KLUDGE to 0 here, this is what happens when I attempt to

Android: CollapsingToolbarLayout and SwipeRefreshLayout get stuck

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use CollapsingToolbarLayout, RecyclerView and SwipeRefreshLayout together: Xml: Code: swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_container); swipeRefreshLayout.setOnRefreshListener(this); How to allow swipe refresh action only when collapsing toolbar layout is fully expanded and scrollview (recyclerview) on top ? The similar behavior like in Google+ or Inbox application. Wrong: Good: 回答1: Update: This issue has been resolved in the latest version of the support library (23.1.1+). If you are using an older version of

Check if a String is alphanumeric in Swift

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In Swift, how can I check if a String is alphanumeric, ie, if it contains only one or more alphanumeric characters [a-zA-Z0-9] , excluding letters with diacritics, eg, é. 回答1: extension String { var isAlphanumeric : Bool { return ! isEmpty && range ( of : "[^a-zA-Z0-9]" , options : . regularExpression ) == nil } } "" . isAlphanumeric // false "abc123" . isAlphanumeric // true "iOS 9" . isAlphanumeric // false 回答2: A modern Swift 3 and 4 solution extension String { func isAlphanumeric () -> Bool { return self . rangeOfCharacter (

MKMapRect and displaying map overlays that span 180th meridian

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working with viewports and bounds returned from Google Geocoding API . When doing reverse geocoding for a given coordinate, the service returns several results with various granularity (country, administrative area, locality, sublocality, route, etc.). I want to select the most appropriate on the results given the current visible area on the map. I've settled on algorithm that compares the ratios of areas (in MKMapPoint MKMapRectIntersection function). This works very well as long as the location viewport does not span the 180 meridian.

Tesseract traineddata not working in Swift 3.0 project using version 4.0

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm attempting to use Tesseract-OCR-iOS in a new Swift 3.0 project. I'm using Xcode Version 8.1 (8B62). CocoaPods is version 1.1.1. When I attempt to use tesseract.recognize() , my app crashes and I get the following output in the console: actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES:Error:Assert failed:in file tessdatamanager.cpp, line 53 I found this post , which sounds I'm using the wrong version of traineddata . I downloaded tessdata from the tesseract-ocr/tessdata repo , so I'm baffled as to why I'd have a mismatch on the

How to keep dir-local variables when switching major modes?

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm committing to a project where standard indentations and tabs are 3-chars wide, and it's using a mix of HTML, PHP, and JavaScript. Since I use Emacs for everything, and only want the 3-char indentation for this project, I set up a ".dir-locals.el" file at the root of the project to apply to all files/all modes under it: ; Match projets's default indent of 3 spaces per level- and don't add tabs ( (nil . ( (tab-width . 3) (c-basic-offset . 3) (indent-tabs-mode . nil) )) ) Which works fine when I first open a file. The problem happens when