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
| 1. **Analyze User Input:** | |
| - **Characters/Items:** Man, bucket of grain, chicken, dog | |
| - **Constraint 1:** Can only take one item at a time | |
| - **Constraint 2:** Chicken + Grain = Chicken eats grain (bad) | |
| - **Constraint 3:** Dog + Chicken = Dog eats chicken (bad) | |
| - **Goal:** Get all three safely to the other side | |
| 2. **Identify Core Problem Type:** | |
| - This is a classic river-crossing puzzle, similar to the "wolf, goat, cabbage" or "fox, chicken, grain" puzzles. | |
| - Standard constraints usually involve pairwise conflicts that can't be left alone without supervision. |
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 <Cocoa/Cocoa.h> | |
| #import <Quartz/Quartz.h> | |
| #import <Metal/Metal.h> | |
| #import <MetalKit/MetalKit.h> | |
| struct Viewport { | |
| vector_float2 center; // Center of the view in Simulation Space | |
| float zoom; // Units per pixel (or scale factor) | |
| vector_uint2 dims; // Physical Pixel Dimensions (2560x1440) |
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 <Foundation/Foundation.h> | |
| void psetboard(NSSet * board) | |
| { | |
| for (int y =0; y< 9 ; y++) | |
| { | |
| for (int x = 0; x<9; x++) | |
| { | |
| if ([board containsObject:@(y*9+x)]) |
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 <complex.h> | |
| #include <stdio.h> | |
| #import <Cocoa/Cocoa.h> | |
| #import <Foundation/Foundation.h> | |
| #import <unistd.h> | |
| NSColor* colourWithHSV(float h, float s, float v) | |
| { | |
| double r, g, b; | |
| double j; |
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
| { | |
| "mappings": { | |
| "properties": { | |
| "filemeta": { | |
| "properties": { | |
| "_kMDItemDisplayNameWithExtensions": { "type": "text" }, | |
| "kMDItemAlternateNames": { "type": "text" }, | |
| "kMDItemBitsPerSample": { "type": "long" }, | |
| "kMDItemCFBundleIdentifier": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, | |
| "kMDItemColorSpace": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, |
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 static void main(String[] args) | |
| { | |
| RestClientBuilder cb = RestClient.builder(new HttpHost("10.35.38.214", 9200)); // configure | |
| RestHighLevelClient client = new RestHighLevelClient(cb); | |
| // Transport transport = new RestClientTransport(restClient, new JacksonJsonpMapper()); | |
| // ElasticsearchClient client = new ElasticsearchClient(transport); | |
| // MultiGetRequest mgRequest = new MultiGetRequest(); | |
| // GetRequest getRequest = new GetRequest("quick_look"); |
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
| # ZERO Arguments | |
| B | |
| b | |
| B* | |
| b* | |
| BI | |
| BT | |
| BX | |
| EI |
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
| #!/usr/local/bin/python3 | |
| import math | |
| import pysig as ps | |
| lcar = ps.Square(600) | |
| rcar = ps.Sawtooth(600) | |
| mod = ps.Scale(ps.Sine(10),outscale=[ps.DB(-9),ps.DB(-6)]) | |
| amp = ps.DC(ps.DB(-6)) |
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 <CoreFoundation/CFString.h> | |
| #include <qpdf/QPDF.hh> | |
| #include <qpdf/QPDFObjectHandle.hh> | |
| #include <qpdf/QPDFWriter.hh> | |
| #include <Foundation/NSObjcRuntime.h> | |
| #include <string> | |
| int main (int argc, char* argv[]) | |
| { |
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 idsetd = charIDToTypeID( "setd" ); | |
| var desc12 = new ActionDescriptor(); | |
| var idnull = charIDToTypeID( "null" ); | |
| var ref1 = new ActionReference(); | |
| var idChnl = charIDToTypeID( "Chnl" ); | |
| var idfsel = charIDToTypeID( "fsel" ); | |
| ref1.putProperty( idChnl, idfsel ); | |
| desc12.putReference( idnull, ref1 ); | |
| var idT = charIDToTypeID( "T " ); | |
| var desc13 = new ActionDescriptor(); |
NewerOlder