Displaying 71-80 of 274 results.
Resolved: PHP echo link content in page
posted by admin on October 26, 2016
I am working on website and in locale and want to show in my page part of code from live server.
like

echo PHP_LINK_READER_FUNCTION("SOME_URL");
Read more
Resolved: Yii 1.1 listdata multiple fields
posted by admin on October 25, 2016
I have form with select box, and want to generate options with multiple columns.
Now:

$criteria = new CDbCriteria();
...//if you have criteria condition
$type_list=CHtml::listData(Paper::model()->findAll($criteria),'id','title'); ?>
<?php echo $form->dropDownList($model, 'paper_id', array(''=>Yii::t('t', 'Выберите бумагу'))+$type_list, array('options' => array($model->paper_id=>array('selected'=>true)))); ?>

In output i see:
  • Title 1
  • Title 2
  • etc...
  • Title N


But I want multiple columns, and want to see output like this:
  • Title 1, field 1, another field 1, etc...
  • Title 2, field 2, another field 2, etc...
  • ...
  • Title N, field N, another field N, etc...
Read more
Resolved: Laravel Update version to latest version by composer
posted by admin on October 23, 2016
In my project I use Laravel 5.1 and now I want to update by composer to Laravel 5.3 version, it is latest version!
Not manually, by composer or cmd line or artisan command!Read more
Resolved: HTML Hyphen dot string table new row
posted by admin on October 20, 2016
I have table like

<table>
<tr>
<th>id</th>
<th>name</th>
<th>etc...</th>
</tr>
<tr>
<td>C-7788</td>
<td>Arthur</td>
<th>etc...</th>
</tr>
<tr>
<td>C-7w88</td>
<td>John</td>
<th>etc...</th>
</tr>
<tr>
<td>C-7789</td>
<td>King</td>
<th>etc...</th>
</tr>
</table>


In output I got result like:

id | name | etc...
C-
7788 |Arthur | etc
C-
7w88 |John | etc
C-
7789 |King | etc

But I want to see without line breaking result

id | name | etc...
C-7788 |Arthur | etc
C-7w88 |John | etc
C-7789 |King | etc
Read more
Resolved: Laravel 5.2 artisan make Model not created migration file automaticlly
posted by admin on August 11, 2016
I created model from cmd by

php artisan make:model Post


and migration file not created automaticallyRead more
Resolved: Уникальные пары MySQL из одной таблицы. Distinct pairs in MySQL join (same table)
posted by admin on March 21, 2016
Есть таблица товаров.

CREATE TABLE `goods` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8


Она содержит следующие значения.

`id` `name` 1 Яблоки 2 Яблоки 3 Груши 4 Яблоки 5 Апельсины 6 Груши


Напишите запрос, выбирающий уникальные пары `id` товаров с одинаковыми `name`, например:

(1,2), (4,1), (2,4), (6,3)
Read more
Wiki: NetBeans XAMPP: Connect to git repository and delete existing file from GitHubwiki
posted by admin on October 7, 2016
altIf youtry to delete file from NetBeans, after that try to do commit and push project to update repository, you cant see any deleted files, which you deleted on NetaBenas.

Now I want to share to you my version, to resolving that problem Step By Step

1. Adopt your netbeans project with github repository
All instruction here, how to install and work with NetBeans and Git repository and how to do

  1. How to Initialize a Git Repository
  2. How to Open Window > Output > Output
  3. How to add files or directly commit them to the Git repository
  4. How to clone existing project from Git repository location by user name and password or how to push existing project from NetBeans location by user name and password to Git repository
  5. etc...


2. Download GIT Bash
Official website for downloading Git Bash

3. Open Git Bash command output window
Change your directory to your NetBeans project directory, to find .git files

$ cd c:

a.ovasafyan@IT04 MINGW64 /c
$ cd xampp/htdocs/

a.ovasafyan@IT04 MINGW64 /c/xampp/htdocs
$ cd bukivedi.store

a.ovasafyan@IT04 MINGW64 /c/xampp/htdocs/bukivedi.store (master)


If all is right, you must see the word (master)

Check status

$ git status

If all is done, you can see this message

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean


3. Starting delete process
Deleting file from local repository by rm

$ git rm "index-test.php"

right result:

$ git rm "index-test.php"
rm 'index-test.php'


Checking status after our deleting operation

$ git status

Right result:

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

deleted: index-test.php

check file on your NetBeans Project... File will be deleted successfully, and you can't see that file!
Saving our changes by commit

$ git commit -m "We are testing delete event of Git"

Right Result:

$ git commit -m "We are testing delete event of Git"
[master 3cf6321] We are testing delete event of Git
1 file changed, 15 deletions(-)
delete mode 100644 index-test.php

Push our changes to our Git Repository

$ git push

Right Result:

$ git push
Counting objects: 2, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 252 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
To https://github.com/arthurhovasap/bukivedinstore.git
aac9734..3cf6321 master -> master


Check you repository and enjoy!Read more
Wiki: Google Maps API Maps JavaScript API Place Autocompletewiki
posted by admin on October 12, 2016

<!DOCTYPE html>
<html>
<head>
<title>Place Autocomplete</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 100%;
}
.controls {
margin-top: 10px;
border: 1px solid transparent;
border-radius: 2px 0 0 2px;
box-sizing: border-box;
-moz-box-sizing: border-box;
height: 32px;
outline: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#pac-input {
background-color: #fff;
font-family: Roboto;
font-size: 15px;
font-weight: 300;
margin-left: 12px;
padding: 0 11px 0 13px;
text-overflow: ellipsis;
width: 300px;
}

#pac-input:focus {
border-color: #4d90fe;
}

.pac-container {
font-family: Roboto;
}

#type-selector {
color: #fff;
background-color: #4d90fe;
padding: 5px 11px 0px 11px;
}

#type-selector label {
font-family: Roboto;
font-size: 13px;
font-weight: 300;
}

</style>
</head>
<body>
<input id="pac-input" class="controls" type="text"
placeholder="Enter a location">
<div id="type-selector" class="controls">
<input type="radio" name="type" id="changetype-all" checked="checked">
<label for="changetype-all">All</label>

<input type="radio" name="type" id="changetype-establishment">
<label for="changetype-establishment">Establishments</label>

<input type="radio" name="type" id="changetype-address">
<label for="changetype-address">Addresses</label>

<input type="radio" name="type" id="changetype-geocode">
<label for="changetype-geocode">Geocodes</label>
</div>
<div id="map"></div>

<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -33.8688, lng: 151.2195},
zoom: 13
});
var input = /** @type {!HTMLInputElement} */(
document.getElementById('pac-input'));

var types = document.getElementById('type-selector');
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);

var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds', map);

var infowindow = new google.maps.InfoWindow();
var marker = new google.maps.Marker({
map: map,
anchorPoint: new google.maps.Point(0, -29)
});

autocomplete.addListener('place_changed', function() {
infowindow.close();
marker.setVisible(false);
var place = autocomplete.getPlace();
if (!place.geometry) {
window.alert("Autocomplete's returned place contains no geometry");
return;
}

// If the place has a geometry, then present it on a map.
if (place.geometry.viewport) {
map.fitBounds(place.geometry.viewport);
} else {
map.setCenter(place.geometry.location);
map.setZoom(17); // Why 17? Because it looks good.
}
marker.setIcon(/** @type {google.maps.Icon} */({
url: place.icon,
size: new google.maps.Size(71, 71),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(17, 34),
scaledSize: new google.maps.Size(35, 35)
}));
marker.setPosition(place.geometry.location);
marker.setVisible(true);

var address = '';
if (place.address_components) {
address = [
(place.address_components[0] && place.address_components[0].short_name || ''),
(place.address_components[1] && place.address_components[1].short_name || ''),
(place.address_components[2] && place.address_components[2].short_name || '')
].join(' ');
}

infowindow.setContent('<div><strong>' + place.name + '</strong>
' + address);
infowindow.open(map, marker);
});

// Sets a listener on a radio button to change the filter type on Places
// Autocomplete.
function setupClickListener(id, types) {
var radioButton = document.getElementById(id);
radioButton.addEventListener('click', function() {
autocomplete.setTypes(types);
});
}

setupClickListener('changetype-all', []);
setupClickListener('changetype-address', ['address']);
setupClickListener('changetype-establishment', ['establishment']);
setupClickListener('changetype-geocode', ['geocode']);
}

</script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&signed_in=true&libraries=places&callback=initMap"
async defer></script>
</body>
</html>
Read more
Resolved: Bootstrap How Make Glyphicons Bigger - Change Size (like Fonts Awesome fa-nx)
posted by admin on October 12, 2016
I have icon in bootstrap , and I want to make him bigger, change size.
I can do it by font-size, but I want to know how to do it by bootstrap default functionality.
Html

<span class="glyphicon glyphicon-camera"></span>

I dont want method like this

#id.glyphicon-camera{
font-size: 2em;
}

I want method by classes systems, like awesome fonts fa-2x etc...Read more
Wiki: Bootstrap text-align classeswiki
posted by admin on October 12, 2016

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>
Read more