Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 667 668 [669] 670 671 ... 796

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

ancistrus

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10020 on: September 12, 2016, 07:18:24 am »

Is there really no sane way to make a pl sql procedure write into a text file that is on my local machine?
I have spent 30 minutes googling and found nothing I can use.
My privileges dont even allow me to create tables so I cant use that as workaround.

The only thing I can do is select and I need to select lots of stuff
basically something like

for x in all_tab_columns
do various crap depending on other crap
execute immediate crap
write the result somewhere somehow....? (not sure if ctrlc from dbms output is a sane solution)

Logged

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10021 on: September 12, 2016, 07:32:31 am »

And that's why you need typed languages!
No, it was int, int.  :v
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

DragonDePlatino

  • Bay Watcher
  • [HABIT:COLLECT_WEALTH]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10022 on: September 12, 2016, 09:35:48 am »

Then you make sure you change the types, so nothing compiles until you've corrected everything.

Huh, that's actually pretty handy advice! With Skyrunner's example of method(int, int) what's the best way to do that? Add a useless bool to the end of the method signature, then go through all the errors without adding the bool? Is there a better way to do that?

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #10023 on: September 12, 2016, 09:37:22 am »

If it's int, int then typed or untyped, no language can help ya.
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

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10024 on: September 12, 2016, 09:39:08 am »

^ what he said. while you're at it, you could aliasing int for what it really is (say, a coordinate? a priority value?) in the method so that moving forward the error can never happen again
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10025 on: September 12, 2016, 09:39:42 am »

If it's int, int, then you really should be asking yourself why it's so important to change it.
Logged

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10026 on: September 12, 2016, 09:40:26 am »

This is why its good to have an IDE with a "search all" feature.  Or a small enough number of files you can ctrl + f them all in a timely manner.
oh, i had that. but i didn't realise that was the issue. because byond doesnt care if you pass 10 arguments to a function that only takes nine. i was rewriting a large part of code, but there was some other code that I *really* didn't want to touch, so it was basically a black box. i just thought i was getting the wrong output out of this box.
« Last Edit: September 12, 2016, 11:14:46 am by miauw62 »
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10027 on: September 12, 2016, 10:01:54 am »

If it's int, int, then you really should be asking yourself why it's so important to change it.
Readability.
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10028 on: September 12, 2016, 10:03:10 am »

Then, if you absolutely must, change the function name.
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10029 on: September 12, 2016, 10:14:17 am »

can also alias the type, depending on the language there are many ways to obtain talking parameters as needed.

Logged

lethosor

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10030 on: September 12, 2016, 03:14:33 pm »

Then, if you absolutely must, change the function name.
If the function name was already sensible but the parameter order wasn't, changing the function name just to reorder the parameters won't help the situation.

If you want the compiler to flag all calls to that function for you, though, I guess that could be another temporary solution (besides changing the signature, removing the function, etc.).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10031 on: September 12, 2016, 09:05:15 pm »

This is why its good to have an IDE with a "search all" feature.  Or a small enough number of files you can ctrl + f them all in a timely manner.
I must say that the ability to simply right click on something and say "refactor" followed afterwards by "find all usages" is one of the biggest reasons that I use an IDE over busting out emacs/etc.

Heck, that's like one of the two main points of an IDE; to help you change things project-wide without breaking other things, and to catch you when you make stupid mistakes like using the wrong type/spelling variables or functions wrong. Everything else an IDE does is just sparkles on top of those two pillars.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Parsely

  • Bay Watcher
    • View Profile
    • My games!
Re: if self.isCoder(): post() #Programming Thread
« Reply #10032 on: September 13, 2016, 01:18:35 am »

Well after a month of Wordpressing around on a website just tweaking design and fixing broken/empty webpages I've been unceremoniously promoted to admin of the successor site. I'm stunned. Am I doing it? Am I doing the thing?
Logged

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10033 on: September 13, 2016, 07:06:43 am »

Well after a month of Wordpressing around on a website just tweaking design and fixing broken/empty webpages I've been unceremoniously promoted to admin of the successor site. I'm stunned. Am I doing it? Am I doing the thing?
You are doing the thing!  Grats BTW!
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

3man75

  • Bay Watcher
  • I will fire this rocket
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10034 on: September 13, 2016, 05:44:06 pm »

Hey guys, Im having an issue with elcipse where I deleted an old project in an attempt to start from scratch (it had problems with packaging for some reason).

Problem is that whenever I try to rename the project to what it was it says that theirs another project with that name. I know I can just rename it a bit different but i've gone on a warpath of sorts to complete destroy this 'original' that seems to be hiding somewhere. Somehow no matter how many times I go into my workplace folder and delete the 'new' project. After doing so I empty the recycle bin and go to name a new project with the same name but somehow it justs continues to say that a project can't be named that because theirs already one like it.

The cycle has gone for a couple minutes and I can't find where this file is located.

I'm using eclipse neon 4.6.0 and windows 10.

Anyone have this issue?
« Last Edit: September 13, 2016, 06:02:20 pm by 3man75 »
Logged
Pages: 1 ... 667 668 [669] 670 671 ... 796