AU Visitor visa (subclass 600) Business Visitor stream: National ID card and other passports/documents for travel

I am a citizen of the Russian Federation. Currently, I work and have my family in Germany (permanent residency). In order to apply for a Visitor visa (subclass 600) Business Visitor stream, I should provide

  • a national identity card
  • the information on other passports/documents for travel.

(1) According to Wiki,

a national identity document is defined as an identity card with photo, usable as an identity card at least inside the country, and which is issued by an official authority.

From my understanding, the permanent residence permit fulfills these requirements and is a national identity card (my citizenship is clearly stated there). In Russia, we have an internal passport that is not a card.

Am I right in understanding that as a national identity card I should provide my German permanent residence permit only?

(2) Other passports or documents for travel include:

any expired passports or documents for travel where the details are known.

In the online application, I am asked to

Give details of any other non United Nations passports or documents for travel that might have been previously used to travel to Australia.

I have never been to Australia and never applied for an AU visa previously. However, in my understanding, my previous expired passport might have been used for an AU visa application – in theory (however, has not been). Should I provide information about my expired passport?

Many thanks.

Install and run Ubuntu within a microSD Card?

I’m trying to install Ubuntu Budgie 18.04 into my 64GB microSD card.
The microSD is plugged in with an adapter and it’s not locked, not even while inserting it.

It all went fine but i get a strange error when i try to run simple commands too:
sudo: unable to open /var/lib/sudo/username/1: Read-only file system

This happens after a while that I’m logged in, so it’s something that occurs when I’m using the system.

I fixed the errors on the filesystem with fsck but after i rebooted my system, it happened again and again.

Credit Card Validation in C

I am relatively new to C programming and I am currently working through the CS50 EDX course. The problem I have solved below is for week 1 (credit).

Any suggestions on how to improve this code to further my learning would be most appreciated. I feel like my solution is very clunky although it does the job!

#include <cs50.h> #include <stdio.h> #include <math.h>  int main(void) {     long number = get_long("Number: ");      // get the individual intergers of number     // *2 odd digits      int i1 = ((number / 1000000000000000) % 10);      int t1 = i1 * 2;     int i2 = ((number / 100000000000000) % 10);     int i3 = ((number / 10000000000000) % 10);         int t3 = i3 * 2;          int i4 = ((number / 1000000000000) % 10);     int i5 = ((number / 100000000000) % 10);         int t5 = i5 * 2;     int i6 = ((number / 10000000000) % 10);     int i7 = ((number / 1000000000) % 10);         int t7 = i7 * 2;     int i8 = ((number / 100000000) % 10);     int i9 = ((number / 10000000) % 10);         int t9 = i9 * 2;     int i10 = ((number / 1000000) % 10);     int i11 = ((number / 100000) % 10);         int t11 = i11 * 2;     int i12 = ((number / 10000) % 10);     int i13 = ((number / 1000) % 10);         int t13 = i13 * 2;     int i14 = ((number / 100) % 10);     int i15 = ((number / 10) % 10);         int t15 = i15 * 2;     int i16 = (number % 10);      // Luhns Alg     // calculate sum of variable digits if > 9      if (t1>9)     {t1 = t1 - 9;}     if (t3>9)     {t3 = t3 - 9;}     if (t5>9)     {t5 = t5 - 9;}     if (t7>9)     {t7 = t7 - 9;}     if (t9>9)     {t9 = t9 - 9;}     if (t11>9)     {t11 = t11 - 9;}     if (t13>9)     {t13 = t13 - 9;}     if (t15>9)     {t15 = t15 - 9;}      // check lunghs algo = true (0)     // print card type       int sum = (t1+t3+t5+t7+t9+t11+t13+t15+i2+i4+i6+i8+i10+i12+i14+i16);       int check = (sum % 10);      if (check != 0)     printf("INVALID\n");     else     {     // check type of card         if(i1 == 0 && i2 == 3 && i3 == 4)         {             printf("AMEX\n");         }         else if(i1 == 0 && i2 == 3 && i3 == 7)         {             printf("AMEX\n");         }         else if (i1 == 5 && (i2 == 1 || i2 == 2 || i2 == 3 || i2 == 4 || i2 == 5))         {             printf("MASTERCARD\n");         }         else if (i1 == 4)         {             printf("VISA\n");         }         else              printf("INVALID\n");     } } The code currently outputs the correct results below.  378282246310005 = AMEX  5555555555554444 = MASTERCARD  5105105105105100 = MASTERCARD  4111111111111111 = VISA  5673598276138003 = INVALID  4062901840 = INVALID 

Cannot run on dedicated graphics card; annot force on with vga switcheroo & errors using DRI_PRIME

I’m running Xubuntu 18.04 on my Dell Inpiron 15 7548. Machine has integrated HD 5500 graphics, and a dedicated AMD R7 card. I’ve tried getting access to my dedicated card several times, but always ended up giving up, so I would really like to try and get to the bottom of this so I can actually use my hardware.

First off, both cards are detected just fine: narameh@Hydrogen:~$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Opal XT [Radeon R7 M265/M365X/M465] (rev ff)

I’ve tried following Dell’s own guide on how to use switcheroo to just switch the entire system to the dedicated card, found here:

Here’s some output:

VGA switcheroo is enabled:

narameh@Hydrogen:~$   grep -i switcheroo /boot/config-* /boot/config-4.15.0-50-generic:CONFIG_VGA_SWITCHEROO=y /boot/config-4.15.0-51-generic:CONFIG_VGA_SWITCHEROO=y 

Switch file exists:

narameh@Hydrogen:~$   sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch -rw-r--r-- 1 root root 0 Jun 12 16:07 /sys/kernel/debug/vgaswitcheroo/switch 

Default state:

narameh@Hydrogen:~$   sudo cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:08:00.0 

The tutorial assumes it’s either Pwr or Off, but since this is meant to be a hybrid system, for me it’s DynOff. Hence, when I try to turn on the disconnected GPU as per instructions, nothing happens, as it’s not really disconnected, just dynamically turned off. This has to happen as root, otherwise I cannot echo due to lack of permissions.

narameh@Hydrogen:~$   sudo su root@Hydrogen:/home/narameh# echo ON > /sys/kernel/debug/vgaswitcheroo/switch root@Hydrogen:/home/narameh# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:08:00.0 

Next I tried to use DRI_PRIME to run something on my AMD card to see if I could get it to turn on at all. I can for a second, by running

DRI_PRIME=1 glxinfo 

in one terminal window, and spamming

narameh@Hydrogen:~$   sudo cat /sys/kernel/debug/vgaswitcheroo/switch 

in the other. However, the first terminal then spits out a load of errors and we go back to DynOff. Pastebin of error output:

Googling the error code got me this topic with a similar issue: More info on what this poster is doing here:

Following the steps there gets me the following

DRI seems to be fine:

narameh@Hydrogen:~$   cat /var/log/Xorg.0.log | grep DRI [    45.527] (II) RADEON(G0): [DRI2] Setup complete [    45.527] (II) RADEON(G0): [DRI2]   DRI driver: radeonsi [    45.527] (II) RADEON(G0): [DRI2]   VDPAU driver: radeonsi [    46.672] (II) modeset(0): [DRI2] Setup complete [    46.672] (II) modeset(0): [DRI2]   DRI driver: i965 [    46.672] (II) modeset(0): [DRI2]   VDPAU driver: i965 [    46.704] (II) GLX: Initialized DRI2 GL provider for screen 0   narameh@Hydrogen:~$   xrandr --listproviders Providers: number : 2 Provider 0: id: 0x66 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 1 name:OLAND @ pci:0000:08:00.0 narameh@Hydrogen:~$   xrandr --setprovideroffloadsink 0x41 0x66 narameh@Hydrogen:~$    

Note that it throws no errors, so this command seems to work fine. When I then try to run on either card, the intel onboard works fine:

narameh@Hydrogen:~$   DRI_PRIME=0 glxinfo | grep "OpenGL vendor string" OpenGL vendor string: Intel Open Source Technology Center 

But the AMD still throws the same errors:

In the end, the user in the thread traces his problems to a bad kernel commit and rolls back, but as this is a) a thread from 2016 and b) I am not an advanced enough user to go messing with my kernel, that is not an option for me.

I can find multiple other similar errors that seem related to kernel versions (e.g. on Ubuntu 17.01 or this one

In both topics, adding radeon.nopm=0 to the kernel boot is suggested, but I am hesitant to try this without some guidance as I don’t know enough about what I’m doing.

I hope it’s clear from this post I have put in the work to try and solve this on my own, but am running into the limits of my knowledge and don’t want to mess up my system by changing things I don’t understand or cannot undo if I end up booting into a black screen because of it. Some help from someone more advanced would be extremely appreciated.

tldr: discrete AMD is in DynOff can’t be forced on with VGA_switcheroo. DRI_PRIME can talk to discrete card, but errors with what seems to be a kernel issue? User is at the end of her knowledge and afraid to break stuff. Help appreciated.

Como gravar um modelo Card contente vários itens em CakePHP2.x

Estou tentando gravar os itens de um carrinho em um modelo Card eu consigo obter os itens do carrinho passando o id da sessão do usuário, mas gostaria de saber como gravar em itens em associados a Orders e OrderProducts uando CakePHP2.x, segue o método na controller.

  public function payment_free($  product_id = null){      $  this->__verifySecurity( Group::CLIENTE );     if( $  product_id ){          //$  product_id = base64_decode($  product_id);         $  this->loadModel('Cart');         $  carts = $  this->Cart->__getCartsInSession($  this->Session->id());          $  this->loadModel('Product');         $  product = $  this->Order->OrderProduct->Product->__getProduct($  product_id);          $  method_id = Method::PRODUTO_ZERADO;          $  infoPayment = [             Method::PRODUTO_ZERADO => 'Produto Zerado',             Method::CUPOM_100_PORCENTO => 'Cupom 100%'         ];          $  data = [];         $  data['Order']['approved']  = date('Y-m-d H:i:s');         $  data['Order']['client_id'] = $  this->Auth->user('client_id');         $  data['Order']['method_id'] = $  method_id;         $  data['Order']['payment']   = $  infoPayment[$  method_id];         $  data['Order']['status']    = $  this->Order->Payment->getStatusAprovado();         $  data['Order']['value']     = '0.00';         $  data['Order']['value_discount'] = '0.00';         $  data['Order']['sessionid'] = $  this->Session->id();          $  data['OrderProduct'][0]['product_id'] = $  product_id;         $  data['OrderProduct'][0]['amount'] = 1;         $  data['OrderProduct'][0]['value'] = '0.00';         $  data['OrderProduct'][0]['discount'] = '0.00';          if( $  this->Order->saveAll($  data) ){             $  this->Session->setFlash('Curso Grátis obtido com sucesso!', 'site/popup-success');             $  this->__clearCart($  this->Session->id());             $  this->__clearTicket();             return $  this->redirect(array('controller'=>'virtual_rooms','action' => 'mycourses', 'prefixes' => false));         }         else{             $  this->Session->setFlash('Não foi possível obter o curso grátis!', 'site/popup-error');             return $  this->redirect( $  this->referer() );         }     }     else{         $  this->Session->setFlash('Não foi possível identificar o curso desejado!', 'site/popup-error');         return $  this->redirect( $  this->referer() );     } } 

What happens when Android mounts a microsd card?

I’ve got a 256 GB microsd card which only works with my phone if its file system is FAT32. The issue I have with this, is that FAT32 only supports files up to 4 GiB, which is a bit low by today’s standards. I am able to successfully mount an exFAT partition using a FUSE driver, which I found here: I did not install that zip; instead, I simply extracted the mount.exfat binary and called it from a superuser shell. The actual issue I’m having, is that if I mount anything using that method, the Android OS doesn’t “register” that as a microsd card. So apps can read and write data to the mountpoint as if it was a plain directory, but it is not recognized as an actual external storage device. I’m trying to figure out what exactly does Android do when you tap the “Mount SD card” entry in Storage settings, and how can that be replicated outside of the Settings app.

If a FAT32 card is mounted automatically by Android, here’s what the mount points look like:

$   mount | grep 5D03 /dev/block/vold/public:179,65 on /mnt/media_rw/5D03-6C2D type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro) /mnt/media_rw/5D03-6C2D on /mnt/runtime/default/5D03-6C2D type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6) /mnt/media_rw/5D03-6C2D on /storage/5D03-6C2D type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6) /mnt/media_rw/5D03-6C2D on /mnt/runtime/read/5D03-6C2D type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18) /mnt/media_rw/5D03-6C2D on /mnt/runtime/write/5D03-6C2D type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18) 

Forgetting about exFAT or other file systems for a moment, I first tried to replicate that using the same FAT32 partition which was mountable natively by Android. I unmounted the SD card from settings, which resulted in the above command not outputting anything anymore, and proceeded to mount the partition in much the same way as described by the mount output seen above. From a su -mm shell, I first created the necessary mount points with mkdir, then replicated all the entries with mount, like mount -o rw -o nosuid -o nodev [...] -t vfat /dev/block/vold/public:179,65 /mnt/media_rw/5D03-6C2D. When finished, the output from mount | grep 5D03 was almost exactly the same as if it was the Android OS doing the mounting (checked with diff: the single difference was the lack of the dirsync option, as mount complained about not recognizing that option, all other lines were exactly the same). But that still did not make the Android OS acknowledge that a SD card was indeed mounted. From this, I gather that Android does some extra step when mounting an SD card. For example, if the card is mounted natively by Android, file manager apps will show the SD card’s capacity and free space, and will allow to easily browse its contents. But if I mounted the very same SD card manually, as described above, the same file manager would only offer to browse internal storage. The SD card could still be accessed if I navigated to the mount point directory (/mnt/media_rw/5D03-6C2D) so it was properly mounted and working, just not recognized by Android.

So I guess this lengthy question really boils down to this simple one: How can one mount devices in Android OS and have the mount points recognized as real external storage devices?