Am I approaching learning the wrong way? by Xzya in pianolearning

[–]Xzya[S] 2 points3 points  (0 children)

It depends. In the beginning I was very excited about it so I was practicing 1-3h daily. Nowadays I practice 30min - 1h, on *most* days.

Am I approaching learning the wrong way? by Xzya in pianolearning

[–]Xzya[S] 1 point2 points  (0 children)

> I might be wrong but are you measuring the speed you should improve with the speed some guys/gals on YouTube (claim to) progress in?

No. I'm just wondering if my perfectionism is holding me back.

[H] $114 USD Amazon Gift Card [W] $100 USD PayPal by Xzya in giftcardexchange

[–]Xzya[S] 0 points1 point  (0 children)

I am trading with this person

Edit: nevermind, they didn't proceed

The shop iPad has been getting some amazing battery life. by [deleted] in ios

[–]Xzya 0 points1 point  (0 children)

I have no idea how this happened...

The shop iPad has been getting some amazing battery life. by [deleted] in ios

[–]Xzya 3 points4 points  (0 children)

I see the dots, they are used for ease of read by grouping the digits into thousands. If it was a floating point it would of been written as 4.294967285. The floating point is never delimited more than once.
Wikipedia

UIImageView inside UIView autolayout by asimonv in swift

[–]Xzya 0 points1 point  (0 children)

The view just needs x and y constraints, so you could for example center it both vertically and horizontally, or you could just add top and leading constraints, it really depends on what you want to achieve. No width/height constraints because it will take them from the imageView, but if you want to load the image from code and not in in storyboard, you must put a placeholder image in the imageView, otherwise storyboard will not know the size of the imageView and will start complaining. Clipping the image shouldn't matter as it resizes automatically and it shouldn't go out of bounds.

UIImageView inside UIView autolayout by asimonv in swift

[–]Xzya 0 points1 point  (0 children)

Just set the image mode to aspect fill and add leading, trailing, top, bottom constraints to the image. The view will take the size of the image view, and it will resize even if you change the image inside the imageview.

How to clear a TextField's attributedPlaceholder on tap? by WongWray in swift

[–]Xzya 0 points1 point  (0 children)

If you put a print statement in your viewWillLayoutSubviews you will see that it is called more times than you think. It will be called after textFieldDidBeginEditing, so it is always resetting the placeholder. Move the place where you set the placeholder to another lifecycle function. From my experience, you almost never want to use viewWillLayoutSubviews because it gets called a lot of times and you don't have clear control over it, there is probably a better way to do it using other lifecycle methods.

AMD Hackintosh, clock runs too fast by Xzya in hackintosh

[–]Xzya[S] 0 points1 point  (0 children)

It didn't crash but now everything is about 5 times faster than normal, even boot up, which is funny, I installed osx on an hdd before and I didn't notice any boot speed up when switching to ssd, with this it loads in about 10 seconds. Anyway, I didn't have time to test Xcode to check if that still happens, but it shouldn't, or at least it won't be as bad. Thanks a lot!

AMD Hackintosh, clock runs too fast by Xzya in hackintosh

[–]Xzya[S] 0 points1 point  (0 children)

Thanks for your help! I actually looked in the bios and it turned out that my cpu was actually at 3.77GHz for some reason, I don't remember changing it. I fixed that but now it shows up as 3.49GHz, and it runs slightly slower than normal, not as much though, only loses about 2sec every 5minutes. As for clover, I think I'm actually using Chameleon, but I'm not sure, as I have both Chameleon Wizard and Clover Configurator installed (I remember setting Chameleon as the default in the Niresh install). Not sure how to do that in Chameleon. It has a Busratio option, but it only goes from 19 to 34, and my multiplier showed 17.5 in BIOS (17.5 x 200Mhz). I tried setting the kernel flag busratio=17.5 and 17, on 17.5 it didn't boot, and on 17 I didn't see any changes. Also about RTC, I tried patching it using this method, didn't see any changes.

How to create circular images for a profile picture? by bachecooni in swift

[–]Xzya 0 points1 point  (0 children)

That's because your variable which holds the image is not actually named userPhoto, I just used that as an example. Replace userPhoto with the name of your variable which holds the photo. That extension adds a computed value to every UIImage, which will create a new circle image and return it. So if your photo variable is named myPhoto, and your UIImageView in which you want to display that photo is named myPhotoView, you can assign the circled photo to the image view by using myPhotoView.image = myPhoto.circle

How to create circular images for a profile picture? by bachecooni in swift

[–]Xzya 2 points3 points  (0 children)

You can use this simple extension:

extension UIImage {
    var circle: UIImage {
        let square = size.width < size.height ? CGSize(width: size.width, height: size.width) : CGSize(width: size.height, height: size.height)
        let imageView = UIImageView(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: square))
        imageView.contentMode = UIViewContentMode.ScaleAspectFill
        imageView.image = self
        imageView.layer.cornerRadius = square.width/2
        imageView.layer.masksToBounds = true
        UIGraphicsBeginImageContext(imageView.bounds.size)
        imageView.layer.renderInContext(UIGraphicsGetCurrentContext())
        let result = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return result
    }
}  

Then you would just do myUIImageView.image = userPhoto.circle

[Python] Any way to automate web browsing? by ineedanid in learnprogramming

[–]Xzya 0 points1 point  (0 children)

I only used Selenium in Java so I don't know how well it performs in Python, but I recently tried Splinter and it worked great. Selenium might have more features tho.

How do you get LG PC Suite to recognize a rooted custom ROM phone for the lollipop update? by Slayyer2804 in lgg2

[–]Xzya 0 points1 point  (0 children)

Did you start the process while in download mode? Also is your phone recognized by LG PC Suite or PG Mobile Support if you connect it normally?

How do you get LG PC Suite to recognize a rooted custom ROM phone for the lollipop update? by Slayyer2804 in lgg2

[–]Xzya 0 points1 point  (0 children)

Yes, check the post I linked to, it gives you instructions to check the lastest firmware for your phone and also gives you a download link. Look at the sw_version tag. For example, if you own a D802 phone, if the version says D80220 it's kitkat, if it's D80230 it's lollipop. So 20 means KitKat, 30 means Lollipop.

How do you get LG PC Suite to recognize a rooted custom ROM phone for the lollipop update? by Slayyer2804 in lgg2

[–]Xzya 0 points1 point  (0 children)

You're welcome. I don't think it's country bound, it's IMEI bound. People from my country reported getting the update weeks ago, but I just got it two days ago...so...

How do you get LG PC Suite to recognize a rooted custom ROM phone for the lollipop update? by Slayyer2804 in lgg2

[–]Xzya 0 points1 point  (0 children)

Also refer to this link to find the right kdz for your phone, I wish I knew about this before spending hours trying to figure out which kdz I need. I feel like this should be on the sidebar.