Consider this an addon to the answer by @Orkhan Alikhanov.
The reason it doesn't work in DbVisualizer is because that program (for some unknown reason) does not allow (difficult?) statements. You can fix this by turning on what they call "dialects" in the settings:
Then, both suggestions in the answer by Orkhan should work.
To solve the issue I was having I needed to use a delegated account. I couldn't add the service account email directly due to workspace limitations but it was able to act under an email in the workspace
credentials = service_account.Credentials.from_service_account_file(
path.join(path.dirname(__file__), "config", "credentials.json"),
scopes=scopes,
)
delegated_creds = credentials.with_subject("[email protected]")
self.service = build("drive", "v3", credentials=delegated_creds)
What if it isn't there? That was my question. I've seen it in most of my apps because I'd set runas to admin but I can't find it and my app won't allow file access on the computer. Anything? Thanks for any help!
Okay, I manage to solve this issue by doing these steps:
This should solve your problem, men. Remember that if for any reason you want to export to Android 15 then you need to migrate to Unity 6, no other solution.
To update @miradulo's great answer, the whis=range
syntax was deprecated staring in matplotlib 3.3
. The matplotlib 3.3+ way of forcing whiskers to cover the entire range of data is:
df.boxplot(grid=False, figsize=(9, 4), whis=(0, 100))
(docs for matplotlib.axes.Axes.boxplot
)
Alternately, you can remove whiskers all together and just show the interquartile range by combining whis=0
with the showfliers
and showcaps
arguments:
df.boxplot(grid=False, figsize=(9, 4), whis=0, showfliers=False, showcaps=False)
Example data:
import pandas as pd
example_data = {
2013: [1.09, 1.73, 2.23, 2.69], 2014: [0.97, 1.68, 2.00, 2.35],
2015: [1.04, 1.28, 1.85, 2.11], 2016: [0.86, 1.14, 2.12, 2.25],
2017: [1.08, 2.26, 2.44, 2.57]
}
df = pd.DataFrame(example_data)
const handleScroll = (e) => { const reachedBottom = Math.ceil(e.target.scrollTop + e.target.clientHeight) >= e.target.scrollHeight; if (reachedBottom) { // do something } };
You may try:
=sumif(TRANSPOSE($J$15:$AB$15),"Non-Clinical",$D$4:$D$22)
I'm not "reputable" enough to add a comment to the OP, but I wanted to ask if you ever resolved this. I'm having the same issue under the same OS. I wonder if newer versions of httpuv
no longer work on Win7 for some reason, as it does work fine for me on a Win10 machine.
add-
.secondary-menu-class{
display : flex;
justify content : center ;
align items : center;
}
To make sure that this is the correct class, you can add a background color and check that you are indeed aware of what you are doing.
You can use the logical function GREATEST () which returns the greater of a list of numbers.
SELECT GREATEST(<COMPLICATED CODE THAT RETURNS A SINGLE INT>, 1)
It turns out that this was caused by the client itself NOT the SQL syntax.
Apparently DBeaver was the culprit. If anyone experiences this issue with DBeaver, there is an option to turn off variables.
Did you used TypeVar correctly? Here is an example
from typing import Sequence, cast, TypeVar, Type
T = TypeVar("T")
def map_cast(T: Type[T], seq: Sequence) -> Sequence[T]:
"""Cast a sequence of elements to a sequence of elements of given type."""
return [cast(T, x) for x in seq]
a = map_cast(str, [1, 2, 3]) # a will have type hint is Sequence[str]
print(a)
For some reason mine only works when i use ' python -m notebook '
Snap curl isnt working for nvm we have to download the curl from apt its takes too much time for solve this problem even ai doesnt solve this problem
I have the same error but when I provide an absolute linux path to the file, it throws an error like this. "java.io.FileNotFoundException: ServletContext resource [/appl/suze/cert.jks] cannot be resolved to URL because it does not exist". If I place the same file under /src/main/resource packaged with jar, its working. My use-case is to make it work with external path. Any help?
The talk usually includes the science behind meditation, showing how it can positively impact brain function and overall quality of life.
The speaker frequently emphasizes the transformative power of mindfulness practice, stressing how even brief meditation sessions can significantly improve mental well-being by reducing anxiety, improving focus, and increasing self-awareness.
This helps people better navigate the stresses of daily life by learning to observe their thoughts and emotions without passing judgment.
Important topics frequently discussed in a meditation TED talk:
1).The advantages of meditating higher self-awareness, better focus, better emotional control, less stress, and the ability to counteract harmful thought patterns.
2). The fundamental idea of meditation is mindfulness practice, which is focusing on the here and now without passing judgment and noticing thoughts and emotions as they come up scientifically.
Answering since I cannot add comments. I'm running Git on Windows and the following alias works for me, it is very similar to yours:
git config --global alias.pullall !"git pull && git submodule update --init --recursive"
Then you can run the command git pullall
.
I don't remember why it was, but my alias wasn't working when I used single quotes to wrap my command. May have been a Windows-issue.
def __str__(self):
return f"""{self.date} - {self.time}
Tags: {self.tags}
Text: {self.text}"""
Once the token is found, add it here and your app won't have issues.
I did add it to home, and when I click on the icon of my home I still see this "Push notifications are not supported...".
Is there something else I have to do?
Need environment variables to be defined here. I resolved the same issue for me by create three paths
Try createPresignedPost
instead.
I found that Milvus treats %
as a wildcard. To query literal %
or other special characters, we need to escape them.
Escape %
and \n
: use \%
for %
and \\n
for newlines.
field like "abc%"
.field == "abc"
.%
(e.g., "abc%def%"
) requires escaping.To use the auto-update mechanism for your Python GUI application using the GitHub Enterprise repository, you need to pass authentication and successfully download and execute the binary update. You can follow the steps below:
Steps to create auto-update tasks:
For Windows users, even with opening PowerShell as Administrator didn't solve the case for me...
The problem can be solve with the PowerShell(as Admin) command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Answer Y to autorize the script's execution.
et Voila!
Now you can run rpm install without any restrictions
To learn more about execution policies : https://learn.microsoft.com/fr-fr/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.5
If there are no Github status outages, as the other answers have suggested, and you have done the suggestions stated for dealing with the browser caching issues, then simply closing the pull request and then reopening it should clear it.
I used Snake YML to resolve this. I have to change the prop file to YML file and read it through snake yml. the used ObjectMapper to convert it to Map<String, Identity>
:white_check_mark: fixed by bumping Capybara to 3.40.0
I appreciate your offer to let me participate in the improvement of your app! However, I have now found a menu item in the Android settings that I could use to fix the problem. It's called “Manage background apps” (translated from german "Hintergrund-Apps verwalten". There I have added the BeaconScope app as “Always allow”. So far (since 4h 10′), the advertising has been running without interruption!
I'm having the same issue with Version: Version 24.3.0.284
I don’t really know what you mean but if you are trying to read this in your serial monitor on like VS Code or sum it should work. Try to use Platform.io.
Thx @musicamante I changed my app from QDialog to QWidget. Everything looks the same, but actually works.
I found the answer:
import java.lang.management.ManagementFactory;
import java.util.List;
// Get jacoco agent jvm argument.
List<String> jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
String jacocoAgentArg = jvmArgs.stream()
.filter(arg -> arg.startsWith("-javaagent") && arg.contains("org.jacoco.agent"))
.toArray(String[]::new)[0];
just to clarify the question asked running on Online Matplotlib Compiler
code:
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
print(matplotlib.__version__)
t = np.linspace(0, 5, 301) # Ajouter un point pour les bords
f = np.linspace(-10, 10, 501) # Ajouter un point pour les bords
valeurs = np.zeros((500, 300))
#print('t :' , t)
valeurs[100:110, :] = 100
valeurs[400:440, :] = 5
valeurs[valeurs==0 ] = np.nan
fig = plt.pcolormesh(t, f,valeurs, norm=matplotlib.colors.Normalize(clip=True))
#plt.pcolormesh(valeurs) #Give the same result except on axis marks.
#plt.imshow(valeurs, interpolation='bilinear', origin='lower', extent=[t[0], t[-1], f[0], f[-1]], aspect='auto')
print(matplotlib.scale.get_scale_names())
plt.show()
Output:
3.5.2
['function', 'functionlog', 'linear', 'log', 'logit', 'symlog']
plot:
Does using : valeurs[valeurs==0 ] = np.nan
in :
import matplotlib.pyplot as plt
import numpy as np
t = np.linspace(0, 5, 301) # Ajouter un point pour les bords
f = np.linspace(-1000, 1000, 501) # Ajouter un point pour les bords
valeurs = np.zeros((500, 300))
valeurs[100, :] = 10
valeurs[400, :] = 10
valeurs[valeurs==0 ] = np.nan
plt.pcolormesh(t,f,valeurs)
#plt.pcolormesh(valeurs) #Give the same result except on axis marks.
plt.show()
pic:
improves your output ??
Ooops, links now fixed on the downloads page.
Hello my problem was line in the .gitnore
# env files (can opt-in for committing if needed)
.env*
I was pushing the code to the github, where I was building production version in github-actions, but environment variables were accessible only on the local mashine.
Thanks to @Aryan Raj suggestion, here is a more explicit solution to my problem. Add the following lines to the Dockerfile:
# Add Tini
RUN apt-get install -y tini
# Set Tini as entrypoint
ENTRYPOINT ["/usr/bin/tini", "--"]
# Set your main application as CMD
CMD ["/usr/queue/qserver", "--port=1234"]
Now the qserver daemon runs as expected in the background!
created shell script & placed it at both places (.platform/confighooks/prebuild/test.sh) & (.platform/hooks/prebuild/test.sh) just to make sure that environment variable is available in both config & deploy stages . Note : config stage hooks .platform/confighooks/prebuild
gets executed when there are eb config changes , which doesn't require any deployment, while deploy stage hooks .platform/hooks/prebuild
gets executed post config stage , mostly in case of uploading new app version , changing few eb configs which requires deployment
can you share the script that works with .platform/hooks/prebuild/test.sh
the following script `# .ebextensions/setup-env.config container_commands: 01-extract-env: env: AWS_SECRET_ID: "Fn::GetOptionSetting": Namespace: "aws:elasticbeanstalk:application:environment" OptionName: AWS_SECRET_ID AWS_REGION: {"Ref" : "AWS::Region"} ENVFILE: .env
command: >
aws secretsmanager get-secret-value --secret-id $AWS_SECRET_ID --region $AWS_REGION |
jq -r '.SecretString' |
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' > $ENVFILE`gives error `format error`
I have the exact same problem. I found out that only one profile of my Chrome browser (the profile that I kinda need to use for my work) is facing this issue. None of my oyher profiles of Chrome nor any other browser is affected by this issue. And similarly adding even listener doesn't solve this problem.
had the same issue with Pycharm2024, i fixed it by renaming some newly updated files in the tmp folder as below -
under the path \AppData\Local\JetBrains\PyCharm2024.2\tmp
I have tried this, and it seems to have made my application very slow, I am thinking if it could be due to the next app compiling every time an endpoint is called?
I can't find enough on this online
I discovered the answer, in case anybody finds this. The problem is in the font-family. If I specify
pdf("font_plot.pdf", family="Lexend Deca Medium", width=4, height=4)
for example, then it works like a charm!
In Angular 16 version I have used ngx-extended-pdf-viewer 17. I am trying to print the document using inbuild print button but in before going to print I am changing the base64 which is provided to ngx-extended-pdf-viewer for watermark & afterprint I am again resetting the previous base64 value to that control but its not working whenever I am trying to replace this values. Its open an model & show pdf is in progress to print at 50% and stuck there. Please help me with this solution.
i'm having the exact same problem - same API, same error. i believe this is due to organization settings because it works for most of our customers besides one. i'm trying to narrow down and figure out which setting it is... James - any luck finding a resolution for this?
Yes you can but they will be connected to one merchant account for in-app purchases and such.
Also check out this link
my issue was the name of the host resource is case sensitive.
I answered my question and it was my misunderstanding of streams. I need to put the de-init and re-init in its own Task block in the stream. Reason why is because putting these two await calls in their own streams lets me continue to emit values without getting blocked, so you see the .inProgress status as soon as it’s sent rather than having to wait for the re-init to complete
I am facing the same issue, did you able to solve it?
One approach is to create a new FlutterEngine that doesn't call into UI code, when MainActivity
is terminated, but when a foreground service notification is still active. You'll still need to refactor you code so the FlutterEngine is the one always making MethodChannel
calls.
Here's an example.
I found the answer. I feel so stupid :( looking through the FIRST page in the SMS Retriever documentation, I found this
// Starts SmsRetriever, which waits for ONE matching SMS message until timeout // (5 minutes). The matching SMS message will be sent via a Broadcast Intent with // action SmsRetriever#SMS_RETRIEVED_ACTION. Task task = client.startSmsRetriever();
I found that my Bin directory in my web project had duplicate files that were appended with my computer name. Removing them corrected the issue.
maybe the block block-yui_3_17_2_1_1738087604786_10243
does not exist
I had to completely kill the codespace and spin up a brand new codespace for my changes to take effect
Steps 1 Uninstall plain after install.
Steps 2 Restart android studio.
Steps 3 control+space check working or not(steps 4).
Steps 4 not working then reinstall Android studio.
BY: ANDROID ALIANS
Had same issue.. I tried a lot but only reactive (not ref) + Object.assign() helped me with this issue, so:
No there is no Guidelines prohibiting this, but it makes the approval much much harder. and you cannot make it kids friendly.
enter image description herein android studio 2025 the Generate Signed Bundle/APK option is hidden so you have to search for it 1 photo = 1000 words follow steps in this diagram
Add this code to your css.
@media (min-width: 768px) {
.product-div {
grid-template-columns: 2fr 2fr;
}
}
If you are using Spring 3.x, in application.properties, the following needs to be changed:
spring.redis.host=redis
spring.redis.port=6379
to
spring.data.redis.host=redis
spring.data.redis.port=6379
ANSWER: Not seeing the "homestead" logo doesn't meant that your environment isn't working. I worked through all of my other issues, and my site is working now even though the "logo" doesn't show up.
For Windows you need to add:
import os
if os.name == 'nt':
os.system('color')
HYPER-V
Approach (i):- Today i found the answer that use the option stop service and restart your system it will work.
if approach(i) not working then use this ,
Approach (ii):-
Of course they are redundant. You have to choose in designer or in constructor
Most probably you have a debug version of the app on your device and want to test updating closed testing app. which will not work because the difference in building keys.
Same problem. Did you resolve it?
I have had this exact same problem and I can't find a solution as of writing this.
$states.ErrorOutput doesn't return anything useful.
Until AWS implements a way to reference variables inside the distributed map state, we're out of luck. Search Distributed Map
I would try using a service to store or retrieve outside data that can go with that specific State Machine execution.
One work around is if you are also using Docker you can create the cluster in a docker container. Run the following command in terminal
minikube start --driver=docker
Tried adding this as a comment but stackoverflow did not let me. I don't think AWS allows us to do that. You might have to delete the connector, reset offsets and then re-create it.
Here's a post mentioning it is planned in future releases: https://repost.aws/questions/QUi4UW_uFpTdSeDYXR7MKr2w/is-there-a-way-to-update-connector-configuration-using-msk-connect-api
This seemed to work for me:
https://gist.github.com/JacobWeisenburger/f43f4635be7bfb8328823103bfaf3e5f
/**
CORS blocks this request from the browser, so you will need to run this code on the server.
*/
export async function checkIfYouTubeChannelIsLive ( channelId: string ) {
const liveCheck = `https://www.youtube.com/embed/live_stream?channel=${ channelId }`
const responseText = await fetch( liveCheck ).then( res => res.text() )
const isLive = responseText.indexOf( 'This video is unavailable' ) < 0
return isLive
}
Try this
Content-Security-Policy: style-src 'self' https://fonts.googleapis.com 'sha256-KJCiag/ONB9TpGaUe4pEzZMHCxZPfqveZBD6JwsDks8=' 'unsafe-hashes'
If the error persists, feel free to contact me. 👍
I know this is a pretty old post but this is the only thing on the internet I was able to find showing this exact problem. Posting my solution in case anyone else comes across this looking for answers.
I had to help a user with this exact issue today. Developer tab enabled, Source pane opens but doesn't show the buttons at the bottom. After popping out the Source pane and making it smaller, I could see the buttons. Seems like a display issue.
To fix it, in Excel go to File > Options and go to the General tab, at the top under User Interface options toggle to "Optimize for compatibility" and close and re-open Excel. The buttons should remain visible.
I was put off by the message
❗ Because you are using a Docker driver on windows, the terminal needs to be open to run it.
and I ended up here in Stack Overflow. But because I had gotten that message after running the command
minikube service <serviceName> -n <namespace> --url
I was done. The port given was not the port I had specified, but the url that showed worked. All I needed to do was leave that terminal open and copy and paste the url into my browser. The explanation in the minikube documentation helped me understand the situation better.
I recognize that this won't be particularly helpful to the savvy folks, but it would have helped me at the time so I submit it for any other complete noobs like me.
If I understand correctly, you would like (2 x 3) subplots, where the x-axes of each column are aligned.
You can adapt the same code to do so; sharex='col'
will share the x-axis per individual column, or alternatively sharex=True
will share the x-axis across all subplots:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
y1 = np.sin(x) # Data for the top subplot
y2 = np.cos(x) # Data for the bottom subplot
fig, ax = plt.subplots(2, 3, figsize=(8, 6), sharex='col', gridspec_kw={"hspace": 0.4})
ax = np.ravel(ax) # flatten
for ii in range(3):
ax[ii].plot(x, y1, label="sin(x)", color="blue")
ax[ii + 3].plot((ii + 1) * x, (ii + 1) * y2, label="cos(x)", color="orange")
plt.show()
You can create a SMART folder and put the folder on cyclic method to rerun in every 15 mins after Folder's END and put all 3 jobs inside folder. It will run your jobs like Job A completed, it will pass condition to Job B and then to Job C, only after one cycle completion of all 3 jobs, folder will rerun again and so on.
This is surprisingly hard to find a straight answer about.
Amazon itself does not advertise a maximum image size. They do, however, tell you the max size per layer in their service quota page, which is 52,000 MiB (or ~50GiB).
Other sources state 10TiB or 25TiB but those are unconfirmed by AWS.
Your mileage may vary with the TiB size range, but it's safe to say with a layer size limit is 50GiB, an 8GiB image should be fine.
However, your issue may be with the layer sizes themselves. From personal experience, I've seen more failures when layer sizes exceed 1GiB. Trying to keep layer sizes below 1GiB might be something you would want to try.
I would consider two options:
can't make it with \r, any other options?
your gaussian function seems to have a factor of 2 in, try this instead:
def gaussian(wz, r, I):
"""
wz: Beam width at z=0;
r : Radial coordinates
I : Intensity distribution
"""
Fin = I*np.exp(-(r/wz)**2)
return Fin
Are you sure that 2 supposed to be there?
Solved it.
from anytree import Node, RenderTree
from collections import Counter
import os
import openpyxl
from PIL import Image, ImageDraw, ImageFont
import re
# Create a directory to store the individual name card images
cards_dir = "C:/Users/Chris Fitz/Documents/Fun/Trumpet History/trumpettree/cards"
os.makedirs(cards_dir, exist_ok=True)
# Load the .xlsx file
file_path = 'C:/Users/Chris Fitz/Documents/Fun/Trumpet History/trumpettree/YJMB Trumpet Trees.xlsx'
workbook = openpyxl.load_workbook(file_path)
sheet = workbook.active
# Read the data starting from row 2 to the last row with data (max_row) in columns A to N
people_data = []
for row in sheet.iter_rows(min_row=2, max_row=sheet.max_row, min_col=1, max_col=14):
person_info = [cell.value for cell in row]
people_data.append(person_info)
# Tree Data Making
# Dictionary to hold people by their names
people_dict = {}
# List to hold the root nodes of multiple trees
root_nodes = []
# Sets to track parents and children
parents_set = set()
children_set = set()
# Dictionary to track parent-child relationships for conflict detection
parent_child_relationships = {}
# List to store the individual trees as objects
family_trees = [] # List to hold each separate family tree
# Variable to track the current tree number
tree_number = 0 # Start with tree 1
# A counter for nodes without children
end_id_counter = 1
years = []
x_max = 0
# Iterate over the people data and create nodes for each person
for i, person_info in enumerate(people_data, start=2): # i starts at 2 for row index
name = person_info[0] # Name is in the first column (column A)
rat_year = str(person_info[1])[:4] # Year they joined the marching band (second column)
if rat_year.isdigit():
years.append(int(rat_year))
instrument = person_info[2]
parent_name = person_info[7] # Column H for VET (8th column)
children_names = person_info[8:14] # Columns I to N for RATs (9th to 14th columns)
# Determine if the node has children (if any of the children_names is non-empty)
has_children = any(child_name for child_name in children_names if child_name)
if i < len(people_data) and not person_info[7]: # Parent is empty in that row
tree_number += 1 # Increment tree number for the next family tree
# Check if this name is already in the people_dict
if name in people_dict:
# If the person already exists in the dictionary, retrieve their node
person_node = people_dict[name]
# Update the rat_year for the existing person node if necessary
person_node.rat_year = rat_year
person_node.instrument = instrument
else:
# If the person does not exist in the dictionary, create a new node
person_node = Node(name, tree_number=tree_number, id=0, has_children=has_children, rat_year=rat_year, x_coord=None, y_coord=None, instrument=instrument, children_nodes=[]) # Added children_nodes
# If parent_name is empty, this is a root node for a new tree
if parent_name:
if parent_name in people_dict:
parent_node = people_dict[parent_name]
else:
parent_node = Node(parent_name, tree_number=tree_number, id=0, has_children=False, rat_year=None, x_coord=None, y_coord=None, instrument=None, children_nodes=[]) # Added children_nodes
people_dict[parent_name] = parent_node # Add the parent to the dictionary
person_node.parent = parent_node # Set the parent for the current person
parents_set.add(parent_name)
# After setting the parent, update the parent's has_children flag
parent_node.has_children = True # Set has_children to True for the parent node
parent_node.children_nodes.append(person_node) # Add to parent's children_nodes
else:
root_nodes.append(person_node) # Add to root_nodes list
people_dict[name] = person_node # Add the new person node to the dictionary
# Now create child nodes for the given children names
for child_name in children_names:
if child_name:
if child_name not in people_dict:
child_node = Node(child_name, parent=person_node, tree_number=tree_number, id=0, has_children=False, rat_year=rat_year, x_coord=None, y_coord=None, instrument=instrument, children_nodes=[]) # Added children_nodes
people_dict[child_name] = child_node
children_set.add(child_name)
# If the child node has been created, we need to ensure the parent's has_children flag is True
person_node.has_children = True
person_node.children_nodes.append(people_dict[child_name]) # Add child to parent's children_nodes
if child_name not in parent_child_relationships:
parent_child_relationships[child_name] = set()
parent_child_relationships[child_name].add(name)
# After all nodes are created, we calculate x and y coordinates for each node
new_id = 1
start_x_coord = 200
curr_tree = 1
min_year = min(years) if years else 0
max_year = max(years) if years else 0
year_range = max_year - min_year + 1 if years else 0
end_id_counter = 1
# Print out the family trees for each root node (disconnected trees)
for root_node in root_nodes:
family_tree = []
for pre, fill, node in RenderTree(root_node):
family_tree.append(f"{pre}{node.name}")
family_trees.append(family_tree)
# print(f"\nFamily Tree starting from {root_node.name}:")
for pre, fill, node in RenderTree(root_node):
node.id = new_id
new_id += 1
if not node.has_children:
new_tree = node.tree_number
if new_tree != curr_tree:
start_x_coord += 200
curr_tree = node.tree_number
node.end_id = end_id_counter
end_id_counter += 1
node.x_coord = start_x_coord
start_x_coord += 170
else:
node.end_id = 0
if getattr(node, 'x_coord', 'N/A') and getattr(node, 'x_coord', 'N/A') > x_max:
x_max = node.x_coord
# Print details for each node
# print(f"{pre}{node.name} (ID: {node.id}, Tree Number: {node.tree_number}, Has Children: {node.has_children}, End ID: {getattr(node, 'end_id', 'N/A')}, X Coord: {getattr(node, 'x_coord', 'N/A')}, Y Coord: {getattr(node, 'y_coord', 'N/A')}, Rat Year: {getattr(node, 'rat_year', 'N/A')}, Instrument: {getattr(node, 'children_nodes', 'N/A')})")
# Now assign X coordinates to nodes where X is None (based on their children)
while any(node.x_coord is None for node in people_dict.values()):
for node in people_dict.values():
if node.has_children:
children_with_coords = [child for child in node.children if child.x_coord is not None]
if len(children_with_coords) == len(node.children): # Check if all children have x_coord
average_x_coord = sum(child.x_coord for child in children_with_coords) / len(children_with_coords)
node.x_coord = round(average_x_coord) # Set the parent's x_coord to the average
# Print out the family trees for each root node (disconnected trees)
for root_node in root_nodes:
family_tree = []
for pre, fill, node in RenderTree(root_node):
family_tree.append(f"{pre}{node.name}")
family_trees.append(family_tree)
# print(f"\nFamily Tree starting from {root_node.name}:")
# for pre, fill, node in RenderTree(root_node):
# print(f"{pre}{node.name} (ID: {node.id}, Tree Number: {node.tree_number}, Has Children: {node.has_children}, End ID: {getattr(node, 'end_id', 'N/A')}, Children Nodes: {getattr(node, 'children_nodes', 'N/A')})")
# fix the rat_year attribute for even-numbered generations (done)
# use that to determine y value (done)
# determine x values from the bottom up recursively (done)
# # Print duplicate ids, if any
# if duplicates:
# print("\nDuplicate IDs found:", duplicates)
# else:
# print("\nNo duplicates found.")
#----------------------------------------------------------#
# Tree Chart Making
# Extract the years from the first four characters in Column B (done in lines 51-53 now)
# Calculate the range of years (from the minimum year to the maximum year) (107-109)
# Create a base image with a solid color (header space)
base_width = x_max + 200
base_height = 300 + (100 * year_range) # Header (300px) + layers of 100px strips based on the year range
base_color = "#B3A369"
base_image = Image.new("RGB", (base_width, base_height), color=base_color)
# Create a drawing context
draw = ImageDraw.Draw(base_image)
# Define the text and font for the header
text = "The YJMB Trumpet Section Family Tree"
font_path = "C:/Windows/Fonts/calibrib.ttf"
font_size = 240
font = ImageFont.truetype(font_path, font_size)
# Get the width and height of the header text using textbbox
bbox = draw.textbbox((0, 0), text, font=font)
text_width = bbox[2] - bbox[0]
text_height = bbox[3] - bbox[1]
# Calculate the position to center the header text horizontally
x = (base_width - text_width) // 2
y = (300 - text_height) // 2 # Vertically center the text in the first 300px
# Add the header text to the image
draw.text((x, y), text, font=font, fill=(255, 255, 255))
# List of colors for the alternating strips
colors = ["#FFFFFF", "#003057", "#FFFFFF", "#B3A369"]
strip_height = 100
# Font for the year text
year_font_size = 60
year_font = ImageFont.truetype(font_path, year_font_size)
# Add the alternating colored strips beneath the header
y_offset = 300 # Start just below the header text
for i in range(year_range):
strip_color = colors[i % len(colors)]
# Draw the strip
draw.rectangle([0, y_offset, base_width, y_offset + strip_height], fill=strip_color)
# Calculate the text to display (the year for this strip)
year_text = str(min_year + i)
# Get the width and height of the year text using textbbox
bbox = draw.textbbox((0, 0), year_text, font=year_font)
year_text_width = bbox[2] - bbox[0]
year_text_height = bbox[3] - bbox[1]
# Calculate the position to center the year text vertically on the strip
year_text_x = 25 # Offset 25px from the left edge
year_text_y = y_offset + (strip_height - year_text_height) // 2 - 5 # Vertically center the text
# Determine the text color based on the strip color
year_text_color = "#003057" if strip_color == "#FFFFFF" else "white"
# Add the year text to the strip
draw.text((year_text_x, year_text_y), year_text, font=year_font, fill=year_text_color)
# Move the offset for the next strip
y_offset += strip_height
# Font for the names on the name cards (reduced to size 22)
name_font_size = 22
name_font = ImageFont.truetype("C:/Windows/Fonts/arial.ttf", name_font_size)
# Initialize counters for each year (based on the range of years)
year_counters = {year: 0 for year in range(min_year, max_year + 1)}
# Create a list of names from the spreadsheet, split on newlines where appropriate
for node in people_dict.values():
# Choose the correct name card template based on Column C
if node.instrument and "Trumpet" not in node.instrument:
name_card_template = Image.open("C:/Users/Chris Fitz/Documents/Fun/Trumpet History/trumpettree/blank_blue_name_card.png")
else:
name_card_template = Image.open("C:/Users/Chris Fitz/Documents/Fun/Trumpet History/trumpettree/blank_name_card.png")
if node.rat_year:
year_string = str(node.rat_year)[:4]
if year_string.isdigit():
year = int(year_string)
year_index = year - min_year # Find the corresponding year index (from 0 to year_range-1)
name = node.name
# Check if the name contains "VET" or "RAT"
if "VET" in name or "RAT" in name:
name_lines = name.split(' ', 1)
name = name_lines[0] + '\n' + name_lines[1]
elif name == "Xxx Xxxxxx-Xxxxxxx":
name_lines = name.split('-')
name = name_lines[0] + '\n' + name_lines[1] # Add newline after the hyphen
else:
name_lines = name.split(' ')
if len(name_lines) > 1:
name = ' '.join(name_lines[:-1]) + '\n' + name_lines[-1]
else:
name_lines = [name]
# Create a copy of the name card for each person
name_card_copy = name_card_template.copy()
card_draw = ImageDraw.Draw(name_card_copy)
# Calculate the total height of all the lines combined (with some padding between lines)
line_heights = []
total_text_height = 0
for line in name.split('\n'):
line_bbox = card_draw.textbbox((0, 0), line, font=name_font)
line_height = line_bbox[3] - line_bbox[1]
line_heights.append(line_height)
total_text_height += line_height
# Shift the text up by 8 pixels and calculate the vertical starting position
start_y = (name_card_template.height - total_text_height) // 2 - 6 # Shifted up by 8px
# Draw each line centered horizontally
current_y = start_y
first_line_raised = False
for i, line in enumerate(name.split('\n')):
line_bbox = card_draw.textbbox((0, 0), line, font=name_font)
line_width = line_bbox[2] - line_bbox[0]
line_x = (name_card_template.width - line_width) // 2
card_draw.text((line_x, current_y), line, font=name_font, fill="black")
if i == 0 and any(char in line for char in 'gjpqy'):
current_y += line_heights[i] + 7
first_line_raised = True
elif i == 0:
current_y += line_heights[i] + 7
else:
if first_line_raised:
current_y += line_heights[i] - 2
else:
current_y += line_heights[i] + (5 if i == 0 else 0)
# Position for the name card in the appropriate year strip
card_y = 300 + (strip_height * year_index) + (strip_height - name_card_template.height) // 2 # Vertically center in the strip based on year
node.y_coord = card_y
# Assign card and y position attributes to each person
person_node.card = name_card_copy
person_node.y_coord = card_y
# Use the counter for the corresponding year to determine x_offset
year_counters[year] += 1
card_file_path = os.path.join(cards_dir, f"{node.name}.png")
person_node.card.save(card_file_path)
# Paste the name card onto the image at the calculated position
base_image.paste(name_card_copy, (node.x_coord, node.y_coord), name_card_copy)
# Create a list of names from the spreadsheet, split on newlines where appropriate
for node in people_dict.values():
# Add black rectangle beneath the name card if the node has children
if node.has_children:
if len(node.children_nodes) == 1:
child_node = getattr(node, 'children_nodes', 'N/A')[0] # Only one child, so get the first (and only) child
# print(getattr(child_node, 'y_coord', 'N/A'))
# Coordinates for the rectangle (centered beneath the name card)
rect_x = node.x_coord + (name_card_template.width - 6) // 2 # Center the rectangle
rect_y = node.y_coord + (name_card_template.height - 2) # Just below the name card
rect_y_bottom = int(getattr(child_node, 'y_coord', 'N/A')) + 1 # Bottom of rectangle is aligned with the y_coord of the child
# Draw the rectangle
draw.rectangle([rect_x - 1, rect_y, rect_x + 6, rect_y_bottom], fill=(111, 111, 111))
else:
# Calculate the leftmost and rightmost x-coordinates of the child nodes
min_x = min(getattr(child, 'x_coord', 0) for child in node.children_nodes)
max_x = max(getattr(child, 'x_coord', 0) for child in node.children_nodes)
# Calculate the center of the rectangle (between the leftmost and rightmost child nodes)
rect_x = (min_x + max_x) // 2 # Center x-coordinate between the children
rect_y = (node.y_coord + min(getattr(child, 'y_coord', node.y_coord) for child in node.children_nodes)) // 2
rect_width = max_x - min_x
draw.rectangle([rect_x - rect_width // 2 + 75, rect_y + 36, rect_x + rect_width // 2 + 75, rect_y + 6 + 37], fill=(111, 111, 111))
parent_y_bottom = rect_y + 36
# Coordinates for the rectangle (centered beneath the name card)
rect_x = node.x_coord + (name_card_template.width - 6) // 2 # Center the rectangle
rect_y = node.y_coord + (name_card_template.height - 2) # Just below the name card
draw.rectangle([rect_x - 1, rect_y, rect_x + 6, parent_y_bottom], fill=(111, 111, 111))
# Now create a vertical rectangle for each child node
for child in node.children_nodes:
child_x = getattr(child, 'x_coord', 0)
child_center_x = child_x + (name_card_template.width - 6) // 2 # x-center of the child
child_y_bottom = parent_y_bottom # The bottom of the rectangle should align with the parent's bottom
# Draw the rectangle from the center of the child node up to the parent's y-bottom
draw.rectangle([child_center_x - 1, child_y_bottom, child_center_x + 6, getattr(child, 'y_coord', 0) + 1], fill=(111, 111, 111)) # 6px wide
# Print out the family trees for each root node (disconnected trees)
for root_node in root_nodes:
family_tree = []
for pre, fill, node in RenderTree(root_node):
family_tree.append(f"{pre}{node.name}")
family_trees.append(family_tree)
print(f"\nFamily Tree starting from {root_node.name}:")
for pre, fill, node in RenderTree(root_node):
# print(f"{pre}{node.name} (ID: {node.id}, Tree Number: {node.tree_number}, Has Children: {node.has_children}, End ID: {getattr(node, 'end_id', 'N/A')}, Children Nodes: {getattr(node, 'children_nodes', 'N/A')})")
print(f"{pre}{node.name} (ID: {node.id}, Tree Number: {node.tree_number}, Has Children: {node.has_children}, End ID: {getattr(node, 'end_id', 'N/A')}, Y Coord: {getattr(node, 'y_coord', 'N/A')}, Children: {len(getattr(node, 'children_nodes', 'N/A'))})")
# Save the final image with name cards and black rectangles
base_image.save("YJMB_Trumpet_Section_Family_Trees_2024.png")
base_image.show()
The issue for me was not specifying the version of firebase-functions.
const functions = require('firebase-functions/v1'); // Specify /v1
Adding /v1
solved the issue.
There are always ways to write the script better to speed it up, but I think the question here and same for me is something else. He had a script that ran in half the time on the same machine. So why would scripts slow down without any changes?
How about:
sort -u file1 file2
as of latest version if you're using django-recaptcha instead of importing
from captcha.fields import ReCaptchaField
you should import
from django_recaptcha.fields import ReCaptchaField
I do believe you use Web App - Execute as - User accessing the web app. I tried your code and tested and got the same result as the sample picture given.
To make it work, Change the Web App - Execute as to Web App - Execute as - Me ([email protected]). Also Select Anyone in Who has access.
Execute the app as me — In this case, the script always executes as you, the owner of the script, no matter who accesses the web app.
Execute the app as user accessing the web app — In this case, the script runs under the identity of the active user using the web app. This permission approach causes the web app to show the email of the script owner when the user authorizes access.
You can read more about Web App here - Web Apps
I spent more than an hour to solve this problem. I didn't find it on the web for some reason. Is it only me who had this problem?
Anyway the solution was quite easy but still strange in my opinion. I just should have gone to project settings -> Modules -> expand project's main folder and find a warning there, stating that kotlin library was not found in the module dependencies list:
It was the only place I saw any warnings. Intellij Idea CE didn't say anything: there wasn't any popup about this problem. All of the project settings' menu items too. I mean if you just open Project settings, you won't see this warning, say, in Project menu item, or Libraries, where I would expect such a warning, and in other menu items too, including "Modules". You have to expand these Modules to find this warning.
I think that Jetbrains could do better, considering that Kotlin is their native language. I don't know, maybe Ultimate version notifies about this problem immediately when you just open the project but with CE you will have to spend some time to find it out if you didn't face the problem before.
Go here: https://docs.snowflake.com/en/user-guide/vscode-ext This will redirect you to here: https://docs.snowflake.com/en/developer-guide/snowflake-cli/installation/installation#label-snowcli-install-windows-installer Which will finally redirect you to getting the right source here: https://sfc-repo.snowflakecomputing.com/snowflake-cli/index.html
Check the upgrade documentation to v 31-1: https://www.ag-grid.com/javascript-data-grid/upgrading-to-ag-grid-31-1/#deprecations
showColumnMenuAfterMouseClick
- deprecated, use IHeaderParams.showColumnMenuAfterMouseClick
within a header component, or api.showColumnMenu
elsewhere.
never too late! as i'm facing a similar issue, it seems this is sorted with specifiying the additional accepted headers with
--header="Accept: font/woff2,font/woff,font/ttf,application/font-woff,application/font-woff2,application/x-font-ttf" \
https://www.gnu.org/software/wget/manual/html_node/HTTP-Options.html#index-header_002c-add
Try wrapping the memo field in a hashing utility like MD5HASH. x = Createobject("MD5srv.aaMD5") SELECT Field1, Field2MEMO, x.MD5String(Field2MEMO) as MemoHash FROM DBF() ORDER BY MemoHash
This will identify all memos that have same hash value (distinct). At this point you can do a subsequent JOIN on only unique hashes or select into another table and create a unique index on memohash to only return unique instances
I have fixed the issue. You can get the code from https://codesandbox.io/p/sandbox/stackoverflow-forked-yc4nkm?file=%2Fsrc%2FTheOverlayTrigger.tsx%3A54%2C63.
Change
state.styles.popper.transform = customTransform;
to
state.styles.popper.top = customTransform.top;
state.styles.popper.left = customTransform.left;
Then it be working. 👍
For me solution was like this:
// hooks.server.ts
import { building } from '$app/environment'
export const handle: Handle = async (p) => {
if(building){
// apply different logic here
} else {
const clientIp = p.event.getClientAddress()
}
}
more details: https://svelte.dev/docs/kit/$app-environment#building
From what I understand, getting approval for Knox is an arduous and expensive process. For my Wear OS app that needed kiosk mode, I used a 3rd party app to get there: https://www.42gears.com/products/kiosk-software/android-smartwatch-kiosk-mode/
I thought it was just me! No matter what I tried httpx, aiohttp, etc. it either wouldn't receive the payload or it was cutoff. Non async sseclient works. Did you ever figure this out for async?
There is a tutorial here which may be helpful: https://web.sdk.qcloud.com/trtc/webrtc/doc/en/tutorial-33-advanced-electron-screen-share.html
I spent some time to solve it, for me it worked by changing the language of the page, on the button in the top right corner, when changing the language, on the other screen it showed the images with a problem with a red border!
In my case, I forgot to export the function.
Instead of this:
const handler = async () => {
Should be this:
export const handler = async () => {
Docker containers differ fundamentally from traditional Linux systems in process management. While Linux systems have a complete init system (PID 1) managing all processes, Docker containers run with a single main process that must handle all process management duties.
Direct Background Process:
CMD ["./daemon", "&"]
Init System:
CMD ["tini", "--", "./daemon"]
Process Supervisor:
CMD ["supervisor", "./daemon"]
in short:
Simple daemons → lightweight init system
Complex daemons → process supervisor
Critical services → full monitoring and health checks
control panel -> region ->adminstrative -> change system locale and use Beta UTF 8,restart
I know it is an old thread however I found a simple solution for greek characters https://prnt.sc/UWMo7rcnbj65
for overflow it is easy -> do it with: value & 0xFF But what is best, for underflow?
e.g. vor 8-Bit: (if value goes from 0x00 to -0x01 after an decrement) 0x100 + value