This file contains 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 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
//From: https://forum.unity.com/threads/skipping-to-video-frame-not-working-on-android.930021/#post-6173383 | |
public void PrepareVideoForPlayback() { | |
Benchmark("Prepare Video Player for " + media.path); | |
videoPlayer.url = media.path; | |
videoPlayer.source = VideoSource.Url; | |
videoPlayer.renderMode = VideoRenderMode.APIOnly; | |
videoPlayer.prepareCompleted += OnVideoPrepareCompleted; | |
videoPlayer.Prepare(); | |
} | |
This file contains 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 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 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 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 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 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 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'; |
This file contains 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
import hashlib | |
import os | |
def getHashes(path, fileHashes): | |
print("executing in "+ path) | |
for filename in os.listdir(path): | |
fullpath = os.path.join(path,filename) | |
if os.path.isfile(fullpath): |
NewerOlder