Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

matjame

@matjame
About
Posts
194
Topics
81
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using python to copy only files with a given extension
    M matjame

    Hi. New in python but managed to find my way around. I have a folder named date(i.e 20111011, or 20111101). The script goes and ftps the folder that matches the date passed(python CallTibcoWS.py 20111104). If the folder name matches the date passed then it will copy the folder to a specified location. Now I want to use the same code to copy files. I have another folder(folder name not important), with files. File extensions are dates(i.e name.20111111, surname.20110102, python.20101111). I want to copy all the files that match the date passed when I run the script(python CallTibcoWS.py 20111104).....My code is as below

    import os
    import datetime
    import time
    import sys
    import subprocess
    import paramiko
    import platform

    WSDESCRIPTOR = 'ESSImporter'
    LOGFILE = 'C:/Logs/%s/%s_%s.log' % (WSDESCRIPTOR.lower(), WSDESCRIPTOR, datetime.datetime.now().strftime("%Y-%m-%d"))
    TIBCOSERVER = 'GenevaServer'
    TIBCOPORT = '7979'
    WEBSERVICEADDRESS = "http://%(server)s:%(port)s/ESSImporter/Services/Interface/intfESSImporter-service.serviceagent/intfwsProcess_ESSImporterEndpoint1" % {'server': TIBCOSERVER, 'port': TIBCOPORT, 'ws': WSDESCRIPTOR}
    FILEPATH='/export/home/extracts/out/%s'

    REMOTEPATH='C:/ESSSWAP/Ess_Import/%s'

    FTPSERVER = 'Server'
    FTPUSER = 'test'
    if platform.system().upper() == 'WINDOWS' : #dev environment
    FTPPASSWORD = "C:/Priv_Key.ppk"
    else:
    FTPPASSWORD = "/export/Priv_Key.ppk"

    FILEEXT = 'date is the extension_%s' % (datetime.datetime.now().strftime("%Y-%m-%d"))
    FILELIST = (('basket_div_SA.0', 'basket_div_SA'), ('basket_payment_SA.0', 'basket_payment_SA'), ('basket_summary_SA.0', 'basket_summary_SA'), ('basket_swap_SA.0', 'basket_swap_SA'), ('basket_trade_SA.0', 'basket_trade_SA'), ('interest_detail_SA.0', 'interest_detail_SA'), ('unwind_SA.0', 'unwind_SA'))

    def getfile(ftphost, fromfile, tofile, tibcoinstanceInfo=None, tibcoinstanceError=None):

    if tibcoinstanceInfo:
        tibcoinstanceInfo('Connecting to %s as %s with pw %s' % (ftphost, FTPUSER, FTPPASSWORD))
        
    try:
        t = paramiko.Transport((ftphost, 22))
        key = paramiko.RSAKey.from\_private\_key\_file(FTPPASSWORD)
        t.connect(username=FTPUSER, pkey=key)
        sftp = paramiko.SFTPClient.from\_transport(t)
        
        print(fromfile)
      
                
        _if sftp != None:
            sftp.get(fromfile, tofile)
    
            sftp.close()
        
            if tibc_
    
    Linux, Apache, MySQL, PHP python sysadmin tools regex workspace

  • Linux tutorials
    M matjame

    Thanx Navaneeth..I just went to the CentOS site and got the RPMs and the other applications and they got installed automatically. Now I can install again but I am trying now to install from my desktop. Which is still giving me a problem by the way..you can help me with that if you know how. Thank you again for your assistance. Appreciated

    kagiso

    Linux, Apache, MySQL, PHP sysadmin linux question

  • Installing programs onto Linux
    M matjame

    yeah, thanx. I tried. The first command worked. Updated and installed, but it didnt ask me for any passwords. apt-get install mysql-server mysql-client(I am using Red Hat Linux so mine is yum install mysql) And then the second part below cudnt find most of the packages but is installing the other ones. apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 libapache2-mod-php5 php5-common php5-gd php5-idn php-pear php5-imap php5-mcrypt php5-mhash php5-mysql php5-sqlite php5-xmlrpc php5-xsl php5-curl Thank you for the assistance... Shouldn't I be able to see MySql under my applications after this installation??

    kagiso

    Linux, Apache, MySQL, PHP linux help

  • Installing programs onto Linux
    M matjame

    Greetings guys. I am new but getting the hang of things on Linux. I have some applications that I have pasted onto my desktop machine (CentOS Red Hat Linux) and I want to install them. #yum install .........will not identify this packages, so I need to give it a route. Can someone help me with the installation from the desktop. To mention them, one of the application is bugzilla-3.2.3.tar.gz Thank you in advance guys

    kagiso

    Linux, Apache, MySQL, PHP linux help

  • Linux tutorials
    M matjame

    Yeah..I have went through all that.....I now know how to install packages in Linux (CentOS Red Hat)....The problem is that..I have packages already on my desktop and want to install them

    kagiso

    Linux, Apache, MySQL, PHP sysadmin linux question

  • Installing software on a linux server
    M matjame

    I am using CentOS. I can see Applications>>System Settings>>Terminal THen a window shows with Administrator

    kagiso

    IT & Infrastructure help tutorial sysadmin linux question

  • Installing software on a linux server
    M matjame

    Hello guys. I have tried all the help I can can get on instaling software on a linux server. I now understand the commands and everythng, but my problem is where to get the command prompt window. Everyone keeps telling me to get to the console window, but I know that in office I click on start menu, then run then cmd....How do I get that in Linux. I need a dummy guide on how to do this guys. Thank you in advance.

    kagiso

    IT & Infrastructure help tutorial sysadmin linux question

  • Doing a little research on smartfoxserver
    M matjame

    Hi guys. I am doing some research on SmartFoxServer and Unity. Unity does not work on Linux but instaling Smartfoxserver on Linux can help with Unity. Does anyone know where I can get some more information. I am trying to develop an application that configures a house, so my configurator will be designed through Unity. Any assistance please

    kagiso

    IT & Infrastructure game-dev linux help

  • Mapping software
    M matjame

    Again, I am TOTALLY New on this Hardware Support issues. Company bought a new server (Linux) and we are trying to install some application on it but the most important of all is that we need to rn the applications onthe server and then access them on the client machines. I think they call it mapping. Anyone know how I can do that. Please help. I am a lost software developer in Hardware

    kagiso

    IT & Infrastructure sysadmin linux hardware help

  • Linux tutorials
    M matjame

    Hi guys. I am TOTALLY new on Linux and we just bought a new Linux server at the office and I have to install some application on it. I need to install and other applcations but unfortunately it does not recognize the exe files as installable files. How do I go about installing them. Your assistance will be appreciated guys. :(( :((

    kagiso

    Linux, Apache, MySQL, PHP sysadmin linux question

  • Granting read/write permissions on database.
    M matjame

    So, I have to put the database onto the folder?? I will try that and see if it dont work. Thanx, will let u knw.

    kagiso

    Web Development database help sysadmin testing beta-testing

  • Granting read/write permissions on database.
    M matjame

    Well, IIS is not a problem.The site runs perfectly from IIS, but we just posted the site onto the new ISP FTP folder and its doing this.

    kagiso

    Web Development database help sysadmin testing beta-testing

  • Granting read/write permissions on database.
    M matjame

    Well, I checked the database folder and I gave read/write permissions to my account but I still have the problem.Now I dont knw what to do. Im on asp by the way, not asp.net.

    kagiso

    Web Development database help sysadmin testing beta-testing

  • Granting read/write permissions on database.
    M matjame

    I have just contacted the service provider and they tell me that they will escalate the query.The problem is that, when I put in the wrong username and password, I get the right message (Make sure ur username and password are correct), but when I put in the right username and password, I get the error (Make sure the operation uses an updatable query).So it most definitely has to be permission issues. But they promised to call me back. Thanx again.

    kagiso

    Web Development database help sysadmin testing beta-testing

  • Granting read/write permissions on database.
    M matjame

    First thank you for the response, but unfortunately this site has to fun from my hosting company, so I cant test it offline.I have removed all the cached files and deleted the history, and still.Nothing happens. Is it possible that the hosting company could maybe check if their server grants access rights to my database??

    kagiso

    Web Development database help sysadmin testing beta-testing

  • Granting read/write permissions on database.
    M matjame

    Hello guys. I have an update problem that with my logoncheck.asp and when I googled the problem I found out it might be permission problems on the database. Now I have tried to grant permission on the database folder properties to allow read/write, but I still get the same error. Is there another way I can use to maybe grant this permission.Unless there is something else Im doing wrong. The error is Error # -2147467259 Operation must use an updateable query. SQL = UPDATE tbl_employees SET lastlogin = #29-Feb-2008# WHERE employeelogin = 'SIPHOSIBUYANE' Code is : ]]> "" and request.Cookies("shark_password") <> "" and request.form("ccokie") <> "false" then strUserid = request.Cookies("shark_user_id") strPassword = request.Cookies("shark_password") boolFromCookie = True end if end if '----------------------------------------------------- '----------------------------------------------------- 'Level 1 Basic Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Test for Entry of Member ID prior to Running Search '----------------------------------------------------- if (strUserID="") then ' Member ID Entered session("msg") = "

    " & dictLanguage("Error_NoUserID") & "

    " Response.Redirect "default.asp?opt=1" 'Run Search '----------------------------------------------------- else 'Run Database Lookup sql = sql_GetEmployeesByLogin(strUserID) 'response.write sql & "
    " Set rs = Server.CreateObject("ADODB.RecordSet") rs.open sql, conn, 3, 3 end if '----------------------------------------------------- '----------------------------------------------------- 'Level 2 Validation Testing '----------------------------------------------------- '----------------------------------------------------- 'Member ID Entered Now Run Search for Record '------------------------------------------- If rs.eof Then 'No Record Found, Bad ID rs.close session("msg") = "

    "

    Web Development database help sysadmin testing beta-testing

  • Problem with update statement
    M matjame

    This site is working fine from the server and on the computer(Local host), so I only copied the files across to the ftp folder of the web hosting company and the problem begun. What should I do?? Thanx in advance.

    kagiso

    Database database help sysadmin announcement career

  • Problem with update statement
    M matjame

    Hello there guys. Im experiencing a problem with an update statement and this is the error I get when trying to log into my website. Error Occured: Error # -2147467259 Operation must use an updateable query. SQL = UPDATE tbl_employees SET lastlogin = #28-Feb-2008# WHERE employeelogin = 'SIPHOSIBUYANE' I tried to check the permission(They are correct), files(They are in the right places).Now I dont knw what could be the problem. Here is the update statement. Private function RunSQL(ByVal sql,ByRef myRS) 'Response.Write sql & "
    " On Error Resume Next if lcase(left(trim(sql),6)) = "select" then set myRS = server.CreateObject("adodb.recordset") myRS.open sql,conn,3,3 else select case lcase(left(trim(sql),6)) case "update", "delete" if instr(lcase(sql),"where") = 0 then response.write "Dork, you tried to run a "& lcase(left(trim(sql),6)) &" query without the where clause!" boolDoNotRunQuery = true response.end end if end select if boolDoNotRunQuery <> true then set myRS = conn.Execute(sql) end if end if if err.number <> 0 then Response.Clear Response.Write "Error Occured:

    " Response.Write "Error # " & CStr(Err.Number) & " " & Err.Description & "
    " Response.Write "SQL = " & sql & "
    " Response.End End if On Error Goto 0 end Function Private function DoSQL(ByVal sql) 'Response.write sql & "
    " On Error Resume Next boolDoNotRunQuery = FALSE actionWord = left(trim(sql),6) select case lcase(actionWord) case "update", "delete" if instr(lcase(sql),"where") = 0 then response.write "Dork, you tried to run a "& lcase(left(trim(sql),6)) &" query without the where clause!" boolDoNotRunQuery = true response.end end if end select

    kagiso

    Database database help sysadmin announcement career

  • Stored procedure displays invisible text.
    M matjame

    Thank you sir. I will have to change the background color to suit the text color. Thank you very much for you assistance but both the server page and the localhost page are the same for I copied the exact page and pasted it.

    kagiso

    Web Development help database sysadmin windows-admin

  • Stored procedure displays invisible text.
    M matjame

    No sir.I dont think so because, the changes only happen when I post the pages onto the server but on the local host the changes dont happen.Two pages that request the same thing.The color problems only happen when I post the changes on the server but not on the local host. Unless I mis-understood you sir. Thanx in advance.

    kagiso

    Web Development help database sysadmin windows-admin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups