scale

Problems having content in webbrowser scale automatically in Windows Form Application

若如初见. 提交于 2019-12-10 10:44:28
问题 I'm trying to create a program which scrolls through files located on my computer and displays the files. This is working for me so far but I'm getting content in actual size so the webbrowser adds a scrollbar(obviously). I want the content to scale automatically so it fits in the webbrowser without having to scroll. Code: WebBrowser web = new WebBrowser(); System.Drawing.Rectangle workingRectangle = Screen.PrimaryScreen.WorkingArea; int heightWebcontrol = workingRectangle.Height / 100 * 85;

Reading data from Mettler Toledo (IND560) scale device using C#

北城余情 提交于 2019-12-10 10:39:28
问题 I'm facing some problems when receiving data from Mettler Toledo (IND560) scale device using C#. When I send "taring" command (T) to device, it's working properly but there is nothing in response. The BytesToRead is always empty and the "while" is in infinite loop. When I send "send stable weight value" command (S), I face the same infinite loop issue. I guess the command is running properly but not responding. Here is the code: private decimal? BalancaIND560(string porta, string comando) {

geom_raster faceted plot with ggplot2: control row height

蓝咒 提交于 2019-12-10 10:35:31
问题 In the example below I have a dataset containing two experiments F1 and F2. A classification is performed based on F1 signal, and both F1 and F2 values are ordered accordingly. In this diagram, each facet has the same dimension although the number of rows is not the same ( e.g class #7 contains only few elements compare to the other classes). I would like to modify the code to force row height to be the same across facets (facets would thus have various blank space below). Any hints would be

How do I create a new scale() function in d3.js? I would like to create a cumulative distribution function

大憨熊 提交于 2019-12-10 10:17:20
问题 How do I create my own scale() function in d3? I am trying to replace the nice linear scale in d3 d3.scale.linear() with a different function that I would like to create myself. My new scale would be based on a cumulative distribution function, so that the median value would appear in the center of the x axis, and a value that was two standard deviations from the median would appear twice as far from the center of the x axis as something that was one standard deviation from the mean. Here is

difference between methods to scale a bitmap

强颜欢笑 提交于 2019-12-10 04:06:45
问题 There are at least two methods to scale a bitmap in Android, One is to use "inScaled, inDensity, inTargetDensity" in "BitmapFactory.Options" when decode a bitmap source. The other is to use a "Matrix" in "Bitmap.createBitmap". What I am curious is what the difference between these two method is? What about the quality of produced bitmap? And what about the memory usage? etc... 回答1: Using BitmapFactory with the proper inScale options will allow you to be more memory efficient than using either

Scale UIView without scaling subviews

て烟熏妆下的殇ゞ 提交于 2019-12-10 03:54:45
问题 I'm trying to scale an UIView without scaling its subviews, or in my case I just want the subviews to be scaled in one axis. I need these hierarchy because I'm setting some Gesture Recognizers to detect panning and rotation and I want these to happen simultaneously with the parent view. However, I don't want the scaling to happen simultaneously. For some subviews I want it to happen only vertically or horizontally or no scaling at all. Is there a way to control the auto-scaling in an UIView's

Can Persistence Ignorance Scale?

风流意气都作罢 提交于 2019-12-10 02:23:47
问题 I've been having a brief look at NHibernate and Linq2Sql. I'm also intending to have a peek at Entity Framework. The question that gets raised, when I talk of these ORM's is "They can't scale", so can they? From Google I get the impression they're able to scale well, but ultimately I suppose there must be a price to pay, Is it worth paying for a richer simpler business layer. 回答1: This is a good question, and IMHO they can scale just as well as any custom DAL. I've only used nHibernate so I

D3 Histogram - Date Based

a 夏天 提交于 2019-12-09 13:37:56
问题 I have an array of dates ["01/01/2001", "01/01/2001", "03/01/2001", "01/04/2001", "01/05/2001", "02/05/2001", "01/07/2001", "01/07/2001", "01/07/2001", "01/10/2001"] Some are duplicates and in no particular order, over a varying timescale (1 week, 43 days, 2 years etc). What I want to do is produce a histogram (or bar chart) that shows counts of "dates" in arbitrary # of buckets (like 20 buckets). Where there are no dates in a bucket it shows zero and a total for those buckets that contain

How can NSSlider be customised to provide a non-linear scale in cocoa?

拟墨画扇 提交于 2019-12-09 12:41:14
问题 How can NSSlider be customised to provide a non-linear scale in cocoa? i.e - 0, 2, 4, 6, 10. With the slider constrained to stopping on tick marks only, I want the slider to stop on 0, 2, 4, 6, 10 (and not 8 for instance). Thanks. 回答1: Quickly written example based on an array with the desired values: SampleAppDelegate.h #import <Cocoa/Cocoa.h> @interface SampleAppDelegate : NSObject <NSApplicationDelegate> { NSWindow * window; NSArray * values; IBOutlet NSSlider * theSlider; IBOutlet

Css3 transition on scale only

▼魔方 西西 提交于 2019-12-09 07:36:07
问题 I am missing something obvious. But the transition on only one element isn't working here. Here's my code. #navigatore-servizi ul li a { color: #fff; text-decoration: none; text-shadow: 0 -1px 0 #008; display:block; width:240px; height:96px; background:#000; background-position: top center; line-height: 96px; font-family: sans-serif; text-transform: uppercase; text-align: center; -webkit-transition: -moz-transform .3s ease-out; -moz-transition: -webkit-transform .3s ease-out; -o-transition: