<div class="scrollContent">
{foreach $animations as $index => $a}
{if $index > 2}
{if $a.filename == '9_1447691013_3726.png'}
{else}
{if $a.filename == '9_1423150010_6441.png'}
{else}
{if $a.filename == '9_1423149959_5909.png'}
{else}
{if $a.filename == '9_1423149908_5874.png'}
{else}
{if $a.filename == '9_1528213223_6374.jpg'}
{else}
{if $a.filename == '9_1527670984_3732.jpg'}
{else}
<div class="spotlightFrame frame{$index+1} contains1" data-index="{$index}">
{if $a.link}<a href="{$a.link}">{/if}
<img src="/upload/{$a.filename}" alt="{$a.title}" />
{if $a.link}</a>{/if}
</div>
{/if}
{/if}
{/if}
{/if}
{/if}
{/if}
{/if}
{/foreach}
</div>
Handovers are great.
if HOST == 'AdaLovelace' or HOST == 'vbu' or HOST == 'asus':
urlpatterns += patterns('',
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}),
)
export const getUniqueIds = (ids: string[]) => {
const uniqueIds = new Set<string>();
return ids.filter((id) => {
if (!uniqueIds.has(id)) {
uniqueIds.add(id);
return true;
}
return false;
});
};
# 5-level loop, forgive me...
for xi, xs in enumerate(X):
for yi, ys in enumerate(Y):
for zi, zs in enumerate(Z):
lx, ly, lz = len(xs), len(ys), len(zs)
# construct points
xx, yy, zz = custom_meshgrid(xs, ys, zs)
world_xyzs = (
torch.cat(
[xx.reshape(-1, 1), yy.reshape(-1, 1), zz.reshape(-1, 1)],
dim=-1,
)
.unsqueeze(0)
.to(count.device)
) # [1, N, 3]
# cascading
for cas in range(self.cascade):
bound = min(2**cas, self.bound)
half_grid_size = bound / resolution
# scale to current cascade's resolution
cas_world_xyzs = world_xyzs * (bound - half_grid_size)
# split batch to avoid OOM
head = 0
while head < B:
tail = min(head + S, B)
# world2cam transform (poses is c2w, so we need to transpose it. Another transpose is needed for batched matmul, so the final form is without transpose.)
cam_xyzs = cas_world_xyzs - poses[
head:tail, :3, 3
].unsqueeze(1)
cam_xyzs = cam_xyzs @ poses[head:tail, :3, :3] # [S, N, 3]
# query if point is covered by any camera
mask_z = cam_xyzs[:, :, 2] > 0 # [S, N]
mask_x = (
torch.abs(cam_xyzs[:, :, 0])
< cx / fx * cam_xyzs[:, :, 2] + half_grid_size * 2
)
mask_y = (
torch.abs(cam_xyzs[:, :, 1])
< cy / fy * cam_xyzs[:, :, 2] + half_grid_size * 2
)
mask = (
(mask_z & mask_x & mask_y).sum(0).reshape(lx, ly, lz)
) # [N] --> [lx, ly, lz]
# update count
count[
cas,
xi * S : xi * S + lx,
yi * S : yi * S + ly,
zi * S : zi * S + lz,
] += mask
head += S
$options.splice($options.indexOf('option7'), 1);
$options.splice($options.indexOf('option5'), 1);
$options.splice($options.indexOf('option4'), 1);
$options.splice($options.indexOf('option3'), 1);
$options.splice($options.indexOf('option2'), 1);
$options.splice($options.indexOf('option1'), 1);
class FileReader extends EventTarget(...READER_EVENTS) {
// [...]
readAsArrayBuffer() {
throw new Error('FileReader.readAsArrayBuffer is not implemented');
}
}
React Native's way of saying they don't support FileReader.readAsArrayBuffer()
# 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
Select * from Order --doesn't work
select * from [order] --works
--it's planning module in our system...
I think, it's really bad idea to use reserved words in names of tables. I'm surprised, that this db doesn't contain table named like [select]...
// What they did:
var serverCommands = {};
for(var each in commandList.general)
(dmCommands[commandList.general[each].type] ? dmCommands[commandList.general[each].type] +=
(config.prefix + each + (commandList.general[each].args ? ' ' + commandList.general[each].args : '') +
': ' + commandList.general[each].description + '\n') : (dmCommands[commandList.general[each].type] =
'\u200B'+ config.prefix + each + (commandList.general[each].args ? ' ' + commandList.general[each].args : '') +
': ' + commandList.general[each].description + '\n'))
// What they should've done:
let srvrCmds = new Map();
let gldCmds = commandList[message.guild.id];
for (let each in gldCmds) {
const cur = gldCmds[each];
const text = `${config.prefix + each + (cur.args ? " " + cur.args : "")}: ${cur.description}\n`;
const srvrCmdType = srvrCmds.get(cur.type);
srvrCmds.set(cur.type, (srvrCmdType || "\u200B") + text);
}
fn second_word(s: &String) -> &str {
let bytes = s.as_bytes();
let mut k = 0;
let mut n =0;
for (i, &item) in bytes.iter().enumerate() {
if item == b' ' {
k = k + 1;
if k == 1 {
n = i;
}
else if k == 2 {
return &s[1+n..i];
}
}
}
&s[..]
}
the code looks like shit
public class Main {
public static void main(String[] args) {
try {
//code goes here
} catch (Exception e) {
System.exit(0);
}
}
}
<table class="table table-sm o_main_table" style="width='100%'">
<!-- ... thanks ...-->
</table>
Found that on a customer's project, wonder if my employee knows about inline css
{!! Form::select('ticket_category', \App\Models\Term::whereHas('taxonomy', function($query) {
$query->where('slug', 'ticket_category');
})->whereIn('id', ['15', '16', '17', '18'])
->pluck('name','id'), old('ticket_category'), [
'id' => 'ticket_category',
'class' => 'form-control',
'placeholder' => 'Seleccione una categorÃa']
)
!!}
to do it in an array if you can put it in the database so that you still burn the position
<?php
class CasinoCode
{
CONST POST = 'POST';
CONST GET = 'GET';
$data = $this->callAPI('/hidden', [], self::POST);
production code of an API with dozens of millions of requests per day.
<?php
if(isset($_POST['csrf'])){
if($_POST['csrf'] !== $_SESSION['csrf']){
return 'session expired!';
}
}
In all Sama Samaneh
university and class management system from iran :)