问:
File not found when running django collectstatic with django pipeline
This is my pipeline setting:

```<code>STATIC_URL = '/static/'

STATIC_ROOT = SETTINGS_DIR + '/static/'

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static_files"),
)

STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
    'compressor.finders.CompressorFinder',
    'beautycall.finders.LeftoverPipelineFinder',
)

PIPELINE = {
    'JAVASCRIPT': {
        'main': {
            'source_filenames': (
                'bower/jquery/dist/jquery.min.js',
                'js/script.js',
            ),
            'output_filename': 'compiled/main_script.js',
        },
        'datetimepicker': {
            'source_filenames': (
                'bower/datetimepicker/jquery.datetimepicker.js',
            ),
            'output_filename': 'datetimepicker.js'
        },
        'typeahead': {
            'source_filenames': (
                'bower/typeahead.js/dist/bloodhound.js',
                'bower/typeahead.js/dist/typeahead.jquery.js',
            ),
            'output_filename': 'typeahead.js'
        },
        'remodal': {
            'source_filenames': (
                'bower/remodal/dist/remodal.min.js',
            ),
            'output_filename': 'remodal.js'
        }
    },
    'STYLESHEETS': {
        'main': {
            'source_filenames': (
                'css/style.scss',
                'css/fonts.css',
            ),
            'output_filename': 'compiled/main_stylesheet.css',
        },
        'datetimepicker': {
            'source_filenames': (
                'bower/datetimepicker/jquery.datetimepicker.css',
            ),
            'output_filename': 'compiled/jquery.datetimepicker.css'
        },
        'remodal': {
            'source_filenames': (
                'bower/remodal/dist/remodal.css',
                'bower/remodal/dist/remodal-default-theme.css'
            ),
            'output_filename': 'remodal.css'
        },
        'website': {
            'source_filenames': (
                'css/website/style.scss',
            ),
            'output_filename': 'compiled/website/style.css',
        }
    }
}

</code>```

Its return the error raise CompilerError(e, command=argument_list, pipeline.exceptions.CompilerError: [WinError 2] The system cannot find the file specified. When using custom pipefinder, the pipeline seem to miss all the file in source_filenames. Im using Windows and its no problem when i try it in Linux OS, if its help.

It result in error when running this piece of code on django-pipeline :

```<code>compiling = subprocess.Popen(argument_list, cwd=cwd,stdout=stdout,stderr=subprocess.PIPE, shell=False)
</code>```

At closer look the cwd argument seems fine, but 3 of 4 arguments in argument_list not exist when i checked it with path.exist. Idk if it supposed to be like that or no, neither i am know about subprocess.Popen

Any help much appreciated. Thanks

Body:
This is my pipeline setting:

STATIC_URL = '/static/'

STATIC_ROOT = SETTINGS_DIR + '/static/'

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static_files"),
)

STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
    'compressor.finders.CompressorFinder',
    'beautycall.finders.LeftoverPipelineFinder',
)

PIPELINE = {
    'JAVASCRIPT': {
        'main': {
            'source_filenames': (
                'bower/jquery/dist/jquery.min.js',
                'js/script.js',
            ),
            'output_filename': 'compiled/main_script.js',
        },
        'datetimepicker': {
            'source_filenames': (
                'bower/datetimepicker/jquery.datetimepicker.js',
            ),
            'output_filename': 'datetimepicker.js'
        },
        'typeahead': {
            'source_filenames': (
                'bower/typeahead.js/dist/bloodhound.js',
                'bower/typeahead.js/dist/typeahead.jquery.js',
            ),
            'output_filename': 'typeahead.js'
        },
        'remodal': {
            'source_filenames': (
                'bower/remodal/dist/remodal.min.js',
            ),
            'output_filename': 'remodal.js'
        }
    },
    'STYLESHEETS': {
        'main': {
            'source_filenames': (
                'css/style.scss',
                'css/fonts.css',
            ),
            'output_filename': 'compiled/main_stylesheet.css',
        },
        'datetimepicker': {
            'source_filenames': (
                'bower/datetimepicker/jquery.datetimepicker.css',
            ),
            'output_filename': 'compiled/jquery.datetimepicker.css'
        },
        'remodal': {
            'source_filenames': (
                'bower/remodal/dist/remodal.css',
                'bower/remodal/dist/remodal-default-theme.css'
            ),
            'output_filename': 'remodal.css'
        },
        'website': {
            'source_filenames': (
                'css/website/style.scss',
            ),
            'output_filename': 'compiled/website/style.css',
        }
    }
}

Its return the error raise CompilerError(e, command=argument_list, pipeline.exceptions.CompilerError: [WinError 2] The system cannot find the file specified. When using custom pipefinder, the pipeline seem to miss all the file in source_filenames. Im using Windows and its no problem when i try it in Linux OS, if its help.

It result in error when running this piece of code on django-pipeline :

compiling = subprocess.Popen(argument_list, cwd=cwd,stdout=stdout,stderr=subprocess.PIPE, shell=False)

At closer look the cwd argument seems fine, but 3 of 4 arguments in argument_list not exist when i checked it with path.exist. Idk if it supposed to be like that or no, neither i am know about subprocess.Popen

Any help much appreciated. Thanks


来源: stackexchange

问:
Why does this $year variable changes
I have code below, But why does this query builder passed the $year variable as :qp0?

```<code>$year = 2022;

$users = (new \yii\db\Query())->from('v_running_table')
         ->where(['run_confirm_year' => $year])->groupBy(['username']);
</code>```

Why does this produce this sql.

```<code>SELECT * FROM `v_running_table` WHERE `run_confirm_year` = :qp0 GROUP BY `username`
</code>```

ContentLicense: CC BY-SA 4.0

Title: Why does this $year variable changes

Body:
I have code below, But why does this query builder passed the $year variable as :qp0?

$year = 2022;

$users = (new \yii\db\Query())->from('v_running_table')
         ->where(['run_confirm_year' => $year])->groupBy(['username']);

Why does this produce this sql.

SELECT * FROM `v_running_table` WHERE `run_confirm_year` = :qp0 GROUP BY `username`


问:
javascript function runs after load the web page in inappwebview
I am using inappwebview to load the render webpage to my flutter application. while loading I am passing some arguments to the javascript function. In this case, after the page load, only the function is running. I want page load and function call at a time.</p>
```<code>child: InAppWebView(
                        initialFile:
                            "assets/blockly_webview/pages/app.html",
                        initialOptions: options,
                        onWebViewCreated: (controller) {
                          controller.addJavaScriptHandler(
                              handlerName: 'handlerFoo',
                              callback: (args) {
                                // return data to the JavaScript side!
                                return {'env_type': DynamicUI.envType};
                              });
                          onLoadStart:
                          (controller, url) {
                            setState(() {
                              url = url?.toString() ?? '';
                            });
                          };
                          onLoadStop:
                          (controller, url) async {
                            setState(() {
                              url = url?.toString() ?? '';
                            });
                          };
                          onProgressChanged:
                          (controller, progress) {
                            setState(() {
                              progress = progress / 100;
                              if (progress == 100) {
                                _isRefreshing = false;
                              }
                            });
                          };
                        },
                      ),
</code>```

Body:
I am using inappwebview to load the render webpage to my flutter application. while loading I am passing some arguments to the javascript function. In this case, after the page load, only the function is running. I want page load and function call at a time.

child: InAppWebView(
                        initialFile:
                            "assets/blockly_webview/pages/app.html",
                        initialOptions: options,
                        onWebViewCreated: (controller) {
                          controller.addJavaScriptHandler(
                              handlerName: 'handlerFoo',
                              callback: (args) {
                                // return data to the JavaScript side!
                                return {'env_type': DynamicUI.envType};
                              });
                          onLoadStart:
                          (controller, url) {
                            setState(() {
                              url = url?.toString() ?? '';
                            });
                          };
                          onLoadStop:
                          (controller, url) async {
                            setState(() {
                              url = url?.toString() ?? '';
                            });
                          };
                          onProgressChanged:
                          (controller, progress) {
                            setState(() {
                              progress = progress / 100;
                              if (progress == 100) {
                                _isRefreshing = false;
                              }
                            });
                          };
                        },
                      ),


问:
AVAudioSession SetInputGain stopped working
I am using the following code to mute my audio and video recorded session. But I released it was working earlier, but now it's stopped working.</p>
```<code>AVAudioSession *audioSession = [AVAudioSession sharedInstance];
    if (audioSession.isInputGainSettable) {
        if(deviceInputGainVal == 0){
            deviceInputGainVal = audioSession.inputGain;
        }
        NSError *error = nil;
        BOOL success = [audioSession setInputGain:gain error:&error];
        if (!success) {
            NSLog(@"%@", error);
        }
    }
    else {
        NSLog(@"Cannot set input gain");
    }
</code>```

Body:
I am using the following code to mute my audio and video recorded session. But I released it was working earlier, but now it's stopped working.

AVAudioSession *audioSession = [AVAudioSession sharedInstance];
    if (audioSession.isInputGainSettable) {
        if(deviceInputGainVal == 0){
            deviceInputGainVal = audioSession.inputGain;
        }
        NSError *error = nil;
        BOOL success = [audioSession setInputGain:gain error:&error];
        if (!success) {
            NSLog(@"%@", error);
        }
    }
    else {
        NSLog(@"Cannot set input gain");
    }


问:
Google One Tap Javascript API/HTML API does not return nonce in JWT in Safari
When Google One Tap is implemented using Javascript API/HTML API including nonce, the returned JWT is missing nonce for Safari browser. Chrome and Fireforx returns the nonce as expected.

Please refer the code used.

```<code>const initializeGSI = () => {
    google.accounts.id.initialize({
      client_id: '132-xxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
      cancel_on_tap_outside: false,
      nonce: '7342364',
      callback: onOneTapSignedIn
    });
</code>```

Browser Version
Safari Version 16.1 (18614.2.9.1.12)

Steps
Integrate Google One Tap using Javascript API/HTML API using a nonce.
Sign in via Google One Tap in Safari
Check retuned JWT

Using "itp_support" did not make any change on this.

This behaviour remains same for both Javascript API and HTML API.

When "Prevent cross-site tracking" is disabled at Safari, the nonce returns and works as expected. Safari has this default setting. Any workaround available other than changing the Safari's default behavior?

Body:
When Google One Tap is implemented using Javascript API/HTML API including nonce, the returned JWT is missing nonce for Safari browser. Chrome and Fireforx returns the nonce as expected.

Please refer the code used.

const initializeGSI = () => {
    google.accounts.id.initialize({
      client_id: '132-xxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
      cancel_on_tap_outside: false,
      nonce: '7342364',
      callback: onOneTapSignedIn
    });

Browser Version
Safari Version 16.1 (18614.2.9.1.12)

Steps
Integrate Google One Tap using Javascript API/HTML API using a nonce.
Sign in via Google One Tap in Safari
Check retuned JWT

Using "itp_support" did not make any change on this.

This behaviour remains same for both Javascript API and HTML API.

When "Prevent cross-site tracking" is disabled at Safari, the nonce returns and works as expected. Safari has this default setting. Any workaround available other than changing the Safari's default behavior?


问:
very specific incude errors c++
when i try to include files for in a program i always get example.cpp: no such file or directory the only way i can get it working is for iostream or if i put <C:/Users/User/Desktop/C++/CurrentCodeFolder/include/...> before it.
this can work in some specific cases but usually the files included also have other file they include and these do not work.

is there a way i can fix this so i only need to put <include/exapleFolder/file.cpp>?

Title: very specific incude errors c++


问:
Having both onclick and OntouchStart is causing next rendered component to get clicked on the same position on screen
I have a react app, and I have to use both onclick and OntouchStart on each button in the app as my clicks were not detectable on iphone for some particular use case. Now I have a drawer, on which I have some buttons. If I touch cancel drawer button, OntouchStart will trigger, it will toggle the state and remove the drawer. But that touch is being carried on to the button on the next component beneath the drawer, and will trigger onClick on any button in the same position as cancel drawer button. So my touch on one component is counted as click on next component before I remove my finger. If I add 300ms timeout in touchStart, then I get that time to remove my finger before drawer is toggled off. But setting timeout at every place on such a large app is not good solution. Does anyone has any idea about this?

I have tried preventDefault(), stopPropagation(), but they are not able to stop this touch from being carried over to next component.


问:
Odd behavior of np.argsort with Pandas
Here is np.argsort applied in four different ways.

```<code>print(np.argsort([1,np.nan,3,np.nan, 4]))
print(np.argsort(pd.DataFrame([[1,np.nan,3,np.nan, 4]])).values)
print(np.argsort(pd.Series([1,np.nan,3,np.nan, 4]).values))  # same as first
print(np.argsort(pd.Series([1,np.nan,3,np.nan, 4])).values)
</code>```

Output:

```<code>[0 2 4 1 3]
[[0 2 4 1 3]]
[0 2 4 1 3]
[ 0 -1  1 -1  2]
</code>```

This is very unexpected behavior. No mention of it in numpy (obviously it will not mention Pandas).

In the Pandas documentation you can find

```<code>Returns: Series[np.intp]
Positions of values within the sort order with -1 indicating nan values.
</code>```

Why? What would be a place where we would want this kind of behavior?

Title: Odd behavior of np.argsort with Pandas

Body:
Here is np.argsort applied in four different ways.

print(np.argsort([1,np.nan,3,np.nan, 4]))
print(np.argsort(pd.DataFrame([[1,np.nan,3,np.nan, 4]])).values)
print(np.argsort(pd.Series([1,np.nan,3,np.nan, 4]).values))  # same as first
print(np.argsort(pd.Series([1,np.nan,3,np.nan, 4])).values)

Output:

[0 2 4 1 3]
[[0 2 4 1 3]]
[0 2 4 1 3]
[ 0 -1  1 -1  2]

This is very unexpected behavior. No mention of it in numpy (obviously it will not mention Pandas).

In the Pandas documentation you can find

Returns: Series[np.intp]
Positions of values within the sort order with -1 indicating nan values.

Why? What would be a place where we would want this kind of behavior?


问:
SQLite3 C++ Update query fails sometimes
I am currently working on two application who shares a database.

In between the two apps, there are frequent transactions (R/W) on the database.

I'm aware that SQLite, itself, does not suit concurrency among multiple application.

So, I approached the database with Begin Immediate (so that I can acquire locks regardless), along with the loop around step and prepare.

But despite my effort, I am having trouble syncing the database among the apps.

Strange thing is that, if there are about 3,500 upsert queries, only 10~30 queries fail and the rest are fine.

I have tried to see where it fails, but it does not leave a clue.

Has anyone had this experience? Is it because of SQLite's well-known weakness?


问:
Hide tabBar in view with transition / sub view slides over it
I have a view that I transition to, that I don't want to display the tabBar on. Ideally, I would like the view to slide over the parent view COMPLETELY (I mean, over the tabBar on the parent view, too, so it's hidden.

I haven't found how to achieve that yet. My alternative method is to use .hidden on the sub view, like this:

withAnimation{
  SubView(cancel: cancel)
    .transition(.slide)
    .toolbar(.hidden, for: .tabBar)
}
```

This hides the tabBar immediately as the transition starts, so it's very obvious that it just disappears, and it looks too jumpy. An acceptable option would be to transition the tabBar (make it slide down to the bottom).

Does anyone have any ideas how I could achieve either of these two solutions?

Sub view slides over tabBar on parent view

Transition slide tabBar down while sub view slides in

Body:
I have a view that I transition to, that I don't want to display the tabBar on. Ideally, I would like the view to slide over the parent view COMPLETELY (I mean, over the tabBar on the parent view, too, so it's hidden.

I haven't found how to achieve that yet. My alternative method is to use .hidden on the sub view, like this:

withAnimation{
  SubView(cancel: cancel)
    .transition(.slide)
    .toolbar(.hidden, for: .tabBar)
}

This hides the tabBar immediately as the transition starts, so it's very obvious that it just disappears, and it looks too jumpy. An acceptable option would be to transition the tabBar (make it slide down to the bottom).

Does anyone have any ideas how I could achieve either of these two solutions?

Sub view slides over tabBar on parent view

Transition slide tabBar down while sub view slides in


问:
Find Number of times a particular character appears in a string using MDX query
In the Microsoft SSAS, I have a dimension column that contains multiple values separated by the special character | in a single row as below.

Example value of a row: Image|Video|Audio|

Requirement:
So, I need to count the number of values present in the dimension column using the special character.

In this case, I need to get the count of | using the MDX query and my expected answer is 3.

Could someone help me with this? In short, Is there an MDX function that counts the number of times a particular character appears in a string?

Similar question for SQL: Number of times a particular character appears in a string


问:
Issues with key presses and event handler in Pygame
I am new to Pygame and am facing issues getting the event handler to register my keystrokes to move my player when I call that class under the event handler in the main loop

I run this code and the level and player render correctly but not able to move my player. I've looked at various other answers such as adding pygame.event.pump() but this doesn't work and shouldn't be needed as it should be handled by the main event handler

```<code>
import pygame, sys

# Settings

size = width, height = (800, 800)
FPS = 60
road_w = width//1.6
roadmark_w = width//80
right_lane = width/2 + road_w/4
left_lane = width/2 - road_w/4
speed = 5
player_start = right_lane, height*0.8
enemy_start = left_lane, height*0.2

# Create Player Class
class Player(pygame.sprite.Sprite):
    def __init__(self,pos,groups):
        super().__init__(groups)
        self.image = pygame.image.load("car.png").convert_alpha()
        self.rect = self.image.get_rect(center = pos)

        self.direction = pygame.math.Vector2(0,0)
        self.speed = 5

    def input(self):
        keys = pygame.key.get_pressed()

        if keys[pygame.K_UP]:
            self.direction.y = -1
        elif keys[pygame.K_DOWN]:
            self.direction.y = 1
        else:
            self.direction.y = 0

        if keys[pygame.K_RIGHT]:
            self.direction.x = 1
            print(self.direction.x)
        elif keys[pygame.K_LEFT]:
            self.direction.x = -1
        else:
            self.direction.x = 0

    def move(self, speed):
        if self.direction.magnitude() != 0:
            self.direction = self.direction.normalize()

        self.rect.x += self.direction.x * speed
        self.rect.y += self.direction.y * speed

    def update(self):
        self.input()
        self.move(self.speed)

#Create Level Class

class Level:
    def __init__(self):

        # get display surface
        self.display_surface = pygame.display.get_surface()

        #Sprite group set up
        self.player_sprite = pygame.sprite.Group()

    def create_map(self):
        pygame.draw.rect(self.display_surface,(50, 50, 50),\
        (width/2-road_w/2, 0, road_w, height))

        pygame.draw.rect(self.display_surface,(255, 240, 60),\
        (width/2 - roadmark_w/2, 0, roadmark_w, height))

        pygame.draw.rect(self.display_surface,(255, 255, 255),\
        (width/2 - road_w/2 + roadmark_w*2, 0, roadmark_w, height))

        pygame.draw.rect(self.display_surface,(255, 255, 255),\
        (width/2 + road_w/2 - roadmark_w*3, 0, roadmark_w, height))

    def run(self):
        # Update and draw level
        self.create_map()
        self.player = Player(player_start,[self.player_sprite])
        self.player_sprite.draw(self.display_surface)
        self.player_sprite.update

# Create Game Class
class Game:
    def __init__(self):

        # Setup
        pygame.init()
        self.screen = pygame.display.set_mode(size)
        pygame.display.set_caption('Car Game')
        self.clock = pygame.time.Clock()
        self.level = Level()

    def run(self):
        while True:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    pygame.quit()
                    sys.exit()

            self.screen.fill((60,220,0))
            self.level.run()

            pygame.display.update()

            self.clock.tick(FPS)

# Run Game
if __name__ == '__main__':
    game = Game()
    game.run()

</code>```

Car.png

Body:
I am new to Pygame and am facing issues getting the event handler to register my keystrokes to move my player when I call that class under the event handler in the main loop

I run this code and the level and player render correctly but not able to move my player. I've looked at various other answers such as adding pygame.event.pump() but this doesn't work and shouldn't be needed as it should be handled by the main event handler

import pygame, sys

# Settings

size = width, height = (800, 800)
FPS = 60
road_w = width//1.6
roadmark_w = width//80
right_lane = width/2 + road_w/4
left_lane = width/2 - road_w/4
speed = 5
player_start = right_lane, height*0.8
enemy_start = left_lane, height*0.2

# Create Player Class
class Player(pygame.sprite.Sprite):
    def __init__(self,pos,groups):
        super().__init__(groups)
        self.image = pygame.image.load("car.png").convert_alpha()
        self.rect = self.image.get_rect(center = pos)

        self.direction = pygame.math.Vector2(0,0)
        self.speed = 5

    def input(self):
        keys = pygame.key.get_pressed()

        if keys[pygame.K_UP]:
            self.direction.y = -1
        elif keys[pygame.K_DOWN]:
            self.direction.y = 1
        else:
            self.direction.y = 0

        if keys[pygame.K_RIGHT]:
            self.direction.x = 1
            print(self.direction.x)
        elif keys[pygame.K_LEFT]:
            self.direction.x = -1
        else:
            self.direction.x = 0

    def move(self, speed):
        if self.direction.magnitude() != 0:
            self.direction = self.direction.normalize()

        self.rect.x += self.direction.x * speed
        self.rect.y += self.direction.y * speed

    def update(self):
        self.input()
        self.move(self.speed)

#Create Level Class

class Level:
    def __init__(self):

        # get display surface
        self.display_surface = pygame.display.get_surface()

        #Sprite group set up
        self.player_sprite = pygame.sprite.Group()

    def create_map(self):
        pygame.draw.rect(self.display_surface,(50, 50, 50),\
        (width/2-road_w/2, 0, road_w, height))

        pygame.draw.rect(self.display_surface,(255, 240, 60),\
        (width/2 - roadmark_w/2, 0, roadmark_w, height))

        pygame.draw.rect(self.display_surface,(255, 255, 255),\
        (width/2 - road_w/2 + roadmark_w*2, 0, roadmark_w, height))

        pygame.draw.rect(self.display_surface,(255, 255, 255),\
        (width/2 + road_w/2 - roadmark_w*3, 0, roadmark_w, height))

    def run(self):
        # Update and draw level
        self.create_map()
        self.player = Player(player_start,[self.player_sprite])
        self.player_sprite.draw(self.display_surface)
        self.player_sprite.update

# Create Game Class
class Game:
    def __init__(self):

        # Setup
        pygame.init()
        self.screen = pygame.display.set_mode(size)
        pygame.display.set_caption('Car Game')
        self.clock = pygame.time.Clock()
        self.level = Level()

    def run(self):
        while True:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    pygame.quit()
                    sys.exit()

            self.screen.fill((60,220,0))
            self.level.run()

            pygame.display.update()

            self.clock.tick(FPS)

# Run Game
if __name__ == '__main__':
    game = Game()
    game.run()

Car.png


问:
iTerm2 + tmux integration: reuse previous session's directory
I recently got to know that I can integrate my iTerm2 and tmux. When I was just using tmux, it was possible to reuse the previous session's directory when it comes to making new splits tabs or windows. And after I integrated tmux with iTerm2, it is no longer possible.

I tried to configure the Working Directory setting from iTerm2 Preferences > Profiles > General, and it was not working.

Is there any method to reuse working directory for new session by the already existing session?


问:
How to set backgroung image in smart device Visual studio 2008?
Hey 'm using VS2008 smart device WM5.0 pocket PC Emulator to build some mobile Application, which includes background image. I checked form property to set background image. But no use. so help me out.. Thanx</p>

ContentLicense: CC BY-SA 3.0


问:
Coil: Load image to push notification
I am trying to load an image to a push notification using Glide

```<code>            val imageLoader = ImageLoader(this)
            val request = ImageRequest.Builder(this)
                .data(data.user_avatar_url?.replace(URL))
                .target(
                    onSuccess = { result ->
                        val  bitmap = (result as BitmapDrawable).bitmap
                        notificationBuilder.setLargeIcon(bitmap) // notification builder method

                    },
                    onError = {
                    }
                ).build()

            imageLoader.enqueue(request)
</code>```

it does not load image in notification tray

Title: Coil: Load image to push notification

Body:
I am trying to load an image to a push notification using Glide

            val imageLoader = ImageLoader(this)
            val request = ImageRequest.Builder(this)
                .data(data.user_avatar_url?.replace(URL))
                .target(
                    onSuccess = { result ->
                        val  bitmap = (result as BitmapDrawable).bitmap
                        notificationBuilder.setLargeIcon(bitmap) // notification builder method

                    },
                    onError = {
                    }
                ).build()

            imageLoader.enqueue(request)

it does not load image in notification tray


问:
Google Chrome On Mobile Device Crashes Website
Below is the code I'm using to build a website. I was having trouble trying to get it to run on a mobile device, but after testing a number of browsers on my iPhone I've noticed that it runs smoothly on all browsers except Google Chrome. When trying to run my website on Google Chrome the site crashes and I'm unable to click any links or view any content. On a MacBook, Google Chrome runs my website without any issues.

Is this an issue with the way Google Chrome works? Would changing a portion of my code help run it smoother on the mobile version of Google Chrome? Any knowledge that anyone can share with me about running websites on mobile browsers would be much appreciated.

```<code><!DOCTYPE html>
<html lang="en">

<meta name="viewport" content="width=device-width, initial-scale=1.0;" charset="utf-8">

<body>

<style>html{visibility: hidden; opacity: 0;}</style>

<title>MORIKOBOSHI・</title>

<div class="page-wrap">

<div class="cp_cont">
<input id="cp_toggle03" type="checkbox"/>
<div class="cp_mobilebar">
<label for="cp_toggle03" class="cp_menuicon">
<span></span>
</label>
</div>
<label id="h-menu_black" class="cp_toggle03" for="cp_menuicon"></label>
<div id="body" class="noscroll"></div>

<header class="cp_offcm03">

<nav>
<ul style="text-align: center; margin-left: 210px; overflow: hidden;">

<li style="border-bottom: .05px solid lightgray;"><a href="#">Home</a></li>
<li style="border-bottom: .05px solid lightgray;"><a href="#">Blog</a></li>
<li style="border-bottom: .05px solid lightgray;"><a href="#">About This Website</a></li>
<li style="border-bottom: .05px solid lightgray;"><a href="#">Bibliography</a></li>

<div class="searchbar">

<form id="frmSearch" class="search2" method="get" action="default.html" style=" padding-right: 10px; padding-top: 20px; text-align: center; position: inline;">
<input class="search2" id="txtSearch" type="text" placeholder="Custom Google Search" name="serach_bar" size="31" maxlength="255" value="" style="top: 185px; width: 180px; height: 26px;">
<input class="search1" type="submit" name="submition" value="Search" style="padding-left: 5px; top: 153px; height: 25px; width: 50px; display: inline-flex; justify-content: center;">
<input class="search2" type="hidden" name="sitesearch" value="default.html">

</form>
</div>

<script type="text/javascript">
 document.getElementById('frmSearch').onsubmit = function() {
 window.location = 'http://www.google.com/search?q=site:morikoboshi.com' + document.getElementById('txtSearch').value;
        return false;
    }

</script>

<script>
 document.getElementById('cp_toggle03').onchange = function() {
 if (document.getElementById('cp_toggle03').checked) {
 document.body.style.overflow = "hidden";
  } else {
 document.body.style.overflow = "";
  }
}

if(!!window.performance && window.performance.navigation.type == 2)
{
    window.location.reload();

    debugger;
}
</script>

</ul>
</nav>
</header>

<div class="setsumei">

 <br><br><h1 style="text-align: center; font-size: 40px;">◯◯◯◯</h1>
    <br><p style="text-align: justify; font-size: 16px;"></p>

 <p style="text-align: center; font-size: 13px;">Author: ◯◯◯◯</p>
 <p style="text-align: center; font-size: 13px;">Photos/Videos Taken：◯◯◯◯/◯◯/◯◯</p>

 <br><br><p style="text-align: justify; font-size: 16px;">

    #
 </p>

</div>

<br><br><div class="image">

  <a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

 <br><br><a href="#"><img src="#" alt="#" width="90%"></a>

</div>

<br><br><footer class="site-footer" style="font-size: 12px;">MORIKOBOSHI© | <a href="#">日本語</a></footer>

</div>
</div>

<style>

html {visibility: visible;
      opacity: 1;}

.body{background-color: white;
      font-family: sans-serif;}

 .searchbar{float: right;}

 .image{text-align: center;}

 .setsumei{margin-left: 20px;
           margin-right: 20px;}

 .footer{width: 100%;
           height: 40px;
           text-align: center;
           border-top: 1px solid black;
           position: absolute;
           bottom: 0;
           padding: 10px;}

 .page-wrap {
  min-height: 100%;
  /* equal to footer height */
  margin-bottom: -40px;
}

 .page-wrap:after {
  content: "";
  display: block;
  }

 .site-footer, .page-wrap:after {
  /* .push must be the same height as footer */
  height: 20px;
}

 .site-footer {
  text-align: center;
  border-top: 1px solid black;
  padding: 10px;
}

 *, *:before, *:after {
    padding-left: 0;
    margin: 0;
    box-sizing: border-box;

}

 ol, ul {
    list-style: none;
}

 a {
    text-decoration: none;
    color: black;
}

 .cp_cont {
    height: auto;
}

/* menu */
 .cp_offcm03 {
    position: relative;
    z-index: 5000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    width: 100%;
    height: auto;
    padding-top: 0;
    -webkit-transition: transform 0.3s ease-in;
            transition: transform 0.3s ease-in;
    text-align: center;
    color: black;
    background-color: white;
}
 .cp_offcm03 nav,
 .cp_offcm03 ul {
    height: 100%;
}

 .cp_offcm03 li {
    display: inline-block;
    margin-right: -6px;
}

 .cp_offcm03 a {
    display: block;
    padding: 15px 45px;
    margin-bottom: -5px;
    -webkit-transition: background-color .3s ease-in;
            transition: background-color .3s ease-in;
}

 .cp_offcm03 a:hover {
    background-color: lightgray;
}

/* menu toggle */
 #cp_toggle03 {
    display: none;
}

 #cp_toggle03:checked ~ .cp_offcm03 {
    -webkit-transform: translateX(0);
                    transform: translateX(0);
}

 #cp_toggle03:checked ~ .cp_container {
    -webkit-transform: translateX(0);
                    transform: translateX(0);
}

 .cp_mobilebar {
    display: none;

}

/* content */
 .cp_container {
    position: relative;
    top: 0;
    padding: 35px auto;
    -webkit-transition: transform .3s ease-in;
            transition: transform .3s ease-in;
}

 .cp_content {
    margin: 0 auto;
    padding: 20px;
    height: 65vh;
    text-align: center;

}

@media (max-width: 1130px)and (min-width: 280px) {
/* menu */
 .cp_offcm03 {
        position: fixed;
        left: -250px;
        overflow-y: hidden;
        width: 250px;
        height: 100%;
        padding-top: 40px;
        color: black;
        background-color: white;
        z-index: 1000;
    }

 .cp_offcm03 nav {
        background: white;
        border-right: 0.5px solid lightgray;
        margin-left: -210px;
    }

 .cp_offcm03 li {
        display: block;
        margin-right: 0;}

 .cp_offcm03 a {
        padding: 20px;

    }

/* menu toggle */
 .cp_mobilebar {
        display: block;
        z-index: 2000;
        position: relative;
        top: 0;
        left: 0;
        padding: 0 25px;
        width: 100%;
        height: 40px;
        background-color: white;
        border-bottom: .05px solid lightgray;

    }

 .cp_menuicon {
        display: block;
        position: relative;
        width: 25px;
        height: 100%;
        cursor: pointer;
        -webkit-transition: transform .3s ease-in;
                transition: transform .3s ease-in;
    }
 .cp_menuicon > span {
        display: block;
        position: absolute;
        top: 55%;
        margin-top: -0.3em;
        width: 100%;
        height: 0.2em;
        border-radius: 1px;
        background-color: black;
        -webkit-transition: transform .3s ease;
                transition: transform .3s ease;
    }
 .cp_menuicon > span:before,
 .cp_menuicon > span:after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 1px;
        background-color: black;
        -webkit-transition: transform .3s ease-in;
                transition: transform .3s ease-in;
    }

 .cp_menuicon > span:before {
        -webkit-transform: translateY(-0.6em);
                transform: translateY(-0.6em);
    }

 .cp_menuicon > span:after {
        -webkit-transform: translateY(0.6em);
                transform: translateY(0.6em);
    }

 #cp_toggle03:checked + .cp_mobilebar .cp_menuicon {
        -webkit-transform: rotate(45deg);
                transform: rotate(45deg);
    }

 #cp_toggle03:checked + .cp_mobilebar span:before,
 #cp_toggle03:checked + .cp_mobilebar span:after {
        -webkit-transform: rotate(90deg);
                transform: rotate(90deg);
    }

 #cp_toggle03:checked ~ .cp_offcm03 {
        -webkit-transform: translateX(100%);
                transform: translateX(100%);
    }

 #cp_toggle03:checked ~ .cp_container {
        -webkit-transform: translateX(250px);
                transform: translateX(250px);
    }

 input:checked ~ #h-menu_black {
    display: block;/*カバーを表示*/
    opacity: .6;
}

 #h-menu_black {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    transition: .7s ease-in-out;
}

/* content */
 .cp_container {
        top: 60px;
        height: 92vh;
        text-align: center;
    }

 .noscroll{
        overflow: hidden;
        position: fixed;
    }

</style>

</body>
</html>
</code>```

Body:
Below is the code I'm using to build a website. I was having trouble trying to get it to run on a mobile device, but after testing a number of browsers on my iPhone I've noticed that it runs smoothly on all browsers except Google Chrome. When trying to run my website on Google Chrome the site crashes and I'm unable to click any links or view any content. On a MacBook, Google Chrome runs my website without any issues.

Is this an issue with the way Google Chrome works? Would changing a portion of my code help run it smoother on the mobile version of Google Chrome? Any knowledge that anyone can share with me about running websites on mobile browsers would be much appreciated.

<!DOCTYPE html>

<meta name="viewport" content="width=device-width, initial-scale=1.0;" charset="utf-8">

<title>MORIKOBOSHI・</title>

<input id="cp_toggle03" type="checkbox"/>

Home

Blog

About This Website

Bibliography

<form id="frmSearch" class="search2" method="get" action="default.html" style=" padding-right: 10px; padding-top: 20px; text-align: center; position: inline;">
<input class="search2" id="txtSearch" type="text" placeholder="Custom Google Search" name="serach_bar" size="31" maxlength="255" value="" style="top: 185px; width: 180px; height: 26px;">
<input class="search1" type="submit" name="submition" value="Search" style="padding-left: 5px; top: 153px; height: 25px; width: 50px; display: inline-flex; justify-content: center;">
<input class="search2" type="hidden" name="sitesearch" value="default.html">

</form>

◯◯◯◯

Author: ◯◯◯◯

Photos/Videos Taken：◯◯◯◯/◯◯/◯◯

    #

MORIKOBOSHI© | 日本語


问:
Aws Lambda java.nio.channels.UnresolvedAddressException
I am trying to call third API using AWS-Lambda. Means I created a AWS lambda, this Lambda performed some operation and calling third party API PUT call. below code

Java Code

```<code>try {
            String token = jWTManager.readAndUpdateJwtIfExpiringSoon();
            final HttpRequest request = newBuilder()
                    .timeout(ofSeconds(5))
                    .PUT(ofString(gson.toJson(request)))
                    .uri(create(format(endpoint, correlationId)))
                    .header("Content-Type", APPLICATION_JSON)
                    .headers("Accept", APPLICATION_JSON)
                    .headers("charset", UTF_8.name())
                    .headers("Authorization",  token)
                    .build();
             HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());

        } catch (Exception e) {
            log.error("response ", correlationId, e);
            throw new LambdaException(new Error(INTERNAL_ERROR, "Error response"), e);
        }
</code>```

endpoint : https://20.204.80.110:443/pays/api/pays/%s%/feedback
correlationId: CUAUAU41XXXN202212050747302PPPP

Final Url: https://20.204.80.110:443/pays/api/pays/CUAUAU41XXXN202212050747302PPPP/feedback

But everytime I am getting an exception

java.io.IOException: No subject alternative names matching IP address 20.204.80.110
Caused by: javax.net.ssl.SSLHandshakeException: No subject alternative names matching IP address 20.204.80.110 found

I did the google, and checked, IP address and that was correct.

Also, I replaced IP address into the DNS name then getting the low error

Caused by: java.nio.channels.UnresolvedAddressException

Means:  java.nio.channels.UnresolvedAddressException indicates that EMA Java fails to maps the host name to IP address.

Not Sure What I need to do to debug this issue.
Could you please some one help me on this

Body:
I am trying to call third API using AWS-Lambda. Means I created a AWS lambda, this Lambda performed some operation and calling third party API PUT call. below code

Java Code

try {
            String token = jWTManager.readAndUpdateJwtIfExpiringSoon();
            final HttpRequest request = newBuilder()
                    .timeout(ofSeconds(5))
                    .PUT(ofString(gson.toJson(request)))
                    .uri(create(format(endpoint, correlationId)))
                    .header("Content-Type", APPLICATION_JSON)
                    .headers("Accept", APPLICATION_JSON)
                    .headers("charset", UTF_8.name())
                    .headers("Authorization",  token)
                    .build();
             HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());

        } catch (Exception e) {
            log.error("response ", correlationId, e);
            throw new LambdaException(new Error(INTERNAL_ERROR, "Error response"), e);
        }

endpoint : https://20.204.80.110:443/pays/api/pays/%s%/feedback
correlationId: CUAUAU41XXXN202212050747302PPPP

Final Url: https://20.204.80.110:443/pays/api/pays/CUAUAU41XXXN202212050747302PPPP/feedback

But everytime I am getting an exception

java.io.IOException: No subject alternative names matching IP address 20.204.80.110
Caused by: javax.net.ssl.SSLHandshakeException: No subject alternative names matching IP address 20.204.80.110 found

I did the google, and checked, IP address and that was correct.

Also, I replaced IP address into the DNS name then getting the low error

Caused by: java.nio.channels.UnresolvedAddressException

Means:  java.nio.channels.UnresolvedAddressException indicates that EMA Java fails to maps the host name to IP address.

Not Sure What I need to do to debug this issue.
Could you please some one help me on this


问:
Getting an ODBC Connection error in VB.NET when trying to connect to Teradata
First time questioner, be gentle

I'm trying to connect to a Teradata database using ODBC. When the code was originally written it worked. We have since upgraded the ODBC drivers for Teradata.

I tried connecting using VBA (Excel) as we still have some old code lying around

VBA code (simplified)

```<code>private FConnection as New ADODB.Connection

sub DBConnect(DSNName as string, UserName as string, Password as string)

Set FConnection = New ADODB.Connection
FConnection.Open DSNName, UserName, Password

</code>```

This works with no issues. It also works if I use

```<code>FConnection.Open "DSN=" & DSNName & ";UID=" & UserName & ";PWD=" & Password & ";"
</code>```

So I know the ODBC connection is not an issue.

Trying the same with VB.NET

```<code>Dim FConnection As Odbc.OdbcConnection

try
    FConnection = New Odbc.OdbcConnection()
    FConnection.ConnectionString = "DSN=" & DSNName & ";UID=" & UserName & ";PWD=" & Password & ";"
    FConnection.Open()
Catch ex As Odbc.OdbcException
    MessageBox.Show(ex.Message)
End Try
</code>```

This results in
ERROR [08001] [Teradata][socket error] (439) WSA E HostUnreach: The Teradata server can't currently be reached over this network

I've tried a number of variations on the Connection string but nothing.

EDIT: I tried using Teradata.net instead of ODBC, but all variations of that end up with a Socket Exception in System.Net.Dns.GetAddrInfo

Pinging the server name works without issue

Body:
First time questioner, be gentle

I'm trying to connect to a Teradata database using ODBC. When the code was originally written it worked. We have since upgraded the ODBC drivers for Teradata.

I tried connecting using VBA (Excel) as we still have some old code lying around

VBA code (simplified)

private FConnection as New ADODB.Connection

sub DBConnect(DSNName as string, UserName as string, Password as string)

Set FConnection = New ADODB.Connection
FConnection.Open DSNName, UserName, Password

This works with no issues. It also works if I use

FConnection.Open "DSN=" & DSNName & ";UID=" & UserName & ";PWD=" & Password & ";"

So I know the ODBC connection is not an issue.

Trying the same with VB.NET

Dim FConnection As Odbc.OdbcConnection

try
    FConnection = New Odbc.OdbcConnection()
    FConnection.ConnectionString = "DSN=" & DSNName & ";UID=" & UserName & ";PWD=" & Password & ";"
    FConnection.Open()
Catch ex As Odbc.OdbcException
    MessageBox.Show(ex.Message)
End Try

This results in
ERROR [08001] [Teradata][socket error] (439) WSA E HostUnreach: The Teradata server can't currently be reached over this network

I've tried a number of variations on the Connection string but nothing.

EDIT: I tried using Teradata.net instead of ODBC, but all variations of that end up with a Socket Exception in System.Net.Dns.GetAddrInfo

Pinging the server name works without issue


问:
Auto route code updation to latest version of package
I want to update below code with latest version of package of Auto_route. There is no details about Extended Navigator or it's replacable in latest version.</p>
```<code>@override
  Widget build(BuildContext context) {
    return ExtendedNavigator<AppRouter>(
      navigatorKey: navigatorKey,
      initialRoute: initialRoute,
      initialRouteArgs: initialArgs,
      router: AppRouter(),
    );
  }
</code>```

Body:
I want to update below code with latest version of package of Auto_route. There is no details about Extended Navigator or it's replacable in latest version.

@override
  Widget build(BuildContext context) {
    return ExtendedNavigator<AppRouter>(
      navigatorKey: navigatorKey,
      initialRoute: initialRoute,
      initialRouteArgs: initialArgs,
      router: AppRouter(),
    );
  }


问:
How would I solve an import loop for a class that calls the main file
I'm learning more about classes, and learning pygame.

What I'm trying to do is separate all my classes into it's own file for sake of organization.
I'm seemingly stuck this, and keep getting a circular import error.

main.py

```<code>import gameclasses as gc
NewButton = gc.Button("Click", 200, 40, (500, 500))

while True:
    NewButton.Draw()
</code>```

gameclasses.py

```<code>import main

def __init__(self, text, width, height, pos):
    self.ButtonTop = pg.Rect(pos, (width, height))
    self.ButtonTopColor = color1

    self.ButtonTextSurface = settings.FONT.render(text, True, textcolor)
    self.ButtonTextRect = self.ButtonTextSurface.get_rect(center = self.ButtonTop.center)

def draw(self):
    pg.draw.rect(main.window, self.ButtonTopColor, self.ButtonTop)
    main.window.blit(self.ButtonTextSurface, self.ButtonTextRect)
</code>```

I'm sure it has something to do with name == "main", I've tossed it around as an if statement or a while loop.

Body:
I'm learning more about classes, and learning pygame.

What I'm trying to do is separate all my classes into it's own file for sake of organization.
I'm seemingly stuck this, and keep getting a circular import error.

main.py

import gameclasses as gc
NewButton = gc.Button("Click", 200, 40, (500, 500))

while True:
    NewButton.Draw()

gameclasses.py

import main

def __init__(self, text, width, height, pos):
    self.ButtonTop = pg.Rect(pos, (width, height))
    self.ButtonTopColor = color1

    self.ButtonTextSurface = settings.FONT.render(text, True, textcolor)
    self.ButtonTextRect = self.ButtonTextSurface.get_rect(center = self.ButtonTop.center)

def draw(self):
    pg.draw.rect(main.window, self.ButtonTopColor, self.ButtonTop)
    main.window.blit(self.ButtonTextSurface, self.ButtonTextRect)

I'm sure it has something to do with name == "main", I've tossed it around as an if statement or a while loop.


问:
Unparseable date exception for the date format 2020-12-31T11:46:18.000+00:00
How do i parse a date with the format 2020-12-31T11:46:18.000+00:00

```<code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

Date startDate = sdf.parse("2020-12-31T11:46:18.000+00:00");
</code>```

I get Unparseable date exception. I have tried providing the Z without the quote but still it throws the exception.

The below code also doesn't work

```<code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
</code>```

Body:
How do i parse a date with the format 2020-12-31T11:46:18.000+00:00

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

Date startDate = sdf.parse("2020-12-31T11:46:18.000+00:00");

I get Unparseable date exception. I have tried providing the Z without the quote but still it throws the exception.

The below code also doesn't work

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");


问:
Android Studio App project if/else statement not working properly
I am a beginner to coding in general and am working with Java in Android Studio. I am working on an app and I cannot get my if/else statement to work properly. Right now it is accepting any number. Can someone please let me know what I am doing wrong here?</p>
```<code>import androidx.appcompat.app.AppCompatActivity;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.widget.ImageView;
import android.widget.TextView;

import java.text.DecimalFormat;

public class Cost extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cost);
        TextView totalCost = (TextView)findViewById(R.id.txtCost);
        ImageView image = (ImageView)findViewById(R.id.imgRental);
        SharedPreferences sharedPref =
        PreferenceManager.getDefaultSharedPreferences(this);
        float floatTruckSize = sharedPref.getFloat("key1", 0);
        float floatMiles = sharedPref.getFloat("key2", 0);
        float floatCost;
        if (floatTruckSize == 10) {
            floatTruckSize = (float) 19.95;
            image.setImageResource(R.drawable.tenfoot);
        } else if (floatTruckSize == 17) {
            floatTruckSize = (float) 29.95;
            image.setImageResource(R.drawable.seventeenfoot);
        } else if (floatTruckSize == 26) {
            floatTruckSize = (float) 39.95;
            image.setImageResource(R.drawable.twentysixfoot);
        } else {
        totalCost.setText("Enter 10, 17, or 26 foot truck rental");
        }
        floatCost = (float) (floatTruckSize * (floatMiles * .99));
        DecimalFormat currency = new DecimalFormat("$###,###.##");
        totalCost.setText("Total cost for 1-day truck rental " +
        currency.format(floatCost));

         }
        }
</code>```

Body:
I am a beginner to coding in general and am working with Java in Android Studio. I am working on an app and I cannot get my if/else statement to work properly. Right now it is accepting any number. Can someone please let me know what I am doing wrong here?

import androidx.appcompat.app.AppCompatActivity;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.widget.ImageView;
import android.widget.TextView;

import java.text.DecimalFormat;

public class Cost extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cost);
        TextView totalCost = (TextView)findViewById(R.id.txtCost);
        ImageView image = (ImageView)findViewById(R.id.imgRental);
        SharedPreferences sharedPref =
        PreferenceManager.getDefaultSharedPreferences(this);
        float floatTruckSize = sharedPref.getFloat("key1", 0);
        float floatMiles = sharedPref.getFloat("key2", 0);
        float floatCost;
        if (floatTruckSize == 10) {
            floatTruckSize = (float) 19.95;
            image.setImageResource(R.drawable.tenfoot);
        } else if (floatTruckSize == 17) {
            floatTruckSize = (float) 29.95;
            image.setImageResource(R.drawable.seventeenfoot);
        } else if (floatTruckSize == 26) {
            floatTruckSize = (float) 39.95;
            image.setImageResource(R.drawable.twentysixfoot);
        } else {
        totalCost.setText("Enter 10, 17, or 26 foot truck rental");
        }
        floatCost = (float) (floatTruckSize * (floatMiles * .99));
        DecimalFormat currency = new DecimalFormat("$###,###.##");
        totalCost.setText("Total cost for 1-day truck rental " +
        currency.format(floatCost));

         }
        }


问:
How to migrate API from ExpressJS to NestJS?
How to migrate API from ExpressJS to NestJS?

What should I do for the first step?


问:
How to deploy express.js app to Amazon EC2 and have it available from HTTPS without domain name?
The idea is to fetch api in expressjs deployed to Amazon EC2.
The problem is that Inbound rules don't allow to create connection for HTTPS on other ports than 443.

The solution with creating Custom TCP rule and removing HTTPS rule (as described here) did not work for me.

I tried to install Load Balancer but had no luck because it asks for certificate which was impossible to release without domain name. Is it possible to get certificate for Amazon's generated Public IPv4 DNS?

After that, I have tried to install NGINX server for reverse proxy as it was described here:
https://www.sitepoint.com/configuring-nginx-ssl-node-js/
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-centos-7

It did work but only for HTTP, because I could not release Let's Encrypt certificate for Amazon's Public IPv4 DNS.
When I tried to do it via certbot with sudo certbot certonly --standalone -d <subdomain>.eu-north-1.compute.amazonaws.com

```<code>An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "<subdomain>.eu-north-1.compute.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy
</code>```

Then I tried to release for IP address, but:

```<code>Requested name <my_ip_address> is an IP address. The Let's Encrypt certificate authority will not issue certificates for a bare IP address.
</code>```

So, is there a way to have a expressjs app on Amazon EC2 with HTTPS without registered domain name?
I want to have api there which I can fetch from other https website. Any suggestion?

Body:
The idea is to fetch api in expressjs deployed to Amazon EC2.
The problem is that Inbound rules don't allow to create connection for HTTPS on other ports than 443.

The solution with creating Custom TCP rule and removing HTTPS rule (as described here) did not work for me.

I tried to install Load Balancer but had no luck because it asks for certificate which was impossible to release without domain name. Is it possible to get certificate for Amazon's generated Public IPv4 DNS?

After that, I have tried to install NGINX server for reverse proxy as it was described here:
https://www.sitepoint.com/configuring-nginx-ssl-node-js/
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-centos-7

It did work but only for HTTP, because I could not release Let's Encrypt certificate for Amazon's Public IPv4 DNS.
When I tried to do it via certbot with sudo certbot certonly --standalone -d <subdomain>.eu-north-1.compute.amazonaws.com

An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "<subdomain>.eu-north-1.compute.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy

Then I tried to release for IP address, but:

Requested name <my_ip_address> is an IP address. The Let's Encrypt certificate authority will not issue certificates for a bare IP address.

So, is there a way to have a expressjs app on Amazon EC2 with HTTPS without registered domain name?
I want to have api there which I can fetch from other https website. Any suggestion?


问:
How to fix this error for installing AutoGluon on Linux
I am trying to install AutoGluon on my university computer (Linux)

I followed the instruction given here https://auto.gluon.ai/stable/index.html

```<code>pip3 install -U pip
pip3 install -U setuptools wheel

# CPU version of pytorch has smaller footprint - see installation instructions in
# pytorch documentation - https://pytorch.org/get-started/locally/
pip3 install torch==1.12+cpu torchvision==0.13.0+cpu torchtext==0.13.0 -f https://download.pytorch.org/whl/cpu/torch_stable.html

pip3 install autogluon
</code>```

all steps ended successfully except for the last one pip3 install autogluon

I am getting this error

```<code>user99@tinaroo1:~/autogluon> pip3 install autogluon
Keyring is skipped due to an exception: 'EntryPoints' object has no attribute 'get'
Defaulting to user installation because normal site-packages is not writeable
Collecting autogluon
  Using cached autogluon-0.6.0-py3-none-any.whl (9.8 kB)
Collecting autogluon.multimodal==0.6.0
  Using cached autogluon.multimodal-0.6.0-py3-none-any.whl (279 kB)
Collecting autogluon.timeseries[all]==0.6.0
  Using cached autogluon.timeseries-0.6.0-py3-none-any.whl (101 kB)
Collecting autogluon.features==0.6.0
  Using cached autogluon.features-0.6.0-py3-none-any.whl (59 kB)
Collecting autogluon.core[all]==0.6.0
  Using cached autogluon.core-0.6.0-py3-none-any.whl (224 kB)
Collecting autogluon.vision==0.6.0
  Using cached autogluon.vision-0.6.0-py3-none-any.whl (49 kB)
Collecting autogluon.tabular[all]==0.6.0
  Using cached autogluon.tabular-0.6.0-py3-none-any.whl (285 kB)
Collecting autogluon.text==0.6.0
  Using cached autogluon.text-0.6.0-py3-none-any.whl (62 kB)
Requirement already satisfied: numpy<1.24,>=1.21 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.21.5)
Requirement already satisfied: scipy<1.10.0,>=1.5.4 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.7.1)
Collecting autogluon.common==0.6.0
  Using cached autogluon.common-0.6.0-py3-none-any.whl (41 kB)
Requirement already satisfied: matplotlib in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (3.2.2)
Requirement already satisfied: tqdm>=4.38.0 in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (4.47.0)
Requirement already satisfied: requests in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2.24.0)
Requirement already satisfied: scikit-learn<1.2,>=1.0.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.0.2)
Requirement already satisfied: pandas!=1.4.0,<1.6,>=1.2.5 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.3.5)
Requirement already satisfied: boto3 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.26.23)
Requirement already satisfied: dask<=2021.11.2,>=2021.09.1 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2021.11.2)
Requirement already satisfied: distributed<=2021.11.2,>=2021.09.1 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2021.11.2)
Requirement already satisfied: ray<2.1,>=2.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2.0.1)
Requirement already satisfied: hyperopt<0.2.8,>=0.2.7 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (0.2.7)
Requirement already satisfied: psutil<6,>=5.7.3 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.features==0.6.0->autogluon) (5.9.4)
Collecting seqeval<=1.2.2
  Using cached seqeval-1.2.2.tar.gz (43 kB)
  Preparing metadata (setup.py) ... done
Collecting omegaconf<2.2.0,>=2.1.1
  Using cached omegaconf-2.1.2-py3-none-any.whl (74 kB)
Collecting scikit-image<0.20.0,>=0.19.1
  Using cached scikit_image-0.19.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (13.5 MB)
Collecting sentencepiece<0.2.0,>=0.1.95
  Using cached sentencepiece-0.1.97-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
Collecting torchmetrics<0.9.0,>=0.8.0
  Using cached torchmetrics-0.8.2-py3-none-any.whl (409 kB)
Requirement already satisfied: torchvision<0.14.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.multimodal==0.6.0->autogluon) (0.13.0+cpu)
Collecting accelerate<0.14,>=0.9
  Using cached accelerate-0.13.2-py3-none-any.whl (148 kB)
Collecting evaluate<=0.2.2
  Using cached evaluate-0.2.2-py3-none-any.whl (69 kB)
Collecting nptyping<1.5.0,>=1.4.4
  Using cached nptyping-1.4.4-py3-none-any.whl (31 kB)
Collecting defusedxml<=0.7.1,>=0.7.1
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting openmim<=0.2.1,>0.1.5
  Using cached openmim-0.2.1-py2.py3-none-any.whl (49 kB)
Requirement already satisfied: torchtext<0.14.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.multimodal==0.6.0->autogluon) (0.13.0)
Collecting albumentations<=1.2.0,>=1.1.0
  Using cached albumentations-1.2.0-py3-none-any.whl (113 kB)
Collecting pycocotools<2.0.7,>=2.0.5
  Using cached pycocotools-2.0.6.tar.gz (24 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: -11
  ╰─> [35 lines of output]
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      Traceback (most recent call last):
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 7, in <module>
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
          from . import add_newdocs
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
          from numpy.lib import add_newdoc
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
          from .type_check import *
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
          import numpy.core.numeric as _nx
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/core/__init__.py", line 16, in <module>
          from . import multiarray
      KeyboardInterrupt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: -11
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
user99@tinaroo1:~/autogluon>
</code>```

I wonder if it makes sense to anyone and can help me fixing that.

Body:
I am trying to install AutoGluon on my university computer (Linux)

I followed the instruction given here https://auto.gluon.ai/stable/index.html

pip3 install -U pip
pip3 install -U setuptools wheel

# CPU version of pytorch has smaller footprint - see installation instructions in
# pytorch documentation - https://pytorch.org/get-started/locally/
pip3 install torch==1.12+cpu torchvision==0.13.0+cpu torchtext==0.13.0 -f https://download.pytorch.org/whl/cpu/torch_stable.html

pip3 install autogluon

all steps ended successfully except for the last one pip3 install autogluon

I am getting this error

user99@tinaroo1:~/autogluon> pip3 install autogluon
Keyring is skipped due to an exception: 'EntryPoints' object has no attribute 'get'
Defaulting to user installation because normal site-packages is not writeable
Collecting autogluon
  Using cached autogluon-0.6.0-py3-none-any.whl (9.8 kB)
Collecting autogluon.multimodal==0.6.0
  Using cached autogluon.multimodal-0.6.0-py3-none-any.whl (279 kB)
Collecting autogluon.timeseries[all]==0.6.0
  Using cached autogluon.timeseries-0.6.0-py3-none-any.whl (101 kB)
Collecting autogluon.features==0.6.0
  Using cached autogluon.features-0.6.0-py3-none-any.whl (59 kB)
Collecting autogluon.core[all]==0.6.0
  Using cached autogluon.core-0.6.0-py3-none-any.whl (224 kB)
Collecting autogluon.vision==0.6.0
  Using cached autogluon.vision-0.6.0-py3-none-any.whl (49 kB)
Collecting autogluon.tabular[all]==0.6.0
  Using cached autogluon.tabular-0.6.0-py3-none-any.whl (285 kB)
Collecting autogluon.text==0.6.0
  Using cached autogluon.text-0.6.0-py3-none-any.whl (62 kB)
Requirement already satisfied: numpy<1.24,>=1.21 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.21.5)
Requirement already satisfied: scipy<1.10.0,>=1.5.4 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.7.1)
Collecting autogluon.common==0.6.0
  Using cached autogluon.common-0.6.0-py3-none-any.whl (41 kB)
Requirement already satisfied: matplotlib in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (3.2.2)
Requirement already satisfied: tqdm>=4.38.0 in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (4.47.0)
Requirement already satisfied: requests in /mnt/sw/legacy/sw1/RCC/Anaconda/2020.02/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2.24.0)
Requirement already satisfied: scikit-learn<1.2,>=1.0.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.0.2)
Requirement already satisfied: pandas!=1.4.0,<1.6,>=1.2.5 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.3.5)
Requirement already satisfied: boto3 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (1.26.23)
Requirement already satisfied: dask<=2021.11.2,>=2021.09.1 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2021.11.2)
Requirement already satisfied: distributed<=2021.11.2,>=2021.09.1 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2021.11.2)
Requirement already satisfied: ray<2.1,>=2.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (2.0.1)
Requirement already satisfied: hyperopt<0.2.8,>=0.2.7 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.core[all]==0.6.0->autogluon) (0.2.7)
Requirement already satisfied: psutil<6,>=5.7.3 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.features==0.6.0->autogluon) (5.9.4)
Collecting seqeval<=1.2.2
  Using cached seqeval-1.2.2.tar.gz (43 kB)
  Preparing metadata (setup.py) ... done
Collecting omegaconf<2.2.0,>=2.1.1
  Using cached omegaconf-2.1.2-py3-none-any.whl (74 kB)
Collecting scikit-image<0.20.0,>=0.19.1
  Using cached scikit_image-0.19.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (13.5 MB)
Collecting sentencepiece<0.2.0,>=0.1.95
  Using cached sentencepiece-0.1.97-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
Collecting torchmetrics<0.9.0,>=0.8.0
  Using cached torchmetrics-0.8.2-py3-none-any.whl (409 kB)
Requirement already satisfied: torchvision<0.14.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.multimodal==0.6.0->autogluon) (0.13.0+cpu)
Collecting accelerate<0.14,>=0.9
  Using cached accelerate-0.13.2-py3-none-any.whl (148 kB)
Collecting evaluate<=0.2.2
  Using cached evaluate-0.2.2-py3-none-any.whl (69 kB)
Collecting nptyping<1.5.0,>=1.4.4
  Using cached nptyping-1.4.4-py3-none-any.whl (31 kB)
Collecting defusedxml<=0.7.1,>=0.7.1
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting openmim<=0.2.1,>0.1.5
  Using cached openmim-0.2.1-py2.py3-none-any.whl (49 kB)
Requirement already satisfied: torchtext<0.14.0 in /home/user99/.local/lib/python3.7/site-packages (from autogluon.multimodal==0.6.0->autogluon) (0.13.0)
Collecting albumentations<=1.2.0,>=1.1.0
  Using cached albumentations-1.2.0-py3-none-any.whl (113 kB)
Collecting pycocotools<2.0.7,>=2.0.5
  Using cached pycocotools-2.0.6.tar.gz (24 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: -11
  ╰─> [35 lines of output]
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
      OpenBLAS blas_thread_init: RLIMIT_NPROC 50 current, 514567 max
      Traceback (most recent call last):
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/user99/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 7, in <module>
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
          from . import add_newdocs
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
          from numpy.lib import add_newdoc
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
          from .type_check import *
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
          import numpy.core.numeric as _nx
        File "/scratch/user/user99/tmp/pip-build-env-j7xhslnv/overlay/lib/python3.7/site-packages/numpy/core/__init__.py", line 16, in <module>
          from . import multiarray
      KeyboardInterrupt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: -11
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
user99@tinaroo1:~/autogluon>

I wonder if it makes sense to anyone and can help me fixing that.


问:
Upload APP to google play with more than 100MB
I'm new to uploading an app to Google Play, I've tried to upload an application to Google Play but apparently it only allows up to a maximum of 100MB. Is there any way to upload the complete app?

I tried with expansion but I do not understand much, since I am new to the subject


问:
Manage ValidFrom and ValidTo inside a transaction in SQL Server
I use temporal table in SQL Server to store some historical data.

According to the doc, all the actions in the transaction will be mark at the same time when first transaction begin. But I'm not happy with this behavior, I need to do 2-3 different jobs and each job must has different timestamp or some logic will fail, it also need to rollback if one job failed.

Example, the result in database is like this

Column A
ValidFrom

Result1
timestamp1

Result2
timestamp1

Result3
timestamp1

What I need is the result from 3 job will be in different timestamp although 3 job is run in the same transaction.

Column A
ValidFrom

Result1
timestamp1

Result2
timestamp2

Result3
timestamp3

Is there any way rollback some action in temporal table without running in transaction. Or is there any way to change the system time to make all action not to be the same timestamp?

Currently, I temporary disable transaction when do those jobs. But it too risk if one of job is failed.


问:
How can get System.Runtime dll to deploy when i Publish from Visual Studio?
I have a project that i am publishing using visual studio. The project includes a reference to System.Runtime.dll located in

```<code>Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades
</code>```

But when i Publish , for some reason that dll is not deployed .

Does anyone have any ideas on this ?

Body:
I have a project that i am publishing using visual studio. The project includes a reference to System.Runtime.dll located in

Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades

But when i Publish , for some reason that dll is not deployed .

Does anyone have any ideas on this ?


问:
Rails Model Custom Validation Won't Work On Update
I try to create some model validation on my Coupon Model
evrything work on create, but when i try to update data the validation won't validate
the first validation is to raise error if percentage more than 100
the second validation is to  validate if date start bigger than date expired it will throw some error

my model in this code:

```<code># frozen_string_literal: true

class Coupon < ApplicationRecord
  has_many :transactions, dependent: :restrict_with_exception
  has_one :battery, through: :transactions
  enum :discount_type, %i[percentage nominal]
  validates :code, format: { with: /\A[0-9A-Z]+\Z/ },
                   presence: true,
                   uniqueness: true,
                   length: { maximum: 50 },
                   on: :create,
                   allow_nil: false
  validate :discount_value, :discount_type
  validate :discount_value_percentage

  validates :start_at, :expired_at, presence: true
  validate :end_date_after_start_date

  def discount_value_percentage
    return unless discount_type == 'percentage' && discount_value > 100

    errors.add(:discount_value, 'discount value percentage cannot over 100%')
  end

  def end_date_after_start_date
    return if expired_at.blank? || start_at.blank?

    return unless expired_at < start_at

    errors.add(:expired_at, 'must be after the start date')
  end
end

</code>```

Please help me to resolve my problem

the validation can validate if date start bigger than date end it will throw error code

Body:
I try to create some model validation on my Coupon Model
evrything work on create, but when i try to update data the validation won't validate
the first validation is to raise error if percentage more than 100
the second validation is to  validate if date start bigger than date expired it will throw some error

my model in this code:

# frozen_string_literal: true

class Coupon < ApplicationRecord
  has_many :transactions, dependent: :restrict_with_exception
  has_one :battery, through: :transactions
  enum :discount_type, %i[percentage nominal]
  validates :code, format: { with: /\A[0-9A-Z]+\Z/ },
                   presence: true,
                   uniqueness: true,
                   length: { maximum: 50 },
                   on: :create,
                   allow_nil: false
  validate :discount_value, :discount_type
  validate :discount_value_percentage

  validates :start_at, :expired_at, presence: true
  validate :end_date_after_start_date

  def discount_value_percentage
    return unless discount_type == 'percentage' && discount_value > 100

    errors.add(:discount_value, 'discount value percentage cannot over 100%')
  end

  def end_date_after_start_date
    return if expired_at.blank? || start_at.blank?

    return unless expired_at < start_at

    errors.add(:expired_at, 'must be after the start date')
  end
end

Please help me to resolve my problem

the validation can validate if date start bigger than date end it will throw error code


问:
Flutter Reactive BLE listener shows null data after received 5times
Hi am new to flutter development & i have a project with esp32 device Bluetooth communication. i can able to receive notification from esp32 to my flutter app using flutter reactive ble plugin but after fifth time the data received become null. please check below my code & output

```<code>  if (_connected) {
      _rxCharacteristic = QualifiedCharacteristic(
                serviceId: serviceUuid,
                characteristicId: sendCharacteristicUuid,
                deviceId: _connectedDevice);

      await flutterReactiveBle
      .writeCharacteristicWithResponse(_rxCharacteristic, value:
       utf8.encode('[{"d":3,"s":110},{"d":6,"s":150},{"d":2,"s":110}]'),
          //.writeCharacteristicWithResponse(_rxCharacteristic, value:
        );
              final mtu = flutterReactiveBle.requestMtu(deviceId: _connectedDevice, mtu: 251);
              final characteristic = QualifiedCharacteristic(serviceId: serviceUuid, characteristicId: characteristicUuid, deviceId: _connectedDevice);
              flutterReactiveBle.subscribeToCharacteristic(characteristic).listen((data) {
      // code to handle incoming data
      print(ascii.decode(data));
    }, onError: (dynamic error) {
      // code to handle errors
    });
    }
</code>```

Error shows like handle trim memory.com enter image description here

Body:
Hi am new to flutter development & i have a project with esp32 device Bluetooth communication. i can able to receive notification from esp32 to my flutter app using flutter reactive ble plugin but after fifth time the data received become null. please check below my code & output

  if (_connected) {
      _rxCharacteristic = QualifiedCharacteristic(
                serviceId: serviceUuid,
                characteristicId: sendCharacteristicUuid,
                deviceId: _connectedDevice);

      await flutterReactiveBle
      .writeCharacteristicWithResponse(_rxCharacteristic, value:
       utf8.encode('[{"d":3,"s":110},{"d":6,"s":150},{"d":2,"s":110}]'),
          //.writeCharacteristicWithResponse(_rxCharacteristic, value:
        );
              final mtu = flutterReactiveBle.requestMtu(deviceId: _connectedDevice, mtu: 251);
              final characteristic = QualifiedCharacteristic(serviceId: serviceUuid, characteristicId: characteristicUuid, deviceId: _connectedDevice);
              flutterReactiveBle.subscribeToCharacteristic(characteristic).listen((data) {
      // code to handle incoming data
      print(ascii.decode(data));
    }, onError: (dynamic error) {
      // code to handle errors
    });
    }

Error shows like handle trim memory.com enter image description here


问:
Polars: how to create a dataframe from arrow RecordBatch?
I am using rust arrow library and have a RecordBatch struct. I want to create a Polars dataframe out it, do some operations in the Polars land, and move the result back to RecordBatch. Since both are arrow based, I suppose there might be an efficient way to convert back and forth.

What is the best way to convert RecordBatch to Polars Dataframe and vice versa in Rust?


问:
What is wrong with my "token type" in Happy?
I am writing a simple arithmetic expression parser in the Haskell platform's Happy. The Happy tutorial (labeled "Documentation") from the Haskell site implements a similar grammar to what I need. The difference is that I want to include floating point numbers in my expressions and I do not need to define variables (i.e. expressions will not contain "let", "in", "=", or "x" or "y").

When I compile my grammar file with Happy it outputs:

```<code>unused terminals: 1
happy: no token type given
CallStack (from HasCallStack):
  error, called at src/AbsSyn.lhs:93:24 in main:AbsSyn
</code>```

I've searched StackOverflow for questions mentioning "no token type given" and found nothing mentioning this error. I also can't figure out what the "CallStack" trace means. (I'm quite new to Haskell).

I've defined a helper function to tell whether a token is a float:

```<code>isNum :: [Token] -> a -> Bool
isNum x = typeOf (read x) == typeOf 1.1
</code>```

I've copied the documentation page's grammar file almost exactly, except where I've removed any production rules for variables, "=", or other alphabetic input, and where I've added rules for floating point numbers, i.e.

```<code>%token
    int    { TokenInt $$ }
    float { TokenNum $$ }
...
Exp    : Expl { Expl $1 }
Exp    : Expl '+' Term { Plus $1 $3}
...
Factor    : int    { Int $1 }
          | float { Float $1 }
...
data Exp
    = Let String Exp Exp
    | Expl Expl
    deriving Show

data Expl
    = Plus Expl Term
    | Minus Expl Term
    | Term Term
    deriving Show
...
data Token
    = TokenInt Int
    | TokenFloat Float
    | TokenNum Float
    | TokenPlus
...
lexer (c:cs)
    | isSpace c = lexer cs
    | isDigit c = lexNum (c:cs)
lexer ('=':cs) = TokenEq : lexer cs
...
lexNum cs = TokenInt (read num) : lexer rest
    where (num,rest) = span isDigit cs
lexFloat cs = TokenFloat (read num) : lexer rest
    where (num,rest) = span isNum cs
</code>```

That's about it, so far.

Body:
I am writing a simple arithmetic expression parser in the Haskell platform's Happy. The Happy tutorial (labeled "Documentation") from the Haskell site implements a similar grammar to what I need. The difference is that I want to include floating point numbers in my expressions and I do not need to define variables (i.e. expressions will not contain "let", "in", "=", or "x" or "y").

When I compile my grammar file with Happy it outputs:

unused terminals: 1
happy: no token type given
CallStack (from HasCallStack):
  error, called at src/AbsSyn.lhs:93:24 in main:AbsSyn

I've searched StackOverflow for questions mentioning "no token type given" and found nothing mentioning this error. I also can't figure out what the "CallStack" trace means. (I'm quite new to Haskell).

I've defined a helper function to tell whether a token is a float:

isNum :: [Token] -> a -> Bool
isNum x = typeOf (read x) == typeOf 1.1

I've copied the documentation page's grammar file almost exactly, except where I've removed any production rules for variables, "=", or other alphabetic input, and where I've added rules for floating point numbers, i.e.

%token
    int    { TokenInt $$ }
    float { TokenNum $$ }
...
Exp    : Expl { Expl $1 }
Exp    : Expl '+' Term { Plus $1 $3}
...
Factor    : int    { Int $1 }
          | float { Float $1 }
...
data Exp
    = Let String Exp Exp
    | Expl Expl
    deriving Show

data Expl
    = Plus Expl Term
    | Minus Expl Term
    | Term Term
    deriving Show
...
data Token
    = TokenInt Int
    | TokenFloat Float
    | TokenNum Float
    | TokenPlus
...
lexer (c:cs)
    | isSpace c = lexer cs
    | isDigit c = lexNum (c:cs)
lexer ('=':cs) = TokenEq : lexer cs
...
lexNum cs = TokenInt (read num) : lexer rest
    where (num,rest) = span isDigit cs
lexFloat cs = TokenFloat (read num) : lexer rest
    where (num,rest) = span isNum cs

That's about it, so far.


问:
Secure FTP file download
I'm trying to download the most recent file with the extension add.zip via ftp

I'll preface this by saying I am not well versed in php and have created this frankenstein piece of code from a scattering of other codes.

here is my code

```<code><?php

// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

if (!$login_result) {
    // PHP will already have raised an E_WARNING level message in this case
    die("can't login");
}

// get list of files on given path
$files = ftp_nlist($ftp, '/1668161919_DATA/*add.zip') or die("Could not find file");

$mostRecent = array(
    'time' => 0,
    'file' => null
);

foreach ($files as $file) {
    // get the last modified time for the file
    $time = ftp_mdtm($ftp, $file);

    if ($time > $mostRecent['time']) {
        // this file is the most recent so far
        $mostRecent['time'] = $time;
        $mostRecent['file'] = $file;
    }
}

ftp_get($ftp, "/home/mysite/public_html/wp-content/uploads/data-zipped/target.zip", $mostRecent['file'], FTP_BINARY);
ftp_delete($ftp, $mostRecent['file']);
ftp_close($ftp);
?>
</code>```

After some testing

```<code><?php

// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

if ($login_result === TRUE) {
  echo 'woot!';
} else {
  echo 'doh!';
}
</code>```

Returns a woot

but

```<code>// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

// get list of files on given path
$files = ftp_nlist($ftp, '/1668161919_DATA/*add.zip');

if ($files === TRUE) {
  echo 'files found!';
} else {
  echo 'doh! files not found';
}

?>
</code>```

Cause a 504 error with no further information.

What am I doing wrong?

When I copy the URL to clipboard in FileZilla the data is sftp://username@myremotesite.com/1668161919_DATA

Am I even close to getting this right?

When I have tried using similar FTP file downloads in the past, it was with

ftp_connect

This is the first time I have been forced to use

ftp_ssl_connect

Ok, so I set up a testing environment and ran the script using ftp_connect instead of ftp_ssl_connect and the code worked fine.

I think I need to define my port as 22. But

```<code>$ftp = ftp_ssl_connect('myremotesite.com','22')
</code>```

doesn't work. Can anyone assist?

Title: Secure FTP file download

Body:
I'm trying to download the most recent file with the extension add.zip via ftp

I'll preface this by saying I am not well versed in php and have created this frankenstein piece of code from a scattering of other codes.

here is my code

<?php

// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

if (!$login_result) {
    // PHP will already have raised an E_WARNING level message in this case
    die("can't login");
}

// get list of files on given path
$files = ftp_nlist($ftp, '/1668161919_DATA/*add.zip') or die("Could not find file");

$mostRecent = array(
    'time' => 0,
    'file' => null
);

foreach ($files as $file) {
    // get the last modified time for the file
    $time = ftp_mdtm($ftp, $file);

    if ($time > $mostRecent['time']) {
        // this file is the most recent so far
        $mostRecent['time'] = $time;
        $mostRecent['file'] = $file;
    }
}

ftp_get($ftp, "/home/mysite/public_html/wp-content/uploads/data-zipped/target.zip", $mostRecent['file'], FTP_BINARY);
ftp_delete($ftp, $mostRecent['file']);
ftp_close($ftp);
?>

After some testing

<?php

// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

if ($login_result === TRUE) {
  echo 'woot!';
} else {
  echo 'doh!';
}

Returns a woot

but

// set up basic ssl connection
$ftp = ftp_ssl_connect('myremotesite.com');

// login with username and password
$login_result = ftp_login($ftp, 'username', 'password');

// get list of files on given path
$files = ftp_nlist($ftp, '/1668161919_DATA/*add.zip');

if ($files === TRUE) {
  echo 'files found!';
} else {
  echo 'doh! files not found';
}

?>

Cause a 504 error with no further information.

What am I doing wrong?

When I copy the URL to clipboard in FileZilla the data is sftp://username@myremotesite.com/1668161919_DATA

Am I even close to getting this right?

When I have tried using similar FTP file downloads in the past, it was with

ftp_connect

This is the first time I have been forced to use

ftp_ssl_connect

Ok, so I set up a testing environment and ran the script using ftp_connect instead of ftp_ssl_connect and the code worked fine.

I think I need to define my port as 22. But

$ftp = ftp_ssl_connect('myremotesite.com','22')

doesn't work. Can anyone assist?