Skip to content

Instantly share code, notes, and snippets.

View azec-pdx's full-sized avatar
👋
Always available ...

Amer Zec azec-pdx

👋
Always available ...
View GitHub Profile
@azec-pdx
azec-pdx / QtWebKitError
Created January 1, 2013 17:00
Error QT WebKit build
amer@localhost:~/dev/projects/cpp/test-etfdraw/trunk/plugins/EMPlugin> make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DEMPLUGIN_LIBRARY -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtWebKit -I/usr/include -I../../ETFDraw/include -I. -o EMPlugin.o EMPlugin.cpp
In file included from EMPlugin.cpp:2:0:
RichText.h:11:20: fatal error: QtWebKit: No such file or directory
compilation terminated.
make: *** [EMPlugin.o] Error 1
@azec-pdx
azec-pdx / gist:4475963
Created January 7, 2013 15:45
Monthpicker code.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<link rel="stylesheet" type="text/css" media="screen" href="billing.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="jqueryMonthpicker.js"></script>
<!--[if IE]>
@azec-pdx
azec-pdx / gist:4517169
Created January 12, 2013 10:51
liferay-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/LiferayPool</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/lportal?useUnicode=true;characterEncoding=UTF-8</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>liferay</user-name>
<password>liferay</password>
<min-pool-size>0</min-pool-size>
</local-tx-datasource>
</datasources>

install Sublime text 2 via PPA or manually

install pythonbrew from https://github.com/utahta/pythonbrew (as root if you wish)

curl -kL http://xrl.us/pythonbrewinstall | bash

install python 2.6.6 enabling 4 bytes unicode

pythonbrew install -C --enable-unicode=ucs4 2.6.6
@azec-pdx
azec-pdx / BHT Line Box REST API
Created May 9, 2013 13:44
REST WS API interface
package com.bht.soa.services;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
@azec-pdx
azec-pdx / gist:5656455
Created May 27, 2013 10:50
Typoscript on the root page (all pages are one level below)
config.simulateStaticDocuments = 1
config.simulateStaticDocuments_pEnc=md5
config.simulateStaticDocuments_noTypeIfNoTitle=1
config.doctype = <!DOCTYPE html>
config.metaCharset = utf-8
#language settings
config.linkVars = L, type
config.sys_language_uid = 0
config.sys_language_mode = strict
@azec-pdx
azec-pdx / gist:b7785e56d961da440e8c
Last active August 29, 2015 14:11
Layout za UI (Android 103 - Modul1 - Content Providers)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Ime studenta" />
<EditText
android:id="@+id/txtName"
@azec-pdx
azec-pdx / gist:c46278210e9b311f9996
Created December 11, 2014 20:29
UI Metode za Content Providere
public void onClickRetrieveStudents(View view) {
//Retrueve student records
String URL = "content://ba.edu.eksa.Fakultet/studenti";
Uri students = Uri.parse(URL);
String[] projection =
{
StudentProvider._ID,
StudentProvider.NAME,
StudentProvider.GRADE
};
@azec-pdx
azec-pdx / gist:4a0a1feb9c3cfe38f931
Created December 11, 2014 20:34
UI za ContentProviderExample
public void onClickAddName(View view){
//Dodaj novi studentski rekord
ContentValues values = new ContentValues();
values.put(StudentProvider.NAME,
((EditText)findViewById(R.id.txtName)).getText().toString());
values.put(StudentProvider.GRADE,
((EditText)findViewById(R.id.txtGrade)).getText().toString());
@azec-pdx
azec-pdx / getLocation
Created December 18, 2014 18:05
Dohvacanje lokacije GPS primjer
public Location getLocation() {
try {
locationManager = (LocationManager) mContext
.getSystemService(LOCATION_SERVICE);
// getting GPS status
isGPSEnabled = locationManager
.isProviderEnabled(LocationManager.GPS_PROVIDER);
// getting network status