Can't use the code tag in any capacity

0 Dol Lod · March 4, 2015
Every time I try using it, nothing comes out the way I want it to and everything is simply erased. I have looked at other posts and their code is fine so I have no idea what I am doing wrong.


Here is the only thing I can think of using SQLLite with ArrayLists. This will read a table in SQL created by SQL OpenHelper and set all the fields in the struct. The entire 

public ArrayList getAllInformation()

{

ArrayList informationArrayList= new ArrayList();

String selectQuery="SELECT * FROM informations";
SQLiteDatabase database = this.getWritableDatabase();
cursor = database.rawQuery(selectQuery, null);
for(Boolean b=cursor.moveToFirst();b;b=cursor.moveToNext())
{
Information information= new information();
for(int position=0;position

Post a Reply

Replies

Oldest  Newest  Rating
0 Pere Garau Burguera · March 5, 2015
The code tags don't work properly. There's some combination of characters (I can't find them right now) that make the whole thing mess up. 
0 Abdullah Nauman · March 4, 2015
I think its fine: 


$(window).load(function() {
$('.imglist img').each(function() {
$(this).wrap('').clone().addClass('gotcolors').css({'position': 'absolute', 'opacity' : 0 }).insertBefore(this);
this.src = grayscale(this.src);
}).animate({opacity: 1}, 500);
});

$(document).ready(function() {
$(".imglist a").hover(
function() {
$(this).find('.gotcolors').stop().animate({opacity: 1}, 200);
},
function() {
$(this).find('.gotcolors').stop().animate({opacity: 0}, 500);
}
);
});

// http://net.tutsplus.com/tutorials/javascript-ajax/how-to-transition-an-image-from-bw-to-color-with-canvas/
function grayscale(src) {
var supportsCanvas = !!document.createElement('canvas').getContext;
if (supportsCanvas) {
var canvas = document.createElement('canvas'),
context = canvas.getContext('2d'),
imageData, px, length, i = 0, gray,
img = new Image();

img.src = src;
canvas.width = img.width;
canvas.height = img.height;
context.drawImage(img, 0, 0);

imageData = context.getImageData(0, 0, canvas.width, canvas.height);
px = imageData.data;
length = px.length;

for (; i < length; i += 4) {
gray = px[i] * .3 + px[i + 1] * .59 + px[i + 2] * .11;
px[i] = px[i + 1] = px[i + 2] = gray;
}

context.putImageData(imageData, 0, 0);
return canvas.toDataURL();
} else {
return src;
}
}
0 Dol Lod · March 4, 2015
I have tried doing this on too different computers, OSX and Windows 8.1 Both times nothing gets posted so is there some method I'm not aware of? Isn't it just click the code tag, past the code into the black box and then you're done. 

public ArrayList getAllInformation()

{

ArrayList informationArrayList= new ArrayList();

String selectQuery="SELECT * FROM informations";
SQLiteDatabase database = this.getWritableDatabase();
cursor = database.rawQuery(selectQuery, null);
for(Boolean b=cursor.moveToFirst();b;b=cursor.moveToNext())
{
Information information= new information();
for(int position=0;position
0 Bucky Roberts · March 4, 2015
Seems to be working fine for me.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class Main extends Application {

    Stage window;
    Button button;

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        window = primaryStage;
        window.setTitle("Title of the Window");

        button = new Button();
        button.setText("Click me");

        StackPane layout = new StackPane();
        layout.getChildren().add(button);
        Scene scene = new Scene(layout, 300, 250);

        window.setScene(scene);
        window.show();
    }


}
  • 1

Bug Reports

107,330 followers
About

Found a bug on the site? Report it here. For all security related bugs, please send me a private message.

Links
Moderators
Bucky Roberts Administrator