/// <summary>
/// Returns true if any component of of Vector3 v is negative
/// </summary>
public static bool Ext_IsNegative(this Vector3 v)
{
return v.x < 0f && v.y < 0f && v.z < 0f;
}
Either the description is wrong or the method in itself
for (const order of orders) {
for (const resultItem of results) {
if (resultItem.machine != "TRANSFER") {
shiftsLoop: for (const shift of resultItem.shifts) {
if (shift.products) {
for (const product of shift.products) {
if (product.product == order.product) {
for (const routing of routings) {
if (routing.output == order.product) {
const machinePlant = findMachinePlant(resultItem.machine, machines)
if (routing.type == "ODP") {
if (machinePlant == order.plant) {
const msg = createMessage(order, shift, resultItem.machine, CHOR)
requests.push(buildRequest(msg))
} else {
//CHEE CHIE CHEI
}
break shiftsLoop
} else if (routing.type == "OCL" || routing.type == "RCL") {
const msg = createMessage(order, shift, resultItem.machine, CHCL)
requests.push(buildRequest(msg))
//CHCL
}
}
}
}
}
}
}
}
}
namespace network
{
class ip
{
uint _IP;
public ushort this[int i]
{
get
{
switch(i)
{
case 0:
case 1:
case 2:
case 3:
return (ushort)(_IP>>(i*8));
default:
throw new IndexOutOfRangeException();
}
}
set
{
switch(i)
{
case 0:
case 1:
case 2:
case 3:
_IP=(((uint)value)<<i*8);
break;
default:
throw new IndexOutOfRangeException();
}
}
}
}
}
I have no idea what this does
if ($this->getTestSku()) {
...
} elseif ($this->getTestOffset() >= 0 && $this->getTestLimit() > 0) {
...
} else {
Mage::throwException(sprintf("Invalid parameters for test mode: sku %s or offset %s and limit %s", $this->getTestSku(), $this->getTestOffset(), $this->getTestLimit()));
}
@define
class DedupConfig:
columns_to_dedup_by: Optional[List]
time_range_in_minutes: Optional[int]
timestamp_column_name: Optional[str]
leave_deduped_samples_in_time_range: Optional[int] = field(default=1)
def __attrs_post_init__(self):
if not self.timestamp_column_name:
raise ValueError(f"timestamp_column_name parameter must be provided")
if not self.columns_to_dedup_by:
raise ValueError(f"columns_to_dedup_by parameter must be provided")
if not self.time_range_in_minutes:
raise ValueError(f"time_range_in_minutes parameter must be provided")
Path path = FileSystems.getDefault().getPath("../../../../../../../../../../EmailResults.csv");
Files.deleteIfExists(path);
const convertMenu = menus => {
const menusAssinged = menus.filter(menu => menu.parentId == null).sort((a, b) => a.order - b.order).map(menu => {
if (menus.some(element => element.parentId == menu.menuId)) {
return {
title: menu.title,
icon: { icon: menu.icon },
children: menus.filter(menuChil => menuChil.parentId == menu.menuId).sort((a, b) => a.order - b.order).map(menuChil => {
if (menuChil.pathRoute.includes(":")) {
const params = menuChil.pathRoute.split(":").pop()
return {
title: menuChil.title,
to: { name: menuChil.nameRoute, params: { [params]: "abc" } },
}
} else {
return {
title: menuChil.title,
to: menuChil.nameRoute,
}
}
}),
}
} else {
return {
title: menu.title,
icon: { icon: menu.icon },
to: menu.nameRoute,
}
}
})
menusUser.value = menusAssinged
localStorage.setItem('menus', JSON.stringify(menusAssinged))
}
when they exorcise the callbacks demon but they appear in functional
public abstract class AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl {
private static AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl theOneAndOnlyInstance;
private Connection theUnbreakableEverlastingDatabaseLifeline;
public static AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl summonTheSingleton() {
if (theOneAndOnlyInstance == null) {
theOneAndOnlyInstance = new ConcreteImplementation();
}
return theOneAndOnlyInstance;
}
public abstract void initiateUnswervingDatabaseLinkWithCompulsiveRetriesAndUnyieldingTimeout();
public abstract InventoryProduct concoctAndJumpstartBrandNewInventoryProductPostRigorousValidation();
public abstract Service bootstrapAndEnrollNovelServicePostInfallibleAvailabilityCheck();
public abstract void seizeAndChronicleExceptionWithStackTrackAndSignalDeveloper(Exception e);
public abstract void manageAndFineTuneResourceConsumptionForPeakEfficiency(Resource resource);
public abstract void launchDatabaseTransactionWithOptimumIsolationLevel();
public abstract void ratifyDatabaseTransactionAndScourForPossibleConflicts();
public abstract void revokeDatabaseTransactionInEventOfUnforeseenErrors();
public abstract void safelySeverDatabaseConnectionAndLiberatePreciousResources();
}
return [word for word in words if any(all(ch in row for ch in word.lower()) for row in rows)]
Filtering words that can be typed using only one row of the keyboard.
let showDots = typeof project.showDots === 'boolean' ? project.showDots : false;
if (showDots) {
// Somecode ...
}
Why, just why??
# Better off alone
use_bmp 137
live_loop :drumrolls do
sample : drum_splash_soft, rate: 0.775, finsh: 0.75, amp: 0.75
use_synth :pnosie
with_fx :1x1_techno, phase: 8, phase_offset: 0.4,cutoff_min: 79, cutoff
with_fx :fhpf, cutoff: 115, res: 0.8, reps: 18 do
play :E1, release: 0.125
sleep 0.25
end
end
sleep 47.5
with_fx :ixi_techno, phase: 29 res: 0.5 re
use_rx_synth :mod_dsaw
live_loop :wierd_synth do re mi
Do sleep 0.3 then sample :sn_dolf, :amp 0.2 start 0.1 next finish: 1.5 do
/**
* Deserializes the contents of the incoming message buffer {@code b}.
*
* @return deserialised object
* @throws UnsupportedEncodingException If the named charset is not supported
*/
Object r() throws UnsupportedEncodingException{
int i=0, n, t=b[j++];
if(t<0)
switch(t){
case -1:
return rb();
case (-2):
return rg();
case -4:
return b[j++];
case -5:
return rh();
case -6:
return ri();
case -7:
return rj();
case -8:
return re();
case -9:
return rf();
case -10:
return rc();
case -11:
return rs();
case -12:
return rp();
case -13:
return rm();
case -14:
return rd();
case -15:
return rz();
case -16:
return rn();
case -17:
return ru();
case -18:
return rv();
case -19:
return rt();
}
if(t>99){
if(t==100){
rs();
return r();
}
if(t<104)
return b[j++]==0&&t==101?null:"func";
if(t>105)
r();
else
for(n=ri();i<n;i++)
r();
return "func";
}
if(t==99)
return new Dict(r(),r());
j++;
if(t==98)
return new Flip((Dict)r());
n=ri();
switch(t){
case 0:
Object[] L=new Object[n];
for(;i<n;i++)
L[i]=r();
return L;
case 1:
boolean[] B=new boolean[n];
for(;i<n;i++)
B[i]=rb();
return B;
case 2: {
UUID[] G=new UUID[n];
for(;i<n;i++)
G[i]=rg();
return G;
}
case 4:
byte[] G=new byte[n];
for(;i<n;i++)
G[i]=b[j++];
return G;
case 5:
short[] H=new short[n];
for(;i<n;i++)
H[i]=rh();
return H;
case 6:
int[] I=new int[n];
for(;i<n;i++)
I[i]=ri();
return I;
case 7:
long[] J=new long[n];
for(;i<n;i++)
J[i]=rj();
return J;
case 8:
float[] E=new float[n];
for(;i<n;i++)
E[i]=re();
return E;
case 9:
double[] F=new double[n];
for(;i<n;i++)
F[i]=rf();
return F;
case 10:
char[] C=new String(b,j,n,encoding).toCharArray();
j+=n;
return C;
case 11:
String[] S=new String[n];
for(;i<n;i++)
S[i]=rs();
return S;
case 12:
Timestamp[] P=new Timestamp[n];
for(;i<n;i++)
P[i]=rp();
return P;
case 13:
Month[] M=new Month[n];
for(;i<n;i++)
M[i]=rm();
return M;
case 14:
Date[] D=new Date[n];
for(;i<n;i++)
D[i]=rd();
return D;
case 15:
java.util.Date[] Z=new java.util.Date[n];
for(;i<n;i++)
Z[i]=rz();
return Z;
case 16:
Timespan[] N=new Timespan[n];
for(;i<n;i++)
N[i]=rn();
return N;
case 17:
Minute[] U=new Minute[n];
for(;i<n;i++)
U[i]=ru();
return U;
case 18:
Second[] V=new Second[n];
for(;i<n;i++)
V[i]=rv();
return V;
case 19:
Time[] T=new Time[n];
for(;i<n;i++)
T[i]=rt();
return T;
}
return null;
}
Manually maintained open-source code on GitHub. Looks like decompiled from obfuscated binary, they just reformatted it, added some comments and now are making manual changes. Current version: https://github.com/KxSystems/javakdb/blob/master/src/kx/c.java Original version: https://github.com/KxSystems/javakdb/blob/c9afe6fa32d7d3e3cddabdc9bd43f0155a5d2a1b/src/kx/c.java
isCreatedUser : !this.isEdit ? true : false
Vue.js project, someone wanted to verify if the user was being edited or created...
// IsFooBar being a boolean, we check if it's different from true and from false
if (x.IsFooBar != true && x.IsFooBar != false)
{
return "error";
}
x.IsFooBar is juste a regular bool
<?
if (ini_get('register_globals') != 1){
if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);
if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);}