pty 882 Posting Pro

Your procedure is returning VAR_PRICE OUT AUTOMOBILES.A_PRICE%TYPE. You should be returning a table.

pty 882 Posting Pro

More likely you didn't follow their instructions. It looks quite straightforward to me.

pty 882 Posting Pro

Delete and ban. These threads are worthless.

Guard Dog commented: What do you mean under "bad links"? +0
ZoyaHall commented: Why? This question is more relevant than ever. +0
pty 882 Posting Pro

Without knowing what you've done it's difficult to diagnose anything. Did you install this?

pty 882 Posting Pro

Not that anyone will be too bothered, but I created a full guide on how to remove the ads.

Here is the link.

Hopefully anyone who happens across this thread in a search will find it useful. Post here (or on Github) if you run into any problems!

pty 882 Posting Pro

Additionally, in theory your ISP could inspect your data as it passes through them on its way to you. However, sites that contain important personal data (such as your bank, email provider, online shops you buy things from, etc) should be secured via SSL. This will prevent anyone from inspecting data in transit.

Your browser will tell you if a site is secure, just look for a green padlock on the left side of the URL bar.

Screen_Shot_2017-11-10_at_15_57_10.png

It's a good idea not to send anything personal or important unless you can see one of these.

pty 882 Posting Pro

What does your ISP have to do with your data? Why would they ever see it? If they were compromised, how would that affect you?

pty 882 Posting Pro

TinyMCE is open source and the 'community' (read: unsupported) edition is available using NPM, and easy to use with module loaders like webpack and browserify.

I'm guessing Davy hasn't done it that way, but without him saying what he's done it's impossible to point him in the right direction. The right direction is probably RTFM, though.

rproffitt commented: Yes. "What did you do, Dave?" +0
pty 882 Posting Pro

Both Oracle and SQL Server support BACKUP DATABASE, but they have different syntaxes and options.

Providing you can connect a web app to any database you want to back up, you should be able to execute these commands using the SQL driver your language/framework provides.

Docs here and here.

rproffitt commented: Fine example about how details matter. +12
pty 882 Posting Pro

I don't use Windows. You've probably got the old version cached or something, the latest IE and Edge have supported alpha-PNG files for years.

pty 882 Posting Pro

You'd need to check with whoever is hosting your database. The error message you mention is coming from MySQL, so the connection to the DB appears to be fine, just the permissions for your particular user on the server are at fault.

pty 882 Posting Pro

You need to ensure that your user has privileges to connect to your database. Try connecting from the command line, use the grant command to add permissions to a user, and flush privileges to make sure they're applied.

pty 882 Posting Pro

Unfortunately I am as much in the dark as everyone else here as to how to adapt.

Have a quick look at what's replaced forums in this area.

Take r/learnprogramming for example.

There aren't any "NEED HOTEL BOOKING APP HALP PLS" posts (they do appear but are swiftly dealt with), there's no spam, there's no drama, there are plenty of people offering advice and pointing people in the right direction.

Importantly, there is a set of rules that is rigid and anything that doesn't comply is dealt with so quick most people are unaware that it happens.

rproffitt commented: Well, here you are, weary traveler, one steaming hot cup of justice. No need to thank me, (The Tick) +0
cereal commented: +1 +0
pty 882 Posting Pro

This is a good question and there are thousands of potential answers, but here's what I'd suggest. Of course this depends on your interests and what you've learned so far.

Start with a problem. It doesn't have to be complicated or wide-ranging and can be as contrived as you like. Say, you have a shelf full of books (don't type them in, just use an existing list!):

  • Which has the longest title?
  • Which was published first?
  • What is the average number of pages (mean, median, mode)?
  • Which language is most popular?

These are all individual problems but you'll also need to 'share' some functionality (namely the loading/parsing of the data). All should be quite straightforward but some moreso than others.

Then add a touch of complexity:

  • Which is the longest book written before 0CE?
  • For each century, which is the most frequently-occuring author in the list?

If you get stuck on any, post back here, someone is likely to help (these are fun tasks!)

pty 882 Posting Pro

That's the best approach. My suggestion makes sense if you don't have a pile of stuff to migrate, because all the hard work has been done. If migration is a big complex task, cereal's approach is very sensible and more portable between databases/stores.

pty 882 Posting Pro

I'd use PostgreSQL which has native network address data types.

pty 882 Posting Pro

Perhaps paste the error instead of a minified jQuery?

pty 882 Posting Pro

I develop on an average machine (a 2014 MBP, i5 with 8GB RAM). I don't need any more grunt because I have AWS at my fingertips. I can have a cluster of massively powered machines at a very reasonable price - you only pay for them while you use them.

If, however, I was a gamer, where latency is a key issue, I'd want that power a bit closer. But, I'd need to spend more money even if I only played three hours a week.

Pros and cons with both approaches.

pty 882 Posting Pro

I'll just leave this here.

rproffitt commented: Sooner or later, time.... +12
ddanbe commented: Indeed +15
pty 882 Posting Pro

Date already does this, just replace the date (ie 2004/05/07) with the one you want.

$ date -d"20040507" +"%A"

Friday
rproffitt commented: TGI pty +0
pty 882 Posting Pro

Github and Gitlab are both companies that do more or less the same thing; they provide a hosted Git service.

The main difference is that Gitlab is open source and you can download and run the community edition on any machine you want for free. This is why Gitlab's popularity has skyrocketed over the last few years.

Github, while they do offer on-premises services (at a cost), make most of their money through their centralised online offering, github.com. Nearly all open source projects use it (or at least have a presence there) because when they started it made the process of forking and submitting code (in the form of pull requests) simpler than it had been in the past.

Additionally, Gitlab has plenty of extra features that Github doesn't, such as continuous integration, a docker registry.

Github, instead, offers more in the way of integrations with other SAAS providers via the Github marketplace.

Which should I choose?
  • I want to install and run on my own server with as many users as I like. Gitlab

  • I want private repositories but I don't want to run anything on my own server, I'd rather have it managed by a company with a good record of performance and uptime : Bitbucket or Gitlab for free. Or, one of Github's paid plans

  • I want to write open source software and have plenty of visibility online. Github
cereal commented: well said +15
ddanbe commented: great +15
rproffitt commented: More power... +12
pty 882 Posting Pro

You can't expect anyone to work out what's going on without posting the accompanying JavaScript. I suggest you make a JSFiddle or similar.

diafol commented: Davy has been here 6 years. You'd think... +15
pty 882 Posting Pro

Keeping questions and scenarios fresh helps prevent lesser students (like this one) from just finding the answers online.

This problem has been solved hundreds of times, and there's an exact duplicate in this forum.

I don't mind helping but I like to see some effort first, not just pasting the question directly into a forum. If you want to help the OP do his homework without actually learning anything, go ahead.

pty 882 Posting Pro

I'd ask for the money back on whatever course you're doing, the material hasn't changed for seven years.

pty 882 Posting Pro

You're welcome, glad I could be of service.

rproffitt commented: Fresh eyes, old professor. +12
pty 882 Posting Pro

There is only one way, one rule and one method. It's called write some good content. Content is key, and if it's good enough to capture an audience you've cracked it.

You're not going to appeal to everyone. Write for the audience you want, concentrate on topics you're both knowledgeable and passionate about.

pty 882 Posting Pro

Yep can confirm this on Android with Chrome.

pty 882 Posting Pro

So, a quick update.

My spare router that I tried using as a firewall can't block https traffic, which is unfortunate.

Luckily I had Plan B.

I switched the TV to point at my OpenDNS account, after a few hours I checked the logs

link, for some reason the remote image isn't displaying either :/

The image is on imgur because I was getting nginx errors when attempting to upload it to Daniweb.

So, I've blacklisted samsungacr.com . I've had no new adverts, but I suspect the ones already on the TV will expire soon and disappear. If they don't I'll do another soft reset. I'm avoiding that because it means typing in my 35 character Amazon Prime password using the onscreen keyboard, a task I don't enjoy.

For reference, here's my naughty list.

link.

rproffitt commented: Thanks for the list. +12
pty 882 Posting Pro

This isn't a typical hardware post, but I couldn't find anywhere better for it.

Last October, after my previous TV packed in, I bought a shiny new Samsung Smart TV. My shortlist of requirements was:

  • Excellent picture quality, preferably 4k
  • No advertising built into the UI
  • Within my price range (I ended up spending £1,400 on it)

The reason for my second requirement is that many years ago I bought a Hard Disk Recorder from Panasonic that had the following style of EPG. Note the advert taking up roughly 1/4 of the width of the screen.

.

I have not bought anything from Panasonic since, and when asked for recommendations, I've advised against their products.

So, I found a model of Samsung that met my requirements. It did not have adverts anywhere, and the "Smart" features, like Voice Control could be turned off. It supported Amazon Video and YouTube too, so I wouldn't need my Chromecast. Excellent.

Fast forward to the middle of this year, I received a software update from Samsung. Great, software updates will make my already-great experience better, right? Not so much. Now, periodically, the following abomination appears in the actual UI of my TV.

IMG_20170824_192539.jpg

Amazing. On the actual firmware release notes from the website, there's no mention of adverts being added (so I couldn't have checked, even if I'd have wanted to), and now I'm stuck with an expensive advertising board sat in my front room.

rproffitt commented: At least we don't have to fix the Talkie Toaster (see Red Dwarf for more.) +12
pty 882 Posting Pro

Yes, it is possible, and how to do it is outlined in MySQL's excellent documentation.

However, you almost certainly don't need multi-master. You just don't.

rproffitt commented: That's what I thought too. +12
pty 882 Posting Pro
pty 882 Posting Pro

The code I provided is in an entirely different language, you can't just paste Ruby into PHP!

Maybe ignore JavaScript for a while and learn PHP first.

pty 882 Posting Pro

Hard to tell what's going on without knowing what your server is doing and that you're sending requests to the port it's listening on.

Here's what I'd do, substitute my Ruby for your PHP. First, create a standalone, super-simple API. Here's an example

require 'sinatra'
require 'json'

# world's simplest API
get '/hello' do
  {hello: "world"}.to_json
end

Now, when I run that file in Ruby, it tells me where it's listening.

== Sinatra (v2.0.0) has taken the stage on 4567 for development with backup from Puma

Finally, I just need to make a sensible request:

http get localhost:4567/hello

And here's the response.

HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 17
Content-Type: application/json
Date: Sun, 27 Aug 2017 17:22:05 GMT
Server: WEBrick/1.3.1 (Ruby/2.4.1/2017-03-22)
X-Content-Type-Options: nosniff

{
    "hello": "world"
}

Now, the browser hasn't been involved at all. Everything's simple and visible. If something goes wrong I'll get the feedback right in my terminal window. PHP supports this approach too.

pty 882 Posting Pro

I'd start by leaning DD-WRT, then use that to build a Captive Portal. You'll need a compatible router.

pty 882 Posting Pro

I don't really understand the question, but if you mean you want to display code with syntax highlighting (rather than edit it, in which case rproffitt's answer is correct), then there are a few libraries for this, namely rainbow and highlight.js.

pty 882 Posting Pro

This looked interesting so I had a go. Did it in Ruby so it wouldn't be of use to anyone with Java, C or C++ homework :)

puts "enter a number:"
number = gets.to_i

# calculate the dimensions of the square
length = ((number-1) * 2) + 1

# create an empty set of nested arrays of the correct length
square = Array.new(length, Array.new(length, nil))

# loop through the rows...
(0...length).each do |row|
  # ...and the cols
  (0...length).each do |col|

        # calc the min distance from each vertical and
        # horizontal edge, and set the value of the cell
        # to the smallest (which we'll increment by 1 to
        # adjust for zero indexing)
        square[row][col] = [
                [row, ((length-1)-row)].min,
                [col, ((length-1)-col)].min
        ].min + 1

  end

  # we're done with this line, pad and print it!
  puts square[row]
        .map {|n| n.to_s.ljust(2) }
        .join(",")

end

Screen_Shot_2017-08-24_at_16_36_46.png

pty 882 Posting Pro

Easy to forget how much power you have with the Unix toolbelt at your fingertips.

Screen_Shot_2017-08-21_at_15_49_23.png

rproffitt commented: Toolbelt, power? Batman using the force? +12
pty 882 Posting Pro

Nobody's going to try and decipher/run all that code. What exactly is the problem? Try creating a JSFiddle or something.

pty 882 Posting Pro

Why are you mixing PHP and Javascript up like that? And why are you using document.getElementByID? Also, putting spaces in id attributes is invalid.

Clue, just use PHP for this, perhaps a case statement:

switch (true) {
    case $count <= 6:
        $trend = 'super-hot';
        break;

    case $count <= 4:
        $trend = 'hot';
        break;

    case $count <= 1:
        $trend = 'new';
        break;

    default:
        $trend = 'lame';
        break;
}
pty 882 Posting Pro

Still waiting for links UI. For a bit of entertainment I looked up some amazing contributions UniqueIdeaMan has made to the web. Here's a great one:

Problem is, googling brings out forums and forums are full of amateurs too with amateurish samples

So, let's stop helping him, clearly we're too amateurish.

On a brighter note, here's another person hitting the nail on the head.

Jesus Christ, dude. You have no ****ing clue what you are doing and just stabbing your **** around hoping to hit something. You're submitting your form using GET and then looking for POST. Do you even have an idea what those words mean? What's the difference between them?

The first ****ing thing you do is realize your IF condition is failing if you don't see an echo result, so a normal person would take a look in $_SERVER to see what's going on. Well, a normal person would understand the basics by this point and know what POST and GET mean.

I know you're trying to learn, man, but you keep coming in here with syntax errors. You have no understanding of the basics.

pty 882 Posting Pro

As a SQL contractor who comes across computer-generated messes like this rather frequently, I'd like to make a suggestion. Break this up into manageable chunks.

Here's your query with syntax highlighting:

Screen_Shot_2017-08-18_at_12_38_15.png

Attempting to do the case statements alongside aggregate functions with a load of joins and criteria is complex, but you can make it easier by creating an intermediate view that just does the select and case statements. Then, from that view, try to add your where clause. If that's all fine, now try adding the aggregates (sum and group by).

pty 882 Posting Pro

Since the odds are against me then how-about I pay you nothing if I lose but you pay me everything of your wealth if you lose ? Can you afford to bet like this ? I doubt it! Programmers in other forums have told me my ideas are good enough that they told me to shoot the top 10 sites in the world without talking too much. One even pleaded me to not reveal my ideas to the "clowns in the forum". Therefore, I have stopped).

You've not had any ideas though, because if you did you wouldn't be wasting your time arguing on here and you'd be building something. How about you point me at the homepage of one of your world beating projects, or to a patent detailing your top ten websites in the world ideas and then I'll apologise and admit that you're not a complete sham?

That sounds like a fair bet to me; and at this point I'd rather send you £100 than admit you have a clue.

So, the challenge has been set, UI has the simple task of pasting a URL to one of his creations, ideas or projects. If he can, all is forgiven and I'll let him continue conquering the world. If he can't, he's a phony.

pty 882 Posting Pro

I think you misunderstood UI

It's not the first time.

The general consensus is that UniqueIdeaMan's ideas are indeed unique. Unfortunately they aren't the good kind of unique.

This hasn't only been established here. Benanaman on codingforums knows the score. And Mittineague on sitepoint's forums goes as far as claiming that he is

missing a basic understanding of how things are.

As the old saying goes, there's no smoke without fire.

The nicest possible thing I can say about UI is that he is clueless timesink.

Dani commented: Please can we not resort to name calling. If you have nothing nice to say ... +0
pty 882 Posting Pro

UI, I'm still waiting for you to share the details of your browser that is on the verge of setting the world on fire. Please can you post some information or I won't be able to remove you from the "bullshitting timewaster" category that you are currently a member of.

rproffitt commented: The last two set the world on fire showed me a hacked up firefox and chromium based browser. Both were infested with spyware. "It's my feature!" +12
pty 882 Posting Pro

So how come the link is marked as broken in my post? It works just fine.

https://help.qwant.com/help/overview/how-does-qwant-index-the-web/

The button to continue to the page should be more strongly coloured than the 'go back' button, too. Without having full trust in the 'is the link dead' checker, it's probably what most people want to do. If it is dead, they can just click back.

Gribouillis commented: The link worked once for me then mysteriously broke. +0
pty 882 Posting Pro

Qwant appear to have avoided some of the problems of building their own index and spider by using Bing. Still, it looks like a decent attempt at starting a search business and I wish them luck.

rproffitt commented: Why is using Bing struck out? +0
pty 882 Posting Pro

The main question is the amount of work it would take to build your own search engine

Building a search engine that works well would be incredibly complicated. Having it index a decent enough chunk of the web to be useful would be incredibly expensive. Getting people to actually favour your search engine over what's already out there would be almost impossible.

Keep in mind, when Microsoft needed a search engine they didn't build one from scratch. They already had the dated and not-very-successful MSN search, plus they went out and bought Powerset, Farecast and VideoSurf (probably others, too).

pty 882 Posting Pro

DuckDuckGo was launched in 2008 and is totally unaffiliated with Google. It's a shame Google is so entrenched but DDG is the best option around from a privacy point of view, results are of a decent quality and the UI is sensible and familiar.

pty 882 Posting Pro

Because, when I mentioned my browser somewhere (that revolves around my big ideas), one of the major international advertising company (from where the money would be coming from to the browser users) read the concept and told me not to go ahead publicising it anymore unless they get back to me.

So are you going to show us this world-beating browser?

rproffitt commented: Show me the money! (or broswer.) +12
pty 882 Posting Pro

Yes, you can definitely normalise further, like with the nutrients approach @diafol suggests, but you need to know the data before making a judgement on whether it's worth it.

There are advantages and disadvantages in cases like that.

ddanbe commented: Thanks for the advise! +15