w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Opencv Feature vector size of SiFT
You are right, SIFT descriptor is a 128 dimensional feature. SIFT descriptor is computed for every key-point detected in the image. Before computing descriptor, you probably used a detector (as Harris, Sift or Surf Detector) to detect points of interest. Detecting key-points and computing descriptors are two independent steps! When you print Feature Size: [128 x Y] in your program, Y represents the number of key-points detected in the current image. Generally, using BOW allows you to assign for each key-points descriptors the indice of the closest cluster in the BOW. Depending on your application, you can make decision ... (voting on the presence of one object in the scene or ...)

Categories : Opencv

calculating the real size of a python string
Python objects have a minimal size, the overhead of keeping several pieces of bookkeeping data attached to the object. A Python str object is no exception. Take a look at the difference between a string with no, one, two and three characters: >>> import sys >>> sys.getsizeof('') 37 >>> sys.getsizeof('a') 38 >>> sys.getsizeof('aa') 39 >>> sys.getsizeof('aaa') 40 The Python str object overhead is 37 bytes on my machine, but each character in the string only takes one byte over the fixed overhead. Thus, a str value with 1000 million characters requires 1000 million bytes + 37 bytes overhead of memory. That is indeed about 0.931 gigabytes. Your sample code 'B' created ten times more characters, so you needed nearly 10 gigabyte of memory just t

Categories : Python

BitmapLruCache for Volley Calculating the cache size?
To calculate the size of a bitmap that takes up the size of the screen, which I presume is what you're looking for, and store three of these bitmaps in an LRUCache of a set size which would correspond to the memory taken up by these bitmaps, would be: // Gets the dimensions of the device's screen DisplayMetrics dm = context.getResources().getDisplayMetrics(); int screenWidth = dm.widthPixels; int screenHeight = dm.heightPixels; // Assuming an ARGB_8888 pixel format, 4 bytes per pixel int size = screenWidth * screenHeight * 4; // 3 bitmaps to store therefore multiply bitmap size by 3 int cacheSize = size * 3; From this, you should be able to work out the cache size you need to create to store these bitmaps.

Categories : Android

Calculating image size ratio with max level to be resize
I am not sure what your code is trying to achieve but there are lots of errors. I am finding it hard to believe it was copying images as you say it was. See inline comments <?php if ($_POST) { // lets set a default value here as MAX field is not set in the form shown below $size = empty($_POST['max']) ? 500 : $_POST['max']; $target = $_FILES['image']['name']; $new = "resize_".$target; $type = $_FILES['image']['type']; $image_name = $_FILES['image']['tmp_name']; // should use image_name as that is the absolute filename, not $target // list($originalWidth, $originalHeight) = getimagesize($target); list($originalWidth, $originalHeight) = getimagesize($image_name); $ratio = $originalWidth / $origin

Categories : PHP

calculating the number of rows and colomns in an A4 page when Cell size is X by Y cm
Notice that different printers have different margins. So you must expect different layouts for same content in different printers. Always take a look at PageSetup.*Margin. Preferably, do not change your columns width, change page setup scaling. By the way, what are you trying to achieve with your code?

Categories : Vba

Calculating the starting size of a length, when it grows per iteration and must remain within a limit
If you want to get the original length for any depth, where the max size equals the originalLength + (originalLength / 2 ^ depth), you can set up the equation m = x + (x/2^d). Solving this for x, you get x = m * 2^d/(2^d + 1) for any d, where d equals the depth, x equals the initial size, and m equals the maximum size (512 in your case). So, for your question of what's the initial size if the depth equals 2 and the max size = 512, the initial size is 409.6. For future reference, a better place to ask this probably would've been http://math.stackexchange.com/. (Since this question's a little more about math and equations that programming). HTH

Categories : C#

Running `cucumber feature/test.feature` in ruby shows weird behaviour
The first line instructs the shell to run myapp.rb, which is, AFAIU, this script itself. Namely, each execution of the script recursively runs itself again. Try the following: #!/usr/bin/ruby `cucumber feature/test.feature` Or, even better, directly from the CLI: cucumber feature/test.feature To run all the tests simply issue the cucumber command without args: cucumber

Categories : Ruby

Would turning off feature in kernel cause kernel module(using feature) to misbehave?
CONFIG_HUGETLBFS can disable the user-space API, and CONFIG_TRANSPARENT_HUGEPAGE can disable automatic creation of huge pages for generic memory. However, huge pages are an integral part of the x86 memory management code and are used for things like direct mappings or large MMIO regions. You cannot simply switch off huge pages. When you are working with the MM code, you cannot avoid worrying about huge pages.

Categories : Linux

Is the size of a union equal to the size of its member of the largest size?
Looking at the Cx0 standard it says: The size of a union is sufficient to contain the largest of its members So, you cannot rely on the size being equal to the size of the largest member. Whether it is on not depends on the compiler implementation, flags used, etc.

Categories : C

tinyint(size), varchar(size): "size" explaination
Your Solution to confusion is- In Mysql , int(6) doesn't mean they can store up to 6 digit. not more than 999999. However CHAR(6) This means a character column, with a maximum length of 6 characters, such as these words: houses If I tried storing the word “special” in that column, MySQL would chop the value to be “specia”, since the original word has 7 characters. Anyway, integer columns all have a preset range of values allowed. The number in parenthesis only indicates the display width. This is probably still confusing, so let me explain further… The display width is a number from 1 to 255. You can set the display width if you want all of your integer values to “appear” similarly: TINYINT[(M)] [UNSIGNED] [ZEROFILL] M indicates the maximum display width for integer

Categories : Mysql

Java method takes a size parameter, does some work and return a reference and updates the size, reference and size to be used by method 2
If you want to pass numBytes between function calls you have to choice: Using function return value numBytes = 1024; numBytes = numBytes - firstJob(numBytes, ...); secondJob(numBytes,...); or Apache commons-lang Mutable objects MutableInt numBytes = new MutableInt(1024); firstJob(numBytes, ...); secondJob(numBytes, ...); and inside functions you can change integer value inside mutable object without change numBytes reference (you can't do that in Java) Else, if you want to change a BlockInfo or BlockIDSet (passed as parameter) properties you can do without problem. public void firstJob(BlockInfo bi) { bi.blockSize = 23; }

Categories : Java

pdf /F font size size is not real size?
you should also apply Tm text matrix transformations for this value. "A font defines the glyphs for one standard size. This standard is arranged so that the nominal height of tightly spaced lines of text is 1 unit. In the default user coordinate system, this means the standard glyph size is 1 unit in user space, or 1 ⁄ 72 inch. The standard-size font must then be scaled to be usable. The scale factor is specified as the second operand of the Tf operator, thereby setting the text font size parameter in the graphics state."

Categories : Pdf

Setting body { font-size: 100% } results in font-size: 12px; and not font-size: 16px; Why?
If you inspect the inline box using a browser’s Developer Tools (hit F12 to open them), you can see that its height is indeed 12px, as set in your code. This happens because there is nothing in it that would require more height; in general, the exact calculation of heights of inline blocks is browser-dependent. The font size of the text is still the browser default, typically 16px. The font size does not mean the height of any particular letter. It is just a fundamental property of the font; typographers usually design characters so that they - together with ascenders, descenders, and diacritic marks - fit into the limits set by the font size (or extend over them just a little), and normally most letters have smaller height.

Categories : CSS

Reading a a ReadableStream and specifying a size param: Why does state.highWaterMark always get passed to ._read() as the size?
I think it's wrong to call rs.read(size).pipe(res); This is because according to the docs, rs.read(size) returns a buffer, a string, or null. However, pipe() is a method of Readable. You should probably be using rs.pipe(res); rs.read(size);

Categories : Javascript

WPF what determines whether scrollviewer and stackpanel give infinite size to a child as opposed to a set size?
StackPanel measures its children with infinity in the direction of its Orientation, so an infinite height when the Orientation is Vertical; the other orientation is usually given the constraint it got. Canvas always measures its children with an infinite width and height. For a ScrollViewer, if the Content implements IScrollInfo (i.e. it provides the scrolling functionality) and its CanContentScroll is true then the child is measured based on the constraint it is given, possibly minus the amount needed for the scrollbar(s) if they are shown. Of course then it is responsible for handling the scrolling.

Categories : Wpf

How to reconcile difference in aspect ratio between camera preview size and picture size
I'm not too sure of what you're asking for, but the preview size actually is not determined by your layout. How it is displayed is determined by the layout. I'm assuming that you are using a SurfaceView to hold your preview/camera object. You can get the actual preview size with this method http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getPreviewSize() And additionally, you can get the dimensions of your "displayed" preview by using the width and height you get from onSurfaceChanged() (It is part of the surfaceholder callback) I'm not sure how important that is. But the main point is now that you know the actual preview size from getPreviewSize() you can do math and get your points accordingly. This matches perfectly with onPreviewFrame(byte[] data, Ca

Categories : Android

In MySQL, does the designated size of TEXT or BLOB affect performance or table size?
The difference between BLOB and MEDIUMBLOB is basically that it encodes the length in 2 bytes or 3 bytes. Otherwise, it stores only the length of content you stored on a given row. So you should just declare the column as MEDIUMBLOB. Some client database access libraries (e.g. PHP) will preallocate a buffer to hold the greatest length that the column might return, because they can't tell before fetching whether it's only 65K or 100K or 16MB. I have found that PHP for example blows up if you try to fetch a LONGBLOB, because it preallocates a 4GB buffer, which is greater than the PHP max memory limit.

Categories : Mysql

dynamically changing the size of font size based on text length using css and html
Getting the size in pixels of a string of text is a hard thing to do and depends a lot on the browser and the user's settings, so it will probably be hard to come up with a solution that works in all cases. By "display user entered text" do you mean the user is typing into a textbox? If so, you can attach a keypress listener that checks the length of the value of the text, then adjusts the font-size accordingly. Here's an example, though you will probably need to change the lengths and font-sizes to meet your needs: Working Demo $('#text').on('keypress', function(e) { var that = $(this), textLength = that.val().length ; if(textLength > 30) { that.css('font-size', '5px'); } else if(textLength > 20) { that.css('font-size', '10px'); } else

Categories : Javascript

How do I change the size of a kendo popup edit screen and have all of the items in it resize to the new size?
Can you just use regular CSS? Like: .k-edit-form-container .k-textbox, .k-edit-form-container .k-widget { width: 600px; } You just have to make the selectors be a bit more specific that Kendo's built-in ones.

Categories : Kendo Ui

How to align picture in center and assign its size mode to auto size at the same time?
You can try using this simple Panel control that will handle the two requirements for you: public class PanelImage : Panel { private Image image; public PanelImage() { this.DoubleBuffered = true; this.ResizeRedraw = true; } public Image Image { get { return image; } set { image = value; if (image != null) { this.AutoScrollMinSize = image.Size; } this.Invalidate(); } } protected override void OnPaint(PaintEventArgs e) { e.Graphics.Clear(Color.White); if (image != null) { Point p = this.AutoScrollPosition; if (image.Width < this.ClientSize.Width) { p.X = (this.ClientSize.Width / 2) - (image.Width / 2); } if (image.Height < this.ClientSize.Height) { p.Y = (this.ClientSize

Categories : C#

How to limit BlockingCollection size but keep adding new itens (.NET limited size FIFO)?
What you are describing is a LRU cache. There is no implementation that I know of in the standard libraries but would not be hard to create. Look at this c++ implementation for some clues. Edit Try this one from code project

Categories : C#

Whats the image size to keep in list view of size 70x70 in android
If your image does not have higher resolution you may need to set android:scaleType="centerInside" in order not to stretch the image. Update: If you wish the row to appear "larger" on higher dpi devices, first you 1) set all your views' layout_height to wrap_content 2)Create png images with fixed width/height pixels for different density drawable folders. For example, in drawable-mdpi all your png images should have fixed height 70 pixel, then all the rows will appear to be 70dp high in mdpi devices. If you create images of height 96 pixel in hdpi folder, then all hdpi devices will look wider with 96dp height.

Categories : Android

Susy Grids: change the size of 12-column div without changing the overall grid size?
You can adjust any of the grid settings to fit within the required space. Probably the most straightforward way to trim 30px off your grid size would be from the grid-padding setting. $total-columns : 12; $column-width : 69px; $gutter-width : 14px; $grid-padding : 10px; $container-style: static; You could alternatively tweak the column-width or gutter-width settings to achieve the same number. It's hard to say the best approach without seeing the design. Either way should get you to 1002px.

Categories : CSS

change picturebox size , spacing between buttons when user changes window size
You can use Anchor of your controls.Using anchor you can anchor it top ,bottom left right take a look at this Or you can also use Table Layout Panel

Categories : C#

How do you change the size of a size of an angular ui bootstrap date picker popup?
This size of the datepicker can be changed by overriding the css for the bootstrap form-control and btn classes as shown in the following example: .my-datepicker .form-control { height: 10px; padding: 11px; } .my-datepicker .btn { padding: 1px 2px; } then apply the my-datepicker class to the datepicker input-group <span class="input-group my-datepicker"> <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="validToDate" is-open="opened1" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" /> <span class="input-group-btn"><button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyph

Categories : Twitter

How does Mailchimp manages to move box below antoher one when window size changes size (css3/media queries)
Its using media queries Check the following links to get more information and get started about it http://mediaqueri.es/ http://css-tricks.com/css-media-queries/

Categories : CSS

Changing website layout based on screen size and browser window size in Rails
You need to use CSS to do this, it has nothing to do with Rails. See http://www.1stwebdesigner.com/css/responsive-website-tutorial/

Categories : CSS

opencv error: assertion failed (size.width>0 && size.height>0) in unknown function line 261
(size.width>0 && size.height>0) means that there is an empty Mat over there. In this case, it must be that image is empty because the camera couldn't be opened. Check VideoCapture::open return value.

Categories : C++

Set java heap size in machine with dynamic memory size
If you have more than 2GB of memory available in you system for the the tomcat process to start, I guess then you can use -Xms2048m. -Xms2048 means, your JVM will need this much memory for initial allocation and if it cannot allocate, you might get the exception.

Categories : Java

How to install android application whose assets folder size >1GB while apk max size=50 MB?
Correct, APKs have a maximum file-size of 50MB. To extend your app beyond the 50MB limit you can use one or two expansion files, each file being max 2GB. Refer to the official documentation for details regarding this. I would also ask myself if all of these assets are needed to use the application. The app would have to be pretty damn good/provide a lot of value before I'd download 1GB of data. Perhaps you could server up chunks of data from a server and download to external storage?

Categories : Java

Computing folder size: Empty folders have a default size?
Explorer shows both "Size" and "Size on disk". Since multiple files cannot share disk clusters, the minimum size a file will occupy on disk is one cluster (4096 bytes on your machine). Look at "Size" in Explorer.

Categories : Python

MATLAB throw YDATA size error when using lsqcurvefit X and Y are of the same size
Your function F returns a scalar where a vector of the size of Y (or xdata as it is called the scope of F) is expected. A working example would be, for instance: F = @(x,xdata) x(1) * xdata;

Categories : Matlab

is there a way to revert an image back to it's orignal size, once it has been set to a percentage size?
of course :) width: auto; And with CSS you'll need to put this under the original rule, unless the ones above are more sepsific. So if thats the case, make it more targeted, again if thats not an option use the dreaded !important rule.

Categories : CSS

Change the size of background video when browser size changed
When the window resizes, you need to see if it needs to fill the space horizontally (and crop vertically) or vice versa. The following jQuery will do that: $(window).resize(function() { if ($('body').width() < $('body').height()) { $('video').css({height:'100%',width:'auto'}); } else { $('video').css({width:'100%',height:'auto'}); } });

Categories : Javascript

How to adjust table size to correspond to the media screen size?
There are loads of ways to handle tables on smaller screens. What a lot of sites do is put them in a div and assign the div a width of 100% and overflow:auto; Then they set a minimum width for the table itself so that the integrity of the data is maintained without bastardising the table. All the user does is scroll across when they reach a table that is too big for their screen, but because its contained in a 100% width div with overflow, it won't break the flow of the page. That's just one way of doing it, and is the easiest to markup. Hope that helps.

Categories : HTML

Does sizeof() in c# return only a size of type itself or it counts the reference size as well
Everything in your question is wrong. Or it also count the size of reference itself. There is no reference here. bool and such, usually memory inexpensive types, are quite memory expensive in c# No, they are not. Such types are value types, they do not use a reference and consequently incur no overhead. The size of such types is just that type itself. But the same is true for reference types: a structure containing two references has as its size the size of two references. It does not additionally have the size of the memory behind those references. NOTE: I know that Marshal.SizeOf allows you to call some special function which returns a precise size of unmanaged object / type, but that seems too slow to me. It’s not slow. I need a way to get a size of object which

Categories : C#

Rolling tables limited to a certian size (i.e. doing first in, first out on a table if its size is > y)
I believe you should be able to achieve what you try using a trigger. How you do that would depend on the database you are using. You can have a look at the trigger page in wikipedia.

Categories : SQL

finding screen size and diagonal to adjust the size of objects
I don't know why you want this. I hope it works out: It seems that diagonalInches = Math.sqrt( (widthInInches*widthInInches) + (heightInInches * heightInInches) ) where widthInInches = width/ppi; and heightInInches = height/ppi; Also, why are you getting realppi by dividing 306 by ppi? Is displayMetrics.densityDpi not returning an accurate ppi?! I just tested it and it seems to be working properly for me. I hope you have better fortune soon. Hang in there!

Categories : Android

How to Increase the bitmap image size according to the phone screen size?
Bitmap _bitmapPreScale = BitmapFactory.decodeStream(buf); int oldWidth = _bitmapPreScale.getWidth(); int oldHeight = _bitmapPreScale.getHeight(); int newWidth = 2592; int newHeight = 1936; float scaleWidth = ((float) newWidth) / oldWidth; float scaleHeight = ((float) newHeight) / oldHeight; This might be a help and you can visit the following post its a good one. Save bitmap to location you will get good idea from here.

Categories : Android

Dialog fills screen size. I can't make it be a fixed size
Ok. Solved it. I've added a parent layout on dialog_users_to_invite.xml Now it is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ScrollView android:id="@+id/scrollView1" android:layout_width="wrap_content" android:layout_height="100dp" > <LinearLayout android:id="@+id/containerUsersToInvite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginRight="10dp" android:layout_marginLeft="15dp"> </LinearLayout> </ScrollView> Working perfectly. Everything on wrap_content except the ScrollView, which is 100dp.

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.