logo
Tags down

shadow

(${var//=/ }) Doesn't work within Alpine Linux while works fine within zsh. Is there similar alternative?


By : user2174570
Date : October 17 2020, 08:10 PM
it fixes the issue I am using this snippet to split string into array , Using a heredoc:
code :
line=FOO=BAR
IFS='=' read -r var value <<EOF
$line
EOF


Share : facebook icon twitter icon

scp using paramiko doesnt work - ssh works fine


By : Alam Uddin
Date : March 29 2020, 07:55 AM
seems to work fine I have been able to use ssh and issue command in the remote server. Now I want to scp files from the remote server but that just seems like its impossible. I'm totally new to python and Paramiko. The error is permission denied in my local directory of darn windows. The files are supposed to come from the Mac. Any other really really simple example I can use to scp files from a remote Linux machine to my local Windows machine? , To retrieve files from a remote host into a local directory:
code :
......
localpath='C:\\Users\\handsonexpert\\Documents\\file3.txt'
remotepath='/Users/ihussain/testdir/file3.txt'
......
sftp.get(remotepath, localpath)

wpf: vertical scrollbar works fine but horizontal one doesnt work


By : gruby20
Date : March 29 2020, 07:55 AM
Hope this helps It's cos you don't have a PART_HorizontalScrollBar in your ControlTemplate for ScrollViewer
your ScrollViewer ControlTemplate should look like:
code :
<!--  SCROLL VIEWER  -->
<ControlTemplate x:Key="ScrollViewerControlTemplate1"
                  TargetType="{x:Type ScrollViewer}">
  <Grid x:Name="Grid"
        Background="{TemplateBinding Background}">
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                            Grid.Column="0"
                            Margin="{TemplateBinding Padding}"
                            CanContentScroll="{TemplateBinding CanContentScroll}"
                            CanHorizontallyScroll="False"
                            CanVerticallyScroll="False"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}" />
    <!--  vertical scrollbar  -->
    <ScrollBar x:Name="PART_VerticalScrollBar"
                Grid.Column="1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Hand"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Style="{DynamicResource ScrollBarStyle1}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset,
                                Mode=OneWay,
                                RelativeSource={RelativeSource TemplatedParent}}" />
    <!-- NEW BIT -->
    <ScrollBar x:Name="PART_HorizontalScrollBar"
                Grid.Row="1"
                Grid.Column="0"
                AutomationProperties.AutomationId="HorizontalScrollBar"
                Cursor="Hand"
                Maximum="{TemplateBinding ScrollableWidth}"
                Minimum="0"
                Orientation="Horizontal"
                Style="{DynamicResource ScrollBarStyle1}"
                ViewportSize="{TemplateBinding ViewportWidth}"
                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                Value="{Binding HorizontalOffset,
                                Mode=OneWay,
                                RelativeSource={RelativeSource TemplatedParent}}" />
  </Grid>
</ControlTemplate>

JQuery animate() doesnt work with my usage while css() works fine


By : Azat Ugurlu
Date : March 29 2020, 07:55 AM
this will help My JQuery: //script.js , From the official jQuery documentation:
code :
.image {
    background-color: green;
    width: 100px;
    height: 100px; 
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

I have 2 forms on this page one, if i only have one it works fine as soon as i add the 2nd it doesnt work?


By : TRISHS
Date : March 29 2020, 07:55 AM
This might help you How am i able to have two form submissions on the one page? I have 2 forms on this page one, if i only have one it works fine as soon as i add the 2nd it doesnt work? Is it possible or do have have to link out to another page
code :
<body>
  <form name="mailinglist" method="post">   
   <input type="text" name="email" />   
   <input type="submit" name="mailing-submit" value="Join Our Mailing 
    List" />     
  </form>     
 <form name="contactus" method="post">    
  <input type="text" name="email" />     
  <input type="text" name="subjet" />    
  <textarea name="message"></textarea>     
  <input type="submit" name="contact-submit" value="Send Email" />     
 </form>
<?php    
  if (!empty($_POST['mailing-submit']))    
   {
   //do something here;   
   }

  if (!empty($_POST['contact-submit'])) 
   {  
   //do something here;  
   }  
 ?>
 </body>

Python Function Works just fine but doesnt work when for looped


By : user1857785
Date : March 29 2020, 07:55 AM
I wish this help you On first sight, it seems to me that the problem is the file opening. Try with this:
code :
np = "test"
with open('User.txt', 'r', encoding='UTF-8') as f:
    lines = [l for l in f.read().split("\n") if l]

for l in lines:
    change_password(l, np)
print('done')
shadow
Privacy Policy - Terms - Contact Us © voile276.org