Displaying 1-10 of 182 results.
Resolved: Copy textarea text to the clipboard in JavaScript?
posted by admin on August 26, 2016
What is the best way to copy text to the clipboard? (multi-browser)
Like CTRL + CRead more
Wiki: Задача MySQL. Выбрать из таблицы те книги, у которых два и более автораwiki
posted by admin on August 24, 2016
Таблица авторов:

CREATE TABLE `tbl_author` (
`id` int(10) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `tbl_author`
ADD PRIMARY KEY (`id`);


Таблица книг

CREATE TABLE `tbl_book` (
`id` int(10) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `tbl_book`
ADD PRIMARY KEY (`id`);


Таблица связей межу таблицей книг и авторов

CREATE TABLE `tbl_book_author` (
`id` int(10) NOT NULL,
`book_id` int(10) NOT NULL,
`author_id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `tbl_book_author`
ADD PRIMARY KEY (`id`),
ADD KEY `book_id` (`book_id`),
ADD KEY `author_id` (`author_id`);


Решение

SELECT book.id, book.name, COUNT(ba.author_id) AS cnt FROM `tbl_book_author` ba
LEFT JOIN tbl_book book
ON book.id = ba.book_id
GROUP BY ba.book_id
HAVING cnt > 1
Read more
Resolved: Remove focus from an input field in a jquery dialog
posted by admin on August 24, 2016
I have a button onclick of which a jquery dialog appears with two input fields which are jquery datepickers. Whenever the dialog appears, the first fields gets focus automatically, hence the datepicker pops up. I have resolved this for now by adding another dummy input field. Is there a better way ?

Sorry if the question is repeated. I tried searching for one already existing but couldn't get one. Please point me to an existing question if present.

Edit:

Okay my code goes as follows. onClick of a button the jdialog appears and there are 2 datepicker input fields inside the div "select_date_dialog".

$("#select_date").click(function(){
$("#select_date_dialog").dialog({
modal: true,
dialogClass: 'connect-dialog',
height: 100,
width: 500
});
});

afaik: can you be a bit more specific how blur will help me ? I tried adding this as suggested.

open: function(event, ui) {
$('#custom_from_date').blur();
}

blur happens when there input field loses focus. can i use blur to specify whether that field should get focus or not ?Read more
Wiki: Responsive multilevel menu with Bootstrap 3 - Second and Third level submenuwiki
posted by admin on August 18, 2016
HTML

<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">NavBar</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/fontenele/bootstrap-navbar-dropdowns" target="_blank">GitHub Project</a></li>
</ul>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Menu 1 <b class="caret"></b></a>
<ul class="dropdown-menu multi-level">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Menu 2 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>

CSS

.dropdown-submenu {
position: relative;
}

.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover>.dropdown-menu {
display: block;
}

.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}

.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}

.dropdown-submenu.pull-left {
float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
Read more
Resolved: How do I auto-hide placeholder text upon focus using css or jquery?
posted by admin on August 16, 2016
This is done automatically for every browser except Chrome.

I'm guessing I have to specifically target Chrome.

Any solutions?

If not with CSS then jQuery?Read more
Wiki: Laravel 5.2 install IDE helper for NetBeans (Namespaces, Classes and all libraries)wiki
posted by admin on August 12, 2016
Helper Source laravel-ide-helper GITHUB Official

CMD Terminal
Open CMD terminal
Go to your Laravel project root directory by

cd C:\xampp\htdocs\laravel.dev


Install
Require this package with composer using the following command:

composer require barryvdh/laravel-ide-helper

After updating composer, add the service provider to the providers array in config/app.php

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,


Automatic phpDoc generation for Laravel Facades
You can now re-generate the docs yourself (for future updates)

php artisan ide-helper:generate

Note: bootstrap/compiled.php has to be cleared first, so run

php artisan clear-compiled

before generating (and

php artisan optimize

after).

You can configure your composer.json to do this after each commit:
You can also publish the config file to change implementations (ie. interface to specific class) or set defaults for --helpers or --sublime.

php artisan vendor:publish --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" --tag=config


Restart NetBeans IDERead more
Resolved: NetBeans update last commit message
posted by admin on August 12, 2016
How to update last commit, not pushed commit message content?Read more
Resolved: XAMPP 3306 port connection problem and errors
posted by admin on August 12, 2016

Error: MySQL shutdown unexpectedly.
12:45:08 [mysql] This may be due to a blocked port, missing dependencies,
12:45:08 [mysql] improper privileges, a crash, or a shutdown by another method.
12:45:08 [mysql] Press the Logs button to view error logs and check
12:45:08 [mysql] the Windows Event Viewer for more clues
12:45:08 [mysql] If you need more help, copy and post this
12:45:08 [mysql] entire log window on the forums
Read more
Resolved: Yii 1.1 ‪Sitemap systems. Auto Generate sitemap.xml
posted by admin on August 12, 2016
I want to generate my SITEMAP.XML by controller, action, and view systems, without using any website service, which generating XML file.
I have pages, posts, and other links.
In database for example
1. tbl_pages
2. tbl_postsRead more
Resolved: Replace using RegEx in notepadpp
posted by admin on August 12, 2016
I want to remove all specific tags from XML file

<somename>xyz</somename>
Read more