• Member Avatar for pty
    pty

    Replied To a Post in How to create a rating system using MySQL and PHP, like 9gag?

    If you're not even going to read the links I post there's no point in responding. The algorithms are even listed and annotated. You could convert that code to SQL …
  • Member Avatar for pty
    pty

    Replied To a Post in Suggestions to refresh DaniWeb

    A small bug, clicking the upvote/downvote button on mobile makes the comment box appear *very briefly* then disappear. Happens on Android/Chrome.
  • Member Avatar for pty
    pty

    Replied To a Post in How to create a rating system using MySQL and PHP, like 9gag?

    It's not *just* the algorithm, as @alan.davies said, the data plays a part. Instead of storing up or down votes as integers, you probably need to introduce a new relation …
  • Member Avatar for pty
    pty

    Replied To a Post in Don't want your Samsung TV to collect data, then don't be a lazy jackass

    Ah I was typing on my phone, it was meant to say *anything*...
  • Member Avatar for pty
    pty

    Replied To a Post in Don't want your Samsung TV to collect data, then don't be a lazy jackass

    I created a guide on stopping Samsung from spamming your TV's UI with adverts. The same technique can be used to block skiing vaguely Korean. https://gist.github.com/peteryates/b44b70d19ccd52f62d66cdd4bcef1e52
  • Member Avatar for pty
    pty

    Replied To a Post in dynamic sql problem

    One day a column in one of the tables will be added, removed or renamed. What's going to break? Nobody knows. If you do this in one place there are …
  • Member Avatar for pty
    pty

    Replied To a Post in dynamic sql problem

    But why have different tables that have the same columns? This is a hacky solution toa hacky problem. Add a key to your table and stop duplicating, everything else will …
  • Member Avatar for pty
    pty

    Replied To a Post in Make a window pop up

    var spamTarget = prompt("What's your email?");
  • Member Avatar for pty
    pty

    Replied To a Post in How to insert an image into SQL Server Database using jsp

    The two methods are to [store the image directly in the table as a blob](https://docs.microsoft.com/en-us/sql/relational-databases/blob/binary-large-object-blob-data-sql-server?view=sql-server-2017) or to store it on disk (or in the cloud) and store the location/path in …
  • Member Avatar for pty
    pty

    Replied To a Post in Sum of border elements of a particular element

    gtfo.
  • Member Avatar for pty
    pty

    Replied To a Post in dynamic sql problem

    I'll help you out by telling you that you need to format your code properly. I'm not surprised you can't find the error in that wall of text. Lastly, dynamic …
  • Member Avatar for pty
    pty

    Replied To a Post in Install Python Web for the first time

    Also, once Python is installed, you can use [Python's package manager (`pip`)](https://packaging.python.org/tutorials/installing-packages/) to download and install other packages. Django comes with a built in web server and there's even a …
  • Member Avatar for pty
    pty

    Replied To a Post in Install Python Web for the first time

    `choco install python` (See other thread)
  • Member Avatar for pty
    pty

    Replied To a Post in Install Apache

    To anyone other than Davy, you're best using [Chocolatey](https://chocolatey.org/packages/apache-httpd). It's a sane apt/brew like package manager for Windows and does all the hard work for you. Of course, using a …
  • Member Avatar for pty
    pty

    Replied To a Post in Editing existing pdf files using C#

    > The pdf files that i am dealing are very complex, containing tables, checkboxes , radio buttons images etc I wouldn't do this. Whoever came up with this was a …
  • Member Avatar for pty
    pty

    Replied To a Post in Editing existing pdf files using C#

    That's not how PDF files work. All of the calculations that take place in the layout stage are done and finalised (this sets PDF apart from Postscript). You need to …
  • Member Avatar for pty
    pty

    Replied To a Post in How to access a Database Table from a given Variable

    I'm not sure what you mean by "I am wanting to select an access database table after gaining the ID for the table." To find a record with a matching …
  • Member Avatar for pty
    pty

    Replied To a Post in Automatically Duplicate Rows In SQL Server 2008 R2 Select Query

    Yes sure. Step one, learn SQL. Try CodeAcademy's SQL course, it's very good.
  • Member Avatar for pty
    pty

    Replied To a Post in Automatically Duplicate Rows In SQL Server 2008 R2 Select Query

    You need to `union` the two similar tables together then query the resulting set using `group by` with `max` to get the latest information. I'd do this in two stages …
  • Member Avatar for pty
    pty

    Replied To a Post in Article Submission Sites

    Yeah, I said Stack Overflow and actually meant the [Pro Webmasters section of Stack Exchange](http://webmasters.stackexchange.com). I was referring to the quality of the question more than the topic. It's a …
  • Member Avatar for pty
    pty

    Replied To a Post in Select All Multiselect

    It's easy * Add a new checkbox * Create an associated label with text "Select All" * Write some code that when the new checkbox is checked checks the other …
  • Member Avatar for pty
    pty

    Replied To a Post in Article Submission Sites

    Another thread full of useless information. How long would this have lasted on Stack Overflow? Not long. And **that** is why people go there. This is why forums fell behind. …
  • Member Avatar for pty
    pty

    Replied To a Post in Skype Update July 2018

    I use Skype daily and prefer `web.skype.com`. It runs perfectly in the browser and means I don't have to install anything or touch the client which, to be honest, could …
  • Member Avatar for pty
    pty

    Gave Reputation to Reverend Jim in Manupilating a string in PHP

    Actually it can be shortened (yeah, right) to \((.+?),\s*(.+?),\s*(and|or)\),\s*\((.+?),\s*(.+?),\s*(and|or)\),\s*\((.+?),\s*(.+?),.* which breaks down to \( opening `(` (.+?), shortest string up to `,` (group $1) \s* 0 or more spaces (.+?), …
  • Member Avatar for pty
    pty

    Replied To a Post in Manupilating a string in PHP

    > Not at all. The algorithm he has used copies whatever is in the boolean position in the input: and, or, xor(?) etc (with maybe a conversion to upper case …
  • Member Avatar for pty
    pty

    Replied To a Post in Manupilating a string in PHP

    Like I said in my post, this is deceptively easy. We're assuming they're all `and`, and under that assumption you may as well just `join`. Once you start adding `or` …
  • Member Avatar for pty
    pty

    Replied To a Post in Manupilating a string in PHP

    I quite enjoy puzzles like this. Of course, I suspect that your problem will get much harder once you start adding stuff like `(Banana, fruits, or)` to the equation, as …
  • Member Avatar for pty
    pty

    Replied To a Post in Web Programming Popularity - PHP Vs Python

    Python is clean, expressive and has a great standard library. It's not *just* a web development language, it can be used for most tasks. Where it really pulls ahead of …
  • Member Avatar for pty
    pty

    Replied To a Post in How can we do guest blogging?

    This is exactly the sort of post that shouldn't exist. It's just shit in every way.
  • Member Avatar for pty
    pty

    Replied To a Post in SQLIA UNION Query

    http://www.sqlinjection.net/union/
  • Member Avatar for pty
    pty

    Replied To a Post in GIT stash

    I think you need to spend a little time learning git before you dive in and start using it. Git can be a cruel mistress. To stash your work run …
  • Member Avatar for pty
    pty

    Replied To a Post in Protocol a Software or Hardware

    The difference between hardware and software is that you can touch hardware. And yes, this is a hijacked thread.
  • Member Avatar for pty
    pty

    Replied To a Post in SQLIA UNION Query

    Reverend Jim is correct. It may help if you say the relationship out loud; if it's a 'has many' or 'belongs to' relationship (with a foreign key) you'd typically use …
  • Member Avatar for pty
    pty

    Replied To a Post in Online Selling Query

    Where are you? In the UK we have markets like Music Magpie that will give you quotes for items in your collection. Failing that, you can always sell through eBay …
  • Member Avatar for pty
    pty

    Replied To a Post in select then insert in php

    Why are you using PHP for this? Can't you just use an`update` statement with a `where` clause?
  • Member Avatar for pty
    pty

    Replied To a Post in How To Show Query String data and get avg between two numb

    Replace `sum` with `avg`. But average (mean) is meaningless without standard deviation, so you'd better work that out too.
  • Member Avatar for pty
    pty

    Replied To a Post in Performing a MySql query in JavaScript

    Essentially what you need is something that sits between the web page and the database. We'd often refer to this layer as an [API](https://en.wikipedia.org/wiki/Application_programming_interface), but just think of it as …
  • Member Avatar for pty
    pty

    Replied To a Post in Prevent SQL Injection on Codeigniter

    https://stackoverflow.com/questions/10646142/what-does-it-mean-to-escape-a-string
  • Member Avatar for pty
    pty

    Replied To a Post in Joining Query in My SQL

    https://dev.mysql.com/doc/refman/8.0/en/join.html
  • Member Avatar for pty
    pty

    Replied To a Post in mysql multiple keyword search in any order

    > but searching for "dog mouse cat" will return no results This is what your query is specifying. To make it match a jumble of words you need to can …
  • Member Avatar for pty
    pty

    Replied To a Post in SQLRand - SQLIA Prevention

    There's an implementation of [SQLRand](https://github.com/nettrino/SQLRand) available on GitHub and you can read the original paper that proposed the idea [here](http://web1.cs.columbia.edu/~angelos/Papers/sqlrand.pdf). Personally I think the approach is over complicated and would …
  • Member Avatar for pty
    pty

    Replied To a Post in MYSQL select all rows from all tables

    If you have a problem like this you're probably better just starting again. This is a bad idea that will generate useless data. Burn it with fire.
  • Member Avatar for pty
    pty

    Replied To a Post in Search engine optimization

    I love how there's a discussion in one thread about how to save the platform/community and then there's this crap. People left because the signal:noise is better on SO and …
  • Member Avatar for pty
    pty

    Replied To a Post in Add Brands logos in android app

    Do you want to get sued? Because this is how you get sued. What value is there in an app that redirects me to a website? What value to me, …
  • Member Avatar for pty
    pty

    Replied To a Post in Error missing right parenthesis

    Like doesn't support multiple conditions, you need to use `or`.
  • Member Avatar for pty
    pty

    Replied To a Post in Displaying records from database using enum

    This is why mixing code and markup makes things *more difficult*. If this was in a Rails controller using an ORM it's simple and, more importantly, **debuggable**. PER_PAGE = 20 …
  • Member Avatar for pty
    pty

    Replied To a Post in What do you mean when you say hacker?

    The short answer is that it depends who I'm talking to. With other people who are interested in technology I use hacker in the traditional sense (white hat). With muggles …
  • Member Avatar for pty
    pty

    Replied To a Post in Good IDE for web development with built-in compilers/debuggers?

    I'm more of an editor than IDE kind of guy but VSCode might fit the bill. It has a built in package manager so you can install PHP (or any …
  • Member Avatar for pty
    pty

    Replied To a Post in Personal Travel Blog

    I think that spatial functionality probably isn't really required for this, you only need to store coordinates for points (of interest) and a city key in that table, unless you …
  • Member Avatar for pty
    pty

    Replied To a Post in fyp

    > Having an off day pty? It's a solid idea. The users don't need to be adult workers, it could just as easily apply to counsellors or support staff. If …

The End.