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
compuserved
Mar 20, 2006

Nap Ghost
hope you're not reading a csv file with an integer greater than 2^31-1, because R will just SILENTLY make that whole column a "numeric" (floating-point) type instead of an integral type! I think in one of the last three minor releases they finally added an option to warn you when this happens

Adbot
ADBOT LOVES YOU

Corla Plankun
May 8, 2007

improve the lives of everyone
sorry about your csv of unsanitized data, bro

compuserved
Mar 20, 2006

Nap Ghost

Corla Plankun posted:

sorry about your csv of unsanitized data, bro

thanks; me too

the problem here isn't bad data though. it's a column full of integral values that R silently casts to floating-point values once they get too big. even if R had a native 64-bit integer type (lol that it doesn't in tyool 2014) that still wouldn't address the problem of silently doing something nobody sane would expect

http://www.johnmyleswhite.com/notebook/2014/01/29/data-corruption-in-r-3-0-2-when-using-read-csv/

compuserved fucked around with this message at 18:46 on Sep 23, 2014

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Corla Plankun posted:

whats R's tragic flaw?

it's not SAS

SAS' tragic flaw is that it's not R

Bloody
Mar 3, 2013

thankfully im planning on dumping the csv in a sql database of some sort before i start mucking with it too much because not only is it a poo poo csv format its also in a few hundred files!

regularizer
Mar 5, 2012

I'm about to finish the codecademy tutorial for python and want some recommendations for what to do next for a more in-depth understanding of python before I move on to another language? I want to learn how to do GUIs, and I was thinking of trying to build a 2-player chess game, but I was recommended PyQT in another thread which the poster said doesn't have any tutorials so that's not particularly helpful.

Learning how to use PyCharm would be good too.

Soricidus
Oct 21, 2010
freedom-hating statist shill

regularizer posted:

I'm about to finish the codecademy tutorial for python and want some recommendations for what to do next for a more in-depth understanding of python before I move on to another language? I want to learn how to do GUIs, and I was thinking of trying to build a 2-player chess game, but I was recommended PyQT in another thread which the poster said doesn't have any tutorials so that's not particularly helpful.
just use tkinter

sure it doesn't look great but it's perfectly functional, a reasonable way to learn some gui concepts, comes with python, and has plenty of tutorials.

Jenny Agutter
Mar 18, 2009

regularizer posted:

I'm about to finish the codecademy tutorial for python and want some recommendations for what to do next for a more in-depth understanding of python before I move on to another language? I want to learn how to do GUIs, and I was thinking of trying to build a 2-player chess game, but I was recommended PyQT in another thread which the poster said doesn't have any tutorials so that's not particularly helpful.

Learning how to use PyCharm would be good too.

If you don't care about looks tkinter is an easy to use GUI package with pretty good documentation. Easy to throw a little project together with.

fritz
Jul 26, 2003

Luigi Thirty posted:

it's not SAS

SAS' tragic flaw is that it's not R

SAS is a 'no thank you' language to walk away from

Luigi Thirty
Apr 30, 2006

Emergency confection port.

fritz posted:

SAS is a 'no thank you' language to walk away from

there was a post in the tickets thread in cobol from a goon who was trying to install SAS on their university's os/390 mainframe in the 90s i think it was, the installer was graphical and written in java and tried to allocate a virtual disk larger than VSAM allowed at the time

SAS was, in fact, available on 9-track tapes at the time, as well

Luigi Thirty fucked around with this message at 19:38 on Sep 23, 2014

distortion park
Apr 25, 2011


why is the c# int/int? distinction not used for reference types as well? it would be pretty cool to only have to check for nulls when necessary, and to be forced to more ore less in those cases

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

pointsofdata posted:

why is the c# int/int? distinction not used for reference types as well? it would be pretty cool to only have to check for nulls when necessary, and to be forced to more ore less in those cases

java

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

like this distinction is one of the singular fuckups of C#

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

regularizer posted:

I'm about to finish the codecademy tutorial for python and want some recommendations for what to do next for a more in-depth understanding of python before I move on to another language? I want to learn how to do GUIs, and I was thinking of trying to build a 2-player chess game, but I was recommended PyQT in another thread which the poster said doesn't have any tutorials so that's not particularly helpful.

Learning how to use PyCharm would be good too.

I used wxpython and it wasn't awful

Luigi Thirty
Apr 30, 2006

Emergency confection port.

one annoying thing with calling methods with this reflection function is that now I'm not working with the copy of the noun kept in my game state singleton, i'm working with a new copy made by the Perform() method defined in Noun so in each derived noun's verb method I have to fetch a new copy of the particular item object from the singleton to make changes to it

code:
public String Perform(IVerb verb, INoun actor, String verb_preposition = null)
{
    //if a method Verb exists on the derived noun class, call it.
    MethodInfo method = this.GetType().GetMethod(CultureInfo.CurrentCulture.TextInfo.ToTitleCase(verb.Name.ToLower()), new [] {typeof(INoun), typeof(String)});
    Object[] parameters = new Object[] { actor, verb_preposition };
    if (method != null)
    {
        return (string)method.Invoke(this, parameters);
    }
    else
    {
        return String.Format("Action not defined: Noun {0}, Verb {1}\r\n", Name, verb.Name);
    }
}

Luigi Thirty fucked around with this message at 21:37 on Sep 23, 2014

Widdiful
Oct 10, 2012

help me yospos is there a way in vb (ugh) to give outlines to text in buttons

Bloody
Mar 3, 2013

probably

Widdiful
Oct 10, 2012

i have looked but have not found
the way

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Malcolm XML posted:

like this distinction is one of the singular fuckups of C#

and one of the crowning achievements of swift

Soricidus
Oct 21, 2010
freedom-hating statist shill

Luigi Thirty posted:

one annoying thing with calling methods with this reflection function
you can stop there, really. it looks like you're fighting the language. this is usually a sign that your design is not a good design for that language, and you should either rethink it or change languages.

regularizer
Mar 5, 2012

cool thanks i will have a fuckaround with tkinter and maybe wxpython

MeruFM
Jul 27, 2010
wxpython is okay except you're reading C++ documentation pretending it's python

master of the sea
Apr 16, 2003

*skweeeeeee*

master of the sea posted:

i started doing ios dev this last week and i managed to drag myself through the objective-c book in xcode + the first ios app + some other stuff.
so i feel i can at least read code and write code comfortably now, however, i am stumbling with some design stuff...
i ahve a main view, in this view there is a content view embedding a table view controller, there is also a button in this view, and a navigation controller in the top where the nav bar button takes oyu to the table view controller, the button on the other hand takes you to a different input view where ur supposed to fill in information to be fed back to a common model for pretty much everything, it's a list of event objects containing dates and descriptions and some other data.

my terrible instinct tells me to just go and create a singleton for keeping track of the array i feed the table view and any other information related to the model

are there other smarter or prettier ways to do this?

okay so i figured out that the correct way to do this is by using the core data framework and golly its really nice so ok that's my story thanks

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

MeruFM posted:

wxpython is okay except you're reading C++ documentation pretending it's python

I didn't find myself in the cpp dox very often, the python docs are usually adequate

Yall Atreides
Oct 27, 2010

fear is the dang ol' mind killer, y'all

MeruFM posted:

wxpython is okay except you're reading C++ documentation pretending it's python

i had this same issue using pyqt5

like a lot of the python documentation is jsut a link to the c++ docs

Bloody
Mar 3, 2013

Ginger Wank Wizard posted:

python documentation

any oxymoron if i ever saw

distortion park
Apr 25, 2011



that's lame if there's no fundamental reason that it's difficult

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Ginger Wank Wizard posted:

i had this same issue using pyqt5

like a lot of the python documentation is jsut a link to the c++ docs

well wxpython is just a wrapper so this mostly makes sense

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Soricidus posted:

you can stop there, really. it looks like you're fighting the language. this is usually a sign that your design is not a good design for that language, and you should either rethink it or change languages.

this is also possible

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
hello terrible programmers

our customer support people need to log in to an external service which has many accounts. logging in to and keeping track of these accounts is very annoying. it's possible to log in to these accounts with query params eg ?username=blah&password=butts

Is there a way to do this that is somewhat more secure than wrapping it in a form post? Some sort of iFrame thing maybe?

Ignore the fact that the usernames and passwords for these accounts will need to get stored and accessed.

tef
May 30, 2004

-> some l-system crap ->

MALE SHOEGAZE posted:

Ignore the fact that the usernames and passwords for these accounts will need to get stored and accessed.

maybe solve this instead? i dunno but there is probably some password manager that does form filling and shared passwords for ~enterprise~

Shaggar
Apr 26, 2006

MALE SHOEGAZE posted:

hello terrible programmers

our customer support people need to log in to an external service which has many accounts. logging in to and keeping track of these accounts is very annoying. it's possible to log in to these accounts with query params eg ?username=blah&password=butts

Is there a way to do this that is somewhat more secure than wrapping it in a form post? Some sort of iFrame thing maybe?

Ignore the fact that the usernames and passwords for these accounts will need to get stored and accessed.

if your goal is to hide the creds from the support people then write a proxy that logs in w/ the creds and then pass the cookie back to the client and send them to the real page w/ it. if not, then who cares just create links w/ the creds or do the iframe thing for convenience.

Shaggar
Apr 26, 2006
this is assuming you also have no control over the external service

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i successfully redesigned it so i don't have to get the singleton object every time i do a thing

i was accidentally returning a second copy of the noun object in the parser and calling a method on that

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

pointsofdata posted:

why is the c# int/int? distinction not used for reference types as well? it would be pretty cool to only have to check for nulls when necessary, and to be forced to more ore less in those cases

The no-poo poo answer from the c# language team is they didn't think of nullable value types until v2.0 and it was too late to put the null genie back in the bottle for fear of breaking compatibility. If they could rewrite the language from scratch that's exactly what they would do.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Shaggar posted:

if your goal is to hide the creds from the support people then write a proxy that logs in w/ the creds and then pass the cookie back to the client and send them to the real page w/ it. if not, then who cares just create links w/ the creds or do the iframe thing for convenience.

yeah we dont really care but if there were a man in the middle or something and someone else got ahold of the creds it would be bad.

Shaggar
Apr 26, 2006
I mean if theres a man in the middle now however they log in is also gonna be affected

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i'm spergin bout the man in the middle
i'm asking him to change his shell
no message could have been any clearer
if you wanna get owned really hard take a look at yourself and use a bash

Stringent
Dec 22, 2004


image text goes here

Luigi Thirty posted:

i'm spergin bout the man in the middle
i'm asking him to change his shell
no message could have been any clearer
if you wanna get owned really hard take a look at yourself and use a bash

Adbot
ADBOT LOVES YOU

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?

master of the sea posted:

okay so i figured out that the correct way to do this is by using the core data framework and golly its really nice so ok that's my story thanks

bug me if you have any questions, I missed helping out in the Core Data labs at WWDC this year

  • Locked thread