myOptions = [
{ label: 'SSS', value: 'SSS' },
{ label: 'SPC', value: 'SPC' },
{ label: 'SCR', value: 'SCR' },
{ label: 'ALASK', value: 'ALASK' },
{ label: 'ALBAN', value: 'ALBAN' },
{ label: 'MAYO1', value: 'MAYO1' },
{ label: 'GENZY', value: 'GENZY' }
]
let elQuery = '.criteria__activity'
VirtualSelect.init({
ele: elQuery,
options: myOptions,
hideClearButton: true,
multiple: true,
placeholder: '',
searchPlaceholderText: 'Search here..'
});
let vs = document.querySelector(elQuery)
vs.addEventListener('beforeClose', () => {
if (vs.value.length == 0) {
document.querySelector('.criteria-block .criteria__activity-label').classList.remove('anim')
}
});
vs.addEventListener('beforeOpen', () => {
document.querySelector('.criteria-block .criteria__activity-label').classList.add('anim')
});
import threading as th
from collections import deque
lenAllData = 1000000
class ClassForQueue:
queueData = deque()
def threadAddQueue():
# Симулируем заполнение очереди
print('Start added to Queue')
for i in range(lenAllData):
ClassForQueue.queueData.append(i)
print('All added to Queue')
def threadProcQueue():
# симулируем разбор очереди
result = deque()
while True:
if len(ClassForQueue.queueData):
result.append(ClassForQueue.queueData.popleft())
if result[-1] == lenAllData - 1:
print(f'final! Length {len(result)}, last value {result[-1]}')
break
# Запускаем и получаем адекватные данные в выводе
if __name__ == '__main__':
th1 = th.Thread(target=threadAddQueue)
th1.start()
th2 = th.Thread(target=threadProcQueue)
th2.start()
</body>
<script>
$('form').append('<input type="hidden" name="zayac" value="ubezhal">')
</script>
if (empty($_GET['zayac']) or $_GET['zayac'] != 'ubezhal') exit("Error, please enable JS in your browser");
$('.button_card_text').click(function (element) {
$cardElement = $(this).closest('.card')
if ($cardElement.find('.front').hasClass('active')) {
$cardElement.find('.front').removeClass('active');
$cardElement.find('.back').removeClass('active');
$cardElement.removeClass('active');
} else {
$cardElement.find('.front').addClass('active');
$cardElement.find('.back').addClass('active');
$cardElement.addClass('active');
}
})
#Переименовываем стобец
df2Renamed = df2.rename(columns={'param': 'paramJoined'})
#Объединяем и сортируем по индексу
df1concat = pd.concat([df1,df2Renamed]).sort_index()
#Заполняем пустышки
df1concat.paramJoined = df1concat.paramJoined.ffill()
#Удаляем вспомогательные данные
df1result = df1concat.dropna(subset=['param'])
df1result