jwenting 1,905 duckman Team Colleague

learning proper English is far more important.

jwenting 1,905 duckman Team Colleague

yes, your reputation haunts you. Welcome to the real world.
Just as there is no "lifetime hosting" unless your life is very short, so there is no "100% guaranteed" way to prevent black hats from getting into your systems.
All you can do is make their life harder. And how much effort you invest in that depends on how expensive losing your data to an attacker would be.
If losing your machine's content (and some days of traffic) because you have to format the drives and start from scratch will cost you a million, you can spend a million on intrusion prevention. If it's going to cost you a thousand, you spend a thousand.

jwenting 1,905 duckman Team Colleague

so you want some mechanism to synchronise content displayed in instances of your application over a network.
Why didn't you just say so. Completely different question...

And one that has a multitude of potential solutions, some more reliable than others, some faster than others, some easier to implement than others.

But first you'll need to learn to ask the right questions, and ask them in the correct way. Which means showing some research into the topic, not some blanket request for people to do your thinking and coding for you.

jwenting 1,905 duckman Team Colleague

technically that doesn't synch the method, only a code block inside the method ;)

jwenting 1,905 duckman Team Colleague

Microsoft OneNote. Great note taking software, and synchs seamlessly between platforms (Windows, Windows Phone, Mac, Android, probably iOS as well).

jwenting 1,905 duckman Team Colleague

you can't.

jwenting 1,905 duckman Team Colleague

But how do you tell it that the username column should update?

You could use a trigger on the MEMBERS table which on update updates the field in the POSTS table as well.
What the syntax for that is in MySQL I don't know.

jwenting 1,905 duckman Team Colleague

the MySQL syntax may be slightly different (my main experience is with Oracle) but this is how you'd do it in Oracle:

`ALTER TABLE POSTS ADD CONSTRAINT POSTS_MEMBERS_FK FOREIGN KEY (MEMBER_ID) REFERENCES MEMBER(ID) ENABLE;

jwenting 1,905 duckman Team Colleague

if you look at what really happened, VW did nothing wrong. Some flunky broke a non-story as a major "evil corporations breaking the law with software to cheat" when that's not what happened at all.
Bosch created the software which controls the engine performance tuning of VW diesel engines (and many others, those same engine management units are used across the automotive industry).
Those diesel engines of necessity need to run in cycles. During part of the cycle the NOx produced by the engine gets scrubbed out in a filter, kinda like the cathalytic converter in a gasoline powered car.
But that converter gets after a while innundated with other products as well, reducing its effectiveness. To restore it the engine for a few minutes needs to run at a different cycle, which is less fuel efficient and emitting a small percentage of the scrubbed NOx (and some unburned carbohydrates) into the atmosphere.
On average over a long period the cars meet emission standards, just during those few minutes (which happen every few hours or so only) they don't.

All the Bosch/VW software did is to detect when a car is being driven in a way that's typical of engine emissions testing profiles and for the duration not enter the cleaning cycle.
The EPA has since admitted that that's not actually illegal at all, but the cat is out of the box, idiots in the encvironmental lobby, the press, and politicians go ape, and VW …

jwenting 1,905 duckman Team Colleague

hmm, tbh I'd go a few rungs up the ladder and use something like JMS to handle most of the nitty gritty details for me...

jwenting 1,905 duckman Team Colleague

at that moment it effectively was no longer a production machine, at least for the duration of your activities :)

But yes, there may be situations where it's impossible to get something solved without doing things outside of normal procedures. And you'd best cross your fingers that the environment you're working in is such that there are ways to quickly set up such exceptions as they always happen at times when there's no time to follow normal procedures...

jwenting 1,905 duckman Team Colleague

open source does not mean no cost. There can certainly be a cost involved, but generally that cost will be no more than the cost of delivering the code to you (e.g. a company I used to work for had an open source project, the source would however be distributed only on CD-ROM on request, at a cost of something like $25 shipping and handling (postage, administration, cost of the media).

jwenting 1,905 duckman Team Colleague

no need to draw anything out of the boxes. Just open them and look inside...

Yes, that's a trick answer to a trick question.

jwenting 1,905 duckman Team Colleague

I'm all for condensing the signatures :) Doesn't mean mods can't be identified though. There's room next to the rep count (or is that rap sheet?), or use a different colour font for their names.

jwenting 1,905 duckman Team Colleague

you NEVER debug production code.
Rather you analyse the log files (those should of course exist and be designed to have useful information), then try to recreate the scenario on another machine (which should be as close to the production environment in all respects as you can get it, including data, ideally a mirror image).
THERE you can attach a debugger.

overwraith commented: Good idea, but I don't think there was actually much logging. +3
jwenting 1,905 duckman Team Colleague

did it? If the chicken came out of an egg that wasn't a chicken egg, how could it have been a chicken :)

rubberman commented: Ok. Voting up, but this is silly! +13
jwenting 1,905 duckman Team Colleague

and no, you don't need help ASAP. Your problem is no more urgent than the stuff I've on my plate that'd cost the customer a lot of money if it's not resolved quickly.
And doing your homework for you (you've clearly not put in any effort whatsoever, just copied your assignment here verbatim) isn't what we're here for.

rproffitt commented: ASAP+ +5
jwenting 1,905 duckman Team Colleague

read your inner loop carefully.
j starts at 1, then is decreased until it is smaller than i.
i starts at 6, then is increased.
So your inner loop never terminates, as it starts smaller than i, and then is made ever smaller and smaller.

Of course eventually it will end, when the program crashes because of a numeric underflow as j reaches Inter.MIN_VALUE.

jwenting 1,905 duckman Team Colleague

Read your warranty carefully... Depending on brand and sometimes even product it can vary wildly.

I KNOW Nikon USA for example does not honour any warranty for any Nikon product that's not sold by them, and the rest of the world does not honour warranty on anything sold by Nikon USA.
This is because they're technically a different company from Nikon World (so funds are completely separate). Other similar structures exist within other companies.

No clue what Samsung does, but I'd not be surprised if they use regional warranties to discourage people buying products abroad where it's cheaper (there are massive differences in the price of electronics products between countries).

jwenting 1,905 duckman Team Colleague

"steal"? No. They don't do that.
Of course at times they may need certain information to provide you with specific services.
Same with Apple and Google.

People complain that Windows 10 sends information to the internet if they use Cortana for example. But they never realise that Cortana searches not just their PC but the internet as well.
Same with logging in using a Microsoft account, which is btw. optional. This will synch your various devices you use the account on, which of course requires things like device settings, account information, background images, and things like that being stored on an external server.
If you use OneNote, of course it sends stuff to OneDrive, which is where OneNote by default stores its data, which is what allows you to type a note on your PC and read it back on your tablet or mobile phone.

jwenting 1,905 duckman Team Colleague

WTH are you trying to submit a 30MB http request in one bit? Multipart mime requests have been with us for over a decade.

jwenting 1,905 duckman Team Colleague

No doubt the previous owner was convinced that "Microsoft is evil" and therefore refused to install any Windows updates and couldn't find pirated AV software (or more likely his pirated games refused to install with his pirated AV software active so he deleted it).

Have a few acquaintences like that. And they consistently blame the poor performance and constant crashes of their computers on Microsoft rather than on the flood of malware that's residing on their (really theirs? they effectively belong to the people who've hijacked them) computers.

jwenting 1,905 duckman Team Colleague

That's an extremely broad topic... Without programming there's no software. Without algorithms there's no programming.
Of course implementing an algorithm in a computer program requires programming. But you can envision an algorithm and describe it in other contexts as well, without writing any need at all.
For example a sorting algorithm you can play out using a flat surface and for example a supply of coins or different coloured jellybeans, or different sized screws, whatever you have at hand.

You need to know what you're modeling before you can start coding it in software after all.

jwenting 1,905 duckman Team Colleague

define "best"...

jwenting 1,905 duckman Team Colleague

Java does not give you direct memory access, that's one of the main reasons they designed the language in the first place, do away with all that messy malloc, calloc, etc. etc. you're stuck with in C.

And no, your program doesn't allocate any memory at all. It requests storage for an object from the JVM which puts it somewhere and hands back a reference through which the program can then retrieve the object again.

jwenting 1,905 duckman Team Colleague

why should we help you leech data from other peoples' websites without their permission?
Contact the site owners and ask them if they can supply you with the data. If the data is supposed to be available to other applications, they'll have a system in place you can subscribe to at an appropriate fee.
If not, you'll need to find another legitimate way to get the data from somewhere.

jwenting 1,905 duckman Team Colleague

you don't want to do any of that.
https://crackstation.net/hashing-security.htm

Do NOT try to store passwords unless you have to, and then only do it if you really know what you're doing (and if you're asking this, you don't).

jwenting 1,905 duckman Team Colleague

main observation here: don't do this. NEVER create SQL statements this way, ALWAYS use PreparedStatements or better yet JPA.
Prevents a lot of problems.

jwenting 1,905 duckman Team Colleague

porting usually means getting something to work on a different operating system and/or hardware.
This is largely a manual process (though I'm sure there are tools that can help identify common areas of interest).

Transpiling is the move of one language to another. While there are tools that can help (again) it's mostly a manual process again.

Now, what stultuske mentions, code generation using code in one language written to a highly specific and limited API to generate code in another language that's defined by the original code is no different from any other compiler.
A Java compiler generates executable bytecode from Java code. A GWT compiler generates Javascript from Java code. A C++ compiler generates object code from C++ code, a C# compiler generates C# runtime units from C# source code.
You can definitely write a tool that generates say Java source code from C++ source code, but it'd be one hell of a job.

overwraith commented: I did some googling, apparently sourceforge has some of these tools, and they are very extensive programs, had to cancel the svn download. +2
jwenting 1,905 duckman Team Colleague

would be appropriate, just as it was appropriate to flag a thread that was placed in the wrong forum before.

jwenting 1,905 duckman Team Colleague

an instance of an inner class exists only within the context of an instance of its outer class, UNLESS it's static.
Result is that an inner class of a non-serializable outer class is not serializable, even if it is marked as serializable itself.

jwenting 1,905 duckman Team Colleague

having to type in a search string every time I enter the site to look for say Java topics, and then getting not just those but javascript as well (because Java is a substring of Javascript) is doubly irritating.

And tag hell is already starting, someone created a "wow" tag for example.

jwenting 1,905 duckman Team Colleague

Tags appear at the end of the thread.

As to the signature, with the narrower content section and larger font you get a lot less actual content per page now.
For example my post was 3 lines of actual content, plus 4 lines for the signature, plus a 2 line header.

In the original layout most of the signature was in the left sidebar flush with the content of the post, taking up less vertical screen real eastate.
If you have a portrait form factor screen like a tablet no doubt the new layout works well. On a landscape screen like a laptop it's a lot of scrolling.

jwenting 1,905 duckman Team Colleague

signatures are way too big and prominent.
Tag clouds appearing only at the far bottom are a pain, place them in the side bar instead.

jwenting 1,905 duckman Team Colleague

never heard of thymeleaf, JSP is way outdated.
Use JSF instead.

Spring MVC of course doesn't force you into a specific view technology in the first place. Decoupling is the name of the game after all.

jwenting 1,905 duckman Team Colleague

it's indeed gotten way way harder to find anything specific.
Not only do you have to scroll through all the dozens of collated pinned posts (while it may have been 2-3 per forum, if you combine 20 forums into 1 that leaves you with 40-60 of them), but there's no quick way to filter just to the content you're interested in.

It's not AS bad on stackoverflow because there's a lot more content to fit on a page, but if you're on a smallish screen especially on Daniweb you're only getting 2-3 post headers per page...

jwenting 1,905 duckman Team Colleague

what exactly are you trying to accomplish here?

jwenting 1,905 duckman Team Colleague

Primefaces has a good mobile variant. It's a JSF framework of course, but the ideas can be used for other platforms as well.
Things like a menu that flows over the page as required and disappears when no longer needed or explicitly dismissed.

jwenting 1,905 duckman Team Colleague

why scary?
Any logout from any website is just a link you click. Which submits a request to a webserver somewhere.
Javascript can submit requests to webservers, so can a lot of other things.

Of course it's possible to write a logout system that requires active cooperation from the user, but that'd just piss off those users.
It'd come down to having to enter your password to log off, rather pointless is it?

jwenting 1,905 duckman Team Colleague

Javascript is NOT Java.

and oh, try doing a bit of your own research.

jwenting 1,905 duckman Team Colleague

I'd guess at the very least you should have some restrictions on the times. After all, trains can run over a route for centuries, several times per hour.
I seriously doubt you really want to have information on ALL trains that have ever run that route for as long as the railroad has been there.
And of course it's utterly impossible to have ALL information about ALL trains that will ever run that route in the future.

jwenting 1,905 duckman Team Colleague

you NEVER, EVER want to store plain text passwords. It's an invitation to getting your users' accounts stolen, and most people use the same username and password in a lot of places...

You also NEVER, EVER, want to use MD5 as it's not secure at all.
https://crackstation.net/hashing-security.htm read this as to why.
Also look at https://www.youtube.com/watch?v=8ZtInClXe1Q and https://www.youtube.com/watch?v=b4b8ktEV4Bg and https://www.youtube.com/watch?v=y4GB_NDU43Q

diafol commented: well said +15
jwenting 1,905 duckman Team Colleague

Overall, very nicely done. Clean and modern, professional look.
Some points though:

  1. the white margins on the left and right are rather big, costing a lot of room on screen. Make the main pane wider, so people need to scroll less.
  2. Font could be a tad smaller (1-2 points), again less scrolling
  3. Posts on the main page used to show in which (sub)forum they were made in the header. Makes filtering what you want to read in detail that much easier (plus often gives context that may be important in deciding whether to click through or not).
  4. When in a post or forum I now can't get to any other forum without going back to the main/entry page. Not userfriendly.
jwenting 1,905 duckman Team Colleague

even if you're not facing potential SQL injection attacks (and who isn't facing those these days...).

Reverend Jim commented: Indeed. +14
jwenting 1,905 duckman Team Colleague

http://norvig.com/21-days.html mandatory reading for anyone expecting to learn a programming profession in next to no time.

To any professional developer who's spent years or decades learning his craft, the attitude that it should only take a few days and watching some youtube videos to gain the same skills for an average person is nothing short of an insult.

jwenting 1,905 duckman Team Colleague

Level3 is a massive hosting company with datacenters around the world. They're known good, but were just an example of the type of operation you should look for rather than the here today, gone tomorrow el-cheapo hosting services run out of somebody's garage.

As to self-hosting, very nice option if you have the funds to pay for your own data center with 24/7 staff on site.

jwenting 1,905 duckman Team Colleague

sounds like a very old Excel file with macros written to expect a hardwired directory?

jwenting 1,905 duckman Team Colleague

usually with hosting bigger is better, the large established hosting companies will likely outlive the small ones, and have better support infrastructure as well.

And I'm talking of places like Level3 here...

jwenting 1,905 duckman Team Colleague

ok, I had this exact problem last week. What you need to do is to remove the anonymous users that the mySQL installer creates.
For whatever reason all attempts to log in get mapped to that user, causing their logins to fail as is has no permissions to do anything.

Easiest with mysql workbench, but drop user ''@'localhost'; and the same for the other anonymous users works as well from the commandline client if you can get into that.

jwenting 1,905 duckman Team Colleague

sorry, you're dead wrong. Blobs are the way to store binary data in a relational database.
AND audio files are far from unstructured.

the audio files that are stored, i want them to be retrived and play and them when user clicks on them.

Take a look at JSF (you want it instead of JSP anyway) and especially Primefaces which has audioplayer components.
Other JSF libraries may have them as well, but Primefaces is very good and pretty much accepted across the industry.