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 pt.isel.pdm.jht.tryviewmodel | |
import android.content.Intent | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.Observer | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.ViewModelProviders |
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
private val isInBatchMode : ThreadLocal<Boolean> = | |
object : ThreadLocal<Boolean>() { | |
override fun initialValue(): Boolean { | |
return false | |
} | |
} | |
override fun bulkInsert(uri: Uri, values: Array<out ContentValues>?): Int { | |
var successful = false | |
var db = dbHelper!!.writableDatabase |
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
// place in src/main/kotlin | |
fun main(args: Array<String>) { | |
println("Hello, ISEL!") | |
} |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public static class Enumerating | |
{ | |
class Student | |
{ | |
public int Number { get; set; } |
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
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Text; | |
using System.Net; | |
using System.IO; | |
class TPLIntro { | |
static void Main() { |
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
import java.net.*; | |
import java.nio.*; | |
import java.nio.channels.*; | |
import java.util.concurrent.*; | |
public final class EchoServer_Serial | |
{ | |
private static int sessionCount = 0; | |
public static void main(String[] args) throws Exception |
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
using System; | |
using System.Net.Sockets; | |
using System.Threading; | |
using System.Text; | |
using System.Net; | |
public static class EchoServer_Serial | |
{ | |
private static int SessionCount = 0; |
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
Google Play Services e Google Store no emulador de Android | |
========= | |
À data corrente (Fevereiro de 2014), o emulador de Android não suporta devidamente a utilização dos Google Play Services. | |
Criando uma imagem com a opção Google APIs e usando-a para executar um projecto baseado na biblioteca incluída com o SDK, resulta numa mensagem de erro indicando a necessidade de actualizar os Google Play Services, em que essa actualização falha. | |
Para resolver o problema, são necessários os seguintes passos: | |
1. Criar uma dispositivo virtual com o AVD Manager. |
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
#undef UNICODE | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <stdlib.h> | |
#include <stdio.h> |
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
#undef UNICODE | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <stdlib.h> | |
#include <stdio.h> |
NewerOlder