The fact that you need to manually run php artisan serve
suggests that the entrypoint or CMD in your Docker container isn't properly configured to automatically run the Laravel server.
docker-compose.yml
, remove the entrypoint field, since you're
already handling that in the Dockerfile.php artisan serve --host=0.0.0.0 --port=8000
. You may want to make sure that this command is being executed properly, especially after composer install
.Finally,I have found out the real solution.Replace
IssuerSigningKey = new X509SecurityKey(AppleRootCA),
to
IssuerSigningKey = new ECDsaSecurityKey(certificate0.GetECDsaPublicKey()),
All things will work well.
This solution helps me: https://github.com/naveenjangra2/AppStoreServerNotifications
Also,here is an example token from App Store Server Notifications I found out in Github.com:https://github.com/alexalok/AppStoreServerNotificationsV2/blob/main/AppStoreServerNotificationsV2/Converters/Sandbox_Resubscription.json
Thanks naveenjangra2 and alexalok works!
Both usleep(1) and usleep(0) need to make system calls and undergo two scheduling (the first time is to be deprived of the CPU, and the second time to regain the CPU). For such a process, it is generally greater than 1us.
The kernel timer will re-awaken your test program exactly after 0us and 1us. At this time, your test program may even be completing the first context switch? So for your test program, one usleep(0) and one usleep(1) take the same time.
I was thinking of doing the same thing, it would be a lot cooler if those lines indicated the flow of the code. I was thinking of making a visual debugger so that I can add lines like that.
Yes, you can definitely find the proxy URL for the installed app. To do this:
Our Swagger file has this as the uri value - uri: Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${testlambda.Arn}/invocations
How will your export value for the lambda arn will replace the whole uri value.?
Search for "Artifact Registry API" in the Google console and then Enable it.
This solved my problem.
This will occur only if you are dealing with "Selenium" projects.
I was having trouble renaming the project and the project folder/directory.
I tried everything mentioned above and I was successfully able to change the name of the project but for some reason, I was not able to change the name of the project folder/directory. It was always throwing an error "[enter image description here][1] [1]: https://i.sstatic.net/Qs9RbZ3n.png "
If you are facing this issue you can resolve this, by following steps. Open task manager > Close all the instances of "chromedriver/any_driver_you_are_using" > Try Renaming the project file now. It should work.
use annotation @JsonIgnoreProperties(ignoreUnknown = true) at class level import from packaage org.codehaus.jackson.annotate.JsonIgnoreProperties
maybe you are not in the helloworld project dir
I just wanted to share the latest tutorial I watched on the ExpoGo channel on YouTube had a very simple solution that worked perfectly for me. You need to install first this: 'npm i react-native-keyboard-controller" Then import this on your root layout :
import { KeyboardProvider } from "react-native-keyboard-controller";
my layout:
import { Stack } from "expo-router/stack";
import { KeyboardProvider } from "react-native-keyboard-controller";
export default function _layout() {
return (
<KeyboardProvider>
<Stack screenOptions={{ headerShown: false }}>
<Stack.Screen name="index" />
</Stack>
</KeyboardProvider>
)
}
screen:
import { StyleSheet, Text, View } from 'react-native'
import React from 'react'
const App = () => {
return (
<GestureHandlerRootView>
<View style={{ flex: 1, backgroundColor: color.white }}>
<KeyboardAwareScrollView bottomOffset={30} style={{ flex: 1 }}>
<View style={{ alignItems: "center", paddingTop: hp("4%") }}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<TextField
name={"First Name"}
value={firstName.value}
placeholder="Enter your First Name"
showError={isSubmitted}
onChange={firstName.onChangeText}
errorMessage={firstName.error}
/>
<TextField
name={"Middle Name"}
value={middleName.value}
placeholder="Enter your Middle Name"
onChange={middleName.onChangeText}
/>
<TextField
name={"Last Name"}
value={lastName.value}
placeholder="Enter your Last Name"
onChange={lastName.onChangeText}
showError={isSubmitted}
errorMessage={lastName.error}
/>
</TouchableWithoutFeedback >
</View>
</KeyboardAwareScrollView>
</View>
</GestureHandlerRootView>
)
}
export default App;
Incase your having trouble understanding, this is the link: [https://www.youtube.com/watch?v=Y51mDfAhd4E&ab_channel=Expo]
How I fixed this problem is by using Pavind's technique and replacing the spaces with '_', but it still didn't work all of the time. Thank you.
"jest.runMode": {
"testFileOnly": true,
"runAllTestsOnStartup": false,
"type": "on-save"
},
After, reload or refresh the extension. Now, when you go back to a test file and SAVE, it will only run the tests on that file.
I did it like this:
RichEditor::make('editor') ->extraInputAttributes(['class' => 'max-h-96'])
In your custom theme css file mainly found on resources/css/filament/admin/theme.css you should add the following to make the toolbar sticky:
trix-toolbar { @apply !sticky top-0 z-[19] bg-white; }
For protocolbuf order of fields is guaranteed because of the binary encoding it utilizes,so you can be confident to generate md5 checksum.
But for json it is not always guaranteed, here is the reference from official json specification for reference stating json objects are unordered and the behaviour of software that receives these objects are unpredictable :
https://tools.ietf.org/html/rfc8259#section-4
But most json parsers take care of this for you but to have an additional check you can always sort the keys of your json object before actually generating the checksum.
If I understand your question correctly, you’re looking for an API that can retrieve details of a booked flight using an ID. In that case, you can use the GetBooking API. Simply replace the flight-orderId parameter with your PNR (Passenger Name Record).
Get the best deals on gold earrings in Bangladesh at Goynar Khoni. Discover quality, stylish designs that shine! Explore the best gold earrings price in Bangladesh at goynarkhoni.com. We offer a wide selection of stunning gold earrings that cater to every style and budget. We will find modern traditional gold earrings with the best design. We made gold earrings from pure gold like 24k, 22k, 18k which are imported from India,Dubai and Qatar. Anyone can customise the earring design as per their choice. Usually people use thin earrings for regular use. And the type of gold that is usually used for an event or wedding is a bit heavier than that which makes them cost a bit more. They are a popular choice for both everyday wear and special occasions.
Adding pointer-events: all
solved the issue
Each new READ operator starts to read data from a new line. That is a reason why your code does not work properly, as you expected.
If the @lastchance's solution READ (33,*) A
will work - it is OK. If not, the straightforward way will be just to make a cycle until end-of-file or until nx*ny numbers is read. At each cycle iteration you would read six (or less) numbers and put them in the corresponding matrix entries.
When silence is detected AcceptWaveform()
returns True and you can retrieve the result with Result()
. If it returns False you can retrieve a partial result with PartialResult()
. The FinalResult()
means the stream is ended, buffers are flushed and you retrieve the remaining result which could be silence.
What you could do is
import json
text = []
with open(audio_file, "rb") as audio:
while True:
data = audio.read(4000)
if len(data) == 0:
break
# if silence detected save result
if recognizer.AcceptWaveform(data):
text.append(json.loads(rec.Result())["text"])
text.append(json.loads(rec.FinalResult())["text"])
and you get a list of sentences.
White spots in CycleGAN outputs can happen due to early training stages, hyperparameter issues, or lack of diverse training data. Keep training to see if it resolves, and check learning rates or regularize the discriminator. Using a black screen background can help spot display issues like white spots or artifacts more effectively, making it easier to address them.
I'm not too sure with VSCode in this case, check and see if MySQL server is listening on the correct port first (default is 3306)
netstat -an | find "3306"
And look for address:
0.0.0.0:3306
Another possible problem could be to do with user permission and Firewall.
Check with the step above first.
Gold earrings price in Bangladesh Get the best deals on gold earrings in Bangladesh at Goynar Khoni. Discover quality, stylish designs that shine! Explore the best gold earrings price in Bangladesh at goynarkhoni.com. We offer a wide selection of stunning gold earrings that cater to every style and budget. We will find modern traditional gold earrings with the best design. We made gold earrings from pure gold like 24k, 22k, 18k which are imported from India,Dubai and Qatar. Anyone can customise the earring design as per their choice. Usually people use thin earrings for regular use. And the type of gold that is usually used for an event or wedding is a bit heavier than that which makes them cost a bit more. They are a popular choice for both everyday wear and special occasions.
MirrorFly has customizable Chat SDK for Flutter app development. It's an SDK that I recently found more reliable for my projects.
after creating PNR you need to use the airtickting api that is used to issue ticket
Please check the requirements on the API page. If you want help to find a consolidator get in touch with us via the support channel and we can recommend you one.
I would recommend looking at this answer. Doesn't use iron python and works way more reliably
Found the answer, on my types it should be z.number()
instead of z.string()
for the productId
and variantId
import * as z from 'zod'
export const createOrderSchema = z.object({
total: z.number(),
status: z.string(),
paymentIntentId: z.string(),
products: z.array(
z.object({
quantity: z.number(),
productId: z.number(),
variantId: z.number(),
}),
),
})
Here is a script that I wrote to handle HTTP requests from SNS for Email Bounces.
LOWER(RAWTOHEX(DBMS_CRYPTO.HASH(l_blob, DBMS_CRYPTO.HASH_SH256)));
I figured it out, had to do with RLS policy.
flutter upgrade
flutter pub get
Do you solved this issue in rundeck?
After upgrading my pixel 8 from android 14 to 15 I was facing the problem that the device turned offline suddenly, to solve it, I disabled developer options, then rebooted,then enabled developer options again and now it is working
I had the same problem, and your solution was spot on. Thanks V. Sambor!
The flush: 'sync'
option ensures that the subscription callback is called immediately when the state changes, rather than waiting for the next rendering cycle.
Here is something that works, I tested it mysel in my own project: https://github.com/sergi/jsmidi
You can just run
brew uninstall cmake
and run
brew install --cask cmake
then it will be in your "Application" (tried it on MacOS 15.1)
You don't need maven installed on your slave if it is configured with jenkins master Instead, Jenkins uses its Maven tool installation configuration and can dynamically install Maven or execute it directly from the master. I tried this myself and works fine for me.
Jenkins allows you to define Maven installations under Manage Jenkins > Global Tool Configuration. You can specify the version of Maven Jenkins should use. If the "Install automatically" option is enabled, Jenkins downloads and installs Maven on the agent dynamically when needed.
Maven Installed on Master (Available to Slave): If you’ve configured the Maven installation on the Jenkins master and the jobs are configured to use that installation, Jenkins can invoke Maven remotely on the slave without requiring Maven to be installed on the slave itself.
Agent Workspace Setup: Jenkins copies the necessary tools and dependencies to the agent workspace for the build. For Maven builds, Jenkins will use the Maven installation defined in its configuration and make it accessible to the agent.
Pipeline Configuration: In pipeline jobs, the withMaven step or similar methods can configure Maven to run as part of the pipeline without requiring it to be pre-installed on the agent.
Make sure to verify that the routes are correctly set up in the subnet where your RDS instance is located. To do this: • Go to the VPC settings in your AWS Console. • Navigate to Subnets and select the subnet where your RDS instance is located. • Click on Route Tables.
There should be a route similar to this: • Destination: 172.26.0.0/16 • Target: pcx-******** (your VPC peering connection).
For some reason, when a peering connection is created, it doesn’t automatically add routes for subnets associated with an Internet Gateway (if that’s your case). You’ll need to manually add the route to enable communication.
In Windows 10 I added <ANDROID_SDK_PATH>/platform-tools
path to the path of environment variables and it fixed.
This issue is resolved with Strong Skipping Mode, which is enabled by default starting from Kotlin 2.0.20.
However, to give you a brief explanation, the root of the problem lies in Lambda memoization.
In Jetpack Compose: • All lambdas are stable by default. • With Strong Skipping Mode enabled, lambdas with unstable captures are also memoized. This means that all lambdas written in composable functions are now automatically remembered.
Why does this happen?
The issue arises from how Compose handles recompositions.
In Jetpack Compose, recomposition occurs when a Composable’s input parameters change.
Here, viewModel::doNothing is a member reference. When passed to the TopBar Composable, it’s evaluated to an object that holds the function reference internally. While this may seem constant, Compose doesn’t guarantee that viewModel::doNothing is referentially stable. As a result, any updates to the deviceList cause Compose to treat viewModel::doNothing as a new value, leading to recompositions.
From the Android documentation:
Without memoization, the runtime is much more likely to allocate a new lambda to any Composable that takes a lambda parameter during recomposition. As a result, the new lambda has parameters that are not equal to the last composition. This results in recomposition.
Note: A common misconception is that lambdas with unstable captures are themselves unstable objects. This is not true. The Compose compiler always considers lambdas to be stable. However, with Strong Skipping Mode disabled, the compiler does not memoize them, and the runtime allocates them during recomposition. As such, lambdas with unstable captures cause Compose not to skip Composables because they have unequal parameters.
Why does wrapping doNothing in a variable (e.g., doNothingVal) prevent recompositions?
When you wrap the function in a variable, you’re creating a stable lambda. Compose recognizes that this variable reference does not change and treats it as referentially stable, preventing unnecessary recompositions.
Additional Resources
I highly recommend checking out the Android documentation and articles about stability and recomposition in Jetpack Compose for a deeper understanding of these concepts:
Wait I found it, it seems so obvious now, just use readFileSync from fs.
import { readFileSync } from "node:fs"
export async function load({ }) {
let latestVid
try {
latestVid = JSON.parse(readFileSync('/srv/site-scraper/latest-posts/latest-vid.json'))
} catch (e) {
return { "error" : e.default }
}
return {
"latestVid" : latestVid
}
}
I just wasn't asking the right questions to find the right answers on Google to begin with.
I checked the output of the which jupyter
and I have been using the default Jupyter and there were no Jupyter installed in the virtualenv. I just needed to install jupyter lab
at the same python/pip.
The formatting rules from eslint configs are conflicting with prettier configs.
Prettier recommends disabling formatting rules in your linter, you may need eslint-plugin-prettier or prettier-eslint. I am using the first one together with eslint-config-prettier.
These two eslint-*-prettier
plugins import the prettier formatting configuration into the eslint config and automatically close the conflicting rules from the eslint.
Finally, I turned on editor.codeActionsOnSave
in .vscode/settings.json
and turned off formatting as follow:
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
}
Here, the problem should be solved.
But you could also turn on editor.formatOnSave
and make esbenp.prettier-vscode
as your default formatter of vscode:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
}
Be careful, you had better check if the esbenp.prettier-vscode
read your config file correctly. I encountered the situation where this plugin could not read the project prettier configuration correctly. As a solution, I added the following configuration:
{
"prettier.configPath": ".prettierrc.js"
}
I had same errors, was just navigating through then all was resolved by them selves, I guess it's because of internet connectivity
saved my day! thanks for the solution.
Even though my widget was already wrapped inside a Consumer, the AlertDialog required its own dedicated Consumer to properly listen for state changes. Wrapping the AlertDialog content in a separate Consumer resolved the issue for me.
Pandas update multiple columns at once >>>
The below working fine in Google Colab but failed with Azure Synapse.., could be due to version of runtime/packages
HISTORY.loc[HISTORY.InstProdID.notnull() & HISTORY.ScanDate.notnull(), ["Last_FileName", "Last_Uploaded", "Sync"]] = pd.DataFrame({'Last_FileName':HISTORY["FileName"], 'Last_Uploaded':HISTORY["Uploaded"], 'Sync':1})
Downgrading python to 3.11.9 worked. As per the OpenAI Whisper documentation they only support till version 3.11.9
Here is another scenario. There was not enough space on the remote machine. After making some space, remote ssh via vscode worked
Today I also encountered the issue where Ctrl+Space doesn't work. The reason is that the older version of Microsoft Pinyin input method occupies the shortcuts Ctrl+Space and Shift+Space.
Try turning off 'Use the previous version of Microsoft Pinyin input method'.
I have same expectation. TamperMonkey could help to run script in the browser without self coding another extension. But we need to know web-based knowledge and JS in advance to start coding. If I have free times, I will try to implement it and share it later, but not sure
Answering my own question 6 years ago, I guess I was visionary. This is now called a graph RAG.
Please tell me how you solved your problem, because I have the same problem?
If you're looking for an SEO expert to boost your website's visibility, there are several great places to start. Popular platforms like Upwork, Fiverr, and Freelancer offer a wide range of skilled professionals, from beginners to seasoned experts, ready to help with your SEO needs. For a more personalized approach, LinkedIn is an excellent choice to connect with experienced SEO specialists and agencies. Additionally, you can explore local marketing agencies or online communities like Reddit and specialized SEO forums for recommendations. Finding the right SEO expert has never been easier!
SEO (Search Engine Optimization) is the practice of optimizing your website to rank higher on search engine results pages, increasing visibility and driving organic traffic. It's essential for businesses looking to enhance their online presence, attract more customers, and stay ahead of competitors. By leveraging SEO strategies, I can help improve your website's ranking, optimize content, and boost overall site performance. Visit www.mulychar.com to learn more about how I can support your SEO needs and help your business grow online!
I also had similar error, but its turn out because i use powershell instead of cmd on vscode when i type the conda activate name
Try this maybe;
"Address": "http://posting-service:5100/weatherforecast"
For me, the following procedure worked. https://github.com/sedwards2009/extraterm/issues/439#issuecomment-2367414877
I think what you are looking for is this obfuscation software. Just as you requested, it can generate shorter variable names and has a high compression rate. It runs on a server (JS obfuscation assistant), known as JS Confuse Helper, and supports command-line invocation. Official website: https://acoolcode.com
salesforce_metadata_map = { ".cls": "Apex Class", ".trigger": "Apex Trigger", ".page": "Apex Page", ".cmp": "Apex Component", ".testsuite": "Apex Test Suite", ".app": "Application", ".approvalprocess": "Approval Process", ".flow": "Autolaunched Flow", ".assignmentrule": "Case Assignment Rule", ".escalationrule": "Case Escalation Rule", ".milestone": "Case Milestone", ".certificate": "Certificate", ".community": "Community", ".connectedapp": "Connected App", ".contentchannel": "Content Channel", ".contentversion": "Content Version", ".field": "Custom Field", ".labels": "Custom Label", ".object": "Custom Object", ".customsetting": "Custom Setting", ".custommetadatatype": "Custom Metadata Type", ".dashboard": "Dashboard", ".datacategorygroup": "Data Category Group", ".dataextension": "Data Extension", ".document": "Document", ".email": "Email Template", ".endpoint": "Endpoint", ".environmenthub": "Environment Hub", ".externaldatasource": "External Data Source", ".externalservice": "External Service", ".flowresource": "Flow Resource", ".globalvalueset": "Global Value Set", ".group": "Group", ".homepagecomponent": "Home Page Component", ".inboundmessage": "Inbound Message", ".layout": "Layout", ".mobileapp": "Mobile Application", ".namedcredential": "Named Credential", ".network": "Network", ".notificationtype": "Notification Type", ".objectpermissions": "Object Permission", ".permissionset": "Permission Set", ".platformevent": "Platform Event", ".policy": "Policy", ".postinstall": "Post-install Script", ".profile": "Profile", ".queue": "Queue", ".recordtype": "Record Type", ".remotesitesetting": "Remote Site Setting", ".report": "Report", ".resource": "Static Resource", ".role": "Role", ".samlsso": "Saml SSO Settings", ".searchlayout": "Search Layout", ".sharingrule": "Sharing Rule", ".site": "Site", ".subjectarea": "Subject Area", ".synonymdictionary": "Synonym Dictionary", ".testsuite": "Test Suite", ".translation": "Translation", ".user": "User", ".userpermissions": "User Permission", ".weblink": "Web Link", ".workflow": "Workflow Rule", ".x509certificate": "X.509 Certificate", # For Lightning Web Component (LWC), we can use nested dictionaries for the different file types: ".html": "Lightning Component Bundle (LWC) - template", ".js": "Lightning Component Bundle (LWC) - controller", ".xml": "Lightning Component Bundle (LWC) - configuration" }
The Clients like Postman or thunderclient, the CORS Policy will be bypassed.
but in Browsers: for any dev or local, The Response header from backend should include to allow access from cross origins, similar to this: 'headers': { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET' },
if production, try to include only the specific domain of the frontend: 'headers': { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': 'https://your-frontend-domain.com', 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET' },
After debugging, I found how I constructed the $endpoint
with variables is troubling.
Not the permission issues.
Below is the correct one without single quotes:
$endpoint = "https://us-central1-aiplatform.googleapis.com/v1/projects/$project/locations/$location/publishers/$publisher/models/$model:predict";
Use this temp mail for ease: freecustom.email
They also have their API for extracting the emails with free requests: https://rapidapi.com/dishis-technologies-maildrop/api/temp-mail-maildrop1
You can tweak your formula to make sure it works over the years. Here's an improved version:
=WEEKNUM([@dates] - WEEKDAY([@dates], 2) + 1)-WEEKNUM(DATE(YEAR([@dates]), MONTH([@dates]), 1) - WEEKDAY(DATE(YEAR([@dates]), MONTH([@dates]), 1), 2) + 1) + 1
This function calculates the nearest Monday for each date. It also adjusts each date to the closest Monday or moves backward to the previous Monday if needed. It also finds the first day of the month and calculates the Monday that's closest to or following that day. It also calculates the week difference relative to the first Monday of the month.
Can you use compile with g++ then run it? I supposed you are using CodeRunner.
Airflow automatically adds ~/airflow/dags/
to the python path yes.
But you can do so manually with any folder:
export PYTHONPATH=~/my_project
This should give all of your DAGs access to the my_project
packages.
NOTE : I do not have enough reputation for the comment, or else this should be comment.
The correct mark answer has a minor issue. The session Prefix is duplicated.
const generateSessionKey = (req) => {
const userId = req.session?.user?.id ? req.session.user.id : '';
const randomId = Math.random().toString(36).substring(2);
return `session:${userId}:${randomId}`; // <-------- either put session here or in prefix, if it is present at both places then we will have duplicated and in the query we will never get keys.
};
app.use(
session({
store: new RedisStore({ client: redisClient, prefix: 'session:' }),
secret: 'your-secret-key',
resave: false,
saveUninitialized: false,
genid: generateSessionKey, // Use the custom session key generator
})
);
//to delete the sessions
app.post("/clear-sessions",async (req,res,next)=>{
const sessions = await redisClient.keys(`session:${req.user.id}:*`);
await redisClient.del(sessions);
res.send("OK")
})
When I moved to the new environment, changing the remote Python Path was just one of two steps. The other step was changing the Conda to the new environment on the upper right.
[![Place to change the path to the current Conda][1]][1]try to use suppressHydrationWarning
inside html tag at RootLayout
I use this library https://github.com/Rahiche/riveo_page_curl
Here is video :https://www.youtube.com/watch?v=4rBlKWhYnVY
Here is core code:
ShaderBuilder(
(context, shader, _) {
return AnimatedSampler(
(image, size, canvas) async {
// print("AnimatedSampler");
if (backImage != null) {
ShaderHelper.drawShaderRectBack(backImage!, size, canvas);
}
if (curlImage != null) {
ShaderHelper.configureShader(
shader, size, curlImage!, _animation.value);
ShaderHelper.drawShaderRect(shader, size, canvas);
}
},
enabled: true,
child: Container(
width: double.infinity,
height: double.infinity,
),
);
},
assetKey: shaderAssetKey,
)
backImage is page curl background, curlImage is page curl foreground.
did you manage to find the solution for this problem? I'm facing the same issue.
Thank you.
this is an older topic, but it may help someone:
#full name
full_name = "armin van buuren"
#First name
print(f"Name : {full_name.split(" ", 1)[0].title()}")
#family name or last name
print(f"Surname : {full_name.split(" ", 1)[-1].title()}")
Result:
Name : Armin
Surname : Van Buuren
In pubspec.yaml file, change the version of the package 'youtube_explode_dart' to the latest one (*currently),
youtube_explode_dart: ^2.3.6
YouTube always changes its data access methods so the old version packages must be updated.
I have the same issue and this is how I can fix it.
But remember to choose Collection View -> Size Inspector -> Estimate Size set to None.
This will let you conform to UICollectionViewDelegateFlowLayout.
extension BaseViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 8
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 8
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let itemWidth = ((collectionView.bounds.width - 16)/3)
return CGSize(width: itemWidth, height: itemWidth * 235/125)
}
}
If you have 3 items in a row, the spacing between items is 8. The width of each item is calculated as: Width = (CollectionView.Width - 16) / 3. For 5 items, the formula becomes: Width = (CollectionView.Width - 32) / 5.
235/125 represents the ratio of your cell:
let itemWidth = ((collectionView.bounds.width - 16)/3)
return CGSize(width: itemWidth, height: itemWidth * 235/125)
This works for me:
cat file | sed -e 's/$/\n/'
Basically, use sed to add \n for each end of a line ($).
You can also do this, but the newline is adding before each line:
cat file | sed -e 's/^/\n/'
Basically, use sed to add \n for each beginning of a line (^).
Sed also accept file as input, so
sed -e 's/$/\n/' file # will do the same
@Dhruva answer works please check that
import "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";
When you include quotes in your .env file, they actually become part of the string value itself - meaning your application receives the value "localhost"
(with quotes) instead of just localhost
. This can cause issues with database connection configurations since the quotes are treated as literal characters. Most database drivers and connection libraries expect clean values without quotation marks. That's why removing the quotes worked for you - it provides the raw value that the database connection expects.
For best practices in .env files, it's recommended to only use quotes when your values contain spaces or special characters that need to be preserved. For simple values like hostnames, usernames, and ports, you can safely omit the quotes. This approach ensures the values are passed to your application exactly as intended without any extra characters that could interfere with connections or configurations.
Small improvement on the (excellent) answer from LocEngineer. Please upvote his answer instead of this one.
Below restores the original cell format before restoring the cell value. That way, cell values with leading zeros (ex: "001") will be restored with their leading zeroes intact.
'Purpose:
' Removes the (unusual) leading apostrophe that exists in cell values that try to force a "text" format.
'
'Notes:
' The leading apostrophe character is weird. One can select it in the formula bar. However, Excel formulas ignore it.
'
' This sub only removes the apostrophe if it is a special "PrefixCharacter". This sub will not affect cells that do NOT have
' a PrefixCharacter (but do have a leading apostrophe as a legitimate text value) - OK.
'
' Modified from: https://stackoverflow.com/a/47510941/722945 The solution did remove
' the prefix "'" but it also changed the cell format from "text" to "general" and removed any leading zeros from cell values. The
' updates below resolve this issue.
'
'Example:
' Call RemoveApostrophePrefixCharacter(ActiveCell)
'Tested: 2024-12-04
Sub RemoveApostrophePrefixCharacter(rng As Range)
Dim cell_obj As Range
Dim original_value As Variant
Dim original_number_format
For Each cell_obj In rng
'Safety check is not really needed. Helps limit the scope to only update cells that have issue (saves a little CPU).
If cell_obj.HasFormula = False And cell_obj.PrefixCharacter = "'" Then
'Ex: Will save string "@" if text format.
original_number_format = cell_obj.NumberFormat
original_value = cell_obj.value
'Note: This will also clear the formatting.
cell_obj.Clear
'Restore cell format. Mainly to restore format if the format is "text".
'This is required for values with leading zeroes (ex: "001"). I tried calling "clear()", then reset the cell value, but the cell format turned from "text" to "general" and the leading zeroes were removed.
cell_obj.NumberFormat = original_number_format
'Restore cell value.
cell_obj.value = original_value
End If
Next
End Sub
Only slightly late to this but I disagree with everyone else.
Your colleague was also wrong, although did raise an important point without probably realising.
It’s better to have a db per application if they’re all independent. However, scalability comes into play.
Connection pool(s) are not scalable. Consider 50 tcp connection (divide that into x pools it’s irrelevant, it’s still 50 connections) in an application that’s clustered.
If you spin up 10 instances during a load spike, you now have 500 tcp connections.
Imo you have the correct design approach of 1 db per app. However ensure your apps use clustered (distributed) connection pools, and ensure your db is clustered. Both db and app should sit behind a load balancer to distribute traffic.
I ran into a memory leak and tcp port number occupancy caused by not reusing the client, which bothered me for a week. The official recommendation is to reuse clients, and it is said that Transport is in the keep-alives state by default(you can set Transport, DisableKeepAlives = True to solve, but this will cause a lot of time - wait state socket), which causes goroutine to block if http requests are sent in goroutine.
This is the data that my server exported with pprof, and you can see that there were 9101 Goroutines at the time, and then I did a special test and found that it was indeed the result of not reusing the client.
I propose "determinant" to denote field dependencies.
Example:
Value of Dependent field X depends on, or is determined by, the values of the four Determinant fields a, b, c, & d.
Values of Determinant fields a, b, c & d, determine the value of Dependent field X.
I speak with no authority whatsoever, just a general sense of semantics.
I had this issue and turned out to be CloudFlare WAF blocking the async upload requests. Once I added a rule to ignore that request my uploads starting working again
are you solved this issue? I am also facing this and tried a lot but none of them works
Based on the above answer, we can expand it to include the split between the treasury and the author. Thank you so much @Alpha Gaming Arcade.
pub struct DealWithFees<R>(core::marker::PhantomData<R>);
impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>> for DealWithFees<R>
where
R: pallet_balances::Config + pallet_authorship::Config + pallet_treasury::Config,
<R as frame_system::Config>::AccountId: From<AccountId>,
<R as frame_system::Config>::AccountId: Into<AccountId>,
{
fn on_unbalanceds(
mut fees_then_tips: impl Iterator<Item = Credit<R::AccountId, pallet_balances::Pallet<R>>>,
) {
if let Some(fees) = fees_then_tips.next() {
let mut split = fees.ration(80, 20);
if let Some(tips) = fees_then_tips.next() {
tips.merge_into(&mut split.1);
}
ResolveTo::<pallet_treasury::TreasuryAccountId<R>, pallet_balances::Pallet<R>>::on_unbalanced(split.0);
<ToAuthor<R> as OnUnbalanced<_>>::on_unbalanced(split.1);
}
}
}
Just replace:
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, DealWithFees<Runtime>>;
c is a variable so you would need to do print(str(c))
I have a two camera system at my desk on a Rpi 4B so I looked into this question a bit. I have CM270 cameras which top out at 10fps when running 1280x720, so I was not able to duplicate the exact issue you are having, however, here are some steps to attempt to isolate the source of the bottleneck.
See if writing to the filesystem is the bottleneck. Try temporarily changing your output files to /dev/null and repeat the test, see if the fps improves on camera 2. If this helps, then you could write the files to a ramdisk and then move to filesystem after recording completes.
Use top to see CPU utilization real-time while you are running both ffmpeg sessions. Mine looked like this, and showed 100% utilization on first ffmpeg and second one showed CPU usage too, but also wouldn't encode so clearly broken.
USB signal integrity does come into question when trying to extend the physics with multiple repeaters in series. Do you have the ability to temporarily attach camera 2 directly to the Rpi 5 without the repeaters and see if that affects fps at all?
How are the signal repeaters powered? You mentioned a 27W power supply to power the Rpi 5 & the cameras over USB. Depending on the current draw from your cameras + powering the repeaters, you may be experiencing brown-out conditions on the USB path. The Rpi 5 requests 25W, and has 1.6A available for USB. Not sure if thats equally split across 4 USB ports or if all 1.6A is available on a single port to drive the camera + repeater chain? The CM270 cameras I have draw about 0.22A each. The USB repeaters could draw 0.5A each, making the USB load 0.22 + 0.22 + 0.5 + 0.5 + 0.5 = 1.94A exceeding the allowable current. I'd suspect you'd be getting some USB related failures on dmesg though.
The comments were spot on, the library only supports a maximum of 54 bytes. This test confirms it. EQUAL=false
begins at 54 bytes. Thank you to the helpers in the comments.
@Test
fun test() {
for (n in 100 downTo 0) {
val secureRandom = SecureRandom()
val bytes = ByteArray(n)
secureRandom.nextBytes(bytes)
val password = Base64.getUrlEncoder().withoutPadding().encodeToString(bytes)
val passwordHash = BCrypt.hashpw(password, BCrypt.gensalt())
val modified = password.dropLast(1)
val equal = BCrypt.checkpw(password, passwordHash) && BCrypt.checkpw(modified, passwordHash)
println("BYTES=$n EQUAL=$equal")
}
}
This is the sample code for PubSubReactiveFactory
. It does not, however, explain its usage with ChannelAdapter
.
SourceBot now has support for full-text search and auto-indexing with gerrit (and a bunch of other git hosts).
This should do the trick:
declare @is_thanksgiving bit,
@cur_date datetime = getdate()
select @is_thanksgiving = case when datename(month, @cur_date) = 'November'
and datename(weekday, @cur_date) = 'Thursday'
and day(@cur_date) between 22 and 28
then 1 else 0 end
The 4th Thursday should be between:
This is very similar to Christian Pena's answer, but I think his is off by 1.
It's called the "Difference overview margin"
Thank you very much All! I have got it working with all your help actually. So it needed preventDefault()
which I had missing. I also took on board another advice to move my logics. Current JavaScript is below. It might still become fickle upon introducing further functionalities but so far so good ;)
let inputValidator = (val) => {
val = nameInput.value;
if (val.length > 15 || /[0-9.*+?><,#^=!:${}()|\[\]\/\\]+/g.test(val)) {
return `No numbers or special characters and no more than 15 characters allowed`;
} else {
console.log(val);
return val;
}
};
function greeting() {
questions.innerHTML = `Hi ${inputValidator()}`
}
let clickStart = () => {
okBtn.addEventListener("click", e => {
e.preventDefault();
greeting();
});
};
clickStart();
Moss repository with instructions: https://github.com/JobayerAhmmed/moss
You may need to run a command with the Azure CLI to authenticate with your subscription. Something like az login -u <username> -p <password>
. Not sure if that is the exact command but something like that.
In Windows, when you install java 8, the path will be C:\Program Files\Java\jre1.8.0_431\bin It will not have JDK folder. if you add this in environment variable, %JAVA_HOME% C:\Program Files\Java\jre1.8.0_431
and value should be in the path: %JAVA_HOME%/bin
it works for me. Hopefully it should work for you as well
Podman
# see the current value
podman machine inspect
podman machine stop
podman machine set --memory 4096
podman machine start
# confirm the new value
podman machine inspect
As you said, the app webhook currently does not support product_review, and there is no alternative.
If you believe that should be supported just feel free to create an contribute to https://github.com/shopware/shopware
How to convert a string to an object identifier and then retrieve/get property values for that object? There is two ways to do this in ActionScript:
eval(targetAsString.IDName); or eval(_root.targetAsString.IDName);
_root[targetAsString].IDName; or _root[targetAsString]["IDName"];
Notice how I use a string to target the value of the property, by using array-access operator [] multiple times.
I would recommend to use the the array-access operator over the eval() function because it's faster and less processor intensive. It's also a more secure solution.
This isn't working because onAppear
isn't called after ThingListView
is rendered for the first time (i.e. it isn't called when navigating back to the app). If you fully quit the app and run your shortcut, you'll see that it now works (because then onAppear
is actually called for the first time after you set your navigateToThingAddView
flag inside the intent).
One quick fix would be to use the following instead:
.onChange(of: navigateToThingAddView) { _, newValue in
if newValue {
showThingAddView = true
navigateToThingAddView = false
}
}
I should note that this whole setup with @AppStorage
and a boolean flag is a bit clunky. A better way to accomplish this would be to use @Dependency
to pass navigation info – see https://stackoverflow.com/a/77342508. You could also use onOpenURL
(see the other answer on that same question). Both would allow you to navigate without a dummy flag stored in UserDefaults
and without having to worry about setting that flag back to false.
from django.utils.decorators import method_decorator
@method_decorator(login_required, name="dispatch")
class MyExampleView(TemplateView):
template_name = "example.html"
You maybe have an idea from my repo: https://discourse.llvm.org/t/hey-guys-a-compiler-with-llvm18-and-for-beginners/83438?u=napbad Hope that it is useful:D