Search Results

Search found 2264 results on 91 pages for 'odd rationale'.

Page 11/91 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Efficient Multiplication of Varying-Length #s [Conceptual]

    - by Milan Patel
    Write the pseudocode of an algorithm that takes in two arbitrary length numbers (provided as strings), and computes the product of these numbers. Use an efficient procedure for multiplication of large numbers of arbitrary length. Analyze the efficiency of your algorithm. I decided to take the (semi) easy way out and use the Russian Peasant Algorithm. It works like this: a * b = a/2 * 2b if a is even a * b = (a-1)/2 * 2b + a if a is odd My pseudocode is: rpa(x, y){ if x is 1 return y if x is even return rpa(x/2, 2y) if x is odd return rpa((x-1)/2, 2y) + y } I have 3 questions: Is this efficient for arbitrary length numbers? I implemented it in C and tried varying length numbers. The run-time in was near-instant in all cases so it's hard to tell empirically... Can I apply the Master's Theorem to understand the complexity...? a = # subproblems in recursion = 1 (max 1 recursive call across all states) n / b = size of each subproblem = n / 1 - b = 1 (problem doesn't change size...?) f(n^d) = work done outside recursive calls = 1 - d = 0 (the addition when a is odd) a = 1, b^d = 1, a = b^d - complexity is in n^d*log(n) = log(n) this makes sense logically since we are halving the problem at each step, right? What might my professor mean by providing arbitrary length numbers "as strings". Why do that? Many thanks in advance

    Read the article

  • CSS3: Stripe table with multiple <tbody> elements

    - by xyz
    Hello, I've got a table with multiple <tbody> elements. At a given time, only one <tbody> is displayed, or all of them are displayed. I currently use this CSS3 code to stripe the table. table tr:nth-child(even) { background: #efefef; } When a single <tbody> element is shown, everything is (obviously) fine, but when multiple <tbody> elements are shown the CSS rules apply to each one separately, and each <tbody> has its own "stripes system". Together the stripes may or may not look consistent, depending on the number of rows. <tbody> <tr> [ODD] <tr> [EVEN] <tr> [ODD] </tbody> <tbody> <tr> [ODD] <tr> [EVEN] </tbody> ... Would I absolutely have to use JavaScript (...jQuery) to fix this?

    Read the article

  • How to analyze evenness/oddness of numbers in Java

    - by appreciation
    I have to write a program which reads in 3 numbers (using input boxes), and depending on their values it should write one of these messages: All 3 numbers are odd OR All 3 numbers are even OR 2 numbers are odd and 1 is even OR 1 number is odd and 2 are even This is what I have so far: import javax.swing.JOptionPane; class program3 { public static void main(String[] args) { String num1 = JOptionPane.showInputDialog("Enter first number."); String num2 = JOptionPane.showInputDialog("Enter second number."); String num3 = JOptionPane.showInputDialog("Enter third number."); boolean newnum1 = Integer.parseInt(num1); boolean newnum2 = Integer.parseInt(num2); boolean newnum3 = Integer.parseInt(num3); } } This is where I am stuck. I am not sure how to use the MOD to display the messages. I think I have to also use an IF Statement too...But I'm not too sure. Please help! :D

    Read the article

  • What sort of attack URL is this?

    - by Asker
    I set up a website with my own custom PHP code. It appears that people from places like Ukraine are trying to hack it. They're trying a bunch of odd accesses, seemingly to detect what PHP files I've got. They've discovered that I have PHP files called mail.php and sendmail.php, for instance. They've tried a bunch of GET options like: http://mydomain.com/index.php?do=/user/register/ http://mydomain.com/index.php?app=core&module=global§ion=login http://mydomain.com/index.php?act=Login&CODE=00 I suppose these all pertain to something like LiveJournal? Here's what's odd, and the subject of my question. They're trying this URL: http://mydomain.com?3e3ea140 What kind of website is vulnerable to a 32-bit hex number?

    Read the article

  • Excel 2003 Freezes When Worksheet with PivotTable Selected

    - by Max
    All of the sudden, my Excel 2003 began an odd behavior today. Whenever I click on a worksheet tab that has a PivotTable on it, I become unable to click on any other tabs or on the menu with the options to minimize, maximize, and size at the top left of the worksheet window. I am left unable to click on the other tabs until I double-click inside a cell in the PivotTable worksheet and get a blinking curor as if to type. Then, I can navigate to other tabs normally. I can't think of any major changes I have made to my computer in the last day that would have caused this. I did instiall PC Tools antivirus over a week ago, and since that time have noticed my computer behaving in odd ways, but excel has been just fine until now. Does anyone have any thoughts on what might cause this? Thanks so much.

    Read the article

  • baffling stat pauses - (reiserfs)

    - by Twirrim
    I've got a SuSE server with reiserfs formatted partitions, all on a RAID1 mirror. I'm noticing odd spikes in iowait, but generally all seems okay. iostat claims not even 3% iowait in general: avg-cpu: %user %nice %system %iowait %steal %idle 6.53 0.03 1.45 2.92 0.00 89.07 After tracking down some odd behaviour when ls'ing, it appears "stat" (ls is aliased to include color which does a stat process on each file) randomly takes 5 seconds on a file in the directory. ReiserFS does a file system sync every 5 seconds, but that's interval between not length of time taken to sync. Out of curiosity I did remount using noatime to see if that would help though as it would reduce sync's workload, but no joy. Anyone got any thoughts what might be causing this pause? Disks appear healthy, RAID controller believes the RAID is healthy, and io stats show the disks aren't working very hard at all.

    Read the article

  • routing wiredness - traceroute 'vanishes' en route

    - by The Journeyman geek
    I'm attempting to set up one of my boxes as a server (again), but i'm having some odd connection issues- the box itself connects fine to the internet, but trying to connect to my external ip address seems to result in the trace getting 'lost' partway. http://pastebin.com/HCQAGbvn - this is a traceroute from another system that's connected to another ISP - starhub is my own one, while i have another system that i have access to on singtel. I'm wondering if my ISP is messing around with routing, or is something very odd going on. As you note, the traceroute dosen't reach me, but if it helps, i use a dd-wrt router.

    Read the article

  • D-Link DWA-125 constantly disconnecting in winXP, but works fine on ubuntu..

    - by sil3nt
    Hey there, I'm dual booting winXp and ubuntu 10.10. I'm using a DWA-125 usb adapter to connect to my home wifi connection and I'm having this odd issue. First off, in ubuntu the adapter works fine and I have no trouble at all, but when I boot back in XP I get a dlink connetion wizard and the connection times out after every 2 minutes. It's odd because I can actually load up web pages and use the internet for 2 minutes, and then it would disconnect and the whole thing would repeat. I did a system restore on xp and this stopped the whole connect-disconnect thing but once I booted into ubuntu and came back to xp it started all over again!(?). Any ideas as to how I would go about fixing this?

    Read the article

  • When to use Bash, when Python/Perl/Ruby? [closed]

    - by futlib
    What's your rationale for when to write a Bash script and when to use a more powerful scripting language (Python, Perl, Ruby, ...)? I'm finding that very simple scripts are nicer with Bash, but many of those get quite fancy over time, and it never seems like a good idea to rewrite the whole thing. That's why I'm leaning towards always using Python for all scripting. But since Bash seems to be the the lingua franca of Linux scripting, is that something a responsible system administrator would do?

    Read the article

  • Auto-crop black margins dynamically of scanned images?

    - by naxa
    I have a notebook photocopied and the photocopy scanned, about 200 pages. For various reasons I need to print this material. There are large amounts of black areas at the sides of the page (after the page itself ends), "black margins". The image looks like this: I would like to remove the black places, but keeping all text. * The even and odd pages have the black part at different places. * Notably, there is a white edge outside the black one, too! * Most notably, the black areas has no fixed width (I've tried to overlay all the images for even and odd pages separately). It's width varies. The batch algorythm should be able to detect it. Is there a way to remove these black-white margins automatically, keeping the text?

    Read the article

  • Slowness on Exchange 2007 Server (network related we think)

    - by Az
    We are seeing some odd behavior out of our exchange 2007 server. I believe it is network related as during the slowness in response from the exchange server. During these times downloading files to server is fraught with connection resets and extreme slow download speeds that are not affecting other servers right on the same subnet with the same gateway and ISP. We have about 50 users at a time using Outlook 2003 from a terminal server not displaying any other signs of slowness, all network slowness is confirmed trying downloads on the exchange server itself. Checked for virus issues, there are none. Checked for hardware issues, none found I am noticing between 200-400 TCPv4 connections established I am seeing around 100k tcpv4(active) connections according to perfmon are these numbers odd? Has anyone run into anything similar? Our server has a gigbabit NIC linked to a gigabit switch using cat6 so I do not believe it is "physical". Thanks!

    Read the article

  • Why is the size of windows off by 226x238 if defined via the Window Rules?

    - by Bobby
    I have installed Sawfish 1.8.2 from source on my new Ubuntu 12.04 installation following the Debian instructions, but I had this problem also with the stock 1.5.3. Whenever I define dimensions in the Window Rules for a window, the size is off by exactly 226x238 pixels, which means that 100x100 turns into 326x328. That's a very odd behavior, given that Sawfish is saving and loading the dimensions of the windows correctly (if saved via the window menu). Some additional system information: $ uname -a Linux Dagon 3.2.0-24-generic-pae #39-Ubuntu SMP Mon May 21 18:54:21 UTC 2012 i686 i686 i386 GNU/Linux $ sawfish --version sawfish version 1.8.2 nvidia proprietary driver, 9600GT Two monitors, 1920x1080 + 1440x900 in one session. Positionng the windows is working fine, only the dimensions are off by that odd number. Does somebody have an idea why?

    Read the article

  • routing weirdness - traceroute 'vanishes' en route

    - by The Journeyman geek
    I'm attempting to set up one of my boxes as a server (again), but i'm having some odd connection issues- the box itself connects fine to the internet, but trying to connect to my external ip address seems to result in the trace getting 'lost' partway. http://pastebin.com/HCQAGbvn - this is a traceroute from another system that's connected to another ISP - starhub is my own one, while i have another system that i have access to on singtel. I'm wondering if my ISP is messing around with routing, or is something very odd going on. As you note, the traceroute dosen't reach me, but if it helps, i use a dd-wrt router. edit: Facepalmishly, turning the firewall on my router on and off fixed it. I don't get why it dropped off at different ip addresses each time, or why the router set it self to block.. everything, or why it affected the ipv6 tunnel as well.

    Read the article

  • Strange ports on default install of W7

    - by Sabre
    I have a base new install of windows 7, and when I went to look for something else I saw the attached netstat output. What concerns me is that this is Windows + Truecrypt + drivers, nothing else installed. The sequential high ranged ports belonging to several different seemingly not out of place services seemed odd. So I torched the install, used Active@ to scrub the disk, re-downloaded the ISO from MSDN, and did a fresh reinstall, viola, they are there again. It just seems out of place, I have seen a many netstats over the years, this one just strikes me as odd, so I started thinking rootkit? (JUst FYI, when I reloaded I named the machine "Error" so that is why the task manager reads the computer name as such.) So I would like to know if anyone else could explain it, and therefore is may be normal, or would they be worried as well, and should I start considering I have some very strange thing occuring on my network?

    Read the article

  • using git for media libraries

    - by mpapis
    Rationale: I want to manage libraries of media files (music, images) using git, there is git-annex but it requires haskel platform - but they do not play together well (also it's quite to big dependency for me). Question: Is there any other plugin with this functionality, or possibly would it be possible to write such plugin (resources?). Similar questions: Self-hosted, cross-platform repository for large files Using Git to Manage An iTunes Library?

    Read the article

  • displaying python's autodoc to the user (python 3.3)

    - by Plotinus
    I'm writing a simple command line math game, and I'm using python's autodoc for my math algorithms to help me remember, for example, what a proth number is while i'm writing the algorithm, but later on I'll want to tell that information to the user as well, so they'll know what the answer was. So, for example I have: def is_proth(): """Proth numbers and numbers that fit the formula k×2^n + 1, where k are odd positive integers, and 2^n > k.""" [snip] return proths and then I tried to make a dictionary, like so: definitions = {"proths" : help(is_proth)} But it doesn't work. It prints this when I start the program, one for each item in the dictionary, and then it errors out on one of them that returns a set. And anyway, I don't want it displayed to the user until after they've played the game. Help on function is_proth in module __main__: is_proth() Proth numbers and numbers that fit the formula k×2^n + 1, where k are odd positive integers, and 2^n > k. (END) I understand the purpose of autodoc is more for helping programmers who are calling a function than for generating userdoc, but it seems inefficient to have to type out the definition of what a proth number is twice, once in a comment to help me remember what an algorithm does and then once to tell the user the answer to the game they were playing after they've won or lost.

    Read the article

  • Math questions at a programmer interview?

    - by anon
    So I went to an interview at Samsung here in Dallas, Texas. The way the recruiter described the job, he didn't make it sound like it was too math-oriented. The job basically involved graphics programming and C++. Yes, math is implied in graphics programming, especially shaders, but I still wasn't expecting this... The whole interview lasted about an hour and a half and they asked me nothing but math-related questions. They didn't ask me a single programming question, which I found odd. About all they did was ask me how to write certain math routines as a C++ function, but that's about it. What about programming philosophy questions? Design patterns? Code-correctness? Constness? Exception safety? Thread safety? There are a zillion topics that they could have covered. But they didn't. The main concern I have is that they didn't ask any programming questions. This basically implies to me that any programmer who is good at math can get a job here, but they might put out terrible code. Of course, I think I bombed the interview because I haven't used any sort of linear algebra in about a year and I forget math easily if I haven't used it in practice for a while. Are any of my other fellow programmers out there this way? I'm a game programmer too, so this seems especially odd. The more I learn, the more old knowledge that gets "popped" out of my "stack" (memory). My question is: Does this interview seem suspicious? Is this a typical interview that large corporations have? During the interview they told me that Google's interview process is similar. They have multiple, consecutive interviews where the math problems get more advanced.

    Read the article

  • Math questions at a programmer interview?

    - by anon
    So I went to an interview at Samsung here in Dallas, Texas. The way the recruiter described the job, he didn't make it sound like it was too math-oriented. The job basically involved graphics programming and C++. Yes, math is implied in graphics programming, especially shaders, but I still wasn't expecting this... The whole interview lasted about an hour and a half and they asked me nothing but math-related questions. They didn't ask me a single programming question, which I found odd. About all they did was ask me how to write certain math routines as a C++ function, but that's about it. What about programming philosophy questions? Design patterns? Code-correctness? Constness? Exception safety? Thread safety? There are a zillion topics that they could have covered. But they didn't. The main concern I have is that they didn't ask any programming questions. This basically implies to me that any programmer who is good at math can get a job here, but they might put out terrible code. Of course, I think I bombed the interview because I haven't used any sort of linear algebra in about a year and I forget math easily if I haven't used it in practice for a while. Are any of my other fellow programmers out there this way? I'm a game programmer too, so this seems especially odd. The more I learn, the more old knowledge that gets "popped" out of my "stack" (memory). My question is: Does this interview seem suspicious? Is this a typical interview that large corporations have? During the interview they told me that Google's interview process is similar. They have multiple, consecutive interviews where the math problems get more advanced.

    Read the article

  • Xubuntu 14.04 with Compton, strange screen tearing, only when playing videos though (advice needed)

    - by LinuxDudester
    Hello beloved community, Yet again I am in need of your great expertise. I ran into a very strange issue and just can't wrap my mind around it. I'm running Xubuntu 14.04 exclusively, with Compton installed. The OS runs great and I have absolutely no screen tearing when I move my windows around, scroll in my web browser, work in Gimp or Photoshop (wine) or even when I play very graphic demanding games, like Metro Last Light, Euro Truck Driver 2 and so on. There's not a tiny bit of tearing to see, but as soon as I play videos, in xbmc, vlc or parole media player the tearing begins (strangely enough this does not apply to youtube videos). I followed all available workarounds on askubuntu and the ubuntu forum,like the 50-xserver-command.conf, startx /etc/X11/Xsession /usr/bin/xbmc-standalone -- -bs or libsdl1.2debian fix and many more, but to no avail. I also tried the Open Source Nouveau display drivers as well, but for some odd reason they don't work so great on my system or at least with my graphics card. Even with Compton installed and configured, I have an extreme amount of screen tearing, as soon as I switch to the proprietary Nvidia drives the screen tearing is gone completely, except for the video playback with xbmc, vlc or parole media player. System info for your reference: OS: Xubuntu 14.04 Linux-x86_64 - Processor: Intel Core i7-4770S CPU @ 3.10GHz - Ram: 16 GB - GeForce GT 750M 1024 MB - Nvidia Driver: 331.38 Has anyone experienced such an odd issue or do you have any advice on how I could fix this? I would appreciate any help! Have a nice day!

    Read the article

  • Strange robots.txt - how and why did it get there?

    - by Mick
    I recently created a very simple, pure HTML website which I have hosted with "hostmonster". Hostmonster had very good reviews on some comparison website and in general so far they appear to be perfectly good in every way... At least I thought so until just now... I have been making lots of edits to my site on an almost daily basis. My site now appears on the first page (7th on the list) for my most important keyphrase when doing a google search. But I did notice some problem with the snippet chosen by google. I asked a question on this site about snippets and got some great answers. I then made some modifications to my meta data and within 48hrs the google snippet for my search was perfect. The odd thing though was that looking at the "cached" version google had, it appeared that the cache was still very odl- like three weeks previous. This seemed very odd - how could it be that the google robots had read my new metadata without updating the cache? This puzzled me greatly. Just now it occurred to me that maybe I had some goofey setting in my robots.txt file. I didn't actually remember even making one - but I thought I'd have a look just in case. Much to my horror, I saw that there was a robots.txt and it contained the disturbing text below: sitemap: http://cdn.attracta.com/sitemap/728687.xml.gz Intuitively this looks like some kind of junk, spam trick, and I had indeed been getting some spam from "attracta". So my questions are: 1. Should I simply delete this robots.txt? 2. Was the file there all along - placed there because of some commercial tie-in between attracta and hostmonster. 3. Does the attracta robots file explain the lack of re-caching?

    Read the article

  • IRQ Conflicts Causing Video Card and Boot Problems?

    - by sanpatricio
    tl;dr - I have 4 devices sharing 1 IRQ. Is this bad and how do I tell the BIOS to stop it? Background: I have an old Dell GX280 dual Pentium 4 that I (semi) resurrected last weekend with an installation of Ubuntu 12.04. Everything was going fine the first several hours until a problem that plagued me when WinXP was on that machine happened -- it froze. Completely froze. None of the myriad of ways I have found here on askubuntu helped me to regain control except a long-press of the power button to shut it off. Clearly, this wasn't a software/WinXP issue. After much googling, I found that hardware conflicts can often cause this sort of total lock-up and with all the odd blocks of yellow and flecks of color showing on my screen (both WinXP and Ubuntu) I figured my old GeForce 7600 was failing and causing me these odd issues. (A good canned-air dusting of the entire interior fixed the color fleck problem) Again, through much googling and numerous answers found on askubuntu, I somehow stumbled my way onto the lshw command. After going through it, line by line, I found that I have four devices sharing IRQ 16: eth0, wlan0, ide0 (DVD-RW), and my video card. In hindsight, I can recall weird instances of my Ethernet connection to another computer not working when I thought it should. I never full troubleshot those issues so it could be a coincidence. The other thing that has been plaguing me since installing Ubuntu (wasn't there during WinXP) has been periodic moments of my monitor getting no signal from Ubuntu during boot. The first couple days, it would disappear after the Dell boot screen and reappear at Ubuntu login. Now, it disappears after the Dell boot screen and doesn't return at all -- I have to hit F12 where I can load a safe mode version of Ubuntu and get more details like dmesg and lsdev. I also ran memtest86 overnight and woke up to zero errors, so failing RAM is out. Where do I go from here?

    Read the article

  • Oracle and ATG: The Next Generation of Customer Experience

    - by divya.malik
    Oracle today announced that it has completed the acquisition of Art Technology Group (ATG), Inc. In a webcast this morning, Thomas Kurian, Executive Vice President, Oracle Anthony Lye, Senior Vice President, CRM at Oracle and  Ken Volpe, Senior Vice President of Products and Technology from ATG, presented the rationale, strategy and future direction with this acquisition, ATG is a leading E-Commerce service provider and Oracle is a leading CRM and Retail Applications provider, which makes it a winning team. There has been a lot of positive feedback from the analysts, press as well as customers. “As a customer of both Oracle and ATG, we view the integration of the two companies as a natural fit,” said Kevin Cunnington, Global Head of Online, Vodafone Group. “We look forward to new efficiencies that address our online and cross-channel business strategies and help us further provide superior customer experiences.” For more information about Oracle and ATG: Overiew and FAQs Webcast Press Release Technorati Tags: oracle,oracle siebel crm,atg,crm

    Read the article

  • What do neglected O'Reilly book topics tell us about that topic?

    - by Peter Turner
    Does anybody know how O'Reilly chooses topics to publish? For some reason, I don't see how it can be based on demand. The reason, I ask, is because they haven't published a Delphi book in almost 12 years and Object Pascal is at least as esoteric as Erlang and as practical as PHP and as robust as C++. So, maybe someone knows what rationale is behind O'Reilly's publishing methodology or what it is supposed to tell us about the relative popularity or usefulness of any given language or programming technique? Oh, I forgot about pig and robotlegs

    Read the article

  • What's wrong with JavaScript

    - by ts01
    There is a lot of buzz around Dart recently, often questioning Google motivations and utility of Dart as replacement for JavaScript. I was searching for rationale of creating Dart rather than investing more effort in ECMAScript. In well known leaked mail its author is saying that Javascript has historical baggage that cannot be solved without a clean break. But there is only one concrete example given (apart of performance concerns) of "fundamental language problems", which is an existence of a single Number primitive So, my questions are: How an existence of a single Number primitive can be a "fundamental problem"? Are there other known "fundamental problems" in JavaScript?

    Read the article

  • Where does this concept of "favor composition over inheritance" come from?

    - by Mason Wheeler
    In the last few months, the mantra "favor composition over inheritance" seems to have sprung up out of nowhere and become almost some sort of meme within the programming community. And every time I see it, I'm a little bit mystified. It's like someone said "favor drills over hammers." In my experience, composition and inheritance are two different tools with different use cases, and treating them as if they were interchangeable and one was inherently superior to the other makes no sense. Also, I never see a real explanation for why inheritance is bad and composition is good, which just makes me more suspicious. Is it supposed to just be accepted on faith? Liskov substitution and polymorphism have well-known, clear-cut benefits, and IMO comprise the entire point of using object-oriented programming, and no one ever explains why they should be discarded in favor of composition. Does anyone know where this concept comes from, and what the rationale behind it is?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >