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
gib
Jul 14, 2004
I am probably Lowtax
I'm used to 1920x1200. I started playing with VirtuaWin to see if I can get used to the whole multiple desktop thing.

I was more specifically wondering about IDE/editors that keep clutter down. Anyone tried Sublimetext? I've mostly been using stuff like Eclipse and VS, but I wouldn't mind dropping some features and clutter if it didn't mean going down to just Notepad2.

gib fucked around with this message at 20:47 on Sep 29, 2010

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


1280x800 crew checking in.

Not windows, though, so I just use 3x7 virtual desktops and Guake, with JEdit for editing.

His Divine Shadow
Aug 7, 2000

I'm not a fascist. I'm a priest. Fascists dress up in black and tell people what to do.
I'm not sure where the problem is here but it's driving me up the wall.

I am trying to do a simple SQL insert but the results are garbled in one field of the database. It's a currency field in an Access database and if I insert something where that field has a value of say "131,60" then it turns into "13 160,0000" in the database. I have no idea why this is happening as the database itself uses commas as decimal separator too and if I try using a dot instead I get a mismatch error.

Access 2000 database running on a Win2k3 server.

FateFree
Nov 14, 2003

Was hoping one of the linux guru's can help me out with this one. I know none of linux and I'm finding myself doing the same thing manually when deploying my web application. Could someone write me a quick script to help with my deployment?

My directory structure is:
/deployment
/public_html-webapps

What I would like to do is upload a war file to the /deployment folder manually (say application.war), and then have the script do this:

1) unzip application.war into /deployment/application/
2) rename the existing /public_html-webapps/application to /public_html-webapps/application_$(todays date or time)
3) move /public_html-webapps/application_$(todays date or time) to /deployment/backup/application_$(todays date or time)
4) move the unzipped /deployment/application/ to/public_html-webapps/application/

Sounds trivial but I'd appreciate it if this is cake for someone else.

ToxicFrog
Apr 26, 2008


There's two important questions you need to answer first:
- what the hell is a war file?
- why are you creating backups by copying the folder rather than using a version control system (like git) or backup program (like duplicity)?

spiritual bypass
Feb 19, 2008

Grimey Drawer

ToxicFrog posted:

- what the hell is a war file?

...and what is it good for?

mr_jim
Oct 30, 2006

OUT OF THE DARK

rt4 posted:

...and what is it good for?

Absolutely nothing.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

mr_jim posted:

Absolutely nothing.

Say it again.

baquerd
Jul 2, 2007

by FactsAreUseless
A war file is typically used by Tomcat et al., it's just an archive format. I think the problem he's going to have is Tomcat is going to choke and die when he tries to do an in-place swap of the web application folder without shutting down the server.

FateFree, here's what you should do: get something like CVS or SVN and put all the files that go into the WAR file in it. Congratulations, you now have complete version history on everything and you don't have to dig through folders to find specific versions.

Then get a makefile that creates your WAR, and drop it in /public_html-webapps If, like I'm assuming, that's the root of a JSP server container it may very well auto-expand and run the new app, that's what Tomcat does anyway.

Painless
Jan 9, 2005

Turn ons: frogs, small mammals, piles of compost
Turn offs: large birds, pitchforks
See you at the beach!
War file. War file is read only.

FamDav
Mar 29, 2008
I have some general assembly compilation questions.

1) My professor (who is out of town, otherwise I'd be asking him instead) gave us this as an example assembly code http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/sum1to5/sum1to5b_s.txt .

However, when I try and compile it on my machine (mac intel osx), I get a linker error " _main", referenced from: blahblahblah". What do I have to sacrifice to get this to compile?

2) He gave us another set of examples, http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/asmprog/asmprog_s.txt and http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/asmprog/main_c.txt . Again I compile, again I get a linker error. Google is of no use because all it wants to tell me is how I can inline this assembly code.

Anybody want to help a guy out?

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

FamDav posted:

I have some general assembly compilation questions.

1) My professor (who is out of town, otherwise I'd be asking him instead) gave us this as an example assembly code http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/sum1to5/sum1to5b_s.txt .

However, when I try and compile it on my machine (mac intel osx), I get a linker error " _main", referenced from: blahblahblah". What do I have to sacrifice to get this to compile?

2) He gave us another set of examples, http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/asmprog/asmprog_s.txt and http://www.cs.middlebury.edu/~schar/courses/cs202-f10/examples/asmprog/main_c.txt . Again I compile, again I get a linker error. Google is of no use because all it wants to tell me is how I can inline this assembly code.

Anybody want to help a guy out?

Most C compilers prepend an underscore to the names of functions with external linkage, a practice that goes back years and years. Since you're using gcc to assemble that code, it's still linking to the C startup code, so it expects C naming conventions for main. That means you need to name it _main instead.

The same goes for asmprog in your other example. Since your C code is calling a function with that name, the C code is actually assembled to call an externally linked function named _asmprog, so that needs to be the name of the label you use in your assembly source.

I wonder what platform he's on where those worked as provided.

Bozart
Oct 28, 2006

Give me the finger.
Apparently I am kml retarded. I can write lines and points that have timestamps associated with them, and I can put things in folders. For some reason, even though this polygon passes validation on some website, it doesn't show anything and only zooms in on antartica's anus. It is supposed to color in a part of alabama for one day. What am I doing wrong?
code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
 <Style id="PolyStyle80FFCB00">
  <PolyStyle>
   <color>80FFCB00</color>
  </PolyStyle>
 </Style>
 <Folder>
  <name>AL</name>
  <Folder>
   <name>NORTHERN VALLEY</name>
   <Placemark>
    <TimeSpan>
     <begin>2010-06-01</begin>
     <end>2010-06-02</end>
    </TimeSpan>
    <styleUrl>#PolyStyle80FFCB00</styleUrl>
    <Polygon>
     <outerBoundaryIs>
      <LinearRing>
       <coordinates>
         34.994999,-88.199997
... a lot of other points
         34.994999,-88.199997
       </coordinates>
      </LinearRing>
     </outerBoundaryIs>
    </Polygon>
   </Placemark>
  </Folder>
 </Folder>
</Document>
</kml>
edit:
Apparently it was ok except the coordinates had to be in lon,lat instead of lat,lon? I don't know what would cause that to happen, but otherwise things look good. That explains the antartica's anus problem.

Bozart fucked around with this message at 17:38 on Oct 2, 2010

Magicmat
Aug 14, 2000

I've got the worst fucking attorneys
I have a question about degrees.

I'm applying to transfer to a University of California and am trying to decide between computer science at UC San Diego or computer science at UC Berkeley. I prefer Berkeley, in part because of its prestige, but there's one snag: their comp sci degree is a BA, not a BS. Their BS program is part of their Electrical Engineering/Computer Science degree. This page explains it more clearly:

quote:

There is no difference in the CS course content between the B.S. and B.A. programs. The difference is in what else you take: mainly engineering, or mainly humanities and social sciences.

Even if I wanted to, I am unable to transfer into the EECS BS program at Berkeley.

San Diego's program is a traditional BS program.

Would getting a BA hinder me? I know most jobs call for a "BS in Computer Science or related field." Would they really care that I had a Cal CS BA? I imagine not, but all other things being equal, which would open more doors: A CS BS from UCSD or a CS BA from Cal?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Magicmat posted:

Would getting a BA hinder me?

No. As they said, your curriculum is what matters, not what your degree is called.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Nobody cares if it's a BS or BA and also nobody cares which school you went to unless it's DeVry or some other fake bullshit.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
I have to disagree with that, rt4. A lot of places do care what school you went to and I'm willing to bet some care about BA vs BS, although I don't believe my current employer does.

Bozart
Oct 28, 2006

Give me the finger.

Orzo posted:

I have to disagree with that, rt4. A lot of places do care what school you went to and I'm willing to bet some care about BA vs BS, although I don't believe my current employer does.

I think only the first place you work is going to care about which school you went to. After that you're best off networking.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Magicmat posted:

their comp sci degree is a BA, not a BS.

Had I noticed 'BA in Computer Science' on a resume before now, I would have assumed it was an uncaught typo*, so it might ding you on your first job if whoever is looking at your resume isn't familiar with the Berkley system. I'm betting that wouldn't be much of a problem out west, though.

*I don't have a great deal of experience in hiring people, so there's that, too

Daald
Mar 25, 2009
I do hiring for my company and we don't really care about BA/BS. We care that you got an education though. You would be surprised how many people that I interview can't even write a simple nested if loop.

I have a BA myself and the difference at my college was 1 extra math class. I didn't feel like staying an extra semester for that so I went BA at the last moment. I have been asked a few times why I didn't get a BS instead and given that explanation they agree with me that it is not worth it. Haven't seen many jobs that require me to know advanced linear algebra 2.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Daald posted:

I have a BA myself and the difference at my college was 1 extra math class. I didn't feel like staying an extra semester for that so I went BA at the last moment. I have been asked a few times why I didn't get a BS instead and given that explanation they agree with me that it is not worth it. Haven't seen many jobs that require me to know advanced linear algebra 2.
That sounds terrible. Was it really like they slapped on one more math course and made it into a 4.5 year program as a result? Or was that unique to your particular situation?

Daald
Mar 25, 2009

Rocko Bonaparte posted:

That sounds terrible. Was it really like they slapped on one more math course and made it into a 4.5 year program as a result? Or was that unique to your particular situation?


It was unique to my situation. I realized kind of late that something that I thought was an elective was actually required. I realized this when I was writing a graduation calculation program for the CS dept (on my last year).

PapaLazarou
May 11, 2008

Decadent Federation Swine!
Doing a project in which this c program needs to reconfigure it's radio. Unfortunately, the only interface is through http. Trying to write my own POST requests with information gleaned from a capture.

http://www.mediafire.com/?aljig4jboiur4p2
Here is the capture of my attempt. The first POST request I wrote works, however the second isn't even processed by Wireshark as http. I am not exactly sure why.

zarg
Mar 19, 2005

We are the Unity 3D community. You will be assimilated. Resistance is futile.
Just a preface: I'm currently stuck using the lua demo and not scite or anything, as I'm working on this from a PC that is so locked down that I cant run any exes on it. I have scite at home, but I've not tried this there yet as I've barely been home the last few days.

I am a total rookie trying to teach myself Lua, and I've been following along with some of the early tutorials on lua-users and trying to teach myself some basics. I've hit a bit of a snag with the function tutorial where I can't seem to replicate the very simple behavior they are talking about in this chapter. Here is what they have listed as the first example, with the last line being the expected result:

function foo(n) return n*2 end
= foo(7)
14

When I enter just the first line it compiles and runs just fine, obviously with no output. When I enter the second line it gives me an error reading "input:2: unexpected symbol near '='" What have I hosed up here? Is this just a symptom of using the demo? Is the tutorial outdated? Am I just a big retard? I was hoping I could run basic scripts through the demo to work on my fundamentals while I have some free time at work.

Sorry for being a totally new idiot to this :(

fankey
Aug 31, 2001

zarg posted:

Just a preface: I'm currently stuck using the lua demo and not scite or anything, as I'm working on this from a PC that is so locked down that I cant run any exes on it. I have scite at home, but I've not tried this there yet as I've barely been home the last few days.

I am a total rookie trying to teach myself Lua, and I've been following along with some of the early tutorials on lua-users and trying to teach myself some basics. I've hit a bit of a snag with the function tutorial where I can't seem to replicate the very simple behavior they are talking about in this chapter. Here is what they have listed as the first example, with the last line being the expected result:

function foo(n) return n*2 end
= foo(7)
14

When I enter just the first line it compiles and runs just fine, obviously with no output. When I enter the second line it gives me an error reading "input:2: unexpected symbol near '='" What have I hosed up here? Is this just a symptom of using the demo? Is the tutorial outdated? Am I just a big retard? I was hoping I could run basic scripts through the demo to work on my fundamentals while I have some free time at work.

Sorry for being a totally new idiot to this :(
The = may be a feature of the lua interactive interpreter - it's apparently not available in the online lua demo page. Try
code:
function foo(n) return n*2 end
print(foo(7))

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
The = with nothing to the left of it only works in the interactive interpreter on the command line.

zarg
Mar 19, 2005

We are the Unity 3D community. You will be assimilated. Resistance is futile.
Yes! I figured it was something like that. I tried replacing the "=" with "define," since earlier the tutorial mentioned that it was really just shorthand for define anyway. Of course, now that I think about it "print" is exactly what I wanted.

You guys are the best guys :) Now back to making a horrible mess of things until my head hurts... learning this from the ground-up is tough.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



This doesn't seem to be worth it's own thread, but I need help with some Management Speak to English translations.

http://www.spscommerce.com/company/careers.shtml lists a number of positions you can apply for without having any clue as to what they want as far as qualifications or experience.

Application Engineer vs Software Engineer
I don't think I'd qualify for either right now, but still: wtf?

Implementation Analyst – NI vs Implementation Analyst – TPI
I think they both mean 'code monkey', which I can do, but if I sent them an email, I assume I'd have to pick just one or it would look bad.

baquerd
Jul 2, 2007

by FactsAreUseless

Munkeymon posted:

Application Engineer vs Software Engineer
I don't think I'd qualify for either right now, but still: wtf?

Implementation Analyst – NI vs Implementation Analyst – TPI
I think they both mean 'code monkey', which I can do, but if I sent them an email, I assume I'd have to pick just one or it would look bad.

There's no industry standard here, you're going to need to ask them.

Based on my experience though:
An Application Engineer is going to be a product specialist, working on all tiers of their application and will assume a somewhat architectural role.

A Software Engineer is generally another name for a mid level programmer.

TPI - Test Process Improvement - means you're doing test suites all day, codemonkey would be a large promotion.

NI - New(?) Improvment - Just a guess, never heard this acronym before.

Mata
Dec 23, 2003
I'm trying to make a little program that lets me pause/play/mute/skip songs on a remote computer playing music in my apartment.
On a linux system it would be pretty trivial to send commands to alsamixer or xmms or whatever, but the system in question is a windows machine running spotify. I'm assuming there's no system call to change music playback.
A lot of new keyboards have extra buttons that control music and volume in this way, I figured the simplest way to make this program would be to fake one of those keypresses. I'm not sure how those key functions are implemented on the driver level and I'm not sure what to google for.. Can anyone clue me in?

e: Like usual, as soon as I post this I find what I'm looking for and it turns out someone's already done it, nice

Mata fucked around with this message at 15:14 on Oct 8, 2010

alanthecat
Dec 19, 2005

I need a solution to update Twitter from a desktop app. I'm thinking of a PHP script on my webspace that will deal with the oAuth stuff and then I can just http post to it. i.e. If I visit mywebserver.com/twitterservice.php it will make me log into Twitter and then store the oAuth key.

Seems simple enough, so simple that it's probably already been done. Anyone know? And is this the best place to ask?

ToxicFrog
Apr 26, 2008


zarg posted:

Yes! I figured it was something like that. I tried replacing the "=" with "define," since earlier the tutorial mentioned that it was really just shorthand for define anyway. Of course, now that I think about it "print" is exactly what I wanted.

'define' isn't a lua keyword; what it means by that is that something like 'x = 2' can be read as 'define x as 2'.

The leading '=' in the interactive mode is entirely different (and specific to the command line interpreter, not part of the lua language); it gets translated into 'return ', and in fact if you start the command line interpreter, type something like '= 2', and then hit uparrow to repeat the command, it'll list it as 'return 2'. And the interactive interpreter feeds anything you return to print() automatically.

quote:

You guys are the best guys :) Now back to making a horrible mess of things until my head hurts... learning this from the ground-up is tough.

Feel free to pop into #lua on Freenode, too; we're usually pretty laid-back. :)

Aluminum Record
Feb 2, 2008

When you rip off the breakaway pants, thrust your pelvis toward the bachelorette.
We're supposed to use templates in my data structures class (C++) rather than typedef statements, so that we can supply the data type when you declare an object of the class. But for some reason I keep getting this error

code:
...linkedlist.cpp(51) : error C2244: 'macs262_labs::LinkedList<Item>::removeFromList' : unable to match function definition to an existing declaration
1>        definition
1>        'bool macs262_labs::LinkedList<Item>::removeFromList(const Item &)'
1>        existing declarations
1>        'bool macs262_labs::LinkedList<Item>::removeFromList(const Item &)'
The declaration and definitions are exactly the freakin same...

In my header file:
code:
template <typename Item>
bool removeFromList(const Item& entry);
In my implementation:
code:
template <typename Item>
bool LinkedList<Item>::removeFromList(const Item& entry)
{
...
}
What gives?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Aluminum Record posted:

What gives?

From your snippets, it looks like you're declaring removeFromList as a member function template, when all you really want is a member function of a template. Get rid of the 'template <typename Item>' on the declaration.

EDIT: oh, and it's supposed to be ill-formed according to the standard to shadow template parameters like that; if your compiler had complained like it's supposed to, you'd have known what the problem was.

Aluminum Record
Feb 2, 2008

When you rip off the breakaway pants, thrust your pelvis toward the bachelorette.
Got it. Thanks!

zarg
Mar 19, 2005

We are the Unity 3D community. You will be assimilated. Resistance is futile.

ToxicFrog posted:

'define' isn't a lua keyword; what it means by that is that something like 'x = 2' can be read as 'define x as 2'.

The leading '=' in the interactive mode is entirely different (and specific to the command line interpreter, not part of the lua language); it gets translated into 'return ', and in fact if you start the command line interpreter, type something like '= 2', and then hit uparrow to repeat the command, it'll list it as 'return 2'. And the interactive interpreter feeds anything you return to print() automatically.


Feel free to pop into #lua on Freenode, too; we're usually pretty laid-back. :)

Awesome, that you very much :) I will pop on next time I feel like putting my head through a wall over something insanely simple. (soon)

edit: God figuring stuff out on your own is so satisfying. Why have I waited so long to start learning this?!

zarg fucked around with this message at 02:25 on Oct 9, 2010

zarg
Mar 19, 2005

We are the Unity 3D community. You will be assimilated. Resistance is futile.
Here is another really simple Lua question. I'd ask in MIRC, but I dont have access from work :downs: Basically I want to create a high-card simulator where I call math.random twice each "round," the decide which draw won and give a "point" to the winning player. I've just started, and I've hit a snag when using functions to define which player "owns" each draw. Here is what I have so far. Yes, I plan to write to plan for ties as well, but 1 thing at a time :)

code:
print "Welcome to my horrible high card simulator!"
print "Player 1's draw:"
function a(n) return n end
print(a(math.random(13)))
print "Player 2's draw:"
function b(n) return n end
print(b(math.random(13)))
if a>b then print("Player 1 wins!") end
if b>a then print("Player 2 wins!") end
My output is as follows
code:
Welcome to my horrible high card simulator!
Player 1's draw:
11
Player 2's draw:
6
input:8: attempt to compare two function values
Should I not use functions here? If so, what should I use instead to ensure I can determine a "winner" for each round? Or am I just calling them in an incorrect fashion on my last lines? Is there a way to just call the line of code that a and b print their results on instead of calling the function itself?

EDIT: Bolded for lesson learned. Really super basic high-card game complete! God drat I was over-thinking that. Tomorrow's project will be assigning names to all the cards, so 1=ace, 13=king etc.

code:
x = 0
y = 0
print "Welcome to my horrible high card simulator!"
repeat
Player1 = "Player 1's Score:" 
Player2 = "Player 2's Score:"
print(Player1)print(x)
print(Player2)print(y)
print "Player 1's draw:"
a = math.random(13)
print(a)
print "Player 2's draw:"
b = math.random(13)
print(b)
if a>b then print("Player 1 wins!") end
if a>b then x=x+1 end
if b>a then print("Player 2 wins!") end
if b>a then y=y+1 end
until x==5 or y==5
if a>b then print("Player 1 has, through random chance, won the game!") end
if a<b then print("Player 2 has, through random chance, won the game!") end
print("Thanks for 'playing,' if you can call it that.")

zarg fucked around with this message at 07:54 on Oct 9, 2010

Orbis Tertius
Feb 13, 2007

What's the appropriate thread for C# questions? I'm not seeing a 'C# questions not worth their own thread' thread, or my eyes are broken. I'm trying to hack together some Office/Word automation using Microsoft.Office.Interop.Word...is that a .NET thing?

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
.Net Questions Megathread Part 2 would be the place to go with that.

Adbot
ADBOT LOVES YOU

Orbis Tertius
Feb 13, 2007

thanks!

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