|
I couldn't find the answer to this on google so I thought I would ask it here. It's an excel question so if it doesn't belong here I'll ask somewhere else. I have my entire worksheet set up for color banding using conditional formatting, but I want blank cells to not be banded, that is I only want a cell to be colored once something is in it. I've tried =isblank(address(row(),column())) and isnontext, istext, but those don't seem to work. Can someone help me out? Thanks. EDIT: I figured it out and learned something about conditional formatting on the way! all right! pankus fucked around with this message at 19:38 on Aug 8, 2008 |
# ? Aug 8, 2008 17:05 |
|
|
# ? May 13, 2024 22:37 |
|
fankey posted:Does anyone know if it's possible to block Windows svn clients from getting a particular directory? We share a common code base between Linux and Windows and some of the Linux files are different by case only. Of course that makes a checkout fail on Windows. There's no reason for Windows to get that particular directory but the source tree is structured such that it would be too complicated to manually get around it. The only way I know of is to do it per-user, or a user group, since there's not really any way for the repo to know for sure otherwise what client you're using.
|
# ? Aug 8, 2008 17:59 |
|
I'm doing my first Ruby on Rails project and I'm stuck with some quirky behavior. I'll try my best to describe the problem: System A: my RoR server (my iMac) System B: some other system running Java System B receives messages and dispatches them to various systems. One of those systems is System A. It uses POST to send the data as text/xml to a specific url. Problem: I'm not seeing the data. I've verified that the XML is being sent with a packet sniffer but nothing is coming up in logs. I've logged params and I get: Processing someclass#received (for 192.168.xxx.xx at 2008-08-08 13:55:11) [POST] Session ID: e193a41d387440baaac4070c029e1651 Parameters: {"action"=>"received", "controller"=>"processor"} actionreceivedcontrollerprocessor Rendering processor/received Completed in 0.00148 (673 reqs/sec) | Rendering: 0.00065 (43%) | 200 OK [http://192.168.xxx.xx/processor/received] I've tried feeding it data via telnet: Parameters: {"xml"=>"alala", "action"=>"received", "controller"=>"processor"} where the data is <xml>alala</xml> Maybe I'm missing something but where can I access the XML data in the controller?
|
# ? Aug 8, 2008 19:52 |
|
Edit: Got it.
OneEightHundred fucked around with this message at 19:20 on Aug 14, 2008 |
# ? Aug 11, 2008 05:55 |
|
Edit: Found a PHP thread.
|
# ? Aug 11, 2008 18:45 |
|
never mind, figured it out
Emo.fm fucked around with this message at 00:16 on Aug 12, 2008 |
# ? Aug 11, 2008 23:39 |
|
On a complete aside, we set up a last.fm group http://www.last.fm/group/cobol
|
# ? Aug 14, 2008 09:50 |
|
This is in Javascript. So I got 2 2D arrays. One stores the month and the day, with the month being in the first position and day being in the second. myArray[0] would be 10,1--specifically, myArray[0][0] = 10, myArray[0][1] = 1 for October 1. myArray[1] would be a different date and so on. I'm trying to transfer these into another 2D array that is categorized by the month and days. Kinda like so: var hello = { 0 : [], 1 : [], 2 : [], 3 : [], 4 : [], 5 : [], 6 : [], 7 : [], 8 : [], 9 : [], 10 : [], 11 : [] }; Basically, I would want myArray[0] to be in hello[10][0] and so on for subsequent dates. I'm having trouble with this part. I was thinking that double for-loops should be used but I'm not sure. I've been programming for less than a year and am not really good at explaning things so bare with me.
|
# ? Aug 15, 2008 23:47 |
|
Geno posted:I've been programming for less than a year and am not really good at explaning things so bare with me. I have no idea what the gently caress you're trying to do. Try telling us what you want to do in words rather than code.
|
# ? Aug 16, 2008 00:49 |
|
Also those aren't even arrays, they're objects.
|
# ? Aug 16, 2008 00:52 |
|
Yeah, usually it's better if you tell us what you're actually trying to achieve overall (for instance: I want to find all the Sundays that fall on even dates or something) instead of asking how to solve your problem in a very specific way which just might be wrong. JavaScript has pretty decent date handling functions for messing around with the calendar and such.
|
# ? Aug 16, 2008 01:52 |
Am I handling this problem in the wrong way? I have a somewhat math intensive raycasting function. The most expensive step right now is determining what occluding surfaces are within range of the light. I tried using quadtrees to limit down the size of the search area, but there's the issue of light beams crossing boundaries. Should I be using some other method like binary space partitioning or vistrees?
|
|
# ? Aug 16, 2008 07:52 |
|
Geno posted:So I got 2 2D arrays. One stores the month and the day, with the month being in the first position and day being in the second. myArray[0] would be 10,1--specifically, myArray[0][0] = 10, myArray[0][1] = 1 for October 1. myArray[1] would be a different date and so on. If you can do myArray[0] to return a number, how come you can also do myArray[0][1]? If myArray[0][1] is possible, then myArray[0] should return an array (or object, whatever you want to call it), not a number.
|
# ? Aug 16, 2008 12:14 |
|
...yeah, definitely failed in trying to explain my problem, sorry about that. What I'm trying to do is convert a string into the objects (var hello) that I mentioned earlier with the 0-11 : []. I need to convert it to that because I'm trying to implement it in a Javascript calendar that highlights specific dates in that format. For example, 0: [1,5,30] would have January 1,5,30 all highlighted. The string is a bunch of dates in the format of mm/dd/yr, which are separated by a "|" Only the months and the dates are of importance so I use a .split("|"). Hopefully, this code will be a bit better: code:
So I'm trying to make it so that 10/1/08 date would appear in the "var hello" as 9: [1], if that makes sense. Geno fucked around with this message at 19:44 on Aug 17, 2008 |
# ? Aug 17, 2008 19:40 |
|
I don't think you quite understand how arrays work. If you have a 2-dimensional array in Javascript, printing my2DArray[0] is going to give you something like "(Object Array)". You're making this way harder on yourself than you need to, though. Here's how I'd do it (not tested):code:
Given the input I supplied, you'd get the following: code:
|
# ? Aug 17, 2008 20:03 |
|
Quick question about memory/performance... In Java, If I create a class, call it A, and add 5 methods to it. I then proceed to create a TON of instances of the class (objects). Does the fact that the class have 5 methods get multiplied by the number of instances to take up more space in memory? If a method is just a general calculation method that could be placed outside of the class, will it take a LOT less memory (given that I'm making thousands of instances) if I take it out of the class?
|
# ? Aug 18, 2008 08:57 |
|
Jo posted:Am I handling this problem in the wrong way? There are dozens of spatial partitioning algorithms you can try out, but how effective they are can depend largely on the type of geometry you're trying to partition. If you've got the time, then it might be worth coding up a few different methods and actually measuring how effective the algorithm is at cutting down your ray-tri tests. If you've already tried quad-trees, then some other starters for ten: http://en.wikipedia.org/wiki/Kd-tree http://en.wikipedia.org/wiki/Binary_space_partitioning http://isg.cs.tcd.ie/spheretree/ AABB or OOBB trees This guy's blog is quite useful as well: http://realtimecollisiondetection.net/
|
# ? Aug 18, 2008 09:42 |
|
Rabbi Dan posted:Quick question about memory/performance...
|
# ? Aug 18, 2008 13:27 |
|
What's the closest thing to Core Animation on Windows? In a quick look, it seems to be WPF, and some WPF-related links I've followed seem to indicate that WPF supports an implicit animation model like Core Animation (set start, end, and interval, and it figures out interpolation for you). It's probably less elegant than Core Animation, but is it functionally accurate? If not WPF, is there something else I should be looking at?
|
# ? Aug 19, 2008 08:50 |
|
mnd posted:What's the closest thing to Core Animation on Windows? In a quick look, it seems to be WPF, and some WPF-related links I've followed seem to indicate that WPF supports an implicit animation model like Core Animation (set start, end, and interval, and it figures out interpolation for you). It's probably less elegant than Core Animation, but is it functionally accurate? Yeah, Windows Presentation Foundation is as close to Core Animation as it gets for the Windows platform. I've never used Core Animation so I can't speak to elegance in comparison, but WPF is pretty slick, and there's a thread about it if you have any questions while you're learning. Keep in mind WPF is only supported on Windows XP SP2 and up.
|
# ? Aug 19, 2008 15:11 |
|
Standish posted:No and no. There's only one copy of a method no matter how many instances of its class you create. That is correct, though it isn't really the entire picture. Since all methods in Java are virtual by default, all instances of a class will carry around a reference to each of their (non-final) methods. So if all of these methods can be stored in an external class, each instance of the original class only needs a reference to the external class instead of references to each method. Really though, this is just an academic view of things; you should focus on making the methods make sense from an object-oriented perspective instead of focusing on tiny optimizations.
|
# ? Aug 23, 2008 19:16 |
|
Simple question, I'm pretty sure I have the answer, but I wanted to make sure. It is about efficiency. So, let's say I have n-many variables. Let's say n = 4. So, int a = 7; int b = 3; int c = 43; int d = 213; [I made their values up] Now, what I want to do in a sense is swap all of them with another variable. So, b gets assigned the value of a. c gets assigned the value of b. d gets assigned the value of c. a gets assigned the value of d. Of course, doing b = a; c = b; d = c; a = d; Is not any good because if you do this, you are overwriting variables you need to use later. As far as I can tell, you MUST create 4 temporary (local) variables, copy the current values of a,b,c and d into the local copies, and THEN reassign the original a,b,c, and d accordingly. Is this the best it gets? Additionally, is there any special case where you could use trickery? Such as using pointers and/or if the original variables are contiguous in memory, etc...
|
# ? Aug 23, 2008 22:10 |
|
Runaway Five posted:So, int a = 7; int b = 3; int c = 43; int d = 213; code:
Unless I missed something?
|
# ? Aug 23, 2008 22:16 |
|
Scaevolus posted:You could do it with one temporary variable Okay, I feel really stupid You are 100% correct. Thank you. Man, this feels like the dumbest C++ thing I've done in a long time.
|
# ? Aug 23, 2008 22:18 |
|
Pensive Goat posted:Since all methods in Java are virtual by default, all instances of a class will carry around a reference to each of their (non-final) methods. So if all of these methods can be stored in an external class, each instance of the original class only needs a reference to the external class instead of references to each method.
|
# ? Aug 23, 2008 22:25 |
|
Runaway Five posted:Okay, I feel really stupid You are 100% correct. Thank you. Man, this feels like the dumbest C++ thing I've done in a long time. For what it's worth, some languages let you do this on the fly, although I don't remember the technical term for it (I believe there was one). In Python, for example: code:
|
# ? Aug 24, 2008 01:03 |
|
bitprophet posted:For what it's worth, some languages let you do this on the fly, although I don't remember the technical term for it (I believe there was one).
|
# ? Aug 24, 2008 01:25 |
|
Scaevolus posted:In Python this is called unpacking, and it works by making a tuple (a,b,c,d) and then unpacking it and doing the assignment to each variable. So it's the equivalent of making four temporary variables, and then doing the assignment. Sounds about right; also fits with how higher level languages usually do things that are syntactically simpler than their lower level counterparts, but not necessarily any faster or more efficiently.
|
# ? Aug 24, 2008 02:28 |
|
bitprophet posted:Sounds about right; also fits with how higher level languages usually do things that are syntactically simpler than their lower level counterparts, but not necessarily any faster or more efficiently. code:
Unless you're swapping megabytes of memory many times per second, swapping probably isn't anywhere close to a bottleneck.
|
# ? Aug 24, 2008 03:07 |
|
The objects aren't being "swapped", you're just changing what objects the names a, b, c, and d refer to. If you use a temporary variable for whatever reason, you're just creating an extra reference, not a copy of the object.
|
# ? Aug 24, 2008 04:21 |
|
Milde posted:The objects aren't being "swapped", you're just changing what objects the names a, b, c, and d refer to. If you use a temporary variable for whatever reason, you're just creating an extra reference, not a copy of the object. (assigning references should about as expensive as assigning ints anyways)
|
# ? Aug 24, 2008 04:32 |
|
Mustach posted:That wording makes it sound like an object has a reference per member method, but I'm sure that Java implements it as one reference to a table of all member methods.
|
# ? Aug 24, 2008 10:10 |
|
Scaevolus posted:vv bitprophet posted:For what it's worth, some languages let you do this on the fly, although I don't remember the technical term for it (I believe there was one). In C++, for example: int a = 25, b = 50, c = 75, d = 100; boost::tie(a, b, c, d) = boost::make_tuple(b, c, d, a); Vanadium fucked around with this message at 18:37 on Aug 24, 2008 |
# ? Aug 24, 2008 18:34 |
|
I have yet another question. How do I make my C++ Visual Studio 2005 projects build/compile/link in such a way that as an executable they can stand alone and run on another computer which does not have Visual Studio installed on it.
|
# ? Aug 24, 2008 23:47 |
|
Runaway Five posted:How do I make my C++ Visual Studio 2005 projects build/compile/link in such a way that as an executable they can stand alone and run on another computer which does not have Visual Studio installed on it. Deployment More deployment Mustach fucked around with this message at 00:04 on Aug 25, 2008 |
# ? Aug 25, 2008 00:01 |
|
This is probably a stupid question but lets say that I've got variables A and B... is there a way to swap their values without using a third variable (Eg, C = A, A = B, B = C) and without meddling with pointers? I guess I was just wondering whether there's some syntax for this that I was unaware of, perhaps in a single expression. (in Python, PHP, whatever)
|
# ? Aug 25, 2008 22:40 |
|
N.Z.'s Champion posted:This is probably a stupid question but lets say that I've got variables A and B... is there a way to swap their values without using a third variable (Eg, C = A, A = B, B = C) and without meddling with pointers? is this a loving joke? fake edit: this has to be a loving joke.
|
# ? Aug 25, 2008 22:46 |
|
Ugg boots posted:is this a loving joke? Nope, serious, and I'm sure it's a stupid question (I'm pretty tired). Is there a way of doing it in a single expression?
|
# ? Aug 25, 2008 23:06 |
|
N.Z.'s Champion posted:Nope, serious, and I'm sure it's a stupid question (I'm pretty tired). Is there a way of doing it in a single expression? Dude, someone showed how to do it like 5 posts up.
|
# ? Aug 25, 2008 23:12 |
|
|
# ? May 13, 2024 22:37 |
|
Avenging Dentist posted:Dude, someone showed how to do it like 5 posts up. gently caress, sorry folks So unpacking tuples works in Python, but can this be done in PHP?
|
# ? Aug 25, 2008 23:15 |