This file contains 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.example.yourapp; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import com.example.yourapp.AuthenticationModel; | |
import retrofit.client.Header; | |
import retrofit.client.OkClient; |
This file contains 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
; Windows + Q calls Windows + 1 | |
#q:: | |
Send {LWin Down}1 | |
Sleep 200 | |
While GetKeyState("LWin","P") | |
{ | |
KeyWait, q, D T0.3 | |
If !ErrorLevel ; if you do press q | |
{ | |
Send {Blind}1 |
This file contains 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
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: cadvisor | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
This file contains 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 PracticalInfoFragment extends Fragment { | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_practical_info, container, false); | |
TextView practicalInfo = (TextView)view.findViewById(R.id.practical_info); | |
practicalInfo.setMovementMethod(LinkMovementMethod.getInstance()); | |
String infoString = _readStringFromAssets(); // Not detailed here, content can be seen in the other file below | |
_setTextViewLinks(practicalInfo, infoString); | |
return view; |
This file contains 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
ScriptC_simplex script = new ScriptC_simplex(renderScript); | |
ScriptField_Tableau tableau = new ScriptField_Tableau(renderScript, 1); | |
int rowCount = data.length; | |
int columnCount = data[0].length; | |
tableau.set_rows(0, rowCount, false); | |
tableau.set_columns(0, columnCount, false); | |
tableau.set_dual_program(0, minimize, false); | |
tableau.set_matrix(0, data, false); | |
// Copy all values at once to the allocated memory of the struct. | |
tableau.copyAll(); |
This file contains 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
typedef struct __attribute__((packed)) Tableau { | |
int rows, columns; | |
float matrix[MAX_ROWS * MAX_COLS]; | |
bool dual_program; | |
} Tableau_t; | |
Tableau_t *tableau; |
This file contains 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
Type solutionVectorType = new Type.Builder(renderScript, Element.F32(renderScript)).setX(script.get_MAX_COLS()).create(); | |
Type resultSizeType = new Type.Builder(renderScript, Element.I32(renderScript)).create(); | |
script.set_solution_vector(arrayAllocation); | |
script.set_result_size(resultSizeAllocation); | |
script.invoke_solve(); | |
float[] solutionVector = new float[script.get_MAX_COLS()]; | |
arrayAllocation.copyTo(solutionVector); | |
int[] resultSizeVector = new int[1]; | |
resultSizeAllocation.copyTo(resultSizeVector); |
This file contains 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
#pragma version(1) | |
#pragma rs java_package_name(com.egeniq.lpsolver.renderscript) | |
#pragma rs_fp_full | |
#include "simplex.rsh" |
This file contains 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
#define DEBUG true | |
#if DEBUG | |
#define LOG(msg, param) rsDebug(msg, param) | |
#else | |
#define LOG(msg, param) | |
#endif |
OlderNewer