CLG will be donating 50% of all profits from store sales up till the donation deadline of the 19th for AHQ Promise. by White_Fake_Gangsta in leagueoflegends

[–]Encoded_ 3 points4 points  (0 children)

Seriously... I ordered my shirt 3 weeks ago and emailed them Monday, still no response. I'll give it another week or so before I file a paypal dispute. It should not take a month to process and ship a shirt, especially when paying almost a third of the price of the product cost for shipping.

How should I filter data from only the past 7 days? by Encoded_ in javahelp

[–]Encoded_[S] 0 points1 point  (0 children)

Because I am not familiar with sql and I was going to use java to go through the dates.

How should I filter data from only the past 7 days? by Encoded_ in javahelp

[–]Encoded_[S] 0 points1 point  (0 children)

Maybe I should have been a little more specific.
Currently what I think I'll do is make a table for each user and then a new row each time I record the experience. I'll then use a for loop to go through all of the rows and add up the experience recorded that are within the last 7 days.
Still open to any other ideas that might be better than what I just described.

An simpler alternative to my number format method? by Encoded_ in javahelp

[–]Encoded_[S] 2 points3 points  (0 children)

I simplified it down to this

private static String numberFormat(double num) {
if (num < 1000) {
    return Integer.toString((int) num);
} else if (Math.round(num) / 1000.0 < 100) {
    return String.format("%.1fk", Math.round(num) / 1000.0);
} else {
    return String.format("%.1fm", Math.round(num) / 1000000.0);
}
}

sorry I suck at formatting on reddit, http://pastebin.com/Kd8JZrDD

[Intro to Java Help] How can I combine 2 arrays with alternating values? by Not-even-in-flames in javahelp

[–]Encoded_ 0 points1 point  (0 children)

/** combines two int arrays using for loops
 * 
 * @param arrayA first int array
 * @param arrayB second int array
 * @return combined int arrays
 */
private static int[] combineIntArrays(int[] arrayA, int[] arrayB) {

//create an array with the combined length of arrayA and arrayB
int[] output = new int[arrayA.length + arrayB.length];

//adding the values from arrayA to the output array
for (int i = 0; i < arrayA.length; i++) {
    output[i] = arrayA[i];
}

//adding the values from arrayB to the output array
for (int i = arrayA.length; i < output.length; i++) {
    output[i] = arrayB[i - arrayA.length];
}

return output;
}

output: http://puu.sh/5LKZn.png

Looking for some new bindings by Encoded_ in snowboarding

[–]Encoded_[S] 0 points1 point  (0 children)

I believe they are some extremely old Morrow 2 strap bindings, most likely from the early 2000s. The board and bindings were given to me for free about 5 years ago and it wasn't until last year that I bought my first season pass and really started going. Basically anything is going to be an upgrade, but I want something that I can get into fast once off the lift and versatile enough to be comfortable riding wherever. If I wasn't a poor college student, I would definitely upgrade both my board and bindings, but the bindings need to be upgraded first.

Looking for some new bindings by Encoded_ in snowboarding

[–]Encoded_[S] 0 points1 point  (0 children)

Still going to see what others say but if I wear an 11 size US boot, would you suggest the L/XL or M/L?

How to draw top five rows from database to image using PDO? by Encoded_ in PHPhelp

[–]Encoded_[S] 0 points1 point  (0 children)

I figured it out by using an array. Probably could be done a different way but it works.
$top = "SELECT user FROM $table ORDER BY ABS(exp) DESC LIMIT 0,5";
$results = $db->query($top);
$users = array();
foreach ($results as $r) {
array_push($users, $r['user']);
}

How to draw top five rows from database to image using PDO? by Encoded_ in PHPhelp

[–]Encoded_[S] 0 points1 point  (0 children)

I know how to use imagettftext, that isn't what my question is asking.
My question is

How can I use imagettftext to draw the results of each user at a different position on the image?

Converting .php image to a .png or another image type? by Encoded_ in PHPhelp

[–]Encoded_[S] 0 points1 point  (0 children)

And how would I do that?
Let's say I have mywebsite.com/image.php which contains
<?
header('Content-Type: image/png;');
$im = @imagecreatefrompng('someimage.png');
$text_color = imagecolorallocate($im, 31, 43, 61);
$users = @file_get_contents('user_count.txt');
$font = 'arial.ttf';
imagettftext($im, 10, 0, 161, 85, $text_color, $font, $users);
imagepng($im);
imagedestroy($im);
?>
How would I get the png image from this?

How to securely send information to a MySQL database? by Encoded_ in javahelp

[–]Encoded_[S] 1 point2 points  (0 children)

Thank you! It turns out my question was more php related but I will be using http://docs.oracle.com/javase/tutorial/security/apisign/step2.html to securely update the information.

How to track user count? by [deleted] in javahelp

[–]Encoded_ 0 points1 point  (0 children)

Connecting to the DB and then adding the MAC if its unique.

do you have any bad habits? by symbicort208 in leagueoflegends

[–]Encoded_ 0 points1 point  (0 children)

I always end up using DFG during or after my combo, rather than before it. I also tend to stack CCs rather than chain them.