Azure Files access from Ubuntu 18.04: Resource temporarily unavailable

From time to time a server (Ubuntu 18.04 LTS) fails running PHP scripts in cron with the following error output:

PHP Warning:  require_once(/path/to/include.php): failed to open stream: Resource temporarily unavailable in /path/to/script.php on line 2 PHP Fatal error:  require_once(): Failed opening required 'include.php' (include_path='.') in /path/to/script.php on line 2 

Script suddenly works again a few hours later. How can I solve this problem?

$   uname -a Linux hostname 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux  $   dpkg -l|grep cifs ii  cifs-utils                            2:6.8-1                                    amd64        Common Internet File System utilities 

Magento2 SQL Query Resource Model

I am building a vendor attribute extension . I need to get all the vendor attributes in a grid format. My resource model is like this.

$  entityTypeId = $  this->entityModel->setType( \My\Marketplace\Model\Vendor::ENTITY )->getTypeId();  //echo 'entityId'.$  entityTypeId; parent::_initSelect(); //Join eav attribute table $  this->getSelect()->joinLeft( ['eav_attribute' => $  this->getTable('eav_attribute')], 'eav_attribute.attribute_id = main_table.attribute_id' ); $  this->getSelect()->where('eav_attribute.entity_type_id=?',$  entityTypeId)->order('main_table.attribute_code', 'DESC'); 

When i run this query getting below error message.both tables having attribute_code field here.

Integrity constraint violation: 1052 Column 'attribute_code' in order clause is ambiguous, query was: SELECT `main_table`., `eav_attribute`. FROM `my_marketplace_vendor_form_attribute` AS `main_table` LEFT JOIN `eav_attribute` ON eav_attribute.attribute_id = main_table.attribute_id WHERE (eav_attribute.entity_type_id=9) ORDER BY `main_table`.`attribute_code` ASC, attribute_code ASC 

How to consume nested objects in API resource

I am building my first web application, it links to the serverside through RESTfull Web API (Angular on client side, ASP.Net Core and EF Core on serverside, Automapper to map API Resources to/from domain models).
In the application I have two main models (simplified below as Delivery and Order) and each has its own API controller and endpoint (api/deliveries and api/orders). The business rules are such that: 1. an Order can be created before Delivery exists, 2. Delivery can hold an array of Order that will be included in the delivery, 3. Order can be amended after being included in Delivery.

My domain models (API resources are close to identical):

public class Delivery {     public int Id { get; set; }     public Customer Customer { get; set; }     public Address Address { get; set; }     public DateTime EstimatedDelivery { get; set; }     public DeliveryOrder[] Orders { get; set; } }  public class Order {     public int Id { get; set; }     public Product Product { get; set; }     public int Quantity { get; set; } }  public class DeliveryOrder {     public int DeliveryId { get; set; }     public Delivery Delivery { get; set; }     public int OrderId { get; set; }     public Order Order { get; set; } } 

The client user interface has a view to create/amend order (instance of Order) and a view to create/amend delivery (instance of Delivery) which includes the ability to create/amend orders. As a result of the business rules, in the delivery view, I could update order individually and directly, or update delivery.orders. I am struggling to come to a suitable implementation.

Solutions I have considered:

First. In the view (Angular component) for delivery have two steps in a “save” action. In this case I need to check if order has an id or not and either put an amended order or post a new order to my api/orders. In this case my Delivery API (through Automapper profile) ignores Delivery.DeliveryOrder.Order and only compares values of Delivery.DeliveryOrder.OrderId. My client action would look similar to:

saveAction() {     delivery.orders.forEach(o => {         if ( { this.httpClient.put('api/orders/' +, o.order).subscribe( ... ); }          else {'api/orders/', o.order).subscribe( ... ) });     this.httpClient.put('api/deliveries' +, delivery).subscribe( ... ); } 

Reading from other topics I understand it is not recommended to create multiple HTTP requests with a for loop to manage the number of subscriptions. Perhaps this is less of an issue if the subscriptions are combined in a forkJoin?

Second. Instead of deciding wether a specific order existed before the save action, send the whole delivery.orders to the api and let the serverside decide on whether instances of Order need to be created or amended. In that case I would patch the whole array, as discussed here. Again, my Delivery API (through Automapper profile) ignores Delivery.DeliveryOrder.Order and only compares values of Delivery.DeliveryOrder.OrderId. The saving action would look something like:

saveAction() {     this.httpClient.patch('api/orders/' delivery.orders).subscribe(data => {             delivery.orders = data;             this.httpClient.put('api/deliveries' +, delivery).subscribe( ... )         }); } 

Because this would require work on my serverside, I thought maybe it would be better to manage the whole thing on my serverside, which is the third solution I am considering.

Third: Let the server side consume Delivery.DeliveryOrder in full and do a custom mapping so that the members in Delivery.DeliveryOrder.Order are correctly amended or created. This could be done in either the Delivery controller or perhaps in a MappingProfile. The data is then simply sent through:

saveAction() {     this.httpClient.put('api/deliveries' +, delivery).subscribe(data => delivery = data); } 

Question(s): I have never done this and I don’t feel confident about any of my solutions. Does my third solution make most sense, or should I not have Delivery API endpoint take responsibility of creating/amending the nested Order? Is there a design pattern that is considered best practice or at least more commonly used than what I have thought of?

Is rippled release the rpc connect resource? The service is unavailable

I have deployed a ripple sync node, and monitor its’ height and parse the latest closed ledger by rpc method ledger_closed and ledger. Usually I have lost my connection, because the rippled server return connection error, such as connect reset by peer, EOF and conenct refuse. And sometime rippled give the result while call ledger_closed rpc method, but the result is Service Unavailable.

ClassLoader.getResource() cannot load resource from jar dependency

 Windows 10,  java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) 

I have Maven project with the following structure:

 ResourcesApp/ ├── pom.xml ├── resources │   ├── pom.xml │   └── src │       └── main │           ├── java │           │   └── pl │           │       └── sgnsajgon │           │           └── resource │           │               └── utils │           │                   └── │           └── resources │               ├── config │               │   └── my-config.xml │               └── my-data.xml └── resources-consumer     ├── pom.xml     └── src         └── main             └── java                 └── pl                     └── sgnsajgon                         └── resourcesConsumer                             └── 

I want to load resource files from resources module (my-data.xml, config/my-config.xml) in code within resources-consumer module. The code of is:

 package pl.sgnsajgon.resourcesConsumer;      import;     import java.util.Arrays;      import pl.sgnsajgon.resource.utils.Utils;      public class EntryPoint {          public static void main(String... args) {              System.out.println("Run method from resource dependency module to ensure it's loaded :");             Utils.sayHello();              System.out.println();              String[] files = { "my_data.xml", "my_config.xml", "config/my_config.xml" };              System.out.println("using Class.getResource()");             for (String file : files) {                 System.out.println(file + ": " + (EntryPoint.class.getResource(file) != null ? "found" : "NOT found"));             }              System.out.println();              System.out.println("ClassLoader URLs:");    url -> System.out.println(url));              System.out.println();              System.out.println("using ClassLoader.getResource()");             for (String file : files) {                 System.out.println(file + ": " + (EntryPoint.class.getClassLoader().getResource(file) != null ? "found" : "NOT found"));             }         }     } 

I know the difference between Class.getResource() and ClassLoader.getResource() methods. I expect the first method to not work, but as I understand loading mechanism, the second method should work.

When I run code in Intellij Idea (using Application run/debug configuration), I get:

      Run method from resource dependency module to ensure it's loaded :     Hello      using Class.getResource()     my_data.xml: NOT found     my_config.xml: NOT found     config/my_config.xml: NOT found      ClassLoader URLs:     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/charsets.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/deploy.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/access-bridge-64.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/cldrdata.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/dnsns.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/jaccess.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/jfxrt.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/localedata.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/nashorn.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/sunec.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/sunjce_provider.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/sunmscapi.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/sunpkcs11.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/ext/zipfs.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/javaws.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/jce.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/jfr.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/jfxswt.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/jsse.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/management-agent.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/plugin.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/resources.jar     file:/C:/Program%20Files/Java/jdk1.8.0_201/jre/lib/rt.jar     file:/C:/Users/sgnsajgon/Repositories/ResourcesApp/resources-consumer/target/classes/     file:/C:/Users/sgnsajgon/Repositories/ResourcesApp/resources/target/classes/     file:/C:/Users/sgnsajgon/AppData/Local/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6183.87/lib/idea_rt.jar      using ClassLoader.getResource()     my_data.xml: NOT found     my_config.xml: NOT found     config/my_config.xml: NOT found      Process finished with exit code 0  

You can see that I have in ClassPath the following directory where copies of resource files are located after Maven build:


but Class Loader cannot find those resource files.

When I run code in console using the following command:

 java -cp "resources-consumer/target/resources-consumer-1.0-SNAPSHOT.jar;resources/target/resources-1.0-SNAPSHOT.jar" pl.sgnsajgon.resourcesConsumer.EntryPoint 

I get:

      Run method from resource dependency module to ensure it's loaded :     Hello      using Class.getResource()     my_data.xml: NOT found     my_config.xml: NOT found     config/my_config.xml: NOT found      ClassLoader URLs:     file:/C:/Users/sgnsajgon/Repositories/ResourcesApp/resources-consumer/target/resources-consumer-1.0-SNAPSHOT.jar     file:/C:/Users/sgnsajgon/Repositories/ResourcesApp/resources/target/resources-1.0-SNAPSHOT.jar      using ClassLoader.getResource()     my_data.xml: NOT found     my_config.xml: NOT found     config/my_config.xml: NOT found  

You can see that I have in ClassPath the resource module jar file (resources-1.0-SNAPSHOT.jar) containing resource XML files, but Class Loader cannot find those resource files.

I have no idea why it doesn’t work. Please help

Web Part Error: Access denied. You do not have permission to perform this action or access this resource

I created four site pages for one list; each page has its own view as not everyone can see all the columns within the list. I then assigned unique permissions to each page and stopped the inheritance from the parent. However, the user is getting the following error:

Web Part Error: Access denied. You do not have permission to perform this action or access this resource. Correlation ID: 175a449e-d06e-5000-ca38-6f63b8afd2a9.

Any assistance would be helpful.

A resource group is using up my funds and I cannot delete/stop it

I have a azure data factory with an integration runtime set up. When I try to delete the resource group/the datafactory I get the error:

: Please stop all SSIS Integration Runtimes, remove all Azure VNet Integration Runtimes and remove all Self-Hosted Integration Runtimes sharing before deleting your Data Factory. 0 Azure VNet Integration Runtimes: . 0 Shared Self-hosted Integration Runtimes: . 1 Azure SSIS Integration Runtimes with status: Started: integrationRuntime1 ; . (Code: DeleteFactoryBlockedByIR)

When I go to the author & monitor tab of my datafactory I can see that there is an integration runtime running, but the delete icon is greyed out:

View post on

Where can I find more resource about how to handle huge input for a coding problem [on hold]

Take this question as example,

What about the input size is 1TB, 2TB that we can not accommodate the whole input data in memory. To this kind of question, what’s the proper term to search for this sort of questions? Is there any recommended book to read for this kind of question?

My idea for this question is to read three rows in memory at once. And shift a row at a time.