Is there a list of Certificate Authorities that provides certificates valid also for digitally sign a document?

I have to digitally sign a pdf. I created a little app using the DSS library (an EU project, based on Bouncy Castle, very simple to use) that sign the PDF with PADES using a p12 file.

I know how to create a p12 file from a certificate using openssl. The problem is I only find Certificate Authorities that provides certificates for SSL.

There’s somewhere a list of official and trusted CAs that provides X.509 certificates also for signing documents? I’m interested in pricing in particular… 😛

Thank in advance.

Dumps and Cvv Update 100% Valid Rate

Buy Dumps With Pin – track 1 and 2 dumps with pin with high balance. We are a professional Russian
carding and hacking team, working previously on EVO market place and Alpha Bay. We offer private
services, sales and suppliers of high balance dumps, writers, credit cards (cvv) and lots more. We
have dumps for, USA, EURO and worldwide DUMPS . You can also order high quality blank plastic…
* Strong BINS : Capable of High Value Swipes/Orders
* Best Quality : Allowing you to shop and cash out…

Dumps and Cvv Update 100% Valid Rate

Is this a valid Kruskal MST algorithm? If yes, what is Big-O complexity of this algorithm?

I came up with the following code by following Prof. Sedgewick’s lecture on Coursera.

Please review this code and let me know if there is anything that I got wrong here.

import java.util.ArrayDeque; import java.util.PriorityQueue; import java.util.Queue;  public class KruskalMST {      private class WeightedEdge {                     public int from, to, weight;                     public WeightedEdge(int from, int to, int weight) {                         this.from = from;                         this.to = to;                         this.weight = weight;                     }                      @Override                     public String toString() {                         StringBuilder sb = new StringBuilder();                         sb.append("From --> ");                         sb.append(from+1);                         sb.append(", to --> ");                         sb.append(to+1);                         sb.append(", weight --> ");                         sb.append(weight);                         return sb.toString();                     }                 }                  private class UnionFind {                      private int capacity;                     private int[] arr;                     private int[] size;                     public UnionFind(int capacity) {                         this.capacity = capacity;                         this.arr = new int[capacity];                         this.size = new int[capacity];                          for(int i=0; i < capacity; i++) {                             this.arr[i] = i;                             this.size[i] = 1;                         }                     }                       private int root(int i) {                         while(i != arr[i]) {                             i = arr[arr[i]];                         }                         return i;                     }                       public void union(int i, int j) {                         int p = root(i);                         int q = root(j);                          if(p != q) {                              if(this.size[p] <= this.size[q]) {                                 this.size[q] += this.size[p];                                  this.arr[p] = q;                             }                             else {                                  this.arr[q] = p;                                 this.size[p] += this.size[q];                             }                          }                      }                      public boolean connected(int i, int j) {                          int p = root(i);                          int q = root(j);                          return p == q;                     }                  }                  public Queue<WeightedEdge> findMinCostConnectionToAllCities(int[][] roadNetwork) {                       int n = roadNetwork.length;                     PriorityQueue<WeightedEdge> pq = new PriorityQueue<WeightedEdge>(2*n,(WeightedEdge e1, WeightedEdge e2) -> {                         return e1.weight - e2.weight;                     });                     Queue<WeightedEdge> mst = new ArrayDeque<>();                     UnionFind uf = new UnionFind(n);                      for(int i=0; i < n; i++) {                         for(int j=0; j < n; j++) {                             if(i != j && roadNetwork[i][j] > 0) {                                  WeightedEdge edge = new WeightedEdge(i,j,roadNetwork[i][j]);                                 pq.add(edge);                             }                         }                     }                      while(!pq.isEmpty() && mst.size() < n-1) {                          WeightedEdge edge = pq.remove();                         if(!uf.connected(edge.from, edge.to)) {                              uf.union(edge.from,edge.to);                             mst.add(edge);                         }                     }                      return mst;                  }                  public static void main (String[] args) {                     int[][] city1 = {{0, 1, 2, 3, 4},                                             {1, 0, 5, 0, 7},                                             {2, 5, 0, 6, 0},                                             {3, 0, 6, 0, 0},                                             {4, 7, 0, 0, 0}};                       int[][] city2 = {{0, 1, 1, 100, 0, 0},                              {1, 0, 1, 0, 0, 0},                              {1, 1, 0, 0, 0, 0},                                 {100, 0, 0, 0, 2, 2},                              {0, 0, 0, 2, 0, 2},                                {0, 0, 0, 2, 2, 0}};                       KruskalMST kruskal = new KruskalMST();                      Queue<WeightedEdge> mst =   kruskal.findMinCostConnectionToAllCities(city2);                     int totalCost = 0;                     for(WeightedEdge edge: mst) {                         totalCost += edge.weight;                         System.out.println(edge.toString());                     }                      System.out.println("Total cost --> " + totalCost);                  }           } 

Javascript реализация стрелок в input number – The specified value “NaN” is not a valid number

У меня есть корзина товаров, в которой может быть множество различных сущностей. И я пытаюсь реализовать изменения кол-во товара с помощью inputnumber без стрелок, а с дополнительными кнопками +/-. И при нажатии этих кнопок у меня выводится ошибка The specified value "NaN" is not a valid number и я не догадываюсь почему. Я знаю что мог бы использовать идентификаторы и с легкостью сделать задуманное. Но в моем случае мне нужно использовать querySelectorAll. Помогите мне пожалуйста подправить данный код. quantity-arrow-minus уменьшает значение поля, а quantity-arrow-plus увеличивает.

<form action="{% url 'cart:cart_update' %}" method="GET">     <button type="button" class="quantity-arrow-minus">-</button>     <input type="number" class="update_cart" value="{{item.quantity}}">     <button type="button" class="quantity-arrow-plus">+</button> </form> 
var minus = document.querySelectorAll('.quantity-arrow-minus'); var update_cart = document.querySelectorAll('.update_cart'); var plus = document.querySelectorAll('.quantity-arrow-plus');  minus.forEach(function(node) {     node.addEventListener('click', function(e) {         update_cart.forEach(function(element) {             element.value = parseInt(update_cart.value - 1);         });     }); });  plus.forEach(function(node) {     node.addEventListener('click', function(e) {         update_cart.forEach(function(element) {             element.value = parseInt(update_cart.value) + 1;         });     }); }); 

Is it valid to let view models populate their own lists for dropdowns in mvc?

I’ve struggled to find any discussion on this.

If you have a simple MVC page for updating a User, and you put a dropdown list on it of Country, you need to populate the dropdown list in the viewmodel. Let’s call it List<Country> countries {get; set;}

If the page is posted, and there’s an error like they forgot to put a User Name in, we redirect them to the page again to try again, at which point we also have to remember to repopulate the model’s List<Country> before redirecting them back to the page.

Three ways to handle this that I know of:

  • In the controller, make a call to the database, e.g. viewModel.Countries = _dataAccess.GetCountries()
  • Store the list in the view bag and not in the model at all e.g. ViewBag.Countries = _dataAccess.GetCountries()
  • Put it into the view model itself, so that List<Country> {get { return _dataAccess.GetCountries(); and thus inject in a DataAccess object.

The third approach is what I am considering because then you don’t need to worry about populating/repopulating the fields in the controller. But I can’t find any evidence via searching that this is an acceptable method, so I fear there is a drawback I am not considering.

“Is this a valid approach to retrieve complex objects?”

Suppose I have a complex object Person that depends on several other objects:

class Person {     int id;     String name;     Vehicle vehicle;     Job job;     Preference preference; }  class Vehicle {     int id;     String name; }  class Job {     int id;     String name; }  class Preference {     int id;     String name; } 

This scheme translates into 4 tables: persons, vehicles, jobs and preferences.

CREATE TABLE vehicles(id SERIAL PRIMARY KEY, name VARCHAR); CREATE TABLE jobs(id SERIAL PRIMARY KEY, name VARCHAR); CREATE TABLE preferences(id SERIAL PRIMARY KEY, name VARCHAR); CREATE TABLE persons(id SERIAL PRIMARY KEY, name VARCHAR, vehicle INTEGER REFERENCES vehicles(id), job INTEGER REFERENCES jobs(id), preference INTEGER REFERENCES preferences(id)) 

In order to retrive and construct a complete object, I would do something like this:

1) Retrieve a collection of persons without nested objects (use only id references);

class PersonSimple {     int id;     String name;     int vehicle;     int job;     int preference; }  List<PersonSimple> personsSimple = PersonsDataAccessObject.get(); // SELECT * FROM persons; jdbc here  

2) Retrieve collections of nested objects

List<Vehicle> vehicles = VehiclesDataAccessObject.get(); // SELECT * FROM vehicles; jdbc here List<Job> jobs = JobsDataAccessObject.get(); // SELECT * FROM jobs; jdbc here List<Preference> preference = PreferenceDataAccessObject.get(); // SELECT * FROM preferences; jdbc here 

3) Combine everything

List<Person> persons = new ArrayList<Person>;  for (PersonSimple personsSimple : personsSimple) {     Person person = new Person();      person.setId(personSimple.getId());     person.setName(personSimple.getName());      //     Optional<Vehicle> vehicle = vehicles.stream().filter(v -> v.getId() == person.getVehicle()).findFirst();      if (position.isPresent())     {         person.setVehicle(vehicle.get());     }      //     Optional<Job> job = jobs.stream().filter(j -> j.getId() == person.getJob()).findFirst();      if (job.isPresent())     {         person.setJob(job.get());     }      //     Optional<Preference> preference = jobs.stream().filter(p -> p.getId() == person.getJob()).findFirst();      if (preference.isPresent())     {         person.setPreference(preference.get());     }      persons.add(person); } 

Step 3 is what worries me, particularly lines like

vehicles.stream().filter(v -> v.getId() == person.getVehicle()).findFirst();` and similar lines 

I kinda understand that this approach is going to be slow, but by doing this, field vehicle of Person object would reference the same memory that is reference by the object inside vehicles collection which sounds right to me.

It allows me to modify objects of vehicles collection and reflect these changes on existing objects in persons collection.

  • Is it a correct solutions or is there there a deep misunderstanding and plain bad practice?
  • I am not sure, but it feels like I should replace it with GROUP BY, following with a correct implementation of client-side code. Is it true?
  • If this approach is valid, is there any point in replacing List (and similar) with Map where field “id” would be the key?
  • This PersonSimple to Person translation feel like a total hack.

Should I pull entire Person object from database via

SELECT * FROM persons INNER JOIN vehicles ON (persons.vehicle = vehicles.id) INNER JOIN jobs ON (persons.job = jobs.id) INNER JOIN preferences ON (persons.preference = preferences.id); 

Then how would I provide automatic selection of valid items inside, for example, ComboBoxTableCell if objects referenced by fields would not be object from the collection (same data but different instances/memory).

pipenv “Not a valid python version” error

I find myself unable to use pipenv because an error that occurs when it tries to create the environment. When I run

$   pipenv --python 3.6 

It says

ValueError: Not a valid python version: <LegacyVersion('2.7.15+')>

How can I fix this?

The full traceback:

Traceback (most recent call last):   File "/usr/local/bin/pipenv", line 11, in <module>     sys.exit(cli())   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 764, in __call__     return self.main(*args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 717, in main     rv = self.invoke(ctx)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 1114, in invoke     return Command.invoke(self, ctx)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 956, in invoke     return ctx.invoke(self.callback, **ctx.params)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke     return callback(*args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/decorators.py", line 64, in new_func     return ctx.invoke(f, obj, *args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke     return callback(*args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/click/decorators.py", line 17, in new_func     return f(get_current_context(), *args, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/pipenv/cli/command.py", line 203, in cli     clear=state.clear,   File "/usr/local/lib/python2.7/dist-packages/pipenv/core.py", line 569, in ensure_project     pypi_mirror=pypi_mirror,   File "/usr/local/lib/python2.7/dist-packages/pipenv/core.py", line 489, in ensure_virtualenv     python = ensure_python(three=three, python=python)   File "/usr/local/lib/python2.7/dist-packages/pipenv/core.py", line 397, in ensure_python     path_to_python = find_a_system_python(python)   File "/usr/local/lib/python2.7/dist-packages/pipenv/core.py", line 360, in find_a_system_python     python_entry = finder.find_python_version(line)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/backports/functools_lru_cache.py", line 137, in wrapper     result = user_function(*args, **kwds)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/pythonfinder.py", line 114, in find_python_version     major=major, minor=minor, patch=patch, pre=pre, dev=dev, arch=arch, name=name   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 396, in find_python_version     ver = next(iter(self.get_pythons(sub_finder)), None)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 279, in get_pythons     reverse=True   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 277, in <genexpr>     (p for p in self._filter_paths(finder) if p.is_python),   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 264, in <genexpr>     pth for pth in unnest(finder(p) for p in self.path_entries if p is not None)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/utils.py", line 138, in unnest     for el in target:   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 264, in <genexpr>     pth for pth in unnest(finder(p) for p in self.path_entries if p is not None)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/mixins.py", line 121, in find_python_version     for child in unnest(self.pythons.values())   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 523, in pythons     for path, entry in self.children.items():   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/cached_property.py", line 35, in __get__     value = obj.__dict__[self.func.__name__] = self.func(obj)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 494, in children     for child_key, child_val in self._gen_children():   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 487, in _gen_children     yield (child.as_posix(), PathEntry.create(path=child, **pass_args))   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 567, in create     _new = cls(**creation_args)   File "<attrs generated init c1d627cda47df3d961450b7e67810aabed6bd8f2>", line 16, in __init__   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/path.py", line 510, in get_py_version     py_version = PythonVersion.from_path(path=self, name=self.name)   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/python.py", line 418, in from_path     instance_dict = cls.parse(py_version.strip())   File "/usr/local/lib/python2.7/dist-packages/pipenv/vendor/pythonfinder/models/python.py", line 366, in parse     raise ValueError("Not a valid python version: %r" % version) ValueError: Not a valid python version: <LegacyVersion('2.7.15+')> 

Magento 2 : main.CRITICAL: A valid response status line was not found

Everytime I get issue in system.log

[2018-09-10 09:35:52] main.CRITICAL: A valid response status line was not found in the provided string {"method":"GET","url":"http:/","invalidateInfo":{"server":"[object] (Zend\Uri\Http: http://czasowewyprzedaze.pl/)","tagsPattern":"((^|,)cat_p_19418(,|$  ))|((^|,)cat_p_19420(,|$  ))"}} [] [2018-09-10 09:35:52] main.CRITICAL: A valid response status line was not found in the provided string {"method":"GET","url":"http:/","invalidateInfo":{"server":"[object] (Zend\Uri\Http: http://czasowewyprzedaze.pl/)","tagsPattern":"((^|,)cat_p_19419(,|$  ))|((^|,)cat_p_19420(,|$  ))"}} [] [2018-09-10 09:35:52] main.CRITICAL: A valid response status line was not found in the provided string {"method":"GET","url":"http:/","invalidateInfo":{"server":"[object] (Zend\Uri\Http: http://czasowewyprzedaze.pl/)","tagsPattern":"((^|,)cat_p_19420(,|$  ))"}} [] 

Does anyone know what it is?