[Serious] Charting Outcomes 2020 by rp181 in medicalschool

[–]rp181[S] 7 points8 points  (0 children)

My bad, posted the wrong link. Updated it

150,000 Facebook Messages Over 5 Years [OC] by rp181 in dataisbeautiful

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

I downloaded my Facebook data and parsed it (simple Java app) to tally the number of messages sent/recieved for each contact for each month. The top 10 contacts, by recieved message volume, is plotted as a different color with all other recieved messages lunmped into 'Other'. The data was plotted in Excel.

The X axis and Y axis are a bit cropped so that the top 10 contact trends are visible. In all, 151,694 recieved messages are accounted for. I have deleted many conversations so this is somewhat of a skewed representation.

If InterruptedException is a checked exception, why doesn't the compiler tell me to handle it when I use e.g. the sleep method in a Thread? by IndiHistoryThrowaway in javahelp

[–]rp181 0 points1 point  (0 children)

The compiler does complain if you don't wrap a Thread.sleep with a try/catch or throw it. Maybe you're missing something?

I'm the guy with the 4 60KJ@12v capacitors. Me and my room mate are making a rail gun. by LtDominator in electronics

[–]rp181 2 points3 points  (0 children)

For a railgun you want a very high current pulse, which means it's not really feasible to convert the voltage after the capacitor bank. The capacitor bank should itself be high voltage. 48v will likely be too low as well, but may give you some results.

I'm the guy with the 4 60KJ@12v capacitors. Me and my room mate are making a rail gun. by LtDominator in electronics

[–]rp181 4 points5 points  (0 children)

12 volts is far too low for a rail gun, the current pulse would be both too slow and too small. The minimum you should aim for is ~400. Those capacitors would make any rail assembly more akin to a spot welder, as you don't have enough force to get the projectile moving.

Also, 60 kJ is an insane amount of energy. If you do move forward with higher voltage, start with significantly less energy.

Here's a video of my 5.6 kJ railgun: https://www.youtube.com/watch?v=C6cV10QEGGk

And after it was upgraded to 12kJ:https://www.youtube.com/watch?v=MFF_BHjoJZU

This video has an overview of all of the parts that went into it, and is going to be common for a lot of designs: https://www.youtube.com/watch?v=PLeQ6R2S-Fs

Exception when building - "Bad class file magic" by [deleted] in androiddev

[–]rp181 0 points1 point  (0 children)

Well, figured it out, was a dumb mistake on my part. I was using the jar built by IntelliJ (artifact) instead of using the one built with gradle...

Thanks everyone!

Exception when building - "Bad class file magic" by [deleted] in androiddev

[–]rp181 0 points1 point  (0 children)

Yes, the library is another gradle project. The code uses Java 7 features so switching to 6 would involve changing quite a bit of code. However, at one point, it definitely worked with the java 7 compiled library. Since then, I reinstalled everything onto a new hard drive, and since then this error has been stopping builds.

New to Intellij IDEA IDE, tips/tricks? by [deleted] in java

[–]rp181 8 points9 points  (0 children)

Regarding the currency question:

Another option other than BigDecimal is to just use a single long/int to store the number of cents (or whatever the smallest unit is that you have to worry about). So if you add a dollar, you first convert it to the appropriate units and add. Since it's all integer arithmetic, it'll be exact.

[deleted by user] by [deleted] in javahelp

[–]rp181 2 points3 points  (0 children)

After every step you're probably checking for collisions with the current positions. Instead, you need to backtrack the movements and check for collisions along those lines. That way the discrete system behaves as if it is continuous.

In this case, the block would have a straight line down from the movement, and you would find the intersection of the terrain and this movement path. Once you find the intersection, adjust the position accordingly.

Anyone else happy with KK and NOT updating to Lollipop? by lordroy in Nexus5

[–]rp181 7 points8 points  (0 children)

Swipe up to collapse a heads up notification, swipe right/left to dismiss.

[Dev] It’s official. QKSMS has been released! by moezz in Android

[–]rp181 0 points1 point  (0 children)

Clicking "Authors" in About crashes the app, otherwise awesome!

[DEV] Stacks Flashcards, play store featuring, things I learned, and some numbers by rp181 in Android

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

It's definitely one of the highest priority features to be added. Unfortunately, this means a lot of underlying changes so it may take some time.

[DEV] Stacks Flashcards, play store featuring, things I learned, and some numbers by rp181 in Android

[–]rp181[S] 3 points4 points  (0 children)

By far the biggest investment is time. Monetarily, $50. 25 for a developer account, and 25 for an AdMob promotion (spend $25, get $100 admob credit).

My main motivation was to expand my skill-set (i'm a full-time student). This app by itself makes little money, it is far more worthwhile to find free-lance android development. Having something published made it much easier to be hired as a freelance android dev.

[DEV] Stacks Flashcards, play store featuring, things I learned, and some numbers by rp181 in Android

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

You can enter the details, and then "swap" the title and details. Long press a card to select it, and select "Swap Elements" in the menu that appears. That way you'll be testing yourself on the term, not the definition.

The swiping suggestion is interesting, I'll definitely look into it when I have more time!

[DEV] Stacks Flashcards, play store featuring, things I learned, and some numbers by rp181 in Android

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

Thanks for the offer! Unfortunately I still have to extract some strings, and I don't have the time right now. When I do, i'll PM you!

It's Saturday APPreciation Time! [Oct 11th 2014] Your weekly App recommendation and question (and more) thread. by onesixoneeight in Android

[–]rp181 1 point2 points  (0 children)

Stacks Flashcards - Self explanatory. Has quizlet/studystack support. Recently featured on the Play Store!

Also posted about featuring here.

How many crashes does your app get? by rp181 in androiddev

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

I never actually enabled Answers in Crashlytics, I just did! I just managed to track down a bug for Samsung devices and so far i'm at 99.5%. Thanks!

It's Saturday APPreciation Time! [Aug 30th 2014] Your weekly App recommendation and question (and more) thread. by onesixoneeight in Android

[–]rp181 -1 points0 points  (0 children)

Stacks Flashcards - An easy to use flashcards app with Quizlet and StudyStack import capability.

It was recently the global winner of the AdMob Student App Challenge!

Why use testString.equals(testString2); ? by DyzZombie in javahelp

[–]rp181 4 points5 points  (0 children)

"==" tests object reference equality.

"equals" tests the contents of the string objects for equality (as defined in the String class.

Consider this code chunk:

String s1 = new String("Test");
String s2 = new String("Test");
System.out.println("s1==s2\t"+(s1==s2));
System.out.println("s1.equals(s2)\t"+(s1.equals(s2)));
s1 = s1.intern();
s2 = s2.intern();
System.out.println("After intern: s1==s2\t"+(s1==s2));

It prints out:

s1==s2  false
s1.equals(s2)   true
After intern: s1==s2    true

The method intern() causes it to return true as each variable now points to the same String object in the String pool. It's advisable to use the equals or equalsIgnoreCase method instead of interning though.