• Второе высшее ради H1b визы, где получить дистанционно и проверить котируется ли диплом?

    alexgp13
    @alexgp13
    Руководитель ИТ-проектов
    Прошу прощения, что не по теме, но, думаю, будет полезно. Обратите внимание на визы O1, они все еще работают для ИТ-специалистов, при этом на них нет лотереи. Собрать подходящий для этой визы кейс для ИТ-специалиста сложно, но можно. Возможно, вместо диплома стоит обратить внимание именно на этот вариант.

    По теме - все российские ВУЗы вышли из Болонской системы, бакалавра больше не дадут. Как обучение будет признаваться дальше - еще более сложный вопрос. Поэтому если хотите гарантий - смотрите на западные ВУЗы.

    Еще вариант - получить магистра в немецком ВУЗе, да, придется пару лет пожить в Германии, но это, думаю, не самое плохое, что может быть.
    Ответ написан
    2 комментария
  • Как узнать уровень освещения объекта?

    combine1
    @combine1
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    
    public class LightDetection : MonoBehaviour
    {
        [Header("Settings")]
        [Tooltip("The camera who scans for light.")]
        public Camera m_camLightScan;
        [Tooltip("Show the light value in the log.")]
        public bool m_bLogLightValue = false;
        [Tooltip("Time between light value updates (default = 0.1f).")]
        public float m_fUpdateTime = 0.1f;
    
        public static float s_fLightValue;
    
        private const int c_iTextureSize = 1;
    
        private Texture2D m_texLight;
        private RenderTexture m_texTemp;
        private Rect m_rectLight;
        private Color m_LightPixel;
    
        private void Start()
        {
            StartLightDetection();
        }
    
        /// <summary>
        /// Prepare all needed variables and start the light detection coroutine.
        /// </summary>
        private void StartLightDetection()
        {
            m_texLight = new Texture2D(c_iTextureSize, c_iTextureSize, TextureFormat.RGB24, false);
            m_texTemp = new RenderTexture(c_iTextureSize, c_iTextureSize, 24);
            m_rectLight = new Rect(0f, 0f, c_iTextureSize, c_iTextureSize);
    
            StartCoroutine(LightDetectionUpdate(m_fUpdateTime));
        }
    
        /// <summary>
        /// Updates the light value each x seconds.
        /// </summary>
        /// <param name="_fUpdateTime">Time in seconds between updates.</param>
        /// <returns></returns>
        private IEnumerator LightDetectionUpdate(float _fUpdateTime)
        {
            while (true)
            {
                //Set the target texture of the cam.
                m_camLightScan.targetTexture = m_texTemp;
                //Render into the set target texture.
                m_camLightScan.Render();
    
                //Set the target texture as the active rendered texture.
                RenderTexture.active = m_texTemp;
                //Read the active rendered texture.
                m_texLight.ReadPixels(m_rectLight, 0, 0);
    
                //Reset the active rendered texture.
                RenderTexture.active = null;
                //Reset the target texture of the cam.
                m_camLightScan.targetTexture = null;
    
                //Read the pixel in middle of the texture.
                m_LightPixel = m_texLight.GetPixel(c_iTextureSize / 2, c_iTextureSize / 2);
    
                //Calculate light value, based on color intensity (from 0f to 1f).
                s_fLightValue = (m_LightPixel.r + m_LightPixel.g + m_LightPixel.b) / 3f;
    
                if (m_bLogLightValue)
                {
                    Debug.Log("Light Value: " + s_fLightValue);
                }
    
                yield return new WaitForSeconds(_fUpdateTime);
            }
        }
    }
    Ответ написан
    2 комментария
  • 1-3 ppi в мониторе сильно заметно?

    JohnnyGat
    @JohnnyGat
    Стараюсь писать код, понятный человеку.
    Нет, не заметно.
    Нет, не влияет.
    Ответ написан
    Комментировать
  • 1-3 ppi в мониторе сильно заметно?

    Aetae
    @Aetae
    Тлен
    Ppi - это пикселей на инч.
    Если у них идентичные физические размеры экрана и идентичные рабочие разрешения, то хз как у них может быть разный ppi. Мб вообще ошибка округления.

    А влияет ли для тебя: если ты сможешь определить разницу в один пиксель из 90 на участке размером 2.5 см - то да, иначе нет.)
    Ответ написан
    Комментировать