Daily Archives

Articles indexed Wednesday January 5 2011

Page 5/35 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Solving a recurrence T(n) = 2T(n/2) + n^4

    - by user563454
    I am studying using the MIT Courseware and the CLRS book Introduction to Algorithms. Solving recurrence T(n) = 2T(n/2) + n4 (page 107) If I make a recurrence tree I get: level 0 n^4 level 1 2(n/2)^4 level 2 4(n/4)^4 level 3 8(n/8)^4 The tree has lg(n) levels. Therefore the recurrence is T(n) = Theta(lg(n)n^4)) But, If I use the Master method I get. Apply case 3: T(n) = Theta(n^4) If I apply the substitution method both seem to hold. Which one is ri?

    Read the article

  • What browser incompatibilities does jquery solve?

    - by pd1138
    I'm currently on the fence about using or not using jquery. I've spent hours researching the pros and cons of using jquery (or any library for that matter). One of the big selling points of jquery is that it frees a developer from worrying about browser incompatibilities. I've tried to find any documentation on exactly which incompatibilities it overcomes. So far I haven't found any. Can anyone help me out with this.

    Read the article

  • Int PK inner join Vs Guid PK inner Join on SQL Server. Execution plan.

    - by bigb
    I just did some testing for Int PK join Vs Guid PK. Tables structure and number of records looking like that: Performance of CRUD operations using EF4 are pretty similar in both cases. As we know Int PK has better performance rather than strings. So SQL server execution plan with INNER JOINS are pretty different Here is an execution plan. As i understand according with execution plan from attached image Int join has better performance because it is taking less resources for Clustered index scan and it is go in two ways, am i right? May be some one may explain this execution plan in more details?

    Read the article

  • Unit Testing in iphone i got below error.

    - by Pradeep
    whenever i run the unit testing application to find whether appdelegate is there r not using the test suit -(void)testAppDelegate { id app_delegate=[[UIApplication sharedApplication]delegate]; STAssertNotNil(app_delegate,@"delegate not found"); } i got this error. Please help. "_OBJC_CLASS_$_UIApplication", referenced from: objc-class-ref-to-UIApplication in Tests.o ld: symbol(s) not found collect2: ld returned 1 exit status

    Read the article

  • How to Read texfile etch.. from Application folder where Application is Installed?

    - by Crimsonland
    I Added textfile on my Application Folder where the application is also located. I having a problem where to locate and read the content of the texfile regarding what location the users specify the application to be installed. Example: CASE 1: If Application Installed on C Get the path of: C:\Textfile.txt CASE 2:If Application Installed on Program files Get the path of C:\Program Files\Default Company Name\Textfile.Text Thanks in Regards.

    Read the article

  • Emails, a different 'reply to' address then sender address.

    - by dcrodjer
    I have a contact form on a website (a general form: name, email, subject, message) in which mails are sent using google apps smtp to the admins. Currently if an administrator wants to reply to the mail directly selecting the reply option, the person's reply's To field will be filled by the sender's address automatically. What I wan't to ask is, Is there any standardized way to pass on some additional info with the mail which would define any reply to the mail should go to this address instead of the sender's? It does seems that there is a little chance for this option as it may lead to some problems due to spammers (They may define a custom reply field in their mail and a general user might not look where they are replying). So as an alternative what I thought is to find a way to create a filter with sender's account which figures out the reply email address from the format and forwards the mail (Doesn't seems like a good solution and I have no idea how to achieve this). I have tagged django, though this is not directly related with this, as I will finally implement this through django.

    Read the article

  • ASP.NET MVC 2: Deserialize SPROC Response

    - by dcolumbus
    I need to ask a general question. I don't have the code in front of me because I'm writing this on my iPhone. I have a Class that represents a certain XML schema. I have a SPROC that returns this XML. What I need to do is deserialize the XML to this Class. XML: <xml> <person> <firstName>Bob</firstName> <lastName>Robby</lastName> </person> </xml> I need to deserialize this XML into the custom Person Class so I can loop through this Model and spit it out in the View. I'm sure there's some kind of casting involved, I just don't know how to do it.

    Read the article

  • IRC-Bot in Ruby: PRIVMSG sends only last word of string

    - by Marius Schuller
    I'm on learning ruby and I took a already done IRC-Bot from the web which just connects to a given serven and not much more. Then I added some features (in my case I try to implement a voting where to eat lunch). Now these work fine so far but I don't know if the ruby script does something wrong or there is something wrong with the IRC-server. On the one I tested the Bot it worked well, giving an output like this: 09:14 < Wayne> !EssNA 09:14 < EssNABot> [-=EssNA-Vote=-] 09:14 < EssNABot> Options are: 09:14 < EssNABot> McDonalds. 0 09:14 < EssNABot> Currywurst 0 09:14 < EssNABot> Hendl..... 0 09:14 < EssNABot> Salatbar.. 0 09:14 < EssNABot> Griechr... 0 09:14 < EssNABot> Metzger... 0 09:14 < EssNABot> Merowinger 0 09:14 < EssNABot> Lidl...... 0 09:14 < EssNABot> Voting time is 600 seconds. The bot itself sees that like this: --> PRIVMSG #test [-=EssNA-Vote=-] --> PRIVMSG #test Options are: --> PRIVMSG #test McDonalds. 0 --> PRIVMSG #test Currywurst 0 --> PRIVMSG #test Hendl..... 0 --> PRIVMSG #test Salatbar.. 0 --> PRIVMSG #test Griechr... 0 --> PRIVMSG #test Metzger... 0 --> PRIVMSG #test Merowinger 0 --> PRIVMSG #test Lidl...... 0 --> PRIVMSG #test Voting time is 600 seconds. But on the irc which it should run on if its done the output users will see looks like this: 09:14 < Wayne> !EssNA 09:14 < EssNABot> [-=EssNA-Vote=-] 09:14 < EssNABot> are: 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> 0 09:14 < EssNABot> seconds. The output the bot gives is the same as on the server on which the output for users works. Seems to me that the problem is the IRC-server, maybe someone can point me in the right direction? Yours, Marius

    Read the article

  • Using Ant to merge two different properties files

    - by Justin
    I have a default properties file, and some deployment specific properties files that override certain settings from the default, based on deployment environment. I would like my Ant build script to merge the two properties files (overwriting default values with deployment specific values), and then output the resulting properties to a new file. I tried doing it like so but I was unsuccessful: <target depends="init" name="configure-target-environment"> <filterset id="application-properties-filterset"> <filtersfile file="${build.config.path}/${target.environment}/application.properties" /> </filterset> <copy todir="${web-inf.path}/conf" file="${build.config.path}/application.properties" overwrite="true" failonerror="true" > <filterset refid="application-properties-filterset" /> </copy> </target>

    Read the article

  • Idiomatic usage of filter, map, build-list and local functions in Racket/Scheme?

    - by Greenhorn
    I'm working through Exercise 21.2.3 of HtDP on my own and was wondering if this is idiomatic usage of the various functions. This is what I have so far: (define-struct ir (name price)) (define list-of-toys (list (make-ir 'doll 10) (make-ir 'robot 15) (make-ir 'ty 21) (make-ir 'cube 9))) ;; helper function (define (price< p toy) (cond [(< (ir-price toy) p) toy] [else empty])) (define (eliminate-exp ua lot) (cond [(empty? lot) empty] [else (filter ir? (map price< (build-list (length lot) (local ((define (f x) ua)) f)) lot))])) To my novice eyes, that seems pretty ugly because I have to define a local function to get build-list to work, since map requires two lists of equal length. Can this be improved for readability? Thank you.

    Read the article

  • Scrollbars in ScrollView not showing after custom child view changes size

    - by Ted Hopp
    I have a ScrollView containing a client that is a vertical LinearLayout. The client, in turn, contains custom views that change height dynamically as a background thread does some work. The problem I'm having is that the ScrollView's vertical scroll bar is not updating correctly in Android 1.5. The most common problem occurs when the initial total height of the client is less than the viewport and grows. Initially there is no scroll bar, and it does not show up when the client grows until I actually scroll the window with a touch gesture or other UI action. After that, the scroll bar shows up. However, the thumb does not update as the height continues to change from the background thread. If I scroll the view again through the UI, the thumb immediately corrects itself. My code for updating the height from the background thread is: post(mLayoutRequestor); postInvalidate(); (mLayoutRequestor is a Runnable that just calls requestLayout().) This is done after I've recorded the new height in a variable mHeight. My onMeasure() method calls setMeasuredDimension with a height computed like this: private int measureHeight(int measureSpec) { int result; int specMode = MeasureSpec.getMode(measureSpec); int specSize = MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { result = specSize; } else { result = mHeight; if (specMode == MeasureSpec.AT_MOST && result > specSize) result = specSize; } return result; } Am I supposed to be calling something else besides requestLayout() to get the scroll bar to update correctly?

    Read the article

  • getting started automating virtualization with powershell on windows

    - by fschwiet
    What are some good books or resources for learning automate virtual PCs on Windows DataCenter? I want to be able to build VPCs with both automated installs and from images, preferably via powershell. I would like to be able to setup an IIS environment for automated testing, and configure end user installs of different versions of Windows. I am not interested in corpnet type scenarios (active directory, domains, etc) so much for now. I'm comfortable with powershell and programming in general. I haven't yet installed Windows DataCenter, maybe once I install it will be clear enough. But looking for resources on how to managed virtual PCs programmatically I haven't found anything.

    Read the article

  • MySQL Master-Master replication generating thousands of log files

    - by Andrew
    Today, I checked the /var/lib/mysql/ directory of a server in a master-master replication setup and noticed there were about 3,600 slave-relay.00xxxx files in there (where "xxxx" is an incrementing integer). They appear to be binary log files and don't take up much space (only about 42K), but are they an indication that something is wrong? They range in date from August until today with about 25 per day. Thanks for any help.

    Read the article

  • Setting up Mail (Ubuntu Server 10.04)

    - by Sam
    It seems that mail on my server is functional -- kind of. I have a simple PHP mailer script that is capable of mailing any email address that is not local. e.g [email protected] However, if I try [email protected], it tells me /home/myuser/dead.letter... Saved message in /home/myuser/dead.letter and sometimes You have new mail. What does this mean? Does anyone know what I can do to make my emails actually go through? I'm using google apps for domains -- so basically gmail is hosting my domain's email and I'm not using my own servers for receiving mail. I've set up the nameservers correctly -- I wonder if it's got to do with my sending configuration (what does PHP's mail function normally send with anyway, sendmail?) or maybe it's my receiving configuration -- maybe something makes it act differently for "local" mail

    Read the article

  • Access Denied on a Drive where All Users list have been deleted in Security Tab

    - by darkstar13
    Hi All, (System is Windows 7 x64) I wanted to restrict access of other people in a certain drive of my computer (Harddisk 1 is partitioned to C & D; I want to restrict Drive D). What I did was go to the Security Tab (under Drive Properties) and remove the All Users entry. My account is an administrator account. I left only Systems and Administrator on the list. However, when I tried to access drive D, I got an Access Denied error, and Security Tab is already missing. I tried to edit Local Group Policy; it does not work. Take Ownership is not available for the Drive as well, but I see it enabled if I select files / folders. Please help. Thanks. Also, I am wondering why, as an Administrator, have my access to that drive denied.

    Read the article

  • Slow, choppy video playback with nVidia 8600GT

    - by user5351
    I have an nVidia 8600GT card (made by EVGA) on a machine with Windows Vista (AMD Athlon X2 processors) and four gigs of ram. It runs pretty good, but I have had some slow/choppy/stuterring video playback issues whenever watching flash videos on Youtube or other sites. The problem is there with both Firefox and IE flash videos, but is maybe worse with Firefox. I also tried Linux with nVidia's binary drivers and it was about the same. I downloaded EVGA precision which allows me to control stuff like the fan and clock speed. The card's temp (in both Vista and Linux) is usually at 66C when idle (not playing a game or watching anything). It goes up a little when watching a video (maybe 68-72C). Any ideas on how to fix this? UPDATE: The issues are both with full screen and embedded flash videos. I have Flash 10.0.32.18 (always make sure I use most recent for security), and the CPU is an AMD Athlon 64 X2 Dual Core Processor 4000+ at 2.11 GHZ. The current GPU driver installed is the most recent GeForce one from last July.

    Read the article

  • Weird outline numbering in Microsoft Word 2008

    - by GarnerCX
    This is quite a weird question, as I think I am asking the opposite of what most people want to try and achieve with outline numbering in Microsoft Word. The outline numbering associated with the styles "Heading 1" and "Heading 2" are fine and working as normal, but the outline numbering associated with all the heading styles from "Heading 3" onwards are broken. Here is a summary of how they look: 1 1.1 1.2 2 2.1 3 3.1 1.1.1 1.1.2 4 4.1 1.1.3 So you can see that while the first two headings are numbering correctly down the document, the third level heading doesn't restart and it doesn't have the correct 1st and 2nd level numbering - they all have '1.1' as a prefix. These are all controlled by the heading styles and I have tried every combination of options in the outline numbering section of the styles. Short of building a whole new template, recreating all my custom styles and then pasting the text across, I really don't know what to do. Before I try that, does anyone know what is going on here?

    Read the article

  • Editing an already filled application form

    - by vijetanegi
    I am a 2nd year student in graduation. Recently I filled an admission form for final year admission but it came back to me after 2 days because I had entered wrong information. I want to edit the wrong information and I have scanned the form. I am looking for a good online site where I can upload the scanned document and convert same into an editable format. I don’t mind paying. If any can point to a good site will be great

    Read the article

  • Does having TRIM enabled affect other hard drives on a computer (and how do you know when Windows is using it)?

    - by Breakthrough
    I recently purchased a solid state drive (an OCZ Vertex 2 (80 GB)) to use as my primary operating system partition. I also have three other SATA hard drives of assorted sizes. I successfully installed Windows 7 Professional onto the SSD (works awesome, great response time and transfer rate), and used the other three HDDs for data storage. I was browsing through the Bible of OCZ SSDs, and noticed the following in Section 60-76 - Tweaks and TRIM: Q. How do I know if TRIM is enabled on my OCZ SSD? A. In Windows 7, go to start/run/cmd), type the following: fsutil.exe behaviour query DisableDeleteNotify It should respond back with: DisableDeleteNotify=0 if TRIM support is ready and active. If it's not, then type: fsutil.exe behavior set DisableDeleteNotify 0 After a bit of searching on Google, I found similar results elsewhere (set DisableDeleteNotify to 0, which makes sense since for TRIM to work, the solid-state drive needs to be notified when deletes occur (for the garbage collector) unlike a normal hard drive). When I run the query on fsutil, I get the following result: DisableDeleteNotify = 48 Following the instructions I found, I set this to 0 instead of 48. However, I am beginning to wonder. Is this all the proof I really need that the OS is using TRIM? Also, since this applies globally for the computer, is TRIM data being sent to the other hard drives connected to the computer? And if so, would this cause any degradation in disk performance?

    Read the article

  • Diagnose remote desktop freezes in Windows 7 when no BSOD?

    - by Paul Smith
    Okay, I'm getting no joy from Asus or Microsoft on this, so hoping for some clues on how to narrow down the cause. I have very frequent OS freezes, always & only when running Remote Destkop Client (mstsc) in Windows 7 x64. I never have a bluescreen, and there is never a minidump. The display & input just freezes -- no keyboard, no mouse, and sound will just continue the last wavelength if any. So far, I can't find a way to trap the hang given that there's no bluescreen; advanced startup & recovery settings for system failure are "Write an event" checked, "Automatically restart" checked, and "Kernel memory dump". I've updated to the lasted BIOS, and tried a few different graphics drivers, both generic & ATI. I've also tried disabling Aero, and everything about the remote desktop experience (incrementally unchecked every box in the mstsc - options - experience tab), even disabled/unplugged external monitor to make sure it wasn't a dual-monitor issue. My specs are: Asus G73jh notebook 8GB RAM ATI Mobility Radeon HD 5800 Series graphics (recently tried driver versions 8.791.0.0, 8.801.0.0) American Megatrends G73jh.211 BIOS (7/27/2010) Windows 7 Home Premium x64 Windows Memory Diagnostic passed all of the following at least 3 times with no errors: MATS+ INVC LRAND Stride6 WMATS+ WINVC This notebook is better than most at removing heat (laudable vent design), so I'm not inclined to suspect thermal causes (especially since running 1080p video for hours has never caused a freeze, but mstsc does, reliably, within 5 minutes to an hour). This did seem to start happening after a Windows Update, but I've since reverted every patch applied since a week before the first occurrence, with no joy. (And I'd only had the PC for a couple weeks before that, so it could have been chance + less actual time spent remoting at the beginning.) I'm at my wits end, and I bought this laptop primarily as a remote terminal client (go figure, right?) Any ideas on how to identify the cause of this? Thanks!

    Read the article

  • What options are there for integrating with payment gateways?

    - by Rowland Shaw
    It seems that there are only two types of payment gateway service out there at the moment; Either that the entire cart logic is handled offsite (with something like Paypal's Standard option) or the other option being that you need to go through the certification for handling credit card numbers and doing pretty much everything yourself. Ideally, for the project I'm working on, I'm after a bit of middle ground such that I can handle the cart on-site, and only pass over to a payment gateway (with an order amount, billing & delivery details, and order ref) for them to handle the card details, before passing back. I'm sure that I've used e-commerce sites using this pattern before, but I cannot find any payment providers out there that offer this sort of option, so are there any? The only over requirement we have at present is that it must accept orders in Sterling.

    Read the article

  • How to set up two models having a has_many association with each other

    - by daz13
    I'm looking for a suggestion on how to set up two models, Teacher and Subject. A Teacher can have many Subjects, and a Subject can have many Teachers. Another thing to consider in the relationship between the two models is that a Teacher can create a Subject and add other Teachers to the Subject. I think I'm solid on the basics of the set up for each model: for teacher.rb: has_many :subjects for subject.rb: has_many :teachers and the teachers table should have a subject_id column and the subject table should have a teacher_id column. What I'm not sure about is how to set up the views (and corresponding controller methods) to allow the addition of a Teacher to a Subject. Any suggestions (or links to examples) are greatly appreciated. I haven't been able to find anything on this exact case.

    Read the article

  • Visual Basic: Newbie questions.

    - by Omega
    Hello there. I am starting to learn visual basic. So far, it is quite simple and easy to use. I am liking it! Anyway, I want to make applications a little bit more complex. So far I have done very silly things. I would appreciate if you could help me with these: How do I open a new window (form)? Maybe I click a button on my main form and another form pops up. How do I "deactivate" the main form while the new form is running? (if I try to click the main form, an error sound plays) So my second form has a text field and a "OK" button. If I click it, the second form closes activating the main form again. I want to "pass" the text in the text field from the second form to the first one. How do I do that? Thank you, I am enjoying this new programming environment (didn't use Visual Studio much before)

    Read the article

  • Internal compiler error: Could not load type NHibernate.Cfg.Configuration

    - by Simon
    I'm referencing the NHibernate dll version 2.1.2-GA, and am unable to compile under Mono 2.8.1. I've tried using NHibernate 3 instead and it compiles fine. A simple example of the code that's failing is NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration(); and the error is Error CS0584: Internal compiler error: Could not load type 'NHibernate.Cfg.Configuration' from assembly 'NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'. (CS0584) As mentioned it compiles with no problems using NHibernate 3, does anyone have any ideas how to get it working with NHiberate 2.1.2?

    Read the article

  • jQuery to target CSS a:hover class

    - by songdogtech
    Confused here. What's the best way to change the hover CSS of the link below, and how? toggle.Class? add.Class? I want to show an image on hover. I have been able to change the color of the text with $("#menu-item-1099 a:contains('rss')").css("color", "#5d5d5d"); but can't seem to target the hover class. <div id="access"> <div class="menu-header"> <ul id="menu-main-menu" class="menu"> <li id="menu-item-1099" class="menu-item menu-item-type-custom menu-item-1099"> <a href="http://mydomain.com/feed/">rss</a></li>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >