Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 05/24/2018 in all areas

  1. 2 points
    Commencing with test_config.txt as # interface eth0 subnet 10.0.10.0 netmask 255.255.255.0 { } host cm-test1 { hardware ethernet 78:8d:f7:2b:bc:79; fixed-address 172.17.12.80; filename "srv-050.cfg"; } host cm-test2 { hardware ethernet 5c:35:3b:4d:73:4b; fixed-address 172.17.13.119; filename "srv-042.cfg"; } host cm-instrumenti { hardware ethernet 78:8d:f7:2b:bc:79; fixed-address 172.17.12.80; filename "srv-050.cfg"; } host cm-nimonmehmetaj { hardware ethernet 5c:35:3b:4d:73:4b; fixed-address 172.17.13.119; filename "srv-042.cfg"; } This is one way $unwanted = [ 'cm-instrumenti', 'cm-nimonmehmetaj' ]; // unwantedt host names $text = file_get_contents('test_config.txt'); $config = array_map('trim',explode('}', $text)); $new_config = array_filter($config, function ($v) use($unwanted) { foreach ($unwanted as $name) { if (strpos($v, $name)!==false) return false; // remove unwanted elements } return $v!=''; // remove blank entries }); file_put_contents('new_config.txt', join("\n}\n", $new_config) . "\n}\n"); giving new_config.txt as # interface eth0 subnet 10.0.10.0 netmask 255.255.255.0 { } host cm-test1 { hardware ethernet 78:8d:f7:2b:bc:79; fixed-address 172.17.12.80; filename "srv-050.cfg"; } host cm-test2 { hardware ethernet 5c:35:3b:4d:73:4b; fixed-address 172.17.13.119; filename "srv-042.cfg"; }
  2. 1 point
    IP.Board decided that nobody needed it anymore so they got rid of it And if their codebase wasn't so terrible I'd write a plugin to add it back. But you can Like/Thanks posts.
  3. 1 point
    The domain name as seen in the browser isn't matching one of the site configurations used by Apache/nginx. Either there is no configuration, or it's not enabled, or Apache/nginx haven't been restarted since adding the configuration, or the domain names don't match.
  4. 1 point
    There is no a wrap event. There is a window resize event and a typing event. What is the problem you're trying to solve by detecting line wrapping?
  5. 1 point
    Thanks maxxd and ignace, Ah, a 3rd option. You mean something like the following, correct? class SubObject implements SubObjectInterface { public function doSomething() { echo("something\n"); } } class Obj implements ObjInterface { private $subObject; public function __construct(SubObject $subObject) { $this->subObject=$subObject; } public function getSubObject() { return $this->subObject; } } $subObject=new SubObject(); $obj1=new Obj($subObject); $obj->getSubObject()->doSomething();
  6. 1 point
    When you are using "not equals" the OR needsd to be an "AND". Although I agree with element121, "(NOT) IN" is a lot easier than multiple ORs
  7. 1 point
    I know you joined to the expenses table. The point I was making (yet again) is that you do not select any columns from that table. Your select clause only has columns from client, matters and matterjunactions table. Anyway, so you don't waste any more time by posting a query that could not possible produce the results that you claim, here is the query you probably need SELECT c.clientid , c.client , m.refno , m.nickname , ae.actiondate , ae.notes , ae.fee , ae.expensedate , ae.amount FROM client c INNER JOIN matters m ON c.clientid = m.clientid LEFT JOIN ( SELECT matterid , actiondate , notes , fee , null as expensedate , null as amount , 'A' as type FROM matterjunactions UNION ALL SELECT matterid , null , null , null , expensedate , amount , 'E' FROM expenses ) ae ON m.matterid = ae.matterid WHERE c.clientid = 238 ORDER BY m.matterid, type, COALESCE (actiondate, expensedate); +----------+----------+-------+----------+------------+------------------+------+-------------+--------+ | clientid | client | refno | nickname | actiondate | notes | fee | expensedate | amount | +----------+----------+-------+----------+------------+------------------+------+-------------+--------+ | 238 | Client A | A123 | Nick 123 | 2018-03-01 | This is a note 1 | 200 | | | | 238 | Client A | A123 | Nick 123 | 2018-03-02 | This is a note 2 | 150 | | | | 238 | Client A | A123 | Nick 123 | 2018-03-03 | This is a note 3 | 100 | | | | 238 | Client A | A123 | Nick 123 | 2018-03-04 | This is a note 7 | 200 | | | | 238 | Client A | A123 | Nick 123 | 2018-03-05 | This is a note 8 | 150 | | | | 238 | Client A | A123 | Nick 123 | 2018-03-06 | This is a note 9 | 100 | | | | 238 | Client A | A123 | Nick 123 | | | | 2018-03-01 | 100 | | 238 | Client A | A123 | Nick 123 | | | | 2018-03-02 | 500 | | 238 | Client A | A125 | Nick 125 | 2018-03-01 | This is a note 10| 200 | | | | 238 | Client A | A125 | Nick 125 | 2018-03-03 | This is a note 13| 100 | | | | 238 | Client A | A125 | Nick 125 | | | | 2018-03-01 | 300 | | 238 | Client A | A125 | Nick 125 | | | | 2018-03-02 | 250 | | 238 | Client A | A126 | Nick 126 | 2018-03-02 | This is a note 12| 150 | | | | 238 | Client A | A126 | Nick 126 | | | | 2018-03-01 | 150 | | 238 | Client A | A126 | Nick 126 | | | | 2018-03-02 | 500 | +----------+----------+-------+----------+------------+------------------+------+-------------+--------+
  8. 1 point
    Most of the time WordPress needs to show a label it does so through translations. "Personal Info" works as both the identifier for a particular translatable phrase as well as the default if there is no translation for it. Changing the code to say "Contact Info" changes the default, which you do want, but it also changes the identifier, which you don't want because then translations won't work for it. Instead of changing the code, I suggest setting up a "translation" that turns the phrase "Personal Info" into "Contact Info". And what did you want to do about fonts? For the caching problem, either your browser is caching the page (try using privacy/incognito mode, a different browser, or even another device) or WordPress is caching it. Check if you have any plugins installed which might be doing that. Also check that you're editing the right files in the right places, and obviously that you're uploading the changed versions properly.
  9. 1 point
    I recently cam across a reply which I liked. It didn't make me sad, confused or even roll on the floor laughing. As it wasn't a reply to my question it didn't really seem apt to say "thanks" either. I just appreciated the post for its content. But there is no option for mere appreciation and just "liking" . EDIT: Still on the subject of these silly pictures. The old forum had a very simple and unambiguous "Like" button. Which of these new options are reputation enhancing? I can appreciate that the "Thanks" one might be but a post causing confusion hardly seems a suitable candidate.
  10. 1 point
    This is an extremely complicated question to answer and impossible with the minimal information you provided. While there are certainly development implications to your question, there could be an equal amount of DevOps capability required. The general term for setup and configuration of an environment or service, is called "Provisioning". Certainly you can create a series of scripts that do this for you and put an environment in a known state. There are all sorts of DevOps tools out there like Chef, Puppet, Salt and Ansible that do "orchestration" of environments and are built to handle whatever you might need. There's also Docker, which has a lot of features that could handle the isolation of separate computing environments. Typically the way this is done is that you have not only a copy of the database, but a separate copy of the code. While that is not strictly necessary, and adds to the redundancy, it also provides isolation of an environment. So you could have customizations or modules for customer A, that customer B does not have. Otherwise you will have to have some separate bootstrapping code that reads a separate environment for each person. In general, yes, one way to handle this is to have separate virtual host configurations and use a subdomain. user1.yourdomain.com user2.yourdomain.com Each user gets a different directory, with different db user/pw and database name. Doing this well, writing all the code to make it happen, and testing is all additional work, but by the same token, you will have extra code and complexity involved in every database query you have if you need to segment all your data by user. Ultimately, if this could develop into a business where you are providing "Software as a service" then it's probably better to take the DevOps approach and separate the environments, but then you have more system administration to deal with. If it's probably just going to be these 3 guys, you are probably better off just maintaining one system configuration and putting in the code that relates all the data to a specific user.
This leaderboard is set to New York/GMT-04:00
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.