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, 12 Dec 2017 20:31:47 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums http://forums.devshed.com/ Python/Numpy have I already written the swiftest code for large array? http://forums.devshed.com/python-programming/979620-python-numpy-written-swiftest-code-array-new-post.html Tue, 12 Dec 2017 19:14:12 GMT ***GOAL:*** I would like to get my script total execution time down from 4 minutes to less than 30 secs. I have a large 1d array (3000000+) of distances with many duplicate distances. I am trying to write the swiftest function that returns all distances that appear n times in the array. I have written a function in numpy but there is a bottleneck at one line in the code. Swift performance is an... **GOAL:**
I would like to get my script total execution time down from 4 minutes to less than 30 secs. I have a large 1d array (3000000+) of distances with many duplicate distances. I am trying to write the swiftest function that returns all distances that appear n times in the array. I have written a function in numpy but there is a bottleneck at one line in the code. Swift performance is an issue because the calculations are done in a for loop for 2400 different large distance arrays. 

Quote:

import numpy as np
for t in range(0, 2400):
a=np.random.randint(1000000000, 5000000000, 3000000)
b=np.bincount(a,minlength=np.size(a))
c=np.where(b == 3)[0] #SLOW STATEMENT/BOTTLENECK
return c
**EXPECTED RESULTS:**
Given a 1d array of distances [2000000000,3005670000,2000000000,12345667,4000789000,12345687,12345667,2000000000,12345667]
I would expect back an array of [2000000000,12345667] when queried to return an array of all distances that appear 3 times in the main array.

What should I do? ]]>
Python Programming justforkicks1 http://forums.devshed.com/python-programming-11/python-numpy-written-swiftest-code-array-979620.html
<![CDATA[[Python 3] Image2BumpMap Converter, Wich lib get i need ?...]]> http://forums.devshed.com/beginner-programming/979615-python-3-image2bumpmap-converter-wich-lib-new-post.html Tue, 12 Dec 2017 09:43:00 GMT Hey Python Users...

I was looking for an py library to create an prompt-like program, they can
convert loaded images into normal, bump, speculair, ao, ... maps...

I am tryed to find an library (an module) for this, but i don't can find them.
If i try to find the just lib... only i can find this for GIMP and H3D...

But i want to write this in the official python languale, just in python 3...
Not in GIMP or H3D...

Can anyone help me to find the just py lib, to create an prompt-like
program for normal, bump, speculair, ao... maps, etc...

Thanks for help...
Jamie. ]]>
Beginner Programming JamieVanCadsand http://forums.devshed.com/beginner-programming-16/python-3-image2bumpmap-converter-wich-lib-979615.html
PHP Drop Down List Populated By Oracle Database Rows is empty http://forums.devshed.com/php-development/979614-php-drop-list-populated-oracle-database-rows-empty-new-post.html Tue, 12 Dec 2017 08:53:45 GMT Country Name]]> ( https://i.stack.imgur.com/1LPVk.png )
i mention my link where output show when i press drop-down button
then show empty fields but i have values in my sql table but it does
not execute my values..i need help...

PHP Code:

<tr>
  <td>Country Name</td>
  <td>
    <select name="name">
<?php
  $conn 
oci_connect("username""pswrd""db");
  
$sql 'SELECT name FROM country';
  
$stid oci_parse($conn$sql);
  
$success oci_execute($stid);
  while (
$row oci_fetch_array($stidOCI_RETURN_NULLS+OCI_ASSOC)) 
  {
    echo 
"<option value=\"countryname1\">" $row['name'] . "</option>";
  }
?>
    </select>
  </td>
</tr>

]]>
PHP Development naiha http://forums.devshed.com/php-development-5/php-drop-list-populated-oracle-database-rows-empty-979614.html
Lifetime Checker Script, Error Found ! http://forums.devshed.com/python-programming/979613-lifetime-checker-script-error-found-new-post.html Tue, 12 Dec 2017 07:26:40 GMT Hey Python Users... I try to create an script, to check your lifetime... with the datetime modulle... This is my script: Code: --------- from datetime import datetime Hey Python Users...

I try to create an script, to check your lifetime... with the datetime modulle...
This is my script:

Code:

from datetime import datetime

now = datetime.now()

birtday = int(input("Your Birthday: "))
lifetime = now.year - birthday


print(lifetime)




If i run this script, i get this error:
Quote:

Traceback (most recent call last):
File "C:/Users/Gebruiker/Desktop/YearChacker.py", line 6, in <module>
lifetime = [now.year - birthday]
NameError: name 'birthday' is not defined
Can enyone correct my code pleace... so i can expiriment with it ?...
Thanks, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/lifetime-checker-script-error-found-979613.html
1Q Cloud New Affiliate Program - 50% Lifetime Commission + $10 Bonus http://forums.devshed.com/web-hosting-offers/979612-1q-cloud-affiliate-program-50-lifetime-commission-10-bonus-new-post.html Tue, 12 Dec 2017 06:26:12 GMT Start earning with 1Q Cloud New Affiliate Program!

Our new affiliate program will allow you to earn money with little work or effort. We provide incredible 50% commission for each sale you refer and for all consequent payments of that customer!
In addition to that, we provide $10 bonus just for signing up! Too good to be true? That's right, and while you read this, someone else is signing up!

Who is this program for?

It is for people who own website/blog or who are active forum members and want to get some extra income. Get a unique tracking code for your websites that accounts for every visitor you refer and start earning! Our program is free to join, it's easy to sign up and requires no technical knowledge.

How it Works

We'll provide you with code for a link to add to your site or email; this link will contain your unique ID, and each time someone clicks on your link and signs up for a qualified 1Q Cloud Server hosting plan, you'll earn 50% from the deal amount.

Why Us?

So what makes our affiliate program stand out? Easy: money and service! First off, you get 50% off all your customer's payment for life. Second, powerful templates! If you have a crazy sales idea for a pre-installed software solution, just reach out and we'll have it built for you in no time! From frameworks to gaming servers, we can build an automated deployment template for you as long as you can sell it!

1QCloud.com is a cloud server provider devoted to bringing the high quality cloud hosting services at low cost.
We are a team of Cisco, Red Hat, Debian, FreeBSD certified experts, with 10+ years of experience in implementing and managing IT infrastructures for small businesses and large enterprises.
Professional technical support 24/7 with the fastest response time is guaranteed.
Our cloud hosting infrastructure is based on powerful SuperMicro enterprise hardware. The data is stored in the most secure SSD grade RAID 10 storage systems that offer top-quality business agility and exceptional application uptime.
We are not using VZ - all our cloud servers are Xen-based, with guaranteed resource allocation.
Our equipment is located in the C7’s Salt Lake City Datacenter, which is a certified Tier III capacity enabling a seamless operation with 99.9% uptime.

We are providing web hosting services to thousands of clients across the world since 2014 with positive feedback only.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Affiliate program details

Commission Type: 50% perpetual payout: you receive half of all payments made by the clients you referred during their entire life span.
Sign-up Bonus: $10 credited to your affiliate account upon activation.
Payout Threshold: $25.00 USD - Minimum balance required for payout.
Payout Duration: Payments are made on the 1st of each month, for valid orders older than 60 days.

Don't miss this opportunity, ➡➡➡ REGISTER NOW as a 1Q Cloud Affiliate!

If you have any questions, please contact us through our website http://www.1qcloud.com/.

Thank you. ]]>
Web Hosting Offers 1Q Cloud http://forums.devshed.com/web-hosting-offers-100/1q-cloud-affiliate-program-50-lifetime-commission-10-bonus-979612.html
<![CDATA[[Python 3 + FNMatch] PNG Searcher not working... help needed!]]> http://forums.devshed.com/python-programming/979611-python-3-fnmatch-png-searcher-help-new-post.html Mon, 11 Dec 2017 16:32:46 GMT Hey Python Programmers... I try to create an script as an test, thad must be find PNG Files by name... This is my script... Code: --------- # Import fnmatch and os import fnmatch Hey Python Programmers...

I try to create an script as an test, thad must be find PNG Files by name...
This is my script...

Code:

# Import fnmatch and os
import fnmatch
import os

# Search PNG-File by Name:
filesearch = input('Search File: ')
for file in os.walk(filesearch):
    if fnmatch.filter(file, '*.png'):
        print(file)

If i call in the name of any PNG Files, this script doesn't works...
No PNG file found wich starts with the first letter you call, they i get on my
computer (laptop)..... I use python 3....

I try to make an PNG-Searcher (or specific file-searcher), they must be find
PNG Files by name (or the png-files they get the same letters)...

If i run my script, no files found with the begin-letters or same names...
I get realy png-files where i get testing it... to look of my script works...

Can anyone give my the just code, so i can expiriment with it...
I am in the learn fase of python (or programming)...

Thanks for my code correction...
Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-fnmatch-png-searcher-help-979611.html
Netherlands Dedicated Servers by VPS9.Networks http://forums.devshed.com/web-hosting-offers/979610-netherlands-dedicated-servers-vps9-networks-new-post.html Mon, 11 Dec 2017 10:52:01 GMT * Netherlands Dedicated Servers by VPS9.Networks (https://www.vps9.net/)* VPS9 offers wide range of Powerful Netherlands Dedicated Servers (https://www.vps9.net/netherlands-servers) providing amazing Flexibility, owned Resources and Safety in a TIER III+ Datacenter. Our Servers are most Compatible for creating Gaming Servers, Websites with Large Traffic and Databases and also capable of... Netherlands Dedicated Servers by VPS9.Networks
VPS9 offers wide range of Powerful Netherlands Dedicated Servers providing amazing Flexibility, owned Resources and Safety in a TIER III+ Datacenter. Our Servers are most Compatible for creating Gaming Servers, Websites with Large Traffic and Databases and also capable of In-house Large Enterprise Applications.

Best of Netherlands Dedicated Server
- Easy-to-Use Panel
- Power Reboots
- IPMI/KVM Access
- 99.99% Uptime Guarantee
- Fully customized
- 24/7 Pro-Active Support

Netherlands Dedicated Servers Plan - 1
Server : Dell R210-II
Processor : 1x Intel Quad-Core Xeon E3-1230
RAM : 32GB
HDD : 4x4TB
Port : 1Gbps
Bandwidth : 100TB
Price : 74.99 Euros/Month
> Buy <

Netherlands Dedicated Servers Plan - 2
Server : Dell R210-II
Processor : 2x Intel Quad-Core Xeon E5620
RAM : 32GB
HDD : 8x2TB
Port : 1Gbps
Bandwidth : 100TB
Price : 89.99 Euros/Month
> Buy <

Best Addons with Netherlands Dedicated Server
''''''''''''''''''''''''
cPanel/WHM Panel : € 32.00 /mo.
Parallels Plesk : € 10.99 /mo.
Parallels Plesk : € 14.99 /mo.
Direct Admin : € 30.00 /mo.
for more Information go with provided link on Netherlands Dedicated Server

Payment Methods: Payza, PayPal, EBS, PerfectMoney, Web Money.
Support Fields:

* Live Support, Skype
* Email Support

Thank You. ]]>
Web Hosting Offers vps9 http://forums.devshed.com/web-hosting-offers-100/netherlands-dedicated-servers-vps9-networks-979610.html
<![CDATA[Great Range of Dedicated & Semi Dedicated Proxies From TEMOK Starting at $15/Month]]> http://forums.devshed.com/web-hosting-offers/979609-range-dedicated-semi-dedicated-proxies-temok-starting-15-month-new-post.html Mon, 11 Dec 2017 09:51:51 GMT Do you need the anonymity of private proxies, however don't wish to break your budget? This is where Temok comes in. We offer affordable Dedicated Proxies, while maintaining the speed and reliability of them. We offer top quality, private and trusted shared proxy solutions for all our customers. You can always feel secure with Temok. We are trusted and working 24/7 only for you to deliver the ideal proxies! Top quality and satisfied customers - these are our major aims. All the proxies are on our servers. so they have good speed and uptime. Great and rapid support seven days a week. Absolutely no program restrictions Scrapebox, Xumer, gsa, omegle and so on.


Below you will find some details of our current range Semi Dedicated & Dedicated Proxy Plans along with the price. All you have to do is to choose your desired plan & get it immediately.

→ Semi-Dedicated Proxy Plan 1 ←

⌑ Proxies: 10
⌑ Subnets: 2
⌑ Bandwidth: 80GB
⌑ Cost Per Proxies: $1.50
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $15/Month

→ Semi-Dedicated Proxy Plan 2 ←

⌑ Proxies: 20
⌑ Subnets: 3
⌑ Bandwidth: 120GB
⌑ Cost Per Proxies: $1.50
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $30/Month

→ Semi-Dedicated Proxy Plan 3 ←

⌑ Proxies: 30
⌑ Subnets: 4
⌑ Bandwidth: 160GB
⌑ Cost Per Proxies: $1.50
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $45/Month

→ Semi-Dedicated Proxy Plan 4 ←

⌑ Proxies: 40
⌑ Subnets: 5
⌑ Bandwidth: 200GB
⌑ Cost Per Proxies: $1.50
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $60/Month

→ Semi-Dedicated Proxy Plan 5 ←

⌑ Proxies: 50
⌑ Subnets: 6
⌑ Bandwidth: 240GB
⌑ Cost Per Proxies: $1.50
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $75/Month

For more Semi Dedicated Proxy Plans Click Here

☼☼ Dedicated Proxy Plans ☼☼

→ Dedicated Proxy Plan 1 ←

⌑ Proxies: 10
⌑ Subnets: 2
⌑ Bandwidth: 80GB
⌑ Cost Per Proxies: $3.00
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $30/Month

→ Dedicated Proxy Plan 2 ←

⌑ Proxies: 20
⌑ Subnets: 3
⌑ Bandwidth: 120GB
⌑ Cost Per Proxies: $3.00
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $60/Month

→ Dedicated Proxy Plan 3 ←

⌑ Proxies: 30
⌑ Subnets: 4
⌑ Bandwidth: 160GB
⌑ Cost Per Proxies: $3.00
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $90/Month

→ Dedicated Proxy Plan 4 ←

⌑ Proxies: 40
⌑ Subnets: 5
⌑ Bandwidth: 200GB
⌑ Cost Per Proxies: $3.00
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $120/Month

→ Dedicated Proxy Plan 5 ←

⌑ Proxies: 50
⌑ Subnets: 6
⌑ Bandwidth: 240GB
⌑ Cost Per Proxies: $3.00
⌑ 24/7 Premium Support
⌑ 99.9% Uptime Guarantee
⌑ Price: $150/Month

For more Dedicated Proxy Plans Click Here

We have excellent hardware accompanied by a top-notch support staff. At Temok you will enjoy the experience. We work hard to provide service which is not alone rewarding but also pleasurable. We work beyond your expectation and go the extra mile to meet your demands.

➛ We accept VISA, MasterCard, American Express, PayPal, WorldPay and Diners Club International for payment.

Contact Info:
Email: sales(@)temok.com
Skype: temok.sales
Live Chat: Available on our Website
]]>
Web Hosting Offers tk-hassan http://forums.devshed.com/web-hosting-offers-100/range-dedicated-semi-dedicated-proxies-temok-starting-15-month-979609.html
Scopehosts : Special Offer on Netherlands Dedicated Servers http://forums.devshed.com/web-hosting-offers/979608-scopehosts-special-offer-netherlands-dedicated-servers-new-post.html Mon, 11 Dec 2017 09:50:40 GMT Dedicated Server hosting (https://www.scopehosts.com/dedicated-servers) by Scopehosts (https://www.scopehosts.com/) gives you total control over the server to host your business. We prepare the best dedicated servers suitable for any enterprise needs, backed with our Industry-Leading SLA. These netherlands servers (https://www.scopehosts.com/netherlands-dedicated-servers) are hosted in TIER III+... Dedicated Server hosting by Scopehosts gives you total control over the server to host your business. We prepare the best dedicated servers suitable for any enterprise needs, backed with our Industry-Leading SLA. These netherlands servers are hosted in TIER III+ globally available datacenters Evoswitch, Amsterdam - Netherlands. All servers are deployed within 1-5 working days after order is placed.

Scopehosts is offering special offer on 2 x Intel E5620 and E3-1230 4x3.2Ghz Netherlands Dedicated Servers

Netherlands Dedicated Server Plans
------------------------------------

Server Model : 2 x Intel E5620 ( HP DL120G7 )
RAM : 32 GB DDR3
Hard Drives : 8x2TB HDD
Bandwidth : 100TB
Port : 1Gbps
Location : Netherlands (Amsterdam)
IPv4 : 1
Price : Euros 99.99/mo.
Buy Server Now


Server Model : E3-1230 4x3.2Ghz ( HP DL120G7 )
RAM : 32 GB DDR3
Hard Drives : 4x4TB HDD
Bandwidth : 100TB
Port : 1Gbps
Location : Netherlands (Amsterdam)
IPv4 : 1
Price : Euros 74.99/mo.
Buy Server Now


Features of Netherlands Dedicated Servers
===============================================

- Remote Handling Panel
- STATE-OF-THE-ART Network
- 24/7 ON-Site Support
- Top Tier Datacenter
- Uncompromising Performance
- FREE DDOS Protection

Explore more on Netherlands Dedicated Servers by Scopehosts

Live Support :
=================
24/7 Sales/Technical Ticket System Support
E-mail Support
Skype Messenger Support

Thank You. ]]>
Web Hosting Offers Cherin http://forums.devshed.com/web-hosting-offers-100/scopehosts-special-offer-netherlands-dedicated-servers-979608.html
The problem with the MySQL startup http://forums.devshed.com/mysql-help/979607-mysql-startup-new-post.html Mon, 11 Dec 2017 09:32:59 GMT Services installed MySQL server.
Error occurs on 4.1.16 and 5.0.24.

"Could not start the service MySQL on Local computer.
Error 1067: the Process terminated unexpectedly."


Something all the time began to lag.
To reinstall every time is not rulez.
In the manual for MySQL error 1067 not found
(maybe bad looking? so it is necessary error in the other place to look).

What am I doing wrong? ]]>
MySQL Help tuition http://forums.devshed.com/mysql-help-4/mysql-startup-979607.html
<![CDATA[HostForLIFE.eu - Discount 15% OFF! Best ASP.NET Core Hosting Only Є2.97/month]]> http://forums.devshed.com/web-hosting-offers/979606-hostforlife-eu-discount-15-asp-net-core-hosting-2-97-month-new-post.html Mon, 11 Dec 2017 04:33:23 GMT Image: https://s28.postimg.org/empr531zx/hostforlife-banner-e1428392544130.png (http://www.asp.net/hosting/hostingprovider/details/953) *HostForLIFE.eu - SPECIAL OFFER 15% OFF, Best ASP.NET Core Hosting Features: * 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 - SPECIAL OFFER 15% OFF, Best ASP.NET Core Hosting Features:
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, ASP.NET Core and ASP.NET Core 1.1. 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-discount-15-asp-net-core-hosting-2-97-month-979606.html
HighLite - new annotation processor ORM for Android with automatic migrations http://forums.devshed.com/android-development/979605-highlite-annotation-processor-orm-android-automatic-migrations-new-post.html Sun, 10 Dec 2017 20:26:30 GMT Hi guys!

As the title states, I've created an ORM.

Some nice features:

* Automatic migrations
* Support for foreign keys and relationships in db models
* Support for inheritance of db models
* Built with annotation processing
* Reactive API

You can find it here. Please try it out if you feel like it, any feedback is appreciated. ]]>
Android Development jeppeman http://forums.devshed.com/android-development-165/highlite-annotation-processor-orm-android-automatic-migrations-979605.html
<![CDATA[[Python 3 + Tkinter] Buttons not Showing, help needed!]]> http://forums.devshed.com/python-programming/979604-python-3-tkinter-buttons-help-new-post.html Sun, 10 Dec 2017 19:43:42 GMT Hey Python Programmers... I try to create an GUI they get two or more pages... this is an training... I try to create working with menus and buttons in one script... *This is my script:* Code: --------- # Import Tkinter Hey Python Programmers...

I try to create an GUI they get two or more pages... this is an training...
I try to create working with menus and buttons in one script...

This is my script:
Code:

# Import Tkinter
from tkinter import *

# Write my first page
class Window(Frame):

    # Define an __init__
    def __init__(self, master=None):
       
        # Parameters:
        Frame.__init__(self, master) 

        # Make Master               
        self.master = master

        # Window
        self.init_window()

    # Create the init_window
    def init_window(self):

        # Changing the Title of my first page
        self.master.title("GUI")

        # The Widget
        self.pack(fill=BOTH, expand=1)

        # Create an Menu
        menu = Menu(self.master)
        self.master.config(menu=menu)

        # Create an File Object, called File
        file = Menu(menu)
        file.add_command(label="Win Sound", command=self.client_winsound)
        file.add_command(label="Exit", command=self.client_exit)
        menu.add_cascade(label="File", menu=file)

        # Create an File Object, called Edit
        edit = Menu(menu)

        # The Command of Undo in the Edit Tab
        edit.add_command(label="Undo")

        # Edit Cascade
        menu.add_cascade(label="Edit", menu=edit)

    # Define the WinSound Window
    def client_winsound(self):

        # Make the WinSound Window
        class WinSound(Frame):

            # Define the WinSound Init
            def __init_winsound(self, master=None):

                # Called by Frame
                Frame.__init__winsound(self, master)

                # Create it as Master
                self.master = master

                # Called by init_soundplay
                self.init__soundplay()

            # Define the init_soundplay
            def init_soundplay(self):

                # Change the Title of My Seccond Page
                self.master.title("WinSound")

                # Set it as Pack
                self.pack(fill=BOTH, expand=1)

                # Make Button
                self.master.butExit = Button(self, text="WinExit", command=self.__playSystemExit)
                self.master.butExit.pack()

            # Define the playSystem button in Working
            def __playSystemExit(self):
                winsound.PlaySound("SystemExit", winsound.SND_ALIAS)

        # Make App-Page2 (My seccond page)
        root1 = Tk()
        root1.geometry("400x300")
        app1 = WinSound(root1)
        root1.mainloop()
               
    # Define the Exit
    def client_exit(self):
        exit()

       
# Make App-Page Defeult... my first page
rootMain = Tk()
rootMain.geometry("640x480")
appMain = Window(rootMain)
rootMain.mainloop()


This is my script... i try to create an app with python and tkinter... This App must be get an
two or more pages... one with an menu, an the seccond page with buttons for play diffrence
WinSounds, this is only an training to get knowledge with python tkinter.... i try to learn this...

But my problem is, thad if you start my seccond page, the play sound button(s) are not showed...
Can anyone correct my code, just it works and the buttons are showed - even they are
working.... If you don't know what my problem is... copy, past and run my script... test my
App and you can see what the problem is... the problem sit in my "WinSound" button in the
File Menu Part in my first page...

This is an test only... not an real app... only i try to learn tkinter.... just i get help needed...

Python Version: Python v3.... Tkinter + WinSound Module...

Can anyone helpme ?...
Thanks, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-tkinter-buttons-help-979604.html
<![CDATA[[PyGame] Change Drawing Shape with Keyboard not Working..., help needed !]]> http://forums.devshed.com/game-development/979597-pygame-change-drawing-shape-keyboard-help-new-post.html Fri, 08 Dec 2017 18:53:25 GMT Hey Python Users... I try to make an script thad can change an shape with the keyboard... This is my script, python 3: Code: --------- import pygame import sys Hey Python Users...

I try to make an script thad can change an shape with the keyboard...
This is my script, python 3:

Code:

import pygame
import sys
 
pygame.init()
 
WHITE = (255, 255, 255)
RED = (0, 255, 0)
BLACK = (0, 0, 0)
BLUE = (0, 0, 255)
 
size = (640, 480)
screen = pygame.display.set_mode(size)
screen_rect = screen.get_rect()
 
pygame.display.set_caption("JCads Develop")
 
done = False
clock = pygame.time.Clock()

   
while not done:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True
        elif event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                shape = pygame.draw.rect(screen, RED, [75,20,10,10], 2)
            elif event.key == pygame.K_g:
                shape = pygame.draw.rect(screen, BLACK, [60,40,20,10], 4)
            elif event.key == pygame.K_b:
                shape = pygame.draw.rect(screen, BLUE, [40,60,40,10], 3)
            elif event.key == pygame.K_ESCAPE:
                done = True
 
     
    screen.fill(WHITE)
 
    screen.blit(shape, [250, 250])
    pygame.display.flip()
 
    clock.tick(60)
pygame.quit()
sys.exit()

I try figure out how pygame works, but if i run this script... it doesn't works...
Can anyone correct my code, just i can experiment with pyGame to make things
like shapes, sounds, colours, etc... changeble

Just i need many examples of pyGame to handle with the get_rect function in pyGame...
As example to change shapes, positions of shapes, images and destroy things...

Can anyone help me ?...

Thanks, Jamie. ]]>
Game Development JamieVanCadsand http://forums.devshed.com/game-development-141/pygame-change-drawing-shape-keyboard-help-979597.html
VPS deal ... where to buy it from? http://forums.devshed.com/web-hosting/979596-vps-deal-buy-new-post.html Fri, 08 Dec 2017 16:43:05 GMT I bare in my mind two hosts: Legionbox.com and QHoster.com, they are good for my demands and I wonder which way is better to follow? I bare in my mind two hosts: Legionbox.com and QHoster.com, they are good for my demands and I wonder which way is better to follow? ]]> Web Hosting enshtain http://forums.devshed.com/web-hosting-12/vps-deal-buy-979596.html