|
nevermind, I couldn't fix the issue. I cannot find the forum padding size adjustment in the php.
|
# ? Mar 22, 2009 00:31 |
|
|
# ? Jun 4, 2024 06:17 |
|
tk posted:
|
# ? Mar 22, 2009 01:20 |
|
Linq in C#.
|
# ? Mar 22, 2009 07:30 |
|
Scaevolus posted:Subtext Ah, drat. Is there some software out there that'll help keep track of/optimize extremely messy truth tables, so I can translate them back into code?
|
# ? Mar 23, 2009 05:13 |
|
Why not just use Karnaugh maps?
|
# ? Mar 23, 2009 05:53 |
|
On the application I work at at work we display to the user a tree of data in the following form:code:
The only restriction is that each node in the tree has at most one parent. We allow the user to filter nodes based on a few things, but for the sake of this example I'll restrict it to the node label. When the user enters a keyword, we show the full path to all nodes that contain the keyword. If I enter "root node", the following would be output: - root node If I enter "a child", you would expect this: - root node - a child of the root node The question is then what is the quickest way to parse the tree and determine which nodes to show? We know that once a node is in we do not need to reevaluate it for inclusion, as it doesn't matter if the node itself matches the keyword or if it is one node in one path to a node that did match. The first pass at this I simply did a recursive depth-first pass at the tree, but this meant that there were quite a few nodes that were repeatedly evaluated which is unnecessary. The second pass does the following:
At the end of this, each node in the tree should be flagged if it or one of its descendants was included as a result of the search. This works, and reasonably well, but I was curious about two things. First, is there a name for this? "bottom-up traversal" didn't return many results. Secondly, is there a better way? digital-entropy fucked around with this message at 06:17 on Mar 23, 2009 |
# ? Mar 23, 2009 06:12 |
I just started messing with VB 2008. Would someone recommend a book or an online tutorial for the absolute newbie? TIA
|
|
# ? Mar 23, 2009 14:25 |
|
Do you have a special reason for starting with that, or do you just like to learn useless things?
|
# ? Mar 23, 2009 14:27 |
Mithaldu posted:Do you have a special reason for starting with that, or do you just like to learn useless things? No idea. I'd like to learn something useful, my company runs all their servers and clients on windows platforms. Any suggestions for what to start out with otherwise?
|
|
# ? Mar 23, 2009 14:35 |
|
buttweed posted:No idea. I'd like to learn something useful, my company runs all their servers and clients on windows platforms. Any suggestions for what to start out with otherwise?
|
# ? Mar 23, 2009 14:45 |
|
Oh, that's a bit different then. You sounded like the typical high school "imma go learn sum coding" dude. I guess it depends mostly on what you're trying to do. If you really want to do GUI stuff, .NET C# is probably a good place to start. If you feel more like doing command line stuff, ActivePerl plus a copy of Perl Best Practices, or alternatively Python. Unless of course your company's applications are written in Basic, in which case that might not be that bad a place to start.
|
# ? Mar 23, 2009 14:46 |
I'm going to try C# then, Thanks.
|
|
# ? Mar 23, 2009 15:15 |
digital-entropy posted:This works, and reasonably well, but I was curious about two things. First, is there a name for this? "bottom-up traversal" didn't return many results. Secondly, is there a better way? It's not really a tree traversal unless you consider the internal nodes. Preorder, inorder and postorder traversals only only vary in where they distribute internal nodes in the traversal order. Also, are you really sure that each node has at most one parent? If so, your recursive DFS algorithm should never be evaluating any node more than once and in your current algorithm you wouldn't need to check leaf nodes to see if they've already been included. In terms of optimization: One easy step would be to keep all your leaf nodes in a linked list, so you don't need to traverse the tree to get at all of them. However, doing this throws out the some of the advantages of using a tree structure--is it possible to evaluate internal nodes to check if ALL of their descendants can't possibly be included? If so, you can skip big chunks of your tree all at once.
|
|
# ? Mar 23, 2009 18:28 |
|
I really hope this is the right place to ask something like this. Ok this is gonna be a bit of an odd request, but hell it's worth a shot. I need a new place to live, (finished uni back with the parents time to move on) and I'm looking for a programmer (in Europe (England preferred)) that really into doing the whole indie startup/bedroom game dev thing. That either has a spare room/sofa I can crash on. Or is into finding somewhere to flat share. I can pay rent,food etc. As for me I'm 23, male, white and nerdy and I currently live in Hampshire, England and I'm an artist. Skillset includes Photoshop mudbox 3d studio max here is some of my more current work http://www.artbytom.co.uk/junk/raider1.jpg http://www.artbytom.co.uk/work/tuesdaythrash.jpg http://www.artbytom.co.uk/junk/Fmvtest.jpg http://www.artbytom.co.uk/junk/Fmvtest2.jpg http://www.artbytom.co.uk/junk/street1.jpg http://www.artbytom.co.uk/junk/nebula2.jpg http://www.artbytom.co.uk/junk/ladysketch.jpg and my website (slightly older stuff) can be found at https://www.artbytom.co.uk So if you are interested, please e-mail me at shockcomics@hotmail.com So yeah, odd request, but I hope something comes from this as it would be one awesome adventure.
|
# ? Mar 24, 2009 02:39 |
|
BoneMonkey posted:I really hope this is the right place to ask something like this. Thanks for asking your question. Send me a PM and we can take this offline.
|
# ? Mar 24, 2009 04:59 |
|
Can I commission a drawing of Johnny Five Aces?
|
# ? Mar 24, 2009 05:00 |
|
ENSIGN ECCHI posted:Thanks for asking your question. Send me a PM and we can take this offline. You are kinda un-pm-able so you might need to fix that first. That or you're having me on. Chain Chomp posted:Can I commission a drawing of Johnny Five Aces? Yes, Pm me about what you want done. BoneMonkey fucked around with this message at 13:18 on Mar 24, 2009 |
# ? Mar 24, 2009 11:12 |
|
Does anyone know if there is an easy way to encrypt large files in php with a public key?
|
# ? Mar 24, 2009 21:46 |
|
Encrypt it with a one-off symmetric key, then encrypt that key.
|
# ? Mar 25, 2009 20:19 |
|
Does VS2008 have an option to track down unused variables in ones code?
|
# ? Mar 25, 2009 20:21 |
|
cr0y posted:Does anyone know if there is an easy way to encrypt large files in php with a public key? Please don't write your own encryption software, you'll do it wrong. Find some library that complies with RFC 3852.
|
# ? Mar 25, 2009 20:37 |
|
shodanjr_gr posted:Does VS2008 have an option to track down unused variables in ones code? If you're using C#, the compiler emits a warning when a variable is unused. I don't know off the top of my head which warning level causes the C++ compiler to start emitting unused variable warnings, but you can fiddle around with it in the project properties under C/C++ -> General.
|
# ? Mar 25, 2009 20:44 |
|
csammis posted:If you're using C#, the compiler emits a warning when a variable is unused. I don't know off the top of my head which warning level causes the C++ compiler to start emitting unused variable warnings, but you can fiddle around with it in the project properties under C/C++ -> General. In 2005 it's /W3
|
# ? Mar 25, 2009 22:06 |
|
ShoulderDaemon posted:Please don't write your own encryption software, you'll do it wrong. Find some library that complies with RFC 3852. This may help: http://www.google.com/search?q=php+gpg
|
# ? Mar 26, 2009 02:57 |
|
Retard vb in excel question: I need a routine to: Find the last row of data in column "F" in a workbook Check each row in column "F" for character length If the cell has more than 30 characters, trim it to 30 This is the script I copied off a website: code:
|
# ? Mar 26, 2009 20:54 |
|
I have 12 categories that need to be placed doubled up in 6 boxes. However, some of the categories can't pair up. Kinda like "cold" and "hot" can't go together. How would I go writing a program that can solve this type of combination problem, but apply rules to it? Is there a program that exists, or easy way of doing this without a computer program? Cheers.
|
# ? Mar 29, 2009 22:44 |
|
Fruit Smoothies posted:I have 12 categories that need to be placed doubled up in 6 boxes. However, some of the categories can't pair up. Kinda like "cold" and "hot" can't go together. How would I go writing a program that can solve this type of combination problem, but apply rules to it? Is there a program that exists, or easy way of doing this without a computer program? Unless they need to be randomized, just place them manually?
|
# ? Mar 29, 2009 23:01 |
|
quadreb posted:Unless they need to be randomized, just place them manually? There are 66 combinations of 12 categories in 6 boxes. To give you an idea, each category can be paired with only 2-3 others, and there can be no overlap. Think of it like adjectives: hot, cold, wet, nice, sharp, blunt. The issue with manual pairing, is you nearly always up with (at least) two at the end that don't fit, and you don't know where to make a change within the couples. If I could do it manually, I would. EDIT: EG: Nice, hot Blunt, cold, Which leaves sharp and wet.
|
# ? Mar 29, 2009 23:08 |
|
If you don't mind getting your hands dirty with a backtracking logic language like Prolog, this sounds like a good constraint programming problem.
|
# ? Mar 29, 2009 23:13 |
|
Fruit Smoothies posted:There are 66 combinations of 12 categories in 6 boxes. To give you an idea, each category can be paired with only 2-3 others, and there can be no overlap. Start with one, place all legal pairings. Go to the next one, place all legal pairings not already used. etc. It's time consuming, but it'll get everything.
|
# ? Mar 29, 2009 23:15 |
|
Fruit Smoothies posted:I have 12 categories that need to be placed doubled up in 6 boxes. However, some of the categories can't pair up. Kinda like "cold" and "hot" can't go together. How would I go writing a program that can solve this type of combination problem, but apply rules to it? Is there a program that exists, or easy way of doing this without a computer program? Here's a horrible ineffecient solution which should work. If we need to assign 0 elements to n boxes, there is trivially only a single valid assignment: n empty boxes. If we need to assign j > 0 elements to n boxes, then:
Here's an implementation: code:
|
# ? Mar 29, 2009 23:22 |
|
ShoulderDaemon posted:Here's a horrible ineffecient solution which should work. Thanks a lot. I'm downloading haskell to play with now.
|
# ? Mar 29, 2009 23:30 |
|
It's NP-complete with a pretty straightforward reduction from the partition problem. That said, you can reduce to the partition problem and get a much better constant factor.
|
# ? Mar 29, 2009 23:46 |
|
ShoulderDaemon posted:Here's an implementation: Forgive my ignorance, but how do I access the result of this? I've done a few tutorials just now, but they involve printing to the screen, or saving to a file.
|
# ? Mar 30, 2009 00:08 |
|
Fruit Smoothies posted:Forgive my ignorance, but how do I access the result of this? I've done a few tutorials just now, but they involve printing to the screen, or saving to a file. To be perfectly honest, I hadn't bothered to test that before posting it, but it looks right. You'll call it as assign elements boxes where elements is a list of elements to assign, such as [Hot, Cold, White], and boxes is a list of empty boxes to store in to, such as [ [], [] ]. The result is a list of lists of boxes, such as [ [ [Hot, White], [Cold] ], [ [Hot], [Cold, White] ] ]. You can play with this in ghci. But this is really terrible code to try to learn Haskell from.
|
# ? Mar 30, 2009 00:56 |
|
ShoulderDaemon posted:To be perfectly honest, I hadn't bothered to test that before posting it, but it looks right. You'll call it as assign elements boxes where elements is a list of elements to assign, such as [Hot, Cold, White], and boxes is a list of empty boxes to store in to, such as [ [], [] ]. The result is a list of lists of boxes, such as [ [ [Hot, White], [Cold] ], [ [Hot], [Cold, White] ] ]. You can play with this in ghci. EDIT: Nevermind, cheers. Fruit Smoothies fucked around with this message at 01:06 on Mar 30, 2009 |
# ? Mar 30, 2009 01:02 |
|
Fruit Smoothies posted:Isn't elements from your expression assign elements boxes simply the variable Element? Or is Element the type here? Element is a type. And that use of boxes is correct.
|
# ? Mar 30, 2009 01:05 |
|
ShoulderDaemon posted:Element is a type. Thanks for the help. Now I need to decide whether to be a script kiddy and use this implementation, or to try and understand it, and translate into pascal.
|
# ? Mar 30, 2009 01:08 |
Fruit Smoothies posted:Thanks for the help. Now I need to decide whether to be a script kiddy and use this implementation, or to try and understand it, and translate into pascal. I don't think you really want to try to implement the logic backend that Haskell has in Pascal.
|
|
# ? Mar 30, 2009 01:52 |
|
|
# ? Jun 4, 2024 06:17 |
|
ShoulderDaemon posted:Element is a type. If you do it with 12 items, and 6 boxes, the program goes into a seemingly infinite loop. I know there can't be that many combinations. Edit: It seems like the program wants to put more than two things in a box. Fruit Smoothies fucked around with this message at 02:04 on Mar 30, 2009 |
# ? Mar 30, 2009 02:02 |