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.
 
  • Post
  • Reply
The Balance Niggy
May 11, 2001

tane wave

ShoulderDaemon posted:

You want "mail merge", which should be documented in the help for office.

I knew there had to be something like this, worked great and thanks.

Adbot
ADBOT LOVES YOU

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Okay so I was looking for a Genetic Algorithm class in ruby. I found one and looked at it, then realized that it didn't really do the standard GA so I pretty much rewrote it.

However now I would like to release my version but since I didn't really rewrite it from scratch (just rewrote most of the methods and changed how you initialize a class of the GA) how should I proceed in releasing my version of the class. I am not against giving him credit however he may not want me to use the name since he may update his class in the future. What is the general consensus about what to do in this case?

BTW this is a gem + its available on git; if that changes anything.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender
First, you should contact the original author, show him your code, and ask if he wants to integrate into a new version of his class. If so, arrange with him for how you should be credited. If you have significantly rewritten the code, he may want you to become the primary maintainer.

If he would prefer not to integrate your code in his module, then you can release your code on your own. You should choose a new name, credit him with the original work, and provide a link to the original class. Make sure that the license you are releasing under is compatible with the license he chose.

nonathlon
Jul 9, 2004
And yet, somehow, now it's my fault ...

TagUrIt posted:

There's also some plugins for gedit that can get what you want. In specific, I'd look at ClassBrowser and if that isn't what you need, maybe fileset.

Awesome - just installed it and this is just what I want.

tef posted:

a warning:

regardless of what question you ask, if it mentions 'text editing' and 'linux' you will get a few responses saying "vim" or "emacs"

these are probably not what you want.

Your prescience is scaring me, sir.

hey mom its 420
May 12, 2007

tef posted:

regardless of what question you ask, if it mentions 'text editing' and 'linux' you will get a few responses saying "vim" or "emacs"

these are probably not what you want.
Wow, what a substantiated claim. Those are probably exactly what you want.

Vanadium
Jan 8, 2005

Bonus posted:

Wow, what a substantiated claim. Those are probably exactly what you want.

Well, at least half of them is not what you want. :colbert:

fartmanteau
Mar 15, 2007

Vanadium posted:

Well, at least half of them is not what you want. :colbert:

Whoa look at all this thin ice we're on :can:

Vanadium
Jan 8, 2005

nasoren posted:

Whoa look at all this thin ice we're on :can:

gently caress I tried to make a joke about how we better avoid emacs in that case but then I accidentally opened emacs and :q! is not doing anything

Lamont Cranston
Sep 1, 2006

how do i shot foam
edit -nevermind

Lamont Cranston fucked around with this message at 17:27 on Feb 12, 2009

The Red Baron
Jan 10, 2005

Rocko Bonaparte posted:

BTW--I believe Encog's default model for backwards propagation assumes values ranged 0.0 to 1.0. I tried not using values in that range and it went completely bonkers.
Since I'm assuming Encog uses sigmoidal transfer functions for its neurons, you could try scaling your weights to [0.1, 0.9] rather than [0,1]. This is because the output of a sigmoidal unit will rarely actually reach 0 or 1 (due to the nature of the function's curve), resulting in a potential weight explosion. If the program offers an option for it, you may also want to attempt batch updates of weights.

Your problem sounds recurrent in nature, and as tripwire mentioned there are better networks than backprop out there (although for a recurrent network that would be backpropagation through time, such as Elman networks, which have the problem of exponential weight decay for previous timesteps). However, as much as I love them, I'd advise against spiking networks, since they are quite tricky to work with, and a lot of the things that make biological spiking networks able to store incredible amounts of information, such as the emergence of delta/theta waves for forming cell assemblies (potentially yielding pretty much limitless information storage potential, going by Izhikevic's polychrony paper) etc. are very hard to actually control into doing what you want them to be doing. Spike timings suddenly become highly relevant (with millisecond precision), and so does the question of how to properly convert from continuous inputs to spiketrains (although Izhikevich offers an approach for this). Learning in spiking nets is also not trivial, but the topic itself is exciting, so if you're interested, try reading up on biological spiking neural networks, LTD/LTP and spike-time dependent plasticity.

.. Sorry, went off a bit on a tangent there, but I'm doing a thesis on this stuff, and it's really incredibly fascinating :shobon:

~Sub-symbolic AI krew represent~

If you want to use a recurrent neural network that has been proven itself to work with very long sequences, you could look into Long Short-Term Memory (LSTM). I haven't tried it myself, but it seems pretty groovy and apparently kicks backprop's rear end in pretty much any and every task. You also have networks such as Liquid State, Echo State and Boltzmann. Unfortunately, there's really no one-size-fits-all solution.

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
I'm inclined to think that all this AI discussion probably deserves its own thread at this point.

SLOSifl
Aug 10, 2002


Can anyone familiar with Java System Web Server help me with a reverse proxy issue?

My goal is to create a reverse proxy so that anything at http://localhost:82 is sent to a remote server (x.com). Except if the path starts with /services, in which case it should execute on localhost.

The issue is that I have a set of services running on a local web server, and they control local devices. My original plan was to have the remote page call services using AJAX on localhost. As an example, the remote page on x.com would make a call to "http://localhost/services/SomeDevice.jsp?action=whatever" when the user pressed a button.

That's not possible because the service is on a different domain than the actual page.

I'm hoping to just trick it to make it look like it's all running on localhost. Although if anyone has a good solution to making the web service call to a different host, that would be great too.

edit: gently caress it. We installed the Sun Proxy on our local machines and configured them to do exactly what we wanted. In my test example, I can connect to localhost:8080 and see the main page on a different server, and call services that do poo poo on my computer like open the CD Drive or whatever. Not too bad.

SLOSifl fucked around with this message at 20:09 on Feb 13, 2009

Fitret
Mar 25, 2003

We are rolling for the King of All Cosmos!
I can't figure out an elegant solution to this problem and I was hoping that this problem has been solved before. Anyway, imagine you have a bunch of random points on a graph. Starting at any of those points, I give you a unit vector in any direction, who's origin is at the starting point. How can I determine to which point the unit vector points?

Essentially I'm working on a UI where if the user is currently selecting a point, pressing a direction on an analog stick will highlight the point that's "in that direction". I can't think of a good way of doing it, though.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Fitret posted:

I can't figure out an elegant solution to this problem and I was hoping that this problem has been solved before. Anyway, imagine you have a bunch of random points on a graph. Starting at any of those points, I give you a unit vector in any direction, who's origin is at the starting point. How can I determine to which point the unit vector points?

(say "plane" rather than "graph")

To restate, you want to find the closest point whose angle from the origin is within a certain tolerance of the angle of a direction vector.

code:
findClosestPoint(origin, points, direction):
  let closestPoint = null
  let minSqMag = +Inf

  let cos2tol = cos^2(toleranceAngle)  # global constant

  foreach target in points:
    let v = target - origin
    let sqMag = v.1 * v.1 + v.2 * v.2

    # only consider target if it's closer than the closest point
    if sqMag < minSqMag:
      let ip = v.1 * direction.2 + v.2 * direction.1    # inner product
      # Check that it's within our tolerance angle.
      # If ip <= 0, then target's in the wrong demiplane.
      # Otherwise compare the squared cosine of the angle to target with
      # our squared tolerance cosine.
      if ip > 0 and ip * ip >= cos2tol * sqMag:
        closestPoint := point
        minSqMag := sqMag
If you've got a ton of points, consider cutting down the search space with some sort of spatial partitioning scheme. There are other things you can do if, say, the origin is fixed, but I'm assuming that's not the case.

EDIT: this assumes that direction is a unit vector; if it isn't, you can compensate for that by multiplying cos2tol by its squared magnitude.

rjmccall fucked around with this message at 20:15 on Feb 13, 2009

BDA7DD
Jan 21, 2001

by Tiny Fistpump
I'm new to bash scripting, I've got a question/problem. I'm getting back into doing housecalls and I've been using a Gentoo LiveCD to boot into totally hosed-up machines (spyware, viruses, etc.) so that I can back up files quickly and uninterrupted before I format and reinstall Windows. I'm trying to make a bash script to automate the backup process and ran into a minor issue.

Before I explain, here's the script with the problematic area highlighted:
http://pastebin.com/f1726e9ac

For some reason, all the directories that would be backed up which have spaces in them aren't being handled properly, despite making sure each space is preceded with a backslash-escape (notice the -b option on ls in the for loop). By "not handled properly" I mean how cp will complain about not being able to find the "Documents\", "and\" and "Settings" directories, even though I'm TRYING to get it to work with the "Documents\ and\ Settings" directory. Doubling and tripling the amount of backslashes (figuring maybe it needs a "\\" to know it's a backslash, or perhaps "\\\ " to be really loving specific) produces the same errors, as does using no backslashes at all. It's as if there's no way to have this script NOT interpret the backslash as a literal instead of an escape character. Specifying $SRCDIR's value instead of using the variable merely changes _where_ it gets stuck with the spaces, as it'll still get confused with $USER values that contain spaces, as well as any values in $DEFAULTS that contain spaces (such as "My\ Documents").

BDA7DD fucked around with this message at 21:25 on Feb 13, 2009

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Lord Uffenham posted:

I'm inclined to think that all this AI discussion probably deserves its own thread at this point.
Sure but I'll leave that to somebody with the expertise to actually start a good introductory post. I'd probably just throw up a bunch of questions.

I've been dormant on thread because I have to soak in what was all told to me. I didn't think I'd tap into that kind of expertise, so the respectful thing to do is to wrap my brains around it before plodding on.

I got a test harness in place where I can now see if my neural network was any good. It wasn't, and I saw I gave it the wrong output (whoops). I haven't had time to try anything more elaborate so instead I revisited my problem with my network saturating so quickly.

Somebody commented on using only 500 epochs, but I was only getting maybe getting an improvement on my error per iteration of 0.0001% at that point. Something to consider was that I was giving the network something like over 3 million training values per epoch. So that might have something to do with it. I'm running it right now with momentum in the 1E-20 range just to see if it makes much difference. I'm trying to understand it for the sake of ever using this again in the future for other stuff. I doubt even with the output I wanted to use that it'll really work.

Really I'll want to dabble in some of those newer concepts after reading up a little more on them. It would be nice if there was some Java code out there to get me started. I'll deal with that after doing a little bit of reading, because there's probably some buzzwords I'd need to execute a good search of libraries.

As for the inputs--I was standardizing my input. So for any given stock trading day, for each indicator, I'd get the standard deviation of that data assuming a mean of 0. I'd apply that to a normal distribution, which would fit that into the range 0 to 1 with a mean of 0.5. I think that did a lot of eliminate spikes but maybe it doesn't.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

BDA7DD posted:

I'm trying to make a bash script to automate the backup process and ran into a minor issue.

You shouldn't be using the -b argument to ls.

Instead of this:
code:
for DIR in $(ls -b /foo); echo $DIR; done
You want code that's something like this:
code:
for DIR in "$(ls /foo)"; echo "$DIR"; done
The first set of quotes makes bash separate results from ls by line rather than by word, which is far more reliable than hoping ls gets its escaping right and trying to make bash respect it. The second set of quotes means that even if the directory you are currently operating on has wacky characters in it, bash will pass it as a single argument.

As a rule of thumb: never try to generate escape sequences if you can avoid it. Just use the quoting patterns, and avoid escapes altogether.

BDA7DD
Jan 21, 2001

by Tiny Fistpump
Thanks for the advice, ShoulderDaemon, I'll try that and see if it works. :)

Fitret
Mar 25, 2003

We are rolling for the King of All Cosmos!

rjmccall posted:

(say "plane" rather than "graph")

To restate, you want to find the closest point whose angle from the origin is within a certain tolerance of the angle of a direction vector.

code:
findClosestPoint(origin, points, direction):
  let closestPoint = null
  let minSqMag = +Inf

  let cos2tol = cos^2(toleranceAngle)  # global constant

  foreach target in points:
    let v = target - origin
    let sqMag = v.1 * v.1 + v.2 * v.2

    # only consider target if it's closer than the closest point
    if sqMag < minSqMag:
      let ip = v.1 * direction.2 + v.2 * direction.1    # inner product
      # Check that it's within our tolerance angle.
      # If ip <= 0, then target's in the wrong demiplane.
      # Otherwise compare the squared cosine of the angle to target with
      # our squared tolerance cosine.
      if ip > 0 and ip * ip >= cos2tol * sqMag:
        closestPoint := point
        minSqMag := sqMag
If you've got a ton of points, consider cutting down the search space with some sort of spatial partitioning scheme. There are other things you can do if, say, the origin is fixed, but I'm assuming that's not the case.

EDIT: this assumes that direction is a unit vector; if it isn't, you can compensate for that by multiplying cos2tol by its squared magnitude.

I had to do some monkeying with the tolerance, I found that cos(toleranceAngleInRadians)^2 didn't yield good results. Anyway, the algorithm itself works wonderfully, so thank you very much!

BDA7DD
Jan 21, 2001

by Tiny Fistpump
Nope, that didn't work. It worked so far as that it can now understand what $SRCDIR is, but now the problem is with the $DEFAULTS variable, the script treats it as one single string in the for loop, rather than treating each item separately. I tried removing the escape sequences, still did the same thing. I even tried putting the items in $DEFAULTS into a separate file, newline-separated, and had the script $(cat defaults), $(cat "defaults") and "$(cat defaults)", none of which do what I want them to.

Please help me fix my lovely syntax, I'm bound to understand it once I actually learn it. Sorry if my obsessive overuse of variables is making the script harder to read, I've done that intentionally so that I can make derivative scripts for other OSes once this one's actually working.

BDA7DD fucked around with this message at 16:16 on Feb 14, 2009

covener
Jan 10, 2004

You know, for kids!

BDA7DD posted:

Nope, that didn't work. It worked so far as that it can now understand what $SRCDIR is, but now the problem is with the $DEFAULTS variable, the script treats it as one single string in the for loop, rather than treating each item separately. I tried removing the escape sequences, still did the same thing. I even tried putting the items in $DEFAULTS into a separate file, newline-separated, and had the script $(cat defaults), $(cat "defaults") and "$(cat defaults)", none of which do what I want them to.

Please help me fix my lovely syntax, I'm bound to understand it once I actually learn it. Sorry if my obsessive overuse of variables is making the script harder to read, I've done that intentionally so that I can make derivative scripts for other OSes once this one's actually working.

Not sure why your separate file didn't work. You should start with smaller, simpler scripts that just echo values -- the script you pastebinned is not in good shape at all.

You might find the "IFS" documentation for your shell helpful, or use arrays instead of worrying about the tokenizing.

deskchecked array example:
code:
-SRCDIR="/mnt/win/Documents\ and\ Settings"
-DEFAULTS="My\ Documents Favorites Application\ Data Local\ Settings Desktop Templates"
+SRCDIR="/mnt/win/Documents and Settings"
+declare -a DEFAULTS
+DEFAULTS=("My Documents" Favorites "Application Data" "Local  Settings" Desktop Templates)
 CLIENT=$1
 EXTRALIST=$2
 BKROOT="/mnt/enc/bk/$CLIENT"
@@ -28,13 +29,14 @@
 mkdir -p $BKROOT/default/
 
 # OH NO, THIS PART DOESN'T WORK!
-for USER in $(ls -Ab --indicator-style=none $SRCDIR/); do
-        for BKDIR in $DEFAULTS; do
-                echo "Copying $BKDIR..." | sed -e "s/\\\ /\ /g"
-                echo cp -a $SRCDIR/$USER/$BKDIR/ $BKROOT/default/$USER/$BKDIR/
+for USER in $SRCDIR/*; do
+        for ((i = 0; i< ${#DEFAULTS}; i++)); do
+                BKDIR=${DEFAULTS[i]}
+                echo "Copying $BKDIR..." 
+                echo cp -a "$SRCDIR/$USER/$BKDIR/" "$BKROOT/default/$USER/$BKDIR/"
         done
 done

Mustach
Mar 2, 2003

In this long line, there's been some real strange genes. You've got 'em all, with some extras thrown in.
code:
bash-3.2$ for d in whatever/*; do echo $d; done
whatever/hello there.txt
whatever/number two.txt
bash-3.2$ ARRAY=("My Documents" "Favorites"\
 "Application Data" "Local Settings" "Desktop" "Templates")
bash-3.2$ for f in "${ARRAY[@]}"; do echo $f; done
My Documents
Favorites
Application Data
Local Settings
Desktop
Templates

BDA7DD posted:

Please help me fix my lovely syntax, I'm bound to understand it once I actually learn it.
Nah, bash is the one with the incredibly lovely syntax. It really is the worst.

edit: Beaten, because I spent like twenty minutes double-checking everything with the manual, because bash syntax is a horrible, un-remember-able beast. Did I mention that I hate bash?

Mustach fucked around with this message at 16:47 on Feb 14, 2009

tef
May 30, 2004

-> some l-system crap ->

tef posted:

I wrote http://logo.twentygototen.org, and I've been asked to kludge it to make it work with speech recognition.

....
The plan is to change from a text-box to an almost command-line like interaction, a bit like working in a shell.

I didn't see any help with this so I'll try again but be a little bit more specific.

Currently the logo interpreter works on a 'file at a time' mentality. You pass it a lump of text and it runs it. I want to change this into a more shell-like interaction, i.e. a read, eval, print loop.

How do you write parsers/tokenizers to facilitate REPL's ?

Logo has a few issues that make this a little more awkward, specifically lack of terminators. "fw 100 rt 90" is a valid command. I've cooked up a little hack here
that just checks for things like balanced parenthesis before evaling them.

http://logo.twentygototen.org/static/speech.html

But, I don't get to check the syntax of anything with [] or function definitions with this approach.

What parser designs support this approach?

frumpus
Nov 28, 2005

I am working with this small script to MailEnable a user (no mailbox) in active directory. The IMailRecipient interface uses cdoexm.dll so I've tried running it on the Exchange 2003 server as well as my workstation with Exchange management tools installed.

code:
strADsPath = "LDAP://domaincontroller/CN=username, OU=Users, OU=Students, DC=someschool, DC=EDU"
strEmail = "username@email.someschool.edu"

'mail enable the user
Set objPerson = CreateObject("CDO.Person")
objPerson.DataSource.Open strADsPath
Set iRecip = objPerson.Getinterface("IMailRecipient")
Set iRecip = objPerson
iRecip.MailEnable strEmail 'this is the line that errors
objPerson.Datasource.Save
Error: Object doesn't support this property or method: 'iRecip.MailEnable'
Code: 800A01B6

From what I've read this code should be correct. Can anyone tell me what is going on here?

shrughes
Oct 11, 2008

(call/cc call/cc)

frumpus posted:

code:
Set iRecip = objPerson.Getinterface("IMailRecipient")
Set iRecip = objPerson

How does this make sense?

numeric_atrophy
Oct 18, 2003

Download Geared - FREE
(17 Million Downloads)

Windows 8
iOS
Android
WinPhone 7
I've been asked to develop a website a bit like the big brother live streaming website. There will be a house with ten cameras, and I need to develop a website that will allow users to sign up and then give them access to any of the ten feeds. The client has about $5000 to get started. I'm looking for some solutions as far as the streaming goes. What kind of options are out there? I'm not having too much luck googling for this, probably because I don't know where to begin. I assume I need some kind of software to interpret all of the camera's feeds and encode and stream them out to the server. I'm not sure if I could do it with USB cameras and a simple desktops, or if I need a specialized hardware or video cards that will take in the multiple camera's via some other connection.


I took a look at On2 Flix Live, and it looks like a good options since I'd prefer to go with a flash based system, but I don't think it can handle more than one camera.

Wirecast also looks like a good one, but no flash.

numeric_atrophy fucked around with this message at 04:22 on Feb 17, 2009

frumpus
Nov 28, 2005

shrughes posted:

How does this make sense?

Beats me but MSDN says that's the way. As it turns out though, the MailEnable method is deprecated in Exchange 2007 anyway so it has been decided to scrap this.

I think I'm going to just stop working altogether. It seems like if I put things off long enough they always get cancelled.

Jewdicator
Oct 22, 2006
The excel megathread seems to be in archives now. Is there going to be a new one?

Gedanken
Jan 31, 2006

Egg smokes with burglar. Burglar upsets duck. Duck phones handkerchief. Egg recruits burglar. Egg gives burglar an unrequested orange. Burglar wows eggs under a lovely branch.
I am currently getting familiar with C++ (I have done the second-year Java and C courses at university) and I was hoping that I could build a series of small, simple programs that are semi-useful. I was thinking maybe a file renaming program or tic-tac-toe or something, but I fear even they may be too complex for me to dive into off the bat. I really just want to solidify everything I have learnt so far. The courses at university so far have been mainly just "build a program that will reorder these numbers" etc. Any suggestions?

spiritual bypass
Feb 19, 2008

Grimey Drawer

Gedanken posted:

I am currently getting familiar with C++ (I have done the second-year Java and C courses at university) and I was hoping that I could build a series of small, simple programs that are semi-useful. I was thinking maybe a file renaming program or tic-tac-toe or something, but I fear even they may be too complex for me to dive into off the bat. I really just want to solidify everything I have learnt so far. The courses at university so far have been mainly just "build a program that will reorder these numbers" etc. Any suggestions?

If you're doing CS, your professors are going to make you do lots of simple things the hard way. You'll probably take an assembler class later, which will see you doing things like implementing your own floating point numbers or divisions algorithms.

Complex operations like renaming files in a language like PHP or Python is trivial. In PHP, issues like pointers, memory management, and even data types are no longer an issue. You can't forget about the altogether, but it's much easier to deal with.

hey mom its 420
May 12, 2007

Anyone know where to start if I want to create my own VST plugins? I know it will probably take me a hell of a long time before I make something useful, but I'd still like to get into it.

narbsy
Jun 2, 2007

royallthefourth posted:

If you're doing CS, your professors are going to make you do lots of simple things the hard way. You'll probably take an assembler class later, which will see you doing things like implementing your own floating point numbers or divisions algorithms.

Complex operations like renaming files in a language like PHP or Python is trivial. In PHP, issues like pointers, memory management, and even data types are no longer an issue. You can't forget about the altogether, but it's much easier to deal with.

Of all languages you could mention for scripting, why PHP?

Perl, Python, Ruby are all recent choices; bash is an older one.

PHP!??!?

wrok
Mar 24, 2006

by angerbotSD

Bonus posted:

Anyone know where to start if I want to create my own VST plugins? I know it will probably take me a hell of a long time before I make something useful, but I'd still like to get into it.

This is not all that helpful as it's about 2 seconds worth of googling: Steinberg has a VST API SDK.

I've always wanted to do this too, just haven't ever gotten around to it. Keep us posted with what you come up with!

riggsninja
Jan 15, 2006
So, I'm writing a small flash game, and I have a basic physics engine and Ive made the function :

accelerate(magnitude:Number, angle:Number):void;

which would probably look the following in c++/java for those unfamiliar with flash.

void accelerate( double magnitude, double magnitude);

So basically it takes the magnitude and breaks it up magnitude in horizontal velocity and vertical velocity so the object ends up traveling at desired angle. Ive got the function working just fine,

The problem is, I cant agree with anyone I've talked to as to where 0 should be.

I think that it should work like a protractor. As in, 0 would be to the left (9 o'clock). Which would make 90 would up, 180 would be right, and 270 would be down.

Some people adamantly insist 0 should be up (12 o'clock), so 90 would be right, etc.

Flash seems to think 0 is out the right (3 o'clock), and it goes counter-clockwise. But I don't fully trust flash, cause it also thinks there's only 180 degrees and everything past that is negative.

Google turns up contradictory evidence.

So my question, is there, specifically in programming/computer science, an accepted standard of where 0 should be? Or is it just whereever you decide?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

riggsninja posted:

Flash seems to think 0 is out the right (3 o'clock), and it goes counter-clockwise. But I don't fully trust flash, cause it also thinks there's only 180 degrees and everything past that is negative.

This is how it's typically done in mathematics. If you choose anything else, then the cos and sin functions won't have their traditional meanings.

Edit: I guess if your origin is in the upper-left instead of the lower-left corner, then having zero degrees point to the right with positive degrees moving clockwise is reasonable.

ShoulderDaemon fucked around with this message at 06:41 on Feb 19, 2009

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

ShoulderDaemon posted:

This is how it's typically done in mathematics.
Indeed, the "3 o'clock" 0 is how it always is. Not to put too fine a point on it, but taking some time to understand how the unit circle works will help immensely, especially this image.

Dijkstracula fucked around with this message at 07:19 on Feb 19, 2009

hey mom its 420
May 12, 2007

I would start it at 3 o'clock but then instead of going counter-clockwise, I'd go clockwise, because the y axis is flipped. If you start at 0 (that's 3 o'clock) and then turn by 45° and go forward, you should be going into a positive y and a positive x.

spiritual bypass
Feb 19, 2008

Grimey Drawer

narbsy posted:

Of all languages you could mention for scripting, why PHP?

I've used Perl and Python before for some small stuff, but I use PHP all day at work, so it's a natural choice for me. It's easy to use and the programs work well, so why not?

SnackinStarfish
Feb 27, 2007

How do I create an Excel formula to delete all text to the left of the first digit of a cell?

For example, I would like to turn this:
Backpacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55, 163, 190–192, 351

Into this:
55, 163, 190–192, 351

with a formula. Is this possible?

Adbot
ADBOT LOVES YOU

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

royallthefourth posted:

I've used Perl and Python before for some small stuff, but I use PHP all day at work, so it's a natural choice for me. It's easy to use and the programs work well, so why not?
Suggesting PHP to a beginner (or even seeming to) is quite simply not a very nice thing to do, thanks to the heaps of things that are wrong with it. It's not a bad idea to learn it, but it certainly should not be one of the first languages one learns when starting out with programming.

Mithaldu fucked around with this message at 02:21 on Feb 21, 2009

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply