Send a ”message” from laptop to phone through bluetooth

Hey there,

I'm currently working on a school assignment in which I want to connect my laptop to my phone through Bluetooth. Now this isn't the hardest part, but I want to make it that when the phone exceeds a certain range from the laptop (or gets out of range to keep the connection going) that It will pop up a notification (like an alarm) that will shop up with a custom message.

Now do I not exactly know if this is: 1. Even possible and 2. what is the best way for me to do this? do you guys have any advice or tips that I can use?

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

Handbook of Tyranny: a guide to everyday cruelties

Handbook of Tyranny, by Theo Deutinger, an architect, writer, lecturer, illustrator and designer of socio-cultural maps.

On amazon UK and USA.

Publisher Lars Müller writes: Handbook of Tyranny portrays the routine cruelties of the twenty-first century through a series of detailed non-fictional graphic illustrations. None of these cruelties represent extraordinary violence – they reflect day-to-day implementation of laws and regulations around the globe.

Every page of the book questions our current world of walls and fences, police tactics and prison cells, crowd control and refugee camps. The dry and factual style of storytelling through technical drawings is the graphic equivalent to bureaucratic rigidity born of laws and regulations. The level of detail depicted in the illustrations of the book mirror the repressive efforts taken by authorities around the globe.

The twenty-first century shows a general striving for an ever more regulated and protective society. Yet the scale of authoritarian intervention and their stealth design adds to the growing difficulty of linking cause and effect. Handbook of Tyranny gives a profound insight into the relationship between political power, territoriality and systematic cruelties.

Animals slaughtered per second worldwide and slaughterhouse floor plan

Animals slaughtered per second worldwide

The Handbook of Tyranny‘s infographics and texts bring to light the nonhuman entities that restrict, govern and guide our daily existence. They lay bare a vast ecosystem of coercion that is (often insidiously) interwoven into the fabric of cities, of society, of every day life.

Some of these ‘small cruelties’ are engineering innovations, others are small design tweaks. Some are massive and overwhelming, others are subtle, their unpleasantness concealed behind a veneer of propriety, comfort or security. Some affect the existence of only a limited part of humanity (the refugees or the prisoners, for example), others target each and everyone of us as we walk around the neighbourhood, go on holiday or look for a place to sit in the park.

Bunker Buster

Prison cells

We might resent some of these objects and strategies of control but that doesn’t mean that will will automatically condemn them. At least not if we are told that they have been designed to ensure our safety and protect us from undesirable behaviour.

Handbook of Tyranny is a sharp, enlightening and beautifully designed book. It told me about anti-injecting blue light, urine deflectors that ‘pee back‘ at you and bunker busters that delay their explosion until after they have penetrated layers of earth or concrete. It also made me think about the responsibility for the authoritarian features of modern life: they do not reside entirely into the hands of ‘the powers that be’ but also in the ones of architects, designers, engineers and, to a certain extent, the rest of us.

Theo Deutinger & Lars Müller Publishers present Handbook of Tyranny at Pakhuis de Zwijger

Refugee Camps

Crowd Control

Crowd Control

Walls & Fences

Related story: Book review – Unpleasant Design and Design and Violence. Part 2: violence where you wouldn’t expect it.

"java.lang.String" doesn’t match with "java.lang.String[]"?

I'm trying to use a GSR device for a project, so I used the DIY GSR sensor coding from ftmedia (link to code is Even though it's online, I couldn't get the code to work.

Here's the Processing code:

  1. import processing.serial.*;

  2. Serial serialPort;
  3. int counter;
  4. String[] data;

  5. void setup() {
  6. //println(Serial.list()); // To see the ports
  7. serialPort = new Serial(this, Serial.list()[1], 9600);
  8. counter = 0;
  9. data = new String[1300];
  10. }

  11. void draw() {
  12. int temp =;

  13. // If there is some input print it
  14. if(temp != -1) {
  15. println(counter + " " + temp);
  16. data

  17. = counter + "," + temp;
  18. counter++;
  19. }
  20. // if we reached 20min save text and exit
  21. if(counter == 1300) {
  22. saveStrings("thesis_data.txt", data);
  23. exit();
  24. }
  25. }

On line 22 it says type mismatch, "java.lang.String" does not match with "java.lang.String[]", but there's no String on that line? I have no experience whatsoever with coding, so this might be a simple solution that I don't see. If anyone could tell me what's wrong it would be appreciated!

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

Saving a high score

Hi all! Hope you're having a good day.

I recently made an android game and I want to be able to save a high score. I've tried looking at other discussions on this forum but I couldn't find anything relevant to Android mode. Most of it was to do with Java mode. If it's relevant, I only need to save a single number at any one point in time.

Here are the steps that I believe I need to take in order to create a high score:

  1. Upon opening the app, check if a highscore.txt file is saved and if so, load it. Otherwise, create a new highscore.txt file with its only content being '0'.

  2. Upon 'death', aka playing and losing the game, compare the number in the highscore.txt file against the current score.

  3. Overwrite the highscore.txt file with the higher score.

My score is an int value named currentScore.

I've tried tinkering around to implement it myself, but I don't know where to start with permissions and everything.

Any help would be greatly appreciated! Have a nice day

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

Assignment Assistance – Picture Book

Hi, I'm making a picture book for a homework assignment. The assignment must contain an array that includes five images. Additionally, different keys should control different functions. For example, pressing f/F displays the previous image in the array, g/G moves to the next image of the array, k/K and j/J increase and decrease the speed of the automatic image show. a/A and s/S should turn on and stop the automatic show respectively. I have no idea how to do a or s, but I'm trying to do the others and I'm not sure what I'm doing wrong. I can't get any of the images from the array to display, but I'm not getting an error message either. Any advice would be greatly appreciated!

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