Daily Archives

Articles indexed Thursday January 13 2011

Page 23/37 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • How to write an R function that evaluates an expression within a data-frame

    - by Prasad Chalasani
    Puzzle for the R cognoscenti: Say we have a data-frame: df <- data.frame( a = 1:5, b = 1:5 ) I know we can do things like with(df, a) to get a vector of results. But how do I write a function that takes an expression (such as a or a > 3) and does the same thing inside. I.e. I want to write a function fn that takes a data-frame and an expression as arguments and returns the result of evaluating the expression "within" the data-frame as an environment. Never mind that this sounds contrived (I could just use with as above), but this is just a simplified version of a more complex function I am writing. I tried several variants ( using eval, with, envir, substitute, local, etc) but none of them work. For example if I define fn like so: fn <- function(dat, expr) { eval(expr, envir = dat) } I get this error: > fn( df, a ) Error in eval(expr, envir = dat) : object 'a' not found Clearly I am missing something subtle about environments and evaluation. Is there a way to define such a function?

    Read the article

  • SQL: How to select rows from a table while ignoring the duplicate field values?

    - by Maxxon
    How to select rows from a table while ignoring the duplicate field values? Here is an example: id user_id message 1 Adam "Adam is here." 2 Peter "Hi there this is Peter." 3 Peter "I am getting sick." 4 Josh "Oh, snap. I'm on a boat!" 5 Tom "This show is great." 6 Laura "Textmate rocks." What i want to achive is to select the recently active users from my db. Let's say i want to select the 5 recently active users. The problem is, that the following script selects Peter twice. mysql_query("SELECT * FROM messages ORDER BY id DESC LIMIT 5 "); What i want is to skip the row when it gets again to Peter, and select the next result, in our case Adam. So i don't want to show my visitors that the recently active users were Laura, Tom, Josh, Peter, and Peter again. That does not make any sense, instead i want to show them this way: Laura, Tom, Josh, Peter, (skipping Peter) and Adam. Is there an SQL command i can use for this problem?

    Read the article

  • Saving State Dynamic UserControls...Help!

    - by Cognitronic
    I have page with a LinkButton on it that when clicked, I'd like to add a Usercontrol to the page. I need to be able to add/remove as many controls as the user would like. The Usercontrol consists of three dropdownlists. The first dropdownlist has it's auotpostback property set to true and hooks up the OnSelectedIndexChanged event that when fired will load the remaining two dropdownlists with the appropriate values. My problem is that no matter where I put the code in the host page, the usercontrol is not being loaded properly. I know I have to recreate the usercontrols on every postback and I've created a method that is being executed in the hosting pages OnPreInit method. I'm still getting the following error: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. Here is my code: Thank you!!!! bool createAgain = false; IList<FilterOptionsCollectionView> OptionControls { get { if (SessionManager.Current["controls"] != null) return (IList<FilterOptionsCollectionView>)SessionManager.Current["controls"]; else SessionManager.Current["controls"] = new List<FilterOptionsCollectionView>(); return (IList<FilterOptionsCollectionView>)SessionManager.Current["controls"]; } set { SessionManager.Current["controls"] = value; } } protected void Page_Load(object sender, EventArgs e) { Master.Page.Title = Title; LoadViewControls(Master.MainContent, Master.SideBar, Master.ToolBarContainer); } protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); System.Web.UI.MasterPage m = Master; Control control = GetPostBackControl(this); if ((control != null && control.ClientID == (lbAddAndCondtion.ClientID) || createAgain)) { createAgain = true; CreateUserControl(control.ID); } } protected void AddAndConditionClicked(object o, EventArgs e) { var control = LoadControl("~/Views/FilterOptionsCollectionView.ascx"); OptionControls.Add((FilterOptionsCollectionView)control); control.ID = "options" + OptionControls.Count.ToString(); phConditions.Controls.Add(control); } public event EventHandler<Insight.Presenters.PageViewArg> OnLoadData; private Control FindControlRecursive(Control root, string id) { if (root.ID == id) { return root; } foreach (Control c in root.Controls) { Control t = FindControlRecursive(c, id); if (t != null) { return t; } } return null; } protected Control GetPostBackControl(System.Web.UI.Page page) { Control control = null; string ctrlname = Page.Request.Params["__EVENTTARGET"]; if (ctrlname != null && ctrlname != String.Empty) { control = FindControlRecursive(page, ctrlname.Split('$')[2]); } else { string ctrlStr = String.Empty; Control c = null; foreach (string ctl in Page.Request.Form) { if (ctl.EndsWith(".x") || ctl.EndsWith(".y")) { ctrlStr = ctl.Substring(0, ctl.Length - 2); c = page.FindControl(ctrlStr); } else { c = page.FindControl(ctl); } if (c is System.Web.UI.WebControls.CheckBox || c is System.Web.UI.WebControls.CheckBoxList) { control = c; break; } } } return control; } protected void CreateUserControl(string controlID) { try { if (createAgain && phConditions != null) { if (OptionControls.Count > 0) { phConditions.Controls.Clear(); foreach (var c in OptionControls) { phConditions.Controls.Add(c); } } } } catch (Exception ex) { throw ex; } } Here is the usercontrol's code: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FilterOptionsCollectionView.ascx.cs" Inherits="Insight.Website.Views.FilterOptionsCollectionView" %> namespace Insight.Website.Views { [ViewStateModeById] public partial class FilterOptionsCollectionView : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } protected override void OnInit(EventArgs e) { LoadColumns(); ddlColumns.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(ColumnsSelectedIndexChanged); base.OnInit(e); } protected void ColumnsSelectedIndexChanged(object o, EventArgs e) { LoadCriteria(); } public void LoadColumns() { ddlColumns.DataSource = User.GetItemSearchProperties(); ddlColumns.DataTextField = "SearchColumn"; ddlColumns.DataValueField = "CriteriaSearchControlType"; ddlColumns.DataBind(); LoadCriteria(); } private void LoadCriteria() { var controlType = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].CriteriaSearchControlType; var ops = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].ValidOperators; ddlOperators.DataSource = ops; ddlOperators.DataTextField = "key"; ddlOperators.DataValueField = "value"; ddlOperators.DataBind(); switch (controlType) { case ResourceStrings.ViewFilter_ControlTypes_DDL: criteriaDDL.Visible = true; criteriaText.Visible = false; var crit = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].SearchCriteria; ddlCriteria.DataSource = crit; ddlCriteria.DataBind(); break; case ResourceStrings.ViewFilter_ControlTypes_Text: criteriaDDL.Visible = false; criteriaText.Visible = true; break; } } public event EventHandler OnColumnChanged; public ISearchCriterion FilterOptionsValues { get; set; } } }

    Read the article

  • Haskell. Numbers in binary numbers. words

    - by Katja
    Hi! I need to code words into binary numbers. IN: "BCD..." OUT:1011... I have written already funktion for coding characters into siple numbers IN: 'C' OUT: 3 IN: 'c' OUT: 3 lett2num :: Char -> Int lett2num x | (ord 'A' <= ord x) && (ord x <= ord 'Z') = (ord x - ord 'A') + 1 | (ord 'a' <= ord x) && (ord x <= ord 'z') = (ord x - ord 'a') +1 num2lett :: Int -> Char num2lett n | (n <= ord 'A') && (n <= ord 'Z') = chr(ord 'A'+ n - 1) | (n <= ord 'a') && (n <= ord 'Z') = chr(ord 'A'+ n - 1) I wrote as well function for codind simple numbers into binary. num2bin :: Int->[Int] num2bin 0 = [] num2bin n | n>=0 = n `mod` 2 : (num2bin( n `div` 2)) | otherwise = error but I donw want those binary numbers to be in a list how can I get rid of the lists? Thanks

    Read the article

  • Using database on another development machine

    - by Cipher
    Hi, I am developing an ASP.NET website. I wanted to shift whole of my work to another PC of mine. I copied the website to the other PCOpenCreate ASP.NET folderApp_Data and pasted the database.mdf and database.ldf files there. I was getting some exception when I was trying to run the website as it showed the "could not open the connection from con.open()". Is there some other step too that I am missing?

    Read the article

  • code deployment options

    - by bobinabottle
    We've been looking at automating our server and code deployments. We've already decided on puppet for our server configurations, but are looking for a more "push" style tool to use for code deployments. I'm currently looking at either using capistrano or fabric, but I'm not sure what would be the most mature to use? We deploy a number of different services, none of which are currenlty written in rails or django, so we don't mind about language. What would be the best one to build custom deployment scripts? Or have I missed another tool out there? We are also considering git pushing with hooks for deployment, but feel it will be limited/hacky in what we want to achieve with it. Any thoughts or experience would be great to hear. Cheers

    Read the article

  • Trouble binding command in grid menu item.

    - by Pete
    I have a grid that's inside a usercontrol derived class called MediatedUserControl. I'm adding a context menu to let the user delete an item, but I've been unable to figure out how to bind the command to my command property. I'm using MVVM and my viewmodel implements a public ICommand property called DeleteSelectedItemCommand. However, when the view is displayed, I get the following message in the output window: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='BRO.View.MediatedUserControl', AncestorLevel='1''. BindingExpression:Path=DataContext.DeleteSelectedItemCommand; DataItem=null; target element is 'BarButtonItem' (HashCode=6860584); target property is 'Command' (type 'ICommand') I feel like I generally have a good handle on bindings like this and can't figure out what it is I'm missing here. Thanks for any help you can provide. <dxg:GridControl HorizontalAlignment="Left" Margin="12,88,0,0" x:Name="gridControl1" VerticalAlignment="Top" Height="500" Width="517" DataSource="{Binding ItemList}" BorderBrush="{StaticResource {x:Static SystemColors.ActiveBorderBrushKey}}" ShowBorder="True" Background="{StaticResource {x:Static SystemColors.ControlLightBrushKey}}" UseLayoutRounding="False" DataContext="{Binding}"> <dxg:GridControl.Columns> <dxg:GridColumn FieldName="Code" Header="Code" Width="107" /> <dxg:GridColumn FieldName="Name" Header="Item" Width="173" /> <dxg:GridColumn FieldName="PricePerItem" Header="Unit Price" Width="70"> <dxg:GridColumn.EditSettings> <dxe:TextEditSettings DisplayFormat="N2" /> </dxg:GridColumn.EditSettings> </dxg:GridColumn> <dxg:GridColumn FieldName="Quantity" Header="Qty" Width="50" AllowEditing="True" /> <dxg:GridColumn FieldName="TotalPrice" Header="Total Price" Width="90"> <dxg:GridColumn.EditSettings> <dxe:TextEditSettings DisplayFormat="N2" /> </dxg:GridColumn.EditSettings> </dxg:GridColumn> </dxg:GridControl.Columns> <dxg:GridControl.View> <dxg:TableView ShowIndicator="False" ShowGroupPanel="False" MultiSelectMode="Row" AllowColumnFiltering="False" AllowBestFit="False" AllowFilterEditor="False" AllowEditing="False" AllowGrouping="False" AllowSorting="False" AllowResizing="False" AllowMoving="False" AllowMoveColumnToDropArea="False" AllowDateTimeGroupIntervalMenu="False" > <dxg:TableView.RowCellMenuCustomizations> <dxb:BarButtonItem Name="deleteRowItem" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:MediatedUserControl, AncestorLevel=1}, Path=DataContext.DeleteSelectedItemCommand}"> </dxb:BarButtonItem> </dxg:TableView.RowCellMenuCustomizations> </dxg:TableView> </dxg:GridControl.View>

    Read the article

  • Generic Pop and Push for List<T>

    - by Bil Simser
    Here's a little snippet I use to extend a generic List class to have similar capabilites to the Stack class. The Stack<T> class is great but it lives in its own world under System.Object. Wouldn't it be nice to have a List<T> that could do the same? Here's the code: .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas, "Courier New", Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } 1: public static class ExtensionMethods 2: { 3: public static T Pop<T>(this List<T> theList) 4: { 5: var local = theList[theList.Count - 1]; 6: theList.RemoveAt(theList.Count - 1); 7: return local; 8: } 9:   10: public static void Push<T>(this List<T> theList, T item) 11: { 12: theList.Add(item); 13: } 14: } It's a simple extension but I've found it useful, hopefully you will too! Enjoy.

    Read the article

  • January Winnipeg .NET User Group Event

    - by D'Arcy Lussier
    We’ve had some problems with the Winnipeg .NET UG website, but things are getting sorted out and the site should be back up very shortly. In the meantime, here’s info on our January event and how to register. This is also a Microsoft sponsored event, so we’ll have some great swag to give away. As always, pizza will be provided! When: Wednesday, January 26th Where: 17th Floor Conference Room, Richardson Building Session: Taking your Windows Phone Apps to the Next Level with Tombstoning Speaker: Tyler Doerksen, Imaginet Unlike previous versions of Windows Mobile, Windows Phone 7 does not allow 3rd party applications to run in the background. Because of this your application needs to react to various life cycle events to provide the user with a seamless experience. Luckily Silverlight isolated storage has your back. In this session learn about the app life cycle and what storage patterns you can use to keep your users happy. To register for this event, please visit our registration page here.

    Read the article

  • What is the canonical name for domain names with extra parts?

    - by ConfusedFromIreland
    I am confused about domain names (I think) I call these things, i.e. names you can buy, 'domain names' bbc.co.uk google.com I call these things, i.e. extensions of names 'host names' www.bbc.co.uk mail.yahoo.com arts.mit.edu hello.there.example.com Is this naming scheme correct? Are there official definitions of these? In particular, what are each of the texts between the dots called (i.e. the name for "www", "bbc", "edu", "example")?

    Read the article

  • Serial connection over a single USB cable (Windows to linux, or linux to linux)

    - by andyortlieb
    I'm helping out with a project for an embedded device that only has USB and no serial. This device is running Linux. These days, when we need to connect to a serial port on a device we typically use a USB to serial adapter (on something like a phone system or a load balancing device, etc). I would like to know if it is possible to have the host device behave as though it were a serial adapter, thus removing the need for one. Given the nature of USB, is this approach even necessary? To recap, I would like to be able to connect a single A-to-A USB cable from my workstation (be it windows or linux) to this device, for the purpose of administration (especially initial setup), using minicom, putty or hyperterminal. Thanks

    Read the article

  • Issues running java in Solaris 9 container

    - by Matthew Watson
    Hi, I have a solaris 9 container built from a physical server using flarcreate. Everything seems fine, except when trying to trying to run any "java -server" process it fails with the following error This is on a Sunfire T1000 machine running Solaris 10 10/09 s10s_u8wos_08a SPARC Running jdk1.5.0_15 Exception java.lang.OutOfMemoryError: requested -4 bytes for size_t in /BUILD_AREA/jdk1.5.0_15/hotspot/src/os/solaris/vm/os_solaris.cpp. Out of swap space? As far as I can tell I'm not actually out of swap space. Running java in client mode works without a problem. Googles only suggestion is related to x86. Any suggestions? Thanks.

    Read the article

  • Windows Displays Double the Actual Installed Physical Memory

    - by Andrew Barber
    I have a server I've installed Windows Web 2008 R2 on, which is reporting that I have double the physical memory installed as is actually the case. In msinfo32 "Installed Physical Memory" shows as 2x what ever the actual installed amount is, though "Total Physical Memory" shows the correct amount. The "System" info window shows installed memory as 2x, with the correct amount in parenthesis listed as the "usable" amount). This server mistakenly had Windows Web 2008 (32-bit) installed on it just previously, and that OS also reported the same faulty information as Win2K8R2 is reporting. BIOS reports the correct amount, memtest was run on this server before installation, and a previous Windows 2000 instance installed on this system also reported the correct amount, as I recall. Server operation seems to be fine as well (it's only trying to use the correct amount of memory). The server is a generic pizzabox running on a SuperMicro X6DVL-EG with dual Xeon-3.2's. Memory installed are 4 matching mt18vddf12872g-335c3 sticks (1GB pc2700 DDR ECC REG cl2.5) This behavior occurs whether two or all four are installed. So, has anyone seen something like this before? Have any idea about what's causing it, and how I should be concerned about it? Everything else seems good so far, and I'll be upgrading the memory before putting the server into service, but I don't want to spend too much time/money/effort on the server if it's got something odd going wrong here. UPDATE: There was a question I ran into regarding memory sparing in the BIOS and a possible (buggy) effect thereof; however, flipping that bit back and forth in the BIOS revealed that isn't the issue. Still flummoxed a bit about this one, though I still have seen no negative impacts. Post-Answer Update (January 13, 2011): Upgrading the system with new, larger memory has fixed this issue.

    Read the article

  • Can capistrano or fabric be used to setup a server from scratch?

    - by Blankman
    I'm hoping there is a light weight, command line utility that I could use to setup a server from scratch. I like python's fabric or ruby's capistrano but from what I was reading they are more used for deployment purposes and not setting up apache, mysql, update patches etc. I know there are other tools like puppet, but I don't want to setup a master/slave for servers etc., I was hoping there was a more light-weight tool for this.

    Read the article

  • Emails disappear when moving from Inbox to anywhere else

    - by Jason T.
    Whenever a client of mine has a message open, they click on Move To Folder and the list of recent folders comes up. That person selects a folder but the message does not appear in there. What I have found out was that if I right-click on the message and move it that way the message will move successfully. Or if the message is open and I do use the Move To Folder shortcut that if I select Other Folder and choose a folder they will move that way. Which leads me to believe that the folders in the recent folders list point somewhere else. So my question is, how can I find out where those folders point to?

    Read the article

  • Conferences to go to 2011 Edition

    - by Zypher
    It's that time of year to start thinking about what conferences we want to beg,plead,borrow and steal to get to go to this year. We all like a good conference, but are generally limited in the funds available to go to them - if we are provided any - so we need to be at least a little picky. What are the conferences that you are really excited about this year, and what tracks do you think will be the most beneficial to a sysadmin?

    Read the article

  • To Delete or Not to Delete Arcserve Makeup Jobs?

    - by Cliff Racer
    Every once in a while, I have a backup job that fails with my backup server running ARCserve 12.5. A failure results in the creation of a 'makeup' job. I run the makeup job and even if it completes it stays in my job cue. These have piled up over the past couple of years and I find myself wondering if its ok to delete them knowing that ARCserve relies on a sql database to catalog backup info and data. If I run a makeup job, can I just delete it afterward? Should I just collect them? I have not seen anything so far that makes me feel confident with what to do with these leftover jobs.

    Read the article

  • exportfs: internal: no supported addresses in nfs_client

    - by Brian
    I am trying to set up a NFS server on an AWS instance running SLES11. After installing nfs-utils, I tried to export a test share. Here is what my /etc/exports file looks like: /opt/share1 ec2-50-16-224-79.compute-1.amazonaws.com(rw,async) export -ar returns the following message: exportfs: internal: no supported addresses in nfs_client domU-12-31-38-04-7E-02.compute-1.internal:/opt/share1: No such file or directory Any idea what the no supported addresses error means? Thanks!

    Read the article

  • fstab and cifs mounting, possible to store authentication information outside of fstab?

    - by tj111
    I am currently using cifs to mount some network shares (that require authentication) in /etc/fstab. It works excellently, but I would like to move the authentication details (username/pass) outside of fstab and be able to chmod it 600 (as fstab can have issues if I were to change its permissions). I was wondering if it is possible to do this (many-user system, don't want these permissions to be viewable by all users). from: //server/foo/bar /mnt/bar cifs username=user,password=pass,r 0 0 to: //server/foo/bar /mnt/bar cifs <link to permissions>,r 0 0 (or something analogous to this). Thanks.

    Read the article

  • Execute encrypted files but don't let anybody read them.

    - by Stebi
    I want to provide a virtual machine image with an installed web application. The user should be able to boot the vm (don't login, just boot) and a webserver should start automatically. The point is I want to hide the (ruby) source code of the web application from everyone as there is no obfuscator for ruby. I thought I could use file system encryption to encrypt the directory with the sourcecode (or even a whole partition). But the webserver user must be able to read it automatically after booting. Nobody is allowed to login as the webserver user (or any other user) so no other can read the contents. My questions are now: Is this possible? Because I give away the whole vm everybody could mount its virtual discs and read them (except the encrypted one). Is it now possible to find the key the webserver user needs to decrypt the files and decrypt them manually? Or is it safe to give such a vm away? The problem is that everything needed to decrypt must be included somewhere in the vm else the webserver cannot start automatically. Maybe I'm completely wrong and you have another tip for me securing the source code.

    Read the article

  • Missing hvc0 in Ubuntu Lucid Xen DomU

    - by Joril
    I've just installed an Ubuntu Lucid 64bit image (from Stacklet) as a Xen DomU, running under Xen 3.2.1 on Centos 5.2 64bit. Everything is working fine, except my logs are flooded with: /dev/hvc0: No such file or directory I tried creating the device with mknod /dev/hvc0 c 229 0 but the message just changes to: /dev/hvc0: cannot open as standard input: No such device or address Any hint on what I could try? :(

    Read the article

  • When I try to access a website without www I get access denied.

    - by madphp
    I have an apache web server on a debian machine. I'm using virtualmin to administer virtual hosts. I have two sites on this server right now, when I try to access one site without the www in the URL I get an access denied. The other site is fine. The site with the problem is a cakephp app and has the following .htaccess file in the public_html folder. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> Below is the directives for the problem domain. SuexecUserGroup "#1001" "#1001" ServerName mydomain.net ServerAlias www.mydomain.net ServerAlias webmail.mydomain.net ServerAlias admin.mydomain.net DocumentRoot /home/mydomain/public_html ErrorLog /var/log/virtualmin/mydomain.net_error_log CustomLog /var/log/virtualmin/mydomain.net_access_log combined ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/ ScriptAlias /awstats/ /home/mydomain/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/mydomain/public_html> Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5 </Directory> <Directory /home/mydomain/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.mydomain.net RewriteRule ^(.*) https://mydomain.net:20000/ [R] RewriteCond %{HTTP_HOST} =admin.mydomain.net RewriteRule ^(.*) https://mydomain.net:10000/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 31 <Files awstats.pl> AuthName "mydomain.net statistics" AuthType Basic AuthUserFile /home/mydomain/.awstats-htpasswd require valid-user </Files>

    Read the article

  • Backup script that excludes large files using Duplicity and Amazon S3

    - by Jason
    I'm trying to write an backup script that will exclude files over a certain size. My script gives the proper command, but when run within the script it outputs an an error. However if the same command is run manually everything works...??? Here is the script based on one easy found with google #!/bin/bash # Export some ENV variables so you don't have to type anything export AWS_ACCESS_KEY_ID="accesskey" export AWS_SECRET_ACCESS_KEY="secretaccesskey" export PASSPHRASE="password" SOURCE=/home/ DEST=s3+http://s3bucket GPG_KEY="7743E14E" # exclude files over 100MB exclude () { find /home/jason -size +100M \ | while read FILE; do echo -n " --exclude " echo -n \'**${FILE##/*/}\' | sed 's/\ /\\ /g' #Replace whitespace with "\ " done } echo "Using Command" echo "duplicity --encrypt-key=$GPG_KEY --sign-key=$GPG_KEY `exclude` $SOURCE $DEST" duplicity --encrypt-key=$GPG_KEY --sign-key=$GPG_KEY `exclude` $SOURCE $DEST # Reset the ENV variables. export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export PASSPHRASE= If run I recieve the error; Command line error: Expected 2 args, got 6 Enter 'duplicity --help' for help screen. Any help your could offer would be greatly appreciated.

    Read the article

  • What's the best way to block IP spoofing on a layer 3 switch?

    - by toupeira
    We're hosting Dedicated Servers and are currently using old 3com switches with IP-based ACLs. So each port has an ACL that allows all IP addresses assigned to this customer, and blocks everything else. But now 3com was bought by HP, and the follow-up model only supports basic ACL that aren't flexible enough to both allow certain IPs while blocking others. Looking at other switches in a similar price-range, we've found that most of them have similar problems or don't offer any ACL features at all. I assume this could also somehow be done with VLANs, but if I understand this correctly we'd still need some kind of ACL to actually specify the valid IP addresses for each port. What do you use to make sure your customers don't use unassigned IP addresses? Or what switches can you recommend that have flexible ACL functionality?

    Read the article

  • Copy data from Access to the next row in Excel

    - by edmon
    I have a MS Access database for a small Hotel. On the main form I have Guest Information fields...(Name, Address, Phone#, etc). I also have an Excel file that keeps track of bookings for the Hotel. The following code takes the Guest information from my form in Access and populates the labeled cells in my Excel file. Dim objXLApp As Object Dim objXLBook As Object Set objXLApp = CreateObject("Excel.Application") Set objXLBook = objXLApp.Workbooks.Open("Y:\123files\E\Hotel Reservation.xls") objXLApp.Application.Visible = True objXLBook.ActiveSheet.Range("B2") = Me.GuestFirstName & " " & GuestLastName objXLBook.ActiveSheet.Range("C2") = Me.PhoneNumber objXLBook.ActiveSheet.Range("D2") = Me.cboCheckInDate objXLBook.ActiveSheet.Range("E2") = Me.cboCheckOutDate objXLBook.ActiveSheet.Range("G2") = Me.RoomType objXLBook.ActiveSheet.Range("H2") = Me.RoomNumber End Sub Is there a way to, move to the next row in my Excel file, for a new guests info? EX. I take my first guests info and it populates row 2 of my Excel file. For my next guest it will populate row 3 of my Excel file and so on....

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >