w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Daemon monitoring / logging on linux (application counters)
I think You are reinventing the wheel. try Nagios http://nagios.org/ -You can write any custom check for nagios and monitor performance of anything You need - like Your apps. -You can customize Your alerts and when and how they are sent do who/where. -You can create relationships between services/hosts etc... Plugins/extentions: http://exchange.nagios.org/

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

mongodb data model for monitoring/logging application with 10'000 loggers
Your fourth option sounds best. No worries on how big the collection is, you just need to ensure that you have a proper shard key picked. The key to picking a good shard in this case will depend on how the messages are actually found. Do you have a message id and the external application that reads them just queries for an id? Or are you doing a full text search on the messages? Does the external app know the logger & datetime that the message was created? Considerations: If you make the logger your shard key then you'll end up with chunks that are too big to split If you make the datetime your shard key then you'll end up with poor distribution due to your share key If the external application is going to be searching by message id then make the hashed message id your shard k

Categories : Mongodb

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

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

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

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

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

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

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

Monitoring memory usage of self process
Thread will not work, since C and C++ mandate that returning from the main function kills all running threads (courtesy Do child threads exit when the parent thread terminates). You will need to make it another process, perhaps a script that starts the process which then manages your application.

Categories : C++

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

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

Profiling tools for Linux and performance monitoring counters for ARM
ARMv7-A profile, which is targeted for hosting a rich OS has similar performance counters like Intel . It looks like you have looked into v7-M profile which is targeted for micro-controller environments. Most of the recent ARM cores that runs Linux, like Cortex-A9 are from this profile. Perf already supports performance counters on ARM architecture, same with oprofile. ARM company also provides a eye-candy eclipse based environment called DS-5 Streamline as well with lots of extra features to help you analyze performance issues.

Categories : Linux

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

Monitoring Windows system Read/Write operations by process?
You could try to find the Filemon tools from SysInternals. They offered the source for download back then, but it was removed. Might be that you can still find it via google. Basically this was done with a driver, so you would have to implement this as a device driver and use a filter driver on top of the file system. It was for NT/XP, but the basic idea should still work. It's not exactly trivial though, so I don't know if this is really what you want to do. I don't see a way to do this from user space, as this would be a big security risk if this can be easily done.

Categories : C#

In Java What is the exit value of a process which is killed in the background through Linux shell using process id
This is not a Java specific question. The return code will be the same for all Unix systems here (at least I have never seen a Unix system not behaving this way): 128 + the number of the signal which caused the process to terminate. No idea for Windows... Therefore, 130 in your case. In C, you'd check (after a call to waitpid() for instance) whether a process has been terminated by a signal using WIFSIGNALED(status).

Categories : Java

Getting the list of child process, called by a parent process in Linux
The f option of the ps command will help. Try: ps afx This will show all processes and will visualize parent -> child dependencies in the console.

Categories : Linux

TFS (high level) install process
well, I followed http://tfsguide.codeplex.com/wikipage?title=How%20To%20-%20Migrate%20Source%20Code%20to%20Team%20Foundation%20Server%20from%20Visual%20Source%20Safe And nearly got it installed. I'll post a new question with the new issue.

Categories : Tfs

TCP/UDP high-performance server under linux
Your basic approach is right. Start by studying the infamous C10K problem and how it was overcome. Once you understand the major bottlenecks in various implementations, you need to consider the following as part your design process : Minimise thread creation/deletion cycles. Always choose an "event-based" model over a blocking model. Basically the one-thread-per-request model is preferred for its simplicity of implementation. But it does NOT scale well with the number of concurrent requests. When designing systems required to support more than a few 1000 concurrent requests, one prefers the use of sockets over threads. The optimum number of "worker-threads" to instantiate depends upon : Load (number of concurrent requests) System (CPU, RAM) Since this is a very popular probl

Categories : Linux

How to get the Parent Process ID by giving a Process ID in Linux using C/C++?
I think you can use get_proc_stats function to do this. But you need to install the libproc-dev library. Here is an example : proc_t p_info; get_proc_stats(pid_num, &p_info); int parent_pid = p_info.ppid;

Categories : C++

Changing the Resolution of "time" Command in Linux
Looks to me like 3 digits after the zero is the maximum resolution. If you want better resolution, I would suggest you write a wrapper in C and use utime See man -s2 utime If you are using bash, then the output format of the time command (a builtin function) can be set using the TIMEFORMAT environment variable. See man bash and search for TIMEFORMAT If you are using the gnu time utility, you can set the format using time --format= check man time. In both cases, I don't see an option for higher resolution.

Categories : Linux

printk timestamp resolution in Linux kernel
From this Printk Times article in the troubleshooting section; Resolution of timings is very bad. Printk-time uses the routine sched_clock() in the kernel. On some platforms, sched_clock() only has a resolution of 1 jiffy (which may be 10 milliseconds or longer). This means that you will only see the time increment at this resolution, giving imprecise results for printk-times. To correct this problem, the best solution is to implement a good sched_clock() routine for your platform. Sched_clock() returns a 64-bit value which is nanoseconds since some event (usually either since machine power-on, or since time_init() was called.) Many embedded processors have a clock or timer on the System-On-Chip which can provide a good resolution clock source for sched_clock(). It is best if

Categories : Linux

How to use xlib to listen for screen resolution changes on Linux
The solution was to map to the default root window. display = XOpenDisplay (NULL); if (!display) { syslog(LOG_INFO, "Could not open display. "); } screen = DefaultScreen (display); root = RootWindow (display, screen); window = DefaultRootWindow( display ); if ( 0 > window ) { syslog(LOG_INFO, "Failed to obtain the root windows Id of the default screen of given display. "); } Status ret = XGetWindowAttributes( display, window, &xwAttr ); width = xwAttr.width; height = xwAttr.height; XSelectInput (display, window, ExposureMask | /* Add StructureNotifyMask to send us events involving resizing of the window, etc. */ StructureNotifyMask);

Categories : Linux

Linux free shows high memory usage but top does not
Don't look at the "Mem" line, look at the one below it. The Linux kernel consumes as much memory as it can to provide the I/O cache (and other non-critical buffers, but the cache is going to be most of this usage). This memory is relinquished to processes when they request it. The "-/+ buffers/cache" line is showing you the adjusted values after the I/O cache is accounted for, that is, the amount of memory used by processes and the amount available to processes (in this case, 578MB used and 7411MB free). The difference of used memory between the "Mem" and "-/+ buffers/cache" line shows you how much is in use by the kernel for the purposes of caching: 7734MB - 578MB = 7156MB in the I/O cache. If processes need this memory, the kernel will simply shrink the size of the I/O cache.

Categories : Linux

Reliability of Linux kernel add_timer at resolution of one jiffy?
It is indeed possible that your timer function gets called at a later jiffy than what expires what set to. Possible reasons are scheduling delays, other drivers that disable interrupts for too long (graphics and WLAN drivers are usual culprits), or some crappy BIOS executing SMI code. If you want to avoid that one late timer function shifts all following timer calls, you have to schedule the respective next timer not relative to the current time (jiffies), but relative to the scheduled time of the last timer (my_timer.expires). Alternatively, use ten timers that you all schedule at the beginning at jiffies + 1, 2, 3, … The timestamp in the log is the time when that string was printed to the log. Your module is buggy: you must ensure that the timer is not pending before the module is u

Categories : Linux

Precise Linux Timing - What Determines the Resolution of clock_gettime()?
I do not have gumstix on hand, but it looks like your clocksource is slow. run: $ dmesg | grep clocksource If you get back [ 0.560455] Switching to clocksource 32k_counter This might explain why your clock is so slow. In the recent kernels there is a directory /sys/devices/system/clocksource/clocksource0 with two files: available_clocksource and current_clocksource. If you have this directory, try switching to a different source by echo'ing its name into second file.

Categories : C

How to go through facebook review process on existing site with high traffic?
If you just want to implement a Facebook Login for Web or a user registration by using the Facebook registration plugin, you won't need to go through any review process.

Categories : Facebook

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

Enterprise library semantic logging block. SQLDatabase sink. Out of process
I encountered this same error but it was because we were trying to use a schema other than dbo for our logging database. Once we changed it back to dbo that resolved the problem. We were using the out of process SemanticLogging-svc.exe, which, from what I can tell, assumes that dbo is the schema name.

Categories : Misc



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