w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Do most phones use high density displays?
It depends on the service you provide in your website, which in turn determines which type of users visit your pages. A simple solutions is to check similar websites (specially the famous ones) and see whether they provide different resolutions to different users.

Categories : Misc

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#

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

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 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

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

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

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++

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

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

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

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

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

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

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

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#

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

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

Configuring C/C++ on eclipse on Fedora
Executing c/c++ program with eclipse+unix base plate-forme, it requied object file of the program to execute/run it. So first of all you need to build your program by just pressing Ctr+b to buid it. This will create an object file that was required. Now you enabled to run/execute your programe. Good luck :)

Categories : C

no authorized_keys file in fedora
The .ssh directory and the authorized_keys files should be owned by the user logging in, and only readable by that user. The default ssh configuration will deny access if they are group or world readable. Check for an entry in /var/log/audit that might explain.

Categories : Linux

Issue while installing gcc-4.8.1 in Fedora 19
I think there is an easiest way to install gcc on Fedora 19. Did you try with yum ? With something like sudo yum install gcc Your error means that the makefile which must be generated during the configure command doesn't exist because you don't have any c compiler. You can see details on the config.log file.

Categories : Gcc

PyDev + gurobipy + Fedora 18 = ImportError
PyDev is finding the gurobi python libraries. The gurobipy python library is not able to find the native shared libraries. You need to add the location of libgurobi55.so to your LD_LIBRARY_PATH environment variable.

Categories : Python

Can't compile OpenCV 2.4.6 with CUDA 5.5 on Fedora 19
It seems @jet47 has elected not to respond to my request in the comments, so I'm posting this answer so that we can call this question answered (which it clearly has been in the comments.) Make sure that you only have one installed OpenCV version, if you experience a problem like this. If you locate other installed versions besides the one intended, remove them.

Categories : Opencv

MySQL SELinux conflict Fedora 19
The full answer depends on your server configuration and how you're using MySQL. However, it's completely feasible to modify your SELinux policy to allow MySQL to run. In most cases, this sort of operation can be performed with a small number of shell commands. Start by looking at /var/log/audit/audit.log. You can use audit2allow to generate a permission-granting policy around the log messages themselves. On Fedora 19, this utility is in the policycoreutils yum package. The command # grep mysql /var/log/audit/audit.log | audit2allow ...will output the policy code that would need to be compiled in order to allow the mysql operations that were prevented and logged in audit.log. You can review this output to determine whether you'd like to incorporate such permissions into your syste

Categories : Mysql

Gnome 3.8 on Fedora 19 error with windows Bar
I had the same problem when install almost every theme on Fedora 19, Nautilus fails to respect gnome's theme settings. After some research, my best guess about why it happens is because most themes only support nautilus 3.6 but however in fedora 19 we have nautilus 3.8. And there is no way to downgrade. (I also tried your theme from http://satya164.deviantart.com/art/Numix-GTK3-theme-360223962 and with no luck, it doesn't work for me either. I'll update if I find a way)

Categories : Misc

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