Search Results

Search found 1063 results on 43 pages for 'alternate'.

Page 26/43 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Dot Game and Dynamic Programming

    - by Albert Diego
    I'm trying to solve a variant of the dot game with dynamic programming. The regular dot game is played with a line of dots. Each player takes either one or two dots at their respective end of the line and the person who is left with no dots to take wins. In this version of the game, each dot has a different value. Each player takes alternate turns and takes either dot at either end of the line. I want to come up with a way to use dynamic programming to find the max amount that the first player is guaranteed to win. I'm having problems grasping my head around this and trying to write a recurrence for the solution. Any help is appreciated, thanks!

    Read the article

  • Steps needed to install a PHP application (Mantis) on Windows Home Server - How please?

    - by Brian Frost
    I'm using Windows Home Server and have already managed to install SVN on it to allow me to use Tortoise SVN on client PC's sharing a repository on the server via SVN's service and port. I'd now like to install a bug tracker hosted on this server. I'm not fussy about which one but I saw Mantis - which is a PHP application and looks ok for my purpose. This is where I get weak on such stuff - what steps do I need to do to install and configure PHP (and presumably MySql to get mantis working? It is an http application. As an alternate answer, I'd be happy to use another - more easily installed - bug tracker that has a server service and a port of its own. I'll appreciate any comments.

    Read the article

  • What resources will help me understand the fundamentals of Relational Database Design.

    - by Rachel
    This are few of the fundamental database questions which has always given me trouble. I have tried using google and wiki but I somehow I miss out on understanding the functionality rather than terminology. If possible would really appreciate if someone can share more insights on this questions using some visual representative examples. What is a key? A candidate key? A primary key? An alternate key? A foreign key? What is an index and how does it help your database? What are the data types available and when to use which ones?

    Read the article

  • Background Image w/Quartz Drawing

    - by James
    I'm using Quartz to do some basic drawing. I recently decided I wanted a background image for my app. So I went into my XIB file and added a UIImageView and set the background, looks good. However, when I run it, the Z-Index of the image is above my drawing. I googled a bit and found that you can do Layout Send to Back in IB...but that option is grayed out to me when I have my UIImageView selected. Is there an easy way to move this UIImageView permanently to the background? Is there perhaps an alternate method to doing this that I should consider? Thanks

    Read the article

  • Which header files are necessary to run this code snippet?

    - by httpinterpret
    It's from here,but fails when compiling: int main(int argc, char **argv) { struct hostent { char *h_name; // main name char **h_aliases; // alternative names (aliases) int h_addrtype; // address type (usually AF_INET) int h_length; // length of address (in octets) char **h_addr_list; // alternate addresses (in Network Byte Order) }; #define h_addr h_addr_list[0] // First address of h_addr_list. struct hostent *info_stackoverflow; int i = 0; info_stackoverflow = gethostbyname( "www.stackoverflow.com" ); printf("The IP address of %s is %s", info_stackoverflow->h_name, inet_ntoa( * ((struct in_addr *)info_stackoverflow->h_addr ))); /* aliases */ while( *(pc_ip->h_aliases + i) != NULL ) { printf("\n\tAlias: %s", *(pc_ip->h_aliases + i) ); i++; } }

    Read the article

  • Question about best practices and Macros from the book 'C++ Coding Standards'

    - by Victor T.
    From Herb Sutter and Andrei Alexandrescu's 'C++ Coding Standards', Item 16: Avoid Macros under Exceptions for this guideline they wrote: For conditional compilation (e.g., system-dependent parts), avoid littering your code with #ifdefs. Instead, prefer to organize code such that the use of macros drives alternative implementations of one common interface, and then use the interface throughout. I'm having trouble understanding exactly what they mean by this. How can you drive alternate implementations without the use of #ifdef conditional compile macro directives? Can someone provide an example to help illustrate what's being proposed by the above paragraph? Thanks

    Read the article

  • Poster image on embedded youtube video

    - by Srijan Deshpande
    Hi, I want to embed a youtube video on my website and I need to replace the default poster image that shows up on the video with a jpg of my own. The default image that shows up is a scaled-up thumbnail and is therefore very blurry and pixelated and I need to use a hi-res jpg in place of it. I'm aware that youtube only allows us to pick one of three auto-generated thumbnails, but does that restriction also apply to youtube videos embedded on an external website? If so, is there an alternate way to do this? Thanks!

    Read the article

  • How to flush data in php and disconnect user but keep the script alive

    - by Rodrigo
    This is a trick question, while developing a php+ajax application i felt into some long queries, nothing wrong with them, but they could be done in background. I know that there's a way to just send a reply to user while throwing the real processing to another process by exec(), however it dosen't feels right for me, this might generate exploits and it's not pratical on making it compatible with virtual servers and cross platform. PHP offers the ob_* functions although they help on flushing the cache, but the user will keep connected until the script is running. I'm wondering if there's an alternate to exec to keep a script running after sending data to user and closing connection/thread with apache, or a less "dirty" way to have processing data sent to another script.

    Read the article

  • deploying a simple html website with eclipse EE & tomcat 7 & router for pc not in LAN

    - by hawkeye
    Hello everyone and thanks for your time, first of all - I want to make a note - I can see the website from my own pc which is the only one connected to the (netgear dgn1000) router, and I can do so with several browsers on my pc, but - when I try and do a port forwarding so that I could access this simple html file (which in the way would use a simple servlet class) I can't seem to view it I have configured my router (both the "services" and the "firewall" sections), and I have also changed my LAN properties according to my ISP's explanation (via phone) : instead of choosing the "obtain an IP address automatically" I have chosen the "use the following IP address, with IP address of 10.0.0.1 (this was also set in the router's port forwarding), Subnet mask of 255.255.255.0, default gateway by checking the same value as seen in the cmd when executing the command ipconfig /all after doing so I've changed the DNS to use the address (just the preferred and not the alternate one) given with the ipconfig /all and still - nothing :/ is it something in my network settings or in my deployment of the eclipse/tomcat ? any help would be greatly appreciated, thanks :)

    Read the article

  • Breadth first search all paths

    - by Amndeep7
    First of all, thank you for looking at this question. For a school assignment we're supposed to create a BFS algorithm and use it to do various things. One of these things is that we're supposed to find all of the paths between the root and the goal nodes of a graph. I have no idea how to do this as I can't find a way to keep track of all of the alternate routes without also including copies/cycles. Here is my BFS code: def makePath(predecessors, last): return makePath(predecessors, predecessors[last]) + [last] if last else [] def BFS1b(node, goal): Q = [node] predecessor = {node:None} while Q: current = Q.pop(0) if current[0] == goal: return makePath(predecessor, goal) for subnode in graph[current[0]][2:]: if subnode[0] not in predecessor: predecessor[subnode[0]] = current[0] Q.append(subnode[0]) A conceptual push in the right direction would be greatly appreciated. tl;dr How do I use BFS to find all of the paths between two nodes?

    Read the article

  • Some facebook friends' birthdays returning as null but I have the correct API permissions

    - by Andrei Radulescu
    I'm tring to get my friends' birthdays in my app and some of them are null. I thought that those people don't have a birthday set, but they actually do. My fql query is: SELECT uid,name,birthday_date FROM user WHERE uid IN (SELECT uid2 from friend where uid1=me()) My app has the "friends_birthday" permission set. I also tried with "birthday" instead of "birthday_date". Same result. I imagine that this happens because they opted out somehow, but I don't know how. Is there an alternate solution to actually get their birthdays from facebook? Thanks!

    Read the article

  • dynamically updating a datagrid from a XML file c# 3.5

    - by Farstucker
    I have a datagrid that is populated via XML file when the form loads. Everything is working great but I would like the datagrid to update dynamically when a new order is received (Separate class receives a data stream and updates the file). Im looking for suggestions on how this should be done. (ie using a timer update every second, or monitor the file using FileSystemWatcher.. etc) Since where here, I might as well mention that in order to update the datagrid Im clearing the whole data set and Re-reading the file using: DataSet.Clear(); DataSet.ReadXml("file.xml"); dataGridView1.DataSource = DataSet; if this is not the proper approach, please offer any alternate suggestions.

    Read the article

  • Best tools to parse reports

    - by Andy Schaefer
    I have a report that I need to parse/scrape for loading into an alternate or query-able data store. The report looks like something akin to: this. My gut is that PERL would do a decent job, but I have several different permutations of the report and I don't really want to make a script around each form. This report is a pretty stock type report, and I have seen where Monarch Pro can parse these types of reports, but I have had a difficult time finding alternatives to how these could be parsed since I'm looking to do this working primarily in a Linux environment. Any suggestions?

    Read the article

  • ASP.NET DropDownList Replacement

    - by user302004
    Currently, I'm populating a drop down list when a file is created in a configurable folder. if (!downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName)) Then, I add the file and remove "No Responses Available". However, if the same file is resubmitted (i.e., the file name is the same but the timestamp is different), then I want to remove the older entry and replace it with a new entry in the drop down list. I have the filename, so I go into the "else" block from the line of code above. From there, I'm checking to see if I have the same filename and a different creation time. if (downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName) && downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.CreationTime) From here, I want to find the position, remove it, and add the new text. This approach isn't working. Can anyone offer an alternate approach?

    Read the article

  • Pros & Cons of using windows Active Setup

    - by Deepak N
    What are the known Pros/Cons of using windows active setup for deployment? Does Microsoft recommend/support using active set up? If your are interested, here is the context: I'm working on outlook 2003 VSTO addin.The installer for this addin creates few registry entries either in HKCU or HKLM depending on "Single User" Or "All User" installation. We are planning not to use "All User" installation since the addins installed for all users does not show up in COM AddIns list in outlook.The alternate approach is to use active set to install for single user.

    Read the article

  • VIsual Studio 2010 Web Performance Test / Load tests / Coded UI Tests. ANYONE REALLY USE THESE?

    - by punkouter
    I can find some articles on how to use them but I can't seem to find anywhere peoples impression of them using them in real projects. I have been trying to figure out how to use them and Ive had alot of problems.. Can someone out there who uses these tools on the job give me thier impression? Are there better alternate tools available? Using these really just a waste of time ? With Coded UI Tests I see how they are good for basic javascript checking but its so basic of a example I don't think it is worth it. With web tests I like how they work but when I activate code coverage/ASP.NET profiling it doesnt work half the time.

    Read the article

  • Casting a container of shared_ptr

    - by Jamie Cook
    Hi all, I have a method void foo(list<shared_ptr<Base>>& myList); Which I'm trying to call with a two different types of lists, one of DerivedClass1 and one of DerivedClass2 list<shared_ptr<DerivedClass1>> myList1; foo(myList1); list<shared_ptr<DerivedClass2>> myList2; foo(myList2); However this obviously generates a compiler error error: a reference of type "std::list<boost::shared_ptr<Base>, std::allocator<boost::shared_ptr<Base>>> &" (not const-qualified) cannot be initialized with a value of type "std::list<boost::shared_ptr<DerivedClass1>, std::allocator<boost::shared_ptr<DerivedClass1>>>" Is there any easy way to cast a container of shared_ptr? Of alternate containers that can accomplish this?

    Read the article

  • IPSec help on Windows 2003 please!!

    - by roacha
    Hey guys, I am trying to configure IPSec between a web and app server in our environment. I want all traffic between these two servers to use IPsec and be encrypted. These servers are on the same domain so i am currently using Kerebos for security, I have also tried pre-defined keys and nothing changed. When I try and ping between the servers I get "Negotiating IP Security" everytime. I have also confirmed that when I change "Require Security" to "Permit" everything works so IPSec is working, I believe its something with my security setup. Under the security tab both servers have the default 3DES keys first and then DES keys. I have also specified tunnel endpoints (the alternate server's IP). What am I missing? Thanks for any help..

    Read the article

  • How would I go about writing a Linux TTY sniffer?

    - by alienate
    For educational purposes (not that anyone should care the motivations behind such an exercise) I'd like to write a program that can read/write to/from alternate tty/pty's. I've read papers (from the 1990's) but can't employ the implementation they use, on modern UNIXes. I was hoping that someone had researched into this in the past, or at least, read documentation pertaining to it, that they could provide. I also wonder if (considering the fact that Linux doesn't have STREAMs) if this exercise must be done via a loadable kernel module? I have many questions and probably a misunderstanding of some of the fundamental ideologies that allow such objectives to be put in place, could someone help? :)

    Read the article

  • parsing xml attribute value

    - by vbNewbie
    I have been parsing xml content using the xmlreader and cannot use the xml document but so far it works getting all elementcontent except for the attribute contents. I need to parse the link below found in the following entry; <title>XXXX UUUUUU posted a</title> <category term="NotePosted" label="Note Posted"/> <link rel="alternate" type="html" href="http://www.dfsddsfdsf.com/profile.php?id=sdfdfsfdsdfddfsfd&amp;v=wall&amp;story_dbid=dssdfasdfdasfdsafafafa"/> <source>......... <source> I need the href tag in the link attribute but it keeps coming back null. While ureader.Read If ureader.HasAttributes Then fId = ureader.GetAttribute("href") If fId.Contains("?v=wall&amp") Then fIdList.Add(fId) Exit While End If If String.IsNullOrEmpty(fId) Then fId = "NOTHING" End If End If End While

    Read the article

  • url or content as a variable in the header of the page

    - by Scorpion King
    I am designing a site where external links form various are being shown on my page. I am using $url=$_GET['url']; $website_data = file_get_contents($url); echo $website_data; so essentially a user would click on a hyperlink which is something like www.test.com/display_page.php?url=http://www.xyz.com/article/2.jpg My page, list_of_images.php, typically has a list of images with href for each image as above on the page and when any image is clicked it would go to display_page.php, which would show our banner on the top of this page, some text and then this image beneath that. This image could be from any website. I am currently sending the url directly and grabbing it using GET. I understand that users/hackers can actually do some coding and send commands for the url variable and could break the server or do something harmful and so i would like to avoid this method or sending the url directly in the header. what is the alternate approach for this problem?

    Read the article

  • hadoop mapper static initialisation

    - by rakeshr
    Hi, I have a code fragment in which I am using a static code block to initialize a variable. public static class JoinMap extends Mapper<IntWritable, MbrWritable, LongWritable, IntWritable> { ....... public static RTree rt = null; static { String rtreeFileName = "R.rtree"; rt = new RTree(rtreeFileName); } public void map(IntWritable key, MbrWritable mbr,Context context) throws IOException, InterruptedException { ......... List elements = rt.overlaps(mbr.getRect()); ....... } } My problem is that the variable rt in the above code fragment is not getting initialised. Can anybody suggest a fix or an alternate way to initialise the variable. I don't want to initialise it inside my map function since that slows down the entire process.

    Read the article

  • form submit not working in firefox but works fine in IE

    - by jestges
    Hi, I want to submit my parent page when I click on submit button of the child page. In my child page I've written my code as string scriptString = "<script language=JavaScript> window.opener.document.forms(0).submit(); </script>"; // ASP.NET 2.0 if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString)) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", scriptString); } it is working fine in IE but not working in Firefox. What could be the alternate method for this? Thank in advance

    Read the article

  • preg_match not defined in php4 in openwrt?

    - by user2723949
    I have installed the packages PHP4 and PHP4-CGI in openwrt through command line (opkg install) when I tried this simple code by putting this in the openwrt www folder, <?php $subject = "abcdef"; $pattern = '/^def/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3); print_r($matches); ?> I got this error Fatal error: Call to undefined function: preg_match() in /www/phptest.php on line 4 but php manual says preg_match() is defined in php4 also.. What might be the reason for this error? Is there any other PHP module that is to be installed? Or is there any alternate method for preg_match?

    Read the article

  • jQuery .toggle() called by window.setInterval() not functioning

    - by Paul Daly
    I am trying to alternate between two logos every 5 seconds using the following code: window.setInterval( function () { //breakpoint 1 $("#logo").toggle( function() { //breakpoint 2 $(this).attr('src', '/Images/logo1.png'); }, function() { //breakpoint 3 $(this).attr('src', '/Images/logo2.png'); } ); }, 5000 ); I can get a simple toggle to work, but when I introduce the toggle within window.setInterval(), the toggle's two handlers won't fire. I set breakpoints on the lines directly beneath the comments in the code above. Breakpoint 1 hits every 5 seconds. However, Breakpoint 2 and 3 never hit. Why are neither of the toggle function's handlers firing?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >