|
I wondered if anybody here had opinions on any of those enterprising UML diagram/code generator tools, like Enterprise Architect. I wanted to dabble in something where I could doodle out general designs so people at work can see what crack I'm smoking, but then have it generate the code stubs so I could get right into it afterwards. I generally work with C#, Python, and C++--for example.
|
# ? Mar 1, 2012 07:00 |
|
|
# ? May 16, 2024 15:25 |
|
Rocko Bonaparte posted:I wondered if anybody here had opinions on any of those enterprising UML diagram/code generator tools, like Enterprise Architect. I wanted to dabble in something where I could doodle out general designs so people at work can see what crack I'm smoking, but then have it generate the code stubs so I could get right into it afterwards. I generally work with C#, Python, and C++--for example. We use Enterprise Architect for work. Having never used any other software in this domain, I would have to say that EA is alright. I don't use it often, but when I do, I use it to make UML models. Some common actions seem to take a few too many steps to perform, such as adding an attribute or operation to a class. It works well for our team, but I have to imagine there is a better tool out there, especially if you are just wanting to do some UML on your own. As far as code generation, I know it supports at least C#. I once generated code from one of my models just out of interest. I remember looking at it and thinking that I would rather just write the code out myself. This is probably more on me just not trusting it and preferring to write it from scratch myself. If I get a chance today, I'll try to check out the feature and let you know more specifics on how well it works.
|
# ? Mar 1, 2012 15:31 |
|
Rocko Bonaparte posted:I wondered if anybody here had opinions on any of those enterprising UML diagram/code generator tools, like Enterprise Architect. I wanted to dabble in something where I could doodle out general designs so people at work can see what crack I'm smoking, but then have it generate the code stubs so I could get right into it afterwards. I generally work with C#, Python, and C++--for example. Sequence diagrams are another beast entirely, and I hate the way EA handles them. You have to manually draw lines, drag/drop 'fragment' boxes (things like loops or if/elses), etc. It's all done via drawing on a canvas. It tries to be smart about what you want, making assumptions about how you want the diagram laid out. But it is often terribly wrong, meaning that adding or deleting an action has catastrophic effects on the layout of the rest of the diagram. I much prefer a tool like Quick Sequence Diagram Edit. The diagram is generated from an almost psuedocode-like language. It's got its own quirks, and it's certainly not perfect, but it kills EA for drawing/editing sequence diagrams.
|
# ? Mar 1, 2012 17:39 |
|
_aaron posted:We also use EA at work. It's... alright. For class diagrams, it's pretty decent. As clayburn said, some things seem to take longer/more actions than you'd expect, but it gets the job done. Out of the box, code generation is not great. We end up needing to clean up all of the generated code, to the point where often it would be just as time consuming to write it manually. I believe there's a way to customize the code generation to possibly minimize the need for clean-up, but it's not something we've tinkered with. If all you want is a tool to build class diagrams, though, it's alright for that. Some of my problem is I'm kind of a newcomer into this space. I've diagrammed classes before to the UML standard, but that's a far cry from claiming to know UML generally. My hope is to have something where I can visually show some technical people with a fair software background what I want to do visually before I start slapping a lot of code together. I figure Enterprise Architect would be fine for class diagrams since the generated code might be half-assed, but it sure generates code better than Powerpoint.
|
# ? Mar 1, 2012 18:07 |
|
So a site I manage for work has apparently been hacked somehow... I went in to make some edits and found a big old chunk of base64 encoded crap on literally every single .php file on the server. Decoded, it looks like this: http://pastebin.com/GsJB58Tm Can someone who's more PHP savvy than me take a look at that and give me a general idea of what it's doing? I've already removed it all, but I'd like to be able to tell the client what's happened. edit: Also, has anyone else seen anything like this recently... specifically on a WordPress and/or Dreamhost hosted site? kedo fucked around with this message at 19:32 on Mar 1, 2012 |
# ? Mar 1, 2012 19:29 |
|
kedo posted:edit: Also, has anyone else seen anything like this recently... specifically on a WordPress and/or Dreamhost hosted site?
|
# ? Mar 1, 2012 19:51 |
|
Rocko Bonaparte posted:I couldn't tell you if that exact code sequence, but I've seen crap like that happen to me before when I was running a WordPress site on some cheap personal hosting--not Dreamhost. I wasn't keeping WordPress judiciously up-to-date, and the rest was history. Some crap got prepended on to some pages, but also the .htaccess got a pile of junk. The file had a ton of empty lines surrounding some malicious stuff. What would happen is going to my site would generate a ton of popups and redirect all kinds of crap. It would try to come back from time-to-time, I never found the attack vector, and I wanted to do something else with the site, so I switched over to Drupal. So far I have been okay, but I have been better about patching too. Yeah I'm thinking this may be a similar case. I doubt the client is keeping WordPress up to date, so I wouldn't be surprised if the hax0r somehow managed to inject code that way. However I'm finding the same code in a whole ton of different locations outside of WordPress, so I'm not too sure.
|
# ? Mar 1, 2012 19:56 |
|
kedo posted:Yeah I'm thinking this may be a similar case. I doubt the client is keeping WordPress up to date, so I wouldn't be surprised if the hax0r somehow managed to inject code that way. However I'm finding the same code in a whole ton of different locations outside of WordPress, so I'm not too sure. Yeah, it probably added some code into any PHP file that it could touch. This SO answer might help: http://stackoverflow.com/questions/9421414/what-exactly-does-this-php-exploit-code-found-on-my-app
|
# ? Mar 1, 2012 20:28 |
|
Oops, you are exactly right. Guess I should have googled a little bit better, as that looks like almost the exact same code I'm seeing. Thanks much!
|
# ? Mar 1, 2012 21:40 |
|
It also looks like it stores some stuff next to the PHP file in .logs/log1.txt so check that out.
|
# ? Mar 1, 2012 21:44 |
|
Yeah I've cleaned some of these out of friends PHP/WP installs as a favor. It basically hijacks every page (it'll usually get into index.php/footer.php/header.php anywhere it can) to a virus dropper on the remote domain. I believe the browser check is also so it can dodge the google spider and not end up on stopbadware.org What I do is note the file modified date of the infected files (usually minutes apart). What helps find them is a grep for 'base64decode'; there's some legit files you'll find but it's pretty easy to tell which is bad and which is good. Scrub all those files, be paranoid and check all files modified at the previously noted date/time. Then, you move on to the FTP log (narrow down to the date/time you grabbed above). Of the 5-6 that I've seen suffering from this 100% of them have been because someone got into the FTP. Find out when the affected files were uploaded, then trace all that IPs access for the whole log. If there's activity there then you can use that as your cleanup guide too (also obviously change the passwords). If there isn't, you're going to have to start looking at exploits.
|
# ? Mar 1, 2012 22:44 |
|
Maybe a stupid question, never used wordpress, but couldn't you just dump the data, reinstall wordpress, promise yourself you'll upgrade it regularly (hahahaha), then reimport your data? I wouldn't trust myself to have scrubbed everything after being exploited.
|
# ? Mar 2, 2012 01:22 |
|
Is it mandatory for WordPress to to have write access to all of these PHP files? It seems like making all of the PHP files rx only for Apache would go a long way to preventing this kind of stuff.
|
# ? Mar 2, 2012 03:10 |
|
Does anyone know where the gently caress I can get a Google maps API V2 key for a website. Large un-source-code-available java bloblet website needs a google maps API javascript key and the google site just loving leads me on a wild goosechase. It *used* to be there, but I'm fearing that google jumped the shark and stopped key availability for the API, which might leave us in potentially tens of thousands of hours of "oh gently caress" labor reverse engineering a blob and figuring out how to update it.
|
# ? Mar 2, 2012 09:24 |
|
duck monster posted:Does anyone know where the gently caress I can get a Google maps API V2 key for a website. This seems to work. You register a project, enable the services you want (in this case, Maps v2), and then use the project's API key.
|
# ? Mar 2, 2012 09:48 |
|
Hey guys, I have a real beginner question about scripting in Linux. I know a bit of Python, have had a few Java courses, but I've never actually done anything with it. What is the easiest way for me to do a Linux CLI menu that a user can navigate around and when choosing a menu it executes OS commands? Curses? I can execute all the commands I want directly from the CLI and they work fine, I just want a tiny menu that'll run in an infinite loop until I quit out, where I can issue the commands with my directional keys and enter instead of typing/aliasing them all.
|
# ? Mar 2, 2012 13:17 |
|
What would be the best way to do voting (via web) that resets on an 8 minute cycle, then running a shell script when votes > a certain number for that 8 minute cycle (to basically cp top_selection.aspx Default.aspx) I have basically no idea where to start on this, what a database structure would look like, etc. Can't find example code for anything like this either.
|
# ? Mar 2, 2012 17:36 |
|
Are you talking about aggregating the votes every eight minutes? If so, just create a vote table with id(int), vote_type(foreign key [FK]), user_id(FK), and timest(datetime) fields. Then, every eight minutes run a "SELECT COUNT(*) WHERE vote_type = blah AND timest BETWEEN DATE_SUB(NOW(), INTERVAL 8 MINUTES) AND NOW()"*, then add that value to where every you are holding the aggregate sum. Alternatively, you can just remove the between statement and get an aggregate sum, but that would be far less efficient. * I didn't run that for accuracy, don't yell at me if it doesn't work verbatim.
|
# ? Mar 2, 2012 17:55 |
|
Urgh, thanks for the timest(datetime) thing, I was actually going to make a table per vote at first then thought about how stupid of an idea that would turn out to be How would I manage 'security' and voting fraud? Web proxies and HTTP/SOCKS/SSH tunnels/etc already don't work because the IP has to be on a whitelist. Just check if that one host has voted in the last 8 minutes?
|
# ? Mar 2, 2012 18:08 |
|
Visti posted:Hey guys, I have a real beginner question about scripting in Linux. I know a bit of Python, have had a few Java courses, but I've never actually done anything with it. Probably curses, yeah. Note that "easiest" does not necessarily mean "easy", but this shouldn't be too hard.
|
# ? Mar 2, 2012 18:51 |
|
Biowarfare posted:How would I manage 'security' and voting fraud? Web proxies and HTTP/SOCKS/SSH tunnels/etc already don't work because the IP has to be on a whitelist. Just check if that one host has voted in the last 8 minutes? That completely depends on how you manage users. If users must log in, you may use their user id. If not, IP address is certainly a fair way to limit votes, but be aware that there is a one-to-many relationship between IP addresses and users. The best way to prevent most scamming would be to use a create a user id in another table based on the IP address and the user agent. Then just reference it in the voting table. It isn't fool proof, but it works.
|
# ? Mar 2, 2012 22:03 |
|
Are there any medium or large open-source projects that use non-recursive makefiles? I'm working on a tool for build systems, and I'd like to test it on some real codebases, but it can't deal with recursive makefiles for the forseeable future.
|
# ? Mar 3, 2012 00:56 |
|
Otto Skorzeny posted:Are there any medium or large open-source projects that use non-recursive makefiles? I'm working on a tool for build systems, and I'd like to test it on some real codebases, but it can't deal with recursive makefiles for the forseeable future. I don't remember v8 having a recursive Makefile.
|
# ? Mar 3, 2012 04:19 |
|
Biowarfare posted:How would I manage 'security' and voting fraud? Web proxies and HTTP/SOCKS/SSH tunnels/etc already don't work because the IP has to be on a whitelist. Just check if that one host has voted in the last 8 minutes? Back when I still ran Fusker my method of detecting duplicate votes was kinda poo poo but it worked for me. Since I had no account system, I used a hash of the user agent + the IP for each vote; being closed-source at the time and a relatively low amount of traffic, I could just rely on security through obscurity. Also there was no visible feedback on the status of a given fusker URL, so you would have to spam enough to change rankings to actually know if your script worked. It's all in the assumptions you make: - How important is it to record every vote (it wasn't that important to me, so assumed "duplicates" were just discarded, even if they may not really have been dupes) - How safe from vote-spam do you want to be (if you don't have accounts, it's practically impossible, so I just chose the above to curb the worst of it) - How hard do you want it to be to vote (for instance you could use a CAPTCHA, but nobody in their right mind would fill that out just to hit +/- on some poo poo). Carthag Tuek fucked around with this message at 06:03 on Mar 3, 2012 |
# ? Mar 3, 2012 06:00 |
|
I'm in the middle of writing an applet for work. I have some coding experience but I've never really written an applet since I took a Java swing course at Uni a decade ago so it's been a slow learning experience. I have it mostly working how I want now, but there's one thing I can't figure out. At one point I want the user to be able to push a button (from inside the applet, not a HTML form button), which calls a Perl script. The script executes a program server-side that runs (perhaps for several minutes) and routinely outputs to a text file. I'd like this process to run in the background, and while its running the applet continually updates itself based upon whatever is in the output file at any given moment. My problem is that my applet won't continue execution until the Perl script exits, and even though I've told the Perl script to run the server-side program in the background, it waits until that execution is complete before exiting. Is there a way to get around this? Also, one more quick question for people familiar with JApplets - I've been developing my code with a recent version of Java but have found that it won't run on browsers with earlier version of Java, which makes sense. Is there any good reason for me NOT to download a rather early version fo Java to compile my final code in order to ensure it works on as many computers as possible without having to ask them to download the latest version?
|
# ? Mar 5, 2012 00:12 |
|
Robust file copying in a Windows enviroment. We usually use Robocopy (along with the rest of the world). I want to do this from within a VBS script. I can copy the robocopy.exe somewhere and call it, yada yada, but what would be sleeker is if there is a robust file copy facility already built into VBS. Does anyone know? There is the filesystemobject.copyfile method, does this fail the whole copy if it encounters an error? I guess I'm asking, visual basic scripters, how to you copy files/directories about without having to copy robocopy.exe all over the place?
|
# ? Mar 5, 2012 02:04 |
|
cmndstab posted:I'm in the middle of writing an applet for work. I have some coding experience but I've never really written an applet since I took a Java swing course at Uni a decade ago so it's been a slow learning experience. Applets have been pretty much deprecated now because of the many security issues that have come up. I'm concerned about how you are executing that Perl script and reading it's output if the applet is running in the client's browser. But basicallly you need to create a new thread and construct a new Process using a ProcessBuilder and wait for that to finish. Meanwhile in your original thread you can read the output file and notify the user of the progress. As for your second question, you can specify the target java version that your code is meant to run on, so there is no need to downgrade your version while developing. You'll need to install that version if you want to test it though.
|
# ? Mar 5, 2012 03:02 |
|
Tony Montana posted:I guess I'm asking, visual basic scripters, how to you copy files/directories about without having to copy robocopy.exe all over the place? Maybe this isn't practical for you for some reason, but couldn't you just add robocopy's directory to the global path?
|
# ? Mar 5, 2012 09:27 |
|
rolleyes posted:Maybe this isn't practical for you for some reason, but couldn't you just add robocopy's directory to the global path? I just want to use what is in vbs. I guess I could handle the error codes of the default copy method and basically create my own robust file copier?
|
# ? Mar 5, 2012 09:46 |
|
Tony Montana posted:I just want to use what is in vbs. I guess I could handle the error codes of the default copy method and basically create my own robust file copier? Fair enough. I'm of no further use to you having never really touched VBS, I just thought that might be a simple solution. Assuming the built-in copy returns useful error codes then rolling your own ought to be possible.
|
# ? Mar 5, 2012 10:02 |
|
MEAT TREAT posted:This would be better in the Java thread and we'd need to see your code to see how you're executing the the Perl script. Thanks for that - I'll read up on threading and the Process class. This is all kind of new to me. I'm not doing anything particularly clever with the Perl script, there is a perl script server-side that the Java code calls with a URLConnection and sends/receives data from. The data is checked within the Applet to make sure it is nothing undesirable before sending it to the Perl script. Is there anything more I need to take into consideration? If I set the target version to be something relatively low, I assume it will still work on later versions? Thanks again for the help, I'll read up on those links now.
|
# ? Mar 5, 2012 14:51 |
|
cmndstab posted:If I set the target version to be something relatively low, I assume it will still work on later versions? From the manual for javac: code:
|
# ? Mar 5, 2012 15:56 |
|
In practice there are pretty serious reasons to want to use Java 1.5 over previous versions. That update added, among other things, generics, foreach loops and the modern Collections framework.
|
# ? Mar 5, 2012 16:10 |
|
Internet Janitor posted:In practice there are pretty serious reasons to want to use Java 1.5 over previous versions. That update added, among other things, generics, foreach loops and the modern Collections framework. In practice I've also seen some pretty serious speed increases with 1.6 and some good concurrency additions, but 1.5 is definitely the big one features wise.
|
# ? Mar 5, 2012 16:34 |
|
Internet Janitor posted:In practice there are pretty serious reasons to want to use Java 1.5 over previous versions. That update added, among other things, generics, foreach loops and the modern Collections framework.
|
# ? Mar 5, 2012 21:16 |
|
Hi fellow programmers. This question isn't really all that related to programming, but it's something we all deal with every day, so this is probably the best place to ask: What should I be sitting on? I just switched jobs and ended up with a lovely terrible office chair, and now I'm going home with an aching back and feeling miserable. I know plenty of the problem is that I'm a lumpy goon that isn't active enough, and that's on the list of things to fix, but this uncomfortable chair isn't helping. I've looked at kneeling chairs, at saddle chairs, at Aerons and SAYLs and everything in between. Does anyone have advice for a good chair? I'm willing to spend money for something nice, but I don't want to just go buy an Aeron because it's expensive.
|
# ? Mar 5, 2012 22:31 |
|
I'm looking for recommendations for a solid, relatively easy to understand/use canvas animation library. Extra points if it plays nicely with jQuery. I ran across a couple (including KineticJS which seems like a good option), however I've yet to actually try any of them. Processing.js is another option I was looking at, but it seemed like it had a bit steeper learning curve which I unfortunately just don't have the time for at the moment.
|
# ? Mar 5, 2012 22:45 |
|
Kim Jong III posted:What should I be sitting on? SHSC has a thread on this subject, give it a read and see if anything strikes your fancy.
|
# ? Mar 5, 2012 23:05 |
|
PDP-1 posted:SHSC has a thread on this subject, give it a read and see if anything strikes your fancy. I knew there had to be a thread about this somewhere. Thanks!
|
# ? Mar 5, 2012 23:12 |
|
|
# ? May 16, 2024 15:25 |
|
I'm about to try my hand at making a web app and I have a very basic db question. I'm planning to use the tmdb api to get movie information. Say, for example, that a user will search for a movie and then add it to his list of favorites. He should also be able to view movie information. Would I save the movie information (from tmdb) for each movie added to his list in a 'movies' table? In this case, if he were to theoretically add every movie on tmdb, the 'movies' table would be a mirror of the tmdb database. The other option would be to make a request to to tmdb whenever movie info is needed. Sorry if I'm being unclear.
|
# ? Mar 5, 2012 23:43 |