677 Posted Topics

Member Avatar for maylynn
Member Avatar for pty

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 …

Member Avatar for pty
2
594
Member Avatar for Thomas_42

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?

Member Avatar for happygeek
0
510
Member Avatar for Abdullah_18

Here is a working version. Unfortunately in the wrong language, looks like OP *will* have to do some work after all. loop do puts "Enter a number (-1 to end):" num = gets.strip exit if num == "-1" num .chars .each .with_index(1) {|c,i| puts "Digit#{i} = #{c}"} end

Member Avatar for pty
0
413
Member Avatar for random_1

Also make the `id` field a `primary key` (or at least `unique`) to prevent this from happening at the application level.

Member Avatar for benanamen
0
353
Member Avatar for mattyd

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.

Member Avatar for benanamen
0
660
Member Avatar for FOYSAL_1
Member Avatar for overwraith

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](https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89511) and [here](https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql).

Member Avatar for overwraith
0
458
Member Avatar for davy_yg

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 …

Member Avatar for gentlemedia
-1
366
Member Avatar for random_1

Not in Java. You can use `ArrayList<MyObject>` and make `MyObject` flexible enough to cope with more than one type. In other more-flexible languages you can be more direct. In Ruby, for example: stuff = ["a", :a, 1, ["a", :a], {a: 1}] => ["a", :a, 1, ["a", :a], {:a=>1}]

Member Avatar for JamesCherrill
0
278
Member Avatar for Yugandhar_1

I've come across this before and believe it's related to [`Access-Control-Allow-Origin`](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). I'd expect it to be a consistent problem rather than something that happens occasionally, though. Are you serving your frontend and backend on different addresses/ports/vhosts?

Member Avatar for pty
0
424
Member Avatar for davy_yg

Could you post a screenshot of the problem and the actual .png file? Hard to tell what's going on on mobile

Member Avatar for JamesCherrill
0
403
Member Avatar for COKEDUDE

Yes, use a [library](https://github.com/semitrivial/csv_parser). Writing robust CSV parsers is very difficult because of the difficulty of nicely dealing with "bad" data.

Member Avatar for COKEDUDE
0
331
Member Avatar for Stefce

Use [Faker](https://github.com/stympy/faker) or similar. Keep in mind, there aren't an unlimited number of first (or last) names so you'll have to create *some* random element and append it to avoid clashes.

Member Avatar for taersious
0
950
Member Avatar for Dipayan_1

> databases don't have 'Arrays' While this [hasn't been strictly true for a number of years](https://www.postgresql.org/docs/9.6/static/arrays.html), @ stultuske is correct in suggesting that using an array inside a RDBMS is likely to have drawbacks.

Member Avatar for pty
0
2K
Member Avatar for Magic8Computing
Member Avatar for AssertNull

> 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](https://www.reddit.com/r/learnprogramming/) for example. There aren't any "NEED HOTEL BOOKING APP HALP PLS" posts (they do appear but are *swiftly* dealt …

Member Avatar for Dani
1
625
Member Avatar for Howard_2

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. …

Member Avatar for pty
0
228
Member Avatar for mattyd

I'd use PostgreSQL which has [native network address data types](https://www.postgresql.org/docs/9.6/static/datatype-net-types.html).

Member Avatar for pty
0
6K
Member Avatar for Kelly_8

I develop on an average machine (a 2014 MBP, i5 with 8GB RAM). I don't need any more grunt because I have [AWS](https://aws.amazon.com) 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. …

Member Avatar for pty
0
685
Member Avatar for davy_yg

Seeing as you're *already* loading Bootstrap, [why not just use it](https://jsfiddle.net/Wc4xt/1052/)?

Member Avatar for pty
0
380
Member Avatar for spades0001

To cut a long story short, you don't want to connect to the database directly, you want to build an API that sits in-between. Let the API service talk to the database and communicate with the API via HTTP calls or some other protocol.

Member Avatar for HitsuGaya198
0
4K
Member Avatar for Saanvi
Member Avatar for RainaAnja
Member Avatar for JamesCherrill
0
1K
Member Avatar for naheedkassam

That sounds like what he's after. With more than one level you'd need to use a window query to do this. [Here's an example](https://gist.github.com/peteryates/5098463) I wrote many years ago.

Member Avatar for naheedkassam
0
446
Member Avatar for KING_9

Date already does this, just replace the date (ie `2004/05/07`) with the one you want. $ date -d"20040507" +"%A" Friday

Member Avatar for pty
0
218
Member Avatar for Hamsterking

While Davy is almost right, setting the width of the surrounding `div` won't quite work; that will make the `div` itself 100% wide but not the contents. You'd need to apply the `width: 100%` to the image, as per [this](https://jsfiddle.net/pb7e1va6/) example.

Member Avatar for diafol
0
375
Member Avatar for davy_yg

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](https://gitlab.com/gitlab-org/gitlab-ce) on any machine you want for free. This is why Gitlab's popularity …

Member Avatar for pty
0
277
Member Avatar for davy_yg

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.

Member Avatar for davy_yg
0
264
Member Avatar for harsha_6

I think the question is "if I compare a string to an integer, what will happen?"

Member Avatar for DavidB
0
163
Member Avatar for UI

> 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](http://www.codingforums.com/php/385298-curl-experiments.html#post1532613). And Mittineague on sitepoint's forums [goes as far as …

Member Avatar for tango_1
-2
3K
Member Avatar for Divij

I'd ask for the money back on whatever course you're doing, the material [hasn't changed for seven years](https://www.daniweb.com/programming/databases/threads/303390/erd-question).

Member Avatar for pty
0
987
Member Avatar for Matt_25

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 …

Member Avatar for ankit_27
0
210
Member Avatar for Busuioc
Member Avatar for Aman_14

This problem was solved like 40 years ago. $ sort -t" " -rnk4 data.tsv ascon1 201707015 Jack 97.5 11.5 11.5 11.5 ascon1 201707013 Josh 79.5 11.5 11.5 11.5 ascon1 201707011 John 77.5 11.5 11.5 11.5 ascon1 201707012 Grld 70.0 11.5 11.5 11.5 ascon1 201707014 Jess 67.5 11.5 11.5 11.5 * …

Member Avatar for pty
0
12K
Member Avatar for diafol
Member Avatar for rchawdhari

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.

Member Avatar for rchawdhari
0
260
Member Avatar for Gloak

[Here's a comprehensive answer](https://stackoverflow.com/a/1732454/7649503) why parsing XML with regular expressions is a bad idea. @AndrisP put you on the right track.

Member Avatar for Gloak
0
3K
Member Avatar for Dani

Are you definitely using a Thunderbolt 3 cable between your MBP and the 5K monitor? Incidentally, slightly jealous, I need to get one of those monitors but I'm worried my 2013 MBP might not be beefy enough to drive it smoothly.

Member Avatar for rproffitt
0
460
Member Avatar for abdu_4

[`script` tags](https://developer.mozilla.org/en/docs/Web/HTML/Element/script).

Member Avatar for pty
0
79
Member Avatar for SimonIoa

Your post doesn't make a lot of sense. What functions don't return anything? Where is `ajaxPost` defined? Does your API call actually work? Try accessing your API via another program like [Postman](https://www.getpostman.com/) or [HTTPie](https://httpie.org/).

Member Avatar for pty
0
282
Member Avatar for peace_coder

You're not actually adding them to the DOM. Look [here](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML).

Member Avatar for pty
0
692
Member Avatar for cainam29

And the moral of the story is, don't try to `join` tables using manually-entered `string`/`varchar` fields. It just won't work. Some people will enter their name as 'Timothy' in some forms, 'Tim' in others and ocassionally 'Timmy'. Your `user` table should have a automatically incrementing numeric `primary key`. Your tracker …

Member Avatar for AndrisP
0
274
Member Avatar for Marlon189

I'd start by leaning [DD-WRT](http://www.dd-wrt.com), then use that to build a [Captive Portal](https://en.m.wikipedia.org/wiki/Captive_portal). You'll need a [compatible router](https://www.dd-wrt.com/site/support/router-database).

Member Avatar for pty
0
272
Member Avatar for abdu_4

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](https://craig.is/making/rainbows) and [highlight.js](https://highlightjs.org/).

Member Avatar for pty
0
346
Member Avatar for rfrapp

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 …

Member Avatar for pty
0
1K
Member Avatar for Royal_3

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](https://developer.mozilla.org/en/docs/Web/HTML/Global_attributes/id). Clue, just use PHP for this, perhaps a case statement: switch (true) { case $count <= 6: $trend = 'super-hot'; break; case $count <= 4: $trend …

Member Avatar for Cristian_1
0
260
Member Avatar for Mr.M

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](/attachments/large/0/4ef22f2c98e5999150e2ca7b9f168354.png)

Member Avatar for thines01
0
3K
Member Avatar for ffej2ffej

It's annoying when people ask a straight up SQL question and wrap everything in `$LANGUAGE`. To cut a long story short, what you need is [a join](https://dev.mysql.com/doc/refman/5.7/en/join.html).

Member Avatar for pty
0
224
Member Avatar for Var_1

Nobody's going to try and decipher/run all that code. What exactly is the problem? Try creating a [JSFiddle](https://jsfiddle.net/) or something.

Member Avatar for pty
0
374

The End.