This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
namespace Util | |
{ | |
/// <summary> | |
/// Helper class for hiding/showing the taskbar and startmenu on | |
/// Windows XP and Vista. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region VideoThumbFlow | |
/// <summary> | |
/// Must be called upon instantiating this prefab | |
/// </summary> | |
/// <param name="preview">The video related to the ID</param> | |
/// <param name="id">The index on hte GalleryData for the content</param> | |
/// <param name="title">Short description or name</param> | |
private void InitializeVideo(String videoUrl, int id, string title) | |
{ | |
gameObject.SetActive(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ExportCSV() | |
{ | |
string[] tableNames = | |
{ | |
"especialidade", "participante", "perfil", | |
"pergunta", "resposta", /*"questao",*/"quiz", | |
"setor", "tecnologia", "treinamento", "empresa" | |
}; | |
using (IDbConnection dbcon = new SqliteConnection(DataManager.Instance.Connection)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//credits: https://forum.unity.com/threads/finally-a-serializable-dictionary-for-unity-extracted-from-system-collections-generic.335797/ | |
[Serializable] | |
public class MyDictionaryEntry | |
{ | |
public GameObject key; | |
public float value; | |
} | |
[SerializeField] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nullable enable | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public interface ISerializableDictionaryKey | |
{ | |
public ISerializableDictionaryKey GetNewKey(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Texture2D ToGrayScale(Color[] cArr) | |
{ | |
var bottomPixelData = cArr; | |
int count = bottomPixelData.Length; | |
var resultData = new Color[count]; | |
for(int i = 0; i < count; i++) | |
{ | |
Color bottomPixels = bottomPixelData[i]; | |
Color temp = new Color( | |
(1f-bottomPixels.r), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var types = Enum.GetValues(typeof(TextureFormat)); | |
try | |
{ | |
foreach (var type in types) | |
{ | |
if(SystemInfo.SupportsTextureFormat((TextureFormat)type)) | |
Debug.Log(Enum.GetName(typeof(TextureFormat),type)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Win32; | |
using System.Collections.Generic; | |
using System.IO.Ports; | |
namespace SerialManagement | |
{ | |
public static class AutodetectPorts | |
{ | |
public class ArduinoPort | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace Fotoprint | |
{ | |
public class PrintManager : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRAGMA temp_store = 2; | |
CREATE TEMP TABLE _Variables(Name TEXT PRIMARY KEY, RealValue REAL, IntegerValue INTEGER, BlobValue BLOB, TextValue TEXT); | |
/*pergunta 1 linha 3*/ | |
insert into main.pergunta (descricao, dificuldade, cod_quiz, cod_especialidade) values ('Podemos utilizar o cateter Power PICC® para infusão de contraste?', 1, 1, 7); | |
/* Declaring a variable */ | |
INSERT INTO _Variables (Name, IntegerValue) VALUES ('pergunta_id',(SELECT last_insert_rowid()) ); | |
-- UPDATE _Variables SET IntegerValue = (SELECT last_insert_rowid()) WHERE Name = 'pergunta_id'; |
NewerOlder