Skip to content

Instantly share code, notes, and snippets.

View TaylanUB's full-sized avatar

Taylan Kammer TaylanUB

  • Germany
View GitHub Profile
package de.cobi.wms.json;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.internal.$Gson$Types;
import com.google.gson.internal.ConstructorConstructor;
import com.google.gson.internal.Excluder;
import com.google.gson.internal.ObjectConstructor;
public static void hideKeyboard(Activity activity) {
InputMethodManager imm = getIMM(activity);
IBinder windowToken = activity.getWindow().getDecorView().getRootView().getWindowToken();
imm.hideSoftInputFromWindow(windowToken, 0);
}
<includeonly><!--
-->{{#if: {{{last|}}} <!--
If lastname given:
-->|{{{last}}}, {{{first| {{error|First name missing}} }}}{{#if: {{{date|}}} |&nbsp;({{{date}}})}}.&nbsp;<!--
Else if author given:
-->|{{#if: {{{author|}}} <!--
-->|{{{author}}}{{#if: {{{date|}}} |&nbsp;({{{date}}})}}.&nbsp;<!--
-->}}<!--
-->}}<!--
// Test.java:
class Test<LineT extends Line> {
private LineT line;
private void test() {
Serial serial = new Serial();
line.serials.add(serial); // warning: unchceked call to add(E) ...
}
}
NestedScrollView nestedScrollView = new NestedScrollView(this){
@Override
public void onStopNestedScroll(View target) {
super.onStopNestedScroll(target);
}
};
Apr 05 17:00:01 raspberrypi CRON[3338]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 05 17:00:01 raspberrypi CRON[3342]: (root) CMD (shutdown -h now)
Apr 05 17:00:01 raspberrypi CRON[3338]: (CRON) info (No MTA installed, discarding output)
Apr 05 17:00:01 raspberrypi CRON[3338]: pam_unix(cron:session): session closed for user root
public static AsyncHandle<List<Item>> getMTPNItems(
SQL.ResultHandler<List<Item>> resultHandler,
SQL.ExceptionHandler exceptionHandler
) {
return query(
"select * from cwms_mtpnItems",
null,
resultSet -> makeObjectList(resultSet, DB::makeItem),
resultHandler,
exceptionHandler
select r.DocEntry as rdrDocId,
r1.LineNum as rdrLineId
into #orderLines
from rdr1 r1
join ordr r on r.DocEntry = r1.DocEntry
where r1.LineStatus = 'O' and r.DocStatus = 'O'
select U_KommNr as pklDocId,
max(cast(U_Space as int)) as maxPlace
into #picklistDetails
select r.DocEntry as rdrDocId,
r1.LineNum as rdrLineId
into #orderLines
from rdr1 r1
join ordr r on r.DocEntry = r1.DocEntry
-- If I filter only by LineStatus or only by DocStatus here, query takes <1s
where r1.LineStatus = 'O' and r.DocStatus = 'O'
select U_KommNr as pklDocId,
max(cast(U_Space as int)) as maxPlace
-- The query takes about 5s
-- In comments I explain a few changes that can bring it down to <1s
with
orderLines as (
select r.DocEntry as rdrDocId,
r1.LineNum as rdrLineId
from rdr1 r1
join ordr r on r.DocEntry = r1.DocEntry
-- If I filter only by LineStatus or only by DocStatus here, query takes <1s
where r1.LineStatus = 'O' and r.DocStatus = 'O'