Search Results

Search found 4771 results on 191 pages for 'aspnet compiler'.

Page 9/191 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Does the compiler optimize the function parameters passed by value?

    - by Naveen
    Lets say I have a function where the parameter is passed by value instead of const-reference. Further, lets assume that only the value is used inside the function i.e. the function doesn't try to modify it. In that case will the compiler will be able to figure out that it can pass the value by const-reference (for performance reasons) and generate the code accordingly? Is there any compiler which does that?

    Read the article

  • Make mex compiler of matlab working on mint?

    - by Erogol
    Mex compiler of matlab does not work with following error Warning: You are using gcc version "4.7.2-2ubuntu1)". The version currently supported with MEX is "4.4.6". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/ /home/krm/matlab/bin/mex: 1: eval: g++: not found mex: compile of ' "fv_cache/fv_cache.cc"' failed. it is obvious that I need preceding version of gcc but this specific version is not included in software manager of mint. I installed gcc-4.4 but it does not recognized by Matlab. I also removed latest version from my computer and set gcc as a environment variable points to gcc-4.4 but again does not work. Is there any other way around to solve that issue? Maybe a interface or something.

    Read the article

  • JIT compiler for C, C++, and the likes

    - by Ebrahim
    Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) Explanation: I think the software could benefit from runtime profiling feedback and aggressively optimized recompilation of hotspots at runtime, even for compiled-to-machine languages like C and C++. Profile-guided optimization does a similar job, but with the difference a JIT would be more flexible in different environments. In PGO you run your binary prior to releasing it. After you released it, it would use no environment/input feedbacks collected at runtime. So if the input pattern is changed, it is probe to performance penalty. But JIT works well even in that conditions. However I think it is controversial wether the JIT compiling performance benefit outweights its own overhead. Edit: Grammar

    Read the article

  • Aren't there compilers better at telling the programmer what's wrong in a code ?

    - by jokoon
    I have worked a little while with the Microsoft compiler from Visual C++ but I worked a long time with G++, and I remember often having bad times understanding what was wrong in my code with the former. Beside binary code generation and optimisation, I think this is a very important feature of a C++ compiler: giving the programmer a clue that makes him understand as fast as possible what is wrong with his/her code. I can understand some programmers understand programming as some sort of "competition" to make less errors, but to me that's a counter productive opinion. I once tried Clang compiler for C from the LLVM thingie, I didn't use it for a long time, but I was impressed on how explicit and easy to understand the error messages were. What are your experiences, and how do you think this matters ? Some WIP of C++ Clang: http://clang.llvm.org/cxx_status.html

    Read the article

  • are there compiler options in clang? [on hold]

    - by Deohboeh
    I am learning from The C++ Primer. One of the exercises is to compile a program with arguments in main(). For this I am trying to use mac terminal. I need to compile a C++11 Unix executable file named "main" which takes “f" as an argument. I am using Xcode 4.6.3 on OS X Lion. I compiled the program with clang++ -std=c++11 -stdlib=libc++ main.cpp -o main. But don’t know what to do next. I found -frecord-gcc-switches while searching compiler options on google. It does what I need to do. Is there a clang version of this? Please use simple language. I have never used command line before. I tried going through the clang user guide but a lot of it is out of my depth.

    Read the article

  • aspnet membeship logon page and https redirect

    - by DefSol
    Hello, I have a gridview control that has on onclick event bound to every cell. Once a user clicks on a cell it directs them to a booking confirmation page and passes 3 url variables. This booking page is behind a aspnet membership and thus if the user is not logged in they are served the login page. The login page has a redirect to https connection in the onload event using the IsSecure property. The issue is once the user logs in, then is returned to the booking confirmation page I lose 2 of the url vars. If I remove the https redirect, everything works fine, but the user logs on on a http connection, which is not cool. Appreciate and help thanks Reuben

    Read the article

  • Godaddy ASPNET membership database woes -- PLEASE HELP

    - by The_AlienCoder
    Ok heres the deal I purchased a windows shared hosting account on godaddy that came with 2 MSSQL databases. I setup one to hold my site data and the other installed aspnet membership schema to store site members. The site works perfectly even displaying data from the 1st database. However when I try to login or register I get this nasty error Exception Details: System.Configuration.Provider.ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file. Ive gone through my web.config and theres nothing wrong with my 2 connection strings. It seems godaddy has a problem with using 2 mssql databases simultaneously when 1 is for membership. Googling just finds a whole lot of people with the same problem -- but no solutions! Does anyone know a solution or a workaround?...or has anyone ever successfully used 2 databases(1 for membership) on godaddy?

    Read the article

  • fill data in dropdown box as per previous dropdown box data selected in aspnet mvc 1

    - by FosterZ
    hi, i'm buildin' an employee registration form in aspnet mvc, i have fields like "School" list in 1 dropdown box and "Department" list another, problem is i want to show Department list on change of School list, i have done followin' code: public ActionResult EmployeeCreate() { var getSchool = SchoolRepository.GetAllSchoolsInArray();//this gets school_id as value and school_name as text for dropdown box ViewData["SchoolsList"] = getSchool; return View(); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult EmployeeCreate() { _employeeRepository.CreateEmployee(employeeToCreate); _employeeRepository.SaveToDb(); } Here is the View Html.DropDownList("SchoolLists") Html.DropDownList("DepartmentLists") now, how do i get the departments of selected school in dropdown boxes

    Read the article

  • useer degined Copy ctor, and copy-ctors further down the chain - compiler bug ? programers brainbug

    - by J.Colmsee
    Hi. i have a little problem, and I am not sure if it's a compiler bug, or stupidity on my side. I have this struct : struct BulletFXData { int time_next_fx_counter; int next_fx_steps; Particle particles[2];//this is the interesting one ParticleManager::ParticleId particle_id[2]; }; The member "Particle particles[2]" has a self-made kind of smart-ptr in it (resource-counted texture-class). this smart-pointer has a default constructor, that initializes to the ptr to 0 (but that is not important) I also have another struct, containing the BulletFXData struct : struct BulletFX { BulletFXData data; BulletFXRenderFunPtr render_fun_ptr; BulletFXUpdateFunPtr update_fun_ptr; BulletFXExplosionFunPtr explode_fun_ptr; BulletFXLifetimeOverFunPtr lifetime_over_fun_ptr; BulletFX( BulletFXData data, BulletFXRenderFunPtr render_fun_ptr, BulletFXUpdateFunPtr update_fun_ptr, BulletFXExplosionFunPtr explode_fun_ptr, BulletFXLifetimeOverFunPtr lifetime_over_fun_ptr) :data(data), render_fun_ptr(render_fun_ptr), update_fun_ptr(update_fun_ptr), explode_fun_ptr(explode_fun_ptr), lifetime_over_fun_ptr(lifetime_over_fun_ptr) { } /* //USER DEFINED copy-ctor. if it's defined things go crazy BulletFX(const BulletFX& rhs) :data(data),//this line of code seems to do a plain memory-copy without calling the right ctors render_fun_ptr(render_fun_ptr), update_fun_ptr(update_fun_ptr), explode_fun_ptr(explode_fun_ptr), lifetime_over_fun_ptr(lifetime_over_fun_ptr) { } */ }; If i use the user-defined copy-ctor my smart-pointer class goes crazy, and it seems that calling the CopyCtor / assignment operator aren't called as they should. So - does this all make sense ? it seems as if my own copy-ctor of struct BulletFX should do exactly what the compiler-generated would, but it seems to forget to call the right constructors down the chain. compiler bug ? me being stupid ? Sorry about the big code, some small example could have illustrated too. but often you guys ask for the real code, so well - here it is :D

    Read the article

  • Writing generic code when your target is a C compiler

    - by enobayram
    I need to write some algorithms for a PIC micro controller. AFAIK, the official tools support either assembler or a subset of C. My goal is to write the algorithms in a generic and reusable way without losing any runtime or memory performance. And if possible, I would like to do this without increasing the development time much and compromising the readability and maintainability much either. What I mean by generic and reusable is that I don't want to commit to types, array sizes, number of bits in a bit field etc. All these specifications, IMHO, point to C++ templates, but there's no compiler for it for my target. C macro metaprogramming is another option, but, again my opinion, that greatly reduces readability and increases development time. I believe what I'm looking for is a decent C++ to C translator, but I'd like to hear anything else that satisfies the above requirements. Maybe a translator from another high-level language to C that produces very efficient code, maybe something else. Please note that I have nothing against C, I just wish templates were available in it.

    Read the article

  • Hiding Command Prompt with CodeDomProvider

    - by j-t-s
    Hi All I've just got my own little custom c# compiler made, using the article from MSDN. But, when I create a new Windows Forms application using my sample compiler, the MSDOS window also appears, and if I close the DOS window, my WinForms app closes too. How can I tell the Compiler? not to show the MSDOS window at all? Thank you :) Here's my code: using System; namespace JTS { public class CSCompiler { protected string ot, rt, ss, es; protected bool rg, cg; public string Compile(String se, String fe, String[] rdas, String[] fs, Boolean rn) { System.CodeDom.Compiler.CodeDomProvider CODEPROV = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp"); ot = fe; System.CodeDom.Compiler.CompilerParameters PARAMS = new System.CodeDom.Compiler.CompilerParameters(); // Ensure the compiler generates an EXE file, not a DLL. PARAMS.GenerateExecutable = true; PARAMS.OutputAssembly = ot; PARAMS.CompilerOptions = "/target:winexe"; PARAMS.ReferencedAssemblies.Add(typeof(System.Xml.Linq.Extensions).Assembly.Location); PARAMS.LinkedResources.Add("this.ico"); foreach (String ay in rdas) { if (ay.Contains(".dll")) PARAMS.ReferencedAssemblies.Add(ay); else { string refd = ay; refd = refd + ".dll"; PARAMS.ReferencedAssemblies.Add(refd); } } System.CodeDom.Compiler.CompilerResults rs = CODEPROV.CompileAssemblyFromFile(PARAMS, fs); if (rs.Errors.Count > 0) { foreach (System.CodeDom.Compiler.CompilerError COMERR in rs.Errors) { es = es + "Line number: " + COMERR.Line + ", Error number: " + COMERR.ErrorNumber + ", '" + COMERR.ErrorText + ";" + Environment.NewLine + Environment.NewLine; } } else { // Compilation succeeded. es = "Compilation Succeeded."; if (rn) System.Diagnostics.Process.Start(ot); } return es; } } }

    Read the article

  • Marvell C++ compiler (for Windows CE) for building Qt

    - by vnm
    Hello, I was able to build Qt 4.5 for Windows CE (ARM4VI) using MS VisualC++ compiler. Now, I am trying to compile Qt 4.5 for Windows CE 5.0 using Marvel C++ compiler v 2.2 (former Intel C++ compiler for XScale architecture) for achieving some performance benefit. It seems, that this compiler not officially supported for building Qt by trolltech (no appropriate mkspec in mkspec's folder of Qt folder). So, my questions: Is it worth to trying build Qt by this compiler for achieving performance enhancement ? Is there any way for building Qt using Marvell C++ compiler (by creating my own mkspec or something like that)?

    Read the article

  • Uncovering Compiler Errors in ASP.NET MVC Views

    - by Ben Griswold
    ASPX and ASCX files are compiled on the fly when they are requested on the web server. This means it’s possible that you aren’t catching compile errors associated with your views when you build your ASP.NET MVC project in Visual Studio.  Unless you’re willing to click through your entire application, rendering each view looking for errors, you application is left a little vulnerable to user issues.  Fortunately, there’s a work around.  Open up your MVC project file in notepad or within the Visual Studio IDE by unloading the project and then editing the .csproj file (both actions are available by right-clicking on the Project Node in Solution Explorer.)  Notice the MvcBuildViews option.  It’s probably set to false.  Flip the value to true and you’ll magically start compiling your views when you build your application. <MvcBuildViews>false</MvcBuildViews> Taking this action will slow down your builds a bit, but if you’re a hack like me, it’ll probably save your day in the long run. Now you’re probably thinking, “Neat trick – how’s it work?”  Scroll down toward the bottom of your csproj file and you will notice the AfterBuild target triggers the AspNetCompiler action if the MvcBuildViews option is set to true.  <Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">   <AspNetCompiler VirtualPath="temp"                   PhysicalPath="$(ProjectDir)\..\$(ProjectName)" /> </Target> Great. One more thing. Let’s say you don’t want to slow down all of your builds, but you absolutely want to know if there are any compiler issues with your views before you commit your code to version control or deploy or whatever.  Here’s what you can do – change the AfterBuild condition to run if your configuration is set to Release mode.  <Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">   <!– Always pre-compile ASPX and ASCX in release mode –>   <AspNetCompiler VirtualPath="temp"                   PhysicalPath="$(ProjectDir)\..\$(ProjectName)" /> </Target> Now your debug mode builds will continue to be as fast as ever and you can quickly validate your views by building in release mode when you so choose.  There’s one little catch – this setup won’t consider the MvcBuildViews option whatsoever! So if you decide to go with this configuration, you might want to add a comment near the MvcBuildViews option letting other developers know they can change the MvcBuildViews option as much as they’d like but it’s not going to affect the AfterBuild action.  Or don’t include the comment and let your team members figure it out for themselves…

    Read the article

  • Why does Google's Closure Compiler leave a few unnecessary spaces or line breaks?

    - by Bungle
    I've noticed that every time I use Google's Closure Compiler Service, it leaves a few unnecessary spaces in the compiled code presented on the right-hand side of the page. These correspond to line breaks in the hosted version of the compiled code. For example (note the line breaks, each of which seems unnecessary): http://troy.onespot.com/static/stack_overflow/closure_spaces.js To date, I've just been removing them manually, but I'm curious why they're there. Is it to limit the line length of the hosted version of the code to make it more readable? Could the compiler be smart enough to leave or insert those intentionally to maximize GZIP compression efforts? I know that they have a trivial effect on the file size, but with so much effort going into minifying every last byte in the source script, it's counterintuitive why they're there.

    Read the article

  • Can the Perl compiler tell me if I have an unchecked exception in my code?

    - by Konerak
    Is there a way in Perl to declare that a method can throw an error (or die)? EDIT: What interests me the most is a way to get the compiler or IDE to tell me I have an unchecked exception somewhere in my code. I always loved how in Java, a method could handle an Exception and/or throw it. The method signature allows to put "throws MyException", so a good IDE/compiler would know that if you use said method somewhere in your code, you'd have to check for the Exception or declare your function to "throws" the Exception further. I'm unable to find something alike in Perl. A collegue of mine wrote a method which "dies" on incorrect input, but I forget to eval-if($@) it... offcourse the error was only discovered while a user was running the application. (offcourse I doubt if there is any existing IDE that could find these kind of things for Perl, but atleast perl -cw should be able to, no?)

    Read the article

  • How to use C to write a C compiler?

    - by israkir
    I am taking a compiler course this semester and we talked about this interesting thing in the class. Teacher used an example of p-code along with pascal to explain it. After google-ing a bit, I saw this phenomena is called self-hosting and naturally related to the first compilers. Ok, there is an interpreter which interprets the compiler source code written in its own language. But, there is still something missing in the explanations I found. I mean, there are some parts still looks mysterious (what about the interpreter? it is also a program, still need to be translated into machine code etc...) What I am asking you guys is that can you explain it as simple as possible or provide any online resource which you think that it explains this phenomena precisely..

    Read the article

  • user defined Copy ctor, and copy-ctors further down the chain - compiler bug ? programmers brainbug

    - by J.Colmsee
    Hi. i have a little problem, and I am not sure if it's a compiler bug, or stupidity on my side. I have this struct : struct BulletFXData { int time_next_fx_counter; int next_fx_steps; Particle particles[2];//this is the interesting one ParticleManager::ParticleId particle_id[2]; }; The member "Particle particles[2]" has a self-made kind of smart-ptr in it (resource-counted texture-class). this smart-pointer has a default constructor, that initializes to the ptr to 0 (but that is not important) I also have another struct, containing the BulletFXData struct : struct BulletFX { BulletFXData data; BulletFXRenderFunPtr render_fun_ptr; BulletFXUpdateFunPtr update_fun_ptr; BulletFXExplosionFunPtr explode_fun_ptr; BulletFXLifetimeOverFunPtr lifetime_over_fun_ptr; BulletFX( BulletFXData data, BulletFXRenderFunPtr render_fun_ptr, BulletFXUpdateFunPtr update_fun_ptr, BulletFXExplosionFunPtr explode_fun_ptr, BulletFXLifetimeOverFunPtr lifetime_over_fun_ptr) :data(data), render_fun_ptr(render_fun_ptr), update_fun_ptr(update_fun_ptr), explode_fun_ptr(explode_fun_ptr), lifetime_over_fun_ptr(lifetime_over_fun_ptr) { } /* //USER DEFINED copy-ctor. if it's defined things go crazy BulletFX(const BulletFX& rhs) :data(data),//this line of code seems to do a plain memory-copy without calling the right ctors render_fun_ptr(render_fun_ptr), update_fun_ptr(update_fun_ptr), explode_fun_ptr(explode_fun_ptr), lifetime_over_fun_ptr(lifetime_over_fun_ptr) { } */ }; If i use the user-defined copy-ctor my smart-pointer class goes crazy, and it seems that calling the CopyCtor / assignment operator aren't called as they should. So - does this all make sense ? it seems as if my own copy-ctor of struct BulletFX should do exactly what the compiler-generated would, but it seems to forget to call the right constructors down the chain. compiler bug ? me being stupid ? Sorry about the big code, some small example could have illustrated too. but often you guys ask for the real code, so well - here it is :D EDIT : more info : typedef ParticleId unsigned int; Particle has no user defined copyctor, but has a member of type : Particle { .... Resource<Texture> tex_res; ... } Resource is a smart-pointer class, and has all ctor's defined (also asignment operator) and it seems that Resource is copied bitwise. EDIT : henrik solved it... data(data) is stupid of course ! it should of course be rhs.data !!! sorry for huge amount of code, with a very little bug in it !!! (Guess you shouldn't code at 1 in the morning :D )

    Read the article

  • Make errors - can the gcc compiler warnings prevent a C file from being compiled into an object file

    - by Xolstice
    I'm trying to compile a wireless network card driver for my Linux box and I ran into a problem with the Make command. During the compilation process I normally see warnings on some of the C files that being are compiled; despite the warnings these files were still able to be compiled to an object file. When the Make process comes to a file called rtmp_wext.c however, the compiler generates a large number of warnings and then the whole Make process stops and returns an exit status of error 1, i.e. make: *** [rtmp_wext.o] Error 1. Usually I see an error with the C file for compilation to halt. This is the first time where it seems compiler warnings are preventing the file from being turned into an object file; is this possible or is something else the cause for the unsuccessful compilation?

    Read the article

  • JVM specification and Java compiler code useful for SCJP preparation ?

    - by BenoitParis
    I'm preparing the SCJP exam with the almost official study book ("SCJP Sun Certified Programmer for Java 6 Exam 310-065") I understand that Java programming is writting code that fulfills a certain high-level contract; So that Java can stay platform-independent. However, I have trouble understanding and remembering things when it comes to highly specific SCJP items (and they are numerous) The book stays high-level and does not provide examples of how one compiler would handle things. This is the same thing for runtime issues (JVM level): things are too much abstract for me. Rules often seems arbitrary and therefore, with no well defined purpose, are difficult to remember. Or maybe it's that sometimes I just don't get the underlying purpose. And here is the question: Would a JVM specification and/or some java compiler code help in preparing the SCJP? Have you had the need for such material or is the book sufficient enough? Also, please share the resources you used, apart from the book.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >