otengkwaku 30 Newbie Poster

You are using ajax to submit for data so do this:

  1. Remove action="Registration" method="POST" from your form tag.
  2. Change type="submit" to type=buttom.
  3. Check your url again url : "Registration". if it is a file should it end with jsp or a file type. eg: url : "/Registration.jsp"
otengkwaku 30 Newbie Poster

try Ananse it is an internet download manager i am working on

otengkwaku 30 Newbie Poster

To download streaming videos on window is very easy after all there are so many softwares to do that for you but on linux it is not soo easy.
There is howevery this command line tool that helps you do this [youtube-dl](https://github.com/rg3/youtube-dl.
But this command line tool lacks some features that makes it a true download manager, at lest speeds up the downloading.
In an attempt to get what i need and also help others in my situation i have started a project called Ananse. It is fully written in python and hosted on github. It is based on youtube-dl.
I am inviting you to join me work on this project. For the new programmers out there this is a great opportunity to get your feet wet in an open source project. And for the experience programmers need you guys.
Thank you
For more information visit the projects page Ananse

otengkwaku 30 Newbie Poster

Thanks guys i have solved it
the answer which is in it self another question is posted here

otengkwaku 30 Newbie Poster

Hi guys i have an sql query string that in my view there is something wrong with it but i an handicaped since i am very new to sql so my question is, is there any way of optimizing this query string

select t1.cat,t1.site from (select cat,site from news where site='myjoy'and cat='business'limit 3) t1 union all
select t2.cat,t2.site from (select cat,site from news where site='pea'and cat='business'limit 3) t2 union all
select t3.cat,t3.site from (select cat,site from news where site='myjoy'and cat='sports' limit 3) t3 union all
select t4.cat,t4.site from (select cat,site from news where site='pea'and cat='sports'limit 3) t4 union all
select t5.cat,t5.site from (select cat,site from news where site='myjoy'and cat='ent'limit 3) t5 union all
select t6.cat,t6.site from (select cat,site from news where site='pea'and cat='ent' limit 3) t6 union all
select t7.cat,t7.site from (select cat,site from news where site='myjoy'and cat='cover_story' limit 3) t7 union all  
select t8.cat,t8.site from (select cat,site from news where site='pea'and cat='cover_story' limit 3) t8 union all
select t9.cat,t9.site from (select cat,site from news where site='pea'and cat='politics' limit 3) t9 union all
select t10.cat,t10.site from (select cat,site from news where site='myjoy'and cat='politics' limit 3) t10;
otengkwaku 30 Newbie Poster

I think the problem is the way I designed my table it is all wrong thanks guys it feels good to have friends who will help if even they can't thanks this is a family

otengkwaku 30 Newbie Poster

I think there is. most of these cloud services provide you with public url for accessing you file. so i think the way to go is manually generating these url and putting it in ur web page

<M/> commented: Yep. +10
otengkwaku 30 Newbie Poster

Hi guys i have a table with this data
______________
| site | cat |
______________
| my | sp |
| my | sp |
| my | cc |
| my | cc |
| yo | sp |
| yo | sp |
| yo | cc |
| yo | cc |
______________

my question is this:
what query will give me this result
______________
| site | cat |
______________
| my | sp |
| my | cc |
| yo | sp |
| yo | cc |
______________
i am very new to sql and relational database although very good in nosql databases.
i have also spent more than 3hours searching the net for answers but have got non.

otengkwaku 30 Newbie Poster

The whole idea is given the sender power over his or her emails your emails are stored locally on your pc or device More over ur emails are encrypted OK I just reax of bitmail but i did not see any thing about encryption

otengkwaku 30 Newbie Poster

It just dropped into my head when reading about diaspora project but now u mention it i will Search for it and see

otengkwaku 30 Newbie Poster

You have create the calcTaxes but you are not calling it.
i think you should do it like this:

var calculate_tax = function() {
    var total;
    var income = parseFloat( $("income").value );
    $("tax").value =  calcTaxes(income);
    console.log(tax);
    function calcTaxes(amount){
    var calculate = 0;
    if(amount > 85650){
        tax = (amount - 85650) * .28 + 870.0+(35350-8700)*.15+(89350-36900)*.25;
    }
    else if( amount > 35350){
    tax = (amount - 35350) * .25 + 870.0+(35350-8700)*.15;    
    }
    else if(amount > 8700){
    tax = (amount - 8700) * .15 + 870.0;
    }
    else{
       tax = amount * .10;
        }
    tax += amount * .153;
    return tax;
    /*
    10% on taxable income from $0 to $8,700, plus
    15% on taxable income over $8,700 to $35,350, plus
    25% on taxable income over $35,350 to $85,650, plus
    */
}
}
Blue_2 commented: thank you for the help bro +0
otengkwaku 30 Newbie Poster

The whole idea is your email is stored on your local computer and that of your recipient's.
This is how it works:
first the user downloads and installs the email server on his machine. Then create a private and public
keys for encrypting his/her data.
The user then registers his account with a public server which only keeps public keys and trackers for
individual email servers.
So when an individual create an email, the email is encrypted with the recipient public key
and with the help of the tracker the email is send directly to the recipient's local emails server for any
reason if the recipient email is off line the public server gives the option to store the encypted email for only
a time determined by the sender.

By the way this is an open source project

What do you guys think of this project and will it fly? if it is good how do we get some crowdfunding for it
and who will like to partiner me do this project? :)

otengkwaku 30 Newbie Poster

Hi guys i am using sax to extract data from an xml file but i can't seem to
discover how to extract <![CDATA[%s]]> from the xml below is the xml and the java code

//java 
codepublic class XmlParser {

    public XmlParser(String xml) {

        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser saxParser = factory.newSAXParser();

            DefaultHandler handler = new DefaultHandler() {

//                boolean item = false;
                boolean title = false;
                boolean link = false;
                boolean pubDate = false;
                boolean cdata = false;

                public void startElement(String uri, String localName, String qName,
                        Attributes attributes) throws SAXException {

                    //
//                    if (qName.equalsIgnoreCase("ITEM")) {
//                        item = true;
//                    }
                    if (qName.equalsIgnoreCase("TITLE")) {
                        title = true;
                    }

                    if (qName.equalsIgnoreCase("LINK")) {
                        link = true;
                    }

                    if (qName.equalsIgnoreCase("PUBDATE")) {
                        pubDate = true;
                    }
                    if(qName.equalsIgnoreCase("![CDATA[%s]]")){
                        cdata = true;
                    }

                }

                public void endElement(String uri, String localName,
                        String qName) throws SAXException {
                }

                public void characters(char ch[], int start, int length) throws SAXException {

//                    if (item) {
//                        System.out.println("First Name : " + new String(ch, start, length));
//                        bfname = false;
//                    }
                    if (title) {
                        System.out.println("======================================");
                        System.out.println("title : " + new String(ch, start, length));
                        title = false;
                    }

                    if (link) {
                        System.out.println("link : " + new String(ch, start, length));
                        link = false;
                    }
                    if(cdata){
                        System.out.println("here");
                    }

                    if (pubDate) {
                        System.out.println("pubDate : " + new String(ch, start, length));
                        System.out.println("======================================");
                        pubDate = false;
                    }


                }

            };

            StringReader a = new StringReader(xml);
            InputSource s = new InputSource(a);
            saxParser.parse(s, handler);
        } catch (ParserConfigurationException | SAXException | IOException e) {
            System.out.println("Error"); …
otengkwaku 30 Newbie Poster

first of all remove the '{}' at line 24 and 25 of the code since line 26 to 28 is part of the function calculatePtotal;
here is the corrected code

<script type="text/javascript">
function calculatePtotal() {
    var totalofptotal = 0;//initialise the accumulator
    var wholeqtty = 0; //initialise the acumulator of quantity
    var totalofweight = 0; //initialise the acumulator of weight
    $("tr.calc", "#myTable", "#panierform").each(function (i, row) {
        $row = $(row);
        var value = parseFloat($('.prix', $row).val());
        var quantity = parseFloat($(".quantity", $row).val()) || 0;
        var poid = parseInt($(".poid", $row).val());
        var shipping = parseFloat($(".shipping", $row).val());
        var ptotal = (value * quantity).toFixed(2);//calculate row total
        var weight = (poid * quantity) .toFixed(0);//calculate row weight
        $(".quantiy", $row).val(quantity);//display row total
        $(".ptotal", $row).val(ptotal);//display row total
        $(".weight", $row).val(weight);//display row total
        totalofptotal += parseFloat(ptotal);//accumulate the row totals to make a grand total
        wholeqtty += parseInt(quantity);
        totalofweight += parseInt(weight);
    });
    $("#wholeqtty") .val(wholeqtty.toFixed(0));
    $("#totalofweight") .val(totalofweight.toFixed(0));
    $("#totalofptotal").val(totalofptotal.toFixed(2));//display the product total
    var shippingtotal = parseFloat(shipping.value) * totalofweight
    $("#shippingtotal").val(shippingtotal.toFixed(2));//display row total
}
calculatePtotal();
$(".quantity, .shipping").change(function () {
    calculatePtotal();
});
</script>

for some strange reason the value is shipping at line 26 is still a dom element.
but the code should work

otengkwaku 30 Newbie Poster

Surround the whole object with an a tag or since the logo is a flash object u can use actionscript to add a click event

otengkwaku 30 Newbie Poster

U must remember that parseFLoat convert a string to a floating point number any thing else and it will return NaN [more on parseFloat ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat) at line 18 of your code u are trying to convert to float a value that is already a float so remove the parseFloat at line 18 and it should work Also on line 20 u are doing the same thing with parseInt. Remove it and it will work

otengkwaku 30 Newbie Poster

As JorgeM said your best bet is to use session data. if the preson posting is a user them my advise to you is when a user login store a reference to the user's db in the users session data example will be the user's db id then you can use that to do querys and others on that use's data if the user is anonymos them you can generate a random token to reference that user during the session.

When solving these problems it is adviseable to think of them in terms of one user. Make sure it works for one preson them you can mover on to see if it works for two. Web servers are like any computer programs
they will handle one user at a time. even node which is async will still handle one user at a time (but will not wait for the user's action to finish before attending to an other user)

the request coming form the users contains every thing the server (you) need to handle the request even session data is not stored on the server it is stored in the request so if your logic works for one preson it will pretty well work for 100 users

mattyd commented: A great help! +7
otengkwaku 30 Newbie Poster

this is the corret way the code should be

var getDataFromUrl = function(url) {
    rest.get(url).on('complete',function(data) {
        if(data instanceof Error) {
            console.log("url error");
            process.exit(1);
        }
        //data is return if data is not an instanceof Error
        return data
     });
};
otengkwaku 30 Newbie Poster

Have you cleaned the laptop recently. I think it has to do with dust.
Open the laptop and clean the fan also clean the heat sink.
After that oil the the fan and let see if it works

otengkwaku 30 Newbie Poster

Hi guys Happy New year. I miss you all :), that is just by the way.

I am thinking of building a CMS with nodejs ana i will like your take on it?
First of all i have seen other simlly projects but they are all fixed in the type
of database they use and also other things.
Now this is my proposal:

like any other CMSs it should be data driven more like drupal structure but
with real time feature, like, knowing who is online and who is posting a comment right from the box.
also the ability to plug in other databases.
I am thinking of a seperation in that there is the core, the plugins and the themes
the themes is what front end developes build and this can be done on the life server
using an inbuild text editor. The plugins are codes that are build to expend the functionality of
the framework
the core is what actually drives the whole thing, which is the framework

the CMS will also proved an installation like that of drupal where the super user will be create
and others.
and also a generic UI that can be costomize for most blog and others
what do you guys think and what feature can be added or removed or this is not worth it

otengkwaku 30 Newbie Poster

@ddanbe you are bringing it again :) any way, i am sorry if my post created any problems forgive me. Poetry is about emotions and feelings.

If love is all that we can do, i will love you for ever and if my heart can sing you will hear mellodies till eternity. I LOVE U with all my heart.

otengkwaku 30 Newbie Poster

Not be living in God (Jesus) or heaven is a consure effort but the fact is there is a God and there is heaven and we know this because our heart tell us so. If there is know God or heaven why do we feel the need to do good and why do we feel guilty when we do bad thing. Because there is someone judging us call it consince, call it God, if there is no reward for our good why do we feel good for your good deeds

KushMishra commented: Indeed a very nice thinking +0
otengkwaku 30 Newbie Poster
 var getDataFromUrl = function(url) {
    rest.get(url).on('complete',function(data) {
        if(data instanceof Error) {
            console.log("url error");
            process.exit(1);
        }else {return data};
     });
};

when this function (getDataFromUrl) is called by another function it return undefine
what is happing

otengkwaku 30 Newbie Poster

Hi guys i will like to know how to reprecate
fseek(fp, -1) in C to python. Thus send the read head a charactor back

otengkwaku 30 Newbie Poster

Hi guys, i am working on a project the need me to convert a compressed obj file using webgl utf-8 compresor webgl-loader back to it acsii version. I will like someone to point me in the rigth direction. i am comfused as to how to do the decompression

otengkwaku 30 Newbie Poster

I went for an interveiw yesterday. and in my cv i had a link to my endorsment page. To my supreise i pass, all the others had better cv than me but i pass. I had something all of them didn't have endorsment from people i did not know and who were not in the county. Thank daniweb for this move i love it and please endorse me!!! hahaha.
How do you get endorsment by the way.

otengkwaku 30 Newbie Poster

We don't do home works here. But as a way of helping

  1. first creat a list of all posibly morpheme.
  2. when a verb is given to your programe it should split the verbs into it morphemes
  3. according to what you want to analyse store the
  4. number of morpheme very verb has
  5. number of commone morpheme or the number of morphemes that keep repeating it self
  6. use mathlab's pyplot to create a chart of your results
otengkwaku 30 Newbie Poster

well it seems the problem is with the operating software it seems wind XP do not support pyttsx thanks very much i realy applicate your effort

otengkwaku 30 Newbie Poster

i have seen it but it is emty thus there is nothing in it. Can you post the content so i can download it.
i have even re installed pywin32 but still

otengkwaku 30 Newbie Poster

by the way i am getting
ImportError: No module named 'win32com.gen_py'
when i run your cx_run.py script

otengkwaku 30 Newbie Poster

thanks bro this problem has been giving me a hard time. Why this problem
can you explain any futher so i can better under it.

otengkwaku 30 Newbie Poster

it is good well done i will encorage you to keep on working hard and trying new stuff that is the only way to learn. and also try hard to answer other peoples question you find out that you will be learning more

otengkwaku 30 Newbie Poster

Hi we don't spoon feed people here this is a site for learning and developing your self. We help you to learn so you can intern teacher other here. So my advice to you is try to code some thing and when you run into problems then you can post the code and the problem here and we will be more than ready to help you thank you.

otengkwaku 30 Newbie Poster

hi guy, i have created an app why my beloved python. i have frozen it using cx_freeze for easy distribution but the problem is, on my development computer (win7) it runs perfectly but when i send it to a testing pc (windows XP sp3 32bit) it give me the error

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
File "timeTracker.py", line 555, in <module>
File "timeTracker.py", line 381, in __init__
File "timeTracker.py", line 427, in runTimeThread
File "timeTracker.py", line 494, in __init__
File "timeTracker.py", line 118, in __init__
File "C:\Python27\lib\site-packages\pyttsx-1.1-py2.7.egg\pyttsx\__init__.py", line 39, in init
File "C:\Python27\lib\site-packages\pyttsx-1.1-py2.7.egg\pyttsx\engine.py", line 45, in __init__
File "C:\Python27\lib\site-packages\pyttsx-1.1-py2.7.egg\pyttsx\driver.py", line 66, in __init__
File "C:\Python27\lib\site-packages\pyttsx-1.1-py2.7.egg\pyttsx\drivers\sapi5.py", line 37, in buildDriver
File "C:\Python27\lib\site-packages\pyttsx-1.1-py2.7.egg\pyttsx\drivers\sapi5.py", line 46, in __init__
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 317, in WithEvents
AttributeError: 'NoneType' object has no attribute 'CLSID'

and there is the setup.py file that build the cx_freeze files

import sys

from cx_Freeze import setup, Executable

includes =['atexit']
packages = ['pyttsx','win32com.server','win32com.client']
base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(
        name = "timeTracker",
        version = "1.0.0",
        description = "Keep track of your time take control of your life",
        options = {"build_exe" : {"includes" : includes, "packages": packages }},
        executables = [Executable("timeTracker.py", base = base)])

help me out. i have searched and searched but no result Note i am new to setup.py and cx_freeze

otengkwaku 30 Newbie Poster

Hi guys have a python software that i want to freeze for distribution. The problem is after freezing it with cx_freeze and i run it, it works fine on my development computer but when i sent it to my testing computer (window XP sp3 32bit) it give me this error

Traceback(mostresent call last):
    File "C:Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line27, in <module?
    File "timeTracker.py", line 555, in <module>
    File "timeTracker.py", line 381, in __init__
    File "timeTracker.py", line 427, in runTimeThread
    File "timeTracker.py", line 494, in __init__
    File "timeTracker.py", line 118, in __init__
    File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\__init__.py", line 39, in init
    File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\engine.py", line 45, in __init__
    File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\driver.py", line 66, in __init__
    File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\drivers\sapi5.py", line 37, in buildDriver
    File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\drivers\sapi5.py", line 46, in __init__
    File "C:Python27\lib\site-packages\win32com\client\__init__.py", line 317, in WithEvents
    AttributeError: 'NoneType' object has no attribute 'CLSID'

the setup.py script for the building cx_freeze is

import sys

from cx_Freeze import setup, Executable

includes =['atexit']
packages = ['pyttsx','win32com.server','win32com.client']
base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(
        name = "timeTracker",
        version = "1.0.0",
        description = "Keep track of your time take control of your life",
        options = {"build_exe" : {"includes" : includes, "packages": packages }},
        executables = [Executable("timeTracker.py", base = base)])

Note i don't have much expereince i

otengkwaku 30 Newbie Poster

Hi guys i have created a python 2.7 application using PyQt4 and Pyttsx.
PyQt4 is a crossplatform GUI library and pyttsx is a text to speach library
the code can be found here
Pleace if you have a comment of imporovement let me know thanks

otengkwaku 30 Newbie Poster
def getInput():
    hours = float(input('How many hours did you work: '))
    while hours < 8 or hours > 86:
        print ('Error- Hours must be at least 8 and less than 86')
        hours = float(input('re-enter hours workde: '))

    rate = float(input('What is your hourly rate?: '))
    while rate < 7 or rate > 50:
        print ('Error- Payrate must be at least $7.00 and less that $50.00')
        rate = float(input('re-enter your hourly rate: '))

    return hours, rate

def timeCal(hours):
    if hours <= 40:
        return [hours, False]
    else:
        hour = hours - 40
        return [hour, True]

def rateCal(hours, rate):
    if hours[1]:
        othours = hours[0]
        otpay = othours * (rate * 1.5)
        regularpay = 40 * rate
        return otpay, regularpay, othours
    else:
        return None

def main():
    hours, rate = getInput()
    if rateCal(timeCal(hours), rate) == None:
        print('Payroll Information\n')
        print('Pay rate  $',format(rate,'7.2f'))
        print('Regular Hours  ',format(hours, '2.0f'))
        print('Overtime Hours  0')
        print('Regular pay  $',format(hours * rate,'7.2f'))
        print('Overtime pay  $ 0.00')
        print('Total pay:  $',format(hours * rate, '7.2f'))

    else:
        otpay, regularpay, othours = rateCal(timeCal(hours), rate)
        print('Payroll Information\n')
        print('Pay rate  $',format(rate,'7.2f'))
        print('Regular Hours  ',format(hours, '2.0f'))
        print('Overtime Hours  $',format(othours, '2.0f'))
        print('Regular pay  $',format(hours * rate,'7.2f'))
        print('Overtime pay  $',format(otpay, '7.2f'))
        print('Total pay:  $',format(regularpay + otpay, '7.2f'))


main()
otengkwaku 30 Newbie Poster

first of all determine the value of the first state you want to represent. in this case
the first state becomes index 0 and next index 1 and so on. now write a function that
takes a value and compute it index or better still find a constant such that when
you divid or subtract the content from the valued u will get it index

otengkwaku 30 Newbie Poster

Wrote a peice of code that does something uniquc in my point of view.
After that i was so excited that i published it. Only to find out that it
contain a bug. By the way the bug was very defficul to spot.
and by solving the bug i reworte all the software again.
so my question is was i wrong in publishing the code (software)?
and when it is even good to publish a code (software) as a finished product.
i have seen some sotfwares with realy bad bug but it is still out there and people are
using it.
so as developers what do we do?

otengkwaku 30 Newbie Poster

Hi guys i have solved the problem and the bug here is the correct code

import pyttsx
import time

#-----------------------------------------
def getMom(_mouth):
    if _mouth == 1:
        return 'january'
    elif _mouth == 2:
        return 'february'
    elif _mouth == 3:
        return 'march'
    elif _mouth == 4:
        return 'april'
    elif _mouth == 5:
        return 'maye'
    elif _mouth == 6:
        return 'june'
    elif _mouth == 7:
        return 'july'
    elif _mouth == 8:
        return 'august'
    elif _mouth == 9:
        return 'september'
    elif _mouth == 10:
        return 'october'
    elif _mouth == 11:
        return 'november'
    elif _mouth == 12:
        return 'december'
#----------------------------------------
#---------------------------------------- 
def getTheTime():
    hour = time.localtime().tm_hour % 12
    if hour == 0:
        hour = 12

    if time.localtime().tm_min == 0 and time.localtime().tm_hour == 0:
        return 'the time is 12 midnite'
    elif time.localtime().tm_min == 0 and time.localtime().tm_hour == 12:
        return 'the time is 12 noon'
    elif time.localtime().tm_hour < 12:
        if time.localtime().tm_min != 0:
            return 'the time is %d: %d am' %(hour, time.localtime().tm_min) 
        else:
            return 'the time is %d oklok am' %(hour)
    elif time.localtime().tm_hour == 12:
        return 'the time is %d: %d pm' %(time.localtime().tm_hour, time.localtime().tm_min)
    elif time.localtime().tm_hour > 12:
        if time.localtime().tm_min != 0:
            return 'the time is %d: %d pm' %(hour, time.localtime().tm_min) 
        else:
            return 'the time is %d oklok pm' %(hour)        
#-------------------------------------------------------------        

def getDate(day, mouth, year):

    if day == 1:
        return 'the date is %dst %s %d' %(day, getMom(mouth), year)
    elif day == 2:
        return 'the date is %dnd %s %d' %(day, getMom(mouth), year)
    elif day == 3:
        return 'the date is %drd %s %d' %(day, getMom(mouth), …
otengkwaku 30 Newbie Poster

there is a bug in the code guys,
when the computer goes to sleep whiles the programe is runing, after you restore it gives you the time that it slept.

otengkwaku 30 Newbie Poster

this is a very simple app the helps yous to keep track of time. It says the time very 15 minits, by the way you can change it.

it uses pyttsx which can be dowloaded and install.
copy this code and save it as sayTheTime.pyw and double click it.
it also uses python2.7 you should also note that you have to start it every time the computer
reboots

try it and tell me what you think thanks

import pyttsx
import time

def getMom(_mouth):
    if _mouth == 1:
        return 'january'
    elif _mouth == 2:
        return 'february'
    elif _mouth == 3:
        return 'march'
    elif _mouth == 4:
        return 'april'
    elif _mouth == 5:
        return 'maye'
    elif _mouth == 6:
        return 'june'
    elif _mouth == 7:
        return 'july'
    elif _mouth == 8:
        return 'august'
    elif _mouth == 9:
        return 'september'
    elif _mouth == 10:
        return 'october'
    elif _mouth == 11:
        return 'november'
    elif _mouth == 12:
        return 'december'


def getTheTime(_time):
    hour = _time.tm_hour % 12

    if _time.tm_min == 0 and _time.tm_hour == 0:
        return 'the time is 12 midnite'
    elif _time.tm_min == 0 and _time.tm_hour == 12:
        return 'the time is 12 noon'
    elif _time.tm_hour < 12:
        if _time.tm_min != 0:
            return 'the time is %d: %d am' %(hour, _time.tm_min) 
        else:
            return 'the time is %d oklok am' %(hour)
    elif _time.tm_hour == 12:
        return 'the time is %d: %d pm' %(_time.tm_hour, _time.tm_min)
    elif _time.tm_hour > 12:
        if _time.tm_min != 0:
            return 'the time is %d: %d pm' %(hour, _time.tm_min) …
Gribouillis commented: thanks for showing pyttsx +13
otengkwaku 30 Newbie Poster

Thanks guy for the indept explanation.
in short:
arg = is used to pass in an argument on size 1
*arg = is used to pass in argument of any size more than 0
**arg = is used to pass in a dict of size more than 0

thanks once again
by the way @snippsat i love your 3d works they are nice

otengkwaku 30 Newbie Poster
class Frame(Widget):
    def __init__(self, master=None, cnf={}, **kw):

what is the meaning of **kw in this function, and what does it represent?

otengkwaku 30 Newbie Poster

the ideas are sooo many i don't know what to do. i thing doing a mobil app and a desktop app that sync together and danweb to keep you up to date what do you guy think

otengkwaku 30 Newbie Poster

my question is, how do i use python to check a web site to see if it has an rss feed link and return that link

otengkwaku 30 Newbie Poster

thanks dragon. you helped me. i should have check every 512 bytes i read to see if it is off the patten not only 4 thanks a lot

otengkwaku 30 Newbie Poster

can you explain why this code always enter an infinte loop card.raw is a file containg jpg pic that i an trying to recover.

#include <stdio.h>
#include <stdlib.h>

int createFile(FILE* file, FILE* outfile);
int createName(void);

int main (void)
{

    FILE* cardp = fopen("card.raw", "r");
    FILE* outp = fopen("1.jpg", "w");

    while (!feof(cardp))
    {
        if (((fgetc(cardp) == 0xff) && (fgetc(cardp) == 0xd8) && (fgetc(cardp) == 0xff) && (fgetc(cardp) == 0xe0)) || ((fgetc(cardp) == 0xff) && (fgetc(cardp) == 0xd8) && (fgetc(cardp) == 0xff) && (fgetc(cardp) == 0xe1)))
        {
            printf("here");

            createFile(cardp, outp);
        }
    }   
    return 0;
}

int createName(void)
{

    return 0;
}

int createFile(FILE* file, FILE* outfile)
{

    //while not at the bening of another file do:
    while (1)
    {
        char block[512];
        fseek(file, -4, SEEK_CUR);
        fread(&block, 512, 1, file);

        //write 512 block
        fwrite(&block,512, 1, outfile);

        if (((fgetc(file) == 0xff) && (fgetc(file) == 0xd8) && (fgetc(file) == 0xff) && (fgetc(file) == 0xe0)) || ((fgetc(file) == 0xff) && (fgetc(file) == 0xd8) && (fgetc(file) == 0xff) && (fgetc(file) == 0xe1)))
            break;


    }

    return 0;
}
otengkwaku 30 Newbie Poster

what is the meaning of

fseek(file, -4, SEEK_CUR);

otengkwaku 30 Newbie Poster

hahaha i hear you boss