Search Results

Search found 1127 results on 46 pages for 'macro'.

Page 16/46 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Piping to findstr's input, dos prompt

    - by Gauthier
    I have a text file with a list of macro names (one per line). My final goal is to get a print of how many times the macro's name appears in the files of the current directory. The macro's names are in C:\temp\macros.txt. type C:\temp\macros.txt in the dos prompt prints the list alright. Now I want to pipe that output to the standard input of findstr. type C:\temp\macros.txt | findstr *.ss (ss is the file type where I am looking for the macro names). This does not seem to work, I get no result (very fast, it does not seem to try at all). findstr <the first row of the macro list> *.ss does work. I also tried findstr *.ss < c:\temp\macros.txt with no success.

    Read the article

  • VBA Macro On Timer style to run code every set number of seconds, i.e. 120 seconds

    - by FinancialRadDeveloper
    I have a need to run a piece of code every 120 seconds. I am looking for an easy way to do this in VBA. I know that it would be possible to get the timer value from the Auto_Open event to prevent having to use a magic number, but I can't quite get how to fire off a timer to get something to run every 120 seconds. I don't really want to use an infinite loop with a sleep if I can avoid it. EDIT: Cross-post based on an answer provided is at: http://stackoverflow.com/questions/2341762/excel-vba-application-ontime-i-think-its-a-bad-idea-to-use-this-thoughts-eit

    Read the article

  • Best IDE macro tools to combat the verbosity of Java syntax for someone with carpal tunnel?

    - by Carlsberg
    I have a bad case of carpal tunnel so I'm looking for an editor that would make my Java programming less painful (literally!). Does anyone have any recommendations for tools that you can add to Eclipse, Netbeans or other IDEs to produce some of the repetitive code that's common in Java syntax? Overall what would be the best code editor for this purpose? (I'm coding on Ubuntu, in case it matters).

    Read the article

  • Why I get errors when I try to out a compiler defined macro using a pragma message?

    - by bogdan
    I would like to know why the Visual C++ compiler gets me an warning/error if I use the following code: #pragma message( "You have " _MSC_FULL_VER ) Here is what I get: error C2220: warning treated as error - no 'object' file generated warning C4081: expected ':'; found ')' The problem reproduces for _MSC_FULL_VER or _MSV_VER but not if I try to use others like __FILE__ or __DATE__. These macros are defined, they are documented on msdn

    Read the article

  • C/C++ macro/template blackmagic to generate unique name.

    - by anon
    Macros are fine. Templates are fine. Pretty much whatever it works is fine. The example is OpenGL; but the technique is C++ specific and relies on no knowledge of OpenGL. Precise problem: I want an expression E; where I do not have to specify a unique name; such that a constructor is called where E is defined, and a destructor is called where the block E is in ends. For example, consider: class GlTranslate { GLTranslate(float x, float y, float z); { glPushMatrix(); glTranslatef(x, y, z); } ~GlTranslate() { glPopMatrix(); } }; Manual solution: { GlTranslate foo(1.0, 0.0, 0.0); // I had ti give it a name ..... } // auto popmatrix Now, I have this not only for glTranslate, but lots of other PushAttrib/PopAttrib calls too. I would prefer not to have to come up with a unique name for each var. Is there some trick involving macros templates ... or something else that will automatically create a variable who's constructor is called at point of definition; and destructor called at end of block? Thanks!

    Read the article

  • Is there a macro or a way to conditionally copy rows from one or more worksheet to another in Excel 2007

    - by marison
    I'm pulling a list of data from two or more excel file into one with some specific condition. For Eg: File1 Date Project ID Engineer 8/2/2008 XYZ T0908-5555 JS 9/4/2008 ABC T0908-6666 DF 9/5/2008 ZZZ T0908-7777 TS 9/4/2008 ABC T0908-1111 DF 9/5/2008 POR T0908-7777 MS 9/4/2008 ABC T0908-2222 DD File 2 Date Project ID Engineer 8/2/2008 ABC T1908-5555 JS 9/4/2008 XYZ T1908-6666 DF 9/5/2008 ABC T1908-7777 TS 9/4/2008 ZZZ T1908-1111 DF 9/5/2008 POR T1908-7777 MS 9/4/2008 ABC T1908-2222 DD I want Data from both file1 and file2 in a new excel with only those rows whose Project ID= "ABC". And the path of file1 and file2 will be changed on daily basis. Kindly help.....

    Read the article

  • How do I splice into a list outside of a macro in Common Lisp?

    - by derefed
    Say I have a function foo: (defun foo (x y &rest args) ...) And I later want to wrap it with a function bar: (defun bar (x &rest args) (foo x 100 args)) Assume bar was then called like this: (bar 50 1 2 3) With this setup, args is a list within the body of bar that holds the trailing parameters, so when I pass it to foo, instead of getting the equivalent of (foo 50 100 1 2 3) I of course get (foo 50 100 '(1 2 3)). If these were macros, I would use `(foo ,x 100 ,@args) within the body of bar to splice args into the function call. ,@ only works inside a backtick-quoted list, however. How can I do this same sort of splicing within a regular function?

    Read the article

  • Is there anyway to write the following as a C++ macro?

    - by anon
    my_macro << 1 << "hello world" << blah->getValue() << std::endl; should expand into: std::ostringstream oss; oss << 1 << "hello world" << blah->getValue() << std::endl; ThreadSafeLogging(oss.str()); Thanks! EDIT: the accepted answer is awesome. Can we upvote 8 more times and win this responder a badge? (The answer only needs 6 more upvotes). 4 more votes to go from 21 to 25. 3 more. :-) Victory. :-)

    Read the article

  • Is there anyway to write the following as a C/C++ macro?

    - by anon
    my_macro << 1 << "hello world" << blah->getValue() << std::endl; should expand into: std::ostringstream oss; oss << 1 << "hello world" << blah->getValue() << std::endl; ThreadSafeLogging(oss.str()); Thanks! EDIT: the accepted answer is awesome. Can we upvote 8 more times and win this responder a badge? (The answer only needs 6 more upvotes). 4 more votes to go from 21 to 25. 3 more. :-) Victory. :-)

    Read the article

  • Which HRESULT literal constant will fail the SUCCEEDED() macro?

    - by Hamish Grubijan
    Definition of SUCCEEDED(): #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) Background: When an Ok button is clicked on a dialog, I need to return an HRESULT value hr such that SUCCEEDED(hr) is true. If Cancel button is clicked, I need to return a negative value. I could have used bools, but that would break the existing pattern (usually the hr values come from depths of system dlls). So, I know I can return S_OK on Ok, but what do I return on Cancel? I could just return (HRESULT)-1;, but there must be a better way - some HRESULT literal constant which has negative value and represents a generic failure. S_FALSE is not it, for it's value is defined as 1L. Please help me find the right constant.

    Read the article

  • How to set up a functional macro with parameters in C++?

    - by user1728737
    is there a way that I can make this work? Or do I need to use separate files? #include <iostream> // Necessary using namespace std; long double primary, secondary, tertiary; #define long double mMaxOf2(long double min, long double max) { return ((max > min) ? (max) : (min)); } #define long double mMaxOf3(long double Min, long double Max, long double Mid) { long double Mid = (long double mMaxOf2(long double Min, long double Mid)); long double Max = (long double mMaxOf2(long double Mid, long double Max)); return (Max); } int main() { cout << "Please enter three numbers: "; cin << primary << secondary << tertiary; cout << "The maximum of " << primary << " " << secondary << " " << tertiary; cout << " using mMaxOf3 is " << long double mMaxOf3(primary, secondary, tertiary); return 0; } This is the error that I am getting. |20|error: expected unqualified-id before '{' token|

    Read the article

  • Can I expand macro JUST ONE TIME in specific target?

    - by naive231
    A = "demo" %.o:%.cpp $(CC) -c $^ $(A) -o $@ default:$(all_objs) game:A = $(shell read -p 'Enter game version: ' gv && echo $$gv) game:$(all_objs) Just a snippet makefile above. If I make game, main problem is each compilation of sources will expand $(A) and it will request user to input game version over and over. $(A) has default content "demo" only if user doesn't make game target. So, is there any way to set $(A) to be expanded && ?

    Read the article

  • Create macro to move data in a column UP?

    - by user1786695
    I have an excel sheet of which the data was jumbled: for example, the data that should have been in Columns AB and AC were instead in Columns B and C, but on the row after. I have the following written which moved the data from B and C to AB and AC respectively: Dim rCell As Range Dim rRng As Range Set rRng = Sheet1.Range("A:A") i = 1 lastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row For Each rCell In rRng.Cells If rCell.Value = "" Then Range("AB" & i) = rCell.Offset(0, 1).Value rCell.Offset(0, 1).ClearContents End If i = i + 1 If i = lastRow + 1 Then Exit Sub End If Next rCell End Sub However, it doesn't fix the problem of the data being on the row BELOW the appropriate row now that they are in the right columns. I am new to VBA Macros so I would appreciate any help to make the data now align. I tried toggling the Offset parameter (-1,0) but it's not working.

    Read the article

  • Creating PDF documents dynamically using Umbraco and XSL-FO part 2

    - by Vizioz Limited
    Since my last post I have made a few modifications to the PDF generation, the main one being that the files are now dynamically renamed so that they reflect the name of the case study instead of all being called PDF.PDF which was not a very helpful filename, I just wanted to get something live last week, so decided that something was better than nothing :)The issue with the filenames comes down to the way that the PDF's are being generated by using an alternative template in Umbraco, this means that all you need to do is add " /pdf " to the end of a case study URL and it will create a PDF version of the case study. The down side is that your browser will merrily download the file and save it as PDF.PDF because that is the name of the last part of the URL.What you need to do is set the content-disposition header to be equal to the name you would like the file use, Darren Ferguson mentioned this on the Change the name of the PDF forum post.We have used the same technique for downloading dynamically generated excel files, so I thought it would be useful to create a small macro to set both this header and also to set the caching headers to prevent any caching issues, I think in the past we have experienced all possible issues, including various issues where IE behaves differently to other browsers when you are using SSL and so the below code should work in all situations!The template for the PDF alternative template is very simple:<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> <umbraco:Macro Alias="PDFHeaders" runat="server"></umbraco:Macro> <umbraco:Macro xsl="FO-CaseStudy.xslt" Alias="PDFXSLFO" runat="server"></umbraco:Macro></asp:Content>The following code snippet is the XSLT macro that simply creates our file name and then passes the file name into the helper function:<xsl:template match="/"> <xsl:variable name="fileName"> <xsl:text>Vizioz_</xsl:text> <xsl:value-of select="$currentPage/@nodeName" /> <xsl:text>_case_study.pdf</xsl:text> </xsl:variable> <xsl:value-of select="Vizioz.Helper:AddDocumentDownloadHeaders('application/pdf', $fileName)"/> </xsl:template>And the following code is the helper function that clears the current response and adds all the appropriate headers:public static void AddDocumentDownloadHeaders(string contentType, string fileName){ HttpResponse response = HttpContext.Current.Response; HttpRequest request = HttpContext.Current.Request; response.Clear(); response.ClearHeaders(); if (request.IsSecureConnection & request.Browser.Browser == "IE") { // Don't use the caching headers if the browser is IE and it's a secure connection // see: http://support.microsoft.com/kb/323308 } else { // force not using the cache response.AppendHeader("Cache-Control", "no-cache"); response.AppendHeader("Cache-Control", "private"); response.AppendHeader("Cache-Control", "no-store"); response.AppendHeader("Cache-Control", "must-revalidate"); response.AppendHeader("Cache-Control", "max-stale=0"); response.AppendHeader("Cache-Control", "post-check=0"); response.AppendHeader("Cache-Control", "pre-check=0"); response.AppendHeader("Pragma", "no-cache"); response.Cache.SetCacheability(HttpCacheability.NoCache); response.Cache.SetNoStore(); response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); } response.AppendHeader("Expires", DateTime.Now.AddMinutes(-1).ToLongDateString()); response.AppendHeader("Keep-Alive", "timeout=3, max=993"); response.AddHeader("content-disposition", "attachment; filename=\"" + fileName + "\""); response.ContentType = contentType;}I will write another blog soon with some more details about XSL-FO and how to create the PDF's dynamically.Please do re-tweet if you find this interest :)

    Read the article

  • Where to set Visual studio 2013 property macros

    - by marcp
    I'm a new VS user. I've received some sample C++ projects working with a 3rd party API. They were saved in VS2012 format, but I have VS 2013. After conversion I find that there is an API specific macro defined in the project properties in the "Linker|General|Additional Library Directories" category. If I click on 'edit' I can replace the macro with an actual path, but how do I establish what the macro points to? In other words, how does one create a macro usable in multiple projects?

    Read the article

  • Writing Macros to find a specific cell and paste the value from a control cell into it

    - by G-Edinburgh
    I am having some issues writing a Macro to do the following. I have a very long list of rooms with two columns one containing the room number i.e. B-CL102 and the other containing a varying integer.I am looking to create a new column that will contain another different integer for each of the rooms. Is there any way to write a Macro so that I can use two control cells at the top of the sheet, type the room number into one and the integer matching that room into another, then run the Macro and it will automatically populate the correct cell. Then I can change the two values in the control cells and run the Macro again and so on. Thanks for your help, I have a very minimal amount of experience with Macros essentially just the basics. Thanks G

    Read the article

  • Error Message, "The Controls collection cannot be modified because the control contains code blocks"

    - by Gogster
    I'm receiving this error on a page that previously worked fine, in fact the only change I've made to the page recently was to add another asp:TextBox and asp:RequiredFieldValidator control. The page already had numerous ASP.NET controls on it, so I cannot see why these extra controls would make a difference, anyway I shall post the code below and hopefully you can see what the error is: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MeetingGenerator.ascx.cs" Inherits="usercontrols_MeetingGenerator" %> <%@ Register TagPrefix="cc1" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div style="width:498px;height:425px;background-color:#033b2a;text-align:center;padding-top:20px;"> <asp:Label ID="lblDone" CssClass="done" runat="server"></asp:Label> <asp:Panel id="pnlAddReport" runat="server"> <div> <img src="../images/banners/add-meeting.png" alt="Add Report" /> </div> <p> <asp:ValidationSummary ID="ValidationSummary" CssClass="validationsummary" runat="server" /> <asp:TextBox ID="txtTitle" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" TargetControlID="txtTitle" WatermarkCssClass="watermark" WatermarkText=" Meeting title" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvTitle" ControlToValidate="txtTitle" Text="" ErrorMessage="Please enter the title" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvTitle1" ControlToValidate="txtTitle" Text="" ErrorMessage="Please enter the title" Display="None" InitialValue=" Meeting title" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtDate" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:CalendarExtender ID="ceDate" TargetControlID="txtDate" Format="dd/MM/yyyy" runat="server"> </cc1:CalendarExtender> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" TargetControlID="txtDate" WatermarkCssClass="watermark" WatermarkText=" Meeting Date" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvDate" ControlToValidate="txtDate" Text="" ErrorMessage="Please select the meeting date" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvDate1" ControlToValidate="txtDate" Text="" ErrorMessage="Please select the meeting date" Display="None" InitialValue=" Meeting Date" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtMeetingTime" BorderStyle="None" Width="250px" Height="22px" MaxLength="5" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="tweMeetingTime" TargetControlID="txtMeetingTime" WatermarkCssClass="watermark" WatermarkText=" Time (HH:MM)" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtMeetingTime" Text="" ErrorMessage="Please enter the meeting time" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator11" ControlToValidate="txtMeetingTime" Text="" ErrorMessage="Please enter the meeting time" Display="None" InitialValue=" Time (HH:MM)" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtLocation" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" TargetControlID="txtLocation" WatermarkCssClass="watermark" WatermarkText=" Location" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvLocation" ControlToValidate="txtLocation" Text="" ErrorMessage="Please enter the location" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvLocation1" ControlToValidate="txtLocation" Text="" ErrorMessage="Please enter the location" Display="None" InitialValue=" Location" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:ImageButton ID="btnAddMeeting" ImageUrl="/images/buttons/addmeeting-btn.gif" runat="server" OnClick="btnAddMeeting_Click" /> </p> <p> </p> </asp:Panel> </div> <%@ Master Language="C#" MasterPageFile="/masterpages/Master.master" AutoEventWireup="true" %> <asp:content ContentPlaceHolderId="additionalhead" runat="server"> </asp:content> <asp:content ContentPlaceHolderId="additionalbody" runat="server"> <umbraco:Macro Alias="AddMeeting" runat="server"></umbraco:Macro> </asp:content> <asp:content ContentPlaceHolderId="bodyContent" runat="server"> </asp:content> <%@ Master Language="C#" AutoEventWireup="true" %> <!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><umbraco:Item field="title" runat="server"></umbraco:Item></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript" src="/js/jQueryString-2.0.2-Min.js"></script> <link rel="stylesheet" type="text/css" href="/css/Styles.css" /> <link rel="stylesheet" type="text/css" href="/css/Layout.css" /> <link rel="stylesheet" type="text/css" href="/css/Forms.css" /> <script type="text/javascript" language="javascript"> $(document).ready(function () { $('#uploadAgenda').hide(); $('#uploadMinutes').hide(); $('#<%=txtSearchEAA.ClientID%>').val('Search EAA'); var st = $.getQueryString({ ID:"search" }); if (st != '') { $('#<%=txtSearchEAA.ClientID%>').val(st); }; $('#<%=txtSearchEAA.ClientID%>').click(function() { $('#<%=txtSearchEAA.ClientID%>').val(''); }); }); </script> <script type="text/C#" runat="server"> protected void btnSearch_Click(object sender, EventArgs e) { Response.Redirect("/members/search-results?search=" + txtSearchEAA.Text); } </script> <asp:ContentPlaceHolder id="additionalhead" runat="server"></asp:ContentPlaceHolder> <umbraco:Item field="AdditionalHead" runat="server"></umbraco:Item> </head> <body style="background-color:#e5e5e5;"> <script runat="server"> protected void btnLogout_Click(object sender, EventArgs e) { FormsAuthentication.SignOut(); Response.Redirect("/login"); } </script> <form id="form1" runat="server"> <asp:ContentPlaceHolder id="additionalbody" runat="server"></asp:ContentPlaceHolder> <div class="wrapper"> <div class="content"> <div class="banner"> <div class="bannerSearchSpacer"> <a href="/home"><h1><span>EAA</span></h1></a> </div> <div class="aboutEAA"> &nbsp; </div> <div class="bannerSearchAligns"> <div class="searchbox"> <asp:TextBox ID="txtSearchEAA" CssClass="watermark" Width="155px" runat="server"></asp:TextBox> </div> <div class="searchButton"> <asp:ImageButton ID="imbSearch" ImageUrl="/images/buttons/go.gif" OnClick="btnSearch_Click" runat="server" /> </div> <div style="clear:both;"></div> </div> <div class="loginBox"> <dl> <dt>Hello</dt> <dd><umbraco:Macro Alias="MemberName" runat="server"></umbraco:Macro></dd> <dt>Arena</dt> <dd><umbraco:Macro Alias="MemberArena" runat="server"></umbraco:Macro></dd> </dl> <div><asp:ImageButton ID="btnLogout" ImageUrl="/images/buttons/logout.gif" runat="server" OnClick="btnLogout_Click" /></div> </div> <div style="clear:both;"></div> </div> <div id="contentarea"> <div class="menuLeft"> <div class="menuPlaceholder"> <umbraco:Macro Alias="DynamicMenu" runat="server"></umbraco:Macro> </div> </div> <div class="mainBody"> <asp:ContentPlaceHolder id="bodyContent" runat="server"></asp:ContentPlaceHolder> </div> <div style="clear:both;"></div> </div> </div> </div> </form> <umbraco:Macro Alias="MemberAnalytics" runat="server"></umbraco:Macro> </body> </html>

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >