w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
high resolution timer in C++
1.e-6 is a number in a scientific notation that is equal to 10 ^ -6, or 0.000001, and is of type double. You can read it as «ten to the minus six». Since gettimeofday() is returning time as two separate integer numbers - seconds and microseconds, microsecond portion is converted to a double value representing seconds through dividing integer microseconds value by a million. Then, whole seconds (tv_sec) are added to the result. For example, let's say gettimeofday() returns 6 seconds and 5 microseconds, this code would do 5 * 0.000001 + 6 and yield 6.000005 seconds. On a side note, gettimeofday() is not really considered a high-resolution clock (and certainly has nothing to do with timers), and it is also deprecated. You should consider using clock_gettime() instead. It supports variou

Categories : C++

c# high resolution images in PDF
First let me clear a couple of misunderstandings: a PDF document doesn't have a resolution. The comment by spender was wrong. There is no such thing as DPI in PDF. The resolution only comes into play when a PDF is rendered (to the screen, to paper,...) and that's why there may be a DPI in a PDF viewer (but that's something completely different). when you scale an Image object in iTextSharp, you don't lose any information: the number of pixels remains the same. Whereas PDF doesn't have a resolution, the images inside a PDF do. When you the image scale down (that is: you put the same number of pixels on a smaller canvas), the resolution increases; when you scale up, the resolution decreases. Now for your question: you're not obliged to create A4 pages: Image img = iTextSharp.text.Im

Categories : C#

Share A High Resolution Image
Please try below code : + (UIImage*)imageWithImage:(UIImage*)image scaledToSize:(CGSize)newSize; { UIGraphicsBeginImageContext( newSize ); [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return newImage; } specify your new size as (850,850) and pass your original image, but make sure your height and width ratio of original image should be same as converted image ratio. Hope it will works for you.Thanks EDIT : For Capturing screenshot of your view follow below code : - (UIImage*)captureView:(UIView *)yourView { CGRect rect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGet

Categories : Objective C

High resolution Image - OutOfMemoryError
Three hints which should help you: Use this to load your images, from Loading Large Bitmaps Android documentation: public static Bitmap decodeSampledBitmapFromResource(Resources res, int resId, int reqWidth, int reqHeight) { // First decode with inJustDecodeBounds=true to check dimensions final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(res, resId, options); // Calculate inSampleSize options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); // Decode bitmap with inSampleSize set options.inJustDecodeBounds = false; return BitmapFactory.decodeResource(res, resId, options); } public static int calculateInSampleSize( BitmapFactory.Op

Categories : Android

High Resolution HTML5 Canvas Screenshot
Unfortunately, while you can draw paths like you would in a vector image, once they are drawn they become rasterised and cannot be scaled without interpolation. Instead you would need to completely redraw everything, multiplying all coordinates by your scale factor, to render the path elements properly.

Categories : Javascript

Using Images of high resolution gives an BITMAP error?
You shouldn't load all these images into memory at the same time. Why would you? You should create some gallery of thumbnails or something along those lines and lazy load as needed. There is no way around this. You're going to run out of memory loading images the way you're doing, even on the high end devices since android only gives you a very small memory footprint within which to operate.

Categories : Android

jquery mobile tablet with high resolution
If setting the view port width to 800px works on portrait (like you said), then maybe you can use a CSS media query to set the view port width to something better in landscape. @media screen and (orientation:portrait) { /*css goes here*/ } @media screen and (orientation:landscape) { /*css goes here*/ }

Categories : Jquery

Is there a high resolution ERwin data model (.emf) viewer?
This has a lot to do with the display properties of the stored display. Before you generate you EMF file. Go to each stored display and set each one to normal zoom level, then generate you picture. If you move to Erwin R9 the generation of HTML reporting like the old Report template builder is back!!

Categories : Misc

Saving high resolution image with rounded corners
May be the following link will be of some help. http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/

Categories : IOS

twitter bootstrap for high resolution mobile displays
This is my solution @-ms-viewport { width: auto!important; } @-webkit-viewport { width: device-width; } @-moz-viewport { width: device-width; } @-ms-viewport { width: device-width; } @-o-viewport { width: device-width; } @viewport { width: device-width; }

Categories : Twitter

problems loading a high resolution image with loader in AS3
The problem might be the dimensions of the BitmapData that would represent your image, though this depends on several variables; the main one being which version of Flash Player you are using. From the documentation about BitmapData: In AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a BitmapData object is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and earlier, the limitation is 2,880 pixels in height and 2,880 in width. Starting with AIR 3 and Flash player 11, the size limits for a BitmapData object have been removed. The maximum size of a bitmap is now dependent on the operating system.

Categories : Actionscript

Convert high resolution clock time into an integer (Chrono)
You can use a std::chrono::duration_cast: http://en.cppreference.com/w/cpp/chrono/duration/duration_cast

Categories : C++

Graphics.DrawString with high resolution bitmaps == LARGE TEXT
The size of a font is expressed in inches. One point is 1/72 inch. So if you draw into a bitmap that has 300 dots-per-inch then your font is going to use a lot more dots for the requested number of inches. So when you display it on a 300 dpi display then you'll get the size in inches back that you asked for. Problem is, you are not displaying it a 300 dpi device, you are displaying it on a 96 dpi device. So it looks much bigger. Clearly you don't really want a 300 dpi bitmap. Or you want to draw it three times smaller. Take your pick.

Categories : Vb.Net

Android pdf writer APW high resolution images cause out of memory expection
First of all the resolution you are mentioning is very high. And i have already mentioned the issues related to Images in Android in this Answer Secondly in case first solution doesn't work for you i would suggest Disk based LruCache.And store the chunks into that disk based cache and then retrieve and use it. Here is an Example of that. Hope this would help. If it doesn't comment on this answer and i will add more solutions.

Categories : Java

Save from device as CMYK high resolution tiff file
You can generate a png file (in the RGB space) in R png("/tmp/a.png", width=6, height=6, units="cm", res=1200) plot(1) dev.off() and convert it to TIFF outside R. For instance, with ImageMagick: convert -colorspace CMYK a.png a.tiff identify -verbose a.tiff # To check the result # Image: a.tiff # Format: TIFF (Tagged Image File Format) # Class: DirectClass # Geometry: 2834x2834+0+0 # Resolution: 472.44x472.44 # Print size: 5.99865x5.99865 # Units: PixelsPerCentimeter # Type: ColorSeparation # Base type: ColorSeparation # Endianess: MSB # Colorspace: CMYK # ...

Categories : R

How to upload a high resolution image to Server in Base64 Converted String
Probably you might be getting an exception on byte[] b = baos.toByteArray(); To handle that you want to consider recycling your images. Also, using Multipart is considered a better option, since you are using Base64 you might want to ponder on Jen's Post too. One more suggestion is, if you are on API level 11 or more then you may consider using: android:largeHeap="true" Which will help you to carry out your conversions and processing safely(Provided that you are not leaking any variable). For more information on this, see the documentation on Application. Let me know if you still face any issues.

Categories : Android

Capturing pictures from webcam at high resolution while previewing at a lower one using DirectShow.Net
You can split the stream using a SmartTee or InfiniteTee, but I'm not sure how to change the resolution after you've split it. Not sure how to do this. You could capture the images and manually place them into the picture box using a SampleGrabber. Then, you have complete control of when the frames are shown in the picture box. If you want XP and up, you'll need to use DirectShow. MediaFoundation (the modern alternative) is only Vista and up. My application is currently capturing images at a different resolution than the resolution of the video being seen by the user. I'm doing this because the webcam I'm using (Logitech C920) has both a Capture pin and a Still pin, which have different listings of video formats. I'm able to get the set of resolutions for each pin independently, and cha

Categories : Dotnet

How to retain Listbox visualization with high resolution images in windows phone 8
In my current project (winrt) I have similar problem and solved it by resizing images during binding (in getter of nested field) get { return new BitmapImage(new Uri(url)) { DecodePixelWidth = 200 }; } Hope it's help you too.

Categories : Windows Phone 8

List View Not Showing Images on Right Most Corner only in High Resolution Devices
apply android:layout_width="match_parent"and change android:layout_weight=""(shown below) to both ImageView and inner LinearLayout in rowdata.xml here is code <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="right" android:orientation="horizontal" > <ImageView android:id="@+id/imageView1" android:layout_width="match_parent" android:layout_height="44dp" android:layout_weight="2" android:scaleType="fitStart" android:src="@drawable/ic_launcher" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_w

Categories : Android

Why should I use the SetTimer function instead of multimedia timer services for applications not requiring high resolution timing?
Higher-resolution timing is less efficient. The OS needs to keep track of time more accurately, and it may need to suspend other threads at inefficient times to get your timer called on time. So basically, high resolution timers are expensive, and you should only use expensive things when you need to.

Categories : C++

High resolution timers vs low resolution timers
Typically, a low resolution timer will fire an interrupt to the processor every x amount of time (say, every 1, 5, 10, 16.6667, 17.81291 or 20ms - examples, there are many other values it could be). This is used by the OS to switch task when a task has been running for "too long" as well as maintaing current time, "timing out" waiting events, and such things (e.g. a sleep type function call would set itself to "time out" at the end of the sleep time). A high resolution timer is typically a hardware register that is continually counting [up or down]/updating at a frequency in the high KHz or higher (such as 32768Hz, 36KHz, 12MHz, 2.2GHz - these are just some examples, could be almost anything). Typically, this is used by "reading the current value", and you get whatever the current count

Categories : C++

High resolution images aren't displaying on iPhone on a Website I built & 3 images aren't on the width it should be
Check this webpage: http://www.williammalone.com/articles/html5-javascript-ios-maximum-image-size/ Also I have come across before safari and some webservers require the filename to be 100% right, whilst I had found on PC are more forgiving, I use a NAS box as a test for ios devices and come across this before..

Categories : HTML

Azure Could Computing high availoability vs NEO4J high availability?
The short answer is probably yes. Windows Azure provide you infrastructure that allow you to build high availability system, it won't make any system high available by magic. As NEO4J is state-full, each node (with only one node Azure don't give you any SLA, you instance will be down) will need to share some state and the way to do it will be dependent on how NEO4J is working. So you will need to rely on NEO4J mechanism to do it. I don't know how NEO4J is working but you won't be able to skip designing an high available architecture around NEO4J using Windows Azure infra. Cloud may be a magic buzz word that can make things append on management level, but when we are on hard real world level Harry magic wand doesn't exist.

Categories : Neo4j

C# Tracking mouse movement at a resolution greater than monitor resolution
My initial purposed solution did the trick. On trackingEnabled I center the mouse and check how much it has moved every 100ms, after that I recenter it and send the data to my controller. using System; using System.Timers; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using PIC18F_Servo_Control_V2; namespace FSI_Grid1 { public partial class Form1 : Form { TabControl LeftControlTab; System.Timers.Timer myTimer; public delegate void UpdateStatusBarDelegate(); TabPage myTabPage; Grid myGrid; serialConnection myConnection; int timerDelay = 100; int initialX, initialY, currentX, currentY, minX, mi

Categories : C#

quicksand sorting price values low to high / high to low
val() gives you a string, so > and < comparisons are lexographical (not numeric). Try wrapping the values in parseInt() or parseFloat(). Make sure to add appropriate error handling as well.

Categories : Jquery

How to calculate aspect ratio resolution on any display resolution
Ok I found the solution myself. To calculate where on the screen the video with a 2,35:1 ratio is playing simply do: DisplayWidth / videoaspectratio eg: On my laptop with 1600x900 16:9 display it's: 1600 / 2,35 ~= 680 Because the video player should play it in the middle of the screen the position of the rectangle should be at: x-axis left border = 0 right border = DisplayWidth y-axis upper border: (DisplayHeight - 680) / 2 lower border: DisplayHeight - upper boarder This should work for any given screen size.

Categories : Misc

Varnish High DB Connections In High Traffic
Mostly spiking backend connections has little to do with your varnish configuration but alot to do with the cachability of your site. Are there cookies that prevents you from caching efficiently? You can chose to strip them or remove all but chosen ones, there are examples for both on the varnish site. Do a varnishstat and check your hit rates during peaks. Is it a good cache hitratio? Is it the same as during low load? If it's the same or higher in low load it's easy to work on improving it at any time. Do a varnishtop -i txurl to see what requests are the most frequently sent to backend servers. Maybe it's some URLs that are just not cached due to faulty headers? Maybe some pages can be cached longer? Maybe some parts of the pages can be cached with ESI? Make sure your varnish is not

Categories : Mysql

IPad Retina Resolution Vs Normal Resolution
You should set it at 1024, and then target retina and higher resolution displays with device pixel ratio media queries. Read more here: http://menacingcloud.com/?c=highPixelDensityDisplays

Categories : HTML

Set resolution of a specific JFrame, not the computer's resolution
Graphics2D has a scale option, look after it in the Javadoc. In your case, it's simply this: public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.scale(0.5, 0.5); // 50% x and 50% y // rest of rendering }

Categories : Java

Win 8 MonoGame - Game resolution vs. screen resolution
Since Metro app's are generally full-screen by default (although they could be snapped too) you can use the following properties from the Window class: Window.ClientBounds.Width Window.ClientBounds.Height Hope that helps.

Categories : C#

When to use low < high or low + 1 < high for loop invariant
If your invariant is that the target must lie in low <= i <= high, then you use while (low < high); if your invariant is that the target must lie in low <= i < high then you use while (low + 1 < high). [Thanks to David Eisenstat for confirming this.]

Categories : Algorithm

Finding the largest resolution from set of resolution
You just need to multiply width by height to find the resolution. Note that you might not have an item having both the max width and the max height in your list. PHP extraction : // I assume your set of string is an array $input = <<<RES 1024 x 768 1280 x 960 1280 x 1024 1680 x 1050 widescreen 1280 x 800 widescreen 1440 x 900 widescreen RES; $resolutions = explode( " ", $input ); // Build a resolution name / resolution map $areas = array(); foreach( $resolutions as $resolutionName ) { preg_match( '/([0-9]+) x ([0-9]+)/', $resolutionName, $matches ); // Affect pixel amount to each resolution string $areas[$resolutionName] = $matches[1]*$matches[2]; } // Sort on pixel amount asort($areas); // Pick the last item key $largest = end( array_keys($ar

Categories : PHP

The img src moves when zoomed
There's a difference between device (physical) and css pixels. When the user zooms in, the element with a specified width takes up more and more of the screen. This way it becomes wider, when it is measured in physical pixels, but it has the same size in css pixels. This also happens to the space that you left on the top and the left side of the element. That is why it looks like to you, that the element is moving.

Categories : HTML

Padding changes when the browser is zoomed in or out
You will have issues at times when using percentages. This is a good example of when to use absolute positioning. I have no idea what your code looks like so here is a basic example of how to accomplish what you have pictured above with absolute positioning. I used a span tag instead of an additional image tag but it should work all the same. You might have to modify your HTML and CSS a little furthor to get it to work in your environment. http://jsfiddle.net/6C8gT/ Here is an updated jsFiddle (http://jsfiddle.net/6C8gT/1/) that uses your markup and another one with reduced markup (http://jsfiddle.net/6C8gT/2/). You don't really need those DIVs unless you have plans for them in the future. I just did what I have posted below but modified the CSS to match your HTML. You'll have to c

Categories : HTML

How do i fix my sub navigation bar when my page is zoomed in or out?
Strange things happen to a lot of CSS when the user zooms in or out, and if I'm honest I don't protect much against it. However, if you did want to look into it I'd say hello to your new best friend, box-sizing: border-box. this accounts for the border width in the overall width of the element. I've also made your li elements percentage widths so they scale as the page moves and I got rid of all the horizontal padding on the .subnav-stores li a #subnav li { float:left; width:13%; border-right:1px solid #d2cfc4; text-align:center; font-size:14px; padding:4px 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } Here it is in action: http://jsfiddle.net/pN24G/

Categories : HTML

Why does a normal web page appear zoomed way out on iOS?
Add <meta name="viewport" content="initial-scale=1.0,width=device-width" /> inside the <head> Working example (standalone) Working example (jsfiddle) Background: By default, mobile Safari displays pages with a canvas width of 980px (see this answer), the 'width' parameter overrides this and 'device-width' automatically sets it to whatever size (or portrait/landscape orientation) you're using. It was initially introduced by Apple but pretty much everything now supports it. For this to work in jsFiddle, you need to add the meta tag to the CSS pane but wrap it in a </style> / <style type="text/css"> tags so it appears in the head. Also, the ordinary embed sharing link won't work, as everything is wrapped in an iframe, so you need to break out the contents of t

Categories : IOS

Worth Styling Zoomed Out?
25%? I wouldn't worry about it unless you have a use case for your page where your users will be that far out. Now, 75%-125%, you might consider it. Usually your page will work fine at other zoom levels. If it doesn't, it's likely because you have hard-coded something you shouldn't have. (For instance, you might assume that text on a certain line will never wrap. That isn't a good assumption. Different devices use different fonts, which could cause text to wrap in some cases.) In those cases, make sure to only set the sizes to specific values when needed. Let the page flow as much as possible.

Categories : HTML

Matplotlib savefig() on a zoomed in graph
You can't zoom so to speak to my knowledge, but you can set the axes. For example if your original graph goes from 1-100 on both axes, you can programmatically make it go from only 30 to 40 and save that.

Categories : Python

Polylines on android map disappear when zoomed out
This seems like a bug in the Google Play Services library similar to the one I reported some time ago. I just tried map.addPolyline(new PolylineOptions() .add(new LatLng(90, 5)) .add(new LatLng(-90, 5)) .width(2) .color(Color.BLUE)); and it draws a line from 0,0 to 0,5 on low zoom levels and from 0,5 to 90,5 after you zoom in. Both are of course incorrect. A workaround would be to use 85 instead map.addPolyline(new PolylineOptions() .add(new LatLng(85, 5)) .add(new LatLng(-85, 5)) .width(2) .color(Color.BLUE)); but don't ask me why it works correctly this way... You may also want to add more info to the linked issue report.

Categories : Android

Pan Zoomed Image on Ipad using Javascript
I managed to work this out. Should anyone need something like this in the future. The code is attached below. var orig = e.originalEvent; if(e.type == 'touchstart'){ if(orig.touches.length == 1){ touches = 1; origX = orig.targetTouches[0].pageX; origY = orig.targetTouches[0].pageY; }else if(orig.touches.length == 2){ touches = 2; } }else if(e.type == 'touchmove'){ e.preventDefault(); if(touches == 1){ /*=================================================* Detect Single Touch and pan around image accordingly *=================================================*/ width = $zoomImg.width(); height = $zoomImg.height(); if(width> originalWidth || height> originalHeight){ e.stopPropagation(); var del

Categories : Jquery



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