Search Results

Search found 15316 results on 613 pages for 'coding style'.

Page 57/613 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • Lightbox-style dialog shows below YouTube movie on Mac OS 10.6

    - by Mark
    This is a "but it works on my machine" one and could be tricky: I have a lightbox-style HTML dialog that shows a menu on top of a web page. It can be injected into any web page via a JavaScript bookmarklet. One of my users is trying to use it on YouTube.com with the result that the flash movie is rendered on top of the dialog (a div with high z-index). I can't reproduce this. It works just fine for me. The dialog shows up on top of everything else on youtube.com, the video included. I had him save the page in Safari as Webarchive and send it to me. Even that shows the menu rendered correctly for me. I use the exact same version of Safari (4.0.5/531.22.7) and Flash (10.1 r53, latest beta). Only difference I could find is that he uses Snow Leopard (10.6.6) and I "only" 10.5.8. Has anybody noticed similar problems? I'm afraid that the usual wmode recommendation won't solve this (I tried & it works on my machine anyway)... Thanks! Mark

    Read the article

  • Changing style sheets depending on useragent

    - by John Vasiliou
    <script language="Javascript"> var deviceIphone = "iPhone"; var deviceIpod = "iPod"; //Initialize our user agent string to lower case. var uagent = navigator.userAgent.toLowerCase(); //************************** // Detects if the current device is an iPhone. function DetectiPhone() { if (uagent.search(deviceIphone) > -1) {document.write('<link rel="stylesheet" type="text/css" href="ui/mobile/css/site.css">'); } etc... Above is the start of my code. I am trying to change the CSS file depending on what platform the user is using. I currently use media="screen ... " but it doesn't work with the amount of platforms I'm trying to use. I need something a lot more detailed/complex that is why I'm turning to useragents. Any ideas why the css file doesn't change on my iPhone using the above code? Better yet, any ideas on another way to change style sheets depending on the users platform/screen resolution?

    Read the article

  • How to pass XML to DB using XMLTYPE

    - by James Taylor
    Probably not a common use case but I have seen it pop up from time to time. The question how do I pass XML from a queue or web service and insert it into a DB table using XMLTYPE.In this example I create a basic table with the field PAYLOAD of type XMLTYPE. I then take the full XML payload of the web service and insert it into that database for auditing purposes.I use SOA Suite 11.1.1.2 using composite and mediator to link the web service with the DB adapter.1. Insert Database Objects Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} --Create XML_EXAMPLE_TBL Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} CREATE TABLE XML_EXAMPLE_TBL (PAYLOAD XMLTYPE); Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} --Create procedure LOAD_TEST_XML Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} CREATE or REPLACE PROCEDURE load_test_xml (xmlFile in CLOB) IS   BEGIN     INSERT INTO xml_example_tbl (payload) VALUES (XMLTYPE(xmlFile));   --Handle the exceptions EXCEPTION   WHEN OTHERS THEN     raise_application_error(-20101, 'Exception occurred in loadPurchaseOrder procedure :'||SQLERRM || ' **** ' || xmlFile ); END load_test_xml; / 2. Creating New SOA Project TestXMLTYPE in JDeveloperIn JDeveloper either create a new Application or open an existing Application you want to put this work.Under File -> New -> SOA Tier -> SOA Project   Provide a name for the Project, e.g. TestXMLType Choose Empty Composite When selected Empty Composite click Finish.3. Create Database Connection to Stored ProcedureA Blank composite will be displayed. From the Component Palette drag a Database Adapter to the  External References panel. and configure the Database Adapter Wizard to connect to the DB procedure created above.Provide a service name InsertXML Select a Database connection where you installed the table and procedure above. If it doesn't exist create a new one. Select Call a Stored Procedure or Function then click NextChoose the schema you installed your Procedure in step 1 and query for the LOAD_TEST_XML procedure.Click Next for the remaining screens until you get to the end, then click Finish to complete the database adapter wizard.4. Create the Web Service InterfaceDownload this sample schema that will be used as the input for the web service. It does not matter what schema you use this solution will work with any. Feel free to use your own if required. singleString.xsd Drag from the component palette the Web Service to the Exposed Services panel on the component.Provide a name InvokeXMLLoad for the service, and click the cog icon.Click the magnify glass for the URL to browse to the location where you downloaded the xml schema above.  Import the schema file by selecting the import schema iconBrowse to the location to where you downloaded the singleString.xsd above.Click OK for the Import Schema File, then select the singleString node of the imported schema.Accept all the defaults until you get back to the Web Service wizard screen. The click OK. This step has created a WSDL based on the schema we downloaded earlier.Your composite should now look something like this now.5. Create the Mediator Routing Rules Drag a Mediator component into the middle of the Composite called ComponentsGive the name of Route, and accept the defaultsLink the services up to the Mediator by connecting the reference points so your Composite looks like this.6. Perform Translations between Web Service and the Database Adapter.From the Composite double click the Route Mediator to show the Map Plan. Select the transformation icon to create the XSLT translation file.Choose Create New Mapper File and accept the defaults.From the Component Palette drag the get-content-as-string component into the middle of the translation file.Your translation file should look something like thisNow we need to map the root element of the source 'singleString' to the XMLTYPE of the database adapter, applying the function get-content-as-string.To do this drag the element singleString to the left side of the function get-content-as-string and drag the right side of the get-content-as-string to the XMLFILE element of the database adapter so the mapping looks like this. You have now completed the SOA Component you can now save your work, deploy and test.When you deploy I have assumed that you have the correct database configurations in the WebLogic Console based on the connection you setup connecting to the Stored Procedure. 7. Testing the ApplicationOpen Enterprise Manager and navigate to the TestXMLTYPE Composite and click the Test button. Load some dummy variables in the Input Arguments and click the 'Test Web Service' buttonOnce completed you can run a SQL statement to check the install. In this instance I have just used JDeveloper and opened a SQL WorksheetSQL Statement Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} select * from xml_example_tbl; Result, you should see the full payload in the result.

    Read the article

  • EPPlus - .xlsx is locked for editing by 'another user'

    - by AdamTheITMan
    I have searched through every possible answer on SO for a solution, but nothing has worked. I am basically creating an excel file from a database and sending the results to the response stream using EPPlus(OpenXML). The following code gives me an error when trying to open my generated excel sheet "[report].xlsx is locked for editing by 'another user'." It will open fine the first time, but the second time it's locked. Dim columnData As New List(Of Integer) Dim rowHeaders As New List(Of String) Dim letter As String = "B" Dim x As Integer = 0 Dim trendBy = context.Session("TRENDBY").ToString() Dim dateHeaders As New List(Of String) dateHeaders = DirectCast(context.Session("DATEHEADERS"), List(Of String)) Dim DS As New DataSet DS = DirectCast(context.Session("DS"), DataSet) Using excelPackage As New OfficeOpenXml.ExcelPackage Dim excelWorksheet = excelPackage.Workbook.Worksheets.Add("Report") 'Add title to the top With excelWorksheet.Cells("B1") .Value = "Account Totals by " + If(trendBy = "Months", "Month", "Week") .Style.Font.Bold = True End With 'add date headers x = 2 'start with letter B (aka 2) For Each Header As String In dateHeaders With excelWorksheet.Cells(letter + "2") .Value = Header .Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Right .AutoFitColumns() End With x = x + 1 letter = Helper.GetColumnIndexToColumnLetter(x) Next 'Adds the descriptive row headings down the left side of excel sheet x = 0 For Each DC As DataColumn In DS.Tables(0).Columns If (x < DS.Tables(0).Columns.Count) Then rowHeaders.Add(DC.ColumnName) End If Next Dim range = excelWorksheet.Cells("A3:A30") range.LoadFromCollection(rowHeaders) 'Add the meat and potatoes of report x = 2 For Each dTable As DataTable In DS.Tables columnData.Clear() For Each DR As DataRow In dTable.Rows For Each item As Object In DR.ItemArray columnData.Add(item) Next Next letter = Helper.GetColumnIndexToColumnLetter(x) excelWorksheet.Cells(letter + "3").LoadFromCollection(columnData) With excelWorksheet.Cells(letter + "3") .Formula = "=SUM(" + letter + "4:" + letter + "6)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "7") .Formula = "=SUM(" + letter + "8:" + letter + "11)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "12") .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "13") .Formula = "=SUM(" + letter + "14:" + letter + "20)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "21") .Formula = "=SUM(" + letter + "22:" + letter + "23)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "24") .Formula = "=SUM(" + letter + "25:" + letter + "26)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "27") .Formula = "=SUM(" + letter + "28:" + letter + "29)" .Style.Font.Bold = True .Style.Font.Size = 12 End With With excelWorksheet.Cells(letter + "30") .Formula = "=SUM(" + letter + "3," + letter + "7," + letter + "12," + letter + "13," + letter + "21," + letter + "24," + letter + "27)" .Style.Font.Bold = True .Style.Font.Size = 12 End With x = x + 1 Next range.AutoFitColumns() 'send it to response Using stream As New MemoryStream(excelPackage.GetAsByteArray()) context.Response.Clear() context.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" context.Response.AddHeader("content-disposition", "attachment; filename=filetest.xlsx") context.Response.OutputStream.Write(stream.ToArray(), 0, stream.ToArray().Length) context.Response.Flush() context.Response.Close() End Using End Using

    Read the article

  • jQuery CSS plugin that returns computed style of element to pseudo clone that element?

    - by Keith Bentrup
    I'm looking for a way using jQuery to return an object of computed styles for the 1st matched element. I could then pass this object to another call of jQuery's css method. For example, with width, I can do the following to make the 2 divs have the same width: $('#div2').width($('#div1').width()); It would be nice if I could make a text input look like an existing span: $('#input1').css($('#span1').css()); where .css() with no argument returns an object that can be passed to .css(obj). (I can't find a jQuery plugin for this, but it seems like it should exist. If it doesn't exist, I'll turn mine below into a plugin and post it with all the properties that I use.) Basically, I want to pseudo clone certain elements but use a different tag. For example, I have an li element that I want to hide and put an input element over it that looks the same. When the user types, it looks like they are editing the element inline. I'm also open to other approaches for this pseudo cloning problem for editing. Any suggestions? Here's what I currently have. The only problem is just getting all the possible styles. This could be a ridiculously long list. jQuery.fn.css2 = jQuery.fn.css; jQuery.fn.css = function() { if (arguments.length) return jQuery.fn.css2.apply(this, arguments); var attr = ['font-family','font-size','font-weight','font-style','color', 'text-transform','text-decoration','letter-spacing','word-spacing', 'line-height','text-align','vertical-align','direction','background-color', 'background-image','background-repeat','background-position', 'background-attachment','opacity','width','height','top','right','bottom', 'left','margin-top','margin-right','margin-bottom','margin-left', 'padding-top','padding-right','padding-bottom','padding-left', 'border-top-width','border-right-width','border-bottom-width', 'border-left-width','border-top-color','border-right-color', 'border-bottom-color','border-left-color','border-top-style', 'border-right-style','border-bottom-style','border-left-style','position', 'display','visibility','z-index','overflow-x','overflow-y','white-space', 'clip','float','clear','cursor','list-style-image','list-style-position', 'list-style-type','marker-offset']; var len = attr.length, obj = {}; for (var i = 0; i < len; i++) obj[attr[i]] = jQuery.fn.css2.call(this, attr[i]); return obj; } Edit: I've now been using the code above for awhile. It works well and behaves exactly like the original css method with one exception: if 0 args are passed, it returns the computed style object. As you can see, it immediately calls the original css method if that's the case that applies. Otherwise, it gets the computed styles of all the listed properties (gathered from Firebug's computed style list). Although it's getting a long list of values, it's quite fast. Hope it's useful to others.

    Read the article

  • Android popup style activity which sits on top of any other apps

    - by RenegadeAndy
    What I want to create is a popup style application. I have a service in the background - something arrives on the queue and i want an activity to start to inform the user - very very similar to the functionality of SMSPopup app. So I have the code where something arrives on the queue and it calls my activity. However for some reason the activity always shows on top of the originally started activity instead of just appearing on the main desktop of the android device. As an example: I have the main activity which is shown when the application is run I have the service which checks queue I have a popup activity. When i start the main activity it starts the service - I can now close this. I then have something on the queue and it creates the popup activity which launches the main activity with the popup on top of it :S How do I stop this and have it behave as i want... The popup class is : package com.andy.tabletsms.work; import com.andy.tabletsms.tablet.R; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.PopupWindow; import android.widget.TextView; import android.widget.Toast; public class SMSPopup extends Activity implements OnClickListener{ public static String msg; @Override public void onCreate(Bundle bundle){ super.onCreate(bundle); // Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show(); this.setContentView(R.layout.popup); TextView tv = (TextView)findViewById(R.id.txtLbl); Intent intent = getIntent(); if (intent != null){ Bundle bb = intent.getExtras(); if (bb != null){ msg = bb.getString("com.andy.tabletsms.message"); } } if(msg == null){ msg = "LOLOLOL"; } tv.setText(msg); Button b = (Button)findViewById(R.id.closeBtn); b.setOnClickListener(this); } @Override public void onClick(View v) { this.finish(); } } and I call the activity from a broadcast receiver which checks the queue every 30 seconds or so : if(main.msgs.size()0){ Intent testActivityIntent = new Intent(context.getApplicationContext(), com.andy.tabletsms.work.SMSPopup.class); testActivityIntent.putExtra("com.andy.tabletsms.message", main.msgs.get(0)); testActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(testActivityIntent); } The layout is here : http://pastebin.com/F25u6wdM

    Read the article

  • style a navigation link when a particular div is shown

    - by Matt Meadows
    I have JQuery working to show a particular div when a certain link is clicked. I have managed to apply the effect I'm after with the main navigation bar through id'ing the body tag and using css to style when the id is found. However, i'd like to apply the same effect to the sub navigation when a certain div is present. How the main navigation is styled: HTML: <nav> <ul> <li id="nav-home"><a href="index.html">Home</a></li> <li id="nav-showreel"><a href="showreel.html">Showreel</a></li> <li id="nav-portfolio"><a href="portfolio.html">Portfolio</a></li> <li>Contact</li> </ul> </nav> CSS: body#home li#nav-home, body#portfolio li#nav-portfolio { background: url("Images/Nav_Underline.png") no-repeat; background-position: center bottom; color: white; } (Other links havent been added to styling as those pages are still in development) How the sub navigation is structured: <nav id="portfolioNav"> <ul> <li id="portfolio-compositing"><a id="compositingWork" href="#">Compositing</a></li> <li id="portfolio-animation"><a id="animationWork" href="#">Animation</a></li> <li id="portfolio-motionGfx"><a id="GFXWork" href="#">Motion Graphics</a></li> <li id="portfolio-3D"><a id="3DWork" href="#">3D</a></li> </ul> </nav> As you can see, its similar format to the main navigation, however i've tried the same approach and it doesn't work :( The Javascript that switches the divs on the navigation click: <script type="text/javascript"> $(document).ready(function() { $('#3DWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #Portfolio3D'); }); $('#GFXWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #motionGraphics'); }); $('#compositingWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #PortfolioCompositing'); }); $('#animationWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #PortfolioAnimation'); }); }); </script> JSFiddle for full HTML & CSS : JSFiddle File The effect I'm After:

    Read the article

  • if (i == 2) or if (2 == i) ?

    - by Maroloccio
    I usually use if (i == 2) in preference to if (2 == i) On occasion, I would switch things around when writing xUnit-type tests from scratch so as to follow the assertion convention of "expected" preceding "actual". When adding to existing unit tests, I always follow the style I find. No matter what, I always try to keep things consistent. Today I checked out some code with a lot of "if (2 == i)" and started wondering: which style is more "popular" nowadays? is popularity language-dependent? The latter probably because I am aware of why the "if (2 == i)" became common in the first place (C heritage) and because I see some languages go as far as disallowing assignments within conditions (e.g. Python). I thought about downloading some sources: apt-get source linux-source eclipse openoffice.org expanding them and performing a quick grep: grep --color --include=*.java --include=*.c -ERI \ "if[[:space:]]*\([[:space:]]*[[:digit:]]+[[:space:]]==" . or creating a quick "poll": http://goo.gl/mod/ciMF after a bit of searching and asking around, I am still not sure. So I am asking you: which way to go?

    Read the article

  • Setting WPF control background image using styles?

    - by aviv
    Hi, I have a set of buttons inside a stack panel. I want them all to have a background image. How can i do it using styles? since i don't want to set manually the Background image for each button. Here is a code snippet: <StackPanel Orientation="Horizontal" Height="100px" VerticalAlignment="Top"> <StackPanel.Resources> <Style TargetType="Button"> <Setter Property="Margin" Value="2,4" /> </Style> </StackPanel.Resources> <Button Width="127px" Height="79px" VerticalAlignment="Bottom"> <Button.Background> <ImageBrush ImageSource="images/Tab.png" /> </Button.Background> </Button> <Button>A</Button> <Button>R</Button> <Button>S</Button> </StackPanel> Thanks.

    Read the article

  • Static code analysis for new language. Where to start?

    - by tinny
    I just been given a new assignment which looks like its going to be an interesting challenge. The customer is wanting a code style checking tool to be developed for their internal (soon to be open sourced) programming language which runs on the JVM. The language syntax is very Java like. The customer basically wants me to produce something like checkstyle. So my question is this, how would you approach this problem? Given a clean slate what recommendations would you make to the customer? I think I have 3 options Write something from scratch. Id prefer not to do this as it seems like this sort of code analysis tool problem has been solved so many times that there must be a more "framework" or "platform" orientated approach. Fork an existing code style checking tool and modify the parsing to fit with this new language etc etc Extend or plug into an existing static code analysis tool. (maybe write a plugin for Yasca?) Maybe you would like to share your experiences in this area? Thanks for reading

    Read the article

  • How come this relative positioned div is displayed differently in IE?

    - by Camran
    What is with these microsoft browsers? Does microsoft ever do a good job at anything... Anyways, I have a relative positioned div inside another div. The inside-div is positioned with percentage (left: 0%; top:13%). My problem is that in all IE versions the div is displayed some pixels further down than where it is displayed in Chrome, or FF... Anybody recognize this? <div class="nav_container" id="nav_container"> <div id="nav_container2" style="position: relative; left: 0%; top: 13%;"></div> </div> Also, I am just about to browser adjust my website so some article about most common problems with IE is appreciated. Thanks UPDATE: Here is the style for the primary div. .nav_container { background-image: url(../Graphics/menu_lvl1.gif); height: 101px; width: 720px; }

    Read the article

  • Reed-Solomon encoder for embedded application (memory-efficient)

    - by bjarkef
    Hi I am looking for a very memory-efficient (like max. 500 bytes of memory for lookup tables etc.) implementation of a Reed-Solomon encoder for use in an embedded application? I am interested in coding blocks of 10 bytes with 5 bytes of parity. Speed is of little importance. Do you know any freely available implementations that I can use for this purpose? Thanks in advance.

    Read the article

  • Server side Javascript best practices?

    - by Petteri Hietavirta
    We have a CMS built on Java and it has Mozilla Rhino for the server side JS. At the moment the JS code base is small but growing. Before it is too late and code has become a horrible mess I want to introduce some best practices and coding style. Obviously the name space control is pretty important. But how about other best practices - especially for Java programmers?

    Read the article

  • QT warning level suggestion

    - by metdos
    What is the warning level you use while compiling QT projects? When I compiled with W4, I'm getting a lot of warnings such as: C4127: conditional expression is constant Should I compile at W3, or find other ways to handle warnings at W4, such as: adding a new header file and using pragma's(mentioned here C++ Coding Standards: 101 Rules, Guidelines, and Best Practices). What are your practices? Thansk.

    Read the article

  • Auto-indent spaces with C in vim?

    - by zxcv
    I've been somewhat spoiled using Eclipse and java. I started using vim to do C coding in a linux environment, is there a way to have vim automatically do the proper spacing for blocks? So after typing a { the next line will have 2 spaces indented in, and a return on that line will keep it at the same indentation, and a } will shift back 2 spaces?

    Read the article

  • Increasing your efficiency during programming

    - by Tom
    Yeah, yeah, I know, it is a little bit of offtopic, but let's try. So, I want to increase my efficiency during my programming as much as possible to programme as fast and sensibly as possiblle. What do you do before starting coding? Drink a lot of coffee, energy drinks? Do you listen to music during programming or you keep quite? Share your ideas.

    Read the article

  • Git: Run through a filter before commiting/pushing?

    - by martiert
    Hi. Is there a way to run the changed files through a filter before doing the commit? I wish to make sure the files follows the coding standards for the project. I would also like to compile and run some test before the commit/push actually takes place, so I know everything in the repo actually works.

    Read the article

  • Why is my GreaseMonkey function unexpectedly being called multiple times?

    - by Ryan Fisher
    I am missing something, I'm not sure why the function 'addIcon()' is being called multiple times. Given: <div class="ticketpostcontainer">Some text</div> <div class="ticketpostcontainer">Some text</div> <div class="ticketpostcontainer">Some text</div> Using the utility function waitForKeyElements, the result is that each div element receives my "collapse icon" three times: // ==UserScript== // @name Collapse Kayako Response // @grant Sandbox // @namespace http://my.chiromatrixbase.com/fisher.chiromatrix.com/collaps_div.js // @include http://imatrixsupport.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js // ==/UserScript== /*jslint plusplus: true, undef: true, sloppy: true, vars: true, white: true, indent: 2, maxerr: 30 */ //Enable or disable GreaseMonkey function, GM_log var GM_Debug = 1; if (!GM_Debug) { var GM_log = function () {}; } //If FireBig is active, send GM log events to FB. if (unsafeWindow.console && GM_Debug) { var GM_log = unsafeWindow.console.log; } GM_log("Running collapse kayako response script"); //Don't run on frames or iframes. if (window.top !== window.self) { return; } waitForKeyElements(".ticketpostcontainer", addIcon); function addIcon() { var i, toCollapse = document.getElementsByClassName('ticketpostcontainer'), j = toCollapse.length; GM_log("Number of elements to collapse: " + toCollapse.length); for (i = 0; i < j; i++) { var curElement = toCollapse[i]; var p = document.createElement('p'); var a = document.createElement('a'); var span = document.createElement('span'); styleLink(a); styleParagraph(p); styleSpan(span); p.appendChild(a); p.appendChild(span); a.appendChild(document.createTextNode('-')); span.appendChild(document.createTextNode(' Some text')); a.addEventListener("click", toggle, false); curElement.parentNode.insertBefore(p, curElement); } function toggle(e) { if (this.firstChild.nodeValue === '-') { this.parentNode.nextSibling.style.display = 'none'; this.firstChild.nodeValue = '+'; this.nextSibling.style.display = 'inline'; } else { this.parentNode.nextSibling.style.display = 'block'; this.firstChild.nodeValue = '-'; this.nextSibling.style.display = 'none'; } e.preventDefault(); } function styleLink(a) { a.href = '#'; a.style.fontWeight = 'bold'; a.style.background = '#F6F1E7'; a.style.border = '1px solid #cccccc'; a.style.color = '#B24C58'; a.style.textDecoration = 'none'; a.style.width = '15px'; a.style.height = '15px'; a.style.textAlign = 'center'; a.style.fontSize = '100%'; a.style.margin = '0 5px 5px 8px'; a.style.cssFloat = 'left'; a.style.display = 'block'; a.style.lineHeight = '13px'; } function styleParagraph(p) { p.style.margin = '0 0 0 0'; p.style.lineHeight = '16px'; p.style.clear = 'both'; p.style.height = '15px'; } function styleSpan(span) { span.style.display = 'none'; } }

    Read the article

  • not able to style a ul inside a nav tag

    - by user1831677
    I am trying to make a nav menu for my website and have been using http://www.onextrapixel.com/2011/06/03/how-to-create-a-horizontal-dropdown-menu-with-html-css-and-jquery/ as a guide. It has worked fine but as soon as I try to add ( id="coolMenu" ) to the nav tag it stops working. I took it away from the ul tag and added it to the nav tag and it no longer works. It does not display anything at all. What am in doing wrong? Thanks. html code below: <nav id="coolMenu"> <ul> <li><a href="#">Lorem</a></li> <li><a href="#">Mauricii</a></li> <li> <a href="#">Periher</a> <ul class="noJS"> <li><a href="#">Hellenico</a></li> <li><a href="#">Genere</a></li> <li><a href="#">Indulgentia</a></li> </ul> </li> <li><a href="#">Tyrio</a></li> <li><a href="#">Quicumque</a></li> </ul> </nav> css below: /* Structure ------------------------------------------*/ #coolMenu, #coolMenu ul { list-style: none; } #coolMenu { float: left; } #coolMenu > li { float: left; } #coolMenu li a { display: block; height: 2em; line-height: 2em; padding: 0 1.5em; text-decoration: none; } #coolMenu ul { position: absolute; display: none; z-index: 999; } #coolMenu ul li a { width: 80px; } #coolMenu li:hover ul.noJS { display: block; } /* Main menu ------------------------------------------*/ #coolMenu { font-family: Arial; font-size: 12px; background: #2f8be8; } #coolMenu > li > a { color: #fff; font-weight: bold; } #coolMenu > li:hover > a { background: #f09d28; color: #000; } /* Submenu ------------------------------------------*/ #coolMenu ul { background: #f09d28; } #coolMenu ul li a { color: #000; } #coolMenu ul li:hover a { background: #ffc97c; }

    Read the article

  • is there any programming language that can bring together edit and compile / run ???

    - by Aff
    When I code, I always write little pieces of unit, and compile it often. This helps me to make sure that everything run correctly, but it's very time consumed. is there any programming language that can support us to do coding and running at the same time side by side ? i mean as soon as a key press leads to valid code, the effect of the edit is incorporated into the executing program.

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >