accessibility – Colorblindness-friendly colors called “green”, “blue”, “yellow”, and “red”

I need to choose a palette of four colors that satisfies the following two conditions:

  1. Colorblind people can easily distinguish all four of the colors.
  2. People with normal color vision can unambiguously identify each of my colors with one of the names “green”, “blue”, “yellow”, and “red”.

For context, I’m making a video game version of a board game that uses standard Icehouse pieces. The shape, size, position, and orientation of the pieces are all relevant to gameplay, so I can’t use any of them as a substitute for color. Also, each of the colors are referred to by name in the rules, so using colors that are ambiguous or unrelated to the original colors would be confusing to people familiar with the original board game.

Given the above, what’s my best option?

javascript – Web RTC: ICE candidate function not been called, hence remote video is not showing

I am trying to create web RTC peer connection on react native. I am using the react-native-webrtc module. When using two emulators and passing the same room id the video connection is not been created. While debugging I found the onIceCandidate funciton is not been called. I am using socket.io to create the room. Please help me with this.

import React, {useState, useEffect} from 'react';
import {View, SafeAreaView, Button, StyleSheet, Text} from 'react-native';
import {RTCPeerConnection, RTCView, mediaDevices} from 'react-native-webrtc';
import io from "socket.io-client";

export default function WEBRtc({roomNumber}) {
  const (localStream, setLocalStream) = useState();
  const (remoteStream, setRemoteStream) = useState();


  let isCaller, localST, peerConnection;
  const socket = io("http://192.168.0.102:3000", {transports: ('websocket')});

  const constraints = {
    audio: true,
    video:false
  };


/**
 * Getting ready for local stream 
 */
  const startLocalStream = () => {
      socket.emit('joinTheRoom', roomNumber);
  };

  socket.on('roomCreated', room=>{
    console.log('room created');

    mediaDevices.getUserMedia(constraints)
      .then(stream=>{
        setLocalStream(stream);
        localST = stream;
        isCaller = true;
      })
  });

  socket.on('roomJoined', room=>{
    console.log('room joined');
    mediaDevices.getUserMedia(constraints)
      .then(stream=>{
        setLocalStream(stream);
        socket.emit('ready', roomNumber)
      });
  });




  const configuration = {iceServers: (
    {'urls':'stun:stun.services.mozilla.com'},
    {'urls':'stun:stun.l.google.com:19302'}
  )};


  // const localPC = new RTCPeerConnection(configuration);
  // const remotePC = new RTCPeerConnection(configuration);

  // const peerConnection = new RTCPeerConnection(configuration);

    socket.on('ready', room=>{
      if(isCaller){
        console.log('ready');
        peerConnection = new RTCPeerConnection(configuration);
        peerConnection.onicecandidate = onIceCandidate;
        peerConnection.onaddstream = onAddStream;
        peerConnection.createOffer()
        .then(offer=>{
          return peerConnection.setLocalDescription(offer)
          .then(()=>{
            console.log('emit offer');
              socket.emit('offer',{
                type:'offer',
                sdp:offer,
                room: roomNumber
              });
            })
          })
      }
    });

    socket.on("offer",e=>{

      if(!isCaller){
        peerConnection = new RTCPeerConnection(configuration);
        console.log('offer');
        peerConnection.onicecandidate = onIceCandidate;
        peerConnection.onaddstream = onAddStream;

        console.log('about to create answer', e);

        //accept offer from here(ready)
        peerConnection.setRemoteDescription(e)
        .then(()=>{
          return peerConnection.createAnswer()
          .then(answer=>{
            return peerConnection.setLocalDescription(answer)
            .then(()=>{
              console.log('emit answer');
                socket.emit('answer',{
                  type:'answer',
                  sdp: answer,
                  room: roomNumber
              }); 
            })
          })
        });
      }

    });



    function onAddStream(e){
      console.log('remote stream', e);
      if (e.stream && remoteStream !== e.stream) {
        console.log('remote stream', e.stream);

        setRemoteStream(e.stream);
      }
  };


    function onIceCandidate(event){
      console.log('ice candidate');

      if(event.candidate){
          console.log('sending ice candidate', event.candidate);

          socket.emit('candidate',{
              type: 'candidate',
              label: event.candidate.sdpMLineIndex,
              id: event.candidate.sdpMid,
              candidate: event.candidate.candidate,
              room: roomNumber
          });
      }
  }


    socket.on('candidate', e=>{
      console.log('candidate', isCaller);
      peerConnection.addIceCandidate(e);
      peerConnection.addStream(localStream);
    });

    socket.on('answer', e=>{
      console.log('answer');
      peerConnection.setRemoteDescription(e);
    });




  return (
    <SafeAreaView style={styles.container}>
    <View style={styles.streamContainer}>
      <View style={styles.streamWrapper}>
          <View style={styles.localStream}>
            {localStream && <RTCView style={styles.rtc} streamURL={localStream.toURL()} />}
            {!localStream && <Button title="Tap to start" onPress={startLocalStream} />}
          </View>
          <View style={styles.rtcview}>
            {remoteStream && <RTCView style={styles.rtc} streamURL={remoteStream.toURL()} />}
          </View>
        </View>
        {/* {!!remoteStream ? <Button style={styles.toggleButtons} title="Click to stop call" onPress={closeStreams} disabled={!remoteStream} /> : localStream && <Button title="Click to start call" onPress={startCall}  />} */}
    </View>
</SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    backgroundColor: '#313131',
    justifyContent: 'space-between',
    alignItems: 'center',
    height: '100%',
    width:'100%'
  },
  streamContainer:{
    backgroundColor: 'grey',
    // justifyContent: 'space-around',
    alignItems: 'center',
    height: '50%',
    width: '100%',
    flexDirection:'column'
  },
  streamWrapper:{
    backgroundColor: 'grey',
    justifyContent: 'space-around',
    alignItems: 'center',
    height: '100%',
    width: '100%',
    flexDirection:'row'
  },
  roomTitle:{
    fontSize:20,
    paddingTop:20
  },
  rtcview: {
    width: '45%',
    height: '60%',
    borderColor:'#ccc',
    borderWidth:3,

  },
  rtc: {
    width: '100%',
    height: '100%',
  },
  localStream:{
    width: '45%',
    height: '60%',
    borderColor:'#ccc',
    borderWidth:3,
    display:'flex',
    alignItems:'center',
    flexDirection:'row',
    justifyContent:'space-around',

  }
});

What is it called when you run your software on a client-supplied cloud platform?

There is an architectural/deployment pattern that works as follows:

  1. Ask the client for access to their account with a cloud computing platform (like AWS, Azure, or Digital Ocean).
  2. Create servers, databases, and whatever else you need on that platform for the client’s individual use. Deploy your application to the newly created servers. This is automated on your side.
  3. The client accesses the application on their servers. Their data stays on their cloud.
  4. Fully manage the servers, databases, etc. for the client for as long as they use the software. You handle updating your application for them, backups (if applicable), and everything else. This is also automated. The client does not need an sysadmin.

This is a kind of middle ground between on-premises software and SaaS. Does it have an established name?

Called the CBP… I think he did a mistake

I have an immigrant visa and I’m an immediate relative of a US resident.. I called the CBP to make sure that I can enter and he warned me not to travel through Europe because I’ll have to stay in another country for 14 days. But that’s, wrong, right? According to the travel proclamation, shouldn’t I be excluded from the ban? Since I’m an immediate relative of a US resident, I mean.

Are so called “successful bloggers” faking it?

There are many videos on Youtube, of so called “successful bloggers” who claim they are making more than US $30,000 per month.

Is this true?

There are a couple of bloggers, who are related to a blogger who is said to be very successful.

But the other two who are related to him, have really done nothing much to show.

Yet they claim they are earning so much.

How can this be?

Regards

The ios called API service only works once, the second service call issues error 1001 – when using AlamoFire under SWIFT

Programming an application in Xcode that calls new services. The call from other services works normally, but the call from another service from another server only works once with Xcode and Iphone Emulator. If you then make a second call from the same GET service, you will see error 1001 and timeout. I need to delete the emulator application to be able to call the same API again.

some mistakes ? I miss something ??

Everything is language: Swift, using ViewController, IOS.

import Alamofire

class MediosRemEntity {
    func getCardForOne(userId: String,  completionHandler: @escaping ((CardOneList)?, String?) -> Void){
        let parameters: Parameters = (:)

        services.requestJSONeWalletOne(userId: userId,endpointName: "getCard", method: .get, params : parameters) { response in
            do {
                     let decoder = JSONDecoder()
                     let data = try decoder.decode(CardOneClick.self, from: response)

                     guard let internalCode = data.internalCode else {
                        let emptyCardList : (CardOneList) = ()
                        completionHandler(emptyCardList, nil)
                        return
                    }
                    if internalCode == "200-0"{
                     guard let cardResult : (CardOneList)  = data.payload.cards else {
                            let emptyCardList : (CardOneList) = ()
                           completionHandler(emptyCardList, nil)
                            return
                        }
                     completionHandler(cardResult,nil)
                    }else{
                        guard let message = data.message else {
                            let emptyCardList : (CardOneList) = ()
                            completionHandler(emptyCardList, nil)
                            return
                        }
                        let emptyCardList : (CardOneList) = ()
                        completionHandler(emptyCardList, message)
                    }
            } catch {
                print("error: (error.localizedDescription)")
                let emptyCardList : (CardOneList) = ()
                completionHandler(emptyCardList, nil)
            }
        }
    }
 }
import Alamofire
import CodableAlamofire

open class API{
public func requestJSONeWalletOne(userId: String,endpointName: String, method: HTTPMethod, params: (String : Any)? = nil, callback: @escaping (Data) -> Void) {
        var headers: (String: String) = ("Content-Type" : "application/json")
        let endpointData = getEndpoint(fromName: endpointName)!
        headers("x-api-key") = endpointData.APIKey
        if let APIToken = endpointData.APIToken {
            headers("x-api-token") = APIToken
        }

        let urlhttp = endpointData.url.absoluteString + userId

        Alamofire.request(urlhttp, method: method, encoding: JSONEncoding.default, headers: headers).responseData { (response) in
            callback(response.data ?? Data())
        }
    }
}

GUI design – what is Flatter's splinter-like behavior called?

I'm looking for a component name that behaves like flutter splinters:

Here is an example of splinters.

What I'm exactly looking for is a list that will expand or shrink depending on how much you've dragged, similar to how Android starters behave when dragging the app list. If it is> 50%, it will be expanded, otherwise it will be reduced again to its minimized state.

What is this type of component / behavior called?

Terminology – Why Random Access Memory, RAM, called "Random Access"?

Mark Hahn,

RAM is not a direct access. It is much more like a hard drive with two-dimensional access and an inherent block size.

Vikki Kinsella

To give you the correct answer, I copy part of a paragraph from the Wikipedia article on random access memory:

“The first practical form of random access memory was the Williams tube

from 1947. It stored data as electrically charged points on the front of a cathode ray tube

. Since the CRT's electron beam could read and write the points on the tube in any order, the memory was a direct access. "

It is the last sentence that really answers the question at hand: "Read and write … in any order", and not just be forced to select an area of ​​the matrix and read the whole in one block (shift register). Or, worse, you have to start at the beginning of the storage medium and read the entire contents every time you want to access a single data bit (punched tape).

Exactly. I don't see anything "random" or "random access". Isn't the QUICK Access Memory more accurate? "The CRT's electron beam could read and write the dots on the tube in any order." But "spots on the tube" are not accidental. The CRT's electron beam does not read or write RANDOM points.

A reader asks: "Why is RAM called random access memory?" – Langa.com

Remember that early computers used tape as storage first – paper tape and later magnetic tape. Tape based storage is serial: If you want a byte of memory in the middle of the tape, you must start at one end of the tape and rewind to the desired location. It's awkward and slow.

In early PCs that used cassette audio tapes as storage, this was not uncommon Dozens of seconds to happen before the PC can even start retrieving certain information from a tape. They would sit there and twist their thumbs as the tape drive whined in the desired location.

With RAM, you can directly access any memory address in one step without having to go through other addresses first. This means that you can access storage spaces in any order – not just by going through 1-2-3 serially.

Although this has nothing to do with the direct access part, RAM is electronic and works at nanosecond speeds instead of the much slower speeds of mechanical tape transport. Together, these two advantages – direct access and electronic speed – result in RAM several orders of magnitude faster than mechanical serial memory. There is no comparison at all!

ELI5: Why is RAM called Random Access Memory? : EXPLAINLEFIVE

Imagine a grid with an x-axis and a y-axis. Think of the data as bits that can be on any x-y coordinate. Now imagine that the processor can place any bit at any xy coordinate in this grid and then retrieve it very quickly because there are no physical media (like a hard drive) that need to be physically manipulated (rotated), to be read. The fact that data can be stored and retrieved from anywhere in the "grid" is where "direct access" comes into play. The computer stores the data wherever it can be saved … no matter where.

The data is only available in RAM as long as power is applied. Switch off the PC and the data in RAM will be lost. Incidentally, this is technically the main difference between "memory" like RAM (which is volatile) and "memory" like a hard drive (which is relatively permanent) … People often mistakenly refer to memory as "memory".

I mention this in case you also suffer from this misunderstanding … no crime is intended, it's just a minor annoyance on my part;)

Before I get flamed, I want to say that I know the term was used for both, but that doesn't mean I have to like it! And I also know that there is relatively permanent storage like ROM … but I usually hear people asking about "storage" when they really mean hard disk space. So please be nice.

TL; DR RAM is a "grid" in which data can essentially be stored as a stream and retrieved quickly.