w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

thrust inclusive scan completes in debug build but fails in release build
My guess is that it is failing the debug case but passing in the release case. For debug build, Nsight EE normally includes the -G compiler switch. Thrust (device code) is often incompatible with the -G switch. If you remove the -G switch from the compile command, I believe your code will run normally -- it does for me. If that doesn't solve the issue, please provide the complete compile command line that Nsight EE is using for each case (debug and release) as well as which GPU you are running on, and CUDA version (5.0 or 5.5).

Categories : Debugging

Is it possible to build WinDBG extensions using Visual Studio?
Nothing particularly special in the case of WinDBG extensions - just build a DLL, with the right set of function names and calling convention, and off you go. So Visual Studion should be able to do that perfectly fine. You do need to produce your own .def file for the DLL to export the functions. This page describes how you do it using nmake. The same steps should be perfectly possible to do in VS. http://www.codeproject.com/Articles/6522/Debug-Tutorial-Part-4-Writing-WINDBG-Extensions

Categories : C++

Trying to install gem ferret for gem treat but cannot build native extensions
Due to seemingly insurmountable problems installing prerequisite gems, I am abandoning treat and moving to an alternative. Right now, I am looking at open-nlp because it is a current Ruby wrapper to the OpenNLP project. I'd prefer NLTK since it is the gold standard, but no Ruby wrapper exists as of yet that I can find. This is only an issue for treat under Windows, IFAIK, and even then only due to the prereqs. I've seen nothing that says treat isn't wonderful in other environments.

Categories : Ruby On Rails

running a 32 bit debug build dll in a win7 64 bit using C#
Did you try searching for the error online? Here is the first hit I got for an MSDN blog with a workaround. http://blogs.msdn.com/b/keithmg/archive/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a.aspx You may want to ask the third party to provide a fully signed DLL.

Categories : C#

Eclipse CDT has DEBUG defined in Release build
#undef DEBUG that directive will undefine things. edit: I'm aware you probably just want this for a specific IDE that's adding the define outside of the source files, finding that option in IDE settings is a better way to go about it, but this will also work if it's in a header which is included by all project files.

Categories : C++

How do I debug code pushed to my TFS build server?
Here's one way, Debug directly on the build server Connect to the build server manually through RDP Navigate to where the build downloaded the source to Open up the solution file(s) in Visual Studio, and in Test Explorer, right-click > Debug Selected Tests And another way if setting up networking for the VS Remote Debugger isn't a huge pain, Remote debug the tests on the build server Connect to the build server manually through RDP Start the Visual Studio Remote Debugging Monitor (needs to be downloaded/installed) On your own machine, open up the solution and set up the test project to run using the test runner (e.g. mstest) on the remote machine (see here for screenshots)

Categories : Unit Testing

How to debug a variable that is optimized away in Release build
If you debug release build the debugger will report bogus values or will not be able to display any values for most of your variables. The safest way to check that the value of a variable is in Release build is to use logging. So most probably your array is initialized in Release just as in Debug build but you are not able to see that through the debugger. It seems you have some other problem that is causing the code to crash in Release. Look for some other uninitialized variable or some stack corruption/index out of bounds access.

Categories : C++

Can I add VS2012 Buttons to Build in Debug vs. Release?
This sounds like it should be fairly easy to do as a Visual Studio Add-In. Add-ins are one of the lighter-weight ways to extend Visual Studio. You'll probably want to look into: How to create an add in How to add your add-in to a toolbar. You could also create your own dedicated toolbar if you wish. When your command gets called, you probably need to set the ConfigurationManager.ActiveConfiguration property to your desired configuration or the SolutionBuild.ActiveConfiguration property (you'll have to play around to see which one does what you want). Note that this does change the state of VS, so it may fire some other events in the IDE that happen when the build configuration changes. Then, just invoke the build as a named command (e.g. DTE.ExecuteCommand("Build.BuildSolution")). I

Categories : Visual Studio 2012

How can a static release lib be linked into a debug build?
It seems MS has started adding /FAILIFMISMATCH:"RuntimeLibrary line from vs2012. /FAILIFMISMATCH itself is introduced in vs2010. I've chekced Gameplay Project sln file and it is using vs2010. Try to use vs2010 and see if the directive is gone. I think you already know this but it doesn't really matter if the directive is there or not because you must match the runtime library compile option anyway.

Categories : C++

ruby-debug-base19 :Failed to build
ruby-debug19 is not maintained anymore. But there's an alternative: debugger Open your Gemfile See if there's something like this... gem 'ruby-debug19', :require => 'ruby-debug' Comment it out, and use 'debugger' instead #gem 'ruby-debug19', :require => 'ruby-debug' gem 'debugger' It is included in the rails Gemfile since 3.2.something to replace ruby-debug19. It has the exact same functionality and is actively maintained.

Categories : Ruby On Rails

How to debug tests from a Maven build in Eclipse?
A package or install is meant to be an atomic action that really shouldn't be stopped for debugging (unless you're debugging a maven plug-in). You ought to be able to debug the tests by selecting the Eclipse project and doing a "Debug As -> JUnit Test", though.

Categories : Java

How can I determine if production ASP.NET site is running with a debug build?
Try a function like this: function Test-DebugAssembly($path) { $assembly = [Reflection.Assembly]::LoadFile("$path") $attr = $assembly.GetCustomAttributes([Diagnostics.DebuggableAttribute], $false) if (!$attr) { $false } else { $attr.IsJITTrackingEnabled } }

Categories : Asp Net

Visual Studio - Make debug build strict
I would try the following: Build release with debug info with turned off optimizations. In fact, it will be debug build but without debug MACRO. Sometimes it helps. App Verifier. It will raise an exception with explanation when you do something wrong with handles or critical sections. If nothing helps – try to debug release mode. Just run it under debugger. Depending on optimizations you may see the exception’s call stack and try to use some logging more precisely for further debugging.

Categories : C++

why It works the debug build but the release only when I run it in Visual Studio?
The problem could be different behavior of the heap when the program is started from the debugger. Check this question, and the answer: Differences between running an executable with Visual Studio debugger vs without debugger

Categories : Visual Studio 2010

VS2012 MVC - why my session was fixed whenever I build the project for debug
Solution: There are there different session states in ASP.NET http://msdn.microsoft.com/en-us/library/ms178586(v=VS.80).aspx In-Process Mode The defaul one is <sessionState mode="InProc" timeout="10" />, the session will be clear after rebuild the project State Server Mode we can use this, but remember to turn the services - ASP.NET State Service <sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" sqlConnectionString="data source=.SQLEXPRESS; User ID=sa;Password=12345678; Integrated Security=SSPI" cookieless="false" timeout="2" /> SQL Server Mode we can use this after create a DB ASPSate by command, pls check this site for details - http://www.brianstevenson.com/blog/aspstate-concurrently-running-for-net-1011-and-net-20 <sessionState

Categories : Asp Net Mvc

Floating point differences depending on how debug build is run
Do I have just have to accept this as a fact of life or is there any advice you can offer? You have to accept it as a fact of life. Floating point code can be optimized differently in different situations. In particular, in some cases the JIT compiler can use a representation with more precision/accuracy (e.g. 80-bit floating point) for operations. The situations under which the JIT compiler will do this will depend on the architecture, optimization settings etc. There can be any number of subtleties about what you do with a variable (and whether it's a local variable or not) which can affect this. Running under a debugger affects JIT optimization settings very significantly in general - not just for floating point - so I'm not at all surprised by this. If you perform floating point

Categories : C#

OpenCV Build ok, debug throws error, runs fine from .exe
Do you get the unhandled exception before main? If not, then your code is somehow doing something to raise the exception. Put a breakpoint on the first line, then hit F5, then once at the breakpoint, step through the code one line at a time to see which one causes the exception, F10 key to do this. My gut feeling is that when running from the debugger, the cv::imread is failing since it is not finding the img1.jpg from the expected location, the current working directory is that of the solution file, not of the debug output build dir. You can do a quick test and copy the img1.jpg to the dir containing the sln file and see if that fixes the problem.

Categories : C++

Can I combine a release and debug build of a static library into one binary?
No, you can't. The reason is you would get duplicate symbols. A universal library is also no option, since the OS selects different binaries depending on the current architecture. You can however build two libraries distinguished by name, e.g.: libFoo.a and libFoo_debug.a and ship those two to your clients. Then, the client application will simply link against the respective library (per build settings in "Other Linker Flags") in the Debug and Release Configuration. This setup needs to be made just once.

Categories : IOS

Visual Studio 2012 use debug libraries instead of release during build
Check the Configuration screen to see whether you solution "release" configuration is configured to build some "debug" configurations for a number of projects. As you can see in this screenshot, they don't have to be configured the same for both levels. See: http://msdn.microsoft.com/en-us/library/vstudio/kkz9kefa.aspx I suspect you've already checked all these properties, but might have missed some options? If all else fails, have you tried to do a Clean build or a build from the commandline to verify that at least that works?

Categories : Dotnet

Is the .NET garbage collector less aggressive on Release build WITH debug symbols?
What you are reading applies to code compiled in debug mode, or to some extent, code running with a debugger attached. Having debug symbols is just a side effect of compiling in debug mode, the debug symbols themselves doesn't change the behaviour. The garbage collector extends the lifetime of variables in the debug mode from variable usage to variable scope. This is based on the presence of a debugger, not on the presence of debug symbols.

Categories : Dotnet

Can Opera Speed Dial extensions communicate with regular extensions?
Yes, you can use messaging to make the speed dial JS communicate with the background process. It works the same as normal message works in chromium based extensions. Check out: http://dev.opera.com/extension-docs/tut_message_passing.html http://dev.opera.com/extension-docs/tut_sd_extensions.html

Categories : Misc

Writing debug build only assertion function ignoring side-effects
In C++11 you can use lambda expressions. It is likely that constant propogation will make it so that is_debug is never evaulated, and even if it is, the lambda is not called. class Debug { enum { is_debug = 1; } }; template <class F> void assert(F f) { if (is_debug && !f()) abort(); } { int x = 6; assert([&]() { return x == 6; }); }

Categories : C++

C# extensions for asp.net, what is the standard practice for placing the extensions file?
2) I'd normally place the extensions in the library project. You can use extensions from other libraries provided that the namespace of the extension class is in a using declaration for the code you're currently writing (indeed, that's how LINQ works) 3) I'd normally place extensions for different types into different files. In much the same way that you can have multiple top-level types in the same file, but the general convention is to place them in separate files. It just feels cleaner, and gives you less code to look through. It doesn't affect the experience of the code that consumes the extensions though.

Categories : C#

Qt Application shows build error in Debug mode, OK in release mode
When you installed qt, did you configure it to install static debug libraries also. If not then try reconfiguring and reinstalling it. In windows, I think you installed from a preconfigured, precompiled binary that may not have static debug support. Try downloading the source and then configure and compile it according to your needs

Categories : Qt

Remote gradle debug on build.gradle file from Eclipse IDE
It's a known limitation that Gradle build scripts can't currently be debugged in IDEs. I'm not aware of the specific error though. Usually the debugger just doesn't stop at the breakpoint (but it will stop at breakpoints for user-defined plugin/task classes and Gradle classes).

Categories : Eclipse

Devexpress mvc extensions. Whether these extensions are server side or client side?
That depends on what you mean by "are server side or client side". It is not a pure Javascript library. They use features of the MVC framework in order to do their magic, so I'd say they are both (but not just one side). More specifically, they implement custom controls that you include in your views. The controls have settings and such that you set on server side. However, the code generated relies on Javascript so they run on the client (using ajax calls when necessary). See documentation and examples here: link

Categories : Asp Net Mvc

Cannot Debug I/DEBUG(187): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000004
A random position of the crash often happens when the stack is corrupted, so you should look carefully for your local variables. For example, overwriting an array of length N with M or something like this.

Categories : Android

How to create a two or three different build using Gradle build system, each build pointing to different server?
(If I understand) I would use an external executable that prepare a batch file for each build. The .bat file calls gradle passing a variable (conaining the key) to it: gradle assemble -Pkey=%key% Now, inside the gradle script you can get the value of the variable: def varKey = "$key" and you can use it to sign the apk: signingConfigs { release { storeFile = file('../key.keystroke') storePassword = varKey keyAlias = "My key" keyPassword = varKey } } EDIT: Ok, the previous text is useful to sign the apk file with different keys. To edit the server url using gradle, first you need to store the url and api key into a resource string and use from inside the java class instead of the hard coded strings: <resources> <str

Categories : Android

Linking Libraries in VxWorks Debug and non Debug Modes
I have the same problem and I solved using a local variable thats generate the vxworks at the makefile called MODE_DIR, that will be replace with "Debug" or "NonDebug" So go to the properties of your RTP >> Build Porperties >> Libraries and then at the path of your librariy, in this case "Example" -L/Lib_output_path/Example/Example/$(MODE_DIR) -lExample

Categories : Debugging

Should python debug statements etc be wrapped by if debug?
There is no need for additional checks. Just configure your logging level: >>> import logging >>> root = logging.getLogger() >>> root.setLevel(logging.INFO) >>> root.addHandler(logging.StreamHandler()) >>> logging.error("test") test >>> logging.debug("test") >>> Again, there is no need for additional checks (the source code taken from logging/__init__.py): class Logger(Filterer): ... def debug(self, msg, *args, **kwargs): """ Log 'msg % args' with severity 'DEBUG'. To pass exception information, use the keyword argument exc_info with a true value, e.g. logger.debug("Houston, we have a %s", "thorny problem", exc_info=1) """ if self.isEnabledFor(DEBUG):

Categories : Java

Why do I get the same ID suffix for p:tab children?
Because there's only one <p:tab> component which generates the very same piece of HTML multiple times depending on the current iteration round of <p:tabView value>. If you're bothered about the autogenerated ID, just give <p:tab> a fixed ID. <p:tab id="tab" ...> If you worry about distinguishing tabs by a fixed ID in e.g. JavaScript, then just put its content in a plain HTML <div> whose id is generated based on the currently iterated item. E.g. <p:tab ...> <div id="#{tab.name}"> ... </div> </p:tab>

Categories : JSF

Suffix to a variable
You need to put your path in quotes for it to work. New-Item "$workingDirectory emp.csv" -type file You can find out more about escaping characters by typing this command in the powershell console window PS C:> Help about_escaping_characters

Categories : Powershell

what is this perl expression "$DEBUG>=3 && DEBUG("OK=$ok");"?
$DEBUG must be at 3 or more and the return Value from the sub DEBUG must be true as well. True means, that its not undef 0 "" "0" Any blessed objects that overload conversion to boolean to return false Empty arrays and empty hashes Boolean parts with subs will be executed as well. So that if your expression is inside an if clause, the return value will be the part of that expression. Eg. sub test { return 1; } if ( $abc >2 && test() ) { ... }

Categories : Perl

Is ext-all-debug.js equivalent to ext-all.js plus debug statements?
The ext-all.js is the minified version of the ext-all-debug.js. The ext-all.js version gain is that it greatly reduces the files size so that clients have to download less on the non-debug version. The ext-all-debug.js is provided so that you can debug through the extjs code. So they don't have any diference, such as added console.log's

Categories : Extjs

How to get the only suffix part of domain?
You can use something like this if you want the last part of the domain $name = 'www.birdslisten.org'; $array = explode(".", $name); end($array); $suffix = current($array); echo $suffix;

Categories : PHP

What does _REV suffix mean in OpenGL?
A part of explanation found on : http://www.informit.com/articles/article.aspx?p=2033340&seqNum=3 Section Packed Data Packed Data Formats for Vertex Attributes Going back to the glVertexAttribPointer() command, you will notice that the allowed values for the size parameter are 1, 2, 3, 4, and the special token GL_BGRA. Also, the type parameter may take one of the special values GL_INT_2_10_10_10_REV or GL_UNSIGNED_INT_2_10_10_10_REV, both of which correspond to the GLuint data type. These special tokens are used to represent packed data that can be consumed by OpenGL. The GL_INT_2_10_10_10_REV and GL_UNSIGNED_INT_2_10_10_10_REV tokens represent four-component data represented as ten bits for each of the first three components and two for the last, packed in reverse order into

Categories : Opengl

Why should we have a suffix after a number in this case?
You don't have to. Both the suffix and the explicit type declaration give the compiler information about how to store the variable. You would need the suffix if you were doing this instead: var uintnum = 7u; var longnum = 7l; var ulongnum = 7ul;

Categories : C#

How to order a ls output by suffix?
ls ... |awk -F'[_/]' '{f=$(NF-1)>f?$(NF-1):f}END{print f}' will give you 106 to sort by suffix: ls..|awk -F'[_/]' '{print $(NF-1), $0}'|sort -n|sed 's/.* //' note that the awk|sort|sed chain is not necessary, awk can do it alone, (by asort/asorti). but it came up first, dirty (I know) and quick. if the file/dir name has space, it may not work. but it is fixable. e.g. use a invisible char as separator.

Categories : Bash

Suffix Array Algorithm
Overview This is an O(n log n) algorithm for suffix array construction (or rather, it would be, if instead of ::sort a 2-pass bucket sort had been used). It works by first sorting the 2-grams(*), then the 4-grams, then the 8-grams, and so forth, of the original string S, so in the i-th iteration, we sort the 2i-grams. There can obviously be no more than log2(n) such iterations, and the trick is that sorting the 2i-grams in the i-th step is facilitated by making sure that each comparison of two 2i-grams is done in O(1) time (rather than O(2i) time). How does it do this? Well, in the first iteration it sorts the 2-grams (aka bigrams), and then performs what is called lexicographic renaming. This means it creates a new array (of length n) that stores, for each bigram, its rank in the bigra

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.