Set the text of the TextView in the custom view.
((TextView)((LinearLayout)getSupportActionBar().getCustomView()).getChildAt(0)).setText("title");
https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)
I have the same question have you found the solutionâïž
I fixed it by changing import createSagaMiddleware from 'redux-saga';
to const createSagaMiddleware = require('redux-saga').default;
as as mentioned here link.
I have figured out the problem thanks to this SO post. I used
androidx.core.content.FileProvider
in my java file, but used the following in my manifest: android.support.v4.content.FileProvider
.
I have now changed the manifest to match the java file. Things work now.
And this worked fine for me, now visitng the second app on button click and it's working fine.
In the custom command, urlKey is the url of the second app i was visiting before and faced that error.
There is now an elegant solution to this problem; reportedly.
Its a SaaS service (but free to use for smaller usages) that enables you to:
- Create a form for issue collection with a few clicks (select project, issuetype, initial status)
- Integrate or link to the form from webpage, email etc.
- Users enter their e-mail and fill in the form to register issues.
- When issues are updated or commented on, the user receives an update by e-mail, and can click a link to open the issue and comment (without needing access to Azure DevOps).
See information here:
Reportedly homepage
Do you have New-AzContainerGroup? Read more
https://learn.microsoft.com/en-us/powershell/module/az.containerinstance/new-azcontainergroup?view=azps-13.5.0It provisions the container group to run the container instance.
Eample
New-AzContainerGroup -ResourceGroupName myResourceGroup -Name mycontainer1 -Image mcr.microsoft.com/azuredocs/aci-wordcount:latest
The actual cause was my old custom admin theme. It was still referencing UI extensions (like the unmanagedAttributes tab) from the older version. Even though the backend provider was gone, the theme's JS and metadata were still triggering the frontend to request that route.
Fix: I completely removed the custom theme, restarted Keycloak, and the issue was resolved. The Admin UI no longer tried to load the missing route, and user detail pages worked normally again.
If you're trying to understand how cookies work for educational or development purposes, I can help explain that in a general, legal way â would you like an educational post idea on how cookies work in web browsers or apps
I observed the same issue while testing on a real device using VS Code. Everything had been working fine, then suddenly I started getting the exact same error:
Error: Flutter could not connect to the Dart VM service.
SocketException: Send failed (OS Error: No route to host, errno = 65), address = 0.0.0.0, port = 5353
There were no relevant setting changes, and the systemâs Local Network permissions looked fine.
Not sure about the root cause, but here is what fixed it for me:
restart the IDE
restart the device
You wrote in /etc/hosts
the IP address and domain name (like nocturnal.htb
)?
In my case, none of the other solutions worked, and the issue was due to enabling mixed precision training with PyTorch's AMP (Automatic Mixed Precision).
The fix was to disable AMP entirely, as no other workaround resolved the NaNs. One potential solution if you still want to use AMP is to adjust the gradient scaling, as discussed in this post. However, I tried various scaling values, and it still didn't work correctly in my setup.
Set header off and create your own header.
SET HEADING OFF
Select 'ID', 'Name' from Dual
Union All
Select ID, Name from myTable
The centers of 3 tangent circles constitute a triangle.
To simplify the explanation, we set our circles in a referential which help us, then it will be up to you to reorient according your real position.
Circle radiuses are named r1,r2 and r3.
Consider that circle 1 and 2 are on an horizontal line and coordinate of the first circle are [0,0] and the second circle are [c,0].
There are two solutions in mirror, third circle tangent on the bottom or the top of the others.
We choose to tangent on bottom to have the third triangle point on top.
The left side of the triangle length which we call âbâ is equal to r3-r1.
The right side of the triangle length which we call âaâ is equal to r3-r2.
Now to position the c3 center, we shall calculate one of the triangle angle.
This problem is known under the âlaw of cosinesâ (see Wikipedia page on the topic)
The angle between the c side (horizontal) and b side (left) will be named âalphaâ.
alpha = arccos ((b^2+c^2-a^2)/2bc) .
Now, to have the position of the third triangle, do simple trigonometry:
Third circle coordinates = [b cos(alpha), b sin(alpha)].
I did tested the stuff on OpenScad for my own use (finding this thread was of great help), just using rotation instead of trigonometric references.
I got this error because the PORT I was trying my application to run on was already in use.
This is very old, but I also struggled with this bug.
The following eventually worked: Set minimum-scale=1;
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
renderer.setSize( window.innerWidth, window.innerHeight ) somehow messes up the innerWidth and innerHeight. This also happens if the 3rd argument is false (updateStyle) and you set renderer.domElement styles manually.
setting minimum-scale=1 prevents scaling to accommodate the canvas.
You can compare two different branches by choosing "GitLensInspect" > "Search & Compare"
If you can't see it on sidebar do the below:
Press Ctrl+Shift+P
(Windows/Linux) or Cmd+Shift+P
(Mac).
Type Git: Compare Branches
.
Select the two branches you want to compare.
Try deleting node_modules folder and running yarn again.
I had the same error, and that fixed it for some reason, might work for you.
file:///C:/Users/ASUS/OneDrive/Documents/arsip%20new/website-project/src/images/background.jpgenter image description here
Add into metro.config.js:
config.resolver.unstable_enablePackageExports = false;
Store the SENTRY_AUTH_TOKEN
exclusively as a secret within your CI/EAS build environment (avoid using any EXPO_PUBLIC_* variable). The Sentry plugin accesses it during build time, ensuring it does not reach the client. Refer to Expoâs environment variable and Sentry guides for more information.
For few versions PFA snap for enabling the document list
I've been facing the same issue for a long time, and unfortunately the only working resolution was to disable HLS generation by nginx-rtmp-module itself and switch to ffmpeg instead (previously suggested by @sasuke-uchiha).
Relevant excerpts from nginx configuration:
rtmp {
server {
listen 127.0.0.1:1935;
application cctv {
allow publish 127.0.0.0/24;
deny publish all;
allow play all;
live on;
# HLS fragments generation
hls off;
# maintain HLS via ffmpeg instead of nginx-rtmp-module
exec_push /home/cctv/bin/rtmp2hls $name;
exec_kill_signal term;
# rest of RTMP configuration (recorders etc)
}
}
}
The rtmp2hls
script is a simple shell script which is intended to run ffmpeg for every connected publisher and ensure to kill it once SIGTERM is received from nginx (pasting here with minor edits):
#!/bin/bash -e
SPOOL="/var/spool/cctv"
LOGS="/var/log/cctv"
SELF=$(basename "$0")
_ffmpeg_pid=
log () {
logger --id $$ "$SELF: $*"
}
_teardown() {
if [ -n "${_ffmpeg_pid}" ]; then
if ! kill "${_ffmpeg_pid}"; then
log "ffmpeg (${_ffmpeg_pid}) was not running"
else
log "ffmpeg ${_ffmpeg_pid} killed"
fi
_ffmpeg_pid=
fi
log "stopped rtmp-to-hls ffmpeg for ${CAMERA_ID}"
exit 0
}
if [ $# -lt 1 ]; then
echo "usage: $(basename "$0") camera_id" >&2
exit 1
fi
CAMERA_ID="$1"
PULL_URL="rtmp://127.0.0.1/cctv/${CAMERA_ID}"
while read -r fname; do
log "removing stale stream: ${fname}"
rm -f "${fname}"
done < <(find "${SPOOL}/hls" -type f -name "${CAMERA_ID}*.ts" | sort)
# see also:
# https://ffmpeg.org/ffmpeg-formats.html#hls-2
# https://www.martin-riedl.de/2020/04/17/using-ffmpeg-as-a-hls-streaming-server-overview/
ffmpeg \
-i "${PULL_URL}" \
-nostats \
-c copy \
-sc_threshold 0 \
-f hls \
-hls_time 6 \
-hls_list_size 6 \
-hls_delete_threshold 1 \
-hls_start_number_source epoch \
-hls_flags independent_segments+delete_segments+program_date_time \
"${SPOOL}/hls/${CAMERA_ID}.m3u8" 2>>"${LOGS}/${CAMERA_ID}.ffmpeg-hls.log" &
_ffmpeg_pid=$!
log "started rtmp-to-hls ffmpeg (pid=${_ffmpeg_pid}) for ${CAMERA_ID} from ${PULL_URL} to ${SPOOL}/hls/${CAMERA_ID}.m3u8"
trap "_teardown" INT TERM
wait "${_ffmpeg_pid}"
I've been testing this with nginx/1.27.1, nginx-rtmp-module/1.2.2, and ffmpeg/5.1.6 for a few weeks, and everything works just fine. With this setup I was able to get almost clean report from Apple's mediastreamvalidator
tool:
For comparison, here's what I was getting with plain nginx-rtmp-module:
Interestingly enough, even with nginx-rtmp-module's HLS browsers (Safari on macOS or iPad) were regularly fetching playlists and stream data, but never show anything except a spinning wheel.
Fix:
Force the environment to use Python 3.9, which is the latest compatible version.
dockerfile
FROM python:3.9.22-slim # Explicitly use Python 3.9
RUN pip install absl-py==0.9.0
bash
python3.9 -m pip install absl-py==0.9.0
Why Python 3.9?
absl-py==0.9.0
was tested on Python 3.4â3.9.
Python 3.10+ introduces breaking changes that block installation.
No Workarounds Needed â Just use Python 3.9 and it will work.
On windows-
1. Locate where the local applications' resources are stored. Typically they will be in
C:\Users\<your-user-name>\AppData\Local\Programs\
folder
2. You should see two identical files code.cmd and cursor.cmd.
3. You should delete code.cmd and a file named code
4. Now try both commands- code .
should open VS code whereas cursor .
should open the cursor AI editor.
I've found that you can use the C++ <vector> library, which is a lot less complicated than my previous method.
You can use the alternate connection mechanism using the Cluster object, see https://tinkerpop.apache.org/docs/current/reference/#connecting-via-drivers
To pass configuration parameters a ClusterBuilder is available, see https://tinkerpop.apache.org/javadocs/3.7.3/core/org/apache/tinkerpop/gremlin/driver/Cluster.Builder.html
Also the gremlin-drivers for other software languages provide an option to pass configuration parameters in code instead of using a yaml file, see https://tinkerpop.apache.org/docs/current/reference/#gremlin-drivers-variants
Following are two sollutions you can try out
Try by uninstalling it and reinstall it
Create python virtual environment, activate vitual environment and then install "itk" in venv. Finally run your python script
You need to send value from enum's list
Instead of 4
- send catastrophic
I'm not usually use GHCP on a remote server and I'm not quite sure whether GHCP retrieves context from remote or local, but the self-signed issue I was encountering on local could be fixed by adding self-signed cert into trusted root CA and configuring win-ca:
- Request your DevOps team to provide the self-signed certificate and add it to the trusted root CA on the remote server (and potentially on the local machine, if needed).
- Secondly, use win-ca (or mac-ca) extension in VS Code (both remote and local?) with "append mode" to access windows trusted certificate store: https://stackoverflow.com/a/71826748/3789481
Exports are supported since Expo SDK 53. Update to SDK 53 to make tree shaking work.
Write a program to print the week day.
there are seven weekdays.
the first week day is Sunday and the last week day is Saturday respectively if the week day is not in between 1 to 7,print Invalid.
input:
1
output:
Sunday
input:
24
output:
Invalid
make sure to add the line below inside gradle.properties
kotlin.mpp.enableCInteropCommonization=true
Below I am answering my own question. There is a possibility that the answer is not correct. So, I request you to point out any errors or inadequacies.
I am still unable to read the binary file and I could not locate the py2lcov so that I could try to try out the idea given by @Henry. However answer to my primary question, I have been able to figure out. Two passes of trace command were enough.
First pass to create the trace file using "--count --file <TraceFileName>" option. First time you run this command the file mentioned will not be there. So there will be warning. Second pass onwards the file will be used.
Second pass to print the report using the file generated in the previous step with "--report --file <TraceFileName>" option alongwith "--summary" to produce the summary I wanted.
While running the module(s) with trace command <SomeFile>.cover files will be produced. This will be the original code that gets executed. The beginning of each line has a number associated (which tells the number of invocations of that line). An empty or ">>>>>>" at the beginning shows that that line did not get called. You can write a simple parser program to produce a detailed coverage output and write it to an html or xml to produce 'coverage' module like output (or you can customise it to your needs). The ">>>>>>" is produced if "--missing" option is passed in both the steps otherwise a blank is produced for the lines not covered by the unittest.
In both the passes, if you don't include the "--ignore-dir" or "--ignore-module", all the core python modules that get called while executing your actual python file (TempDelete.py in the above example). Thus for example the python is located as "/usr/lib/python3.12" then passing "/usr/lib" will suppress producing the coverage of those files. For details see the official docs.
I am writing below the contents of the test_foo.py and the two commands/passes that I had to execute.
## Contents of test_foo.py
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
with self.assertRaises(TypeError):
s.split(2)
def not_covered(self):
print("This will never be printed.")
loader = unittest.TestLoader()
tests = loader.discover('.')
testRunner = unittest.runner.TextTestRunner()
testRunner.run(tests)
Pass 1
$ python3.12 -m trace --count --file ./coverage/coverage --ignore-dir=/usr/lib --missing -C ./coverage/ ./test_foo.py
The first pass printed the output as below, as expected
...
----------------------------------------------------------------------
Ran 3 tests in 0.001s
OK
...
----------------------------------------------------------------------
Ran 3 tests in 0.001s
OK
Skipping counts file './coverage/coverage': [Errno 2] No such file or directory: './coverage/coverage'
Pass 2
$ python3.12 -m trace --report --file ./coverage/coverage --ignore-dir=/usr/lib --missing --summary -C ./coverage/ ./test_foo.py
The second pass gave me the summary I was looking for.
lines cov% module (path)
18 94% test_foo (/home/somefolder/test_foo.py)
I am also pasting the test_foo**.cover** file to show how a .cover file looks like.
1: import unittest
2: class TestStringMethods(unittest.TestCase):
1: def test_upper(self):
2: self.assertEqual('foo'.upper(), 'FOO')
1: def test_isupper(self):
2: self.assertTrue('FOO'.isupper())
2: self.assertFalse('Foo'.isupper())
1: def test_split(self):
2: s = 'hello world'
2: self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
4: with self.assertRaises(TypeError):
2: s.split(2)
1: def not_covered(self):
>>>>>> print("This will never be printed.")
1: loader = unittest.TestLoader()
1: tests = loader.discover('.')
1: testRunner = unittest.runner.TextTestRunner()
1: testRunner.run(tests)
I think my main query is resolved but I still do not know how to read/decode the binary file. May be we are not meant to. We can however print the contents with binascii module using ascii.b2a_uu as below.
import binascii
with open("coverage/coverage", "rb") as file_handle:
while(read_content:=file_handle.read(45)):
binascii.b2a_uu(read_content)
It produces the output as below.
b'M*\'UQ "@H6 T N+W1E<W1?9F]O+G!Y<0%+ 71Q DL!*&@!2P-T<0-+ BAH\n'
b'M 4L%=\'$$2P$H: %+"\'1Q!4L!*&@!2PQT<09+ 2AH 4L3=\'$\'2P$H: %+%G1Q\n'
b'M"$L!*&@!2Q=T<0E+ 2A8+0 "]H;VUE+W!A<G1I8VQE+T1E<VMT;W O5&5M\n'
b'M<$1E;&5T92]T97-T7V9O;RYP>7$*2P%T<0M+ 2AH"DL#=\'$,2P(H: I+!71Q\n'
b'M#4L!*&@*2PAT<0Y+ 2AH"DL,=\'$/2P$H: I+$W1Q$$L!*&@*2Q9T<1%+ 2AH\n'
b'M"DL7=\'$22P$H: I+&\'1Q$TL!*&@*2QET<11+ 2AH"DL)=\'$52P(H: I+"G1Q\n'
b'M%DL"*&@*2PUT<1=+ BAH"DL.=\'$82P(H: I+$\'1Q&4L$*&@*2Q%T<1I+ BAH\n'
b'G"DL&=\'$;2P(H: %+&\'1Q\'$L!*&@!2QET<1U+ 75]<1Y]<1]T<2 N\n
However I still do not know how to decode it. If you happen to know the trick, please share.
After I have deleted Junit from the eclipse java build path it became apparent that I use old org.junit imports in some other java files. After fixing them the project compiles both in eclipse and maven.
Maven still found all the test classes but no tests in them. The fix for that was to include junit-jupiter-engine and junit-platform-launcher dependencies and maven-surefire-plugin.
I suggest refreshing the grid in the following way: https://www.ag-grid.com/javascript-data-grid/server-side-model-updating-refresh/
Also, Iâm not sure SSRM + react-query works fine together. You probably donât need react query in this case - make direct api calls inside server side data source, as it is done in the example
im facing same the issue on my side too
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PL9PWRR8');</script>
<!-- End Google Tag Manager -->
Hot Reload doesnât apply changes to ThemeData
or other global objects like main()
or MaterialApp
parameters. To see those changes:
đ Use Hot Restart instead of Hot Reload.
template<class>
struct class_of;
template<class T, class C>
struct class_of<T C::*> { using type = C; };
template <typename T>
void GeorgeFunc(T fp)
{
typename class_of<T>::type obj;
(obj.*fp)();
}
Press f1
and type git: Close
And it will show you Git: Close All Unmodified Editors
like the image below:
Try to add "scroolbar" like variants in your tailwind.config.js v4
plugins: [
require('tailwind-scrollbar')({ nocompatible: true }),
],
The previous code enables modern variant usage for Tailwind v4.
Finally, restart Tailwind:
npm run tailwind
To fix the error **"unable to initialize the Unity Engine Gfx api"** when running a Unity application on an Android emulator, follow these steps:
---
### đ§ 1. **Configuring the graphics of the emulator**
- **Change the emulator graphics driver**:
In AVD Manager, open the settings of your Pixel emulator â section **Emulated Performance** â **Graphics**.
Use **ANGLE (D3D11)** for Windows or **SwiftShader** (if the error occurs on Android 8.1).
- Avoid **Automatic** and **Native GPU** (often cause conflicts with Unity).
- **Create a new emulator**:
Select Android 13 (API 33) with the image **Google Play** â screen resolution 1080x1920.
Turn off the **Play Store** (sometimes causes additional load).
---
### đ ïž 2. ** Unity Configuration**
- **Build Settings**:
In **Player Settings** â **Other Settings**:
Specify **Minimum API Level 26** (Android 8.1) and **Target API Level 33**.
Disable **Auto Graphics API** â manually add **OpenGLES3**.
In **Graphics** â **Vulkan** â uncheck the box (emulators don't support it well).
- **AI Foundation Framework**:
- If you are using neural network models, check their compatibility with the x86 architecture of the emulator.
---
### đ» 3. **System requirements**
- **Enable hardware acceleration**:
For Windows: activate **Hyper-V** or **Windows Hypervisor Platform**.
For AMD CPU: Enable **SVM** in the BIOS.
- **Allocate more resources**:
Emulator RAM: minimum **4096 MB**.
Storage Size: **8 GB** (for Android 13).
---
### đ 4. ** Diagnostics**
- **Check the Unity logs**:
- Open **Window â Analysis â Log**.
- **Test it on a real device**:
---
#### đ 5. **Emergency measures**
- **Rebuild the project**:
``bash
# Delete
the rm -rf Library cache/ Temp/ ProjectSettings/ProjectVersion.txt
``
- **Use the Genymotion emulator** (more stable for Unity):
- Create a device with Android 13 and graphics **OpenGL ES 3.0**.
---
**Example of a working configuration**:
| Component | Version |
|-----------------|----------------------|
| Unity | 2022.3.9f1 |
| Android SDK | 34.0.0 |
| Emulator Image | API 33 (Android 13) |
| Graphics Driver | ANGLE (D3D11) |
If the problem persists, please send:
1. Screenshot of the error with the full text.
2. A fragment of the log from 'adb logcat | grep "EGL"`.
3. Graphics API settings in Unity.
This error log indicates that nodejs is not installed on your system. Please run node and npm in your terminal with the -v flag. If those give you an error try to reinstall nodejs and verify that it is referenced in your environment variables.
#include <stdio.h> // Preprocessor directive to include the standard I/O library
int main(void) {
printf("Hello, world!\n"); // Call to the standard library function
return 0; // Exit status to the operating system
}
This may help you check this out. ran using bash script
https://medium.com/@shadeersadikeen/seamless-cross-account-s3-transfers-with-one-simple-bash-script-69ccd099562c
To use language packs, we need a full build version of VS Code.
npm run gulp vscode-win32-x64
To answer your last statement, yes I would be concerned with a loss of data due to removing a participant if you're trying to analyze the whole population with one polychoric correlation test.
I would split your population into subgroups based on their answer to a conditional question (i.e. all participants that answered yes to "Do you eat ice cream?". You would then perform the polychoric correlation on each of those subgroups.
I was confused about how the row parameter in the method clickToSelect(row) gets passed, since the template didnât explicitly do this:
@row-click="clickToSelect" <!-- No (row) passed manually -->
Vue automatically passes the appropriate arguments to the handler when using @event="methodName"
. In the case of Element Plusâs @row-click
, it passes (row, column, event)
. So thereâs no need to manually specify the parameters unless I want to customize them.
I originally wrote:
<el-table row-key="id"> <!-- â Wrong casing -->
My data objects use ID
(uppercase), not id
. The row-key
must exactly match the property name used to uniquely identify rows.
Without a proper row-key, Element Plus canât uniquely track each row, which may result in unexpected behavior like selecting all rows on click.
Its better to use packages. I'm using Nextjs and with 'use client' this works: Focus on Aria-label when building apps to help visually impaired people. Thanks.
Install and import file-saver package as below:
import fileSaver from 'file-saver'
Invoke the saveAs to download.
<button
onClick={() => {
fileSaver.saveAs(
"https://yolo-chill-buddy.com/myfile.pdf",
"my-file.pdf"
);
}}
aria-label="Do this and it works - chill"
>
<span>Download</span>
</button>
With version 33 of ag grid i had to pass theme api directly to the component and remove css imports.
import { themeAlpine } from 'ag-grid-community';
<AgGridReact
theme={myTheme}
...
/>
Shortcut conflicts with pre-defined in Android Studio settings.
Go to Settings > Keymap > Editor actions, remove "Option-Click" shortcut from "Create rectangular selection on mouse drag".
Related IDEA issue: https://youtrack.jetbrains.com/issue/IDEA-229345/Drag-Copy-of-text-doesnt-work-on-Mac
I suggest the following steps:
# Building MCP with LLMs
\> Speed up your MCP development using LLMs such as Claude!
This guide will help you use LLMs to help you build custom Model Context Protocol (MCP) servers and clients. We'll be focusing on Claude for this tutorial, but you can do this with any frontier LLM.
## Preparing the documentation
Before starting, gather the necessary documentation to help Claude understand MCP:
1. Visit [https://modelcontextprotocol.io/llms-full.txt](https://modelcontextprotocol.io/llms-full.txt) and copy the full documentation text
2. Navigate to either the [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) or [Python SDK repository](https://github.com/modelcontextprotocol/python-sdk)
3. Copy the README files and other relevant documentation
4. Paste these documents into your conversation with Claude
## Describing your server
Once you've provided the documentation, clearly describe to Claude what kind of server you want to build. Be specific about:
* What resources your server will expose
* What tools it will provide
* Any prompts it should offer
* What external systems it needs to interact with
For example:
```
Build an MCP server that:
- Connects to my company's PostgreSQL database
- Exposes table schemas as resources
- Provides tools for running read-only SQL queries
- Includes prompts for common data analysis tasks
```
## Working with Claude
When working with Claude on MCP servers:
1. Start with the core functionality first, then iterate to add more features
2. Ask Claude to explain any parts of the code you don't understand
3. Request modifications or improvements as needed
4. Have Claude help you test the server and handle edge cases
Claude can help implement all the key MCP features:
* Resource management and exposure
* Tool definitions and implementations
* Prompt templates and handlers
* Error handling and logging
* Connection and transport setup
## Best practices
When building MCP servers with Claude:
* Break down complex servers into smaller pieces
* Test each component thoroughly before moving on
* Keep security in mind - validate inputs and limit access appropriately
* Document your code well for future maintenance
* Follow MCP protocol specifications carefully
## Next steps
After Claude helps you build your server:
1. Review the generated code carefully
2. Test the server with the MCP Inspector tool
3. Connect it to Claude.app or other MCP clients
4. Iterate based on real usage and feedback
Remember that Claude can help you modify and improve your server as requirements change over time.
Need more guidance? Just ask Claude specific questions about implementing MCP features or troubleshooting issues that arise.
if you want to disable security globally. Under Jenkins > Manage Jenkins > Security > Authorization select "Anyone can do anything". After that you don't have to be logged in to do anything in jenkins
use IDispatchPtr (<comip.h>
) that is _com_ptr_t
internally and its operator&
is
Interface** operator&() throw()
{
_Release();
m_pInterface = NULL;
return &m_pInterface;
}
Why not a monolith? You have no complex logic, microservices are harder to deploy. Making 4 programs with 3 classes on each is the worst idea. Oh, no, make 50 classes, cause every function needs it's own class.
This architecture isn't good for this program. Even if you have to balance loads, you can make it without of microservices.
I'm making Minecraft hosting, I need microservices, cause making containers and game servers may be done at different servers, central microservices must be isolated, because docker is not very safe. Making orders, register users, are really independent tasks. Web interface must be isolated from DB, it is made by other programmer.
But here you divide your system into 4 components, when you can make one small project. Microservices don't mean 1-2 functions per app, they mean 1-2 tasks, separate from other modules
If you are using opencv-rs, try adding the clang feature:
opencv = {version = "0.94.4", features = ["clang-runtime"]}
Looks like there's another http server running in your container that blocks the port.
Try creating a new VM and run commands sudo docker pull httpd & sudo docker run -d --name apache-server -p 86:80 httpd only.
docker run starts the container so you don't need to docker start it.
Try fresh VM (ideally Container Optimised OS). You can always install the Apache directly on the VM if that's the only thing that you need to run on it with sudo apt install apache2 -y and allow http traffic in your VM's firewall with sudo ufw allow 'WWW'.
Make sure also that your GPS's firewall allows traffic in & out.
æȘè§Łćł
(.venv) (base) oscc:aiagent cc$ pip uninstall JWT
WARNING: Skipping JWT as it is not installed.
(.venv) (base) oscc:aiagent cc$ pip uninstall PyJWT
Found existing installation: PyJWT 2.10.1
Uninstalling PyJWT-2.10.1:
Would remove:
/Users/cc/Downloads/java_stu/aiagent/.venv/lib/python3.9/site-packages/PyJWT-2.10.1.dist-info/*
/Users/cc/Downloads/java_stu/aiagent/.venv/lib/python3.9/site-packages/jwt/*
Proceed (Y/n)? y
Successfully uninstalled PyJWT-2.10.1
(.venv) (base) oscc:aiagent cc$ pip install PyJWT=1.6.4
ERROR: Invalid requirement: 'PyJWT=1.6.4': Expected end or semicolon (after name and no valid version specifier)
PyJWT=1.6.4
^
Hint: = is not a valid operator. Did you mean == ?
(.venv) (base) oscc:aiagent cc$ pip install pyjwt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyjwt
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/ad/689f02752eeec26aed679477e80e632ef1b682313be70793d798c1d5fc8f/PyJWT-2.10.1-py3-none-any.whl (22 kB)
Installing collected packages: pyjwt
Successfully installed pyjwt-2.10.1
æ„é
import jwt
encoded_jwt = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
äžèĄ
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[19], line 2
1 import jwt
----> 2 encoded_jwt = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
AttributeError: module 'jwt' has no attribute 'encode'
For Java 21,
java -Xlog:class+load=info -cp your-app.jar com.myapp.Main
to show all modules attempted to be loaded.
Filter from there for Java packages as needed.
Diversity and multiculturalism are pillars of Australian society, and Young Academics makes it a priority to ensure all children in our care are given a safe and inclusive environment that fosters a sense of belonging and respect, regardless of cultural identity or background.
It is now widely recognised that the early years of life are the most important for learning. Research suggests that children who grow up in diverse and inclusive environments likely develop personality traits and characteristics that show empathy, compassion and a broader perspective. In contrast, children raised in a homogenous environment are less likely to accept or may struggle to understand differences.
Strategies for creating an inclusive early learning centre: Here are some practical strategies Young Academics has implemented to create a more inclusive and welcoming environment for every child:
Ensure that staff and educators are trained in cultural sensitivity and inclusion. Use diverse materials, books, toys, and images representing different cultures and identities. Celebrate cultural holidays and events like Diwali or Chinese New Year. Create a safe space for children to express their identities. Encourage cross-cultural friendships and interactions among children. Establish a zero-tolerance policy for bullying, discrimination, or exclusion. Positivââe outcomes of early childhood education and care programs that promote inclusion Early childhood education and care programs significantly impact young childrenâs cognitive, social, and emotional development. When coupled with intentional teaching of inclusion and diversity, this can even have a greater impact on childrenâs development:
Cultural appreciation: Programs that promote inclusion and diversity expose children to different cultures, languages, and traditions. To do this, our curriculum encourages childrenâs respect towards other cultures and beliefs from a young age. This exposure helps children develop a better understanding and appreciation of diversity and can contribute to developing their cultural identity. Improved social-emotional development: Inclusion and diversity in early childhood education and care programs provide children with the opportunity to interact with peers from different backgrounds, which helps them develop social-emotional skills such as empathy, respect, and tolerance. Children who attend these programs are more likely to develop positive attitudes towards diversity and have stronger social relationships. Increased family engagement: Early childhood education and care programs prioritising inclusion and diversity often involve families in their childrenâs education. These programs encourage families to share their cultural traditions and language, which helps build stronger relationships between families and educators. Better academic outcomes: Children attending early childhood education and care programs have a strong foundation in language and literacy, as well as critical thinking and problem-solving skills. Promoting equity: Inclusion and diversity in early childhood education and care programs can help promote equity by ensuring that all children have access to quality education regardless of their background or identity. These programs can help reduce educational disparities and allow all children to reach their full potential. At Young Academics, the formative years become our responsibility. Despite significant transitions, one thing remains constantâthe multicultural composition of the Australian population. At each of our early learning centres, we foster positive relationships regarding community and citizenship so that the upcoming generations empathise and respect the differences within our society.
To get to know our programs and policies a little more, contact us today.
Had the same error. I'm running a Mac, Sequoia 15.4.1. I was able to resolve by opening a Terminal window, going to my Homestead root folder and runnning brew upgrade
And then running vagrant up again.
Once can print loop count of current thread group as
${__jm__MyLoopController__idx}
if your Threadgroup name is login , we need to change it as below
${__jm__login__idx}
Validation should run as soon as the user interacts with the field (e.g. on change or blur).
Error messages should show immediately when a user enters invalid data into a field (i.e. not just after clicking "Next").
How can I get real-time validation state just for the current stepâs fields, and make the âNextâ button reactive based on that?
Set all
mode
for your form. Read the API. Example:
const form = useForm({
resolver: zodResolver(resourceNoteFormSchema),
defaultValues: { note: '' },
mode: 'all'
});
The "Next" button should be disabled by default, and should only become active when all fields in the current step are valid.
Use getFieldState API to get field states for step + useWatch API to subscribe on step updates. Example:
const useStepValidity = (form, stepFields) => {
// Watch all current step fields so we re-render when they change
const watch = useWatch({ control: form.control, name: stepFields.map(({ name }) => name) });
return useMemo(() => {
return stepFields.every((stepField) => {
const { isDirty, invalid } = form.getFieldState(stepField.name);
return (isDirty || stepField.isOptional) && !invalid;
});
}, [form, stepFields, watch]);
};
Full Example :
const useStepValidity = (form, stepFields) => {
// Watch all current step fields so we re-render when they change
const watch = useWatch({ control: form.control, name: stepFields.map(({ name }) => name) });
return useMemo(() => {
return stepFields.every((stepField) => {
const { isDirty, invalid } = form.getFieldState(stepField.name);
return (isDirty || stepField.isOptional) && !invalid;
});
}, [form, stepFields, watch]);
};
const TestForm = () => {
const form = useForm({
mode: 'onChange',
defaultValues: {
firstName: '',
lastName: '',
email: ''
}
});
const { register } = form;
const isFirstStepReady = useStepValidity(form, [
{ name: 'firstName' },
{ name: 'lastName', isOptional: true }
]);
const isSecondStepReady = useStepValidity(form, [{ name: 'email' }]);
return (
<form>
<div>
<label>First Name</label>
<input {...register('firstName', { required: true })} />
</div>
<div>
<label>Last Name</label>
<input {...register('lastName')} />
</div>
<div>
<label>Email</label>
<input {...register('email', { required: true })} />
</div>
<p>First Step Ready: {isFirstStepReady ? 'Yes' : 'No'}</p>
<p>Second Step Ready: {isSecondStepReady ? 'Yes' : 'No'}</p>
</form>
);
};
NOTE: getFieldState
you should handle fields that optional but have some other validation rules (is it covered in the example).
This page has all the methods for the rest api: https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0&preserve-view=true
same Problems i fix this problema with Update tsconfig.json with following code.
"lib": [
"es2018",
"dom",
"ES2022", "dom", "dom.iterable"
]
or
"compilerOptions": {
"lib": ["ES2022", "dom", "dom.iterable"]
}
reference of error
I have a problem configuring bootstrap 5.3.0 in angular 15, popovers, tooltips and toasts no work
sad , tried it with : javascript:(function(){ document.querySelector('video').playbackRate = 2.0 ; })();
to speed up netflix video.
Only working for few seconds on netflix then back normal speed in firefox on linux
Using just cycle and the built-in zip you can also just do it like this.
from itertools import cycle
[char for _, char in zip(range(3),cycle(["a","b","c"]))]
This works because zip
just stop when an iterator is depleted.
You can, but you shouldn't. Vercel has a different approach to hosting backend works, and compared to your traditional setup it would be non-performant. I would suggest Heroku, but as the post below states, it is no longer free and may not be suited for you.
This was already answered in another StackOverflow post too, here. I recommend you reading and verifying as I'm newer. It also tells you how to set it up on up-to-date information, if you're still interested.
I am not able to comment below your question due to fewer reps, so mentioning my observation here.
@media ( max-width : 968px) {
#sidebar.active {
margin-left: 0;
transform: none;
}
}
The above lines are commented in your CSS file inside the media query. Can you remove the comments and check?
How does the plot works for the Multiple dates estimations?
use cvtss2sd before printf
transform float to double
This might be a session vs system daemon issue, can you try adding --connect qemu:///system
to your virt-install
command, and/or running it with sudo
? Some distributions default to using the qemu:///session
daemon by default, which doesn't have a default network. Unless you need this machine to run as your user or otherwise unprivileged?
After trying to deploy locallly first and via cloud run, I have fixed the issue. It is just need to refresh the ADC credentials, due to the validity status false (expired).
Here is the code :
def _get_credentials():
"""
Mendapatkan kredensial menggunakan Application Default Credentials (ADC).
Di lingkungan Cloud Run, ini akan menggunakan service account yang terkait.
"""
try:
logging.info("Attempting to get credentials using google.auth.default()...")
credentials, project_id = google.auth.default(scopes=SCOPES)
logging.info(f"Successfully obtained ADC. Project ID: {project_id}, Type: {type(credentials)}")
if hasattr(credentials, 'service_account_email'):
logging.info(f"ADC: Service Account Email (from ADC): {credentials.service_account_email}")
else:
logging.info("ADC: Service Account Email attribute not found (expected for user creds from gcloud auth application-default login, not typical for SA on Cloud Run).")
# Periksa validitas awal ADC
adc_initially_valid = credentials and credentials.valid
logging.info(f"ADC: Credentials initial valid check: {adc_initially_valid}")
# Jika kredensial ADC awalnya tidak valid, coba lakukan refresh.
# Ini akan memastikan upaya refresh selalu dilakukan jika ADC tidak langsung valid.
if not adc_initially_valid and credentials:
logging.warning("ADC: Credentials initially invalid. Attempting refresh...")
try:
credentials.refresh(Request())
logging.info("ADC: Credentials refresh attempt completed.") # Log setelah refresh dicoba
except Exception as adc_refresh_err:
logging.error(f"ADC: Failed during credentials refresh attempt: {adc_refresh_err}", exc_info=True)
# Biarkan credentials.valid akan diperiksa di bawah
if not credentials.valid:
# Ini seharusnya tidak terjadi di Cloud Run dengan SA yang dikonfigurasi dengan benar.
logging.warning("Credentials obtained but are not marked as valid after potential refresh. This might indicate an issue with the ADC setup or permissions.")
# Anda bisa memutuskan untuk mengembalikan None di sini jika validitas sangat krusial
# return None
return credentials
except google.auth.exceptions.DefaultCredentialsError as e:
logging.error(f"Failed to get Application Default Credentials: {e}", exc_info=True)
return None
except Exception as e:
logging.error(f"An unexpected error occurred while getting credentials: {e}", exc_info=True)
return None
@app.route('/check-adc')
def perform_adc_check():
"""Melakukan tes untuk mendapatkan ADC."""
logging.info("Performing ADC check...")
credentials = _get_credentials()
if credentials and credentials.valid:
logging.info("ADC check successful: Credentials obtained and are valid.")
project_id_msg = f"Project ID from ADC: {credentials.project_id}" if hasattr(credentials, 'project_id') else "Project ID not directly available on credentials object."
return f"ADC Check OK: Credentials obtained and are valid. {project_id_msg}", 200
elif credentials and not credentials.valid:
logging.error("ADC check found credentials, but they are NOT valid.")
return "ADC Check FAILED: Credentials obtained but are not valid.", 500
else:
logging.error("ADC check FAILED: Could not obtain credentials.")
return "ADC Check FAILED: Could not obtain credentials.", 500
Thanks
Build->Rebuild project
There's a Morphia 2.5 now that brings driver 5.0+ support, fwiw. 2.4.x and 2.5.x only differ in what drivers they support so the transition should be seamless for you.
My 50 cents to the topic. A one liner to get a cookie value.
I had to add a session check / creation to a webhook in n8n, so I used:
//get:
let sessionKey = $json.headers.cookie.matchAll(/([^;=\s]*)=([^;]*)/g).toArray().find(c => c[1] == 'SESSID')?.reduce((acc, v, k) => k == 2 ? decodeURIComponent(v) : acc, '') ?? '';
Yes, $json.headers.cookie would be need to be the correct request.headers?.cookie array.
n8n Workflow: https://community.n8n.io/t/how-to-set-a-real-session-id-through-the-browser-for-webhooks/113570/1
gist: https://gist.github.com/BananaAcid/42a5a4bdb95678154202ae391232c224
In postman, form data, click the ... new bulkedit button to add content type column, the for the document row choose application/json. look at this screenshot postman image
Here's how I got my TextBox to fill the form:
<DockPanel LastChildFill="True">
<TextBox TextWrapping="Wrap" Text="TextBox" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
AcceptsReturn="True" AcceptsTab="True" />
</DockPanel>
As of May 2025, github.copilot.editor.enableAutoCompletions
has been deprecated, instead use github.copilot.enable
:
"github.copilot.enable": {
"*": false
}
Clear Lockdown Folder on PC (Important!):
Navigate to:
C:\ProgramData\Apple\Lockdown
Delete everything in that folder. These files store pairing records that may be corrupted.
Reconnect your device and re-trust it.
other file is separate module, you need to create it as a package. With in the same project check config base path
If you are like me, and you only want to disable annoyances with quotation autocompletion, and continue having braces autocomplete, you may be in luck!
I just installed this plugin here to fix the usability issues:
https://marketplace.visualstudio.com/items?itemName=MadsKristensen.QuoteCompletionFix
This fixed my issues with quote autocompletion in code files from what I can tell so far - but the issue still persists in plain text files. But I don't care about quote or brace autocompletion in text files, so I just disabled it entirely for only that file type by turning off the option located in the Visual Studio UI at:
Toolbar -> Tools -> Options -> Text Editor -> Plain Text -> General -> Automatic Brace Completion
Many thanks to Mads Kristensen for this highly useful extension!
I have this same issue. Were you able to solve it?
Ensure assets/images/logo.png
exists with correct casing and is listed under flutter > assets:
in pubspec.yaml
with proper 2-space indentation.
Run flutter clean
, then flutter pub get
, and restart the app (not just hot reload).
Check the debug console for asset loading errors.
That double colon (::) is invalid. It should be just:
background-color: #fff;
and
body {
background-color: rgba(255, 200, 100, 0.5);
color: #0af;
}
Also Make Sure: Your file css/style.css is actually located at project-root/css/style.css.
Youâve cleared browser cache or done a hard reload (Ctrl+Shift+R).
this would probably work, right?
list = ["alex", "jack", "sam", "patrick"]
output = ""
for i in list:
output += i + " "
print(output)
aaah how did you fix your issue?
Appearntly, when origin is an Azure resource, like a WebApps or static website, etc, you must also include the parameter
--origin-host-header "$STORAGE_WEB_APP_URL"
otherwise all requests will fail.
When the askyesno pops up, there are 2 buttons: Yes and No, but I want to customize these buttons to "OK" and "Cancel", for example.
Add the Askyesno
module import.
Snippet:
def confirm_choice():
response = askyesno("Are you sure you want to choose this text file?")
if response:
print("User chose Yes")
else:
print("User chose No")
To locate hotels near the Dubai World Trade Centre (DWTC) using Selenium, you can automate the process of extracting hotel information from online booking platforms. This involves writing scripts that navigate to hotel booking websites, input search criteria for DWTC, and scrape details such as hotel names, addresses, and prices. For a comprehensive list of accommodations near DWTC, you can refer to DWTC hotels, which provides curated options tailored to various preferences and budgets.
From MySQL documentation https://dev.mysql.com/doc/refman/8.4/en/create-temporary-table.html
CREATE TEMPORARY TABLE `TempTable`
SELECT * FROM ( WHATHEVER, UNION, ETC ) Z ;
SELECT * FROM `TempTable`;
If you pass the entire datos data frame to qcc it will include the Nro..Muestra column in the data analysis. You will get your desired plot if you drop that column from the data passed to qcc().
qcc(datos[,-1], type = "R")
You only perform one simultaneous.
Snippet:
def BuildApplication():
for key in jsonValueDict:
label = ttk.Label(topContainer, text="Insira a coluna " + jsonValueDict[key])
label.pack()
entry = ttk.Entry(topContainer)
entry.pack()
:
:
Screenshot:
As of now (3.14 beta), there's no internal mechanism in CPython to trigger any callback after a line executed.
Since Python 3.13, pdb has supported multi-line input natively.
@shrotter answered but removed their comment. suggestion was to try testvar="B3"
this worked, thanks!
Please give this a try. Defining RELEASE
as zero(0) or one(1) will directly impact the length of array filtered_data
... smaller if RELEASE
==1 ... which assumes you do Not want the full array of data for production/release.
Compiles and runs in both modes ( RELEASE
1 or 0 ); tested in Visual Studio just now.
#include <stdio.h>
#define RELEASE 0
#if RELEASE
#define MACRO_DATA 0
#else
#define THRESHOLD 5
#define MACRO_DATA \
X( 1 ) \
X( 8 ) \
X( 3 ) \
X( 12 ) \
X( 5 )
#define X(value) ((value) >= THRESHOLD ? value : -1),
#endif //RELASE
// Generate filtered array
int filtered_data[] = { MACRO_DATA };
int main()
{
printf("%d\n", filtered_data[0]);
return 0;
}
If you have this problem in your Composable Preview, you can downgrade the API level like this
@Preview(apiLevel = 34)
Or update your Android Studio