Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 168/841 | < Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >

  • sql query to incrementally modify where condition until result contains what is required

    - by iamrohitbanga
    I need an sql query to select some items from a table based on some condition which is based on a category field. As an example consider a list of people and I fetch the people from a particular age group from the database. I want to check if the result contains at least one result from each of a number of categories. If not I want to modify the age group by extending it and check the results again. This is repeated until I get an age group for which one result is present for each category. Right now i am doing this by analyzing the results and modifying the sql query. So a number of sql select queries are sent. What is the most efficient way of doing this? I am invoking the select queries from a java program using jdbc. I am using mysql database.

    Read the article

  • Best way to find updates in xml feed

    - by misterjinx
    Hello all, I have an xml feed that I have to check periodically for updates. The xml consists of many elements and I'm looking to figure it out which is the best (and probably faster) way to find out which elements suffered updates from last time I've checked. What I think of is to check first the lastBuildDate for modifications and if it differs from the previous one to start parse the xml again. This would involve keeping each element with all of its attributes in my database. But each element can have different number of attributes as well as other nested elements. So if it would be to store each element in my database what would be the best way to keep them ? That's why I'm asking for your help :) Thank you.

    Read the article

  • Visual Studio ignore try catch - debug only

    - by Praesagus
    I think error handling is a good idea. :) When debugging it can get in the way - especially with nice user friendly messages. In VB6 I could just check a box for the compiler to ignore my error handling. I found the dialog that allows me to do something similar in VS, but it's about 10,000 check boxes instead of one - which is too many to change every time I want a production compilation. Is there a way to set VS up so when I am in debugging mode I get one set of conditions and when I am in production I get another? ...or is there just another method to handling errors and debugging more efficiently? Thanks

    Read the article

  • How do I keep folders synced and backed up between two macs using a Linux NAS (rsync?)

    - by Hultner
    I've got two primary computers, one Mac Pro and one MacBook Pro for when I'm on the go. I've also got a Linux sever which also acts as NAS. Currently I backup the entire computers to an external drive with Time Machine which is rather useless and doesn't sync anything. What I really want to do is to keep my important files synced between both computers and my NAS (which is running RAID 5), that way I'm not backing up easily replaceable systemfiles and I've got all my important files in 3 places where two of them are running raid so at least 5 drives would have to crash at the same time before actual data loss occur. Folders I want to keep synced is basically my photo, documents, development, mamp and work folders and then I want to keep the user library folder backed up but not synced. I'm thinking that I'd have to use rsync but don't know how. Before suggesting Dropbox and similar suggestions I don't want to use them because of several reasons some of them being security (Dropbox obviously proved this), Speed (sometimes I'll sync gigabytes of data and that will be significantly faster locally and probably even through VPN as I have a Gigabit pipe), Space (space on my NAS is cheap and only practically limited by my needs), reliability (even if my internet were to go down I still need to be able to keep my files synced incase I'd need to go somewhere on the fly), price (I already have all the hardware and for the amount of gigabytes and bandwidth I'd need I doubt that there's any free or cheap service). Those are my main reason for wanting to keep it locally. I'm sorry for any spelling or grammatical mistakes that I've might have done. I'm writing this on my smartphone from a shaky train and English isn't my mother tongue. I gratefully appreciate any answers even if only partly solving my problem.

    Read the article

  • Libreoffice Calc run macro with HYPERLINK

    - by Kurt Borno
    I'm trying to use hyperlinks instead of buttons to run Basic macros. It seems to be more natural to me because hyperlinks are directly connected to a cell and buttons are not. I'm using the following Formula: =HYPERLINK("vnd.sun.star.script:Standard.Module1.Test?language=Basic&location=document";"Check") It should call the Subroutine Test placed in the document's macros under Standard.Module1 and display the Text 'Check' in the Cell it is written. This works absolutely fine with libreoffice 3.6.1.2 but it doesn't work at all with version 4.1.4.2. I can't see any errors it just happens nothing at all. I tried to simply click the Hyperlink and also to hold CTRL and click it. Same result - nothing. When I use a button the macro works as expected. Does anyone know how to solve this problem?

    Read the article

  • Find out if assembly is signed with Authenticode

    - by crauscher
    I use an assembly of a 3rd party vendor. In an older version this assembly used authenticode. This caused the assembly loading to last quiet long. The developer of the vendor told me that the new version is not signed with authenticode. How can I check if this is true. On my development machine the assembly loading was quiet fast. Only on client machines it took quiet a while. Is it possible to check this using a network sniffer? Regards

    Read the article

  • Sql Server 2008 Install

    - by Steve
    I already have Visual Studio 2008 installed. When installing developer Sql Server 2008, do I need to check the Business Intelligence Development Studio option? I'm guessing not. I assume if I already have VS 2008, the install will just add the relevant Sql Server related project types into VS 2008. EDIT: I marked the question answered before I did the install - I've installed Sql Server before and I thought this was what happened, but on doing this install, leaving the BI studio option unchecked does NOT install the SQL Server projects in Visual Studio. I had to go back and install it, so the answer is... Check it! I was overthinking the install - it's smart enough not to install VS twice.

    Read the article

  • Asyncronously receiving data in an ASP.NET MVC application

    - by Mitciv
    I'm looking for the best way to constantly check if data has been sent to our ASP.NET MVC application from a server. I would like to asynchronously check for data and update the view when data has been read. I'm currently using a TcpClient to make a connection, and making the connection in the inherited custom base controller. Currently though I have to refresh the page for the updating of the view to take place. Would there be a proper AJAX solution? or do I need to move the connection to the ActionMethod?

    Read the article

  • Using Regex.Replace() to replace text in a string

    - by aspdotnetuser
    Hi, I want to use Regex.Replace() to loop through a string containing words that are separated by '//' to check if any of the words match a string value which has been passed to the method. Here's my code at the moment: public void CheckText(string text) { //Check text entered by user string wordList = "word1//word2//word3 etc..."; string replaceString = "matched"; if (!string.IsNullOrEmpty(wordList)) { return Regex.Replace(text, wordList); //How do I implement this part? } } Please could someone help me with this? Any help/comments will be appreciated! Thanks,

    Read the article

  • Slug ID's with the same name?

    - by James Jeffery
    I want to create slug URL's from a users title in my system. If a user types "The best way's to get slim; period!", then I want the slug to be "the-best-ways-to-get-slim-period". Also, if someone has already created a page with that title I want the slug to be "the-best-ways-to-get-slim-period-1". My question is how can I check the database before a record is created? Ok, obviously I am going to have to perform a check in the database, and then a write. That's 2 queries. Is this the normal way to do it? Also, are there any conventional regular expressions for filtering non alpha/number characters and replacing spaces with hyphens? Any help is much appreciated. Thanks.

    Read the article

  • Clearquest Database Timeout

    - by onaclov2000
    I have a tool that is setup to query our Clearquest Database to return information to the user automatically every 9000 milliseconds. I came in today and the connection had timed out over the weekend, I found in the oSession object a "check heartbeat" function, but I'm not sure that is what I want to use to determine if i need to "re-login", I saw a db.timeoutinterval, but I can't seem to find any good reference on how to call it, since the oSession Object doesn't actually call it, and any references in the API guide mention it with regard to actually creating the db using the adminsession object. What "object" do I need to create to access the timeout interval and how? Thank you for the help! Or is it better to use the "check heartbeat function" and will it return a true or false depending on current state of login?

    Read the article

  • Apache times out after 2 minutes, when Apache TimeOut is 1200

    - by Robert Gowland
    We have a set up where the browser makes an http request to Box A which in turn makes an http request to Box B. What we're encountering is that Box A waits for Box B to respond for two minutes then the users sees: The page cannot be displayed Explanation: There is a problem with the page you are trying to reach and it cannot be displayed. Try the following: * Refresh page: Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion. * Check spelling: Check that you typed the Web page address correctly. The address may have been mistyped. * Access from a link: If there is a link to the page you are looking for, try accessing the page from that link. Technical Information (for support personnel) * Error Code: 404 Not Found. The requested item could not be located. (12028) Watching the logs on Box B we see that it takes 5 minutes to do the work requested. The problem is that the apache time outs on both boxes are set 1200 (20m), not 120 (2m). Any ideas where to look?

    Read the article

  • Mercurial hook to disallow committing large binary files

    - by hekevintran
    I want to have a Mercurial hook that will run before committing a transaction that will abort the transaction if a binary file being committed is greater than 1 megabyte. I found the following code which works fine except for one problem. If my changeset involves removing a file, this hook will throw an exception. The hook (I'm using pretxncommit = python:checksize.newbinsize): from mercurial import context, util from mercurial.i18n import _ import mercurial.node as dpynode '''hooks to forbid adding binary file over a given size Ensure the PYTHONPATH is pointing where hg_checksize.py is and setup your repo .hg/hgrc like this: [hooks] pretxncommit = python:checksize.newbinsize pretxnchangegroup = python:checksize.newbinsize preoutgoing = python:checksize.nopull [limits] maxnewbinsize = 10240 ''' def newbinsize(ui, repo, node=None, **kwargs): '''forbid to add binary files over a given size''' forbid = False # default limit is 10 MB limit = int(ui.config('limits', 'maxnewbinsize', 10000000)) tip = context.changectx(repo, 'tip').rev() ctx = context.changectx(repo, node) for rev in range(ctx.rev(), tip+1): ctx = context.changectx(repo, rev) print ctx.files() for f in ctx.files(): fctx = ctx.filectx(f) filecontent = fctx.data() # check only for new files if not fctx.parents(): if len(filecontent) > limit and util.binary(filecontent): msg = 'new binary file %s of %s is too large: %ld > %ld\n' hname = dpynode.short(ctx.node()) ui.write(_(msg) % (f, hname, len(filecontent), limit)) forbid = True return forbid The exception: $ hg commit -m 'commit message' error: pretxncommit hook raised an exception: apps/helpers/templatetags/include_extends.py@bced6272d8f4: not found in manifest transaction abort! rollback completed abort: apps/helpers/templatetags/include_extends.py@bced6272d8f4: not found in manifest! I'm not familiar with writing Mercurial hooks, so I'm pretty confused about what's going on. Why does the hook care that a file was removed if hg already knows about it? Is there a way to fix this hook so that it works all the time? Update (solved): I modified the hook to filter out files that were removed in the changeset. def newbinsize(ui, repo, node=None, **kwargs): '''forbid to add binary files over a given size''' forbid = False # default limit is 10 MB limit = int(ui.config('limits', 'maxnewbinsize', 10000000)) ctx = repo[node] for rev in xrange(ctx.rev(), len(repo)): ctx = context.changectx(repo, rev) # do not check the size of files that have been removed # files that have been removed do not have filecontexts # to test for whether a file was removed, test for the existence of a filecontext filecontexts = list(ctx) def file_was_removed(f): """Returns True if the file was removed""" if f not in filecontexts: return True else: return False for f in itertools.ifilterfalse(file_was_removed, ctx.files()): fctx = ctx.filectx(f) filecontent = fctx.data() # check only for new files if not fctx.parents(): if len(filecontent) > limit and util.binary(filecontent): msg = 'new binary file %s of %s is too large: %ld > %ld\n' hname = dpynode.short(ctx.node()) ui.write(_(msg) % (f, hname, len(filecontent), limit)) forbid = True return forbid

    Read the article

  • Forms Authentication and Login controls

    - by DotnetDude
    I am upgrading a website written using ASP.NET 1.1 and the logic for the login page includes verifying the credentials, calling FormsAuthentication.SetAuthCookie() and populating the Session with the user information. I am updating this page to use Login controls and the Membership API and am trying to wrap my head around the concepts that have been changed. Most of the samples I see do not do anything on the login button event handler, so is the logic of setting the cookie abstracted out into the control? Also, how do I check if a user is logged in or not on other pages. Does it still store user information using the Session? How do I check if a user belongs to a particular role or not (Earlier, I would look in the Session object to do something like this) Is the Session a bad way of storing user info? Thanks

    Read the article

  • Proper way in Python to raise errors while setting variables

    - by ensnare
    What is the proper way to do error-checking in a class? Raising exceptions? Setting an instance variable dictionary "errors" that contains all the errors and returning it? Is it bad to print errors from a class? Do I have to return False if I'm raising an exception? Just want to make sure that I'm doing things right. Below is some sample code: @property def password(self): return self._password @password.setter def password(self,password): # Check that password has been completed try: # Check that password has a length of 6 characters if (len(password) < 6): raise NameError('Your password must be greater \ than 6 characters') except NameError: print 'Please choose a password' return False except TypeError: print 'Please choose a password' return False #Set the password self._password = password #Encrypt the password password_md5 = md5.new() password_md5.update(password) self._password_md5 = password_md5.hexdigest()

    Read the article

  • Account verification Yelp style, how is it more "secure" than traditional verification?

    - by Chad
    For business owners to "take control" of their business page on Yelp, they register for it. The Yelp system performs a telephone call-back. From watching to the video here, it sounds like a telephone version of what we all typically do - e-mail check. For e-mail check, it basically goes like this: User registers verify e-mail sent they click link inside verify e-mail site verifies Here's Yelp's: User registers verify screen shown with code Yelp calls user user enters code site verifies It's essentially the same thing, via phone. Is there any reason you can see why this method is better than the e-mail method?

    Read the article

  • Implementing IPermission

    - by joniba
    Hi there, I'm considering writing a custom IPermission implementation but am not clear as to how it should work. I've already implemented IPrincipal and IIdentity. What I would like to accomplish is to be able to check permissions vis a vis the current IPrincipal's authorizations rather than its roles. Generally, authorizations are read/add-delete/update/none for a given type. So I would like to write something like this: [CustomPermission(SecurityAction.Demand, Type = typeof(Foo), MinimumAuthorization = AuthorizationFlags.Read)] public void SomeMethod(){} Is this possible? I've looked over the code at http://msdn.microsoft.com/en-us/library/system.security.ipermission.aspx. This shows how to implement the interface, but I don't understand how the above pseudo-code would be able to check against the IPrincipal's authorizations for the type. Any help or resource references would be appreciated. Joni

    Read the article

  • How to share code with continuous integration

    - by alchemical
    I've just started working in a continuous integration environment (TeamCity). I understand the basic idea of not getting so abstracted out in your code that you are never able to build it to test functionality, etc. However, when there is deep coding going on, occasionally it will take me several days to get buildable code--but in the interim other team members may need to see my code. If I check the code in, it breaks the build. However, if I don't check it in, my team members are unable to see the most recent work. I'm wondering how this situation is best dealt with.

    Read the article

  • groovy compile error

    - by Bunny Rabbit
    class x{ public static void main(String[] args){ String x="<html><head></head></html>"; String arr[]=x.split("<head>"); String script="hi"; x=arr[0]+"<head>"+script+arr[1]; System.out.println(x); } } the above code when compiled as a java file compiles fine but when used a s a groovy file spits the error : org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 4: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 4, column 10. String arr[]=x.split(""); ^ D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 6: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 6, column 5. x=arr[0]+""+script+arr[1]; ^ D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin\x.groovy: 6: Apparent variable 'a rr' was found in a static scope but doesn't refer to a local variable, static fi eld or class. Possible causes: You attempted to reference a variable in the binding or an instance variable fro m a static context. You misspelled a classname or statically imported field. Please check the spelli ng. You attempted to use a method 'arr' but left out brackets in a place not allowed by the grammar. @ line 6, column 28. x=arr[0]+""+script+arr[1]; ^ 3 errors D:\Garage\groovy-binary-1.7.1\groovy-1.7.1\bin

    Read the article

  • asp.net rangevalidator for calendar extender entries gives problems in safari

    - by Robin Baralla
    Hi there, I have the following scenario: arrival and departure dates have to be selected on a form, through 2 textboxes with a calendar extender each. I validate the entries to check that no date before today is selected and to check that the departure is after the arrival. I used a rangevalidator and a comparevalidator. In IE, Firefox and Opera it is working fine, in Safari (on windows) however both the validators go off even on entries that should be accepted. It makes me suspect that the date format dd/MM/yyyy causes trouble for Safari. (the dd/MMMM/yyyy also gave the same troubles in the other browsers, probably due to the dependency on UIculture) The code is:   The range validator gets its values in code behind on Page_load RangeValidator1.MinimumValue = DateTime.Now.AddDays(1).ToShortDateString(); RangeValidator1.MaximumValue = DateTime.Now.AddMonths(12).ToShortDateString(); Does anybody have any suggestions on how to solve this problem with safari? best regards, Robin

    Read the article

  • Python: How would i write this 'if' statement for a word of arbitrary length?

    - by ElCarlos
    This is what I currently have: wordlist = [fox, aced, definite, ace] for word in wordlist: a = len(word) if (ord(word[a-(a-1)] - ord(word[(a-a)])) == ord(word[a-(a-2)])-ord(word[a-(a-1)]: print "success", word else: print "fail", word What I'm trying to do is calculate the ASCII values between each of the letters in the word. And check to see if the ord of the letters are increasing by the same value. so for fox, it would check if the difference between the ord of 2nd and 1st letters are equal to the ord difference of the 3rd and 2nd letters. However, with my current 'if' statement, only the first 3 letters of a word are compared. How can I rewrite this statement to cover every letter in a word of length greater than 3? Sorry if I can't present this clearly, thanks for your time.

    Read the article

  • Facebook/FBML: How to tell if a user is a fan of the fan page

    - by Dominic Godin
    Hi, I'm working on a FBML fan page for a client. I need to perform a check to see if the current user is a fan of the page. I tried using the JavaScript API but I've found this is not compatible with FBML. I have looked through the FBML page on the developer wiki and found checks for practically everything else but no is user fan check. Any pointers in the right direction would be most appreciated. Thanks in advance.

    Read the article

  • How to arrange the items of gridview ?

    - by kranthi
    I have a settings page in my asp.net website,in which a user can select desired items and their order to be displayed in another page.I am displaying these items(which are obtained from database) in a gridview with checkboxes,up/down arrows next to them.Once the user makes his selection/rearranges the items and clicks on the 'Save' button,I am saving the data into another database table.When this particular user logsin again I want to check the items which were already chosen by him and arrange them in the order he specified, on page load.I am able to check the checkboxes of the already chosen items but do not understand how do I arrange the items in the user specified order? Please help. Thanks.

    Read the article

  • double checked locking - objective c

    - by bandejapaisa
    I realised double checked locking is flawed in java due to the memory model, but that is usually associated with the singleton pattern and optimizing the creation of the singleton. What about under this case in objective-c: I have a boolean flag to determine if my application is streaming data or not. I have 3 methods, startStreaming, stopStreaming, streamingDataReceived and i protect them from multiple threads using: - (void) streamingDataReceived:(StreamingData *)streamingData { if (self.isStreaming) { @synchronized(self) { if (self.isStreaming) { - (void) stopStreaming { if (self.isStreaming) { @synchronized(self) { if (self.isStreaming) { - (void) startStreaming:(NSArray *)watchlistInstrumentData { if (!self.isStreaming) { @synchronized(self) { if (!self.isStreaming) { Is this double check uneccessary? Does the double check have similar problems in objective-c as in java? What are the alternatives to this pattern (anti-pattern). Thanks

    Read the article

  • Alternative to udev functionality on OSX

    - by S1syphus
    I'm trying to create a custom file/check in check out script for external hardrives, however part of the script is from a Linux machine, which I have tested works fine, but uses udevinfo, OS X doesn't have udev, so is there anything that offers the same functionality? #!/bin/bash declare -a EXTERNAL_DISKS declare -a INTERNAL_DISKS for disk in /dev/[sh]d[a-z]; do eval `udevinfo -q env -n $disk` [ "$ID_BUS" = "usb" ] && EXTERNAL_DISKS=( ${EXTERNAL_DISKS[@]} $disk ) [ "$ID_BUS" = "scsi" ] && INTERNAL_DISKS=( ${INTERNAL_DISKS[@]} $disk ) done echo "Internal disks: ${INTERNAL_DISKS[@]}" echo "External disks: ${EXTERNAL_DISKS[@]}" Anybody know any alternatives? Or a way this could be accomplished on OSX using bash?

    Read the article

< Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >