Skip to content

Instantly share code, notes, and snippets.

@nelk
nelk / main.rs
Created July 25, 2019 02:13
Vulkano - Struct used in uniform and in buffer generated twice
use vulkano_shaders;
mod cs {
vulkano_shaders::shader! {
ty: "compute",
src: "
#version 450
struct Val {
float val;
@nelk
nelk / main.rs
Last active July 18, 2019 05:11
vulkano_shaders buffer of struct of struct unwrap None error
use vulkano_shaders;
mod cs {
vulkano_shaders::shader! {
ty: "compute",
src: "
#version 450
struct Node {
float val[5];
@nelk
nelk / keybase.md
Last active December 2, 2015 05:52

Keybase proof

I hereby claim:

  • I am nelk on github.
  • I am ayk (https://keybase.io/ayk) on keybase.
  • I have a public key whose fingerprint is E838 86F8 411C B9D1 043D 1C80 1F96 EEC6 DA3C D128

To claim this, I am signing this object:

@nelk
nelk / SE463 Notes
Last active August 2, 2019 23:09
A summary of SE463 in the order of lecture slides.
SE463 - Specs and Reqs
=======================
Requirements and Specifications
----------------------------------
- World: The world.
- Environment: Subset of world relevant to task at hand.
- System (SUD: System Under Design) - What will be specified to solve the problem.
- Interface: Intersection of Environment and System.
- Shared Phenomena: Things in the interface.
@nelk
nelk / gist:7518107
Created November 17, 2013 20:50
Shale's Query 1 select enr.sno, count(1) from enrollment as enr group by enr.sno;
12345678 1
84018846 6
84019017 6
84022624 6
85034647 7
85342165 6
85342166 3
86008450 6
86008529 6
@nelk
nelk / QuickMotion.java
Last active December 15, 2015 21:19
Android file sharing intent code.
private void showFileChooser(int code, Uri uri, String message) {
Intent intent = new Intent(code == OPEN_FILE_CODE ? Intent.ACTION_GET_CONTENT : Intent.ACTION_SEND);
intent.setType("*/*");
if (code == SAVE_FILE_CODE) {
intent.putExtra(Intent.EXTRA_STREAM, uri);
}
try {
startActivityForResult( Intent.createChooser(intent, message), code);
} catch (android.content.ActivityNotFoundException ex) {