text stringlengths 14 410k | label int32 0 9 |
|---|---|
@Override
public String toString() {
return "ID non reconnu";
} | 0 |
static public RecipeIngredient makeRecipeIngredient(String input) throws NotConfiguredException, DataStoreException, ConnectionException {
LOGGER.trace("called: makeRecipeIngredient( \"" + input + "\" )");
if(input == null){
LOGGER.warn("input was null, returning null");
return n... | 4 |
private void setOutline(int outline[][]) {
int cx = 0, cy = 0;
for (int i = 0; i < outline.length; i++) {
cx += outline[i][0];
cy += outline[i][1];
}
cx = cx / outline.length;
cy = cy / outline.length;
m_outline = new Path2D.Float();
int maxr = 0;
for (int i = 0; i < outline.length; i++) {
i... | 4 |
public void tick()
{
if (game != null)
game.tick();
if (menu != null)
menu.tick(input, this);
} | 2 |
@Override
public void onDisable() {
Iterator<Injectable> it = injected.iterator();
while (it.hasNext()) {
Injectable i = it.next();
if (i instanceof InjectablePlugin) {
Bukkit.getPluginManager().disablePlugin((InjectablePlugin) i);
}
... | 4 |
public void setPicAddress(String r, String s)
{
boolean ifTen=false;
char rankLetter=r.charAt(0);
try{
if(r.charAt(1)=='0')
{
ifTen=true;
}}
catch(StringIndexOutOfBoundsException e)
{
ifTen=false;
}
char suitLetter=s.charAt(0);
boolean faceCard=false;
String ifFaceCard="";
suitLetter... | 8 |
private Calendar getStartOfDate(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILL... | 0 |
public void setNovCodigoConcepto(String novCodigoConcepto) {
this.novCodigoConcepto = novCodigoConcepto;
} | 0 |
private void initConfig() {
if (VERBAL)
System.out.println("Initializing Rubik's Cube configuration");
/**
* Face avant : rouge
* Face gauche : bleue
* Face droite : verte
* Face basse : blanche
* Face haute : jaune
* Face arrière : orange
*/
config = new ArrayList<Cubie>();... | 8 |
public static void main(String[] args) {
Method[] methods=BeansJavaConfig.class.getDeclaredMethods();
for (Method method : methods) {
Annotation[][] annotations=method.getParameterAnnotations();
if(annotations==null) continue;
for (Annotation[] annotation : annotatio... | 6 |
public void run() {
if (isAlive) {
System.out.println(name + " running");
CCTimer.start();
Controller2.start();
// Controller.start();
hunger = new stats.Hunger();
health = new stats.Health();
social = new stats.Social();
}
} | 1 |
private void jBRechercheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRechercheActionPerformed
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
} catch (ClassNotFoundException ex) {
JOptionPane jOErreur = new JOptionPane("Driver non trou... | 8 |
public void initBarComponents()
{
//read data from database
curClient = init.getCurClient();
curBar = init.getCurBar();
multiplication = 1;
paymentPanel.setLayout(new MigLayout("wrap 1, insets 0"));
orderButtonPanel.setLayout(new MigLayout("wrap 1, insets 0"));
keyPadPanel.setLayout(new MigLayout("wrap ... | 5 |
public static boolean runDoctorNurseScenario(Scanner input, int login_id){
int choice = 0;
id = login_id;
System.out.println("Please select an option:");
System.out.println("1. Find student medical records");
System.out.println("2. Add notes to existing appointment");
System.out.println("3. Create consulati... | 8 |
public static String trimAllWhitespace(String str) {
if (!hasLength(str)) {
return str;
}
StringBuilder sb = new StringBuilder(str);
int index = 0;
while (sb.length() > index) {
if (Character.isWhitespace(sb.charAt(index))) {
sb.deleteCharAt(index);
}... | 3 |
protected int createProgram() throws LWJGLException {
int program = GL20.glCreateProgram();
if (program == 0)
throw new LWJGLException("could not create program; check ShaderProgram.isSupported()");
return program;
} | 1 |
public static void main(String[] args)
{
if (args.length < 9)
{
System.out
.println("usage: "
+ MainRep.class.getCanonicalName()
+ " time(sec) nthreads nkeys put(%) del(%) get(%) nauthors nkeywords nfindlist");
System.exit(1);
}
int time = Integer.parseInt(args[0]);
int nthreads... | 7 |
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (TagType.ROOT.equals(qName)) {
for (int i = 0; i < attributes.getLength(); i++) {
if (BIND_ATTR_NAME.equalsIgnoreCase(attributes.getQName(i))) {
... | 9 |
public SlenHud(Coord c, Widget parent) {
super(new Coord((MainFrame.innerSize.width - sz.x) / 2,
MainFrame.innerSize.height - sz.y), sz, parent);
ui.slenhud = this;
if (Config.new_chat)
new ChatHWPanel(new Coord(0, MainFrame.getInnerSize().y - 300),
... | 5 |
public ReturnObject head() {
ReturnObjectImpl output = new ReturnObjectImpl();
if (size() == 0) {
output.value = ErrorMessage.EMPTY_STRUCTURE;
} else {
output.value = get(0).getReturnValue();
}
return output;
} | 1 |
public DegradeDialog(final Panel panel, final boolean isColor) {
setBounds(1, 1, 270, 190);
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width / 3 - getWidth() / 3, size.height / 3
- getHeight() / 3);
this.setResizable(false);
setLayout(null);
JPanel pan... | 6 |
public void checkConsistent() {
super.checkConsistent();
StructuredBlock sb = outer;
while (sb != continuesBlock) {
if (sb == null)
throw new RuntimeException("Inconsistency");
sb = sb.outer;
}
} | 2 |
public int read() throws IOException {
if (isEndOfStream)
return -1;
if (numBitsRemaining == 0) {
nextBits = input.read(); // read one byte, but return an int.
if (nextBits == -1) {
isEndOfStream = true;
return -1;
}
numBitsRemaining = 8;
}
numBitsRemaining--;
return (nextBits >>> numB... | 3 |
public ArrayList<String> getTechnicalTitles() {
return technicalTitles;
} | 0 |
public void setBlock(State state) {
myBlock = state;
} | 0 |
public SimpleDoubleProperty wrapWidthProperty() {
return wrapWidth;
} | 0 |
public void addAreaObject(SVGOMPathElement graphic) throws XPathExpressionException, DOMException {
String osmNamespace = xpath.getNamespaceContext().getNamespaceURI("osm");
SVGOMTextElement text = (SVGOMTextElement) xpath.evaluate("//svg:g[@id='map']/svg:text[@osm:id='"+graphic.getAttributeNS(osmNamespace, "id")+"... | 3 |
@Override
public int compareTo(PossibleSol obj)
{
if (this.value > obj.value)
{
return -1;
}
else if (this.value < obj.value)
{
return 1;
}
if (this.area > obj.area)
{
return 1;
}
else if (this.area < obj.area)
{
return -1;
}
return 0;
} | 4 |
public void handlePropertyValue(Tag propertyValue)
{
try
{
if (currentPropertyHashCode == NO_PROPERTY_HASH_CODE)
{
//don't do anything...
}
else if (currentPropertyHashCode == LibraryProperty.MAJOR_VERSION_HASH_CODE)
{
//example property: <key>Major Version</key><integer>1</integer>
... | 9 |
private void makeMaps() {
final boolean[] inUse = this.data.inUse;
final byte[] seqToUnseq = this.data.seqToUnseq;
int nInUseShadow = 0;
for (int i = 0; i < 256; i++) {
if (inUse[i])
seqToUnseq[nInUseShadow++] = (byte) i;
}
this.nInUse = nIn... | 2 |
private boolean checkVertical(int j, int i, ConnectFourPiece[][] m_Pieces) {
boolean gameWon = false;
int secondPieceUp = i+1;
int thirdPieceUp = i+2;
int fourthPieceUp = i+3;
if (i<COLUMN_FIVE && m_Pieces[j][i].getPieceColour() ==
m_Pieces[j][secondPieceUp].getPieceColour()) {
if (i<COLUMN_FIVE && m... | 8 |
private static void executeCommand(PApplet p, String s[]) {
if(s[0].equals("Fill")) {
Integer c1 = new Integer(s[1]);
Integer c2 = new Integer(s[2]);
Integer c3 = new Integer(s[3]);
p.fill(c1, c2, c3);
} else if(s[0].equals("Translate")) {
Integer c1 = new Integer(s[1]);
Integer c2 = new Integer(s... | 9 |
public Rectangle getCardArea() {
return cardArea; //You may need to change this
} | 0 |
int[] getMaxCardOrder(boolean[][] bAdjacencyMatrix) {
int nNodes = bAdjacencyMatrix.length;
int[] order = new int[nNodes];
if (nNodes==0) {return order;}
boolean[] bDone = new boolean[nNodes];
// start with node 0
order[0] = 0;
bDone[0] = true;
// order remaining nodes
for (int iNode = 1; iNode < nNod... | 8 |
public Feature [] getMultiHorizons(Map<Point, Set<Integer>> geoTags, int srdsSrcID){
// the returned features object:
ArrayList<Feature> features = new ArrayList<Feature>();
// ResultSet objects:
ResultSet resultSet;
// array of points:
Point [] points ... | 9 |
protected void onDeop(String channel, String sourceNick, String sourceLogin, String sourceHostname, String recipient) {} | 0 |
public static Singleton getInstance()
{
if(instance == null)
{
instance = new Singleton();
}
return instance;
} | 1 |
@Override
public void setNote(String text) {
note.setText(text);
} | 0 |
public void compileAllClasses() {
try {
String[] directories = getSubdirectories();
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager fileManager = compiler
.getStandardFileManager(null, null, null);
for (final String d : directories) {
File sourceFile = new Fi... | 8 |
private boolean fight(Command command)
{
if(!command.hasSecondWord()) {
// if there is no second word, we can't fight
System.out.println("Fight what?");
return false;
}
// Check if the character is in the room
if(player.getRoom().isInRoom(command.g... | 5 |
public void visit_f2d(final Instruction inst) {
stackHeight -= 1;
if (stackHeight < minStackHeight) {
minStackHeight = stackHeight;
}
stackHeight += 2;
} | 1 |
private final void testStatus(String s) {
if (s.indexOf("/Bilderx/arbeiten.jpg") != -1) {
User.setStatus(User.Status.work);
Output.printTabLn("Du bist gerade am Arbeiten", 2);
} else if (s.indexOf("/Bilderx/train.jpg") != -1) {
User.setStatus(User.Status.training);
Output.printTabLn("Du bist gerade am T... | 3 |
@Override
public void setErrorMessage(String message) {
this.errormessage = message;
} | 0 |
public boolean LoadData(String fileName) throws FileNotFoundException {
Scanner dataScanner = new Scanner(new File(fileName));
int numInputs = dataScanner.nextInt();
numHidden = dataScanner.nextInt();
int numTargets = dataScanner.nextInt();
int numRows = dataScanner.nextInt();
... | 4 |
public static Node<Integer> add_HeadOnesDigitData(Node<Integer> num1, Node<Integer> num2) {
Node<Integer> p1 = num1;
Node<Integer> p2 = num2;
Node<Integer> resHead = new Node<Integer>(null);
Node<Integer> currRes = resHead;
int carry = 0;
while (p1 != null && p2 != null)... | 6 |
public static void println(String s, int level)
{
if(level <= debugLevel)
if(printToStd)
System.out.println("[DEBUG " + level + "] " + s);
else
System.err.println("[DEBUG " + level + "] " + s);
} | 2 |
public boolean getBoolean(int index) throws JSONException {
Object object = this.get(index);
if (object.equals(Boolean.FALSE)
|| (object instanceof String && ((String) object)
.equalsIgnoreCase("false"))) {
return false;
} else if (object.equal... | 6 |
public String execute() {
Map<String, Object> session = ActionContext.getContext().getSession();
User user = (User) session.get("USER");
String actionResult = "";
reportBusinesService = new ReportBusinesService();
list = reportBusinesService.createStoppage(user, startDate, end... | 7 |
public void prepare(String stmt){
try {
ps = con.prepareStatement(stmt);
} catch (SQLException e){
if( debug ) {
System.out.println("Error in DBComm.prepare(): "+e.getMessage());
System.out.println(" |-->"+stmt);
}
}
} | 2 |
public boolean deleteShow(String name){
for (Show show : shows) {
if(show.getName().equals(name)){
shows.remove(show);
return true;
}
}
System.err.println("Could not remove show, name does not exist.");
return false;
} | 2 |
public void checkCollisions() {
// check collision and call a something
// or make an Event derived class to do so
// TODO: how to define own events?
// collisionCallback();
if(action == null)
return;
//test
if(snakeHead.collidesWith(rat))
... | 8 |
private Node<K,V> ceiling( V value ) {
if( value == null ) {
return null;
}
Node<K,V> node = mRoot;
Node<K,V> ret = null;
if( mValueComparator != null ) {
Comparator<? super V> comp = mValueComparator;
while( node != null ) {
... | 9 |
public void paintComponent(Graphics g) {
switch(status) {
case 1:
paintBackgroundAndStuff(g);
break;
case 2:
paintBackgroundAndStuff(g);
g.setColor(Color.WHITE);
g.setFont(new Font(Font.MONOSPACED, Font.BOLD, 24));
g.drawString("(click to continue)", 300, 400);
break;
case 3:
... | 6 |
public void setXWidth(double width)
{
this.width=width;
} | 0 |
static private boolean jj_3R_17() {
if (jj_scan_token(NEW)) return true;
if (jj_scan_token(INTEGER)) return true;
if (jj_scan_token(LSQPAREN)) return true;
if (jj_3R_25()) return true;
if (jj_scan_token(RSQPAREN)) return true;
return false;
} | 5 |
private NouveauMessage(Personne personne, boolean isRepondre, final String dest, final String obj, String cont) {
user = personne;
frmMessage = new JFrame();
frmMessage.setVisible(true);
frmMessage.getContentPane().setForeground(new Color(0, 0, 0));
frmMessage.g... | 9 |
public void pipelineFlush() {
((PipelinedFetchDecodeStage) fetchDecodeStage).setPipelineFlush(true); //Allows for differentiation between reset and flush
fetchDecodeThread.interrupt();
getIR().clear(0); //Clear index 0 of IR registers used by f/d stage (WB stage may be using third IR index).
while (fetchDecodeT... | 1 |
private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jList1ValueChanged
// TODO add your handling code here:
try{
switch (jList1.getSelectedIndex()){
case 0: OpenFile(1);break; //loading a primary video
... | 4 |
boolean existInDictionary( String word, Dictionary dictionary, SpellCheckerOptions options, boolean isFirstWordInSentence ) {
boolean exist = dictionary.exist( word );
if( !exist && !options.isCaseSensitive() ) {
exist = dictionary.exist( Utils.getInvertedCapitalizion( word ) );
} el... | 6 |
public void run()
{
try
{
while (polling)
{
Thread.sleep(10000);
log.info("Request Status.....");
sendMessage(MessageProtocols.STATUS_REQUEST);
}
}
catch (Exception e1)
{
log.error("[" + name + "] Group Owner Listener failure.", e1);
}
} | 2 |
public NodoArbolBinAVL<T> eliminar( T aEliminar )
{
if(izquierda==null&&derecha==null)
return null;
if(elemento.compareTo(aEliminar)==0){
if(izquierda==null)
return derecha;
if(derecha==null)
return izquierda;
NodoArbolBinAVL<T> x=derecha.darMenor();
derecha=derecha.eliminar(aEliminar);
... | 9 |
static boolean findTab(HuffmanNode tmp, int len, long bits)
{
if(tmp == null)
{
System.out.println("Huffman init error: no huff node");
return false;
}
if(tmp.zero != null)
{
if(tmp.one == null)
{
System.out.println("Huffman init error: no one in node");
return false;
}
if(len >= 32... | 6 |
public Usuario selectGerente(String Nome, String Tipo) throws SQLException {
Connection conexao = null;
PreparedStatement comando = null;
ResultSet resultado = null;
Usuario user = null;
try {
conexao = BancoDadosUtil.getConnection();
comando = conexao.... | 7 |
public final void setDiscount(double discount){
if(discount > maxDiscount|| discount < minDiscount){
throw new IllegalArgumentException();
}
this.discount = discount;
} | 2 |
public String minWindow(String S, String T) {
// Start typing your Java solution below
// DO NOT write main() function
String res = "";
char[] tMap = new char[256];
char[] sMap = new char[256];
for (int i = 0; i < T.length(); i++)
tMap[T.charAt(i)]++;
int start = 0;
int count = 0;
int min = Integer... | 9 |
public T2 getFoo2()
{
return foo2;
} | 0 |
@Test(expected = ParkException.class)
public void out_by_right_ticket_twice_when_in_a_car() {
Park park = new Park(10);
Car car = new Car();
Ticket ticket = park.in(car);
Assert.assertSame(car, park.out(ticket));
park.out(ticket);
} | 0 |
public String nextToken() throws JSONException {
char c;
char q;
StringBuffer sb = new StringBuffer();
do {
c = next();
} while (Character.isWhitespace(c));
if (c == '"' || c == '\'') {
q = c;
for (;;) {
c = next();
... | 9 |
@Override
public void update() {
if (!GameServer.users.isEmpty()) {
double dist = Math.sqrt(Math.pow(targetX - x - 30, 2) + Math.pow(targetY - y - 30, 2));
if (dist < startAttackDistance) {
GameServer.sendToAll(this.toString() + " ATTACK");
attack = t... | 5 |
private void validateField() throws Exception {
if (txtNumber.getText().equals("")) {
throw new Exception("Please enter Employee Number");
}
KeyValue department = (KeyValue) cmbFromDepartment.getSelectedItem();
if (department.getValue().equals("")) {
throw new Ex... | 7 |
public CarBuilder setBrakes(int brakes) {
delegate.setBrakes(brakes);
return this;
} | 0 |
public void visitTableSwitchInsn(final int min, final int max,
final Label dflt, final Label[] labels) {
mv.visitTableSwitchInsn(min, max, dflt, labels);
if (constructor) {
popValue();
addBranches(dflt, labels);
}
} | 1 |
public String nextToken() throws JSONException {
char c;
char q;
StringBuffer sb = new StringBuffer();
do {
c = next();
} while (Character.isWhitespace(c));
if (c == '"' || c == '\'') {
q = c;
for (;;) {
c = next();
... | 9 |
protected void generateMetaLevel(Instances newData, Random random)
throws Exception {
m_MetaFormat = metaFormat(newData);
Instances [] metaData = new Instances[m_Classifiers.length];
for (int i = 0; i < m_Classifiers.length; i++) {
metaData[i] = metaFormat(newData);
}
for (int j = 0; j <... | 7 |
private static void merge(int[] array, int start, int mid, int end) {
int[] auxArr = new int[end-start+1];
int auxIdx = 0;
int i = start;
int j = mid+1;
for(; i<=mid&&j<=end; ) {
if(array[i]<array[j]) {
auxArr[auxIdx++] = array[i++];
} else {
auxArr[auxIdx++] = array[j++];
}
}
while(i<... | 6 |
public Server() throws IOException
{
// ======== INITIALIZATION ======== //
try {
if( Settings.OS == Settings.OS_ENUM.WINDOWS )
Settings.loadLibrary("DLLInterface" + System.getProperty("sun.arch.data.model") + ".dll");
} catch (UnsatisfiedLinkError e) {
// If we can't find the dll then don't error
} ... | 9 |
public static void main(String[] args) {
System.out.println("Creating a context for the camera.");
createPGContext();
System.out.println("\nThere are " + getNumCameras() + " camera(s) connected to the system");
System.out.println("Connecting to the default camera.");
connectCamera();
System.out.println("Co... | 6 |
public boolean select(int x, int y){
if (isSelected())
if(this.getSelected()== map[x][y].getSoldat()){
this.selected = null;
return false;
}else
actOn(x, y);
if (map[x][y].estLibre())
return(false);
els... | 5 |
public int[] twoSum(int[] numbers, int target) {
int length = numbers.length;
int[] result = new int[2];
for (int i = 0; i < length - 1; i++) {
for (int j = i + 1; j < length; j++) {
if (numbers[i] + numbers[j] == target) {
result[0] = i + 1;
... | 3 |
public void createMap() throws Exception {
File osmarenderedFile = invokeOsmarenderXsltProc();
Map map = new Map();
map.load("file:" + osmarenderedFile.getAbsolutePath());
osmarenderedFile.delete();
NodeList pointNodes = map
.getNodes("//svg:g[@id='map']/svg:circle[@osm:id=../svg:text/@osm:id]");
Syst... | 8 |
public static String getName(Neuron n){
switch(getType(n)){
case 1: return "Input Neuron :: ";
case 2: return "Output Neuron :: ";
case 4: return "DTC :: ";
case 5: return "PitChecker :: ";
case 6: return "HorizontalChecker :: ";
case 7: re... | 6 |
public void run() {
byte [] buff = new byte[1024];
try {
while ( inputStream.read(buff) > 0 ) {
String t = new String(buff);
String [] tokens = t.split("\n");
for ( String s : tokens ) {
//e... | 5 |
public static Vector AssignOneClass(char cNum, Vector unAssigned,
Integer tIndex) {
Vector a27Class = new Vector();
System.out.println("Assigning 27 of: " + cNum);
int i = 0;
int count = 0;
while (count < 27 && i < unAssigned.size()) {
System.out.println("i " + i + "\tcount: " + count);
if (((String)... | 4 |
public static void main(String[] args) {
try{
Calendar calendar = Calendar.getInstance();
boolean trace_flag = true; // mean trace GridSim events
int num_user = 3;
int num_resource = 2;
int num_gridlet = 3;
// First step: Initialize the GridSim package. It should be called
... | 5 |
@Override
public void combine(final int[] rows, final int[] columns) {
if (isOutOfBounds(rows, columns)) {
return;
}
final int rowSpan = rows.length;
final int columnSpan = columns.length;
final int startRow = rows[0];
final int startColumn = columns[0];
for (int i = 0; i < rowSpan; i++) {
for (in... | 7 |
@SuppressWarnings("RedundantIfStatement")
@Override public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SvnLogFileContent that = (SvnLogFileContent) o;
if (!charset.equals(that.charset)) return false;
if (!filePath.equals(that.filePath)) ... | 8 |
public XInstCall(int line, String[] kws, int unpackList, int unpackMap, int params) {
super(line, kws==null || kws.length==0?unpackList==-1?unpackMap==-1?XOpcode.CALL:XOpcode.CALL_MAP:unpackMap==-1?XOpcode.CALL_LIST:XOpcode.CALL_LIST_MAP:unpackList==-1?unpackMap==-1?XOpcode.CALL_KW:XOpcode.CALL_MAP_KW:unpackMap==-1?X... | 8 |
public Periods readPeriods(JsonReader reader) throws IOException {
String currency = null;
String id = null;
String name = null;
Number pricekWh = null;
reader.beginObject();
while (reader.hasNext()) {
String key = reader.nextName();
if (key.equals("currency")) {
... | 5 |
private void switchMap() {
if (mode == 1) {
mode = 0;
} else {
mode = 1;
}
} | 1 |
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
stack.pop();
if("姓名".equals(qName))
{
System.out.println(qName + ":" + name);
}
if("性别".equals(qName))
{
System.out.println(qName + ":" + sex);
}
if("年龄".equals(qName))
{
System.out.println(q... | 3 |
public void mousePressed() {
if (isMouseOver() && mySketch.mouseButton == PApplet.LEFT) {
changeLabel();
clickedClusterId = mouseOverClusterId;
if (mouseOverClusterId != -1) {
MainTutorQeA.SKETCH_BOTTOM
.updateQuestionsByCluster(mouseOverClusterId);
}
}
} | 3 |
public void lisaaTiedote(Tiedote tiedote) throws DAOPoikkeus {
// Avataan ensin tietokantayhteys
Connection yhteys = avaaYhteys();
try {
// Suoritetaan haku
String sql = "INSERT INTO Tiedotteet(pvm, otsikko, tiedote) values(NOW(), ?, ?)";
// Alustetaan sql-lause
PreparedStatement lause = yhteys.prepare... | 1 |
* @param contentType the content type
* @return this
*/
public Request withContent(String content, String contentType) {
try {
StringEntity stringEntity = new StringEntity(content);
if (contentType != null) {
stringEntity.setContentType(contentType);
... | 2 |
public void writeBigInteger(BigInteger v)
throws IOException {
if (trace == API_TRACE_DETAILED) {
Log.current.println("writeBigInteger = " + v);
}
// If the absolute value of the BigInteger is less than 2^31, it can to be
// transmitted as a CFASL Fixnum. Why do we use v.a... | 4 |
public void renderTo(Rendering rendering) {
// First, we need to determine what the 'perp' angle should be (as in,
// perpendicular to the line of the beam, as perceived by the viewer.)
perp.setTo(line.setTo(target).sub(origin)) ;
line.normalise() ;
rendering.port.viewMatrix(perp) ;
perp.... | 6 |
public static String genericRawOutput(String region, String service, String operation, Object[] args)
{
LoLRTMPSClient client;
try
{
client = LoadBalancer.returnClient(region);
}
catch (NullClientForRegionException e1)
{
return "Connection to " + e1.getRegion() + " failed. This may be because that ... | 2 |
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof SparseMatrix)) {
return false;
}
SparseMatrix other = (SparseMatrix) obj;
if (wordid1 == null) {
if (other.wordid1 != null) {
return false;
}
} el... | 9 |
public boolean store(int user,int isbn) throws IOException {
int flag=0;
for(int i=0;i<3;i++)
{
if(new User().checkUserId(user))
{
flag=1;
break;
}
}
if(flag==0) {System.out.println("Invalid User ID");
... | 6 |
private static String keyToEnglish(String key2) {
String pieces[] = key2.split("\\+"); //$NON-NLS-1$
if (pieces.length == 0) {
return null;
}
int mods = 0;
if (pieces.length > 1) {
if (pieces[0].contains("C")) { //$NON-NLS-1$
mods |= InputEvent.CTRL_DOWN_MASK;
}
if (p... | 8 |
public boolean is_free(int x, int y) {
if (needStart) {
return true;
}
if (pos_x == x && pos_y == y) {
return false;
}
updatePosition();
if (pos_x == x && pos_y == y) {
downdatePosition();
return false;
}
downdatePosition();
return true;
} | 5 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.