Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 176 177 [178] 179 180 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 887966 times)

Shinotsa

  • Bay Watcher
  • Content lion is content
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2655 on: July 19, 2012, 10:55:03 pm »

It can be whatever would output an MS DOS format text file for me to use in the next step. I have had to do this before by hand with excel on a much smaller set of data. We have approximately 400 cases, each one should have 3 text documents with anywhere from 300 -1000 data points. So, now that I think about it, it would be upward of a thousand excel documents to process. I can certainly do that by hand, but judging by how the process went last time it would take a significant amount of time.

I'm not asking anyone here to make a program, just whether it's a two hour project or a full day project to make one. If it's a short project I can find someone, if not I'll suck it up and do the grunt work like a good intern.
Logged
Quote from: EvilTim
"You shouldn't anthropomorphize vehicles. They hate it"

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #2656 on: July 19, 2012, 11:00:22 pm »

It certainly seems straight-forward. I could do it, except I don't know how to make the program accept a hundred text files easily.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2657 on: July 19, 2012, 11:01:25 pm »

do the grunt work like a good intern.

I feel your pain.

Shinotsa

  • Bay Watcher
  • Content lion is content
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2658 on: July 19, 2012, 11:04:35 pm »

It certainly seems straight-forward. I could do it, except I don't know how to make the program accept a hundred text files easily.

That's actually the problem we had with the last batch. I did about a hundred of them in an hour and then we realized the program we were putting them into only accepted up to 1400 data points when our files were 1600-1800. So we broke each up into 3 separate groups and here I am.
Logged
Quote from: EvilTim
"You shouldn't anthropomorphize vehicles. They hate it"

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #2659 on: July 19, 2012, 11:06:10 pm »


That's actually the problem we had with the last batch. I did about a hundred of them in an hour and then we realized the program we were putting them into only accepted up to 1400 data points when our files were 1600-1800. So we broke each up into 3 separate groups and here I am.

The programmer was probably like, "Hmm, I guess no-one's crazy enough to shove 1600 data points into me program here~ I'm gonna impose an arbitrary data point limit >_<" :P
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Shinotsa

  • Bay Watcher
  • Content lion is content
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2660 on: July 19, 2012, 11:13:05 pm »

Well I don't think he could have thought anyone was crazy enough to look at detailed heart rate statistics over a full eighteen minutes, sometimes more if the experimenter screwed up the beginning or the end. I mean seriously, who would do that? Oh wait...  :-[
Logged
Quote from: EvilTim
"You shouldn't anthropomorphize vehicles. They hate it"

RulerOfNothing

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2661 on: July 19, 2012, 11:13:17 pm »

I think I can make the program in about an hour. How can I get it to you Shinotsa?
Logged

Shinotsa

  • Bay Watcher
  • Content lion is content
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2662 on: July 19, 2012, 11:21:15 pm »

Thank you so much, I'll PM you

You guys are all great. Continue as you were, you wonderful wizards you.
Logged
Quote from: EvilTim
"You shouldn't anthropomorphize vehicles. They hate it"

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #2663 on: July 19, 2012, 11:34:28 pm »

is MS-DOS format Unicode-8/-16? or is it ASCII?

Eh, I have a question that I hope someone can answer:

In Unity, I am trying to come up with an easy way to figure out if a cube is surrounded by 6 other face-adjacent cubes. Normally this isn't that much of an issue, but I have upwards of 11k - 15k cubes in a List<Transform>. Is there a faster way to get adjacency information other than searching the entire list repeatedly? I might be able to make it into a single-pass search for all 6 values and just remove the search value from a bin if it is found but I'm not sure how much faster that would be, if at all. Would doing a Raycast work for this? And does a raycast return "if something is hit within R range" or does it return "raycast hit G gameObject"?
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2664 on: July 20, 2012, 08:56:43 am »

You can do a limited-range raycast in Unity.
Logged

Twiggie

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2665 on: July 20, 2012, 09:00:38 am »

Wouldn't you want to use something like a 3d array, and store each cube at its coordinates? then you have O(1). You probably dont want to use arrays though, but still some form of indexed data storage instead of just a list...
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #2666 on: July 20, 2012, 09:07:25 am »

2. Multithreading? Can I read the same file using multiple threads at the same time? What about multiple files at the same time?

Yes but (except maybe on an SSD) benefits would be limited, if any at all. The Hard Disk itself can only read from one location at any given time. It's why having 3 SATA Hard Disks, one for the the OS, one for data you primarily intend to read from (executables for example), and one you primarily write too would give a huge performance boost to a PC compared to all on one SATA.

In my experience, you get benefits up to around 4 or 5 threads reading/writing different files off of one disk. You usually can not saturate a SATA controllers bandwidth by reading/writing a single file. A previous project I was on involved with copying, verifying, deduplicating and processing hundreds of terabytes of data.

Was this with a hard disk or a solid state drive?

hard disk
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2667 on: July 20, 2012, 11:08:42 am »

is MS-DOS format Unicode-8/-16? or is it ASCII?

Eh, I have a question that I hope someone can answer:

In Unity, I am trying to come up with an easy way to figure out if a cube is surrounded by 6 other face-adjacent cubes. Normally this isn't that much of an issue, but I have upwards of 11k - 15k cubes in a List<Transform>. Is there a faster way to get adjacency information other than searching the entire list repeatedly? I might be able to make it into a single-pass search for all 6 values and just remove the search value from a bin if it is found but I'm not sure how much faster that would be, if at all. Would doing a Raycast work for this? And does a raycast return "if something is hit within R range" or does it return "raycast hit G gameObject"?
Need more info. 1. Is it grid-aligned? 2. Is it axis-aligned? 3. If grid aligned, do you track the empty cubes as well as solid ones?
Logged

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2668 on: July 20, 2012, 08:18:12 pm »

Thanks for all the replies to my last question! Another problem, though:

Okay, this doesn't make ANY sense at all. All I'm doing is instantiating a TestClass. Its constructor takes a string. It has a destructor. I've set it up so it prints when the constructor or destructor is called. Normally, the destructor is called twice. When I change it so that the constructor takes an int, the destructor is called only once. What the hell.

Spoiler: Both programs in full (click to show/hide)

The only difference between the two programs is what parameter the TestClass constructor takes. Program 1 takes a string, Program 2 takes an int. Here are their outputs:

Code: (Program 1 output) [Select]
Constructor called
Destructor called
Destructor called
Code: (Program 2 output) [Select]
Constructor called
Destructor called



POSTSCRIPT: I just found out if I changed this line in Program 1:
Code: [Select]
TestClass tc = TestClass("test");to:
Code: [Select]
TestClass tc("test");then it works as it should, with only one destructor call. But still... what is going on exactly?
Logged

RulerOfNothing

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2669 on: July 20, 2012, 08:31:39 pm »

TestClass tc = TestClass("test"); actually constructs a TestClass in a unnamed temporary variable, then copies it to tc. My first guess is that your compiler is doing some optimisation that gets rid of this temporary variable, but for some reason can't do this for the version that has a string parameter.
Logged
Pages: 1 ... 176 177 [178] 179 180 ... 796