Search Results

Search found 10 results on 1 pages for 'viswa'.

Page 1/1 | 1 

  • How do rsync from within a python script?

    - by Viswa
    I plan to move file from one system to another system. For this, I am using rsync command in linux terminal. It works fine. But I need to implement this command to python. I am very new in python, so I don't know the way of defining the rsync command. So please tell the steps to define it. This is my rsync command: rsync -avrz /opt/data/filename root@ip:/opt/data/file I need to implement this command in a python script.

    Read the article

  • How to execute? [closed]

    - by Viswa
    Possible Duplicate: how to read the password from variable? I did the below code in my python script,but its not work. #! /usr/bin/python import os address = "rsync -avrz [email protected]:/opt/script/python/data/ /opt/script/python/data/" passwd ="my server password" os.system('%(address)s "echo %(passwd)s"' %locals()) it throws below error. If arg is a remote file/dir, prefix it with a colon (:). rsync error: syntax or usage error (code 1) at main.c(1236) [Receiver=3.0.7] If i run os.system('%(address)s' %locals()) means it work without any error but it ask password. I need that password should be read from my passwd variable. How to write python script to read server password from my variable.

    Read the article

  • I want to create an e-learning website [closed]

    - by Viswa
    I want to create an e-learning website and host it. (Maybe after some time I want to add forms.) These are the things I know: java, jsp, servlet, html (not guru, almost beginner). I don't have experience in creating websites, I did my college project using jsp,servlet and jdbc. What are the things or technology I need to know before creating website. Is it possible to create a website by one person?

    Read the article

  • how to read the password from variable?

    - by Viswa
    I am trying to move my file to another system which is located in some other place, with this command: rsync -avrz src destination It works fine. But what I need is to put this command in shell script and run it like: #! /bin/sh rsync -avrz srcfilelocation destination When it runs, it asks for the destination system password. I know that password and give it manually. Now I have decided to assign the password to an environment variable, like pswd="destination system password". I need my shell script to read the password from this variable. How can I write a script to do this?

    Read the article

  • How to copy the file from source to destination only once at a time?

    - by Viswa
    I have to copy the file from my desktop to my mounted directory. I was using the following command to copy the file from my desktop to mounted directory. os.system("cp -f /home/Desktop/filename /media/folder_1"). It works fine. But the problem is while copying the file from my source to mounted directory(folder_1) if any interruption is happens like network down, then the system continuously keep on trying. It couldn't skip that process. Finally, when the network comes the files are again copy to my mounted directory. Due to this continuous trying, next time i try to move the content it throws "permission denied" error. How do i copy the file only once, if any network issues happen then it will not keep try to copy, instead of that, it throws the error. If you know, Let me. Its very useful to me.

    Read the article

  • Masked Edit extender inside a Repeater

    - by Viswa
    How can i dynamically create a textBox and a Masked Edit extender inside a Panel. My code is something like this: In the ASPX page: In the Aspx.cs page Private DataView Function1() { Dataview dv =new dataview(); return dv; } Private void ShowProducts_OntemDataBound(object sender, RepeaterEventItem e) { //Consider For the First Iteration of the Repeater I am Creating a Simple Text Box Dynamically Textbox txt = new textbox(); txt.Text = "8888888888"; txt.Id = "TextBox1"; //Consider For the Second Iteration of the Repeater I am Creating another TextBox and a Textbox txt1 = new textBox(); txt1.text="2223334444"; txt1.Id = "TextBox2"; MaskedEditExtender mskEdit = (MaskedEditExtender)e.Item.FindControl("MskEdit"); mskEdit.TargetControlId = txt1.Id; Panel panel1 = (Panel)e.item.Findcontrol("Panel1"); panel1.Controls.Add(txt1); } When running the above code it is giving me "Null Reference Exception for MaskedEditExtender".Please suggest me some way for this.

    Read the article

  • I want to use a Currency control in Ajax that accepts any number of inputs

    - by Viswa
    I want to use a Currency Control in Ajax that accepts any number of input digits( with decimal maximum up to two digits only) For example If i am having a code like this: TextBox txt = new TextBox(); txt.Text ="99.99"; txt.Id = "TextBox1"; MaskedEditExtender mskEdit = new MaskEditExtender(); mskEdit.Id="CurrencyController"; mskEdit.Mask = "9,999,999.99"; mskEdit.TargetControlId = txt.Id; mskEdit.DisplayMoney = MaskedEditShowSymbol.Left; mskEdit.InputDirection = MaskedEditInputDirection.RightToLeft; mskEdit.MaskType = "None"; The issue is tha, when i run the above code the TextBox(textbox input text given is 99.99 but it is showing as $,,_.99. Please help me on this issue.

    Read the article

  • Validating button click event using JS from inside ascx nested inside updatepanel

    - by Viswa
    Hello I have a button inside an ascx inside an update panel inside aspx content page. When the button is clicked i want it to run a JS function that causes to show a panel. Here is my Code. <pre> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if(val2 != 0) { switch(val2) { case 1 : document.getElementById('<%=pnl1.ClientID%>').style.visibility = 'visible'; break; } } return false; } </script> <asp:LinkButton ID="lbl1" runat="server" OnClick="return ShowPanel(1);">count</asp:LinkButton> I am not sue how to do this. Please help Update #1 - ABC.ascx is in updatepanel in the aspx page XYZ.aspx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if (val2 != 0) { switch (val2) { case 1: document.getElementById("<%= this.pnl1.ClientID%>").style.display = "none"; break; } } return false; } </script> <div> <div style="text-align:center"> </div> <table style="width:100%; text-align:center; border-color:#99CCFF" border="3"> <tr style="text-align:left"> <td><asp:LinkButton ID="lbl1" runat="server" OnClientClick="return ShowPanel(1);">count</asp:LinkButton> </td> <td style="text-align:right"><asp:Button ID="btnHide1" runat="server" Text="hide" Height="18px" Width="32px"/> </td> </tr> <tr> <td colspan="2"><asp:Panel ID="pnl1" runat="server" Visible="false"> </asp:Panel> </td> </tr> </table> </div>

    Read the article

  • how to send push JSON to urban airship server using api

    - by Viswa
    I am using urban airship for sending push notification, i finished all configuration in my app and i can send notification from urban airship website. Now i have to request urban airship api for sending push notification (using this " https://go.urbanairship.com/api/push/") URL and i have send json like this { "apids": [ "some APID", "another APID" ], "aliases": ["my_alias"], "tags": ["tag1", "tag2"], "android": { "alert": "Hello from Urban Airship!", "extra": {"a_key":"a_value"} } } i want to send push notification for single device, i think i have to do this using APID, isn't it?.

    Read the article

1