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
Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell


If you care less about words than strings of characters you can also use:

Python code:
>>> line = "apple maybe foobar bazbing pie"
>>> 'apple' in line
True
That will match 'apple' when it's part of other words though, so it depends on if you care about that.

Adbot
ADBOT LOVES YOU

Tres Burritos
Sep 3, 2009

Orzo posted:

Oops, sorry, no it wouldn't and I read your original question incorrectly, I didn't see that you had to actually list the sets. But, at least it verifies your count!

Nah, you read it right. I was just checking to make sure I wasn't missing a painfully obvious solution that was different from mine. Also that my number of states was correct.

nielsm posted:

Well yes it will.

Yeah, I just got the "actual" count and list by doing it like I said and treating them as a 7 digit base 3 number. That way the class for a set can even have a nice numerical value for sorting / searching in lists as well as whatever other bullshit I want.

Thanks for all the help.

biochemist
Jun 2, 2005

Who says we don't have backbone?
Did anyone give the Facebook Hacker's Cup a try this year? I made it past the qualifying rounds but that's as far as I'm going. It was rough! I'm self taught and don't have much experience with thinking in algorithms, so it was a pretty exciting exercise. The first round was simple enough, but the second round they made their test inputs HUGE and I guess it really tests how efficient your program runs. I wrote in PHP since it's what I know best, and although my sample inputs ran in milliseconds, it choked on the actual input for each of the problems.

Are there any similar competitions/problem sets online somewhere that I can work through? I always pay attention to efficiency in my JavaScript and things like that, but this took it to a new extreme and I'm really interested in learning more.

ToxicFrog
Apr 26, 2008


Project Euler, perhaps? It's a (large) series of math-focused programming problems. In most cases, there'll be an "easy" version of a problem that can be brute-forced, and then a "hard" version later on that's the same type of problem but with a much larger input, requiring a more elegant approach.

The Gripper
Sep 14, 2004
i am winner

Orzo posted:

Hey, I know I already responded to this earlier, but could you possibly elaborate on this? Could you show me what part of the docs suggests this? I've browsed through them too, but I don't remember seeing anything that suggests returning functions inside functions is invalid.
I meant that to apply to this specific case because of how luanet is manipulating the GC (so that it doesn't collect managed references) but honestly there's a lot of weirdness happening in there so I'm not so sure about that any more. I can't think of a good reason why assigning your object to a variable in Lua would allow it to properly remove it from the table, for example, so there's definitely more going on under the hood.

Wolfgang Pauli
Mar 26, 2008

One Three Seven
What's the general opinion of Codecademy around here? I recently came back to it and it seems to have gotten out of its growing pains. It doesn't crash and everything seems to work properly now. Is it worth my time? Will I actually get anything out of it beyond a too-basic-to-do-anything familiarity? I'm burning through JS, but I think that's mostly the C I learned during my Math degree.

Doctor w-rw-rw-
Jun 24, 2008

biochemist posted:

Did anyone give the Facebook Hacker's Cup a try this year? I made it past the qualifying rounds but that's as far as I'm going. It was rough! I'm self taught and don't have much experience with thinking in algorithms, so it was a pretty exciting exercise. The first round was simple enough, but the second round they made their test inputs HUGE and I guess it really tests how efficient your program runs. I wrote in PHP since it's what I know best, and although my sample inputs ran in milliseconds, it choked on the actual input for each of the problems.

Are there any similar competitions/problem sets online somewhere that I can work through? I always pay attention to efficiency in my JavaScript and things like that, but this took it to a new extreme and I'm really interested in learning more.

I did. I was traveling, so I only did the beautiful strings, which was pretty easy. I used a regex to filter out non-alphabet characters, lowercased all of the characters, then constructed a multiset (using Guava) that counted the occurrence of each letter. From there it was a simple mater of iterating over it in sorted order from most occurrences to least. Totally used the poo poo out of Guava to do the hard stuff, so I'm not sure if I'll continue doing more.

biochemist
Jun 2, 2005

Who says we don't have backbone?

Doctor w-rw-rw- posted:

I did. I was traveling, so I only did the beautiful strings, which was pretty easy. I used a regex to filter out non-alphabet characters, lowercased all of the characters, then constructed a multiset (using Guava) that counted the occurrence of each letter. From there it was a simple mater of iterating over it in sorted order from most occurrences to least. Totally used the poo poo out of Guava to do the hard stuff, so I'm not sure if I'll continue doing more.

Nice. I used a PHP sanitize string function to remove non-alphabet characters, exploded them into an array, and counted them up into another array, then pretty much did what you did.

Round 1 (I think they were calling the round with Beautiful Strings the qualifying round) had problems that you had to think a little bit harder about solutions for.

One question involved calculating how many possible positions you could place an image on a monitor without the image falling on a dead pixel. The test cases were along the lines of a 4x4 pixel monitor with 1 dead pixel and a 1x1 pixel image. I way overthought it and iterated through all of the possible starting positions and didn't count them if they fell on a dead pixel- my local server timed out when the real inputs involved 1,000,000 x 1,000,000 pixel monitors. I think the real solution would have been

(width of monitor - width of image) x (height of monitor - height of image) for total number of starting positions

and then for each dead pixel, you lose all of the starting positions north and west of the dead pixel by the width and height of the image (unless they go outside of X=0 or Y=0).

It's a much easier solution than what I baked up, but I hit the ground running and started writing code before I really thought about the bounds of the inputs. Pretty cool exercise though, it really reinforces a lot of best practices that you read about but don't get many chances to implement.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

biochemist posted:

and then for each dead pixel, you lose all of the starting positions north and west of the dead pixel by the width and height of the image (unless they go outside of X=0 or Y=0).
You also have to handle dead pixels which are fewer pixels than the image size apart.

nielsm
Jun 1, 2009



Plorkyeran posted:

You also have to handle dead pixels which are fewer pixels than the image size apart.

Just position the image such that the dead/stuck pixels are over where it should be that color anyway :D

Doctor w-rw-rw-
Jun 24, 2008
Oh poo poo, I missed Round 1. I got pretty caught up in writing a League of Legends game file parser in Go. :cripes: Oh well.

tarepanda
Mar 26, 2011

Living the Dream
I've got a custom-built appliance that I need to make an interface for. I have a manual (in Japanese, ugh) with specifications for packets, but the problem is that I've never done anything this low-level before and don't even know what keywords I should be looking for.

The commands have a STX, command, data length, flags, ETX, BCC.

Responses have STX, ACK, data length, error code, ETX, BCC.

What do all of those abbreviations mean? What are some terms I should be googling for to find good documentation for this kind of thing?

Will scapy be useful for this?

I have zero clue where to start...

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
How about programming conferences? Last year I did Microsoft TechEd, which wasn't as interesting as I had hoped. There was a little too much general IT in it, and most of the .NET stuff was talking about the new async/await syntax in the same way, over and over. So I was hoping for something else. It doesn't even have to be as huge.

I was looking down a generic list of upcoming events and saw Code Palousa:
http://lanyrd.com/2013/codepalousa/

At least by topic, it seems kind of interesting. Is there anything for general software development conferences I should be thinking about? I'm interested in technologies, techniques, planning stuff, kind of the whole discipline. I would prefer something that isn't too focused on one language.

The Gripper
Sep 14, 2004
i am winner

tarepanda posted:

I've got a custom-built appliance that I need to make an interface for. I have a manual (in Japanese, ugh) with specifications for packets, but the problem is that I've never done anything this low-level before and don't even know what keywords I should be looking for.

The commands have a STX, command, data length, flags, ETX, BCC.

Responses have STX, ACK, data length, error code, ETX, BCC.

What do all of those abbreviations mean? What are some terms I should be googling for to find good documentation for this kind of thing?

Will scapy be useful for this?

I have zero clue where to start...
STX/ETX are start and end markers for text (though not actually limited to text), ACK is an acknowledgement message, and BCC I assume is something similar to what is mentioned in this document (block-check character used to checksum data between STX and ETX markers).

I've done a fair amount of work in interfacing with old in-house protocol and from how varied things can be it's hard to say whether Scapy suits the job or not, though from the look of it I can't imagine there's much it can't do.

If you're lucky you'll be dealing with a common transport protocol (TCP/IP or IPX or UDP) and your actual interface will be entirely represented in the packet payload, which is amazingly easy work if you have all that documented.

My recommendation would be to look into something like Wireshark and capture some actual traffic to and from your appliance to client, and see if you can derive any additional knowledge from that. IIRC the *standard* STX and ETX values are 0x02 and 0x03 (possibly both preceded by a DLE 0x10) and ACK is 0x06, though depending on how rowdy your appliance developers were it could be anything, but those are good values to look for to start with.

The Gripper fucked around with this message at 23:24 on Feb 5, 2013

biochemist
Jun 2, 2005

Who says we don't have backbone?

Plorkyeran posted:

You also have to handle dead pixels which are fewer pixels than the image size apart.

How would you do this efficiently? Add each bad starting loc to an array and count unique entries in it? Do it mathematically somehow?

The Gripper
Sep 14, 2004
i am winner

biochemist posted:

How would you do this efficiently? Add each bad starting loc to an array and count unique entries in it? Do it mathematically somehow?
Was the question facebook asked to determine how many times you can fit an image into a given screen, avoiding dead pixels (i.e. all images on the screen at the same time, what is the maximum number of images you could place) or just how many different places could a single image be placed where that one image doesn't overlap a dead pixel?

If it's the former then I hate the question (I dealt with nesting algorithms in sheet metal manufacture and it's a huge processing time vs. accuracy problem).

If it's the latter then you shouldn't need to bother with handling dead pixels which are close together specifically, since blacklisting pixels left and up from each dead pixel the width and height of the image would result in no leftover non-blacklisted pixel where an image could be placed that would overlap with a dead pixel.

So I'd subtract the number of pixels in the blacklisted region from the 1 trillion pixel total (1 million x 1 million), determine edges of the screen where an image can't be placed due to exceeding screen boundaries, and subtract pixels that haven't already been subtracted by the dead pixel blacklisting part. Result should be the count of pixels where placing an image wouldn't overlap with a dead pixel or screen boundary.

Good chance I've gotten some assumption there wrong, though!

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

biochemist posted:

How would you do this efficiently? Add each bad starting loc to an array and count unique entries in it? Do it mathematically somehow?

Given: a screen of H x W and an image of h x w.
For each dead pixel (x,y), queue up an event that turns it off at time x and turns it back on at time x+w. (I am assuming that pixels are 0-indexed.) Also queue up an end-of-screen event at time W.
You will be keeping a sorted multiset D of "currently" dead rows. For an event at time t, D will tell you the rows an image beginning at x-w (that is, not reaching all the way into column t) cannot overlap. Seed this set with -1 and H to represent the top and bottom of the screen.
You will need to remember the last time tprev of an event. This starts at 0.
You will also need to remember total, the running total of allowed image locations, also obviously starting at 0.
For each event:
1. If the time is less than w, or if t = tprev, just skip to step 5.
2. Compute the total number of valid top-of-image rows given the currently-dead rows in D:
2a. For each successive gap (between entries y0 and y1) in D, this is min(y1-y0-h, 0). You need only consider each multi-entry once.
3. Multiply this sum by t - tprev, the number of columns configured exactly like this.
4. Add that result to total.
5. If the event is the end-of-screen event, stop; the final result is total.
6. Otherwise, add or remove a dead row from D as required by the event.
7. Set tprev to t.

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news
I'm writing a .NET/C# thing that sets up Sublime Text 2 with GCC for programming/building in C, to make things simple for my poor undergrad friends who find this poo poo hard

I'm trying to get the sublime text build system working so it builds and then executes a single C file, however I'm having trouble getting the "and execute" part to work well:

so far i've got:

code:
{
	"cmd" : ["gcc", "$file_name", "-o", "${file_base_name}.exe", "-std=c99"],
	"selector" : "source.c",
	"shell":true,
	"working_dir" : "$file_path"
}
... which works great for just compiling

if I use:

code:
{
	"cmd" : ["gcc ${file} -std=c99 && start a /wait"],
	"selector" : "source.c",
	"shell":true,
	"working_dir" : "$file_path"
}
This builds then runs the file in a new cmd window, and interacts with the stdin/stout properly so you can use scanf etc to read poo poo in - however the command window immediately exits after the program finishes executing (despite the /wait flag implying it might do that, it doesn't), which isn't very useful if you're actually trying to interact with it (obviously I could avoid this by using Sleep() but that's a less than ideal solution)

If I simply start it, the stdout stuff gets redirected to the sublime text shell thing properly, but it doesn't let you interact with it


code:
{
	"cmd" : ["gcc ${file} -std=c99 && a"],
	"selector" : "source.c",
	"shell":true,
	"working_dir" : "$file_path"
}
Is there a way of doing this simply?

Since I'm writing a .NET thing to stick all this in place, i suppose i could generate an appropriate batch file with all the paths and poo poo correctly generated on the fly, but that would a) be loving annoying and hard and b) be a poo poo solution anyway since you end up with shell windows all over the place every time you compile with errors



e: ahahaha literally after posting it i cracked this. You gotta use
code:
start cmd /K a
and it works. gg

Mr SuperAwesome fucked around with this message at 19:30 on Feb 6, 2013

nielsm
Jun 1, 2009



If your friend can't learn to open a console window, switch directory and type 'make poo poo' to get poo poo.c compiled then maybe he should find another line of study. Basic use of make is really simple and you shouldn't be writing C if a command line gives you nightmares.

biochemist
Jun 2, 2005

Who says we don't have backbone?

Seeing how a couple of people have expressed interest, I figured I'd post this write-up that I found through the Facebook group.

http://notes.tweakblogs.net/blog/8674/facebook-hacker-cup-2013-round-1-problem-analysis.html

Wolfgang Pauli
Mar 26, 2008

One Three Seven
Cross-posting this from the Game Dev thread in Games. UC Berkeley is going to be doing AI and graphics programming courses through edX. AI starts a week from Monday, graphics programming a month from then.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
Got a licensing question. (I think there used to be a thread for it, but I guess it got archived)

I'm using a modified (stripped-down) form of some Apache projects. This means I have to add a notice to every modified file that I have modified it. How exactly is this notice supposed to be worded, and where do I put it?
As an example, this is one of the files I've modified locally.

armorer
Aug 6, 2012

I like metal.
The file you linked is released under the Apache 2 license. The first thing to note is that the clause in that license regarding derivative works only really applies if you are redistributing the derivative work. If you aren't distributing it, then you are free to modify it as you see fit without worrying about clearly marking the changes. Assuming you are redistributing it then you need to follow the rules in section 4:

quote:

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

You must give any other recipients of the Work or Derivative Works a copy of this License; and

You must cause any modified files to carry prominent notices stating that You changed the files; and

You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

All it really says that pertains to your question is that you have to clearly mark the files you've changed (I would do this with an obvious comment at the top of the file). If your change was to remove files, then you should put a new file in (possibly in the NOTICE file they mention) indicating what you carved out.

I am not a lawyer, but following those general guidelines has been enough to satisfy people doing due diligence before investing large amounts of money at previous places I have worked.

Edit: spelling, grammar

armorer fucked around with this message at 19:48 on Feb 8, 2013

Doctor w-rw-rw-
Jun 24, 2008

Wolfgang Pauli posted:

Cross-posting this from the Game Dev thread in Games. UC Berkeley is going to be doing AI and graphics programming courses through edX. AI starts a week from Monday, graphics programming a month from then.

The AI class is CS188, taught by Dan Klein, who is a fantastic instructor. Highly recommended.

Munkeymon
Aug 14, 2003

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



Wolfgang Pauli posted:

Cross-posting this from the Game Dev thread in Games. UC Berkeley is going to be doing AI and graphics programming courses through edX. AI starts a week from Monday, graphics programming a month from then.

It has a stats prereq and I never took stats. Should I go through the stats class first or will it be simple enough to pick up along the way?

Doctor w-rw-rw-
Jun 24, 2008

Munkeymon posted:

It has a stats prereq and I never took stats. Should I go through the stats class first or will it be simple enough to pick up along the way?

If you have a really, really solid grasp of probabilities then you might be able to scrape by. If not, you'll need to study up and review beforehand and make sure you've got them down, or,you'll get pretty lost. It's not that it gets hyper-mathematical, but the midterms and finals were absolutely loving brutal if you didn't have them down, since a lot of the material does need a solid grasp of probabilities.

Munkeymon
Aug 14, 2003

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



Doctor w-rw-rw- posted:

If you have a really, really solid grasp of probabilities then you might be able to scrape by. If not, you'll need to study up and review beforehand and make sure you've got them down, or,you'll get pretty lost. It's not that it gets hyper-mathematical, but the midterms and finals were absolutely loving brutal if you didn't have them down, since a lot of the material does need a solid grasp of probabilities.

I can calculate my odds of winning the lottery, but I'm guessing that doesn't quite cut it. Guess I could take the stats class and watch out for more relevant stuff later.

LiterallyAnything
Jul 11, 2008

by vyelkin
This is a javascript question-

Trying to round a variable up with this code:

code:
  timeElapsed = 35;
  
  if(timeElapsed <= 15)
    {
	timeElapsed = 1;
    }
  else
    {
    	timeElapsed /= 15;
   	Math.ceil(timeElapsed);
    } 
  
  total += (timeElapsed * 0.25);
The code is giving me the value of (2.33 * .25) instead of (3 * .25). Does Math.ceil only work with numbers and not variable names? If so, how do round a variable up?

Jewel
May 2, 2009

Brady posted:

This is a javascript question-

Trying to round a variable up with this code:

code:
  timeElapsed = 35;
  
  if(timeElapsed <= 15)
    {
	timeElapsed = 1;
    }
  else
    {
    	timeElapsed /= 15;
   	Math.ceil(timeElapsed);
    } 
  
  total += (timeElapsed * 0.25);
The code is giving me the value of (2.33 * .25) instead of (3 * .25). Does Math.ceil only work with numbers and not variable names? If so, how do round a variable up?

Probably because you have to set timeElapsed to the ceil value. So replace that line with timeElapsed = Math.ceil(timeElapsed);

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Brady posted:

This is a javascript question-

Trying to round a variable up with this code:

code:
  timeElapsed = 35;
  
  if(timeElapsed <= 15)
    {
	timeElapsed = 1;
    }
  else
    {
    	timeElapsed /= 15;
   	Math.ceil(timeElapsed);
    } 
  
  total += (timeElapsed * 0.25);
The code is giving me the value of (2.33 * .25) instead of (3 * .25). Does Math.ceil only work with numbers and not variable names? If so, how do round a variable up?
Math.ceil returns the value you want, but it doesn't not alter the variable that is passed in. That number is passed by value, not by reference

timeElapsed = Math.ceil(timeElapsed / 15)

LiterallyAnything
Jul 11, 2008

by vyelkin
I see. Thanks for the help guys.

shrughes
Oct 11, 2008

(call/cc call/cc)
Javascript doesn't have pass by reference at all.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
I have a workflow problem that's been driving me nuts lately. I do development on a cross-platform codebase that I can run locally on my laptop, and also on our Solaris server at the office. Often times during execution of the program, an error will pop up that doesn't happen because of platform differences. Whether its memory alignment or endianness issues, I have to debug it. Unfortunately, this happens a lot when I'm at home on the weekend while the process is running (it's a data compiler for geospatial data), and it takes a long time to run.

I've found that vim runs terribly slow on the Solaris server. Not sure why, maybe it's my gigantic vim configuration, but it seems like a lot of disk access is slow on the server. Syntax highlighting is dog slow on large files, etc. etc. and it's near impossible to work on it. So majority of the time I just mount the codebase over NFS and edit the files locally. This works great, however, when I'm at home, NFS remote mount is out of the question. I COULD keep pushing to the git repo, but that means a ton of pushes while I debug, then finally rebasing all the changes and making them into a single commit. Having to constantly push for a few line changes is driving me up the wall.

Any suggestions for a workaround on this? Or am I just going to have to suck it up?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Can you remote into your workstation and work on stuff from there? Or is your workstation your laptop, and you're worried about latency with NFS-mounting stuff at home? Or are you able to SSH into the server from anywhere, but can only mount the drive over NFS from the office?

You could set up some autocmds to sync changed files to the server whenever you write them locally, or something.

MrMoo
Sep 14, 2000

Is your home network connection really slow? SSHFS with compression might suffice.

Suck it up with Solaris vi would be the most convenient.

Azerban
Oct 28, 2003



Had a question about a Windows batch file. I'm trying to run a file from it, and I'm doing something like;

code:
call my.exe !FLAG!
which works all well and good, until the flag has a space in it. When FLAG contains something like
code:
/thing="(some stuff)"
, it's supposed to jam '(some stuff)' into a registry value called 'thing', but all I get is '(some'. I've tried to escape the poo poo out of that space, but nothing works. Running 'my.exe /thing="(some stuff)"' works perfectly fine from the command prompt. What have I done wrong?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Jabor posted:

Can you remote into your workstation and work on stuff from there? Or is your workstation your laptop, and you're worried about latency with NFS-mounting stuff at home? Or are you able to SSH into the server from anywhere, but can only mount the drive over NFS from the office?

You could set up some autocmds to sync changed files to the server whenever you write them locally, or something.

My workstation is my laptop, and latency over NFS would be a problem. However, this post got me thinking of a solution, we have a VMware server that has a bunch of test servers I can use to access vim from and mount the NFS share. I can do everything I need without having to do a bunch of git commits.

Now I don't have to figure out why vim on Solaris is so damned slow, or waste my time trying to get decent performance in a text editor.

Jethro
Jun 1, 2000

I was raised on the dairy, Bitch!

Azerban posted:

Had a question about a Windows batch file. I'm trying to run a file from it, and I'm doing something like;

code:
call my.exe !FLAG!
which works all well and good, until the flag has a space in it. When FLAG contains something like
code:
/thing="(some stuff)"
, it's supposed to jam '(some stuff)' into a registry value called 'thing', but all I get is '(some'. I've tried to escape the poo poo out of that space, but nothing works. Running 'my.exe /thing="(some stuff)"' works perfectly fine from the command prompt. What have I done wrong?
I think you need to put an additional set of quotes around the whole thing.
code:
call "my.exe /thing="(some stuff)""

Wolfgang Pauli
Mar 26, 2008

One Three Seven
In addition to the edX courses I already posted, Coursera is offering part 1 of the Algorithms class they run through Princeton. It's Java-based and is going to cover searching and sorting. It's already begun and the first assignments are due in a week, so jump in before then. Part 2 starts next month and is going to get into Algorithms of Note that carry fancy names like Dijkstra and Kosaraju.

Adbot
ADBOT LOVES YOU

Azerban
Oct 28, 2003



Jethro posted:

I think you need to put an additional set of quotes around the whole thing.
code:
call "my.exe /thing="(some stuff)""

One of the billion things I tried. I buckled and rewrote the drat thing in Powershell, problem solved.

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