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
shell = new GroovyShell() | |
shell.metaClass.invokeMethod = {String name, args -> | |
def metaMethod = delegate.metaClass.getMetaMethod(name, args) | |
def result | |
switch (name) { | |
case 'parse': | |
result = metaMethod.invoke(delegate, args) | |
def oldRun = result.metaClass.getMetaMethod('run') | |
result.metaClass.run = { -> | |
def result2 |
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 myPack; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.FileInputStream; | |
import java.util.HashMap; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.ss.usermodel.*; |
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.samples; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayOutputStream; | |
import java.io.FileOutputStream; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
import java.util.ArrayList; |
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.samples; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import com.thoughtworks.xstream.*; | |
import com.thoughtworks.xstream.io.xml.DomDriver; |
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.samples; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import com.thoughtworks.xstream.*; | |
import com.thoughtworks.xstream.io.xml.DomDriver; |
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 myPack; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.FileInputStream; | |
import java.math.BigDecimal; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Set; |
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
for (Integer id: tmpHM.keySet()) { | |
TypePos typePos = tmpHM.get(id); | |
hm.put(id, | |
checkCell( | |
shtB.getRow(typePos.getPosX() - 1).getCell(typePos.getPosY() - 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
private static void resizeTable() { | |
//mainTable.getColumnModel().getColumn(0).setPreferredWidth(15); // здесь ошибка | |
for (int i = 0; i < mainTable.getColumnModel().getColumnCount(); i++) { | |
mainTable.getColumnModel().getColumn(i).setPreferredWidth(15); // а здесь ее нет | |
System.out.println(i); | |
System.out.println(mainTable.getColumnModel().getColumnCount()); | |
} | |
} |
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
void MakeCmdX(); | |
void MakeCmdP(uint16_t code); | |
uint16_t code; | |
char cmd = 0; | |
uint8_t c = 0; | |
/* Команды | |
x - Стоп | |
p - Установить NMR Period, 2 байта данных |
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
/*---------------------------------------------------------------------------- | |
Программа, которая измеряет напряжение и по DMA помещает данные в массив | |
АЦП запускается от таймера Т2 с частотой 1кГц. Размер массива -2000 слов. | |
Сначала генерируется прерывание обработчика первого полумассива, затем второго. | |
*---------------------------------------------------------------------------*/ | |
#include <stm32f10x_adc.h> | |
#include <stm32f10x_dma.h> |
OlderNewer