Month: August 2024
ADODB performance problem
Hi All, (Win10, Win11)
To highlight a performance problem (with ADODB/ACCESS), on a heavy client, I wrote two small programs one in VB.NET (and VBA), the other in CPP/MFC. Using the same component (msado15.dll).
This piece of code does nothing but connect to two ACCESS files (with a single table of 15,000 records), and via a recordset copy from one database to the other.
Under VB.NET, it takes 1 second.
Under CPP, on a machine that has the runtime access 2013 x64, it takes 9 seconds. (i spend 99% of my time in AddNew() )…
Under CPP, on a machine that has the runtime access 2016 x64 OR Office365, it takes 20 minutes. (i spend 99% of my time in AddNew() )…
The target computer must have Office365…
I need an issue…
PS : My two sln (exe/cpp/…) are available…There is no sensitive data…
A short running test…
|Nom de la fonction|Total [unit, %]|Self [unit, %]|Nombre d’appels|Module|
|-|-|-|-|-||*+*D:\users\phili\Downloads\Test_ADO_Cpp_VB\test_minimal\x64\Release\test.exe (PID : )|115,73s (100,00*%)|0ns (0,00*%)|0|Plusieurs modules|
||*+*__report_gsfailure|115,73s (100,00*%)|9,20?s (0,00*%)|1|test|
|||*+*__scrt_common_main_seh|115,73s (100,00*%)|13,20?s (0,00*%)|1|test|
||||*+*main|115,73s (100,00*%)|654,83ms (0,57*%)|1|test|
|||||*-*[Native] msado15.dll!0x00007ffe8947bc40|104,82s (90,58*%)|104,82s (90,58*%)|6215|msado15| <= AddNew() !!!
|||||*-*[Native] ucrtbase.dll!0x00007fff373ccad0|9,31s (8,05*%)|9,31s (8,05*%)|1|ucrtbase|
|||||*-*ADODB::Connection15::Open|413,29ms (0,36*%)|8,80?s (0,00*%)|2|test|
|||||*-*[Native] msado15.dll!0x00007ffe8947c010|101,83ms (0,09*%)|101,83ms (0,09*%)|2|msado15|
|||||*-*printf|96,90ms (0,08*%)|157,30?s (0,00*%)|214|test|
|||||*-*[Native] msado15.dll!0x00007ffe8947d3d0|91,69ms (0,08*%)|91,69ms (0,08*%)|74568|msado15|
|||||*-*[Native] msado15.dll!0x00007ffe8947d380|50,46ms (0,04*%)|50,46ms (0,04*%)|74568|msado15|
|||||*-*[Native] msado15.dll!0x00007ffe894d8fc0|30,92ms (0,03*%)|30,92ms (0,03*%)|149136|msado15|
|||||*-*[Native] msado15.dll!0x00007ffe8947bfc0|28,68ms (0,02*%)|28,68ms (0,02*%)|6214|msado15|
|||||*-*[Native] combase.dll!0x00007fff39403f10|26,94ms (0,02*%)|26,94ms (0,02*%)|5|combase|
|||||*-*[Native] msado15.dll!0x00007ffe89513fc0|17,39ms (0,02*%)|17,39ms (0,02*%)|149137|msado15|
|||||*-*[Native] msado15.dll!0x00007ffe894c1480|15,11ms (0,01*%)|15,11ms (0,01*%)|1|msado15|
|||||*-*[Native] msado15.dll!0x00007ffe8947c230|14,46ms (0,01*%)|14,46ms (0,01*%)|149137|msado15|
|||||*-Native]msado15.dll!0x00007ffe8947d2b0|11,32ms,01*%)|11,32ms,01*%)|149136|msado15|
Regards
Hi All, (Win10, Win11)To highlight a performance problem (with ADODB/ACCESS), on a heavy client, I wrote two small programs one in VB.NET (and VBA), the other in CPP/MFC. Using the same component (msado15.dll).This piece of code does nothing but connect to two ACCESS files (with a single table of 15,000 records), and via a recordset copy from one database to the other.Under VB.NET, it takes 1 second.Under CPP, on a machine that has the runtime access 2013 x64, it takes 9 seconds. (i spend 99% of my time in AddNew() )…Under CPP, on a machine that has the runtime access 2016 x64 OR Office365, it takes 20 minutes. (i spend 99% of my time in AddNew() )…The target computer must have Office365…I need an issue…PS : My two sln (exe/cpp/…) are available…There is no sensitive data…A short running test…|Nom de la fonction|Total [unit, %]|Self [unit, %]|Nombre d’appels|Module||-|-|-|-|-||*+*D:\users\phili\Downloads\Test_ADO_Cpp_VB\test_minimal\x64\Release\test.exe (PID : )|115,73s (100,00*%)|0ns (0,00*%)|0|Plusieurs modules|||*+*__report_gsfailure|115,73s (100,00*%)|9,20?s (0,00*%)|1|test||||*+*__scrt_common_main_seh|115,73s (100,00*%)|13,20?s (0,00*%)|1|test|||||*+*main|115,73s (100,00*%)|654,83ms (0,57*%)|1|test||||||*-*[Native] msado15.dll!0x00007ffe8947bc40|104,82s (90,58*%)|104,82s (90,58*%)|6215|msado15| <= AddNew() !!!|||||*-*[Native] ucrtbase.dll!0x00007fff373ccad0|9,31s (8,05*%)|9,31s (8,05*%)|1|ucrtbase||||||*-*ADODB::Connection15::Open|413,29ms (0,36*%)|8,80?s (0,00*%)|2|test||||||*-*[Native] msado15.dll!0x00007ffe8947c010|101,83ms (0,09*%)|101,83ms (0,09*%)|2|msado15||||||*-*printf|96,90ms (0,08*%)|157,30?s (0,00*%)|214|test||||||*-*[Native] msado15.dll!0x00007ffe8947d3d0|91,69ms (0,08*%)|91,69ms (0,08*%)|74568|msado15||||||*-*[Native] msado15.dll!0x00007ffe8947d380|50,46ms (0,04*%)|50,46ms (0,04*%)|74568|msado15||||||*-*[Native] msado15.dll!0x00007ffe894d8fc0|30,92ms (0,03*%)|30,92ms (0,03*%)|149136|msado15||||||*-*[Native] msado15.dll!0x00007ffe8947bfc0|28,68ms (0,02*%)|28,68ms (0,02*%)|6214|msado15||||||*-*[Native] combase.dll!0x00007fff39403f10|26,94ms (0,02*%)|26,94ms (0,02*%)|5|combase||||||*-*[Native] msado15.dll!0x00007ffe89513fc0|17,39ms (0,02*%)|17,39ms (0,02*%)|149137|msado15||||||*-*[Native] msado15.dll!0x00007ffe894c1480|15,11ms (0,01*%)|15,11ms (0,01*%)|1|msado15||||||*-*[Native] msado15.dll!0x00007ffe8947c230|14,46ms (0,01*%)|14,46ms (0,01*%)|149137|msado15||||||*-Native]msado15.dll!0x00007ffe8947d2b0|11,32ms,01*%)|11,32ms,01*%)|149136|msado15|Regards Read More
Adjacent column formulas not updated correctly on power query refresh
I have a query that reads a few csv files. It’s a simple query. There are a couple thousand rows, but it’s not complicated.
That data is loaded into a table.
I then added columns in excel, adjacent to the table with formula. Fairly straight forward.
Problem: When I update the query, new data comes in as expected, but the adjascent cells do not autofill down UNTIL you get to the last row of the new data where (somehow) the formula are filled across that row in all the adjascent columns. There’s litterally a gap between the last previous row of formula and the newly minted last row in the table.
I’ve tried several fixes, none have worked. Hoping someone can point me in the right direction. One thing I’m wondering is the whether the formula structure is causing an issue. I am not using structured formlas, rather simply referencing cells.
I have a query that reads a few csv files. It’s a simple query. There are a couple thousand rows, but it’s not complicated.That data is loaded into a table.I then added columns in excel, adjacent to the table with formula. Fairly straight forward.Problem: When I update the query, new data comes in as expected, but the adjascent cells do not autofill down UNTIL you get to the last row of the new data where (somehow) the formula are filled across that row in all the adjascent columns. There’s litterally a gap between the last previous row of formula and the newly minted last row in the table. I’ve tried several fixes, none have worked. Hoping someone can point me in the right direction. One thing I’m wondering is the whether the formula structure is causing an issue. I am not using structured formlas, rather simply referencing cells. Read More
MS Bookings Calendars being viewable in Outlook Shared Calendars
The trouble we have is that we are unable to see/share the bookings calendars in the our Outlook calendars with stakeholders & managers. All employees go through O365 to the bookings page and enter the calendar from there to look at it. If we were able to see the MS Bookings page calendar where we usually select shared calendars to view them side by side would be a huge benefit.
Does anyone know if this is at all possible. Or anyone else having this challenge?
The trouble we have is that we are unable to see/share the bookings calendars in the our Outlook calendars with stakeholders & managers. All employees go through O365 to the bookings page and enter the calendar from there to look at it. If we were able to see the MS Bookings page calendar where we usually select shared calendars to view them side by side would be a huge benefit.Does anyone know if this is at all possible. Or anyone else having this challenge? Read More
Fraudulant use
Lately, I have been seeing email with my user name and an addition to it like below:
email address removed for privacy reasons email address removed for privacy reasons.S7S <email address removed for privacy reasons email address removed for privacy reasons.S7S>
I want to know how to stop this kind of garbage from sending me what can only be described as junk and phishing emails. I cannot block them because Outlook states I cannot block my email address removed for privacy reasons email even though it really isn’t my email.
Anyone else experiencing this kind of garbage?
Frustrated Long-Time User (If you couldn’t tell from my hotmail.com address),
Ray
Lately, I have been seeing email with my user name and an addition to it like below:email address removed for privacy reasons email address removed for privacy reasons.S7S <email address removed for privacy reasons email address removed for privacy reasons.S7S>I want to know how to stop this kind of garbage from sending me what can only be described as junk and phishing emails. I cannot block them because Outlook states I cannot block my email address removed for privacy reasons email even though it really isn’t my email. Anyone else experiencing this kind of garbage?Frustrated Long-Time User (If you couldn’t tell from my hotmail.com address),Ray Read More
Sharepoint Online – 4000 site permissions adjustment query
Hi everyone, im hoping for some recommendations/advice. We have around 4000 sharepoint sites for Devices that currently have a single document library named Projects and some sub-folders in there created using pnp site provisioning. Every site is identical.
The permissions are currently dynamic where by the Members group has a security group added that ensures all active licensed users can access.
We have a requirement to start provisioning new sites where by two of the folders within the Projects library will have custom permissions which means breaking the inheritance and then adding another security group in however from what i have read this is against best practices.
Also it doesn’t help us as this will then need doing on the 4000 existing sites and having that many sites to manage at a unique level seems very scary.
What can be done here to block access to a couple of folders at tenant level for so many sites without needing to break inheritance of permissions.
Or is there no way, would one alternative be to create a new master site where every “Device” was a document library in this site (Around 4000) then the two folders in there and have a security group then assigned to the root members of that site fixing the permission requirement.
Thankyou,
Hi everyone, im hoping for some recommendations/advice. We have around 4000 sharepoint sites for Devices that currently have a single document library named Projects and some sub-folders in there created using pnp site provisioning. Every site is identical. The permissions are currently dynamic where by the Members group has a security group added that ensures all active licensed users can access. We have a requirement to start provisioning new sites where by two of the folders within the Projects library will have custom permissions which means breaking the inheritance and then adding another security group in however from what i have read this is against best practices. Also it doesn’t help us as this will then need doing on the 4000 existing sites and having that many sites to manage at a unique level seems very scary. What can be done here to block access to a couple of folders at tenant level for so many sites without needing to break inheritance of permissions. Or is there no way, would one alternative be to create a new master site where every “Device” was a document library in this site (Around 4000) then the two folders in there and have a security group then assigned to the root members of that site fixing the permission requirement. Thankyou, Read More
Windows Insider Program Feedback Sign In
I am getting an error message “Can’t sign you in”, error code CAA20003 when accessing Windows Insider Program Feedback from Windows Update. I have Windows 11. I follow the prompt to check Outlook and acknowledge the request. This completes just fine. I also tried the feedback hub app from the website.
I am getting an error message “Can’t sign you in”, error code CAA20003 when accessing Windows Insider Program Feedback from Windows Update. I have Windows 11. I follow the prompt to check Outlook and acknowledge the request. This completes just fine. I also tried the feedback hub app from the website. Read More
Copy existing formulas into Advanced Formula Environment module?
I haven’t found any guidance here or elsewhere on copying existing LAMBDA functions from a workbook into a module in AFE so that I can export it into a GitHub Gist for reuse in other workbooks.
I could copy & paste one at a time … but in some cases it would be onerous!
Situation: I have a few workbooks with several LAMBDA functions defined as “Names”. I can bring up the list in AFE:
The “duplicate” button creates the copy only in the workbook with no option to move it to a module. I can “paste” the definitions in “Formulas>Use In Formula>Paste Names” from the menu and paste them into the module text, but then lose the comments (“Creates string with…” in the image).
Am I missing something?
Thanks!
I haven’t found any guidance here or elsewhere on copying existing LAMBDA functions from a workbook into a module in AFE so that I can export it into a GitHub Gist for reuse in other workbooks.I could copy & paste one at a time … but in some cases it would be onerous! Situation: I have a few workbooks with several LAMBDA functions defined as “Names”. I can bring up the list in AFE: The “duplicate” button creates the copy only in the workbook with no option to move it to a module. I can “paste” the definitions in “Formulas>Use In Formula>Paste Names” from the menu and paste them into the module text, but then lose the comments (“Creates string with…” in the image). Am I missing something? Thanks! Read More
MVP’s Favorite Content: Surface, Azure, Microsoft AI
In this blog series dedicated to Microsoft’s technical articles, we’ll highlight our MVPs’ favorite article along with their personal insights.
SungKi Park, Windows and Devices MVP, Korea
Surface MVP showcase: Enabling commercial experiences on Surface – Microsoft Community Hub
“Introduce a joint blog article that provides accurate product information about Microsoft Surface, which provides both AI PC and Copilot PC, as well as insights from five Surface MVPs.”
*Relevant activities:
– Event/ FY24 Surface Partner Day: Post | LinkedIn
– Blog/ Surface Pro 10 for Business Product Review: “비즈니스용 서피스 프로10” AI PC 시대.. : 네이버블로그 (naver.com)
– Blog/ Surface Laptop 6 for Business Product Review: 비즈니스용 마이크로소프트 서피스 랩탑 6, A.. : 네이버블로그 (naver.com)
Hamid Sadeghpour Saleh, Microsoft Azure MVP, Azerbaijan
“Well Architected Framework is an important design framework to learn and make an architectural mindset out of it and having those best practices in the pocket!”
Mohamed Azarudeen Z, AI Platform MVP, India
Machine learning Archives | Microsoft AI Blogs
“The Microsoft AI Blogs is an invaluable resource that offers the latest insights on the forefront of artificial intelligence advancements. Covering a diverse array of topics, it delves into the transformative power of AI across multiple industries and its seamless integration within Microsoft’s ecosystem of products and services. as an AI- MVP, I suggest this to everyone to yearn learning AI.
The blog also explores the wider impact of AI on various industry landscapes, analyzing how this groundbreaking technology is revolutionizing business operations, fostering innovation, and significantly influencing individuals’ lives on a global scale.”
Tomoitsu Kusaba, Developer Technologies MVP, Japan
Generative AI for Beginners – Full Videos Series Released! (microsoft.com)
“This video provides a well-organized summary of what developers should learn about generative AI. By making it available in video format, it caters to those who prefer learning through text as well as those who prefer video. From an accessibility standpoint, this approach is excellent.”
(In Japanese: 生成AIについて開発者が学ぶべき事柄がよくまとまっています。動画で公開されたことで、テキストで学習したい方、動画で学習したい方それぞれに対応しアクセシビリティの観点から見ても素晴らしい対応と感じています。)
Microsoft Tech Community – Latest Blogs –Read More
Downloading Microsoft Store apps using Windows Package Manager
By: Carlos Britos and Jason Sandys – Principal Product Managers | Microsoft Intune
Offline apps is the last remaining significant function of the Microsoft Store for Business on its path to full retirement. Offline apps allows customers to download packaged apps from the Microsoft Store for Business or Education for distribution through alternate mechanisms like a Windows Provisioning Package.
With the impending retirement of the Microsoft Store for Business and Education on August 15, 2024, this offline apps functionality will also retire but the ability to download and distribute packaged apps from the Microsoft Store to devices with restricted connectivity to the Microsoft Store remains. For this reason, starting with version 1.8, Windows Package Manager (WinGet) added the capability to download packages from the Microsoft Store. Unless explicitly disabled, all Windows devices will have automatically updated to this version already. To check the version running locally, you can run winget –v from a command prompt. For troubleshooting guidance, see Debugging and troubleshooting issues with the WinGet tool.
Keep in mind that just as with offline applications from the Microsoft Store for Business and Education, the download feature in WinGet is limited to packaged apps where the publisher has permitted offline licensing and distribution for organizations. This is controlled by the app publisher, not Microsoft. All unpackaged apps published to the Microsoft Store are available for download.
Also note, packaged apps include UWP apps packaged in the AppX format as well as apps packaged in the MSIX format. Unpackaged apps include all Win32 apps packaged in an alternate format such as MSI or EXE.
Downloading a Microsoft Store app using WinGet
Using the WinGet command line interface (CLI) to download an app from the Microsoft Store is straight-forward. The following example walks through the download of the Microsoft Remote Desktop app. This is an app published by Microsoft and allows offline downloads. For more information on any of the below steps or information related to the new download option, please refer to the WinGet download command documentation. Note that WinGet leverages Delivery Optimization to download apps from the Microsoft Store.
Locate the package you wish to download using the WinGet CLI. This step is optional
if you already know the exact package name or ID of the desired package in which case you can skip directly to step 2 below.
winget search “remote desktop” –source MSStore
Use the new download command line argument for the CLI along with the package ID previously returned. By default, files for the specified package are downloaded to the Downloads subfolder of the current user’s profile folder. To override this location, use the -d or –download-directory option on the WinGet command line.
winget download –id 9WZDNCRFJ3PS
Note: You can limit the scope of the downloaded package using additional filtering options on the WinGet command line, e.g., use -a or –architecture to only download content related to a specific OS architecture.
Review the initial information shown and accept the agreements linked by pressing Y and then Enter. If the current account is not currently logged into Microsoft Entra, you will be presented with a standard Entra ID authentication prompt and must successfully authenticate to proceed. Additionally, the account used requires one of the following roles:
Global Administrator
User Administrator
License Administrator
WinGet creates a new folder in the default or specified download folder named for the package ID you specified and proceeds to download the packages and its dependencies to this subfolder. Additionally, WinGet retrieves a license for the package as all packaged apps from the Microsoft Store require a license.
You can now use the downloaded package using your management tool of choice.
Installing a WinGet downloaded package in a Windows provisioning package
Using packages downloaded by WinGet within a Windows provisioning package allows you to install the downloaded apps while provisioning a Windows device for management by Microsoft Intune. To do this, follow these steps:
Download the Windows Configuration Designer (WCD) app from the Microsoft Store.
Launch WCD and choose the Provision desktop devices option on the Start page.
Provide a name and location for the project.
Provide information on the Set up device, Set up network, and Account Management pages as needed.
For the Add applications page, click Add an Application.
Provide the Application name, Installer path and License path for the application that you are adding.
Add all Required appx dependencies and click Add to finish. The following screenshot shows the completed Add applications page in WCD for Microsoft Remote Desktop including its x64 dependencies.
Complete the Add certificates page as needed and under the Finish step, select Create to complete the process.
Your provisioning package is now ready.
Installing a WinGet downloaded package using Intune
In general, we recommend using the built-in Intune functionality to distribute Microsoft Store apps to managed Windows devices. However, you can also use other device management tools to deploy packaged apps separately downloaded using WinGet download. Scenarios where you may consider this include the following:
Managed clients cannot access or are restricted from connecting to the Microsoft Store.
Strict app version control is required.
To use Intune for this, follow the steps at Add a Windows line-of-business app to Microsoft Intune. Note that managed Windows endpoints must be able to connect to the Microsoft license server to retrieve a license for any apps deployed this way as Intune has no built-in capability to do this. Additionally, Microsoft Store apps will automatically update from the Microsoft Store if devices have connectivity to the Microsoft Store and Automatic Store app updates is not disabled, regardless of the app deployment method.
By following these steps, you can effectively utilize WinGet and Intune to manage app deployments, ensuring all necessary licenses and dependencies are correctly handled. This approach facilitates a streamlined and controlled deployment process across managed Windows devices.
If you have any questions or feedback, leave a comment below or reach out to us on X @IntuneSuppTeam.
Microsoft Tech Community – Latest Blogs –Read More
Why did I get duplicate variables in my workspace after changing their names?
(I did solve this problem but I haven’t been able to repeat it. I hope it’s okay to ask here anyway because I am curious if anyone has an explanation. I will describe below what solved it and how I have tried to repeat it. Couldn’t find any threads describing this anywhere.)
I had a few variables in my script with names starting with capital letters that I wanted to change to lowercase first letters. For example I wanted to change "Flux_th" to "flux_th". See code example below with only the relevant lines from my script.
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
Flux_th = 42078172084928.6; % [neutrons/cm2/s]
I used the shift+enter function in matlab to change "Flux_th" to "flux_th" (same with the other variables).
I cleared my workspace, I ran the script (like below) and got BOTH "Flux_th" and "flux_th" in my workspace (they have the same value).
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
I tried changing back to capital letters on "Flux_th" and doing the same thing again but it still gave me duplicates.
I am pretty sure that I tried manually deleting the duplicates with capital letters in the workspace and then running the script, but that also gave me duplicates.
It happened again even after restarting matlab.
What DID actually solve the problem is the following sequence:
I cleared the workspace, then I ran this separate script that creates and saves the .mat files, that script looks like this:
%% Global nuclear data
%data for reactions
dataNucGlobal_reac = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["barn";"isotopefrac";"reference"]);
dataNucGlobal_reac(‘O16 (n,p) N16: s-f’, 🙂 = {2.026e-5, 99.76, "ENDL"};
save(‘dataNucGlobal_reac’)
%data for nuclides
dataNucGlobal_nuc = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["halflife_s"; "decayconst"; "reference"]);
dataNucGlobal_nuc(‘N16’, 🙂 = {7.12, log(2)/7.12, "?"};
save(‘dataNucGlobal_nuc’)
Then I ran my original script without the load lines like this:
% load(‘dataNucGlobal_nuc.mat’)
% load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
This time I did not get any duplicates, so I cleared my workspace again and reinserted the load lines and finally ran the script like this:
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
Now everything is working and I can’t reproduce what happened by changing variable names from capital to lowercase letters.
I am super confused because as you can see, the .mat-files DO NOT contain any of the variables that became duplicates, so it doesn’t make any sense that this would help. I have no idea what happened so that is why I am asking here.(I did solve this problem but I haven’t been able to repeat it. I hope it’s okay to ask here anyway because I am curious if anyone has an explanation. I will describe below what solved it and how I have tried to repeat it. Couldn’t find any threads describing this anywhere.)
I had a few variables in my script with names starting with capital letters that I wanted to change to lowercase first letters. For example I wanted to change "Flux_th" to "flux_th". See code example below with only the relevant lines from my script.
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
Flux_th = 42078172084928.6; % [neutrons/cm2/s]
I used the shift+enter function in matlab to change "Flux_th" to "flux_th" (same with the other variables).
I cleared my workspace, I ran the script (like below) and got BOTH "Flux_th" and "flux_th" in my workspace (they have the same value).
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
I tried changing back to capital letters on "Flux_th" and doing the same thing again but it still gave me duplicates.
I am pretty sure that I tried manually deleting the duplicates with capital letters in the workspace and then running the script, but that also gave me duplicates.
It happened again even after restarting matlab.
What DID actually solve the problem is the following sequence:
I cleared the workspace, then I ran this separate script that creates and saves the .mat files, that script looks like this:
%% Global nuclear data
%data for reactions
dataNucGlobal_reac = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["barn";"isotopefrac";"reference"]);
dataNucGlobal_reac(‘O16 (n,p) N16: s-f’, 🙂 = {2.026e-5, 99.76, "ENDL"};
save(‘dataNucGlobal_reac’)
%data for nuclides
dataNucGlobal_nuc = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["halflife_s"; "decayconst"; "reference"]);
dataNucGlobal_nuc(‘N16’, 🙂 = {7.12, log(2)/7.12, "?"};
save(‘dataNucGlobal_nuc’)
Then I ran my original script without the load lines like this:
% load(‘dataNucGlobal_nuc.mat’)
% load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
This time I did not get any duplicates, so I cleared my workspace again and reinserted the load lines and finally ran the script like this:
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
Now everything is working and I can’t reproduce what happened by changing variable names from capital to lowercase letters.
I am super confused because as you can see, the .mat-files DO NOT contain any of the variables that became duplicates, so it doesn’t make any sense that this would help. I have no idea what happened so that is why I am asking here. (I did solve this problem but I haven’t been able to repeat it. I hope it’s okay to ask here anyway because I am curious if anyone has an explanation. I will describe below what solved it and how I have tried to repeat it. Couldn’t find any threads describing this anywhere.)
I had a few variables in my script with names starting with capital letters that I wanted to change to lowercase first letters. For example I wanted to change "Flux_th" to "flux_th". See code example below with only the relevant lines from my script.
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
Flux_th = 42078172084928.6; % [neutrons/cm2/s]
I used the shift+enter function in matlab to change "Flux_th" to "flux_th" (same with the other variables).
I cleared my workspace, I ran the script (like below) and got BOTH "Flux_th" and "flux_th" in my workspace (they have the same value).
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
I tried changing back to capital letters on "Flux_th" and doing the same thing again but it still gave me duplicates.
I am pretty sure that I tried manually deleting the duplicates with capital letters in the workspace and then running the script, but that also gave me duplicates.
It happened again even after restarting matlab.
What DID actually solve the problem is the following sequence:
I cleared the workspace, then I ran this separate script that creates and saves the .mat files, that script looks like this:
%% Global nuclear data
%data for reactions
dataNucGlobal_reac = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["barn";"isotopefrac";"reference"]);
dataNucGlobal_reac(‘O16 (n,p) N16: s-f’, 🙂 = {2.026e-5, 99.76, "ENDL"};
save(‘dataNucGlobal_reac’)
%data for nuclides
dataNucGlobal_nuc = table(‘Size’,[0,3], ‘VariableTypes’,["double", "double", "string"],’VariableNames’,["halflife_s"; "decayconst"; "reference"]);
dataNucGlobal_nuc(‘N16’, 🙂 = {7.12, log(2)/7.12, "?"};
save(‘dataNucGlobal_nuc’)
Then I ran my original script without the load lines like this:
% load(‘dataNucGlobal_nuc.mat’)
% load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
This time I did not get any duplicates, so I cleared my workspace again and reinserted the load lines and finally ran the script like this:
load(‘dataNucGlobal_nuc.mat’)
load(‘dataNucGlobal_reac.mat’)
flux_th = 42078172084928.6; % [neutrons/cm2/s]
Now everything is working and I can’t reproduce what happened by changing variable names from capital to lowercase letters.
I am super confused because as you can see, the .mat-files DO NOT contain any of the variables that became duplicates, so it doesn’t make any sense that this would help. I have no idea what happened so that is why I am asking here. variable-names, duplicates MATLAB Answers — New Questions
Field-Oriented Control of PMSM Using Reinforcement Learning code
Does anyone know where to find that Matlab code for the example presented
Field-Oriented Control of PMSM Using Reinforcement Learning
the is shown below but Matlab does not seem to have this code:
https://www.mathworks.com/help/mcb/gs/foc-of-pmsm-using-reinforcement-learning.htmlDoes anyone know where to find that Matlab code for the example presented
Field-Oriented Control of PMSM Using Reinforcement Learning
the is shown below but Matlab does not seem to have this code:
https://www.mathworks.com/help/mcb/gs/foc-of-pmsm-using-reinforcement-learning.html Does anyone know where to find that Matlab code for the example presented
Field-Oriented Control of PMSM Using Reinforcement Learning
the is shown below but Matlab does not seem to have this code:
https://www.mathworks.com/help/mcb/gs/foc-of-pmsm-using-reinforcement-learning.html @john MATLAB Answers — New Questions
New to Powerpoint
How do I add narration to a Ppt and have the slide show play like a movie? Additionally, the movie should last for 60 seconds or less. Is there a way to ensure this with Powerpoint? Any help that you can give me would be greatly appreciated. Thank you.
How do I add narration to a Ppt and have the slide show play like a movie? Additionally, the movie should last for 60 seconds or less. Is there a way to ensure this with Powerpoint? Any help that you can give me would be greatly appreciated. Thank you. Read More
Field Type Modification
I performed an import of Excel data into SharePoint List. I brought the Excel (ID) field into the Title column. I need this to be sortable so I created a Numeric column (IDMaster) with the values from the Title column and there are over 1000 records. How do I format the IDMaster so that it does not include a “,” (i.e., 1,000 -> 1000)?
I performed an import of Excel data into SharePoint List. I brought the Excel (ID) field into the Title column. I need this to be sortable so I created a Numeric column (IDMaster) with the values from the Title column and there are over 1000 records. How do I format the IDMaster so that it does not include a “,” (i.e., 1,000 -> 1000)? Read More
Editing the Pinned Section in my Viva Engage Community
I am trying to re-sort & edit the Pinned Section of my Viva Engage page/community. I can add links & delete links, but cannot change the order of all the links on the page for some reason. Does anyone have a solution besides a complete manual re-do of the list?
I am trying to re-sort & edit the Pinned Section of my Viva Engage page/community. I can add links & delete links, but cannot change the order of all the links on the page for some reason. Does anyone have a solution besides a complete manual re-do of the list? Read More
Outlook contact lists are not syncing on mobile outlook app (iOS)
Hello All,
Outlook contact lists which I created on my desktop are not syncing on my outlook mobile app. Individual contacts are syncing without any issues but not the contact lists. I see many reported the same issue. I would like to know whether this is actually the issue or it was built in that way.
Hello All, Outlook contact lists which I created on my desktop are not syncing on my outlook mobile app. Individual contacts are syncing without any issues but not the contact lists. I see many reported the same issue. I would like to know whether this is actually the issue or it was built in that way. Read More
Linked Server to Excel Spreadsheet
I have a perplexing problem which I suspect is permission related.
I have created a Linked Server in SSMS (SQL Express) that connects to an Excel Document on a Network Share. A stored procedure (spUpdateProducts) uses this Linked Server to Merge data into an existing table.
When I execute the stored procedure in SSMS, it works correctly (domain admin).
Similarly, when I execute a script that holds a SQLCMD from the server, that also executes correctly.
SQLCMD -S serverSQLEXPRESS -E -d OutEnd24 -Q “EXEC [dbo].[spUploadProducts]”
However, if I try and execute that as a scheduled task the sproc does not appear to run (or runs and fails to initialise the Linked Server – see below).
Similarly, if I try running the SQL CMD from my client laptop, I get the error:
Msg 7303, Level 16, State 1, Server *****SQLEXPRESS, Procedure spUploadProducts, Line 22
Cannot initialize the data source object of OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “OUTEND DATA”.
OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “OUTEND DATA” returned message “Unspecified error”.
My User account on the laptop has permission to execute the sproc, but it appears the Linked Server is unable to access the file in this case (which I suspect is also what is happening in the scheduled task).
I have set the advanced option in SQL Server to allow Ad Hoc Distributed Queries.
The SQL Server instance is running under NT ServiceMSSQL$SQLEXPRESS
I have granted Full Control on the network share and file path to DomainServerName$
I have tried experimenting with various combinations of login mapping with the Linked Server, but either I get a user not recognized error, or the same failure as above.
Any thoughts appreciated.
I have a perplexing problem which I suspect is permission related.I have created a Linked Server in SSMS (SQL Express) that connects to an Excel Document on a Network Share. A stored procedure (spUpdateProducts) uses this Linked Server to Merge data into an existing table.When I execute the stored procedure in SSMS, it works correctly (domain admin).Similarly, when I execute a script that holds a SQLCMD from the server, that also executes correctly.SQLCMD -S serverSQLEXPRESS -E -d OutEnd24 -Q “EXEC [dbo].[spUploadProducts]”However, if I try and execute that as a scheduled task the sproc does not appear to run (or runs and fails to initialise the Linked Server – see below).Similarly, if I try running the SQL CMD from my client laptop, I get the error:Msg 7303, Level 16, State 1, Server *****SQLEXPRESS, Procedure spUploadProducts, Line 22Cannot initialize the data source object of OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “OUTEND DATA”.OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “OUTEND DATA” returned message “Unspecified error”.My User account on the laptop has permission to execute the sproc, but it appears the Linked Server is unable to access the file in this case (which I suspect is also what is happening in the scheduled task).I have set the advanced option in SQL Server to allow Ad Hoc Distributed Queries.The SQL Server instance is running under NT ServiceMSSQL$SQLEXPRESSI have granted Full Control on the network share and file path to DomainServerName$ I have tried experimenting with various combinations of login mapping with the Linked Server, but either I get a user not recognized error, or the same failure as above.Any thoughts appreciated. Read More
Unrecognized property Value for class Axes?
Hi all,
I have been trying to create a CT scan viewer through Matlab.
It is up and running, however, I am getting the error Unrecognized property Value for class Axes whenever I change and image.
It hightlights these two lines of code for me.
% Add listener to the slider to call a function when its value changes
addlistener(hSlider, ‘Value’, ‘PostSet’, @(src, event) updateImage(src, event, hAxes, dicomImages));
and
% Get the current value of the slider
sliderValue = round(get(hAxes.Parent.Children(2), ‘Value’)); % hAxes.Parent.Children(2) is the slider handle
Would anyone know where I went wrong?Hi all,
I have been trying to create a CT scan viewer through Matlab.
It is up and running, however, I am getting the error Unrecognized property Value for class Axes whenever I change and image.
It hightlights these two lines of code for me.
% Add listener to the slider to call a function when its value changes
addlistener(hSlider, ‘Value’, ‘PostSet’, @(src, event) updateImage(src, event, hAxes, dicomImages));
and
% Get the current value of the slider
sliderValue = round(get(hAxes.Parent.Children(2), ‘Value’)); % hAxes.Parent.Children(2) is the slider handle
Would anyone know where I went wrong? Hi all,
I have been trying to create a CT scan viewer through Matlab.
It is up and running, however, I am getting the error Unrecognized property Value for class Axes whenever I change and image.
It hightlights these two lines of code for me.
% Add listener to the slider to call a function when its value changes
addlistener(hSlider, ‘Value’, ‘PostSet’, @(src, event) updateImage(src, event, hAxes, dicomImages));
and
% Get the current value of the slider
sliderValue = round(get(hAxes.Parent.Children(2), ‘Value’)); % hAxes.Parent.Children(2) is the slider handle
Would anyone know where I went wrong? dicom, slider, matlab gui, image processing MATLAB Answers — New Questions
How do I save each response in an excel file every time I click the submit button?
It currently only saves the recent response and not the previous response as well.
function SubmitButtonPushed(app, event)
data = {firstName, lastName, dob, email, nationality, sex, mobileNumber, type};
passengerData = cell2table(data, ‘VariableNames’, {‘First Name’, ‘Last Name’, ‘Date of Birth’, ‘Email’, ‘Nationality’, ‘Sex’, ‘Mobile Number’, ‘Type’});
disp(‘New Passenger Data: ‘)
disp(passengerData)
filename = ‘passengerDetails.xlsx’;
if isfile(filename)
existingData = readtable(filename);
combinedData = [existingData; passengerData];
else
combinedData = passengerData;
end
writetable(combinedData,filename, ‘WriteMode’,’append’);
disp(‘Combined Data: ‘)
disp(combinedData)
new_line = randn(1,9);
sheetName = sprintf(‘Submission_%d’, submissionCount);
writematrix(new_line, filename, ‘Sheet’, sheetName, ‘WriteMode’, ‘overwrite’);
submissionCount = submissionCount + 1;
msgbox(‘Successfully submitted’,’Success’);
delete(app);It currently only saves the recent response and not the previous response as well.
function SubmitButtonPushed(app, event)
data = {firstName, lastName, dob, email, nationality, sex, mobileNumber, type};
passengerData = cell2table(data, ‘VariableNames’, {‘First Name’, ‘Last Name’, ‘Date of Birth’, ‘Email’, ‘Nationality’, ‘Sex’, ‘Mobile Number’, ‘Type’});
disp(‘New Passenger Data: ‘)
disp(passengerData)
filename = ‘passengerDetails.xlsx’;
if isfile(filename)
existingData = readtable(filename);
combinedData = [existingData; passengerData];
else
combinedData = passengerData;
end
writetable(combinedData,filename, ‘WriteMode’,’append’);
disp(‘Combined Data: ‘)
disp(combinedData)
new_line = randn(1,9);
sheetName = sprintf(‘Submission_%d’, submissionCount);
writematrix(new_line, filename, ‘Sheet’, sheetName, ‘WriteMode’, ‘overwrite’);
submissionCount = submissionCount + 1;
msgbox(‘Successfully submitted’,’Success’);
delete(app); It currently only saves the recent response and not the previous response as well.
function SubmitButtonPushed(app, event)
data = {firstName, lastName, dob, email, nationality, sex, mobileNumber, type};
passengerData = cell2table(data, ‘VariableNames’, {‘First Name’, ‘Last Name’, ‘Date of Birth’, ‘Email’, ‘Nationality’, ‘Sex’, ‘Mobile Number’, ‘Type’});
disp(‘New Passenger Data: ‘)
disp(passengerData)
filename = ‘passengerDetails.xlsx’;
if isfile(filename)
existingData = readtable(filename);
combinedData = [existingData; passengerData];
else
combinedData = passengerData;
end
writetable(combinedData,filename, ‘WriteMode’,’append’);
disp(‘Combined Data: ‘)
disp(combinedData)
new_line = randn(1,9);
sheetName = sprintf(‘Submission_%d’, submissionCount);
writematrix(new_line, filename, ‘Sheet’, sheetName, ‘WriteMode’, ‘overwrite’);
submissionCount = submissionCount + 1;
msgbox(‘Successfully submitted’,’Success’);
delete(app); matlab, excel, table MATLAB Answers — New Questions
How can you use MATLAB Grader in Moodle Quizzes?
MATLAB Grader can be integrated into Moodle as an external tool. How can you use MATLAB Grader in Moodle Quizzes, to implement MATLAB Grader as a quiz question?MATLAB Grader can be integrated into Moodle as an external tool. How can you use MATLAB Grader in Moodle Quizzes, to implement MATLAB Grader as a quiz question? MATLAB Grader can be integrated into Moodle as an external tool. How can you use MATLAB Grader in Moodle Quizzes, to implement MATLAB Grader as a quiz question? distance_learning, moodle, matlab grader MATLAB Answers — New Questions
SharePoint List – Select from a Choice Field and Display an Image
I am attempting to set a column in a Project Tracker List to allow three choices, Red, Amber and Green. Depending on which status the user selects, I am trying to display an image, either a red circle (image1.jpg), an amber circle (image2.jpg) or a green circle (image3.jpg). I am not certain how to have a Choice column return an image.
Thanks,
John
I am attempting to set a column in a Project Tracker List to allow three choices, Red, Amber and Green. Depending on which status the user selects, I am trying to display an image, either a red circle (image1.jpg), an amber circle (image2.jpg) or a green circle (image3.jpg). I am not certain how to have a Choice column return an image. Thanks,John Read More