Search Results

Search found 1699 results on 68 pages for 'skip'.

Page 7/68 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Is it possible to copy a set of files, but automatically skip if file already exists?

    - by awe
    I know that the copy command has an option to automatically replace a file if it already exists, but I want to know if it is a way to copy the files only if they not already exist (/Y). I do not know the actual file names in the batch code, as I copy from the source using wildcards in the copy command: copy *.zip c:\destination The reason I want this instead of automatic overwrite is that the files are large, and to skip existing would save a lot of execution time.

    Read the article

  • Web deploy (msdeploy), syncing everything but sites and pools (but include siteDefaults)

    - by jishi
    Today I do the following to sync two webservers but skip all site configuration: msdeploy -verb:sync -source:webServer -dest:webServer,computerName=web25:8080 -skip:objectName=section,absolutePath=system.applicationHost/sites -skip:objectName=section,absolutePath=system.applicationHost/applicationPools However, this effectively also skip the siteDefaults, which I do like to sync (system.applicationHost/sites/siteDefaults) There doesn't seem to be a way to "include" a section, to override the skip directive. And there doesn't seem to be a way to sync only the siteDefaults section from applicationHost either, since source appHostConfig only seem to sync a specified site, and not siteDefaults. Maybe it is possible to "skip" using an Xpath expression or similar, to only skip the nodes, but include , but I find the documentation a bit confusing and my Xpath is rusty.

    Read the article

  • What's the right way to do mutable data structures (e.g., skip lists, splay trees) in F#?

    - by dan
    What's a good way to implement mutable data structures in F#? The reason I’m asking is because I want to go back and implement the data structures I learned about in the algorithms class I took this semester (skip lists, splay trees, fusion trees, y-fast tries, van Emde Boas trees, etc.), which was a pure theory course with no coding whatsoever, and I figure I might as well try to learn F# while I’m doing it. I know that I “should” use finger trees to get splay tree functionality in a functional language, and that I should do something with laziness to get skip-list functionality, etc. , but I want to get the basics nailed down before I try playing with purely functional implementations. There are lots of examples of how to do functional data structures in F#, but there isn’t much on how to do mutable data structures, so I started by fixing up the doubly linked list here into something that allows inserts and deletes anywhere. My plan is to turn this into a skip list, and then use a similar structure (discriminated union of a record) for the tree structures I want to implement. Before I start on something more substantial, is there a better way to do mutable structures like this in F#? Should I just use records and not bother with the discriminated union? Should I use a class instead? Is this question "not even wrong"? Should I be doing the mutable structures in C#, and not dip into F# until I want to compare them to their purely functional counterparts? And, if a DU of records is what I want, could I have written the code below better or more idiomatically? It seems like there's a lot of redundancy here, but I'm not sure how to get rid of it. module DoublyLinkedList = type 'a ll = | None | Node of 'a ll_node and 'a ll_node = { mutable Prev: 'a ll; Element : 'a ; mutable Next: 'a ll; } let insert x l = match l with | None -> Node({ Prev=None; Element=x; Next=None }) | Node(node) -> match node.Prev with | None -> let new_node = { Prev=None; Element=x; Next=Node(node)} node.Prev <- Node(new_node) Node(new_node) | Node(prev_node) -> let new_node = { Prev=node.Prev; Element=x; Next=Node(node)} node.Prev <- Node(new_node) prev_node.Next <- Node(new_node) Node(prev_node) let rec nth n l = match n, l with | _,None -> None | _,Node(node) when n > 0 -> nth (n-1) node.Next | _,Node(node) when n < 0 -> nth (n+1) node.Prev | _,Node(node) -> Node(node) //hopefully only when n = 0 :-) let rec printLinkedList head = match head with | None -> () | Node(x) -> let prev = match x.Prev with | None -> "-" | Node(y) -> y.Element.ToString() let cur = x.Element.ToString() let next = match x.Next with | None -> "-" | Node(y) -> y.Element.ToString() printfn "%s, <- %s -> %s" prev cur next printLinkedList x.Next

    Read the article

  • PyCharm: How to skip over closing braces / brackets / parentheses?

    - by Withnail
    This is driving me nuts. I can't get the auto-indentations to work properly unless I use the automatic closing of braces, et al (which I don't like), and I see no option allowing one to skip over/out. Eclipse has a configuration option for this, and Visual Studio doesn't auto-close everything by default, but rather formats the code block after manually entering the closing brace (which I think is perfect). Surely there's something apart from going all the way over to the "End" key?

    Read the article

  • JVMTI: FollowReferences : how to skip Soft/Weak/Phantom references?

    - by Jayan
    I am writing a small code to detect number of objects left behind after certain actions in our tool. This uses FollowReferences() JVMTI-API. This counts instances reachable by all paths. How can I skip paths that included weak/soft/phantom reference? (IterateThroughHeap counts all objects at the moment, so the number is not fully reliable) Thanks, Jayan

    Read the article

  • jquery element not defined, but it used to skip it...

    - by pfunc
    I recently transferred a site to a new host. Reloaded everything, and the javascript that worked fine before is breaking at an element it can't find. $('#emailForm') is not defined. Now, the #emailform isn't on the page, but it wasn't before either, and JS used to skip this and it would just work. Not sure why this is happening. Any clues?

    Read the article

  • JUnit : Is there a way to skip a test belonging to a Test class's parent?

    - by Jon
    I have two classes: public abstract class AbstractFoobar { ... } and public class ConcreteFoobar extends AbstractFoobar { ... } I have corresponding test classes for these two classes: public class AbstractFoobarTest { ... } and public class ConcreteFoobarTest extends AbstractFoobarTest { ... } When I run ConcreteFoobarTest (in JUnit), the annotated @Test methods in AbstractFoobarTest get run along with those declared directly on ConcreteFoobarTest because they are inherited. Is there anyway to skip them?

    Read the article

  • possible to use jquery to skip to a certain part of a page, based on its div class?

    - by Brad
    I want a link that scrolls the page to the start of the <div class="content-body"> The same functionality as a: <a href="#maincontent">Skip</a>, and placing <a name="maincontent"></a> right next to <div class="content-body"> I am seeing if it is possible via jQuery, and want to know if I would run into any problems down the road using that method (besides the user having javascript disabled).

    Read the article

  • rails not recognizing project

    - by tipu
    I can create a new project using rails and I can use stuff like rails migration ... and i (correctly) get a error because the sqlite gem is missing. but when i try using rails migration ... with a project i checked out from github, it doesn't recognize that it is a rails project i get: Usage: rails new APP_PATH [options] Options: -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files [--dev] # Setup the application with Gemfile pointing to your Rails checkout -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files -G, [--skip-git] # Skip Git ignores and keeps -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /usr/bin/ruby1.8 [--skip-gemfile] # Don't create a Gemfile and it goes on. any ideas? edit: it's probably an important detail that earlier my rails wasn't working at all. i had to cp /usr/bin/ruby to /usr/bin/local/ruby

    Read the article

  • How to skip integers in C++ taken from a fstream txt file?

    - by Elaina
    I need to create a function that uses a loop. This function will open a text file and then must be able to skip a variable number of leading random integers. The program must be able to handle any number of leading random integers. Example if the opened file reads this on its first line: 100 120 92 82 38 49 102 and the SKIP_NUMBER variable is assigned 3 the number the function would grab is 82. The function must continue to grab the integers every SKIP_NUMBER until it reaches the end of the file. These integers taken from the txt file are then placed into another text file. Please help I'm really lost on how to create this loop! :D Here is my function so far... //Function skips variables and returns needed integer int skipVariable (int SKIP_NUMBER) { return 0; //temporary return } These are my program variables: // initialize function/variables ifstream fin; string IN_FILE_NAME, OUT_FILE_NAME; int SKIP_NUMBER;

    Read the article

  • Adobe Acrobat API - How to skip opening password protected PDFs?

    - by Ryan
    Hi all, I've been using Delphi and the Adobe Acrobat 9 API. I'm simply opening a PDF and printing it, followed by closing it without saving anything. I'm having an issue while opening some PDFs though. If the PDF is password protected the Open method displays Adobe's "Input password" prompt. My application is running in an automated fashion, and therefor cannot proceed beyond this password prompt until somebody clicks cancel. I've been looking for something that will either notify me that the file is password protected prior to opening it, or a parameter or something that will skip password protected files. I need my program to assume it cannot open any passworded PDF. Does anyone know enough about the Acrobat API to provide any assistance here? Thank you, Ryan

    Read the article

  • How do I get AuthLogic to skip Password validation?

    - by ndp
    I think I'm just missing something obvious. I send a user a perishable token embedded in a link. They click on it, and they come back to the site. I want to log them in automatically (I'm not building a banking app). This seems like this should be simple, but all the examples I've found require a password. How do I skip this completely? I just seem to get UserSession.create to work.

    Read the article

  • How to skip pushing the default gateway via DHCP in OpenWRT?

    - by francadaval
    I have a router with OpenWRT that I want to resolve IP addressing with DHCP without setting a default gateway. I have added a DHCP-Option parameter with value 3,0.0.0.0 that is supposed to set the default gateway by DHCP. Instead, the router IP is defined as default gateway for DHCP connections. How can I set a null default gateway (0.0.0.0) for connections configuration by DHCP? As said in a comment: I want this router to service a VirtualBox network that doesn't set a default gateway via DHCP.

    Read the article

  • Changing startup parameters for MySQL

    - by RN
    I need to remove skip-networking from MySQL startup parameters I am running MySQL on Linux on Centos on a VPS Can someone please tell a newbie how to do this ? I suppose to start and stop the mySQL server, I have to do something like this /etc/init.d/mysqld stop /etc/init.d/mysqld start ps -ef|grep 'mysql' root 11331 20220 0 10:53 pts/0 00:00:00 grep mysql root 32452 1 0 Apr02 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables --skip-networking mysql 32504 32452 0 Apr02 ? 00:00:18 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock --skip-grant-tables --skip-networking

    Read the article

  • In gnuplot, how to plot with lines but skip missing data points?

    - by Anna
    I've got a value associated to each day, as such: 120530 70.1 120531 69.0 120601 69.2 120602 69.5 # and so on for 200 lines When plotting this data in gnuplot with lines, the data points are nicely connected. Unfortunately, at places over a week of data points can be missing. Gnuplot draws long lines over these intervals. How can I make gnuplot only connect points on consecutive days? Solutions that require preprocessing of the data are fine, as I already smooth it with a script. Here is what I use: set xdata time set timefmt "%y%m%d" plot "vikt_ma.txt" using 1:2 with lines title "first line", \\ "" using 1:3 with lines title "second line" Example:

    Read the article

  • How to achieve in-folder discussions with IMAP (skip SMTP send, Thunderbird)?

    - by lkraav
    Does anyone know a good way to achieve replying to a message into the same IMAP folder without sending another duplicate copy over SMTP? This is to be achieved with a conventional GUI mail client, especially Thunderbird. Goal is to have an in-folder conversation. This is possible with shared IMAP folders, with per-user Seen indices, where subscribed recipients are guaranteed to see the new messages without them arriving from internet. Thunderbird is capable of storing a copy of a reply in the same folder as original message (Account Options), which is half way there. Just pressing Save sends the message into Drafts and that is probably an even bigger patch to try to put a "draft message" into the same folder as original. All options, client, server or logic-wise are an acceptable answer, including programming i.e. patching/creating add-on for Thunderbird.

    Read the article

  • How do I skip the Keep/Cancel dialog for downloads in Google Chrome?

    - by NoCatharsis
    This question is specifically for PDF files, because I work with them all day and have to download 20+ at a time. I use an extension called Linkclump which selects all links at one time. Since I disabled the Chrome PDF Viewer, these now automatically download (which I intended). The only problem is I get 20+ dialogs across the bottom of my screen that ask me if I want to Keep or Cancel my downloads. Seriously? I have to click Keep on every single one of them. This did not happen before in Chrome, the change was added a few versions ago I believe. Oh, and I'm using Chrome Dev v14.0.803.0.

    Read the article

  • onDraw() triggered but results don't show

    - by Don
    I have the following routine in a subclass of view: It calculates an array of points that make up a line, then erases the previous lines, then draws the new lines (impact refers to the width in pixels drawn with multiple lines). The line is your basic bell curve, squeezed or stretched by variance and x-factor. Unfortunately, nothing shows on the screen. A previous version with drawPoint() and no array worked, and I've verified the array contents are being loaded correctly, and I can see that my onDraw() is being triggered. Any ideas why it might not be drawn? Thanks in advance! protected void drawNewLine( int maxx, int maxy, Canvas canvas, int impact, double variance, double xFactor, int color) { // impact = 2 to 8; xFactor between 4 and 20; variance between 0.2 and 5 double x = 0; double y = 0; int cx = maxx / 2; int cy = maxy / 2; int mu = cx; int index = 0; points[maxx<<1][1] = points[maxx<<1][0]; for (x = 0; x < maxx; x++) { points[index][1] = points[index][0]; points[index][0] = (float) x; Log.i(DEBUG_TAG, "x: " + x); index++; double root = 1.0 / (Math.sqrt(2 * Math.PI * variance)); double exponent = -1.0 * (Math.pow(((x - mu)/maxx*xFactor), 2) / (2 * variance)); double ePow = Math.exp(exponent); y = Math.round(cy * root * ePow); points[index][1] = points[index][0]; points[index][0] = (float) (maxy - y - OFFSET); index++; } points[maxx<<1][0] = (float) impact; for (int line = 0; line < points[maxx<<1][1]; line++) { for (int pt = 0; pt < (maxx<<1); pt++) { pointsToPaint[pt] = points[pt][1]; } for (int skip = 1; skip < (maxx<<1); skip = skip + 2) pointsToPaint[skip] = pointsToPaint[skip] + line; myLinePaint.setColor(Color.BLACK); canvas.drawLines(pointsToPaint, bLinePaint); // draw over old lines w/blk } for (int line = 0; line < points[maxx<<1][0]; line++) { for (int pt = 0; pt < maxx<<1; pt++) { pointsToPaint[pt] = points[pt][0]; } for (int skip = 1; skip < maxx<<1; skip = skip + 2) pointsToPaint[skip] = pointsToPaint[skip] + line; myLinePaint.setColor(color); canvas.drawLines(pointsToPaint, myLinePaint); / new color } } update: Replaced the drawLines() with drawPoint() in loop, still no joy for (int p = 0; p<pointsToPaint.length; p = p + 2) { Log.i(DEBUG_TAG, "x " + pointsToPaint[p] + " y " + pointsToPaint[p+1]); canvas.drawPoint(pointsToPaint[p], pointsToPaint[p+1], myLinePaint); } /// canvas.drawLines(pointsToPaint, myLinePaint);

    Read the article

  • Is there a way to validates_presence_of only one time? (to skip that validation once the user's been

    - by GoodGets
    So, I'd like for a user to see an error message if he submits a comment and the :name is blank (typical error message, don't need help with that). However, I'd then like to allow the user to skip that validation once he's been notified that "we like all comments to have a name." So, he submits the comment once, sees the notification, then can submit the form again unchanged if he really doesn't want to add a name, and the validates_presences_of :name is skipped. But, I'm not sure how to go about doing this. I thought about checking to see where the request is coming from, but after a create, errors are handed off to the "new" action, which is the same as actual "new" comments. I then thought about checking to see if flash[errors] were present, but that won't work because there are other validations a comment has to pass. Finally, I thought about trying a validates_presences_of :name, :unless = :notified but wasn't sure how to define notified. I honestly hate asking such an open ended question, but wasn't sure where to get started. So, is there a way to just check a certain validation once?

    Read the article

  • How can I skip some block content while reading in Perl.

    - by Nano HE
    Hello. I plan to skip the block content which include the start line of "MaterializeU4()" with the subroutin() read_block below. But failed. # Read a constant definition block from a file handle. # void return when there is no data left in the file. # Otherwise return an array ref containing lines to in the block. sub read_block { my $fh = shift; my @lines; my $block_started = 0; while( my $line = <$fh> ) { # how to correct my code below? I don't need the 2nd block content. $block_started++ if ( ($line =~ /^(status)/) && (index($line, "MaterializeU4") != 0) ) ; if( $block_started ) { last if $line =~ /^\s*$/; push @lines, $line; } } return \@lines if @lines; return; } Data as below: __DATA__ status DynTest = <dynamic 100> vid = 10002 name = "DynTest" units = "" status VIDNAME9000 = <U4 MaterializeU4()> vid = 9000 name = "VIDNAME9000" units = "degC" status DynTest = <U1 100> vid = 100 name = "Hello" units = "" Output: <StatusVariables> <SVID logicalName="DynTest" type="L" value="100" vid="10002" name="DynTest" units=""></SVID> <SVID logicalName="VIDNAME9000" type="L" value="MaterializeU4()" vid="9000" name="VIDNAME9000" units="degC"></SVID> <SVID logicalName="DynTest" type="L" value="100" vid="100" name="Hello" units=""></SVID> </StatusVariables> [Updated] I print the value of index($line, "MaterializeU4"), it output 25. Then I updated the code as below $block_started++ if ( ($line =~ /^(status)/) && (index($line, "MaterializeU4") != 25) Now it works. Any comments are welcome about my practice. Thank you.

    Read the article

  • how to skip first 3 row of text file.

    - by Dilantha Chamal
    hey when i reading the text file using java, how can i skip first 3 rows of the text file. Show me how to do that. public class Reader { public static void main(String[] args) { BufferedReader reader; try { reader = new BufferedReader(new InputStreamReader( new FileInputStream("sample.txt"))); Map<String, Integer result = new LinkedHashMap<String, Integer(); Map<String, Integer result2 = new LinkedHashMap<String, Integer(); while (reader.ready()) { String line = reader.readLine(); /split a line with spaces/ String[] values = line.split("\s+"); /set a key date\tanimal/ String key = values[0] + "\t" + values[1]; int sum = 0; int count = 0; /get a last counter and sum/ if (result.containsKey(key)) { sum = result.get(key); count = result2.get(key); } else{ } /increment sum a count and save in the map with key/ result.put(key, sum + Integer.parseInt(values[2])); result2.put(key, count + 1); } /interate and print new output/ for (String key : result.keySet()) { Integer sum = result.get(key); Integer count = result2.get(key); System.out.println(key + " " + sum + "\t" + count); } reader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }

    Read the article

  • A better way of handling the below program(may be with Take/Skip/TakeWhile.. or anything better)

    - by Newbie
    I have a data table which has only one row. But it is having 44 columns. My task is to get the columns from the 4th row till the end. Henceforth, I have done the below program that suits my requirement. (kindly note that dt is the datatable) List<decimal> lstDr = new List<decimal>(); Enumerable.Range(0, dt.Columns.Count).ToList().ForEach(i => { if (i > 3) lstDr.Add(Convert.ToDecimal(dt.Rows[0][i])); } ); There is nothing harm in the program. Works fine. But I feel that there may be a better way of handimg the program may be with Skip ot Take or TakeWhile or anyother stuff. I am looking for a better solution that the one I implemented. Is it possible? I am using c#3.0 Thanks.

    Read the article

  • Should I skip authorization, with CanCan, of an action that instantiates a resource?

    - by irkenInvader
    I am writing a web app to pick random lists of cards from larger, complete sets of cards. I have a Card model and a CardSet model. Both models have a full RESTful set of 7 actions (:index, :new, :show, etc). The CardSetsController has an extra action for creating random sets: :random. # app/models/card_set.rb class CardSet < ActiveRecord::Base belongs_to :creator, :class_name => "User" has_many :memberships has_many :cards, :through => :memberships # app/models/card.rb class Card < ActiveRecord::Base belongs_to :creator, :class_name => "User" has_many :memberships has_many :card_sets, :through => :memberships I have added Devise for authentication and CanCan for authorizations. I have users with an 'editor' role. Editors are allowed to create new CardSets. Guest users (Users who have not logged in) can only use the :index and :show actions. These authorizations are working as designed. Editors can currently use both the :random and the :new actions without any problems. Guest users, as expected, cannot. # app/controllers/card_sets_controller.rb class CardSetsController < ApplicationController before_filter :authenticate_user!, :except => [:show, :index] load_and_authorize_resource I want to allow guest users to use the :random action, but not the :new action. In other words, they can see new random sets, but not save them. The "Save" button on the :random action's view is hidden (as designed) from the guest users. The problem is, the first thing the :random action does is build a new instance of the CardSet model to fill out the view. When cancan tries to load_and_authorize_resource a new CardSet, it throws a CanCan::AccessDenied exception. Therefore, the view never loads and the guest user is served a "You need to sign in or sign up before continuing" message. # app/controllers/card_sets_controllers.rb def random @card_set = CardSet.new( :name => "New Set of 10", :set_type => "Set of 10" ) I realize that I can tell load_and_authorize_resource to skip the :random action by passing :except => :random to the call, but that just feels "wrong" for some reason. What's the "right" way to do this? Should I create the new random set without instantiating a new CardSet? Should I go ahead and add the exception?

    Read the article

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