Dev Shed Forums http://forums.devshed.com/ Dev Shed - Open Source web development forums. Topics covered include PHP, Apache, mySQL, Zope, Jserv, Java, Python, Zend, XML, DHTML, Javascript and more. en Tue, 24 Apr 2018 05:18:15 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums http://forums.devshed.com/ Number Increase/Decrease with step http://forums.devshed.com/javascript-development/980501-increase-decrease-step-new-post.html Mon, 23 Apr 2018 21:34:28 GMT ]]> I want to have two buttons next to a number input. Simply to increase or decrease it.

Easy as until I introduce a 'step' I want 0.01 and increase to 0.02 etc.

Any ideas?

Code:

<input type=number step=0.01 />
<button id="inc">+</button>
<button id="dec">-</button>

]]>
JavaScript Development NZ_kiwis http://forums.devshed.com/javascript-development-115/increase-decrease-step-980501.html
Function name must be a string... http://forums.devshed.com/php-development/980500-function-name-string-new-post.html Mon, 23 Apr 2018 14:40:07 GMT balance($year); // Valid $values = $DBFetch->$_SESSION['topic']($year); // Invalid $values = $DBFetch->$topic($year); // Valid, but have to set via $topic = $_SESSION['topic'] --------- Errors for Invalid/failing line:]]> Well, I attempted to run the following 3 lines each way. 2 are successful, and 1 fails. That is sadly the one I wish to have.
PHP Code:

$values $DBFetch->balance($year); // Valid
$values $DBFetch->$_SESSION['topic']($year); // Invalid
$values $DBFetch->$topic($year); // Valid, but have to set via $topic = $_SESSION['topic'] 

Errors for Invalid/failing line:
Code:

Notice: Array to string conversion in functions.inc on line 226

Notice: Undefined property: DBFetch::$Array in functions.inc on line 226

Fatal error: Uncaught Error: Function name must be a string in functions.inc:226

The intent of the array is due to it referencing a $_SESSION value. The final value is the same in all 3 instances. This example is to offer the single word balance in the end for each attempt. If I am NOT able to reference an array, is the only option to pre-reference it on a prior line and define it as a variable?

Edit: Just to clarify, the array IS being defined to it's final value($arr['topic'] = 'balance'), and NOT generally referenced to return an array. ]]>
PHP Development Triple_Nothing http://forums.devshed.com/php-development-5/function-name-string-980500.html
Dedicated servers in Indonesia from $146/m Redundant Premium Network 1000 Mbps http://forums.devshed.com/web-hosting-offers/980499-dedicated-servers-indonesia-146-redundant-premium-network-1000-mbps-new-post.html Mon, 23 Apr 2018 14:00:26 GMT MaxiDed provided secure * dedicated servers in Indonesia* (https://maxided.com/dedicated-servers/indonesia) *Location:* Indonesia *Speed Test Files:* Private Network - more freedom of content and speech Offshore DC 125.160.121.12 *Delivery time:* Unix/Linux-based OS – 24 hours. Windows-based OS – 72 hours. *Allowed:* adult, erotic, movies, doorways, dating, vpn, blogs *Best cheap deal:*... MaxiDed provided secure dedicated servers in Indonesia

Location: Indonesia
Speed Test Files: Private Network - more freedom of content and speech Offshore DC 125.160.121.12
Delivery time: Unix/Linux-based OS – 24 hours. Windows-based OS – 72 hours.
Allowed: adult, erotic, movies, doorways, dating, vpn, blogs

Best cheap deal:
Processor: Intel Core2 Duo E6550x @ 3.4Ghz
RAM: 8 GB
Harddisk: 2TB HDD SATA LSI RAID Intel
IP: 1 IPv4 included
Bandwidth: Redundant Premium Network 1000 Mbps

Order Now 146 USD per month

Enter promo code: 55f44ddb2 5% Discount!

If you have any question, feel free to contact us: https://maxided.com/support

Thank you,
MaxiDed team

__________________
Our offer for datacenter and providers
Skype: maxided.com ]]>
Web Hosting Offers MaxiDed http://forums.devshed.com/web-hosting-offers-100/dedicated-servers-indonesia-146-redundant-premium-network-1000-mbps-980499.html
<![CDATA[VPS HOSTING IN UKRAINE, USA & NETHERLANDS. SSD VPS. WINDOWS VPS. [Extra IPv4,rent IP]]]> http://forums.devshed.com/web-hosting-offers/980498-vps-hosting-ukraine-usa-netherlands-ssd-vps-windows-vps-extra-ipv4-rent-ip-new-post.html Mon, 23 Apr 2018 10:41:46 GMT Our tariffs for SSD VPS in the best data centers of Ukraine, Europe and USA are available:

Linux & FreeBSD only/ 1x Xeon 64bit/ 1 GB RAM/ 25 GB SSD 1 Gbit/s share / 2 TB - $8
VPS-2/ 1x Xeon 64bit/ 2 GB RAM/ 50 GB SSD/ 1 Gbit/s shared/ 2 TB - $11
VPS-3/ 1x Xeon 64bit/ 3 GB RAM/ 75 GB SSD/ 1 Gbit/s shared/ 2 TB - $16
VPS-4/ 1x Xeon 64bit/ 4 GB RAM/ 100 GB SSD/ 1 Gbit/s shared/2 TB - $21
VPS-6/ 2x Xeon 64bit/ 6 GB RAM/ 125 GB SSD/ 1 Gbit/s shared/ 2 TB - $29
VPS-8/ 2x Xeon 64bit/ 8 GB RAM/ 150 GB SSD/ 1 Gbit/s shared/ 2 TB - $37

You can also order HDD VPS in Ukraine or Netherlands:

STORAGE VPS 100GB/ 1x Xeon 64bit/ 1GB RAM/ 100 GB HDD/1 Gbit/s shared/ 2 TB - $10
STORAGE VPS 200GB/ 1x Xeon 64bit/ 2GB RAM/ 200 GB HDD/1 Gbit/s shared/ 2 TB - $15
STORAGE VPS 300GB/ 1x Xeon 64bit/ 3GB RAM/ 300 GB HDD/1 Gbit/s shared/ 2 TB - $20
STORAGE VPS 400GB/ 1x Xeon 64bit/ 4GB RAM/ 400 GB HDD/1 Gbit/s shared/ 2 TB - $25
STORAGE VPS 600GB/ 2x Xeon 64bit/ 6GB RAM/ 600 GB HDD/1 Gbit/s shared/ 2 TB - $35

Extra IPv4 are also available for 1 $!

Order VPS at our web-site: 301 Moved Permanently ]]>
Web Hosting Offers Deltahost http://forums.devshed.com/web-hosting-offers-100/vps-hosting-ukraine-usa-netherlands-ssd-vps-windows-vps-extra-ipv4-rent-ip-980498.html
Get Upto 10% OFF On Poland SSD Shared Hosting - Hostripples! http://forums.devshed.com/web-hosting-offers/980497-upto-10-poland-ssd-shared-hosting-hostripples-new-post.html Mon, 23 Apr 2018 06:26:19 GMT
Get Upto 10% OFF On Poland SSD Shared Hosting - Hostripples!


A Perfect Web Hosting Plan To Host A Blog,or Personal Website! We offer a range of reliable, affordable hosting plans to suit any requirement or budget, all accounts are activated INSTANTLY following payment, so you'll be able to get started right away. You can now enable number of Powerfull services like Cloudflare, Attracta(SEO Tools), SiteApps Optimization Command Center for the SMB Website and many more right from your hostripples control panel.

SMART - $2.99/Month
Web Space : 5 GB SSD
Bandwidth : Unlimited
RAM : 2 GB
FTP Accounts : Unlimited
Email Accounts : Unlimited
24 x 7 Live Support

Buy Now!

BUSINESS - $5.99/Month
Web Space : 20 GB SSD
Bandwidth : Unlimited
RAM : 3 GB
FTP Accounts : Unlimited
Email Accounts : Unlimited
24 x 7 Live Support

Buy Now!

ENTERPRISE - $9.99/Month
Web Space : 50 GB SSD
Bandwidth : Unlimited
RAM : 5 GB
FTP Accounts : Unlimited
Email Accounts : Unlimited
24 x 7 Live Support

Buy Now!

Why choose Hostripples?
Instant Setup
Easy usability
Value for money
24 x 7 customer service
Unmatched server performance


Visit:- Poland SSD Shared Hosting

Coupon Code: SSD10

It’s not that we are bragging about our services, our customers say it all!

Hurry up and get Hostripples – the one-stop solution for your web hosting requirements!

Hostripples - Affordable web hosting
Hostripples.com Cheap Hosting | Unlimited Bandwidth | Unlimited Space | Domain Name Registration

Connect with us: Facebook | Twitter | LinkedIn

Hostripples - Affordable web hosting
http://hostripples.com/
http://hostripples.in/
http://hostripples.co.uk/
https://myhostseo.com/
Hostripples.com $1 Unlimited Hosting | $2 Unlimited Windows Hosting | Unlimited Bandwidth | Unlimited Space | Domain Name Registration ]]>
Web Hosting Offers hi5s2arp http://forums.devshed.com/web-hosting-offers-100/upto-10-poland-ssd-shared-hosting-hostripples-980497.html
Parse a subset of an XML file with regex http://forums.devshed.com/regex-programming/980496-parse-subset-xml-file-regex-new-post.html Mon, 23 Apr 2018 03:50:46 GMT and markers. Generally these are only four out of 10-15 lines to be found there. It's easy enough to parse the file, line by line, and use the information I can find there. (( Not particularly since the information on the lines can vary pretty drastically.)) It...]]> What follows are extracts of an XML document contained in an EPUB file. These lines always fall within the <metadata> and </metadata> markers. Generally these are only four out of 10-15 lines to be found there.
It's easy enough to parse the file, line by line, and use the information I can find there. (( Not particularly since the information on the lines can vary pretty drastically.)) It would be easier if I could use a regex to pull only the information between the > and the </ (for example, "Dave Barry" in the first example. Can anyone offer a suggested regex, please. No I don't know what I'm doing here and have no idea where to begin to tell a regex to ignore "all this" and give me back "this"

Most of these are converted ebooks - mobi to epub, for example. My intent is to be able to standardize the names of the books in my library.

Programatically I can do everything except comfortably derive the series and series number. Calibre generally give the series name (calibre:series) and the book number in the series (calibre:series_index) - the problem I'm having trying to read this as an XML file is there isn't any real order for the information in the file.

Examples of the XML extract ...
From Calibre:
<dc:creator opf:file-as="Unknown" opf:role="aut">Dave Barry</dc:creator>
<dc:title>Dave Barry’s Greatest Hits</dc:title>
File as: Barry, Dave - Dave Barry's Greatest Hits

<meta name="calibre:series_index" content="22"/>
<dc:creator opf:file-as="Hamilton, Laurell K." opf:role="aut">Laurell K. Hamilton</dc:creator>
<meta name="calibre:series" content="Anita Blake"/>
<dc:title>Anita Blake - 22 - Affliction</dc:title>
File as: Hamilton, Laurell K - Anita Blake 22 - Affliction
even given the "right information" I still have to parse out some things to be able to file it correctly, that's no big deal. For example, this title already contains the series and series number.

<dc:creator opf:file-as="Byrde, Ann-Katrin" opf:role="aut">Ann-Katrin Byrde</dc:creator>
<dc:title>A Baby for the Firefighter</dc:title>
<meta name="calibre:series" content="Oceanport Omegas"/>
<meta name="calibre:series_index" content="2"/>
File as: Byrde, Ann-Katrin - Oceanport Omegas 02 - A Baby for the Firefighter

<dc:title>A Body on the Beach</dc:title>
<dc:creator opf:role="aut" opf:file-as="Baker, Blythe">Blythe Baker</dc:creator>
<meta name="calibre:series" content="Sunrise Island Mysteries"/>
<meta name="calibre:series_index" content="1.0"/>

<dc:creator>Unknown</dc:creator>
<dc:title> </dc:title>
Ignore the "unknown" I'll be looking for the author and title in the file name. Hopefully something will be there - otherwise it's filed as "Unknown"

From Epubor:
<dc:creator opf:file-as="Diana Xarissa" opf:role="aut">Diana Xarissa</dc:creator>
<dc:title>Aunt Bessie Knows (An Isle of Man Cozy Mystery Book 11)</dc:title> ]]>
Regex Programming aljones http://forums.devshed.com/regex-programming-147/parse-subset-xml-file-regex-980496.html
HostForLIFE.eu - Limited SALE 15% OFF: Cheap, Best ASP.NET Core 2.1 Hosting http://forums.devshed.com/web-hosting-offers/980495-hostforlife-eu-limited-sale-15-cheap-asp-net-core-2-1-hosting-new-post.html Mon, 23 Apr 2018 03:50:02 GMT Image: https://s28.postimg.org/empr531zx/hostforlife-banner-e1428392544130.png (http://www.asp.net/hosting/hostingprovider/details/953) *HostForLIFE.eu - Limited SALE 15% OFF: Cheap, Best ASP.NET Core 2.1 Hosting* Amsterdam (NL), London (UK), Washington, D.C. (US), Paris (France), Frankfurt (Germany), Chennai (India), Milan (Italy), Toronto (Canada) and Sγo Paul(Brazil) Data Center World...

HostForLIFE.eu - Limited SALE 15% OFF: Cheap, Best ASP.NET Core 2.1 Hosting
Amsterdam (NL), London (UK), Washington, D.C. (US), Paris (France), Frankfurt (Germany), Chennai (India), Milan (Italy), Toronto (Canada) and Sγo Paul(Brazil) Data Center
World Class Plesk Control Panel
Affordable price for a High availability solution
24/7/365 Customer-centric Care & Support
99.9& Uptime Guarantee
Daily Backup
Dedicated Pool
High Availability built in
Built on enterprise-grade hardware


Our Technical Features:
• One click Publish - Web Deploy Hosting
• Windows 2008 R2 and Windows 2012 Server
• ASP.NET 4, ASP.NET 4.5.2 Hosting, ASP.NET 4.6 Hosting ASP.NET 5 Hosting
• ASP.NET MVC 3 hosting, ASP.NET MVC 4 Hosting, and NEW ASP.NET MVC 6 Hosting
• MSSQL 2008, 2008 R2 Hosting, SQL 2012 and MSSQL 2012 R2
• SSRS 2008, SSRS 2008 R2 Hosting, and SSRS 2012 Hosting
• Silverlight 4, WCF RIA Hosting Support, Silverlight 5 and and Silverlight 6 Hosting
• IIS 7.5 Hosting, IIS 8 and IIS 8.5 Hosting
• PHP 5 and MySQL 5 Support
• Crystal Report 2010 Hosting Support
• Node.js Hosting
• Other application like WordPress, Joomla Hosting, Nopcommerce, osCommerce Online Merchant Hosting, Magento Hosting, Drupal , PrestaShop, DotNetNuke, BlogEngine.NET, Drupal Hosting, Umbraco, Moodle Hosting etc.

WHY CHOOSE US?
Using industry-standard web environments with the latest stable technologies like Server 2012, Internet Information Services 8.5, SQL 2012, ASP.NET 3.5 SP1, ASP.NET 4, ASP.NET 4.5.1, ASP.NET 4.5.2, ASP.NET 4.6 and ASP.NET 5. Using powerful Dell servers that are beefy enough to service the requirements of our customers. Our servers use 64 bit software, are dual quad-core, have at least 16 GB RAM, and have RAID 10 disk arrays. We don't skimp on our servers because we believe you deserve better.

We're dedicated to being more than just another web hosting provider as we see ourselves as a long-term business partner tasked with handling a critical component of your website. Combining industry-best practices and staff with cutting-edge knowledge and expertise, we provide the stability and reliability you need to realize success in today's modern world.

ANY QUESTION?
If you have any questions or concerns before you sign up, please feel free to email us at sales@hostforlife.eu or send us a tweet @HostForLIFE

Recommended by
This thread is recommended by ReliableHostingASP.NET. ReliableHostingASP.NET is Windows and ASP.NET Hosting blog review in UK. With ReliableHostingASP.NET you can find the best hosting plan that you need easily. There are many top hosting recommendations that give you the best ever offered. ]]>
Web Hosting Offers dotnetmaster http://forums.devshed.com/web-hosting-offers-100/hostforlife-eu-limited-sale-15-cheap-asp-net-core-2-1-hosting-980495.html
<![CDATA[[Python 3 + Tkinter] Classes Scripts Multiple Windows not Works..., help needed!]]> http://forums.devshed.com/python-programming/980494-python-3-tkinter-classes-scripts-multiple-windows-help-new-post.html Sun, 22 Apr 2018 18:23:14 GMT Hey Python Programmers and GUI Developers...

I get two scripts writted in python 3 and tkinter....
I try to make multiple windows, but it don't works and i get an error...,

So this is my first script (The run script):
Code:

from tkinter import *

class Window(Frame):

    def __init__(self, master=None):

        self.master = master

        Frame.__init__(self, master)

        self.init_window()

    def init_window(self):

        self.master.title("MenuBar")

        menu = Menu(self.master)
        self.master.config(menu = menu)

        filemenu = Menu(menu)
        filemenu.add_command(label = "Open", command = self.Open)
        menu.add_cascade(label = "File", menu = filemenu)

    def Open(self):

        import scripts.maxest

        scripts.maxest.Starter()





root = Tk()
Window(root)
root.mainloop()


And this is the "import scripts.maxest" script, found in my map 'scripts'...
So i get an run script (with the root window) and an scripts.maxest script writted...

This is the maxest script, in the scripts folder:
Code:

from tkinter import *

class Starter(Frame):

    def __init__(self, getter=None):

        self.getter = getter

        Frame.__init__(self, getter)

        self.init_window()

    def init_window(self):

        self.getter.title("Open new File")

        b1 = Button(self.getter, text = "Get It")
        b2 = Button(self.getter, text = "Made")
        b3 = Button(self.getter, text = "Dass")

        b1.pack()
        b2.pack()
        b3.pack()

winer = Toplevel(root)
Starter(winer)
winer.mainloop()

So if i run my first script (or rether the run script)..., i get this error:
Quote:

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files (x86)\Python36-32\lib\tkinter\__init__.py", line 1702, in __call__
return self.func(*args)
File "C:\Users\Gebruiker\Desktop\MenuBar\Tkinter MenuBar.py", line 26, in Open
import scripts.maxest
File "C:\Users\Gebruiker\Desktop\MenuBar\scripts\maxest.py", line 25, in <module>
winer = Toplevel(root)
NameError: name 'root' is not defined

Whats wrong with my code...., i think thad this error are in the maxest script,
it said thad 'root' is not defined...

Can anyone correct my code, just i can expiriment with it ?.....
Thanks for help, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-tkinter-classes-scripts-multiple-windows-help-980494.html
table structure http://forums.devshed.com/mysql-help/980493-table-structure-new-post.html Sun, 22 Apr 2018 15:52:00 GMT I have a table of information which i want to store into a database. ( http://128.173.204.63/courses/cee5614/figure1_a5_2005.gif ) I have a weight variable on my Y axis which links to a distances on the X axis. I find the result by scrolling up my Y axis or across my X axis and right or up to find the blue line which is my result. How can I store this so it can be searched? I have a table of information which i want to store into a database.

( http://128.173.204.63/courses/cee561...e1_a5_2005.gif )

I have a weight variable on my Y axis which links to a distances on the X axis.

I find the result by scrolling up my Y axis or across my X axis and right or up to find the blue line which is my result.

How can I store this so it can be searched? ]]>
MySQL Help NZ_kiwis http://forums.devshed.com/mysql-help-4/table-structure-980493.html
Best Canada Linux VPS Cloud RAM - Hostripples! http://forums.devshed.com/web-hosting-offers/980492-canada-linux-vps-cloud-ram-hostripples-new-post.html Sat, 21 Apr 2018 06:12:50 GMT *Best Canada Linux VPS Cloud RAM - Hostripples! * The VPS Cloud models are ideal for hosting professional production environments or critical applications. A hardware SLA is just one of the guarantees in place to provide you high availability and stable service right from the word go. *Canada Linux VPS Cloud RAM PLAN 1 - $40/Month* Guaranteed RAM : 6 GB HDD : 25 GB Bandwidth : 100 Mbps...
Best Canada Linux VPS Cloud RAM - Hostripples!


The VPS Cloud models are ideal for hosting professional production environments or critical applications. A hardware SLA is just one of the guarantees in place to provide you high availability and stable service right from the word go.

Canada Linux VPS Cloud RAM PLAN 1 - $40/Month
Guaranteed RAM : 6 GB
HDD : 25 GB
Bandwidth : 100 Mbps Unlimited
CPU Cores : 1 vCore
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

Buy Now!

Canada Linux VPS Cloud RAM PLAN 2 - $75/Month
Guaranteed RAM : 12 GB
HDD : 50 GB
Bandwidth : 100 Mbps Unlimited
CPU Cores : 2 vCores
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

Buy Now!

Canada Linux VPS Cloud RAM PLAN 3 - $140/Month
Guaranteed RAM : 24 GB
HDD : 100 GB
Bandwidth : 100 Mbps Unlimited
CPU Cores : 4 vCores
Root Access : YES
IPv4 : 1 IP
IPv6 : 1 IP

Buy Now!

Why choose Hostripples?
Instant Setup
Easy usability
Value for money
24 x 7 customer service
Unmatched server performance

Visit:- Best Canada Linux VPS Cloud RAM

It’s not that we are bragging about our services, our customers say it all!

Hurry up and get Hostripples – the one-stop solution for your web hosting requirements!

Hostripples - Affordable web hosting
Hostripples.com Cheap Hosting | Unlimited Bandwidth | Unlimited Space | Domain Name Registration

Connect with us: Facebook | Twitter | LinkedIn

Hostripples - Affordable web hosting
http://hostripples.com/
http://hostripples.in/
http://hostripples.co.uk/
https://myhostseo.com/
Hostripples.com $1 Unlimited Hosting | $2 Unlimited Windows Hosting | Unlimited Bandwidth | Unlimited Space | Domain Name Registration ]]>
Web Hosting Offers hi5s2arp http://forums.devshed.com/web-hosting-offers-100/canada-linux-vps-cloud-ram-hostripples-980492.html
Adobe Reader help. http://forums.devshed.com/windows-help/980491-adobe-reader-help-new-post.html Sat, 21 Apr 2018 03:35:30 GMT I've been receiving .PDF files of images where they blank out certain parts, like with a black square or rectangle.

How do you remove those?

When I 1st open the file, I see the image in it's entirety for a split second, and then the blank covering cover up.

I read in a newspaper there was a trick to remove them. :/

Thanks. ]]>
Windows Help LostShadow http://forums.devshed.com/windows-help-34/adobe-reader-help-980491.html
Universal table build http://forums.devshed.com/php-development/980490-universal-table-build-new-post.html Fri, 20 Apr 2018 15:13:10 GMT This function is the one to create the TBODY rows. Overall, the idea is an IF EXISTS type thing, since only certain items will exist depending on which page is being viewed. *array_key_exists()* is in relation to the items returned by the MySQL query. The query I have is if there are any other suggestions to build/define $format or $display. PHP: --------- function insert_rows($keys,... This function is the one to create the TBODY rows. Overall, the idea is an IF EXISTS type thing, since only certain items will exist depending on which page is being viewed. array_key_exists() is in relation to the items returned by the MySQL query.

The query I have is if there are any other suggestions to build/define $format or $display.
PHP Code:

function insert_rows($keys$values) {

  unset(
$values['month']);

  
$currency0 = new NumberFormatter('en_US'NumberFormatter::CURRENCY);
  
$currency0->setAttribute(NumberFormatter::FRACTION_DIGITS0);
  
$currency2 = new NumberFormatter('en_US'NumberFormatter::CURRENCY);
  
$currency2->setAttribute(NumberFormatter::FRACTION_DIGITS2);

  
// check/define our values
  
$total 0;
  
$format = function($row) use ($currency0$currency2, &$total) {
    
$total += array_key_exists('value'$row) ? $row['value'] : 0;
    
$row['active'] = array_key_exists('active'$row) ? ($row['active'] == 'Active' 'Inactive') : 'RemoveThisElement';
    
$row['paid'] = array_key_exists('paid'$row) ? ($row['paid'] == 'X' '') : 'RemoveThisElement';
    
$row['comment'] = array_key_exists('comment'$row) ? ' (' $row['comment'] . ')' 'RemoveThisElement';
    
$row['comments'] = array_key_exists('comments'$row) ? $row['comments'] : 'RemoveThisElement';
    
$row['value'] = array_key_exists('value'$row) ? (strlen($row['value']) > $currency2->formatCurrency($row['value'], 'USD') : '') : 'RemoveThisElement';
    
$row['adj_value'] = array_key_exists('adj_value'$row) ? (strlen($row['adj_value']) > $currency2->formatCurrency($row['adj_value'], 'USD') : '') : 'RemoveThisElement';
    
$row['limit'] = array_key_exists('limit'$row) ? (strlen($row['limit']) > '/' $currency0->formatCurrency($row['limit'], 'USD') : '') : 'RemoveThisElement';
    
$row['date'] = array_key_exists('date'$row) ? date_create($row['date'])->format('m/d/Y') : 'RemoveThisElement';
    return 
$row;
  };
  
// process a row
  
$values array_map($format$values);
  
// remove useless items
  
foreach(array_keys($values'RemoveThisElement') as $key) {
    unset(
$array[$key]);
  }

  
// format for display
  
$display = array(
    
// header => function($row) { return displayable value; }
    
'Status' => function($row) { return $row['active']; },
    
'Paid' => function($row) { return $row['paid']; },
    
'Due Date' => function($row) { return $row['date']; },
    
'Amount' => function($row) { return $row['value']; },
    
'Account (Comment)' => function($row) { return $row['name'] . $row['comment']; },
    
'Account Name' => function($row) { return $row['name']; },
    
'Adj. Amount' => function($row) { return $row['adj_value']; },
    
'Comments' => function($row) { return $row['comments']; },
    
'Total Due / Limit' => function($row) { return $row['value'] . $row['limit']; },
    
'As Of...' => function($row) { return $row['date']; }
  );

  
$display array_intersect_key($displayarray_flip($keys));

  
$rows NULL;
  foreach(
$values as $value) {
    
$rows .= '        <TR>';
    foreach(
$display as $header => $formatter) {
      
$rows .= '<TD>' $formatter($value) . '</TD>';
    }
    
$rows .= '</TR>' "\n";
  }

  return 
$rows;



The following code is the simple call of the previous function:
PHP Code:

    foreach($tables as $rows) {
      
$table .= '      <TABLE>
. (isset($rows['month']) ? '<TR><TH>' $rows['month'] . '</TH></TR>' NULL) . '
insert_headers($values['headers']) . '
insert_rows($values['headers'], $rows) . '
      </TABLE>' 
"\n";
    } 

The foreach() simply runs more than once in the occasion there are multiple tables, such as a yearly page holding multiple months. ]]>
PHP Development Triple_Nothing http://forums.devshed.com/php-development-5/universal-table-build-980490.html
Using Database Fields in a User-Defined Email http://forums.devshed.com/php-development/980489-using-database-fields-user-defined-email-new-post.html Fri, 20 Apr 2018 10:52:28 GMT Hi: I developed a system in PHP/MySQL which has an email blast system so users can login and send emails to their customers. The system uses the SendGrid API to actually send the emails but the boss of the email is composed by the user in a form field which uses the CKEditor (ckeditor.js) script on a PHP page. Does anyone know a good way that I could allow the user to incorporate data... Hi:

I developed a system in PHP/MySQL which has an email blast system so users can login and send emails to their customers. The system uses the SendGrid API to actually send the emails but the boss of the email is composed by the user in a form field which uses the CKEditor (ckeditor.js) script on a PHP page.

Does anyone know a good way that I could allow the user to incorporate data fields from the MySQL database in the body of his text? i.e. he would be able to say "Dear <<customer>>...." and select a predefined data field to incorporate into the text.

Any comments greatly appreciated. ]]>
PHP Development SeanF http://forums.devshed.com/php-development-5/using-database-fields-user-defined-email-980489.html
Host.AG Spring Sale | E3-1240v6 at 42 EUR with Unmetered Bandwidth | 50% discount http://forums.devshed.com/web-hosting-offers/980488-host-ag-spring-sale-e3-1240v6-42-eur-unmetered-bandwidth-50-discount-new-post.html Fri, 20 Apr 2018 09:08:12 GMT Here at *Host.AG*, we want to stay ahead of the curve and deliver reliable hosting solutions customized for each particular customer with privacy, support, performance and quality products in mind. We provide live on-site Bulgaria based customer support and our IT experts are available 24/7 by live chat, telephone, email and ticket support system. You can pay for our services with the... Here at Host.AG, we want to stay ahead of the curve and deliver reliable hosting solutions customized for each particular customer with privacy, support, performance and quality products in mind.

We provide live on-site Bulgaria based customer support and our IT experts are available 24/7 by live chat, telephone, email and ticket support system.

You can pay for our services with the following payment options: Credit Card, PayPal, BitCoin, PaySafeCard, PerfectMoney, Wire Transfer, Bank Transfer, Altcoins via Conify, SEPA Direct Debit, ecoPayz, Neosurf, MINT Prepaid, MolPoints, Qiwi and other options.
But we can accommodate any payment solution the customer wishes.

3 Days FULL REFUND policy no questions asked guarantee.

Our infrastructure is located in a Tier 3+ Carrier Neutral Data Center regarding internet connectivity and is ISO 9001:2015 Quality Management System and ISO 27001:2013 Information Security System Certified making us qualified in keeping expensive equipment safe and secure while making sure that your business complies with multiple international quality control and privacy standards.
Our data center is located in the center of Sofia, in one of the largest telecommunication facility in Bulgaria and South East Europe.

Every dedicated server is fully protected against Level 3,4 and 7 DDoS Attacks using our in-built DDoS Attack and Intrusion Prevention Solution.

Each dedicated server will have assigned 3 IPv4 address and one /64 IPv6 subnet, included in the price of the server. Each /64 IPv6 subnet will be added to your server free of charge, upon request.

Host.AG Looking glass, to test out our network.

Spring Offer
Intel Xeon E3-1240 v6, 3.70GHz, 8M Cache, 4 Cores, 8 Threads, DDR4
16 GB RAM
2x 120GB SSD
RAID1 Hardware
Unmetered Bandwidth
1 Gbps Shared Uplink Included
Free 500 Gbps DDoS Protection
4 IPv4 address included
IPv6 /64 subnet included

255 EURO for 6 months (42 EURO | month) | 50% discount
After 6 Month(s), the new price will be 72 EUR, paid monthly. | 15% discount

Dedicated Server with unmetered bandwidth

* Special conditions apply for the shared bandwidth.
** This offer is not cumulative. No other discounts/coupons etc. can be added.
*** Maximum 3 servers per client.

Host.AG High-End European DDoS Protected Dedicated Servers With unmetered bandwidth ]]>
Web Hosting Offers BelCloud http://forums.devshed.com/web-hosting-offers-100/host-ag-spring-sale-e3-1240v6-42-eur-unmetered-bandwidth-50-discount-980488.html
Where is BitCoin Official Website ? http://forums.devshed.com/dev-shed-lounge/980487-bitcoin-official-website-new-post.html Fri, 20 Apr 2018 07:15:28 GMT Folks, Found Bit Coin official website at Wikipedia: https://en.wikipedia.org/wiki/Bitcoin But the link is dead of Bit Coin official site. How is Bit Coin functioning with a dead link ? Folks,

Found Bit Coin official website at Wikipedia:
https://en.wikipedia.org/wiki/Bitcoin

But the link is dead of Bit Coin official site. How is Bit Coin functioning with a dead link ? ]]>
Dev Shed Lounge UniqueIdeaMan http://forums.devshed.com/dev-shed-lounge-26/bitcoin-official-website-980487.html