Community Member Featured
Member Avatar
Featured cereal 1,419 Replied To a Post in FB Messenger supports Markdown
Topic by Dani in Cloud-based Applications
As far as I know, years ago it was allowed and then removed. So that's great, now I can annoy people with bold statements! :D Reply by cereal
Member Avatar
Featured cereal 1,419 Began Watching FB Messenger supports Markdown
I just noticed yesterday that FB Messenger ate my asterisks. Today, I just noticed that it was actually parsing my asterisks into bold! And it parses Markdown's syntax for italics too! I swear this is new. Try sending someone a message with Facebook and you can do: `*bold* or _italics_` … Topic by Dani in Cloud-based Applications
Member Avatar
cereal 1,419 Replied To a Post in Trying to contact Dani
Topic by John_176 in DaniWeb Community Feedback
> but there's no PM option.

I remember that without reputation points a new user cannot send private messages. It probably depends on this. Bye! Reply by cereal
Member Avatar
cereal 1,419 Replied To a Post in Trying to contact Dani
Topic by John_176 in DaniWeb Community Feedback
You can also try by email https://www.daniweb.com/welcome/contact just keep in mind timezones. Reply by cereal
Member Avatar
cereal 1,419 Began Watching Trying to contact Dani
I would like to contact with Dani, but she hasn't replied to my Tweet and I have no way of contacting her other than this forum or Twitter. I would like to discuss something confidential. Topic by John_176 in DaniWeb Community Feedback
Member Avatar
Featured cereal 1,419 Gave Reputation to JamesCherrill in Will Electric Cars ever make it?
Topic by rproffitt in Community Center
> the cost is nearly identical to the Prius today

That's surprising. We run a Zoe EV and have a Citroen C4 Picasso that can do about 50 mpg.
Here's how the costs compare in France:

Zoe: 16.6 kWh/100km. Using standard domestic off-peak elecrticity at €0.127/kWh
= 2.11 Euros per … Reply by JamesCherrill
Member Avatar
I've been trying to create the diamond square algorithm in ruby and whilst it works (that is to say it doesn't error) it doesn't output as expected, so
far here's the output at various states:
# So far#
## First attempt ##
[First Attempt][1]

This is the output of when … Topic by Martin_22 in Software Development
Member Avatar
Featured cereal 1,419 Replied To a Post in Instagram Crawler
Topic by Stefan_1 in Computer Science
Just a note: if you are trying to use [InstagramCrawler](https://github.com/iammrhelo/InstagramCrawler) then the errors says it does not find the [`geckodriver`](https://github.com/mozilla/geckodriver) which is included in one of the two required packages installed throught the [`pip` command](https://pip.pypa.io/en/stable/) at the bottom of the GitHub page:

pip install -r requirements.txt

Which in practice are: … Reply by cereal
Member Avatar
Featured cereal 1,419 Began Watching Instagram Crawler
Hello all, is there some python code or program to crawl instagram? I would like to get the user Username, Bio and 5-6 random pics.

- Thank you Topic by Stefan_1 in Computer Science
Member Avatar
Topic by michael.dewitt.716 in Web Development
Thanks cereal, once you said that it was jsonp, i was able to refine my search. In the end, i came across this function that seem to work really well:

function jsonp_decode($jsonp, $assoc = false) { // PHP 5.3 adds depth as third parameter to json_decode
if($jsonp[0] !== '[' && … Reply by michael.dewitt.716
Member Avatar
Topic by jkon in Linux and Unix
I remember it was used to reduce overheating issues. I cannot find the article anymore but search for *Dynamic Thermal Management techniques.* Reply by cereal
Member Avatar
Hello , I am not Linux and Unix expert so maybe this is a simple question to be answered , I am just not sure. I have a sever with 8 cores (running CENTOS) that executes a batch job once a day for few minutes . I tried to monitor … Topic by jkon in Linux and Unix
Member Avatar
Topic by michael.dewitt.716 in Web Development
Hi,

that's a [JSONP](https://en.wikipedia.org/wiki/JSONP) response, so in order to process this through PHP you need to remove the callback function that wraps the JSON data, for example:

callback({JSON DATA});

At this point you can remove it from the string:

<?php

$jsonp = 'callback({"name": "micheal"});';
$callb = 'callback'; // to remove … Reply by cereal
Member Avatar
I know this title is rather confusing, but here it goes.

I have a PHP cURL request and the return is in a string. Normally i can easily echo specific objects from the JSON response, but i have never dealt with string returns.
Here is my php


<?php

$url = … Topic by michael.dewitt.716 in Web Development
Member Avatar
Topic by SimonIoa in Web Development
Embedded contens like YouTube and Vimeo are served by them directly to the client, your page just sends the resource link, then the client opens a connection to the resource. You can see this through the developer console in Chrome: select the Network tab, hit reload for your page and … Reply by cereal
Member Avatar
Hello, i want to cache embedded urls -YouTube, Vimeo- photos and videos so that i could reduce bandwidth usage and server load for my website. How can i help my website to do that? I know that browsers cache information `https://en.wikipedia.org/wiki/Web_cache`. Is there something i can to do to make … Topic by SimonIoa in Web Development
Member Avatar
Featured cereal 1,419 Gave Reputation to Reverend Jim in News Story Top 10 Data Recovery FAILS
Topic by happygeek in Hardware and Software
My favourite data fail is from many years ago when hard drives were low capacity and expensive. Hard drive space was at such a premium that companies like DoubleSpace made mega-bucks selling compression software. This particular user had a 20 meg hard drive. Yes, that's what I said. 20 meg. … Reply by Reverend Jim
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
I honestly do not know. I don't doubt what you say, but I don't see how the original script could work with a base64 string, regardless if it was hosted locally or remote. Maybe the input was sent via the pixel $_POST['type']? In that case $im could be populated correctly. Reply by cereal
Member Avatar
cereal 1,419 Began Watching Mathematics in Video Games
I am doing a project for my math class in which I have to choose a topic and connect math concepts to it, and I chose video games. Possible concepts: Quadratics, vectors, probability, trigonometry, statistics, etc. I know this is probably a long shot but anything helps. In what ways … Topic by Faith_4 in Community Center
Member Avatar
Topic by chinomso_1 in Linux and Unix
You left out details that might help. Always supply full model numbers, age and prior service. For example if it's years old I always try a new CMOS battery (cheapest part, might fix it, worth the risk.) Some feel that spending 1 dollar is too much a risk and maybe … Reply by rproffitt
Member Avatar
Featured cereal 1,419 Replied To a Post in News Story Top 10 Data Recovery FAILS
Topic by happygeek in Hardware and Software
This brings me straight to 2000-2003 years, at that time I was working in a small lab assembling & repairing computers, the worst was when people wanted to recover EFS encrypted files from Windows XP drives. Windows XP policy was insane, they allowed to use EFS without a recovery agent, … Reply by cereal
Member Avatar
Featured cereal 1,419 Began Watching News Story Top 10 Data Recovery FAILS
So you've lost access to your data through hardware failure or accidental erasure. What do you do? Like most cyber-warriors you naturally turn to the Internet, be that via a Google search or YouTube video, for help. That's a big mistake says [Kroll Ontrack](https://www.krollontrack.co.uk/blog/), a data recovery specialist, as self-inflicted … Topic by happygeek in Hardware and Software
Member Avatar
Hello everyone,

I'm currently developing a webpage that when user input the data needed in Advance Filtering and click on the button'Search Result',the table will show the data needed,but the problem is i get the error of Uncaught TypeError: Cannot read property 'fnDraw' of undefined when the user choose the … Topic by Var_1 in Web Development
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
However `internalImageUpload()` writes only to the database.

Instead, it's in:

imagejpeg($im, $upload_path.$filename);

I overlooked that, and yes by defining a second parameter you would save the resource loaded into $im. However you cannot inject (as far as I know) the contents from $_POST['image'] to $im.

Try something like this:

<?php … Reply by cereal
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
So, how would you write the image to the image folder? Through `internalImageUpload()`? Reply by cereal
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
The point is that you cannot use `$_POST['image']` that way. See the definition of [`imagecreatefrompng()`:](http://php.net/imagecreatefrompng)

resource imagecreatefrompng ( string $filename )

It means it expects a string to define the filename, not the contents. Something that would work would be:

$im = imagecreatefrompng('file.png');

And from here you create a resource … Reply by cereal
Member Avatar
Hello there. I'm at a point where I have to set up a continuous integration environment. I have contributed to projects using CI before, but I have never set it up. I roughly know what it is supposed to do, but I could definitely use some help.

In my head … Topic by minitauros in Hardware and Software
Member Avatar
Featured cereal 1,419 Replied To a Post in How do i lock a USB so user cant delete or add files?
Topic by Stefan_1 in Hardware
**@Jim_16**

Hi, please read again: the OP wants read-only access for everyone. Reply by cereal
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
Okay, I got it to work, the JS function will export the canvas contents to PNG:

snapshot.toDataURL('image/png')

so, what you get in`$_POST['image']` is a base64 encoded blob. All you need to do is to remove the `data:image/png;base64,` part, as you were doing, decode the remaining string and save it to … Reply by cereal
Member Avatar
Featured cereal 1,419 Replied To a Post in Upload locally but it doesn't online
Topic by SimonIoa in Web Development
Hmm, what kind of input do you expect in `$_POST['image']`?

Because `imagecreatefromjpeg()` expects a string to be used like a file name. You are submitting `$_POST['image']` instead, which it appears to be a base64 encoded string, and from the previous PHP code, it seems it should be a list of … Reply by cereal