|
ErIog posted:I think you might be overthinking what you want to do. Open your bookmarks from the sidebar. You can drag any link on a page over to the sidebar, and it will become a bookmark. With some minor organization this solution will give you 80% of what you want. Uhhh how am I going to do that when I'm on my phone and out? Also how will I know who sent what? That would also require a lot of bookmark management.
|
# ? Mar 6, 2010 19:01 |
|
|
# ? Jun 7, 2024 08:55 |
|
5436 posted:Uhhh how am I going to do that when I'm on my phone and out? Also how will I know who sent what? That would also require a lot of bookmark management. I apologize for not thinking about your phone when you never mentioned it, and only talked about a Firefox extension.
|
# ? Mar 6, 2010 19:16 |
|
ErIog posted:I apologize for not thinking about your phone when you never mentioned it, and only talked about a Firefox extension. My bad, but I was thinking it would work by just parsing chat logs so when you open your browser it would grab links from when you use your phone or other peoples computers. I mean it would be ideal if google just implemented it. The idea of manually grabbing links from chat boxes seems outdated in todays internet, especially when you can log all your gchats.
|
# ? Mar 6, 2010 20:25 |
|
So either I'm not using Valgrind correctly or I have a serious misunderstanding of how it handles basic blocks. I'm writing a Valgrind plugin and so just to get my feet wet I'm throwing Lackey, the example tool, at a trivial C program (empty main() ). However, it's giving me very bizzare values for a program that literally has four instructions, (push, mov, pop, ret): ntaylor@ntaylor-loonix:~/code/loopy/tests$ ../valgrind-3.5.0/vg-in-place --tool=lackey --trace-superblocks=yes --log-fd=1 ./sequential | sort | uniq -c | sort -nr | head 1249 SB 0400a3dc 1249 SB 0400a3d0 1105 SB 0401605c 1036 SB 04016050 587 SB 04008f30 319 SB 0401669b 282 SB 04008c78 282 SB 04008c52 282 SB 04008c44 282 SB 04008c37 Since there are no jmps in this program, there should only be one basic block, and that should only ever get executed once, so where the hell are these things coming from?
|
# ? Mar 10, 2010 04:22 |
|
Dijkstracula posted:Since there are no jmps in this program, there should only be one basic block, and that should only ever get executed once, so where the hell are these things coming from? I would presume a tonne of hooks for glibc.
|
# ? Mar 10, 2010 04:27 |
|
Dijkstracula posted:Since there are no jmps in this program, there should only be one basic block, and that should only ever get executed once, so where the hell are these things coming from? You probably know more about valgrind than me at this point because you're the one writing the plugin, but perhaps valgrind's decompiler/recompiler generates a bunch of extra basic blocks?
|
# ? Mar 10, 2010 05:58 |
|
I'm trying to pick a scripting language thats right for me. I just need something I can pick up quickly, works with windows, and has the ability to:
Some 'nice to haves' are
Currently, I'm leaning towards Python but I'm sure there are others out there I should check out. My coding background is a little .net, lots of javascript with a raging boner for jQuery. Cooter Brown fucked around with this message at 06:54 on Mar 10, 2010 |
# ? Mar 10, 2010 06:51 |
|
Some 'nice to haves' are
|
# ? Mar 10, 2010 20:00 |
|
Is there a term for games that scale with hardware? A lot of old games look dated when played on newer hardware. Is there some sort of technique that helps prevent against this so that visually, a game is always as stunning as can be?
|
# ? Mar 10, 2010 22:08 |
|
Triple Tech posted:Is there a term for games that scale with hardware? A lot of old games look dated when played on newer hardware. Is there some sort of technique that helps prevent against this so that visually, a game is always as stunning as can be? The only real way to future-proof the look of a game is to use a style that ages well. Notice, SNES-era games aged a lot better than games from the PSX/N64 era. Blizzard is the best example of this in the modern era. The art styles for their polygonal games all are done in a way that makes them look good, but doesn't really make you wince when you go back to them 5 years later as much as a game like Half-Life 1 does. The closest thing to what you're talking about, that is currently in widespread use, is called Level of Detail. It's a concept for lowering the amount of detail for objects that are further away from the player in order to prioritize the rendering of objects close to the player. It's just a concept, though. There are a million different ways to implement LoD in a game engine. Polygonal detail increases have kind of hit a wall because of the amount of time and money it takes to create very high complexity 3d models. It's become a lot more about shaders and high-res textures to sell the look of a game. That's why most of the recent leaps forward in terms of video card technology have been about increasing the number of shader processors to get more and more complex shaders going at once. That's why a game like Crysis scales as well as it does. The geometry isn't extremely highly detailed. So if you turn off most of the shaders, use low-res versions of the textures, and use the low-complexity LoD versions of polygonal models Crysis would be able to run on drat near any "modern" computer. It would look like poo poo, but it would run. There was a mod for Doom 3 back in the day that did all of these things, and it was able to get Doom 3 running on Voodoo2 era hardware. http://www.firingsquad.com/media/gallery_index.asp/244 Recently, video card manufacturers have been experimenting with hardware tesselation where the video card will automatically fill out objects with more polygons in order to give the appearance of more detail. It will never be retroactive, though. It will always require the game developers to specify how that tesselation should happen otherwise the video card has no way of knowing exactly what type of detail it should be filling in. The second prong to this is texture resolution. Higher resolution textures always look better at higher resolutions, but the same problems apply to textures as do photos from a digital camera. If you take a picture with a 1MP camera, there's no automatically add detail to make it look like it came from a 12MP camera. The only fix for this I've ever seen has to do with procedurally generating textures, and that's really only ever been done in the demo scene in order to save space. Here's a link to a demo that uses this technique: http://www.theprodukkt.com/kkrieger Note, the size of one of the screenshots of the game is about a third the size of the entire game. If a game developer really wanted to, they could over-engineer their game to future-proof it pretty well. The reason game developers don't is because the size of the game data would have to be a lot larger to accomodate this, and it would take them time to put in all the detail that is going to be required for a game 10 years down the road. Game developers want their game to sell this year, next year, or 2 years down the road. It doesn't make sense to devote a ton of resources to something gamers aren't going to be able to experience for a bunch more years than that. Both Crysis and Doom 3 kind of did this. They had Super-Ultra-Mega-High graphical settings that were, by design, impossible to play on the current generation of hardware circa when those games launched. ErIog fucked around with this message at 22:59 on Mar 10, 2010 |
# ? Mar 10, 2010 22:30 |
|
Cooter Brown posted:I'm trying to pick a scripting language thats right for me. I just need something I can pick up quickly, works with windows, and has the ability to: Since you say you've done lots of Javascript you should know that back in the day you could use JScript (Microsoft's version of Javascript) via Windows Scripting Host. I doubt Microsoft broke this after XP but XP was the last Windows OS I used so I can only assume it still works. It has access to COM so you can connect to dabatases via ADO and access the registry as well. Having said all that, while this would be the path of least resistance for you, you should definitely keep leaning towards Python.
|
# ? Mar 11, 2010 03:17 |
|
hlfrk414 posted:jupo posted:Thanks, I will give JScript a try since I need to get some things out the door quickly but python will definitely be my long term weapon of choice.
|
# ? Mar 11, 2010 03:46 |
|
I'm just learning prolog, so say you have:code:
|
# ? Mar 11, 2010 14:19 |
|
findall/bagof/setof http://www.swi-prolog.org/pldoc/man?predicate=findall/3 findall(P, beat(ali, P), L) where L is the list of people ali beat.
|
# ? Mar 11, 2010 14:32 |
|
I want to set up a ridiculously simple blog on a server. I've already chosen the CMS and host, and done the HTML and CSS, but I don't know jack about the basics. I'm sure I could find an ancient article that would be obsolete by now, so if there is a Setting Up a Blog for Dummies or something like that online, I'd appreciate it.
|
# ? Mar 11, 2010 23:49 |
|
Which CMS? They usually have instructions, not really sure what you're asking. Some providers even have one click installs, might wanna double check that.
|
# ? Mar 11, 2010 23:51 |
|
Triple Tech posted:Which CMS? They usually have instructions, not really sure what you're asking. Some providers even have one click installs, might wanna double check that. If it's as easy as it sounds, I'll just fidgit around with it and write when I get stumped.
|
# ? Mar 12, 2010 09:42 |
|
Does anyone know of a calculator plugin for Eclipse that lets me evaluate simple math expressions easily while using the editor? The one plugin I could find was ECalculator and it sucks.
|
# ? Mar 13, 2010 04:28 |
|
supster posted:Does anyone know of a calculator plugin for Eclipse that lets me evaluate simple math expressions easily while using the editor? The one plugin I could find was ECalculator and it sucks. It's not exactly what you're asking for, but you could use the DrJava plugin for this. It creates a view in your workbench that acts as an interactive Java console, and you could just enter expressions directly into it.
|
# ? Mar 13, 2010 14:30 |
|
Flobbster: the standalone DrJava IDE is pretty nifty. I'd imagine the Java REPL could be really handy for teaching an introductory Java course. In the past, I've often used Processing as the same kind of code sketchpad.
|
# ? Mar 13, 2010 14:54 |
|
Internet Janitor posted:Flobbster: the standalone DrJava IDE is pretty nifty. I'd imagine the Java REPL could be really handy for teaching an introductory Java course. I haven't used it that much personally; I only know about it because I maintain a pre-configured Eclipse distro that we have the Java and C++ students in our program download (and that other universities have started using as well). We've historically always included DrJava with it, but I don't know how much our students use it, because we tend to encourage them that if they want to test something in one of their classes, don't just run in a REPL, look at the output and then forget about it, but put it in a JUnit test case that will get checked every time they build.
|
# ? Mar 13, 2010 15:46 |
|
I'm taking a Prolog course and I'm stuck on one specific question. It asks for a predicate allConnected(L) to take a list L of atoms [a,b,c...] and determine, based on previously given facts, a subset of those atoms which are all connected. For example: % the facts of connection are stated edge(a,b). edge(b,c). edge(c,a). edge(b,d). Therefore, L will be [a,b,c,d]. All this is given and there are no duplicate elements in L. Now allConnected(L) should return: L = [a,b,c] since a,b, and c ALL connect to each other, meaning if you are at one node you can get to any of the others in the list by one edge. The code I have been messing around with looks like this: http://pastebin.com/ZKkLhGBK If you're troubled with answering class assignments, please just give me a point in the right direction as I've been stuck on this problem for awhile now. It seems that in Prolog you can hover around the answer for awhile and still be completely wrong unless you hit it on the nose. EDIT: Spelling mistake in pastebin, should be isConnected. This was not the problem. *
|
# ? Mar 16, 2010 06:20 |
|
Oisin posted:I'm taking a Prolog course. I'll come back to this question in a bit, i'm stuck in an all day meeting today p.s. have you been taught about findall/3 http://www.swi-prolog.org/pldoc/man?predicate=findall/3 tef fucked around with this message at 15:52 on Mar 16, 2010 |
# ? Mar 16, 2010 15:48 |
|
Oisin posted:If you're troubled with answering class assignments, please just give me a point in the right direction. it's hard to nudge you in the right direction without giving the answer away, so, uh, erm. code:
edit to add: once you have setof/findall this code pretty much writes itself. tef fucked around with this message at 16:25 on Mar 16, 2010 |
# ? Mar 16, 2010 16:21 |
|
I've got a pretty simple question to put out. For binary search trees, is it possible to have a right child and not a left child? ie. the root has a left child, and this left child (we'll call it 'node') has no left child. Do we assume that 'node' has no right child? Or is it possible that it can have a right child? Here's a diagram to help visualize: code:
|
# ? Mar 18, 2010 05:29 |
|
krnhotwings posted:I've got a pretty simple question to put out. For binary search trees, is it possible to have a right child and not a left child? ie. the root has a left child, and this left child (we'll call it 'node') has no left child. Do we assume that 'node' has no right child? Or is it possible that it can have a right child? Yes it's possible. Here's an example. code:
code:
The1ManMoshPit fucked around with this message at 06:03 on Mar 18, 2010 |
# ? Mar 18, 2010 05:36 |
|
The1ManMoshPit posted:is still a BST, just a really poorly balanced one.
|
# ? Mar 18, 2010 06:21 |
|
BSTs must be sorted (ordered) for them to be useful as a search tree. However, they don't need to be balanced. The trees given as examples are ordered (an in-order traversal of them will give 3-4-5 and 5-6-7-8 respectively), but not balanced.
|
# ? Mar 18, 2010 06:27 |
|
I'm trying to build a primitive election simulator, but one of the things I'm having trouble with is a good way to generate the preference votes: I want them to be "biased" so that some candidates will have a higher ranking on average than others. Anyone know an algorithm for this?
|
# ? Mar 18, 2010 22:31 |
|
coffeetable posted:I'm trying to build a primitive election simulator, but one of the things I'm having trouble with is a good way to generate the preference votes: I want them to be "biased" so that some candidates will have a higher ranking on average than others. Anyone know an algorithm for this? Isn't this just a weighted sample? Make an array of the cumsum of the probabilities and then generate a random number and figure out which element in the sample it falls into.
|
# ? Mar 18, 2010 22:36 |
|
There's a discussion of nonuniform RNGs on page 79 of this thread.
|
# ? Mar 18, 2010 22:37 |
|
coffeetable posted:I'm trying to build a primitive election simulator, but one of the things I'm having trouble with is a good way to generate the preference votes: I want them to be "biased" so that some candidates will have a higher ranking on average than others. Anyone know an algorithm for this? Hooray! A question that's vaguely within my field! You'll need to define a vector of voting probabilities, so that a given voter votes for candidate 1 with probability p1, for candidate 2 with probability p2, etc. If you already know what voting probabilities you want then you can implement it yourself like AD suggested. Alternatively if you have access to a probability library that has a function for simulating multinomial distributions you can use that. If you want to simulate a random vector of voting probabilities, then I suggest you model it as a Dirichlet distribution with appropriate parameters. You can simulate from this by renormalising a vector of Gamma random variables - any good probability/stats library should have a function for simulating gamma rvs. This is also a pretty good reference for random variable simulation, but it's more probability than CS-oriented.
|
# ? Mar 18, 2010 23:29 |
|
Avenging Dentist posted:Isn't this just a weighted sample? Make an array of the cumsum of the probabilities and then generate a random number and figure out which element in the sample it falls into. yeah, i'm doing something like this at the moment. unfortunately i'm wanting to generate 2-3 million preference ballots (in batches of a thousand or so, generating a new set of probabilities for each), and my vain hope was that there was some clever algorithm to do this kind of thing. p79 might help though - the aliasing method is interesting if nothing else. e: Ok, nevermind, doctortristan is fantastic. That final link especially - I'm a maths guy, not a programmer so it's perfect. Cheers coffeetable fucked around with this message at 23:35 on Mar 18, 2010 |
# ? Mar 18, 2010 23:32 |
|
coffeetable posted:yeah, i'm doing something like this at the moment. unfortunately i'm wanting to generate 2-3 million preference ballots (in batches of a thousand or so, generating a new set of probabilities for each) Ok, if you're simulating large numbers of votes using the same probability vector you should definitely simulate that as a multinomial random variable, using an appropriate prob/stats library. To clarify what I mean by this, if there are r candidates and n voters cast their votes with identical probabilities (p1,..., pr), then the vector of votes for each candidate (n1,...,nr) has a multinomial distribution. Any good implementation of this will be able to simulate (n1,...,nr) in a time that is O(r), rather than O(n).
|
# ? Mar 18, 2010 23:51 |
|
DoctorTristan posted:Ok, if you're simulating large numbers of votes using the same probability vector you should definitely simulate that as a multinomial random variable, using an appropriate prob/stats library. Ah, I think I messed up - by preference ballot, I meant a ranking of the candidates by preference, not "tick the candidates you like". Wait, or do you mean there's an easy way to convert the latter into the former? e: sorry. statistics is not a strength of mine, to say the least. coffeetable fucked around with this message at 00:11 on Mar 19, 2010 |
# ? Mar 19, 2010 00:08 |
|
I have a BAT file question, but if there's a better easier way to do this, I'm open to suggestions. I want to make a bat file that scans a directory for files of a certain type (*.bin), then sends them one at a time to an ftp server with a delay of 10 seconds or so between each one. I can write it with hard coded file names, but I want it to allow me to just drop a new file into the directory and have it send it. I also want it to loop once it has run out of files and start over with the first one. I know how to send via ftp in a bat file, but the rest is new to me. Suggestions? Thanks. Edit: I can get the list of files with a "dir *.bin /B" command, then for each file I'd want to do this: ftp -s:info.txt ping -n 15 127.0.0.1 where info.txt has: open [FTP's IP] user pass put myfile.bin quit so for each file, it transfers it to the ftp, then delays using a few pings to home, then does it for the next file. After all the files have been sent, it rescans the directory to see if any new ones were added, then starts the process over. Hillridge fucked around with this message at 17:50 on Mar 19, 2010 |
# ? Mar 19, 2010 16:37 |
|
If I have a mIRC trigger like this on *:TEXT:$me:#:/msg $chan yes, $nick $+ ? is there any way to stop users from abusing it by barraging the bot with text so it gets booted off the server for flooding? Also can I use the on text event to reply to text said by a certain nick?
|
# ? Mar 20, 2010 04:44 |
|
I can't figure out a regular expression to match all caps words containing a certain number of characters, except for specific words. As near as I can figure, it's something like [A-Z]{min,max}(?!WORD|OTHERWORD), but that doesn't seem to match it.
|
# ? Mar 20, 2010 05:23 |
|
coffeetable posted:Ah, I think I messed up - by preference ballot, I meant a ranking of the candidates by preference, not "tick the candidates you like". Ah ok, I was thinking of a single vote system. The proble isn't so much about programming as it is the model you put on the voter preferences. You model each voter's preference vote as a (multivariate) random variable; and within each batch each voter has the same (probabilistic) distribution on their preferences. What distribution do you choose? In principle this is up to you. A simple way is to model each voter's 'liking' for each candidate as a univariate random variable (log-Gaussian, Gamma, Beta or whatever) and have them vote according to their liking rank. Might be better to move this to the SPE thread if you've any further questions.
|
# ? Mar 20, 2010 12:33 |
|
|
# ? Jun 7, 2024 08:55 |
|
Anmitzcuaca posted:If I have a mIRC trigger like this use timers ? quote:Also can I use the on text event to reply to text said by a certain nick? yes, but you'd have to check the manual for the syntax.
|
# ? Mar 20, 2010 15:37 |