Search Results

Search found 2134 results on 86 pages for 'jason aren'.

Page 4/86 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Problem with 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. If i run the script duplicity gives an error. However if i copy and paste the same command generated by the script everything works... Here is the script #!/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="gpgkey" # 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= When the script is run I get the error; Command line error: Expected 2 args, got 6 Where am i going wrong??

    Read the article

  • How would I skew an image with GD Library?

    - by Jason
    I want to skew an image into a trapezoidal shape. The left and right edges need to be straight up and down; the top and left edges need to be angular. I have no idea what the best way to do this is. I'm using GD Library and PHP. Can anyone point me in the right direction? Thanks, Jason

    Read the article

  • Cisco pix command - whats this command mean?

    - by jason clark
    Hi, Anyone know what the following means? I have these two lines in our cisco PIX configuration file but have no references to these IP's anywhere else in the config and cant find a device on the network with them. global (inet) 10 213.228.xxx.xx global (inet) 20 213.228.xxx.xx thanks, Jason (BTW: I've xxx'ed out the remainder of the ip for security :-0 )

    Read the article

  • Android Autolink to launch WebView

    - by Jason Kim
    Hi, I'm using autoLink="web" attribute in TextView to launch Browser. However, I want to launch the myActivity with WebView, when I click the links in TextView. Is is possible that catch the click event and invoke startActivity? Thanks in advance, Jason

    Read the article

  • How to write a crawler?

    - by Jason
    Hi All, I have had thoughts of trying to write a simple crawler that might crawl and produce a list of its findings for our NPO's websites and content. Does anybody have any thoughts on how to do this? Where do you point the crawler to get started? How does it send back its findings and still keep crawling? How does it know what it finds, etc,etc. Thanks! -Jason

    Read the article

  • Ideal PHP Session Size?

    - by Jason
    Hi, I have a PHP form (mortgage app) that is about 400 fields, traffic on the site will be low. What is the ideal Session size for 400 fields going into a MySQL db? In PHP.ini what do I set? Anything I should set that I am missing? -Jason

    Read the article

  • Sql order by within a group by with aggregate

    - by NG
    Say I have Team/Name/Some number Cardinals Jason 8 Cardinals Chris 5 Yankees Joba 6 Cubs Carlos 6 Cardinals Chris 6 And I want Cardinals Jason 8 Cardinals Chris 11 Cubs Carlos 6 Yankees Joba 6 So, what I'm doing is grouping by team, grouping by name, summing by some number However, within cardinals I want to make sure the names are in a particular order. If I just do an "order by name desc" for example then the the whole grouping gets ignored. So how can I order within a group.

    Read the article

  • Including email, IMs, configs, etc. in documentation or notes

    - by Jason Antman
    The shop I work in is pretty laid-back. We're on a documentation kick, only because historically we've been very bad with it. We do a lot of our brainstorming in face-to-face meetings, and also do a lot of communication via IM in addition to email. While I'm usually pretty good about documentation and keeping copious lab notes, I just finished a build of a host and spent hours searching through IMs, emails, files on my workstation, etc. to pull out anything I missed in my lab notes, which formed a large amount of the basis for the internal documentation. Does anyone have any thoughts on, aside from manually saving things to a project directory, managing various data sources (especially email and IM) and tracking them on project basis? Ideally, I'd like an easy way to put copies of emails, IM logs, etc. into a project-specific directory on my workstation and then just have a cron job that syncs that up with a shared folder. This isn't really a candidate for anything more advanced, as the bulk of the data will be copies of configs, code, etc. Here are the big restrictions: Email is via a centralized Zimbra install, so nothing can happen server-side. My workstation is Linux. Aside from writing Pidgin and Thunderbird plugins that let me tag chats and emails as belonging to a project, and then copy them to the appropriate place... any thoughts? Suggestions? Thanks, Jason

    Read the article

  • IEnumerable<T> and reflection

    - by Aren B
    Background Working in .NET 2.0 Here, reflecting lists in general. I was originally using t.IsAssignableFrom(typeof(IEnumerable)) to detect if a Property I was traversing supported the IEnumerable Interface. (And thus I could cast the object to it safely) However this code was not evaluating to True when the object is a BindingList<T>. Next I tried to use t.IsSubclassOf(typeof(IEnumerable)) and didn't have any luck either. Code /// <summary> /// Reflects an enumerable (not a list, bad name should be fixed later maybe?) /// </summary> /// <param name="o">The Object the property resides on.</param> /// <param name="p">The Property We're reflecting on</param> /// <param name="rla">The Attribute tagged to this property</param> public void ReflectList(object o, PropertyInfo p, ReflectedListAttribute rla) { Type t = p.PropertyType; //if (t.IsAssignableFrom(typeof(IEnumerable))) if (t.IsSubclassOf(typeof(IEnumerable))) { IEnumerable e = p.GetValue(o, null) as IEnumerable; int count = 0; if (e != null) { foreach (object lo in e) { if (count >= rla.MaxRows) break; ReflectObject(lo, count); count++; } } } } The Intent I want to basically tag lists i want to reflect through with the ReflectedListAttribute and call this function on the properties that has it. (Already Working) Once inside this function, given the object the property resides on, and the PropertyInfo related, get the value of the property, cast it to an IEnumerable (assuming it's possible) and then iterate through each child and call ReflectObject(...) on the child with the count variable.

    Read the article

  • Disposables, Using & Try/Catch Blocks

    - by Aren B
    Having a mental block today, need a hand verifying my logic isn't fubar'ed. Traditionally I would do file i/o similar to this: FileStream fs = null; // So it's visible in the finally block try { fs = File.Open("Foo.txt", FileMode.Open); /// Do Stuff } catch(IOException) { /// Handle Stuff } finally { if (fs != null) fs.Close(); } However, this isn't very elegant. Ideally I'd like to use the using block to dispose of the filestream when I'm done, however I am unsure about the synergy between using and try/catch. This is how i'd like to implement the above: try { using(FileStream fs = File.Open("Foo.txt", FileMode.Open)) { /// Do Stuff } } catch(Exception) { /// Handle Stuff } However, I'm worried that a premature exit (via thrown exception) from within the using block may not allow the using block to complete execution and clean up it's object. Am I just paranoid, or will this actually work the way I intend it to?

    Read the article

  • Reflective Generic Detection

    - by Aren B
    Trying to find out if a provided Type is of a given generic type (with any generic types inside) Let me Explain: bool IsOfGenericType(Type baseType, Type sampleType) { /// ... } Such that: IsOfGenericType(typeof(Dictionary<,>), typeof(Dictionary<string, int>)); // True IsOfGenericType(typeof(IDictionary<,>), typeof(Dictionary<string, int>)); // True IsOfGenericType(typeof(IList<>), typeof(Dictionary<string,int>)); // False However, I played with some reflection in the intermediate window, here were my results: typeof(Dictionary<,>) is typeof(Dictionary<string,int>) Type expected typeof(Dictionary<string,int>) is typeof(Dictionary<string,int>) Type expected typeof(Dictionary<string,int>).IsAssignableFrom(typeof(Dictionary<,>)) false typeof(Dictionary<string,int>).IsSubclassOf(typeof(Dictionary<,>)) false typeof(Dictionary<string,int>).IsInstanceOfType(typeof(Dictionary<,>)) false typeof(Dictionary<,>).IsInstanceOfType(typeof(Dictionary<string,int>)) false typeof(Dictionary<,>).IsAssignableFrom(typeof(Dictionary<string,int>)) false typeof(Dictionary<,>).IsSubclassOf(typeof(Dictionary<string,int>)) false typeof(Dictionary<,>) is typeof(Dictionary<string,int>) Type expected typeof(Dictionary<string,int>) is typeof(Dictionary<string,int>) Type expected typeof(Dictionary<string,int>).IsAssignableFrom(typeof(Dictionary<,>)) false typeof(Dictionary<string,int>).IsSubclassOf(typeof(Dictionary<,>)) false typeof(Dictionary<string,int>).IsInstanceOfType(typeof(Dictionary<,>)) false typeof(Dictionary<,>).IsInstanceOfType(typeof(Dictionary<string,int>)) false typeof(Dictionary<,>).IsAssignableFrom(typeof(Dictionary<string,int>)) false typeof(Dictionary<,>).IsSubclassOf(typeof(Dictionary<string,int>)) false So now I'm at a loss because when you look at the base.Name on typeof(Dictionary) you get Dictionary`2 Which is the same as typeof(Dictionary<,>).Name

    Read the article

  • ASP.NET Debugging Timing out with IIS

    - by Aren B
    Finally broke down and seeking help, my client/iis (not sure which) usually times out after about 30s - 1 minute while im debugging (stepping through code) which not only causes me to lose my spot and have to start over (usually stepping faster, making more mistakes) but the IIS Debug session closes completely and I have to warm up the entire session again. What's the best way to get more time out of a debugging session? Debugging a vanilla 3.5 Web Site (not app) on IIS 7.5 Classic Pipeline

    Read the article

  • Parameterized Queries /Without/ using queries.

    - by Aren B
    I've got a bit of a poor situation here. I'm stuck working with commerce server, which doesn't do a whole lot of sanitization/parameterization. I'm trying to build up my queries to prevent SQL Injection, however some things like the searches / where clause on the search object need to be built up, and there's no parameterized interface. Basically, I cannot parameterize, however I was hoping to be able to use the same engine to BUILD my query text if possible. Is there a way to do this, aside from writing my own parameterizing engine which will probably still not be as good as parameterized queries? Update: Example The where clause has to be built up as a sql query where clause essentially: CatalogSearch search = /// Create Search object from commerce server search.WhereClause = string.Format("[cy_list_price] > {0} AND [Hide] is not NULL AND [DateOfIntroduction] BETWEEN '{1}' AND '{2}'", 12.99m, DateTime.Now.AddDays(-2), DateTime.Now); *Above Example is how you refine the search, however we've done some testing, this string is NOT SANITIZED. This is where my problem lies, because any of those inputs in the .Format could be user input, and while i can clean up my input from text-boxes easily, I'm going to miss edge cases, it's just the nature of things. I do not have the option here to use a parameterized query because Commerce Server has some insane backwards logic in how it handles the extensible set of fields (schema) & the free-text search words are pre-compiled somewhere. This means I cannot go directly to the sql tables What i'd /love/ to see is something along the lines of: SqlCommand cmd = new SqlCommand("[cy_list_price] > @MinPrice AND [DateOfIntroduction] BETWEEN @StartDate AND @EndDate"); cmd.Parameters.AddWithValue("@MinPrice", 12.99m); cmd.Parameters.AddWithValue("@StartDate", DateTime.Now.AddDays(-2)); cmd.Parameters.AddWithValue("@EndDate", DateTime.Now); CatalogSearch search = /// constructor search.WhereClause = cmd.ToSqlString();

    Read the article

  • UrlEncoding-Safe Delimiter

    - by Aren B
    So the site I'm working on has a filter system that operates by passing a key and value system through a querystring. The whole site is going through a re-factor soon and I'm maintaining the existing site so before we discuss the RIGHT way to implement this, I just need ideas for changing my delimiter. The current format is like this: cf=<key>:<value> The problem is, I've recently run into an issue because some of our new values for this filter contain : in them. I.e: cf=MO_AspectRatio:16:10 The value is being UrlEncoded, but the browsers are de-coding %3a into : on the fly because the : doesn't inherently break the urls. I need some suggestions for url-safe delimiters that aren't :,-,_,&,? that makes sense. I'm not looking for a solution like () or something wild.

    Read the article

  • jQuery Adding DOM Elements

    - by Aren B
    This may be a simple answer, but I'm trying to add a dom-created element (i.e. document.createElement(...)) to a jQuery Selector. jQuery has a great assortment of functions for adding html .html(htmlString) .append(htmlString) .prepend(htmlString) But what i want to do is add a dom OBJECT var myFancyDiv = document.createElement("div"); myFancyDiv.setAttribute("id", "FancyDiv"); // This is the theoretical function im looking for. $("#SomeOtherDiv").htmlDom(myFancyDiv);

    Read the article

  • Call up last exception on an ASP.NET error page.

    - by Aren B
    I've got an error page here SiteError.aspx and it's configured correctly in the web.config to go there when unhandled exceptions are encountered. I want to use this page to log the exception that triggered it as well because I only want to LOG the errors that the users encounter (i.e. if SiteError.aspx is ever hit.) This is the code I Have: In the OnLoad(...) in SiteError.aspx Exception lastEx = Context.Server.GetLastError(); if (lastEx != null) log.Error("A site error was encountered", lastEx); However, my log is never showing up in my Output, and If i breakpoint on line 2 (in this example) code execution is never interupted (after letting the exception clear to ASP.NET handling in the debugger.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >