c # – How to save the Unity screenshot in blue storage?

I am working on a unit project and I need to save a particular screenshot of my game in a container in the blue storage.
I already set up my blue account and created the container.

I managed to take the screenshot and save it to a directory on my computer, but every time I try to save it to my storage I can't because it didn't find it. I go to that directory and I can see the screenshot.

This is how I do the screenshot part:

public void TappedCaptureScreenshot()
        string filename = string.Format("{0}.png", DateTime.UtcNow.ToString("yy-MM-dd-HH-mm-ss-ff"));
        Debug.Log("aca estoy 0 " + filename);
        localPath = Screenshot.Capture(filename);
        Debug.Log("local path " + localPath);
        isCaptured = true;
        //label.text = "Capture as: " + localPath;

This is how I save the image:

 public void TappedSave()
        byte() imageBytes = File.ReadAllBytes(localPath);

private void PutImage(byte() imageBytes)
        string filename = Path.GetFileName(localPath);
        Debug.Log("Aca estoy 2 " + filename);
        //label.text = "Put " + filename;
        StartCoroutine(blobService.PutImageBlob(PutImageCompleted, imageBytes, container, filename, "image/png"));

Then, every time I click on a certain button, both functions are called.
This is the error I get:
FileNotFoundException: Could not find file "C: .. 20-02-23-21-12-59-06.png"

I think the error has something to do with the image bytes, but I don't know why. Any suggestions?

windows – LOGMAN save to SQL Server with SQL server authentication

I want to configure LOGMAN to save counters in an SQL database on another server, with SQL server authentication mode.

First I create a database on the SQL Server (another machine) and a login:

  • Create LogmanTemp database
  • Create LogmanTemp login, with SQL authentication, password = LogmanTemp, add all access rights, I also added it to all server functions (sysadmin, …)
  • I can connect to the database from my machine (with SQL authentication), create tables, execute insertions, …

Then I create the system DSN in ODBC on my machine:

  • SQL Server driver
  • SQL Authentication
  • default database = LogmanTemp,

Finally, create logman counters (cmd, run as administrator).

First attempt:

logman create counter LogmanTemp01 -cf C:Temptmp658.tmp -si 00:00:15 -f sql -o LogmanTemp
The command completed successfully.

I can see LogmanTemp01 in & # 39; Perfmon / Data collector sets / User defined & # 39 ;. But when I start it, an error appears. Call to SQLAllocConnect failed with %1. Obviously something with access permissions …

Second try:

logman create counter LogmanTemp01 -cf C:Temptmp658.tmp -si 00:00:15 -f sql -o LogmanTemp -u LogmanTemp LogmanTemp

The user name or password is incorrect.

Third try:

logman create counter LogmanTemp01 -cf C:Temptmp658.tmp -si 00:00:15 -f sql -o LogmanTemp -u mydomainmyusername *   
Enter the password for LogmanTemp01:
The command completed successfully.

Enter my domain password, go to Perfmon, click Start, but the error appears Call to SQLAllocConnect failed with %1 again.

Fourth attempt:

First switch to ODBC to Windows Authentication, then

logman create counter LogmanTemp01 -cf C:Temptmp658.tmp -si 00:00:15 -f sql -o LogmanTemp -u mydomainmyusername *   
Enter the password for LogmanTemp01:
The command completed successfully.

Now, if I start LogmanTemp01 in Perfmon, it works fine: new tables are created in the SQL database and the counters are written every 15 seconds.

But what should I do to make it work with SQL authentication instead of Windows authentication?

How to store save the date along with the time in the Date and time field of the SharePoint list

You must have a date and time column in your list to be able to store date and time values. Then, while performing POST to create an item in the list, convert the date and time value to the ISO 8601 format and then call the REST API. JS code example below.

var d = new Date();

You can also verify this function that does the same as toISOString().

Administration – Can I save a list as a template using the PnP script inside my modern communication site?

The best recommended approach is to use the PnP provisioning template.

  • Download the PnP provisioning template using PnP

  • Filter the downloaded template (xml) because there is no way to generate only the specific list template, by default it will download all the lists / libraries of the specific site.

  • Then, create a new list using the filtered PnP template.

Sample code to obtain a specific SharePoint Online list for the PnP provisioning template:

$listName = "List Title for which want to generate template";
$outputTemplateFileName = "C:TempPnPSPListPnPProvisioningListTemplateDownloaded.xml";
$templates = Get-PnPProvisioningTemplate -OutputInstance -Handlers Lists
$singleListTemplate = $templates.Lists | Where-Object { $_.Title -eq $listName }
Save-PnPProvisioningTemplate -InputInstance $templates -Out $outputTemplateFileName;

Write-host "Successfully PnP list template has been customized for a single list."

How to create a new list on the destination site using the downloaded PnP template:

$userName = "Global-sharepoint2019@globalsharepoint2019.onmicrosoft.com"
$passWord = "YourSPOPassword"
$encPassWord = convertto-securestring -String $passWord -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord

Connect-PnPOnline -Url "https://globalsharepoint2019.sharepoint.com/sites/SharePointRNDClassic" -Credentials $cred

Apply-PnPProvisioningTemplate -Path "C:TempPnPSPListPnPProvisioningListTemplate.xml"

Write-host "Successfully a list has been created in SharePoint online."

Demo example:

Create list using PnP provisioning template

Read the following article where, step by step, explains how to do it with the video demonstration:

Create an online SharePoint list with the PnP provisioning template

node.js: download the image from the URL, save it in the directory and send it to the user

Could you find out if this code is optimal and creates a double load?

I need to simultaneously save the image on the server and immediately give it to the user.

router.get('/', function(req, res) {
  let img = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
  request.get({url: img})
    .on('response', function(response) {

Tell me if I'm wrong.

magento 1.9 – where I've been using amazon s3 bucket to save and recover images

Here is the thing.

I have been using the Amazon s3 bucket to store my multimedia files loaded in Magento. and recently my access changed from public to private to download the multimedia file. When trying to download, I receive the following error.

Access Denied


Can someone help me download the multimedia files when the owner's access was even private? Help should be appreciated.

javascript – Take the parameter value of a function that is in an onclick event and save it in a variable

I have a table in which I show a series of customer data, I would like to press a button to take the value of the parameter that is being referred to with the onclik event, I already achieved through php that that parameter is dynamic, I only occupy that Clicking on that button refers to the parameter.

In this case it would be what is inside the parentheses in jalaid —-> (3)

core framework entity – EFCore 3.1 – Is it the best practice to save data in related tables?

I have the following relationship in EF Core 3.1.1 (Many to many)

public partial class Movie
    public Movie()
        Reviews = new HashSet();

    public int Id { get; set; }
    public string Title { get; set; }

    public virtual ICollection Reviews { get; set; }

public partial class Review
    public Review()
        MovieReview = new HashSet();

    public string Id { get; set; }
    public string Author { get; set; }
    public string Content { get; set; }

    public virtual ICollection MovieReview { get; set; }

public partial class MovieReview
    public int Id { get; set; }
    public int MovieId { get; set; }
    public string ReviewId { get; set; }

    public virtual Movie Movie { get; set; }
    public virtual Review Review { get; set; }

And I have the following method to create a Review:

public Review CreateReview(int movieId, Review review)
    var movie = _repository.Movie.FirstOrDefault(w => w.Id == movieId);

    movie.Reviews.Add(new MovieReview { Review = review });


    return review;

the CreateReview method can perfectly create a newReview including relationships

My biggest question is if every time I need to insert in a table that has a relationship I will need:

  1. Find the main entity / root (movie)
  2. Create a new MoviewReview object
  3. Associate the new MovieReview object with parent / root (such as: movie.Reviews.Add(new MovieReview)

Is this correct or is there any kind of shortcut?

Nodes – How to activate the link / event in the custom content save / publish?

I'm lost.

No one really says, not even the documents, about where to place the files and what syntax exactly to use.

I created custom content, say with the name of the machine & # 39; custom content & # 39 ;.

How can I activate the event when saving? In publish?

Should I put a code for mytheme.theme? Or to mymodule.module? Or both? Should I register this with some ymls?

What function exactly should I write and where?

customcontent_node_update ()

customcontent_entity_update ()

mytheme_entity_update ()

mytheme_node_update ()

mytheme_customcontent_update ()

mymodule_customcontent_update ()

mymodule_entity_update ()

mymodule_node_update ()

mymodule_customcontent_node_update ()

Can anyone provide a tutorial from A to Z?

My task is quite simple: I would like to send an email to an address sent in this custom content field in this content post.

Thank you.

How to save custom field data in a custom table without using API?

Battery exchange network

The Stack Exchange network consists of 175 question and answer communities, including Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange