Search Results

Search found 1596 results on 64 pages for 'tim fraud'.

Page 40/64 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • How to label each equation in align environment?

    - by Tim
    Hi, I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only the first equation can be referred later. Thanks and regards!

    Read the article

  • How to test if a gawk string contain a number?

    - by Tim Menzies
    In gawk I know two ways to test if a string contains a number. Which is best? Method one: using regular expressions: function method1(x) { return x ~ /^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?$/ } Method two: the coercion trick (simpler): function method2(x) { return (x != "") && (x+0 == x) } Is there any reason to favor the more complex method1 over the simpler method2?

    Read the article

  • Make Ant's delete task fail when a directory exists and is not deleted but not when it doesn't exist

    - by Tim Visher
    I have tho following clean function in my build script and I'd like to know how I can improve it. <target name="clean" description="Clean output directories."> <!-- Must not fail on error because it fails if directories don't exist. Is there really no better way to do this? --> <delete includeEmptyDirs="true" failonerror="false"> <fileset dir="${main.build.directory}" /> <fileset dir="dist" /> <fileset dir="${documentation.build.directory}" /> <fileset dir="/build-testing" /> </delete> </target> Specifically regarding my comment, I'm unhappy with the fact that I can't run this on a fresh box because the directory structure hasn't been set up yet by the other targets. We run the build in such a way that it entirely recreates the structures necessary for testing and deployment every time to avoid stale class files and such. With the way that delete currently is set up, a failure to delete a file does not fail the build and I'd like it to. I don't want it to fail the build if the file doesn't exist though. If it doesn't exist then what I'm asking it to do has already happened. Thoughts?

    Read the article

  • BinaryWriterWith7BitEncoding & BinaryReaderWith7BitEncoding

    - by Tim
    Mr. Ayende wrote in his latest blog post about an implementation of a queue. In the post he's using two magical files: BinaryWriterWith7BitEncoding & BinaryReaderWith7BitEncoding BinaryWriterWith7BitEncoding can write both int and long? using the following method signatures: void WriteBitEncodedNullableInt64(long? value) & void Write7BitEncodedInt(int value) and BinaryReaderWith7BitEncoding can read the values written using the following method signatures: long? ReadBitEncodedNullableInt64() and int Read7BitEncodedInt() So far I've only managed to find a way to read the 7BitEncodedInt: protected int Read7BitEncodedInt() { int value = 0; int byteval; int shift = 0; while(((byteval = ReadByte()) & 0x80) != 0) { value |= ((byteval & 0x7F) << shift); shift += 7; } return (value | (byteval << shift)); } I'm not too good with byte shifting - does anybody know how to read and write the 7BitEncoded long? and write the int ?

    Read the article

  • Automatic annotation for matlab plot?

    - by Tim
    Hi I have quite a few points plotted in a figure. I am now using annotation() function to add annotation in the same way for these points based on their locations. See my previous question. However they tend to mess up where the points are close to each other. Is there some function available to position the annotations as apart as possible? Thanks and regards!

    Read the article

  • braces for Math in LaTeX

    - by Tim
    Hi, Is there any convenient way to type in braces in Math in Latex? Especially when I have already typed in a lot of "(" and ")" instead of "\left(" and "\right)", how can I do a quick replacement? similarly for "{" and "}" and "[" and "]"? Is it important to make such changes? I am writing a thesis. Thanks and regards! BTW: I mainly edit latex file in Texmaker and I know how to use emacs.

    Read the article

  • Recognize Dates In A String

    - by Tim Scott
    I want a class something like this: public interface IDateRecognizer { DateTime[] Recognize(string s); } The dates might exist anywhere in the string and might be any format. For now, I could limit to U.S. culture formats. The dates would not be delimited in any way. They might have arbitrary amounts of whitespace between parts of the date. The ideas I have are: ANTLR Regex Hand rolled I have never used ANTLR, so I would be learning from scratch. I wonder if there are libraries or code samples out there that do something similar that could jump start me. Is ANTLR too heavy for such a narrow use? I have used Regex a lot before, but I hate it for all the reasons that most people hate it. I could certainly hand roll it but I'd rather not re-solve a solved problem. Suggestions? UPDATE: Here is an example. Given this input: This is a date 11/3/63. Here is another one: November 03, 1963; and another one Nov 03, 63 and some more (11/03/1963). The dates could be in any U.S. format. They might have dashes like 11-2-1963 or weird extra whitespace inside like this: Nov   3,   1963, and even maybe the comma is missing like [Nov 3 63] but that's an edge case. The output should be an array of seven DateTimes. Each date would be the same: 11/03/1963 00:00:00.

    Read the article

  • Detect aborted connection during ASIO request

    - by Tim Sylvester
    Is there an established way to determine whether the other end of a TCP connection is closed in the asio framework without sending any data? Using Boost.asio for a server process, if the client times out or otherwise disconnects before the server has responded to a request, the server doesn't find this out until it has finished the request and generated a response to send, when the send immediately generates a connection-aborted error. For some long-running requests, this can lead to clients canceling and retrying over and over, piling up many instances of the same request running in parallel, making them take even longer and "snowballing" into an avalanche that makes the server unusable. Essentially hitting F5 over and over is a denial-of-service attack. Unfortunately I can't start sending a response until the request is complete, so "streaming" the result out is not an option, I need to be able to check at key points during the request processing and stop that processing if the client has given up.

    Read the article

  • Program crashes in debugger before anything happens

    - by Tim
    I'm building an application for Windows XP using the MinGW tool chain and it sometimes crashes unexpectedly. So, I'm trying to use a debugger (Gdb) but the program exits with code 03 before anything happens. In fact, all I see from GDB is: [New thread 3184.0x7b8][New thread 3184.0xef8] Program exited with code 03. My suspicion is that there is some failed dynamic linking of a dependency (which are Qt, VTK, and ITK, all built with MinGW). However, this does not happen when I just run the program normally. Or if it happens, it appears to be intermittent and well after the program is launched and running. NOTE: I'm also using Cmake for cross compiling. What should I do? What can I try?

    Read the article

  • How to detect an overflow in C++ ?

    - by Tim
    Hi, I just wonder if there is some convenient way to detect if overflow happens to any variable of any default data type used in a C++ program during runtime? By convenient, I mean no need to write code to follow each variable if it is in the range of its data type every time its value changes. Or if it is impossible to achieve this, how would you do? For example, float f1=FLT_MAX+1; cout << f1 << endl; doesn't give any error or warning in either compilation with "gcc -W -Wall" or running. Thanks and regards!

    Read the article

  • type of an array

    - by Tim
    Hi, when I need to pass an array to a function, it seems all the following declarations of the function will work void f(int arr[]) void f(int arr[4]) // is this one correct? for this: int a[]={1,2,3,4}; f(a); But when I assign an array to another array, it fails int a[]={1,2,3,4}; int b[4] = a; // error: array must be initialized with a brace-enclosed initializer So why an array passed as an argument of a function is okay, but used on the rhs of simple assignment is wrong? Thanks!

    Read the article

  • watchpoint in GDB

    - by Tim
    Hi, If I set a watchpoint for a variable local to the current scope, it will be auto deleted when going out of the scope. Is there any way to set it once and keep it auto alive whenever entering the same scope? Is there anyway to set conditional watchpoint, like "watch var1 if var1==0"? In my case, the condition does't work. gdb stops whenever var1's value is changed, instead of untill "var1==0" is true. My gdb is GNU gdb 6.8-debian. Thanks and regards!

    Read the article

  • Uiimport does not save variable to base workspace

    - by Tim
    I tried using uiimport to load a file to the base workspace.....It worked first time....but after trying again after a while...I wasnt seeing the variable in the base work space. I used the default variable name which is given by 'uiimport". This was the command I used: uiimport(filename) And two variables where created by default..."data" and "textdata"(which is the header)....but now when i run it is no longer saved in the base workspace I do not want to assign a variable to the uiimport like so... K = uiimport(filename) assignin(base,'green',K) I do not want to do that because My dataset has a text header and the data itself, and doing this would assign both "textdata" and "data" to "green" variable How would I be able to get the dimensions of ONLY the "data" in green and how would I pass only "data"(which is in the green variable in the workspace.."rmbr"...the green variable holds both "data" and "textdata") to another function. I was able to do all this when the uiimport automatically saved the variables in the base workspace....but somehow now it doesn't. I would appreciate any help or tips on this matter

    Read the article

  • Link User32 with gcc

    - by Tim Cooper
    I have a C program which has a function call that is defined in windows.h (which I have included), however, when I try and compile it with gcc, I get the error: warning: implicit declaration of function `LockWorkStation' I looked at the MSDN documentation and I see that this function is the User32 library file, and I was wondering how I would go about linking that to my file.

    Read the article

  • Problem linking SDL_Image against libpng

    - by Tim Jones
    I'm trying to compile SDL_Image 1.2.10 with MinGW + MSys (gcc 4.5.0) on Windows, I have compiled all the requires libs (zlib 1.2.5, libpng 1.4.2, libjpeg 8a, libtiff 3.9.2). SDL_Image compiles fine, but fails to link to libpng, throwing .libs/IMG_png.o:IMG_png.c:(.text+0x16): undefined reference errors on various png structs. If I run ./configure --prefix=/mingw --disable-png for SDL_Image, it compiles and links against the other libs just fine. I have tried older versions of libpng (1.2.43), but they also caused SDL_Image to throw the same errors.

    Read the article

  • Enumerable Contains Enumerable

    - by Tim
    For a method I have the following parameter IEnumerable<string> tags and with to query a list of objects, let's call them Post, that contains a property IEnumerable<string> Tags { get; set; }. My question is: How do I use linq to query for objects that contains all the tags from the tags parameter? private List<Post> posts = new List<Post>(); public IEnumerable<Post> GetPostsWithTags(IEnumerable<string> tags) { return ???; }

    Read the article

  • Selecting a radio button when a dropdown value changes

    - by Tim F.
    My setup is something like this: radiobutton1 - selection1 radiobutton2 - selection2 textinput1 I want radiobutton1 to be selected whenever selection1 is changed, and I want radiobutton2 to be selected whenever either selection2 or textinput1 is changed. There has to be a simple javascript solution here... I just can't find it. Here's my actual code ("$semopt" is a string holding the html code for the options on the first selection input): <input type='radio' name='semester' value='existing'/>Existing semester: <select name='sem_id'">$semopt </select><br/> <input type='radio' name='semester' value='new'/>New Semester: <select name='sem_name'"> <option value='Fall'>Fall</option> <option value='Spring'>Spring</option> </select> <input name='sem_year' value='$thisyear' size='5'"/><br/>

    Read the article

  • questions about name mangling in C++

    - by Tim
    I am trying to learn and understand name mangling in C++. Here are some questions: (1) From devx When a global function is overloaded, the generated mangled name for each overloaded version is unique. Name mangling is also applied to variables. Thus, a local variable and a global variable with the same user-given name still get distinct mangled names. Are there other examples that are using name mangling, besides overloading functions and same-name global and local variables ? (2) From Wiki The need arises where the language allows different entities to be named with the same identifier as long as they occupy a different namespace (where a namespace is typically defined by a module, class, or explicit namespace directive). I don't quite understand why name mangling is only applied to the cases when the identifiers belong to different namespaces, since overloading functions can be in the same namespace and same-name global and local variables can also be in the same space. How to understand this? Do variables with same name but in different scopes also use name mangling? (3) Does C have name mangling? If it does not, how can it deal with the case when some global and local variables have the same name? C does not have overloading functions, right? Thanks and regards!

    Read the article

  • Cannot pull newly-added top-level directory into sparsely-checked out SVN repository

    - by Tim Keating
    Our SVN repository is quite large, and pulling the whole thing takes some time. When checking out at home, I was pleased to discover the sparse checkout feature; I checked out the whole repository to a depth of 1, then pulled each top-level directory (directly under the trunk) that I needed to a depth of infinity. Until now this has been brilliant. Recently I added a new directory under trunk. When I do a svn up, I get nothing. The TLD I added will not sync. I normally use Tortoise SVN, so I tried doing this from command line. I tried explicitly specifying the name of the directory, adding --depth infinity, adding --force. None of these tricks has worked. What am I missing?

    Read the article

  • MS Access (2010) Enable Design View

    - by Tim GONELLA
    I downloaded the Access template below for doing a home inventory: http://office.microsoft.com/en-us/templates/results.aspx?qu=home%20inventory&ex=1&queryid=0d245f2a%2Dacdc%2D4161%2D92c8%2D8ba16a52ab32&AxInstalled=1&c=0#ai:TC101918100| The design view is not visible, which is a bit of a nuisance. Things I've tried: 1) In options/options/current database/ the check boxes (enable layout view & enable design changes for tables in Datasheet view) are both greyed out. 2) I've unblocked the file using Right-Click-Properties. 3) I've tried copying/exporting the objects to another database. But can only copy/export the tables. 4) I've tried holding shift when opening the DB. 5) Enabling all trust permissions etc. None of these work Does anybody have any suggestions. (I'm using Office 2010) Thanks

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >