Search Results

Search found 4955 results on 199 pages for 'range'.

Page 55/199 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Representing a schedule in a database

    - by David Pfeffer
    I have the interesting problem of representing complex schedule data in a database. I need to be able to represent the entirety of what the iCalendar (ics) format can represent, but in my database. I don't care about insertion efficiency but query efficiency is critical. The operation I will be doing most often is providing either a single date/time or a date/time range, and trying to determine if the defined schedule matches any part of the date/time range. Other operations can be slower. For those unfamiliar, ics allows representation of a single event or a reoccuring event based on multiple times per day, days of the week, week of a month, month, year, or some combination of those. For example, the third Thursday in November, or the 25th of December, or every two weeks starting November 2nd and continuing until September the following year. Any suggestions?

    Read the article

  • Assembly Jump conditionals -- jae vs. jbe

    - by Raven Dreamer
    Hi, all! I'm working on an assembly program (intel 8086). I'm trying to determine whether an input character (stored in dl) is within a certain range of hex values. cmp dl, 2Eh ;checks for periods je print ;jumps to print a "." input cmp dl, 7Ah ;checks for outside of wanted range jae input ; returns to top Please confirm that this is a correct interpretation of my code: step 1: if dl = 2E, goto print Step 2: if dl = 7A is false, goto input [if dl < 7A, goto input]

    Read the article

  • Python: create a function to modify a list by reference not value

    - by Jonathan
    Hey all- I'm doing some performance-critical Python work and want to create a function that removes a few elements from a list if they meet certain criteria. I'd rather not create any copies of the list because it's filled with a lot of really large objects. Functionality I want to implement: def listCleanup(listOfElements): i = 0 for element in listOfElements: if(element.meetsCriteria()): del(listOfElements[i]) i += 1 return listOfElements myList = range(10000) myList = listCleanup(listOfElements) I'm not familiar with the low-level workings of Python. Is myList being passed by value or by reference? How can I make this faster? Is it possible to somehow extend the list class and implement listCleanup() within that? myList = range(10000) myList.listCleanup() Thanks- Jonathan

    Read the article

  • Accessing a dictionary value by custom object value in Python?

    - by Sam
    So I have a square that's made up of a series of points. At every point there is a corresponding value. What I want to do is build a dictionary like this: class Point: def __init__(self, x, y): self._x = x self._y = y square = {} for x in range(0, 5): for y in range(0, 5): point = Point(x,y) square[point] = None However, if I later create a new point object and try to access the value of the dictionary with the key of that point it doesn't work.. square[Point(2,2)] Traceback (most recent call last): File "<pyshell#19>", line 1, in <module> square[Point(2,2)] KeyError: <__main__.Point instance at 0x02E6C378> I'm guessing that this is because python doesn't consider two objects with the same properties to be the same object? Is there any way around this? Thanks

    Read the article

  • PHP Fizzbuzz Challenge

    - by Pez Cuckow
    Someone at work as poised the challenge to create a script that prints the FizzBuzz game in as few likes as possible using PHP The challenge Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. My attempt: foreach(range(1,100) as $i) { $val = ($i % 3 == 0 ? "Fizz" : "").($i % 5 == 0 ? "Buzz" : ""); echo (empty($val) ? $i : $val) . '<br />'; } Someone's Pythons attempt [ ("Fizz" if not i % 3 else "") + ("Buzz" if not i % 5 else "") + ("Baz" if not i % 7 else "") if _ else "" for i in range(0, 100) ] Can you see how to make this better/improve it? Or even do it better? Thanks for your time

    Read the article

  • Can MYSQL filter by date if date is stored as text? ex "02/10/1984"

    - by Roeland
    Hello! I am trying to modify an app for a client which has already a database of over 1000 items. The dates are stored as text in the database with the format "02/10/1984". The system allows you to add and remove fields to the catalog dynamically and it also allows the advanced search to have specific fields be allowed. The problem is that it wasn't designed with dates in mind, so when I set a field as a date, and try to search by a range the query is trying to do a AND (cfv0.value = 01/02/2004 AND cfv0.value <= 05/03/2008) . I can make it so the date range passed is a numeric time value. Is there a way that when sending the query, it takes the text fields (with the date) and converts it to numeric time value so at that point I am basically just comparing numbers which would work fine. I do not have the option to change all the current date to numeric value due to the way the dynamic fields are set up. Thanks guys!

    Read the article

  • How to do call function after client finishes download from tornado web server?

    - by Shabbyrobe
    I would like to be able to run some cleanup functions if and only if the client successfully completes the download of a file I'm serving using Tornado. I installed the firefox throttle tool and had it slow the connection down to dialup speed and installed this handler to generate a bunch of rubbish random text: class CrapHandler(BaseHandler): def get(self, token): crap = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(100000)) self.write(crap) print "done" I get the following output from tornado immediately after making the request: done I 100524 19:45:45 web:772] 200 GET /123 (192.168.45.108) 195.10ms The client then plods along downloading for about 20 seconds. I expected that it would print "done" after the client was done. Also, if I do the following I get pretty much the same result: class CrapHandler(BaseHandler): @tornado.web.asynchronous def get(self, token): crap = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(100000)) self.write(crap) self.finish() print "done" Am I missing something fundamental here? Can tornado even support what I'm trying to do? If not, is there an alternative that does?

    Read the article

  • Some unclear PHP syntax

    - by serhio
    I am a PHP beginner and saw on the forum this PHP expression: $regex = <<<'END' / ( [\x00-\x7F] # single-byte sequences 0xxxxxxx | [\xC0-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx | [\xE0-\xEF][\x80-\xBF]{2} # triple-byte sequences 1110xxxx 10xxxxxx * 2 | [\xF0-\xF7][\x80-\xBF]{3} # quadruple-byte sequence 11110xxx 10xxxxxx * 3 ) | ( [\x80-\xBF] ) # invalid byte in range 10000000 - 10111111 | ( [\xC0-\xFF] ) # invalid byte in range 11000000 - 11111111 /x END; Is this code correct? What do these strange (for me) constructions like <<<, 'END', /, /x, and END; mean? I recieve: Parse error: syntax error, unexpected T_SL in /home/vhosts/mysite.com/public_html/mypage.php on line X Thanks

    Read the article

  • How to use MOV instruction in ARM with an immediate number as the second operand

    - by Summer_More_More_Tea
    Hi everyone: I just begin to study ARM assembly language, and am not clear about how to use MOV to transfer an immediate number into a register. From both the ARM reference manual and my textbook, it's said that range of immediate number following MOV instruction is 0-255. But when I test on my own PC in ADS 1.2 IDE, instruction MOV R2, #0xFFFFFFFF performs well. Isn't number 0xFFFFFFFF out of range according to the specification? Hope someone can give me a hand. Regards.

    Read the article

  • Chain call in clojure?

    - by Konrad Garus
    I'm trying to implement sieve of Eratosthenes in Clojure. One approach I would like to test is this: Get range (2 3 4 5 6 ... N) For 2 <= i <= N Pass my range through filter that removes multiplies of i For i+1th iteration, use result of the previous filtering I know I could do it with loop/recur, but this is causing stack overflow errors (for some reason tail call optimization is not applied). How can I do it iteratively? I mean invoking N calls to the same routine, passing result of ith iteration to i+1th.

    Read the article

  • Jasper Reports - Add one day to a Date Parameter

    - by Templar
    I'm creating a Jasper report that includes the following parameters: DATESTART (Date) DATEEND (Date) These parameters indicate a date range for a field called DATECREATED (Timestamp) which includes times. I would like the date range to be INCLUSIVE, that is, if I filter for "Jan 1, 2009" to "Jan 31, 2009", any DATECREATED value on Jan 31, 2009 (such as "Jan 31, 2009 15:00") will be included in the report. When I used Crystal Reports in the past, I used the DATEADD function to create a filter expression like the following: {DATECREATED} >= {DATESTART} and {DATECREATED} < DATEADD("d", 1, {DATEEND}) (I realize that this isn't syntactically correct, but you get the idea.) Is there any way to do something similar in Jasper Reports?

    Read the article

  • crazy asp.net error

    - by dominic
    Hi I am having a problem debugging an issue on a website. Everything works locally, the local and server databases are the same The strange thing about the error is that it points to my local dev machine in the error stack. Is that crazy or what, The files are published and being hosted on a server machine and the error is pointing to a line of code on my local dev box. I feel like I am losing the plot. Can someone pls help be clear the air here because this is very weird Error in '/' Application. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index] System.Collections.ArrayList.get_Item(Int32 index) +10066148 System.Collections.Specialized.NameObjectCollectionBase.BaseGet(Int32 index) +17 System.Web.HttpFileCollection.get_Item(Int32 index) +9 System.Web.HttpFileCollectionWrapper.get_Item(Int32 index) +18 PitchPortal.Web.Binders.DocumentModelBinder.ValidateAndAssignPostedFile(ControllerContext controllerContext, ModelBindingContext bindingContext, Document doc) in C:\Users\Bich Vu\Documents\Visual Studio 2008\Projects\PitchPortal\PitchPortal.Web\Binders\DocumentModelBinder.cs:73 PitchPortal.Web.Binders.DocumentModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) in C:\Users\Bich Vu\Documents\Visual Studio 2008\Projects\PitchPortal\PitchPortal.Web\Binders\DocumentModelBinder.cs:45 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +404 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +140 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658084 System.Web.Mvc.Controller.ExecuteCore() +125 System.Web.Mvc.<c_DisplayClass8.b_4() +48 System.Web.Mvc.Async.<c_DisplayClass1.b_0() +21 System.Web.Mvc.Async.<c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +15 System.Web.Mvc.Async.WrappedAsyncResult1.End() +85 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +454 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

    Read the article

  • changing output in objective-c app

    - by Zack
    // // RC4.m // Play5 // // Created by svp on 24.05.10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "RC4.h" @implementation RC4 @synthesize txtLyrics; @synthesize sbox; @synthesize mykey; - (IBAction) clicked: (id) sender { NSData *asciidata1 = [@"4875" dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *asciistr1 = [[NSString alloc] initWithData:asciidata1 encoding:NSASCIIStringEncoding]; //[txtLyrics setText:@"go"]; NSData *asciidata = [@"sdf883jsdf22" dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *asciistr = [[NSString alloc] initWithData:asciidata encoding:NSASCIIStringEncoding]; //RC4 * x = [RC4 alloc]; [txtLyrics setText:[self decrypt:asciistr1 andKey:asciistr]]; } - (NSMutableArray*) hexToChars: (NSString*) hex { NSMutableArray * arr = [[NSMutableArray alloc] init]; NSRange range; range.length = 2; for (int i = 0; i < [hex length]; i = i + 2) { range.location = 0; NSString * str = [[hex substringWithRange:range] uppercaseString]; unsigned int value; [[NSScanner scannerWithString:str] scanHexInt:&value]; [arr addObject:[[NSNumber alloc] initWithInt:(int)value]]; } return arr; } - (NSString*) charsToStr: (NSMutableArray*) chars { NSString * str = @""; for (int i = 0; i < [chars count]; i++) { str = [NSString stringWithFormat:@"%@%@",[NSString stringWithFormat:@"%c", [chars objectAtIndex:i]],str]; } return str; } //perfect except memory leaks - (NSMutableArray*) strToChars: (NSString*) str { NSData *asciidata = [str dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *asciistr = [[NSString alloc] initWithData:asciidata encoding:NSASCIIStringEncoding]; NSMutableArray * arr = [[NSMutableArray alloc] init]; for (int i = 0; i < [str length]; i++) { [arr addObject:[[NSNumber alloc] initWithInt:(int)[asciistr characterAtIndex:i]]]; } return arr; } - (void) initialize: (NSMutableArray*) pwd { sbox = [[NSMutableArray alloc] init]; mykey = [[NSMutableArray alloc] init]; int a = 0; int b; int c = [pwd count]; int d = 0; while (d < 256) { [mykey addObject:[pwd objectAtIndex:(d % c)]]; [sbox addObject:[[NSNumber alloc] initWithInt:d]]; d++; } d = 0; while (d < 256) { a = (a + [[sbox objectAtIndex:d] intValue] + [[mykey objectAtIndex:d] intValue]) % 256; b = [[sbox objectAtIndex:d] intValue]; [sbox replaceObjectAtIndex:d withObject:[sbox objectAtIndex:a]]; [sbox replaceObjectAtIndex:a withObject:[[NSNumber alloc] initWithInt:b]]; d++; } } - (NSMutableArray*) calculate: (NSMutableArray*) plaintxt andPsw: (NSMutableArray*) psw { [self initialize:psw]; int a = 0; int b = 0; NSMutableArray * c = [[NSMutableArray alloc] init]; int d; int e; int f; int g = 0; while (g < [plaintxt count]) { a = (a + 1) % 256; b = (b + [[sbox objectAtIndex:a] intValue]) % 256; e = [[sbox objectAtIndex:a] intValue]; [sbox replaceObjectAtIndex:a withObject:[sbox objectAtIndex:b]]; [sbox replaceObjectAtIndex:b withObject:[[NSNumber alloc] initWithInt:e]]; int h = ([[sbox objectAtIndex:a]intValue] + [[sbox objectAtIndex:b]intValue]) % 256; d = [[sbox objectAtIndex:h] intValue]; f = [[plaintxt objectAtIndex:g] intValue] ^ d; [c addObject:[[NSNumber alloc] initWithInt:f]]; g++; } return c; } - (NSString*) decrypt: (NSString*) src andKey: (NSString*) key { NSMutableArray * plaintxt = [self hexToChars:src]; NSMutableArray * psw = [self strToChars:key]; NSMutableArray * chars = [self calculate:plaintxt andPsw:psw]; NSData *asciidata = [[self charsToStr:chars] dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *asciistr = [[NSString alloc] initWithData:asciidata encoding:NSUTF8StringEncoding]; return asciistr; } @end This is supposed to decrypt a hex string with an ascii string, using rc4 decryption. I'm converting my java application to objective-c. The output keeps changing, every time i run it.

    Read the article

  • When is ¦ not equal to ¦?

    - by Trey Jackson
    Background. I'm working with netlists, and in general, people specify different hierarchies by using /. However, it's not illegal to actually use a / as a part of an instance name. For example, X1/X2/X3/X4 might refer to instance X4 inside another instance named X1/X2/X3. Or it might refer an instance named X3/X4 inside an instance named X2 inside an instance named X1. Got it? There's really no "regular" character that cannot be used as a part of an instance name, so you resort to a non-printable one, or ... perhaps one outside of the standard 0..127 ASCII chars. I thought I'd try (decimal) 166, because for me it shows up as the pipe: ¦. So... I've got some C++ code which constructs the path name using ¦ as the hierarchical separator, so the path above looks like X1¦X2/X3¦X4. Now the GUI is written in Tcl/Tk, and to properly translate this into human readable terms I need to do something like the following: set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 set humanreadable [join [split $path ¦] /] Basically, replace the ¦ with / (I could also accomplish this with [string map]). Now, the problem is, the ¦ in the string I get from C++ doesn't match the ¦ I can create in Tcl. i.e. This fails: set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 string match $path [format X1%cX2/X3%cX4 166 166] Visually, the two strings look identical, but string match fails. I even tried using scan to see if I'd mixed up the bit values. But set path [getPathFromC++] ;# returns X1¦X2/X3¦X4 set path2 [format X1%cX2/X3%cX4 166 166] for {set i 0} {$i < [string length $path]} {incr i} { set p [string range $path $i $i] set p2 [string range $path2 $i $i] scan %c $p c scan %c $p2 c2 puts [list $p $c :::: $p2 $c2 equal? [string equal $c $c2]] } Produces output which looks like everything should match, except the [string equal] fails for the ¦ characters with a print line: ¦ 166 :::: ¦ 166 equal? 0 For what it's worth, the character in C++ is defined as: const char SEPARATOR = 166; Any ideas why a character outside the regular ASCII range would fail like this? When I changed the separator to (decimal) 28 (^\), things worked fine. I just don't want to get bit by a similar problem on a different platform. (I'm currently using Redhat Linux).

    Read the article

  • Converting IPv4 or IPv6 address to a long for comparisons

    - by Justin Akehurst
    In order to check if an IPv4 or IPv6 address is within a certain range, I've got code that takes an IPv4 address, turns that into a long, then does that same conversion on the upper/lower bound of the subnet, then checks to see if the long is between those values. I'd like to be able to do the same thing for IPv6, but saw nothing in the Python 2.6 standard libraries to allow me to do this, so I wrote this up: import socket, struct from array import array def ip_address_to_long(address): ip_as_long = None try: ip_as_long = socket.ntohl(struct.unpack('L', socket.inet_pton(socket.AF_INET, address))[0]) except socket.error: # try IPv6 try: addr = array('L', struct.unpack('!4L', socket.inet_pton(socket.AF_INET6, address))) addr.reverse() ip_as_long = sum(addr[i] << (i * 32) for i in range(len(addr))) except socket.error as se: raise ValueError('Invalid address') except Exception as e: print str(e) return ip_as_long My question is: Is there a simpler way to do this that I am missing? Is there a standard library call that can do this for me?

    Read the article

  • How do I add/remove items to a ListView in virtual mode?

    - by Eric
    If I'm using a ListView in virtual mode then, as I understand it, the list view only keeps track of a small number of items in the list. As the user scrolls it dynamically retrieves items it needs to show from the virtual list. But what if an item is added or removed from the master list? If an item is added/removed outside of the range of indexes being shown by the list view then I would assume the list view would show the added/missing items when the user scrolls to that index. Is this correct? But what if an item is added/removed from the range of indexes the user is currently viewing? How do I trigger the list view to refresh the items it is currently viewing to show the new/missing items?

    Read the article

  • Why wont numpy matrix let me print its rows?

    - by uberjumper
    Okay this is probably a really dumb question, however its really starting to hurt. I have a numpy matrix, and basically i print it out row by row. However i want to make each row be formatted and separated properly. >>> arr = numpy.matrix([[x for x in range(5)] for y in range(5)]) >>> arr matrix([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]) Lets say i want to print the first row, and add a '|' between each element: >>> '|'.join(map(str, arr[0,])) '[[0 1 2 3 4]]' Err... >>> '|'.join(map(lambda x: str(x[0]), arr[0])) '[[0 1 2 3 4]]' I am really confused by this behavior why does it do this?

    Read the article

  • initialize a numpy array

    - by Curious2learn
    Is there way to initialize a numpy array of a shape and add to it? I will explain what I need with a list example. If I want to create a list of objects generated in a loop, I can do: a = [] for i in range(5): a.append(i) I want to do something similar with a numpy array. I know about vstack, concatenate etc. However, it seems these require two numpy arrays as inputs. What I need is: big_array # Initially empty. This is where I don't know what to specify for i in range(5): array i of shape = (2,4) created. add to big_array The big_array should have a shape (10,4). How to do this? Thanks for your help.

    Read the article

  • sampling integers uniformly efficiently in python using numpy/scipy

    - by user248237
    I have a problem where depending on the result of a random coin flip, I have to sample a random starting position from a string. If the sampling of this random position is uniform over the string, I thought of two approaches to do it: one using multinomial from numpy.random, the other using the simple randint function of Python standard lib. I tested this as follows: from numpy import * from numpy.random import multinomial from random import randint import time def use_multinomial(length, num_points): probs = ones(length)/float(length) for n in range(num_points): result = multinomial(1, probs) def use_rand(length, num_points): for n in range(num_points): rand(1, length) def main(): length = 1700 num_points = 50000 t1 = time.time() use_multinomial(length, num_points) t2 = time.time() print "Multinomial took: %s seconds" %(t2 - t1) t1 = time.time() use_rand(length, num_points) t2 = time.time() print "Rand took: %s seconds" %(t2 - t1) if __name__ == '__main__': main() The output is: Multinomial took: 6.58072400093 seconds Rand took: 2.35189199448 seconds it seems like randint is faster, but it still seems very slow to me. Is there a vectorized way to get this to be much faster, using numpy or scipy? thanks.

    Read the article

  • Python - List of Lists Slicing Behavior

    - by Dan Dobint
    When I define a list and try to change a single item like this: list_of_lists = [['a', 'a', 'a'], ['a', 'a', 'a'], ['a', 'a', 'a']] list_of_lists[1][1] = 'b' for row in list_of_lists: print row It works as intended. But when I try to use list comprehension to create the list: row = ['a' for range in xrange(3)] list_of_lists = [row for range in xrange(3)] list_of_lists[1][1] = 'b' for row in list_of_lists: print row It results in an entire column of items in the list being changed. Why is this? How can I achieve the desired effect with list comprehension?

    Read the article

  • Recursive function causing a stack overflow

    - by dbyrne
    I am trying to write a simple sieve function to calculate prime numbers in clojure. I've seen this question about writing an efficient sieve function, but I am not to that point yet. Right now I am just trying to write a very simple (and slow) sieve. Here is what I have come up with: (defn sieve [potentials primes] (if-let [p (first potentials)] (recur (filter #(not= (mod % p) 0) potentials) (conj primes p)) primes)) For small ranges it works fine, but causes a stack overflow for large ranges: user=> (sieve (range 2 30) []) [2 3 5 7 11 13 17 19 23 29] user=> (sieve (range 2 15000) []) java.lang.StackOverflowError (NO_SOURCE_FILE:0) I thought that by using recur this would be a non-stack-consuming looping construct? What am I missing?

    Read the article

  • Excel VBA to check autofilter for data

    - by cav719
    I need help checking for autofiltered rows not including the header. I want it to give a message box "No records found." then exit sub or continue with copy paste if there are rows beyond the header row. I know I need an If/Else entry after the filter to check for data but I'm having trouble figuring how to check. This code is being done from a UserForm I created. Here is my script: Private Sub Searchbycompanyfield_Click() If CompanyComboBox1.Value = "" Then MsgBox "Please enter a Company to begin search." Exit Sub End If ActiveSheet.Range("$A:$H").AutoFilter Field:=1, Criteria1:=EQDataEntry.CompanyComboBox1.Value, Operator:=xlOr Cells.Select Selection.Copy Sheets("Sheet2").Select Range("A5").Select ActiveSheet.Paste Call MessageBoxYesOrNoMsgBox End Sub Any help would be greatly appreciated.

    Read the article

  • MicroChip Sample Code setting Current to a CMPDAC, DAC threshold which expect an voltage

    - by jason hong
    Sorry, the MicroChip Forum is very slow,I prefer to use overflow site to ask questions. dsPIC33FJ06GS101/X02 and dsPIC33FJ16GSX02/X04 device Sample Code // configure comparator2 CMPCON2bits.CMPON = 1; // enable comparator CMPCON2bits.INSEL = 1; // select CMP2B input pin (RB0) CMPCON2bits.RANGE = 1; // select high range, max DAC value = Avdd/2 //CMPDACx: COMPARATOR DAC CONTROL REGISTER //CMREF<9:0>: Comparator Reference Voltage Select bits CMPDAC2 = CURR_HWLIM; // DAC threshold #define CURR_HWLIM 1023 // 1023 // 10.15 * 101A MicroChip Sample code setting CURR_HWLIM which 1023A to COMPDAC2 which expects voltage I think that's mistake.

    Read the article

  • Solr date field tdate vs date?

    - by user550178
    So I have a question about Solr's field date types which is pretty straight forward: what's the difference between a 'date' field and a 'tdate' one? The schema .xml claims that 'For faster range queries, consider the tdate type' and 'A Trie based date field for faster date range queries and date faceting. ' Fair enough... but what's the precisionStep="6" all about? should i change this? does it change the way i would create the query in case I use the tdate? What's the real advantage or what does Solr do that makes it better? P.S went through google, Solr manual, solr wiki and the java docs without any luck so I'd appreciate a kind and explanatory answer :)... Also checked: http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/ http://web.archiveorange.com/archive/v/AAfXfqRYyLnDFtskmLRi

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >