mardi 28 juin 2016

fullcalendar time limit rendering in AgendaView

With Fullcalendar's agendaView, is it possible to show a limit on time (displayed on the left of the grid)? Example, by default the time displayed is from 12:00 am to 11:59 pm; now say I want to display from 10:30 am - 9:00 pm. Would this use case be possible?

thanks.

How I know if the script works from within a subdirectory or not?

In some cases some of us prefer to insert the script into sub-directory, ex: http://example.com/Script/index.php, and some others prefer to insert the script into root directory ex: http://example.com/index.php.

How to know if the script inside a subdirectory or not ?

How to replace string that contain bracket? (Regex)

i want to ask you something simple. I have string like:

happy (adj)

sad (v)

and i want to replace those brackets with empty string (" ") so it would be like this:

happy

sad

i know that i have to use regex but because im new in regex, can u help me with the pattern guys? thank you :')

Heavily manipulated html in a javascript var

After getting the HTML code out of a file onto PHP and then Javascript, when I try to display it using:

    <a href='filename.php'>Random link</a>
    <p id='par'>
    </p>
    <script>
      str = "<html>...</html>";
      document.getElementById('par').innerHTML = str;
    </script>

So my question is, how come is Ramdom link displayed with plain html. Shouldn't the html be interpreted ?

Building a local wikipedia from scratch

I'm looking to create a personal wikipedia-esque website, both for pleasure and for personal use. I'm aware there are companies that offer such a service, but I'm interesting in doing it from scratch.

That being said, I have two questions: 1) is it possible (I have an introductory knowledge to html, css, php and python 2) where should I start

My main concern lies behind the creation of an editable template for the wikis to be created with.

Thanks,

Troy

Changes made to $scope in directive's controller unavailable to the view

I have the following code:

<div my-dir bar="test">
  {{foo}}
</div>

And the following directive:

    restrict: 'A',
    scope:
    {
        bar: '@'      
    },
    link: link,
    controller: controller

In the controller I'm doing this:

function controller($scope)
{
    console.log("in ctrl", $scope);
    $scope.foo = 'test'
}

However $scope.foo isn't accessible to the view code. It doesn't reflect the update.

What am I doing wrong?

datetimepicker access violation error

datatimepicker is working fine but can't insert the date.time into the database, always get Syntax error or access violation: 1064 error. " note that datetimepicker format is similar to this 06-27-2016 12:00 AM."

<div class='input-group date' id='datetimepicker1'>
             <input type='text' class="form-control" id="datepicker" name="datepicker"/>
             <span class="input-group-addon">
             <span class="glyphicon glyphicon-calendar"></span>
             </span>
         </div>

query

$sql = "INSERT INTO news(`newsdate`,`title`)VALUES (".$_POST["datepicker"]."',".$_POST["title"]."')";