This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyController.java : | |
@ManagedBean | |
public class MyController { | |
private DataModel<User> dataModel; | |
public DataModel<User> getDataModel() { | |
if(dataModel == null) { | |
List<User> users = userService.getAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.siu.android.tennisparis.json; | |
import com.google.gson.JsonElement; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
/** | |
* @author Lukasz Piliszczuk <lukasz.pili AT gmail.com> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.siu.android.tennisparis.task; | |
import android.os.AsyncTask; | |
import android.util.Log; | |
import com.siu.android.tennisparis.app.activity.TennisMapActivity; | |
import com.siu.android.tennisparis.dao.model.Tennis; | |
import com.siu.android.tennisparis.dao.model.TennisDao; | |
import com.siu.android.tennisparis.database.DatabaseHelper; | |
import com.siu.android.tennisparis.service.TennisService; | |
import com.siu.android.tennisparis.util.NetworkUtils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BanniereFragment extends Fragment { | |
private SASBannerView sasBannerView; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.banniere, container, false); | |
sasBannerView = (SASBannerView) view.findViewById(R.id.sas_banner); | |
return view; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application extends android.app.Application { | |
private static Context context; | |
public void onCreate() { | |
super.onCreate(); | |
context = getApplicationContext(); | |
} | |
public static Context getContext() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQLiteDatabase db = databaseHelper.getReadableDatabase(); | |
String[] columns = { "id", "strquote", "rating", "creation_date" }; | |
Cursor cursor = db.query("quotes", columns, null, null, null, null, | |
null); | |
cursor.moveToFirst(); | |
while (!cursor.isAfterLast()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guess the number, minor program written in Ruby by Lukasz Piliszczuk (12007707) | |
MAX_TRIES = 10 # We define the max number of tries in a constant | |
puts "Welcome to the game Guess the number, written in ruby" | |
puts "Guess the number between 0 et 100, and you have #{MAX_TRIES} tries to do that" | |
guess_number = rand(0..100) # We use the rand() function to generate a pseudo-random number between 0 and 100 (both included) | |
guess_tries = 1 # The number of tries for the user, initialized at 1 because at the beginning it will be the first try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Siu\AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
class Partner implements UserInterface, \Serializable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global define*/ | |
define([ | |
'underscore', | |
'backbone', | |
'models/client' | |
], function (_, Backbone, ClientModel) { | |
'use strict'; | |
var ClientCollection = Backbone.Collection.extend({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Module | |
public class ApiModule { | |
private User user; | |
public ApiModule(User user) { | |
this.user = user; | |
} | |
@Provides |