Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Sign InSign Up

Softans

Softans Logo Softans Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

CoderGuy

Ask CoderGuy
0Followers
5Questions
Home/ CoderGuy/Answers
  • About
  • Questions
  • Polls
  • Answers
  • Best Answers
  • Followed Questions
  • Favorite Questions
  • Groups
  1. Asked: December 27, 2022

    im implementing network connectivity in my project but navgation not work perfectly

    CoderGuy
    Added an answer on December 27, 2022 at 7:57 am

    You should use the below written code The data_connection_checker package is used in it Future<bool> isInternet() async { var connectivityResult = await (Connectivity().checkConnectivity()); if (connectivityResult == ConnectivityResult.mobile) { if (await DataConnectionChecker().hasConnection)Read more

    You should use the below written code

    The data_connection_checker package is used in it

         Future<bool> isInternet() async {
        var connectivityResult = await (Connectivity().checkConnectivity());
        if (connectivityResult == ConnectivityResult.mobile) {
          
          if (await DataConnectionChecker().hasConnection) {
            return true;
          } 
    else {
            return false;
          }
        } 
    else if (connectivityResult == ConnectivityResult.wifi) {
          
          if (await DataConnectionChecker().hasConnection) {
            return true;
          } 
    else {
            return false;
          }
        } 
    else {
          return false;
        }
      }
    

    You can return the statement as you want, like alert message or navigation to ‘No Network’ Screen

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Asked: December 27, 2022

    How can I implement such a button?

    Best Answer
    CoderGuy
    Added an answer on December 27, 2022 at 7:53 am

    you can use this one A 3D pushable button built in Flutter

    you can use this one A 3D pushable button built in Flutter

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  3. Asked: December 26, 2022

    what is bug triage?

    CoderGuy
    Added an answer on December 27, 2022 at 5:37 am

    Bug triage is a process where tracker issues are screened and prioritised. Triage should help ensure we appropriately manage all reported issues - bugs as well as improvements and feature requests

    Bug triage is a process where tracker issues are screened and prioritised. Triage should help ensure we appropriately manage all reported issues – bugs as well as improvements and feature requests

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  4. Asked: December 22, 2022

    Why is my program to check for prime numbers showing numbers with last digit 5 as prime numbers?

    CoderGuy
    Added an answer on December 22, 2022 at 11:50 am

    #include<stdio.h> int main() { int num, count=0; printf("\nEnter a number : "); scanf("%d",&num); for(int i=2; i<=num/2; i++) { if(num%i==0){ // you have to add {} for multi-line code count=1; break; } } if(count==1) printf("\nNot a prime number."); else printf("\nPrime Number."); }

    #include<stdio.h>
    
    int main()
    {
        int num, count=0;
    
        printf("\nEnter a number : ");
        scanf("%d",&num);
    
        for(int i=2; i<=num/2; i++)
           {
             if(num%i==0){ // you have to add {} for multi-line code 
                count=1;   
                break; 
             }
           }
    
        if(count==1)
          printf("\nNot a prime number.");
        else
          printf("\nPrime Number.");  
    }
    
    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  5. Asked: November 2, 2022

    Is there a way to use string interpolation with an SF Symbol that has a modifier on it?

    CoderGuy
    Added an answer on November 2, 2022 at 7:52 am

    The Text interpolation expect an Image. When the .rotationEffect... is applied it becomes a View, and this is not valid. So an alternative is to rotate the SF before it is used in Image. This is what I ended up trying, using the code from one of the answers at: Rotating UIImage in Swift to rotate a Read more

    The Text interpolation expect an Image. When the .rotationEffect... is applied it becomes a View, and this is not valid.

    So an alternative is to rotate the SF before it is used in Image. This is what I ended up trying, using the code from one of the answers at: Rotating UIImage in Swift to rotate a UIImage and using that in the Image.

    It is a bit convoluted, and you will probably have to adjust the anchor/position. Perhaps someone will come up with a better solution. Until then it seems to works for me.

    struct ContentView: View {
        var body: some View {
            Text("Some text before \(img) plus some text after.")
        }
        
        var img: Image {
            if let uimg = UIImage(systemName: "waveform.circle"),
               let rotImage = uimg.rotate(radians: .pi/4) {
                return Image(uiImage: rotImage)
            } else {
                return Image(systemName: "waveform.circle")
            }
        }
         
    }
    
    // from: https://stackoverflow.com/questions/27092354/rotating-uiimage-in-swift
    extension UIImage {
        func rotate(radians: Float) -> UIImage? {
            var newSize = CGRect(origin: CGPoint.zero, size: self.size).applying(CGAffineTransform(rotationAngle: CGFloat(radians))).size
            // Trim off the extremely small float value to prevent core graphics from rounding it up
            newSize.width = floor(newSize.width)
            newSize.height = floor(newSize.height)
    
            UIGraphicsBeginImageContextWithOptions(newSize, false, self.scale)
            let context = UIGraphicsGetCurrentContext()!
    
            // Move origin to middle
            context.translateBy(x: newSize.width/2, y: newSize.height/2)
            // Rotate around middle
            context.rotate(by: CGFloat(radians))
            // Draw the image at its center
            self.draw(in: CGRect(x: -self.size.width/2, y: -self.size.height/2, width: self.size.width, height: self.size.height))
    
            let newImage = UIGraphicsGetImageFromCurrentImageContext()
            UIGraphicsEndImageContext()
    
            return newImage
        }
    }
    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  6. Asked: November 2, 2022

    Suggestion – Optimize production bundle

    Best Answer
    CoderGuy
    Added an answer on November 2, 2022 at 7:50 am

    By default, the MapView is rendered with 60 frames per second (FPS). Via mapView.get/setFrameRate() the maximum frame rate can be adjusted Please use below link for Performance Optimization: https://developer.here.com/documentation/android-sdk-explore/4.12.8.0/dev_guide/topics/maps.html#performance-Read more

    By default, the MapView is rendered with 60 frames per second (FPS). Via mapView.get/setFrameRate() the maximum frame rate can be adjusted

    Please use below link for Performance Optimization: https://developer.here.com/documentation/android-sdk-explore/4.12.8.0/dev_guide/topics/maps.html#performance-optimization

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question
  • Popular
  • Answers
  • Ghulam Nabi

    Why are the British confused about us calling bread rolls ...

    • 5 Answers
  • Ghulam Nabi

    Is this statement, “i see him last night” can be ...

    • 4 Answers
  • Alex

    application has failed to start because no appropriate graphics hardware ...

    • 4 Answers
  • Ghulam Nabi
    Ghulam Nabi added an answer It seems that the issue you are facing is a… January 27, 2023 at 1:37 pm
  • Ghulam Nabi
    Ghulam Nabi added an answer The error "E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)" is caused by… January 27, 2023 at 1:35 pm
  • Ghulam Nabi
    Ghulam Nabi added an answer The Chrome browser uses both memory cache and disk cache… January 27, 2023 at 1:32 pm

Trending Tags

android c++ cypress flutter java javascript python selenium testng webdriver

Top Members

Robert

Robert

  • 3 Questions
  • 1k Points
Luci

Luci

  • 5 Questions
  • 1k Points
Kevin O Brien

Kevin O Brien

  • 2 Questions
  • 1k Points

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Softans

Softans is a social questions & Answers Engine which will help you establish your community and connect with other people.

About Us

  • Blog
  • Jobs
  • About Us
  • Meet The Team
  • Contact Us

Legal Stuff

Help

Follow

© 2021 Softans. All Rights Reserved
With Love by Softans.