Skip to content

Instantly share code, notes, and snippets.

View MihailoJoksimovic's full-sized avatar

Mihailo Joksimovic MihailoJoksimovic

View GitHub Profile
U jeziku PHP, u objektno-orjentisanom maniru, napisati simulaciju relija Paris-Dakar. Reli
Paris-Dakar je simulacija utrke u kojoj učestvuju različita motorna vozila: automobili, kamioni i
motocikli. Svako vozilo ima svoje ime. Automobili mogu biti sportski i terenski, dok motocikli
mogu biti kros i sportske izvedbe. Rastojanje između starta i cilja iznosi 10.000 km. Maksimalna
brzina sportskih automobila iznosi 140 km/h, terenskih 100 km/h, kamiona 80 km/h, kros
onBeforePagingPageChanges: function(pagingToolbar) {
var grid = pagingToolbar.up('grid[itemId="articlesListGrid"]');
this.storeSelectedGridRecords(grid);
},
/**
* Saves list of articles that were selected in given Grid.
*/
storeSelectedGridRecords: function(grid) {
private function getAddToCartPanel() {
$mainDiv = Ext::create('container');
$addToCartTextLabel = Ext::create('label');
$addToCartTextLabel->setText('To Cart:');
$addToCartTextLabel->setStyle('font-weight:bold; font-size: 16px; padding-left: 5px;');
$addToCartTextLabel->appendTo($mainDiv);
$addToCartButtonAndText = Ext::create('fieldcontainer');
$addToCartButtonAndText->setConfigByIndex('layout', array(
addArticleToCart = function(articleId, quantity, opts){
var opts = opts || {},
success = opts.success || function(){},
failure = opts.failure || function(){},
callback = opts.callback || function(){},
scope = opts.scope || this;
Ext.Ajax.request({
url: p4t.rootPath + '/modules/eprocurement/Cart/addArticle',
params: {
onSimulateOrdersClick: function(article) {
console.log("Simulating for article:");
console.log(article);
var me = this;
var articleId = article.get('article_id');
// First we have to load All data about article before proceeding any further.
Ext.define('RfqSe.view.MaterialDetails', {
extend: 'Ext.panel.Panel',
alias: 'widget.materialdetails',
margin: '5 0',
rfq: null,
tabToOpen: 'general',
var store = Ext.create('Ext.data.Store', {
fields: ['extjs_state_user_data_id', 'user_id', 'name', 'value'],
autoSync: true,
proxy: {
type: 'ajax',
reader: {
type: 'json',
root: 'results'
},
writer: {
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then