Search Results

Search found 8042 results on 322 pages for 'days'.

Page 206/322 | < Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >

  • question on find value in array

    - by davit-datuashvili
    i have seen a few days ago such problem there is given two array find elements which are common of these array one of the solution was sort big array and then use binary search algorithm and also there is another algorithm- brute-force algorithm for (int i=0;i<array1.length;i++){ for (int j=0;j<array2.length;j++){ if (array1[i]==array2[j]){ //code here } } it's complexity is O(array1.length*array2.length); and i am interested the first method's complexity is also same yes? because we should sort array first and then use search method binary search algorithm's complexity is log_2(n) so it means that total time will be array.length*log_2(n) and about sort? please explain me which is better

    Read the article

  • Comparison tool with easy line insertion

    - by Miro Kropacek
    Back in good old days I used to use a tool for file comparison with one incredible feature -- you open file1, file2, see a difference, no magic here. But then you could insert an empty line(s) into file1 with one keyboard combo and into file2 with another keyboard combo. So you could easily adjust how are C / asm function aligned in case diff engine failed to recognize similar stuff. Of course, after the adjust (insertion / removal of one or more lines in either file) whole diff was "recalculated". I fail to find similar feature in diff, KDiff, ... I'd prefer Linux app but I'm OK with Windows app as last resort... Thanks for any hint!

    Read the article

  • Javascript Pointers question with Dates

    - by Mega Matt
    I noticed this situation in my code (unfortunately), and was able to duplicate it in my own JS file. So I have this code: var date1 = new Date(); // today var date2 = date1; date2 = date2.setDate(date2.getDate() + 1); // what is date1? After this code executes, date1 is today's date + 1! This harkens back to my undergrad days when I learned about pointers, and I guess I'm a little rusty. Is that what's happening here? Obviously I've moved the assignment away from date1, and am only modifying date2, but date1 is being changed. Why is this the case? Incidentally, after this code executes date2 is a long number like 1272123603911. I assume this is the number of seconds in the date, but shouldn't date2 still be a Date object? setDate() should return a Date object... Thanks for the help.

    Read the article

  • How can I measure distance with tastypie and geodjango?

    - by Twitch
    Using Tastypie and GeoDjango, I'm trying to return results of buildings located within 1 mile of a point. The TastyPie documentation states that distance lookups are not yet supported, but I am finding examples of people getting it work, such as this discussion and this discussion on StackOverflow, but no working code examples that can be applied. The idea that I am trying to work with is if I append a GET command to the end of a URL, then nearby locations are returned, for example: http://website.com/api/?format=json&building_point__distance_lte=[{"type": "Point", "coordinates": [153.09537, -27.52618]},{"type": "D", "m" : 1}] But when I try that, all I get back is: {"error": "Invalid resource lookup data provided (mismatched type)."} I've been pouring over the Tastypie document for days now and just can't figure out how to implement this. I'd provide more examples, but I know they'd be all terrible. All advice is appreciated, thank you!

    Read the article

  • Write a SQL Query to replace values and include all the Dates.

    - by VJ
    Well I have this - Table DimDate- Date Table Employee- Id,Name,Points,Date Now the Employee table has points for everyday unless they did not come...so the Date does not have all the Dates entries... I mean for e.g in a week he did not come for 2 days the Employee table has only 5 rows...so I have this dimdate table which has all the dates till 2050 which I want to join with and add Zeros for the dates he does not have points. So I have written this query but does not work - Select E.EmployeeId,D.Date,isNull(E.Points,0) from DimDate D left join Employee E on D.Date between '01-01-2009'and '06-01-2009' where E.EmployeeId=1 The above query give multiple dates and I tried group by on Date but does not work.

    Read the article

  • Drupal: tag multiselection.. but not anymore possible adding new tags

    - by Patrick
    hi, I've installed Taxonomy SuperSelect module in my Drupal. Now my customer can not only type the tag for some content types pages but also select multiple tags using checkboxes. I've also ordered the chekboxes alphabetically. However few days ago, I noticed that he can't anymore manually type the tags.. see picture: http://dl.dropbox.com/u/72686/multiSelect.png Can you help me how to solve this issue ? What's the php template to edit this pages ? Unluckily I don't remember if I edited some code, since I found out after a while this bug. thanks

    Read the article

  • Android show driving direction route between two geopoints

    - by kendrelaxman
    I have googled for 2-3 days now, but I am not able to get the perfect solution for my problem. I need to show the route between two geo points (Not a straight line but need to show driving direction kind of route) but I am not able to find any solution to this. I had come across the solution in this question. But I guess the solution also not working. If you can help me out that will be great. I found the solution Look for answer bellow...

    Read the article

  • Efficient job progress update in web application

    - by Endru6
    Hi, Creating a web application (Django in my case, but I think the question is more general) that is administrating a cluster of workers doing queued jobs, there is a need to track each jobs progress. When I've done it using database UPDATE (PostgreSQL in this case), it severely hits the database performance, because each UPDATE creates a new row in a table, and in my case only vacuuming DB removes obsolete rows. Having 30 jobs running and reporting progress every 1 minute DB may require vacuuming (and it means huge slow downs on a front end side for all the employees working with the system) every 10 days. Because the progress information isn't critical, ie. it doesn't have to be persistent, how would you do the progress updates from jobs without using an overhead database implies? There are 30 worker servers, each doing 1 or 2 jobs simultaneously, 1 front end server which serves a web application to users, and 1 database server.

    Read the article

  • populating word doc from xml in c#

    - by shdu1
    how do i populate a word doc from an xml template using c#. I know how to open a blank document but I cant figure out how to populate it. Word.Document wordDoc = wordApp.Documents.Add(ref objMissing, ref objMissing, ref objMissing, ref objMissing); Word.Paragraph wordParagraph = wordDoc.Paragraphs.Add(ref objMissing); Here's a basic look at my xml form. <?xml version="1.0" encoding="utf-8"?> <Cover> <CaseNo>Case No:</CaseNo> <Title>Title:</Title> <Date>Date:</Date> </Cover> What I eventually want to do is get the user to fill in textboxes in a c# program which will populate the word document. PLEASE HELP ME!!! I've been trying to figure this out for days Note the information is not coming from an sql database

    Read the article

  • How to limit results by SUM

    - by superspace
    I have a table of events called event. For the purpose of this question it only has one field called date. The following query returns me a number of events that are happening on each date for the next 14 days: SELECT DATE_FORMAT( ev.date, '%Y-%m-%d' ) as short_date, count(*) as date_count FROM event ev WHERE ev.date >= NOW() GROUP BY short_date ORDER BY ev.start_date ASC LIMIT 14 The result could be as follows: +------------+------------+ | short_date | date_count | +------------+------------+ | 2010-03-14 | 1 | | 2010-03-15 | 2 | | 2010-03-16 | 9 | | 2010-03-17 | 8 | | 2010-03-18 | 11 | | 2010-03-19 | 14 | | 2010-03-20 | 13 | | 2010-03-21 | 7 | | 2010-03-22 | 2 | | 2010-03-23 | 3 | | 2010-03-24 | 3 | | 2010-03-25 | 6 | | 2010-03-26 | 23 | | 2010-03-27 | 14 | +------------+------------+ 14 rows in set (0.06 sec) Let's say I want to dislay these events by date. At the same time I only want to display a maximum of 10 at a time. How would I do this? Somehow I need to limit this result by the SUM of the date_count field but I do not know how. Anybody run into this problem before? Any help would be appreciated. Thanks

    Read the article

  • How do I load a Direct X .x 3D model in iPhone SDK?

    - by Alex
    I have been searching the internet for the last few days trying to figure this out. My goal is to draw a textured and animated .x file exported from a 3D program. I found a tutorial of how to load and draw a .obj file, which I understand, but the tutorial doesn't say how to texture it, and .obj doesn't support animation. The .x file structure is human readable just like .obj, but I have no clue how to texture it, and I might be able to figure out how to animate it, but I would prefer to be instructed on that. Any help would be GREATLY appreciated.

    Read the article

  • array_count_values for javascript instead

    - by user626342
    Hi, I have the following php-script, now I need to do the same thing in javascript. Is there a funcion in javascript that works similar to the php function, I have been searching for days but cannot find anything similar? What I want to do is to count the number of times a certain word is beeing used in an array. $interfaceA = array($interfaceA_1,$interfaceA_2,$interfaceA_3,$interfaceA_4,$interfaceA_5,$interfaceA_6,$interfaceA_7,$interfaceA_8); $interfaceA_array=array_count_values($interfaceA); $knappsatsA = $interfaceA_array[gui_knappsats]; $touchpanelA = $interfaceA_array[gui_touchpanel]; Many thanks linda

    Read the article

  • Scheduler for asp.net ?

    - by user359706
    Is there a schedule control in asp.net. What I need: column display: users Rows display : months and days. On clicking cell will open a popup In popup we can : - select a status in a dropdownList, - if the status is "be close" = two calendars ( date start and end) - then apply a color for the selected period. I know I would not find an exact need control, but I want a component that would be closest. Somethink like http://www.daypilot.org/ or http://www.codeproject.com/KB/webforms/EventCalendarControl.aspx. hoping to be clearly understandable. thank you for your help will be precious to me.

    Read the article

  • Is there a definitive list of differences between the Ruby on Rails versions?

    - by jedijim
    Is there a list of the differences between the various versions of Rails somewhere on the web? I'm working through an older book about Rails that uses Rails 1.2. I know there are other ways to learn Rails these days, but I thought it would be interesting to try and convert all of the exercises in the book to a more modern versions of Rails (I'm currently working with 2.3.5). A comprehensive list of differences between the various releases would be very helpful. Note that I don't consider the git log a good source of information, as commit messages almost never tell the full story.

    Read the article

  • SQL Modify question

    - by Jeff
    I need to replace a lot of values for a Table in SQL if the inactivity is greater then 30 days. I have UPDATE VERSION SET isActive = 0 WHERE customerNo = ( SELECT c.VersionNo FROM Activity b INNER JOIN VERSION c ON b.VersionNo = c.VersionNo WHERE (Months_between(sysdate, b.Activitye) > 30) ); It only works for one value though, if there is more then one returned it fails. What am I missing here? If someone could educate me on what is going on, I'd also appreciate it.

    Read the article

  • How to match data between columns to do the comparasion

    - by NCC
    I do not really know how to explain this in a clear manner. Please see attached image I have a table with 4 different columns, 2 are identical to each other (NAME and QTY). The goal is to compare the differences between the QTY, however, in order to do it. I must: 1. sort the data 2. match the data item by item This is not a big deal with small table but with 10 thousand rows, it takes me a few days to do it. Pleas help me, I appreciate. My logic is: 1. Sorted the first two columns (NAME and QTY) 2. For each value of second two columns (NAME and QTY), check if it match with first two column. If true, the insert the value. 3. For values are not matched, insert to new rows with offset from the rows that are in first two columns but not in second two columns

    Read the article

  • Set a session hash outside of RoR program?

    - by Sindri Guðmundsson
    Hi, I have had my new rails program up for a few days now. I'm running it on Ubuntu 10.4 with apache2 in another location than the website it's made for (it's a standalone database application for physiotherapists). The people I made it for now want me to deploy it to the public part of their website, only with one change. Those who open it via the link in the public-part should not be able to click one button! I was thinking of doing something like this in my view: <% if session[:inside]%> <%=button_to 'Sækja mælitæki', @link_to_mt%> <%end%> How could I set session[:inside] only to true if the program was started from within the private part of the webpage? I thought of creating two new actions, the other would set session[:inside] to true and the other to false, but that seems to me like a security risk, is it not? BR, Sindri

    Read the article

  • Sum variable range of cells using "today's" date as starting point.

    - by Jason
    How do you sum a variable range of cells based upon today's date in MS Excel 2003. Spreadsheet format: Variable range = # of days to sum Date range = listed in row 1, 1 day per cell (example A1=1/1/10, B1=1/2/10, C1=1/3/10....) Numbers to be summed - listed in row 2, X number per cell (example A2=8, B2=6, C2=1.....) example problem: IF variable range = 2 & Current Date = 1/2/10 then...Sum(b2:c2)=7 I am able to sum the entire row based upon current date using the following formula but am not able to add the variable range to the sum function. =SUMIF(A1:C1,"="&TODAY(),A2:C2)

    Read the article

  • How long people take to learn a new programming language?

    - by Cawas
    In general aspects, this might be a good reference for everyone. Having an idea of how long people take in average for properly learning how to code can give a very good idea on how dense or long is the path. Someone who never programmed should take weeks or months, even years maybe while someone who's already experienced in the area and know at least 2 different languages might take days, hours or even minutes to start coding. But other than being able to write code that runs, there are ways to write the same program, and it's much harder to get deep knowledge on that than actually being able to program. And sometimes languages differ a lot from one to another on that aspect as well. For instance, we should never have to worry with code-injection in JavaScript like we do in C. So, is there any place we can see some good numbers for how long it takes to learn a language, maybe divided into level of knowledge categories, languages and paradigms, etc?

    Read the article

  • Make the footer stick at the bottom of the page

    - by TheConscience
    Here is the site (made in Wordpress): http://miladalami.com I want to have the footer stick at the bottom of the page. Any solutions in how I do this? I have already tried cssstickyfooter.com and xs4all.nl/~peterned/examples/csslayout1.html but none worked as I wanted. What happened was that the main body of the page overlapsed the footer. I have been wrapping my head around this the past two days and Im lost. Is there anyone that can solve this puzzle?

    Read the article

  • ontouch - Switching positions of two views(images) in Android

    - by idish
    I've been looking for that 2 days long and haven't found anything related to it. I'll give an example for my goal. Let's say I have 2 images positioned side by side horizontally. I want the user to be able to switch their positions onlongtouch listener. so let's say that the first image was on the left and the second was on the right side, after switching positions between them, the first image would be in the right and the second would be on the left side. Basically, it is just like in the launcher where you can switch apps positions. Please, if anything is not clear for you, I would like to know, and I'll try to explain it better, thank you.

    Read the article

  • Iterating through a range of dates in Python

    - by ShawnMilo
    This is working fine, but I'm looking for any feedback on how to do it better. Right now I think it's better than nested loops, but it starts to get Perl-one-linerish when you have a generator in a list comprehension. Any suggestions are welcome. day_count = (end_date - start_date).days + 1 for single_date in [d for d in (start_date + timedelta(n) for n in range(day_count)) if d <= end_date]: print strftime("%Y-%m-%d", single_date.timetuple()) Notes: I'm not actually using this to print; that's just for demo purposes. The variables start_date and end_date are datetime.date objects, because I don't need the timestamps (they're going to be used to generate a report). I checked the StackOverflow questions which were similar before posting this, but none were exactly the same. Sample Output (for a start date of 2009-05-30 and an end date of 2009-06-09): 2009-05-30 2009-05-31 2009-06-01 2009-06-02 2009-06-03 2009-06-04 2009-06-05 2009-06-06 2009-06-07 2009-06-08 2009-06-09

    Read the article

  • Content border not showing in any browser!

    - by TankDriver
    I have been working on a project for a few days now and have just recently noticed that the border of 2 of my content areas are not showing in Mozilla or IE. http://www.gamefriction.com/Coded/ is where the page is located. If you look at the main content area where the "news" is you will see that there is a 1px solid border that is a slightly darker grey than the 4px border surrounding each content box. On the right column content the 1px solid #dfdfdf; border does not show. I can't seem to find any reason why this is not showing. Any ideas?

    Read the article

  • Getting Data Specific to Logged in user

    - by user1770470
    I need to list logged in users active leads,and allow paging and selectable sorting, I cant use the grid because of the layout requirement. I have been searching the web for the last 2 days and cant find any viable solution Any help or direction would be greatly appreciated. var query = db.Query("SELECT a.listingId, a.datetime, c.details, c.buycommercial, c.buyindustrial, c.buyretail, c.buyland, c.tencommercial, c.tenindustrial, c.tenretail, c.tenland, c.investor, c.developer, d.companyname, d.firstname, d.lastname, d.tel, d.cell, d.email FROM dbo.tblactivebroker a JOIN dbo.tblActiveListing b ON a.ListingId = b.ListingId JOIN dbo.tblListings c ON b.ListingId = c.ListingId JOIN dbo.tblContact d ON c.crmid = d.id WHERE b.active = 'True' AND a.ActiveBrokerID = @0",brokerid);

    Read the article

  • Latest stream cipher considered reasonably secure & easy to implement?

    - by hythlodayr
    (A)RC4 used to fit the bill, since it was so simple to write. But it's also less-than-secure these days. I'm wondering if there's a successor that's: Code is small enough to write & debug within an hour or so, using pseudo code as a template. Still considered secure, as of 2010. Optimized for software. Not encumbered by licensing issues. I can't use crypto libraries, otherwise all of this would be moot. Also, I'll consider block algorithms though I think most are pretty hefty. Thanks.

    Read the article

< Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >