Compile Ionic 4 for Android 9 (Pie)

Buenas quisiera consultar como puedo compilar mi app terminada para Android 9 (Pie). ya que al compilarla con $ ionic build android . Me lo compila para android 8 (oreo) y eso me ha trajo problemas por que mis http.get no estan funcionando en android 9, solo funcionan hasta android 8. intente con $ ionic build android@9.0.0 y no compila. Seria de gran ayuda si alguien conoce como hacerlo, Gracias de antemano

How to compile VBscript to contain dll handlers?

I am using VBsedit to compile some VBs script to .exe The exe is created fine and shows MsgBox and so on. However, once it hits the part where liraries are used and tries to CreateObject it stops working. Obiously, I can run the script from VBsedit because I can add references to the libraries. But I don’t know how to compile the executable so it contais the libraries. Any help? Might gcc help?

Sub Main() Dim autECLConnMgr, autECLSession, sessionID, actCtx Dim myScreenStr, libPath

‘libPath = “C:\Program Files (x86)\IBM\Personal Communications\autcmgr.tlb” ‘Set autECLConnMgr = GetObject(libPath) ‘this does not work

Set autECLConnMgr = CreateObject(“PCOMM.autECLConnMgr”)

… ‘below here where some tests but it breaks on the lines above

End sub

The error message i get is ActiveX component can not create object.

Choose suitable variable type at compile time

I know it’s possible to query maximum and minimum values for variable types in C++ using numeric_limits, but I want to do the opposite. I would like to have C++ choose a suitable variable type for me, given a requested maximum variable value.

For example, I would love to be able to do something like the following:

// Choose a variable type big enough to store values up to 1024 std::MAGICALLY_CHOOSE_VARIABLE_TYPE<1024>; 

It seems to me that I’ve seen something like this before, but, for the life of me, my Google-Fu has so far failed to find it. Is this possible or am I just imagining it?

Why is unreachable code a compile error in java?

In java, unreachable code is considered a compile error. For example, this code would not compile:

private static int double(int x) {     return x * 2;     x += 5; } 

As x += 5 can never be reached. My question is, what is the reasoning behind making this a compile error? Other languages handle it fine (for example PHP) and it doesn’t seem like the kind of thing a compiler would be unable to deal with – if you can detect unreachable code, wouldn’t you be able to act like it doesn’t exit? This seems more like a warning than an error.

Why is unreachable code a compile error in java?

In java, unreachable code is considered a compile error. For example, this code would not compile:

private static int double(int x) {     return x * 2;     x += 5; } 

As x += 5 can never be reached. My question is, what is the reasoning behind making this a compile error? Other languages handle it fine (for example PHP) and it doesn’t seem like the kind of thing a compiler would be unable to deal with – if you can detect unreachable code, wouldn’t you be able to act like it doesn’t exit? This seems more like a warning than an error.

Python adding partialmethods to a class at compile time

I am writing a class for delayed operations on variables which are resolved at a later time. I am using pythons operator overloading but my class definition seems very boilerplatey.

Is there a more succinct way to define the following class?

class Forward:      def resolve(self, env):         raise NotImplementedError()      def op(self, op, rhs):         if not isinstance(rhs, Forward):             raise TypeError('"{}" not of type `Forward`'.format(rhs))         return Evaluation(op, self, rhs)      __eq__ = partialmethod(op, operator.__eq__)     __gt__ = partialmethod(op, operator.__gt__)     __lt__ = partialmethod(op, operator.__lt__)     __ge__ = partialmethod(op, operator.__ge__)     __le__ = partialmethod(op, operator.__le__)      __add__ = partialmethod(op, operator.__add__)     __sub__ = partialmethod(op, operator.__sub__)     __mul__ = partialmethod(op, operator.__mul__)     __truediv__ = partialmethod(op, operator.__truediv__)     __floordiv__ = partialmethod(op, operator.__floordiv__)     __pow__ = partialmethod(op, operator.__pow__)      __iadd__ = partialmethod(op, operator.__iadd__)     __isub__ = partialmethod(op, operator.__isub__)     __imul__ = partialmethod(op, operator.__imul__)     __itruediv__ = partialmethod(op, operator.__itruediv__)     __ifloordiv__ = partialmethod(op, operator.__ifloordiv__)     __ipow__ = partialmethod(op, operator.__ipow__) 

How to compile this example with async_read_until, async_write and Boost.Asio?

Wrote short example: simple echo program. Please, help to compile this, because I don’t understand why compiler error

I tried this: g++ -Wall -Wextra -pedantic client.cpp -o client -lboost_thread -lboost_system, but got next error https://pastebin.com/byevYxPa

#include <boost/asio.hpp> #include <boost/bind.hpp> #include <string>  using namespace boost::asio; using error_code = boost::system::error_code;  io_service ioservice; posix::stream_descriptor out(ioservice, STDOUT_FILENO); posix::stream_descriptor  in(ioservice,  STDIN_FILENO);  std::string line;  void on_read(const error_code & err, std::size_t bytes); void on_write(const error_code & err, std::size_t bytes);  void on_read(const error_code & err, std::size_t bytes) {     if (err || line == "exit") return;     line += "\n";     async_write(out, buffer(line), on_write); }  void on_write(const error_code & err, std::size_t bytes) {     write(out, buffer("$   "));     async_read_until(in, buffer(line),'\n',on_read); }  int main() {     async_read_until(in, buffer(line),'\n',on_read);     ioservice.run(); } 

I expected that this code will works correctly and will be compiled

how to cross compile a .deb package with a custom toolchain

I am running Ubuntu Bionic Beaver and have a toolchain from Linaro (gcc-linaro-7.3.1-2018.05-i686_aarch64-linux-gnu) that I need to use to cross compile my kernel (4.9.140) for the nvidia jetson TX2 board that also has an ubuntu 18.04 operation system. I have put this toolchain in my home directory under $ HOME/l4t-gcc. However I also need to install a tool called overlayroot that is part of the package cloud-initramfs-tools, I downloaded the source of this and in its control file it says it depends on cryptsetup and initramfs-tools so I downloaded this source also and now I want to cross compile all this with the toolchain under my $ HOME/l4t-gcc. First I simply executed the .configure and then I tried the make like I did the make when I compiled the kernel:

make ARCH=arm64 CROSS_COMPILE=$  HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-i686_aarch64-linux-gnu/bin/aarch64-linux-gnu- 

but this didn’t work, it still used the native compilers. Some searching on the internet learned me that there are toolchains that you can download and install and then you simply need to

sudo dpkg --add-architecture aarch64 sudo apt-get update 

but I don’t see how I can make dpkg understand to use what I have under my $ HOME/l4t-gcc. Can anyone help me with this?

Sublevel version mismatch when trying to compile current kernel

I am trying to recompile the sound/usb module on Ubuntu 18.10 against the running kernel. I get no compilation errors but when I try to load the module I get this error:

Invalid module format 

I am running the 4.18.0-21-lowlatency kernel.

I obtain the kernel source this way

apt source linux 

This downloads and extracts the source of the 4.18.0 kernel into the linux-4.18.0 folder.

I copy the .config and Module.symvers files from /lib/modules/4.18.0-21-lowlatency/build to the root of my kernel source directory.

I run make EXTRAVERSION=-21-lowlatency modules_prepare, and then make EXTRAVERSION=-21-lowlatency M=sound/usb

Running insmod results in the following error written into syslog

snd_usb_audio: version magic '4.18.20-21-lowlatency SMP preempt mod_unload ' should be '4.18.0-21-lowlatency SMP preempt mod_unload ' 

Running modinfo /lib/modules/uname -r/kernel/sound/usb/snd-usb-audio.ko | grep vermagic returns this

vermagic:       4.18.0-21-lowlatency SMP preempt mod_unload 

Running modinfo on my newly compiled module returns this

vermagic:       4.18.20-21-lowlatency SMP preempt mod_unload 

I traced back the issue to the first few lines of the Makefile

VERSION = 4 PATCHLEVEL = 18 SUBLEVEL = 20 

If I change the SUBLEVEL to 0 and then compile, I can successfully load the module.

So even though I am running the 4.18.0 kernel, and the apt source linux seems to download the 4.18.0 kernel, the downloaded files are versioned 4.18.20.

Is this normal or I am missing something?

This code works well, but not so well when I compile it to an EXE: os.execl(sys.executable,*([sys.executable]+sys.argv))…?

This code is working well from console, how can I improve it to make it work when compiled ?

I want my program to restart completely when it comes to the end.

The code below works fine from the console (cmd prompt) when I run it as, python myapp.py

But when I compile it into an EXE, the program runs fine but when it gets to the end it does not restart.

How can I improve the code so it acts in the same way as it does from the console?

import os                                import sys                               ... os.execl(sys.executable,*([sys.executable]+sys.argv))