High performance OpenVZ SSD VPS hosting + 1 IPv4 included + Root / SSH access.

thumbs up

Hostpoco.com offers VPS SSD hosting plans that are perfect for everyone who wants full access to their server root. Our managed plans allow you to get the control you need while maintaining some extra support to help you achieve your goals much faster, making them perfect for website owners who are not too familiar with the server side of hosting. Web.

We are deploying premium Intel Xeon servers with full SSD / HDD storage in premium data centers connected to redundant Tier 1 Internet providers. Our fast servers come with super fast 24/7 technical support service. Plus, all of our VPS hosting plans come with full root access, dedicated IP, free RDNS, and free reinstallations. Just sign up and be online within an hour with our free, instant setup.

VPS Hosting Features:
~ OpenVZ VPS type
~ Premium bandwidth
~ Free setup
~ 99% uptime guarantee
~ 24/7 live support
~ Root / SSH access

VPS plan:
* VPS Start: $ 14.99 / Monthly
* VPS Pro: $ 24.99 / Monthly
* Premium VPS: $ 44.99 / Monthly
* VPS Elite: $ 84.99 / Monthly

For more details: https://hostpoco.com/cheap-us-vps-hosting.php

Thank you.

mongodb: generic data access repository in .NET Standard 2.0

I worked on a MongoDB data access layer in a standard .NET environment.
The main purpose of this is to have a scalable generic repository pattern to extend.

First, define a base model to inherit from.
The reason for this is that I want all my models to have an exact Id property and implement the MongoDB attributes for that.

public abstract class IMongoEntity
    public TIdentifier Id { get; set; }

Done IMongoEntity<> generic to scale what kind of Id certain model will have.
Here is an example of a model that extends the class and defines the Id kind of property.

public class UserAuthentication : IMongoEntity
    public string Username { get; set; }
    public string Password { get; set; }
    public string Email { get; set; }

The next step is to define a generic repository. The generic waits for the TEntity write as like IIdentifier kind.
Also, I want to restrict that all TEntity inherit from base class IMongoEntity<>. By doing this, I also restrict that TEntity have a Id type property TIdentifier.

public interface IGenericRepository where TEntity : IMongoEntity
    Task Create(TEntity entity);
    Task Get(TIdentifier id);
    Task> GetAll();
    Task> GetAll(Expression> predicate);
    Task Remove(TEntity entity);
    Task Remove(TIdentifier id);
    Task Remove(Expression> predicate);
    Task Update(TEntity entity);
    Task Update(TIdentifier id, TEntity entity);

It just collapses the basic operations of CRUD.

the IGenericRepository Implementation is a fairly complicated step.
In its constructor, it makes the connection to the database.

public class GenericRepository : IGenericRepository where TEntity : IMongoEntity
    private readonly IMongoCollection _entities;

    public GenericRepository(IDatabaseSettings settings)
        MongoClient client = new MongoClient(settings.ConnectionString);
        IMongoDatabase database = client.GetDatabase(settings.DatabaseName);

        string collection = $"{typeof(TEntity).Name}Collection";
        _entities = database.GetCollection(collection);

    // Interface implementation ...

By definition, I expect a IDatabaseSettings object to inject where to find connection string and database name, too.

public interface IDatabaseSettings
    string ConnectionString { get; set; }
    string DatabaseName { get; set; }

I don't stamp the GenericRepository<,> due to scalability I want my repositories to extend from there so

public class UserManager : GenericRepository, IUserManager
    private readonly ILog _log;

    public UserManager(IDatabaseSettings settings, ILog log) : base(settings) => _log = log;

    public bool CheckValid(UserAuthentication user, string password) => user.Password == password;

    public async Task GetUser(string username)
        // GetUser implementation
        // Here uses the inherited method #GetAll from GenericRepository

    public async Task RegisterUser(UserAuthentication user)
        // Registration implementation
        // Uses the #Creation inherited method

By definition, this UserManager wait a IDatabaseSettings to go through the parent constructor.

From now on, I suppose the system using this library implements any kind of dependency injection. I personally use Autofac.

The idea of ​​having a IGenericRepository<,> (and its implementation) is not necessarily defining and implementing extension repositories.
the IGenericRepository<,> it must register in the dependency container itself as generic.

var builder = new ContainerBuilder();

Services may require the abstraction details they need. I mean if an arbitrary service only needs the raw CRUD operations during UserAuthentication table, there is no need to inject a IUserManager example. Injecting a IGenericRepository it's enough (even if it's the same class implementation).

On the other hand, when a service needs specific functionality, it may require the extensions repository that exposes those functionalities, such as IUserManager.
This is why repository extensions must be registered as their singular interface and type match. IGenericRepository<,> too.


Now, I want to focus on the discussion of what to improve and what architecture to change.

System entities are linked to a MongoDB environment.
Entities extend from IMongoEntity. A clean architecture must have a boundary between the entity definition and its data access layer. I would like to draw this limit, but I also have a constraint where my IGenericRepository<,> it only accepts models that satisfy a lot of conditions.
I considered something like

public class PureEntity
    public string Property { get; set; }

public class PureEntityWrapper : IMongoEntity { }

Having this, PureEntity it can be defined at the top level of abstraction and a bridge layer can be built where all "MongoDB containers" are defined.

The problem still remains where to set MongoDB attributes. And, more importantly, business rule layer should consider only pure entities.

CRUD operations must be defined where the entities live.
Following the above approach, IGenericRepository<,> you should not define the CRUD operations contract. This is a responsibility of who defines the models.

The problem is that, even if business rules expose a generic repository interface, the repository is supposed to work for previously defined pure entities.

Collection names are heavily encoded.
This is an obvious problem, but done intentionally. Collection names are made up of the model type name followed by "Collection".
GenericRepository<,> You should implement a way to receive the collection name as a raw string.

public GenericRepository(IDatabaseSettings settings, string collectionName)
    MongoClient client = new MongoClient(settings.ConnectionString);
    IMongoDatabase database = client.GetDatabase(settings.DatabaseName);
    _entities = database.GetCollection(collectionName);

public GenericRepository(IDatabaseSettings settings) : this(settings, $"{typeof(TEntity).Name}Collection") { }

This would work, but it forces you to set up a dependency injection to consider this scenario.
Also, it could be managed by another service.

public interface ICollectionNameResolver
    string Resolve();

Then defining a Factory in GenericRepository<,> to meet the parameter and make use of the log callbacks to resolve ICollectionNameResolver dynamically and provide the string. But, this is not an easy way to solve the problem, nor an elegant way.

GenericRepository<,> is responsible for creating the connection.
GenericRepository<,> you should directly receive a IMongoDatabase instance where to look for the entities. The responsibility for creating those connections must be decoupled.

public interface IMongoDatabaseProvider : IDisposable
    IMongoDatabase Provide();

public class MongoDatabaseProvider : IMongoDatabaseProvider
    private readonly MongoClient _client;
    private readonly IDatabaseSettings _settings;

    public MongoDatabaseProvider(IDatabaseSettings settings)
        _client = new MongoClient(settings.ConnectionString);
        _settings = settings;

    public IMongoDatabase Provide() => _client.GetDatabase(_settings.DatabaseName);
    public void Dispose() => _client.Cluster.Dispose();

Now, the container record for the IMongoDatabaseProvider It could be something like

builder.Register(ctx =>
    var provider = ctx.Resolve();
    return provider.Provide();

The main problem is the lifespan of that connection. We must ensure that we do not have any captive dependency problems.

I look forward to hearing your opinion, solutions, improvements or anything.

javascript – what's the problem? It only returns me undefined when I try to specifically access the temperature

var xhr= new XMLHttpRequest()
var bot = document.querySelector(".botao");
bot.addEventListener("click", function(){



var resposta= xhr.responseText;
var respostajson= JSON.parse(resposta)



c # – ActiveRecord pattern collides with a very basic need to access raw data. Do I need to remove data access?

This example explains my problem well.
I have two classes, Invoice and InvoiceRow; an invoice hosts an InvoiceRow collection.
This classic structure is assigned the same way in the database, so there is a BILLS table and an INVOICEROWS table with a one-to-many relationship.
I am using EFCore as O / RM and due to strict mapping of classes and tables made I decided to use Active Record which is (as far as I understand) a single class that does both data access and domain logic .
So I added domain logic to my classes. Basically, Invoice has a static method that loads it with its rows (relying for this on the EF functionality). Then I have the validation logic, some calculated field. Suppose that every time an invoice row is modified, the invoice total is also modified.
That a Save method performs additional validation and calls EF methods to persist the Invoice and its rows as a whole.
This is a very simple domain logic that allows only a certain way of manipulating the object, which is a good encapsulation that I am quite satisfied with.

The problem

Now I want to display a list of invoices, to browse or to select and process or whatever.
This is a basic requirement, a very common request that it is not very business or domain specific.
It turns out that the logic I implemented in Invoice gets in the way. Now I just need & # 39; headers & # 39; Invoice, surely I don't want to load all the rows just to show the user the list and allow them to choose one.
Of course, you could disable the loading of additional data, but that would mean having 'two modes'. my class work. Even if there are clever ways to load related record rows only when needed, and this alleviates some of the implementation pain, this class with two different modes of work smells deceptive and seems not very SRP.

The other way is to accept: I need so much access & # 39; evolved & # 39; the object as full domain objects and basic access only to row level data.
That means giving up the compactness of the active record and resorting to splitting the two concerns into a Domain model object (is this the name?) AND a Row Data Gateway (Fowler's name). The latter is, in other words, a simple data access object (different name for the same thing?) Which is my EF entity. It would not contain any business logic, so I can use it where I don't need validation and loading of related entities.

Unfortunately, when I describe Row Data Gateway Fowler it doesn't mention this usage, and that makes me doubt if I'm on the right track.
Is this really the purpose of the data access layer? If not, what is the right place instead? Maybe it's too complex for such an easy task, but for the sake of the architectural pattern, I'd like to understand when this piece fits.

I see this problem so often that I think there should be a simple but standard solution. Is there another practical way to solve this?
Is there a good description of such a problem somewhere?
Thanks in advance

8 – Cannot access variables on twig from preprocessing functions

I am using a preprocess function to get data from specific content types. I can print the data in the preprocess function but I can't see it in the twig file.

Here is my preprocess function.

    function themename_preprocess_node__custom_content_type_name(&$variables) {

      $query = Drupal::entityTypeManager()->getStorage('node')->getQuery();

      // Get all products node IDs.
      $nids = $query->condition('type', 'content_type_products')->execute();

      // Load all product nodes.
      $nodes = DrupalnodeEntityNode::loadMultiple($nids);

      // Pass them to node--custom-content-type-name.html.twig.
      $variables('products') = $nodes;

     //echo "
     //print_r($variables('products')); exit;

I can see the values ​​here, if I print the $variables('products'), but when the twig file is passed node--custom-content-type-name.html.twig' as{{products}} `I can't see anything.

Did I miss something here? Any help is appreciated.

active directory: create a custom group policy to control RDP access to virtual machines

When I add a new user to our local Active Directory, I want to assign that account to a specific security group like "Product Group", "Developer Group" or "Support Group".

My goal is to control user access to a specific type of virtual machine environment so that users in the "Support Group" can only access the virtual machines that I categorize as Support, they cannot access any production virtual machine.

I am a developer by trait, so I am not very familiar with how to do it, I google many places like this link to help me and this is what I have done so far:

Create user and group in Active Directory Users and Computers:

  1. Create a group: Developer group
  2. Add it to main group: remove desktop users
  3. Create a user: MyDomain rdptest
  4. Assign user MyDomain rdptest to "Developer Group"

enter the image description here
enter the image description here

Create organizational unit:

  1. Creating an Organization Unit under our domain is called "Test Computers"
  2. Assign a test virtual machine to this newly created organizational unit, this virtual machine is a member of the "domain computers"

Create Group Policy Object through Group Policy Management:

  1. Create a GPO called "Dev RDP Access" in the "Computer Test" OU.
  2. Edit this GPO so that it has the following settings:

enter the image description here

enter the image description here

Link Group Policy Object:

  1. Link GPO "Dev RDP Access" to Organizational Unit "Test Computers"
  2. Apply the "Dev RDP Access" group policy in the "Test Computers" Organizational Unit
  3. Assign the security group "Developer Group" to the Group Policy "Dev RDP Access"

enter the image description here

Push Active Directory Policy Update:

  1. I run the command from the DC machine to force the policy to sync with the machine I want to test my RDP on: gpupate / force
  2. I also tried executing the PowerShell gpupdate command just to make sure: Invoke-Command -ComputerName TEST_PC -ScriptBlock {gpupdate / force}

enter the image description here

After doing all that, I still can't see RDP on the machine due to this error.

enter the image description here

Do you see any problem in the steps I posted and if I missed something? I do a little more research and some suggested:

"Members of the domain Remote Desktop user group are not
automatically members of the local remote desktop user group on your
RDS server. You must add the domain remote desktop user group to
the local Remote Desktop user group on the server. "

Is this the step I'm missing? If so, how to do it from Active Directory because if we have to go to every VM to do this then it defeats the central administration purpose that Active Directory tries to solve.

Chinese CCTV IP Camera Access

I'm not sure if this community is the right place to ask about CCTV credentials or not. So here is my problem, I recently bought Chinese CCTV Wifi Camera without any brand. Seriously, I've been researching my problems here on the internet, but no one seems promising. CCTV can be accessed through an Android app called icsee so you can watch your CCTV in real time. But the problem is, I can't always turn on my Android phone just by watching real-time surveillance. So I need a better way to access CCTV directly. So I think the best options are accessed directly through a browser with your CCTV IP address.

So I check the IP that was registered in my router and I get the IP, I type in the browser and it violates I get login.htm
I have tried every combination of password and username, but it is a silly attempt and error. You know too many combinations and how if the password uses a unique Chinese language 🙂
I tried

user password :

  1. admin admin
  2. admin 111111
  3. admin 123456
  4. root 111111
  5. root 123456
  6. and so.

BTW, my camera model is r80x20-pq. After searching any documentation and user manual on the internet and did not find any information about this camera. This is probably my camera on youtube.

So I get this article on the internet that mentions all Chinese CCTVs based on Hisilicon SoC Solution. I have a check on that website and nothing promising.

So I need your advice, I just wanted to access my CCTV via PC / laptop (Windows operating system). If there was any software that needed to be installed on Windows, I think it's fine. Let me know your thoughts.

Update 1
I have tried using RTSP but it does not work
rtsp: //

Update 2
I have a list of username and password here but nobody works

usa – Does a Disneyland Resort VIP Tour give you access to Club 33?

Does a Disneyland VIP Tour give you access to Club 33?

Supposedly Club 33 has a 10-year membership waiting list, a $ 25,000 start-up fee, and $ 10,000 annual fees, but I think you would have to go at least several times a year to justify that kind of expense and just I want to live it once.

For more than $ 5,000 / day, Disneyland VIP tours can allow you to do pretty unique things as-is, like getting in front of the line for almost all trips and what not, so admission to Club 33 would be consistent With that, but I still assume that Club 33 remains a level of exclusivity that exceeds what Disneyland VIP tours offer.

permissions – SharePoint 2016 – Access Denied – Limited Access

SharePoint 2010 applications have been migrated to SharePoint 2016 applications, but today we are facing a critical problem.

I will mention what we tried and what we got next.


After mounting the content database, we run the powershell script below:

$wa = Get-SPWebApplication https://xxx.com.tr;
  • The domain is the same.
  • Claims-based authentication is enabled.

Second, we checked the user permissions and everything was fine.

But users get "Sorry, this site has not been shared with you," if the folder library has unique permission and the subfolder has unique permission as well, even though they have full control over that subfolder.

In SharePoint 2010, they were able to see these folders and they could also see the empty top folders because they had limited access.

What I checked:

  • I checked SPSuperUserAccount and SPSuperReaderAccount in the web app.
  • I checked the master pages and all users have read permission on that.
  • I checked the ULS logs and everything was fine.
  • Also, users can view files with full path.

Are there any changes to the permission structure in SharePoint 2016?