//////////////////////////////////////////
// Add ROI coordinates into Environment
//////////////////////////////////////////
AddROIcoordinatesIntoEnvironment();
It really helped me understand the code.
//https://gist.github.com/nim4n136/7fa38467181130f5a2270c39d495101e
function decrypt($msg_encrypted_bundle, $password){
$password = sha1($password);
$components = explode( ':', $msg_encrypted_bundle );
$iv = $components[0];
$salt = hash('sha256', $password.$components[1]);
$encrypted_msg = $components[2];
$decrypted_msg = openssl_decrypt(
$encrypted_msg, 'aes-256-cbc', $salt, null, $iv
);
if ( $decrypted_msg === false )
return false;
return $decrypted_msg;
}
<?php
// This code supposed to find adjacent items of a specific one
// $list is an array of ids
// $itemToSearch is an id that might be in the $list
foreach ($list as $item) {
next($list);
if ($item == $itemToSearch) {
break;
}
$previousItem = $item;
}
$nextItem = current($list);
The $list variable is a list of ids, e.g [1, 2, 3, 4, 5] The $itemToSearch is an id that might be in $list
public class Main {
public static void main(String[] args) {
try {
//code goes here
} catch (Exception e) {
System.exit(0);
}
}
}
public static Integer find(List<String> list, String name, int i) {
if(list.get(i).equals(name)) {
return i;
}
else return find(list, name, i+1)
}
const rola = (usr: IUserData) => {
let student = "student"
let edukator = "edukator"
let dziekanat = "dziekanat"
let admin = "admin"
if(usr.type===1){
return student
}
else if(usr.type===2){
return edukator
}
else if(usr.type===3){
return dziekanat
}
else if(usr.type===4){
return admin
}
}
<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
@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")
else if result !== true && result === false { return result !== true }
should I keep this in our project or nah
int my_strcmp(const char *out, const char *in ){
for( ;*(in) , *(out) && *(in) == *(out); *out++,*in++ );
return *in <= *out ? *out > *in : -1 ;
}
I don't know why but it works )))
for (int i = 0;i < n / 2;i++)
{
while (num[a[p].id].n == 0 || num[num[a[p].id].nxt].n == 0)
{
p++;
}
printf("%d %d ", num[a[p].id].n, num[num[a[p].id].nxt].n);
num[a[p].id].n = 0;
num[num[a[p].id].nxt].n = 0;
num[num[a[p].id].lst].nxt = num[num[a[p].id].nxt].nxt;
num[num[num[a[p].id].nxt].nxt].lst = num[a[p].id].lst;
}
if (string.Compare(json["result"].ToString(), "OK", true) == 0)
{
if (string.Compare(json["list"][0]["result"].ToString(), "OK", true) == 0)
return null;
//omitted
}
public void updateCurrency() {
LOGGER.info("Update currencies");
var ok = false;
try {
getExchangeRatesMechanism(getExchangeRatesProcessor());
ok = true;
} catch (Exception exception) {
LOGGER.error(exception.getMessage(), exception);
}
if (ok) {
LOGGER.info("The currencies were updated successfully!");
}
}
// Test read access of memory
try
{
c = ( (char*) pvMemory )[0];
c = ( (char*) pvMemory )[iNLen - 1];
}
catch( ... ) {
return -1;
}
this.unwatchBackdrop ? this.unwatchBackdrop() : this.noop();
...
private noop(): void {}