Category: News
Prompts collection
Basic prompts are visible in Copilot Lab and can also be used in apps.
Copilot in Windows and in Edge uses the same history. You can change the names of the prompts or delete prompts. You can also export or share them.
The history becomes quite confusing over time.
There are many interesting prompts here in the forum or on the WWW.
There are also many solutions for collecting and managing your own prompts (lists, loops, Excel etc.).
This raises the following questions for me:
Are adjustments to Copilot Lab planned in the direction that own prompts can be collected/managed?How do other users here in the forum do this or which tool do they use?
I would be very happy to receive answers and they would be appreciated.
Best regards
Andreas
Basic prompts are visible in Copilot Lab and can also be used in apps.Copilot in Windows and in Edge uses the same history. You can change the names of the prompts or delete prompts. You can also export or share them.The history becomes quite confusing over time.There are many interesting prompts here in the forum or on the WWW.There are also many solutions for collecting and managing your own prompts (lists, loops, Excel etc.). This raises the following questions for me:Are adjustments to Copilot Lab planned in the direction that own prompts can be collected/managed?How do other users here in the forum do this or which tool do they use?I would be very happy to receive answers and they would be appreciated.Best regardsAndreas Read More
Transfer to this device: option missing on Android
Hi,
I recently enrolled my new Xiaomi 14 (with Android 14) in my company via Microsoft Intune. Teams is working normally, except the “Transfer to this device” option is missing.
When I am in a meeting on Windows, I can join the same meeting with my mobile device, but the option to transfer and disconnect the Windows session is missing, I have to leave the meeting on my Windows device manually.
This worked on my old Google Pixel 5. I used to have this screen to select the transfer option, and my Windows session would automatically disconnect:
It still works the other way round though. Transferring form Android to Windows works seamlessly.
Any ideas?
Hi,I recently enrolled my new Xiaomi 14 (with Android 14) in my company via Microsoft Intune. Teams is working normally, except the “Transfer to this device” option is missing.When I am in a meeting on Windows, I can join the same meeting with my mobile device, but the option to transfer and disconnect the Windows session is missing, I have to leave the meeting on my Windows device manually. This worked on my old Google Pixel 5. I used to have this screen to select the transfer option, and my Windows session would automatically disconnect:It still works the other way round though. Transferring form Android to Windows works seamlessly.Any ideas? Read More
Can I download Youtube videos from my channel on Windows 11 computer?
Hi tech experts,
I hired someone who manages my own YouTube channels. Now, he left the job and refused to send the record videos to me. How can I download youtube videos from my own channel so I can make a local copy and do some editing. I tried some online youtube video downloader but did not work at all and keep asking me installing unknown apps.
Anyone knows how to do this?
Thanks
Hi tech experts, I hired someone who manages my own YouTube channels. Now, he left the job and refused to send the record videos to me. How can I download youtube videos from my own channel so I can make a local copy and do some editing. I tried some online youtube video downloader but did not work at all and keep asking me installing unknown apps. Anyone knows how to do this? Thanks Read More
Introduction to Graph Databases: Azure Cosmos DB for Apache Gremlin
Previously we introduced Getting started with Azure Cosmos Database (A Deep Dive) blog which is an end-to-end introduction of Azure Cosmos DB. In this blog we are going to talk about one of the Azure Cosmos Database API known as Apache Gremlin.
Graph databases are a powerful way to model and query complex relationships in your data. Let’s dive into working with Azure Cosmos DB for Apache Gremlin, which provides a graph database service.
What’s covered in this blog
Need for a Graph database
Challenge: Mapping Relationships and Insights
What is Apache Gremlin?
Azure Cosmos DB for Apache Gremlin
Benefits for Gremlin API
Common scenarios for Gremlin API
Introduction to graph databases
provisioning Azure Cosmos DB for Apache Gremlin via Azure portal
Modeling a graph Database
When Do You Need a Graph Database?
Graph databases are optimally used when your data domain exhibits certain characteristics:
Entities are highly connected through descriptive relationships.
There are cyclic relationships or self-referenced entities (which can be challenging in relational or document databases).
Dynamically evolving relationships exist between entities (common in hierarchical or tree-structured data).
Many-to-many relationships between entities.
Both entities and relationships have read and write requirements.
If your data fits these criteria, a graph database approach can provide advantages in terms of query complexity, data model scalability, and query performance.
Introduction:
Scenario: Building a Social Network for Student Entrepreneurs
Your vision is to build a dynamic social network where aspiring entrepreneurs can connect, collaborate, and support each other’s ventures. As you embark on this journey, you encounter various challenges in structuring and querying your database to efficiently handle complex relationships and data connections.
The Challenge: Mapping Relationships and Insights
In the world of social networking platforms, understanding relationships between users, their interests, connections, and interactions is paramount. Traditional relational databases might fall short when it comes to representing these intricate networks. This is where Azure Cosmos DB for Apache Gremlin steps in as your trusted guide.
Apache Gremlin: Your Graph Database Companion
In your quest to build a thriving social network, you realize that a graph database is the perfect fit for capturing the interconnected nature of user relationships and interactions.
What is Apache Gremlin?
Apache Gremlin is a graph traversal language and virtual machine developed by Apache Software Foundation. It’s specifically designed for querying graph databases and navigating complex networks of interconnected data. Gremlin provides a flexible and powerful framework for traversing graphs, enabling users to perform a wide range of operations such as pathfinding, filtering, and graph analytics.
Azure Cosmos DB for Apache Gremlin
Azure Cosmos DB for Apache Gremlin is a graph database service that can be used to store massive graphs with billions of vertices and edges. You can query the graphs with millisecond latency and evolve the graph structure easily. This integration enables users to store and query graph data using Azure Cosmos DB’s globally distributed, available infrastructure.
The API for Gremlin combines the power of graph database algorithms with highly scalable, managed infrastructure. This approach provides a unique and flexible solution to common data problems associated with inflexible or relational constraints.
Benefits for Gremlin API
The API for Gremlin has added benefits of being built on Azure Cosmos DB:
Elastically Scalable Throughput and Storage: Cosmos DB supports horizontally scalable graph databases with unlimited storage and provisioned throughput. Data is automatically distributed using graph partitioning as the database scale grows.
Multi-region Replication: Graph data can be automatically replicated to any Azure region worldwide, enabling global access to data with minimal latency. Cosmos DB provides a service-managed regional failover mechanism to ensure application continuity in case of service interruptions.
Fast Queries and Traversals with Gremlin: Cosmos DB supports querying heterogeneous vertices and edges using the Gremlin query language, which is widely adopted in the graph database community. This allows for rich real-time queries and traversals without the need for schema hints, secondary indexes, or views.
Fully Managed Graph Database: Cosmos DB eliminates the need for managing database and machine resources, allowing developers to focus on delivering application value. It automatically handles tasks such as virtual machine management, software updates, sharding, replication, and backups, ensuring high availability and reliability.
Automatic Indexing: Gremlin API automatically indexes all properties within nodes and edges without requiring schema definition or creation of secondary indices.
Compatibility with Apache TinkerPop: The Gremlin API supports the open-source Apache TinkerPop standard, enabling integration with a vast ecosystem of applications and libraries.
Tunable Consistency Levels: Cosmos DB provides five well-defined consistency levels (strong, bounded-staleness, session, consistent prefix, and eventual) to balance consistency, availability, and latency based on application requirements. This flexibility allows developers to make informed tradeoffs to optimize performance.
Common scenarios for Gremlin API
Social networks/Customer 365: By combining data about your customers and their interactions with other people, you can develop personalized experiences, predict customer behavior, or connect people with others with similar interests. Azure Cosmos DB can be used to manage social networks and track customer preferences and data.
Recommendation engines: This scenario is commonly used in the retail industry. By combining information about products, users, and user interactions, like purchasing, browsing, or rating an item, you can build customized recommendations. The low latency, elastic scale, and native graph support of Azure Cosmos DB is ideal for these scenarios.
Geospatial: Many applications in telecommunications, logistics, and travel planning need to find a location of interest within an area or locate the shortest/optimal route between two locations. Azure Cosmos DB is a natural fit for these problems.
Internet of Things: With the network and connections between IoT devices modeled as a graph, you can build a better understanding of the state of your devices and assets. You also can learn how changes in one part of the network can potentially affect another part.
Introduction to graph databases
A graph database approach relies on persisting relationships in the storage layer instead, which leads to highly efficient graph retrieval operations. The API for Gremlin supports the property graph model.
Property graph objects
A property graph is a structure that’s composed of vertices and edges. Both objects can have an arbitrary number of key-value pairs as properties.
Vertices/nodes: Vertices denote discrete entities, such as a person, place, or an event.
ID: Each vertex has a unique ID enforced per partition. If no value is supplied upon insertion, an auto-generated GUID is stored.
Label: The vertex label defines the type of entity it represents. If no value is supplied, a default vertex label is used.
Properties: Vertices can have properties (stored as key-value pairs). These properties can be of type string, boolean, or numeric.
Partition Key: Vertices are partitioned, and the partition key determines their distribution across partitions.
Edges/relationships: Edges denote relationships between vertices. For example, a person might know another person, be involved in an event, or have recently been at a location.
Properties: Properties express information (or metadata) about the vertices and edges. There can be any number of properties in either vertices or edges, and they can be used to describe and filter the objects in a query. Example properties include a vertex that has name and age, or an edge, which can have a time stamp and/or a weight.
Example of a graph database
This graph has the following vertex types. These types are also called labels in Gremlin:
People: The graph has three people; Robin, Thomas, and Ben.
Interests: Their interests, in this example, include the game of Football.
Devices: The devices that people use.
Operating Systems: The operating systems that the devices run on.
Place: The place[s] where devices are accessed.
We represent the relationships between these entities via the following edge types:
Knows: Represent familiarity. For example, “Thomas knows Robin”.
Interested: Represent the interests of the people in our graph. For example, “Ben is interested in Football”.
RunsOS: Represent what OS a device runs. For example, “Laptop runs the Windows OS”.
Uses: Represent which device a person uses. For example, “Robin uses a Motorola phone with serial number 77”.
Located: Represent the location from which the devices are accessed.
Creating Azure Cosmos DB for Apache Gremlin in Azure portal
Prerequisites
Azure account – Click to create an account: Create Azure account
Azure subscription – More about subscriptions: more on subscriptions
Steps for Creating Resources in the Azure Portal
Let’s Create an Account
Search for Azure Cosmos DB
Create Azure Cosmos DB Account
Choose Azure Cosmos DB for Apache Gremlin
Under create Azure cosmos DB Account page
Choose your subscription.
Choose or create a resource group.
Create the account name (make it unique).
Choose the availability zone if you want to improve your apps availability and resilient.
Choose the location of your DB according to the available data centers.
Capacity Mode enables you to define the throughput. The Provisioned option also comes with a free tier option.
Select Geo-Redundancy will enable your database to be available to the paired region ie East US and West Us or South Africa North and South Africa West. For this demo ‘South Africa West’ is not included in my subscription
Multi-region writes capability allows you to take advantage of the provisioned throughput for your databases and containers across the globe.
Under networking, your Azure Cosmos DB account either publicly, via public IP addresses or service endpoints, or privately, using a private endpoint. Choose according to your use case.
Connection Security Settings – I will go with TLS 1.2
Backup policy defines the way your backup will occur.
I will let Microsoft encrypt my account using service-managed keys.
I don’t need to create a tag for now, so I will review and create.
Once I have successfully provisioned the resource.
Click Go To resource to the overview page of the resource.
Congratulations, you have Created an Azure Cosmos DB for Apache Gremlin.
Creating a container in Azure Cosmos DB for Gremlin
This part explains way to create a container in Azure Cosmos DB for Gremlin. It shows how to create a container using Azure portal with data explorer. It demonstrates how to create a container, specify the partition key, and provision throughput.
NOTE: When creating containers, make sure you don’t create two containers with the same name but different casing. That’s because some parts of the Azure platform are not case-sensitive, and this can result in confusion/collision of telemetry and actions on containers with such names.
Open the Data Explorer pane and select New Graph. Next, provide the following details:
Indicate whether you are creating a new database or using an existing one. Since this is a new DB account i will new database
Enter a Database ID.
Select database throughput whether auto scale or manual.
Enter a throughput to be provisioned (for example, 1000 RUs).
Enter a graph ID.
Select indexing (automatic or off).
Enter a partition key for vertices.
Select OK.
Congratulations, you have Created a container in Azure Cosmos DB for Apache Gremlin.
Let’s Create an Some Vertex and Edges
You begin by clicking New Vertex button
Start by giving a Label (For Example gamer tag).
Select a gameId ( i.e. 1111)
Add more property like Team and preferredClass
Team: red
preferredClass: Mage
Click OK.
Repeat step 1,2 &3 to add more labels with the data below twice
And now you have successfully added 3 vertices.
Let make some edges by connecting between the labels with a relationship
We can add a relationship between John and Ben that they know each other.
This is done by clicking John Id then click target to add Ben’s id and label as “know”
We can also add the relationship between John and jane that they know each other by repeating the step above again. The final relationship graph will look like this.
Congratulations, you have Created Vertex and Edges on Gremlin graph.
Read more:
Graph data modeling with Azure Cosmos DB for Apache Gremlin
Azure Cosmos DB for Gremlin graph support and compatibility with TinkerPop features
Visualize graph data stored in Azure Cosmos DB for Gremlin with data visualization solutions
Query Azure Cosmos DB for Gremlin by using Gremlin
Pricing model in Azure Cosmos DB
QuickStart SDK:
Azure Cosmos DB for Apache Gremlin library for Python
Azure Cosmos DB for Apache Gremlin library for Node.js
Azure Cosmos DB for Apache Gremlin library for .NET
Microsoft Tech Community – Latest Blogs –Read More
How to call a function with arguments containing “.” in “run” function?
Lets say I am trying to call a function called printVersion() using run.
Here is printVersion()
function printVersion(version)
disp(version)
end
Now, if version number doesn’t contain decimal, it works fine.
But, If version number has decimal, it trys to find the whole string as a script.
Thank you.Lets say I am trying to call a function called printVersion() using run.
Here is printVersion()
function printVersion(version)
disp(version)
end
Now, if version number doesn’t contain decimal, it works fine.
But, If version number has decimal, it trys to find the whole string as a script.
Thank you. Lets say I am trying to call a function called printVersion() using run.
Here is printVersion()
function printVersion(version)
disp(version)
end
Now, if version number doesn’t contain decimal, it works fine.
But, If version number has decimal, it trys to find the whole string as a script.
Thank you. run, argument with decimal MATLAB Answers — New Questions
Copilot Not Working in New Teams
Hello
Please i need your help on this issue.
One of our users is unable to use Copilot in Teams. The user is properly licensed and Copilot was previously working until a few days ago. Also the transcript option is not available in meetings.
We’ve performed the following troubleshooting steps:
– Restart both Teams and the Computer
– Confirmed Teams Meeting Policies in the admin center
– Reinstall Teams on the device using the teams bootstrapper
– Clear Teams cache from AppData
Could you please guide us on further steps to take?
Hello Please i need your help on this issue. One of our users is unable to use Copilot in Teams. The user is properly licensed and Copilot was previously working until a few days ago. Also the transcript option is not available in meetings. We’ve performed the following troubleshooting steps: – Restart both Teams and the Computer- Confirmed Teams Meeting Policies in the admin center- Reinstall Teams on the device using the teams bootstrapper- Clear Teams cache from AppData Could you please guide us on further steps to take? Read More
Azure Portal Login Loop with GitHub
I can’t create a subscription. When I Select offer It will log in. and loop into Account. mirosoft Instead, what do I need to do to fix it?
I can’t create a subscription. When I Select offer It will log in. and loop into Account. mirosoft Instead, what do I need to do to fix it? Read More
Intune iOS ADE MDM asks for apple id
Hi Community,
I have registered an iphone with a apple business token, added a vpp token and some apps. Removed apple store apps and blocked app store. But it still asks the user for a personal apple id. How can I avoid this?
Thanks for your help!
Steffen
Hi Community, I have registered an iphone with a apple business token, added a vpp token and some apps. Removed apple store apps and blocked app store. But it still asks the user for a personal apple id. How can I avoid this? Thanks for your help! Steffen Read More
Text inside the meshgrid
Hello,
I am trying to place an arbitrary text inside the meshgrid. The code is as follows:
Nx = 201; Ny = 201;
TEXT = ‘K e k’; % Text to draw
FONT_SIZE = 10; % Font size
FONT_NAME = ‘Castellar’; % Font style (you can change this to any available font)
% Create a black image
img = zeros(Ny, Nx);
% Create a figure, axes, and an image object
figure(‘Visible’, ‘off’); % Create an invisible figure
axes(‘Units’, ‘pixels’, ‘Position’, [1, 1, Nx, Ny], ‘Visible’, ‘off’); % Create axes
imageHandle = imshow(img); % Show the black image
% Add text to the image
text(Nx / 2, Ny / 2, TEXT, ‘FontSize’, FONT_SIZE, ‘FontName’, FONT_NAME, …
‘Color’, [1, 1, 1], ‘HorizontalAlignment’, ‘center’, ‘VerticalAlignment’, ‘middle’);
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
% Convert to grayscale and then to binary mask
imgWithTextGray = rgb2gray(imgWithText);
mask = imgWithTextGray > 0;
% Invert the binary mask
mask_inverted = ~mask;
% Convert the inverted binary mask to double type
mask_double = double(mask_inverted);
% Flip upside down
obst = flipud(mask_double);
% Display the final mask (optional)
figure;
imshow(obst);
The code works fine with this grid resolution. However, when i increase the number of mesh points along y-axis (Ny), i get incorrect size of the obst. In particular, the maximum resolution of Ny is 420. For example, if i set Nx=601 and Ny=601, i will get the obst size of 420×601. Obviously, the problem is in this part:
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
I cannot understand why the frame data is limited along y-axis (Ny) by 420 points despite i have enough memory. Can someone suggest anything to fix this problem?
kind regards,
AlexHello,
I am trying to place an arbitrary text inside the meshgrid. The code is as follows:
Nx = 201; Ny = 201;
TEXT = ‘K e k’; % Text to draw
FONT_SIZE = 10; % Font size
FONT_NAME = ‘Castellar’; % Font style (you can change this to any available font)
% Create a black image
img = zeros(Ny, Nx);
% Create a figure, axes, and an image object
figure(‘Visible’, ‘off’); % Create an invisible figure
axes(‘Units’, ‘pixels’, ‘Position’, [1, 1, Nx, Ny], ‘Visible’, ‘off’); % Create axes
imageHandle = imshow(img); % Show the black image
% Add text to the image
text(Nx / 2, Ny / 2, TEXT, ‘FontSize’, FONT_SIZE, ‘FontName’, FONT_NAME, …
‘Color’, [1, 1, 1], ‘HorizontalAlignment’, ‘center’, ‘VerticalAlignment’, ‘middle’);
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
% Convert to grayscale and then to binary mask
imgWithTextGray = rgb2gray(imgWithText);
mask = imgWithTextGray > 0;
% Invert the binary mask
mask_inverted = ~mask;
% Convert the inverted binary mask to double type
mask_double = double(mask_inverted);
% Flip upside down
obst = flipud(mask_double);
% Display the final mask (optional)
figure;
imshow(obst);
The code works fine with this grid resolution. However, when i increase the number of mesh points along y-axis (Ny), i get incorrect size of the obst. In particular, the maximum resolution of Ny is 420. For example, if i set Nx=601 and Ny=601, i will get the obst size of 420×601. Obviously, the problem is in this part:
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
I cannot understand why the frame data is limited along y-axis (Ny) by 420 points despite i have enough memory. Can someone suggest anything to fix this problem?
kind regards,
Alex Hello,
I am trying to place an arbitrary text inside the meshgrid. The code is as follows:
Nx = 201; Ny = 201;
TEXT = ‘K e k’; % Text to draw
FONT_SIZE = 10; % Font size
FONT_NAME = ‘Castellar’; % Font style (you can change this to any available font)
% Create a black image
img = zeros(Ny, Nx);
% Create a figure, axes, and an image object
figure(‘Visible’, ‘off’); % Create an invisible figure
axes(‘Units’, ‘pixels’, ‘Position’, [1, 1, Nx, Ny], ‘Visible’, ‘off’); % Create axes
imageHandle = imshow(img); % Show the black image
% Add text to the image
text(Nx / 2, Ny / 2, TEXT, ‘FontSize’, FONT_SIZE, ‘FontName’, FONT_NAME, …
‘Color’, [1, 1, 1], ‘HorizontalAlignment’, ‘center’, ‘VerticalAlignment’, ‘middle’);
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
% Convert to grayscale and then to binary mask
imgWithTextGray = rgb2gray(imgWithText);
mask = imgWithTextGray > 0;
% Invert the binary mask
mask_inverted = ~mask;
% Convert the inverted binary mask to double type
mask_double = double(mask_inverted);
% Flip upside down
obst = flipud(mask_double);
% Display the final mask (optional)
figure;
imshow(obst);
The code works fine with this grid resolution. However, when i increase the number of mesh points along y-axis (Ny), i get incorrect size of the obst. In particular, the maximum resolution of Ny is 420. For example, if i set Nx=601 and Ny=601, i will get the obst size of 420×601. Obviously, the problem is in this part:
% Get the image data
frame = getframe(gca);
imgWithText = frame.cdata;
I cannot understand why the frame data is limited along y-axis (Ny) by 420 points despite i have enough memory. Can someone suggest anything to fix this problem?
kind regards,
Alex visualization, text MATLAB Answers — New Questions
proper namespace organisation with classes and enums
Hi Folks,
I’m curious of how to proper organise a folder structure for xx
Setting
Consider I’m developing a driver class for some DeviceA made by Manufacturer.
I assume, that I will use this DeviceA in several more Projects and I probably will get another one DeviceB, which use the same manufacturer-specific enumerated definitions of something – let`s say the volume levels will be defined as:
classdef enumVolumeLevels < uint8
enumeration
volLow (0)
volMid (50)
volHigh (100)
end
end
So I will write some kine of driver class including everything manufacturer-specific either as constants or as enumerations.
Folder Structure
So my Folderstructure will look like:
%rootfolder:
.+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
Now if I’m going to write a setter and getter method, which both checks If the provided Value fits to the manufacturer-defined levels
classdef DeviceA
% […]
methods
%getter
function value = get.Volume(obj)
value = Manufacturer.enumVolumeLevels(50); %some dummy getter method
end
%setter
function set.Volume(obj,level)
arguments
obj
mode Manufacturer.enumVolumeLevels
end
% some dummy setter method
end
end
%[…]
end
Standalone usage
Now I’m goind to test my class from the root folder of this project.
… and works fine if I define an object of this class and assign or read the property Volume
test = Manufacturer.DeviceA(); %call constructor
test.Volume = 50; %set property to something
disp(test.Volume); % display this property
Code Refactoring
Following the initial Idea of writing this driver class to use it in several Application specific projects I will include it into root folder of ProjectA, which looks like:
%rootfolder of ProjectA:
.+Drivers+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Drivers+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+Drivers+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
.MyFunc.m %some script containing instancesof the DeviceA-class
But if I write MyFunc.m as follows:
function MyFunc
test = Drivers.Manufacturer.DeviceA(); % call constructor
test.Volume = 50; % set property to something
disp(test.Volume); % display this property
end
… it will fail after the 2nd line because from the setter point of view the enumeration class Manufacturer.enumVolumeLevels is not defined.
So my question is:
–> Is there a solution for organizing my namespace folders to avoid such visibility Problem?
Perhaps I’ll need to chanhe the folder structure of my Manufacturer-package or the way I use the enumeration class in my class DeviceA, but I’m completely stuck right now and have no Idea, what should be the best practice in this case,Hi Folks,
I’m curious of how to proper organise a folder structure for xx
Setting
Consider I’m developing a driver class for some DeviceA made by Manufacturer.
I assume, that I will use this DeviceA in several more Projects and I probably will get another one DeviceB, which use the same manufacturer-specific enumerated definitions of something – let`s say the volume levels will be defined as:
classdef enumVolumeLevels < uint8
enumeration
volLow (0)
volMid (50)
volHigh (100)
end
end
So I will write some kine of driver class including everything manufacturer-specific either as constants or as enumerations.
Folder Structure
So my Folderstructure will look like:
%rootfolder:
.+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
Now if I’m going to write a setter and getter method, which both checks If the provided Value fits to the manufacturer-defined levels
classdef DeviceA
% […]
methods
%getter
function value = get.Volume(obj)
value = Manufacturer.enumVolumeLevels(50); %some dummy getter method
end
%setter
function set.Volume(obj,level)
arguments
obj
mode Manufacturer.enumVolumeLevels
end
% some dummy setter method
end
end
%[…]
end
Standalone usage
Now I’m goind to test my class from the root folder of this project.
… and works fine if I define an object of this class and assign or read the property Volume
test = Manufacturer.DeviceA(); %call constructor
test.Volume = 50; %set property to something
disp(test.Volume); % display this property
Code Refactoring
Following the initial Idea of writing this driver class to use it in several Application specific projects I will include it into root folder of ProjectA, which looks like:
%rootfolder of ProjectA:
.+Drivers+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Drivers+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+Drivers+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
.MyFunc.m %some script containing instancesof the DeviceA-class
But if I write MyFunc.m as follows:
function MyFunc
test = Drivers.Manufacturer.DeviceA(); % call constructor
test.Volume = 50; % set property to something
disp(test.Volume); % display this property
end
… it will fail after the 2nd line because from the setter point of view the enumeration class Manufacturer.enumVolumeLevels is not defined.
So my question is:
–> Is there a solution for organizing my namespace folders to avoid such visibility Problem?
Perhaps I’ll need to chanhe the folder structure of my Manufacturer-package or the way I use the enumeration class in my class DeviceA, but I’m completely stuck right now and have no Idea, what should be the best practice in this case, Hi Folks,
I’m curious of how to proper organise a folder structure for xx
Setting
Consider I’m developing a driver class for some DeviceA made by Manufacturer.
I assume, that I will use this DeviceA in several more Projects and I probably will get another one DeviceB, which use the same manufacturer-specific enumerated definitions of something – let`s say the volume levels will be defined as:
classdef enumVolumeLevels < uint8
enumeration
volLow (0)
volMid (50)
volHigh (100)
end
end
So I will write some kine of driver class including everything manufacturer-specific either as constants or as enumerations.
Folder Structure
So my Folderstructure will look like:
%rootfolder:
.+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
Now if I’m going to write a setter and getter method, which both checks If the provided Value fits to the manufacturer-defined levels
classdef DeviceA
% […]
methods
%getter
function value = get.Volume(obj)
value = Manufacturer.enumVolumeLevels(50); %some dummy getter method
end
%setter
function set.Volume(obj,level)
arguments
obj
mode Manufacturer.enumVolumeLevels
end
% some dummy setter method
end
end
%[…]
end
Standalone usage
Now I’m goind to test my class from the root folder of this project.
… and works fine if I define an object of this class and assign or read the property Volume
test = Manufacturer.DeviceA(); %call constructor
test.Volume = 50; %set property to something
disp(test.Volume); % display this property
Code Refactoring
Following the initial Idea of writing this driver class to use it in several Application specific projects I will include it into root folder of ProjectA, which looks like:
%rootfolder of ProjectA:
.+Drivers+Manufacturer@DeviceADeviceA.m % class definition including constructor and destructor methods and some property ‘Volume’
.+Drivers+Manufacturer@DeviceASomeMethod.m % Methods will be stored separately in class folder
.+Drivers+ManufacturerenumVolumeLevels.m % enumeration class containing manufacturer-specific definitions of volume levels
.MyFunc.m %some script containing instancesof the DeviceA-class
But if I write MyFunc.m as follows:
function MyFunc
test = Drivers.Manufacturer.DeviceA(); % call constructor
test.Volume = 50; % set property to something
disp(test.Volume); % display this property
end
… it will fail after the 2nd line because from the setter point of view the enumeration class Manufacturer.enumVolumeLevels is not defined.
So my question is:
–> Is there a solution for organizing my namespace folders to avoid such visibility Problem?
Perhaps I’ll need to chanhe the folder structure of my Manufacturer-package or the way I use the enumeration class in my class DeviceA, but I’m completely stuck right now and have no Idea, what should be the best practice in this case, namespace, package, class, enumeration class, refactoring, 2021a, .git, modular programming, oop MATLAB Answers — New Questions
Distance measurement using TFmini-S in SIMULINK
We are using TFmini-S connected to ARDUINO UNO at pin no 2 and 3, we want to measure the distance in SIMULINK model for some application. can anyone help us?We are using TFmini-S connected to ARDUINO UNO at pin no 2 and 3, we want to measure the distance in SIMULINK model for some application. can anyone help us? We are using TFmini-S connected to ARDUINO UNO at pin no 2 and 3, we want to measure the distance in SIMULINK model for some application. can anyone help us? tfmini, tfmini-s, arduino, simulink MATLAB Answers — New Questions
Need Help Urgently | Microsoft Form Data is Missing
Hi,
I would like to ask for your kind support to help with my issue urgently.
I have used MS Form to collect information but for some reason, today I tried to export data into excel but many data are missing.
I have checked back to the original MS Form, the data is also missing.
I don’t know what to do to recover the data.
Could you please advice?
Regards,
Trinnakorn C.
Hi, I would like to ask for your kind support to help with my issue urgently. I have used MS Form to collect information but for some reason, today I tried to export data into excel but many data are missing. I have checked back to the original MS Form, the data is also missing. I don’t know what to do to recover the data.Could you please advice? Regards,Trinnakorn C. Read More
New columns on existing table are dropped the next day
Has anyone encountered an issue like this? I cannot find anything searching. Troubleshooting is not fruitful yet
New columns created on existing tables will disappear the next day (ie. ALTER TABLE <name> ADD <column and metadata>)
New tables created within a given DB will persist the next day/ongoing, however
Target DB is set to SIMPLE recovery. DB is in autocommit mode
Running SQL Server on Azure VM
Thankyou
Has anyone encountered an issue like this? I cannot find anything searching. Troubleshooting is not fruitful yetNew columns created on existing tables will disappear the next day (ie. ALTER TABLE <name> ADD <column and metadata>)New tables created within a given DB will persist the next day/ongoing, howeverTarget DB is set to SIMPLE recovery. DB is in autocommit modeRunning SQL Server on Azure VMThankyou Read More
SUM(IF that changes when value in column A changes
I am trying to sum values in $AY and divide the total by $AT. Every time the value in column A changes, the group of rows being summed changes as well. I am manually updating the formula every 30 rows or so for a worksheet with over 11,000 rows. The examples below cover the first 93 rows, with two changes to the values in $A.
The following formula is in $BG. The values in column A are the same for rows 1 through 32 and I sum the values in $AY$3 through $AY32.
row 1 =SUM(IF($A:$A=$E3,IF($E:$E=$A3,IF($C:$C=$C3,SUM($AY$3:$AY3/$AT3,)))))
row 2 =SUM(IF($A:$A=$E4,IF($E:$E=$A4,IF($C:$C=$C4,SUM($AY$3:$AY4/$AT4,)))))
row 3 =SUM(IF($A:$A=$E5,IF($E:$E=$A5,IF($C:$C=$C5,SUM($AY$3:$AY5/$AT5,)))))
…
row 32 =SUM(IF($A:$A=$E32,IF($E:$E=$A32,IF($C:$C=$C32,SUM($AY$3:$AY32/$AT32,)))))
The value in column A changes from rows 33 through 64, so I modify the formula manually to sum the values in those rows:
row 33 =SUM(IF($A:$A=$E33,IF($E:$E=$A33,IF($C:$C=$C33,SUM($AY$33:$AY33/$AT33,)))))
row 34 =SUM(IF($A:$A=$E34,IF($E:$E=$A34,IF($C:$C=$C34,SUM($AY$33:$AY34/$AT34,)))))
row 35 =SUM(IF($A:$A=$E35,IF($E:$E=$A35,IF($C:$C=$C35,SUM($AY$33:$AY35/$AT35,)))))
…
row 64 =SUM(IF($A:$A=$E64,IF($E:$E=$A64,IF($C:$C=$C64,SUM($AY$33:$AY64/$AT64,)))))
The value in column A changes again from rows 65 through 93, so I sum those rows by manually changing the formula:
row 65 =SUM(IF($A:$A=$E65,IF($E:$E=$A65,IF($C:$C=$C65,SUM($AY$65:$AY65/$AT65,)))))
row 66 =SUM(IF($A:$A=$E66,IF($E:$E=$A66,IF($C:$C=$C66,SUM($AY$65:$AY66/$AT66,)))))
row 67 =SUM(IF($A:$A=$E67,IF($E:$E=$A67,IF($C:$C=$C67,SUM($AY$65:$AY67/$AT67,)))))
…
row 93 =SUM(IF($A:$A=$E93,IF($E:$E=$A93,IF($C:$C=$C93,SUM($AY$65:$AY93/$AT93,)))))
I’d like to modify the following formula so it doesn’t require manually changing the first reference of $AY every the the value in $A changes. Worksheet attached. Thanks for your assistance.
I am trying to sum values in $AY and divide the total by $AT. Every time the value in column A changes, the group of rows being summed changes as well. I am manually updating the formula every 30 rows or so for a worksheet with over 11,000 rows. The examples below cover the first 93 rows, with two changes to the values in $A. The following formula is in $BG. The values in column A are the same for rows 1 through 32 and I sum the values in $AY$3 through $AY32.row 1 =SUM(IF($A:$A=$E3,IF($E:$E=$A3,IF($C:$C=$C3,SUM($AY$3:$AY3/$AT3,)))))row 2 =SUM(IF($A:$A=$E4,IF($E:$E=$A4,IF($C:$C=$C4,SUM($AY$3:$AY4/$AT4,)))))row 3 =SUM(IF($A:$A=$E5,IF($E:$E=$A5,IF($C:$C=$C5,SUM($AY$3:$AY5/$AT5,)))))…row 32 =SUM(IF($A:$A=$E32,IF($E:$E=$A32,IF($C:$C=$C32,SUM($AY$3:$AY32/$AT32,))))) The value in column A changes from rows 33 through 64, so I modify the formula manually to sum the values in those rows:row 33 =SUM(IF($A:$A=$E33,IF($E:$E=$A33,IF($C:$C=$C33,SUM($AY$33:$AY33/$AT33,)))))row 34 =SUM(IF($A:$A=$E34,IF($E:$E=$A34,IF($C:$C=$C34,SUM($AY$33:$AY34/$AT34,)))))row 35 =SUM(IF($A:$A=$E35,IF($E:$E=$A35,IF($C:$C=$C35,SUM($AY$33:$AY35/$AT35,)))))…row 64 =SUM(IF($A:$A=$E64,IF($E:$E=$A64,IF($C:$C=$C64,SUM($AY$33:$AY64/$AT64,))))) The value in column A changes again from rows 65 through 93, so I sum those rows by manually changing the formula:row 65 =SUM(IF($A:$A=$E65,IF($E:$E=$A65,IF($C:$C=$C65,SUM($AY$65:$AY65/$AT65,)))))row 66 =SUM(IF($A:$A=$E66,IF($E:$E=$A66,IF($C:$C=$C66,SUM($AY$65:$AY66/$AT66,)))))row 67 =SUM(IF($A:$A=$E67,IF($E:$E=$A67,IF($C:$C=$C67,SUM($AY$65:$AY67/$AT67,)))))…row 93 =SUM(IF($A:$A=$E93,IF($E:$E=$A93,IF($C:$C=$C93,SUM($AY$65:$AY93/$AT93,))))) I’d like to modify the following formula so it doesn’t require manually changing the first reference of $AY every the the value in $A changes. Worksheet attached. Thanks for your assistance. Read More
Why am I not receiving any ERROR?
Despite the en: du: and ex: actions being ignored, the chart is running smooth and publishing outputs even. Is this a new update or is this some bug? Model Advisor checks also are not showing any anomality. Please if someone could clarify.Despite the en: du: and ex: actions being ignored, the chart is running smooth and publishing outputs even. Is this a new update or is this some bug? Model Advisor checks also are not showing any anomality. Please if someone could clarify. Despite the en: du: and ex: actions being ignored, the chart is running smooth and publishing outputs even. Is this a new update or is this some bug? Model Advisor checks also are not showing any anomality. Please if someone could clarify. stateflow, chart, simulink, entry action MATLAB Answers — New Questions
Why load flow do not converge for Kundur two area system with Induction Motor as load?
Currently I am working on small signal stability analysis of Kundur two areas system with different types of load modelling. I am using induction motor as load and it does not converge the load flow in 50 iteration. How can i solve this issues. If any one has solution for this, i would be grateful.
Thank you.Currently I am working on small signal stability analysis of Kundur two areas system with different types of load modelling. I am using induction motor as load and it does not converge the load flow in 50 iteration. How can i solve this issues. If any one has solution for this, i would be grateful.
Thank you. Currently I am working on small signal stability analysis of Kundur two areas system with different types of load modelling. I am using induction motor as load and it does not converge the load flow in 50 iteration. How can i solve this issues. If any one has solution for this, i would be grateful.
Thank you. load flow analysis, simulink, matlab gui MATLAB Answers — New Questions
microsoft store blocked
i use intune to block microsoft store. however if i go to this website, i can bypass the block by download and then double click the file to install the microsoft store app.
anyone has the same behavior?
Power BI Desktop – Microsoft Apps
i use intune to block microsoft store. however if i go to this website, i can bypass the block by download and then double click the file to install the microsoft store app. anyone has the same behavior? Power BI Desktop – Microsoft Apps Read More
Managed installer errors for specific devices
Hello
Please i need your help on this issue.
We are trying to roll out Windows Defender Application Control (WDAC) to the devices however, when we enabled the managed installer it is failing on some of the devices.
When I export the devices status the file cuts off the line about the errors on the specific machine. It does look like an error in the C:windowsIMECacheHealthScriptsd78c1822-e082-491a-b3a7-4a701836481e_8remediate.ps1 file is causing the issue but we have no idea how to correct it.
Please advise
Hello Please i need your help on this issue. We are trying to roll out Windows Defender Application Control (WDAC) to the devices however, when we enabled the managed installer it is failing on some of the devices. When I export the devices status the file cuts off the line about the errors on the specific machine. It does look like an error in the C:windowsIMECacheHealthScriptsd78c1822-e082-491a-b3a7-4a701836481e_8remediate.ps1 file is causing the issue but we have no idea how to correct it. Please advise Read More
Excel 365 Sluggish Performance Issue: Seeking Solutions
Dear All,
On a daily basis, I use Microsoft Excel 365 at the office to process large-sized data as well as link it with multiple files, and so far, there haven’t been any issues. However, last Monday (June 3, 2024), I experienced extreme slowness when opening large-sized data. Why did this happen? It used to work just fine.
Previously, I was using Windows 10, and even after updating to Windows 11, the issue persists.
Has anyone encountered a similar issue?
Dear All,On a daily basis, I use Microsoft Excel 365 at the office to process large-sized data as well as link it with multiple files, and so far, there haven’t been any issues. However, last Monday (June 3, 2024), I experienced extreme slowness when opening large-sized data. Why did this happen? It used to work just fine.Previously, I was using Windows 10, and even after updating to Windows 11, the issue persists.Has anyone encountered a similar issue? Read More
Hybrid Modern Agent
A customer of mine is having issues installing the Hybrid Agent in their environment. Their network is such that they are unable to provide open access to the internet from the server we wish to install the hybrid agent on. Microsoft support are not very helpful with the full list of IPs that need to be opened to do the install (firewall in this environment can only have IP ranges opened, not URLs). They have a proxy, but all the information points to the fact that the initial install of the agent needs open access to the internet before the proxy can be configured.
The customer has proposed putting the hybrid agent server in the DMZ. This blog mentions putting the server in the DMZ, but I would like to see details on how this is done. The issue I see is that the HCW itself needs to be run on a domain joined machine, which is not ideal for a DMZ server.
If anyone can provide some insights on how to install the hybrid agent on a DMZ server, that would be great.
A customer of mine is having issues installing the Hybrid Agent in their environment. Their network is such that they are unable to provide open access to the internet from the server we wish to install the hybrid agent on. Microsoft support are not very helpful with the full list of IPs that need to be opened to do the install (firewall in this environment can only have IP ranges opened, not URLs). They have a proxy, but all the information points to the fact that the initial install of the agent needs open access to the internet before the proxy can be configured.The customer has proposed putting the hybrid agent server in the DMZ. This blog mentions putting the server in the DMZ, but I would like to see details on how this is done. The issue I see is that the HCW itself needs to be run on a domain joined machine, which is not ideal for a DMZ server.If anyone can provide some insights on how to install the hybrid agent on a DMZ server, that would be great. Read More