After some googling, I found the answer by @ChrisMM in this post: "GCC's libstdc++ does not support P2465R3 yet, which allows for import std;". One can get the same answer from compiler_support for c++23.
The new resource editor is indeed a proverbial pain in the backside. Even after a few more updates (currently on 7.11.5) its still buggy as f***.
Currently for me its even causing my entire Visual Studio to crash, loosing code in the proces.
For now my workaround is to open them trough right click -> open with and select Managed Resource Editor (Legacy). Just select this option and press the Default button to revert back to the classic editor as a default till Microsoft can wrap its head around and fix it.
Perhaps Microsoft can also learn to release features like this after a more extensive testing phase as should be done with all software development?
The wrangler initcommand, used to initialize a new Worker project, provides an argument called from-dash which could be used to obtain a Worker initialized from the dashboard.
I have the same issue with MacOS 15.1.1 and Macbook Pro M3 Pro.
After updating to Android studio Ladybug 2024.2.1 Patch 2, it repeatedly did not respond and I had to force quit it.
i tested on microsoft edge and it runs as expected but in google chrome my css style doesn't have any effect on my other files and it genertaes Not Found: /favicon.ico
[23/Nov/2024 11:41:50] "GET /favicon.ico HTTP/1.1" 404 2366
[23/Nov/2024 11:42:08] "GET / HTTP/1.1" 200 536 error
so what is the issues
لا افهم في في النصوص التي تريدها لاكن اكثر من سنه وانا احتفظ في المستندات وكيف شبكة لاسلكية خارجية تتصل في هاتف وكنت اتوقع انكم شركة العاب عليكم ارجاع حساباتي وشكيات ومكافأة حصل عليها انا اظهر لكم بشكل واضح انتم من تستخدمون نشاطي وحفظ في المواقع لكم ستأخذ نصيبك من القضاء
It seems you're facing an issue with script autosave in Roblox Studio. I recommend checking out `RBXScriptPro.com for helpful tools and executors that might streamline your development process. They provide resources and solutions for scripting challenges like this, along with a community to help troubleshoot problems.
In the end I changed 2 lines of code and now this works:
client.connect_signal("unfocus", function(c)
awful.spawn.easy_async_with_shell("xkb-switch", function(stdout)
if c.valid then -- To avoid 'Invalid Object' error
c.keyboard_layout = stdout
end
end)
end)
client.connect_signal("focus", function(c)
if c.keyboard_layout == nil then
c.keyboard_layout = "us(altgr-intl)"
end
awful.spawn("xkb-switch -s "..c.keyboard_layout, false) -- `false` to prevent cursor being stuck in 'loading' state
end)
TensorFlow & PyTorch: These libraries provide the core tools to build and train GANs, VAEs, and other deep learning models for geometry generation.
Open3D: A library for working with 3D data, which can help with point clouds, meshes, and 3D visualizations.
PyTorch3D: A library specifically designed for deep learning-based 3D shape representation and manipulation.
DeepSDF: A model that uses neural networks to represent 3D shapes as signed distance fields.
Yes, you can rename the title (metadata) of a PDF document using Rust. To accomplish this, you'll need to parse and modify the PDF's metadata. A popular Rust crate for working with PDFs is lopdf, which provides functionality for reading and modifying PDF documents
It looks like you're trying to use import/export syntax, but in your final line, you're using module.exports. In ES modules, you should consistently use export and import throughout your code.
Export Statement: Changed module.exports = router; to export default router;.
I found out that there is nothing wrong with the code in the end, by just removing the UUID id from the User entity Constructor solved the issue, for some reason hibernate tries to create and re-create/overwrite it when the createUser method is invoked requesting a UUID.randomUUID, just by removing it and letting it create by itself just works out, weird though, I had a very similar Api where in the method createUser I had the same structure and worked out normally, don't know, it's running.
To implement an Android VPN app with a local DNS resolver, you should extend the VpnService class and configure it to route DNS queries through a local resolver.
If you're looking to create a table where the footer always stays fixed at the bottom of every printed page without overlapping the table content, follow these steps:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table with Footer on Print</title>
</head>
<body>
<h1>Table with Fixed Footer on Print</h1>
<table>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data 1</td>
<td>Data 2</td>
<td>Data 3</td>
</tr>
<tr>
<td>Data 4</td>
<td>Data 5</td>
<td>Data 6</td>
</tr>
<tr>
<td>Data 7</td>
<td>Data 8</td>
<td>Data 9</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
<div class="footer-space"></div> <!-- Empty div with a class -->
<div class="footer-content">This is the footer. It will always stay at the bottom of the printed page.</div>
</td>
</tr>
</tfoot>
</table>
</body>
</html>
Explanation
Empty Space Reservation:
The reserves space at the bottom of the table to prevent the footer from overlapping the table content. You can adjust its height as needed (e.g., 50px).
Footer Disclaimer:
The contains the actual footer content. It’s positioned at the bottom of each page using position: fixed.
CSS Print Media Query:
The @media print query ensures these styles only apply during printing.
Avoiding Overlap:
By reserving space using .footer-space, the footer only overlaps the empty space at the bottom of the table, avoiding any overlap with the content.
you need a paid Apple Developer account to use the com.apple.developer.applesignin entitlement. Free accounts don’t support advanced entitlements like Apple Sign-In. Without a paid account, your provisioning profile won’t include this capability, so the build will fail. If you don’t have a paid account, you’ll need to either remove Apple Sign-In from your project or upgrade to a paid account to enable this entitlement and build the app successfully.
To use the Apple Sign In feature in your app, you must include the required permissions in your provisioning profile. Unfortunately, the free Apple Developer account does not support certain features, such as Apple Sign In. As a result, you will need a paid Apple Developer account to solve this issue and properly develop your app with the necessary rights.
To fix the build error and use Apple Sign In, you'll need to get a Apple Developer account. This will let you build a provisioning profile with the necessary permissions for your app.
The for...in loop iterates over both own and inherited enumerable properties.
b and a are enumerable but on different level. b is made enumerable by makeEnumerable as instance property and a prototype property made enumerable by the @enumerable decorator.
Object.keys(enumerableA)
Output:['b']
Why:
Object.keys lists only the own enumerable properties.
b is made an own enumerable property by makeEnumerable function in constructor.
a is still on the prototype, so it is excluded.
Object.keys(Object.getPrototypeOf(enumerableA))
Output:['a']
Why:
It lists only enumerable properties on the prototype, @enumerable decorator modifies the prototype-level descriptor for a.
b is non-enumerable on prototype because makeEnumerable function made enumerable on instance only.
Object.getOwnPropertyNames(enumerableA)
Output:['b']
Why:
It lists all own properties (both enumerable and non-enumerable) but ignores prototype properties.
This lists all own properties (both enumerable and non-enumerable) defined directly on the prototype.
constructor, and b are non-enumerable but exist on prototype.
Why Object.entries throws an error
Object.entries access all the enumerable own properties.
When querying Object.entries(enumerableA):
It access b as it is enumerable property on instance. While accessing b, the this context of get b() {...} is the instance of MyClass { b: [Getter/Setter] }.
So it works fine, because the private properties in the class are accessible when this referes to the instance.
But when querying Object.entries(Object.getPrototypeOf(enumerableA))
It accesses a because a is an enumerable property on the prototype.
But it throws an error because the this context for the get a(){...} is the prototype object ({ a: [Getter/Setter] }), not an instance of MyClass
You must understand how private properties are handled by typescript.
Typescript generate some functions to check this when a method is called. If this is not same as own class it throws an error.
Check compiled Javascript code for more details.
Is there any way to use a decorator to make an accessor method an enumerable property?
No, it is not possible to make instance properties enumerable directly using decorators in Typescript because property decorators in Typescript only have access to the class prototype for instance members, not the instance itself.
A property decorator in Typescript is executed before any instances of the class are created. It operates at the class definition level.
If you want to make instance properities enumerable use makeEnumerable function, as you used for b.
I hope, I've addressed all your issues. If anything else you'd like to clarify, feel free to ask. Happy learning!
Is there a way to distribute editable global variable string across multiprocessing and threads?
You gave few details about your code; the OP doesn't offer a
repex.
Across threads is straightforward.
Though you probably want to protect access with a mutex.
Across processes implies writing to a file descriptor,
such as a pipe or an mmap'd file.
Easiest thing to do would be to append lines to a log file,
or INSERT rows in a relational database.
This solution works but input syntax is not as easy as in NodeJS:
$("Hello") - for string.
$(25) - for number.
$(true) - for bool.
here is the code:
window.$input = (() => {
let waitingCallback = null;
Object.defineProperty(window, '$', {
get: () => {
if (waitingCallback) {
const callback = waitingCallback;
waitingCallback = null;
return callback;
}
return () => { };
}
});
return prompt => {
console.log(prompt);
return new Promise(resolve => waitingCallback = resolve);
};
})();
// modify the function body. use 'await $input()'
async function example() {
const name = await $input('What is your name?');
const age = await $input('How old are you?');
console.log(`Your name is ${name} and you are ${age} years old.`);
}
// do not forget to call the function
example();
You have to remove opencv and its dependencies:
sudo apt remove python3-opencv
sudo apt autoremove
Then install again with the version you want:
sudo apt install python3-opencv=4.6.0
Hope it works.
I ended up using this code that uses #include <stdio.h>.
while (1) {
// Send the ADC buffer over USB
if (buffer_index >= BUFFER_SIZE) {
// Send buffer to USB
for (size_t i = 0; i < BUFFER_SIZE; i++) {
printf("ADC0: %d, ADC1: %d\n", adc_buffer[i * 2], adc_buffer[i * 2 + 1]);
}
buffer_index = 0; // Reset buffer index
}
vTaskDelay(pdMS_TO_TICKS(100)); // Adjust delay as needed
}
I had an assume: some games were imported successfully, but the retor's list_game cannot list it, so I want to figure out which game was imported but unlisted.
When I manually imported those games, I found many games in the ROMs have same name, forexample, "Robotank" occur 3 times, that's why I imported 167 games, but only have 59 in list. because there are same games in the ROMs.
I use this ROMS: https://www.atarimania.com/rom_collection_archive_atari_2600_roms.html
How to filter model views and retrieve data in the embedded Tandem Viewer?
After successfully initializing and starting the Autodesk Tandem Viewer, I can load and display the entire model. Based on a previous REST API call and user selection, I receive a twinId and a viewId.
Question 1: How can I display only the view (associated with the sViewId), not the entire model?
Question 2: How can I retrieve the data associated with the view (e.g., like the inventory table shown in the Tandem Viewer)?
Below is the relevant part of my current implementation:
I don’t have experience with your immediate concern, but in case you or others reading this post missed it, Microsoft has posted this page, which is a gateway to migrating from Bing Enterprise Maps to Azure Maps, including a link to a migration guide.
1 hour and 2 dislikes, what a toxic community. I am glad gpt came out.
Anyway, I managed to use voice meeter as a fake microphone input. This way, I stream audio into a virtual cable (the one recorded by ffmpeg) and this virtual cable routes information to my actual headset -- so I can simultanously listen to it while recording it with ffmpeg.
I am calling it from C++ as:
If you define the second Curve Loop similar to the first one, you will have desired result. Namely, change the Curve Loop(2) = {12, 3, 5, -6, 7, 8}; to the Curve Loop(2) = {-6,5,3,12,8,7};.
I am having some problems.
I am using React Native with Firebase and the getRedirectResult(auth) is consistently returning null even though I have already signed in with the google provider. I think it is because the page is doing a full reload?
const provider = new GoogleAuthProvider();
try {
await signInWithRedirect(auth, provider)
const result = await getRedirectResult(auth);
if (result) {
router.push('/HomeScreen');
}
} catch (error: any) {
console.error(error);
}
vector<?> is not in the global namespace. It is in the std namespace, and unless you want to use usings, you are going to have to qualify all references to it. Simply replace all instances of vector<?> that do not have a std:: prefix (such as the one at line 15) with std::vector<?> and that particular error should go away.
I am using gitlab ci to build the project like that to the google appengine, so how can we override the gitlab variable on application.yml. Many thanks
The issue you’re encountering—where your Python application processes XML files correctly when run standalone but raises an “expecting an int” exception in Visual Studio Code (VS Code)—could stem from several factors. Let’s explore potential causes and solutions:
Environment Differences:
• Python Interpreter: Ensure that VS Code is configured to use the same Python interpreter as your standalone environment. Differences in interpreter versions or environments can lead to discrepancies in behavior.
• Dependencies: Verify that all necessary libraries and modules are installed and consistent across both environments. Missing or mismatched dependencies can cause unexpected errors.
Exception Handling and Debugging:
• Detailed Logging: Enhance your exception handling to log detailed error messages, including stack traces. This can help pinpoint where the “expecting an int” exception originates.
• Isolated Testing: Create minimal test cases that replicate the issue. This approach can help isolate the problematic code and determine if the issue is specific to VS Code.
VS Code Configuration:
• Extensions: Disable unnecessary extensions that might interfere with your Python environment. Some extensions can cause conflicts or unexpected behavior.
• Settings: Review your VS Code settings, especially those related to Python and debugging, to ensure they align with your standalone environment.
XML Parsing Considerations:
• Parser Behavior: Different XML parsers may handle data types differently. Ensure that the parser you’re using is consistent across environments and that it correctly interprets the XML data types.
• Data Validation: Implement validation checks to ensure that the XML data conforms to expected formats and types before processing.
External Resources:
• Similar issues have been discussed in the developer community. For instance, a Stack Overflow thread addresses exceptions encountered when parsing XML using lxml in Python. 
By systematically examining these areas, you can identify and resolve the discrepancies between your standalone script and its execution within VS Code.
nslookup <your-azure-config-endpoint>.azconfig.io run this command inside your VM to check the connectivity to your service endpoint. If it is fail you need to check your DNS settings. And check your Virtual machine NSG rules whether it blocking your request or not.
I am hitting this issue. CGI::Application with a Session plugin. Every request returns the same CGISESSID to different clients. I am running the latest versions of perl and (Fast)CGI.
No, you are not right. The documentation on readonly struct is perfectly correct. Your question contains a broken link, the correct URL of this documentation page and section is this.
The explanation is pretty simple. Consider this example:
readonly struct A {
internal A(int first, string second) { First = first; Second = second; }
internal readonly int First { get; init; }
internal readonly string Second { get; init; }
}
static class ReadonlyUsage {
static A value = new(0, "original value");
internal static void Demo() {
A a = new(1, "constant value");
//a.First = 12; // will fail to compile
a = new(2, "another value");
// this is mutable:
value = new(3, "one more value");
//value.First = 13; // will fail to compile
// still mutable:
value = new(4, "How much longer?!");
}
}
What is mutable here? Nothing except ReadonlyUsage.value, and it makes ReadonlyUsage also mutable. It has nothing to do with struct A — it is immutable. Exactly as System.String.
Let's see: what about the assignment to A a? Does this assignment make ReadonlyUsage mutable? No. You assign a new value (and struct A is a value type) to a stack variable. It exists only in the stack and will be removed after the exit of a current stack frame. The stack does not belong to the class, it belongs to the thread calling ReadonlyUsage.Demo. The assignment does not modify anything in the Demo class if it was an instance class. We simply create a new struct A instance and never modify any of the already existing instances, that's why it is called immutable.
Now, what about the assignment to ReadonlyUsage.value? It is possible, because ReadonlyUsage is mutable. Again, we create new instances of struct A and never modify any of the already existing instances.
How to prevent the assignment to ReadonlyUsage.value? Easy: make it readonly, too:
static readonly A value = new(0, "original value");
That's it. I hope the misunderstanding is dismissed. Will you accept the answer then? If not, please ask further questions.
I want to leave this solution here for anyone trying to add the pin and show the actual place card with name and details (instead of just a pin with coordinates):
if (UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!)) {
let encodedName = self.location.name.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
let googleMapsURL = "comgooglemaps://?q=\(encodedName)¢er=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)&views=satellite&zoom=15"
UIApplication.shared.open(URL(string: googleMapsURL)!, options: [:], completionHandler: nil)
} else {
print("Can't use comgooglemaps://")
}
This works perfectly if there's only one place with that specific name. Unfortunately, if there are multiple places with the same name (like if there's a bus station right next to your location), it will show a list of all matching places. I haven't found a way to only get the wanted place, even if I use it's ID.
Note: This solution requires the place name (location.name) in addition to the coordinates.
If anyone has a better solution that can handle multiple places with the same name, please share it in the comments as I'm also looking for one!
If your PHP is running through a proxy like PHP-FPM, the proxy might report a timeout if the underlying PHP process is halted by the debugger. In that case you would still be able to debug and run the code line by line, but the output would never reach the proxy and the client of the request. Perhaps increasing timeout values somewhere in PHP-FPM configuration might help.
I did extensive search and did not find a solution. Some poster got rid of this issue but none worked in my case. And a few posted that the button does not have to be MaterialButton.
Here is the error message I had:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
Android resource linking failed
com.bignerdranch.android.geoquiz.app-mergeDebugResources-43:/layout/activity_main.xml:49: error: attribute iconGravity (aka com.bignerdranch.android.geoquiz:iconGravity) not found.
error: failed linking file resources.
I would personally use ngOnChanges as a solution. With the set input function, you would need to create a variable like #_username and validate whether the variable has actually changed or not. Otherwise, you could end up in a loop or trigger the ExpressionChangedAfterItHasBeenChecked error. But I wonder, couldn't the parent component update its signal? This way, you would avoid having an input 'username' in your component and instead receive the signal directly in a computed property, making your component more independent and clean.
After looking into it further I found the following Reddit post which encounters a similar issue and uses keyboard.read_event(suppress=True). This prevents the event from being propagated further to the input().
Extensions:
Python (microsoft) - rolled back to 2024.14.0
Pylance
Python debugger
github copilot
github copilot chat
Read countless threads trying to find others with the same issue, trying all recommended solutions but no luck.
increasing buffer settings
different installations of vscode / clean re-installs
rolled back python extension
reinstalled all extensions
changed / removed overlapping keyboard shortcuts
tried running selection in virtual environments
tried installing most recent python version as different interpreter
Your issue sounds identical to mine, running any more than a few selected lines of code at a time results in the output to terminal freezing up while executing the code, only running a few lines before getting stuck/frozen halfway through running a random line (depending on where I start the selection from).
It seems as though the code WILL run if I go line by line but in a file with 100+ lines this is not ideal.
This functionality was working fine before and something has broken it but I cannot for the life of me figure out what.
The only other major change to my computer recently was upgrading the OS to Sequoia, so i will likely try that next but was avoiding having to revert OS.
cy.get('#warn-dialog-submit')
.should(()=>{}) //this disable the failure if the element does not exist
.then(($el) =>{
if($el && $el.length){
cy.wrap($el).click()
}
})
Simple way to know if loading vs not found in Vue:
const item = useObservable(Dexie.liveQuery(() => db.items.get(id.value).then(o => o || null)))
// Handle not found (undefined = still loading, null = not found)
watch(item, (newItem) => {
if (newItem === null) {
// HANDLE NOT FOUND
}
})
So after troubleshooting a little more I was able to finally get it working. Turns out it was just some user-error on my part. In the reddit script I made three major errors, in my meme function I simply had an extra space between "def" and the function. Secondly I made some indention errors with the if statements inside the meme function. Then lastly I misspelled the "posts_lists" variable when assigning it to the "random_post" variable later in the same block of code
The best way is to loop over all pixels and create a diff image. In your loop you subtract the lower color value from the higher. That means black if the pixels are identical. So you should use 255 - pixelcolor and let it be the pixel value in the diff vector and when you are done, you save it as a png. I just made such a program in c++ and i used the windows imaging component to create raw byte vectors for both files and then looped over every pixel and every color to create a raw byte array with values. It reveals how jpegmini works but you have to multiply the close to zero values that you get. Quite revealing