region

Finding several regions of interest in an array

匆匆过客 提交于 2019-12-23 17:24:42
问题 Say I have conducted an experiment where I've left a python program running for some long time and in that time I've taken several measurements of some quantity against time. Each measurement is separated by some value between 1 and 3 seconds with the time step used much smaller than that... say 0.01s. An example of such an even if you just take the y axis might look like: [...0,1,-1,4,1,0,0,2,3,1,0,-1,2,3,5,7,8,17,21,8,3,1,0,0,-2,-17,-20,-10,-3,3,1,0,-2,-1,1,0,0,1,-1,0,0,2,0...] Here we have

Silverlight Navigation using Mvvm-light(oobe)+MEF?

北城余情 提交于 2019-12-23 12:20:15
问题 What is the best approach for navigating between UserControls/Pages(out of browser experience)? I'm fairly new to Silverlight and even newer to the mvvm pattern. How well does the Navigation Framework Integrate with the MVVM Light Toolkit? A snippet for general application flow control with the two would be great. The plan was to use the Navigation Framework for general flow or using Jeremy Likeness's approach to region management(http://csharperimage.jeremylikness.com/search/label/regions)

How to organize xml data using equivalent to #region / #endregion (outlining) from C# .NET

混江龙づ霸主 提交于 2019-12-23 07:38:50
问题 I'd like to organize my XML data to be collapsable and expandable using a preprocessor command like the #region/#endregion command in C#/.NET. I'm editing this file Visual Studio 2008. Does any such ability exist? I've googled to no avail. The closest I can come to so far is to expand and collapse the tags themselves, so I can collapse between <Data> (this is collapsed) </Data> 回答1: There does not appear to be any Visual Studio supported ability to do what I'm looking to do. As discussed in

Load Module Default Views In Region to Create Menu

走远了吗. 提交于 2019-12-23 03:17:27
问题 I am builng an M-V-VM application with Dynamic Loading of modules at runtime. Each of these Modules has a default view which individulally they show on the selected region when I go _regionManager.Regions["BottomMenuRegion"].Add( Container.Resolve<AdminModuleView>(), "AdminView", true); However, When the Next Module loads it overwrtites the previous loaded view.. How can I load more than one view into a region so that it creates a "Menu" displaying the default view? e.g <ItemsControl cal

In C#, how to get the “Country or region” selected under “Region & language” in Windows 10?

China☆狼群 提交于 2019-12-22 18:32:53
问题 I am running Windows 10. When I open "Region & language settings" from the start menu, I can select a "Country or region". I am trying to get this value in a C# program. I am in Denmark. I have tried changing my country to Germany (see screenshot), but I cannot get my code to return Germany. Rebooting the computer did not help. I have written some code inspired by this thread. My code looks like this (trying various things at once, getting all the region/culture things I can think of):

How can I specify the region of a Google Cloud Function?

白昼怎懂夜的黑 提交于 2019-12-22 08:33:54
问题 I'm currently using Google Cloud Function to build up my restful API. However, I've found that it's slow because the my Google-Cloud-Function server is on "us-central", whereas my service is in Asia. I tried to change the default region of my Google Project to "asia-west-1" and restart the cloud function—I followed the steps outlined here—but, unfortunately, it's still in "us-central". How can I change the function's region ? 回答1: It seems that Google Cloud Functions are currently available

iphone CLLocationmanager Region monitoring callbacks not triggered

…衆ロ難τιáo~ 提交于 2019-12-21 04:46:06
问题 I am trying to use monitoring regions to track if users have visited landmarks. the location manager is initialized in a viewcontroller along with a mapkit in viewdidload of the view controller: if (self.locationManager == nil) { // NSLog(@"creating location manager"); self.locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; locationManager.distanceFilter = kCLDistanceFilterNone; } NSSet*

Region.IsVisible(PointF) has very slow performance for large floating point values

拥有回忆 提交于 2019-12-17 20:48:56
问题 I have run into a strange performance issue, and it would be great with an explanation to the behavior I'm experiencing. I'm using System.Drawing.Region.IsVisible(PointF) to determine if a point is inside a polygon. This usually works very well, but yesterday I noticed that the performance of the IsVisible method becomes very slow if the polygon is complex and it consists of large x- and y values. Below is some code to reproduce the issue (and an image that shows the shape of the polygon),

How to create a clickable irregularly-shaped region in c#

僤鯓⒐⒋嵵緔 提交于 2019-12-17 19:45:16
问题 I have an irregularly-shaped picture like a heart or any random shape. I can make it transparent visually, but I need to make it clickable only on the shape area. I heard that I should use "Region" for this, but I can't figure out how. I tried to search all pixels that aren't null, transparent, or empty and create a point array with them, but I can't create/reshape the current control region. I'm trying to make a custom control that you can select a button or picture, and they are irregularly

How do I access the contents of the current region in Emacs Lisp?

≯℡__Kan透↙ 提交于 2019-12-17 15:32:49
问题 I want to access the contents of the current region as a string within a function. For example: (concat "stringa" (get-region-as-string) "stringb") Thanks Ed 回答1: buffer-substring together with region-beginning and region-end can do that. 回答2: As starblue says, (buffer-substring (mark) (point)) returns the contents of the region, if the mark is set. If you do not want the string properties, you can use the 'buffer-substring-no-properties variant. However, if you're writing an interactive