[Solved] How to create php class for navigation action

Assume we have the following rewrite rule; RewriteEngine On RewriteRule ^([^/]*)$ /index.php?module=$1 [L,QSA] This will rewrite a request like; http://example.php/index.php?module=about to http://example.php/about Now, let’s see how the Router is done; It’s very basic Can be improved a lot <?php class Router { private $strModule; //Holds the module to load (the page) public function __construct(){} public … Read more

[Solved] vb.net reading text file ,split to random range

Here’s a simple example: Dim R As New Random Dim Count As Integer Dim RangeLength As Integer Dim DataFileName As String = System.IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.MyDocuments, “test.txt”) Dim Links As New List(Of List(Of String)) Using SR As New System.IO.StreamReader(DataFileName) While Not SR.EndOfStream Count = 0 RangeLength = R.Next(2, 6) Dim curLinkSet As New List(Of String) Links.Add(curLinkSet) While Not … Read more

[Solved] what is the reason of this error?

The problem is that the class definitions are not visible to the compiler when you try to access members of an instance. Although you have provided forward declarations for the classes this is not enough. In the .cpp and .h files that access members of these classes or require their sizes you need to include … Read more

[Solved] PHP – What is wrong with this? [closed]

You miss a semicolon at the end of line #28: $data = “<h1>”. $ip . “</h1>”… This kind of error: Parse error: syntax error, unexpected T_ECHO.. usually notifies a certain line number, but when it happens you should always look at the line PRIOR to the one you are getting an error on. Please now … Read more

[Solved] What is the error in my query?

In your query, you specify where (MONTH(abc.email_date)=MONTH(NOW()) AND YEAR(abc.email_date)=YEAR(NOW())) But in the subquery (the one returning 18 results), you have 6 emails with a month that is not december 2014. There’s no way that those emails can be returned by a query that explicitly excludes them. You want those emails as well so you get … Read more

[Solved] Java Pattern matcher and RegEx

If I am not mistaken, the strings all begin with G1:k6YxekrAP71LqRv. After that, there is [P:3] by itself, or with either left S:2,3,4|, right |R:2,3,4,5 or with both left and right. The values 2,3,4 and 2,3,4,5 could be repetitive digits divided by a comma. To match the full pattern you could use: (G1:k6YxekrAP71LqRv)\[(?:S:(?:\d,)+\d\|)?(P:3)(?:\|R:(?:\d,)+\d)?\] Explanation (G1:k6YxekrAP71LqRv) … Read more

[Solved] SQL Timestamp format in PHP [duplicate]

Try this should help: $datedb = “2018-03-01 11:54:33”; $date = date(‘d-m-Y’, strtotime($datedb)); echo $date; // will print 01-03-2018 And read about date() function of php: http://php.net/manual/en/function.date.php; https://www.w3schools.com/php/func_date_date.asp 0 solved SQL Timestamp format in PHP [duplicate]