Search Results

Search found 4004 results on 161 pages for 'flood fill'.

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

  • Load website and fill form from the command line

    - by Martin Scharrer
    Using the Linux command line (Bash shell) I like to load a specific website in my browser (normally Firefox, but other one would be ok as well as long it runs under Linux) and fill a pre-defined form with some data. Actually, this should run from a Makefile. Most of the form data is static and will be stored as variables in the Makefile, just some fields are to be filled manually before manually sending the form. I know how to load the website in question from the command line using: firefox <URL> But there seems no possibility to fill the form automatically with variables given on the command line. Is there a plugin, executable or JavaScript which allows me to do this? Any suggestions and hints are welcome. I don't mind coding some JavaScript.

    Read the article

  • emacs AucTeX:Turn off auto-fill-mode inside a particular LaTeX environment

    - by Seamus
    I like using auto-fill-mode for hard line wrapping. However, when I'm making a big tabular in a .tex file, I like using align-current to have the table look somewhat like it would when printed. The difficulty is that if I have a table that is longer than the line width, auto-fill-mode breaks it, and then align-current can't put things to rights and gets confused. Is there a way to tell emacs that when I'm between the \begin and \end tags of a particular kind of environment (in this case, tabular), don't word wrap...

    Read the article

  • Fixing fill-paragraph with comments in Emacs 23.2.1

    - by Silfheed
    I just upgraded to emacs 23.2.1 when I finally upgraded to ubuntu 10.10, but the first thing I noticed is that fill-paragraph (M-q) doesnt work nicely with comments anymore or at least do not work the way they did in emacs 23.1.? that I had before the upgrade. The main issue is that if I have a commented line such as //This is a long comment to illustrate an issue I have with emacs lorem ipsum and then do fill-paragraph (M-q) afterwards, I get //This is a long comment to illustrate an issue I have with emacs lorem ipsum whereas I should get //This is a long comment to illustrate an issue I have with //emacs lorem ipsum I've killed my .emacs file to try and narrow down where the issue is popping up, but this still pops up even in vanilla emacs.

    Read the article

  • Custom Fill Property on PathGeometry in Silverlight

    - by Otaku
    I've been looking at (and getting confused by) Dependency Properties - I'm not sure if this is what I need or if there is something else. I'm looking to something very specific with <Path.Data/> children in Silverlight, in particular <PathGeometry/>, <EllipseGeometry/>, etc. While the <Path/> element has a .Fill property, I'd like to add a .Fill property to any of it's Geometries, meaning it's a different color from it's parent. It could be a <SolidColorBrush/> or <LinearGradientBrush/> color, or a percentage of the parent color (like 20% darker than <Path.Fill/>. Is this possible? Is this a dependency property? How would <RectangleGeometry/>, for example, know that I am trying to fill it with a color? How would I get started? (adding WPF as a tag too as someone who knows WPF may be able to help)

    Read the article

  • How to fill dataset when sql is returning more than one table

    - by Shantanu Gupta
    How to fill multiple tables in a dataset. I m using a query that returns me four tables. At the frontend I am trying to fill all the four resultant table into dataset. Here is my Query. Query is not complete. But it is just a refrence for my Ques Select * from tblxyz compute sum(col1) suppose this query returns more than one table, I want to fill all the tables into my dataset I am filling result like this con.open(); adp.fill(dset); con.close(); Now when i checks this dataset. It shows me that it has four tables but only first table data is being displayed into it. rest 3 dont even have schema also. What i need to do to get desired output

    Read the article

  • Time complexity to fill hash table (homework)?

    - by Heathcliff
    This is a homework question, but I think there's something missing from it. It asks: Provide a sequence of m keys to fill a hash table implemented with linear probing, such that the time to fill it is minimum. And then Provide another sequence of m keys, but such that the time fill it is maximum. Repeat these two questions if the hash table implements quadratic probing I can only assume that the hash table has size m, both because it's the only number given and because we have been using that letter to address a hash table size before when describing the load factor. But I can't think of any sequence to do the first without knowing the hash function that hashes the sequence into the table. If it is a bad hash function, such that, for instance, it hashes every entry to the same index, then both the minimum and maximum time to fill it will take O(n) time, regardless of what the sequence looks like. And in the average case, where I assume the hash function is OK, how am I suppossed to know how long it will take for that hash function to fill the table? Aren't these questions linked to the hash function stronger than they are to the sequence that is hashed? As for the second question, I can assume that, regardless of the hash function, a sequence of size m with the same key repeated m-times will provide the maximum time, because it will cause linear probing from the second entry on. I think that will take O(n) time. Is that correct? Thanks

    Read the article

  • Fill container with template parameters

    - by phlipsy
    I want to fill the template parameters passed to a variadic template into an array with fixed length. For that purpose I wrote the following helper function templates template<typename ForwardIterator, typename T> void fill(ForwardIterator i) { } template<typename ForwardIterator, typename T, T head, T... tail> void fill(ForwardIterator i) { *i = head; fill<ForwardIterator, T, tail...>(++i); } the following class template template<typename T, T... args> struct params_to_array; template<typename T, T last> struct params_to_array<T, last> { static const std::size_t SIZE = 1; typedef std::array<T, SIZE> array_type; static const array_type params; private: void init_params() { array_type result; fill<typename array_type::iterator, T, head, tail...>(result.begin()); return result; } }; template<typename T, T head, T... tail> struct params_to_array<T, head, tail...> { static const std::size_t SIZE = params_to_array<T, tail...>::SIZE + 1; typedef std::array<T, SIZE> array_type; static const array_type params; private: void init_params() { array_type result; fill<typename array_type::iterator, T, last>(result.begin()); return result; } }; and initialized the static constants via template<typename T, T last> const typename param_to_array<T, last>::array_type param_to_array<T, last>::params = param_to_array<T, last>::init_params(); and template<typename T, T head, T... tail> const typename param_to_array<T, head, tail...>::array_type param_to_array<T, head, tail...>::params = param_to_array<T, head, tail...>::init_params(); Now the array param_to_array<int, 1, 3, 4>::params is a std::array<int, 3> and contains the values 1, 3 and 4. I think there must be a simpler way to achieve this behavior. Any suggestions? Edit: As Noah Roberts suggested in his answer I modified my program like the following: I wrote a new struct counting the elements in a parameter list: template<typename T, T... args> struct count; template<typename T, T head, T... tail> struct count<T, head, tail...> { static const std::size_t value = count<T, tail...>::value + 1; }; template<typename T, T last> stuct count<T, last> { static const std::size_t value = 1; }; and wrote the following function template<typename T, T... args> std::array<T, count<T, args...>::value> params_to_array() { std::array<T, count<T, args...>::value> result; fill<typename std::array<T, count<T, args...>::value>::iterator, T, args...>(result.begin()); return result; } Now I get with params_to_array<int, 10, 20, 30>() a std::array<int, 3> with the content 10, 20 and 30. Any further suggestions?

    Read the article

  • NSBezierPath with transparent fill

    - by nosedive25
    I've got a NSBezierPath that needs to have a semi-transparent fill. When I fill it with a solid color, I get the expected result. However, when filled with a semi-transparent color I get a path with a rounded stroke but an odd, rectangular fill. It looks like: Instead of filling the entire area, I get a filled rectangle inside the stoke with a small, unfilled boarder. I set up my path as follows: NSBezierPath *menuItem = [NSBezierPath bezierPathWithRoundedRect:menuItemRect xRadius:3 yRadius:3] [menuItem setLineWidth:4.0]; [menuItem setLineJoinStyle:NSRoundLineJoinStyle]; [[NSColor whiteColor] set]; [menuItem stroke]; [[NSColor colorWithCalibratedRed:0.000 green:0.000 blue:0.000 alpha:0.500] set]; [menuItem fill]; If anyones got any ideas, that would be great. Thanks

    Read the article

  • Fill down in Excel, but based on multiple values

    - by Jenn D.
    I have spreadsheets (not created by me) that have blank entries in one column where they should really have data. I want to take every empty cell and fill it with the nearest value above it. I'm looking for as little manual intervention as possible, because I'll have to do it repeatedly. I thought some previous version of Excel, or maybe another spreadsheet from the distant past, would do this by default -- that is, if you selected the column with foo and bar, and chose the equivalent of "fill down", you would get what's in the WANT column. What I actually get in Excel is the GET column. HAVE: WANT: GET: foo 1 foo 1 foo 1 2 foo 2 foo 2 bar 1 bar 1 foo 1 2 bar 2 foo 2 3 bar 3 foo 3 I'm worried that this might need a macro to be done properly. I used to be a whiz with Excel macros, and then suddenly they were all in VB. My fallback position will be to dump the whole thing to CSV and write a Python script, but if there's any way to do it in Excel that would be much preferable. Even if it involves a couple of different manual steps, that's fine; just not one step per group of lines. That is, a process of "copy the column, do X to it, cut and paste it back" would work, but "do X for each occurrence of foo or bar" won't. The files are too big for that. Any thoughts are appreciated!

    Read the article

  • Using a randomly generated token for flood control.

    - by James P
    Basic setup of my site is: user enters a message on the homepage, hits enter and the message is sent though a AJAX request to a file called like.php where it echo's a link that gets sent back to the user. I have made the input disable when the user presses enter, but there's nothing stopping the user from just constantly flooding like.php with POST request and filling up my database. Someone here on SO told me to use a token system but didn't mention how. I've seen this being done before and from what I know it is effective. The only problem I have is how will like.php know it's a valid token? My code is this at the moment: $token = md5(rand(0, 9999) * 1000000); and the markup: <input type="hidden" name="token" value="<?php echo $token ?>" /> Which will send the token to like.php through POST. But how will like.php know that this is a valid token? Should I instead token something that's linked to the user? Like their IP address? Or perhaps token the current minute and check that it's the same minute in like.php... Any help on this amtter would be greatly appreciated, thanks. :)

    Read the article

  • Fill 4 input with one textarea

    - by Patrice Poliquin
    I have a question for the community. My problem is that I have 4 input files with a maxlength of 60 caracters for a total of 240 caracters. Because the "backend" of the customer's system, it need to be 4 differents inputs max to be inserted and they say it is not user-friendly to fill 4 fields. My solution I want to make a textarea and when you fill it, il complete the 4 fields. [input text #1] max60 [input text #2] max60 [input text #3] max60 [input text #4] max60 [textarea max 240] What I am trying to do is to make by javascript/jQuery to fill up the four field while typing in. At the moment, here is my code. $(document).ready(function() { // My text area $("#inf_notes").bind('keydown', function () { var maxLength = 240; if ($(this).val().length <= 60) { // The first 60 caracters $('#inf_notes_1').val($(this).val()); } if ($(this).val().length > 60 && $(this).val().length <= 120) { // If more then 60, fill the second field $('#inf_notes_2').val($(this).val()); } // If 121 - 180 ... // If 181 - 240 ... if($(this).val().length == 240) { $(this).val($(this).val().substring(0, maxLength)); $('.alert_textarea').show(); // Simple alert else { $('.alert_textarea').hide(); } }); }); It actually works for the first one, but I would like to have some feedbacks to help me complete the script to fill the 3 nexts. Any guess to complete it? -- EDIT #1 I found a way that could maybe work! When the first input is completly filled, it will jump to the next field with a .focus() $(".inf_notes").bind('keydown', function () { var notes1 = $('#inf_notes_1').val(); var notes2 = $('#inf_notes_2').val(); var notes3 = $('#inf_notes_3').val(); if (notes1.length == 60) { $('#inf_notes_2').focus(); } if (notes2.length == 60) { $('#inf_notes_3').focus(); } if (notes3.length == 60) { $('#inf_notes_4').focus(); } });

    Read the article

  • Opera user script to fill out some form fields

    - by STATUS_ACCESS_DENIED
    I'm looking for a user script that lets me fill out some form fields that are not covered by the Magic Wand in Opera. Alternately I could accept a solution that lets Opera accept other form fields with the Wand. To give you one example: when logging into any of the StackExchange sites, I need to manually enter (or enter from a note) the URL of the OpenID provider. I would like to automate this in particular plus several other sites where a similar situation exists.

    Read the article

  • How do I get Outlook to auto fill information

    - by Mykroft
    I repeatedly have to send emails that are nearly identical except they have a different case number. I'd like to setup outlook to just ask me for the case number, fill it in the appropriate place in the body and subject of the email and then send it to a preset list of recipients (it's a static list of people). I think some combination of Forms and Templates should be able to do this but I'm unsure how.

    Read the article

  • Soft Paint Bucket Fill: Colour Equality

    - by Bart van Heukelom
    I'm making a small app where children can fill preset illustrations with colours. I've succesfully implemented an MS-paint style paint bucket using the flood fill argorithm. However, near the edges of image elements pixels are left unfilled, because the lines are anti-aliased. This is because the current condition on whether to fill is colourAtCurrentPixel == colourToReplace (the colours are RGB uints) I'd like to add a smoothing/treshold option like in Photoshop and other sophisticated tools, but what's the algorithm to determine the equality/distance between two colours? if (match(pixel(x,y), colourToReplace) setpixel(x,y,colourToReplaceWith) How to fill in match()? Here's my current full code: var b:BitmapData = settings.background; b.lock(); var from:uint = b.getPixel(x,y); var q:Array = []; var xx:int; var yy:int; var w:int = b.width; var h:int = b.height; q.push(y*w + x); while (q.length != 0) { var xy:int = q.shift(); xx = xy % w; yy = (xy - xx) / w; if (b.getPixel(xx,yy) == from) { b.setPixel(xx,yy,to); if (xx != 0) q.push(xy-1); if (xx != w-1) q.push(xy+1); if (yy != 0) q.push(xy-w); if (yy != h-1) q.push(xy+w); } } b.unlock(null);

    Read the article

  • Change Rectangle Fill Based on ColumnWidth of a grid

    - by Coesy
    Essentially i want to do as the title says, if the columnwidth is .50 then the rectangle should be red, if it's .75 then it should be amber, and if it's 1 then it should be green. I thought I could achieve this with DataTriggers but for some reason I am getting "Object Reference Not Set To An Instance Of An Object" error, here is my code, am I missing something here? FYI the width property will be changed in the backend through a timer_tick event. <Grid x:Name="Grid1" Width="300" Height="30"> <Grid.ColumnDefinitions> <ColumnDefinition x:Name="MyColumn1" Width=".50*"></ColumnDefinition> <ColumnDefinition x:Name="MyColumn2" Width=".50*"></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.Triggers> <DataTrigger Binding="{Binding ElementName=MyColumn1,Path=Width}" Value=".50*"> <Setter TargetName="rect" Property="Fill" Value="Red"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ElementName=MyColumn1,Path=Width}" Value=".75*"> <Setter TargetName="rect" Property="Fill" Value="Yellow"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ElementName=MyColumn1,Path=Width}" Value="1"> <Setter TargetName="rect" Property="Fill" Value="Green"></Setter> </DataTrigger> </Grid.Triggers> <Rectangle x:Name="rect" Grid.Column="0" HorizontalAlignment="Stretch"></Rectangle> <Rectangle Grid.Column="1" Fill="Blue"></Rectangle> </Grid>

    Read the article

  • In SVG is there a way to grab a shape anywhere when it has fill = "none"

    - by Shaunwithanau
    I have a series of shapes that I want the user to be able click anywhere on the shape to pick up as part of a drag and drop feature. All of these shapes are bounded by a rectangle. For example: <g id="shape1" fill="none" stroke="black"> <rect x="0" y="0" width="100" height="100"/> <circle cx="50" cy="50" r="50"/> </g> <g id="shape2" fill="none" stroke="black"> <rect x="0" y="0" width="100" height="100"/> <line x1="0" y1="0" x2="50" y2="100"/> <line x1="100" y1="0" x2="50" y2="100"/> </g> I already have all of the drag and drop parts working, the problem is all of these shapes have to have fill="none" so you can see anything that may be underneath of them. This means that even though they are bounded by the rectangle, at the moment users have to physically click on one of the lines in order to pick it up instead of being able to click anywhere on the shape like I want. My original idea was to use fill="white" and then set opacity="0" or some really low value but this applies to the stroke as well so this didn't work out. Any ideas on how I can get this working?

    Read the article

  • C# SQL Data Adapter Fill on existing typed Dataset

    - by René
    I have an option to choose between local based data storing (xml file) or SQL Server based. I already created a long time ago a typed dataset for my application to save data local in the xml file. Now, I have a bool that changes between Server based version and local version. If true my application get the data from the SQL Server. I'm not sure but It seems that Sql Adapter's Fill Method can't fill the Data in my existing schema SqlCommand cmd = new SqlCommand("Select * FROM dbo.Categories WHERE CatUserId = 1", _connection); cmd.CommandType = CommandType.Text; _sqlAdapter = new SqlDataAdapter(cmd); _sqlAdapter.TableMappings.Add("Categories", "dbo.Categories"); _sqlAdapter.Fill(Program.Dataset); This should fill my data from dbo.Categories to Categories (in my local, typed dataset). but it doesn't. It creates a new table with the name "Table". It looks like it can't handle the existing schema. I can't figure it out. Where is the problem? btw. of course the database request I do isn't very useful that way. It's just a simplified version for testing...

    Read the article

  • Fill lower matrix with vector by row, not column

    - by mhermans
    I am trying to read in a variance-covariance matrix written out by LISREL in the following format in a plain text, whitespace separated file: 0.23675E+01 0.86752E+00 0.28675E+01 -0.36190E+00 -0.36190E+00 0.25381E+01 -0.32571E+00 -0.32571E+00 0.84425E+00 0.25598E+01 -0.37680E+00 -0.37680E+00 0.53136E+00 0.47822E+00 0.21120E+01 -0.37680E+00 -0.37680E+00 0.53136E+00 0.47822E+00 0.91200E+00 0.21120E+01 This is actually a lower diagonal matrix (including diagonal): 0.23675E+01 0.86752E+00 0.28675E+01 -0.36190E+00 -0.36190E+00 0.25381E+01 -0.32571E+00 -0.32571E+00 0.84425E+00 0.25598E+01 -0.37680E+00 -0.37680E+00 0.53136E+00 0.47822E+00 0.21120E+01 -0.37680E+00 -0.37680E+00 0.53136E+00 0.47822E+00 0.91200E+00 0.21120E+01 I can read in the values correctly with scan() or read.table(fill=T). I am however not able to correctly store the read-in vector in a matrix. The following code S <- diag(6) S[lower.tri(S,diag=T)] <- d fills the lower matrix by column, while it should fill it by row. Using matrix() does allow for the option byrow=TRUE, but this will fill in the whole matrix, not just the lower half (with diagonal). Is it possible to have both: only fill the lower matrix (with diagonal) and do it by row? (separate issue I'm having: LISREL uses 'D+01' while R only recognises 'E+01' for scientific notation. Can you change this in R to accept also 'D'?)

    Read the article

  • Webbrowser control: auto fill textfields

    - by Khou
    I would like my custom browser to auto fill in a form when it is completely loaded Ok so inside private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { } Ive inserted the following statements webBrowser1.Document.GetElementById("FirstName").SetAttribute("value", "John"); webBrowser1.Document.GetElementById("LastName").SetAttribute("value", "Smith"); // etc..etc.. I noticed that "webBrowser1_DocumentCompleted" only is loaded one time?? How do i make my browser auto fill in a form when the document has finish loading, and auto fill the values to the define values if they have been changed by the end user.

    Read the article

  • How can I "remind" users to fill in cells on a worksheet

    - by Allan
    Hello: I have a set of cells on a worksheet called "Docs". The cell range is (B13:C23). When users get taken to this page, they are meant to fill out each of these cells with a value from 0 through 6. My Question: Is there some code that I can attach to this sheet where, if a user does not fill in a cell with anything (ie. leaves it blank) and tries to leave the sheet or close the workbook, they are somehow reminded to fill it in? Or is there a way to not let them leave the sheet until it's completed? Thanks.. Allan

    Read the article

  • Java2D: Fill a convex rounded polygon (QuadCurves)

    - by Martijn Courteaux
    Hi, If I have a QuadCurve like this (+ = node): + + \ ./ +--?? And I fill it in Java 2D the result is something like this: (x = colored) +xxxxxxxxx+ \xxxxxx./ +--?? But I want to color the other side: + + x\ ./x xxx +--??xx xxxxxxxxxxx This succeeds by drawing a rectangle around the curve in the color I want to color the other side and then fill the curve with the background color. But this isn't good enough to fill a convex rounded (based on QuadCurves) polygon. In case of some coordinates for the rectangles (as explained in the trick I used) overlap other pieces of the polygon. Here are two images (the green area is my polygon): So, the question is simple: "How can I color a shape build of curves?" But to the answer will not be simple I think... Any advice would be VERY VERY appreciated. Thanks in advance. Maybe I'm going to make a bounty for this question if I don't get an answer

    Read the article

  • Photoshop / Illustrator Fill text box with large string.

    - by Xetius
    I have a massive string (lots of Fibonacci numbers concatenated together). I don't know how much of this text I need to fill an A4 page. What I was hoping for was to paste a large block into a text box and have it display as much as possible, wrapping the text at the end of a line, but it is not doing that. It is just displaying a blank box (With the text overflowing into an awaiting textbox or something. I have tried pasting smaller amounts of text into the text box, and it appears that it will get about half way and then go into 'blank' mode. All I need is a simple way of creating a background of numbers which I don't have to type in. Any ideas?

    Read the article

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