¿Cual seria la declaracion del interface en la libreria?

tengo el siguiente codigo java

ChangeListener<Number> listener = StrongListener::changed; 

y luego en su uso

public static void Changed(ObservableValue<? extends Number>prop,Number OldValue,Number newValue){ ///codigo de la funcion  } 

¿Como se definirian ambos de forma generica en la libreria?Vamos,¿cual seria la firma de la funcion al definirla? Y llegado el caso ¿proque en la segunda parte que es el uso de la funcion hay que repetir el template

ObservableValue<? extends Number> 

SharePoint 2013 Search: Create schedule interface issue

When I try to create schedule either for incremental or full crawl I get the following interface that looks kinda corrupted ad shown below:

enter image description here

Notice that the html <b> Select rights </b> tag. If I compare it with a other working interface it, the button with the <b> Select rights </b> tag suppose to be the OK button. Here is what the create schedule suppose to look:

enter image description here

vpn interface different from

I am very new to ubuntu and am trying to install an openvpn following a tuturial from utube. My vpn-interface seems older allthough the installation is 18.04.3, the vpn client doesnt allow me to insert certificate and key nor the gateway. There arent any slots for these components.

Will I have to configure these ? Where would I find instructions to do so? Also the advanced settings allow different and fewer options than the tutorial which is from 15. enter image description hereenter image description here

Best, Sirenea

Declaring an object that extends a class and implements more than one interface

I’m confused about how should I declare an object that implements more than one interface, or derives from a class that implements one interface, and implements another interface itself.

Let’s suppose I have a generic DAO interface, as follows:

public interface IDao<T> {    Optional<T> get(long id);    List<T> getAll();    void save(T t);    void update(T t, String[] params);    void delete(T t); } 

Then, I also have an implementation for this interface:

public class DaoImpl implements IDao<Entity> {   //implementation goes here } 

In my understanding, if I’d like to use this DAO implementation in another class, I should declare the object as an IDao, instead of DaoImpl, in order to be able to change the implementation without modifying the class. See below:

public class MyClass {    IDao dao;    public MyClass(IDao dao) {     this.dao = dao;   } } 

However, suppose I want to create an implementation that extends the DaoImpl and adds functionality, for example:

public class FilterDaoImpl extends DaoImpl implements IFilterDao<Entity> {   public List<Entity> getBetweenDates(Date start, Date end) {   //...   } } 

I believe I should also create an IFilterDao interface and make the FilterDaoImpl implement it. I’m not sure how to declare this implementation in a class. If I do it like this:

public class MyClass2 {    IFilterDao dao;    public MyClass(IFilterDao dao) {     this.dao = dao;   } } 

I won’t be able to call methods like getAll().

How should I declare the FilterDaoImplimplementation in a class?

Ubuntu 16.04 static route with 2 interfaces and a bridge. Use one interface just for local traffic

I have a Ubuntu 16.04 install with 2 connected interfaces both with static IP’s one in a bridge configuration. The networking service refuses to set the gateway on boot and I have to add it manually for any non-local traffic to work. This is only one of the thing I would like to fix. Lets set up the topology and configuration:

----------- | Gateway |--- 192.168.1.1------192.168.1.21/enp4s0f1--|---------| -----------                WAN                         |         |       |                                                | server  | ---------------                                        |         | | LAN switch  |-------NA--------192.168.1.20/br0-------|---------| ---------------            LAN  
source /etc/network/interfaces.d/*  # The loopback network interface auto lo iface lo inet loopback  # Physical backing for bridge auto enp4s0f0 iface enp4s0f0 inet manual   # WAN traffic auto enp4s0f1 iface enp4s0f1 inet static   address 192.168.1.21   network 192.168.1.0   netmask 255.255.255.0   broadcast 192.168.1.255   gateway 192.168.1.1   dns-nameservers 192.168.1.1  # LAN Bridge auto br0 iface br0 inet static   address 192.168.1.20   network 192.168.1.0   netmask 255.255.255.0   broadcast 192.168.1.255   dns-nameservers 192.168.1.1   bridge_ports enp4s0f0   pre-up iptables-restore < /etc/network/iptables.rules 
e7-4860:~ william$   route Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 10.0.3.0        *               255.255.255.0   U     0      0        0 lxcbr0 192.168.1.0     *               255.255.255.0   U     0      0        0 enp4s0f1 192.168.1.0     *               255.255.255.0   U     0      0        0 br0 192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0  

I would like ALL of the WAN traffic to use the 192.168.1.21 / enp4s0f1 interface and all the LAN/Layer 2 traffic to use the 192.168.1.20/br0 interface.

How can I achieve this?

C++ How to build a common interface with the possibility to call functions specific to only one class

I am building a common interface for several different backends that are shared libs loaded at runtime dependend on the used platform. It looks basically like the code below. My problem is, that while 90% of the functions of all backends are the same (just different implementations but same purpose) some of them have features that are not available to other platforms at all.

If I had a wrapper function for all features than they would run into the void for backends that do not support them which I want to avoid. I also don’t like the idea of having implementations of backend functions that just return errors.

What would be a good way to have a generic common interface while still being able to call functions specific to a backend if the user wants to limit his application to that platform?

class CommonInterface {     void DoA(); // Calls InternalDoA() of loaded backend      void DoB(); // Calls InternalDoB() of loaded backend      void DoC(); // Calls InternalDoC() of loaded backend ??? };  class BackendOne {     void InternalDoA();      void InternalDoB();      // DoC does not exist! };  class BackendTwo {     void InternalDoA();      void InternalDoB();      void InternalDoC(); }; 

Thanks a lot in advance!

Backoffice Interface : how to display using MVC?

I’m currently developing a backoffice interface in php and json. I’ve choosen to use MCV. I have differents items (society , folder) and 5 displaying modes (list, det, upd, add, del).

To navigate through pages here my links look like : my_web_page.com/?do=list&obj=society.

Then my index.php set the variables and get the json, controller and view files.

Json contains “object” informations (ex: society detail) while controller and view files depend on the display mode (here list).

Moreover here is my tree :

  • First view : obj= society and view = list (here you can click on a society to view the deail)
  • After clicking : obj = society and view = det

The point is in my_web_page.com/?do=det&obj=society. I’m displaying compagny informations like Name, observations, date, …

I would also like to display in this same page the list of the compagny’s folders. As I did, I think I should include the ?do=list&obj=folder view.

How do you advise me to do ?

If you need more details, let me know.

Thanks,

Lucas.

Need to design interface after email verification for app

I have a situation where user can sign up without email verification, but if wants to perform some action, he needs to do email verification first. So if he clicks on verify email in the profile, the app informs him about getting verification link in the email. So my problem is when he verifies the link in the email, and gets back to the app, it still shows the same interface of getting the link in the email. So how can I tackle this?

Feedback on new digital signage / info signage web service interface and use ability

My company has just created a new web service that allows you to create customized “screens” from your Google calendar events, tasks, news, photos, IP cameras, and many others. You can then display these screens on any Android, Android TV, or Fire OS device (Shields, Fire Stick, Android tablets, etc) with full remote control, scheduling, or control via Alexa or IFTTT.

Obviously there are already similar products out there in the wild, but ours is geared more towards Cloud based automation and people who use a lot of Android devices in their homes or businesses.

The service has both Free and Pro (paid) tiers. In terms of the product features, both tiers are identical. The Free tier adds an advertising bar at the top of your screens, where the Pro has no ads. Free also requires periodic Recaptcha verification to combat the bots.

I am posting here in the hope of getting some feedback from this most excellent tech crowd 🙂

Specifically, here are some areas we could use your help on:

  1. Freemium structure: Do you prefer full features with ads or an ad free only basic features (for free accounts)?
  2. Do you find our screen design simple to use? If not, why?
  3. We have many remote control options. Is there a particular method we are missing?
  4. We support PIP display on most devices. Do you ever use PIP on your Android streaming devices?
  5. What do you like and dislike about the service in general?

The service is called SplashTiles and you can test it at https://splash-tiles.com. There are also demo videos there you that show how it works without needing to create an account.

Thanks for any feedback you can provide!!

How to go ahead with methods that only one derived class implements from a common interface?

I have one interface (let’s say in C++) that has been implemented by some derived classes. Let’s suppose that the interface is like this:

class IBase {   virtual bool method_1() = 0;   virtual long method_2(const std::string str) = 0;   // other methods   virtual long method_10(int value) = 0; }; 

and up to now 6 different derived classes (will be more in future) have implemented the interface. In lots of algorithms in my code, I have used this interface polymorphically. e.g:

// some usage obj = getObject(); if (obj->method_1()) {   return obj->method_2("Hello"); } else {   return obj->method_10(12); } 

Over the time, I have found that there would be lots of methods that only one derived class implements them. So, the Q is that is it the right design to put these methods in the interface or should I put them directly in the derived classes? But note that:

  • If I put them in the interface, only one derived class will implement them and for the rest of the derived classes the implementation will be empty.
  • If I put them in the derived classes, my implemented algorithms will not be generic anymore and I need to check the type of the derived class during my algorithm implementation.

What is the right way to go ahead in this case?