问:
How to add formik handleChange, handleBlur, etc into the component
I am using react-native. How can I move this part of the code below, into the AppForm component file? And everything still work.

```<code> {({
          handleChange,
          handleBlur,
          handleSubmit,
          values,
          errors,
          isValid,
                }) => (
</code>```

AppForm component

```<code> <Formik
    initialValues={initialValues}
    onSubmit={onSubmit}
    validationSchema={validationSchema}
    style={[style, styles.form]}>
    {children}
 </Formik>
</code>```

AppForm component being used

```<code><AppForm
     validationSchema={loginValidationSchema}
     initialValues={{email: '', password: ''}}
     onSubmit={(values: {email: string; password: string}) => {
       login(values.email, values.password);
     }}>
      {({
          handleChange,
          handleBlur,
          handleSubmit,
          values,
          errors,
          isValid,
                }) => (
                  <View>
                    <AppInputField
                      style={{
                        backgroundColor: 'white',
                      }}
                      placeholder="Email Address"
                      onChange={handleChange('email')}
                      onBlur={handleBlur('email')}
           ..........
</code>```

I want to remove the code from this file ^ and move it into the AppForm component. Not sure how that will work...

Body:
I am using react-native. How can I move this part of the code below, into the AppForm component file? And everything still work.

 {({
          handleChange,
          handleBlur,
          handleSubmit,
          values,
          errors,
          isValid,
                }) => (

AppForm component

 <Formik
    initialValues={initialValues}
    onSubmit={onSubmit}
    validationSchema={validationSchema}
    style={[style, styles.form]}>
    {children}
 </Formik>

AppForm component being used

<AppForm
     validationSchema={loginValidationSchema}
     initialValues={{email: '', password: ''}}
     onSubmit={(values: {email: string; password: string}) => {
       login(values.email, values.password);
     }}>
      {({
          handleChange,
          handleBlur,
          handleSubmit,
          values,
          errors,
          isValid,
                }) => (
                  <View>
                    <AppInputField
                      style={{
                        backgroundColor: 'white',
                      }}
                      placeholder="Email Address"
                      onChange={handleChange('email')}
                      onBlur={handleBlur('email')}
           ..........

I want to remove the code from this file ^ and move it into the AppForm component. Not sure how that will work...


来源: stackexchange

问:
Google Assistant App Actions and Conversational Actions
for my university internship i have to interface an app with Google Assistant and thought it was possible, correct me if i'm wrong. I've been struggling quite a bit to understand from zero how to do it but i got working the App Action 'START_EXERCISE' so i moved on and started to consider the requirements of this project:

The conversation with the Assistant has to be in Italian

I need different Actions from the ones listed here BIIs

The target devices are Android

Problem n1: The App Actions listed don't support Italian language

(there's written that they support different locales but it's a joke,
99% only English. Well not a huge problem, i can create custom App   Actions but this lead to problem n2

Problem n2: Custom App Actions    are limited to English only Custom
BIIs
Desperate i continued searching for solutions and found that  Conversational Actions could do the job Conversational Actions

Problem n3: Realizing that Converstational Actions will be shutted   down in June 2023 and it wouldn't make sense to start developing with
that since this project will be added to an existing app of the company that i'm working for the internship

I really need help, what can i do? Are there any workaround or solutions or this simply cannot be done?

ContentLicense: CC BY-SA 4.0


问:
Validation of inputs in database using python in mariadb-connector
I want to know how to validate inputs using MariaDB Connector/Python. It just like a signup page that won't allow to use same username.

PSEUDOCODE GO LIKE THIS

CHECKIF DATA IN DATABASE

IF USER_INPUT == DATA IN DATABASE
PRINT("DATA ALREADY EXIST!")

ELSEIF
INSERT DATA IN DATABASE
PRINT("DATA ADDED")

I hope you get what am I trying to do. Thank you in advance for your response.

I tried doing it in this way

```<code>         conn = mariadb.connect(host="127.0.0.1",
                            user="root",
                            database="blankshot",
                            passwd="")
    #Get Cursor
            cur = conn.cursor()
            query = "INSERT INTO testtable(test) VALUES('"+strloc+"')"
            CheckQuery = "SELECT test FROM testtable where test='"+strloc+"'"
            cur.execute(CheckQuery)
            cur.fetchone()

            if location == '':
                print("Don't leave it blank")
            elif len(strloc) != 0:
                if(cur.next()):
                    print("Data already exist")
                else:
                    cur.execute(query)
            inf = cur.lastrowid
            cur.close()

        except mariadb.Error as e:
            print(f"Error connecting to MariaDb platform:{e}")

        conn.commit()
        print(f"Last Inserted ID: ", str(inf))
        conn.close()
</code>```

Doing this was nothing happened. It still records the same inputs

Body:
I want to know how to validate inputs using MariaDB Connector/Python. It just like a signup page that won't allow to use same username.

PSEUDOCODE GO LIKE THIS

CHECKIF DATA IN DATABASE

IF USER_INPUT == DATA IN DATABASE
PRINT("DATA ALREADY EXIST!")

ELSEIF
INSERT DATA IN DATABASE
PRINT("DATA ADDED")

I hope you get what am I trying to do. Thank you in advance for your response.

I tried doing it in this way

         conn = mariadb.connect(host="127.0.0.1",
                            user="root",
                            database="blankshot",
                            passwd="")
    #Get Cursor
            cur = conn.cursor()
            query = "INSERT INTO testtable(test) VALUES('"+strloc+"')"
            CheckQuery = "SELECT test FROM testtable where test='"+strloc+"'"
            cur.execute(CheckQuery)
            cur.fetchone()

            if location == '':
                print("Don't leave it blank")
            elif len(strloc) != 0:
                if(cur.next()):
                    print("Data already exist")
                else:
                    cur.execute(query)
            inf = cur.lastrowid
            cur.close()

        except mariadb.Error as e:
            print(f"Error connecting to MariaDb platform:{e}")

        conn.commit()
        print(f"Last Inserted ID: ", str(inf))
        conn.close()

Doing this was nothing happened. It still records the same inputs


问:
Pandoc: combining different docx file into one using cmd
I am relatively inexperienced with Pandoc and just ran into a problem. How do convert several markdown files to docx and combine them into one large file using only the Windows Terminal. Also, one markdown file is in a parent folder. This looks like this:
folder A:

```<code> img
 docs
 README.md
</code>```

in the folder docs:

```<code>file1.md
file2.md
file3.md
</code>```

For example, the README, file1 - 3 are to be converted and merged here. In addition, the README file also has links to File1, File2 and File3. How can these references also be converted?

I tried the command

```<code>pandoc --extract-media ./img input_file.md -o output_file.md
</code>```

Body:
I am relatively inexperienced with Pandoc and just ran into a problem. How do convert several markdown files to docx and combine them into one large file using only the Windows Terminal. Also, one markdown file is in a parent folder. This looks like this:
folder A:

 img
 docs
 README.md

in the folder docs:

file1.md
file2.md
file3.md

For example, the README, file1 - 3 are to be converted and merged here. In addition, the README file also has links to File1, File2 and File3. How can these references also be converted?

I tried the command

pandoc --extract-media ./img input_file.md -o output_file.md


问:
MySQL 8.0.31 - Regular Expression Problem
So I've inherited some regular expressions I'm unfamiliar with and have been researching how they work. Sadly, I'm finding the documentation of Regular Expressions for MySQL is either limited, missing detailed information, or flat-out wrong; and standards from other platforms don't seem to be compatible. I'm hoping that somebody can help explain why this is, and also, if there's a site that properly documents everything for MySQL.

First, the below expression works great - it matches keywords from a table, but I'm putting "textdata" in as a placeholder since the problem is with the actual expression.

The Expression I'm having issues understanding is:

```<code>(?!\\B\\w)textdata(?<!\\w\\B)
</code>```

So all the documentation says ? is used to define PROCEEDING character/string matching, and I can't find ! documented anywhere so I don't know what ?! translates to, or what ?<! translates to. On top of that the \B escape doesn't seem documented (and changing it to \b causes it to break, so it's case sensitive), and I'm assuming \w is word, but I'm also unsure of that. I can't seem to find any examples of these values being used anywhere in a properly documented format as they apply to MySQL.

Any help understanding this expression would be appreciated, and could/should it be rewritten in a different more "compatible" way?

Body:
So I've inherited some regular expressions I'm unfamiliar with and have been researching how they work. Sadly, I'm finding the documentation of Regular Expressions for MySQL is either limited, missing detailed information, or flat-out wrong; and standards from other platforms don't seem to be compatible. I'm hoping that somebody can help explain why this is, and also, if there's a site that properly documents everything for MySQL.

First, the below expression works great - it matches keywords from a table, but I'm putting "textdata" in as a placeholder since the problem is with the actual expression.

The Expression I'm having issues understanding is:

(?!\\B\\w)textdata(?<!\\w\\B)

So all the documentation says ? is used to define PROCEEDING character/string matching, and I can't find ! documented anywhere so I don't know what ?! translates to, or what ?<! translates to. On top of that the \B escape doesn't seem documented (and changing it to \b causes it to break, so it's case sensitive), and I'm assuming \w is word, but I'm also unsure of that. I can't seem to find any examples of these values being used anywhere in a properly documented format as they apply to MySQL.

Any help understanding this expression would be appreciated, and could/should it be rewritten in a different more "compatible" way?


问:
Implement PTP (Precision time protocol) on LS1043 or i.MX RT nxp microcontroller
Do someone know how to write a simple code that enable the PTP and use it to synchronize the clock between two microcontrollers ? any idea ?

I have no idea to code for nxp microcontroller


问:
Is there a way have a categorical variable display a continuous of different variable in gtsummary?
In the trial dataset, I would to know how to display marker level values at specific treatment levels when the summary table is by drug and strata= grade. But I am not sure how to "substitute" values. As of now the table displays the observations (n/%).

```<code>Here is the code and resulting table below.

</code>```
```<code>    trial%>%
    select(trt,marker,stage,grade)%>%
    tbl_strata(grade,~.x%>%
    tbl_summary(by=trt,missing="no",
    label=(stage~"Marker Level (ng/mL)"),
    digits = all_continuous() ~ 2)%>%
    modify_header(all_stat_cols() ~ "**{level}**"))

</code>```
```<code>
Characteristic  I   II  III
Drug A1 Drug B1 Drug A1 Drug B1 Drug A1 Drug B1
Marker Level (ng/mL)    0.96 (0.24, 1.70)   1.05 (0.29, 1.49)   0.66 (0.31, 1.23)   0.21 (0.10, 0.94)   0.84 (0.17, 1.91)   0.58 (0.35, 1.36)
Marker Level (ng/mL)
    T1  8 (23%) 9 (27%) 14 (44%)9 (25%) 6 (19%) 7 (21%)
    T2  8 (23%) 10 (30%)8 (25%) 9 (25%) 9 (29%) 10 (30%)
    T3  11 (31%)7 (21%) 5 (16%) 6 (17%) 6 (19%) 8 (24%)
    T4  8 (23%) 7 (21%) 5 (16%) 12 (33%)10 (32%)8 (24%)
1 Median (IQR); n (%)
</code>```

I would like to have the 1st Marker Level row removed and the values under the 2nd marker level replaced with actual values of marker levels at T1, T2, T3, and T4. Basically the able below but with real values. I saw function that might work here, but I cant find the function after loading the package.

```<code>
Characteristic  I   II  III
Drug A1 Drug B1 Drug A1 Drug B1 Drug A1 Drug B1
Marker Level (ng/mL)
    T1  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T2  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T3  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T4  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
1 Median (IQR); n (%)
</code>```

Body:
In the trial dataset, I would to know how to display marker level values at specific treatment levels when the summary table is by drug and strata= grade. But I am not sure how to "substitute" values. As of now the table displays the observations (n/%).

Here is the code and resulting table below.

    trial%>%
    select(trt,marker,stage,grade)%>%
    tbl_strata(grade,~.x%>%
    tbl_summary(by=trt,missing="no",
    label=(stage~"Marker Level (ng/mL)"),
    digits = all_continuous() ~ 2)%>%
    modify_header(all_stat_cols() ~ "**{level}**"))

Characteristic  I   II  III
Drug A1 Drug B1 Drug A1 Drug B1 Drug A1 Drug B1
Marker Level (ng/mL)    0.96 (0.24, 1.70)   1.05 (0.29, 1.49)   0.66 (0.31, 1.23)   0.21 (0.10, 0.94)   0.84 (0.17, 1.91)   0.58 (0.35, 1.36)
Marker Level (ng/mL)
    T1  8 (23%) 9 (27%) 14 (44%)9 (25%) 6 (19%) 7 (21%)
    T2  8 (23%) 10 (30%)8 (25%) 9 (25%) 9 (29%) 10 (30%)
    T3  11 (31%)7 (21%) 5 (16%) 6 (17%) 6 (19%) 8 (24%)
    T4  8 (23%) 7 (21%) 5 (16%) 12 (33%)10 (32%)8 (24%)
1 Median (IQR); n (%)

I would like to have the 1st Marker Level row removed and the values under the 2nd marker level replaced with actual values of marker levels at T1, T2, T3, and T4. Basically the able below but with real values. I saw function that might work here, but I cant find the function after loading the package.

Characteristic  I   II  III
Drug A1 Drug B1 Drug A1 Drug B1 Drug A1 Drug B1
Marker Level (ng/mL)
    T1  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T2  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T3  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
    T4  1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4) 1 (2,4)
1 Median (IQR); n (%)


问:
SSMS 18.12.1 crashing intermittently
A number of us at my job have had issues with SSMS restarting periodically throughout the day.  This has happened across a number of SSMS versions and over VPN connections as well as on PCs on the local network.  This morning is particularly bad - it's happening about about 20 minute intervals - 0947, 0924, 0851.  Some days are worse than others.

What typically happens is that SSMS will be sitting there idle and - just restart.  This isn't in response to a long query being executed or any obvious user activity.  No error message gets displayed and SSMS typically restarts.

I have a suspicion that this is due to Crowdstrike being run in our environment but have had a challenge pinning this down with complete certainty.

It's worth mentioning that I've reinstalled various versions, multiple times and have done things like delete all references to SSMS in the registry in an attempt to get a clean build.  The fact that this has happened across multiple machines and multiple accounts makes me think this isn't down to just a dodgy install.

It's also worth mentioning that my machine is HP Laptop (AMD Ryzen 5 Pro 5650) with 15.3GB of RAM, only 11GB of which area currently in use.

Has anybody else come across this?

`

The Windows Error Reporting log entry is as follows:Fault bucket 1344123028005871426, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: Ssms.exe
P2: 2019.150.18424.0
P3: 62b10e6f
P4: PresentationCore
P5: 4.8.4579.0
P6: 631946f9
P7: 4834
P8: 0
P9: System.OutOfMemoryException
P10:

Attached files:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6C88.tmp.mdmp
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7265.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7285.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7283.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER72E2.tmp.txt

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Ssms.exe_43575f69ad1e116788ab6f8aefadf1dd8e3c827e_ec2160f4_4616dc68-1cbc-47cd-aa89-c03e560e8927

Analysis symbol:
Rechecking for solution: 0
Report Id: e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Report Status: 268435456
Hashed bucket: 6dbc69c42400d68b52a748c5c2b65f42
Cab Guid: 0

We get an Application Error in the Event Viewer as follows

Faulting application name: Ssms.exe, version: 2019.150.18424.0, time stamp: 0x62b10e6f
Faulting module name: KERNELBASE.dll, version: 10.0.19041.2251, time stamp: 0x0d929ca0
Exception code: 0xe0434352
Fault offset: 0x0012e062
Faulting process id: 0xe918
Faulting application start time: 0x01d90fdbb55ea3f9
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Faulting package full name:
Faulting package-relative application ID:

.NET Runtime Error from Event Viewer

```<code>Application: Ssms.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
at MS.Internal.PointUtil.FromPoint(System.Windows.Point)
at MS.Internal.PointUtil.ScreenToClient(System.Windows.Point, System.Windows.PresentationSource)
at System.Windows.Input.MouseDevice.GetPosition(System.Windows.IInputElement)
at System.Windows.Controls.PopupControlService.OnPostProcessInput(System.Object, System.Windows.Input.ProcessInputEventArgs)
at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(System.Windows.Input.ProcessInputEventHandler, System.Windows.Input.ProcessInputEventArgs)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

**The referenced .WER file's contents:**

Version=1
EventType=CLR20r3
EventTime=133155113372246876
ReportType=2
Consent=1
UploadTime=133155113388966378
ReportStatus=268435456
ReportIdentifier=4616dc68-1cbc-47cd-aa89-c03e560e8927
IntegratorReportIdentifier=e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Wow64Host=34404
Wow64Guest=332
NsAppName=Ssms.exe
OriginalFilename=SSMS.EXE
AppSessionGuid=0000e918-0001-002a-f9a3-5eb5db0fd901
TargetAppId=W:0006eb54dba05bdf3918169dc524753b6d1a00000904!0000b8c28928d48e0ba90f7f75a3bcfe48b86650103f!Ssms.exe
TargetAppVer=2022//06//21:00:18:55!b3643!Ssms.exe
BootId=4294967295
ServiceSplit=49545216
TargetAsId=14655
IsFatal=1
EtwNonCollectReason=4
Response.BucketId=6dbc69c42400d68b52a748c5c2b65f42
Response.BucketTable=5
Response.LegacyBucketId=1344123028005871426
Response.type=4
Sig[0].Name=Problem Signature 01
Sig[0].Value=Ssms.exe
Sig[1].Name=Problem Signature 02
Sig[1].Value=2019.150.18424.0
Sig[2].Name=Problem Signature 03
Sig[2].Value=62b10e6f
Sig[3].Name=Problem Signature 04
Sig[3].Value=PresentationCore
Sig[4].Name=Problem Signature 05
Sig[4].Value=4.8.4579.0
Sig[5].Name=Problem Signature 06
Sig[5].Value=631946f9
Sig[6].Name=Problem Signature 07
Sig[6].Value=4834
Sig[7].Name=Problem Signature 08
Sig[7].Value=0
Sig[8].Name=Problem Signature 09
Sig[8].Value=System.OutOfMemoryException
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.19044.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2beb
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2beba6fb4680d73a8c78ca7c24ccdb46
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=fdae
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=fdae5d07ca7a3e113815289fb726fabc
UI[2]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
LoadedModule[0]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\System32\USER32.dll
LoadedModule[5]=C:\WINDOWS\System32\win32u.dll
LoadedModule[6]=C:\WINDOWS\SYSTEM32\MSVCP120.dll
LoadedModule[7]=C:\WINDOWS\SYSTEM32\MSVCR120.dll
LoadedModule[8]=C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c1886757984\COMCTL32.dll
LoadedModule[9]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[10]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[11]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[12]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[13]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[14]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[15]=C:\WINDOWS\System32\sechost.dll
LoadedModule[16]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[17]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[18]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ShellExtensions\Platform\appenvstub.dll
LoadedModule[19]=C:\WINDOWS\System32\CRYPT32.dll
LoadedModule[20]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[21]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\VCRUNTIME140.dll
LoadedModule[22]=C:\WINDOWS\System32\ole32.dll
LoadedModule[23]=C:\WINDOWS\System32\combase.dll
LoadedModule[24]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[25]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[26]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\MSVCP140.dll
LoadedModule[27]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[28]=C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2251_none_d9513b1fe1046fc7\gdiplus.dll
LoadedModule[29]=C:\WINDOWS\SYSTEM32\mscoree.dll
LoadedModule[30]=C:\WINDOWS\System32\ScriptControl32_16207.dll
LoadedModule[31]=C:\WINDOWS\System32\bcrypt.dll
LoadedModule[32]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[33]=C:\WINDOWS\System32\SHCORE.DLL
LoadedModule[34]=C:\WINDOWS\SYSTEM32\windows.storage.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\Wldp.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\kernel.appcore.dll
LoadedModule[37]=C:\WINDOWS\system32\uxtheme.dll
LoadedModule[38]=C:\WINDOWS\System32\clbcatq.dll
LoadedModule[39]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[40]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\msenv.dll
LoadedModule[41]=C:\WINDOWS\SYSTEM32\UIAutomationCore.DLL
LoadedModule[42]=C:\WINDOWS\SYSTEM32\DWrite.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\d3d9.dll
LoadedModule[44]=C:\WINDOWS\SYSTEM32\USP10.dll

</code>```

We're not really "doing" anything - SSMS is simply sitting idle.

Title: SSMS 18.12.1 crashing intermittently

Body:
A number of us at my job have had issues with SSMS restarting periodically throughout the day.  This has happened across a number of SSMS versions and over VPN connections as well as on PCs on the local network.  This morning is particularly bad - it's happening about about 20 minute intervals - 0947, 0924, 0851.  Some days are worse than others.

What typically happens is that SSMS will be sitting there idle and - just restart.  This isn't in response to a long query being executed or any obvious user activity.  No error message gets displayed and SSMS typically restarts.

I have a suspicion that this is due to Crowdstrike being run in our environment but have had a challenge pinning this down with complete certainty.

It's worth mentioning that I've reinstalled various versions, multiple times and have done things like delete all references to SSMS in the registry in an attempt to get a clean build.  The fact that this has happened across multiple machines and multiple accounts makes me think this isn't down to just a dodgy install.

It's also worth mentioning that my machine is HP Laptop (AMD Ryzen 5 Pro 5650) with 15.3GB of RAM, only 11GB of which area currently in use.

Has anybody else come across this?

`

The Windows Error Reporting log entry is as follows:Fault bucket 1344123028005871426, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: Ssms.exe
P2: 2019.150.18424.0
P3: 62b10e6f
P4: PresentationCore
P5: 4.8.4579.0
P6: 631946f9
P7: 4834
P8: 0
P9: System.OutOfMemoryException
P10:

Attached files:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6C88.tmp.mdmp
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7265.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7285.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7283.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER72E2.tmp.txt

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Ssms.exe_43575f69ad1e116788ab6f8aefadf1dd8e3c827e_ec2160f4_4616dc68-1cbc-47cd-aa89-c03e560e8927

Analysis symbol:
Rechecking for solution: 0
Report Id: e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Report Status: 268435456
Hashed bucket: 6dbc69c42400d68b52a748c5c2b65f42
Cab Guid: 0

We get an Application Error in the Event Viewer as follows

Faulting application name: Ssms.exe, version: 2019.150.18424.0, time stamp: 0x62b10e6f
Faulting module name: KERNELBASE.dll, version: 10.0.19041.2251, time stamp: 0x0d929ca0
Exception code: 0xe0434352
Fault offset: 0x0012e062
Faulting process id: 0xe918
Faulting application start time: 0x01d90fdbb55ea3f9
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Faulting package full name:
Faulting package-relative application ID:

.NET Runtime Error from Event Viewer

Application: Ssms.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
at MS.Internal.PointUtil.FromPoint(System.Windows.Point)
at MS.Internal.PointUtil.ScreenToClient(System.Windows.Point, System.Windows.PresentationSource)
at System.Windows.Input.MouseDevice.GetPosition(System.Windows.IInputElement)
at System.Windows.Controls.PopupControlService.OnPostProcessInput(System.Object, System.Windows.Input.ProcessInputEventArgs)
at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(System.Windows.Input.ProcessInputEventHandler, System.Windows.Input.ProcessInputEventArgs)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

**The referenced .WER file's contents:**

Version=1
EventType=CLR20r3
EventTime=133155113372246876
ReportType=2
Consent=1
UploadTime=133155113388966378
ReportStatus=268435456
ReportIdentifier=4616dc68-1cbc-47cd-aa89-c03e560e8927
IntegratorReportIdentifier=e2d6335c-1bf1-4113-bbb2-fcc29a8aafee
Wow64Host=34404
Wow64Guest=332
NsAppName=Ssms.exe
OriginalFilename=SSMS.EXE
AppSessionGuid=0000e918-0001-002a-f9a3-5eb5db0fd901
TargetAppId=W:0006eb54dba05bdf3918169dc524753b6d1a00000904!0000b8c28928d48e0ba90f7f75a3bcfe48b86650103f!Ssms.exe
TargetAppVer=2022//06//21:00:18:55!b3643!Ssms.exe
BootId=4294967295
ServiceSplit=49545216
TargetAsId=14655
IsFatal=1
EtwNonCollectReason=4
Response.BucketId=6dbc69c42400d68b52a748c5c2b65f42
Response.BucketTable=5
Response.LegacyBucketId=1344123028005871426
Response.type=4
Sig[0].Name=Problem Signature 01
Sig[0].Value=Ssms.exe
Sig[1].Name=Problem Signature 02
Sig[1].Value=2019.150.18424.0
Sig[2].Name=Problem Signature 03
Sig[2].Value=62b10e6f
Sig[3].Name=Problem Signature 04
Sig[3].Value=PresentationCore
Sig[4].Name=Problem Signature 05
Sig[4].Value=4.8.4579.0
Sig[5].Name=Problem Signature 06
Sig[5].Value=631946f9
Sig[6].Name=Problem Signature 07
Sig[6].Value=4834
Sig[7].Name=Problem Signature 08
Sig[7].Value=0
Sig[8].Name=Problem Signature 09
Sig[8].Value=System.OutOfMemoryException
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.19044.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2beb
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2beba6fb4680d73a8c78ca7c24ccdb46
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=fdae
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=fdae5d07ca7a3e113815289fb726fabc
UI[2]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
LoadedModule[0]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\System32\USER32.dll
LoadedModule[5]=C:\WINDOWS\System32\win32u.dll
LoadedModule[6]=C:\WINDOWS\SYSTEM32\MSVCP120.dll
LoadedModule[7]=C:\WINDOWS\SYSTEM32\MSVCR120.dll
LoadedModule[8]=C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c1886757984\COMCTL32.dll
LoadedModule[9]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[10]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[11]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[12]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[13]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[14]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[15]=C:\WINDOWS\System32\sechost.dll
LoadedModule[16]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[17]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[18]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ShellExtensions\Platform\appenvstub.dll
LoadedModule[19]=C:\WINDOWS\System32\CRYPT32.dll
LoadedModule[20]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[21]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\VCRUNTIME140.dll
LoadedModule[22]=C:\WINDOWS\System32\ole32.dll
LoadedModule[23]=C:\WINDOWS\System32\combase.dll
LoadedModule[24]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[25]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[26]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\MSVCP140.dll
LoadedModule[27]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[28]=C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2251_none_d9513b1fe1046fc7\gdiplus.dll
LoadedModule[29]=C:\WINDOWS\SYSTEM32\mscoree.dll
LoadedModule[30]=C:\WINDOWS\System32\ScriptControl32_16207.dll
LoadedModule[31]=C:\WINDOWS\System32\bcrypt.dll
LoadedModule[32]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[33]=C:\WINDOWS\System32\SHCORE.DLL
LoadedModule[34]=C:\WINDOWS\SYSTEM32\windows.storage.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\Wldp.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\kernel.appcore.dll
LoadedModule[37]=C:\WINDOWS\system32\uxtheme.dll
LoadedModule[38]=C:\WINDOWS\System32\clbcatq.dll
LoadedModule[39]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[40]=C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\msenv.dll
LoadedModule[41]=C:\WINDOWS\SYSTEM32\UIAutomationCore.DLL
LoadedModule[42]=C:\WINDOWS\SYSTEM32\DWrite.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\d3d9.dll
LoadedModule[44]=C:\WINDOWS\SYSTEM32\USP10.dll

We're not really "doing" anything - SSMS is simply sitting idle.


问:
ACTION_ACCESSIBILITY_SETTINGS redirection in android
I have an activity which holds 3 fragments and in the last fragment i show the accesibility dialog to turn on the service for my app , the issue is when i move back from the settings dialog , it does not redirect me to the last fragment from where i started the dialog , instead it restarts the activity .. i would like to find a solution on how to redirect from settings dialog to the last fragment in my activity , Thank you

Settings Code

```<code> val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
               intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
               startActivity(intent)
</code>```

Body:
I have an activity which holds 3 fragments and in the last fragment i show the accesibility dialog to turn on the service for my app , the issue is when i move back from the settings dialog , it does not redirect me to the last fragment from where i started the dialog , instead it restarts the activity .. i would like to find a solution on how to redirect from settings dialog to the last fragment in my activity , Thank you

Settings Code

 val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
               intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
               startActivity(intent)


问:
Cloud Foundry App is showing 5GB of memory usage but heap dump shows just few MBs
I have a Spring based JAVA Web App deployed in Cloud Foundry (running on Tomcat8 and compiled on JAVA8).

After couple of calls (payload size is 15MB per request) to application the memory rises to 5GB.

I took the heap dump using cf plugin cf java heap-dump, surprisingly the leak analysis on heap dump showed just few MBs per thread (there was one thread per request).

I did ssh login to the app and ran top command which again showed java process consuming 5GB!

To restrict the memory of app, I added following JAVA_OPTS environment variable (just to check if that restricts the app memory):

-Xmx=512M -XX:MarkStackSizeMax=512M -XX:G1HeapRegionSize=512M -XX:ReservedCodeCacheSize=240M -XX:CICompilerCount=5 -Xss=512M -Xmx=512M -XX:MaxDirectMemorySize=30M -XX:MaxMetaspaceSize=512M

Even after this, there was no change and couple of calls lead to same 5GB usage of memory.

Further, I ran pmap command and I got following response:

I am not understanding what is first 2 rows with maximum memory usage.

What can be the possible cause for such high memory usage, if the heap dump doesn't show it?


问:
How to make code assist work in eclipse using jakarta faces + facelets
I'm trying to use eclipse's code assist to access my ManagedBean, on pages with Facelets, but when I press Ctrl+Space, it doesn't work. Nothing appears.

How can I enable this feature in Eclipse? Is this a known issue?

I tried installing JBoss Tools 4.26 and it didn't work.

Is there any configuration for this to work in the latest version of eclipse?

information:

I'm using a fresh installation of eclipse 2022-12.

openjdk 17,

Tomcat 10.1

Jakarta 10,

Jakarta Servlet 6,

Jakarta CDI 4,

Jakarta Faces 4


问:
White page in flutter when hosting
I want to display an alert dialog that is called as follows:

And the CustomDialogoTarjeta code is:

`

```<code>Widget buildCard2(BuildContext context) {
    String color = "Rosa";
    return Positioned(
      top: 50,
      left: Consts.padding,
      right: Consts.padding * 2,
      bottom: 0,
      child: Container(
        decoration: BoxDecoration(
          color: secondBgColor,
          shape: BoxShape.rectangle,
          borderRadius: BorderRadius.circular(Consts.padding),
          boxShadow: [
            BoxShadow(
              color: Color.fromARGB(66, 0, 0, 0),
              blurRadius: 10.0,
              offset: const Offset(0.0, 10.0),
            ),
          ],
        ),
        padding: const EdgeInsets.only(
          top: Consts.avatarRadius + Consts.padding,
          bottom: 0, //Consts.avatarRadius + Consts.padding,
          left: Consts.avatarRadius + Consts.padding,
          right: Consts.avatarRadius + Consts.padding,
        ),
        margin: const EdgeInsets.only(top: Consts.avatarRadius, bottom: 0),
        child: Column(
          mainAxisSize: MainAxisSize.min, // To make the card compact
          children: <Widget>[
            const Text(
              "Añade una tarea",
              style: TextStyle(
                fontSize: 24.0,
                fontWeight: FontWeight.w700,
              ),
            ),
            const SizedBox(height: 16.0),
            TextFormField(
              controller: nombreController,
              decoration: const InputDecoration(
                hintText: 'Introduzca el nombre de la tarea',
              ),
            ),
            TextFormField(
              controller: fechaController,
              decoration: const InputDecoration(
                hintText: 'Introduzca la fecha de finalización de la tarea',
              ),
            ),
            RadioButtonWidget(
              // dont use const
              onRadioButtonChanged: (value) {
                color = value!;
              },
            ),
            const SizedBox(height: 16.0),
            Align(
              alignment: Alignment.bottomLeft,
              child: TextButton(
                onPressed: () {
                  Navigator.of(context).pop();
                },
                child: const Text('Cancelar'),
              ),
            ),
            Align(
              alignment: Alignment.bottomRight,
              child: TextButton(
                onPressed: () async {
                  //here I do the search in firebase database
                  MenuController m = MenuController();
                  Navigator.of(context).push(
                      // Pass ViewModel down to EditScreen

                      MaterialPageRoute(builder: (context) {
                    return MaterialApp(
                        debugShowCheckedModeBanner: false,
                        title: 'iOrganize',
                        theme: ThemeData.dark().copyWith(
                          scaffoldBackgroundColor: secondBgColor,
                          textTheme: GoogleFonts.poppinsTextTheme(
                                  Theme.of(context).textTheme)
                              .apply(bodyColor: Colors.white),
                          canvasColor: fisrtBgColor,
                        ),
                        home: ChangeNotifierProvider.value(
                          value: m,
                          child: PrincipalView(usuario: usuario),
                        ));
                  }));
                },
                child: const Text('Añadir'),
              ),
            ),
          ],
        ),
      ),
    );

  }
</code>```

`

This works perfectly when I do flutter run, but when I do the host with firebase I get the white screen caused by the following error:

I try the scafoll, then I tried to see which part of the code gives the error, but it is impossible.
The js that gives the error cannot be modified by hand, because when I run the commands for the firebase hosting it overrides it

Title: White page in flutter when hosting

Body:
I want to display an alert dialog that is called as follows:

And the CustomDialogoTarjeta code is:

`

Widget buildCard2(BuildContext context) {
    String color = "Rosa";
    return Positioned(
      top: 50,
      left: Consts.padding,
      right: Consts.padding * 2,
      bottom: 0,
      child: Container(
        decoration: BoxDecoration(
          color: secondBgColor,
          shape: BoxShape.rectangle,
          borderRadius: BorderRadius.circular(Consts.padding),
          boxShadow: [
            BoxShadow(
              color: Color.fromARGB(66, 0, 0, 0),
              blurRadius: 10.0,
              offset: const Offset(0.0, 10.0),
            ),
          ],
        ),
        padding: const EdgeInsets.only(
          top: Consts.avatarRadius + Consts.padding,
          bottom: 0, //Consts.avatarRadius + Consts.padding,
          left: Consts.avatarRadius + Consts.padding,
          right: Consts.avatarRadius + Consts.padding,
        ),
        margin: const EdgeInsets.only(top: Consts.avatarRadius, bottom: 0),
        child: Column(
          mainAxisSize: MainAxisSize.min, // To make the card compact
          children: <Widget>[
            const Text(
              "Añade una tarea",
              style: TextStyle(
                fontSize: 24.0,
                fontWeight: FontWeight.w700,
              ),
            ),
            const SizedBox(height: 16.0),
            TextFormField(
              controller: nombreController,
              decoration: const InputDecoration(
                hintText: 'Introduzca el nombre de la tarea',
              ),
            ),
            TextFormField(
              controller: fechaController,
              decoration: const InputDecoration(
                hintText: 'Introduzca la fecha de finalización de la tarea',
              ),
            ),
            RadioButtonWidget(
              // dont use const
              onRadioButtonChanged: (value) {
                color = value!;
              },
            ),
            const SizedBox(height: 16.0),
            Align(
              alignment: Alignment.bottomLeft,
              child: TextButton(
                onPressed: () {
                  Navigator.of(context).pop();
                },
                child: const Text('Cancelar'),
              ),
            ),
            Align(
              alignment: Alignment.bottomRight,
              child: TextButton(
                onPressed: () async {
                  //here I do the search in firebase database
                  MenuController m = MenuController();
                  Navigator.of(context).push(
                      // Pass ViewModel down to EditScreen

                      MaterialPageRoute(builder: (context) {
                    return MaterialApp(
                        debugShowCheckedModeBanner: false,
                        title: 'iOrganize',
                        theme: ThemeData.dark().copyWith(
                          scaffoldBackgroundColor: secondBgColor,
                          textTheme: GoogleFonts.poppinsTextTheme(
                                  Theme.of(context).textTheme)
                              .apply(bodyColor: Colors.white),
                          canvasColor: fisrtBgColor,
                        ),
                        home: ChangeNotifierProvider.value(
                          value: m,
                          child: PrincipalView(usuario: usuario),
                        ));
                  }));
                },
                child: const Text('Añadir'),
              ),
            ),
          ],
        ),
      ),
    );

  }

`

This works perfectly when I do flutter run, but when I do the host with firebase I get the white screen caused by the following error:

I try the scafoll, then I tried to see which part of the code gives the error, but it is impossible.
The js that gives the error cannot be modified by hand, because when I run the commands for the firebase hosting it overrides it


问:
How to get media from Instagram URL with instaloader?
Cannot find on instaloader documentation

Something code examples


问:
Reading credit / debit card using NFC on Android
We have been using the following to parse credit card / debit card info.

```<code>implementation 'com.github.devnied.emvnfccard:library:3.0.1'
</code>```

After getting the mTag using the code below:

```<code>final Tag mTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
</code>```

We were able to parse the information and retreive credit card information. We recently had to update compileSdkVersion from 30 to 33 and ever since the update the value we get for mTag ends up being null. This leads to a failure in any further processing that we want to do on mTag.

Any help in this would be greatly appreciated in case anyone else ran into a similar issue.

I have tried playing around with the AndroidManifes file to include TECH_DISCOVERED in the intent-filter. Also tried palying around with the gradle version but on compileSdkVersion 33 it always returns null.

Body:
We have been using the following to parse credit card / debit card info.

implementation 'com.github.devnied.emvnfccard:library:3.0.1'

After getting the mTag using the code below:

final Tag mTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);

We were able to parse the information and retreive credit card information. We recently had to update compileSdkVersion from 30 to 33 and ever since the update the value we get for mTag ends up being null. This leads to a failure in any further processing that we want to do on mTag.

Any help in this would be greatly appreciated in case anyone else ran into a similar issue.

I have tried playing around with the AndroidManifes file to include TECH_DISCOVERED in the intent-filter. Also tried palying around with the gradle version but on compileSdkVersion 33 it always returns null.


问:
How to shade part(s) of the timePlot in Openair package
I am new to r and openair package. I am trying to use timePlot for time series figure. I need to shade part(s) of the plot for specific events at these periods. Openair method based on latticeExtra package but doesn't work at all.
Always the results is "Error: Attempted to create layer with no stat."
Please help for working formula to be used with timePlot in openair package.</p>
```<code>A<- timePlot(selectByDate(test,start = "2022-4-25", end = "2022-05-31"),
             pollutant = "absR1", avg.time = "hour", ylab="abs", xlab="Date", log=F)

A<- A +
  layer(lpolygon (x = c(ymd_hm("2022-5-17 00:00"), ymd_hm("2022-5-17 00:00"),
                             ymd_hm("2022-5-18 00:00"), ymd_hm("2022-5-18 00:00")),
                       y = c(0, 100000, 100000, 0), col = "grey", border = NA))

</code>```

Body:
I am new to r and openair package. I am trying to use timePlot for time series figure. I need to shade part(s) of the plot for specific events at these periods. Openair method based on latticeExtra package but doesn't work at all.
Always the results is "Error: Attempted to create layer with no stat."
Please help for working formula to be used with timePlot in openair package.

A<- timePlot(selectByDate(test,start = "2022-4-25", end = "2022-05-31"),
             pollutant = "absR1", avg.time = "hour", ylab="abs", xlab="Date", log=F)

A<- A +
  layer(lpolygon (x = c(ymd_hm("2022-5-17 00:00"), ymd_hm("2022-5-17 00:00"),
                             ymd_hm("2022-5-18 00:00"), ymd_hm("2022-5-18 00:00")),
                       y = c(0, 100000, 100000, 0), col = "grey", border = NA))


问:
Client that communicates with multiple servers concurrently
I am trying to learn multithreading programming with Python and specifically I am trying to build a programm that 1 Client sends data to multiple servers and get some messages back. In the first version of my programm I want my client to communicate back and forth with each server that I have spawned with each thread, till I type 'bye'. Now I have 2 issues with my implementation that I don't understand how to deal with. The first one is that I don't want the connection with the server to close after I type 'bye'  (I want to add extra functionality after that) and the second one is that the servers doesn't get the messages that I type at the same type but I can communicate with the second server only if the first thread terminates (which as I said, I don't want to terminate). Any suggestions would be appreciated. Cheers!

Client.py

```<code>import sys
import threading
from _thread import *
import socket

host_1 = '127.0.0.1'
port_1 = 6000
host_2 = '127.0.0.2'
port_2 = 7000

def connect_to_server(host, port):
    client_socket = socket.socket()  # instantiate
    client_socket.connect((host, port))  # connect to the server

    message = input(" -> ")  # take input

    while message.lower().strip() != 'bye':
        client_socket.send(message.encode())  # send message
        data = client_socket.recv(1024).decode()  # receive response

        print('Received from server: ' + data)  # show in terminal

        message = input(" -> ")  # again take input

threads_dict = {}
th_1 = threading.Thread(target=connect_to_server, args=(host_1, port_1))
th_2 = threading.Thread(target=connect_to_server, args=(host_2, port_2))

th_1.start()
th_2.start()
th_1.join()
th_2.join()
</code>```

Server.py

```<code>import socket
import sys

def server_program():
    host = sys.argv[1] # '127.0.0.1', '127.0.0.2'
    port = int(sys.argv[2])  # 6000, 7000

    server_socket = socket.socket()  # get instance
    server_socket.bind((host, port))  # bind host address and port together
    # configure how many client the server can listen simultaneously
    server_socket.listen(2)
    conn, address = server_socket.accept()  # accept new connection
    print("Connection from: " + str(address))
    while True:
        # receive data stream. it won't accept data packet greater than 1024 bytes
        data = conn.recv(1024).decode()
        if not data:
            # if data is not received break
            break
        print("from connected user: " + str(data))
        data = input(' -> ')
        conn.send(data.encode())  # send data to the client

if __name__ == '__main__':
    server_program()
</code>```

Body:
I am trying to learn multithreading programming with Python and specifically I am trying to build a programm that 1 Client sends data to multiple servers and get some messages back. In the first version of my programm I want my client to communicate back and forth with each server that I have spawned with each thread, till I type 'bye'. Now I have 2 issues with my implementation that I don't understand how to deal with. The first one is that I don't want the connection with the server to close after I type 'bye'  (I want to add extra functionality after that) and the second one is that the servers doesn't get the messages that I type at the same type but I can communicate with the second server only if the first thread terminates (which as I said, I don't want to terminate). Any suggestions would be appreciated. Cheers!

Client.py

import sys
import threading
from _thread import *
import socket

host_1 = '127.0.0.1'
port_1 = 6000
host_2 = '127.0.0.2'
port_2 = 7000

def connect_to_server(host, port):
    client_socket = socket.socket()  # instantiate
    client_socket.connect((host, port))  # connect to the server

    message = input(" -> ")  # take input

    while message.lower().strip() != 'bye':
        client_socket.send(message.encode())  # send message
        data = client_socket.recv(1024).decode()  # receive response

        print('Received from server: ' + data)  # show in terminal

        message = input(" -> ")  # again take input

threads_dict = {}
th_1 = threading.Thread(target=connect_to_server, args=(host_1, port_1))
th_2 = threading.Thread(target=connect_to_server, args=(host_2, port_2))

th_1.start()
th_2.start()
th_1.join()
th_2.join()

Server.py

import socket
import sys

def server_program():
    host = sys.argv[1] # '127.0.0.1', '127.0.0.2'
    port = int(sys.argv[2])  # 6000, 7000

    server_socket = socket.socket()  # get instance
    server_socket.bind((host, port))  # bind host address and port together
    # configure how many client the server can listen simultaneously
    server_socket.listen(2)
    conn, address = server_socket.accept()  # accept new connection
    print("Connection from: " + str(address))
    while True:
        # receive data stream. it won't accept data packet greater than 1024 bytes
        data = conn.recv(1024).decode()
        if not data:
            # if data is not received break
            break
        print("from connected user: " + str(data))
        data = input(' -> ')
        conn.send(data.encode())  # send data to the client

if __name__ == '__main__':
    server_program()


问:
Add custom .gitignore file to list of templates
My organization hosts its own GitHub Enterprise instance. Is it possible to add a new .gitignore file to the list of templates when creating a new repository?


问:
HTML draggable form
I would like to be able to drag a div which basically corresponds to a form. It works well, except that if I move the mouse too fast, the div does not follow the cursor.

I only initiate the div drag when I click the header.

```<code><body>

    <div id="edit-dialog-overlay" class="modal-overlay">

        <div id="edit-dialog" class="modal-content container-vertical">

            <div id="edit-dialog-header" class="modal-header container-horizontal column-gap-narrow item">
                <span id="minimize" class="icon pushed-right item"></span>
                <span id="maximize" class="icon item"></span>
                <span id="restore"  class="icon item"></span>
                <span id="close"    class="icon item"></span>
            </div>

            <div class="modal-body item">
                <Partial name="~/Views/Fields/_Edit.cshtml", model=Model.HtmlField />
            </div>

        </div>

    </div>

</body>
</code>```
```<code>    $('#edit-dialog-header').mouseenter(function() {

        _interaction.mouse.isOverHeader = true;
    });

    $('#edit-dialog-header').mouseleave(function() {

        _interaction.mouse.isOverHeader = famse;
    });

    $('#edit-dialog-header').on('mousedown', function (event) {

        _interaction.mouse.isDown = event.which == 1; // Left mouse click.

        var offset = $('#edit-dialog-header').offset();

        _interaction.mouse.offset.x = offset.left - event.clientX;
        _interaction.mouse.offset.y = offset.top - event.clientY;
    });

    $('body').on('mouseup', function () {

        _interaction.mouse.isDown = false;
    });

    $('#edit-dialog-header').on('mousemove', function (event) {

        event.preventDefault;

        // Makes sure that the mouse is down and over the header.
        if (_interaction.mouse.isDown && _interaction.mouse.isOverHeader) {

            _interaction.mouse.position.x = event.clientX;
            _interaction.mouse.position.y = event.clientY;

            $('#edit-dialog').css({
                left: _interaction.mouse.position.x + _interaction.mouse.offset.x,
                top: _interaction.mouse.position.y + _interaction.mouse.offset.y,
                position: 'absolute'
            });
        }
    });
</code>```

Are there existing libraries I can use to get a more accurate drag?

Title: HTML draggable form

Body:
I would like to be able to drag a div which basically corresponds to a form. It works well, except that if I move the mouse too fast, the div does not follow the cursor.

I only initiate the div drag when I click the header.

                
                
                
                

                <Partial name="~/Views/Fields/_Edit.cshtml", model=Model.HtmlField />

    $('#edit-dialog-header').mouseenter(function() {

        _interaction.mouse.isOverHeader = true;
    });

    $('#edit-dialog-header').mouseleave(function() {

        _interaction.mouse.isOverHeader = famse;
    });

    $('#edit-dialog-header').on('mousedown', function (event) {

        _interaction.mouse.isDown = event.which == 1; // Left mouse click.

        var offset = $('#edit-dialog-header').offset();

        _interaction.mouse.offset.x = offset.left - event.clientX;
        _interaction.mouse.offset.y = offset.top - event.clientY;
    });

    $('body').on('mouseup', function () {

        _interaction.mouse.isDown = false;
    });

    $('#edit-dialog-header').on('mousemove', function (event) {

        event.preventDefault;

        // Makes sure that the mouse is down and over the header.
        if (_interaction.mouse.isDown && _interaction.mouse.isOverHeader) {

            _interaction.mouse.position.x = event.clientX;
            _interaction.mouse.position.y = event.clientY;

            $('#edit-dialog').css({
                left: _interaction.mouse.position.x + _interaction.mouse.offset.x,
                top: _interaction.mouse.position.y + _interaction.mouse.offset.y,
                position: 'absolute'
            });
        }
    });

Are there existing libraries I can use to get a more accurate drag?


问:
Fetch records from dataframe by calculating percentage of one column
There is a Dataframe in python as follow:

Serial Numbers 2. count of work order numbers

Serial Nummbers
Work order numbers

abc
16

cde
15

def
14

efg
14

fgh
12

ghi
10

Now the total sum of all the values of work order number is 91. Now I want to fetch all the records  whose work order number sum is 25%(81*0.25 = 20.25 ~ 20) of total sum. Similarly want to fetch 50% and 75% of sum of work order number column.

I tried using the following command but it isnt giving me the correct output:

dataframe_first50 = pd.DataFrame()
dataframe_first50 = dataframe_calculation1.nlargest(int(91*0.50), 'Work order numbers|', keep='first')
print(dataframe_first50)

I want a python code to resolve the above issue.


问:
Read multiple RDS files in R
I have a directory with multiple RDS files that I would like to read into R.

The files are saved as: "version_Nr_MonthYear.RDS". So for example
"version_5_August2022.RDS" or "version_4_June2021.RDS".

I want to keep the files name and load them into my global environment.
Is there a for loop or anything to load the files so I don't have to load them all individually like this:

version_5_August2022 <- readRDS("~/version_5_August2022.RDS")

Thank you! Any help is welcome.

Title: Read multiple RDS files in R


问:
snowflake_connector_python-2.7.4-cp36-cp36m-manylinux2010_x86_64.whl is not a supported wheel on this platform
When I am running AWS GLUE with Python 3.9 and using snowflake Connector .whl file name: snowflake_connector_python-2.7.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl , it throws error filename.whl is not a supported wheel on this platform.

Please suggest as I tried multiple snowflake connectors files compatible with Python version 3.9


问:
My Sumif and Xlookup work but sometimes it crashes and says "Argument must be in range"
I am summarising data using the following formula

```<code>=SUMIFS(XLOOKUP($B57,Actuals!$C:$C,Actuals!D:DC),XLOOKUP("Date",Actuals!$C:$C,Actuals!C:DB),">="&Configuration!$B$10,XLOOKUP("Date",Actuals!$C:$C,Actuals!C:DB),"<"&Configuration!$C$10)
</code>```

The first Xlookup defines the row, based on a specific value, whilst the second and third Xlookup find the columns if the date of the column is between two dates (as defined in the configuration tab).

I also want to return the value in the column in front of the column where the date matches the xlookup.

The formula works perfectly and brings through the correct numbers. However sometimes when I update other areas of the workbook the formulas crash and it returns a "#Error' (Argument must be within range).

Why is this happening and how can I stop google sheets from doing this?

I'm not sure why this is happening as the formula works originally and the ranges are the same length.

To get it working again I have to change to the first ">" to ">=" and then back to ">".

Body:
I am summarising data using the following formula

=SUMIFS(XLOOKUP($B57,Actuals!$C:$C,Actuals!D:DC),XLOOKUP("Date",Actuals!$C:$C,Actuals!C:DB),">="&Configuration!$B$10,XLOOKUP("Date",Actuals!$C:$C,Actuals!C:DB),"<"&Configuration!$C$10)

The first Xlookup defines the row, based on a specific value, whilst the second and third Xlookup find the columns if the date of the column is between two dates (as defined in the configuration tab).

I also want to return the value in the column in front of the column where the date matches the xlookup.

The formula works perfectly and brings through the correct numbers. However sometimes when I update other areas of the workbook the formulas crash and it returns a "#Error' (Argument must be within range).

Why is this happening and how can I stop google sheets from doing this?

I'm not sure why this is happening as the formula works originally and the ranges are the same length.

To get it working again I have to change to the first ">" to ">=" and then back to ">".


问:
RecyclerView item removing animation
Using default item animator on RecyclerView when removing item it will dissapear first, opening a "hole" behind it, and then items below will slide up to cover this hole.
It's not well looking behavior.

Green item disappearing, revealling black hole.

Red item sliding up only after green is removed completely.

I would like to see sliding items below synchronously with removed item disappearing.

But have no Idea how to get this behavior. I suspect the key is in LayoutManager, but can't understand how to deal with it.

Title: RecyclerView item removing animation


问:
Swiper navigation arrows at slide borders
Trying to make the arrows stick to the image/slide border and not at the carousel border! I played a long with almos all the parameters and custom css but nothing worked

Arrows at the middle of the carousel, at slide borders

I worked with positions, flex-shrink and much more css but it wasnt working, also I tried to wrap the carousel


问:
Dropping all tables in sqlite from php laravel before redoing entire migration
For testing purpose, I want to completely erase my sqlite database before replaying migrations.

So I have written this code:

```<code>DB::statement('PRAGMA writable_schema = 1');
DB::statement('delete from sqlite_master');
DB::statement('PRAGMA writable_schema = 0');

Artisan::call('migrate'); // one in two, I have the message : table "migrations" already exists
</code>```

One in two (precisely), I have the message : SQLSTATE[HY000]: General error: 1 table "migrations" already exists

Body:
For testing purpose, I want to completely erase my sqlite database before replaying migrations.

So I have written this code:

DB::statement('PRAGMA writable_schema = 1');
DB::statement('delete from sqlite_master');
DB::statement('PRAGMA writable_schema = 0');

Artisan::call('migrate'); // one in two, I have the message : table "migrations" already exists

One in two (precisely), I have the message : SQLSTATE[HY000]: General error: 1 table "migrations" already exists


问:
Elasticsearch - Create snapshots of index having a specific alias
The application I work on writes to a specific Elasticsearch index that has an "active" alias added to it. This alias gets removed from one index and added to another on a regular basis due to the "index rollover automation".

Would anyone know, how can I create a snapshot of the specific index having the defined alias attached to it using Kibana ?

Tried with Kibana but only managed to backup indices, without specifying the alias I want to focus on.

Edited:

Eventually managed by creating the snapshot via bash script:

# Retrieve the full name of the current active Events index
curl -s -X GET "$ES_MASTER:$PORT/$INDEX_NAME*/_alias/$ALIAS_NAME?pretty" > /tmp/tmpfile.txt
ACTIVE_INDEX=$(cat /tmp/tmpfile.txt | grep events | head -1 | awk -F'"' '{ print $2}')
rm /tmp/tmpfile.txt

# Snapshot creation
curl -s -X PUT "$ES_MASTER:$PORT/_snapshot/$REPO_NAME/$ACTIVE_INDEX-$DATE?wait_for_completion=true" -H 'Content-Type: application/json' -d'`
{
        "indices" : [
          "'$ACTIVE_INDEX'"
        ],
        "include_global_state" : false,
        "partial" : false
}
'
```


问:
How to use staticcall with inline assembly that returns bytes data?
I've been trying to write a function that takes contractAddress and bytes functionSignature as input parameters and returns bytes data from the static call in inline assembly.

For some reason it keeps returning 0x0 instead of the data

im clearly doing something wrong

function getUintAnswer(address _contractAddress, bytes memory data) public view returns (bytes memory result) {
    assembly {

        // Call the target contract
        let success := staticcall(64000, _contractAddress, data, 4/*input bytes*/, result, 160/*output bytes*/)

        // failed
        if iszero(success) {
            revert(0, 0)
            }
    }
}
```
<p>i expected the result to be:</p>
<pre class="lang-js prettyprint-override"><code>0x00000000000000000000000000000000000000000000000200000000000027fa0000000000000000000000000000000000000000000000000000001bf2c11b5e00000000000000000000000000000000000000000000000000000000639ce2e300000000000000000000000000000000000000000000000000000000639ce2e300000000000000000000000000000000000000000000000200000000000027fa
</code>```

and got a revert

im trying to extract the second int256 and cast it to a uint256 in the most gas efficient way
and i been stuck trying to figure out how to get the static call to successfully return a value

Body:
I've been trying to write a function that takes contractAddress and bytes functionSignature as input parameters and returns bytes data from the static call in inline assembly.

For some reason it keeps returning 0x0 instead of the data

im clearly doing something wrong

function getUintAnswer(address _contractAddress, bytes memory data) public view returns (bytes memory result) {
    assembly {

        // Call the target contract
        let success := staticcall(64000, _contractAddress, data, 4/*input bytes*/, result, 160/*output bytes*/)

        // failed
        if iszero(success) {
            revert(0, 0)
            }
    }
}

i expected the result to be:

0x00000000000000000000000000000000000000000000000200000000000027fa0000000000000000000000000000000000000000000000000000001bf2c11b5e00000000000000000000000000000000000000000000000000000000639ce2e300000000000000000000000000000000000000000000000000000000639ce2e300000000000000000000000000000000000000000000000200000000000027fa

and got a revert

im trying to extract the second int256 and cast it to a uint256 in the most gas efficient way
and i been stuck trying to figure out how to get the static call to successfully return a value


问:
How to recover argument sent to mock with Ginkgo
I am working with /onsi/ginkgo/v2 v2.1.4 and /golang/mock v1.6.0 in Golang v1.19.2

And I want to retrieve the argument that was sent to the mock's InsertOneProspecto function.

```<code>ctrl = gomock.NewController(GinkgoT())
mockDB = mock.NewMockPersistence(ctrl)
recInsert:=mockDB.EXPECT()
callInsert:=recInsert.InsertOneProspecto(gomock.Any()).Return("1098101810", nil)
.
.
// Tested procedure called
.
.
// All is OK
// Recover the argument inyected to InsertOneProspecto
// example:
var myArg dom.Prospect
myArg:=callInsert.Call[0].Arguments[0]
```

```

Body:
I am working with /onsi/ginkgo/v2 v2.1.4 and /golang/mock v1.6.0 in Golang v1.19.2

And I want to retrieve the argument that was sent to the mock's InsertOneProspecto function.

ctrl = gomock.NewController(GinkgoT())
mockDB = mock.NewMockPersistence(ctrl)
recInsert:=mockDB.EXPECT()
callInsert:=recInsert.InsertOneProspecto(gomock.Any()).Return("1098101810", nil)
.
.
// Tested procedure called
.
.
// All is OK
// Recover the argument inyected to InsertOneProspecto
// example:
var myArg dom.Prospect
myArg:=callInsert.Call[0].Arguments[0]
```


问:
Cannot load entity data in mySQL, using SpingBoot application and Command Liner
When i use my app first, i create 4 entity in my DB, but application filed.
I have next exception

```<code>java.lang.IllegalStateException: Failed to execute CommandLineRunner
aused by: jakarta.persistence.EntityNotFoundException: User Not Found
    at spring.utility.OperationUtilityClass.lambda$0(OperationUtilityClass.java:46) ~[classes/:na]
    at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na]
    at spring.utility.OperationUtilityClass.updateUsers(OperationUtilityClass.java:46) ~[classes/:na]
    at spring.utility.OperationUtilityClass.usersOperations(OperationUtilityClass.java:22) ~[classes/:na]
    at spring.CourseSystemApplication.run(CourseSystemApplication.java:42) ~[classes/:na]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:7
</code>```

In MySQL table i have 4 users, with different id.

I run app second time and have next exception

```<code>  java.lang.IllegalStateException: Failed to execute CommandLineRunner
Caused by: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [user.UK_ob8kqyqqgmefl0aco34akdtpe]
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:270) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-6.0.2.jar:6.0.2]
    at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-6.0.2.jar:6.0.2]
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:60) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:56) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'user1@gmail.com' for key 'user.UK_ob8kqyqqgmefl0aco34akdtpe'
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061) ~[mysql-connector-j-8.0.31.jar:8.0.31]
</code>```

I think i have some problem with my User,

```<code>@Entity
@Table (name = "User")
public class User {

    @Id
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    @Column (name = "user_id", nullable = false)
    private Long userId;

    @Basic
    @Column (name = "email", nullable = false, length = 4096, unique = true)
    private String userEmail;

    @Basic
    @Column (name = "password", nullable = false, length = 4096)
    private String userPassword;

    @ManyToMany (fetch = FetchType.EAGER)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinTable (name = "user_role",
                                   joinColumns = {@JoinColumn (name = "user_id")},
                                   inverseJoinColumns = {@JoinColumn (name = "role_id")})
    private Set <Role> roles = new HashSet<>();

    @OneToOne (mappedBy = " user")
    private Student student;

   @OneToOne (mappedBy = "user")
   private Instructor instructor;
</code>```

And also my main class

```<code>@EntityScan ("spring.entity")
@SpringBootApplication
public class CourseSystemApplication implements CommandLineRunner {

    @Autowired
    private UserDao userDao;

    @Autowired
    private CourseDao courseDao;

    @Autowired
    private StudentDao studentDao;

    @Autowired
    private RoleDao roleDao;

    @Autowired
    private InstructorDao instructorDao;

    public static void main(String[] args) {
        SpringApplication.run(CourseSystemApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        OperationUtilityClass.usersOperations(userDao);
    }
</code>```

If you know where my problem, please say me, i will be thanks to you.

Body:
When i use my app first, i create 4 entity in my DB, but application filed.
I have next exception

java.lang.IllegalStateException: Failed to execute CommandLineRunner
aused by: jakarta.persistence.EntityNotFoundException: User Not Found
    at spring.utility.OperationUtilityClass.lambda$0(OperationUtilityClass.java:46) ~[classes/:na]
    at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na]
    at spring.utility.OperationUtilityClass.updateUsers(OperationUtilityClass.java:46) ~[classes/:na]
    at spring.utility.OperationUtilityClass.usersOperations(OperationUtilityClass.java:22) ~[classes/:na]
    at spring.CourseSystemApplication.run(CourseSystemApplication.java:42) ~[classes/:na]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:7

In MySQL table i have 4 users, with different id.

I run app second time and have next exception

  java.lang.IllegalStateException: Failed to execute CommandLineRunner
Caused by: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [user.UK_ob8kqyqqgmefl0aco34akdtpe]
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:270) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550) ~[spring-orm-6.0.2.jar:6.0.2]
    at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-6.0.2.jar:6.0.2]
    at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-6.0.2.jar:6.0.2]
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:60) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:56) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) ~[hibernate-core-6.1.5.Final.jar:6.1.5.Final]
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'user1@gmail.com' for key 'user.UK_ob8kqyqqgmefl0aco34akdtpe'
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) ~[mysql-connector-j-8.0.31.jar:8.0.31]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061) ~[mysql-connector-j-8.0.31.jar:8.0.31]

I think i have some problem with my User,

@Entity
@Table (name = "User")
public class User {

    @Id
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    @Column (name = "user_id", nullable = false)
    private Long userId;

    @Basic
    @Column (name = "email", nullable = false, length = 4096, unique = true)
    private String userEmail;

    @Basic
    @Column (name = "password", nullable = false, length = 4096)
    private String userPassword;

    @ManyToMany (fetch = FetchType.EAGER)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinTable (name = "user_role",
                                   joinColumns = {@JoinColumn (name = "user_id")},
                                   inverseJoinColumns = {@JoinColumn (name = "role_id")})
    private Set <Role> roles = new HashSet<>();

    @OneToOne (mappedBy = " user")
    private Student student;

   @OneToOne (mappedBy = "user")
   private Instructor instructor;

And also my main class

@EntityScan ("spring.entity")
@SpringBootApplication
public class CourseSystemApplication implements CommandLineRunner {

    @Autowired
    private UserDao userDao;

    @Autowired
    private CourseDao courseDao;

    @Autowired
    private StudentDao studentDao;

    @Autowired
    private RoleDao roleDao;

    @Autowired
    private InstructorDao instructorDao;

    public static void main(String[] args) {
        SpringApplication.run(CourseSystemApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        OperationUtilityClass.usersOperations(userDao);
    }

If you know where my problem, please say me, i will be thanks to you.


问:
Wrong min value for a geo tif file
I am working on pre-processing a few geo-tif files. I want to obtain the minimum value for my raster image. My OS is Linux and Rasterio version 1.3.3. When I run my script in a conda environment, I realized that the minimum value is given as zero which is incorrect.

I am using the following code:

```<code>with rasterio.open(file) as tif_input_obj:
    tif_data = tif_input_obj.read()
    print(tif_data.min())

</code>```

I tried running the same lines of code by typing python in my conda environment. This time the minimum value was obtained correctly. I have also tried gdal and faced the same problem.

has anyone faced this issue before?

Thank you for your help.

Title: Wrong min value for a geo tif file

Body:
I am working on pre-processing a few geo-tif files. I want to obtain the minimum value for my raster image. My OS is Linux and Rasterio version 1.3.3. When I run my script in a conda environment, I realized that the minimum value is given as zero which is incorrect.

I am using the following code:

with rasterio.open(file) as tif_input_obj:
    tif_data = tif_input_obj.read()
    print(tif_data.min())

I tried running the same lines of code by typing python in my conda environment. This time the minimum value was obtained correctly. I have also tried gdal and faced the same problem.

has anyone faced this issue before?

Thank you for your help.


问:
How to unassign a user from a Whatsapp Business Account using WhatsApp Meta API
I can assign system users to a specific WhatsApp Business Account by sending a POST request to this endpoint

https://graph.facebook.com/LATEST-VERSION/WHATSAPP-BUSINESS-ACCOUNT-ID/assigned_users

Link to documentation

But, apparently, there's no way to unassign them using a DELETE request

At the same time, documentation also says that DELETE calls to that endpoint count against rate limits

So, can I unassign a user from a WABA using any endpoint of any of the Meta APIs? Can't find it in the documentation.

Many thanks in advance


问:
How to get HTTP response byte size from the GraphQL API in Java
I am trying to write the code to print the content length of the response header in GraphQL API. This is the code have tried below but am unable to proceed further. Appreciate your input.</p>
```<code>public class GraphQLRequestBody {
private String query;
private Map<String, Object> variables;

public String getQuery() {
    return query;
}

public void setQuery(String query) {
    this.query = query;
}

public Map<String, Object> getVariables() {
    return variables;
}

public void setVariables(Map<String, Object> variables) {
    this.variables = variables;
}}

    public CompletableFuture<Map<String, Object>> graphQL(
        @RequestBody String query, final HttpEntity<String> request) {
    String contentType = Objects.requireNonNull(request.getHeaders().getContentType()).toString();

    GraphQLRequestBody graphQLRequest = new GraphQLRequestBody();
    graphQLRequest.setQuery(query);
    if (contentType.contains(APPLICATION_JSON_VALUE)) {
        graphQLRequest = GraphQLUtils.parseJsonRequestQuery(query);
    }
    return graphql
            .executeAsync(
                    ExecutionInput.newExecutionInput()
                            .query(graphQLRequest.getQuery())
                            .variables(
                                    Optional.ofNullable(graphQLRequest.getVariables())
                                            .orElseGet(Collections::emptyMap))
                            .build())
            .thenApply(ExecutionResult::toSpecification);
}
</code>```

Body:
I am trying to write the code to print the content length of the response header in GraphQL API. This is the code have tried below but am unable to proceed further. Appreciate your input.

public class GraphQLRequestBody {
private String query;
private Map<String, Object> variables;

public String getQuery() {
    return query;
}

public void setQuery(String query) {
    this.query = query;
}

public Map<String, Object> getVariables() {
    return variables;
}

public void setVariables(Map<String, Object> variables) {
    this.variables = variables;
}}

    public CompletableFuture<Map<String, Object>> graphQL(
        @RequestBody String query, final HttpEntity<String> request) {
    String contentType = Objects.requireNonNull(request.getHeaders().getContentType()).toString();

    GraphQLRequestBody graphQLRequest = new GraphQLRequestBody();
    graphQLRequest.setQuery(query);
    if (contentType.contains(APPLICATION_JSON_VALUE)) {
        graphQLRequest = GraphQLUtils.parseJsonRequestQuery(query);
    }
    return graphql
            .executeAsync(
                    ExecutionInput.newExecutionInput()
                            .query(graphQLRequest.getQuery())
                            .variables(
                                    Optional.ofNullable(graphQLRequest.getVariables())
                                            .orElseGet(Collections::emptyMap))
                            .build())
            .thenApply(ExecutionResult::toSpecification);
}


问:
Accept multipart/form-data request in .Net Core
You need to send a request to the .Net Core application using Soap Ui. The request contains some data in the json format + an attached file.

I can’t find it anywhere and I can’t get either the data or the content of the file. Still as an option, what am I sending wrong via Soap? How to get everything you need through HttpContext.Request.Body or something like that?

```<code>[Route("betrsign"), AllowAnonymous, ApiController]
public sealed class ServiceController : Controller
</code>```

and it has a post method

```<code>[HttpPost("service"), DisableRequestSizeLimit]
[DisableFormValueModelBinding]
public async Task<ActionResult> Service()
</code>```

Body:
You need to send a request to the .Net Core application using Soap Ui. The request contains some data in the json format + an attached file.

I can’t find it anywhere and I can’t get either the data or the content of the file. Still as an option, what am I sending wrong via Soap? How to get everything you need through HttpContext.Request.Body or something like that?

[Route("betrsign"), AllowAnonymous, ApiController]
public sealed class ServiceController : Controller

and it has a post method

[HttpPost("service"), DisableRequestSizeLimit]
[DisableFormValueModelBinding]
public async Task<ActionResult> Service()


问:
With RAML can I 'append' properties to my response body with a trait?
I understand how to 'wrap' a response object via a RAML trait. But I need to 'append' some properties to the response body via a trait.

My specific example is a 'pageable' trait which defines the query parameters for limit and offset.  But I also want to append some properties in the response for pageable get operations.  For example, "Count" and "hasMore".


问:
Facing issue with TKinter:observing "unresponsive state"
Below is my code I am trying to run 3 test cases but the tkinter going to unresponsive state, I tried using threads as well but still facing the same issue and seeing one more error msg "The process cannot access the file because it is being used by another process." and I am not sure if the threads stopping after given duration or not, It seems those are not terminating. can any one check the code and please help.

my code

```<code>import threading
from tkinter import *
import time
import random
import os
import datetime
import Test_cases

Tc =Test_cases.Test()

class Blocking():
    def __init__(self):
        self.window_main = Tk(className='Naren-App',)
        self.window_main.geometry("600x300")
        Label(self.window_main, text="Stability Tool").place(x=460, y=100, anchor="center")

        # adding a label Frame to the Main window
        self.Frame_window = LabelFrame(self.window_main, text = 'Test Cases')
        self.Frame_window.config(width=400, height=800)
        self.Frame_window.place(x=300, y=200, anchor="center")

        self.var1 = IntVar()
        self.Check_Button_1 = Checkbutton(self.Frame_window, text = "Screen_ON_OFF_Test",variable=self.var1).pack()
        self.var2 = IntVar()
        self.Check_Button_2 = Checkbutton(self.Frame_window, text = "WWAN_LPM_To_Online",variable=self.var2).pack()
        self.var3 = IntVar()
        self.Check_Button_3 = Checkbutton(self.Frame_window, text = "Get_Device_State",variable=self.var3).pack()
        Label(self.Frame_window, text="Enter Each Test Duration in Sec").pack()
        self.Duration = IntVar() # to set default value
        self.TestDuration = Entry(self.Frame_window, textvariable=self.Duration).pack()

        #submitBtn = Button(self.Frame_window, text="submit", command=lambda:submit(Check_Button_1.get(),Check_Button_2.get(),Check_Button_3.get()))
        self.submitBtn = Button(self.Frame_window, text="submit", bg='blue',state=NORMAL,command=self.submit)
        self.submitBtn.pack()

        #stability
        self.Frame_window = LabelFrame(self.window_main, text = 'Stability')
        self.Frame_window.config(width=400, height=800)
        self.Frame_window.place(x=600, y=200, anchor="center")

        self.var4 = IntVar()
        self.Test_Name_Check_button = Checkbutton(self.Frame_window, text = "Test_Name",variable=self.var4).pack()
        self.var5 = IntVar()
        self.NumberOf_Iterations_Check_button = Checkbutton(self.Frame_window, text = "NumberOf_Iterations",variable=self.var5).pack()
        self.var6 = IntVar()
        self.NumberOf_Hours_Check_button = Checkbutton(self.Frame_window, text = "NumberOf_Hours",variable=self.var6).pack()

        self.submitBtn2 = Button(self.Frame_window, text="submit", bg='blue', state =DISABLED,command=self.submit)
        self.submitBtn2.pack()
        self.window_main.mainloop()

    def submit(self):
            print("var1: %d,\n var2: %d,\nvar3: %d,\nDuration: %d" % (self.var1.get(), self.var2.get() , self.var3.get(), self.Duration.get()))
            TestDuration = int(self.Duration.get())
            print("Test Duration2:", TestDuration)
            Tc.Duration = TestDuration
            print("Passing Duration:", Tc.Duration)
            self.submitBtn['bg']='blue'
            self.submitBtn['state']=DISABLED
            if self.var1.get() == 1 :
                    print("Starting Screen on off \n")
                    print("Screen On OFF Test Will run For:",TestDuration ,"sec \n")
                    T1=threading.Thread(target=Tc.Screen_ON_OFF()).start()
                    time.sleep(TestDuration+5)
                    #T1.join()
            if self.var2.get() == 1 :
                    print("Starting LPM to Online \n")
                    print("LPM to Online Test Will run For:",TestDuration ,"sec \n")
                    T2=threading.Thread(target=Tc.LPM_To_Online()).start()
                    time.sleep(TestDuration+5)
            if self.var3.get() == 1 :
                    print("Getting device state \n")
                    print("Getting device statet Will run For:",TestDuration ,"sec \n")
                    T1=threading.Thread(target=Tc.Get_Device_State()).start()
                    time.sleep(TestDuration+5)
            return Label(self.window_main, text="Submitted!").pack()

def main():
    block = Blocking()

if __name__ == '__main__':
    main()
</code>```

Body:
Below is my code I am trying to run 3 test cases but the tkinter going to unresponsive state, I tried using threads as well but still facing the same issue and seeing one more error msg "The process cannot access the file because it is being used by another process." and I am not sure if the threads stopping after given duration or not, It seems those are not terminating. can any one check the code and please help.

my code

import threading
from tkinter import *
import time
import random
import os
import datetime
import Test_cases

Tc =Test_cases.Test()

class Blocking():
    def __init__(self):
        self.window_main = Tk(className='Naren-App',)
        self.window_main.geometry("600x300")
        Label(self.window_main, text="Stability Tool").place(x=460, y=100, anchor="center")

        # adding a label Frame to the Main window
        self.Frame_window = LabelFrame(self.window_main, text = 'Test Cases')
        self.Frame_window.config(width=400, height=800)
        self.Frame_window.place(x=300, y=200, anchor="center")

        self.var1 = IntVar()
        self.Check_Button_1 = Checkbutton(self.Frame_window, text = "Screen_ON_OFF_Test",variable=self.var1).pack()
        self.var2 = IntVar()
        self.Check_Button_2 = Checkbutton(self.Frame_window, text = "WWAN_LPM_To_Online",variable=self.var2).pack()
        self.var3 = IntVar()
        self.Check_Button_3 = Checkbutton(self.Frame_window, text = "Get_Device_State",variable=self.var3).pack()
        Label(self.Frame_window, text="Enter Each Test Duration in Sec").pack()
        self.Duration = IntVar() # to set default value
        self.TestDuration = Entry(self.Frame_window, textvariable=self.Duration).pack()

        #submitBtn = Button(self.Frame_window, text="submit", command=lambda:submit(Check_Button_1.get(),Check_Button_2.get(),Check_Button_3.get()))
        self.submitBtn = Button(self.Frame_window, text="submit", bg='blue',state=NORMAL,command=self.submit)
        self.submitBtn.pack()

        #stability
        self.Frame_window = LabelFrame(self.window_main, text = 'Stability')
        self.Frame_window.config(width=400, height=800)
        self.Frame_window.place(x=600, y=200, anchor="center")

        self.var4 = IntVar()
        self.Test_Name_Check_button = Checkbutton(self.Frame_window, text = "Test_Name",variable=self.var4).pack()
        self.var5 = IntVar()
        self.NumberOf_Iterations_Check_button = Checkbutton(self.Frame_window, text = "NumberOf_Iterations",variable=self.var5).pack()
        self.var6 = IntVar()
        self.NumberOf_Hours_Check_button = Checkbutton(self.Frame_window, text = "NumberOf_Hours",variable=self.var6).pack()

        self.submitBtn2 = Button(self.Frame_window, text="submit", bg='blue', state =DISABLED,command=self.submit)
        self.submitBtn2.pack()
        self.window_main.mainloop()

    def submit(self):
            print("var1: %d,\n var2: %d,\nvar3: %d,\nDuration: %d" % (self.var1.get(), self.var2.get() , self.var3.get(), self.Duration.get()))
            TestDuration = int(self.Duration.get())
            print("Test Duration2:", TestDuration)
            Tc.Duration = TestDuration
            print("Passing Duration:", Tc.Duration)
            self.submitBtn['bg']='blue'
            self.submitBtn['state']=DISABLED
            if self.var1.get() == 1 :
                    print("Starting Screen on off \n")
                    print("Screen On OFF Test Will run For:",TestDuration ,"sec \n")
                    T1=threading.Thread(target=Tc.Screen_ON_OFF()).start()
                    time.sleep(TestDuration+5)
                    #T1.join()
            if self.var2.get() == 1 :
                    print("Starting LPM to Online \n")
                    print("LPM to Online Test Will run For:",TestDuration ,"sec \n")
                    T2=threading.Thread(target=Tc.LPM_To_Online()).start()
                    time.sleep(TestDuration+5)
            if self.var3.get() == 1 :
                    print("Getting device state \n")
                    print("Getting device statet Will run For:",TestDuration ,"sec \n")
                    T1=threading.Thread(target=Tc.Get_Device_State()).start()
                    time.sleep(TestDuration+5)
            return Label(self.window_main, text="Submitted!").pack()

def main():
    block = Blocking()

if __name__ == '__main__':
    main()


问:
reCaptcha API V2 behaving differently
I have the following  entry at the top of my page:

...and I I am using the very simple HTML in the page body:

Now, when this renders on my local laptop, I get the very basic checkbox only, which is what I am looking for...

...but when I run this same code up on our AWS cloud server (running Windows Server 2019), when you check the reCAPTCHA checkbox, it displays the image verification:

...which is not what I'm looking for it to do. I thought one had to explicitly reference "data-type='image'" in the  tag for it to do this.

Anyone know why this is displaying the image verifier up on the server when I'm not explicitly asking for it?

Title: reCaptcha API V2 behaving differently


问:
Show name of Month in the input type date
How can we show the name of month inside the input type date.
For example to see in input "06 December 2022" instead of "06/12/2022".
I want to show day(numeric) month(name) year(numeric).

I was trying in vue.js

```<code>var options = { year: 'numeric', month: 'long', day: 'numeric' };
</code>```

It works, if you create a new Date() using options from above it will work, but that's not what i want. I want that date to be shown in input type date in that way.

For example we give a value to input type date  and i want on the screen in the input type to appear "01 February 2022" instead of "01/02/2022".
How can we do that?

Body:
How can we show the name of month inside the input type date.
For example to see in input "06 December 2022" instead of "06/12/2022".
I want to show day(numeric) month(name) year(numeric).

I was trying in vue.js

var options = { year: 'numeric', month: 'long', day: 'numeric' };

It works, if you create a new Date() using options from above it will work, but that's not what i want. I want that date to be shown in input type date in that way.

For example we give a value to input type date  and i want on the screen in the input type to appear "01 February 2022" instead of "01/02/2022".
How can we do that?


问:
Render widget in flutter with conditione
I have a stack and it have children i will still adding a children and I want to check if this child rendered so do not rendering it again.

I can do that?