651 Posted Topics

Member Avatar for rproffitt

Well most AI generators out there claim that all (or in some conditions) of the results that you create can be copyrighted by you. The conditions usually is to have a paid membership (of course). But let me dive a little bit more on this. If I try to create …

Member Avatar for Reverend Jim
3
266
Member Avatar for FarrisFahad

This is a rather controversial topic mainly because Google is changing its view in that over the last years. Luckily enough the strategy that we have used 13 or 14 years now in Java and in PHP still works great. 1. I you are going to load new content through …

Member Avatar for Dani
1
154
Member Avatar for NAFISUL

Python is a language that i write but I am not fond of (I am a programmer). But today I saw an interview from Van Rossum that was great (he is really an inspiration). In it he insisted that the best way to learn a new language is to try …

Member Avatar for jkon
0
130
Member Avatar for Mindmade

There are so many ways to go forward with this , I have implemented this in various different ways , and it all comes down to what system you already have in place , if you can customize it / how experienced are you in it , if you are …

Member Avatar for jkon
-2
22
Member Avatar for Dani

The main points have already been mentioned (like OPcache , FPM etc ) so I will add a few minor ones. Request scope caching for prepared statements: There is no need to create a new PDOStatement object (and the db request that goes along) for every same sql statement that …

Member Avatar for jkon
0
242
Member Avatar for jkon

I just came in and had a topic to discuss with other programmers ... I remembered DaniWeb because in the past I have received very clever answers in questions that most don't know that exist at all. And I hope I also helped others as well. But how difficult could …

Member Avatar for Dani
1
83
Member Avatar for jkon

I wanted to post something in Daniweb for a while but I didn't had anything new. Recently I decided to write a new implementation for websocket connections client side using Shared Web Workers. Shared Web Workers are supported today by most browsers for desktop but few for mobile devices , …

Member Avatar for jkon
2
465
Member Avatar for LastMitch

There are some thrillers that really stick on my mind for a while (that was the case of "Ghost Ship" too) , now days it is the “The Hidden Face” . I don't know why I love clever thriller stories , It might have to do with sitting around fire …

Member Avatar for LoanHensley
6
6K
Member Avatar for ronjacob012

Some thoughts . You say that you want to send automatically emails before 2 days. If you mean 2 days before today , then even the programming language that you will choose is not an issue , probably currently we can't move back in time (at least , in my …

Member Avatar for monika_12
0
14K
Member Avatar for Reverend Jim

I really can't understand what the “one event” bombing in Syria regime air base (that it wasn't fatal for the capacity of the base) could offer other than that it is good for TV ratings and the “reality show” extra-right (and not alternative (to what?) ) president of the US. …

Member Avatar for rproffitt
1
22K
Member Avatar for Aeonix

“such function doesn't exist in this namespace” in what namespace ? “others involve 10+ lines of code-functions that should actually be shorter” can you make them shorter? What you simply want is having a prepared statement and giving the values as array . This is something basic. See for example …

Member Avatar for jkon
0
3K
Member Avatar for anish.anick

Jay_14 this is a seven years old post , why in earth would you like to contribute to something that is really out of date ? If you want just to announce yourself there is always the community. Also the answer you gave seems seven years old also , (back …

Member Avatar for syaifulrijzal10
0
19K
Member Avatar for pandglobal

Hello pandglobal it's not java it is JavaScript (and no , this not a technicality) . You wrote: > i know how to hide and validate the function using jquery, but i don't want to use jquery to hide the form, or css because it will still show if the user disables his …

Member Avatar for jkon
0
312
Member Avatar for Dani

We use something very similar with what Dani explained. But before getting to it , I would like to point out that the first step is the server side prevention of robots sending form data. Of course even with a good server side implementation you can't be 100% sure but you …

Member Avatar for jkon
2
345
Member Avatar for Dani

There is no automated way to validate an eMail address in my knowledge without sending an email with an activation link (or an old way image pixel that gives back that the email opened) . This is one issue I have tried many approaches over the years with sometimes having …

Member Avatar for serverjedi
0
898
Member Avatar for Xianders

You will need someone that you can find any time and make changes in your software. Many years ago some people thought that having magento or all the other ready made solutions would be enough for their e-shop. As it turned out (some of us knew it) having a ready …

Member Avatar for ZoyaHall
4
1,000
Member Avatar for AndreRet

I guess the "3rd party script" you are referring to is something that runs in the same server where you serve your site. If so then the "I need this data to perform additional data enquiries, so my question is, how can I still keep the session data even if …

Member Avatar for jkon
0
733
Member Avatar for Dani

Dani I believe is time to reconsider the "adaptive and then responsive" approach. We have talked about it in the past again but what you are planing to do is the same thing client side. Doing it client side has many disadvantages , first of all js events are NOT …

Member Avatar for Dani
3
2K
Member Avatar for Dani

Lets talk a bit about the facts , https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.daniweb.com%2Fprogramming%2Fweb-development%2Fthreads%2F521412%2Fincrease-google-site-performance this is the PageSpeed inshight about this spesific page of a site / sector of an app that we are talking now. As you can see it has 59 / 100 overall performance in mobile mode making it yellow. That means …

Member Avatar for Dani
0
1K
Member Avatar for Varnisha Kalra

Tailor made software + front end vs ready made is something that is around for more than 50 years. It is nothing new there. Some prefer the cost that comes along with the ready made solution , some find a cost effective alternative in a tailor made solution. Custom coding will not disappear ever , …

Member Avatar for Biiim
2
2K
Member Avatar for happygeek

A great idea with great people , that brought a communication channel but since then it has lost its purpose and it has filled with misery against big companies like Google , as if the content served here doesn’t matter at all , as if it were a SEO game. …

Member Avatar for Reverend Jim
0
4K
Member Avatar for Reverend Jim

The world is changing too rapidly and too fast. This strengths the myth that “once upon a time there was economic heaven for uneducated workers in the industrialized world”. There never have been such a place , and if anyone felt it that way it was only because the needs …

Member Avatar for Reverend Jim
1
6K
Member Avatar for FarrisFahad

lets say that you have a span , div or what ever with id searchBtn that will trigger the search , the JS (javascript code to do it) is: $("#searchBtn").onClick(function() { var value = $("input[name='search']").val(); if (value.trim() != "") { var searchField = value; searchField = searchField.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, ' '); searchField …

Member Avatar for FarrisFahad
0
2K
Member Avatar for Dani

Dani I wrote you that many times , what is missing is an interactive online programmers magazine. DaniWeb could be that , it has the base and persons with good communicate skills. A programmers magazine with news of each language , articles with points of views , reviews of extensions …

Member Avatar for happygeek
2
6K
Member Avatar for Reverend Jim

This is what happens when you change your login password hash algorithm without considering to create a fallback mechanism , no big deal after all because we are really few people that login in DaniWeb during the last several days , but a strong signal to get away if you …

Member Avatar for Dani
0
3K
Member Avatar for jkon

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 …

Member Avatar for Trasser
1
2K
Member Avatar for SimonIoa

I am not sure I have understood the question but I will give it a try. Your data structure is a bit weird especially in the friends association tables , then you didn't provide the column name in messages table for the user id I will suppose it is user_id …

Member Avatar for SeanDevoy
0
2K
Member Avatar for jkon

As you noticed by the title I didn't used the term “know” since I find it more ambiguous then “you can code in”. To keep answers short lets limit ourselves to five languages at most , have the same list for strongest and weakest points and mention those point in …

Member Avatar for rproffitt
0
3K
Member Avatar for FarrisFahad

Using htaccess for mobile detection and subfolder redirection is a primitive way. You can as rrproffitt suggested first try to built a responsive web app and then when you will see that this is not a good way do it as big companies do (google, facebook, twitter , name it …

Member Avatar for Australia_1
0
5K
Member Avatar for dwlamb

The answer of Dani is of course the correct one , > You must use .on() with code dynamically inserted into the DOM. But let me write more about that because it is an interesting topic often misunderstood , when we assign an event to a DOM element or in …

Member Avatar for Dani
1
1K
Member Avatar for FarrisFahad

For the mobile / tablet version (adaptive and then responsive front end architecture) we use jquery.mobile.just-touch.js allong with jQuery. Its never a good idea to use the onclick event of the dom element (we don't use it either in the desktop version) but the method provided by jQuery. Because we …

Member Avatar for FarrisFahad
0
1K
Member Avatar for John_165

<dani> // You need to clear your browser cache. You could use a js and a css minifier with a version after them (e.g. the timestamp of when the minified happened e.j. app.js?156855452) that way when you change things none should clear their browser cache (in real word production projects …

Member Avatar for Dani
1
2K
Member Avatar for 1981191919

You can't use AJAX to force / suggest a browser to download a file. With AJAX you can send data and receive data in JS. What you could do is use AJAX (sending some parameters) to give the authority to a user to access a class / file in another …

Member Avatar for jkon
0
4K
Member Avatar for FarrisFahad

As alan.davies wrote you you made a lot (not just four) questions and answering in detail those would take a lot of space , not mentioning explaining those answers. I will give you some (incomplete) quick answers and I hope to use them in order to search and learn more. …

Member Avatar for FarrisFahad
0
861
Member Avatar for happygeek

Obviously Dani loves and cares more for DaniWeb than me. And there were choices made that I believe is now common knowledge that hurt DaniWeb. Some of them had to do with Dazah that although it was in production mode it took almost a year to work as expected for …

Member Avatar for Dani
10
3K
Member Avatar for developer707

Don't sanitize , in that way. ALWAYS use PREPARED STATEMENTS (sorry for my caps … but yes I am yelling). A logical confirmation is almost always required (both front-end and back-end). eg. Is this string an integer is it in a valid currency format , is it a valid phone …

Member Avatar for developer707
0
3K
Member Avatar for joshmac

An array of object is not a list of objects. A list of object is an object by itself , so you can do a lot of things with it, you could create a /_SortableList class that would have the /_List as parent and sort the objects in this list …

Member Avatar for jkon
0
476
Member Avatar for Reverend Jim

The question implies that there will be a “true AI” meaning all the functions that the human brain does. I don't believe that it will never be a “true AI” in that sense. Human brains are weird quantum computers each calibrated in a non deterministic manner that no AI could …

Member Avatar for Agilemind
0
2K
Member Avatar for Owusu_1
Re: Php

Just a thought , opening a modal window is one option the other would be the content of it to be inside the “page” and to scroll , to change that part of the “page” and to scroll to that with an X (close) option to close it. (also not …

Member Avatar for Bachu
1
604
Member Avatar for Mister_1

The simplest solution could be to create a db table for your images (or files generally) first save a row in that file that has an auto increment id and then save it with that id

Member Avatar for jkon
0
197
Member Avatar for davy_yg

Dear friend first understand what databases are about. You don't need to read the theory to write tests just to understand the basics of it. Then ask your self about the data structure. Don't think it of something that has to do with Internet or computers , think it of …

Member Avatar for jkon
0
192
Member Avatar for davy_yg

I am pro ssl and tls in any case , but because I use them (in every case) I understand that there are still many many reasons not to if you are just creating an elementary site. Recently I realized that some versions of android don't recognize the certificate if …

Member Avatar for Neena_3
0
500
Member Avatar for FarrisFahad

150 users at a time in a server ? I understood from your answers that your code is a mess , but 150 users at a time ? First understand what the server is for , how many gigabytes ram has , how do you use them , how many …

Member Avatar for FarrisFahad
0
4K
Member Avatar for Ritesh_8

My advice is to start again from the basics , what pdf is , what PHP , what HTML and what JavaScript. You definitely not printing any pdf here and you have mixed PHP logic with view with JavaScript code that uses directly PHP variables.

Member Avatar for urtrivedi
0
7K
Member Avatar for ryantroop

Hello ryantroop, Based on what you described I can't see why you need PHP as intermediary. In the websocket handshake you have all the cookies and it is easy with C++ to have that session (all the issues with race conditions are the same also) , also I can't see …

Member Avatar for ryantroop
0
472
Member Avatar for Ancient Dragon

A classic old one : A man flying in a hot air balloon suddenly realizes he’s lost. He reduces height and spots a man down below. He lowers the balloon further and shouts to get directions, "Excuse me, can you tell me where I am?" The man below says: "Yes. …

Member Avatar for jkon
4
4K
Member Avatar for jkon

Let me give you the context. We are a small company 5 persons , two owners and we do have a variety of interests. But to be honest the money flow comes from eshops , there we developed our own platform in PHP in a way that could be in …

Member Avatar for jkon
0
424
Member Avatar for patk570

You are comparing a string with a js Date object. First instantiate a Date object from your string [Click Here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) and then you can make the comparison with Date.getTime() [Click Here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime)

Member Avatar for jkon
0
396
Member Avatar for Mr.M

I don't want to interfere to the conversation (since I didn't understood why the thread starter want to do it that way) but because I realized that a hint could help others , I decided to write few lines. What you can get in PHP (and other languages) through $_SESSION …

Member Avatar for Mr.M
0
6K
Member Avatar for diafol

Diafol I guess you are referring to plain objects … (every OOP language has that short of thing PHP has PPO or POPO (Plain PHP Objects) , their main concern is to hold data with none or minimum logic in getters and setters. In fact I am using that in …

Member Avatar for diafol
1
409

The End.