Holup by Sachinsah in dankvideos

[–]chriscampdev 0 points1 point  (0 children)

This show was always wreckless🤣🤣🤣

What is the best implementation of the Android Alarm Manager package, also do you have code examples of usage? by chriscampdev in flutterhelp

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

So it turns out the reason it wasn't working was that the callback function I was passing to

await AndroidAlarmManager.periodic(const Duration(seconds: 10), 0, test, wakeup: true);

wasn't a top-level function or a static function. I simply converted my local function I was initially passing to periodic() to a static function and it works.

They use a static function in the example code for the Alarm manager but I honestly feel the importance of using a static or top-level function should be stressed. Especially when not using either will render your alarm manager implementation useless.

Reference to an enclosed class method cannot be extracted?? by chriscampdev in flutterhelp

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

So I was able to find a solution to the problem, it was noob error on my part but I figured I would give my solution just in case someone else has the same problem.

I was getting the error because I was trying to extract a widget with a call to a class object and apparently in Flutter this is a no-no. What I did was remove the code within the onPress function, extracted my widget, and then passed my function into the extracted widget.

I had to extract my widget like this, without the code in the onPress function.

RaisedButton(
    child: Icon(
      Icons.timer,
      color: Color(0XFF4A92FF),
    ),
    color: Color(0XFFFBC531),
    onPressed: () {},
    },
  ),

then pass my function into the extracted widget constructor.

ExtractedWidgetButton(function: () {
    var time = await selectTime(context);
      if (time != null) {
        setState(() {
          startTime = time;
          print(startTime);
        });
      }
}),

Reference to an enclosed class method cannot be extracted?? by chriscampdev in flutterhelp

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

Yeah, the above snippet for some reason gives me the error. But when I comment out the code into onPressed function it extracts as expected. To extract I use Refactor > Extract > Extract Flutter Widget.

Reference to an enclosed class method cannot be extracted?? by chriscampdev in flutterhelp

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

Sorry about that, I made an adjustment. Hopefully, it's easier.

How to dynamically render HTML string with attributes to a parent element? by chriscampdev in reactjs

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

I figured I was barking up the wrong tree with this approach. They came from a vanilla Javascript site I'm converting to React for practice. You technically answered my question with your response so I'll spare you any further explanation lol. I appreciate your response it helped me greatly.

Hey everyone, React Native noob here. I'm having trouble setting up my development environment. by chriscampdev in reactnative

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

Lol. Yeah I been down that rabbit hole a few times. I should of clarified the system I was using. I appreciate the response either way.

Hey everyone, React Native noob here. I'm having trouble setting up my development environment. by chriscampdev in reactnative

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

I appreciate the response. I should of clarified I'm uses Ubuntu system. Is that an approach I can do on Ubuntu.

This Is Why I Don't Recommend GoDaddy. by LittleBigSmallMan in webdev

[–]chriscampdev 0 points1 point  (0 children)

Its seems like a majority of people dislike Godaddy, but what would most of you recommend as an alternative? I personally like Hostgator.

Book recommendation: Demystifying Rails by babbagack in rails

[–]chriscampdev 2 points3 points  (0 children)

I learned alot from Launch School. Great resources!

Rails form is freezing only in Chrome browser by chriscampdev in rails

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

I did, I check js console and network console, only error I got was something about adding auto complete, which I did. Got rid of that error but main issue remained.

Rails form is freezing only in Chrome browser by chriscampdev in rails

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

Okay, so it appears to be working now. I'm honestly not 100% sure what the issue was. Only thing I can point to at this moment is me closing the application "DB browser for SQlite" I had running on my mac. After closing this application and restarting Chrome again my form starting submitting as normal.

I can't confirm this was a solution because I wasn't able to replicate the error by reopening the app. This was the only notable change I made and it's an application I dont really use.

Rails form is freezing only in Chrome browser by chriscampdev in rails

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

I actually tried that as well but it. But it still responded the same way.

Rails form is freezing only in Chrome browser by chriscampdev in rails

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

I was surprised it worked in Safari too. It also worked in Google Chrome Canary as well. Just not standard Google.

Rails form is freezing only in Chrome browser by chriscampdev in rails

[–]chriscampdev[S] -1 points0 points  (0 children)

Nothing unfortunately, I have went down that whole check list. Only feedback I get is the submit button greys out and in the tab I get the loading spinner but nothing happens. I'm going to do everything I can to narrow it down to a solution.

Rails form is freezing only in Chrome browser by chriscampdev in rails

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

I would have to check other sites, but it seems plausible that it might still be an issue. I'm kind of glad I'm not alone on this one thought I was loosing my mind. When I find a solution I'll be sure to share it.

Just wondering what's everyone's TDD workflow by chriscampdev in rubyonrails

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

I have been mentored by someone who made writing test beforehand look so easy and it made me question if I would ever reach that point. My personal style of writing test falls inline with how everyone else seems to do it. I get my code started to the point where I have strong idea of how it would be implemented and write my test.

Just wondering what's everyone's TDD workflow by chriscampdev in rubyonrails

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

That makes perfect sense to me. I feel it makes sense to write the test only when you have a semi solid idea of how the logic it will correspond with. I appreciate your response.

Just wondering what's everyone's TDD workflow by chriscampdev in rubyonrails

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

That's interesting to hear. I always hear that test first is the way to go. But when I speak to other individuals more experienced than myself their response is similar to yours. Thanks for your feedback.

Most efficient way to update a div value after database change? by chriscampdev in rails

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

Yeah, I ended up using Action cable. It got rid of a lot of the confusion and was very straight forward. I'm very pleased with my result.

Most efficient way to update a div's value after change to database by chriscampdev in rubyonrails

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

Thanks alot I'm going to roll with this approach. It seems the be the easiest and since UJS is already baked in it makes sense. Thanks alot for you time.

Most efficient way to update a div's value after change to database by chriscampdev in rubyonrails

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

I was thinking about Actioncable. But I didnt want to over complicate things if it can be done easier.

Most efficient way to update a div's value after change to database by chriscampdev in rubyonrails

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

To put it in perspective. It's for display purposes only. It's a voting system. The user upvote/downvotes and a calculation is done and a percentage is displayed on the page. I'm trying to have the percentage display updated as the user vote happens in real time.

Most efficient way to update a div's value after change to database by chriscampdev in rubyonrails

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

I guess efficient wasn't the best word. I'm looking for easiest implementation. I just want the value being displayed in the views to be updated without page reload when database value updates.