I have read the article only now, if you have not solved it yet:
Add the following atribute to the $city property: #[ApiProperty(readable: true, writable: true)]
It may solve the problem
I am having the same problem. I opened a ticket on issuetracker since I notice that internet works if use Google Bar Widget. Here's the issue.
The issue was resolve by altering the 2 values in the php-fpm setting as mentioned below:
catch_workers_output = yes
decorate_workers_output = no
Thanks to the below 2 post :
After updating the above settings in "php-fpm.c/www.conf" file, we were able to get the debug logs.
It sounds like you're working with some advanced image processing tasks! Have you tried converting the RGB8 image to a 16-bit first and then truncating the values to fit a 10-bit range? It might be helpful to manually handle the pixel depth conversion since OpenCV doesn't support BAYER10 natively. You could also check out alternative libraries like PyImage or implement a custom function to scale the 16-bit image down to 10-bit. Let me know how it goes! read more
Finally i was able to let this infrastructure works, but there are some considerations:
this worked for me SELECT file FROM pragma_database_list WHERE name = 'main';
If anyone is having the same issue, make sure not to just open the ui file in QtCreator. Open the folder containing the file as a workspace such that QtCreator can configure the project as a Qt 5.xx project. After that, pyuic5 should work as expected.
Have you tried like this?
const express = require('express');
For whoever stumbles across this issue these days, this post has an explanation and a fix: https://stackoverflow.com/a/78373277/3332772
First of all I agree with @Jonas Metzler if you don't have DDL rights you should talk to someone who is able to fix the DB structure.
This is the best way to solve your issue. However for a temporary workaround you could try to batch your IN clauses. This could help you but only little don't expect too much.
With batching I mean something like this
SELECT * FROM payment
WHERE is_deleted = 0
AND is_privacy = 0
AND ou_code IN ('A1', 'A2', ..., 'A500')
LIMIT 0, 20;
-- Next batch...
SELECT * FROM payment
WHERE is_deleted = 0
AND is_privacy = 0
AND ou_code IN ('A501', 'A502', ..., 'A1000')
LIMIT 0, 20;
Keep in mind this is quick and dirty pseudo code. There may be syntax error's but should give you an idea of what I mean
at the end I added space and double slash " //" and it works :-).
npx playwright test .\url-test.spec.ts //
Just remove your /bin /obj and solutionname.sln.user file and you ready to go.
/Nykkel
nodemon won't refresh your browser, it only tracks server changes.
Please see answer here or here. You need to setup something like livereload, browsersync, etc. along with nodemon to make it work
Why go through all that fuss? Just use a Textarea and style it to look like any div you like.
Please try setting Settings | Build, Execution, Deployment | NuGet | Credential Provider to NuGet/.NET CLI plugins.
If that doesn't help, please create a new support ticket (Help | Contact Support) with the following logs:
I usually use <iframe> for embedding videos. I think youtube has it's own way of sharing videos for embedding in html, it's probably not just putting the video address, it has a altered address, you should check it out before implementing.
In any case, you should be able to modify the normal video tags with css as well. if you have problems with that, I suggest using video-js or other html video players.
Your question is confusing. If you want an element to be 100% of the screen height, then .h-screen will do exactly that. A scroll bar appears because you have other elements present, so your document height is greater than the screen height.
If however, you just want the pink element to fill the remaining available space (which is always less than 100% of the screen height), then simply set that element to grow, using the flex property .grow and making that element a child of a .flex element.
…sometimes I cannot change the parent divs classes
Why not?
I use 206 for (2) if I want to return a No Data message, otherwise 204, just to keep 200 for the correct responses.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206
If your user has all necessary permissions for the nginx server and you filled in the nginx config file with correct data but still get 403 error, check the sites-enabled folder. If its empty, you need to create a link using the command:
sudo ln -s /etc/nginx/sites-available/your_site_conf.conf /etc/nginx/sites-enabled/
and then restart sudo systemctl restart nginx.service
now nginx understand that your site is enabled.
One day I got stack on this issue, cuz I just skipped step when i should have created this link.
This is because you are trying to import the LSTM layer from the tensorflow.python module which doesn't work for keras version 3.
Here’s how you can import it correctly:
from tensorflow.keras.layers import LSTM, Dense
services: simple-express-app: container_name: simple-express-app build: . ports: - "3000:3000" environment: - CHOKIDAR_USEPOLLING=true - WATCHPACK_POLLING=true volumes: - .:/usr/src/app # Mount your project directory correctly - /usr/src/app/node_modules command: nodemon -L app.js networks: - my-network restart: always networks: my-network: driver: bridge
You need the bootstrap.bundle.min.js script too cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js
How do we achieve this in the React Native Expo EAS project? How do we identify the framework path as Pods, which are runtime created in eas only?
When creating all layers previously, you are going to have a smoother user experience, without the need of wait to load, and potential flickering.
The issue is that if the user dont necessarily need all layers, that means if he is not going to view all and still have to download and load all the data, it can cause an unnecessary usage of memory and cpu (and battery if the user is in a mobile phone).
So you have a trade off here, between pre-loading everything and having a smoother UX, or loading only when necessary, saving some computering costs but it can have some flickering or waiting time to load the data depending on the size of it.
About the opacity vs visibility question, visibility generally costs less to set than opacity, as changing the layout is faster than the paint in most cases.
I am not sure what you mean. Can you tell us a bit more about your problem ? May be give a quick example ?
Is it about creating about a python module ? Is it about importing a python submodule of your current submodule ?
I encountered the same problem as you. What is the solution of this problem you adopted? i cant figure this out.
because ListObject* will become readdirs + stat on fs. You should avoid listObject on minio.
Maybe use a DB to keep a file key list.
https://github.com/minio/minio/issues/17472#issuecomment-1598408259
I face the same problem, I fixed it by set click listener to call the function.
$(document).on('touchend click', function() {
requestNotificationPermission();
// Remove the event listener after the permission is requested
$(document).off('touchend click');
});
function requestNotificationPermission(){
firebase.initializeApp(config);
if (firebase.messaging.isSupported()){
const messaging = firebase.messaging();
messaging
.requestPermission()
.then(() => {
message.innerHTML = "Notifications allowed";
return messaging.getToken();
you must put your project in [www] folder and open laragon right click go to www you will find your projects click on it to open
To correct previous response : SOAP is not stateful ! Depends on what you do behind (same as REST if you don't follow the guidelines).
For your need a proxy through a lambda will be required to perform the translation of SOAP to Rest.
How to call a function from the uploaded jar?
I needed something like this as an alias, so converted it is:
alias gitbs='git for-each-ref refs/heads/ --format='\''%(refname:short)'\'' | while read branch; do echo -n "$branch: " ; git rev-list --left-right --count master..$branch ; done'
I had the same issue. I tried all above solutions given in the answers in this question. Then I found that my file upload control was in update panel. File upload doesn't works in the update panel.
I have also noted the tags and created this useful tool: RunCellsWithTag.
It works in VSCode and, as the name suggests, runs cells with a certain tag. For me it is a great way to initialize some code after a kernel restart and, frankly, I am surprised that this feature isn't available in the Jupyter itself.
I was recently trying to do the same thing with my "Buy Me a Coffee" button, where I only wanted it on certain pages. I'm not enough of an expert with JavaScript (and even Blazor) to understand what really happens, but I only understand enough to know that the external JS script must be called when the WebAssembly loads, for the widget to appear.
Specifically for a Blazor WebAssembly, the external script must be included in the wwwroot/index.html as a script tag. But by doing so, this widget appears on all pages of your website.
I then tried working with JS Interop to call that external script via a self-written JavaScript function, only when certain pages are initialized and although that technically worked (i.e. the self-written JavaScript function was called), the widget however never appeared.
I finally thought of a "hack", where I simply included the external script as usual in wwwroot/index.html, but then accessed the div container of that widget via its ID and just setting the visibility to "hidden" or "visible".
Here's how I did it. The first step was to define that JS function:
// wwwroot/js/scripts.js
function HideBuyMeaCoffeeButton(id) {
var buttonDivObject = document.getElementById(id);
buttonDivObject.style.visibility = "hidden";
}
function ShowBuyMeaCoffeeButton(id) {
var buttonDivObject = document.getElementById(id);
buttonDivObject.style.visibility = "visible";
}
Next, for the (Razor) pages where you would like to hide the widget:
@inject IJSRuntime JSRuntime
@implements IAsyncDisposable
// <your content>
@code {
private IJSObjectReference? module;
// Turn "off" the Buy Me a Coffee button
protected async override Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./js/scripts.js");
}
await HideOffBuyMeaCoffeeButton();
}
private async Task HideOffBuyMeaCoffeeButton()
{
// My widget div container had the ID: 'bmc-wbtn'
await JSRuntime.InvokeVoidAsync("HideBuyMeaCoffeeButton", "bmc-wbtn");
}
async ValueTask IAsyncDisposable.DisposeAsync()
{
if (module is not null){await module.DisposeAsync();}
}
}
And for the (Razor) pages where you would like to show the widget, simply swap HideBuyMeaCoffeeButton with ShowBuyMeaCoffeeButton. It isn't perfect but it works well enough for my hobby project, where I only have the widget on my "Blogs".
As I see now, the answer is NO. Discussion on this topic you can find at Support for ./package.yml ? #3336.
Certainly, you can. You will have to use GETUTCDATE() instead. Add hours and minutes to UTC date as per time zone.
e.g. South Africa +2:00, India +5:30
select dateadd("HH",2,getutcdate()) as 'South Africa datetime', dateadd("MINUTE",30,dateadd("HH",5,getutcdate())) as 'India datetime'
I just found the answer myself:
spark.read.format("com.crealytics.spark.excel") \
.option("header", "true") \
.option("maxByteArraySize", 200000000) \ # that's the solution!
.schema(input_schema) \
.load(path) \
.display()
i don't know sorry just saying hi
Can someone send me the whole C++ Code with everything included? I dont get this started for me.
So what do i implement in dllmain.ccp, MathFuncsDll.h and MathFuncsDll.def
Your error screenshot clearly says that the "Expo cli" you are using, has been deprecated, which means it is discontinued.
It is suggesting you to use the "new Expo CLI" instead, which comes bundled in the Expo package.
Now, to install the Expo-camera, all you need to do is run : npx expo install expo-camera
The above command will install Expo-Camera module for your native React app. The documentation is here : https://www.npmjs.com/package/expo-camera
Please note that Expo-camera module requires "Expo" to be installed first. To install Expo, run this : npx install-expo-modules@latest
Documentation: https://docs.expo.dev/bare/installing-expo-modules/
If this is helpful, mark as Answer
copy this and paste it in your function.php file. wp-json/wc/v3/orders?your_query_param=your-search-value
add_filter('woocommerce_rest_shop_order_object_query', 'wc_enable_custom_filters', 10, 2);
function wc_enable_custom_filters($args, $request) {
// Filter by church ID
$your_query_param = $request->get_param('your_query_param');
if ($your_query_param) {
$args['meta_query'][] = array(
'key' => 'your_query_param', // Change this to your actual meta key
'value' => $your_query_param,
'compare' => '='
);
}
return $args;
}
I tested this code but id does not works on Tizen smart tv. Thanks.
Same problem here, did you find a solution?
Facebook ads have become an essential tool for businesses to expand their reach and connect with potential customers online. With over two billion active users monthly, Facebook offers an unmatched platform for advertisers to showcase their products and services. For beginners, navigating the world of Facebook advertising can seem overwhelming at first, but understanding the basics can help you create effective campaigns that drive results.
Visit Nexusevenue
One of the key benefits of paid online marketing service like Facebook ads is the ability to target specific audiences. Unlike traditional advertising methods, Facebook allows you to reach users based on their interests, demographics, location, and online behaviors. This precise targeting ensures your ads are seen by the right people, which increases the chances of engagement and, ultimately, conversions. By refining your target audience, you can make the most of your advertising budget, getting the best return on investment for your efforts. enter image description here
To get started with Facebook ads, you first need to access Facebook Ads Manager. This tool is the central platform for managing all your ad campaigns. Once inside Ads Manager, the first step is to choose your advertising objective. Facebook offers several options, such as increasing brand awareness, driving traffic to your website, generating leads, or encouraging user engagement. Selecting the correct objective is crucial because it dictates how your ad will be optimized and who it will be shown to.
After choosing your objective, the next stage is to define your audience. This step involves specifying the people you want to reach with your ad. You can choose your audience based on factors like age, gender, interests, behaviors, and even where they live. For beginners, it’s often best to start with a broader audience and gradually narrow it down based on the results of your initial campaigns. As you gather data on your audience's preferences and behaviors, you can fine-tune your targeting to improve performance over time.
Next comes the actual creation of your ad. Facebook offers various formats, including image ads, video ads, carousel ads, and more. When designing your ad, it's important to focus on creating visually appealing content that grabs attention. Whether you're using images or videos, make sure the visuals align with your brand and convey a clear message. Compelling headlines and a concise call-to-action (CTA) are also critical for encouraging users to click on your ad and take the desired action. The goal is to create content that resonates with your audience and encourages them to engage with your business.
Budgeting is another key component of running successful Facebook ads. You can choose between a daily budget, which sets a limit on how much you spend each day, or a lifetime budget, which spreads your total spending over the duration of your campaign. Facebook ads operate on a bidding system, where your ad competes with others for visibility. While a higher budget may increase your chances of being seen, it's still possible to achieve significant results with a smaller budget if your targeting and ad creative are optimized effectively.
Monitoring and optimizing your ad performance is essential to running successful campaigns. Facebook provides detailed analytics that show how your ads are performing in real-time. Metrics such as impressions, clicks, conversions, and cost-per-click (CPC) can give you valuable insights into what’s working and what may need adjustment. For example, if your ad is getting clicks but not many conversions, it could indicate that your landing page or CTA isn’t compelling enough. Regularly reviewing these metrics will help you make informed decisions about how to improve your campaigns and maximize your results.
In conclusion, Facebook ads are a powerful tool for businesses to connect with their target audience and achieve their marketing goals. By understanding the basics of audience targeting, ad creation, budgeting, and performance monitoring, even beginners can create effective campaigns that generate meaningful results. With continuous testing and optimization, you can unlock the full potential of Facebook ads and grow your business through targeted advertising.
Related to https://github.com/rrousselGit/freezed/issues/766#issuecomment-1817080034
JSON generation not working for use of generic class
Roboflow's SDK doesn't have explicit documentation for device management, but it likely leverages the underlying machine learning frameworks (like PyTorch or TensorFlow) for device allocation. Here's how you can approach the three questions based on typical behavior in ML libraries:
Is the model loaded to GPU by default?
What happens when multiple GPUs are available?
cuda:0) is usually selected. However, this depends on the configuration of the underlying library (PyTorch, TensorFlow, etc.). Roboflow SDK would likely follow the default behavior of the framework it's using.How do I define in which GPU I want the model allocated?
device = torch.device("cuda:1" if torch.cuda.is_available() else "cpu")
model.to(device)
You'd need to ensure that Roboflow provides access to the underlying model for manual device allocation if it's not set automatically.
To confirm exact behavior, you may need to refer to Roboflow's support or inspect the framework behind the SDK for device handling.
The problem was solved when I turned off and then turned on folding in vsc json settings file (“editor.folding”: false then “editor.folding”: true)
Apparently it was caching the sections that are folded somewhere. I had previously cleared the cache, but not where it needed to be
I hope this will help someone
I had same problem, and issue is
like this :
use JeroenG\Explorer\Domain\Query\QueryProperties\TrackTotalHits;
Model::search($search)
->property(TrackTotalHits::all());
While the question is quite old, indeed the situation has changed. In 2022 a standard was published, and there are some implementations on GitHub and elsewhere. If interested, I created a minimalistic library for 8-bit AVR in github, that aims at including "useful comments" describing the issues and the inner working of Posit. One key is indeed that the "expressiveness" of a number is limited to 2^size (in bits) so any 8-bit representation of a number can only express 256 different values (maximum). Variations in the representation can only choose different numbers they express exactly, the rest has to be "rounded" (or "overflowed")
Be Aware that there are two different connectors: Personal accounts (outlook.com) Business or Education accounts (Office 365 Outlook) enter image description here
As I said in comment, I don't know how to connect it from unity - controls don't work with this approach.
I have created my own Player Input:
How to connect them? Im storing this input in assets.
RefreshScopeRefreshedEvent is better.
my name is akshat faganiya and i belongs to chital gujarat currently i am student of software engineering fields. during my third year project developing this error are occur. because i have also decide i will make project using python using PyQt6 and his designer tool so in starting when i install package there are some critical error are invented. like ....................
1.the sub process error 2.metadata generation failed 3.toml.py file not found
this all error had occurred only one problem that python PyQt6 version ae not compatible with latest version so . before you get make Tention must download compatible version of the pyhon.
so if you want to defeat all this error then download python 3.9.0 version this is then only way.
In settings, there an setting called 'Type Checking Mode' inside "python > Analysis" You can set it to Off, Basic, Standard or Strict.
consider adding
"nodemonConfig": {
"legacyWatch": true
}
to your package.json
you should not use order by urls_title_sort.title asc,because this will lead to use temporary table and scan all the rows.
You sava my day guys ! I update the transporter application ,everything was ok @Mitul Bhadeshiya
It sounds like you encountered an assembly binding issue in IIS, and updating the web.config file resolved it. This is a common scenario when the application relies on specific versions of assemblies that differ between your development and production environments.
The dependentAssembly elements you added specify the assembly identities and the binding redirects, which instruct the .NET runtime to use the specified versions of the assemblies when the application requests them. Here’s a quick breakdown of what each part does:
assemblyIdentity: Identifies the assembly by name, public key token, and culture. bindingRedirect: Redirects requests for older versions of an assembly to a newer version, ensuring that the application uses the correct assembly version. It's a good practice to regularly compare your development and production configurations to avoid such issues. If you're working in a team or deploying frequently, consider implementing automated checks or using a deployment strategy that includes syncing configurations.
If you need any further assistance or have more questions about IIS or web.config, feel free to ask!
As I was looking for doing similar in embedded cpp via ecpg, here how I to do:
EXEC SQL BEGIN DECLARE SECTION;
char * appname = "my_app" ;
EXEC SQL END DECLARE SECTION;
....
EXEC SQL SET application_name TO :appname ;
I'll just post this link here for anyone else coming here after Rails 7 upgrade.
And also one more notable thing, after Ruby 3.3, if you call sleep with nil, it'll sleep forever instead of returning TypeError
rtsp_url = ('rtsp://admin:password@ipaddress:port/Streaming/Channels/number') this url should work for any ip cctv camera
Persistent permissions are possible since Chrome 120: https://developer.chrome.com/blog/persistent-permissions-for-the-file-system-access-api
Try by reinstalling cocoapods
brew remove cocoapods
brew remove --cask cocoapods
brew install cocoapods
After that you will have the latest version of cocoapods and everything worked.
Removing android.defaults.buildfeatures.buildconfig=true from gradle.properties works for me.
how to get the binArrayBitmapExtension account
Try to downgrade WTForms version to 2.3.3
Had the same error message with Bitbucket ("Could not determine exact tip revision of [branch]; falling back to nondeterministic checkout"). There is a bug in the Bitbucket Server Integration Plugin Version 4.1.1. Rollback to 4.0.0 solved the issue for me. PR is already open: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/pull/447
Is it possible to dyamically build the library path using pipeline parameters?
what is baseurl here?? im using api.bitbucket.org
Use this, instead on button click instead of anchor tag.
window.location.href = 'mobileapp://dashboard';
if you are using jdk 1.8 please change it to higher version like 17 or above and also change dynamic web module version to 6.0 to resolve above error
This may be due to your network issues, you can see that the codeium failed to download the file in the output. My suggestion is as follows: Option 1: Configure vscode's proxy and then try again. Option 2: Manually download the file in the output and place it in the directory outputted in the output.
Flatlist has ListEmptyComponent prop, my case i just set it to null to be able to swipeToRefresh
I got this as well... but it's simple: just write your comments on the bottom of the file and save it, and the commit will be done! :)
I got answer
static Future<String> fileUpload({required File file, OnUploadProgressCallback? onUploadProgress}) async {
//assert(file != null);
//debugger();
final url = '$baseUrl/api/file';
final fileStream = file.openRead();
int totalByteLength = file.lengthSync();
final httpClient = getHttpClient();
final request = await httpClient.postUrl(Uri.parse(url));
request.headers.set(HttpHeaders.contentTypeHeader, ContentType.binary);
request.headers.add("filename", file_util.basename(file.path));
request.contentLength = totalByteLength;
int byteCount = 0;
Stream<List<int>> streamUpload = fileStream.transform(
StreamTransformer.fromHandlers(
handleData: (data, sink) {
byteCount += data.length;
if (onUploadProgress != null) {
onUploadProgress(byteCount, totalByteLength);
// CALL STATUS CALLBACK;
}
sink.add(data);
},
handleError: (error, stack, sink) {
debugPrint(error.toString());
},
handleDone: (sink) {
sink.close();
// UPLOAD DONE;
},
),
);
await request.addStream(streamUpload);
final httpResponse = await request.close();
if (httpResponse.statusCode != 200) {
throw Exception('Error uploading file');
} else {
return await readResponseAsString(httpResponse);
}
}
Its working fine
Just specify a cascade delete rule on the foreign key. If you are using a code-first approach you can do it on your db context: Cascade delete - EF Core
Otherwise directly in the database: SQL Server delete cascade
Have a look at
Check how the styles work in your html document.
My problem was that the styles were included via the <link /> tag, and Yandex-Metrica could not download these styles correctly.
When I inlined the styles into the <style>...</style> tags (yes, the html gained a bit of weight), but this helped display the styles in WebVisor.
Also, if you use webpack, check how you collect styles for dev and prod modes.
If the MinExtractCssPlugin plugin is used for Prod mode, it forms all your styles into one file and includes them in the <link> tag. If this is the case, try not using this plugin and test the behavior.
HEADER --- Text format is not allowed BODY --- Your Variable must be in order {{1}}, {{2}}, {{3}}, etc. FOOTER --- Text format is not allowed --- Variable is not allowed
you using a VPN on the site, specifically. What’s going on is that the Lutris website uses Cloudfare, which does these kinds of checks on your IP when you connect. It’s partly so it can direct you to the best cloud server (through DNS I think), but if it detects a lot of users on the same IP address, you might get annoying captcha bullshit.
I found out from my VPN that I have to switch servers connected to and then i got on.
This and other information is available on the Internet and you can find it yourself. https://forums.lutris.net/t/lutris-doesnt-allow-vpns/15928
And other information how you do it. https://github.com/Milor123/Lutris-ZeroTier-Or-VPN-Wine
Yes, set your display to select the source automatically. Then turn off the VGA output and turn on the DVI output.
Turning output connectors of your graphics card off or on is done by the graphics driver. So you need to write the graphics driver. Good look with that one.
Do you use a proxy configuration for your angular app?
For example:
const PROXY_CONFIG = [
{
context: ['/api-shift'],
target: "http://localhost:9098/shift-service",
changeOrigin: true,
secure: false,
// pathRewrite: {'^/api-shift': ''},
logLevel: 'debug',
},
];
module.exports = PROXY_CONFIG;
I get this same error when I work my angular app but this file solve this problem for me.
I don't why you would need it but here is one way
for x in range(5):
globals()['a%s' % x] = f'Test{x}'
print(a1)
This is not the best practice, you can try using dic or list
You should visit your Stripe event Dashboard and check why the event wasn't delivered successfully. The common webhook problems are usually caused by incorrect webhook secret, or endpoint not responding 200 code in time. You can find more details about how to solve these problems on this page
I got the same error when I used idmax(). The actual function is idxmax(), use this and the error will disappear.
this is the default functionality that can be achieved using some simple steps.
you do not have to do any out of the box thing to achieve this functionality
This was happening because I tried to save some time and copied some cshtml files into my models folder and then renamed them changing the file type to C#. The issue was that the build action in the file properties did not change.
In order to resolve the issue, the build action needed to be changed to "C# compiler"
This results in colour formatting and intellisense being restored and the class being accessible for reference from other classes.
Check the versions of torch and torch-xla. It needs to be same while importing tranformers modules.
When publishing a SharePoint app, the description that appears in the SharePoint App Store is the one you enter during the submission process, not the one in the package-solution.json file.
The package-solution.json file is used for internal configuration and deployment, while the submission input is what users will see in the store.
i have a similar problem but my global variable needs to be set in a function (f1 in my example) and recovered as is in a second one (f2). the value of the global is set by f0, witch is not editable. I have to send global n value with f0
in my test i did in a single file
class mytest():
def f1(value):
global n
n = value
print('test f1 : '+n)
def f2():
print('test f2 : '+n)
def f0():
mytest.f1("5")
mytest.f2()
f0()
result is 5 for f1 and f2, as expected. now i split in 2 files (to reproduce my need. no choice here, it must be splitted)
file1
def f0():
file2.mytest.f1("5")
file2
class mytest:
def f1(value):
global n
n = value
print('test f1 : '+n)
def f2():
print('test f2 : '+n)
f2()
error is : name 'n' is not defined
f1 is always run first by the app, then f2 is called I need f2 (and fX functions i need behind) to keep 'n' value from f1
thank you
Regarding adding an element with listener to the array:
jets[i].OnJetOutOfBorder( () => {
const stars = animatedBatch.getInstancesOf(RandomStar);
if( stars.length < maxNumOfStars ){ //leverContrast.getValue() > 0.01 &&
//threshhold
if(1 - Math.random() < 0.9){
console.log('_____________________________star listener occured________')
addStar(i);
}
}
});
and modifying it to exclude expired:
// Draw and filter only "alive" shapes
this.animatedItems = this.animatedItems.filter((item) => {
item.draw(this.delta_ms);
return item.isAlive; // leave only shapes with isAlive=true
});
You have the same issue as in the question: [https://stackoverflow.com/questions/79117802/array-push-is-losing-elements-added-by-the-class-listener/79118760#79118760][1]:
filter code breaks things because it replaces the array that addEventListeners.
Modify it accordingly:
// EDIT Modify the existing array, must work from end to beginning
for( let next = this.animatedItems .length - 1; next >= 0; --next ) {
// First draw it
this.animatedItems [next].draw( this.delta_ms )
// Then remove it if it's finished it's itterations
if( !this.animatedItems [next].isAlive) this.animatedItems .splice(next, 1)
}
@cybersam you answer with the blog entry is no longer available.
I have converted that png into into jpg Image. after that this Error is resoved. But, I don't know what was the problem in png image
The problem was actually that the LocationRepository instances in the LocationService and in the LocationViewModel were different (checked this using Log.d(className, "Hash code : $locationRepository.hashCode()) and therefore the LocationViewModel was not subscribing to the right repository.
To solve the issue I added @Singleton to my LocationRepository :
@Singleton
class LocationRepository @Inject constructor(@ApplicationContext val context: Context)
git push --set-upstream origin branch
Win10 PostgreSQL16, столкнулся с проблемой database cluster initialisation failed при переустановке PostgreSQL16. Искал решение больше 10 часов, создавал пользователей и прочее, запускал через runas и т.д, ничего не помогало.
Что сработало у меня. После неудачной установки - Удаляем postgres (проверить также AppData\Roaming - удалить pgadmin и записи реестра \HKEY_LOCAL_MACHINE\SOFTWARE\Postgress.. Перезагружаемся. 1a. Делаем https://stackoverflow.com/a/68737176/23587300 1b. Проверяем кодировку, как сказано в https://stackoverflow.com/a/57897738/23587300 2. Создаем папку и даем в ней пользователям максимальные права, например C:\Program Files\MyFolder enter image description here
From Airflow 2.4, the Airflow Datasets can also be used for this. https://www.astronomer.io/docs/learn/airflow-datasets