Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

fidel sarcastro posted:

i'd pay in blood for a language with sql literals.

linq is close enough, i guess.

you mean like Embedded SQL?

behold the horror that made me keep away from databases for a long time

code:

#include<stdio.h> 
#include<string.h> 
EXEC SQL BEGIN DECLARE SECTION;

        long station_id; 
        long mon; 
        float temp; 
        float rain; 
        char city_name[21]; 
        long SQLCODE;
EXEC SQL END DECLARE SECTION; 
main() 
{ 
/* the CONNECT statement, if needed, goes here */ 
strcpy(city_name,"Denver"); 
EXEC SQL SELECT ID INTO :station_id
        FROM STATION 
        WHERE CITY = :city_name;
if (SQLCODE == 100)
        { 
        printf("There is no station for city %s\n",city_name); 
        exit(0); 
        }
printf("For the city %s, Station ID is %ld\n",city_name,station_id);  
printf("And here is the weather data:\n"); 
EXEC SQL DECLARE XYZ CURSOR FOR
        SELECT MONTH, TEMP_F, RAIN_I 
        FROM STATS 
        WHERE ID = :station_id 
        ORDER BY MONTH;
EXEC SQL OPEN XYZ; 
while (SQLCODE != 100) {
        EXEC SQL FETCH XYZ INTO :mon, :temp, :rain; 
        if (SQLCODE == 100)
                printf("end of list\n");
        else
                printf("month = %ld, temperature = %f, rainfall = %f\n",mon,temp,rain);
        }
EXEC SQL CLOSE XYZ; 
exit(0); 
}

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008
proc is really hard to search for

distortion park
Apr 25, 2011


Luigi Thirty posted:

i don't know how to explain this right. uhhhh so i have a list of points calculated from iterating over ((forward vector - gravity vector) * iteration step). the Y axis of the chart is the Y value of the coordinate, the X axis of the chart is one iteration step. iteration runs until the height is below 0. yes, i know this is a bar chart.



the problem is that I want to figure out the value of Y when X is 1, 2, 3, etc. and this is just showing the height at each iteration step no matter what X is at each step. how do I get from a point (0.89842789, 0.5687986) or whatever to finding the value of Y when X = 1 so my chart makes sense?

i don't know if i'm using the right terminology. the last math class i took was college algebra.

Everyone else posted good answers for your question, but when doing this sort of simulation be careful how you do the eq of motion integration, not all the ways conserve energy etc. I'm on my phone but google leapfrog verlet for one of the standard algos

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bloody posted:

barf your poo poo into excel and ask it to fit it for you and enjoy your r^2=1.000

post your fits

suffix
Jul 27, 2013

Wheeee!

MeruFM posted:

no but they have very little in common

data scientist is a person who knows SQL and can make charts for executives to show off in powerpoint presentations. They're basically doing excel but across bigger datasets that would make excel crash.
ML programmers specializes in finding patterns out of masses of data as a way to make the product better or more profitable or whatever

That being said, if you have tons of worthless data with no discernible capital-F features, it's all worthless anyways. You just get paid more with a less known buzzword in your title.

also when things go south, you're booted first because they just see you as a cog vs someone who provided "tangible" benefits

see: my last company

huh. the "data scientists" i know of do plenty of ml, but i guess it's not a well defined position

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

suffix posted:

huh. the "data scientists" i know of do plenty of ml, but i guess it's not a well defined position
my personal archetypes: typical data scientist works in SPSS, SAS, excel, etc. possibly R. they have a standard bag of tools that they apply to every problem. though the toolbag might have some ML in, it tends to be heavier on traditional statistics, especially frequentist poo poo. most of their time is focused on the data, and if they're experts then they're experts in the problem domain rather than in ML.

typical ML dev works in Python, Matlab, Lua, C++. possibly C#/F# in finance, possibly Java in industry. possibly R, but my impression is that it's losing popularity in the face of Python. most of a ML dev's time is focused on the algorithms rather than data. there are a lot fewer ML devs around than there are data scientists.

you're right though, they're not well-defined positions and there's a lot of overlap.

coffeetable fucked around with this message at 13:09 on May 28, 2015

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

FamDav posted:

proc is really hard to search for

try sproc

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



trying out sublime text 3 and wtf it doesnt realize if you move a file from under it

even textwrangler does that what is this poo poo

Valeyard
Mar 30, 2012


Grimey Drawer

Snapchat A Titty posted:

trying out sublime text 3 and wtf it doesnt realize if you move a file from under it

even textwrangler does that what is this poo poo

It does realize, and it turns the currently open document into a new unsaved document

triple sulk posted:

Big Machine Learning Evangelist

Digital Media Prophet here

Shaggar
Apr 26, 2006

~Coxy posted:

try sproc

idk anyone who calls stored procs sprocs except for people who don't use them or understand them.

jony neuemonic
Nov 13, 2009

eschaton posted:

you mean like Embedded SQL?

behold the horror that made me keep away from databases for a long time

code:

#include<stdio.h> 
#include<string.h> 
EXEC SQL BEGIN DECLARE SECTION;

        long station_id; 
        long mon; 
        float temp; 
        float rain; 
        char city_name[21]; 
        long SQLCODE;
EXEC SQL END DECLARE SECTION; 
main() 
{ 
/* the CONNECT statement, if needed, goes here */ 
strcpy(city_name,"Denver"); 
EXEC SQL SELECT ID INTO :station_id
        FROM STATION 
        WHERE CITY = :city_name;
if (SQLCODE == 100)
        { 
        printf("There is no station for city %s\n",city_name); 
        exit(0); 
        }
printf("For the city %s, Station ID is %ld\n",city_name,station_id);  
printf("And here is the weather data:\n"); 
EXEC SQL DECLARE XYZ CURSOR FOR
        SELECT MONTH, TEMP_F, RAIN_I 
        FROM STATS 
        WHERE ID = :station_id 
        ORDER BY MONTH;
EXEC SQL OPEN XYZ; 
while (SQLCODE != 100) {
        EXEC SQL FETCH XYZ INTO :mon, :temp, :rain; 
        if (SQLCODE == 100)
                printf("end of list\n");
        else
                printf("month = %ld, temperature = %f, rainfall = %f\n",mon,temp,rain);
        }
EXEC SQL CLOSE XYZ; 
exit(0); 
}

:stare:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Valeyard posted:

It does realize, and it turns the currently open document into a new unsaved document

i have never wanted or needed that. it should keep the file open and just update where it saves to.

might even be a dealbreaker for me

Valeyard
Mar 30, 2012


Grimey Drawer

Snapchat A Titty posted:

i have never wanted or needed that. it should keep the file open and just update where it saves to.

might even be a dealbreaker for me

this is NOT the time to laugh at sublimes settings, but it looks like there is one for this



e; hmm apparently this setting doesnt do that,

Valeyard fucked around with this message at 16:12 on May 28, 2015

leftist heap
Feb 28, 2013

Fun Shoe
is there any reason to use sublime over anything else at this point? gently caress it, notepad++ still works for me.

oh no blimp issue
Feb 23, 2011

rrrrrrrrrrrt posted:

is there any reason to use sublime over anything else at this point? gently caress it, notepad++ still works for me.

if youre an autist

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Valeyard posted:

this is NOT the time to laugh at sublimes settings, but it looks like there is one for this



that seems to remember what files were open when you close & reopen the whole app

Valeyard
Mar 30, 2012


Grimey Drawer

Snapchat A Titty posted:

that seems to remember what files were open when you close & reopen the whole app

yeah oops, sorry

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



<:mad:>

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Valeyard posted:

this is NOT the time to laugh at sublimes settings

wrong

brap
Aug 23, 2004

Grimey Drawer
I use sublime because I managed to install the plugins I want and I'll be damned if I'm gonna repeat that with some other editor. I am not paying to use that poo poo though.

Valeyard
Mar 30, 2012


Grimey Drawer
you can easily setup all your sublime plugins using dropbox, so when installing on a new machine its really easy to get started

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

idk anyone who calls stored procs sprocs except for people who don't use them or understand them.

two companies ago, everybody called them "sprocs"; it drove me up the wall



i'm trying to write a servlet that will work with different versions of selenium grid -- one that uses org.json.json and one that uses com.google.gson. the two libraries have similar but not identical interfaces. i would like to write a class that gives me a kind of front-end common interface for the libraries. i know there has to be a pattern for this, but it's not "facade", and i can't think of any other candidates

jony neuemonic
Nov 13, 2009

rrrrrrrrrrrt posted:

is there any reason to use sublime over anything else at this point? gently caress it, notepad++ still works for me.

nope. vim and emacs are better editors and idea is a better ide.

Valeyard posted:

you can easily setup all your sublime plugins using dropbox, so when installing on a new machine its really easy to get started

you can do that with any editor and a git repo.

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

prefect posted:

two companies ago, everybody called them "sprocs"; it drove me up the wall



i'm trying to write a servlet that will work with different versions of selenium grid -- one that uses org.json.json and one that uses com.google.gson. the two libraries have similar but not identical interfaces. i would like to write a class that gives me a kind of front-end common interface for the libraries. i know there has to be a pattern for this, but it's not "facade", and i can't think of any other candidates

adapter is the name from gang of four. I think most people would call it a wrapper.

Shaggar
Apr 26, 2006
yeah but why do you have separate json libs and why are you not just using jackson + jax-rs like everyone else.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

yeah but why do you have separate json libs and why are you not just using jackson + jax-rs like everyone else.

i didn't pick these libraries -- they're the ones that selenium is using, and i don't seem to be able to package up other dependencies in this jar. i'm sure that means i'm doing something wrong.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Awia posted:

if youre an autist

if you think you're autistic but you don't use vi or emacs then maybe you should get your diagnosis checked

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I have to do differential equations to make a scorched earth clone? holy poo poo gently caress that I'll go work on something else

Luigi Thirty fucked around with this message at 18:57 on May 28, 2015

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Luigi Thirty posted:

I have to do differential equations to make a scorched earth clone? holy poo poo gently caress that I'll go work on something else

if you can do basic integration of polynomials, you can handle this. suppose the shell starts at position x0 and is launched with velocity v0 in a world with gravity g

the acceleration is

a = -(0, 1)g

which when integrated wrt time gives the velocity eqn

v = v0 - (0,1)g*t

and when you integrate that you get the position eqn

x = x0 + v0*t - (0,1)g*t^2

Luigi Thirty
Apr 30, 2006

Emergency confection port.

coffeetable posted:

if you can do basic integration of polynomials

you are proceeding from a flawed premise

Luigi Thirty posted:

the last math class i took was college algebra.

I know how to add/subtract/multiply/divide polynomials and how to cheat on math tests using a TI-83.

MeruFM
Jul 27, 2010
http://math2.org/math/integrals/tableof.htm

qntm
Jun 17, 2009

coffeetable posted:

x = x0 + v0*t - (0,0.5)g*t^2

MeruFM
Jul 27, 2010
You don't even need to integrate and can just cheat

Assuming y is the only axis affected by gravity
code:
g = gravity in ticks
x,y,z = missle starting velocity in ticks
x1,y1,z1 = missle position

for every tick:
    x1 += x
    y1 += y
    y -= g
    z1 += z
you can add wind the same way

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

fuk

MeruFM
Jul 27, 2010
if you were as a child forced to do 1000 calc exercises everyday, you would not have made such a simple error

:china: :ussr:

Space Whale
Nov 6, 2014
Just khan academy for integrating babby polynomials, it's easy as gently caress.

For any function f(x) where the polynomial terms are xn the integral is a new function, F(x) = xn+1/(n+1) + C

If the syntax is confusing just Khan Academy that poo poo. Also if you want a "proof" of it write a Riemann sub algo and increase the number of rectangles used to fit the curve, it'll start making sense.

oh no blimp issue
Feb 23, 2011

do americans not learn calculus in high school?

Space Whale
Nov 6, 2014
Remember when calc was 'hard' and things were simple?

:smith:

gonadic io
Feb 16, 2011

>>=
wolfram alpha does it and will show the steps that it took (although maybe only if you subscribe??)

Adbot
ADBOT LOVES YOU

Space Whale
Nov 6, 2014

Awia posted:

do americans not learn calculus in high school?

The brainiacs who are college prep bougies do in 12th grade or some poo poo, maybe. We hardly learn basics of statistics and how loving interest works, it's really hosed up.

  • Locked thread