worldnews World News The Spy War: How the C.I.A. Secretly Helps Ukraine Fight Putin
Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    7 months ago 44%

    They've just confirmed themselves that the reason that Russia started the war for has been legit and justifiable all along. As well as the words of Russia which has said this dozens of the times.

    Better off and easier for Putin, from now on.

    -1
  • asklemmy Ask Lemmy Finally deleted my reddit account after the AI news. What communities do you recommend on lemmy?
    Jump
    android
    Android salvador 7 months ago 89%
    How to obtain a) cached b) live GPS location properly? What's the right approach?

    I have an app which polls a remote server by sending to it its *cache* GPS location. Sometimes a remote server will ask for live location and an app must send it to it. --- ``` object MyLocationManager { val providers = listOf( LocationManager.GPS_PROVIDER, "fused", LocationManager.NETWORK_PROVIDER, LocationManager.PASSIVE_PROVIDER, ) fun getCached(ctx: Context, locationManager: LocationManager): Location? { for (provider in providers) { when (provider) { "fused" -> { val fusedLocationClient = LocationServices.getFusedLocationProviderClient(ctx) val fusedLocationTask = fusedLocationClient.lastLocation val fusedLocation = getTaskResult(fusedLocationTask) if (fusedLocation != null) { return fusedLocation } } else -> { if (locationManager.isProviderEnabled(provider)) { val lastKnownLocation = locationManager.getLastKnownLocation(provider) Log.d( TAG, "Provider: $provider, Last Known Location: $lastKnownLocation" ) if (lastKnownLocation != null) { return lastKnownLocation } } } } } return null } fun getLive(ctx: Context, locationManager: LocationManager): Location? { val locationListener = object : LocationListener { override fun onLocationChanged(location: Location) { //This works correctly! // //1) how to save its result? How to save it into cache? //2) or how to return it from here? Log.d(TAG, "onLocationChanged: ${location.latitude}, ${location.longitude}") stopLocationUpdates() } private fun stopLocationUpdates() { val fusedLocationClient = LocationServices.getFusedLocationProviderClient(ctx) try { // Stop location updates fusedLocationClient.removeLocationUpdates(locationCallback) Log.d(TAG, "Location updates stopped") } catch (e: SecurityException) { Log.e(TAG, "SecurityException while stopping location updates: ${e.message}") } } private val locationCallback = object : LocationCallback() { override fun onLocationResult(locationResult: LocationResult) { super.onLocationResult(locationResult) val location = locationResult.lastLocation if (location != null) { onLocationChanged(location) } else { Log.e(TAG, "Received null location in onLocationResult") } } } } for (provider in providers) { when (provider) { LocationManager.GPS_PROVIDER -> { //obsolete, in the last Android versions val _locationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setInterval(0) .setFastestInterval(0) val fusedLocationClient = LocationServices.getFusedLocationProviderClient(ctx) val locationResult: Task = fusedLocationClient.getLocationAvailability() if (!Tasks.await(locationResult).isLocationAvailable) { return null } val locationTask: Task = fusedLocationClient.getCurrentLocation( LocationRequest.PRIORITY_HIGH_ACCURACY, null ) return Tasks.await(locationTask) } "fused" -> { val apiAvailability = GoogleApiAvailability.getInstance() val resultCode = apiAvailability.isGooglePlayServicesAvailable(ctx) if (resultCode == ConnectionResult.SUCCESS) { val fusedLocationClient = LocationServices.getFusedLocationProviderClient(ctx) val fusedLocationTask = fusedLocationClient.lastLocation val fusedLocation = getTaskResult(fusedLocationTask) if (fusedLocation != null) { return fusedLocation } } else { Log.w(TAG, " Google Play Services aren't available, can't use fused") } } else -> { if (locationManager.isProviderEnabled(provider)) { locationManager.requestSingleUpdate( provider, locationListener, Looper.getMainLooper() ) val lastKnownLocation = locationManager.getLastKnownLocation(provider) if (lastKnownLocation != null) { return lastKnownLocation } } } } } return null } } ``` --- An issue is that the code for obtaining GPS location doesn't work properly. Firstly, I don't know whether the approach in the code is correct. Secondly, I don't know how to properly to return the GPS coordinates from a callback -- see the comments. Thirdly, I don't know how to force it to store the latest coordinates that it's obtained into cache. And there're some functions that's been derprecated in the latest versions of Android, particularly in Android 10. How to do all of this? My device is rooted.

    15
    0
    android Android How to make my Android service run forever? On a rooted phone
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    7 months ago 14%

    The proof is the fact that NATO has exapanded, since 1990. For whatever reason. You clean home crocodile

    -5
  • world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    7 months ago 20%

    So a country can't be forced to fill out an application whilst pretending, for the public, that it's done so voluntarily?

    You cocky cock of a wet dog

    -3
  • world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    7 months ago 20%

    How do you know whether NATO forces the countries to join or not? From the TV and news? Or have you been in the meetings and heard all the details?

    -3
  • world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    7 months ago 25%

    Firstly, do you disagree with the fact that NATO promised, in 1990, it would never expand an inch towards Russia?

    Has it expanded since then or not?

    -2
  • android
    Android salvador 7 months ago 93%
    How to make my Android service run forever? On a rooted phone

    I have a rooted Android 10. And I've written a service (off the class Service) which I want to run under too, in background. A service uses a microphone and location. It's written in Kotlin. I've not found any information of how to run a service on a rooted device **under root.** I've found some, about running some commands in a service (code) itself under root, though, but it may be only a part of what I need. **How to do it?** **Essentially,** I want my service to run forever, with elevated preveligies, get itself restarted if it fails, gets killed by Android. --- Also, I've tried to copy it into `/system` and `/system/init` directories, but I haven't been able to, due to "read-only file system". Nor have I been able to remount it to make it writteable. I've managed to make the `/` writteable, but it didn't allow me to copy my service in `/system` nonetheless.

    14
    5
    news News Russia bans anti-war candidate from challenging Putin
    Jump
    world World News Putin could attack NATO in ‘5 to 8 years,’ German defense minister warns – POLITICO
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    8 months ago 5%

    What else to do? NATO is the one who been encroaching to the Russian borders for decades, even though it promissed it would never expand.

    The good part is most of the arsenal of NATO has been destroyed and used up on Ukraine. Perfect timing.

    -31
  • news News Russia bans anti-war candidate from challenging Putin
    Jump
    main Lemmy.ca's Main Community Can we defederate from Alien.top? It's just bots.
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 25%

    Yes, you can. Defederate youself from Alien.top by migrating onto a forum. And stay there.

    -4
  • world World News Putin is urging women to have as many as 8 children after so many Russians died in his war with Ukraine
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 16%

    If that's the reason, then the Ze must be urging the women in UA to have as little as 162 children

    -4
  • world World News Europe's Biggest Nuclear Reactor Goes Offline Again (The Putin keeps shutting Finland down)
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 40%

    If you were all the powerful and omnipresent as the Putin, and had Europe next to your door, wouldn't you?

    -1
  • world World News Russia's economic growth shows Western sanctions exceptionally effective - for Russia
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 35%

    GDP is an especially bad measur

    Whenever it doesn't favour US and the West vs Russia, it's a bad one. Otherwise, it's a good one. How else could it be?

    -5
  • world World News It’s Time to End Magical Thinking About Russia’s Defeat
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 25%

    Putin's shoes, man..... from dawn til dawn..... from sunrise til sunrise ... every day! You'll like it.

    -2
  • world World News It’s Time to End Magical Thinking About Russia’s Defeat
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 60%

    Yes. Soon it'll be Russia everywhere. And you'll be a slave and in prison. You'll be clearning Putin's shoes from dawn to dawn, looking into his eyes from bottom up. I'll be creating videos of you, uploading them onto Youtube on daily basis. Aren't you ok with this? It sounds awesome to me.

    1
  • world World News It’s Time to End Magical Thinking About Russia’s Defeat
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 50%

    US and EU can't stand it when a russian present, or any other one, acts in the interests of his country and its people rather than in the interests of US and EU. That's why they have a problem with Putin, Maduro, Lula da Silva, Modi, Erdogan, Orban, Osad....you name it.

    0
  • world World News It’s Time to End Magical Thinking About Russia’s Defeat
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 66%

    Haven't you just demonstrated that the problem is in you rather than in Putin or Russia?

    2
  • worldnews World News It’s Time to End Magical Thinking About Russia’s Defeat
    Jump
    world
    World News salvador 10 months ago 19%
    It’s Time to End Magical Thinking About Russia’s Defeat www.wsj.com

    The US and Europe admit that they're been believing in their own propaganda about Russia and Putin.

    -39
    40
    technology Technology Youtube has started to artificially slow down video load times if you use Firefox. Spoofing Chrome magically makes this problem go away.
    Jump
    technology Technology X Is The Biggest Source Of Fake News And Disinformation, EU Warns
    Jump
    technology Technology X Is The Biggest Source Of Fake News And Disinformation, EU Warns
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    10 months ago 10%

    The information that reveals the ugliness and hypocrisy of Europe and US always gets called misinformation

    -24
  • programming Programming [WireGuard] Do I have to use my own DNS on a VPS in order to avoid DNS-leaks?
    Jump
    world World News Putin Unleashes Record Bombing in Ukraine as the World Watches Gaza
    Jump
    world World News Putin Unleashes Record Bombing in Ukraine as the World Watches Gaza
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    salvador
    11 months ago 50%

    US and Eu neglect the interests of Russia, but they don't like it when Russia does the same towards them. Magic?

    Russia hasn't even started.

    0
  • programming
    Programming salvador 11 months ago 56%
    [WireGuard] Do I have to use my own DNS on a VPS in order to avoid DNS-leaks?

    I connect to a WireGuard installed on my VPS. Then I go to a random VPN service marketing page on which I'll discover that my DNS leaks. And which is correct because I've specified` DNS = 1.1.1.1 in [Interface]` for all the Peers. In order to avoid DNS leakadge, do I have to a) run DNS server on the a VPS -- along with WireGuard, and b) use this one and only it, instead of `1.1.1.1`? --- But if so, how will this possibly work? ``` [Peer] PublicKey = [....;....] PresharedKey = [......] Endpoint = wg.my_domain123.com:51820 ``` In order to resolve `Endpoint` of my VPS to begin with, other DNS server will have to be used -- by IP. But there'll be none because I'll use a DNS on my VPS instead of `1.1.1.1`. In other words, it'll be a circular dependency.

    4
    20
    elixir
    Elixir salvador 11 months ago 71%
    Default argument which is the 1st one and not the only one. How?

    In a third-party project, in the models, I've encountered functions like this: ``` def changeset(model \\ %__MODULE__{}, params) do model |> cast(params, @required_fields ++ @optional_fields) |> validate_required(@required_fields) end ``` How can a function have a default argument which is **both** a) first and b) followed by a mandatory one? What's interesting, they work properly.

    3
    1
    linux
    Linux salvador 11 months ago 61%
    "setfacl --modify" will get reverted after a reboot

    A docker, when run for the 1st time, won't do so: ``` $ docker-compose -f docker-compose.local.yml up -d permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Doxygen%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied ``` I'll run this command ` $ sudo setfacl --modify user:user1:rw /var/run/docker.sock ` which will resolve the issue. However, after a reboot, the issue will arise again. Why? How to make the change permanent?

    3
    3
    linux
    Linux salvador 11 months ago 33%
    WireGuard client on Android -- no website will load, although traffic gets exchanged

    I've set up WireGuard on a VPS. **A client on Linux desktop works with no issues.** The one on an android phone too, but not completely. Namely, TX and RX get updated, "handshake" and "last connected" with a phone on a server gets updated too, as well as on a phone itself. However, I can't open any single website. However, Telegram, for instance, works well. Another android app too, it appears. But all the rest of the apps don't, not do the Firefox and Chrome. What's the matter?

    -1
    0
    globalpolitics
    World Politics salvador 11 months ago 76%
    What is the Burevestnik missile that Putin says Russia has tested? www.reuters.com

    Not Russia, Putin! has created yet a more powerfull missle. Yeah, Putin himself -- during the breaks for lunch whilst in Kremlin.

    7
    2
    selfhosted
    Selfhosted salvador 11 months ago 77%
    How to import a backup of Maildir into Mailcow instance?

    I have a backup of one of my email accounts in the **Maildir** format. I made it manually, and it’s not from a **Mailcow** instance. How to import such a backup into a Mailcow? Will I also have to create a domains and mailboxes that exist in a backup in Mailcow first? I’m aware of the 2 import/export bash scripts of Mailcow, however, can they be used in this case?

    12
    3
    mobiledev
    How to change and re-build WiFi module?

    I need to a) make a simple change and b) re-build WiFi module How to do it? Firstly, where is in the repo the code of the WiFi module? And how to compile the Wifi module only?

    2
    0