Search Results

Search found 4216 results on 169 pages for 'dr dot'.

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

  • How do I tar dot files but not dot directories

    - by bjackfly
    The following tar command will exclude all dot files and dot directories. tar -cvzf /media/bjackfly/bkup/bkup.gz --exclude '.*' --one-file-system /home/bjackfly In my case I want the dot files to be backed up in the home directory (.vimrc, .bashrc) etc. but not the dot directories /.config /.cache /.eclipse etc. Any Linux gurus with a command for this, or do I need to run a find into a tar or do two different tar commands which is non-ideal? One for dot files in the home directory and one for everything else?

    Read the article

  • What is wrong with my Dot Product?

    - by Clay Ellis Murray
    I am trying to make a pong game but I wanted to use dot products to do the collisions with the paddles, however whenever I make a dot product objects it never changes much from .9 this is my code to make vectors vector = { make:function(object){ return [object.x + object.width/2,object.y + object.height/2] }, normalize:function(v){ var length = Math.sqrt(v[0] * v[0] + v[1] * v[1]) v[0] = v[0]/length v[1] = v[1]/length return v }, dot:function(v1,v2){ return v1[0] * v2[0] + v1[1] * v2[1] } } and this is where I am calculating the dot in my code vector1 = vector.normalize(vector.make(ball)) vector2 = vector.normalize(vector.make(object)) dot = vector.dot(vector1,vector2) Here is a JsFiddle of my code currently the paddles don't move. Any help would be greatly appreciated

    Read the article

  • What is wrong with my Dot Product? [Javascript]

    - by Clay Ellis Murray
    I am trying to make a pong game but I wanted to use dot products to do the collisions with the paddles, however whenever I make a dot product objects it never changes much from .9 this is my code to make vectors vector = { make:function(object){ return [object.x + object.width/2,object.y + object.height/2] }, normalize:function(v){ var length = Math.sqrt(v[0] * v[0] + v[1] * v[1]) v[0] = v[0]/length v[1] = v[1]/length return v }, dot:function(v1,v2){ return v1[0] * v2[0] + v1[1] * v2[1] } } and this is where I am calculating the dot in my code vector1 = vector.normalize(vector.make(ball)) vector2 = vector.normalize(vector.make(object)) dot = vector.dot(vector1,vector2) Here is a JsFiddle of my code currently the paddles don't move. Any help would be greatly appreciated

    Read the article

  • Dr. Robert Ballard: Special Guest at Java Strategy Keynote Sunday

    - by Tori Wieldt
    Dr. Robert Ballard, famed explorer who found the Titanic at its final resting place, will be at the Java Strategy Keynote on Sunday. Among the most accomplished and well known of the world's deep-sea explorers, Dr. Ballard is best known for his historic discoveries of hydrothermal vents, the sunken R.M.S. Titanic, the German battleship Bismarck, and numerous other contemporary and ancient shipwrecks around the world. During his long career he has conducted more than 120 deep-sea expeditions using the latest in exploration technology, and he is a pioneer in the early use of deep-diving submarines. You can learn more about Dr. Ballard and undersea exploration at National Geographic and TED. The first 1,000 people to arrive at the JavaOne Keynote hall on Sunday will receive a copy of Dr. Ballard's TV show "The Alien Deep" on Blu-Ray. The Alien Deep explores the sea, thousands of feet beneath the surface, far from the first crack of light, where the planet’s last and greatest secrets hide in the cold darkness of endless night. Viewers get to see underwater worlds via submersible where no one has gone before. The JavaOne Strategy Keynote is on Sunday at 4:00pm PT at Masonic Auditorium, 1111 California Street. See you there!

    Read the article

  • "ToS;DR" note les conditions d'utilisations des services Web et les rend intelligibles, Twitpic bonnet d'âne

    ToS;DR : le projet qui rend intelligibles les conditions d'utilisations des services Web Twitpic obtient le bonnet d'âne Habituellement, lors d'une inscription à un site, l'utilisateur est confronté à la validation de conditions d'utilisation obligatoires pour bénéficier du service. Mais qui les lit vraiment ? Écrites dans un langage purement juridique, ces conditions sont peu compréhensibles. Un nouveau projet, baptisé ToS;DR, vise à vous conseiller de manière plus claire sur la manière dont les sites traitent vos droits ? a priori inaliénables - avant de cliquer sur le bouton 'accepter'. ToS;DR est une abréviation de 'Term of Servi...

    Read the article

  • graphviz dot: how to insert arrows from a node to center of an arrow

    - by gregor
    Hi everyone, I try to create diagrams for MPLUS analyses with dot from the graphviz package. Does anybody have experience with using dot to visualize structural equation models/latent class mixture models? There is especially one feature that I can't figure out how to do beautifully: I need arrows from nodes to the center of another arrow like C | | V A ------------> B I tried to insert an invisible node at the intersection of the arrows. This, however, results in a "cracked" A---B arrow because dot does represent it as two independent arrows. Is this even possible with dot? Thanks for suggestions and help! Gregor

    Read the article

  • ASUS unveils the DR-900 E-Reader

    ASUS UK let a few photos out on Flickr recently, showing the new DR-900 E-Reader. The leading tech blogs picked up on the story, but ASUS didn?t give much away about the DR-900?s specification ? but ... [Author: James Kidder - Computers and Internet - April 04, 2010]

    Read the article

  • HTML to 'pretty' text conversion for printing on text only printer (dot matrix)

    - by Gala101
    Hi, I have a web-site that generates some simple tabular data as html tables, many of my users print the web-page on a laser/inkjet printer; however some like to print on legacy Dot Matrix printers (text only) and there-in lies the problem. When giving Print from web-browser onto dot-matrix printer, the printer actually perceives data as 'graphic'/image and proceeds to print it dot-by-dot. i.e If printing a character 'C', printer slices it horizontally and prints in 3-4 passes. Same printer prints a text from an ASCII file (say from notepad) as complete characters in single pass, thereby being 5 times faster and much quieter than when printing a web-page. (Even tried 'generic text-only driver' but Mozilla Firefox has a know bug that it does not print anything over this particular driver since 2.0+) So is there some clean way of formatting an already generated HTML (say method takes the entire html table as string) and generates a corresponding text file with properly aligned columns? I have tried stripping the html tags, but the major issue there is performing good 'wrapping' of a cell's data and maintaining integrity of other cells' data (from same row). eg: ( '|' and '_' not really required) Col1 | Col2 | Colum_Name3 | Col4 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1 | this cell | this column | smaller | | is in three| spans 2 rows | | | rows | | | - - - - - - - - - - - - - - - - - - - - - - - - 2 | smaller now| this also | but this| | | | cell's | | | | data is | | | | now | | | | bigger | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Could you please suggest preferred approach? I've thought of using xslt and somehow outputting text (instead of more prevalent pdf), but Apache FOP's text renderer is really broken and perhaps forgotten in development path. Commercial one's are way too costly.

    Read the article

  • jqGrid Sort or Search does not work with columns having json dot notation

    - by rsmoorthy
    I have this jqGrid: $("#report").jqGrid( { url: '/py/db?coll=report', datatype: 'json', height: 250, colNames: ['ACN', 'Status', 'Amount'], colModel: [ {name:'acn', sortable:true}, {name:'meta.status', sortable:true}, {name:amount} ], caption: 'Show Report', rownumbers: true, gridview: true, rowNum: 10, rowList: [10,20,30], pager: '#report_pager', viewrecords: true, sortname: 'acn', sortorder: "desc", altRows: true, loadonce: true, mtype: "GET", rowTotal: 1000, jsonReader: { root: "rows", page: "page", total: "total", records: "records", repeatitems: false, id: "acn" } }); Notice that the column 'meta.status' is in JSON dot notation and accordingly the data sent from the server is like this: {"page": "1", "total": "1", "records": "5", "rows": [ {"acn":1,"meta": {"status":"Confirmed"}, "amount": 50}, {"acn":2,"meta": {"status":"Started"}, "amount": 51}, {"acn":3,"meta": {"status":"Stopped"}, "amount": 52}, {"acn":4,"meta": {"status":"Working"}, "amount": 53}, {"acn":5,"meta": {"status":"Started"}, "amount": 54} ] } The problems are of two fold: Sorting does not work on columns with dot notation, here "meta.status". It does not even show the sortable icons on the column header, and nothing happens even if the header is clicked. Sorting does not work, whether loadonce is true or false. If I try Searching (after setting loadonce to true) for the column meta.status (other columns without dot notation is okay), then it throws up a javascript error like this. Any help? Thanks Moorthy

    Read the article

  • Collision of dot and line in 2D space

    - by Anderiel
    So i'm trying to make my first game on android. The thing is i have a small moving ball and i want it to bounce from a line that i drew. For that i need to find if the x,y of the ball are also coordinates of one dot from the line. I tried to implement these equations about lines x=a1 + t*u1 y=a2 + t*u2 = (x-a1)/u1=(y-a2)/u2 (t=t which has to be if the point is on the line) where x and y are the coordinates im testing, dot[a1,a2] is a dot that is on the line and u(u1,u2) is the vector of the line. heres the code: public boolean Collided() { float u1 =Math.abs(Math.round(begin_X)-Math.round(end_X)); float u2 =Math.abs(Math.round(begin_Y)-Math.round(end_Y)); float t_x =Math.round((elect_X - begin_X)/u1); float t_y =Math.round((elect_Y - begin_Y)/u2); if(t_x==t_y) { return true; } else { return false; } } points [begin_X,end_X] and [begin_Y,end_Y] are the two points from the line and [elect_X,elect_Y] are the coordinates of the ball theoreticaly it should work, but in the reality the ball most of the time just goes straigth through the line or bounces somewhere else where it shouldnt

    Read the article

  • GUI editor for DOT language (Mac OS)

    - by Saff
    Hi, i have a problem. I need to create pure diagram for my project (Django). I use django-extensions to generate DOT diagram. Diagram is very pure, but now i want to add for example comments on this diagram. It is possible to do this? Maybe anyone can advise me some software for this?

    Read the article

  • FAQ: GridView Calculation with JavaScript

    - by Vincent Maverick Durano
    In my previous post I wrote a simple demo on how to Calculate Totals in GridView and Display it in the Footer. Basically what it does is it calculates the total amount by typing into the TextBox and display the grand total in the footer of the GridView and basically it was a server side implemenation.  Many users in the forums are asking how to do the same thing without postbacks and how to calculate both amount and total amount together. In this post I will demonstrate how to do this using JavaScript. To get started let's go ahead and set up the form. Just for the simplicity of this demo I just set up the form like this:   <asp:gridview ID="GridView1" runat="server" ShowFooter="true" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="RowNumber" HeaderText="Row Number" /> <asp:BoundField DataField="Description" HeaderText="Item Description" /> <asp:TemplateField HeaderText="Item Price"> <ItemTemplate> <asp:Label ID="LBLPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="TXTQty" runat="server"></asp:TextBox> </ItemTemplate> <FooterTemplate> <b>Total Amount:</b> </FooterTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Sub-Total"> <ItemTemplate> <asp:Label ID="LBLSubTotal" runat="server"></asp:Label> </ItemTemplate> <FooterTemplate> <asp:Label ID="LBLTotal" runat="server" ForeColor="Green"></asp:Label> </FooterTemplate> </asp:TemplateField> </Columns> </asp:gridview>   As you can see there's no fancy about the mark up above. It just a standard GridView with BoundFields and TemplateFields on it. Now just for the purpose of this demo I just use a dummy data for populating the GridView. Here's the code below:   public partial class GridCalculation : System.Web.UI.Page { private void BindDummyDataToGrid() { DataTable dt = new DataTable(); DataRow dr = null; dt.Columns.Add(new DataColumn("RowNumber", typeof(string))); dt.Columns.Add(new DataColumn("Description", typeof(string))); dt.Columns.Add(new DataColumn("Price", typeof(string))); dr = dt.NewRow(); dr["RowNumber"] = 1; dr["Description"] = "Nike"; dr["Price"] = "1000"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 2; dr["Description"] = "Converse"; dr["Price"] = "800"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 3; dr["Description"] = "Adidas"; dr["Price"] = "500"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 4; dr["Description"] = "Reebok"; dr["Price"] = "750"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 5; dr["Description"] = "Vans"; dr["Price"] = "1100"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 6; dr["Description"] = "Fila"; dr["Price"] = "200"; dt.Rows.Add(dr); //Bind the Gridview GridView1.DataSource = dt; GridView1.DataBind(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindDummyDataToGrid(); } } }   Now try to run the page. The output should look something like below: The Client-Side Calculation Here's the code for the GridView calculation:   <script type="text/javascript"> function CalculateTotals() { var gv = document.getElementById("<%= GridView1.ClientID %>"); var tb = gv.getElementsByTagName("input"); var lb = gv.getElementsByTagName("span"); var sub = 0; var total = 0; var indexQ = 1; var indexP = 0; for (var i = 0; i < tb.length; i++) { if (tb[i].type == "text") { sub = parseFloat(lb[indexP].innerHTML) * parseFloat(tb[i].value); if (isNaN(sub)) { lb[i + indexQ].innerHTML = ""; sub = 0; } else { lb[i + indexQ].innerHTML = sub; } indexQ++; indexP = indexP + 2; total += parseFloat(sub); } } lb[lb.length -1].innerHTML = total; } </script>   The code above calculates the sub-total by multiplying the price and the quantity and at the same time calculates the total amount  by adding the sub-total values. Now you can simply call the JavaScript function above like this:   <ItemTemplate> <asp:TextBox ID="TXTQty" runat="server" onkeyup="CalculateTotals();"></asp:TextBox> </ItemTemplate>   Running the code above will display something like below: That's it! I hope someone find this post useful! Technorati Tags: ASP.NET,JavaScript,GridView,TipsTricks

    Read the article

  • FAQ: GridView Calculation with JavaScript - Formatting and Validation

    - by Vincent Maverick Durano
    In my previous post here we've talked about how to calculate the sub-totals and grand total in GridView using JavaScript. In this post I'm going take more step further and will demonstrate how are we going to format the totals into a currency and how to validate the input that would only allow you to enter a whole number in the quantity TextBox. Here are the code blocks below: ASPX Source:   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script type="text/javascript"> function CalculateTotals() { var gv = document.getElementById("<%= GridView1.ClientID %>"); var tb = gv.getElementsByTagName("input"); var lb = gv.getElementsByTagName("span"); var sub = 0; var total = 0; var indexQ = 1; var indexP = 0; var price = 0; for (var i = 0; i < tb.length; i++) { if (tb[i].type == "text") { ValidateNumber(tb[i]); price = lb[indexP].innerHTML.replace("$", "").replace(",", ""); sub = parseFloat(price) * parseFloat(tb[i].value); if (isNaN(sub)) { lb[i + indexQ].innerHTML = "0.00"; sub = 0; } else { lb[i + indexQ].innerHTML = FormatToMoney(sub, "$", ",", "."); ; } indexQ++; indexP = indexP + 2; total += parseFloat(sub); } } lb[lb.length - 1].innerHTML = FormatToMoney(total, "$", ",", "."); } function ValidateNumber(o) { if (o.value.length > 0) { o.value = o.value.replace(/[^\d]+/g, ''); //Allow only whole numbers } } function isThousands(position) { if (Math.floor(position / 3) * 3 == position) return true; return false; }; function FormatToMoney(theNumber, theCurrency, theThousands, theDecimal) { var theDecimalDigits = Math.round((theNumber * 100) - (Math.floor(theNumber) * 100)); theDecimalDigits = "" + (theDecimalDigits + "0").substring(0, 2); theNumber = "" + Math.floor(theNumber); var theOutput = theCurrency; for (x = 0; x < theNumber.length; x++) { theOutput += theNumber.substring(x, x + 1); if (isThousands(theNumber.length - x - 1) && (theNumber.length - x - 1 != 0)) { theOutput += theThousands; }; }; theOutput += theDecimal + theDecimalDigits; return theOutput; } </script> </head> <body> <form id="form1" runat="server"> <asp:gridview ID="GridView1" runat="server" ShowFooter="true" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="RowNumber" HeaderText="Row Number" /> <asp:BoundField DataField="Description" HeaderText="Item Description" /> <asp:TemplateField HeaderText="Item Price"> <ItemTemplate> <asp:Label ID="LBLPrice" runat="server" Text='<%# Eval("Price","{0:C}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="TXTQty" runat="server" onkeyup="CalculateTotals();"></asp:TextBox> </ItemTemplate> <FooterTemplate> <b>Total Amount:</b> </FooterTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Sub-Total"> <ItemTemplate> <asp:Label ID="LBLSubTotal" runat="server" ForeColor="Green" Text="0.00"></asp:Label> </ItemTemplate> <FooterTemplate> <asp:Label ID="LBLTotal" runat="server" ForeColor="Green" Font-Bold="true" Text="0.00"></asp:Label> </FooterTemplate> </asp:TemplateField> </Columns> </asp:gridview> </form> </body> </html> Code Behind Source:   public partial class GridCalculation : System.Web.UI.Page { private void BindDummyDataToGrid() { DataTable dt = new DataTable(); DataRow dr = null; dt.Columns.Add(new DataColumn("RowNumber", typeof(string))); dt.Columns.Add(new DataColumn("Description", typeof(string))); dt.Columns.Add(new DataColumn("Price", typeof(decimal))); dr = dt.NewRow(); dr["RowNumber"] = 1; dr["Description"] = "Nike"; dr["Price"] = "1000"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 2; dr["Description"] = "Converse"; dr["Price"] = "800"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 3; dr["Description"] = "Adidas"; dr["Price"] = "500"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 4; dr["Description"] = "Reebok"; dr["Price"] = "750"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 5; dr["Description"] = "Vans"; dr["Price"] = "1100"; dt.Rows.Add(dr); dr = dt.NewRow(); dr["RowNumber"] = 6; dr["Description"] = "Fila"; dr["Price"] = "200"; dt.Rows.Add(dr); //Bind the Gridview GridView1.DataSource = dt; GridView1.DataBind(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindDummyDataToGrid(); } } } Running the code above will display something like this: On initial load After entering the quantity in the TextBox That's it! I hope someone find this post useful! Technorati Tags: ASP.NET,C#,ADO.NET,JavaScript,GridView

    Read the article

  • Highlight Row in GridView with Colored Columns

    - by Vincent Maverick Durano
    I wrote a blog post a while back before here that demonstrate how to highlight a GridView row on mouseover and as you can see its very easy to highlight rows in GridView. One of my colleague uses the same technique for implemeting gridview row highlighting but the problem is that if a Column has background color on it that cell will not be highlighted anymore. To make it more clear then let's build up a sample application. ASPX:   1: <asp:GridView runat="server" id="GridView1" onrowcreated="GridView1_RowCreated" 2: onrowdatabound="GridView1_RowDataBound"> 3: </asp:GridView>   CODE BEHIND:   1: private DataTable FillData() { 2:   3: DataTable dt = new DataTable(); 4: DataRow dr = null; 5:   6: //Create DataTable columns 7: dt.Columns.Add(new DataColumn("RowNumber", typeof(string))); 8: dt.Columns.Add(new DataColumn("Col1", typeof(string))); 9: dt.Columns.Add(new DataColumn("Col2", typeof(string))); 10: dt.Columns.Add(new DataColumn("Col3", typeof(string))); 11:   12: //Create Row for each columns 13: dr = dt.NewRow(); 14: dr["RowNumber"] = 1; 15: dr["Col1"] = "A"; 16: dr["Col2"] = "B"; 17: dr["Col3"] = "C"; 18: dt.Rows.Add(dr); 19:   20: dr = dt.NewRow(); 21: dr["RowNumber"] = 2; 22: dr["Col1"] = "AA"; 23: dr["Col2"] = "BB"; 24: dr["Col3"] = "CC"; 25: dt.Rows.Add(dr); 26:   27: dr = dt.NewRow(); 28: dr["RowNumber"] = 3; 29: dr["Col1"] = "A"; 30: dr["Col2"] = "B"; 31: dr["Col3"] = "CC"; 32: dt.Rows.Add(dr); 33:   34: dr = dt.NewRow(); 35: dr["RowNumber"] = 4; 36: dr["Col1"] = "A"; 37: dr["Col2"] = "B"; 38: dr["Col3"] = "CC"; 39: dt.Rows.Add(dr); 40:   41: dr = dt.NewRow(); 42: dr["RowNumber"] = 5; 43: dr["Col1"] = "A"; 44: dr["Col2"] = "B"; 45: dr["Col3"] = "CC"; 46: dt.Rows.Add(dr); 47:   48: return dt; 49: } 50:   51: protected void Page_Load(object sender, EventArgs e) { 52: if (!IsPostBack) { 53: GridView1.DataSource = FillData(); 54: GridView1.DataBind(); 55: } 56: }   As you can see there's nothing fancy in the code above. It just contain a method that fills a DataTable with a dummy data on it. Now here's the code for row highlighting:   1: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { 2: //Set Background Color for Columns 1 and 3 3: e.Row.Cells[1].BackColor = System.Drawing.Color.Beige; 4: e.Row.Cells[3].BackColor = System.Drawing.Color.Red; 5:   6: //Attach onmouseover and onmouseout for row highlighting 7: e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='Blue'"); 8: e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=''"); 9: }   Running the code above will show something like this in the browser: On initial load: On mouseover of GridView row:   Noticed that Col1 and Col3 are not highlighted. Why? the reason is that Col1 and Col3 cells has background color set on it and we only highlight the rows (TR) and not the columns (TD) that's why on mouseover only the rows will be highlighted. To fix the issue we will create a javascript method that would remove the background color of the columns when highlighting a row and on mouseout set back the original color that is set on Col1 and Col3. Here are the codes below: JavaScript   1: <script type="text/javascript"> 2: function HighLightRow(rowIndex, colIndex,colIndex2, flag) { 3: var gv = document.getElementById("<%= GridView1.ClientID %>"); 4: var selRow = gv.rows[rowIndex]; 5: if (rowIndex > 0) { 6: if (flag == "sel") { 7: gv.rows[rowIndex].style.backgroundColor = 'Blue'; 8: gv.rows[rowIndex].style.color = "White"; 9: gv.rows[rowIndex].cells[colIndex].style.backgroundColor = ''; 10: gv.rows[rowIndex].cells[colIndex2].style.backgroundColor = ''; 11: } 12: else { 13: gv.rows[rowIndex].style.backgroundColor = ''; 14: gv.rows[rowIndex].style.color = "Black"; 15: gv.rows[rowIndex].cells[colIndex].style.backgroundColor = 'Beige'; 16: gv.rows[rowIndex].cells[colIndex2].style.backgroundColor = 'Red'; 17: } 18: } 19: } 20: </script>   The HighLightRow method is a javascript function that accepts four (4) parameters which are the rowIndex,colIndex,colIndex2 and the flag. The rowIndex is the current row index of the selected row in GridView. The colIndex is the index of Col1 and colIndex2 is the index of col3. We are passing these index because these columns has background color on it and we need to toggle its backgroundcolor when highlighting the row in GridView. Finally the flag is something that would determine if its selected or not. Now here's the code for calling the JavaScript function above.     1: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { 2:   3: //Set Background Color for Columns 1 and 3 4: e.Row.Cells[1].BackColor = System.Drawing.Color.Beige; 5: e.Row.Cells[3].BackColor = System.Drawing.Color.Red; 6:   7: //Attach onmouseover and onmouseout for row highlighting 8: //and call the HighLightRow method with the required parameters 9: int index = e.Row.RowIndex + 1; 10: e.Row.Attributes.Add("onmouseover", "HighLightRow(" + index + "," + 1 + "," + 3 + ",'sel')"); 11: e.Row.Attributes.Add("onmouseout", "HighLightRow(" + index + "," + 1 + "," + 3 + ",'dsel')"); 12: 13: }   Running the code above will display something like this: On initial load:   On mouseover of GridView row:   That's it! I hope someone find this post useful!

    Read the article

  • Using dot To Access Object Attribute and Proper abstraction

    - by cobie
    I have been programming in python and java for quite a number of years and one thing i find myself doing is using the setters and getters from java in python but a number of blogs seem to think using the dot notation for access is the pythonic way. What I would like to know is if using dot to access methods does not violate abstraction principle. If for example I implement an attribute as a single object and use dot notation to access, if I wanted to change the code later so that the attribute is represented by a list of objects, that would require quite some heavy lifting which violates abstraction principle.

    Read the article

  • Graphviz DOT arrange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • Graphviz DOT arrange Nodes in circles, layout too "compact"

    - by Ivo Wetzel
    I'm halfway there please see the edit OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/ EDIT: Thanks to Andrews comment I've got the right layout, the only problem now is that it's a bit to "compact"... so the question now is, how to fix this?

    Read the article

  • Graphviz DOT arange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • subgraph cluster ranking in dot

    - by Chris Becke
    I'm trying to use graphviz on media wiki as a documentation tool for software. First, I documented some class relationships which worked well. Everything was ranked vertically as expected. But, then, some of our modules are dlls, which I wanted to seperate into a box. When I added the nodes to a cluster, they got edged, but clusters seem to have a LR ranking rule. Or being added to a cluster broke the TB ranking of the nodes as the cluster now appears on the side of the graph. This graph represents what I am trying to do: at the moment, cluster1 and cluster2 appear to the right of cluster0. I want/need them to appear below. <graphviz> digraph d { subgraph cluster0 { A -> {B1 B2} B2 -> {C1 C2 C3} C1 -> D; } subgraph cluster1 { C2 -> dll1_A; dll1_A -> B1; } subgraph cluster2 { C3 -> dll2_A; } dll1_A -> dll2_A; } </graphviz>

    Read the article

  • Easiest Way To Get Started In Dot Net

    - by Avery Payne
    Ok, so the initial search in StackOverflow shows nothing related for this question. So here it goes: Let's pretend for a moment that you're just getting started in a career in computer programming. Let's say that, for whatever reason, you decide to use the .Net framework as a basis for your programming. Let's also say that you've been exposed to some programming background, but not one in .Net, so it seems foreign to you at first. And lastly, you don't have the benefit of 25 years of exposure to the Win32 API, which explains why it seems so foreign to you when you start looking at it. So the questions are: What is a comprehensive overview of what .Net is? It appears to be a combination of a runtime environment, a set of languages, a common set of libraries, and perhaps a few other things...so it's about as clear as mud. Specifically, what are the key components to .Net? What is the easiest way to understand .Net programming with regard to available APIs? Which language would best suit beginning programming out of the "stock" languages that Microsoft has to offer? (C++, C#, VB, etc.) What are some differences between .Net programming and programming in a procedural language (aka Pascal, Modula, etc.) What are some differences between .Net programming and programming in a "traditional" object-oriented language? (aka Smalltalk, Java, Python, Ruby, etc.) As I currently understand it, the CLR provides a foundation for all of the other languages to run on. What are some of the inherent limitations of the CLR? Given the enormous amount of API to cover, would it even be worth learning a .Net language (using the Microsoft APIs) given that you would not have prior exposure to Win32 programming? Let's say you write a for-profit program with .Net. Can you resell the program without running afoul of licensing issues? Let's say you write a gratis (free) program with .Net. Can you offer the program to the public under a "free" license (GPL, BSD, Artistic, etc.) without running afoul of licensing issues? Thank you in advance for your patience.

    Read the article

  • Joomla Sites hacked by DR-MTMRD [closed]

    - by RedLEON
    Possible Duplicate: My Sites Were Hacked. What To Do? A few of my joomla sites were hacked. After I became aware of this, I did these things: Changed hosting passwords (mysql, ftp, control panel) Renamed joomla admin user name to "admin" in users table (Hacker had changed the user name how?) Upgraded joomla latest Added php.ini root directory of host. Disabled cgi access But the site is still hacked. I checked up on the index.php file and owerwrite original index.php but the site is still hacked. How is this possible?

    Read the article

  • How to draw a better looking Graph (A4 size) in Dot?

    - by Nazgulled
    Hi, I have this project that it's due in a few hours and I still have a report to write... The project has nothing to do with Dot, but we were asked to draw a Graph with Dot, which I did. It looks something like this: http://img683.imageshack.us/img683/9735/dotj.jpg The longer arrows represent smaller weights and the shorter arrows represent bigger weights. There isn't any problem in submitting my project like this, it does what's is supposed to do and this Dot thing is just an extra. But I would like to make it pretty, I just don't have time to learn about Dot right now. Basically, all I want is make pretty. Perhaps, a bigger height for the page, like A4 paper size. And have the graph display more to the bottom than everything to the side. What should I put on my .dot file to make it look better?

    Read the article

  • Red Dot Scope Makes Sighting In Long Lenses a Snap

    - by Jason Fitzpatrick
    If you’ve ever used a high power lens, you know how tricky it can be to sight a distant subject as the field of view through the lens is so tiny. This hack takes care of that problem by using a zero-magnification red dot rifle scope. Chris Malcolm enjoys photographing birds and other wildlife with high power lenses. The problem, when shooting with huge 500mm lens and other high power lenses, is that they’re practically telescopes and acquiring a fast moving target like a bird using a through-the-lens technique is very tricky. Malcolm’s solution hinges on mounting a zero-magnification red dot rifle scope in parallel with the lens. His mock up is a bit unpolished (although we can understand not wanting to run out and buy a brand new black scope just for the experiment) but works great to get him on target. Hit up the link below to read more about his build, how be created the rail mount for the scope, and why he opted to mount it to the barrel of the lens and not the hot shoe mount on the camera. 500mm Reflex Lens with Red Dot Sight [via DIY Photography] Make Your Own Windows 8 Start Button with Zero Memory Usage Reader Request: How To Repair Blurry Photos HTG Explains: What Can You Find in an Email Header?

    Read the article

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