Is my visa status for all destinations in a flight with connections checked in the beginning or before each flight?

For complicated reasons, I want to buy a flight to Australia through New Zealand, but get off in New Zealand and not use the ticket to Australia.

One problem with this approach is that I can’t have luggage because it would be transferred to Australia.

But assuming I would fly without checked in luggage, another problem is that I don’t have a visa for Australia. Will they check it before the first leg of my journey and not allow me to fly at all, or can I fly to New Zealand because they would only check my visa status there before my flight from New Zealand to Australia?


Make repeating numbers 0 and putting them at the beginning of array

I am new to programming and I have made a program to make all repeating numbers in an array 0 and put those all 0s in left side:

import java.util.*; class ArrayWork {     public static void main(String args[])     {         Scanner sc = new Scanner(;         int arr[],n,i,j,nr[]= new int[5];         System.out.println("Enter the value for n: ");         n = sc.nextInt();         if(n>25)             System.out.println("Invalid input");         else         {             arr = new int[n];              System.out.println("Enter the array elements: ");             for(i=0;i<n;i++)             {                 arr[i] = sc.nextInt();             }             int count =0;             for( i=0; i< arr.length-1;i++)             { for (j=i+1;j<arr.length;j++)                 {if(arr[i]==arr[j])                    nr[i]=arr[i];                     System.out.println(nr[i]);                 }}             for(int v=0;v<n;v++){  for(i=0;i<n;i++)             {                 if(arr[i]==nr[v])                 {                     for(j=i-1;j>=0&&arr[j]>0;j--)                     {                         arr[j+1]=arr[j];                     }                     arr[j+1]=0;                 }             }}              System.out.println("The array is: ");             for(i=0;i<n;i++)             {                 System.out.print(arr[i] + " ");             }         }     }  } 

Can I do anything to make this program smaller although the output is coming right and the program is ok but I have made many loop, Hope you know any better way?





How do I create a screen that shows at the beginning of every question

I want to create a screen that show the number of question your on and other stuff before each question. It would show until data for next question is read and loaded up.

How would I create this screen? I thought of just creating a separate View Controller and then showing it at the beginning of every question but I believe that this is inefficient.

Noise in beginning of alsa application

I have ALSA driver for capture device which works fine with VLC. when I try to capture and render using own application having some issues. Issue is:When I start play, it has some noise in beginning and audio is discontinuous in between. Discontinuous means, some audio frame are getting dropped in between. It looks like cut cut sound for sine wave and it continuous to play. I have tried snd_pcm_drop and snd_pcm_drain but no use.

For rendering audio I’m using aplay.c file as a reference. However, using play.c code I’m getting noise in beginning, to cross check this I have dumped application buffer and then played using aplay utility. Content in application buffer is fine. I have also confirmed with FFPlay application. FFPlay also plays with out noise. aplay reference link , and my audio render is similar to reference link.


Can you please let me know why there is noise while playing audio in beginning

Can I use RSA to encrypt an AES256 key that I put at the beginning of my AES256 encrypted file?

I have a master server generating large files for other (known) servers to download.

Those files:

  • Are quite big. From 20MB to 5GB.
  • Are written once by the server and then it forgets about them.
  • Nobody should be able to read the content of the file except the server it has been generated for.
  • Will be downloaded over HTTPS using a library such as RequestJS

Based on this knowledge, I planned to generate an RSA key pair for each server, store the public key in the database of the master server along with the servers’ specific data (like unique identifier) and only keep the private key on the server it belongs to.
I thought I would just have to encrypt the whole 5GB file using the server’s public key and only it would be able to decrypt it.

However, after looking around on the internet, I noticed that it’s an extremely bad idea to encrypt big things using RSA. It’s not meant for this purpose at all.

I also heard a lot about AES and decided to take a look at the way the TLS works and noticed it uses RSA encryption for the symmetric AES keys.
Now, I’m thinking that I should encrypt my files using AES with a randomly generated key per file but I need to transmit the key to the server.

My idea is the following:

  • Generate a random 256 bits key per generated file.
  • Use this key to encrypt the whole file.
  • Use the public key of the target server to encrypt this key.
  • Prepend the encrypted key to the file so that it’s a whole package.
  • Sign the whole thing with the master private key (but I haven’t thought about that yet so I’m open to suggestions regarding the algorithm)

And, on the reception side, the server would just read the first 256 bits, decrypt with its private key and use the decrypted payload as a key to decrypt the file itself.

Since I have no deep knowledge of security, I would like to be sure that it a good idea. I see no real downside but I may not know what I’m talking about enough to judge that.

At first I thought HTTPS would be sufficient but I don’t want anyone to be able to get the file so I still need more encryption than the connection itself.
Moreover, I wouldn’t want a “slave” server to be able to decrypt the content of another. And I should be able to revoke a server by changing its key pair.

Adding a cell in a sheet with a specific column number requirement that pushes cells to the beginning of the next line

I have a sheet that I need to only be 5 columns. I use this as a teaching calendar. Sometimes I need to add a cell in the middle if there is an activity that will add an extra day into my calendar (or what I planned for one day, actually takes two days). However, adding a cell only pushes the row to the right and adds a new column.

Instead, I need it to keep to only 5 columns and instead move the cells to the beginning of the next row instead.

Is this possible?

Data migration tool – Magento 2 – Donot Reset the current position of migration to start from the beginning

Do not Reset the current position of migration to start from the beginning

In the Destination database, the data migration tool will truncate the table but we need the data that exist in the destination database.

Is there anyways run the data migration tool without touch previous data in the destination database.

Sorting files and folder with underscore at the beginning

i use a underscore at the beginning of files and folder to mark them a something “special”, this sorting doesn’t work for the most programs under linux. i tried ‘LC_COLLATE=C ls’ and other locales but the results are something strange. lets say i have this folders:

2 A _F G K S x4 

this is the sort order of ‘ls’. when i use ‘LC_COLLATE ls’ i have this

2 A G K S _F x4 

I have this under xubuntu 18.04 using the xfce-terminal-emulator on 2 machines.

what is wrong here?

New to Development: request to kindly advise foundational and beginning study topics (from the below list)

Although alittle later than most, I am determined that I would like to greatly expand my understanding of development. With this, I recently purchased a development bundle to help kick-start my journey. There is such a wealth of information available that I am not so concerned with finding reference materials, but rather my question pertains to which topics/programming languages/etc. are perhaps considered easier for a beginner…

**Can anyone kindly advise which of the below, or perhaps suggest another topic, to kick-off a self-paced development study? (I know formal training and education is normally recommended/required, but I just trying to expand my personal understanding and not actually trying to move into a new career – we shall see…)

Below are the topics which I have placed into my “foundational” bucket… (My end-game is to be able to actually use the Mac development tools).

Basic Introduction To C++ For Beginners Become A Full Stack Web Developer: Beginner To Advanced Build Responsive Real World Websites with HTML5 and CSS3 JavaScript Essentials: Get Started With Web Coding C# 7 & .NET Core 2.0 Recipes The Complete Google Go Programming Course For Beginners From 0 to 1: Learn Python Programming Easy as Pie Java Programming for Beginners Git Complete: The Definitive, Step-By-Step Guide