Search Results

Search found 2641 results on 106 pages for 'conditional compilation'.

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

  • Compilation of latex file

    - by Tim
    Hi, I am compiling a latex file on a server and download from there the generated dvi, ps and pdf files to view them. The latex file by \includegraphics includes some figure files which are not on my local machine. I found that dvi file generated by latex command does not show the figures after dowloaded to my local, but ps file generated by dvips -Ppdf have the figures, and pdf file generated by either ps2pdf or pdflatex seem not have the figures again. Is it because the figures are not actually embeded as part of the dvi and pdf files by those compilation commands? How to actually embed figures so we can only export the document files to other machines? are the case for tables in separated tex files included into main tex file by /input and the case for style files included by \usepackage similar to the above case for figure files included by \includegraphics ? Thanks and regards!

    Read the article

  • phpbb template comment conditional

    - by john
    I see in PHPBB they use conditional statements inside their html, or xhtml, if you dont know what I mean here is a snippet: <!-- IF MODERATORS --> <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p> <!-- ENDIF --> <!-- IF U_MCP --> <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p> <!-- ENDIF --> Is there an explanation on how to implement this in my own site, as it would be very useful and clean up a lot of code.

    Read the article

  • LockWorkStation - Compilation error - identifier not found

    - by Microkernel
    Hi All, I am writing an application in which I got to lock the computer screen (OS is Windows). My Application is in C++. For this purpose I used the LockWorkStation() API defined on msdn, http://msdn.microsoft.com/en-us/library/aa376875%28VS.85%29.aspx I have included windows.h as told but still I am getting compilation error: .\source.cpp(5) : error C3861: 'LockWorkStation': identifier not found here is a sample code thats giving error. #include <Windows.h> int main() { LockWorkStation(); return 0; } Please tell me what I am missing here :( I am using MS-Visual studio 2005. Regards.

    Read the article

  • Java: conditional initialization?

    - by HH
    Ruby has conditional initialization. Apparently, Java does not or does it? I try to write more succintly, to limit the range as small as possible. import java.io.*; import java.util.*; public class InitFor{ public static void main(String[] args){ for(int i=7,k=999;i+((String h="hello").size())<10;i++){} System.out.println("It should be: hello = "+h); } } Errors Press ENTER or type command to continue InitFor.java:8: ')' expected for(int i=7,k=999;i+((String h="hello").size())<10;i++){} ^

    Read the article

  • Recursive compilation using gcc

    - by curiousexplorer
    I am using the gcc compiler. My project source tree looks like somewhat like this test$~: tree . . |-- folder | |-- hello.cpp | `-- hello.h `-- main.cpp 1 directory, 3 files test$~: The file main.cpp contains the main() function and all the functions invoked by main.cpp lie in the directory named folder So far in all my little projects I never had to put some source code under a sub-directory. What I am looking for, in short, is some gcc command for recursive compilation in sub-directories and their subdirectories and so on... This command should be invoked from the home directory of the code project.

    Read the article

  • Compilation hangs for a class with field double d = 2.2250738585072012e-308

    - by 01es
    I have come across an interesting situation. A coworker committed some changes, which would not compile on my machine neither from the IDE (Eclipse) nor from a command line (Maven). The problem manifested in the compilation process taking 100% CPU and only killing the process would help to stop it. After some analysis the cause of the problem was located and resolved. It turned out be a line "double d = 2.2250738585072012e-308" (without semicolon at the end) in one of the interfaces. The following snipped duplicates it. public class WeirdCompilationIssue { double d = 2.2250738585072012e-308 } Why would compiler hang? A language edge case?

    Read the article

  • mysql conditional query - complicated!

    - by emre
    i want to get distinct values for a field, let say: field1... ok this needs a query like: "select distint(field1) from table" however for some records, field1 is empty and there is another column that is an alternative to field1, which is field2. now; for the records where field1 is empty i need to use the value of field2. i think i need sort of a conditional select statement with if control something like: "select distinct( (if(field1!='') field1 else field2) ) from table" but i have no idea on how to write it. any help is appricated...

    Read the article

  • Basic Python While loop compound conditional evaluation

    - by dbjohn
    In Python IDLE Shell it seems I cannot use a compound conditional expression and a while loop. I tried it within brackets too. k=0 m=0 while k<10 & m<10: print k k +=1 m+=1 If I write while k<10: print k k+=1 This does work. Is there a way I could achieve the first block of code with the "and" operator. I have done it in Java. Do I just need to put together "if" statements to achieve the same functionality in Python?

    Read the article

  • HTML / Conditional Comments - Do conditional comments behave as expected across browsers?

    - by John Himmelman
    Do conditional comments behave as expected across browsers? Can they cause rendering bugs or other issues? Are there any errors in the formatting/syntax of this CC? <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="718" height="227" id="swf"> <param name="movie" value="images/swf.swf" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="images/swf.swf" width="718" height="227"> <!--<![endif]--> <img src="images/alt.jpg" border="0" width="718" height="227"> <!--[if !IE]>--> </object> <!--<![endif]--> </object>

    Read the article

  • Conditional on WebClient

    - by CarryFlag
    Given: thin client (JS) model services client use services. services use model. Model consists of (for sample): Rect Circle ... Ellipse services: class CanvasProviger { public Canvas getCanvas() { return new Canvas(); } } model: class Canvas ... { private List < Figure > figures = new List < Figure >; ... } class Circle extends Figure { private int x, y, r; } class Rect extends Figure { private x, y, w, h; } client: ... var figure = MyJSRPCImpl.getCanvas().nextFigure(); if(figure == JSLocalModel.Rect) { drawRect(figure); } else if(figure == JSLocalModel.Circle) { drawCircle(figure); } ... How else can do way conditional? In rich client I used pattern Visitor. // my bad english, I know =(

    Read the article

  • Process results of conditional split in SSIS

    - by Robert
    I have a Data Flow Task and am connecting to a database via an OLE DB Source component to extract data. This data feeds into a Conditional Split component to separate the data based on a simple expression. After the evaluation of this expression, the data will end up in either of two locations: LocationA or LocationB. Alright, I have that all set up and working properly. Once the data is separated into these two locations, additional processing is to be done on the records. Here's where I am stuck: I need the the processing of records in LocationA to occur before the processing of records in LocationB. Is there a way to set precedence of which tasks occur before others? If not, what is the best way to handle this? I was thinking I may need to write the data in LocationA and LocationB back out to the database and create a new data flow task in the control flow to handle the order of which these records must be dealt with. Any help is greatly appreciated!

    Read the article

  • Error when changing default lanuage in asp.net compilation from vb to c#

    - by Herman
    Hi all, We have a updatable web site project that is written in c#, it has the usual web form implementation using master page, skins, user controls,...etc. Up to this point we neglect to change the default compilation language from VB to C#. However, the second we change it, we see the following error. Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASP.Default.__DataBinding__control499(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at .... Further investigation points out that this error is getting generated from a Theme related assembly (Source : App_Theme_Default.zclakrlo). Any ideas? One of my co-worker suggested that it might be skin file related since we have a theme call "Default" and there is no way to specify a language on a skin file. Therefore, when the asp.net runtime tries to compile it under C#, it will give a name collision? Does this make sense? Any help is appreciated.

    Read the article

  • Conditional operator in Mako using Pylons

    - by Antoine Leclair
    In PHP, I often use the conditional operator to add an attribute to an html element if it applies to the element in question. For example: <select name="blah"> <option value="1"<?= $blah == 1 ? ' selected="selected"' : '' ?>> One </option> <option value="2"<?= $blah == 2 ? ' selected="selected"' : '' ?>> Two </option> </select> I'm starting a project with Pylons using Mako for the templating. How can I achieve something similar? Right now, I see two possibilities that are not ideal. Solution 1: <select name="blah"> % if blah == 1: <option value="1" selected="selected">One</option> % else: <option value="1">One</option> % endif % if blah == 2: <option value="2" selected="selected">Two</option> % else: <option value="2">Two</option> % endif </select> Solution 2: <select name="blah"> <option value="1" % if blah == 1: selected="selected" % endif >One</option> <option value="2" % if blah == 2: selected="selected" % endif >Two</option> </select> In this particular case, the value is equal to the variable tested (value="1" = blah == 1), but I use the same pattern in other situations, like <?= isset($variable) ? ' value="$variable" : '' ?>. I am looking for a clean way to achieve this using Mako.

    Read the article

  • Most readable way to write simple conditional check

    - by JRL
    What would be the most readable/best way to write a multiple conditional check such as shown below? Two possibilities that I could think of (this is Java but the language really doesn't matter here): Option 1: boolean c1 = passwordField.getPassword().length > 0; boolean c2 = !stationIDTextField.getText().trim().isEmpty(); boolean c3 = !userNameTextField.getText().trim().isEmpty(); if (c1 && c2 && c3) { okButton.setEnabled(true); } Option 2: if (passwordField.getPassword().length > 0 && !stationIDTextField.getText().trim().isEmpty() && !userNameTextField.getText().trim().isEmpty() { okButton.setEnabled(true); } What I don't like about option 2 is that the line wraps and then indentation becomes a pain. What I don't like about option 1 is that it creates variables for nothing and requires looking at two places. So what do you think? Any other options?

    Read the article

  • Replace conditional with polymorphism refactoring or similar?

    - by Anders Svensson
    Hi, I have tried to ask a variant of this question before. I got some helpful answers, but still nothing that felt quite right to me. It seems to me this shouldn't really be that hard a nut to crack, but I'm not able to find an elegant simple solution. (Here's my previous post, but please try to look at the problem stated here as procedural code first so as not to be influenced by the earlier explanation which seemed to lead to very complicated solutions: http://stackoverflow.com/questions/2772858/design-pattern-for-cost-calculator-app ) Basically, the problem is to create a calculator for hours needed for projects that can contain a number of services. In this case "writing" and "analysis". The hours are calculated differently for the different services: writing is calculated by multiplying a "per product" hour rate with the number of products, and the more products are included in the project, the lower the hour rate is, but the total number of hours is accumulated progressively (i.e. for a medium-sized project you take both the small range pricing and then add the medium range pricing up to the number of actual products). Whereas for analysis it's much simpler, it is just a bulk rate for each size range. How would you be able to refactor this into an elegant and preferably simple object-oriented version (please note that I would never write it like this in a purely procedural manner, this is just to show the problem in another way succinctly). I have been thinking in terms of factory, strategy and decorator patterns, but can't get any to work well. (I read Head First Design Patterns a while back, and both the decorator and factory patterns described have some similarities to this problem, but I have trouble seeing them as good solutions as stated there. The decorator example seems very complicated for just adding condiments, but maybe it could work better here, I don't know. And the factory pattern example with the pizza factory...well it just seems to create such a ridiculous explosion of classes, at least in their example. I have found good use for factory patterns before, but I can't see how I could use it here without getting a really complicated set of classes) The main goal would be to only have to change in one place (loose coupling etc) if I were to add a new parameter (say another size, like XSMALL, and/or another service, like "Administration"). Here's the procedural code example: public class Conditional { private int _numberOfManuals; private string _serviceType; private const int SMALL = 2; private const int MEDIUM = 8; public int GetHours() { if (_numberOfManuals <= SMALL) { if (_serviceType == "writing") return 30 * _numberOfManuals; if (_serviceType == "analysis") return 10; } else if (_numberOfManuals <= MEDIUM) { if (_serviceType == "writing") return (SMALL * 30) + (20 * _numberOfManuals - SMALL); if (_serviceType == "analysis") return 20; } else //i.e. LARGE { if (_serviceType == "writing") return (SMALL * 30) + (20 * (MEDIUM - SMALL)) + (10 * _numberOfManuals - MEDIUM); if (_serviceType == "analysis") return 30; } return 0; //Just a default fallback for this contrived example } } All replies are appreciated! I hope someone has a really elegant solution to this problem that I actually thought from the beginning would be really simple... Regards, Anders

    Read the article

  • How to Highlight a Row in Excel Using Conditional Formatting

    - by Erez Zukerman
    Conditional formatting is an Excel feature you can use when you want to format cells based on their content. For example, you can have a cell turn red when it contains a number lower than 100. But how do you highlight an entire row? If you’ve never used Conditional Formatting before, you might want to look at Using Conditional Cell Formatting in Excel 2007. It’s one version back, but the interface really hasn’t changed much. But what if you wanted to highlight other cells based on a cell’s value? The screenshot above shows some codenames used for Ubuntu distributions. One of these is made up; when I entered “No” in the “Really” column, the entire row got different background and font colors. To see how this was done, read on.How To Make a Youtube Video Into an Animated GIFHTG Explains: What Are Character Encodings and How Do They Differ?How To Make Disposable Sleeves for Your In-Ear Monitors

    Read the article

  • sharepoint: conditional formula for calculated field

    - by fiuman007
    hi all, i want to create a formula for change my value from EUR into USD. FIELD1 (choice): EUR, USD FIELD2 (number): amount in EUR or USD Now, if USD is selected in FIELD1 following should happen: calaculate FIELD2*0,71 otherwiese the result is FIELD2. FIELD3 (calculated): =IF(FIELD1="USD", (FIELD2*0,71), FIELD2)) When I use this formula I get error message: The formula contains a syntax error or is not supported. Any idea? I´m using english version of WSS 3.0. Thank you, fiuman007

    Read the article

  • Conditional Markup in aspx

    - by Dynde
    Hi... I have a ListView. If I want to base the html markup on a condition in respects to the databound item, what would be the best way to do that? What I mean is, is there any other way then putting <% % if/else blocks directly in the markup? I'm aware that a really ugly way of doing it, is putting html markup in the database field, and just let the Eval() squeeze out the proper markup (I'm not doing that). I would like to avoid putting actual <% % C# blocks in the code as well. Any good ideas?

    Read the article

  • Flex, Ant, mxmlc and conditional compilation

    - by Rezmason
    My ActionScript project builds with several compile-time specified constants. They are all Booleans, and only one of them is true at any given time. The rest must be false. When I represented my build process in a bash script, I could loop through the names of all these constants, set one of them to be true and the rest to be false, then concatenate them onto a string to be inserted as a set of arguments passed to mxmlc. In Ant, looping is more complicated. I've tried the ant-contrib for tag: <mxmlc file='blah' output='blah'> <!- ... -> <for list='${commaSeparatedListOfConstNames}' param='constName'> <sequential> <define> <name>${constName}</name> <value>${constName} == ${theTrueConst}</value> <!-- (mxmlc's define arguments can be strings that are evaluated at compile time) --> </define> </sequential> </for> </mxmlc> Long story short, ant-contrib tags like the for tag can't go in the mxmlc task. So now I'm using Ant's propertyregex to take my list of arguments and format them into a set of define args, like my old bash script: <propertyregex property='defLine.first' override='false' input='${commaSeparatedListOfConstNames}' regexp='([^\|]+)\,' replace='\1,false ' /> <propertyregex property='defLine.final' input='${defLine.first}' regexp='(@{theTrueConst}\,)false' replace='\1true' /> <!-- result: -define+=CONST_ONE,false -define+=CONST_TWO,false -define+=TRUE_CONST,true --> Now my problem is, what can I do with this mxmlc argument and the mxmlc task? Apparently arg tags can go inside the mxmlc task without it throwing an error, but they don't seem to have any effect. What am I supposed to do? How do I make this work with the mxmlc task?

    Read the article

  • Jquery cookie plugin - conditional content determined by cookie being set

    - by Dave
    Hello I have a sign up form that is displayed to all new site visitors. If a user fills out the form, the next time they visit the site, I would like to display a "welcome back" message where the form would usually sit. I am trying to do this via the jquery cookie plugin (http://plugins.jquery.com/project/Cookie). My form would look like this: <div id="sign_up_form_wrapper"><form id="sign_up" action="" method="POST" name="form"> <input type="checkbox" name="checkbox" id="checkbox" value="1">&nbsp; I accept the terms and conditions</a> <br /><br /><input type="submit" value="ENTER"> </form></div> And I am setting my cookie here: <script type="text/javascript" language="javascript"> $().ready(function() { $('#sign_upm').submit(function(e) { e.preventDefault(); if ($('#sign_up input[name=checkbox]').is(':checked')) { $.cookie('agreed_to_terms', '1', { path: '/', expires: 999999 }); } }); }); </script> That will set the cookie when a user has checked the box, but now I need to do somehting like this: if the cookie has been set, do this: <div id="sign_up_form_wrapper"> <p>Welcome back, John</p> </div> otherwise do this: <div id="sign_up_form_wrapper"> <!-- full form code here --> </div> Any ideas or pointers would be very appreciated, thanks.

    Read the article

  • ActiveReports Conditional Formatting - Picture Visibility

    - by Joe
    In ActiveReports, how can I change formatting based on values in the report data? Specifically, I want to show or hide pictures based on a value in the data. The report gets bound to a list of objects via a set to its DataSource property. These objects have a Condition property with values "Poor", "Normal", etc. I have some pictures in the report that correspond to the different conditions, and I want to hide all the pictures except for the one corresponding to the value. Should I subscribe to the Format event for the detail section? If so, how do I get to the "current record" data?

    Read the article

  • What's wrong with this conditional?

    - by David
    I am trying to make a method that tests to see if 3 lengths can make a triangle. I think i'm making some kind of syntax error but i can't figure out what it is. Here is the relevant bit of code: (its in java) public static void trya (int a, int b, int c) { if (c>(a+b)) { System.out.println ("yes") ; } else { if (b>(a+c)) { System.out.println ("yes") ; } } else { if (a>(b+c)) { System.out.println ("yes") ; } } else { System.out.println ("no") ; } } this is the error message i get: tryangle.java:17: 'else' without 'if' else ^

    Read the article

  • VC6 compilation error

    - by vijay.j
    Hi there are some vs2005 c++ files in PJNSMTPCONNECTION Classes, but my application is in vc6, now can any one tell whether CSTRINGA, CSTRINGW are available in vc6.. if not how overcome this problem

    Read the article

  • C# Conditional Operator Not a Statement?

    - by abelenky
    I have a simple little code fragment that is frustrating me: HashSet<long> groupUIDs = new HashSet<long>(); groupUIDs.Add(uid)? unique++ : dupes++; At compile time, it generates the error: Only assignment, call, increment, decrement, and new object expressions can be used as a statement HashSet.Add is documented to return a bool, so the ternary (?) operator should work, and this looks like a completely legitimate way to track the number of unique and duplicate items I add to a hash-set. When I reformat it as a if-then-else, it works fine. Can anyone explain the error, and if there is a way to do this as a simple ternary operator?

    Read the article

  • "code too large" compilation error in java

    - by trinity
    Hello all, Is there any maximum size for code in java.. i wrote a function with more than 10,000 lines. Actually , each line assigns a value to an array variable.. arts_bag[10792]="newyorkartworld"; arts_bag[10793]="leningradschool"; arts_bag[10794]="mailart"; arts_bag[10795]="artspan"; arts_bag[10796]="watercolor"; arts_bag[10797]="sculptures"; arts_bag[10798]="stonesculpture"; And while compiling , i get this error : code too large How do i overcome this ?

    Read the article

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