w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery load() taking a long time
When I switch to JQuery 1.9, I get this message in your fiddle: XMLHttpRequest cannot load http://www.google.nl/. Origin http://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin. For some reason JQuery 1.10 doesn't generate this message, but the problem I think is the same: You've run into a (the) same origin policy which doesn't allow you to do AJAX requests to other domains. At least, this is the problem in your fiddle. It doesn't explain why you do get results on your local machine. There, you probably did use the same local machine in the AJAX request as well. In that case you're not bothered by the policy. The reason of slowing down? Who can tell. Maybe... the server requests takes a long time (slow PHP script) you got other processes running that take up

Categories : Jquery

Viewholder taking too much time to load for Listview
You need to populate your text views outside of the if else statement. The ones in the middle are being caught by the first case and the properties are not filled. public View getView(final int position, View convertView,final ViewGroup parent) { View rowview = convertView; ViewHolder viewholder; if (rowview == null) { viewholder = new ViewHolder(); final LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowview = inflater.inflate(R.layout.list_skeleton_people_expenses, parent, false); viewholder.tv1 = (TextView)rowview.findViewById(R.id.name); viewholder.tv2 = (TextView)rowview.findViewById(R.id.destination); viewholder.tv3 = (TextView)rowview.findViewById(R.id.start);

Categories : Android

Query taking more space on /tmp dir and more load & time while executing
Your overall query looks simple and sound... Your primary table of ISMPBI is all left-joined to the others which implies to me that they are more secondary / lookup tables. To help, I would to the following... Add "STRAIGHT_JOIN" keyword to your select SELECT STRAIGHT_JOIN DISTINCT .... For your ISMPBI table, make sure it has an index on (PBIBRAND) Make sure that all your other tables have index on their respective "JOIN" column names... For the ISMPIT table, have index on (PITBIRFNUM, PITVIEWSEQ) -- since you have an AND clause for PitViewSeq EDIT -- prequery test option.. Can you run this as a prequery to see what performance IT has vs the join to every table... SELECT pbi.pbirfnum, pil.pilsellersku, group_concat(DISTINCT ppt.p

Categories : Mysql

Rails 3 taking a long time to load the results
I think there is an n + 1 issue in your code. tweets.user_name and tweets.user_sc_name seems like instance methods in Tweet model which finds the corresponding user's name and sc_name. You should either use eager loading with includes or do a join

Categories : Ruby On Rails

PHP foreach loop is taking time to load thousands of table data in Google Chrome
It may not be the foreach loop that is slow, 8500 is good number of data to load, you might want to page the results. Why don't you try the same query using phpmyadmin and see the time taken.

Categories : PHP

How to display picked image in a uiimageview taken from the photo library to another uiimageview in a different view controller?
Create a UIImage property on your second ViewController and pass the image via prepareForSegue (Don't forget to import your second ViewController so ViewController knows about it) -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ if ([[segue identifier] isEqualToString:@"yourSegueIdentifier"]) { yourSecondViewController *secondVC = [segue destinationViewController]; secondVC.nextImage = self.chosenImage; } } then in your second ViewController you can set the imageView yourSecondImageView.image = nextImage;

Categories : Iphone

IIS is taking lot of time to deliver first javascript and image file
You could benefit from checking out fiddler2. link to Fiddler2. If you are using Internet Explorer there is a debugger you can reach by pressing F12. Go to the Network tab and watch the timings. Long lasting rows there can be subjects to investigation

Categories : C#

Why when launching Chrome and loading html file to chrome it's taking so much time to load it?
I think that is because the page you are trying to load has its html part in other file and other elements belonging to same page are in a folder,not to mention designer webpages and sites have hundreds and thousands of elements in them.From elements i mean separate stylesheets,separate script files,graphics such as images including site banner and others etc.Assigning hundreds of elements to correct places obviously takes some time. My opinion would be to first change the following setting in Chrome(To change them type 'chrome://flags' (without quotes) and press Enter button this will bring you to internal settings page of Chrome).Once you have settings page opened locate following setting Save Page as MHTML and Enable it,then try to download the page again.Then use this co

Categories : C#

page load with child grids taking too much of time in loading the page
You need to provide all of your code before we can provide an accurate answer. For example: Where SubItemBL is defined? Also try to see what line is the exact bottleneck. Is it bl.FetchForCategory(aDataSet, Category, RowId); or grdSubItems.DataBind(); If above line is the bottleneck, note that Gridview binding to a datasource with large number of data is indeedslow. how large is your data?

Categories : C#

Convert html page to a image using webbrowser in asp.net taking Too much time to generate image of heavy html page
I changed your class a little bit and it now uses async/await instead of busy-waiting. You can use it as var th = new WebsiteThumbnailImage("http://www.google.com", 1024, 768, 256, 192); this.BackgroundImage = await th.GenerateWebSiteThumbnailImage(); . class WebsiteThumbnailImage { public WebsiteThumbnailImage(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) { this.Url = Url; this.BrowserWidth = BrowserWidth; this.BrowserHeight = BrowserHeight; this.ThumbnailHeight = ThumbnailHeight; this.ThumbnailWidth = ThumbnailWidth; } public string Url { set; get; } public int ThumbnailWidth { set; get; } public int ThumbnailHeight { set; get; } public int BrowserWidth { set; get; }

Categories : C#

How do I load an image at run time?
A: What is "C:FullPath"? It's nothing. I very much doubt you have a file there. B: XNA requires you load a local file if you're going to use Content.Load - it must be in the GamePath/Content folder. EG: GamePath/Content/MySprite.xnb C: If you want to load a random image, you must use Texture2D.FromStream, like so: System.IO.FileStream mystream = new System.IO.FileStream("C:/MyFile.png", System.IO.FileAccess.Read); Image = Texture2D.FromStream(GraphicsDevice, mystream); mystream.Dispose();

Categories : C#

Load animated GIF image in C# during X time
Add a picturebox to your form and Add the .gif image in the picturebox.Make the picture box visibility to true while loading the form. Please make sure that the picturebox is enabled at the time of loading otherwise there wont be any animation of the image in the windows form.

Categories : C#

Android: Can't load bitmap image more than one time
Check at this piece of the code you provided: public Bitmap getBitmap(String path){ BitmapFactory.Options bmOptions = new BitmapFactory.Options(); bmOptions.inJustDecodeBounds = false; bmOptions.inPurgeable = true; Bitmap bitmap = BitmapFactory.decodeFile(path, bmOptions); return bitmap; } In the line Bitmap bitmap = BitmapFactory.decodeFile(path, bmOptions);, you are probably tryng to decode a file too big, resulting in an outofmemory exception.

Categories : Android

Water ripple - The image cannot load on first time
A common error when this type of issue occurs, is that you are trying to draw the image before it loads. Try utilizing the img.onload function to wait until the image has loaded to do all of the drawing and then to start running the main loop.

Categories : Javascript

Load Image time inconsistant (jQuery/PHP/HTML)
The reason for your delayed animation execution is probably the jQuery animation queue. New animations like your fadeOut are queued and wait for previous animations on the same element to finish. To cancel the current queue you might use jQuery.stop() stop - jQuery API Description: Stop the currently-running animation on the matched elements. So in your case this might look like this: $('.fadein :first-child').stop(true, true).fadeOut() Or you disable queuing for this animation fadeOut - jQuery API A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. $('.fadein :first-child').fadeOut({ queue : false }) Edit For every time you click your code starts a new setInterval which will also add animations to

Categories : PHP

Xcode Instruments Time Profiler Understanding which methods are taking the most time
Toogle Display of Primary Views and select: Separated by Thread Invert Call Tree Hide System Libraries Show Obj-C Only Try to see this: http://www.raywenderlich.com/23037/how-to-use-instruments-in-xcode

Categories : Xcode

php convert local time to utc time taking into consideration Daylight savings
You can get UTC time with gmdate: http://php.net/manual/en/function.gmdate.php Also you can change your timezone to UTC: date_default_timezone_set('UTC');

Categories : PHP

Is it possible to get Image from UIImageView after image is downloaded asynchronously using AFNetworking
you have to use the following method: [imageView setImageWithURLRequest:request placeholderImage:placeholder success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) { // the downloaded image is image } failure:errorHandler]

Categories : IOS

When a UIImageView's image is set from Interface Builder, how is that image loaded?
iOS will automatically look for your file overflow.png in the same bundle as your xib file. If your xib file is just in your application's target, then by default it looks inside the main bundle. If you want to programatically load a new image into an image view and your image is inside the main bundle: UIImage *image = [UIImage imageNamed:@"MyAwesomeImage"]; self.imageView.image = image; If your image is inside another bundle: NSBundle *imageBundle = ... // [NSBundle mainBundle] if your image is inside main bundle NSString *imagePath = [imageBundle pathForResource:@"MyAwesomeImage" ofType:@"png"]; UIImage *image = [UIImage imageWithContentsOfFile:imagePath]; self.imageView.image = image;

Categories : IOS

SDWebimage to load image in custom UITableViewCell, but when scroll the image load in other cell random
Your table cells are being reused as you scroll. This means that when the image load finishes, the cell might not "belong" to the original URL anymore. What you should do is set the image to nil in tableView:cellForRowAtIndexPath: to clear out any reused images and then then cancel any pending requests in tableView:didEndDisplayingCell:, however this doesn't make efficient use of network bandwidth. A better approach would be to move your image loading code into the table controller (using SDWebImageManager) and have it wait to look up the proper cell once the image has finished loading.

Categories : IOS

Any alternative to get Image name that is currently set to UIImageView?
you can use Accessibility identifier property of UIImageView's image.Set image accessibility identifier in your method and get anywhere you want. -(void)change { int randNum = rand() % (4 - 0) + 0; [_imgView setImage:[UIImage imageNamed:[imgArray objectAtIndex:randNum]]]; [_imgView.image setAccessibilityIdentifier:[imgArray objectAtIndex:randNum]]; } - (IBAction)currentImgName:(id)sender { NSLog(@"image name is %@", [_imgView.image accessibilityIdentifier]); }

Categories : Iphone

Fit UIImageView to image content
From your description, it seem you want UIViewContentModeScaleAspectFill. UIViewContentModeScaleAspectFit - will fit the image inside the image view. If the image is smaller than the image view it will be centered. UIViewContentModeScaleAspectFill - will fill the image inside the image view. If the image is smaller/bigger than the image view it will be scaled. Apple Documentation for UIViewContentMode

Categories : IOS

How to set UIImageView's image from another View
You can use a delegate protocol. This way you can tell the delegate that something has happened and it can then respond accordingly. Lets say that you have a UIViewController and 2 views. One view might declare a delegate protocol like @protocol MyViewDelegate <NSObject> - (void)myView:(MyView *)view didPickImage:(UIImage*)image; @end Your view controller might implement this protocol and when the user selects the image you can call [delegate myView:self didPickImage:image]; The viewController would then set the image in your other view.

Categories : IOS

Combine two image in app and taking result as single image
You can use the Canvas class to work with images. Check this SO question for more details: combining two png files in android

Categories : Android

UIImageView subclass' image property
Did you mentioned frame for your Something.m ? It should work fine, example Something *something = [[Something alloc] initWithFrame:CGRectMake(10, 10, 200, 200)]; [self.view addSubview:something]; Something.m - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } self.image = SomeImage; return self; }

Categories : Objective C

How would I use a string of image names to use in a UIImageView?
In this line: imgView.image = [UIImage imageNamed:_imageNames]; you have to use an NSString, not an entire NSArray. So try: imgView.image = [UIImage imageNamed:[_imageNames objectAtIndex:0]]; instead.

Categories : IOS

Crop image before show in a UIImageView
There are multiple libraries that can do that for you. You can either pick one and work with it, or study a couple and understand how it's done.

Categories : IOS

How to remove image from uiimageview op uibutton
Use this: UIImage *image=[info objectForKey:UIImagePickerControllerOriginalImage]; instead of UIImage *image=[info valueForKey:@"UIImagePickerControllerOriginalImage"]; and alloc employeePhoto in viewDidLoad

Categories : Iphone

How to save 2 UIImageView in one image to cameraroll
you can do it in this way.., Add your both imageview in one UIView., and then take screenshot of This UiView and stored generated image in your desired destination. Here is Code to take screen shot by coding // code to take Screen shot -(void) takeScreenshot { // Replace self.view with your view name which containing your ImageViews UIGraphicsBeginImageContext(self.view.bounds.size); CGContextRef context = UIGraphicsGetCurrentContext(); [self.view.layer renderInContext:context]; // get a UIImage from the image context UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext(); // clean up drawing environment UIGraphicsEndImageContext(); // Then save your Image in your desired destination } Hope it will Help you, Happy Coding

Categories : IOS

UIImagePickerController not assigning image to uiimageview
Are you sure that avatarImage is init? Something like: self.avatarImage = [[[UIImageView alloc] initWithFrame:myFrame] autorelease]; self.avatarImage.image = original;

Categories : IOS

How to create UIImageView with stretchable image
Use resizableImageWithCapInsets:resizingMode: instead. UIImage *lblBGImg = [[UIImage imageNamed:@"textlblbg.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 8, 0, 8) resizingMode:UIImageResizingModeStretch];

Categories : Iphone

Taking user input to load a class
If you're literally taking a string as the class name, then you could generate a lookup of "class name" to "class object" mapping, and use that: allowed_classes = { 'A': ClassA, 'B': ClassB } def load_class(class_name, *args, **kwdargs): return allowed_classes[class_name](*args, **kwdargs) new_class_obj = load_class('B', 'Jan 1st')

Categories : Python

Loading image in to UIImageView in dispatch not working
Your code looks like it should be working, but there are a couple of things that you need to test. First, you need to check to make sure that imageURL is both non-nil, and points to exactly where you think it's pointing. Copy paste a log result to your desktop browser if you have to. NSLog(@"%@",imageURL); Second, in the event that fetching the image fails, you need to be able to detect this. I recommend that if you continue to use the dataWithContentsOfURL: route that you at least use the following to check the error: NSError *error = NULL; NSData *data = [NSData dataWithContentsOfURL:imageURL options:NSDataReadingMappedIfSafe error:&error]; if (error) { // ... }

Categories : IOS

How can I trim a UIImageView to fit an aspect ratio image
The Easy way is simply using the following code on your "imageView" imageView.contentMode = UIViewContentModeScaleAspectFit; Assuming you want to cut a "zoomed" section of your image to fit fully into your imageView check your original image width and height Assuming width is bigger in size then height , scale the image width to the holder width center the image on your holder , the width will fit perfectly (section2) and the height will simply be cropped follow above and below the holder.

Categories : Objective C

Rotating UIImageView Moves the Image Off Screen
You want to rotate the image around it's center, but that's not what it is actually happening. Rotation transforms take place around the origin. So what you have to do is to apply a translate transform first to map the origin to the center of the image, and then apply the rotation transform, like so: self.imageView.transform = CGAffineTransformTranslate(self.imageView.transform, self.imageView.bounds.size.width/2, self.imageView.bounds.size.height/2); Please note that after rotating you'll probably have to undo the translate transform in order to correctly draw the image. Hope this helps Edit: To quickly answer your question, what you have to do to undo the Translate Transform is to subtract the same difference you add to it in the first place, for example: // The next line will add

Categories : Iphone

Monotouch change UIImageView image from another class
There's no special trick to manipulating UIImageViews. Try the following code: using System; using System.Collections.Generic; using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; using System.Drawing; using MonoTouch.CoreGraphics; namespace SingleFileSolution { public class ContentView : UIView { public ContentView Companion { get; set; } public UIImage Image { get { return imageView.Image; } set { imageView.Image = value; } } private UIImageView imageView; public ContentView(UIColor fillColor, UIImage initialImage) { this.BackgroundColor = fillColor; imageView = new UIImageView(ne

Categories : IOS

Arabic title of Image from URL not displaying in UIImageView
If understand correctly, you are having arabic characters in the URL. You need to percent escape these characters for it to work. Use this, NSURL *percentEscapedURL = [NSURL URLWithString:[unescapedString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]; Hope that helps!

Categories : IOS

How to display a base64 image within a UIImageView Using AFNetworking?
I am not sure I understand what is not working for you, but should you not be doing something like this: NSURL *url = [NSURL URLWithString:prodDetCompl.AttPath]; [imageview setImageWithURL:url placeholderImage:[UIImage imageNamed:@"sampleimages.jpeg"]] you should ensure, of course, that a "sample images.jpeg" image is available in your bundle resources to be used as a placeholder image.

Categories : IOS

UIImageView filter image into solid color
Subclass and make your own UIImageView (or UIView with a UIImageView property) and override drawRect, you will want to clip the context to an image mask and then fill with a solid colour: - (void)drawRect:(CGRect)rect; { CGRect bounds = [self bounds]; [[UIColor grayColor] setFill]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextClipToMask(context, bounds, [image CGImage]); CGContextFillRect(context, bounds); }

Categories : Iphone

How to assign UIImageView delegate to its super UIView so that it can know which UIImageView is touched
You Can Implement in this way Create and Image then enable userInteraction by [imageView setUserInteractionEnabled:YES] Then add tag and Give UITapGestureRecognizer with a selector that's all you need to doo. for(int i=0;i<4;i++){ MyImageView *imageView=[[MyImageView alloc] init]; [imageView setUserInteractionEnabled:YES]; [self.view addSubview:imageView]; [self.imageView setUserInteractionEnabled:YES]; [self.imageView setImage:[UIImage imageNamed:@"delete.png"]]; [self.imageView setTag:i]; UITapGestureRecognizer *tapped = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imgTouchUp:)]; tapped.numberOfTapsRequired = 1; [self.imageView addGestureRecognizer:tapped]; } Then In selector recognize UIImaged taped by their respective T

Categories : Objective C



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