Linux

Do you find out handling runtime permission always end up with a lot duplicated code?

Developing Android Apps - 2 hours 15 min ago

I find out when I need to handle runtime permission, I always end up with a lot of duplicated code.

For instance, I need to ask for local storage permission, before I perform any local backup.

Such actions can happen in different fragments/ activity.

Because we can hardly make the following functionality as static functions (They are part of Fragment members). I need to write those code within a fragment class

  • onRequestPermissionsResult

So, a lot of time, as I need to override onRequestPermissionsResult in every related fragments, they will end up with the same code most of the time.

I was wondering, do you have the same feeling as I do? If yes, how do you avoid duplicated code problem?

submitted by /u/yccheok
[link] [comments]
Categories: Android, Linux

Lords of the DNS remind admins about Flag Day, Juniper likes Watson and more

The Register - 2 hours 40 min ago
PING, PING, PING … it's your networking roundup for the week

Roundup To cure some persistent security, implementation, and performance problems in the Domain Name System, the lords of the DNS have proclaimed older implementations as end of life.…

Linux CAD Suites

Linux - 2 hours 43 min ago

I made the switch to Linux full-time on my laptop a month or so, after years of running virtualbox sessions. One of the biggest things I miss is Fusion 360, which is an Autodesk product. Now, while I love using that program, I'm committed to finding a FOSS alternative.

I've been using FreeCAD, which works well enough, but it has some really quirky behavior, and lacks a lot of basic features such as drawing a 2-Point Circle. Not to mention that boolean operations are often janky, as well as other part-level operations.

This is all besides the point. Is there anyone who knows of a decent 3D CAD suite for Linux? FreeCAD needs polishing, Draftsight is 2D only, and that's really all I've got so far.

EDIT: I'm not a professional user, just a hobbyist. I do have Inventor on my windows workstation at home, but that's a pain if all I want to do is 3D print a simple part.

submitted by /u/DazedWithCoffee
[link] [comments]
Categories: Linux

Lawyers' secure email network goes down, firm says it'll take two weeks to restore

The Register - 3 hours 19 min ago
And could wipe users' inboxes during that fortnight of faffery

Barristers and court prosecutors have been left scratching their heads this morning after Egress Technologies' CJSM email system went down – with the firm saying it could take up to a fortnight to fully restore it.…

Watching sports via script

Linux - 3 hours 30 min ago

I used to use small scripts for watching sports ( and some TV ). They curled the signal in and got it to a player. But the community, where i got the scripts from, is dead. Does anybody has a hint, where to get such scripts from, if they exist ?

submitted by /u/grxxl
[link] [comments]
Categories: Linux

Reading through the CIS RHEL7 benchmark - they switched from recommending firewalld to recommending iptables, why?

Hi all,

I'm going through the CIS Red Hat Enterprise Linux 7 benchmark documentation, implementing anything relevant. I noticed in the latest version, v2.2, they recommend using iptables. This piqued my interest as we've been using firewalld since the RHEL7 release.

Going back, they recommended firewalld in the v1.x documentation but switched to iptables in v2.x.

Anyone have any idea why this might be?

Thanks in advance.

submitted by /u/andrewrmoore
[link] [comments]

I used to be a dull John Doe. Thanks to Huawei, I'm now James Bond!

The Register - 4 hours 19 min ago
We'll know for sure when Huawei reveals a shoe-shaped smartphone

Something for the Weekend, Sir? The name's McLeod. Alessandro McLeod. I am a spy for the secret services.…

At 900k lines of code, ONOS is getting heavy. Can it go on a diet?

The Register - 4 hours 51 min ago
'Net greybeard Douglas Comer talks SDN with El Reg

Interview Software Defined Networking (SDN) has changed the landscape of networking, but along the way it has created its own problems. Doug Comer of Purdue University thinks disaggregating SDN controllers like the Open Source Network Operating System (ONOS) could be a way forward.…

What type of service is good to use for creating a pause/resume timer?

Developing Android Apps - 4 hours 59 min ago

Basically I am creating a app that increments a variable every second.

I thought about using IntentService but I've ran into trouble when trying to figure out how to pause and resume the execution of the IntentService. Do I just keep trying to use IntentService and use a BroadcastReceiver to end the thread, save the state of all the variables in the IntentService and create a new IntentService when the user tries to resume? Or is it easier to use regular service? Thanks!

submitted by /u/Okmanl
[link] [comments]
Categories: Android, Linux

Best Linux distro for dell vostro 3559

Linux - 5 hours 23 min ago

Could you recommend me a linux distro for my laptop (dell vostro 3559). I have used ubuntu 18.04LTS but it doesn't receive my AMD graphics card.

submitted by /u/hieudoanitus
[link] [comments]
Categories: Linux

Pages