While there are [several][1] [question][2] [topics][3] dealing with how to program GUIs in Unity, none of them really answer the question I wanted to know: How to lay out the actual code. After my first project in Unity, here are the thoughts I have on how to build a non-trivial GUI in Unity
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
import boto3 | |
import botocore | |
from time import sleep | |
import requests | |
import ipaddress | |
interesting_address = [ | |
'3.0.0.3', | |
'3.0.0.1', |
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
Show hidden characters
{ | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"ensure_newline_at_eof_on_save": true, | |
"trim_trailing_white_space_on_save": true, | |
"translate_tabs_to_spaces": 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
// automatically add navigation items to carousels | |
$(".carousel").append('<!-- Controls --> \ | |
<a class="left carousel-control" href="#" role="button" data-slide="prev"> \ | |
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> \ | |
<span class="sr-only">Previous</span> \ | |
</a> \ | |
<a class="right carousel-control" href="#" role="button" data-slide="next"> \ | |
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> \ | |
<span class="sr-only">Next</span> \ | |
</a>'); |
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
-- 19. List the 10 best directors (use the average score of their films to determine who is best) in descending | |
-- order along with the number of films they've made and the average score for their films. Only consider | |
-- directors who have made at least five films (4 marks) | |
SELECT * FROM ( | |
SELECT * FROM ( | |
SELECT name, COUNT(*) AS "NUM_FILMS", AVG(score) as "AVERAGE" FROM shared.MOVIE, shared.ACTOR | |
WHERE shared.actor.id = director | |
GROUP BY name) | |
WHERE NUM_FILMS > 4 | |
ORDER BY AVERAGE DESC) |
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
#include <opencv2/objdetect/objdetect.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <iostream> | |
#include <stdio.h> | |
using namespace std; | |
using namespace cv; |
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
import java.io.*; | |
import java.util.*; | |
public class TrainClassifier { | |
private static ArrayList<String> stopWords; | |
public static void main(String[] args) { | |
// based on word list from http://www.ranks.nl/resources/stopwords.html |
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
import java.util.*; | |
import java.lang.Math; | |
public class NaiveBayesClassifier implements java.io.Serializable { | |
// the number of spam and ham documents | |
private int numSpam = 0; | |
private int numHam = 0; | |
// total number of words we've seen |
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
import java.io.*; | |
import java.util.Scanner; | |
import java.util.Map; | |
import java.util.HashMap; | |
import java.util.Set; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.lang.Math; | |
public class filter { |
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
#include "sparse.h" | |
void sparse_debug(sparse_matrix* m) | |
{ | |
for(int r = 0; r < m->rows; r++) | |
{ | |
printf("row %d:\n", r); | |
sparse_cell* c = m->row[r]; | |
while(c != NULL) | |
{ |
NewerOlder