Creating a variable action is straightforward—simply use the function there. Like this: contact('<', https://foo.bar/....., '|Click me>'
After creation, the variable is available for use in emails or other posts and messages.
Good luck!
cat myFile.zip | base64 -w 0
echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode > myFile.zip
wget http://stackoverflow.com/xxx/thefiles.zip
There are basically two solutions for this, which are a bit detailed, so I have created 2 different videos on that, You can see and fix your issues:
Solution 1: https://www.youtube.com/watch?v=HKWnrGPYR-M
Solution 2: https://www.youtube.com/watch?v=WRO-SgacqtQ
I found the problem. MySQL newbie issue. :(
I had a session variable declared DECLARE log_id INT;
In the queries, that used log_id, MySQL is using the variable instead of the column from the table.
So the statement
SELECT value_id, log_id from testdata;
Returned the value_id from the table, but the variable log_id value. Renaming the declared variable solved the issue.
Consider this question answered! Thanks to everyone who provided input.
Many Tracker
objects in OpenCV are deprecated because they are outdated, less accurate, and not well-maintained. Newer trackers like CSRT and KCF offer better performance and are preferred for modern use
You can't have both custom_authenticator and form_login_ldap active on the same firewall simultaneously. Symfony only uses one authenticator per request.
So Write a single custom authenticator that first tries LDAP logic and, if that fails, falls back to your custom logic (or vice versa).
Symfony’s new security system is designed for this: chain your logic inside the authenticator instead of in security.yaml.
Example:
Inside your custom authenticator, inject both LDAP service + your local user service
Try LDAP bind first; if that fails, try local
This way, you control the flow and only register one authenticator in the firewall.
I think that you shouldn't group them with "id" if the ids are different
This might be an old thread, but I was having the same issue, and I fixed it by checking the node version that Playwright is using in the package.json file and then updating the directory with that latest version of node per the json file.
The RESET contacts are located in the lower right corner and are highlighted in a red rectangle. For a cold restart, it is enough to close them with any actuating mechanism on the control board, for example, a relay. This contact group is standardized and its description can be taken from the manual for almost any motherboard (not only Asustek).
I resolved this by putting On<iOS>.SetUseSafeArea(true); in the xaml.cs file
Old question, new answer:
html {
scrollbar-gutter: stable;
}
It should prevent the flickering without resorting to JavaScript or hacking the native scroll.
This could be the correct answer, taken from a question that didn't ask exactly that : https://stackoverflow.com/a/69827402/9359785
I can help you with that, there's two options, using chatgpt like chatbot to teach it the things and create a local LLM, but It would require a running server so people can access it remotely. Unless you plan to run it locally is not ideal with current state of smartphone software and hardware capabilities. The second option is to create an app or a website where we create frequently asked question list with search option where you can put keywords and find then related questions and answers. Another option is to create another pdf with revised format that adjusts itself on the phone but also on the computer with updated fonts, picture and revised guidelines in accordance with recent developments. Contact me if you want me to collaborate.
The error was in my total lack of type converters. I had not used them because I thought that as long as all the parameters of a class didn't need type converters the class itself didn't need one. The type converters in MikeT's anwser seem to work.
MikeT's anwser(s) were really helpful though, because they revealed other issues with my code that I did not know of because of my lack of understanding.
Since SQL doesn’t allow deleting from multiple tables directly using JOIN, I split the logic into two separate DELETE statements, each using a WHERE ... IN (SELECT ...) clause.
Step 1: Delete from books
DELETE FROM books WHERE BOOK_ID IN ( SELECT b1.BOOK_ID FROM books b1 JOIN price p1 ON b1.BOOK_ID = p1.ID WHERE p1.ISBN IS NOT NULL AND p1.VALUTA = 'yen' AND b1.YEAR BETWEEN 2011 AND 2014 );
Step 2: Delete from price
DELETE FROM price WHERE ID IN ( SELECT p1.ID FROM price p1 JOIN books b1 ON p1.ID = b1.BOOK_ID WHERE p1.ISBN IS NOT NULL AND p1.VALUTA = 'yen' AND b1.YEAR BETWEEN 2011 AND 2014 );
You can always just filter that out as well:
const filteredObject = Object.fromEntries(
Object.entries(props.data).filter(([key]) => key !== "__typename")
);
Listen i want to tell you that this website do accurate calculations. Dont worry, i also used it for my final project. Also in my point of view, this is accurate. I dont know about others. Hope it solves your query.
I m also searching for this problem. Did you find correct solution?
I removed line 3 and also removed autolinkLibrariesWithApp() in build.gradle
I cannot reproduce points 1 and 2, the timers are working as expected:
For Flow Control Action sampler you can set the think time in User Defined Variables so if you need to dry-run the test without think time you will have to change it only in one place.
I have managed to sort it out. As stated earlier, next-mdx-remote
isn't working with the latest version of Next.js, but there is next-mdx-remote-client
which can be used instead. A few changes need to be made but it isn't a lot overall.
Here is the repository for next-mdx-remote-client
: https://github.com/ipikuka/next-mdx-remote-client
Here is what finally worked with any string (I called it "final"):
final <- "B,C,A,C,C,A,B"
func_ignore_last_A <- function(seq) {
if (length(seq) > 0 && !is.na(seq)) {
vec <- str_split(seq, ",")[[1]]
if ("A" %in% vec) {
last_a_index <- tail(which(vec == "A"), 1)
vec <- vec[-last_a_index]
}
return(paste(vec, collapse = ","))
} else {
return(seq)
}
}
func_ignore_last_A(final)
python inference.py --checkpoint_path wav2lip.pth --face celebration_photo.jpg --audio folk_song.m4a
I had a very similar issue with the Flowbite library. What solved it was adding the <tr>
element:
<div className="overflow-x-auto">
<Table striped>
<TableHead>
<tr> {/* ~~~ ADD THIS <TR> ~~~ */}
<TableHeadCell>xxx</TableHeadCell>
...
</tr>
</TableHead>
</Table>
</div>
Adding the comments at the start of the script like aareeph stated solved my problem
seriously, the python object syntax is just fugly. it's unfortunate, because the language makes for quick iterations otherwise.
I believe it's because of lack of slash
router.replace("/notFound");
You could also do
router.replace({name: "notFound" });
My God, I asked this in 2014 lol
If I knew what programming was like, I wouldn't have learned this
Using Xcode 16 here, try File > Packages > Reset Package Caches
We are using amqplib in a TypeScript/Node.js application to publish messages to RabbitMQ using sendToQueue, and although it returns true and we’ve wrapped it with ConfirmChannel and await channel.waitForConfirms(), we are experiencing a recurring issue where some messages are not delivered to the consumer. For instance, when 5 messages are sent, only 3 may be received by the consumer, even though no errors are thrown and waitForConfirms() resolves successfully. All queues are asserted with { durable: true }, messages are sent with { persistent: true }, and consumers are set up with noAck: false and are explicitly calling ack(msg). We’ve also tested with a Dead Letter Queue and found no messages routed there, suggesting they’re not being rejected or expired. The problem is intermittent and occurs under both light and moderate loads. We are trying to understand if this could be due to internal buffering, prefetch settings, missing acks, or a known edge case in amqplib where messages are silently dropped despite using confirmations. We would appreciate any insight into what could be causing this message loss, and whether there's an established approach or configuration that guarantees delivery reliability in this scenario.
Looks like you can use this free viewer:
Temporary tables are only available in the session. It's possible that when you run the other query its executed in other session?
You can combine pawello222's answer with Mojitaba Hosseini's answer from another question on how to make synchronous tasks to synchronously process asynchronous code on app termination event, like so:
NotificationCenter.default.addObserver(forName: UIApplication.willTerminateNotification, object: nil, queue: .main) { [self] _ in
Task.synchronous { [self] in
await asyncWork()
}
}
Task.synchronous extension (credit to Mojitaba Hosseini):
extension Task where Failure == Error {
/// Performs an async task in a sync context.
///
/// - Note: This function blocks the thread until the given operation is finished. The caller is responsible for managing multithreading.
static func synchronous(priority: TaskPriority? = nil, operation: @escaping @Sendable () async throws -> Success) {
let semaphore = DispatchSemaphore(value: 0)
Task(priority: priority) {
defer { semaphore.signal() }
return try await operation()
}
semaphore.wait()
}
}
If you use actors in your code at all, awaiting any actor method or variable will cause the Task to never complete/to be killed. Instead, you should resolve and store any actor variables locally, then capture them in the Task closure to use them without any actor access waiting.
Example:
let peripheral = await localPeripheral
peripheralTerminateNotification = NotificationCenter.default.addObserver(forName: UIApplication.willTerminateNotification, object: nil, queue: .main) { [self] _ in
Task.synchronous { [self] in
await stop(peripheral: peripheral)
}
}
Change your parameter type to object instead of psobject. That way PowerShell won't try to loop over the contents during validation.
function testme {
param(
[ValidateScript({ $_ -is [array] -or $_ -is [hashtable] })]
[object]$args
)
}
server.servlet.session.cookie.path=/
- Cookie is sent on all paths
server.servlet.session.cookie.path=/app
- Cookie is sent only for /app and its sub-paths
Update poetry pyprotect.toml file to include the lower limit tensorflow version and upper limit tensorflow version for your project.
"tensorflow (>=2.11.0,<2.17.0)",
then run:
poetry check
this is to verify that all's good.
then run poetry install
In 2025, linking azdevops to azure ad looks like this:
I was having the same problem until I ran this step.
Another piece of valuable .metallib format documentation found only after digging for a while:
https://github.com/YuAo/MetalLibraryArchive/blob/master/README.md (Scroll down to the "Metal Library Archive Binary Layout" heading)
In addition, the Asahi Linux project has done a massive amount of work in reverse-engineering the M-series GPU instruction set. https://asahilinux.org/
This class was removed in https://github.com/jhipster/jhipster-bom/pull/1444. It was a leftover artifact from AngularJS that's not needed.
I found out that with the current material 3 ( 1.3.2 ) it is not possible to totally disable the dismiss of the ModalBottomSheet when scrolling down, but it should be possible in the next stable release of the material 3, as seen from https://developer.android.com/jetpack/androidx/releases/compose-material3#1.4.0-alpha15. A workaround for this question was found in how to prevent Modal Bottom Sheet from getting close on swipe Down in compose which may help you till the new material 3 ( 1.4.0 - stable ) is released
Setting up UTF-8 Encoding - Ensure your application.yaml
file is saved in UTF-8 encoding. If non-UTF-8 encoding is used, Japanese characters otherwise not display correctly.
messages:
greeting: こんにちは
farewell: さようなら
Call this properties in Java File in Spring boot through of @Value Annotation.
@Value("${messages.greeting}")
private String greetingMessage;
Using @ConfigurationProperties
@Configuration
@ConfigurationProperties(prefix = "messages")
public class MessageConfig {
private String greeting;
private String farewell;
// Getters and Setters
}
If you are use Multi-language So you can handle the through of message.properties and as well as store the multi-language in Database also.
It happens when you use wrong arn. we need to pass topic arn not subscription arn.
Yes! Elementor uses Flatpickr under the hood, so you can override its default date format with a bit of JS. For example, add this in your theme’s functions.php
or via Elementor → Custom Code:
add_action('wp_footer', function() { ?>
<script>
jQuery(document).ready(function($) {
setTimeout(function(){
$('.flatpickr-input').each(function(){
flatpickr(this).set('dateFormat','d/m/Y');
});
}, 1000);
});
</script>
<?php });
After the new update you also need to make one change in the settings as shown here: https://youtu.be/z3Dk0GzXIHA
What if it's already unchecked but still posts redirecting to the homepage when switching languages?
Thank you!
About this: In this JSON object, there are a "fields
" object which contains "subtasks
" array.
In [fields][subtasks] you will always receive an empty array if you use cloud jira for epic issues!!!
Had the same.
At the bottom of the breakpoint view (left column of Xcode)
I had this breakpoint "All Runtime issues lib system_trace.dylib" active.
Inactivating this breakpoint did the trick.
The source of problem was found. It was related to the handlers from Systick, SVC and pendSV. I should use the handlers from FreeRTOS instead of the functions used by the ST. So, in my source code, I changed the l vector table (on file startup_stm32f767zitx.s) to these:
.word vPortSVCHandler
.word xPortPendSVHandler
.word xPortSysTickHandler
After doing this, the FreeRTOS started working.
You can define a global timezone to get the correct results, please see the link to API, where you can see a demo in action: https://api.highcharts.com/highcharts/time.timezone
$row->created = (new DateTime('@' . $row->created))->setTimezone(new DateTimeZone(config('app.timezone')));
Not a bug,the timezone is intentionally ignored when using @-style timestamps.
No, this is expected behavior. Your solution with setTimezone() is the proper way to handle it.
When using a Unix timestamp with DateTime (like @1718607600), PHP ignores both the default timezone and any timezone passed to the constructor. That's why your first snippet shows +00:00 - it's forced to UTC.
The fix is simple: Create your timestamp in UTC, then convert it to your timezone using setTimezone() right after:
$row->created = (new DateTime('@' . $row->created)) ->setTimezone(new DateTimeZone(config('app.timezone')));
Your second snippet already does this correctly. Unix timestamps are UTC-based, so you always need this explicit conversion to show them in local time.
Check and use this - Wrong spring.cloud.config.uri
setting – Make sure that your client applications are pointing to the correct Config Server URL.
This will make ./gradlew testFlavor1UnitTest
exclude all classes from the common test folder while keeping everything else exactly the same.
afterEvaluate {
tasks.withType(Test).matching { it.name.contains('Flavor') }.all {
exclude '**/test/**'
}
}
It is a vulnerability.
With this you can read files as the root, so you can access files you should not.
With weak passwords you can crack password hashes of other users. If you are lucky you will escalate.
Yes, with Maths and a map
>>> MULTVAL = (1.001**1000)
>>> output = [*map(lamdba x: x*MULTVAL, range(10000))]
Since xunit 2.5.0 you can use Assert.Single(collection);
i am facing an same issue bro any solution regarding this?
<!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
It's an authorization concern that the user be authenticated, so I had to that as the fallback policy and everything works. I made the following addition to the ServiceCollectionExtensions.AddCertificateAuthenticationService method:
builder.Services.AddAuthorization(options =>
{
options.FallbackPolicy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
});
this helped me curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
Resolved this by adding 'react-native-reanimated/plugin'
to plugins
property in babel.config.js
I made a change to NSwag to apply the cancellationToken to the ReadAsStringAsync and ReadAsStreamAsync calls when the framework is .NET 5 or higher. My change should be available in the 14.5 version of NSwag, or the nightly build of master if you need it sooner.
If your data has numbers stored as strings, Python will sort 10 before 2 because it's comparing character-by-character. If you want numeric sorting, convert them to integers in the key:
sorted_data = sorted(mix_data, key=lambda x: (int(x[0]), int(x[1])))
<!DOCTYPE html>
<html>
<head>
<title>
Noah's first website
</title>
</head>
<body>
<h1>If you play Roblox just friend me
my username is Djdog_95 and my character has a blue jersey</h1>
</body>
</html>
Change your lambda to return a tuple of the first and second elements - Python will automatically sort by the first value, and use the second one
sorted_list = sorted(mix_data, key=lambda x: (x[0], x[1]))
The above worked and thank you
Use stable version of pycryptodome
pip uninstall pycryptodome crypto
pip install pycryptodome==3.19.0 # Specific stable version
If you don't want these fields for your users, go in Realm Settings
-> User Profile
and delete the fields firstName
and lastName
.
Working Directory / Working Tree- The folder on your system with checked-out files you can edit.also working directoy have synoyms working copy
Check if you are saving both tsconfig.json
and tsconfig.app.json
inside the src
folder. If so, move them outside the src
folder and place them in the root directory of your project.
Since this is the first question that comes up when searching for
OSError: Error reading file failed to load external entity
; I want to share a more general quick tip that helped me identify the problem and makes the error message more informative in the future:
import os
if not os.path.isfile(filename):
raise FileNotFoundError(filename)
By adding this check before parsing the file, you can immediately verify whether the file path is correct and get a much clearer error message if the file does not exist.
header 1 | header 2 |
---|---|
cell 1 | cell 2 |
cell 3 | cell 4 |
Turns out this is something to do with the fact that I was using Brave browser (see this q&a) launched by Visual Studio.
Using Brave against the app when not launched by VS seems fine.
It appeared to be an encoding problem while opening the file, the following lines now give the correct output:
with open("script.py", encoding = 'utf-8') as file:
exec(file.read())
Thanks everyone.
Unknown integration
just sounds like discord is not recognizing your slash commands.
Can you provide more code to show how you initialized your slash commands? Are you using the CommandTree
?
How do i make a working slash command in discord.py this thread might be able to help you out a bit more. You are not producing an error traceback anyways as discord does not recognize your slash commands and therefore does not send a request to the bot.
It sounds like your slash commands are set up wrong. Your prefix should not be set to the / character. There is a proper way to initialize discord slash commands.
I am still stucked at the error likes yours.can you please help out.
If you're looking to manage audio easily while editing videos, I understand how frustrating it can be when clear instructions aren't available. For those using Banuba Video Editor, the code snippets you've mentioned help set the audio source on both Android and iOS.
However, if you're open to trying another powerful and user-friendly app, Alight Motion might be a great alternative. It not only allows you to add background music but also lets you extract, replace, or edit audio tracks within the same interface, without needing extra tools. It’s perfect for both beginners and advanced users who want quick, all-in-one editing features.
If you're interested in learning how to remove or add audio in Alight Motion step-by-step, you can check out this helpful tutorial. It’s based on hands-on experience and covers everything you need to know.
Thanks!
It turns out I had other styling overwriting from .scale div. I fixed it with another class to the individual scale parts.
You can also get the ID directly from the application; just click on the team in any message, then you can click on the 3 dots and choose `copy group id`
I use to have the same problem, but switched to Stream.IO VideoTextureViewRenderer!
Try VideoTextureViewRenderer(instead of SurfaceViewRenderer) inside CardView with rounded corners. It should fix the problem!
/*
* Copyright 2023 Stream.IO, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import android.content.Context
import android.content.res.Resources
import android.graphics.SurfaceTexture
import android.os.Handler
import android.os.Looper
import android.util.AttributeSet
import android.view.TextureView
import android.view.TextureView.SurfaceTextureListener
import org.webrtc.*
import org.webrtc.RendererCommon.RendererEvents
import timber.log.Timber
import java.util.concurrent.CountDownLatch
/**
* Custom [TextureView] used to render local/incoming videos on the screen.
*/
open class VideoTextureViewRenderer @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : TextureView(context, attrs), VideoSink, SurfaceTextureListener {
/**
* Cached resource name.
*/
private val resourceName: String = getResourceName()
/**
* Renderer used to render the video.
*/
private val eglRenderer: EglRenderer = EglRenderer(resourceName)
/**
* Callback used for reporting render events.
*/
private var rendererEvents: RendererEvents? = null
/**
* Handler to access the UI thread.
*/
private val uiThreadHandler = Handler(Looper.getMainLooper())
/**
* Whether the first frame has been rendered or not.
*/
private var isFirstFrameRendered = false
/**
* The rotated [VideoFrame] width.
*/
private var rotatedFrameWidth = 0
/**
* The rotated [VideoFrame] height.
*/
private var rotatedFrameHeight = 0
/**
* The rotated [VideoFrame] rotation.
*/
private var frameRotation = 0
init {
surfaceTextureListener = this
}
/**
* Called when a new frame is received. Sends the frame to be rendered.
*
* @param videoFrame The [VideoFrame] received from WebRTC connection to draw on the screen.
*/
override fun onFrame(videoFrame: VideoFrame) {
eglRenderer.onFrame(videoFrame)
updateFrameData(videoFrame)
}
/**
* Updates the frame data and notifies [rendererEvents] about the changes.
*/
private fun updateFrameData(videoFrame: VideoFrame) {
if (isFirstFrameRendered) {
rendererEvents?.onFirstFrameRendered()
isFirstFrameRendered = true
}
if (videoFrame.rotatedWidth != rotatedFrameWidth ||
videoFrame.rotatedHeight != rotatedFrameHeight ||
videoFrame.rotation != frameRotation
) {
rotatedFrameWidth = videoFrame.rotatedWidth
rotatedFrameHeight = videoFrame.rotatedHeight
frameRotation = videoFrame.rotation
uiThreadHandler.post {
rendererEvents?.onFrameResolutionChanged(
rotatedFrameWidth,
rotatedFrameHeight,
frameRotation
)
}
}
}
/**
* After the view is laid out we need to set the correct layout aspect ratio to the renderer so that the image
* is scaled correctly.
*/
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
eglRenderer.setLayoutAspectRatio((right - left) / (bottom.toFloat() - top))
}
/**
* Initialise the renderer. Should be called from the main thread.
*
* @param sharedContext [EglBase.Context]
* @param rendererEvents Sets the render event listener.
*/
fun init(
sharedContext: EglBase.Context,
rendererEvents: RendererEvents
) {
ThreadUtils.checkIsOnMainThread()
this.rendererEvents = rendererEvents
eglRenderer.init(sharedContext, EglBase.CONFIG_PLAIN, GlRectDrawer())
}
fun init(
sharedContext: EglBase.Context,
tag: String
) {
ThreadUtils.checkIsOnMainThread()
this.rendererEvents = object : RendererEvents {
override fun onFirstFrameRendered() {
Timber.i("$tag onFirstFrameRendered")
}
override fun onFrameResolutionChanged(p0: Int, p1: Int, p2: Int) {
Timber.i("$tag onFrameResolutionChanged $p0 $p1 $p2")
}
}
eglRenderer.init(sharedContext, EglBase.CONFIG_PLAIN, GlRectDrawer())
}
/**
* [SurfaceTextureListener] callback that lets us know when a surface texture is ready and we can draw on it.
*/
override fun onSurfaceTextureAvailable(surfaceTexture: SurfaceTexture, width: Int, height: Int) {
eglRenderer.createEglSurface(surfaceTexture)
}
/**
* [SurfaceTextureListener] callback that lets us know when a surface texture is destroyed we need to stop drawing
* on it.
*/
override fun onSurfaceTextureDestroyed(surfaceTexture: SurfaceTexture): Boolean {
val completionLatch = CountDownLatch(1)
eglRenderer.releaseEglSurface { completionLatch.countDown() }
ThreadUtils.awaitUninterruptibly(completionLatch)
return true
}
override fun onSurfaceTextureSizeChanged(
surfaceTexture: SurfaceTexture,
width: Int,
height: Int
) {
}
override fun onSurfaceTextureUpdated(surfaceTexture: SurfaceTexture) {}
override fun onDetachedFromWindow() {
eglRenderer.release()
super.onDetachedFromWindow()
}
private fun getResourceName(): String {
return try {
resources.getResourceEntryName(id) + ": "
} catch (e: Resources.NotFoundException) {
""
}
}
}
You can rename your non exported API and global variable with some random names that will make re-egineering harder
1. List the function and varaibles you want to rename in the file symbols_list.txt, you can list all symbol by issuing the command "strings your_lib.so"
2. Run the command : python3 generate_mapping.py symbols_list.txt
3. Once the renaming mappping list prepared, provide your source folder path in SOURCE_FOLDER present in apply_mapping.py
4. Run the command : python3 apply_mapping.py
5. Recompile your code
6. Now your .so file is ready to share.
after try so many ways I realize my data source set in function when I set it in form_loadfunction
problem gone
Use JS condition dynamically: apex.page.isChanged()
True: Shows a confirmation dialog (P1002_CONF_MESSAGE item), then Submit with Rest.
False: Submit with RESET
.
Did you get any solution for this?
I changed my code to merging and sql as the comments sugested, it made it faster but it still takes up to two minutes to save the excel.
Thank you for all the suggestions!
Changed the function to:
plantilla_df = pd.read_excel(template_file, sheet_name='Template')
branch_mapping_df = pd.read_excel(template_file, sheet_name='BranchMapping', dtype={'Source_value': str})
type_mapping_df = pd.read_excel(template_file, sheet_name='TypeMapping', dtype={'Source_value': str})
interbusiness_mapping_df = pd.read_excel(template_file, sheet_name='InterbusinessMapping', dtype={'Source_value': str})
bos_mapping_df = pd.read_excel(bos_mapping_file, dtype=str).fillna("NA")
customer_mapping_df = pd.read_excel(customer_mapping_file, dtype=str)
murex_mapping_df = pd.read_excel(murex_mapping_file, dtype=str)
bb_mapping_df = pd.read_excel(bb_mapping_file, dtype=str)
bb_mapping_df['Corporate Product Name - Hierarchy (English)'] = bb_mapping_df['Corporate Product Name - Hierarchy (English)'].str.replace('.', '')
# Merging the DataFrames
merged_df = combined_m1 \
.merge(branch_mapping_df, how='left', left_on='Codigo', right_on='Source_value') \
.merge(bos_mapping_df, how='left', left_on='Cuenta', right_on='BOS') \
.merge(type_mapping_df, how='left', left_on='ACCOUNT', right_on='Source_value', suffixes=('', '_type')) \
.merge(bb_mapping_df, how='left', left_on='ACCOUNT', right_on='Corporate Product Code - Hierarchy', suffixes=('', '_bb')) \
.merge(customer_mapping_df, how='left', left_on='Cliente', right_on='Customer Code') \
.merge(murex_mapping_df, how='left', left_on='Folder', right_on='SOURCE_VALUE')
# Adding the calculated columns
merged_df['inter-branch flag'] = np.select(
[
merged_df['Type'].isnull(),
~merged_df['Type'].isin(['Assets', 'Liabilities']),
merged_df['Type'].isin(['Assets', 'Liabilities']) & (merged_df['Reference'].str.startswith('LIF')),
merged_df['Type'].isin(['Assets', 'Liabilities']) & (merged_df['Group Code'].isin(interbusiness_mapping_df['Source_value']))
],
['', 'No - non Assets & Liability', 'No - LIF', 'Yes'],
default='No'
)
output_df = merged_df[[
"Codigo",
"Target_value", # "Branch"
"Fecha de Envio",
"Numero",
"Cuenta",
"ACCOUNT", # "CdG"
"ACCOUNT NAME", # "CdG desc"
"Target_value_type", # "Type"
"Level in BB", # "BB code"
"Corporate Product Name - Hierarchy (English)", # "BB Desc"
"Starting Date",
"Group Code",
"inter-branch flag",
"Reference",
"local account",
"Cliente",
"Customer Name"
]].rename(columns={
"Target_value": "Branch",
"ACCOUNT": "CdG",
"ACCOUNT NAME": "CdG desc",
"Target_value_type": "Type",
"Level in BB": "BB code",
"Corporate Product Name - Hierarchy (English)": "BB Desc"
})
# Output the final DataFrame
print(output_df)
template_directory = os.path.dirname(template_file)
output_path_temp = os.path.join(template_directory, 'Depurar.xlsx')
output_df.to_excel(output_path_temp, index=False)
Thanks for the feedback folks, it did help. Below is my working solution.
protected static async Task DownloadDocument(ILocator locator, string FileName)
{
Console.WriteLine(GetTheCurrentMethod());
var waitForDownloadTask = Page.WaitForDownloadAsync();
await locator.ClickAsync();
var download = await waitForDownloadTask;
await download.SaveAsAsync($"{DownloadPath}\\{FileName}");
}
from mido import Message, MidiFile, MidiTrack, bpm2tempo
mid = MidiFile()
track = MidiTrack()
mid.tracks.append(track)
tempo = bpm2tempo(70) # 70 bpm para clima romântico
track.append(Message('program_change', program=24, time=0)) # Piano acústico
quarter_note = 480
def add_chord(notes, duration):
for note in notes:
track.append(Message('note_on', note=note, velocity=64, time=0))
track.append(Message('note_off', note=notes[0], velocity=64, time=duration))
for note in notes[1:]:
track.append(Message('note_off', note=note, velocity=64, time=0))
progression = [
[57, 60, 64], # Am
[62, 65, 69], # Dm
[67, 71, 74], # G
[60, 64, 67], # C
[65, 69, 72], # F
[64, 68, 74], # E7
[57, 60, 64], # Am
]
for chord in progression:
add_chord(chord, quarter_note * 4)
mid.save("O_Homem_dos_meus_Sonhos_Ana_Carolina_Style.mid")
print("Arquivo MIDI criado: O_Homem_dos_meus_Sonhos_Ana_Carolina_Style.mid")
I did yarn start
then open Chromium
then http://localhost:8081/
and get it in Console
but no way to get it direct with "j"
this is also my code.. and we have the same problem
\# ai\_firefox\_scraper.py (Fixed)
import asyncio
import json
import os
import csv
import time
import random
from pathlib import Path
from playwright.async\_api import async\_playwright
SAVE\_DIR = Path("scraped\_data")
SAVE\_DIR.mkdir(exist\_ok=True)
class FirefoxSmartScraper:
def \_\_init\_\_(self, max\_pages=5, throttle=(4, 8)):
self.max\_pages = max\_pages
self.throttle = throttle
async def search\_and\_scrape(self, topic: str):
async with async\_playwright() as p:
browser = await p.firefox.launch(headless=False)
context = await browser.new\_context()
page = await context.new\_page()
print(f"🔍 Searching DuckDuckGo for: {topic}")
await page.goto("https://duckduckgo.com", timeout=30000)
await page.wait\_for\_selector("input\[name='q'\]")
\# Type like a human
for c in topic:
await page.type("input\[name='q'\]", c, delay=random.randint(100, 200))
await page.keyboard.press("Enter")
await page.wait\_for\_selector("a.result\_\_a", timeout=20000)
await asyncio.sleep(random.uniform(\*self.throttle))
\# Extract real links only
items = await page.query\_selector\_all("a.result\_\_a")
urls = \[\]
for item in items\[:self.max\_pages\]:
try:
title = await item.inner\_text()
href = await item.get\_attribute("href")
\# Ensure it's a valid URL
if href and href.startswith("http"):
urls.append({"title": title.strip(), "url": href})
except Exception as e:
print(f"\[!\] Failed to parse link: {e}")
continue
if not urls:
print("❌ No links found.")
await browser.close()
return
print(f"🔗 Visiting {len(urls)} pages...")
scraped = \[\]
for idx, link in enumerate(urls):
print(f"\\n📄 \[{idx+1}\] {link\['title'\]}")
try:
await page.goto(link\["url"\], timeout=30000)
await asyncio.sleep(random.uniform(\*self.throttle))
content = await page.text\_content("body")
scraped.append({
"title": link\["title"\],
"url": link\["url"\],
"content": content\[:1500\] # Limit content
})
except Exception as e:
print(f"\[!\] Failed to scrape: {link\['url'\]}\\nReason: {e}")
continue
await browser.close()
self.save\_data(topic, scraped)
def save\_data(self, topic: str, data: list):
filename\_json = SAVE\_DIR / f"{topic.replace(' ', '\_')}\_data.json"
filename\_csv = SAVE\_DIR / f"{topic.replace(' ', '\_')}\_data.csv"
\# Save as JSON
with open(filename\_json, "w", encoding="utf-8") as f:
json.dump(data, f, ensure\_ascii=False, indent=2)
\# Save as CSV
with open(filename\_csv, "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=\["title", "url", "content"\])
writer.writeheader()
for entry in data:
writer.writerow(entry)
print(f"\\n✅ Saved {len(data)} entries to:\\n- {filename\_json}\\n- {filename\_csv}")
def main():
topic = input("🔎 Enter topic to crawl web for data: ").strip()
if not topic:
print("❌ No topic entered.")
return
scraper = FirefoxSmartScraper()
asyncio.run(scraper.search\_and\_scrape(topic))
if \_\_name\_\_ == "\_\_main\_\_":
main()
this is my code in making an overall web scrapping.. i don't know whats wrong, it doesn't fetch data in the internet. or maybe websites are really protected
You can add <requestFocus /> tag in the EditText tag to gain focus when a fragment/activity is loaded
I got this error because I had a scheduler which was planned for a certain time to delete entries. But I had 2 nodes (servers) which were trying to do the same job and brought this conflict.
I scheduled one node for 5 min. later.
First node: 00:00
Second node: 00:05
The problem is solved.
Another dummy solution to that kind of error :
My problem was that I opened the parent folder (in which I have my 4 cloned projects). So that probably sounds stupid, but make sure you open the right project or it will obviously struggle to find your imports.
@Carlos Roldán.
I'm facing the same issue. Did you found the solution?
not completely related but, how were you able to get widgets with control actions like music player to update in real time: here a link to the full info about this question question
https://www.facebook.com/share/1BVrsrzKWW/
Is Facebook account ki nambar de do
There is very likely an encoding issue during the exec part of the code as sasid by @tevemadar
The way this is done also would be quite looked down upon. Exec's are dangerous as they can easily be exploited.
Imports exist for a reason. Try wrapping your bs4 code in a function maybe and import that to your main file. You can call it then ;)
Replace - late WebViewController _controller;
With - WebViewController? _controller;
And use -
if (_controller == null) {
return const Center(child: CircularProgressIndicator());
}
WebViewWidget(controller: _controller!);
Image was inserted by default way:
<Image Grid.Column="0" Grid.Row="0"
Source="{Binding Path=ImageBitmapSource, Mode=OneWay}" HorizontalAlignment="Center"
VerticalAlignment="Top" Stretch="UniformToFill" Margin="10,20"/>
And ImageBitmapSource in ViewModel was inited by this code:
protected static void LoadImage(ImportFileType importFileType, string relativeImage1Path,
Action<bool> setIsEmpty, Action<BitmapImage> setBitmapImage)
{
var imagesPath = StorableData.GetPath(importFileType);
var bitmapImage = ImagesViewModelBase.CreateBitMapImage(IOExt.Combine(imagesPath, relativeImage1Path));
if (bitmapImage != null)
{
bitmapImage.Freeze();
}
setIsEmpty(bitmapImage == null);
setBitmapImage(bitmapImage);
}