Language switcher shows wrong language on front page after detection by browser settings

Content and interface are displayed correctly but the language switcher shows the default language when the language negotiation is set to these options:

  • URL (language prefix)
  • Browser
  • Standard

Means: Browser detection leads to displaying content in german for example, but the language switcher itself shows still “english” as selected. Even when clicking on it the language still is german.

This only happens on the front page, on other paths the prefix takes effect and the switcher shows the correct, selected language.

Any ideas how to fix this? Thanks in advance!

EDIT: The frontpage is designed with translated blocks only, there’s no node to point the multilingual variable to. For multilingual we have following modules installed and used: – Internationalization (i18n) – Block languages (i18_block) – Multilingual content (i18n_node) – String translation (i18n_string)

For each language there are several “standalone” blocks, meaning not translated via the block translation option. Visibility is set through these settings:

enter image description here

“Detection Error on Storage Device” on dual booted Windows 10 machine


Problem

Previously I went into the potential broken storage issues and (possibly) resolved with the solution provided in this answer.

However, when I booted into Windows 10 system today, it first forcibly rebooted a couple of times and made updates and then it ran into the “Detection Error in Storage Device” error. This error somehow disappears after I cut the power and rebooted about 2-3 times. I am afraid this error would come back some day and cause my research data/code loss.

However, I had no clues about what exactly this means even after reading this question.

My questions are

  • What I could do to make sure all my data stored in this machine is secure.
  • How do I fix this issue (if possible).

BTW, the model of my machine is Thinkpad X270 which I bought in Sep. 2017. It worked fine for about 16 months but somehow ran into these storage errors this March.

Could someone help me, thank you in advance!

What is the difference between object detection, semantic segmentation and localization?

I’ve read those words in quite a lot of publications and I would like to have some nice definitions for those terms which make it clear what the difference between object detection vs semantic segmentation vs localization is. It would be nice if you could give sources for your definitions.

Attack steps in NMAP during service and version detection [on hold]

I have two machines:

  • Kali Linux [192.168.1.1/24]
  • Ubuntu with snort IDS installed)[192.168.1.2/24]

I’m testing nmap tool against Ubuntu machine (with Snort IDS), and have ran the command nmap -sV 192.168.1.1.

Snort IDS triggered the following alerts:

05/12-09:37:20.917229  [**] [1:2010937:3] ET SCAN Suspicious inbound to mySQL port 3306 [**] [Classification: Potentially Bad Traffic] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:3306 05/12-09:37:20.917482  [**] [1:1421:18] PROTOCOL-SNMP AgentX/tcp request [**] [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:705 05/12-09:37:20.927083  [**] [1:2010935:3] ET SCAN Suspicious inbound to MSSQL port 1433 [**] [Classification: Potentially Bad Traffic] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:1433 05/12-09:37:20.929115  [**] [1:2010939:3] ET SCAN Suspicious inbound to PostgreSQL port 5432 [**] [Classification: Potentially Bad Traffic] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:5432 05/12-09:37:20.944305  [**] [1:2010936:3] ET SCAN Suspicious inbound to Oracle SQL port 1521 [**] [Classification: Potentially Bad Traffic] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:1521 05/12-09:37:20.945760  [**] [1:2002911:5] ET SCAN Potential VNC Scan 5900-5920 [**] [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:5915 05/12-09:37:20.950934  [**] [1:2002910:5] ET SCAN Potential VNC Scan 5800-5820 [**] [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:5802 05/12-09:37:20.952804  [**] [1:1418:18] PROTOCOL-SNMP request tcp [**] [Classification: Attempted Information Leak] [Priority: 2] {TCP} 192.168.1.2:54524 -> 192.168.1.1:161 

I want to know what nmap did to trigger each alert. For example, the last two alerts seem to be trigger due to similar reasons (in my opinion, because they have similar classification, similar protocol, similar source port and similar priority) but I want to make sure that this is true. Therefore, is important to know what exactly triggered each alert (e.g. what action)

Updated: In the triggered alerts I see two different classifications. Can I assume that two kind of actions were taken? If so, what kind of actions (e.g. service probe, port scan)?

Application of Brent’s Cycle Detection Algorithm

I would like to find cycles in a finite length list of numbers where there is no function:

xn = f(xn-1).

For example, in the list:

3, 12, 11, 46, 1034, 23, 12, 11, 46, 1034, 5

x0 = 3, x1 = 12, etc. and the cycle starts at x1 with a length of 4.

There is a Java implementation of Brent’s Cycle Algorithm here which includes some sample data with the expected output.

Brent Cycle Algorithm Test  Enter size of list 9  Enter f(x) 6 6 0 1 4 3 3 4 2  Enter x0 8  First 9 elements in sequence : 8 2 0 6 3 1 6 3 1 6  Length of cycle : 3 Position : 4 

Here you can see that x0 = 8 and that the 8th entry in the entered list is 2 (using a zero based index), which when used as an index gives 0, which when used as an index gives 6 and so on producing the first 9 elements in the sequence 8, 2, 0, 6, etc.

My problem (likely due to my lack of understanding about the purpose or use of Brent’s Algorithm) is that the numbers in the list I provided (3, 12, 11, 46, etc.) cannot be used as indexes (indicies?) to access the next number in the list. In other words, there is no f(x) such that xn = f(xn-1).

Does this put Brent’s Algorithm out of reach for my application? Maybe there’s a simple modification to Brent’s Algorithm that hasn’t occurred to me.

Plant Pest Detection using CNN

I am doing a project in plant pest detection using CNN. There are four classes each having about 1400 images. While training the model using Convolution Neural Network, there is a smooth curve for training while for validation there lots of ups and downs in high range. After that,I start using alexnet architecture of CNN. There is smooth curve in both training and validation but overfitting problem occurs.What are the things I should consider for resolving this issues.Is there any other standard CNN architecture for training when there is small data. You can find the code in more detail alexnet.

EPOCHS = 20 INIT_LR = 1e-5 BS = 8 default_image_size = tuple((256, 256)) image_size = 0 directory_root = '../input/plantvillag/' width=256 height=256 depth=3 

Function to convert images to array

  def convert_image_to_array(image_dir):         try:             image = cv2.imread(image_dir)             if image is not None :                 image = cv2.resize(image, default_image_size)                    return img_to_array(image)             else :                 return np.array([])         except Exception as e:             print(f"Error : {e}")             return None 

Fetch images from directory

image_list, label_list = [], []     try:         print("[INFO] Loading images ...")         root_dir = listdir(directory_root)         for directory in root_dir :             # remove .DS_Store from list             if directory == ".DS_Store" :                 root_dir.remove(directory)      for plant_folder in root_dir :         plant_disease_folder_list = listdir(f"{directory_root}/{plant_folder}")          for disease_folder in plant_disease_folder_list :             # remove .DS_Store from list             if disease_folder == ".DS_Store" :                 plant_disease_folder_list.remove(disease_folder)          for plant_disease_folder in plant_disease_folder_list:             print(f"[INFO] Processing {plant_disease_folder} ...")             plant_disease_image_list = listdir(f"{directory_root}/{plant_folder}/{plant_disease_folder}/")              for single_plant_disease_image in plant_disease_image_list :                 if single_plant_disease_image == ".DS_Store" :                     plant_disease_image_list.remove(single_plant_disease_image)              for image in plant_disease_image_list[:1000]:                 image_directory = f"{directory_root}/{plant_folder}/{plant_disease_folder}/{image}"                 if image_directory.endswith(".jpg") == True or image_directory.endswith(".JPG") == True:                     image_list.append(convert_image_to_array(image_directory))                     label_list.append(plant_disease_folder)     print("[INFO] Image loading completed")   except Exception as e:     print(f"Error : {e}") 

Get Size of Processed Image

image_size = len(image_list) 

Transform Image Labels uisng Scikit Learn’s LabelBinarizer

    label_binarizer = LabelBinarizer() image_labels = label_binarizer.fit_transform(label_list) pickle.dump(label_binarizer,open('label_transform.pkl', 'wb')) n_classes = len(label_binarizer.classes_)      np_image_list = np.array(image_list, dtype=np.float32) / 255.0 

Splitting data

print("[INFO] Spliting data to train, test")  x_train, x_test, y_train, y_test =  train_test_split(np_image_list,image_labels, test_size=0.2, random_state = 42)     aug = ImageDataGenerator(     rotation_range=25, width_shift_range=0.1,     height_shift_range=0.1, shear_range=0.2,      zoom_range=0.2,horizontal_flip=True,      fill_mode="nearest") 

Model Build

from keras import layers from keras.models import Model  optss = Adam(lr=INIT_LR, decay=INIT_LR / EPOCHS) def alexnet(in_shape=(256,256,3), n_classes=n_classes, opt=optss):     in_layer = layers.Input(in_shape)     conv1 = layers.Conv2D(96, 11, strides=4, activation='relu')(in_layer)     pool1 = layers.MaxPool2D(3, 2)(conv1)     conv2 = layers.Conv2D(256, 5, strides=1, padding='same', activation='relu')(pool1)     pool2 = layers.MaxPool2D(3, 2)(conv2)     conv3 = layers.Conv2D(384, 3, strides=1, padding='same', activation='relu')(pool2)     conv4 = layers.Conv2D(256, 3, strides=1, padding='same', activation='relu')(conv3)     pool3 = layers.MaxPool2D(3, 2)(conv4)     flattened = layers.Flatten()(pool3)     dense1 = layers.Dense(4096, activation='relu')(flattened)     drop1 = layers.Dropout(0.8)(dense1)     dense2 = layers.Dense(4096, activation='relu')(drop1)     drop2 = layers.Dropout(0.8)(dense2)     preds = layers.Dense(n_classes, activation='softmax')(drop2)      model = Model(in_layer, preds)     model.compile(loss="categorical_crossentropy", optimizer=opt,metrics=["accuracy"])     return model       model = alexnet() 

Performing Training

    history = model.fit_generator(     aug.flow(x_train, y_train, batch_size=BS),     validation_data=(x_test, y_test),     steps_per_epoch=len(x_train) // BS,     epochs=EPOCHS, verbose=1     ) 

Graphs

acc = history.history['acc'] val_acc = history.history['val_acc'] loss = history.history['loss'] val_loss = history.history['val_loss'] epochs = range(1, len(acc) + 1) #Train and validation accuracy plt.plot(epochs, acc, 'b', label='Training accurarcy') plt.plot(epochs, val_acc, 'r', label='Validation accurarcy') plt.title('Training and Validation accurarcy') plt.legend()  plt.figure() #Train and validation loss plt.plot(epochs, loss, 'b', label='Training loss') plt.plot(epochs, val_loss, 'r', label='Validation loss') plt.title('Training and Validation loss') plt.legend() plt.show() 

enter image description hereenter image description here

What are the heuristic detection techniques most often used in modern AVs?

Whenever I read books or academic papers and the subject of heuristic malware detection is brought up they always say the same thing: “it can be either static or dynamic”, “it may use emulation”, “may detect new malware, but higher chance of false-positives”, and that’s about the extent of how I’ve seen it described. What, specifically, are the techniques modern AVs use for heuristic detection?