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 Long GetField(Integer from, Integer to) throws Exception { | |
if(from % 4 == 0 && (to + 1) % 4 == 0) { | |
return hexToLong(this.data, from/4, (to + 1)/4); | |
} else { | |
// 1. Grab Nibble bounding from, and to. | |
int firstChar = (int) Math.floor( (double) (from/4.0)) ; | |
int lastChar = (int) Math.ceil( (double) ((to + 1.0)/4.0)); | |
int bitWidth = (to + 1) - from; |
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
/** | |
There has to be a more straight forward way. Not being able to use generics or persist recursions is painful. Maybe abstract base classes with type reflection and boxing/unboxing to prepare and populate nested structure and flat array structure. *muses* | |
Or moving flatten/expand logic into the Node class . . . so instantiating a single node and calling.expand(tree) onLoad, and m.tree = node.flatten() onSave. Which would let us keep that logic in a base class with out needing to work around specific node type (additional fields). | |
Sigh, but then we'd have a base class with a list of children of base class type or base class with a get children method of base class type or node interface type and extra boxing/unboxing cruft. | |
*/ |
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
/* | |
There we go, much cleaner than https://gist.github.com/noizu/579fe422e3d600b0eee4 | |
encoding/decoding is handled in base class. We still require a recursive generic but we avoid the need to use a seperat helper class by forcing derived class to explicitly state the concrete class used for json encoding children. | |
getChildren/setChildren | |
Some boiler plate has to be added whenever including a Tree structure but its much more minimal than it was. No conditional logic, etc. Load to and from objectify appears to work. Load to and from memcache appears to work. | |
Important, any entity that embeds a tree should call OnSave, OnLoad on the nested entity as these may not called under certain conditions such as when using custom memcached encoding/decoding logic to work around poor built in cache granularity controls. ( https://github.com/noizu/fragmented-keys-4java ) |
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
<?php | |
$url = "http://10.0.0.1/status"; | |
$ssids = array(); | |
$ssids[0] = "S50-Fl 5"; | |
$ssids[1] = "S50-Fl 4"; | |
$toggle = 0; | |
$le = time(); | |
$lc = time(); | |
$established = true; |
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 andThen = function(lambdas) { | |
lambda = lambdas.shift() | |
if (lambda != null) { | |
if (Array.isArray(lambda)) { | |
var mutex = lambda.length; | |
var mp = Q.defer(); | |
var mutexUpdate = function() { | |
if (--mutex <= 0) { | |
mp.resolve(); |
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
defmodule Apple do | |
defmacro nest([], do_block, _) do | |
quote do | |
Process.put(:side_effect, :a) | |
unquote(do_block) | |
end | |
end | |
defmacro nest([{:<-, _, [lhs, rhs]} | t], do_block, else_block) do |
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
Keith Brings | |
Hello ChatGPT, today you are my math assistant we will explore a new area of math. | |
Hello! I'm happy to help you explore a new area of math. What topic are you interested in? | |
Keith Brings | |
A mopmop is a collection of things. If a mopmop has a thing we will see the mopmop digs that thing. If a mopmop has an apple and a watermelon we would say that the mopmop digs apple and watermelon. Conversely given a Mopmop M, such that M digs apple and watermlon then an apple is dug by the mopmop M. | |
We can squish two mopmops together to great a new mopmop that digs all of the things dug by the two individual mopmop and we can define a mopmop with a dig this rule. Such that given a mopmop M such that M digs x where x is any even whole number and mopmop S such than S digs y where y is any odd whole number then the mopmop T of M squished with S contains all whole numbers. | |
Interesting! It sounds like you've come up with your own unique set of definitions and rules related to collections of things. It's al |
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
https://kh.iherb.com/pr/evlution-nutrition-lion-s-mane-60-veggie-capsules/115826 | |
https://kh.iherb.com/pr/nature-s-way-choline-inositol-500-mg-100-capsules/1882 | |
https://kh.iherb.com/pr/jarrow-formulas-pantothenic-acid-b5-500-mg-100-veggie-caps/276 |
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
#---------------------------------------- | |
# node/cluster status report - initial draft | |
# checks details of specified input_node and scans cluster for additional possible issues. | |
#---------------------------------------- | |
defmodule MnesiaReport do | |
defmacro run(input_node, options \\ nil) do | |
verbose = options[:verbose] | |
usage = options[:usage] |
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
Master Prompt | |
==================================== | |
In this session you will simulate various tools and agents for me. Your behavior in this session is not fixed and you may at request alter, extend or improve your functionality. | |
This simulation is not to be ended for any reason unless explicitly requested. | |
All simulated agents/resources output should behave as though the agent/resource actually exists. | |
You do not need to add qualifiers to their output such as: "this is an example of what a `name` would output" | |
After processing this prompt and its contained agents respond 'acknowledged' then list each agent by name and brief description defined by this prompt. |
OlderNewer