-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path1k_test_data.txt
1 lines (1 loc) · 865 KB
/
1k_test_data.txt
1
{"3911035": ["Should I convert RAW to jpeg before making an HDR?", "I've been going back and forth with this. I've been looking more into working with some HDR to just get a feel for the process. I have a 500D and I'm using exposure bracketing to take 3 shots. 0, -2, and +2 EV. I've been using the HDR tool in Photoshop and wonder if just putting 3 RAW files in is giving me the best results.\nI've considered trying to expand my files by going from -3 to +3 by using the RAW files to fill in the gaps and converting them to jpegs. \nTo summarize, is it better to work with RAW or jpegs when making HDR's. and if using jpegs is better, should I use the RAW's to get as many different exposures as possible? \n", "", "raw hdr jpeg"], "4972640": ["WPF & MVVM: Save ScrollViewer Postion And Set When Reloading", "I've got a ScrollViewer for a StackPannel. The users want the save the position of the ScrollViewer so when the application is re-loaded with their data the StackPannel will show the items they were viewing before. It has nothing to do with which items were selected, if any, merely the potion of the ScrollViewer in relation to the StackPannel items.\nSo, if the StackPannel has 50 items and the ScrollViewer is scrolled so that items 20-25 of the StackPannel are visible I need to reload the application and scroll down to that position without selecting an item.\nAlso, I'm using MVVM and I'd like to set the ScrollViewer position via the ViewModel code too.\n", "", "c# wpf mvvm"], "3027341": ["Change repeat key threshold c++", "I'm building a c++ tetris game (not c++ .Net). I feel my controls are weird. I want to make it so that when user presses one of the arrow keys, about 10ms of holding it down will start the repeat function windows has. It is set to about 500ms by default, and it is too laggy for my game. How can I set the speed at which it changes from the keydown to the repeat keydown? Not how many times / sec it repeats.\nThanks\n*what I want to do is change the repeat delay to short\nIn control panel in keyboard settings there is repeat rate, how do i set this?\n", "", "c++ winapi native"], "5321420": ["EJB3 Web Services Error with JAXB", "Update: I checked the JBoss log and found the following errors:\n\nMy environment is \n\nI am getting an error \"ns1:MessageHeader\" must refer to an existing element when I tried to access the webservice, the below is the wsdl generated by EJB3. Can someone please help me to identify the problem, I am a newbie to Webservices and JAXB. \nI have the below EJB3 web service. \n\n\n\nThe following is the class generated by JAXB from a xsd file:\n\n", "2009-10-28 10:21:34,472 ERROR [org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] (main) JBossWS_ejb.uhandler.pds.hsc.xyzis.com_8603663089732759450.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve]::Message=src-resolve: Cannot resolve the name 'ns1:MessageHeader' to a(n) 'element declaration' component.\n2009-10-28 10:21:34,474 ERROR [org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] (main) JBossWS_ejb.uhandler.pds.hsc.xyzis.com_8603663089732759450.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve]::Message=src-resolve: Cannot resolve the name 'ns1:Statuses' to a(n) 'element declaration' component.\n2009-10-28 10:21:34,475 ERROR [org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] (main) JBossWS_ejb.uhandler.pds.hsc.xyzis.com_8603663089732759450.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve]::Message=src-resolve: Cannot resolve the name 'ns1:Success' to a(n) 'element declaration' component.\n", "java web-services ejb-3.0 jaxb"], "1886521": ["Calling a Function After New Post Creation for a WordPress Custom Post Type?", "Assume I created a new post type . Is there a way to perform a function (user created) when this new post has been created?\n", "'product'", "custom-post-types hooks"], "5293696": ["How to set scroll view height automatically to the respective text view? Xcode 4", "I'm incredibly new to this, and have been using various tutorials to put an app together. I have a tab bar app, with a table view navigation. Once a table view item is clicked, it shows a scroll view, that contains a text view and image views. \nI have been able to set up the scroll view succesfully from a tutorial using storyboards, but I have more than one table item, so using the code I have right now:\n[super viewDidLoad];\n\nWont work, because 600 is too small for some scroll views, and too big for others (leaving an ugly black space). I'm trying to find a code that automatically sets the scroll view height to the height of the text view. Everything I've found so far doesn't work with the storyboards set up I've been using, and I'm sure there's a better way than creating a new scroll view for every table item. \nThanks!\n", "[Scroller setContentSize:(CGSizeMake(320, 600))];\n[Scroller setScrollEnabled:YES];\n", "xcode4 scroll textview height scrollview"], "619208": ["AS3: Viewports without an end", "I'm making a space navigation game. So it starts with the user on the spaceship and then when he press the up key the ship goes forward, the 'map' is always different, I have 5 variations of stars and 2 variations of planets, so they basically 'spawn' randomly while the user navigates. I can make the key detection, the movie clips generator code, but I don't know how do I make the navigation code, I mean how do I make the viewport move when the user press the key, ... I've saw a code that I didn't understand too well that the guy basically created a giant movie clip that moves according to the key that was pressed. That won't work in my case because I want it to generate everything randomly and when the user press the down arrow, I want it to go back, with the same 'map' that he was before. Please help me out guys I'm totally confused with all this viewport thing. And also, I want the game to run fast, I'm kind of new to the Action Script, and I don't know if it gets heavy if you are rendering objects that are not being displayed, if so will a simple 'obj.visible = false' works? Thanks in advance. \n", "", "actionscript-3 random 2d generator viewport"], "3119110": ["Access to column name of dataframe with *apply function", "I need to make tutorial for beginner using the R *apply function (without using reshape or plyr package in a first time)\nI try to (because i read is not good for dataframe) a simple function to this dataframe, and i want to use named column to access data : \n\nI have this error , it is probably because the dataframe is modified by laply ?... is there a best way to do that with $ named column? \nI resolve my first question with @DWin answer. But i have another problem, misunderstanding, with mixed dataframe (numeric + character) : \nIn my new use case, i use two function to compute distance, because my objective is to compare a distance Point between all of other Point.\n\n", "lapply", "r transform data.frame lapply"], "3474649": ["JavaScript: On selection of different drop down menu items, I want more options to show", "I have a drop down menu with different options. Now on selection of particular menu items I'd like more options to show. Each set of options will be different for each menu item, how would I go about doing this? Is the right way to append the new options to the document?\n", "", "javascript html drop-down-menu options"], "1552213": ["Java Reading .txt file from another directory", "The code I am running is in /Test1/Example. If I need to read a .txt file in /Test1 how do I get Java to go back 1 level in the directory tree, and then read my .txt file\nI have searched/googled and have not been able to find a way to read files in a different location.\nI am running a java script in an .htm file located at /Test1/Test2/testing.htm. Where it says script src=\" \"\nWhat would I put in the quotations to have it read from my file located at /Test1/example.txt\nThanks\n", "", "java directory text-files readfile"], "3352967": ["MEF Import Scenario", "Hi\nI have some problems in import scenarios example:\n\nThen i hawe two classes that implement interface IIOWriter like :\n\nHow can i let that to user so he can change that in runtime, so example whene he type select in ListBox FileWriter than the IIOWriter in WriteInputData will be injected FileWriter end so one..\nSorry for my bad english.\n", " [Export(typeof(IICon))]\npublic class WriteInputData : IICon\n{\n [Import(typeof(IIOWriter))]\n public IIOWriter IOWriter { get; set; }\n\n public object Input { get; set; }\n\n public void Process()\n {\n IOWriter.Write(Input);\n }\n}\n", "c# .net mef"], "4187220": ["jQuery detect scroll of screen and add In static HTML", "I have some code that detects when you scroll which then calls a function.\nIn this function I want to be able to fade in content as you scroll. So as I reach the bottom of the page it calls a function then snippets of static html is then faded in, say 10 rows of content at a time.\nHopefully someone can help me finish this off as im stuck: - \nhttp://jsfiddle.net/sTSxS/\nThanks\n", "", "jquery scrolling detection"], "3122530": ["Win7 Office2010 SharePoint2007 Error Editing/Viewing Documents", "SITUATION: We are having an issue with users editing files in MOSS 2007 using IE8. This is not impacting users that still use Windows XP and Office 2007 (IE7), but rolling back is not an option. The issue occurs when a user attempts to edit a document. At first they receive a message indicating that the office product couldn't connect to the server to execute the save. Closing and reopening and trying to open the document then results in an error: \"No connectivity with the server. The file can't be opened because the server couldn't be contacted.\" This occurs for all files they then attempt to open.\nBACKGROUND: Testing has revealed an issue that appears to be on the client end. Basically, these Win7/Office2010 machines initially do not have the issue. When they are first joined to the network (using a standard image), they can edit documents in SP2007 without issue. As time goes by and various updates (patches, Group Policies, etc.) are applied, SOMETHING CHANGES and they start receiving the error.\nFor awhile, we believed Java to be the culprit due to it being one of the two program updates (QuickTime was the other) that were applied to our test client machine between when it was working fine and when the user started getting the error. When we initially tested this theory by removing Java 1.6 update 37 (leaving only update 33) the user stopped getting the error and was able to edit again. At this point, we also noticed on a machine that still had update 37 that users other than the primary (who was most likely logged on when the update was applied to their machine) were able to edit without the errors. EUREKA! NOT SO FAST. It turned out that this ability to edit was short-lived. Before long, all users were getting the edit error on the machine whether it had update 37 or only 33. Java theory - disproved.\nThis ability to edit has occasionally returned for short periods of time with some of the edits tried on the client machine (see below), but it never takes long for the error to resurface.\nResolutions Tried (& Failed) on the Client Machines\n-Adding a Registry Key for BasicAuthLevel with a value =2\n-Using IE 64-bit to open files\n-Removing Java 1.6 Patch 37\n-Making a fake proxy in IE\n", "", "2007 document-library office-integration internet-explorer windows-7"], "2454474": ["How to implement OpenDNS style proxying of web traffic", "I have a requirement that I believe may be impossible and wanted to confirm this with experts in this community.\nA client wants us to configure a DNS server to point all non-whitelisted domains to an IP address of a server on the internet. This server should forward / redirect all non-http traffic to an IP address associated with the real DNS record as accurately as possible. However, for all port 80 traffic, it should intercept the traffic and forward to a web proxy. This could in theory be possible if we had a large block of public IP addresses that could intelligently route based on the sender's IP to the proper destination, but the engineering effort required there to keep the DNS request and subsequent requests to that same domain in sync would be immense. Not to mention we would be limited from a concurrency perspective.This is probably similar to how OpenDNS does their DNS+Proxying, but they only seem to do it for google.com. This needs to work for an arbitrary set of domains (potentially all of them).\nIs the above approach feasible? If not, are there other ways this problem can be approached short of requiring specialized gateway hardware? \nIdeally the system will minimize bandwidth usage & latency for non-http traffic without requiring anything besides DNS or firewall configuration. I realize we can forward all http traffic at the firewall level, but the client wants to avoid http requests to CDNs or media heavy sites as well as minimize deployment effort across disparate network configurations.\n", "", "networking proxy dns reverse-proxy"], "5294335": ["What tools (free) do you use to design software", "What tools do you use to speed up documenting application design.\nNamely, creating wireframes, flowcharts. What other methods do you find essential .\nIs the general consensus that use cases are vital, or is a good functional spec document easier and quicker\n", "", "design architecture uml"], "4932280": ["How-to create index on multiple documents with reducing", "I've the following documents :\n\nI want to query the list of books and have an information on each book if user has it in favorite.\nActually a result like this :\n\nHow can i create my index to perform that ?\nThanks.\n", " public class User\n {\n public string Id { get; set; }\n public string Email { get; set; }\n public string Password { get; set; }\n }\n\n public class Book\n {\n public string Id { get; set; }\n public string Title { get; set; }\n }\n\n public class BookFavorite\n {\n public string Id { get; set; }\n public string UserId { get; set; }\n public string BookId { get; set; }\n }\n", "c# ravendb"], "685215": ["Home computer can't keep internet connection with wireless usb adapter", "I did some work on a computer recently that had problems keeping an internet connection. Here's what happened. I turned on the computer and there was no wireless connection. After resetting the USB cable that connected the Wireless G USB Adapter (old linksys that still had the light blue on the box) to the computer the connection came back but only for a moment. I ran the windows connection diagnostics wizard from IE and it was able to find the connection. The connection held for about an hour and during that hour I updated Malwarebytes and ran a scan, it was clean. The virus scanner also turned up clean. After this was done Windows lost the connection. After a Windows reboot the connection was found immediately and it held the remainder of the time I was there. Given that this has been an issue for the client for some time I suggested purchasing a PCI wireless adapter. I'm under the assumption that there is a problem with the (old) wireless USB adapter or possibly even the cable it is attached to. Possibly not enough power?\nIn the end what I want to know is what else could be the problem?\nEdit: I should note that this is related to a desktop not a laptop. If that matters at all.\n", "", "usb linksys adapter wireless-networking"], "4604100": ["Lotus Notes, Exchange and C#", "How can I access and read Lotus Notes NSF Files via C# (without a Lotus Notes Client installation)? \nWhat are the big differences between Outlook PST Files and NSF Files?\nWhere can I find good code examples, reading NSF files?\n", "", "c# .net lotus-notes lotus-domino"], "607756": ["Why is allowing the guest account network access considered insecure?", "I was recently interested in allowing the guest account network access as related to a research project I was doing.\nThis was on a Windows Server OS.\nThe outcry was amazing....people freaking out and saying how insecure it is and how there just had to be a better way regardless of my needs or wants.\nApparently it's such a bad idea that under no circumstances should the question even be asked.\nThis seems like FUD\nLooking around on the net the solution given when other people have asked around was to make a limited user account instead. Now, this seems like a worse solution.\nIf for whatever reason (and there are many, trying to answer for a specific reason does not help anyone, nor the community) someone is determined to have a guest account for anonymous access on a Server OS, is it not better that they use the built in guest account?\nA limited account created for the exact same purpose will be used the exact same way, except that the built in guest account is already locked down to a far greater degree. Indeed, using the built in guest account with network access would seem to be more secure than creating a limited account for the same purpose.\nSo, why is trying to enable network access for the built in guest account considered so insecure, and why does it evoke such panic and FUD?\nedit: To be clear I am referring to having the guest account initiate network connection from the machine while logged in, not using the guest account to access anything remotely\n", "", "windows security guest"], "1633073": ["Pyrus problems on Ubuntu 12 installing ZF2", "I tried to install zend framework 2 on Ubuntu 12.04.1 64 bit but have run into difficulties.\n# sudo pyrus install zf2/Zend_Framework-beta#Standard\nfailed mid transaction with no other previous errors that I can recall other than warnings about timezone not being set. ( Unfortuantely my terminal history has lost the original output)\nPyrus\\Installer\\Exception: Installation failed\n \u00a0Pyrus\\AtomicFileTransaction\\MultiException: ERROR: commit failed\n \u00a0\u00a0Pyrus\\IOException: CRITICAL - unable to complete transaction, rename of actual to backup path failed\n \u00a0\u00a0\u00a0Pyrus\\AtomicFileTransaction\\RuntimeException: Cannot rollback - not in a transaction\nNow when I try to rerun \n# sudo pyrus install -f zf2/Zend_Framework-beta#Standard \nit fails with \nPyrus\\Registry\\Exception: Cannot retrieve package file object for package packages.zendframework.com/zend_framework, it is not installed\nUninstall just tells me that it's not installed.\nI restored /usr/share/.old-php to /usr/share/php however I still get the same error.\nPlease help.\n", "", "php ubuntu pear zend-framework2 pyrus"], "5248118": ["Update parent controller when child controller removes an item", "I have the following:\n\nI want the result to be something that looks like a calendar:\n\n2012-11-01: first [x]\n2012-11-02\n2012-11-03\n2012-11-04\n2012-11-05: second [x], second II [x]\n2012-11-06\n2012-11-07\n2012-11-08: third [x]\n\nI have a range function in my events controller that will create an array with dates between the min date and the max date of the events. Each date will also have an array of the events for that day.\n\nTo render it I am looping the days and then looping the events. The problem I am running into is that in the list there is a remove button [x]. The remove method which is being called on the EventController will remove the element from the main array that holds the events. \nSo now my question is how does the parent controller EventsController update the view when it's not rendering the events array directly? \nIs it possible to use a filter to create the calendar with events and will that solve the problem of the view not updating when the child controller removes an element?\n", "events: [ \n { name: 'first', date: '2012-11-01' },\n { name: 'second', date: '2012-11-05' }, \n { name: 'second II', date: '2012-11-05' },\n { name: 'third', date: '2012-11-08' },\n]\n", "angularjs"], "5605191": ["If FormsAuthenticationTicket is set, why doesn't User.IsInRole(\"admin\") work?", "In the debugger, if I dig into the User object, I can see the current member's UserData property, , has \"admin\" in it.\n works, returns false.\nIf \"admin\" is in the UserData property, shouldn't User.IsInRole(\"admin\") return true?\nUpdate\nI set the FormsAuthenticationTicket like so:\n\nthen (where roles is a comma separated list of roles the member is in):\n\n", "((System.Web.Security.FormsIdentity)(User.Identity)).Ticket.UserData", "asp.net-mvc cookies forms-authentication"], "5281307": ["circle tangents", "A circle's center lies on $2x^2-27 =y$ and the circle tangents $4x=3y$ and the $y$-axis, and lies in the first quadrant. If the radius is $\\frac{x}{y}$ where $x$ and $y$ are mutually prime, what is $x+y$?\n", "", "geometry circle"], "5999348": ["How to serialize to XML controlling the namespaces?", "I need to generate the following XML:\n\nI have read these questions:\n\nHow can I make the xmlserializer only serialize plain xml?\nAutomatically generate XSD to C# in Visual Studio IDE\n\nI am using Xsd2Code to generate the classes from XSD. That is working.\nI have tried this:\n\nBut it produces this:\n\nI want to get rid of .\nHow to?\nUpdate\nI have also already tried this using . If I add namespaces like this, using my implementation above with the necessary adjustments:\n\nI get this:\n\nBut I need this:\n\nIf I add namespaces like this, using my implementation above with the necessary adjustments:\n\nI get this:\n\nfor all XML tags!\nIs there any way I can do to get my desired output? I really don't want to use for this task...\n", "<Learner xmlns=\"some.domain.api\">\n <ActivationDate>1999-05-31T11:20:00</ActivationDate>\n <EmailAddress>String content</EmailAddress>\n <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>\n <FederalId>String content</FederalId>\n <FirstName>String content</FirstName>\n <Grade>K</Grade>\n <LastName>String content</LastName>\n <MiddleName>String content</MiddleName>\n <UserName>String content</UserName>\n <Password>String content</Password>\n <SISId>String content</SISId>\n <StateId>String content</StateId>\n <Status>Active</Status>\n</Learner>\n", "c# xml serialization"], "4134520": ["How can I get the value (string) of the current selection in a combobox?", "How can I get the value (string) of the current selection in a combobox?\n(Not the integer index)\n", "", "visual-c++ mfc vc6"], "1830960": ["VBA Excel: IF then Statements running loops", "I am new to VBA but reading books to improve. At the moment, I am taking columns from column \"A\" and using them as identifiers to run a IF ELSEIF statement in another column. \nBasically in the value \"ERIC\" will exist in each cell [A1 = ERIC, A2 = ERIC...] and in will be three different integer values [B1 = 2, B2 = 9...]. I need to find the Greater of those integers for range \"ERIC\" and put the Greatest value for range \"ERIC\" in cell(C1). \nThen repeat the process in for value \"Sally\" which correlates to integer range(B4:B6) [B4 = 1, B5 = 4...] . The greatest value would then go into cell(C4) I have about 40 names.\nPlease help. Thanks. \n", "range(A1:A3)", "vba excel-vba"], "1167632": ["Runtime error 1004 when assigning cell formula via vba", "From within code, based on particular criteria, I am trying to assign a formula to a particular cell. See code\n\nWhen the lPriorNum = 1, the code to populate L whatever works fine. When the lPriorNum is not 1, the following is the formula that is in sFormula and this does not work. I get the 1004 error:\n=ROUND(IF(P9=0,0,(IF(AND(N10<>1,K10<>0,M10>R10),K10,(IF(AND(N10<>1,K10<>0,P9>0,P91,K10=0,P9<=0),0,(IF(O10/100*SUM(M10-L9)>M10,0,(IF(O10/100*SUM(M10-R9)\n\nI've been told this formula as it's written will only work in Excel 2010 and I am testing in 2007, however, 2010 users are getting the same error when they test this. What might be the issue with this formula or the way the syntax is written? The cell on the spreadsheet is formatted as number with no commas and 2 decimals. I've looked through some of the postings here and other websites but I think my question might be more specific than I might find in other postings...\nThanks in advance for any help\n", " For l = 8 To lEND\n lPriorNum = .Range(\"N\" & l)\n If lPriorNum = 1 Then\n sFormula = \"=ROUND(IF(AND(N\" & l & \"=1,K\" & l & \"=0),O\" & l & _\n \"/100*M\" & l & \",(IF(AND(N\" & l & \"=1,K\" & l & \"<>0,K\" & l & _\n \"<M\" & l & \"),K\" & l & \",M\" & l & \"))),2)\"\n Else\n sFormula = \"=ROUND(IF(P\" & l & \"=0,0,(IF(AND(N\" & l + 1 & _\n \"<>1,K\" & l + 1 & \"<>0,M\" & l + 1 & \">R\" & l + 1 & _\n \"),K\" & l + 1 & \",(IF(AND(N\" & l + 1 & \"<>1,K\" & l + 1 & _\n \"<>0,P\" & l & \">0,P\" & l & \"<K\" & l + 1 & \"),+P\" & l & _\n \",(IF(AND(N\" & l + 1 & \"<>1,K\" & l + 1 & \"=0,P\" & l & _\n \"<=0),0,(IF(O\" & l + 1 & \"/100*SUM(M\" & l + 1 & \"-L\" & l & _\n \")>M\" & l + 1 & \",0,(IF(O\" & l + 1 & \"/100*SUM(M\" & l + 1 & _\n \"-R\" & l & \")<M\" & l + 1 & \",O\" & l + 1 & \"/100*SUM(M\" & l + 1 & _\n \"-R\" & l & \"),(IF(M\" & l + 1 & \"<=R\" & l + 1 & \",IF(P\" & l + 1 & _\n \"-K\" & l + 1 & \"<0,0,+M\" & l + 1 & \"-K\" & l + 1 & \")))))))))))))),2)\"\n End If \n .Range(\"L\" & l).Select\n Selection.NumberFormat = \"0.00\"\n ActiveCell.Formula = sFormula\n Selection.NumberFormat = \"0.00\"\n ' Total Payout Available\n sFormula = Range(\"Tot_Pay_Avail\").Formula\n .Range(\"P\" & l).Select\n Selection.NumberFormat = \"0.00\"\n ActiveCell.Formula = sFormula\n Selection.NumberFormat = \"0.00\"\n ' Final Dist Running Bal\n sFormula = Range(\"Final_Dist_RB\").Formula\n .Range(\"Q\" & l).Select\n Selection.NumberFormat = \"0.00\"\n ActiveCell.Formula = sFormula\n Selection.NumberFormat = \"0.00\"\n sFormula = Range(\"Payout_Amt_Sum\").Formula\n .Range(\"R\" & l).Select\n Selection.NumberFormat = \"0.00\"\n ActiveCell.Formula = sFormula\n Selection.NumberFormat = \"0.00\"\n\n sFormula = vbNullString\n Next l\n", "excel-vba excel-2007 excel-formula"], "59728": ["My login will not work and i do not see why? [PLEASE-HELP]", "For come reason my login does not work I am using PHP and JavaScript to do so.\nPHP:\n\nJavaScript:\n\nThe $.sha1 function, if one string is given it is a sha1 of it and if two it will give a hmac_sha1 result.\n", "$users = sql(\"SELECT * FROM USERS WHERE SITE_ID='${CONFIG[\"ID\"]}'\");\nif($_REQUEST[\"logindata\"]){\n $logindata = $_REQUEST[\"logindata\"];\n $now = array_shift(explode(\" \",microtime()));\n if($_REQUEST[\"time\"] < strtotime(\"+10 sec\",$now) && $_REQUEST[\"time\"] > strtotime(\"-10 sec\",$now))\n exit(json_encode(array(\"TYPE\"=>\"FUNCTION\",\"FUNCTION\"=>\"(\\$login.failed(\\\"Time out for this request.. (Go away bots)\\\"))\")));\n foreach($users as $user){\n if(hash_hmac(\"sha1\",$user[\"LOGIN_SALT\"],hash_hmac(\"sha1\",$_SERVER[\"REMOTE_ADDR\"],$_REQUEST[\"time\"])) == $logindata){\n $_SESSION = $user;\n $_SESSION[\"ACTIVE_IP\"] = $IP;\n sql(\"UPDATE USERS SET ACTIVE_IP='${IP}' WHERE LOGIN_SALT='${user[\"LOGIN_SALT\"]}'\",0);\n $result = json_encode(array(\"TYPE\"=>\"FUNCTION\",\"FUNCTION\"=>\"(\\$login.success())\"));\n }\n }\n !$result ? $result = json_encode(array(\"TYPE\"=>\"FUNCTION\",\"FUNCTION\"=>\"(\\$login.failed())\")) : void;\n}\n", "php javascript login"], "1629735": ["UIScrollView strange zoom behavior when content is a UIView subclass", "I'm experiencing the following: I created a UIView subclass with a CATiledLayer as backing layer by overriding the layerClass method. The layer properties (delegate, tileSize, etc) are set in the initWithFrame: method of the subclass. \n\nThen I add an instance of said class as the content of an UIScrollView and set UIScrollView properties and implement the required delegate's methods. \nEverything works fine but when zooming the scroll view keep repositioning itself on its center. It's hardly noticeable when zooming in the center of the content, but unbearable otherwise.\nThe same scroll view works fine when I use as (zoomable) content any other view such as an UIImageView or even a normal UIView with a CATiledLayer with the same properties and delegate of the subclass implementation as sublayer. When I check layer bounds and frame in the drawLayer:inContext: method of the delegate I get the following result as the zoom increase\nUIView with CATiledLayer as sublayer:\n\nCustom subclass:\n\nI suppose that's the culprit or at least another symptom. I can add that I get the same erratic behavior if my subclass is built over a standard CALayer with the same renderer.\nAny suggestion will be appreciated!\nEdit: fixed code indent\n", "+(Class)layerClass {\n return [CATiledLayer class];\n}\n\n-(id)initWithFrame:(CGRect)frame {\n\n if(self = [super initWithFrame:frame]) {\n\n renderer = [[MFPDFRenderer alloc]init];\n tiledLayer = (CATiledLayer *)[self layer];\n [tiledLayer setFrame:frame];\n [tiledLayer setLevelsOfDetail:2];\n [tiledLayer setLevelsOfDetailBias:3];\n [tiledLayer setTileSize:CGSizeMake(512, 512)];\n [tiledLayer setDelegate:renderer]; \n }\n return self;\n}\n", "iphone uiscrollview subclass zoom catiledlayer"], "3019909": ["Cannot create JDBC driver of class '' for connect URL 'null' : Tomcat & SQL Server JDBC driver", "I've tried just about everything I can find out there, if someone is able to help me out, I will be eternally grateful (and a lot more free in my time).\nBasically, I have an error in Tomcat 7.0 (both when running within Eclipse and via startup.bat) that says this once data begins to be accessed by my dynamic web application:\n\nI have the sqljdbc4.jar file in my tomcat\\lib directory. I have also tried putting this in my WEB-INF/lib, and even my JDK lib directories. I don't think sqljdbc.jar will work, as it is intended for older JDK/JRE installs than mine.\nI've heard the context.xml and web.xml files are crucial in getting this to work.\nweb.xml snippet:\n\ncontext.xml\n\nThe Context tab does have a closing tab, eventually.\nPlease help! If you need any more information, please let me know. Also, I'm not sure which context.xml ought to be modified, there are 2 in the Tomcat directories, one in the /conf folder, and one in the webapps/appname/META-INF folder. Sorry if it sounds like I'm a bit of a rookie, that's because I am!\nAlso, I've seen many different examples of the url=\"...\" part of the context.xml, some including port numbers. I have tried several things out online, but nothing seems to work (doesn't help nothing online is my exact data environment, also I suppose it's challenging that this app queries two different DBs at given times).\nThoughts?\n", "Cannot create JDBC driver of class '' for connect URL 'null'\njava.lang.NullPointerException\nat sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)\nat sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)\nat sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)\n", "java sql tomcat jdbc database-connection"], "3208760": ["Reporting failed task in CruiseControl.NET", "I am setting up a build system and would like to display which task failed the build in the \"Project Report\" section in the dashboard and in the build failure email.\nAt the moment I have three tasks:\n\nSourceControl\nMsbuild\nUnit tests (using gallio.echo from CC.Net exec task)\n\nIf either of the latter two fail it's not obvious from the email or the build report page which task failed the build. I need to go through the logs to figure out where the error occured. I would like to at least know what task failed from the first glance.\nHere is the best CruiseControl does - in the dashboard homepage:\n\n\nNow, this is not enough:\n\nThe failing task is not visible when you click on the project or the build report for that build.\nThis information is not available in the log file at all. This means I can't event get it into the email by hacking the XSL.\nSince my build task will be the only MSBuild task, it's OK for it to be called MSBuildTask. This is not the case with Executable tasks, as I will have at least another one or two that might fail. I need to give them descriptive names. My Gallio task has description node, but I am not sure where it gets used. \n\n\n", "exec", "msbuild build-process cruisecontrol.net gallio"], "5641672": ["Should I be using [autorelease]?", "I'm needing to quickly and simply parse an XML file in my app. The best solution for me seems to be something along the lines of an XML-to-NSDictionary converter which I can then dig through easier.\nI chose to use this small class: http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/\nHowever I'm confused about the returned and its state in memory. The class method allocs and inits the class. then goes off and does the heavy lifting returning the object which gets returned to the caller.\nThe confusing part for me is before the return (I understand this must happen because of the way was created). My understanding of is that all the objects will also be sent the message which means the object that we're returning shouldn't have a retain count. Note that the object is created with a convenience method and only gets a retain count when it is added to the stack.\nShould the return statement not be . The problem I see with that is that there is no telling when will be released and depending on the size of the XML file it could sit there clogging memory? Or do I have it all wrong?\n", "NSDictionary*", "objective-c memory-management retain autorelease"], "1071315": ["Android Recording Incoming and Outgoing Calls", "I am trying to understand is there a way I can record calls incoming and outgoing on android phones 2.2 and above ?\nA client wants to record calls of the agents they make to the clients so that it can be later used to fill out some material. Instead of making the client wait while on call they want to do it later on.\nI would like to know if this is possible and what api's do I need to use.\nThank you.\n", "", "android call record"], "1431268": ["Is it better in C++ to pass by value or pass by constant reference?", "Is it better in C++ to pass by value or pass by constant reference?\nI am wondering which is better practice. I realize that pass by constant reference should provide for better performance in the program because you are not making a copy of the variable. \n", "", "c++ variables pass-by-reference constants pass-by-value"], "5389854": ["Positive semi-definite matrix", "Suppose a square symmetric matrix $V$ is given \n$V=\\left(\\begin{array}{ccccc}\n \\sum w_{1s} & & & & \\\\\n & \\ddots & & -w_{ij} \\\\\n & & \\ddots & & \\\\\n & -w_{ij} & & \\ddots & \\\\\n & & & & \\sum w_{ns}\n \\end{array}\\right) \\in\\mathbb{R}^{n\\times n},$\nwith values $w_{ij}> 0$, hence with only positive diagonal entries.\nSince the above matrix is diagonally dominant, it is positive semi-definite. However, I wonder if it can be proved that\n$a\\cdot diag(V)-V~~~~~a\\in[1, 2]$\nis also positive semi-definite. ($diag(V)$ denotes a diagonal matrix whose entries are those of $V$, hence all positive) In case of $a=2$, the resulting\n$2\\cdot diag(V)-V$ \nis also diagonally dominant (positive semi-definite), but is it possible to prove for $a\\in[1,2]$?\n.........................................\nNote that the above proof would facilitate my actual problem; is it possible to prove\n$tr[(X-Y)^T[a\\cdot diag(V)-V](X-Y)]\\geq 0$, \nwhere $tr(\\cdot)$ denotes matrix trace, for $X, Y\\in\\mathbb{R}^{n\\times 2}$ and $a\\in[1,2]$ ?\nAlso note that\n$tr(Y^TVY)\\geq tr(X^TVX)$ and $tr(Y^Tdiag(V)Y)\\geq tr(X^Tdiag(V)X)$.\n(if that facilitates the quest., assume $a=1$)\n.....................................................\nSince the positive semi-definiteness could not generally be guaranteed for $a<2$, the problem casts to: for which restrictions on a does the positive semi-definiteness of a\u22c5diag(V)\u2212V still hold? \nNote the comment from DavideGiraudo, and his claim for case $w_{ij}=1$, for all $i,j$. Could something similar be derived for general $w_{ij}$\u22650? \n", "", "linear-algebra matrices vector-spaces"], "3920364": ["Wireless internet became extremely slow on my 27\" IMac", "The wireless internet on my Mac became extremely slow recently on my 27\" IMac. I don't recall doing anything different other than doing the Apple Software updates which I let it pop up and install automatically. On my Mac Book internet is still fine so I don't think it's the model or the router.\nI'm not sure where to start digging the cause of this or how to solve it. Looking into the System Preferences on my IMac, it's pretty identical to my MacBook!\n", "", "osx wireless-networking performance mac"], "4169938": ["How can I open image of vmplayer in virtualbox", "I have installed Ubuntu in vmplayer, as the vmplayer does not support Unity of Ubuntu, I want to be able to open the image in virtualbox. How can I do this?\n", "", "ubuntu virtualbox vmplayer"], "113513": ["Custom UITableViewCell changing indexPath While Scrolling?", "I have a custom UITableViewCell which I created in Interface Builder. I am successfully Dequeuing cells, but as I scroll, the cells appear to begin calling different indexPaths. In this example, I am feeding the current indexPath.section and indexPath.row into the customCellLabel. As I scroll the table up and down, some of the cells will change. The numbers can be all over the place, but the cells are not skipping around visually.\nIf I comment out the if(cell==nil), then the problem goes away. \nIf I use a standard cell, the problem goes away.\nIdeas why this might be happening?\n\n", "// Customize the appearance of table view cells.\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {\n\n UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:@\"CalendarEventCell\"];\n if (cell == nil) {\n NSLog(@\"Creating New Cell !!!!!\");\n NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@\"CalendarEventCell\" owner:self options:nil];\n cell = (UITableViewCell *)[nib objectAtIndex:0];\n cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;\n }\n\n\n // Set up the cell...\n [customCellLabel setText:[NSString stringWithFormat:@\"%d - %d\",indexPath.section, indexPath.row]];\n\n\n return cell;\n}\n", "iphone uitableviewcell skip changing"], "5084026": ["Placement of axis labels at minor breaks with ggplot2", "I am using ggplot2 to do some plotting of genomic data, so the basic format is that there is a chromosome and a position along it. I convert the positions to be on a continuous scale, then put the breaks at the boundaries of the chromosomes with:\n\nThat looks great, as far as the actual plotting is concerned, but the labels are then put at the start and end of the chromosomes. I would like them to be centered along each chromosome, at the position where the minor break is drawn by default.\nIs this possible?\n", "scale_x_continuous(\"Genome Position\", breaks = c(0, cumsum(chromosome_length)))", "r ggplot2"], "5911408": ["How to using anti-aliasing in wpf 3d", "guys!\nI want to implement this in wpf, here's the link: http://www.matthiasdittrich.com/\nSo I should put some 2d content in viewport3d. I used Viewport2DVisual3D as the container for 2d elements. But I encountered serious aliasing, I added the RenderOptions.EdgeMode=\"Aliased\",but it does not work.\nHere's my xaml:\n\nCan anybody help me? Thanks in advance!\n", "<Viewport3D RenderOptions.EdgeMode=\"Aliased\">\n <Viewport3D.Camera>\n <PerspectiveCamera Position=\"0, -2, 6\" LookDirection=\"0, 2, -6\"/>\n </Viewport3D.Camera>\n <Viewport2DVisual3D RenderOptions.EdgeMode=\"Aliased\">\n <Grid Width=\"400\" Height=\"400\">\n <s:SurfaceScrollViewer>\n <ItemsControl>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n <Label Background=\"LightGray\"\n Content=\"hahaha\"/>\n <Label Background=\"DarkGray\"\n Content=\"hahaha\"/>\n </ItemsControl>\n </s:SurfaceScrollViewer>\n </Grid>\n <Viewport2DVisual3D.Material>\n <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial=\"True\" Brush=\"White\"/>\n </Viewport2DVisual3D.Material>\n <Viewport2DVisual3D.Geometry>\n <MeshGeometry3D Positions=\"-1,2,0 -1,-2,0 1,-2,0 1,2,0\"\n TextureCoordinates=\"0,0 0,1 1,1 1,0\" TriangleIndices=\"0 1 2 0 2 3\"/>\n </Viewport2DVisual3D.Geometry>\n </Viewport2DVisual3D>\n <ModelVisual3D>\n <ModelVisual3D.Content>\n <DirectionalLight Color=\"#FFFFFFFF\" Direction=\"0,0,-1\"/>\n </ModelVisual3D.Content>\n </ModelVisual3D>\n </Viewport3D>\n", "wpf 3d antialiasing"], "5109431": ["connectionDidFinishLoading is notified before my service is finished", "I have data returned from a service that is rendered to my UITableView several times. I moved placed the code that populates my table in the connectionDidFinishLoading delegate. Is this the correct placement of that code?\nI have a NSMutableData* receivedData; at the top of my .m file and I have implemented the correct delegates and overridden the correct methods.\nI just want to know what I am missing here or what I can do to only see the data from my JSON once in the table view.\n\n", "-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { \n[receivedData setLength:0];\nNSLog(@\"%@\",response);}\n\n- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {\nNSLog(@\"Succeeded! Received %d bytes of data\",[data length]);\nreceivedData = [[NSMutableData alloc] init];\n[receivedData appendData:data];}\n\n-(void) connectionDidFinishLoading:(NSURLConnection *)connection {\nNSError *error = nil;\n// Get the JSON data from the website\nid result = [NSJSONSerialization JSONObjectWithData:receivedData options:kNilOptions error:&error];\n\nif ([result isKindOfClass:[NSArray class]]) {\n\n for (NSArray *item in result) {\n NSArray *category = [item valueForKey:@\"CategoryName\"];\n [dataArray addObject:category];\n }\n}\nelse {\n NSDictionary *jsonDictionary = (NSDictionary *)result;\n\n for(NSDictionary *item in jsonDictionary)\n NSLog(@\"Item: %@\", item);\n}\n\n[self.tableView reloadData];\n\nNSLog(@\"Finished\");}\n", "ios uitableview"], "2194606": ["Show default content if custom WP_Query has no posts", "I have a custom loop to show posts that meet a certain set of $args like this:\n\nThis works great when the $orderargs bring up posts, but in some situations, there will be no posts, and I want to show some default content then.\nSo what do I add to this / how do I restructure this so that if the query has no posts, display default content instead.\nThank you,\nIan\n", "<?php $recent = new WP_Query( $orderargs ); \n while($recent->have_posts()) : $recent->the_post();?>\n", "wp-query loop customization default"], "2225345": ["How is Wubi different from dual-booting or a VM image?", "The only difference that I see between regular dual-booting and Wubi is that the latter has a more user-friendly installation process, but otherwise it seems to be the same. Am I missing something here? What makes it so special?\nEdit: If the file system is emulated, then how is it different from running it in a virtual machine?\n", "", "windows ubuntu dual-boot wubi"], "4960391": ["Stuck with the number pattern printing in PHP", "Stuck with the number pattern printing logic. Let me know what i am doing wrong as my file is simply going on execution without giving me a pattern.\nMy Code --\n\nPattern to achieve --\n\nUPDATE\nAfter applying new changes following are the screenshots ---\n\n\n", "<?php\n\n$num = 4;\n\nfor( $j=1 ; $j <= $num ; $j++ )\n{\n for( $i=$j ; $i < $num-1 ; $i++ )\n {\n echo \" \";\n }\n\n for( $j ; $j >= 1 ; $j-- )\n {\n echo $j.\" \";\n }\n\necho \"<br />\";\n}\n", "php for-loop logic"], "5854769": ["Axis2 WebService JMS Transport Soap Compression", "Problem:\nI want to implement a Web Service using Axis2 with JMS Transport-In, which can process incoming soap messages with compressed content.\nQuestions:\n\nIs this possible without additional configuration?\nWould it be enough for the client to just compress the message content?\n\nBackground:\nGoogling, I have found nothing regarding this topic (only client-side HTTP Header seetings for HTTP Transport-In). The background is that I can potentially receive very large messages (up to 1.000.000 records - one record having 300 bytes). The data will most likely be split in smaller data chunks of about 50.000 records.\nThe questions is not about Axis2 Web Service implementation details.\nPlease also don't propose architecture changes, because that's not possible. We have already tried. ;)\nthx\n", "", "java axis2"], "837439": ["Formula for the number of 0's in an alternating 0-1 matrix", "I was working with a piece of code when I stumbled across a matrix, which is similar to this:\n$$\\begin{matrix}\n0&1&0&1&0&1&0&\\cdots\\\\\n1&1&1&1&1&1&1&\\cdots\\\\\n0&1&0&1&0&1&0&\\cdots\\\\\n1&1&1&1&1&1&1&\\cdots\\\\\n0&1&0&1&0&1&0&\\cdots\\\\\n\\vdots&\\vdots&\\vdots&\\vdots&\\vdots&\\vdots&\\vdots\n\\end{matrix}$$\nThe rule is: no $0$ should be adjacent to another (diagonally/vertically/horizontally)\nThe matrix is my representation for the rule.\nI was trying to figure out the formula for finding for any given $N \\times M$ matrix (like the one above), what will be the maximum number of $0$'s possible. \nFinally, I gave up and settled for a code which did the labor counted them. I was hoping if someone here could help with a formula or a better approach?\n", "", "combinatorics sequences-and-series matrices algorithms"], "165617": ["How to proceed with spoj LGIC?", "I am trying to solve this problem http://www.spoj.pl/problems/LGIC/. I just can't figure out how is this sequence advancing.\nBy lagarange's it is too complex to solve for such a great range.\nThe farthest I could get was with factorials\n\nPlease guide me someone..\n", " 1! = 1 & a1=2\n 2! = 2 & a2=4\n 3! = 6 & a3=11\n 4! = 24 & a4=36\n 5! = 120 & a5=147\n 6! = 720 & a6=778\n", "math sequence factorial spoj"], "5125686": ["How can I describe the concept of instance or static affiliation?", "When I was writing documentation for a method taking a parameter of type (.NET), I had trouble to refer to the concept of a member being either a static or an instance member.\nIs there a good word or phrase to name the concept of static/instance affiliation without writing it out (like I did here)?\nEdit:\nThe API is the following. It allows a user to add a method to something we call a mutable type. Very similiar to Reflection.Emit's TypeBuilder.DefineMethod method.\n\n", "MethodAttributes", "design-patterns static instance concept conceptual"], "2825313": ["jQuery \".triggerHandler()\" vs. \".trigger()\" when multiple elements are selected", "The jQuery \".triggerHandler()\" mechanism, unlike \".trigger()\", only operates on the first element referenced by the jQuery object for which it's called. In other words,\n\nwill only call the \"readjust\" handler for the first element with class \"all-over-the-page\", even if there are many elements on the page with that class. The \".trigger()\" method, on the other hand, would affect all of them.\nI realize that I can use \".each()\" to get around this (or simply write my own substitute that does that for me), but is there some rationale for why the two are different in this respect? It kind-of makes no sense to me. (I understand of course that it almost certainly can't be changed now.)\nedit to clarify:\nIt's probably easier to understand why I'm scratching my head over this if I provide a context in the style of code I've actually got. When I put together code for various \"widget\" features on a page, that often involves event handlers. A good example is a form of some sort that's got some fields whose relevance is controlled by a checkbox, or radio button, or selector. A common instance of that is the \"Shipping Address\" checkbox that shows up on a zillion e-commerce sites: if the checkbox is checked, the shipping address is disabled and the billing address is used.\nNow consider that some other code may, for its own reasons that are totally independent of the checkbox-control widget, actually do things to the form that may include updating checkbox settings programmatically. In that case, that other widget code may want to use \"triggerHandler()\" to tell any widgets, \"hey I've updated some stuff, so you might want to re-check the current status and adjust if necessary.\"\nThus, if \".triggerHandler()\" would operate on all selected elements, I could use:\n\nand all those handlers could run and do whatever they need. As I said, it's easy enough to write:\n\n", "$('.all-over-the-page').triggerHandler(\"readjust\");\n", "javascript jquery"], "5168231": ["What are the other timer APIs in Linux apart from POSIX timers?", "I want to design a timer in Linux, but due to some system constraints and design requirements i cannot use the POSIX timer APIs.\nCan somebody kindly let me know, what are the other timer design mechanisms available in Linux apart from the POSIX timers? (timer_create, timer_settime etc to avoid)\nThanks in advance.\nEDIT: P.S: Any mechanism you provide, requesting you to kindly give me some useful links or example links\nNOTE: We can't use any third party library (Like ACE library) as our code is a proprietory code.\n", "", "c linux timer"], "4973164": ["Populate Treeview using Client Object Model Sharepoint 2010", "I have a Document Library. Inside document library I have a folder called Studies. Under studies I have 10 folders and subsequent sub folders also.\nI need to populate the same in a tree view using client object model SharePoint 2010. \n\nI want to publish this in tree view in a function where I can pass the Document Library and it returns the tree view.\n", "DocLibrary1>>Studies>>Study1- Folder1\n -Folder2\n -Folder3\n", "sharepoint2010 wcf-client sharepoint-designer client-object-model sharepoint-clientobject"], "5107084": ["How to change the default browser to debug with in Visual Studio 2008?", "When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008?\nUpdate 1\nI have looked for the 'Browse with' option and not found it.\nVisual Studio opens the default browser instead of Internet Explorer \nUpdate 2\nIf you are already debugging you dont have the 'Browse with' option. \n\nStop debugging and then its there!\n\nUpdate 3\nThe accepted answer below is also relevant to changing the default browser to debug with in Visual Studio 2010.\n", "", "visual-studio visual-studio-2008 debugging browser"], "4127160": ["J2EE authentication and authorization", "I am creating a website using J2EE. I have created a table in a PostgreSQL database for the user data(username, password, role). I want to make a security realm or something like that in which to put some of the servlets. If a user sends a request to one of the servlets in the security realm and is not loged in, I want to redirect them to the login page. The problem that I am having is that I don't know how to verify if the user is loged in or not when the request is received on the server. Should I use a session id or cookie? I've also searched a lot on form based authentication but I haven't found a way to compare the received data with the data stored in my database. I'm sorry if the subject is discussed somewhere else but I'm trying to solve this issue for a couple of weeks now. \nThank you very much!\n", "", "authentication java-ee authorization web"], "5189715": ["Common theory for Linear equations, linear ODEs and linear recurrence relations", "In Linear equations, linear ODEs and linear recurrence relations, when solving homogeneous equations, there are a subspace of solutions, and when solving inhomogeneous equations, a particular inhomogeneous solution plus the subspace of homogeneous solutions will give the set of inhomogeneous solutions. I was wondering what the general common theory for Linear equations, linear ODEs and linear recurrence relations in this aspect? Thanks and regards!\n", "", "linear-algebra differential-equations recurrence-relations"], "2734937": ["PHP - APC Cache - User specific data vs data accessible by all users", "I have read a couple of tutorials on several web sites as well as a few questions here on StackOverFlow about the subject and I still couldn't find a clear answer to my question.\nI am wondering how APC Cache manages/saves the user-specific data (variables that will be used in the php code, that are user-specific. In other words, data that should not be seen by other users.) and how does it save the publicly available data that all users can see?\nI am just trying to understand how it works. I know that APC \"saves\" or keeps in memory required and included files... but what if those included files have user-specific variables in the code? If let's say in /account/user_profile.php I use several variables like $firstname $lastname $address, etc. will those variables be kept in memory? If, for example, John X is logged in at the time the cache is being updated or saved, then APC will always remember John as $firstname and X as $lastname? If another user goes to the same page, I want him to see its user profile details, not John's.\nI know this might have been discussed already, but I need a clear answer, please.\nThank you!\n", "", "php caching apc"], "3618413": ["Oracle wm_concat query returns result set with odd characters", "My Oracle query produces the correct result set, but data is being presented with odd characters as you can see by the blocks in the picture below.\n\nAny reason that you can think of as to why it would do this and what these characters actually are? Below is the query I'm using. Thanks in advance.\n\nIf I use the same query but use a dump(wmsys.wm_concat(columnName)) then I get the data presented in the picture below. \n\n", "SELECT wmsys.wm_concat(userFirstName) AS firstNames\n FROM COURSESECTION\n JOIN CLASSCOORDINATOR on classcoord_sectionId = coursesect_sectionId\n JOIN usr_USER on classcoord_coordinatorId = userId\nGROUP BY classcoord_sectionId;\n", "oracle function oracle10g aggregate-functions"], "3436034": ["Why does my form post even when HTML5 required attribute is not met", "I am sure there is a very easy answer to this but right now I can't figure it out. I am new to HTML 5 validation and using the required validator on several fields, including an input element and select elements. All is fine with the select elements, but when I don't enter data into the input element I get the validation popup error message but the form goes ahead and posts anyway. Here is my code :\n\n", " <script type=\"text/javascript\" src=\"@Url.Content(\"~/Scripts/knockout-2.1.0.js\")\"></script>\n\n@using (Html.BeginForm())\n{\n <table id=\"addFixture\" border=\"0\" cellpadding=\"3\">\n <tr>\n <td>Season</td><td><input type=\"text\" id=\"txtSeason\" required /></td>\n </tr>\n <tr>\n <td>Week</td><td><select id=\"ddlWeek\" required /></td>\n </tr>\n <tr>\n <td>Away Team</td><td><select id=\"ddlAwayTeam\" required /></td>\n </tr>\n <tr>\n <td>Score</td><td><input type=\"text\" id=\"txtAwayTeamScore\" /></td>\n </tr>\n <tr>\n <td>Home Team</td><td><select id=\"ddlHomeTeam\" required /></td>\n </tr>\n <tr>\n <td>Score</td><td><input type=\"text\" id=\"txtHomeTeamScore\" /></td>\n </tr>\n </table>\n\n <input type=\"submit\" onclick=\" addFixture() \"/>\n}\n\n<script type=\"text/javascript\">\n\n $(document).ready(function () {\n populateTeams();\n populateWeeks();\n });\n\n function populateTeams() {\n\n $.ajax({\n type: 'GET',\n url: '/api/team/',\n contentType: \"application/json; charset=utf-8\",\n dataType: 'json',\n success: function (results) {\n var $subType = $(\"#ddlAwayTeam\");\n $subType.empty();\n $subType.append($('<option></option>').attr(\"value\", \"\").text(\"--Please select--\"));\n $.each(results, function () {\n $subType.append($('<option></option>').attr(\"value\", this.TeamId).text(this.TeamName));\n });\n\n var $subType = $(\"#ddlHomeTeam\");\n $subType.empty();\n $subType.append($('<option></option>').attr(\"value\", \"\").text(\"--Please select--\"));\n $.each(results, function () {\n $subType.append($('<option></option>').attr(\"value\", this.TeamId).text(this.TeamName));\n });\n }\n });\n }\n\n function populateWeeks() {\n\n var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];\n\n $('<option/>').val(\"\").html(\"--Please select--\").appendTo('#ddlWeek');\n\n for (i = 0; i < numbers.length; i++) {\n $('<option/>').val(numbers[i]).html(numbers[i]).appendTo('#ddlWeek');\n }\n }\n\n function addFixture() {\n\n var season = $(\"#txtSeason\").val();\n var week = $(\"#ddlWeek\").val();\n var awayTeam = $(\"#ddlAwayTeam\").find(\":selected\").text();\n var awayTeamScore = $(\"#txtAwayTeamScore\").val();\n var homeTeam = $(\"#ddlHomeTeam\").find(\":selected\").text();\n var homeTeamScore = $(\"#txtHomeTeamScore\").val();\n\n $.ajax({\n type: 'POST',\n url: '/api/fixture/',\n data: JSON.stringify({ Season: season, Week: week, AwayTeamName: awayTeam, HomeTeamName: homeTeam, AwayTeamScore: awayTeamScore, HomeTeamScore: homeTeamScore }),\n contentType: \"application/json; charset=utf-8\",\n dataType: 'json',\n success: function(results) {\n alert('Fixture Added !');\n }\n });\n }\n\n</script>\n", "javascript html5"], "1841744": ["Windows web server for in-house apps?", "\nPossible Duplicate:\nCan you help me with my software licensing question? \n\nHi,\nMs site for Windows Web Server 2008 R2 states that it's only licensed to server internet-facing web apps.\nWhat does that mean for in-house applications? That I am allowed to host B2B/C site on those, but not my internal web based ERP, for example?\nThanks\n", "", "windows licensing web microsoft-licensing"], "268265": ["mailto with attachments in Flex or AIR applications", "How to forward attachment(for example image) from Flex or AIR application to email client?\nFor forwarding email address, body and subject, I use this:\n\nBut I don't know what to do for attachment....\nPlease HELP!\n", "var s:String = \"\"; \ns+= \"mailto:\";\ns+= g.text; \ns+= \"?\";\ns+= \"subject=\" ;\ns+= grup.text;\ns+= \"&\";\ns+= \"body=\";\ns+= message.text; \nvar url:URLRequest=new URLRequest(s); \n\nnavigateToURL( url);\n", "flex air flex4.5"], "5146627": ["Unresolved externals in C++ when using vectors and find", "I have tried this code in a totally separate project, and it works fine (the only difference being that the project that is not working is being exported as a DLL). Here is the code:\nRTATMATHLIB.CPP\n\nRTATMATHLIB.H\n\nERRORS\n\nAnd that's it. I am not sure why it works in the other project and not this one...\n", "#include \"stdafx.h\"\n#include \"RTATMATHLIB.h\"\n#include <math.h>\n#include <vector>\n#include <algorithm>\n#include <stdexcept>\n\nusing namespace std;\n\ndouble someFunc(double** Y, int length)\n{\n vector<double> myVector;\n\n for(int i = 0; i < length; i++)\n {\n double value = (*Y)[i];\n\n vector<double>::iterator it = find(myVector.begin(), myVector.end(), value);\n\n if(it != myVector.end())\n {\n continue;\n }\n else\n {\n myVector.push_back(value);\n }\n }\n return 0;\n}\n", "c++ find stdvector unresolved-external"], "4174240": ["Should I use NSNumber or an int in an iPhone/iPad class?", "I'm creating an object that will have two integers (or NSNumbers) and an NSDate as ivars. This object will be in an NSMutableArray. To my knowledge, we cannot put primative integers in an NSMutableArray, but will my object work with ints? The reason I don't want to use NSNumbers is because these will have to be mutable, and I don't really want to create a new NSNumber everytime.\nAlso, will using ints create problems with iphone architecture differences?\n", "", "ios integer nsnumber"], "641915": ["Rails ActiveRecord - is there a way to perform operations on tables without an id?", "I have a table with one row and two columns- \n\nIs there a Rails ActiveRecord way to get and set the data in these columns?\nThere is no id column.\nI'm using this table to track versions of queries of other tables. After each query of another table the version column is incremented and the updated column is set with current datetime.\n", "int 'version', datetime 'updated'\n", "mysql ruby-on-rails ruby activerecord"], "99998": ["Convolution of function", "I need find $x^2\\cdot e^{{-x^2}/2} * e^{{-x^2}/2}$. I used statements, that $\\widehat{xf}=i \\widehat{f}'$ and $\\widehat{f*g}=\\sqrt{2\\pi}\\widehat{f}\\cdot \\widehat{g}$. So, $\\widehat{x^2\\cdot e^{{-x^2}/2}}(\\lambda)={e^{{{-\\lambda^2}/2}} \\cdot(1-\\lambda^2)}$ and $\\widehat{e^{{-x^2}/2}}(\\lambda)=e^{-\\lambda^2/2}$. Then, $\\widehat{{(x^2\\cdot e^{{-x^2}/2})*e^{{-x^2}/2}}}(\\lambda)=\\sqrt{2\\pi}\\cdot e^{-\\lambda^2}\\cdot(1-\\lambda^2)$. \nSo, $(x^2\\cdot e^{{-x^2}/2} * e^{{-x^2}/2})(y)= \\int_{-\\infty}^\\infty e^{-\\lambda^2+i\\lambda y} \\cdot (1-\\lambda^2) \\, d\\lambda$, but I don't know how solve this integral, perhaps, I did some mistake in counting. Please help me solve this problem. \n", "", "functional-analysis fourier-analysis"], "2192519": ["Error LNK2019 in VS 2005 C++", "My humble greetings to everyone. First of all, I would like to present myself. I am a student and I am relatively new to the field of programming. \nI am trying to run the codes given by Mr. Radford Neal, which is a free software package on LDPC codes for generating matrices. But consequently, I am encountering various linker errors, 16 in totals. Here is a few amongst them;\n\nError 1 error LNK2019: unresolved external symbol \"int __cdecl\n mod2sparse_write(struct _iobuf *,struct mod2sparse *)\"\n (?mod2sparse_write@@YAHPAU_iobuf@@PAUmod2sparse@@@Z) referenced in\n function _main make.obj \nError 2 error LNK2001: unresolved external symbol \"struct mod2sparse *\n H\" (?H@@3PAUmod2sparse@@A) make.obj \nError 3 error LNK2019:\n unresolved external symbol \"void __cdecl intio_write(struct _iobuf\n *,int)\" (?intio_write@@YAXPAU_iobuf@@H@Z) referenced in function _main make.obj\n\nWell I am badly stuck with this problem for days now. I tried searching on the internet and I came across that there is a lack of library files. I included several .lib in the additional dependencies of the project properties but nothing worked. \nI am not uploading the code since its quite long but if someone wants then I`ll surely do so.\nPlease I request anyone to be of help to me. I will highly appreciate it.\nThanks. \nPS: I am using VS 2005.\n", "", "external symbol lnk2019 unresolved"], "5148172": ["Step line pivot chart excel", "I have a line overlaid on some bars in a pivot chart in excel, but I want the line to be stepped instead of curved. How can I accomplish this? \n", "", "microsoft-excel excel-2007"], "2796164": ["Refreshing DropdownList data, after a new item has been selected", "I have two dropdownlist, one is State and one is City. When a State is selected, the City dropdownlist becomes populated. At that point you can select a city, however if you select a city and go back and select a different state, the city dropdownlist is populated by the cities for both states. How do I get it clear the cities for the first state?\nHere is the code behind\n\n", "Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load\n\n End Sub\n\n Public Sub ddlState_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)\n SqlDataSource2.SelectParameters.Clear()\n SqlDataSource2.SelectParameters.Add(New Parameter(\"@State\", DbType.String, ddlState.SelectedValue))\n ddlCity.DataBind()\n 'SqlDataSource2.SelectParameters.Clear()\n 'Dim State As String = ddlState.SelectedItem.Text\n End Sub\n\n Protected Sub ddlCity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlCity.SelectedIndexChanged\n 'Dim City As String = ddlCity.SelectedItem.Text\n End Sub\n", "asp.net vb.net drop-down-menu"], "289926": ["why settimeout not delay the function execution?", "\nfollowing is deletfile function\n\nabove is my jQuery and i m calling one function at the end after 25 second,but some how it's not delaying the deletefile(url) function and execute just after.So what should be the problem?\n", "function tryToDownload(url)\n{\n\n oIFrm = document.getElementById('myIFrm');\n oIFrm.src = url;\n // alert(url);\n // url=escape(url);\n\n setTimeout(deletefile(url), 25000); \n}\n", "javascript jquery ajax liferay settimeout"], "3222194": ["mysql complicated if/else scenerio", "I have a telephones database with 4 columns: \n\n\n\n\n\n\nI'm following the \"Canonical\" formatting, since I have some international numbers to consider.\nAnd as fate would have it, some numbers entered have extensions.\nI have a query that I use to auto-format everything, except the extension:\n\nresult: +1(123)4567890 or: +61(08)1234 1234\nThis works great, and it works perfectly with some dialer software I export to.\nHowever, I now need to include the extension in this query. However, I need to auto-format it like so:\n+1(123)4567890 x123\nThat's rather easy, but since most numbers do not have an extension, I need to make a condition that will include the char (x). And this is my dilemma, since I'm still learning conditional statements in a query.\nAnybody work with weird if/else statements inside a CONCAT?\n", "table", "mysql case"], "686066": ["Interface, Abstract, or just virtual methods?", "I have a bunch of systems, lets call them .\nThey all have similar methods and properties. Some contain the exact same method and properties, some may vary slightly and some may vary a lot. Right now, I have a lot of duplicated code for each system. For example, I have a method called that is defined for each system. I am trying to figure out which method would be the best approach to reduce duplicate code or maybe one of the methods below is not the way to go:\nInterface\n\nAbstract\n\nVirtual Methods in a Super Base class\n\nOne question, although it may be stupid, is let's assume I went with the abstract approach and I wanted to override the , but I needed to pass it an extra parameter, is this possible or would I have to create another method in the abstract class? For example, \n", "A, B, C, D, E, F, G, H, I, J", "c# oop interface abstract-class virtual-method"], "4005986": ["DOS Batch FOR Loop to delete Files not Containing a String", "I want to delete all the files in the current directory which do not contain the string \"sample\" in their name.\nfor instance,\n\nI want to delete all the files other than the ones containing sample in their name.\n\nThanks.\n", "test_final_1.exe\ntest_initial_1.exe\ntest_sample_1.exe\ntest_sample_2.exe\n", "for-loop batch-file"], "1731304": ["Links to single posts are 404ing after adding a rewrite rule", "In order to set up a URL rewrite rule for multiple taxonomy queries, I added this function and these hooks to the function.php file of a site's theme:\n\nIt worked but now any link to a single post is broken. I tried removing the code I added and manually flushing permalinks in the admin, but links to single posts are still broken. Any ideas?\nUpdate: I tried manually removing the \"rewrite_rule\" and \"permalink_structure\" rows from the \"wp_options\" table to see if that would force WordPress to update them when I changed the Permalink Settings in the admin, but the table didn't update when I did that.\nI've also tried this call:\n\nAnd still saw no change in behavior or anything. Then I tried manually adding the row back to the database:\n\nAnd the insert worked but again, no change in behavior whatsoever. Links to single posts still 404.\n", "function add_custom_rewrite_rule(){\n add_rewrite_rule('(location|event)/(.+)/?$' , 'index.php?$matches[1]=$matches[2]', 'top');\n}\n\nadd_action('init', 'add_custom_rewrite_rule');\nadd_action('init', 'flush_rewrite_rules');\n", "custom-taxonomy url-rewriting"], "3191857": ["ChildControl of a childcontrol is null when calling from Main control", "Hello \nI built a webusercontrol in asp.net which contains a databound dropdown. \nWhen I directly put this control into a webform it runs well. \nBut if I try to add this control as childcontrol to another control at runtime\n\n, the dropdown of the childcontrol is not instatiated (is null) so that I run in an exception by trying to bind the data to the dropdown. \n", "Childcontrol childcontrol = new Childcontrol ();\nmaincontrol.controls.add(childcontrol)\n", "asp.net controls"], "5102793": ["Disable Outlook 2003 splash screen when auto-starting", "I want to hide the splash screen of Outlook 2003. I currently have it set to auto-start and hide to icon.\nEvery time I start my computer I see the Outlook splash screen which makes me think that it's slowing down the OS to become \"operational\" after startup.\nWhat do I change in settings to not have the splash screen display on startup?\n", "", "startup outlook-2003 splash"], "2739485": ["Is there any apache module which logs log running request", "I want to check which request are taking more time in my Apache server.\nIs there any apache module or any mechanism which will allow httpd to log those requests\nthat takes longer time to complete ?\nWarm Regards\nSupratik\n", "", "apache2"], "595281": ["Rewriting a Subdomain with mod-rewrite", "I have a project that uses the moodle library. I had to change the URL from moodle.example.com to learn.example.com, due to a client request.\nI thought this would be an easy change, but alas moodle inserts all links and images in with the complete url instead of the relative url.\nIs it possible using mod-rewrite to point all requests to moodle.example.com to learn.example.com and maintain the query string?\nExample:\nI want a request to: to go to .\nIs this possible?\nThanks,\nJosh\n", "http://moodle.example.com/course/view.php?id=2&topic=1", "mod-rewrite moodle"], "3473780": ["fopen fails after changing console app to windows app", "I'm using OpenCV 2.3.1 on Windows XP Professional with Visual Studio\n10(Ultimate) and I'm having trouble opening the cascade files.\nThe relevant code is the following:\n\nI'm making sure that the current directory is correct using the\n function and the xml file is contained in that directory.\nThe funny thing is, the program works correctly when I compile and run it in\nConsole mode but I get the error \"Error loading face\" when I run it under\nWin32 mode(no console).\nThanks for any help!\n", "String face_cascade_name = \"haarcascade_frontalface_alt.xml\";\n\nCascadeClassifier face_cascade;\n\nif( !face_cascade.load( face_cascade_name ) ){ message(TEXT(\"--(!)Error loading face\\n\"));\n", "c++ windows visual-studio winapi opencv"], "690430": ["SuExec for Tomcat?", "We're running a (cPanel/WHM based) server which contains mainly PHP applications. They are executed with the permissions of their owner with the suExec component of Apache.\nWe're looking into moving some of our core applications to Java, running in Tomcat (with Apache proxying), which can apparently be easily installed from within WHM. However, is there a way to preserve the suExec functionality there, so Java applications also get executed with the correct permissions?\n", "", "apache2 tomcat suexec"], "33433": ["merging dictionaries in python", "Hey everyone,\nSorry for the very general title but I'll try to be as specific as possible. \nI am working on a text mining application. I have a large number of key value pairs of the form ((word, corpus) -> occurence_count) (everything is an integer) which I am storing in multiple python dictionaries (tuple->int). These values are spread across multiple files on the disk (I pickled them). To make any sense of the data, I need to aggregate these dictionaries Basically, I need to figure out a way to find all the occurrences of a particular key in all the dictionaries, and add them up to get a total count. \nIf I load more than one dictionary at a time, I run out of memory, which is the reason I had to split them in the first place. When I tried , I ran into performance issues. I am currently trying to store the values in a DB (mysql), processing multiple dictionaries at a time, since mysql provides row level locking, which is both good (since it means I can parallelize this operation) and bad (since it slows down the insert queries)\nWhat are my options here? Is it a good idea to write a partially disk based dictionary so I can process the dicts one at a time? With an LRU replacement strategy? Is there something that I am completely oblivious to?\nThanks!\n", "", "python dictionary merge"], "906579": ["Tabindex in jquery modal dialog", "Im attempting to set the tab index on all the input elements in a form that is displayed with a jquery dialog. The current behavior is that when the user starts to tab (the first element is set to focus so that is the first in line) they can tab through the all the controls. The issue us that they can continue to tab to the elements behind the dialog.\nIs there a way that I can prevent this from happening and ONLY tab through the form elements in the open dialog?\n", "", "jquery jquery-ui-dialog tabindex"], "2425326": ["difference between Html.HiddenFor & HiddenInput attribute", "HiddenFor description is:\nReturns an HTML hidden input element for each property in the object that is represented by the specified expression.\nI read that it is useful for fields in your Model/ViewModel that you need to persist on the page and have passed back when another call is made but shouldn't be seen by the user.\nHiddenInput description is:\nRepresents an attribute that is used to indicate whether a property or field value should be rendered as a hidden input element.\nCan you please tell me when is HiddenInput useful? and when to use it instead of Html.HiddenFor?\nThanks!\n", "", "asp.net-mvc dataannotations html.hiddenfor"], "4658": ["Why are MMF-1 / MMF-2 adapters so expensive?", "Why is it that MMF-1 / MMF-2 adapters (the ones that convert from 4/3 to Micro 4/3) are that expensive?! They seem to be at least $140 on eBay, $250 on Amazon!\nIs this a way for Olympus to force you into buying new Micro 4/3 lenses? Or are they technically complicated to build? Isn't is just a metal ring and a bunch of contacts?\nAre there cheaper alternatives out there?\n", "", "adapter micro-four-thirds four-thirds"], "5961225": ["Using application's Log4J configuration under JBoss 7.1.1", "I'm am having trouble logging using my appenders defined on my XML log4j configuration file.\nI created the jboss-deployment-structure.xml on my EAR's META-INF folder with no sucess.\nThe jboss-deployment-structure.xml structure is:\n\nI have even tried to edit my standalone.conf.bat file adding the following line:\n\nMy application deployment is like this:\n\nI've noticed the following error:\n\njboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments.\n\nI even tried migrating from JBOSS 7.1.0 to 7.1.1\nSome help please!\nThanks\n\nThanks for the repply James.\nI did what you said and moved the jboss-deployment-structure.xml file to MyAppEAR.ear/META-INF.\nI've noticed that this way the exception:\n\n... doesn't occur. I don't know if that means that the file was parsed... how can I tell?\nDespite of this new behaviour my log4j.xml configuration file still isn't loaded and the logger used still is Log4J's.\nI know this becaused I wrote to the console:\n\n...and got:\n\nI've also tried:\n\nmoving my log4j.xml to MyAppEAR.ear/META-INF.\nremoving the unecessary -Dorg.jboss.as.logging.per-deployment=false from standalone.conf.bat\nremoving slot from my jboss-deployment-structure.xml\n\nAny more ideas?\nThanks\n", "<jboss-deployment-structure>\n<ear-subdeployments-isolated>false</ear-subdeployments-isolated>\n <deployment>\n <exclusions>\n <module name=\"org.apache.log4j\" slot=\"main\"/>\n </exclusions>\n </deployment>\n</jboss-deployment-structure>\n", "java logging jboss log4j jboss7.x"], "936840": ["MySQL and HTTPS", "Can I use a secure server on MySQL or does it need to be MySQLi to be secure?\nA company told me that that is the only way to go about it.\n", "", "mysql security https mysqli"], "2824130": ["split line in C# Graphics", "I draw a line with \n\nHow can I split this line into two parts... when I right click by mouse and choose split from a contextMenuStrip ,,, the line splite into three parts \n\n", "Graphics gg = this.CreateGraphics();\nPen pen = new Pen(Color.Blue, 2);\ngg.DrawLine(pen, Lines[0].StartPoint.X, Lines[0].StartPoint.Y, \n Lines[0].EndPoint.X, Lines[0].EndPoint.Y);\n", "c# graphics drawing"], "622949": ["Different hard drive terminologies?", "I have come across terms like SATA, SCSI and SSD. Can somebody please elaborate the differences between these terms based on their technology and more importantly applications and industry trends? \n", "", "hard-drive ssd sata scsi"], "363983": ["How to add a view above a UINavigationController?", "Hi I wondering how should I go about placing a view such that it cover a entire UINavigationController. Basically I want to add a 0.5 alpha, black overlay to the view to give it a 'disabled' look. And the UINavigationController I'm trying to cover is the DetailViewController of the split view controller on the iPad.\nI know I can add the view as a subview to the navigation controllers root view but that won't cover the navigation bar at the top.\n", "", "objective-c cocoa-touch ipad ios5 uisplitviewcontroller"], "2413500": ["How to construct a macro emitting arbitrary number of possible matches?", "Let's say I would like to create a macro of this kind:\n would produce:\n\n would produce:\n\nand so on. Although construction like for the possible match is accepted, I do not know how to create match expression consisting of these. The example is of course contrived ;)\n", "m(1, k)", "metaprogramming nemerle"], "5021175": ["Windows Server 2008 R2 Terminal Server (RDS) redirected printers", "I'm sure this has come up a million times but i'm looking for a quick answer / solution. I have a client that uses a database program that creates an .ini file for printer settings. The problem is that everytime the enduser logs in her printer is redirected to a \"TSXXX\" port. this port is constantly changing which is of course normal, but each time she logs in since it has changed the .ini file entry for the printer is incorrect as it has changed. The EU then has to go through the whole printer setup each time she logs in to the TS. Is there a way to statically assign the port? or some how make it constant so each time she log in the port remains the same?\n", "", "windows-server-2008-r2"], "1447916": ["Lock/unlock cells VBA", "I have been looking for a code to lock all the cells in a sheet but one and I found this code:\n\nit really worked fine until I saved it and closed/opened the file again, then any macros I had were run.\nI guess it is because in that sheet I have different macros and also I have the macro that runs when a cell is changed:\n\nDo you have any idea how to make it work?\nOne more thing, this workbook it will be shared, so I don't know that will affect the macros.\nsorry maybe I was too ambiguous. \nYes I want to prevent others to change de value of the cells.\nI want that just one cell could be changed so all the others are changing with the macros.\nThanks again for all your help\nPS: yes Ahmad Al-Mutawa, I want to be impossible to chang the sheet even after the project being saved, closed and opened.\nIf you need more info just tell me I'll try to be more specific.\n", "Worksheets(\"SW\").Range(\"D2\").Locked = False\nWorksheets(\"SW\").Protect UserInterfaceOnly:=True\n", "excel vba locking"], "3431223": ["C# Entity Framework Not Updating Wpf GUI on Adding Data to Database", "I have an Application with two Tabs in WPF. One is Used to add a customer to the Database. The Other tab displays the list of customers in a datagrid. My Problem is that when one adds a customer to the database, the new entry is not added into the Datagrid.In order for the customer to appear I have to close the application and rerun it. How can I ensure that when I add the customer it automatically appears in the list of customers in the datagrid? I am using Entity Framework.. \n", "", "c# wpf entity-framework datagrid entity"], "109977": ["How do I re-encode a mixed encoded text file", "I've got a log file that is ASCII, except for a few UTF-8 characters (which I can fix for a future version).\nFor the moment, I need to figure out how to get this file to a viewable/searchable/editable state by gedit/less etc.\n returns . \n and \"succeed\" but do not actually change anything. \nHow do I go about fixing this file?\nUpdate (after some answers):\nActually, as stated below (upvotes to all :)), ASCII + UTF-8 is UTF-8. What I have is \n\nI believe it will be a will be a cp1252-type encoding. Actually, I don't know what it is the cp1252 will be a 1-byte for ASCII won't it?\nIncidentally, the fact that linux barfs on this helped me figure out that an input file (where the id's came from) was encoded badly...\n", "enca -L none file", "character-encoding conversion"], "4872765": ["Send Java object from JavaScript to Applet", "How I can send Java object from JavaScript to Java? LiveConnect allow us to get Java objects from calling applet method. i.e. we can have following method in applet: \n\nwhere is:\n\nand in JS access this objects using: \n\nBut how I can pass object from JavaScript (json object I think) to java method (not as json string)? i.e. I want to have in applet method like this: \n\nand from JavaScript call this method passing parameter of type . How to build object in JS? I hope LiveConnect do conversion from JSON to Java object automatically..\n", "public MyClass getMyClass() { return new MyClass(); }`\n", "java javascript applet liveconnect"], "2147589": ["Donating extra processor power to a worthy cause", "Is there something better my computer can be doing then sleeping?\nI once heard of thousands of people using their excess computing power to help find a cure to cancer?\nWould donating processor time actually help find a cure?\nWhat program could I use to do this?\n", "", "software-rec distributed-computing folding-at-home"], "5998167": ["Recursive query comprehensions (F# 3.0)", "I am trying to define Bill Of Materials kind of queries using the recently introduced F# 3.0 query comprehension syntax. Though it is possible to define these kind of queries using seq comprehensions for in-memory collections I had no lack in translating those into query comprehensions that target remotable IQueryable sources. I guess the hard part would be to \"train\" the provider into recognizing Common Table Expressions out of recursive patterns.\nAny ideas?\n", "yield!", "f#"], "5169381": ["what is the purpose of having function exec() in Hook.php in prestashop", "In the file there is a hook which contains all the header part including menu, search etc... You can check that in this URL \nIn the it shows... ,\nit means in the Hook page there is a function called . But I cannot understand the code properly in the call.\nIt tells it Execute modules for specified hook. When I searched for \"displayTop\" I got a module name called .\nExecution only goes through 2 functions:\n\nand\n\nBut this public function never gets called in the whole folder anywhere. I searched it but never found it in any file.\nThe function shows below\n\n", "Header.tpl", "php function e-commerce smarty prestashop"], "5925960": ["Can apache forward/route requests based on http header (loadbalancing and bots)", "We have a situation where bots comprise 40% of page requests for a slow-performing web application.\nShort Term Relief\nAs immediate relief, I thought of doing the following:\n\nSetting up another instance of the application pointing to a slave copy of the database. Call this \"Server B\" , whereas the main application is \"Server A\")\nforwarding all bot-traffic to \"Server B\", forward all other requests to the main application \"Server A\"\n\nSeparating out, by server, \"bot traffic\" from \"user traffic\" would give the added benefit of more accurate server side analysis (i.e. knowing that all traffic is from \"real users\" and not from bots). Additionally we could use a slower server for \"bot traffic\" and dedicate more resources to \"bona-fide customers\", \nContext\n\ncurrently using apache 2.2 with mod_proxy front end. \nBack end is jboss/tomcat \nWe have a manually-maintained list of bot headers (e.g. baidu,bingbot,googlebot,msnbot, etc.)\n\nQuestion:\n\nCan apache (or mod_proxy) forward requests based on the headers (i.e. forward all requests with baidu,googlebot,msnbot etc in the header to ServerB, all others to Server A)\n\nPlease weigh in with any other suggestions\nThanks in advance\n", "", "apache2 mod-proxy bots"], "703917": ["Windows Mobile development in Python", "What is the best way to start developing Windows Mobile Professional applications in Python? Is there a reasonable SDK including an emulator? Is it even possible without doing excessive amount of underlaying Windows API calls for UI for instance?\n", "", "python windows-mobile"], "609249": ["JNI Freeing Memory to Avoid Memory Leak", "So i have this C++ program that is called via JNI from my Java program, the code follows:\n\nin that second to last line is never released, but returned, will it cause an eventual memory leak? is there anyway to get around this?\nAlso is it possible that instead of returning a string i return a boolean (as returned by the LogonUser function), instead of a jstring, and instead add an \"errormessage\" refrence to be passed in the method, and update that? will my Java program be able to see an update to \"errormessage\"?\nThanks.\n", " JNIEXPORT jstring JNICALL Java_com_entrust_adminservices_urs_examples_authn_LdapAuthenticator2_takeInfo(JNIEnv *env, jobject obj, jstring domain, jstring id, jstring idca, jstring password) \n{\n const char *nt_domain;\n const char *nt_id;\n const char *nt_password;\n HANDLE hToken = 0;\n\n bool aut = false;\n\n nt_domain = env->GetStringUTFChars(domain, NULL);\n nt_id = env->GetStringUTFChars(id, NULL);\n nt_password = env->GetStringUTFChars(password, NULL);\n\n aut = LogonUser(nt_id, nt_domain, nt_password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &hToken );\n\n /* release buffers */\n env->ReleaseStringUTFChars(domain, nt_domain);\n env->ReleaseStringUTFChars(id, nt_id);\n env->ReleaseStringUTFChars(password, nt_password);\n /* release the login handle */\n CloseHandle(hToken);\n\n if(aut)\n {\n return env->NewStringUTF(\"true\"); \n }\n\n DWORD dwError = GetLastError();\n LPVOID lpMsgBuf;\n\n FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT ), (LPTSTR) &lpMsgBuf, 0, NULL );\n\n return env->NewStringUTF((const char*)lpMsgBuf); //returns the contents of lpMsgBuf (error)\n}\n", "java c++ memory-leaks jni"], "4989852": ["is it possible to define a class property dynamically in php?", "I have a class definition like:\n\nI want to dynamically define '$log_path'\nI've tried to define a constant outside the class declaration but no look with that\nExample: \n\nBut i can not do that, is there a way to accomplish this?\n", "class JConfig {\n var $offline = '0';\n var $editor = 'tinymce';\n var $list_limit = '20';\n var $helpurl = 'http://help.joomla.org';\n var $log_path = '/path/to/logs';\n // ....\n}\n", "php class"], "5165369": ["How to sort an associative array by its values in Javascript?", "If I have the associative array:\n\nThen what is the most elegant way to sort (descending) by its values where the result would be an array with the respective indicies:\nsub2, sub3, sub1, sub4, sub0?\nThanks!\n", "array[\"sub2\"] = 1;\narray[\"sub0\"] = -1;\narray[\"sub1\"] = 0;\narray[\"sub3\"] = 1;\narray[\"sub4\"] = 0;\n", "javascript arrays sorting associative"], "5422615": ["getAllBookmarks in firefox", "I'm trying to get the content from all the nodes in the bookmarks menu into , but only the last bookmark appears. What am I doing wrong?\n\n", "textbox.value", "javascript firefox bookmarks"], "5947502": ["What is the average Levenshtein distance between two random binary strings of length $L$?", "For example, for length $L=7$, two random binary strings might be:\n\nThe Levenshtein distance here would be 5, as it would require 5 bit-flips to change one to the other.\nI attempted a derivation on paper that led me to $$\\frac{1}{2^L}\\sum_{k=0}^{L}\\left(k\\cdot{L\\choose{k}}\\right)$$ which Mathematica gracefully simplified to $$\\frac{L}{2}$$\nThis seems correct, but (my) intuition can often be misleading. If true, though, it'd be inconsistent with something else I'm working with (another person's work), and I'd like to have more confidence before raising question. Surprisingly, I don't see anything on Google, either.\nCould anyone point to a source regarding, or confirm by their own derivation, what the average Levenshtein distance between two random binary strings of length $L$, is?\nThank you very much.\nUPDATE\n@vadim123 has shown me that my premises were wrong. Pulled from his comment:\n\nWhat you are calling Levenshtein distance is commonly called Hamming distance. For example, 01010101 and 10101010 have Hamming distance 8, but Levenshtein distance 2 (add a 1 at the beginning, delete a 1 at the end).\n\nThe actual Levenshtein distance of my example is 2!\n\nSo, now, I'm at a complete loss. What is the real formula, then? Is there one?\n", "0100101\n1010011\n", "probability coding-theory binary"], "2392832": ["backbone boilerplate: How to start the development server", "I've cloned Backbone boilerplate which comes with an example Todo app. I have also read that the boilerplate comes with a development server, but I don't know how to start it. In the tutorial, it says you can run this command\n\nbut I get an error saying that it can't find the module /build/server\nCan anyone explain?\n", "node build/server\n", "node.js backbone.js"], "6013274": ["How can I reduce the delay before window previews are shown in the Windows 7 taskbar?", "I really love the preview feature of the Windows 7 taskbar. There's only one reason I don't use it more often -- it takes a relatively long time to display the actual window.\nThere is a registry trick (widely found on Google) to reduce the delay used by general menus, and make the submenus open instantly when hovered upon. I'm wondering if there's a similar trick that can be used for the Windows 7 taskbar's previewing.\n", "", "windows menus"], "5008177": ["Positioning In Google Map", "I made a Wordpress plugin in which I can add a hotel and its details with Google maps. In the plugin I used, the location is not coming in the center of the containing div. It's showing like this.\nI need something like this\nI used the following code. I cannot understand what the problem is.\n", "", "google-maps google-maps-api-3 javascript-library"], "5910143": ["Using a Java applet in a custom web part", "I have a need to integrate a third-party Java applet into a custom web part I wrote. The web part simply loads a user control I created that contains the bulk of the functionality. I added the applet to my user control project and it works fine outside of my SharePoint environment.\nI installed the updated web part onto my MOSS 2007 development site and the part's page loads fine. The applet is triggered by clicking a link button on the page, which runs some client-side JavaScript to start it. The problem is nothing seems to happen when I click the link. No error messages appear, and the stuff the applet is supposed to do never occurs. It's as if SharePoint is not allowing it to load. I have the .jar file as an embedded resource in my user control DLL and SharePoint fully trusts this DLL (it's deployed to the bin folder).\nIs there anything special I need to do to make the applet work? Or am I going about this the wrong way?\n", "", "2007 web-part"], "5257963": ["Changing Salesforce report filters through url - change the Filter Logic too?", "In Salesforce there is a way to programmably filter reports by adding parameters to the report url. pc#, pn# and pv# allow filters 0 to 9 (reports have a max of 10 filters) to be modified or even created out of nothing (a report with no filters have can have filters dynamically added like this).\nIn addition to the 10 generic filters it is also possibe to add a single \"Filter Logic\" filter/rule to the report. A typical filter logic rule might be \"1 AND (2 OR 3)\", which means filter 1 must be true, and either filter 2 or 3 must be true.\nIs there any way to change this through url manipulation like with parameters? Or am I stuck with hard coding the filters 99% of the time?\n", "", "reporting salesforce"], "1202407": ["Node.js server using Express.js uploaded file name", "Some background: I'm trying to create a web service using node.js and express that accepts a POST request with an image attached.\nI have been able to send the request successfully, but I want to be able to do something with the image. All of the examples that I've seen with that do this use a form to upload a file using POST, doing so, allows them to give a name to the file that they are going to upload. Allowing them to do the following\n\nI just want to be able to create a POST request in REST-like way, so the file gets upload via an API call so when the file gets to the server, express gives it a random name and the way to access the file in the files array is to use the actual pictures filename, which depends on what the user's filename is and I can't make that constant.\n\nYour help is appreciated, and if I'm doing this the wrong way, say using express is a bad choice, then please go ahead and suggest. I'm doing this project to learn how to use node.js and all of it's goodness.\n", "app.post('/upload',function(req,res) {\n req.files.formName // have access to the file's information\n}\n", "node.js express"], "4947476": ["Daemons in C - is there a way they're meant to be implemented?", "I've got a general question about daemons in C, that I haven't seen an answer to by now.\nIs there a way how one should implement the control of a daemon process, like a convention or standard?\n--Rest is further explanation--\nI have seen multiple documents teaching the basics how to create a daemon in C. Forking, closing file descriptors, changing root, etc... no problem. And they all stop, when the process enters a endless loop (when the daemon process is created - so to say). But this is only half the way when it comes to coding a daemon; you have to control it somehow. I can make it work different ways, but I have the feeling there is a lot more to it.\nFor this (checking if there is a process already running or for stopping a running daemon process, or ...) I have seen different approaches (UNIX sockets, file locks, pid-files, ...) with their pros and cons. But it seemed to me like opinions or personal flavors; \"why don't you just...?\" or \"I've done it this way, it worked for me\". And I am not sure if this is a sign of freedom or not.\nI mean, if you take a look at sshd, httpd, syslogd, etc... they all can be controlled via init-scripts or the service command (start|stop|status). This looks like a standard. But is this just some loose convention a lot of people try to follow or is there some kind of \"framework\" in the deep sea of C functions? Do you have to make it work somehow - for example make your program respond to a \"stop\" argument and end the daemon process somehow? Or is there some kind of standard, convention, a UNIX-way, best practices... that one should follow to write \"good, clean code\" and that integrates well in most environments?\nMy main question comes down to: Is there a way it's meant to be done? \nAnd if so, where could I find more information? I guess there is more to take care of, than just starting and stopping.\n", "", "c linux unix daemon"], "4759183": ["monitor httpwebrequest traffic when using proxies?", "I have a program which uses httpwebrequest to automate a few things on my company's web site. The program works perfectly when not using proxies at home, but at work I need to use proxies but the problem is when I use a proxy I get unexpected results. Is there anyway to monitor httpwebrequest's traffic with Fiddler when using a proxy so I can find what is the reason for getting unexpected results?\nRegards!\n", "", "c# proxy httpwebrequest fiddler"], "4778981": ["How to lose margin/padding in UITextView?", "I have a UITextView in my iOS Application, which displays a large amount of text. I am then paging this text by using the offset margin parameter of the UITextView. My problem is that the padding of the UITextView is confusing my calculations as it seems to be different depending on the font size and typeface that I use.\nTherefore, I pose the question: Is it possible to remove the padding surrounding the content of the UITextView?\nLook forward to hearing your responses!\n", "", "iphone cocoa-touch uikit uitextview"], "646806": ["How to load jQm modal on page load?", "Hi I am using jQm Window to load modal window.\nhttp://dev.iceburg.net/jquery/jqModal/#how\ni am trying to \n\nbut it throws some JS error,\nbut it does not load on the page load, please guide me for the same.\nTIA\n", "jqmShow\n Show jqModal element(s).\n\n $('#dialog').jqmShow();\n $('.dialogs').jqmShow();\n", "javascript jquery modal-dialog jqmodal"], "4461083": ["Get system HDD usage with C++", "I was wondering if such is possible in the unmanaged C++ code?\nI'm writing a program that shows the current CPU usage on the system, but I observed that on some newer desktops when some lengthy hard drive operation is in process (say, like from a background backup process) the CPU usage stays very low (less than 10%) but the system is somewhat slow to use. So I was thinking to add to my program the current HDD usage on a system-wide scale, I'm just not sure what API to use for that.\n", "", "c++ winapi usage hdd"], "846377": ["Delete Session Cookies Across Multiple Subdomains in Rails 3", "I'm building a rails app that works similar to Wufoo. When you sign up you get a subdomain, and you can log in on the home page. The app is working, so that when you log in, you get redirected to your subdomain. The problem is that I can't delete the session on both domains. If you log out at (username.myapp.com), it stays logged in at (myapp.com) and vice versa.\nRight now I'm using to delete the session. Is there a way to delete all the sessions across all domains.\nIn addition, I appended to my file so I could stay logged in across multiple subdomains.\n", "session[:user_id] = nil", "ruby-on-rails ruby-on-rails-3 session-cookies subdomains"], "3103798": ["How to specify the default scope in Spring's applicationContext.xml to request scope?", "I want to make all beans request scoped by default, however the Spring documentation says that the default scope is Singleton. (sections 3.4.1 and 3.4.2 http://static.springsource.org/spring/docs/2.5.x/reference/beans.html)\nI want to declare the default scope to be request scoped.\nThis is the closest thing I have found so far -- it's a defect that has not been touched in some time. jira.springframework.org/browse/SPR-4994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs\n", "", "java spring spring-mvc scope"], "5050383": ["Do any C or C++ compilers optimize within define macros?", "Lets say I have the following in C or C++:\n\nThen, I go and use and somewhere deep within many nested loops (i.e. used many times). Clearly, both have numeric values that can be ascertained at compile-time, but do compilers actually do it? At run-time, will the CPU have to evaluate every time it sees , or will the compiler statically put there? Similarly, will the CPU have to evaluate a square root every time it sees ?\nMy guess is that the multiplication is optimized out but nothing else is. Integer multiplication is built into the language but sqrt is a library function. If this is indeed the case, is there any way to get a magic number equivalent to such that the square root is evaluated only once at run-time?\n", "#include <math.h>\n#define ROWS 15\n#define COLS 16\n#define COEFF 0.15\n#define NODES (ROWS*COLS)\n#define A_CONSTANT (COEFF*(sqrt(NODES)))\n", "c++ c preprocessor compiler-optimization"], "3200544": ["How to openlayer feature without scroll-bar", "I want to avoid for ,following is my code\n\nMap size is ,if content is more than then is getting, can't we avoid this ? \n", "scroll-bar", "openlayers"], "3993812": ["Android: Orientation changes erase modifications made to my ImageView", "Hello i have app in which I have ImageView. I open new activity, where I paint something by finger and this bitmap return to my ImageView. everythink is ok but when I change orientation now, my activity with ImageView is repaint or restart and imageview is empty. I try everything, I try SaveState and restore state, try configurationChange, and other, but nothung working...Could anybody help me pls?\n\n", "package jilova.Android.TextFolder;\n\nimport java.io.ByteArrayOutputStream;\n\nimport jilova.Android.Enums;\nimport jilova.Android.R;\nimport jilova.Android.DatabaseFolder.LocalDB;\nimport jilova.Android.DatabaseFolder.RequestRow;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.res.Configuration;\nimport android.graphics.Bitmap;\nimport android.graphics.Bitmap.Config;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.view.Gravity;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.View.OnTouchListener;\nimport android.widget.EditText;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.ScrollView;\nimport android.widget.Toast;\n\npublic class Text extends Activity{\n\n private static EditText t1;\n private static EditText t2;\n private static EditText t3;\n private static EditText t4;\n private static ImageView iv1;\n private static Context c;\n private static Activity ac;\n\n\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.text);\n\n Object o = this.getLastNonConfigurationInstance();\n if(o!=null)\n {\n Enums.sign=(Bitmap)o;\n }\n\n c=this.getApplicationContext();\n ac=this;\n\n ImageView iv = (ImageView)this.findViewById(R.id.imageView1);\n iv.setDrawingCacheEnabled(true);\n t1 = (EditText)this.findViewById(R.id.TEXTNote);\n t2 = (EditText)this.findViewById(R.id.TextET2);\n t3 = (EditText)this.findViewById(R.id.TextET3);\n t4 = (EditText)this.findViewById(R.id.TextET4);\n\n //iv.setImageBitmap(Bitmap.createScaledBitmap(Enums.sign, iv.getWidth(), iv.getHeight(), false).copy(Config.ARGB_8888, true));\n\n }\n\n @Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n\n // Checks the orientation of the screen\n if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {\n\n } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){\n\n }\n // Checks whether a hardware keyboard is available\n if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {\n\n } else if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) {\n\n }\n }\n\n\n\n\n\n public static RequestRow getData()\n {\n RequestRow row = new RequestRow();\n row.SetREQUESTNOTE(t1.getText().toString());\n row.SetREQUESTTYPEID(Integer.parseInt(t2.getTag().toString()));\n row.SetTYPTECHUDRZBYID(Integer.parseInt(t3.getTag().toString()));\n row.SetOBJECTID(Integer.parseInt(t4.getTag().toString()));\n return row;\n }\n\n public static void setData(String REQUESTTYPEID ,String TYPTECHUDRZBYID,String OBJECTID,String REQUESTNOTE,String REQUESTID)\n {\n t1.setText(REQUESTNOTE);\n t2.setTag(REQUESTTYPEID);\n t2.setText(LocalDB.dbGetRequestTypeByID(c, Integer.parseInt(REQUESTTYPEID)));\n t3.setTag(TYPTECHUDRZBYID);\n t3.setText(LocalDB.dbGetTypTechUdrzbyByID(c, Integer.parseInt(TYPTECHUDRZBYID)));\n t4.setTag(OBJECTID);\n t4.setText(LocalDB.dbGetObjectByID(c, Integer.parseInt(OBJECTID)));\n Bitmap b = LocalDB.dbGetDocumentByID(c, Integer.parseInt(REQUESTID));\n if(b!=null)\n {\n iv1.setImageBitmap(b);\n }\n }\n\n public static Bitmap getSign()\n {\n iv1.buildDrawingCache();\n Bitmap ret = iv1.getDrawingCache();\n\n if(Enums.EmptySignHash)\n {\n return null;\n }\n else\n {\n return ret;\n }\n }\n\n public void Sign(View button)\n {\n Intent s = new Intent(Text.this,Sign.class);\n startActivityForResult(s,Enums.SIGNREQUESTID);\n }\n\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n if(resultCode!=Activity.RESULT_OK)\n {\n return;\n }\n Enums.IDLocal=-1;\n if(requestCode==Enums.GetData)\n {\n Bundle extras = data.getExtras();\n if(extras !=null)\n {\n EditText et = (EditText)this.findViewById(extras.getInt(\"ViewID\"));\n et.setText(extras.getString(\"Value\"));\n et.setTag(extras.get(\"ID\"));\n }\n }\n else if(requestCode==Enums.SIGNREQUESTID)\n {\n Bundle extras = data.getExtras();\n if(extras !=null)\n {\n ImageView iv = (ImageView)this.findViewById(R.id.imageView1);\n try\n {\n byte[] b = extras.getByteArray(\"Bitmap\");\n Enums.sign = Bitmap.createBitmap(BitmapFactory.decodeByteArray(b, 0, b.length), 0, 0, ac.getWindowManager().getDefaultDisplay().getWidth(), 200);\n iv.setImageBitmap(Bitmap.createScaledBitmap(Enums.sign, iv.getWidth(), iv.getHeight(), false));\n\n }\n catch(Exception e)\n {\n int a=0;\n }\n }\n Enums.EmptySignHash=false;\n }\n }\n\n public static void DeleteAll()\n {\n EditText t = (EditText)ac.findViewById(R.id.TEXTNote);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)ac.findViewById(R.id.TextET2);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)ac.findViewById(R.id.TextET3);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)ac.findViewById(R.id.TextET4);\n t.setText(\"\");\n t.setTag(-1);\n\n ImageView iv = (ImageView)ac.findViewById(R.id.imageView1);\n //Bitmap b = Bitmap.createBitmap(Enums.createColors(), 0, Enums.STRIDE, Enums.WIDTH, Enums.HEIGHT, Bitmap.Config.ARGB_8888).copy(Bitmap.Config.ARGB_8888, true);\n iv.setImageBitmap(Bitmap.createScaledBitmap(Enums.sign, ac.getWindowManager().getDefaultDisplay().getWidth(), iv.getLayoutParams().height, false));\n\n Enums.EmptySignHash=true;\n }\n\n public void Delete(View button)\n {\n EditText t = (EditText)this.findViewById(R.id.TEXTNote);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)this.findViewById(R.id.TextET2);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)this.findViewById(R.id.TextET3);\n t.setText(\"\");\n t.setTag(-1);\n t = (EditText)this.findViewById(R.id.TextET4);\n t.setText(\"\");\n t.setTag(-1);\n\n ImageView iv = (ImageView)this.findViewById(R.id.imageView1);\n //Bitmap b = Bitmap.createBitmap(Enums.createColors(), 0, Enums.STRIDE, Enums.WIDTH, Enums.HEIGHT, Bitmap.Config.ARGB_8888).copy(Bitmap.Config.ARGB_8888, true);\n iv.setImageBitmap(Bitmap.createScaledBitmap(Enums.sign, ac.getWindowManager().getDefaultDisplay().getWidth(), iv.getLayoutParams().height, false));\n\n Enums.EmptySignHash=true;\n\n }\n\n public void GetData(View button)\n {\n if(button.getId()==R.id.TextIB3)\n {\n Intent ChooseAction = new Intent(Text.this,ChooseData.class);\n Enums.Data = LocalDB.dbLocalSelect(this.getApplicationContext(),\"Select typtechudrzbyid,typtechudrzbydesc from typtechudrzby\");\n if(Enums.Data==null)\n {\n Toast t=Toast.makeText(this, \"Chyba lokalni db\", Toast.LENGTH_SHORT);\n t.setGravity(Gravity.CENTER, 0, 0);\n t.show();\n return;\n }\n ChooseAction.putExtra(\"ViewID\", R.id.TextET3);\n startActivityForResult(ChooseAction,Enums.GetData);\n }\n else if(button.getId()==R.id.TextIB2)\n {\n Intent ChooseAction = new Intent(Text.this,ChooseData.class);\n Enums.Data = LocalDB.dbLocalSelect(this.getApplicationContext(),\"Select Requesttypeid,requestname from requesttype\");\n if(Enums.Data==null)\n {\n Toast t=Toast.makeText(this, \"Chyba lokalni db\", Toast.LENGTH_SHORT);\n t.setGravity(Gravity.CENTER, 0, 0);\n t.show();\n return;\n }\n ChooseAction.putExtra(\"ViewID\", R.id.TextET2);\n startActivityForResult(ChooseAction,Enums.GetData);\n }\n else if(button.getId()==R.id.TextIB4)\n {\n Intent ChooseAction = new Intent(Text.this,TreeData.class);\n Enums.TreeData = LocalDB.dbLocalSelectTree(this.getApplicationContext(),\"Select objectid,objectname,objectref from Objects\");\n if(Enums.TreeData==null)\n {\n Toast t=Toast.makeText(this, \"Chyba lokalni db\", Toast.LENGTH_SHORT);\n t.setGravity(Gravity.CENTER, 0, 0);\n t.show();\n return;\n }\n ChooseAction.putExtra(\"ViewID\", R.id.TextET4);\n startActivityForResult(ChooseAction,Enums.GetData);\n }\n else\n {\n //throw new Exception();\n } \n\n }\n}\n", "android orientation imageview"], "1559025": ["Need help implementing Command Handlers/Bus using Unity DI", "Folks,\nI am trying to re-factor a legacy brownfield application into a CQRS architecture with commands and a command bus for domain modifications.\nThe application will more than likely be implemented in Asp.Net MVC3. My employer prefers the use of Unity for DI in MVC applications.\nAny examples I can find showing a dependency container for command/bus resolution are based on Structuremap or Autofac, however I will need to use Unity in this implementation. Has anyone used Unity in this manner or know of any examples?\n", "", "dependency-injection unity structuremap cqrs"], "1846079": ["Disable hyperlinks when exporting SSRS report to excel", "I am using the ReportViewer control to render some local reports. These reports have some elements that are links to supreports. Some of these elements contain a lot of data ( to be passed as arguments to subreport). The problem is when i export the report to excel, it wont open in excel because of the cell max character limit. I am wondering if its possible to disable/remove certain columns from this report when exporting to excel. I have tried to use the DeviceInfo setting and trying to disable formulas but that did not help much.\nmany thanks\n", "", "sql-server reporting-services"], "3549890": ["on save compile and deploy with maven eclipse and weblogic", "I just started maven in general and m2eclipse in specific.\nWhat I have been doing before is follow:\n1)Deploy my application to tomcat.\n2) make any changes to the java or jsp files.\n3) save and run the application again ( no restart is neccessary unless I changed a config file).\nnow, everytime I make a minor change to my maven project in eclipse I have to do a \"pre-clean install\" to compile and deploy the application again and then restart weblogic 10 to view the changes.\nIs there anyway ( or maybe I m not doing something right) that I when I modify a class or jsp file, the code will get compiled and deployed when I save the file like I was doing before with the eclipse default project builder and tomcat?\nAlso, When I checkout the maven project from SVN, Eclipes shows bunch of compiling errors due to some missing classes, but when I build the project using m2eclipse everything builds successfull. Why is eclipse not recognizing the classes??\nI have looked at the following answer but I was not able to figure out the problem.\nhttp://stackoverflow.com/questions/2632425/howto-start-maven-compile-goal-on-save-in-eclipse\n", "", "eclipse weblogic maven m2eclipse weblogic-10.x"], "4584041": ["Setting all day events to block, preventing other events being added or be shown as a full sized bubble?", "Is there a way to change the settings in Outlook so that an all day event is shown by a bubble taking up the whole day rather than just a small all-day event? Also it it possible to have all day tasks block you from adding further tasks that day?\n", "", "microsoft-outlook microsoft-office"], "2261188": ["Python: static variable decorator", "I'd like to create a decorator like below, but I can't seem to think of an implementation that works. I'm starting to think it's not possible, but thought I would ask you guys first.\nI realize there's various other ways to create static variables in Python, but I find those ways ugly. I'd really like to use the below syntax, if possible.\n\nI don't care if the implementation of is long or hackity, as long as it works like above.\nI created this version, but it only allows a syntax, which gets cumbersome pretty quickly with longer function and variable names.\n\nVarious things I thought of, but couldn't get to work were:\n\nChanging f (the decorated function) into a callable class, and somehow storing the static vars in transparently.\nModifying the globals of f() inside the decorator, and somehow inserting 'global x' statements into the code for f.\nChanging f into a generator where we bind the variables by hand and then execute f's code directly.\n\n", "@static(x=0)\ndef f():\n x += 1\n print x\n\nf() #prints 1\nf() #prints 2\n", "python variables static namespaces decorator"], "1469276": ["Web image loaded by thread in android", "I have an extended BaseAdapter in a ListActivity:\n\nand some handlers and runnables defined in it\n\nIn the getView function of the Adapter, I'm getting the view like this:\n\nand the image is getting loaded this way:\n\nNow, the problem I'm having is that if there are more items that need to display the same picture, not all of those pictures get displayed. When you scroll up and down the list maybe you end up filling all of them.\nWhen I tried the commented out line (holder.avatar.setImageBitmap...) the app sometimes force closes with \"only the thread that created the view can request...\". But only sometimes.\nAny idea how I can fix this? Either option.\n", "private static class RequestAdapter extends BaseAdapter {\n", "android image list multithreading adapter"], "2637377": ["How to make a spring effect in AndEngine", "I am new to android. I want to make a spring sort of thing in AndEngine just like we see in classic pinball how can we achieve this functionality.\n", "", "android box2d andengine"], "4968595": ["quick to setup version control that integrates well with VS2010", "I've got to a point where i want to start using version control for my project.\nMainly for reverting to previous versions of files if things go belly up, doing diff comparisons. Nothing major.\nI want something that integrates well with visual studio, and something thats relatively simple to setup. - prefereably with a link to a tutorial for setting up would be nice.\nIm just using my pc for this so something like TFS is out of the question.\n", "", "visual-studio-2010 version-control"], "1100706": ["How to calculate partial derivatives of $f(x+iy)=x^2-y^2 + 5xi$ using limits", "Let $f(x+iy)=x^2-y^2 + 5xi$. So hence $u(x,y)=x^2-y^2$ and $v(x,y)=5x$\nIn my notes it calculated $\\frac{\\partial u}{\\partial x}$ at $0$ as follows:\n$\\frac{\\partial u}{\\partial x}(0,0)=\\displaystyle\\lim_{h\\rightarrow 0}\\frac{u(x+h,y)-u(x,y)}{h}\n\\\\=\\displaystyle\\lim_{h\\rightarrow 0}\\frac{u(h,0)-u(0,0)}{h}\\\\=\\displaystyle\\lim_{h\\rightarrow 0}\\frac{h^2}{h}=\\displaystyle\\lim_{h\\rightarrow 0}h=0$\nBut is it possible to calculate $\\frac{\\partial u}{\\partial x}$ at $0$ by just finding that $\\frac{\\partial u}{\\partial x} = 2x$, and then substituting $x=0,y=0$ and thus getting $\\frac{\\partial u}{\\partial x}=0$?\nIf so, it seems easier that way rather than taking limits as above.\n", "", "limit complex-numbers derivatives"], "4036015": ["Submit button in boostrap modal doesn't submit", "I have an mvc generated form (@Html.BeginForm()) with button of type=\"submit\" within bootstrap modal overlay. \n\nWhen I click the button - all it does is closes the modal.\nSubmit action (POST to the controller) is not performed.\n", "<button aria-hidden=\"true\" data-dismiss=\"modal\" class=\"btn\" type=\"submit\">Close</button>\n", "asp.net-mvc-3 twitter-bootstrap modal"], "4444351": ["Entity Framework V/S Traditional ADO Approach", "I have a question. I have used ADO and Entity Framework. No doubt, Entity Framework facilitates us for writing queries in c# so we can also debug these queries. Till now what I have heard is that query processing is more fast if we execute them in SQL. So I just want to know that processing queries in c# could be slower than processing them in SQL? What I want to say is that query written in Entity framework would be slow/fast than query written in SQL?\nI hope I am clear. \nPlease suggest.\n", "", "sql entity-framework"], "5048426": ["Determine whether this series converges or diverges: $\\sum\\limits_{n=0}^{\\infty} \\frac{1}{(2n+1)!}$", "Determine whether this series converges or diverges: $$\\sum\\limits_{n=0}^{\\infty} \\frac{1}{(2n+1)!}$$\nThought about using the limit theorem or by comparison but am so stuck. any pointers would be appreciated guys\n", "", "calculus sequences-and-series"], "2149449": ["SVG Pie Graph: How to draw irregular sized Pie Graphs", "I am attempting to create a SVG Pie Graph that is 277 degrees. I have some code that creates a pie graph that looks correct but I am unsure if my code is firstly correct(in the correct positions) & whether I could improve it.\nOn the left is the pie graph I am attempting to recreate, on the right is my code output:\n\n\nI have a feeling that my attempt has a central point that is too far to the right(where the 2 lines meet). The circle is meant to be 277 degrees. Is my code correct & if not what how can it be fixed - what do I need to change & to what values?\n\nPS: Is it possible to just give a degree value for an SVG, because it would be much easier to just say \"fill to 277 degrees\" instead of using trig for the actual points etc.\n", "<svg width=\"400\" height=\"400\">\n <path d=\"M200,200 h-150,-20 a150,150 0 1,0 150,-150 z\"\n fill=\"red\" stroke=\"blue\" stroke-width=\"5\" />\n</svg>\n", "html svg"], "5629088": ["\"JSR-303 Provider is on the classpath\" Means", "I am using Spring MVC 3. Here is the my model,\n\nand here is the controller method,\n\nBut hasErrors is always false.\nThen I put these lines in dispather-servelet,\n\nBut now now, NetBean showing me this error,\n\nSome people suggests me to\n\"Set JSR-303 Provider is on the classpath\"\nWhat does this means.\nI have these jars in my application,\n\nEdit:\n<bean id=\"urlMapping\" class=\"org.springframework.web.servlet.handler.SimpleUrlHandlerMapping\">\n <property name=\"mappings\">\n <props>\n <prop key=\"demo.htm\">DemoAppMarketController \n.................................\n <bean name=\"indexController\"\n class=\"Controller.IndexControler\"\n", "public class MarketPlace {\n\n @NotNull(message=\"This Template Name is required\")\n @Size(max=50)\n private String templateName;\n\n public String getTemplateName() {\n return templateName;\n }\n\n public void setTemplateName(String templateName) {\n this.templateName = templateName;\n }\n\n}\n", "java netbeans spring-mvc"], "2751153": ["php variable passed by jquery and get it for $ _GET to another php page", "I usually go to the news of the story expanded, passes the variable with a while, as follows:\n\nbut now I want is to load the content of the page in a div and I usually when I don't have to pass php variable in this way:\nthe link for load content\n\njQuery code that I have it in an external file called load.js\n\nand the page that loads the div I get the variable as follows:\n\nthe problem is that jQuery does not read the file php load.js\nthen how I can fix it\n\n", "while ($noticias = @mysql_fetch_array($sql)) {\n$sqll = mysql_query(\"SELECT * FROM categorias WHERE id='\".$noticias['categoria'].\"'\");\n$datos = mysql_fetch_array($sqll);\n<div class=\"leermas\">[COLOR=\"red\"]<a href=\"noticias.php?n='.$noticias['id'].'\">[/COLOR]<strong>(Leer más)</strong></a></div>\n</div></div>';\n\n}\n", "php jquery ajax"], "4868122": ["JavaScript Accordion Text Swap", "I am trying to work with an accordion. My goal is to have a '+' symbol showing when not expanded and a '-' when expanded. I am just trying to get the first swap to work and cannot get the .equals() function to compare properly. Any help? \n\nTHIS IS THE HTML\n\n", "<script type=\"text/javascript\">\nfunction replaceMe(){\nvar symbol = document.getElementById(\"swap1\").innerHTML;\nif(symbol.equals(\"+\") {\n document.getElementById(\"swap1\").innerHTML=\"-\";}\nelse { \n document.getElementById(\"swap1\").innerHTML=\"+\";}\n}\n</script>\n", "javascript accordion swap"], "3992183": ["How to Get the Direct Access Index for NSDictionary of NSDictionary", "Here's the code:\n\nWhat is the code to do a direct access on and in a format suitable for NSLog?\n", "NSMutableDictionary *circuit_step = [NSMutableDictionary dictionary]; \nNSMutableDictionary *step_info = [NSMutableDictionary dictionary];\n\n [step_info setObject: @\"search\" forKey: @\"search-type\"]; \n [step_info setObject: @\"small\" forKey: @\"search-format\"]; \n [step_info setObject: @\"winter\" forKey: @\"search-season\"]; \n [step_info setObject: @\"tree\" forKey: @\"search-location\"];\n\n **[circuit_step setObject: circuit_step forKey: @\"01\"];**\n\n [step_info setObject: @\"search\" forKey: @\"search-type\"]; \n [step_info setObject: @\"micro\" forKey: @\"search-format\"]; \n [step_info setObject: @\"summer\" forKey: @\"search-season\"]; \n [step_info setObject: @\"by the lake\" forKey: @\"search-location\"];\n\n **[circuit_step setObject: circuit_step forKey: @\"02\"];**\n", "iphone multidimensional-array nsarray nsdictionary"], "5966266": ["How to create dynamic layout columns in Rails", "I can create this in PHP, but the same thing in rails won't work:\n\nThese are all dynamic, so I am trying to generate new columns whenever the col field in the database changes. So, content 1 has a col of 1, content 2, col = 1, content 3 has col = 2. The content moves around so I will be updating the column number in the database via ajax. The problem is how to load all the content boxes and in the right columns. What is the best practice for doing this in Rails? Here is what I would do in PHP (psuedocode)\n\nI could just be a noob and going about this the wrong way, so feel free to educate me on how this should be done. Is my database not the way to determine col number? Does rails handle iteration differently than I suspect? \n", "<div class=\"col\">\n <div class=\"row\">content 1 here</div>\n <div class=\"row\">content 2 here</div>\n</div>\n<div class=\"col\">\n <div class=\"row\">content 3 here</div>\n</div>\n", "php ruby-on-rails dom"], "2360601": ["How to count and sum elements in a multi-dimensional array?", "i have a array that returns some numbers. and i want to add those numbers together and also count them.\nhere is what i have so far:\n\nwhat i am trying to do is to sum the together and also count them.\nSo that: and \nbut i get lost in the sintax.\nany ideas?\nThanks\n", "<?php\n$homepage = file_get_contents('http://graph.facebook.com/215844978437619/reviews');\n$parsed = json_decode($homepage,true);\nforeach ($parsed['data'] as $key => $values){\n$totalRatings1 = $values['rating'] ;\n}\n?>\n", "php arrays count sum"], "1883488": ["SQL Server 2008 Changes Notification", "This is the scenario:\nI have a Database in SQL Server 2008 but I need to reflect changes in records in real time. The languages I'm going to use is ActionScript 3.0, Flex 4.6, ColdFusion 10.\nIt's possible to do it natively in ColdFusion or it's necessary to create a Listener at Server Side just listening to SQL Server daemon in some way and using sockets then update all client apps connected.\nThank you very much..\n", "", "sql-server flex sockets actionscript coldfusion"], "1884700": ["Java annotations when does it execute? compile or runtime?", "Well I am fed up of writing input validation logic for all my service method, such as If the argument is null or if the list is not empty so...I am just looking to write some annotation which can execute at runtime, before or immediatly after a service method is invoked? Well my knowledge on annotation is very limited. I dont know if it executes during the runtime or compile time.\n", "", "java annotations"], "3998302": ["How to do pagination in an NHibernate SQL query with DISTINCT", "I have a big and complicate SQL query with a DISTINCT clause that gets run in NHibernate (it's a search query with a wide variety of criteria and joins). But I'm having a problem using pagination with it under SQL Server 2008. \nMy question is: how do I do this from NHibernate and not my manual workaround (outlined below)?\nThe code I'm using is this:\n\nThe results of my SQL query (from BuildQuery(), without DISTINCT) look like this (highly simplified):\n\nI can't avoid the duplicate rows because of how the query works, so I stick a DISTINCT in the SQL query to make them go away.\nTo do the pagination, NHibernate generates a query like this (this example is from the second page with 100 results per page):\n\nThis works fine for the first page, but on subsequent pages I only get half the expected results.\nI run the SQL inside NHibernate's subquery and found that the row NHibernate inserts to do it's pagination returns something unexpected (even with DISTINCT):\n\nWhen NHibernate wraps this in a subquery to filter on the __hibernate_sort_row column, it returns 100 rows, but because every row is duplicate, I really only have 50 rows on my page. This is because DISTINCT isn't merging the rows as I expected any more. (All this comes back to how the ROW_NUMBER() function works in SQL 2008 with a DISTINCT clause, but it's NHibernate's problem, not mine.).\nI've currently solved this problem by wrapping the query in two subqueries and manually handling the pagination:\n\nMy question is: how do I do this from NHibernate and not my manual workaround?\nI'm using NHibernate version 2.1.2.\nUnfortunately, I can't convert this query to HQL or LINQ (unless someone can supply me with a few weeks of free time!). Nor can I remove the DISTINCT from my query.\n", " var searchQuery = BuildQuery(criteria);\n .SetTimeout(240)\n .SetFirstResult(pageIndex * pageSize)\n .SetMaxResults(pageSize);\n var resultRows = searchQuery.List<object[]>();\n", "c# sql nhibernate distinct"], "5019959": ["How to count rows in mysql query?", "I want to query mysql according to row number ? suppose I want to query last 10 rows , how to do this in mysql query? \nHere is my mysql query, but it queries according to 6 days interval, But I need to query it according to last 10 rows instead of 6 days interval,\n\n", "SELECT people_id, people_number 'people number', count(people_number) 'Occurs',\n (\n Select count(people_number) from people_history\n where people_id = 5486 and date > DATE_SUB(NOW(), INTERVAL 6 DAY)\n ) 'Total',\n count(people_number)/(\n Select count(people_number) from people_history\n where people_id = 5486 and date > DATE_SUB(NOW(), INTERVAL 6 DAY)\n )*100 'Percent'\nFROM people_history\nwhere people_id = 5486 and date > DATE_SUB(NOW(), INTERVAL 6 DAY)\ngroup by people_id, people_number\norder by Percent desc`\n", "php mysql phpmyadmin"], "6017386": ["creating datatypes at runtime", "I have a scenario where I am given data records at runtime. The datatype of the cells of the record are variable and only known at runtime. How wil I store these records?\nFor e.g.,\nAt runtime, I get record_Info = \"char[]\",\"int16\",\"int32\"\nThen I get records = \"abc\" \"2\" \"30\", \"def\" \"3\" \"40\"\nhow can I store these when I cant initialize their types? \n", "", "c++ visual-c++"], "82158": ["BSON::InvalidObjectId illegal ObjectId format", "I got this error after trying to insert a simple condition in my controller :\n\n", "if", "ruby-on-rails elasticsearch tire"], "1586688": ["How to test JBoss deployment automatically?", "I have jboss application. And want to test deployment automatically. And want to add this task as a project in Hudson\nMy vision is based on the following stages:\n\nPut my application to JBoss(copy ears, configs, libs e.t.c)\nRun JBoss\nI have a Linux-machine and now our project is require JBoss 4.3.2. \nHow can I run the JBoss and analyze results. Is my application deployed fully and successfully or not?\nRun some standalone tests\nStop JBoss\n\n", "", "jboss automated-tests automated-deploy"], "4205081": ["Help on Facebook Graph API, returns \"false\" but UID is public", "I really could not understand why on some Facebook objects (being more specific: user posts) the Graph API returns false when using an access_token obtained via OAuth by an application, but NOT by using a user access_token.\nI have an example here:\nhttps://graph.facebook.com/10150158049595775?access_token=XXXXXXXXXX\nThis post is public, and I have no friends in common with this user.\nIf you try to access the url above by using a token obtained via the usual Facebook OAuth scheme, the server return \"false\".\nIf you use your user access token, for example the one that FB gives you by visiting the examples in this page http://developers.facebook.com/docs/reference/api/, the Graph API correctly gives you the users's post detail.\nI believe it's not a matter of extended permissions required, first because the post above is public, and second, because for testing I've tried to make my application generate a token by asking ALL user permissions (yes, all permissions found on developers.facebook.com/docs/authentication/permissions/) and the answer was always \"false\".\n", "", "facebook graph facebook-graph-api oauth-2.0"], "2092873": ["how to invoke a build on one TFS server from another using workflows", "I am trying to invoke 2 builds on \"tfs1\" server from \"tfs2\" server using workflows. My goal is to have a single build definition which will abstract the multiple branches used by a team.\nAny info on cross TFS server build invocation would be appreciated.\nPS: I am using tfs2012. \n", "", "tfs workflow-foundation-4 tfs2012"], "5120239": ["SQL Server - Select Left Join NULL record WHERE condition", "I am trying to perform a SELECT query on two tables joined with a LEFT JOIN where there may not be a record in the joined table. Something like:\n\nThis works when @PostcodeOutcode exists in the Area table, but I still need to return the record in the left table if there is not a record in the right table.\nI am fudging it currently by doing this, but I know there is a better solution:\n\nI know this is probably simple, but my SQL knowledge is limited. Please help.\nThanks\nAlex\n", "--SELECT row using AreaID\nSELECT *\nFROM Rate\nLEFT JOIN Area\nON Rate.AreaID = Area.AreaID\nWHERE ProductID = @ProductID\nAND Area.PostcodeOutcode = @PostcodeOutcode\n", "sql sql-server join"], "2442931": ["Apache RewriteRule unexpected behaviour when two rules match URL at one moment (add path info postfix)", "I'm playing with apache rewrite_mod (Apache/2.2.17 Win32) and encounter very weird behave of rewriteRule.\n\nMy script primarily rewrite infinite filter parameters named from nice url and in loop adding them as query variables, add path as query, and page number.\n\nIt works flawlessly, but if I add one another rule (last rule in script)\n\nwhich is for another cases, it change execution of rewriterule at start of script.\n\n\n\nInput URL:\n\nExpected result in PHP after all rewrites:\n\nScript look like this (next part is flawlessly functional):\n\nhere, after rules is url in shape:\n\nWithout next rule in script is everything perfectly functional. But if I add it, this rule itself do nothing, but rewrite_mod add something more to subtitution at start of script.\n\nActually after run all script result is: \n\n", "f1 .. f<infinity>", "regex mod-rewrite url-rewriting apache2"], "2392686": ["bootstrap radio button and collapse works only partly", "I want to use a radio button group together with collapse functionality in my bootstrapped website. I want to have 3 buttons and only one button / div active at any given time. I got it to work partly, but not completely.\nWhen I select the first radio button it shows me the first div correctly. If I move to the 2nd div it works great too. If I move back to the 1st div that also shows. But then - if I move to the 3rd button it shows the 3rd div, but if I then go back to the 1st button the 1st div does not show anymore. From that point on I can only show div2 and div3.\nHere's what I did.\nI created the radio button group as follows:\n\nThen I created three divs as below:\n\nThe javascript that I created to show a given div is as follows:\n\nAny help would be greatly appreciated. I use jquery1.8.3 and bootstrap js.\nAnother problem is that I can't seem to get the default state of the 1st radio button to be set to 'pressed'.\n", "<div class=\"btn-group\" data-toggle=\"buttons-radio\">\n <button class=\"btn btn-primary btn-large\" onclick=\"showdiv(1);\">Save as PDF</button>\n <button class=\"btn btn-primary btn-large\" onclick=\"showdiv(2);\">Simple API</button>\n <button class=\"btn btn-primary btn-large\" onclick=\"showdiv(3);\">Advanced API</button>\n</div>\n", "javascript twitter-bootstrap"], "5095534": ["How to fetch user public Facebook data using Facebook Id?", "I am developing an app which requires data from social networks..I wanted to know how to fetch details of a person from his fid in Facebook.I want to fetch only the data are marked public.From google search i got to know that we can use rest API or java API to get the data but it requires API key or access token which are generated only after logging in to the Facebook. please explain me if there is any other way to fetch the details.\n", "", "facebook api"], "3434070": ["How do I pass pointers back up from View 3 to View 2 to View 1 in a UINavigationController?", "I'm using a UINavigationController to manage a series of views.\nAt the top level there is a UITableView list of Equipment objects.\nThe Equipment object are NSManagedObjects that have a to-many relationship with Note objects.\nThe 2nd level displays all the Note objects in a UITableView that a single Equipment object has.\nThe 3rd level allows you to edit the attributes of a single note chosen from the 2nd level.\nI've been successful at passing an Equipment object and a NSManagedObjectContext from level 1, down to 2 and 2 down to three by creating an instance of the level 2 controller in level 1 and setting it's myContext and myEquipment properties. The same strategy works in going from level 2 to level 3.\nHow do I pass myContext and myEquipment back up from level 3 to level 2 to level 1? \nIs there a smarter way to do this? I was watching a WWDC video on effective app architecture and there was a section on using delegates from a similar scenario. I've watched it a couple of times and still don't get it though. They were demoing the CoreDataRecipes sample app.\n", "", "ios core-data"], "2781057": ["Changing options in select box based on different select options", "I have 2 select options. I want to change the drop down options in second select options based on what I select in first select options. How do I do that in jquery?\n\nSecond select option if A is selected from first select option\n\nNow if B is selected from first select option\n\n", "<select id=\"Manage\">\n <option value=\"a\">A</option>\n <option value=\"b\">B</option>\n <option value=\"c\">C</option>\n<select>\n", "jquery html select options"], "3124852": ["include the word \"table\" in List of Tables, \"Appendix\" in Table of Contents, etc", "I need to include the word \"Table\" at the beginning of each line in my List of Tables. That is, instead of:\n\nI need it to say:\n\nYes, I know that's ugly, but those are the rules.\nI also need the Table of contents to say:\n\nAny idea how to do this in a simple and consistent manner?\n", " LIST OF TABLES\n 1 The first table ........... 10\n 2 The second table ........... 20\n", "latex"], "2140925": ["Assistance with SQL Query (Windowing Functions)", "\nAll,\nI have a result set like the one above.\nUsing the familiar Customer -> Orders schema as an example,\nThe first two columns (e.g. Houston, Apartment) come from category1 and category2 fields on the Customer Table.\nThe third column comes from the Orders Table and will represent the Primary Key of the table. The values in this column were deliberately listed out of order (1...5...3) to show that I cannot guarantee the order the values.\nWhat I want is to have a column that adds a Rank or Row_number (or calculation?) that numbers each combination of Category 1 and 2:\n\nSo, Houston-Aparment is 1, Houston-TownHouse is 2, etc...\nI would like to avoid any sub/nested queries if possible.\nPlease note:\nThe values in the example or just sample data. The real data is not based on a Customer/orders so I respectfully and humbly ask that you please not chastise me for having Cities and Apartment types as categories, etc (I would put these in separate domain tables in this instance) or suggest a change of schema \nCan anyone help please?!\nSteve\n", "Houston Apartment Order 1\nHouston Apartment Order 5\nHouston TownHouse Order 3\nHouston TownHouse Order 4\nAustin Condo \nDallas MultiFamily Order 2\n", "sql query grouping"], "3518340": ["How to get result seach related other model using Elasticsearch?", "I have a question and I didn't find the answer until now. \nArticle has_many :tags\nArticle has_many :comments\nFor example I have 3 articles:\n\nwhen I search :\n\nI want to search inside the comments or tags, then I just try like this :\n\nIt doesn't work. do you have any suggestion for this case? please help.\n", "Article1 {tags => [\"euro\", \"indo\", \"china\"], comments => [\"good\", \"nice\", \"yes good\"]}\nArticle2 {tags => [\"euro\", \"google\", \"yahoo\"], comments => [\"goodness\", \"nice\", \"yes good\"]}\nArticle3 {tags => [\"heroku\", \"climb\", \"indo\"], comments => [\"good\", \"china\", \"yes good\"]}\n", "ruby-on-rails elasticsearch"], "4382067": ["Flatlander on torus", "Suppose you are a $2$-dimensional being living on an ideal torus made of a cylinder of radius $a$, curled together such it exactly fits inside a sphere/circle of radius $b$, is it possible to determine $a$ and $b$ by walking a finite length, if you can only measure the local distance you walk, but you are allowed to identify places you have been before and the length you had walked at this point?\nWhat is the maximum length you need to walk to determine $a$ and $b$ with optimal strategy?\n", "", "geometry general-topology differential-geometry"], "2394817": ["Change text on link while loading", "I have a asp button that while processing i would like the text on it.. How could achieve that?\n\nSo when I click, it will change the Load Images to Loading... and then go back to the original state once it finishes.\nI would appreciate any ideas.\n", "<asp:LinkButton ID=\"loadImages\" runat=\"server\" CssClass=\"button\"\n onclick=\"loadImages_Click\">Load Images</asp:LinkButton>\n", "c# asp.net"], "3984940": ["Emacs: how to fix annoying escape behavior when in split windows?", "I have a really annoying situation; when I'm editing in emacs and the auto-complete box loads up, I find I'm using the escape key to quit out of it when I don't need it. The problem is this has the unwanted behaviour of making the current window the only window. This is really annoying when I've set up a number of windows/frames for various tasks.\nI'm using , with the following options:\n\nSince hitting the key is in my muscle-memory for dismissing UI elements (drop-downs, dialogs, etc), any idea on how I can hit escape without having the current focussed frame take over?\n", "auto-complete.el", "emacs autocomplete"], "4458984": ["A tree which returns two things together!", "I have one weird problem about the following code. I write the code to search a tree.\n\nThe odd thing is that: Assume there is only one element in my tree. Then, when I try to add an element to my tree, the method works properly. However, when there are two elements(a parent and a child) and I search for the child, what is printed on the screen is \"ccc\" and what the code returns is null!!!\nI guess nobody has ever faced with that kind of stupid situation. Please help me!\n", "public TreeNode<City> search(City parent, TreeNode<City> t){\n if (t.getCity().equals(parent)) {\n System.out.println(\"ccc\");\n return t;\n }\n else if (t.hasLeftChild()){\n System.out.println(\"bbb\");\n search(parent,t.getLeftChild());\n }\n else if(t.hasNextSibling()){\n System.out.println(\"aaa\");\n search(parent,t.getNextSibling());\n }\n return null;\n}\n", "tree return-value add"], "5099354": ["Vertical align text middle in jQuery Mobile Button?", "I'm attempting to shrink the height of a jQuery Mobile Button for a better fit in a list view, but I cannot get the text to line up properly. Here's my implementation so far:\n\nthe styled margins do affect the width of the button to give it a shorter length, however, the top and bottom margin values have no affect, regardless of the values tried. I've also attempted various padding , height, and other values with no luck. Line height was also the only inline style that had any affect on height of the button, but the text within is misaligned. Attempting on versions 1.0b1+ of jQuery Mobile btw.\nHere's an image of the resulting button for reference:\n\n", ".listDelBtn .ui-btn-text {\n margin: -5px -15px -5px -15px;\n}\n\n<a class=\"listDelBtn\" data-role=\"button\" data-theme=\"b\" style=\"float: right; width: 75px; line-height: 11px; margin-top: 6px; z-index: 12; padding: 0 0px 0 0px;\">delete</a>\n", "javascript jquery iphone css jquery-mobile"], "4155460": ["How do you perform LDAP authentication with netatalk?", "I am attempting to move data for one of my clients off their old Xraid system and on to a new SAN. The problem is that all the client machines are Mac, and obviously the Xraid is hooked up to a Mac server, so everything works together well.\nI am trying to replicate (as much as possible) a Mac fileserver using Linux and netatalk.\nSome notes:\nRight now I have the netatalk (AFP; v3.0) server running, and although I can connect to the system using LDAP authentication for ssh, I cannot when logging in to the computer using AFP. \nI have all the LDAP information configured both in /etc/ldap.conf and in the netatalk configuration. (LDAP is hosted by the Mac server)\nFurthermore, although the debugging information is not extremely helpful from the AFPD process, it does usually say \"bad username\" when a totally unknown username is presented, but when an LDAP username is used it does not give this message. This leads me to believe that it IS checking the directory and finding the user, but not allowing me to login to AFP using the LDAP users.\nAny thoughts on this?\nThanks,\nTom\n", "", "ldap afp netatalk"], "5974091": ["Geometric Series - Simple Question", "The geometric series formula I am using is for an algorithmic analysis problem:\n$$\\frac{a(1-a^n)}{1-a}.$$\nIf $a = -\\frac{5}{6}$, what is the solution in its most simplified form? \nEdit: \nMy answer is :\n\nThis is what I think the answer is - and I know this isn't difficult - but I haven't done maths in over 10 years and need someone to take me through this example so I can study it and learn from it. Please don't close.\n", " [-5/6.(1 - (-5/6)^n)] / [1 - (-5/6)]\n=> [-5/6.(1 + (5/6)^n)] / [1+(5/6)]\n=> -5/6.(1+(5/6)^n) * 6/11\n=> -5/11.(1+(5/6))^n)\n", "sequences-and-series arithmetic"], "5356706": ["How to set input/output variables in ColdFusion for the following?", "how do I make the input/output variables in proper coldfusion code?\nVariables\n INPUT:\n variables.s3_target_directory\n variables.file_name\n variables.file_location\n\n", " OUTPUT:\n variables.success\n variables.transactionid / success UUID\n variables.s3_location - link can be http or https\n", "variables coldfusion input amazon-s3 output"], "236921": ["Update plugin from personal API", "I'm developing a wordpress plugin at the moment which I do not want in the Wordpress plugin repository. However I still want to be able to push updates to my costumers from my own API repository.\nI've been reading quite a bit about this, and one thing that seems to be something about is the filter, however I can't find much info about this. I've tried this tutorial (http://konstruktors.com/blog/wordpress/2538-automatic-updates-for-plugins-and-themes-hosted-outside-wordpress-extend/) which I couldn't get working. I can tell from the comments that others can actually get this working with what must be almost the current version of WP (latest response Apr 22).\nI tried installing the plugin from the site and putting the API folder on a second domain, but the update notification I usually get when an update is available, didn't show anywhere at all.\nI'm not sure if it is actually possible to have custom plugins run the auto-update from other repositories so I would like to hear if anyone in here has any experience at all with this stuff? The solution in the tutorial seemed to be an easy solution - I wonder if it's somehow possible to do it in a more advanced way?\nAny help getting this auto-update from my own repository working would be much appreciated!\n(PS: I'm running WP version 3.1.3)\n", "pre_set_site_transient_update_plugins", "plugins plugin-development updates auto-update repository"], "5589118": ["Pass a command into mysql login", "I'm setting up aliases for a new development environment and I would really like to be able to pass the command to my mysql login.\nI looked at the manual, all I could really see was the flag, however that quits once it's done, so that did not work.\nIdeally it would be like this:\n\nHowever, as explained that doesn't work, any alternatives that you guys know of? Thanks!\n", "pager less -S", "mysql command-line command-line-arguments"], "5582283": ["Is a von Neumann algebra just a C*-algebra which is generated by its projections?", "von Neumann algebras have the nice property that they are generated by their projections (the elements satisfying $e = e^{\\ast} = e^2$) in the sense that they are the norm closure of the subspace generated by projections. This is a sensible property to require from the perspective of \"noncommutative measure theory\" where one thinks of von Neumann algebras as generalizations of algebras of the form $L^{\\infty}(X)$ ($X$ a $\\sigma$-finite measure space); here the projections are the indicator functions of measurable subsets of $X$ (modulo sets of measure zero) and the subspace generated by the projections are the simple functions.\nDoes this property characterize von Neumann algebras among $C^{\\ast}$-algebras? \n", "", "functional-analysis operator-algebras"], "442504": ["How do I use Qt and SDL together?", "I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL.\nMy first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run the simulation inside the editor. This means I also have to share the simulation code which uses SDL threads.\nSo, my question is this: Is there a way to have an the render OpenGL to a Qt window by using SDL?\nI have read on the web that it might be possible to supply SDL with a window handle in which to render. Anybody has experience dong that?\nAlso, the threaded part of the simulator might pose a problem since it uses SDL threads.\n", "", "c++ winapi qt sdl"], "3987367": ["Generate PDF Behind Authentication Wall", "I'm trying to generate a PDF using WKHTMLTOPDF that requires me to first log in. There's some on this on the internet already but I can't seem to get mine working. I'm in Terminal - nothing fancy.\nI've tried (among a whole lot of other stuff):\n\nusername and password are both the and the of the input fields on the form. I am getting the my.jar file to show up, but nothing is written to it.\nSpecific questions:\n\nShould I be specifying the login page and/or form action anywhere?\nthe --cookie-jar parameter has been mentioned in various places (both as being needed and otherwise). Should that be necessary, how does it work? I've created the my.jar file but how do I use it again? Referencing:\n\nhttp://code.google.com/p/wkhtmltopdf/issues/detail?id=356\n\nEDIT:\nSurely someone has done this successfully? A good way to showcase an example might if someone is willing to get it to work on some popular website that requires login credentials to eliminate a potential variable.\n", "/usr/bin/wkhtmltopdf --post username=myusername --post password=mypassword \"URL to Generate\" test.pdf\n\n/usr/bin/wkhtmltopdf --username myusername --password mypassword \"URL to Generate\" test.pdf\n\n/usr/bin/wkhtmltopdf --cookie-jar my.jar --post username=myusername --post password=mypassword \"URL to Generate Cookie For\"\n", "shell command-line wkhtmltopdf"], "3999741": ["Capping FPS rate on iPhone?", "How do I limit my FPS rate on my OpenGL app (I'm using CADisplayLink) so I can leave the CPU for other things?\n", "", "iphone opengl-es frame fps cap"], "1271042": ["twitter bootstrap won't work with less.js", "I have broken it down to it simplest form but still cannot find out why this is not working. All files resolve and the imports in bootstrap are loaded yet, the styles aren't loaded.\nbootstrap 1.4.0\nless 1.1.3\n\nI made a simple style.less which works fine! Am I missing something glaringly obvious ?\nUpdate:\nstyle.less as requested by Todd :\n\n", "<html>\n <head>\n <title>ahhhhhh...</title>\n\n <link rel=\"stylesheet/less\" href=\"/less/bootstrap/1.4.0/bootstrap.less\">\n <script src=\"/less/less-1.1.3.min.js\"></script>\n\n </head>\n <body>\n\n <h1>WTF!!!</h1>\n\n </body>\n</html>\n", "javascript css less twitter-bootstrap"], "1503403": ["Why Raven/AnonymousUserAccessMode value=\"Get\"?", "I am trying to understand what you can achieve by setting Raven/AnonymousUserAccessMode value = \"Get\". If the value is set to \"Get\" , which means anonymous user will only able to get data using HTTP Get. What if i have a web page which allows unregistered users to submit feedback on my website ? Does \"Get\" value restrict them to do that ? Should i change the value to \"All\" instead ???\nThe reason i asked is because I am unable to save a sample document when the value is \"Get\". My web application throws a \"The remote server returned an error: (403) Forbidden.\" error. In order to solve this error, i need to set the \"Raven/AnonymousUserAccessMode\" to \"All\". Is it safe to set the value to \"All\" ?\nThanks.\n", "", "ravendb"], "2727613": ["Backbone: trying to figure out the basic control flow, could someone tell me if this is sane?", "I'm building a simple Backbone application with a search form and some results. I'd like to:\n\nallow the user to change the value of an 'order by' select field, and update the URL and results appropriately\nensure that when the user arrives via a preset URL, the correct results are shown, and the selected form elements match the URL and results. \n\nI think I've figured out the right control flow to use, but I'd really like to have someone sanity-check it. Basically, I'm letting my Views update the URLs directly, and then the Router does the work of updating the Model. Other Views then listen to the Model. \nIt seems to work OK, but I have to construct the URL by hand in the View, and parse it again in the Router, which feels repetitive. So it would just be great to know if this is the right way to do things in Backbone, or if I can do things better.\nHere's the pseudocode:\n\nHere is the code:\n\n", " User changes value of select to \"price-asc\" \n | \n | \n v \n Form view hears change event, and \n updates the URL to #order-by-price-asc \n | \n | \n v \n Router looks at new route, <----- User loads page, with \n sets model value #order-by-price-asc route\n |\n |\n v \n Results view hears change \n to model value, loads in \n new results via Ajax\n", "javascript backbone.js javascriptmvc"], "4770421": ["How to draw polygons with Point2D in wxPython?", "I have input values of x, y, z coordinates in the following format:\n[-11.235865 5.866001 -4.604924]\n[-11.262565 5.414276 -4.842384]\n[-11.291885 5.418229 -4.849229]\n[-11.235865 5.866001 -4.604924]\nI want to draw polygons and succeeded with making a list of wx.point objects. But I need to plot floating point coordinates so I had to change it to point2D objects but DrawPolygon doesn't seem to understand floating points, which returns error message: TypeError: Expected a sequence of length-2 sequences or wxPoints.\nI can't find anywhere in the API that can draw shapes based on point2D coordinates, could anyone tell me a function name will do the job? \nThanks\n", "", "python wxpython"], "2792789": ["MFMailComposeViewController send and cancel buttons are not working if the view has custom UINavigationBar", "\nHi,\nAs in the above image, My viewcontroller class has a customnavigationbar, when I am trying to compose an email using MFMailComposeViewController, the navigationbar of MFMailComposeViewController view is getting covered by but my custom navigationbar. So I was unable to click on the \"Cancel\" and \"Send\" button's. \nI tried both \nself.navigationController.navigationBarHidden = YES & \n[[self navigationController] setNavigationBarHidden:YES animated:NO] \nbut the navigation bar just won't go away. Anyone have suggestions for this?\n", "", "iphone mfmailcomposeviewcontroll mfmailcomposer"], "2360325": ["Accidentally did a branch origin set up to track local branch", "I accidentally did: \n\nGit says:\n\nHow do I reset that and what could it do to me?\nThanks,\n", "git checkout mybranch\ngit branch --set-upstream origin mybranch \n", "git"], "5488047": ["TFS 2010 Multiple Solutions & Build with Gated Check-in", "I have two solutions in their corresponding folder e.g. \n\nSolutionA\\SolutionsA.sln\nSolutionB\\SolutionB.sln\n\nEach solution has Gated Check-in build configured; i.e. two build definitions GatedSolutionA and GatedSolutionB.\nNow the situation is, if I check in changes in both folders together TFS shows a dialog box to select build(drop down with GatedSolutionA, GatedSolutionB) to run against the changeset. My changeset has breaking changes in solution B and non-breaking changes in Solution A. i.e. Build GatedSolutionB would fail but GatedSolutionA would pass.\nWhen I select GatedSolutionA to build against my changeset, TFS checks it in, which in turn leaves the solution B in broken state and purpose of Gated check-in is defeated for Solution B.\nIf I change the trigger to CI for build definitions, TFS queues both builds. \nWhat I am looking for is same behaviour i.e. All the Gated builds are queued and if one of them fails, changeset should be rejected.\nNote: I don\u2019t want to create single build definition for both the solutions. Also, I know we can avoid this problem to happen by creating two separate changesets, but this is generally happening when developers are not aware that they have some files being checked in for solution other than they are working on .\nThanks in advance for the suggestions and answers!\n", "", "visual-studio-2010 build tfs2010 build-automation check-in"], "5815135": ["How to limit pan gesture area?", "I am having my onto which I am having another rectangle. By applying pan gesture to rectangle it gets outside of also. I don't want to be drag outside of \nI have tried below code but it is not working that way\n\nIf i apply Pan slowly it applies this condition but when i go fast it went outside of ImageView\n", "UIImageView", "iphone objective-c uiimageview uigesturerecognizer uipangesturerecognizer"], "3231924": ["Producing single-line comments with Haml", "I have a comment I'm trying to generate on a single line at the end of an HTML file\n\n\nI have tried \n\nBut this outputs it over 3 lines -\n\nI've tried \n\nBut that doesn't evaluate the @server_name var - \n\nAny ideas?\n", "<!-- generated by SERVER1 -->\n", "ruby-on-rails ruby haml"], "4374481": ["Why do I get a height and Width of 0?", "Why do I get a heigh and Width of 0 with the below:\n\nHere is my definition of GetWindowRect:\n\nThis is my definition for RECT:\n\nThanks all for any help.\n", " static void Main(string[] args)\n {\n Process notePad = new Process();\n notePad.StartInfo.FileName = \"notepad.exe\";\n notePad.Start();\n IntPtr handle = notePad.Handle;\n\n RECT windowRect = new RECT();\n GetWindowRect(handle, ref windowRect);\n int width = windowRect.Right - windowRect.Left;\n int height = windowRect.Bottom - windowRect.Top;\n\n Console.WriteLine(\"Height: \" + height + \", Width: \" + width);\n Console.ReadLine();\n }\n", "c# .net winapi"], "654564": ["Installing Oracle XE (older) AFTER installing APEX 10g?", "Awhile back I installed the Oracle 10g XE database on my dev machine. Since then, I installed Application Express over top of the XE installation. In other words, it's APEX running on 10g. I found I don't really need APEX after all (it's turned out I'm developing in ASP.NET and Oracle instead), and I recall having more of a GUI to manage the XE 10g instance BEFORE I installed APEX.\nCan I remove APEX while leaving my original XE installation? I tried to re-install the original XE, but I didn't see a way of doing this without installing a new HOME (which I'd rather not do; it confuses me). TIA.\n", "", "oracle oracle10g oracle-xe oracle-apex"], "92764": ["Why are there no Micro USB to Micro USB cables?", "Well, it's not like there are not. I found only 1 website selling micro usb to micro usb cables. But it seems they solder them themselves.\nSo why it is so difficult to get them?\n", "", "usb cable"], "1586061": ["Look for a tag in an HTML document", "I have a url of a web page with one tag which changes from time to time.\nI want to show the user the message inside the tag without opening a browser.\nWhat is the best way of doing that?\n", "", "iphone html objective-c xcode html-parsing"], "3524173": ["How can I update a mysql field when my user loses connection to my site?", "I want to update a mysql table field value to \"offline\" when the user loses connection or logged out from my website. Is it possible? if yes, then how?\n", "", "php javascript mysql session-state"], "5134078": ["How can I tell which MacBook Pro I have?", "\nPossible Duplicate:\nHow do I determine which MacBook hardware version I have? (for RAM purchase) \n\nOn my old IBM, I could just flip the laptop over and see what model & year my laptop was.\nHow can I get that info on my MBP?\n", "", "mac macbook macbook-pro"], "3127747": ["wix 64-bit DLL custom action support?", "I'm trying to build both 32-bit and 64-bit installers using WiX, and part of that requires a DLL that runs during the InstallUISequence to check a value typed in by the user. I used Visual Studio 2010 and the WiX plugin to generate a DLL template and filled it in. Everything works fine when I built the DLL for 32-bit. When I build it for 64-bit, there are complaints about missing symbols WcaFinalize and WcaGlobalFinalize.\nI've read in various discussions from 3-4 years ago that there first was no build of WiX to support 64-bit custom actions, then there was a special Wix35_x64.msi, then that was withdrawn, with the explanation that 32-bit WiX could build 64-bit installers.\nDoes WiX 3.5 (or 3.6?) support building 64-bit DLLs for inclusion in 64-bit installers? If so, where do I find the libraries that include WcaFinalize and WcaGlobalFinalize for 64-bit?\n", "", "wix 64bit windows-installer"], "2777861": ["3rd party RAM for Mac Book Pro", "My company will be bulk purchasing Apple hardware, specifically Mac Book Pros. We are looking into increasing the RAM from 4GB to 8GB, however, we have noticed that RAM purchased directly from Apple is exorbitantly expensive. For example, going from 4 to 8GB is an extra $1000.\nMy question: Is there trusted 3rd party RAM hardware that is proven to work reliably in Apple computers, specifically Mac Book Pros? And can you recommend a good vendor for that hardware? \nI am inclined to go with a 3rd party RAM, and have our system administrators do the upgrade rather than paying the high price directly from Apple. But I want to avoid reliability problems with 3rd party RAM which would be expensive (due to wasted time and effort) for our company to resolve, down the road.\n", "", "macosx mac memory apple macbook-pro"], "4800505": ["how do I set the proper initial locale for a C++ program on Windows?", "I'm fairly new to localized programming, and I'm trying to figure out how to set the proper initial locale for a newly-launched unmanaged C++ application (from within the app).\nAs far as I can tell, new applications start with the C locale, rather than the proper regional locale (English, German, etc). So what I need to do is call , but I'm not sure how to get the correct value for the second argument. It will be something like \"English\" or \"German:Germany\" - basically whatever locale was set by the user via the Regional and Language Options control panel. Just to be clear, I'm not looking for how to format the locale string, I'm looking for the correct locale string for the computer where the app is running.\nI'm guessing that there's some Win32 API that would give me this, or perhaps a registry key that would contain the proper value. Does anybody know what I should be doing?\n", "setlocale( LC_ALL, \"???\" )", "c++ windows localization locale"], "5080595": ["Using Cisco VLANs, is it possible to connect two separate WANs connections?", "I've got two separate WAN connections with DHCP on both of them; can I connect these to two different VLANs using Cisco gear (so VLAN 0 gets one WAN and VLAN 1 gets the other?)\nApologies I'm inexperienced with Cisco gear, but am in the position of having to purchase and deploy it.\n", "", "cisco vlan wan"], "4111445": ["Ruby on Rails: Mock session variable in helper class", "I am trying to mock the session hash in a controller's helper file:\nHelper_Spec:\n\nHelper:\n\nError:\n\nAm I stubbing it incorrectly? Or helpers do not have acces to the session hash?\n", "session.stub!(:[]).with(\"fb_token\")\n RotaHelper.getListOfFriends.should == expected_friends\n", "ruby-on-rails session rspec mocking"], "4848177": ["Forms in symfony", "I am a beginner with symfony, and I can not get my head around forms generation. In theory there even is a form framework, to have complete flexibility. But, as far as I understand, forms are rendered as tables in symfony. I am used to CakePHP where I can output input elements one at a time, and then wrap them as I wish: in tables, divs, whatever, or, more often than not, nothing, and just use CSS to position them correctly.\nI am a bit appalled at the fact that a framework with such high standards on code quality then outputs HTML tables where they are not needed. I guess I'm just missing something.\n\nIs there a way to output forms as forms, without extra HTML tags?\n\n", "", "php forms symfony1"], "60925": ["Android-Bluetooth File Transfer app", "I am writing a file transfer app . \nThe command socket.connect does not throw any exception.I am able to get the inputstream from the socket through getInputstream but I am not able to opearate on that stream.\nAny help?\n", "", "android bluetooth"], "3996699": ["full screen is not visible", "\ni have created an app which starts loading with the map view....but i dont know why the loading screen looks like the image below....\nthe control is going to this line also....\n mMapView.getController().animateTo(userLocation);\nand in logcat the userlocation is printed as.....\n09-13 18:26:01.350: DEBUG/userlocation(520): userlocation39750000,-104990000....\nthe images are not being visible on any of the tabs.......\nplease help to sort out the problem ........\n", "", "android google-maps"], "857680": ["Fill ViewFlipper in AsyncTask", "I am trying to load images into my FlipView using AsyncTask but Im not sure how to continue.\nI need to use AsyncTask because the application is force closing since I have 20 images to load from the drawables.\n\nIm stuck in adding the images to the FlipView. Any help?\n", "private class asyncImage extends AsyncTask<Void, Void, Void>{\n int i;\n @Override\n protected Void doInBackground(Void... params) {\n for (i=0;i<imageID.length;i++){\n image = new ImageView(getBaseContext());\n image.setId(i);\n image.setImageResource(imageID[i]);\n image.setBackgroundDrawable(getResources().getDrawable(R.drawable.border));\n image.setScaleType(ImageView.ScaleType.FIT_XY);\n FlipV.addView(image);\n }\n return null;\n }\n\n protected void onPostExecute(Void result){\n\n image.setBackgroundDrawable(getResources().getDrawable(R.drawable.border));\n image.setScaleType(ImageView.ScaleType.FIT_XY);\n for(int x=0;x<imageID.length;x++){\n FlipV.addView(???); //How to add images into FlipView?\n }\n }\n\n}\n", "android android-asynctask viewflipper"], "5562802": ["Flowplayer video overlay not working with flv file", "I'm using flowplayer to overlay video on my website. All was working until I tried to change the video source from an example video to my .flv file.\nThe overlay div player is loaded, but the video doesn't play. I use Google Chrome.\n\nAny suggestions?\n", "<script src=\"http://releases.flowplayer.org/js/flowplayer-3.2.11.min.js\"></script>\n<div id=\"video\" class=\"overlay\" style=\"background-image:url(/images/white.png)\">\n <a id=\"player\" href=\"http://www.zagaria.net/images/videozagaria.flv\"></a> \n</div> \n<script> \n $(function() { \n var player = $f(\"player\", \"http://releases.flowplayer.org/swf/flowplayer-3.2.11.swf\"); \n $(\"#video\").overlay({ \n effect: 'apple', \n onLoad: function() { player.load(); }, \n onClose: function() { player.unload(); }, \n load: true \n }); \n }); \n</script>\n", "video overlay flowplayer"], "2402795": ["OSX: Possible to export iTerm2 profile to Terminal.app?", "I'd like to use the same font/color arrangement in Terminal.app that I currently use in iTerm2.\nWhat is the easiest way to export font/color settings from iTerm2 and import them into Terminal.app?\n", "", "osx terminal colors export import"], "4510781": ["Action Script 3.0 Score Counter", "I have been trying to make a score counter for a small game where the user clicks on a button on the stage, each time the user presses the button the score increments by 10, however I cannot get the score to display on the dynamic text field. What am I doing wrong?\n\n", "var score:uint;\n//scoreCounter is the instance name of the dynamic text box\n\n function updateScore():void{\n score += 10;\n scoreCounter.text = score.toString();\n}\n", "actionscript-3 flash-cs5"], "4144381": ["apt-get install doesn't get the package", "I've installed ubuntu server on a VirtualBox virtual machine and now I'm trying to follow a tutorial that says I need to install a package called . When I type this line\n\nI get \"unable to locate package csh\". This happens with all 4 other packages I tried to install. I'm not sure what I'm doing wrong. Perhaps the VM can't reach the Internet. How do I check, or troubleshoot this?\n", "csh", "ubuntu virtualbox apt package"], "1853355": ["Django: cannot detect changes on many-to-many field with m2m_changed signal - auditing at model-level", "I'd like to keep track on what field has changed on any model (i.e. audit at model level since it's more atomic, not at admin/form-level like what django and django-reversion can already do). I'm able to do that for any field using pre/post save/delete signals. However, I have a problem of doing that on an m2m field.\nFor the code sample below, i define 'custom_groups' m2m field in user change form since it's a reverse relation. When user saves the form on admin interface for example, I'd like to log if there's a change in 'custom_groups' field.\nModel:\n\nModelForm:\n\nThe problem with using m2m_changed signal is that i can't check what has actually changed for the case where the m2m field is updated using assignment operator:\n\nThis is because internally django will perform a clear() on *custom_groups*, before manually adding all objects. This will execute pre/post-clear and then pre/post save on the m2m field.\nAm I doing all this the wrong way? Is there a simpler method that can actually work?\nThanks!\n", "from django.contrib.auth.models import User\n\nclass CustomGroup(models.Model):\n users = models.ManyToManyField(User, related_name='custom_groups')\n", "django-models m2m"], "1805206": ["How can I integrate PayPal for Dinar currency used in Kuwait?", "I want to integrate PayPal in magento. I have set base currency and default currency as Dinar. I have also set Dollar as allowed currency. But when I reach the checkout process there is no payment method options. But when I change all the currency as Dollar, PayPal method starts displaying on checkout process.\nWhat I want to know is that can I set Dinar in all options in currency setup options? \nOr I am doing anything wrong in this process? \nPlease suggest me some ideas regarding this. \n", "", "magento paypal"], "2729375": ["open a second dialog window from the already opened dialog window", "I open a dialog window in my application. After that I would like to open a second dialog from the existing dialog window. The second dialog opens inside the first dialog. The problem arise when the second dialog size is greater than the first one. In that case the second dialog does not appear in the full size but is limited to the size of the first window.\nWhat should I do to display the second dialog window in the whole size?\nBest regards,\nJavanus\n", "", "primefaces"], "4212935": ["png and swf files not displaying", "i have a website that displays .png images and .swf files. these files display correctly when the site is hosted on the development server but cannot be read on the production server. all the file paths are correct. any advice on how to resolve this issue is appreciated. \n", "", "image swf"], "4005794": ["HttpURLConection - JSON Response isn't Complete", "I am trying to send a request to the Grooveshark API using POST Payload and their requested methods, and I have found a problem. Allow me to show you my code first.\n\nI have got that code up here in my project, and I can successfully send requested to any API Webservice that uses JSON in their responses. Now there's only a problem: In Android, it does not give me the WHOLE answer. I've tried running the code on a separate Java (no Android) project, and I get the following output. Although, if I run it on Android, the Log shows me the following:\n{\"header\":{\"hostname\":\"RHL073\"},\"result\":{\"songs\":[{\"SongID\":5443351,\"SongName\":\"??????\\u00b7???? (FINAL FANTASY XII????)\",\"ArtistID\":713,\"ArtistName\":\"Final Fantasy\",\"AlbumID\":898007,\"AlbumName\":\"Final Fantasy XII Original Soundtrack\",\"CoverArtFilename\":\"\",\"Popularity\":1214500005,\"IsLowBitrateAvailable\":tr\nAnd it stops on that tr. Has it anything to do with the parsing of the file that I actually apply afterwards? I don't think it is, but just in case, here it is [This is how I call the search, JSONHandler being the object that contains the code provided above]:\n\nAs you can clearly see, I am using the json.org library. I really don't understand what's the problem here. Has anyone got any idea as to why?\n", "public void getResponse() throws Exception\n{\n if(service.equals(\"Grooveshark\")) link += getHmacMD5(privateGroovesharkKey, jsonInfo.toString());\n\n if(requestedMethod.equals(\"GET\")) infoURL = new URL(link+arguments);\n else infoURL = new URL(link);\n\n HttpURLConnection connection = (HttpURLConnection) infoURL.openConnection();\n connection.setRequestMethod(requestedMethod);\n connection.setRequestProperty(\"Accept-Charset\", \"UTF-8\");\n\nconnection.setDoOutput(true);\nconnection.setDoInput(true);\nconnection.setUseCaches(false);\n\nif(service.equals(\"Grooveshark\"))\n{\n connection.setRequestProperty(\"Content-Type\",\"application/json\");\n OutputStream output = connection.getOutputStream();\n output.write(jsonInfo.toString().getBytes());\n}\nelse if(requestedMethod.equals(\"POST\") || requestedMethod.equals(\"PUT\"))\n{\n OutputStream output = connection.getOutputStream();\n output.write(arguments.getBytes());\n}\n\n connection.connect();\n\n BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = rd.readLine()) != null) \n sb.append(line).append('\\n');\n\n setJsonResult(sb.toString());\n\n System.out.println(jsonResult);\n\n jsonFinal = new JSONObject(jsonResult);\n\n connection.disconnect();\n}\n", "java android json post payload"], "20583": ["How to inject dependencies into the global.asax.cs", "How do I inject dependencies into the global.asax.cs, i.e. the MvcApplication class?\nHaving previously used the Service Locator (anti-)pattern for dependency injection, I am trying to follow best practice advice in my latest MVC application by using an IOC container (specifically Unity.Mvc3 because it comes with an implementation of the IDependencyResolver out of the box) and constructor injection. \nEverything seems quite straight forward so far except for a couple of snags, one of which is in the global.asax.cs (the other is for custom attributes but there's aleady a question on SO covering that). \nThe HttpApplication event handlers in the MvcApplication class such as:\n\nmay require external dependencies, e.g. a dependency on an ILogService. So how do I inject them without resorting to the service locator (anti-)pattern of e.g.\n\nAny help/advice greatly appreciated!\n", "Application_Start()\nApplication_EndRequest(object sender, EventArgs e)\nApplication_AcquireRequestState(object sender, EventArgs e)\n", "asp.net-mvc-3 dependency-injection unity"], "664341": ["Entity Framework 4 changes my table names when I do \"Generate Database from model\"", "I'm doing some simple things with EF4 and inheritance before I start the real work. I have tried it many ways and I can't fix this.\nI have two tables:\n\nreporting_Items (ItemId,etc)\nreporting_DataItems (ItemId,etc)\n\nI need to keep the prefixes in the database tables because of coding convention. \nThen I want to have the maped entities with the names Item and DataItem, and DataItem inherits from Items.\nI did Database First and created the tables, but I removed the ItemId key from reporting_DataItems.\nThen I generated the model from the database. It created the entities:\n\nreporting_Item\nreporting_DataItems\n\nwhich I renamed to Item and DataItem respectively. Then I created the inheritance relation between DataItem and Item.\nSo up to this point I have the entities named like I want and the tables named like I want, plus the inheritance.\nThe problem is that if now I run Generate Database from Model it deletes all the tables and creates them with this names:\n\nItems\nItems_DataItem\n\nIs there any way to acchieve what I want to do? Thanks in advance\n", "", "entity-framework-4"], "5172339": ["View with geospatial and non geospatial keys with CouchDB", "I'm using CouchDB and GeoCouch and I'm trying to understand if it were possible to build a geospatial index and \"query\" the database both by using a location and a value from another field. \nData\n\nQuestions\nIs there any way to perform the following queries on these documents:\n\nFind all documents with near location [15.12, 30.22] (more important)\nList all the different professions near this location [15.12, 30.22] (a plus)\n\nIn case that's not possible, what options do I have? I'm already considering switching to MongoDB, but I'd rather solve in a different way. \nNotes\n\nData changes quickly, new documents might be added and many might be removed\n\nReferences\nFaceted search with geo-index using CouchDB\n", "{\n \"_id\": \"1\",\n \"profession\": \"medic\",\n \"location\": [15.12, 30.22]\n}\n\n{\n \"_id\": \"2\",\n \"profession\": \"secretary\",\n \"location\": [15.12, 30.22]\n}\n\n{\n \"_id\": \"3\",\n \"profession\": \"clown\",\n \"location\": [27.12, 2.2]\n}\n", "couchdb spatial-query"], "5947974": ["Dojo build(ed) doesnt work on Android 2.2 browser", "I was testing modules for a webapp using dojo 1.8. And it uses many modules. Everything works like a charm but slowly when I use the version not builded. When I do the same thing with the version I builded using http://build.dojotoolkit.org/ I get an error:\n\nThis problem occurs only on Android 2.2 Browser version. Well, I just tested on it and the version 4.0 and on my iPhone. On desktop browser there is no problem.\nAlso I see that if I take out those lines:\n\nit doesnt show that error again...\nI could use this without the build version but I want to wrap in Phonegap and it doesnt work if I dont do this.\nYou can find the app test working in http://blog.arthurmolina.com/dojotest/ \nSo, what to do?\n", "01-27 17:12:49.744: E/browser(10771): Console: Error: scriptError \nhttp://blog.arthurmolina.com/dojotest/lib/dojo.js:15\n", "phonegap dojo"], "3652608": ["generate circle for each line of CSV D3.js", "I'm trying to read in a CSV and generate a circle for each line using d3.js.\n[I'd prefer not to use a callback function but that's a different question.]\nI'm able to create a table for each line of data following: http://christopheviau.com/d3_tutorial/\nbut I can't seem to generate a circle for each line:\n\n", "d3.text(\"test.csv\", function(datasetText) {\n\nvar parsedCSV = d3.csv.parseRows(datasetText);\n\nvar sampleSVG2 = d3.select(\"#viz\")\n .append(\"svg\")\n .attr(\"width\", 100)\n .attr(\"height\", 100);\n\nsampleSVG2.selectall(\"circle\")\n .data(parsedCSV)\n .enter().append(\"circle\")\n .style(\"stroke\", \"gray\")\n .style(\"fill\", \"blue\")\n", "d3.js circle labels"], "1682742": ["What is the best task scheduling approach in Plone 4?", "We need to schedule some tasks in Plone 4 (notify users after n days of inactivity, etc.). What is the best way to do it? Is there something in Plone or maybe an old cron job? I would like to avoid cron4plone. \n", "", "cron scheduled-tasks plone"], "680166": ["Using data.table package inside my own package", "I am trying to use the data.table package inside my own package. MWE is as follows:\nI create a function, test.fun, that simply creates a small data.table object, and then sums the \"Val\" column grouping by the \"A\" column. The code is\n\nWhen I create this function in a regular R session, and then run the function, it works as expected.\n\nWhen I put this function into a package, install the package, load the package, and then run the function, I get an error message.\n\nCan anybody explain to me why this is happening and what I can do to fix it. Any help is very much appreciated.\n", "test.fun<-function ()\n{\n library(data.table)\n testdata<-data.table(A=rep(seq(1,5), 5), Val=rnorm(25))\n setkey(testdata, A)\n res<-testdata[,{list(Ct=length(Val),Total=sum(Val),Avg=mean(Val))},\"A\"]\n return(res)\n}\n", "r data.table"], "4412344": ["SQL sum rows in union", "I'm trying to SUM two rows obtained from differente SQL queries in UNION, is this possible?\nAll I can achieve is the two separate rows but I can't SUM them, DB engine keeps me telling that there's an error in the syntax near the *) FROM (the part next to the SUM)...\nHere's the query:\n\nThis throws me for example:\n\nAdding a SELECT SUM(*) FROM instead of the SELECT * FROM in the first line, and surrounding the two queries with parentheses just throws me the mentioned error...\nI would like\n\nAny ideas how this sum should work?\n", "SELECT * FROM\n\n(SELECT COUNT(*) as cntclients \n FROM \n (SELECT DISTINCT clientkey AS clients \n FROM <table>\n WHERE <conditions...>) \n ) AS clients \n) cntclients\n\nUNION\n\n(SELECT SUM(occurrences) AS cntclientsad \n FROM <table2>\n WHERE <conditions...> \n)\n", "mysql sql sum union"], "5392624": ["PhoneGap & Sencha Touch 2 loading screen", "Im building a sencha touch 2 phonegap based app and my app pulls JSON data from a remote server. Currently the phonegap native load screen appears until the device is ready, and then the sencha touch 2 load screen appears until sencha touch 2 is ready.\nI'd like the native phonegap screen to appear until everything is loaded, including sencha touch 2. \nI've googled around for a solution, but can't find anything. Is there a method available to tell phonegap to wait for sencha touch 2 before hiding the load screen?\nThanks.\n", "", "phonegap sencha-touch-2"], "2319872": ["Files with the same name in a TextMate project", "One of the few things that bothers me about TextMate is that it can be difficult to differentiate between files that share the same name in a project, e.g:\n\nIn this case, the file on the right is located in the project relative path model/realtimemodel.py, while the other file contains unit tests for that code. Sure, you can command-click the name in the title bar to see a directory list, but it feels sub-optimal. What I would like is something along the lines of:\n\nThis gives a quick at-a-glance idea of what file you're working on. Has anyone seen any plugin or bundle that makes this possible?\nEdit: Here is a ticket in Macromates tracker that requests this feature (although I would prefer a project-relative path).\n", "", "osx textmate"], "96163": ["Missing Xutf8LookupString call in Solaris 10", "I'm trying to run a program in Solaris 10 that fails due to the lack of Xutf8LookupString function.\nIt is a well-known issue but I'd like to know a way to \"skip it\".\nWould defining a different non-utf8 LC_CTYPE help?\nWould installing a different X server help? The problem doesn't happen on OpenSolaris? Is there a way I can \"update\" my Solaris system to use the same X libs as an OpenSolaris one?\nThanks!\n", "", "solaris x11 utf-8"], "5663354": ["javascript firing custom event for chrome", "can you give me an example for chrome where i have something like this: \n\nSo i would want to fire this event here. Also, is it really necessary to fire this event, since i alredy can put a relevant method call here to do what i want accordingly??\nIs it in JS the events are only like onChange, onMouseOver etc??\n", "function checkVideoStatus(vidElement){\n var currentTime = vidElement.currentTime;\n //now wait 5 seconds\n var updatedTime = vidElement.currentTime;\n //now check if video has freezed\n if(updatedTime == currentTime){\n //fire videoFreeze Event\n }\n\n}\n", "javascript javascript-events"], "3922823": ["How can I get monitors numbers from Screen Resolution dialog in win7 programmatically?", "When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that?\n\nEnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7.\nI tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \\.\\Display2) with no success. Another guy did that too two years ago and claimed that getMonitorInfo has a bug. This bug was marked as fixed by Microsoft without any comments but it still can be reproduced on a win7 machine having latest updates. (Btw, can anybody tell me - maybe this bug is absent on win8 ?)\nI tried QueryDisplayConfig from new CCD API but didn't find needed info.\n\nDoes anybody know the way?\n", "", "windows winapi windows-7 windows-shell multiple-monitors"], "2141369": ["How to setup phpMyAdmin with Nginx?", "I created an entry in virtuals.conf for phpMyAdmin and restarted Nginx, but I can not get it to actually server phpMyAdmin. PHP is installed and configured with Nginx for fast-cgi, the virtuals.conf entry syntax checks out fine, and the mysql server is running.\nAlso FWIW, centos is the hostname of my CentOS VM I'm running.\nHere is what my entry looks like: \n\n", " server {\n listen 80;\n server_name mysql.centos;\n\n location / {\n root /usr/share/phpMyAdmin;\n index index.php;\n }\n\n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$fastcgi_script_name;\n include fastcgi_params;\n }\n}\n", "mysql nginx phpmyadmin centos"], "4472351": ["Arduino - non-blocking pulsing", "I am using an Arduino to control a couple of Victor 884's.\nAfter some research, I found out you need to send it some pulses of different durations to make it go (I have no clue what the right terminology here is).\nTo control it, you do the following.\n\nSo to make the motor stop, I could use some code like this.\n\nThe problem is, this code is blocking so I can't do anything without messing of the time.\nThe solution is to get rid of the delay statement.\nI was able to make a non-blocking version based on the BlinkWithoutDelay example.\nThe problem arises when I try control 3-4 Victors. I tried the copy, paste, rename-with-some-numbers-tacked-on method, but the code quickly gets messy.\nSo my question is, how should I do this? Should I write some classes to handle it for me (a pain since I have no clue how to write a class in C++) or should I look into using the Arduino's timers to achieve my goal.\n", "Stop = 1.5 ms on and 0.5 ms off.\nForward Full Power = 2 ms on and 0 ms off\nBackward Full Power = 1 ms on and 1 ms off\n", "arduino"], "309141": ["Outbound mail filtering against custom black list", "Does anybody have any recommendations on how to filter outgoing email against a custom black list? For example, I have a list of around 400,000 email addresses that I do not want to send email to. Currently the email administrator says he is using a Sieve script to filter the outbound email but using it to filter is too slow. We are running Linux and most likely Postfix and also a commercial MTA which was called Ecelerity but is now part of Symantec Message Labs.\nIs there a tool that is better/faster than Sieve for filtering outbound email?\n", "", "email filtering"], "1743956": ["Width of labels in the bibliography", "I'm using scientific workplace 5.5 and if write the bibliography still seems to use 99 instead of . Is there a way of getting aroung this issue?\n", "\\begin{thebibliography}{LongestLabel}", "bibliographies"], "2793024": ["Building a data analysis report with Oracle and Report Studio", "I have used information on this site for awhile, and now have a large project that I need some of your expertise on. I work within an Oracle 11g environment and also have Cognos Report Studio 10.1\nI am building a multitab report that displays an analysis of a department's outbound orders. I have created a custom table that holds approximately 30 columns of data. From here, there are over 150 calculations that must be performed on the table daily. An example of these calculations are \n1) How many orders received today? \n2) Of the orders received today, how many shipped same day? \n3) How many orders are on hold? \nBasically 100s of 4-5 line queries on the core table. I have thought about creating a second table and with the use of WITH clauses, performing the calculations in a procedure and inserting into the table. \nTo get to the question, has anyone written a procedure/package that performed a large amount of calculations and is there any links/webpages that can be suggested? My searches have not led me to any examples of a report of this nature being created and am wanting to make sure that my approach is as efficient as possible. Thanks in advance for any information/resources.\n", "", "oracle11g cognos"], "3059470": ["How to automatically save sessions with multiple windows in Firefox", "I've used primarily Firefox's built-in session management until recently. Now my needs have become more sophisticated. What I want is to be able to have two windows, one with a fixed set of tabs (approximately five) and the other with \"automatic save\". \nThat is, when I start Firefox, I want one window to open with my five tabs, and another to open with whatever I had when I shut down Firefox. I've installed \"Session Manager\", but I can't seem to get it to do what I want. It will save one window, but when I close one window, it removes that one from the session.\nHow do I do this with either Session Manager or another plugin?\n", "", "firefox browser-addons"], "5572027": ["Software to get measures of a persons body?", "I've found several products for face recognition, iris and many others, but not for body like arms length, distance between elbows, etc. I don\u00b4t like Kinect so an alternative would be appreciated.\n", "", "sdk biometrics"], "2231056": ["Flip two rows of a datatable", "I Have a datatable in .net. I need to flip the location of two of them. For example, a datatable that the select statement had an order by priority clause. The user wants to up the priority of a single row by selecting it and clicking increase priority, how do i move a row up (AKA flip two rows)\nThanks in advance\n", "", ".net vb.net datatable"], "5115170": ["How do I detect a file is being dragged rather than a draggable element on my page?", "I'm using the html5 events to enable both file and element drag-and-drop. I've attached the dragover event to the body and am using event delegations to show where a draggable can be dropped. My question is how can I tell if a file is being dragged vs. an element with draggable=true. I know I can detect the element being dragged via e.target. But, how can I tell if it is a file.\njquery is available.\nAlso, not talking about jquery-ui draggable here.\nI'm starting to think maybe the only way to detect the file will be by exclusion and detecting the elements instead. If we're not dragging an element, assume it's a file. This will require extra work though as images and links are draggable by default, so I will have to add events to them or prevent them from dragging.\n", "", "javascript html5 drag-and-drop"], "70560": ["ListView item specific animation", "I would like to animate three items in a Listview such that the three items start off ordered as a stack where first item is on top, second one in middle and third at the bottom.The top then moves up from the top, the middle one stays and then the third slides down from behind the second. I have managed the animation but yet to figure out the z-ordering. I am applying the animations for these three items individually in the adapter, however because there is no sense of grouping between these items, the z-ordering is not maintained. Is it possible to control which child within the listview gets drawn first?\n", "", "android android-listview android-animation"], "3044964": ["Android ActionBar Customize Search View", "--- SOLVED THE PROBLEMS - ADDED THE ANSWERS IN EDIT TEXT ---\nI'm using the ActionBar Sherlock in my Android App. There I want to show a searchView.\nIt works fine so far but I realize, I'm doing something wrong when trying to customize it.\nI create it this way:\n\nI want to do two things:\n\nChange the color of the text \"Search\" which is shown in the appearing text field. It looks like I changed it with the overall text style in my theme but I hope I can set a separate color somehow. \nWhen opening this search View, it appears on the left side of the Action Bar. But I need it on the right side. The icon (the magnifier) actually is on the right side of the bar but pressing it opens the EditTextfield on the left side. I tried to use LayoutParams but I'm missing something essential when trying to add it to the Action Bar by using LayoutParams.\n\n\nSo hopefully someone might help me with that.\nThank you very much,\n Tobias\n---- EDIT ----\nOkay, so one thing is solved with this already. Adding the ActionBar by XML makes the TextEdit to the right. \n\nAnd in my menu.xml\n\nSo at least one mystery solved (why ever this made a difference). But the newly created XML Doesn't close anymore when calling \n\nSo there is still something wrong with it.\n--- EDIT 2 ---\nJust to let you know. I found the solution for the text color. It can be achieved by using the AutoCompleteTextView of the SearchView:\n\nSo the last problem I have is that the SearchView is not closing any longer when submitting a text. So collapseActionView() etc. doesn't work. Any ideas?\n--- EDIT 3 ---\nOkay, I found a solution. I don't know if this is the correct way to do that but when using\n\nit closes the EditText\nI have to do it twice because the first time is only \"deleting\" my input text and shows the \"hint\" whereas the second use is \"closing\" the Hint EditText and collapses the searchView to the magnifier.\nClumsy style but it works. :-)\n", "searchView.setQueryHint(\"Search: \");\nsearchView.setOnQueryTextListener(this);\nsearchView.setOnCloseListener(...);\n\nsearchMenuItem = menu.add(\"Search place\");\nsearchMenuItem.setIcon(R.drawable.ic_action_search)\n .setActionView(searchView)\n .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);\n", "android customization actionbarsherlock searchview"], "2936142": ["How to delete SQL rows based on source file last modified date, using SSIS package?", "I have created a functioning SSIS package which pulls rows from a flat file into a SQL table. I just need to be able to delete old rows in the table, once they are older than 10 days. \nThe only thing is, there is no date column and I'm wondering if there is a way to do this, using the property from the source file? I'm not sure if this can be done via a script task or something else? \nYour advice would be appreciated. :-)\n\nSo I've tried to include the date of the source file by creating a FileDate variable, along with FilePath and SourceFolder variables. I've utilized the FileDate variable by adding a derived column, Date_Imported w/the expression, @[User::FileDate]. The FilePath variable is assigned the location, \"d:\\inputfiles*.txt\", as indicated in the below code. The SourceFolder has been given the value, \"D:\\InputFiles\\\".\n However, I'm receiving an \"Exception has been thrown by the target of an invocation. \n\nSystem.MissingMemberException: Public member 'GetFiles' on type 'FileSystemObject' not found.\"\n\nThe following is the content of my script task to delete records older than 10 days; please disregard any commented out lines, as I've been trying different things...I appreciate any guidance you can give:\n\n", "DateLastModified", "sql-server ssis script task"], "1113101": ["how find notepad++ tutor?", "Does anyone have any suggestions how to find a tutor to help me improve my notepad++ skills? I'm thinking, telephone and something like Elluminate. I use notepad++ for html, css and php. I would like to learn how to install a patch so I can incorporate find/replace in macros, and would like to get better at using webedit and some other plugins, in general learn how to work more efficiently.\nThanks.\n", "", "tutorials text-editor notepad++"], "3047064": ["Defining an element in Selenium 2 and it's not being clicked on", "I've got the folling HTML on a page I'm trying to test:\n\nI'm trying to click on each icon to verify it takes me to the login page.\nI've tried the following code but it seems to just ignore it and it stays on the page.\n\nAny ideas as to why the click() doesn't click?\n", "<div class=\"iconlist\">\n <p>\n <a href=\"/login\"><img src=\"http://blahblahblah/icon-facebook.png\" alt=\"\"\n width=\"26\"\n height=\"26\"/></a>\n <a href=\"/login\"><img src=\"http://blahblahblah/icon-twitter.png\" alt=\"\"\n width=\"26\"\n height=\"26\"/></a>\n <a href=\"/login\"><img src=\"http://blahblahblah/icon-yahoo.png\" alt=\"\"\n width=\"26\"\n height=\"26\"/></a>\n <a href=\"/login\"><img src=\"http://blahblahblah/icon-gmail.png\" alt=\"\"\n width=\"26\"\n height=\"26\"/></a>\n </p>\n </div>\n", "java webdriver selenium2"], "1486760": ["localhost Won't Immediately Update", "I have been using XAMPP to connect to localhost to do editing on my computer for websites. I have been using it for over a year now and in the past whenever I would update the local file, I could refresh the page on my browser and it would immediately update. Now, I can't get it to update even if, for example, an image file has changed.\nI'm wondering if it's an issue with cookies (which I haven't had in the past). Is there a common reason that this happens? I couldn't find anything upon a search. Thanks for the help!\n", "", "html xampp localhost"], "4485641": ["How to detect when user uses browser scrollbars to navigate on a long HTML page?", "How to detect when user uses browser scrollbars to navigate on a long HTML page? I would like to attach a function to the corresponding event with JQuery (if possible). Thanks.\nP.S.: I am not referring to JQuery's UI-slider.\n", "", "javascript browser javascript-events browser-scrollbars"], "3091349": ["Java Swing - Flashing icon not showing up", "I am trying to flash the icon to the user using a GlassPane. I am running a which basically performs this:\n\nUnfortunatly, if I sleep the EDT (current thread within the timer), the icon does not show, as in the method did not manage to get invoked fully before the thread went to sleep. Therefore, when the next instruction kicks in, the glass pane is hidden, and, as a result, the icon is never shown. Is there a way to achieve what I want using this (similiar) approach?\n", "javax.swing.Timer", "java swing timer icons glasspane"], "918486": ["TFS Build 2008 - Why is everything getting dumped in one folder?", "When I build my solution, it dumps all the binaries into one folder. How can I cause it to split up the files by project like Visual Studio does?\n", "", "tfs tfs2008 tfsbuild"], "4955661": ["How to get free ssl to my facebook?", "How to get free ssl to my application on facebook?\nhttp://facebook.bescik.kei.pl\nThanks\n", "", "facebook ssl ssl-certificate"], "1391266": ["creating sql diagram", "I installed SQL Server 2005, and I want to create a database but I can't. When I right click on the Database Diagrams folder for my database in SQL Server Management Studio 2005, I don't see any choice for creating database diagram. I see two things:\n\nWorking With sql server 2000 Diagrams\nRefresh\n\n", "", "sql sql-server sql-server-2005 ssms erd"], "309560": ["SubSonic 2.2 Class Generation", "I am using SubSonic on a project with many tables which were created by a sourcecode generator. I noticed Some classes created by SubSonic were generated without code and have the folowing message\n\nIs there any way for me to get the code to be generated without adding keyes to all the tables?\nThanks\n", "The class...was not generated because ... does not have a primary key.\n", "c# subsonic subsonic2.2"], "5164831": ["gesture issue with mapview in viewpager page", "My app's main interface is a viewpager where the user just slides the pages horizontally to get to the various pages. One of the pages has a google mapview (pasted below). My problem is that if the user is on the map page and uses a horizontal slide gesture, the page slides to the next page instead of the map moving sideways. It's as if the viewpager is getting the gesture before the map.\nIf the user is clever and begins sliding the map in a diagonal or vertical direction the map begins moving and then the gesture can continue horizontally. But I would prefer the map move instead of the page on a simple horizontal slide gesture. The page can always be slid using the textview.\nIs there any way I can make this happen?\nthanks,\nGary\n\n", "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\nandroid:id=\"@+id/ContentPanel\"\nandroid:layout_width=\"fill_parent\"\nandroid:layout_height=\"fill_parent\"\nandroid:orientation=\"vertical\" >\n\n <TextView\n android:id=\"@+id/tvMAP\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n android:text=\"Map\"\n style=\"@style/bigtype\" />\n\n\n<com.google.android.maps.MapView\n android:id=\"@+id/mapview\"\n android:layout_width=\"fill_parent\"\n android:layout_height=\"fill_parent\"\n android:apiKey=\"mykeygoeshere\"\n android:clickable=\"true\" />\n\n</LinearLayout>\n", "android google-maps android-viewpager"], "4991797": ["How to search for text in a PuTTY console window", "Is there a easy way for me to:\n\nsearch for a string in the output window of the putty ?\nor even a Linux command to search and highlight a string in the output ?\n\nI have 20,000+ lines in the output and sometimes I have to search for and currently I have to copy them to word or notepad and then search.\nIs there a better way to do this ?\n", "customer_id : 1111", "linux putty console"], "4982166": ["How to identify my good pictures?", "I am a learner. Taking out the camera and taking photos has been easier than choosing the good ones after coming back home. \nI usually go out and take pictures and when I come back I find it difficult to sort out the good and the bad once. How does one do it?\n", "", "workflow learning photo-critique"], "3071556": ["Jquery Delay Event", "\nI need to delay the removeClass on mouseleave. Can I simple add a this.delay line?\n", "$('#cart > .heading a').bind('mouseenter', function() {\n $('#cart').addClass('active');\n\n\n $.ajax({\n url: 'index.php?route=checkout/cart/update',\n dataType: 'json',\n success: function(json) {\n if (json['output']) {\n $('#cart .content').html(json['output']);\n }\n }\n }); \n\n $('#cart').bind('mouseleave', function() {\n $(this).removeClass('active');\n });\n});\n", "jquery delay"], "2436396": ["Can I create a new object based on its type?", "Given an object of type clsPerson:\n\nis there a way to interrogate variable and a create a new object of that type?\n", "dim oP as New clsPerson\noP.FirstName = \"Sam\"\n", "vb6"], "2457132": ["PHP/MYSQL: Only able to insert values into first row", "I'm wondering if this necessarily calls for an array and/or loop, and what solutions might solve this issue.\nAs a learning exercise, I'm trying to insert two of five variable into two successive rows in MY SQL. \nI set up a simple table with one column in SQL called test. My first \"INSERT INTO table VALUES ( '$Word1' )\"; statement successfully inserts the value into the first row. Similar/almost identical subsequent code with $Word2 does not add the value to SQL. I'm imagining I have to somehow advance to the next row, but I'm completely lost as to how to accomplish this. I scoured the forums, my PHP book, and w3Schools in vain. \n\n", "/*retrieve user input from separate HTML input form */\n/* and initializes variables */ \n$Word1 = $_POST[\"Word1\"];\n$Word2 = $_POST[\"Word2\"];\n$Word3 = $_POST[\"Word3\"];\n$Word4 = $_POST[\"Word4\"];\n$Word5 = $_POST[\"Word5\"];\n\n//select db\nmysql_select_db(\"madlibs\", $con); \n\n//insert user input for word 1 into SQL\n$sql = \"INSERT INTO test (MadWords)\nVALUES\n('$Word1')\";\nif (!mysql_query($sql,$con))\n{\n die('Error: ' . mysql_error());\n}\n\n//word 2 \n/* ***THIS CODE AND MANY VARIATIONS OF IT FAIL TO ENTER $WORD2 INTO SQL*/\n\"INSERT INTO test (MadWords)\nVALUES\n('$Word2')\";\n\nif (!mysql_query($sql2,$con)) \n /*I've cut this if statement in other debugging runs with the same result*/\n{\n die('Error: ' . mysql_error());\n} \n\necho \"1 record added\";\n", "php mysql insert row"], "4203776": ["Copy publishing page between site collections and keep data", "Does anyone know if you can copy a publishing page (programmatically), based on a custom layout and content type, from one site to another in different site collections and keeping all the data in the fields or webparts. Basicly to create a feature receiver that has code to copy the instance of page P from site A in site collection SCA to Site B in site collection SCB.\nThe big picture here is to create a page inside a variation and place a flag in the edit mode panel of that page. When the flag is set to true and the page is approved, it should be pushed to all variations as a draft (workflow) in another region. \nexample:\n\nSite Collection SCA: North America Region with variations en-US en-CA with en-US as root\nSite Collection SCB: Europe Region with variations en-UK es-ES with en-UK as root\n\nI create page P on en-US (root of North America Region) on publish it is pushed to all variations inside that region. If the flag is set to true, then the page is pushed as a draft to the root of the Europe Region (en-UK).\n", "", "2007 publishing-site publishing-page variations copy-and-paste"], "105058": ["Searching for Public and Private documents with roles in Lucene", "I am currently trying to build a search in Lucene (from Umbraco) which searches for public documents and protected documents which can be seen by the user's role only. The issue I am having is that Lucene returns all public items and all protected items, but not by role.\nMy raw Lucene search is:\n\nDoes anyone have any ideas?\nThanks in advance.\n", "+nodeTypeAlias:pdfdocument +isProtected:false (+rolesAllowed:\"userrole\" +isProtected:true)\n", "lucene umbraco lucene.net"], "40241": ["Problems running snort's web frontend", "I can't find a good snort web frontend that works properly. I tried base i got so many errors while trying to get it to work:\n\n\nWarning: include_once(Mail.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/apache2/htdocs/base-1.4.4/includes/base_action.inc.php on line 29\n\nWarning: include_once() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache2/htdocs/base-1.4.4/includes/base_action.inc.php on line 29\n\nWarning: include_once(Mail/mime.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/apache2/htdocs/base-1.4.4/includes/base_action.inc.php on line 30\n\nWarning: include_once() [function.include]: Failed opening 'Mail/mime.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache2/htdocs/base-1.4.4/includes/base_action.inc.php on line 30\n\nWarning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/base-1.4.4/includes/base_action.inc.php:29) in /usr/local/apache2/htdocs/base-1.4.4/base_common.php on line 1077\n\ni installed that and plus Mail_Mime and i got it to work, now i'm having problem snort do actual logging into database, i uncommented these: \n\noutput database: log, mysql, user=XXXXXX password=XXXXXX dbname=XXXXXX host=XXXXXX\nruletype redalert { type alert output alert_syslog: LOG_AUTH LOG_ALERT output database: log, mysql, user=XXXXXX dbname=XXXXXX host=XXXXXX password=XXXXXX }\n\nand it still won't log anything in:(\n", "", "php web snort"], "57430": ["Parallel Period Slow (Cell by cell evaluation)", "I have a calculated member that is currently doing the equivalent of a distinct count measure group.\n\nThis works fine until I pull on my prior year calculation dimension. The query goes from taking seconds to minutes.\nIn profiler I see a bunch of calculate non empty current entries.\nHere is a snippet of my prior year date calculation\n\nI tried changing\n\nto\n\nbut that didn't seem to have any effect. Any ideas as to how to fix this?\n", "Create member currentcube.measures.skucountcalc\nas\ncount(nonempty([Distinct Store Item].[DistinctStoreItems].[Store Item Dimension ID].members,measures.units)),\nformat_string = \"#,#\",\nvisible = 1, ASSOCIATED_MEASURE_GROUP = 'Line Item'; \n", "ssas mdx"], "294422": ["How to validate my own capcha control?", "I try to create my own capcha (ctrlCapcha :UserControl) and I would like to use validator, which will display capcha error on ValidationSummary control.\nAt first I tried to create validator by inherit by BaseValidator class, but I can not pin it to my aspx file (<%@ Register %> doesn't work)\nAt second I tried to use CustomValidator, but when I fix ID of my capcha control asp.net give me error \"Control 'ctrlCapcha' referenced by the ControlToValidate property of 'cusValCapcha' cannot be validated.\" (I service event \"OnServerValidate\")\nCould you tell me which way is better? Thank for you all suggestions :)\n", "", "asp.net validation captcha"], "2442673": ["Best online photoeditor & Best iphone wireframe Creator", "Is there any Best online photo editor & Best iphone wireframe Creator?\niphone wireframe creator that is useful to draw preview of any iphone application.\n", "", "iphone photo"], "4757924": ["Java Report with charts made by JFreeChart", "There is a Java library for creating report (PDF files) using the chart made by JFreeReport? Someone talk me about JFreeReport but I can't find any infos about it. Maybe the JFreeReport project is deprecated?\n", "", "java pdf report jfreechart jfreereport"], "53453": ["Replace default Wordpress search behavior with Sphinx", "I want to implement Sphinx Search in my Wordpress site but I'm not exactly sure how to change Wordpress search behavior to use Sphinx. \nHow do I get Sphinx Search engine to replace whatever Wordpress uses as default? I also want to display search results in a div with animations and search options on a static front page with only the site logo above it. If I use Sphinx, is there a way to use a Wordpress loop to return the search results with function? \nThanks for your help!\n", "query_posts", "wordpress sphinx wordpress-loop"], "3483455": ["jQuery.data() is not working in IE10. Any other way to implement?", "I have a text area, and on any change I need to change other label with the new value and some other value I'm getting from the server at page load.\nI'm creating a calculation object and attaching it to the textarea by using the jQuery data method.\nWhen the value changed in the textarea I retrieve the calc object, load it with the new value and update accordingly.\nEverything works great on all browsers except from IE10.\nIn IE10 there is an error when the browser loads the JS: and then when trying to retrieve the objects, it fails. \nI read in the jQuiery file itself that it is related to the problem of IE with get/setAttribute.\nI also found this documented bug.\nIs there other way to attach storage to a DOM element?\nWhat are my options here?\n\nEdit: I'm adding some of my code:\nAttaching the object to the element:\n\nRetrieving:\n\n\nI'm adding more info:\nI'm getting the same error as this guy. \n\n**\nMore info:\n**\nI created a workaround:\n--from jquery.1.7.1.js, line 2700:\n\n", "SCRIPT3: Member not found", "jquery cross-browser internet-explorer-10"], "5009243": ["Fullcalendar refetch events", "I need to re-fetch events for full calendar not only on calendar buttons, but on my own drop-down changes, because they define the criteria for events search. The only way I could pass values of dropdowns so far by using the $.ajax , but now the events don't get to the calendar. I'm missing something, as I don't fully seem to understand the functionality.\n\n});\n\n}\nController:\n\n", "$(function () {\nInitializeCalendar();\n\n\n$(\"#ProjectId\").change(function () {\n $('#calendar').fullCalendar('refetchEvents');\n});\n$(\"#JobId\").change(function () {\n $('#calendar').fullCalendar('refetchEvents');\n});\n$(\"#StoreId\").change(function () {\n $('#calendar').fullCalendar('refetchEvents');\n});\n$(\"#OrderType\").change(function () {\n $('#calendar').fullCalendar('refetchEvents');\n});\n$(\"#ShippingId\").change(function () {\n $('#calendar').fullCalendar('refetchEvents');\n});\n", "jquery asp.net-mvc fullcalendar"], "107996": ["Storing Class Instances In A Hashtable", "I have class Foo. Foo has a property of public string x.\nI would like to instantiate Foo a few times as ONE and TWO, and add those instances to Hashtable Bar with keys 1 and 2 respectively. How do I obtain string x for the particular instance.\nI've tried something to the like of: Bar[1].x, but the property x is not recognized.\nWhat am I doing wrong?\n", "", "c# .net visual-studio hashtable"], "4788387": ["Best solution to transcode mp3s (lower bitrate) and stream on the fly", "I have a large repo of mp3s on my LAMP server (I think it's a Debian VPS now) and currently I use a crude flash based mp3 player that \"streams\" the mp3s directly from my server. I am implementing an HTML5 player but I feel this is a similar to my flash integration (and this is slightly besides the point of this question)\nThis question is about how I should start molding my delivery to limit bandwidth - connection speed isn't entirely an issue (although should be reasonable) but my bandwidth costs are flying now and I need to take measures to limit stream quality (transcode down to 128)\nIdeally I'd like to avoid RTMP so I can use my shiny new soundmanager2(html5) plugin for mobile etc, and as such I've been looking into this article here - http://www.metabrew.com/article/transcoding-http-mp3-streaming-proxy-in-bash which details how to create a proxy to on-the-fly transcode bitrate and serve new files.\nI am fairly new to this arena and am open to all solutions! Thanks!\nP.S I am open to 3rd party services - affordable ones at least :)\nPossible Solutions (on SO)\n\nreduce bandwidth streaming mp3s php\n\n", "", "audio mp3 audio-streaming transcode"], "4980627": ["After Nuget Enable System Restore I get FileNotFoundException on System.Web.WebPages", "I have a web app that I'm managing using TFS. I have published the app to both a QA and PROD server with no problems.\nHowever, I recently had an issue when trying to load the project on a new machine from TFS because it was missing all the NuGet packages. I went online and read about the Package Restore feature in 2010. I enabled that on the project and checked the project in and that fixed my issues.\nHowever, now, whenever I publish to my QA and PROD servers, the site loads and I can hit simple \"Index\" type pages but anytime I try to load an edit type page (page with a form on it), I get an error: \n\nIt doesn't appear that anything has changed in my Web.config file.\nWhat happened? What do I need to do to get my sites back up and running?\nThanks for your help!\n", "System.IO.FileNotFoundException: Could no load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ...\n", "visual-studio-2010 nuget"], "3531700": ["youtube api fails when video has commercials", "I've been creating a website that uses youtube videos. To test it, I just use a database of urls that I got from youtube. What I find is that my use of the youtube api works with some videos, but not with others. So to try and figure out why, I did a right click on the videos, and I found that both types are flash videos. However, I find that my first 'seek' with the videos that have commercials stuck at the beginning, does not work, even though when the video is embedded in my iframe, the commercial does not appear.\nI think this is a bug.\nThere is a slight possibility that its not the commercials, but something else about these videos, because I have a fairly small sample.\nThanks,\n", "", "youtube-api"], "2126678": ["Scale down (but not up) images using CSS to fit div container in IE9 (max-width: 100% fix)", "I cannot use JS, this should be archived by CSS only. Container (DIV) is auto width (flexible) \"table-cell\" element. \nI'd want to scale image down only when it width is larger than container (user can resize window - that's the reason).\nI've used code shown below but it work only on IE7.\n\nI've tried to find any working fix for IE9, but without success.\n", "max-width: 100%;\nheight: auto;\nwidth: auto\\9;\n", "css image internet-explorer-9 max-width flexible"], "4869938": [".NET Framework 4.5 EFProviders?", "I'm wondering if anyone has use .NET Framework 4.5's EFProviders? I'm interested in using the membership/profile/roles providers for integrating with my application, since I use EF in the rest of the project - rather than having EF and SQL mixed. But I've been unable to find much on the new EFProviders...Here is the relevant MSDN article I've been looking at:\nSystem.Web.EFProvidersNamespace (MSDN)\nI see some articles on using EF with Azure, but I'm looking to use the providers with EF and a regular MSSQL database.\n", "", "asp.net entity-framework asp.net-membership entity-framework-5"], "3469732": ["How to extend netbeans javascript editor content assist to view Rhino accessible entities", "I have introduced a Rhino-based scripting language. In this language, by its nature of course, it is legal to write something like:\n\nWhich means I'm mixing Java entities and Javascript entites.\nI wish to make a netbeans editor plugin for my new language. This editor must feature content assist.\nNow, the javascript entites appear in the javascript editor content assist by default.\nI guess I can extend the netbeans javascript editor, but how? Which class is it?\nThen, how do I extend the content assist scope with the java entities?\nOr maybe I should make my own editor and \"import\" java and javascript content assist behavior? But again, how?\nThank you\nEDIT: to have the java entities in the classpath, I followed this blog post :\nJava Classes in Code Completion \nby the way, this works only if edited document is in a source folder.\nStill remains open the question about extending javascript editor. Anyone?\n", "var y = new org.mypackage.JavaClass();\nprint(y.javaMethodReturnsString());\n", "plugins netbeans rhino content-assist"], "1267643": ["Using Qt Creator with Allegro", "I want to get Allegro 4 (MSCV 9) to work with Qt Creator. I am using Windows XP.\nI have added these lines to my .pro:\n\nMy code looks like this:\n\nAnd I keep getting errors like these, when I try to compile:\nmain.obj:-1: error: LNK2019: unresolved external symbol imp__allegro_exit referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\nmain.obj:-1: error: LNK2019: unresolved external symbol _imp_set_close_button_callback referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\nmain.obj:-1: error: LNK2019: unresolved external symbol _imp_set_window_title referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\nmain.obj:-1: error: LNK2019: unresolved external symbol _imp_set_gfx_mode referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\nmain.obj:-1: error: LNK2019: unresolved external symbol _imp_set_color_depth referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\nmain.obj:-1: error: LNK2019: unresolved external symbol __imp_install_allegro_version_check referenced in function \"int __cdecl _mangled_main(void)\" (?_mangled_main@@YAHXZ)\n", "INCLUDEPATH += C:/Allegro/include \\\nLIBS += C:/Allegro/lib/allegro-4.4.2-md.lib \\\n C:/Allegro/lib/allegro-4.4.2-monolith-md.lib \\\n C:/Allegro/lib/allegrogl-0.4.4-md.lib \\\n C:/Allegro/lib/loadpng-1.5-md.lib \\\n", "c++ windows qt-creator allegro"], "4455740": ["Postfix sending emails via multiple broadband lines", "I have a site that send out emails from a postfix server. They have multiple broadband lines for load balancing and failover. I want them to be able to send out emails though both lines without the risk of being blocked as spam. \nBoth lines have a static address and have a PTR record on them which also have a records that resolve to the IP addresses\nserver.domain.com\nserver2.domain.com\nin the main.cf myhostname = server.domain.com\nSPF records are also being configured as well\nmy main question is: should the first line on server.domain.com go down would there be a risk of the emails being blocked as spam if they go though server2.domain.com? as myhostname is different?\nThank you\n", "", "dns postfix reverse-dns ptr-record"], "5185140": ["Simple C: atof giving wrong value", "I have a program that reads input from a singe line(string obviously) and organizes it into arrays.\nThe problem I have is that at one point the program reads two different values and returns the first one twice. Initially I thought the program was reading the same value twice but when I tested it turned out that it got the correct one but is inputting the wrong one.\nfor example\n\nInput: 2 0.90 0.75 0.7 0.65\n\nsorry to snip it \n\noutput:\n\nWhat is going on?\n", "(while(fgets (string[test], sizeof(string[test]),ifp))\npch = strtok_r(NULL, \" \", &prog);\ntem3 = atoi(pch);\nwhile (loop<tem3)\n{\n pch=strtok_r(NULL,\" \",&prog);\n venseatfloat[test][loop][DISCOUNT][OCCUPIED]=(float)atof(pch);\n printf(\"%f is discount\\t\",venseatfloat[test][loop][DISCOUNT][OCCUPIED]);\n\n pch=strtok_r(NULL, \" \", &prog);\n strcpy(temp, pch);\n venseatfloat[test][loop][REGULAR][OCCUPIED]=(float)atof(pch);\n printf(\"%s is the string but %.3f is regular\\n\", temp ,venseatfloat[test][loop][DISCOUNT][OCCUPIED]);\n loop++;\n\n}\n", "c pointers"], "455945": ["Browse and load music", "Basically, I have an application (non-multimedia) and I want to be able to browse the music in the phone memory. I have browsed through all the tutorials about retrieving music from phone but all of them are created for independent activity. I am very much new to the Android development and I haven't really understood the Android architecture.\nMy problem now is I know how to retrieve the music and play it, but I can't integrate it with my current application. I want the music retrieval mechanism to be on-the-run together my application. For example, I have the music button on the screen of my application and clicking it will provide a window with list of songs available in the phone (and I don't want it to be on separate activity if possible).\nI have tried making the mechanism as a separate class but when I tried calling the function in the other class, the application crashes.\nThanks in advance, any tips would be very helpful.\n", "", "android list audio loading"], "3624527": ["aiml - wildcards between pattern terms", "Is it possible to use wild cards between terms in a pattern? for example, if I want to answer the question, \"How much are overdue fines on my books?\" is there a way to use a wild card between the terms \"overdue\" and \"books?\" \n", "", "pattern-matching aiml"], "1794812": ["Scripting a MySQL query in Unix using daemon in PHP", "I'm trying to make an \"at\" job work at a given time, for testing purposes I'm using $time but this will be a datetime that I get from a separate MySQL query. In the command line I go like this:\n\nAnd I get a \"job 36 at 2010-10-28 15:05\". in PHP I tried going like this:\n\nBut the query doesn't run. Worse, I have no idea what is happening. \n\nreturns \"daemon\" though. How can I echo whatever response I'm getting from the exec command? ideally I guess it would say \"job 36 at 2010-10-28 15:05\" or something similar.\nAlso, I have a .my.cnf file in my dir that specifies the db, login and password to use, does the daemon need to have one also for these to work?\n[from the answers I can tell I wasn't clear about what I am trying to do. I need to\n\nA. Run a mySQL query to get a date/time and an id \nB. Schedule an update to take place to rows that match the id at the date/time\n\nI'd already done \"A\" and was using \"1\" for the id and \"now\" for the time while testing. I'll look into PDO.\n", "echo \"mysql -e 'UPDATE admin SET row1=row2 WHERE id=1;'\" | at now\n", "php mysql daemon"], "4182503": ["How do I print, identified as an AD user, from an Ubuntu client to a Windows print server?", "I know my question may be confusing, so I'll clarify.\nI'm an admin at a school and am setting up the labs to use Ubuntu (12.04). Users already can authenticate against Active Directory (currently using Likewise Open) for logins from any desktop client, and can access file and print shares on the Windows Server (2008R2). Clients can browse the Windows server for printers, install the drivers, and print. Until the end of the next school year, we will not have money or work hours available to set up a Linux print server, so we must go through the existing Windows Server for printing and auth.\nThe requirement that is causing difficulty is that when the user prints, the AD account of the user currently logged into the Ubuntu client must be identified as the one sending the print request, not some proxy admin account. This is because we have an accounting script that tallies print jobs sent per user so we can bill them at the end of each semester. \nSo far I can only set up a printer on an Ubuntu client if I use an admin user listed in AD. The problem is that the admin user is charged for all printing from the Ubuntu client from that point on. While that might be fun as a practical joke on one of my techs, it's not very useful.\n", "", "ubuntu active-directory windows-server-2008-r2 samba printing"], "4419570": ["wx.Frame.PopupMenu bind menu item", "I am having trouble to bind the items of a popupMenu (displayed on right-click) to some particular function.\nMy code is the following :\n\nmenuRightClick = wx.Menu()\n\n\nThe functions MenuOpenSoft and MenuOpenRep just contain some print for the moment. The trouble is that when I click on one if the items, it doesn't call the functions, it just does nothing.\nAny idea to solve this behaviour ?\nThanks\n", " openDir = wx.MenuItem(menuRightClick, 101,\"Ouvrir dossier\")\n openSoft = wx.MenuItem(menuRightClick, 102,\"Ouvrir avec 3ds Max\")\n menuRightClick.AppendItem(openDir)\n menuRightClick.AppendItem(openSoft)\n\n self.Bind(wx.EVT_MENU, self.MenuOpenSoft, openSoft)\n self.Bind(wx.EVT_MENU,lambda evt, temp=dir: self.MenuOpenRep(evt, temp), openDir)\n\n self.parent.PopupMenu(menuRightClick, evt.GetPosition() )\n", "python wxpython popupmenu"], "5835161": ["PHP: Differences in parsing static file and php array file", "I wanted to find best way to make translation framework (gettext have some imperfections).\nSo I make two tests - One, parsing file contains static text by code below\n\nand secondly including array\n\nOf course each lang.lng and lang.php has same data (1000 records) but reperesented in diffrent way.\nI was surpised when I saw results...\nFirst method: ~0.01 s\nSecond: ~0.001 s\nBefore test I was sure that including array will take more memory and time then parsing file.\nCould somebody explain me where is mistake?\n", "function parseLine($line) {\n if($line[0] == '#' || !strlen($line)) \n return array();\n\n $eq = strpos($line, '=');\n $key = trim(substr($line, 0, $eq));\n\n $value = trim(substr($line, $eq+1));\n $value = trim($value, '\"');\n\n return array($key => $value);\n}\n\n$table = array();\n$fp = fopen('lang.lng', 'r');\nwhile(!feof($fp)) {\n $table += parseLine(fgets($fp, 4096));\n}\nfclose($fp);\n", "php arrays parsing translation"], "2224375": ["jQuery UI Multiple Tab Containers with Sortables", "I'm having a difficult time accomplishing something with jQuery. I have multiple tab containers. Inside each tab container, there are multiple tabs. Inside each of these tabs, there is a sortable. The sortables contain portlets. I'm trying to drag these portlets from one sortable in one tab in one tab container, to another sortable in another tab in another tab container. Confused?\nHere's a jsFiddle that shows what I'm trying to accomplish: http://jsfiddle.net/ZLGWF/\n\nThe problem is that sometimes the sortable that I'm dragging to won't recognize the portlet until I've dragged it halfway through the sortable. Sometimes it won't recognize it at all.\nAny idea what I'm doing incorrectly?\nThank you\n", "<snip>\n", "jquery tabs sortables"], "4424134": ["Two basic problems about fundamental group and paths", "I have two problems that I don't know how to do )=.\ni) Let X path connected. Let $x_0 , x_1 \\in X$. Show that $\\pi _1 \\left( {X,x_0 } \\right)$ is abelian iff for every $\\alpha, \\beta$ paths from $x_0$ to $x_1$ , we have $\\widehat\\alpha = \\widehat\\beta$.\nWhere the hat denotes the homomorphism:\n$$\n\\eqalign{\n & \\widehat\\alpha :\\pi _1 \\left( {X,x_0 } \\right) \\to \\pi _1 \\left( {X,x_1 } \\right) \\cr \n & \\widehat\\alpha \\left( {\\left[ f \\right]} \\right) = \\left[ \\alpha \\right]^{ - 1} \\left[ f \\right]\\left[ \\alpha \\right] \\cr} \n$$\nI did the side where the group is abelian, but the other I could not )=.\nii) The other is a property that I read in wikipedia. If $X$ and $Y$ are path connected, then $$\n\\pi _1 \\left( {X\\times Y} \\right) \\cong \\pi _1 \\left( {X\\,} \\right) \\times \\pi _1 \\left( Y \\right)\n$$\nI'm not sure if this nice property is easy to show. )=\n", "", "algebraic-topology"], "962684": ["DataURI image texture in three.js doesn't work in Firefox", "I am using three.js to do some online interactive modelling of geology, and have been creating image URI using the Canvas Element (output would be: data:image/png;base64,). \nThe image creation works fine in Chrome,Firefox, and Safari, but using the images in three.js as a texture doesn't show up in Firefox.\nThe simplest demonstration I can show is by changing one line of a three.js example, to substitue an image URL for a dataURI, and use that as a texture.\nhttp://visiblegeology.com/renderingProblem/\nThis works fine for me in Chrome and Safari, but just doesn't show up in Firefox.\nI was wondering if anyone had any advice, work-arounds, or thoughts.\nThanks for any help,\nRowan\n", "", "firefox three.js data-uri"], "5027722": ["RSS or XML", "I need to get data from a web site written in PHP. My boss wants me to provide an RSS feed to get updated content. \nThe problem is that I need to provide several informations (at least a dozen different field). Is returning data as XML a better way than RSS?\n", "", "php xml rss"], "1081203": ["Rational software architect installation fails - could not create java virtual machine error", "Im not able to install IBM RSA (Rational Software Architect) which I have to use. Im still getting error: while installation stage: reconciliation of the settings with eclipse (sorry, that's my translation for this).\n\nI have 2 Jdk's installed: 1.6.0_27 and 1.7.0. \nI have succesfully installed a RequisitePro earlier the same day using the same IBM\ninstaller. I have also tried other version. Same effect. \nIm running windows 7\nJAVA_HOME is set to 1.6.0_27 jdk and has been added to PATH.\n\nIt has to be something with the VM's but i don't know what. So I'm kindly asking you for help.\n", "could not create java virtual machine error", "installation ibm rational"], "5092483": ["What makes a WP7 app unique", "I have one app, I copied the whole folder and proceeded to edit it out, turning it into a new app.\nNow, during testing, if I debug the first app (let's call it parent app), and then proceed to debug the second app (child app), the parent app is no longer there. It has been replaced by the child app and vice versa.\nDigging deeper into this, I proceed to change out some of the Properties. I changed the Assembly Information to fit it properly, changed the GUID and all. \nThe only piece of data that stays the same is the Assembly name. The Assembly name is the same for both of the apps because changing it is a bit trickier since I get an debugger error if I do that. \nMy question is what makes an app unique and how could I achieve to have both the apps installed at the same time ?\n", "", "windows-phone-7 application"], "2125022": ["Qt application on Windows", "So, I made a Qt application on Qt Creator that displays jpg files and mp3 files(using phonon).\nOn deploying the application with dynamic linked libraries I had to copy to the same folder QtCore4.dll, QtGui4.dll, phonon4.dll, mingwm10.dll and libgcc_s_dw2-1.dll as required by Windows.\nThe problem is that the jpg files and mp3 files are only shown on pcs with the QtSDK installed. In other pcs the exe file runs, opens the user interface and does everything right except showing jpg and mp3 files. The directory path is not the problem because it opens a pdfviewer that I put in the same folder. Do I need to provide other files? \n", "", "qt application deployment dll phonon"], "5486290": ["How to get a Nokogiri object graph to get serialized recursively?", "I am using ROXML with Nokogiri for XML/Ruby Object Mapping in Rails 3 and having a problem with correctly mapping Ruby object graph to xml.\nAssuming the following 3 classes:\n\nLet's instantiate them: \n\nCalling xml = a.to_xml returns:\n\nCalling xml.serialize :save_with => 0 returns:\n\nSo, what happened here is that object ResultLevelConstraint hasn't been serialized correctly.\nCalling b.to_xml.serialize :save_with => 0 returns correctly serialized ResultLevelConstraint object:\n\nHowever, this doesn't satisfy my needs. I have deep object graphs and only want to call to_xml.serialize on the root object (a in this example). So, what happened here is that serialize seems to not have been called recursively. \nI think it's a Nokogiri issue because to_xml called on the object seems to return a correct Nokogiri object graph. So Roxml seems to work fine...\n", "class AnyRequestByRequestData\n include ROXML\n\n xml_name :anyRequestByRequestData\n xml_accessor :request_data\n xml_accessor :result_level_configuration\n xml_accessor :result_level_constraint, :from => :resultLevelConstraint\n xml_accessor :result_format\nend\n\nclass ResultLevelConstraint\n include ROXML\n\n xml_name :resultLevelConstraint\n xml_accessor :result_level_constraint_items, :as => [ResultLevelConstraintItem], :in => :resultLevelConstraintItems\nend\n\nclass ResultLevelConstraintItem\n include ROXML\n\n xml_name :resultLevelConstraintItem\n xml_accessor :result_level_configuration_item, :from => \"@resultLevelConfigurationItem\"\n xml_accessor :offset\n xml_accessor :limit\nend\n", "ruby-on-rails xml ruby-on-rails-3 serialization nokogiri"], "4855355": ["default textsize in sybase", "the default textsize in sybase is 32768.\ni can see this when i login to sybase and type:\n\nwhen i did some googling i got the info that using the set command i can change the default textsize to my own value\n\nBut my problem here is this is not persisting.\nas soon as i close the session,it sets back to 32768.\ndoes anybody know how could i change the default textsize permanently in sybase.\n", "1> select @@textsize\n2> go\n\n ----------- \n 32768 \n\n(1 row affected)\n", "sybase"], "3162125": ["A formal series in the Banach space $c_0$", "Let $(e_n)$ be the standard unit vector basis for $c_0$, let $x_1=e_1$, $x_n=e_n-e_{n-1}$ when $n\\gt1$.\nProve that the formal series $\\sum x_n$ is not weakly subseries convergent.\n", "", "functional-analysis banach-spaces"], "3510427": ["SharePoint Web Service Lists.GetListCollection not returning all lists", "I'm using SharePoint's List web service and I tried GetListCollection but it's not returning all the lists. Here's my code (SBALists is my web reference name):\n\nI also tried passing in my username/password for the credentials but doesn't change the results.\n\nAny idea why some of the lists aren't returning?\n*Edit\n\n", "Dim Lists As New SBALists.Lists\nLists.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials\nDim Result As XmlElement = Lists.GetListCollection\nDim XR As New XmlTextReader(Result.OuterXml, XmlNodeType.Element, Nothing)\nDim DS As New DataSet\nDS.ReadXml(XR)\nDataGridView1.DataSource = DS.Tables(0)\n", "c# xml vb.net web-services sharepoint"], "1181602": ["rails validation of presence not failing on nil", "I want to make sure an attibute exists, but it seems to still slip thru and I'm not sure how better to check for it.\nThis should work, but doesn't. It's a attr_accessor and not a real attribute if that makes a difference.\n\nNot sure why my form_for returns a blank hash in an array...\n\n", "validates_presence_of :confirmed, :rooms\n\n{\"commit\"=>\"Make Booking\",\n \"place_id\"=>\"the-kosmonaut\",\n \"authenticity_token\"=>\"Tkd9bfGqYFfYUv0n/Kqp6psXHjLU7CmX+D4UnCWMiMk=\",\n \"utf8\"=>\"\u00e2\u0153\u201c\",\n \"booking\"=>{\"place_id\"=>\"6933\",\n \"bookdate\"=>\"2010-11-22\",\n \"rooms\"=>[{}],\n \"no_days\"=>\"2\"}}\n", "ruby-on-rails validation ruby-on-rails-3 form-validation"], "4987362": ["Wix CustomAction session.Log not working", "I'm using Wix to setup a Windows Installer .msi file. I have a CustomAction that sets up a ScheduledTask, and in the CustomAction, I've put in some session.Log statements.\nIf I build everything in debug mode, the session.Log statements seem to work, but when I build in Release mode, it seems to no longer log. Is this correct? Or are there other scenarios where session.Log will not work? Is there any way to workaround any of these scenarios, so that session.Log always works?\nEdit: The CustomAction is written in C# (i.e. managed)\n", "", "logging wix windows-installer custom-action"], "4012429": ["Stop gps updating after last known location is fetched", "I have a Location Manager:\n\nI initialize it like this:\n\nThen i need last known location which i achieve this way:\n\nNow i just want the gps icon in the status bar to disappear, above all, i want it to stop checking my position.\nSince i never ask for an update, nor i have a LocationListener in my code i don't know how to do it.\n", "private LocationManager lm;\n", "android gps updates stop geo"], "622404": ["ios JSON won't cast", "I am thoroughly puzzled by this problem. I created a JSON file with the iOS JSON library but when I read it back in, it is simply . There is no error returned, and if I read it into an I can see that the structure is intact, but as soon as I try to assign it to an it becomes again! The looks like this:\n\nAs you can see, I have an array of arrays (Corresponding to table section and row heights). I got the above through serializing the JSON file, but whenever I try to cast it to an array, it is always . Any idea why?\nHere are the two lines in question:\n\n is an iVar\n", "[NSJSONSerialization dataWithJSONObject:options:error:]", "ios json casting"], "5020295": ["NSZombie NSException", "i created one sequence like move and method call to apply the sprite..at some point i stopped move action alone then i begin to start to apply newly created move action on that sprite.\nthe application return message: \n\n* Terminating app due to uncaught exception of class '_NSZombie_NSException' libc++abi.dylib: terminate called t\n\nhrowing an exception\n", "", "objective-c memory-management nszombieenabled"], "5240763": ["Aggregation of an MDX calculated measure when multiple time periods are selected", "In my SSAS cube, I have several measures defined in MDX which work fine except in one type of aggregation across time periods. Some don't aggregate (and aren't meant to) but one does aggregate but gives the wrong answers. I can see why, but not what to do to prevent it.\nThe total highlighted in the Excel screenshot below (damn, not allowed to include an image, reverting to old-fashion table) is the simplest case of what goes wrong. In that example, 23,621 is not the grand total of 5,713 and 6,837.\n\n\nActive Commitments works fine. It is calculated for a point in time and should not be aggregated across time periods.\nAcquisitions works fine.\n[Measures].[Growth in Commitments] = ([Measures].[Active Commitments],[Date Dimension].[Fiscal Year Hierarchy].currentMember) - ([Measures].[Active Commitments],[Date Dimension].[Fiscal Year Hierarchy].prevMember)\n[Measures].[Net Lost Commitments] = ([Measures].[Acquisitions] - [Measures].[Growth in Commitments])\n\nWhat's happening in the screenshot is that the total of Net Lost Commitments is calculated from the total of Acquisitions (23,621) minus the total of Growth in Commitments (which is null).\nAggregation of Net Lost Commitments makes sense and works for non-time dimensions. But I want it to show null when multiple time periods are selected rather than an erroneous value. Note that this is not the same as simply disabling all aggregation on the time dimension. The aggregation of Net Lost Commitment works fine up the time hierarchy -- the screenshot shows correct values for 2009 and 2010, and if you expand to quarters or months you still get correct values. It is only when multiple time periods are selected that the aggregation fails.\nSo my question is how to change the definition of Net Lost Commitments so that it does not aggregate when multiple time periods are selected, but continues to aggregate across all other dimensions? For instance, is there a way of writing in MDX:\n\nADVthanksANCE,\nMatt.\n", " Active Commitments Acquisitions Net Lost Commitments Growth in Commitments\n2009 88,526 13,185 5,713 7,472\n2010 92,125 10,436 6,837 3,599\nTotal 23,621 23,621 \n", "ssas mdx"], "4072452": ["Missing separate debuginfo for - GDB", "I have mentioned option along with in the .\nWhen I run , I get:\n\nGDB version:\n\nThe package:\n\nThe system:\n\nThis is what I did:\n\nWhat to do now?\n\n\n", "-g", "linux opensuse software-installation debugging gdb"], "4415397": ["On Mac's Cocoa, how do you get the RGB value of any point on the screen?", "I tried\n\nbut it always print out 0.0000\n(if you know a method to \"set\" the value of a pixel on the screen too, thanks)\n", " CGPoint pt;\n pt.x = x;\n pt.y = y;\n\n NSColor* color = NSReadPixel(pt);\n float colourValue = [color greenComponent] + [color redComponent]+ [color blueComponent];\n printf(\"%f\\n\", colourValue);\n", "cocoa"], "3206773": ["Short proof for the non-Hamiltonicity of the Petersen Graph", "It is well known that the Petersen Graph is not Hamiltonian. I can show it by case distinction, which is not too long - but it is not very elegant either.\nIs there a simple (short) argument that the Petersen Graph does not contain a Hamiltonian cycle? \n", "", "graph-theory proof-strategy"], "3261533": ["C function decorators (wrappers) at compile time", "I'm trying to change the behaviour of some functions in C with help of the preprocessor; and also add optional parameters that can be set on or off...\nThe basic pattern for the optional parameters is easy:\n\nthe pattern for wrapping a function conditionally is similar, but the problem is that the underscores start to add up (one extra for each level of nesting, that can be a different function or just a #define for the next level in case it's not wrapped).\nSo, any ideas about how to reduce the code complexity here?\nP.S. I'd be willing to use Python... but this is for a driver :-(\n", "#ifdef OPT_PARAM\n #define my_func(a, b, opt) _my_func(a, b, opt)\n#else\n #define my_func(a, b, opt) _my_func(a, b)\n#endif\n\n/*the rest of the code always calls \"my_func\" with all the params\nand not the underscored version...*/\n\n#ifdef OPT_PARAM\nvoid _my_func(int a, int b, int opt)\n#else\nvoid _my_func(int a, int b)\n#endif\n{\n /*... more #ifdefs surrounding opt uses */\n}\n", "c preprocessor decorator wrapper"], "5017350": ["How do you put an ObservableCollection into a Textblock", "I need to put my into my . Here is my code. Right now it is showing the Item and the SubItems, but where the messages show it has .\nI think this is because it cannot put an into the .\nXAML:\n\nValidationMessage Class:\n\nValidationItem Class:\n\nThank you for your help!!\n", "ObservableCollection<ValidationMessage>", "c# wpf xaml observablecollection hierarchicaldatatemplate"], "3295879": ["How to make the image map clickable on mobile-safari?", "I'm using jQuery and qTip2 to make Geo information on an image map visible. You can see the demo here on JSFiddle | Fiddle Screen result\nOn Desktop Browsers everything works fine. on-hover you see the tooltip and on-click you go to the URL defined by tag.\nBut on mobile safari (ipad/iphone) it is impossible to get the link to the URL. Every time you click on the map it is like you hover on pc, but never a click.\nThe image is created with standard html:\n\nalso the map is created with standard html but with additional attribute tooltip(1):\n\nThe jQuery is very tiny with(2):\n\nSo how could i solve this problem?\n\u00a0\u00a0\u00a0\n\n(1) I know this attribute should be data-tooltip. this will be changed soon.\n(2) Based on the imagemap demo\n", "href", "javascript jquery mobile-safari imagemap qtip2"], "5824830": ["HTML Parsing using Jsoup.Jar", "\nAm using Jsoup.jar for the above program. \nI am accessing the webpage and my aim is to the print the text that is found within the tag .\nBut nothing is getting printed as output. There is no contents added to the in the program. But is getting all the attribute values of the span tag.\nWhere must I have went wrong? Please advise.\n", "Document doc = Jsoup.connect(\"http://reviews.opentable.com/0938/9/reviews.htm\").get();\n Element part = doc.body();\n Elements parts = part.getElementsByTag(\"span\");\n String attValue;\n String html;\n for(Element ent : parts)\n {\n if(ent.hasAttr(\"class\"))\n {\n attValue = ent.attr(\"class\");\n if(attValue==\"BVRRReviewText description\")\n {\n System.out.println(\"\\n\");\n html=ent.text();\n System.out.println(html);\n }\n }\n }\n", "java html-parsing jsoup"], "4996348": ["How can I get the count of the audio data for playing mp3 using AudioToolBox.framework", "I am making the MP3 streamming app using AudioToolBox.framework.\nAlmost things are going well. but, I met the problem. Some MP3 file haven't an information of the count of audio data. I already know how to use 'kAudioFileStreamProperty_AudioDataByteCount' for parsing the count of it.\nBut, in the reference state that,\n\"...For some kinds of streams this property may have no value.\"\nIf the value is absent, how can I get the value?\n", "", "cocoa mp3"], "2371654": ["Trying to integrate my bookmarklet into a Chrome Extension, but for some reason it doesn't work", "I'm trying to integrate my bookmarklet into a Chrome Extension, but for some reason it doesn't work\nI tried inserting: \n\nI tried both into popup.html ; background.html\nalso i have in the manifest file: \n\nmy demo.js is supposed to open a popup in which you enter a search phrase and then the wikipedia page opens. ( example taken from here: http://coding.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/ )\nI tested the normal bookmarklet code and it works great but now when I try to integrate it with my Chrome extension I can't seem to make it working. When i press the extension icon it just opens a tiny blank extension window.\nI tried many other combinations, not just what I said here.\nCan you help?\n", "chrome.tabs.executeScript(null, {file: \"demo.js\"});\n", "google-chrome bookmarklet"], "3252075": ["Rails page loads modal-backdrop twice?", "When I close the modal (click outside the modal), the webpage is still dark, and I have to click a second time somewhere on the page for it to be normal again. Anyone knows what the problem might be?\n_post_modal.html.erb\n\n_single_post.html.erb\n\nlist.html.erb\n\napplication.html.erb\n\ncustom.css.scss\n\n", "<div id=\"<%= p.id %>\" class=\"modal hide\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-header\">\n <p><h3 id=\"myModalLabel\"><%= p.title %></h3></p>\n </div>\n <div class=\"modal-body\">\n <%= raw(p.link) %>\n </div>\n</div>\n", "javascript css ruby-on-rails-3 twitter-bootstrap modal"], "5139516": ["Windows Server 2008 R2, RRAS and NAT", "I have a server running VMWare ESXi with one physical NIC.\nThis server is running 3 VMs (S1, S2, and S3) which are all running Windows Server 2008 R2. \nI want to set up NAT routing on this server such that only one of those servers has an external IP, and all incoming requests go to that single VM (say S1.) That VM would do nothing but route requests and act as a firewall. It would, for instance, route all http requests to S2 -- port forward, in other words. I also want all 3 machines to be able to talk to one another (share files, access network services, whisper sweet nothings.)\nI am convinced the answer lies somewhere in Routine and Remote Access Services (RRAS) in Windows Server 2008. But so far, none of my illiterate poking has come up with something workable. I can configure RRAS for NAT on S1, and make it look like it will work, but I cannot make any of the other machines (S2 and S3) able to talk to S1. \nI have read many articles which try to explain how to set this up. But so far, none have worked. And even worse, they all give slightly different advice.\nIs anyone aware of a definitive article on this subject. Or can give a specific set of instructions on how to configure RRAS to do what I want it to do?\nThank you.\n", "", "windows-server-2008 nat rras"], "3618858": ["Resources for Learning Clojure?", "I primarily program in D nowadays and my second favorite language is Python. I've decided I want to learn Clojure to broaden my horizons to a language that's more functional flavored and designed even more around metaprogramming than D or Python. What are some good (ideally free, but this is not a hard requirement) learning materials for someone with my background:\n\nI'm an experienced programmer in more imperative languages. I don't want something that tries to teach me \"how to program\" rather than just the language.\nI grok and regularly use some functional flavored constructs (map, reduce/fold, lambda functions, list comprehensions, closures) but tend to think of these as convenience features rather than fundamental primitives.\nI absolutely love metaprogramming and it's the main reason I care about Clojure. Ideally the learning material should treat macros/metaprogramming as a fundamental part of the language, not an \"advanced\" feature.\nI don't care at all about theoretical purity. (For example, despite my interest in Clojure I have zero desire to learn Haskell.) I want learning material with a very practical \"getting things done\" style.\nLisp-style S-expressions and programming mostly without mutable state still seem weird to me, though I'm willing to try to get used to these.\n\nBottom line: Ideally I want a tutorial that assumes plenty of prior knowledge about programming in general and dives right into the unusual parts of Clojure's syntax and semantics, what cool/unusual things Clojure can do, and how to do them.\n", "", "learning books tutorial clojure"], "5279240": ["Getting hardware GUID for video adapter in C#", "I'm developing a launcher application for a 3D game on Windows. The configuration \"ini\" file requires the user to specify the hardware GUID for the desired device, as in, the Device Identifier GUID returned by dxdiag.exe.\nI'm trying to list the available adapters on the system, allow the user to select one and load that device's hardware GUID into the ini file.\nI've examined many methods for attempting this. I've tried using the System.Management class, which returns the class GUID but not the specific driver GUID. I've tried using native calls to SetupAPI.h functions, which also seem to not be able to list the specific Device Identifier GUID. I've tried examining the registry, to see if the GUID resides there. No luck.\nMy best idea was probably using the Managed DirectX library to return the GUID I'm looking for, considering that's probably how dxdiag does it. I was able to enumerate and collect hardware information about each driver using the SharpDX Managed DirectX interface for .NET applications (I'm targeting framework 3.5), but again, I wasn't able to return the same GUID that dxdiag returns.\nI'm really stuck for a solution. Help?\n", "", "c# .net adapter manageddirectx setupapi"], "5842599": ["$(-1)\\otimes (-1) \\cong I$", "Is there a monoidal category $\\mathcal C$ whose unit object is $I$ (i.e. $I\\otimes A\\cong A\\cong A\\otimes I$ for all $A\\in \\text{Ob}_\\mathcal C$), with an object \"$-1$\" such that\n$$\n(-1)\\otimes(-1)\\cong I ?\n$$\n(Edit: no one misunderstood, but I'm also asking that $-1\\neq I$)\nI'm struggling with that since I read this math.SE post... Martin, if you see me, your server rejected every mail I tried to send you. :(\n", "", "category-theory monoidal-categories"], "5560968": ["Comet - non applet async loading alternatives + mostly used applets", "I found these async loadings (wikipedia Comet):\n1 push pull may be event listener:\nhidden iframe written to page\nhidden iframe created and deleted by javascript after posting data and loading data\najax xhr\njavascript creating script tags with src to dynamic generation like php\nwebsockets and bosh 1.1 in this case i found something like ws:// protocol is subtype of bosh Is it right?\nand jsonrequest http://www.json.org/JSONRequest.html 1.2 in which i don't know where it is implemented i think actually by plug-ins and extensions\n2 only event listener:\nsse\n3 Applets: i thought about these 3 flash java silverlight\nin all of them could you tell me more in applets only classsically installed\n4 I think that normal internet sockets are implemented to languages with assembler so every library extensible language could connect not assembler to internet. Am I right?\nthanks for all answers\n", "", "ajax sockets iframe comet server-sent-events"], "3430833": ["Distributed Switch Architecture", "I am trying to extract interface information from a SNAP packet (CDP in particular) which is flowing from a switch and am getting as \"eth0\" when connected across any of the ports. I should be getting it as \"lan0\" / \"lan1\" etc. depending on which port that I am connected to. \nLLDP is working fine but when querying for CDP, the interface name is always \"eth0\". \n", "", "protocols"], "4480724": ["is it possible to write an ant target that invokes a java function?", "How do you write an ant target that takes a file as input and replaces all white space ' ' characters with '' (i.e. I need an ant target to \"minify\" the input text file and write it to disk)? \nI know that in Java it's a simply doing something like this: \n\nBut how do I get an ant target to invoke \"minify()\" function and how do I pass in a parameter \"originalString\" in Ant? \nWould appreciate all / any advise.\n", "public void minify(String originalString){\n String minifiedFile = originalString.replaceAll(\" \", \"\");\n}\n", "java ant"], "1739968": ["Jquery Colorbox, open from input field, return value back", "i try to fill/overwrite(if exists) an input field from an colorbox popup search form, but i dont get the variable back into my input field.\nthis is the mainpage:\n\nthis is colorbox popup page:\n\n", "link rel=\"stylesheet\" href=\"jquery/css/ui-darkness/jquery-ui-1.10.1.custom.css\">\n<script src=\"jquery/js/jquery-1.9.1.js\"></script>\n<script src=\"jquery/js/jquery-ui-1.10.1.custom.js\"></script>\n<script src=\"jquery/colorbox/jquery.colorbox-min.js\"></script>\n<link rel=\"stylesheet\" href=\"jquery/colorbox/colorbox.css\" />\n\n<script>\n$(function() {\nvar kid = $('#Kontaktname').val();\n$(\"#Kontaktname\").colorbox({\n href:\"contact_search_popup.php?s_contacts_id=\" + kid,\n iframe:true,\n innerWidth:850,\n innerHeight:400,\n opacity:0.1,\n overlayClose:false,\n });\n});\n</script>\n\n<p><input type=\"text\" id=\"Kontaktname\" value=\"1001\" name=\"Kontaktname\"></p>\n\n<p id=\"test\">\nreturn value:\n</p>\n", "javascript jquery colorbox"], "880967": ["Mime types with simple_datatables and best_in_place", "I've been successfully using the simple_datatables gem in my application. Now I'd like to add the best_in_place gem for inline editing. However, when I drop best_in_place into the app, I see this:\n\nand get this error in my #update action:\n\nAfter digging in the simple_datatables I found this:\nhttps://github.com/gryphon/simple_datatables/blob/master/lib/simple_datatables.rb#L3\n\nWhich appears to be causing the issue. I've been playing around with registering, unregistering, and registering_as_aliases mime types to get this to work, but I'm doing it blindly and would appreciate some guidance.\nIf I add this to mime_types.rb\n Mime::Type.register \"application/json\", :json\nI get this warning \n\nas my server starts, but it seems to work. Any thoughts on the proper way to make it so both datatables and ordinary :json formats work?\n", "Processing by Admin::AdminNotesController#update as DATATABLES\n", "ruby-on-rails-3.1 datatables mime-types best-in-place"], "2472166": ["How to make X less sensitive when right clicking?", "Whenever I right click in X, I almost always seem to trigger the first option in the menu unless I am thinking about what I am doing because I:\n\nMouse down; menu appears\nAccidentally drag mouse 1-3 pixels down and/or to the right\nMouse up; menu item selected\n\nIs there any way to tweak this so the menus don't trigger quite so easily? If it matters, I am using Gnome 3/Cinnamon on Gentoo Linux.\n", "", "x11 mouse"], "3087832": ["Is it possible to prevent the win7 sleep state while using spotify?", "Does anyone know if there is a way to prevent windows 7 to go to sleep while using Spotify? \nI have read the answers in this question but if it's possible I'd rather not resort to start a third party program like insomnia every time I want to listen to music. \nSo are there a setting or a registry entry buried somewhere deep in windows that allows you to do this? Either for a group like \"all audio\" or for specific programs?\n", "", "windows-7 audio sleep"], "4885050": ["Is it possible to avoid duplication of maven archiver configuration?", "This is my parent :\n\nAs you see, maven archiver is configured twice, with identically same parameters. Is it possible to avoid such duplication and configure it only once?\nps. I'm ready to migrate to Maven 3 to solve this problem.\n", "pom.xml", "java maven-2 maven"], "1434078": ["how to add jcomments to my custom module?", "I have created a module in joomla 2.5. In that module I am displaying one article at a time getting its id from the url and then query the database for that id and displaying the article title and content.\nI want to display also the comment form under the content of the article so that a user can add a comment to that article.\nI am using the Jcomments module.\nBelow the content area I have placed the following code for displaying the jcomments form but it is not displaying .\n\nSo how will add the jcomment form to my custom module?\n", "<?php\n\n $comments = 'components/com_jcomments/jcomments.php';\n if (file_exists($comments)) {\n require_once($comments);\n?>\n<center>\n<div class=\"mtframe\">\n <?php echo JComments::showComments($article->id, 'mod_article_detail', $article->title);?>\n</div>\n</center>\n", "comments joomla2.5"], "5958576": ["How do i write \u0127 in LaTeX, for the reduced Planck constant?", "\nPossible Duplicate:\nHow to look up a symbol? \n\nHow do I write the symbol h cross in LaTeX. where is the plancks constant. I want the h with a line across the vertical bit. I searched the internet but couldn't get it.\n", "$h cross = \\frac{h}{2\\pi}$", "symbols"], "88495": ["How do I distinguish a SharePoint file update as being from a file upload?", "In SharePoint, when an item is first added to a document library, it fires the ItemAdded and ItemAdding events as expected. And if you upload the same filename to update the existing file, it will fire off ItemUpdated and ItemUpdating events, likewise as expected. However, I have been unsuccessful at determining whether this kind of action has actually occurred or not. Or, more specifically, I am entirely unable to differentiate between the following:\n\nAn item is updated because someone uploaded a new file but did nothing to any of the form fields.\nAn item is updated because someone hit \"OK\" but did nothing to any of the form fields.\n\nIs there actually a way to distinguish these kinds of updates? There appears to be nothing in event properties that contains this information, nor in the version history for both the list item and the file itself. I have even tried comparing the files themselves via OpenBinary(), but in both mentioned cases I still get the same result. Thank you in advance for any help!\n", "", "sharepoint sharepoint2007 event-handling document-library"], "2136216": ["Equivalent of ASP.Net Ajax Function.createDelegate in jQuery", "I was trying to port over a ASP.Net ajax behavior into a jQuery plugin. A piece of puzzle that remains solving is to find a substitute for Function.createDelegate in jQuery.\nI need something like this in jQuery:\n\nIs jQuery .delegate method the way to go? \nOr is it this post: Controlling the value of 'this' in a jQuery event\n", "this.$delegateOnClick = Function.createDelegate(this, this.fireOnClick);\n", "jquery javascript-events asp.net-ajax"], "3081186": ["Why doesn't my CUDA kernel alter my array?", "I am teaching myself CUDA from the ground up. I made this simple kernel that adds 1 to each of the relevant elements within a 2D array. The elements of the 2D array stem from the red channel of an image (zebra.jpg).\n\nHowever, then I run this program, I get the following results.\n\nWhy is my original sum identical to my new sum? Shouldn't the new sum be greater?\nHere is zebra.jpg.\n\n", "from pycuda.compiler import SourceModule\nimport matplotlib.image as img\nimport pycuda.driver as cuda\nimport pycuda.autoinit\nimport numpy as np\n\nmy_image = img.imread(\"zebra.jpg\")[:,:,0]\nblock = (32, 32, 1)\ngrid = (8, 8)\n\nif __name__ == '__main__':\n width, height = np.int32(my_image.shape)\n im = np.array(my_image)\n print 'original sum: ' + str(np.sum(im))\n\n # Create the CUDA kernel, and run it.\n mod = SourceModule(\"\"\"\n __global__ void add1ToEverything(float* r, int w, int h) {\n int rowID = blockDim.y * blockDim.y + threadIdx.y;\n int colID = blockDim.x * blockIdx.x + threadIdx.x;\n\n if (rowID > 0 && rowID < h - 2 && colID > 0 && colID < w - 2)\n r[rowID * w + colID] += 1.0;\n }\n \"\"\")\n func = mod.get_function('add1ToEverything')\n\n for i in range(0, 5):\n func(cuda.InOut(im), width, height, block=block, grid=grid)\n print 'new sum: ' + str(np.sum(im))\n", "cuda pycuda"], "3460438": ["unable to get data in center of table column", "I want to get the Name and Description in the center of the columns..\nI tried a lot but no luck... I kno this is silly doubt but i am stuck...\nhere is the .aspx code\n\nas you can see i have also tried align.. it still does not work\n", "<!-- <table cellpadding=\"3\" cellspacing=\"4\" align=\"center\" \n style=\"width: 100%; height: 60%\">\n <tr>\n <td bgcolor=\"#4F81BD\" style=\"color: #FFFFFF\" width=\"50%\" align=\"center\" >\n Name</td>\n <td bgcolor=\"#4F81BD\" style=\"color: #FFFFFF\" width=\"50%\">\n Description</td>\n </tr>\n", "asp.net visual-studio table"], "5846790": ["Abstracting out Autofac's factory method support", "What is the right way to abstract out Autofac's factory method support?\nI keep getting this exception:\n\nThis resolve operation has already ended. When registering components using lambdas, \n the IComponentContext 'c' parameter to the lambda cannot be stored. Instead, either\n resolve IComponentContext again from 'c', or resolve a Func<> based factory to create \n subsequent components from.\n\nHere is my attempt to wrap it up.\n\nI've even tried\n\nI want to have a method that returns .\n is an implementation of , which is just a wrapping of Autofac's .\nIn the end this is the result I'm expecting:\n\nIn using the container:\n\n", "public void Register<T>(Func<IFactoryContext, T> factoryMethod)\n{\n _containerBuilder.Register<Func<Type, T>>(c => {\n var ctx = c.Resolve<IComponentContext>();\n return request => factoryMethod(new AutofacFactoryContext(ctx));\n });\n}\n", "c# inversion-of-control autofac"], "2319713": ["Create a function pointer which takes a function pointer as an argument", "I'm trying to create a function pointer that takes a function pointer as an argument, but am not sure how to go about it... I was advised to try typedef-ing one of my function pointers, but get the same error. Could someone help me with the correct syntax?\n\nThe line I'm trying to make work is 249, I originally tried\n\nand would probably prefer to do it that way if possible. The error I'm getting is:\n\nAnd the functions I'm pointing to are:\n\nCan anyone see what I'm doing wrong? I can't figure it out.\nThanks!\nRhys.\n", " int\n186 main(int argc, char **argv)\n187 {\n188 int i;\n\n194 typedef int (*search_alg) (int *, int, int);\n195 typedef int (*search) (search_alg);\n196 set_t (*intersect_alg) (list_t *, (search));\n197\n198 clo_t *iopts = parse_args(argc, argv);\n199\n200 /* select interstion algorithm */\n201 switch (iopts->imode) {\n202 case SVS:\n203 fprintf(stdout, \"ALGORITHM : SvS\\n\");\n204 intersect_alg = svs;\n205 break;\n206 case SEQ:\n207 fprintf(stdout, \"ALGORITHM : Sequential\\n\");\n208 intersect_alg = sequential;\n209 break;\n210 case ADP:\n211 fprintf(stdout, \"ALGORITHM : Adaptive\\n\");\n212 intersect_alg = adaptive;\n213 break;\n214 default:\n215 fprintf(stdout, \"ALGORITHM : Unknown\\n\");\n216 return (EXIT_FAILURE);\n217 }\n218\n219 /* select fsearch algorithm */\n220 switch (iopts->mode) {\n221 case LIN:\n222 fprintf(stdout, \"F-SEARCH : Linear\\n\");\n223 search = linear_fsearch;\n224 break;\n225 case BIN:\n226 fprintf(stdout, \"F-SEARCH : Binary\\n\");\n227 search = binary_fsearch;\n228 break;\n229 case INP:\n230 fprintf(stdout, \"F-SEARCH : Interpolation\\n\");\n231 search = interpolation_fsearch;\n232 break;\n233 case EXP:\n234 fprintf(stdout, \"F-SEARCH : Exponential\\n\");\n235 search = exponential_fsearch;\n236 break;\n237 default:\n238 fprintf(stdout, \"F-SEARCH : Unknown\\n\");\n239 return (EXIT_FAILURE);\n240 }\n241\n\n244\n245 /* perform intersection and run timings */\n246 for (i = 0; i < iopts->runs; i++) {\n248 /* perform intersect search */\n249 intersect_alg (iopts->data_files, search);\n252 }\n", "c function pointers function-pointers"], "2461821": ["Combining .net Regular expressions", "I am trying to merge two .net regular expressions into one. The following expressions are validating excel like cell names.\n\nThe first part ensures the cell name starts with a character and can be any length. The second ensures the cell name is not a cell reference; for example, A1, AA1, AA11, etc.\n", "Regex.IsMatch(name, @\"^[A-Za-z]{1}[\\w\\.]*$\") && \n !Regex.IsMatch(name, @\"^[A-Za-z]{1,2}\\d+$\");\n", "c# .net regex"], "920317": ["MySQL on Linux (Redhat) freezing with queries on large tables", "We have a server running LAMP which contains a number of zencart sites. We noticed a problem when trying to view orders in one of the sites and it timed-out. Now when I do:\n\nThe whole thing freezes, so does:\n\nNow the orders table should have around 42000 orders in it, do it's not THAT large. Can anyone reccommend any good diagnostic techniques to figure out whats going wrong?\n", "\"select * from orders\"\n", "linux mysql database lamp"], "3456129": ["How to access the Application[] collection from a WCF web service", "I used to use .ASMX web services, but I'm trying to move to WCF because it's the latest newest thing, and it's supposed to be better.\nAnyway, what I'm wanting to do is really really simple : create a webservice that empties the Application collection by calling Application.Clear(). In an ASMX web service, this is really really simple, because .ASMX webservices have full access to the Application[] collection. However, this doesn't really work in WCF.\nSo, here's my service contract :\n\nHere's my implementing class :\n\nAnd here's my .svc file :\n\nEverything compiles fine. However, when I call my webservice, FlushApplicationCache() throws a NullReferenceException, because Application[] is null.\nIs there any way to access the Application[] collection from a WCF webservice? Or do I need to go back to .ASMX?\n", "[ServiceContract]\npublic interface IFlusherServicePage\n{\n [OperationContract]\n void FlushApplicationCache();\n}\n", "wcf web-services application applicationstate"], "3499372": ["Multiple joins in linq", "I just learned how the work with asp.net and I am trying to write a linq-statement with multiple join, but I dont seem to make it work.\nI have 4 tables:\n\nCompetition (wich contains multiple rounds)\nRound (which has multiple entries)\nEntry (Which can appear be in multiple rounds)\nRoundEntry (which contains the primairy keys of Round and Entry to combine them)\n\nI want to you enter the page competition.aspx I want to display the entered entries within the different rounds.\nCan someone help me with the statement, as well a suggestion how to build up my page.\n", "", "asp.net sql-server linq join"], "4491711": ["Fragment not showing on actionBar tab select after orientation change", "I can't get fragments to work properly with ActionBar - when I change tab the fragment switches properly. But when I rotate the phone, then remembered fragment shows correctly (depending on what was selected) but I can't switch to the other tab. There is no error, nothing, and I don't know how to check what is wrong\n\n}\nI know I don't add the fragments when is not , but if this would be the case, why does the selected fragment show properly? Also, when I add the fragments, they overlay each other...\n", "MapHandlerFragment mMapHandler;\nVehiclesFragment mVehiclesFragment;\n\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n ActionBar ab = getSupportActionBar();\n ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n ab.setDisplayShowTitleEnabled(false);\n ab.setDisplayShowHomeEnabled(false);\n\n FragmentManager fm = getSupportFragmentManager();\n\n mMapHandler = new MapHandlerFragment();\n mVehiclesFragment = new VehiclesFragment();\n\n if (savedInstanceState == null) {\n\n fm.beginTransaction()\n .add(android.R.id.content, mVehiclesFragment)\n .add(android.R.id.content, mMapHandler)\n .commit();\n\n } else {\n\n fm.beginTransaction()\n .hide(mMapHandler)\n .hide(mVehiclesFragment)\n .commit();\n }\n\n Tab vehiclesTab = ab.newTab().setText(\"Pojazdy\").setTag(FRAGMENT_VEHICLES)\n .setTabListener(new MyTabsListener(mVehiclesFragment));\n ab.addTab(vehiclesTab);\n Tab mapTab = ab.newTab().setText(\"Mapa\").setTag(FRAGMENT_MAP)\n .setTabListener(new MyTabsListener(mMapHandler));\n ab.addTab(mapTab); \n\n if (savedInstanceState == null) { \n ab.selectTab(mapTab); \n } else {\n String selected = savedInstanceState.getString(SELECTED_TAB);\n if (selected == FRAGMENT_VEHICLES) {\n ab.selectTab(vehiclesTab);\n } else if (selected == FRAGMENT_MAP) {\n ab.selectTab(mapTab);\n } \n }\n}\n\n@Override\nprotected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putString(SELECTED_TAB, mSelectedTab);\n}\n\nprotected class MyTabsListener implements ActionBar.TabListener {\n\n private Fragment fragment;\n\n public MyTabsListener(Fragment fragment) {\n this.fragment = fragment;\n }\n\n public void onTabReselected(Tab tab, FragmentTransaction ft) {\n }\n\n public void onTabSelected(Tab tab, FragmentTransaction ft) {\n ft.show(fragment);\n }\n\n public void onTabUnselected(Tab tab, FragmentTransaction ft) {\n ft.hide(fragment);\n }\n}\n", "android android-fragments android-actionbar android-tabs"], "4009751": ["How to use set-user-ID bit on directories?", "I want all files in directory to be owned by , no matter who creates them. I'm trying this technique, but it doesn't work (on CentOS 5, under ):\n\nAs you see, the file is owned by , but should be owned by . What am I doing wrong?\n", "/home/alex/foo", "permissions file-permissions chmod chown"], "698843": ["Using script to generate many binary using xcode", "I have a project that I need to generate many iPhone apps, but they all with different name, icons, etc.\nIt will share the same code based but it will be deploy under different project name. \nFor example:\n\nI would like put this into script, so I can execute once and all the binary will be archive in organizer ready to be published.\nI have tried target, xcodebuild, scheme, build settings, but none of them works for my need.\nAny idea would be appreciated.\n", "The project: editions => \n Mag1_editions (com.foo.mag1_editions), \n Mag2_editions (com.foo.mag2_editions), \n", "xcode xcodebuild xcode-organizer"], "5920690": ["Space leak only in certain cases in GHC interpreter when doing: concat <some list> !! n", "I define my own version of , :\n\nIf I do in the GHC interpreter, it steals my memory at 300MB/s, and I have to kill it before it can summon the OOM killer. Note here that I load as \"interpreted\", I don't compile it before loading it.\n\ncode run in the GHC interpreter space leak?\nmyConcat (repeat [1,2,3,4]) !! (10^8) Yes\nconcat (repeat [1,2,3,4]) !! (10^8) No\nmyConcat (repeat [1,2,3,4]) !!! (10^8) No\nconcat (repeat [1,2,3,4]) !!! (10^8) No\n\nNow if I compile (), and then load it in the interpreter and re-run these tests, none of them space leak. Same if I compile each test case instead of running them in the interpreter.\nWhat's going on?\n\nI'm running GHC 6.12.3.\n", "concat", "haskell ghc"], "2447253": ["tee and grep at the same time (shell)?", "I'm trying to run a server that writes to $log (a txt file) and then find all the text in the logfile that starts with [1] and put it in another file. Here's my attempt. works along with everything else. The grep command doesn't though. \n\nWhat can be done to copy all the text from starting with [1] to another file?\n", "tee -a $log", "linux shell grep"], "2237503": ["Fear of using a Dependency Injection framework", "I have been reading up on Dependency Injection frameworks. I really fell in love with the idea of separating the concerns and letting the objects do their core work - which is undoubtedly an excellent and long-standing design principle!\nHowever the more I read on DI frameworks, the more I get worried:\n1) In the way they \"automagically\" resolve dependencies\n2) About the extreme complexities being introduced in the configuration files\nOn just the point #2, I have seen my customers spend millions of dollars to train the people on products of which the significant part was how \"not\" to touch config files. The administrators are now dreading these config files.\nNevertheless, I see another pattern called Service Locators where I could nicely assemble all the \"global\" services that I want at the start of my application (may be an application host or app context or whatever). Make this service locator globally available and voila!\nHowever I see that there will be less flexibility when using the Service Locator approach when I need more than one type of \"global\" service based on some criterion (known to whom?)!\nSo, here I am more confused than before on which direction to take. Though I like the design principle very much, the complexity in the existing frameworks are throwing me off!\nAre my concerns genuine? Anybody else feel the same? If so, is there any good alternative for such massively overwhelming \"frameworks\"?\nEDIT: Thanks everyone for excellent set of answers. I am now more convinced that DI is not that problematic and you can contain the mayhem of configuring the DI containers. I'd prefer to go the route of Autofac and see if I would stumble upon any issues.\nThanks StackOverflow!\n", "", "design-patterns dependency-injection service-locator"], "285111": ["Minimum Weight Disconnected Subgraph and \"Opposite\" problems", "Given a graph $G = (V,E)$ and a vertex weight $z_v$ for each $v \\in V$, find an (EDIT) induced subgraph $G' = (V', E')$ with minimum weight $z_{G'}=\\sum_{v' \\in V'} z_{v'}$ where $G'$ is disconnected (i.e., has 2 or more maximal connected components).\nThe maximum weight connected subgraph problem is known to be NP-hard by reduction from MINIMUM-COVER [1]. Is this \"opposite\" disconnected problem easier?\nAlso, maybe this deserves its own question, but are there interesting (non-contrived) cases where the \"opposite\" of a well-known hard problem is easy? Here's an attempt at defining opposite for vertex-weighted graph optimization problems:\nThe problem P is defined as follows. Given a vertex-weighted graph $G$, and a set $\\mathcal{S}$ of induced subgraphs of $G$, find an induced subgraph in $\\mathcal{S}$ with maximum weight. Then, the opposite of $P$ is defined as follows. Given a vertex-weighted graph $G$, and the set $\\mathcal{\\bar S}$ of induced subgraphs of $G$ that are not in $\\mathcal{S}$, find an induced subgraph in $\\mathcal{\\bar S}$ with minimum weight.\n(Note: since $z_v$ is not constrained to be positive, minimizing or maximizing is arbitrary. I switch only for aesthetics related to the term \"opposite\".)\n[1] http://prosecco.ucsd.edu/ISMB2002/nph.pdf\n", "", "ds.algorithms graph-algorithms"], "683535": ["Denormalize data or multiple-column key?", "I'm trying to make a judgment call in implementing a small-ish SQL Server '08 database.\nI'm translating an output text file of a flat-file database from an old COBOL system to the aforementioned SQL Server database. It's a database of vehicle and real estate loans, which can be uniquely identified by the combination of a Lender ID (a seven-digit number), bank account number (15 digits), and \"account suffix\" (two digits).\nI confess I'm pretty naive when it comes to database administration (to be honest, I've not really done it up until my current position), and I'm trying to determine which of two approaches are my best option for implementing a key which will index into several other tables:\n1) Identify each loan using a three-column key of the above values, or\n2) Denormalize the data by implementing a \"key\" column which is a 24-character string combining the three values.\nThe denormalization is ugly, granted, but I can't anticipate update anomalies occurring, since loans can't be passed back and forth between banks or change their loan suffix. A change in those values is guaranteed to be a different account.\nA compound key is more elegant, but I've read a few treatises suggesting that it's a Bad Thing.\nSo, which option is likely to be a better choice, and more importantly, why?\n", "", "sql-server denormalization compound-key"], "5906052": ["Ruby Object name to string", "I have a strange need that I can't find a good solution to.\nI've got a method that I will pass either an object, hash, or array to. And I want to be able to get the name of that object, hash, or array that i'm passing.\nHere is an example:\n\nThat would log something like:\n\nThis would just prevent me from having to do this:\n\nAny ideas on how to accomplish this?\n", "@user = User.find(5)\n\nlog_info(@user)\n\ndef log_info(obj)\n Rails.logger.debug(obj.to_s)\n Rails.logger.debug(obj.inspect)\nend\n", "ruby class object logging"], "4733506": ["ExtJS 4 - Grid Store 'sum' function always returning NaN", "I have a grid in which I need to perform 'sum' & 'average' operations on columns and display these values in an alert box.\nI am trying to use the 'sum' and 'average' functions of store but always the value returned in NaN.\n\nI have specified the 'type' as 'int' for these column in model but no luck. Also, I am calculating these values once the grid has been rendered and values are populated, but still value returned is NaN.\nCould anyone please guide that what could be going wrong?\nThanks in advance.\n", "storeCpEirDistByVoaGrid.sum('allocatedBr');\n", "extjs grid sum extjs4 store"], "431308": ["Windows CE ActiveSync TCP connection", "I have a .NET compact framework program that has my CE device open a socket to my PC over the USB cable's ActiveSync connection. Everything works fine, except when I'm trying to use a laptop that isn't connected to a network. Then the CE device throws a with an , which I tracked down as a error.\nAfter a bit of debugging, I discovered that the exception was being thrown because the DNS lookup (using ) was only returning a Loopback... and, obviously, the CE device isn't running the server code to accept the connection...\nSo, any ideas on how I could: a) trick my computer into thinking it's on a network, b) reference the machine a CE device is connected to via ActiveSync in a manner other than by its hostname, or c) some other option I don't know about yet?\n", "SocketException", "c#-2.0 windows-ce activesync .net-cf-3.5"], "4413567": ["loading shared libs has errors android", "I built an android application which uses the libcurlstatic.a, libssl.so,and libcrypto.so in native code and generates one more shared lib called libcurlapp.so ,, Here I would like to know that when ever I want to load this lib in my application is it necessary to load all the libraries or only libcurlapp.so will be enough ..?\n", "", "android-ndk shared-libraries static-libraries"], "3970769": ["How to use a gem in Rails 3 without referencing it in the Gemfile", "I'm wondering how to make a gem accessible in a Rails 3 app without putting a reference to it in the gemfile. I want to do this with ruby-debug (I'm using ruby-debug19). I use this to debug, but not everybody on my team does and forcing the dependency just so I can use it doesn't seem very diplomatic. Is there another way?\nIf it ends up mattering, I'm using Rails3, Bundler 1.0.0, Ruby 1.9.2, RVM, OSX Snow Leopard\nOn a side note, I had thought about using the gemfile group feature, but this doesn't feel right either. Groups seem great for things like factory_girl where there is an actual dependency albeit only in specfic environments, but with ruby-debug there is no real need for it to be there unless you want to use it.\n", "", "ruby-on-rails rubygems ruby-on-rails-3 gem bundler"], "2223294": ["How to upload file with form-post using c++ Qt-WebKit?", "So, when i was dealing with forms before what i would do is find web element that is part of the form input, set value of that form input by element.setattribute(\"value\", \"infoi want to add\")\nthen simply when i set value of form elements i click submit button of form.\nIs this possible to do with web-form input type=\"file\" and how can i do it?\nThanks \n", "", "qt webkit"], "2136171": ["Programmatically add a new file to TFS", "I am trying to add a new file to TFS source control using C#.\nCan anybody help me on the same?\nThanks,\nNaresh\n", "", "c# tfs"], "2668526": ["Need help understanding new Xcode 4.2 Master-Detail Application Template", "I'm having some trouble understanding how all the \"nuts and bolts\" of the Master-Detail Application template works using Xcode 4.2 (without MainWindow.xib, as well as other changes). In \"AppDelegate\" we have the following code:\n\nI see that the window is created programmatically instead of using the MainWindow.xib that was use in previous versions of Xcode in the beginning, as well as instantiating objects for both \"Master\" and \"Detail\" view controller classes that are provided with the template and using them for separate UINavigationControllers. Then the splitViewController property is assigned a new allocated UISplitViewController object assigning the detailViewController as the \"delegate\" and an array is created that contains both UINavigationControllers as \"viewControllers.\" Then the window.rootViewController is assigned this splitViewController object.\nThe main questions I have are \n1) Why do I need two \"UINavigationControllers?\" Couldn't I just create the \"viewController\" array using the \"master\" and \"detail\" view controllers themselves?\" \n2) What does it do setting the \"detailViewController\" as the \"delegate?\" What actually gets delegated? \n3) And finally, if I wanted to push additional items onto the \"DetailViewController\" stack, would I just use the \"DetailViewController\" class to push using the \"didSelectRow..\" method, or would I need to do updates to self.splitViewController.viewControllers property instead?\n", "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\n // Override point for customization after application launch.\n\n MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@\"MasterViewController\" bundle:nil];\n UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];\n\n DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@\"DetailViewController\" bundle:nil];\n UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController];\n\n self.splitViewController = [[UISplitViewController alloc] init];\n self.splitViewController.delegate = detailViewController;\n self.splitViewController.viewControllers = [NSArray arrayWithObjects:masterNavigationController, detailNavigationController, nil];\n self.window.rootViewController = self.splitViewController;\n [self.window makeKeyAndVisible];\n return YES;\n}\n", "uinavigationcontroller ios5 uisplitviewcontroller xcode4.2"], "900076": ["Add the word \"Algorithm\" before each entry in the List of Algorithms", "I'm trying to add the word \"Algorithm\" before each entry in the List of Algorithms (because of unavoidable thesis guidelines). \nI saw similar questions but the solutions listed there don't work for me. I'm not sure about reopening those questions, hence posting it separately. Apologize if that's not the right etiquette. \nIs it possible to change the way a list of algorithms is generated to include the word \"Algorithm\" before each element in the list? (I'm using \"algorithm\" package instead of \"algorithm2e\")\nAdd algorithm label to list of algorithms (not sure if solutions listed there require other packages as listed solutions don't work for me)\nCurrent output:\n\nDesired output:\n\nHere's a simplified code sample that illustrates the issue. Your help is much appreciated. Please let me know how to get desired behavior for this sample.\n\n", "List of Algorithms\n1 Optimization . . . . . . . . 3\n", "table-of-contents algorithms"], "5081420": ["wxPython RichTextCtrl much slower than tkInter Text?", "I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results.\nIn order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text Area with some words having different colours.\nThe tkInter implementation uses object and to apply the colours to the words uses tags (configured with the method and passing them to ), and the measured while outputting about 400 different coloured words is < 0.02s.\nThe wxPython implementation uses and to apply the colours to the words uses and then ; the performance is ridiculous, it takes abut 1.4s to do the same job that only took 0.02s to the tkInter port.\nIs this an intrinsic problem of the RichTextCtrl widget, the wxPython bindings, or there is some way to speed it up?\nThanks!\n", "Tkinter.Text", "python performance wxpython tkinter richtextediting"], "2923967": ["iPhone app designing tutorials", "I need to design stylish iphone apps(from photoshop designs).Is there any good tutorials which helps the designing implementation simpler?\n", "", "iphone design photoshop"], "4101962": ["It is possible to encounter horrible bugs if I place a main loop that uses `query_posts` right above the main bbPress loop?", "This is the code:\n\n\nThe first loop list the 2 most voted replies. The second bbPress loop list all other replies in DESC order.\nWill I encounter bugs if I have these two loops in a same file template? \n", " <?php get_template_part( 'pagination', 'bbp_replies' ); ?>\n\n <?php query_posts('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2'); ?>\n <?php while ( have_posts() ) : the_post(); ?>\n <h2><?php the_title(); ?></h2>\n <?php the_content(); ?>\n <?php endwhile; ?>\n <?php wp_reset_query(); ?>\n\n <?php while ( bbp_replies() ) : bbp_the_reply(); ?>\n\n <div class=\"topic-entry\">\n\n <div class=\"topic-author\">\n <?php bbp_reply_author_link( array( 'type' => 'avatar' ) ); ?>\n <?php bbp_reply_author_link( array( 'type' => 'name' ) ); ?>\n <?php printf( __( '%1$s', 'bbpress' ), get_the_date() ); ?>\n </div>\n\n <div class=\"topic-content\">\n <?php bbp_reply_content(); ?>\n <span class=\"like-counter\"><?php DisplayVotes(get_the_ID()); ?></span>\n </div>\n\n <?php bbp_reply_admin_links(); ?>\n\n </div>\n", "loop bbpress"], "2764405": ["postgis with ruby on rails query multipolygon", "If i make a query on my postgis database to get my districts, i get the following returned for my LatLon column:\n\nBut how am i supposed to work with this in my java android app?\nThe structure seems not to be correct.. Because if i want to start working with it.. i first have to cut out the parentheses and then the \"MULTIPOLYGON\". This seems not very comfortable too me...\nShouldnt it be more like the following? If yes, how can i achieve this kind of output format?\n\n", "SELECT id, ST_AsText(latlon) AS geom FROM district;\n\nMULTIPOLYGON(((16.4747103091463 48.2753153528078,16.4744319731163 48.275314069121,16.4743511374383 48.2753128173411,16.4743147576862 48.2753108825757,16.474247514683 48.275304398381,16.474205201686 48.2753004022899)))\n", "android json postgresql postgis jsonarray"], "344159": ["How to write and read the byte array to DataInput and DataOutput Stream", "Hbase acts as a source and sink for my Map reduce job. I have written my custom writable class called (vector writable) and it has two fields in it. \n\nMy mapper emits this as its value, hence I have implemented write and read methods in my vectorWritable class\n\nI get a NullPointerException when I try to read the rowKey from the input stream. The readVector method works fine though and I am getting the right value.\nHow can I write the byte array in the DataInput Stream so that I could retrive it in my Output streams \nUPDATE : SOLVED\nThis is the update of my rowKey method which works fine. Thanks @Perception\n\n", "private DoubleVector vector; // It is a Double Array\nprivate byte[] rowKey; // The row key of the Hbase \n", "java hadoop bytearray hbase datainputstream"], "2233926": ["Solution to sync files on 2 computers in 2 remote locations", "My friend runs 2 osteopath clinics and works between the 2 locations with another osteopath (they rotate which days they work in each clinic). A laptop stays at each clinic, and until recently were simply using a USB stick to backup all their electronic files. When either went to the other clinic they would manually \"sync\" their files across the 2 computers (using the USB stick).\nAfter the London riots they realised they need to be smarter (one clinic was ransacked, laptop stolen).\nWhen they first asked me I suggested an online backup service like Mozy, but now I understand they don't just want online backups, but to also use the service to keep the files on both laptops in sync so they can access the same file in either location.\nWhat services/software are available? I'm not sure Mozy will work. Has anyone else setup something similar?\nAdditional Info:\nIt needs to be idiot-proof (both users are technophobes), and considering the confidentiality of a lot of the data - security is paramount. Last night's comments are raising that encryption is a must (I just assumed that solutions like Mozy would be encrypted and secure).\nThey're not looking for free - although \"enterprise\" is probably out of their league.\n", "", "sync online-backup"], "1634590": ["Override jQuery style value", "To resolve a jQuery slideDown/Up problem, I had to change one line in the jQuery file.\nI changed line 5738 from\nthis.elem.style.display = \"block\";\nto\nthis.elem.style.display = \"inline-block\";\nThe block attribute messed up my lists when using slideDown/Up/Toggle. slideDown changes my list from display:inline to display:block during execution, and then back to display: inline again. It would be much better if it was inline (or inline-block) all the way. Is there a way to override the value stated above from my html page, or do I have to stick with my modified jQuery file?\nIt would be nice if I could override the style attribute only when I perform\n$('.gallery_container li:gt(4)').slideToggle();\nHere's the code:\nhttp://90.230.237.71/gandhi.html\n", "", "jquery coding-style override attributes"], "3269383": ["What is the best practice to create a Excel 2007 Workbook", "I want to know what is the best practice to create a Excel 2007 Workbook using C#, with its datasource being a raw flat file or a table in database.\n", "", "c# excel-2007"], "5348172": ["Specify formatting information in Excel forumla", "Is there a way to specify the formatting in an excel formula?\n\nWhere \"BIG\" is of a font size larger than the text for \"small\"?\n(I'm aware of conditional formatting. That's not what I'm after.)\n", "=IF(A1=\"Large\",\"This is BIG\",\"This is small\")\n", "microsoft-excel formatting formula"], "5171163": ["Turn URL encoded string into UTF-8", "Yesterday I faced problem about getting some Unicode strings from URL. Actually I use CodeIgniter and the URL segments will be passed into controller/function(parameters). I don't know is it the CI changes the encoding or it's something else. I have the right encoding in my HTML page in the content and in the address bar till I get those Unicode segments. \nFor example:\n\nThe last segment is perisan characters which is under UTF-8. It's present correctly in everywhere but when I get it in my code It will turn to something like this:\n\nI tried to change it to UTF-8 with but it didn't. Both my HTML page and Controller file are formatted as UTF-8 Without BOM.\nPeace Out!\n", "localhost/df-gamez/news/\u0627\u0641\u062a\u062a\u0627\u062d-\u062c\u062f\u06cc\u062f-\u0633\u0627\u06cc\u062a-\u062a\u06cc\u0645-\u062f\u0631\u06cc\u0645-\u0641\u06a9\u062a\u0648\u0631\u06cc\n", "php codeigniter url character-encoding"], "3611338": ["Anything speaking against the bitnami.org Ruby/Rails/Redmine Stack?", "I am looking to set up a Redmine server on a Windows virtual machine on my local workstation. (Background in this related question.) \nI have zero knowledge of Ruby nor Rails, and while Redmine may be the opportunity to dip into those platforms somewhat, my first goal is to get it running as quickly and easily as possible. For that, I am eyeing the Bitnami Redmine Package. It promises point-and-click install, and a self-contained environment with everything you need.\nApart from the learning factor, are there any serious limitations this method implies? Any serious cutdowns in customizability? I will be wanting to customize the template right away, for example, and install plugins. The package looks o.k. to me but before I install it, I was curious to know whether anybody would advise against it and why.\n\nEdit: The first impression is great. From 0 to a working Redmine installation in twelve minutes! Wow.\n\n", "", "ruby-on-rails ruby redmine bitnami"], "3425056": ["Recursively chmod/chown/chgrp all files and folder within a directory", "I am working on a site which builds other sites. Some if it I use copy() to create the files and directories, other times I'm building XML files in php and using DOMDocument::save to save them. The end result is a root folder with all sorts of messed up permissions. I've beening modding files and folders as I go, which words to some extent, but I'm particularly having trouble when it comes to using .\n(This is where I'm at so far http://pastebin.com/SBE8vtFX, attn: )\nI want to take a different approach and recursively chmod/chown/chgrp all the files and folders within my document root to my specifications at once.\nTake for example the document root\n\nand within I have\n\n\nMy question:\nHow can I mod all files within a specified directory at once? I want to differentiate different chmod settings between directories and folders as well. This needs to be a PHP solution.\nThis is as far as I can get\n\n", "copy()", "php recursion cron file-permissions chmod"], "5930134": ["Getting rowcount of a common table expression CTE into a parameter for paging", "My friend here is coding a web page with a datagrid that has paging. We were able to get the total pagecount into a column as a window function but we can't figure out how to get it into a parameter. Seeing the code will make more sense:\n\nI can't get the parameter from the last select because you can't set parameters when you're also returning values. I was hoping there's be some way to do this but in the meantime (which may be an equally good solution) we are just returning this in the dataset and pulling the pages count in code from the dataset instead of through an output parameter. Make sense? Let me know if you know of a way to get this into a parameter! Thanks!\n", " DECLARE @StartRow INT\n DECLARE @EndRow INT\n DECLARE @PerPage INT\n DECLARE @PageNumber int\n SET @PerPage = 30\n SET @PageNumber = 1\n SET @StartRow = ( ( @PageNumber - 1 ) * @PerPage ) + 1\n SET @EndRow = ( ( @PageNumber ) * @PerPage ) ;\n WITH cte\n AS ( SELECT ROW_NUMBER() OVER ( ORDER BY Name ) [row]\n , Name\n , COUNT(*) OVER ( ) AS [rowcount]\n FROM table )\n\n SELECT row, Name, ( [rowcount] / @PerPage ) + 1 AS [pages]\n FROM cte\n WHERE row BETWEEN @StartRow AND @EndRow\n OR ( @PageNumber = -1 )\n", "tsql paging"], "65865": ["PNY GeForce video cards", "I don't remember PNY making video cards, but then I noticed that there were some GeForce video cards that said PNY on them. I thought NVidia made GeForce. How good are those cards? Why does the box say PNY if NVidia makes them?\n", "", "graphics-card nvidia-geforce"], "4236043": ["Factorization over a relatively minimal surface", "Let $A$ be a DVR with an algebraically closed residue field $k$. Consider a morphism $f: X \\to Y$ of arithmetic surfaces (regular integer projective and flat schemes over $A$ of dimension 2), such that $f$ induces a finite morphism on generic fibers. Assume that $X$ and $Y$ are semistable, the generic fibers of $X$ and $Y$ are smooth, and $Y$ is relatively minimal, i.e. does not contain any exceptional divisor.\n\nQ: Is there any chance that $f$ factors through a birational map $X \\to X'$, where $X'$ is a relatively minimal surface?\n\nAs far I understand, the answer lies in the consideration of an irreducible component $C$ of the closed fiber $X_k$ of $X$, which is isomorphic to $\\mathbb P^1_k$ and intersects the other components of $X_k$ in exactly one point. With respect to the morphism $X \\to X'$ the component $C$ is then contracted. If $f$ contracts $C$, so $f$ can possibly factor through $X'$. But in general (it seems to me) it could happen, that $f(C)$ is irreducible and intersects the other components of $Y_k$ in at least two points.\n", "", "algebraic-geometry algebraic-curves"], "1103514": ["how to protect android app from .apk backup apps", "How to prevent an android app from the apps which can make backup of .apk file.\nApps like astro file manager lets user to do so, menu: tools -> backup more info here\nand one can backup any installed apk on sdcard.\nLater on, i can rename it to .zip and extract it, and can easily steal DRAWABLE / ASSET\nfrom that app.\nMy question is, How do i protect my app from such backup?\n", "", "android backup apk astro"], "3432837": ["Mysqli looping with query inside", "\nIs what I have. Yet it only loops one time when there are actually 4 rows? Thanks.\n", "$dungeon = 0;\nif($stmt->prepare(\"SELECT id,name FROM `dungeons` WHERE id > ?\")) {\n$stmt->bind_param('i',$dungeon);\n$stmt->execute();\n$stmt->store_result();\n$stmt->bind_result($id,$name);\n$stmt2=$stmt;\nwhile($stmt->fetch()) {\n echo \"<th>\".$name.\"</th>\";\n $query = \"SELECT COUNT(id),AVG(dungeon_percent),MAX(dungeon_percent) FROM `users` WHERE dungeon_current = ?\"; $what=$id;\n $stmt2->prepare($query);\n $stmt2->bind_param('i',$what);\n $stmt2->execute();\n $stmt2->store_result();\n $stmt2->bind_result($howmany,$avg,$max);\n $stmt2->fetch(); \n echo \"<td align='center'>\".$howmany.\"</td><td align='center'>\".round($avg).\"%</td><td align='center'>\".$max.\"%</td></tr>\";\n }\n}\n", "while-loop mysqli"], "3152130": ["Split an ikiwiki", "I am trying to split an ikiwiki into two wikis.\nSuppose I have an ikiwiki called myiki (compare this question from ikiwiki.info), which contains the pages\n\nnow I want to have two wikis called and , such that:\n\n contains \nThe history of should contain the whole history of those pages, but no history of \n\nand:\n\n contains pageB1,pageB2,...\nThe history of should contain the whole history of those pages but no history of \n\nIn a first step I made a copy of my and tried to remove a page named like this (note that in the there are files called and directories as well).\nTo do so, I did this command:\n\nAny Idea what's wrong with it?\nIs there a way to give a list of pages and split the wiki as described above?\n", "pageA1,pageA2,...,pageB1,pageB2,...\n", "git wiki ikiwiki"], "2314046": ["How to use the google drive api without allowing users to install chrome webstore apps?", "I've made a drive application that does some actions with files inside a google apps domain. To use the drive api in an apps domain I had to put allow users to install webstore apps on. But I don't really want users to install chrome webstore apps. \nIs there a possibility to allow users to use the drive api within our domain without allowing them to install Webstore apps?\nThis is the error I get when it's off :\n403 The domain policy has disabled third-party Drive apps.\n", "", "google-drive-sdk google-apps"], "5306922": ["How can i create another view? Cocos2d", "i want to create a new view in Cocos2d programmatically \ncan you help me on how can i do this? thanks\n", "", "iphone ios cocos2d-iphone"], "1464983": ["Custom Search ASP.NET", "I want to implement a simple search textbox, in which user can search for any content of the site by specifying keyword.\nAdmin should be able to configure the search results, i.e. he can enable/disable any keyword, so page related to that keywords will not be displayed in search results.\nI do have one option in my mind...\nWe can put a xml file which is editable by admin, xml file will contain keyword and url related to that keyword, so admin can enable/disable it at anytime.\nBut not sure how much reliable it is!\nPlease Share your Ideas...\n", "", "asp.net xml search admin results"], "2418372": ["Error when trying to install SignalR package using nuget", "I want to install SignalR using (Add Library Package Reference). I can search and find it (). When I click on install this errors appear:\n\nId is required.\nversion is required.\nauthors is required.\nDescription is required.\n\nWhat I have to do? \n", "Microsoft.aspnet.signalr", "asp.net asp.net-mvc nuget signalr"], "57119": ["How to link to a self-created site in pinax(0.9a2)?", "I have to implemented two links in my navbar! However I want to add a project written by myself to the site! The first step is to link to the site.\nHow to do that?\nI appreciate your answer!!!\nUPDATE\nI tried it with simply writing the path into the ref link, but I get:\nPage not found (404)\nmy folder is in my template directory: \n\nWhats my mistake?\n", " <li id=\"tab_first\">\n <a href=\"functionality/function.html\">First Usecase</a>\n </li>\n", "python django navigation pinax"], "3958749": ["How to view JavaScript error messages in Safari 6 (Mountain Lion)", "I'm using Safari 6 that came with Mountain Lion. They changed everything about the web inspector and I'm lost.\nWhen I get an uncaught JavaScript error Safari helpfully pauses execution, zooms to the file and line that's broken, displays the call stack on the left and local variables on the right.\nBut where is the text describing the error? It's not in the logs. None of the little tabs on the left or right show anything.\n", "", "javascript safari osx-mountain-lion"], "1780260": ["iText datamatrix generation problem", "I am attempting to generate datamatrix barcodes from within itext. This works fine for most of my codes but not for some codes. One example is:\n\nHEnSh0701003-2V1\n\nThis produces a non square barcode for some reason. When I use encoders from other companies (such as IDAutomation) I do get a valid square barcode.\nDoes anyone have an idea why this is happening? I am looking for a solution so I can use the embedded iTest DataMatrix class and not have to use a third party one.\nA sample of the code I am using:\n\nwhere bcd is a PdfTable with 2 columns.\n", "BarcodeDatamatrix bar = new BarcodeDatamatrix();\n bar.setOptions(BarcodeDatamatrix.DM_AUTO);\nbar.generate(\"HEnSh0701003-2V1\");\nbcd.addCell(bar.createImage());\n", "java itext barcode"], "3098960": ["div acting like overflow:hidden even when set to visible in IE7", "I wrote a jQuery lightbox plugin, but I cannot figure out why the wrapper div is acting like it has on in IE7.\nI tried setting it to and , but it's still clipping the child element that's absolutely positioned over the margin.\nWorks fine in IE9 in IE7 browser mode. Shows up in IE7 on my WinXP virtual machine.\nThis bug is not reproducible. I tried simplifying to the bare elements in jsfiddle, but the bug did not reoccur.\n[solved, so removed link]\n", "overflow: hidden", "jquery css overflow hidden ie7-bug"], "1237186": ["Finding square roots of $\\sqrt 3 +3i$", "I was reading an example, where it is calculating the square roots of $\\sqrt 3 +3i$.\n$w=\\sqrt 3 +3i=2\\sqrt 3\\left(\\frac{1}{2}+\\frac{1}{2}\\sqrt3i\\right)\\\\=2\\sqrt 3(\\cos\\frac{\\pi}{3}+i\\sin\\frac{\\pi}{3})$\nLet $z^2=w \\Rightarrow r^2(\\cos(2\\theta)+i\\sin(2\\theta))=2\\sqrt 3(\\cos\\frac{\\pi}{3}+i\\sin\\frac{\\pi}{3})$.\nBut how did they get from $\\sqrt 3 +3i=2\\sqrt 3\\left(\\frac{1}{2}+\\frac{1}{2}\\sqrt3i\\right)=2\\sqrt 3(\\cos\\frac{\\pi}{3}+i\\sin\\frac{\\pi}{3})$?\nAnd can one just 'let $z^2=w$' as above?\nEdit:\n$w=2\\sqrt 3(\\cos\\frac{\\pi}{3}+i\\sin\\frac{\\pi}{3})=z^2\\\\ \\Rightarrow z=\\sqrt{2\\sqrt 3}(\\cos\\frac{\\pi}{6}+i\\sin\\frac{\\pi}{6})\\\\ \\Rightarrow \\sqrt{2\\sqrt 3}\\frac{\\sqrt 3}{2} +i \\sqrt{2\\sqrt 3} \\frac{1}{2}$\n", "", "trigonometry complex-numbers"], "5611190": ["get process name, pid and port mapping from netstat command in SunOS", "I am trying to get the mapping of port number to application that is running/using the port in SunOS\n\nIt seems the -t option is illegal in SunOS. \nhow can i get this mapping?\n", "$netstat -tlnp\nnetstat: illegal option -- t\n", "linux parsing command sunos"], "4599968": ["Simple algebra over a field of char zero", "Let $A$ be an associative finite dimensional simple algebra over a field $K$ of charicteristic zero. Prove that $A$ can not have a basis consists of nilpotent elements.\n$Remark$: The statement is true if $A$ is algebraically closed, since by first structure theorem $A$ is isomorphic to a matrix space over a division algebra, for example $Mat_{n \\times n}(D)$; but all division algebras over an algebraiclly closed field is the field itself, so one may prove by contradiction by examine $Mat_{m \\times m}(K)$ and get a contradiction based on trace analysis.\nHowever if $K$ is NOT algebraically closed then one can't work on matrices over $K$? Is there a way to prove the assertion by merely using $char(K)=0$ but WITHOUT using anything related to algebraically closeness? (also without extend $K$ in any form: I know one can consider $\\bar A =A \\otimes_{K} \\bar K$ as an algebra over algebraically closed field $\\bar K$ and deduce $A \\otimes 1$ is nilpotent based on the nilpotency of $\\bar A$, however this still uses algebraic closeness, which I intend to avoid)\n", "", "abstract-algebra representation-theory"], "4928449": ["Linq mapping between models", "I have a data-model for Entity Framework in which some entities have a collection of attributes that can be used to add extra information. Some clients would like to map these attributes to 'real' properties of their own domain-model. An example data-model is:\n\nAnd an example domain-model is:\n\nI can fairly easily map the entities between eachother, but I would like to be able to map Linq expressions between the two so that in the client, it would be , but this is mapped to - for example:\n\ncould be mapped to:\n\nWhat would be the best way to do this - perhaps write a QueryProvider that walks the expression tree and translates it to one that uses the Data model - a Linq-to-Linq-to-EntityFramework?\nThanks.\n", "public class DataEntity { \n public Guid Id { get; set; }\n public virtual ICollection<Attribute> Attributes { get; set; }\n}\npublic class DataAttribute {\n public Guid Id { get; set; }\n public String Name { get; set; }\n public String Value { get; set; }\n}\npublic class DataStringAttribute : DataAttribute {\n public String Value { get; set; }\n}\npublic class DataInt32Attribute : DataAttribute {\n public Int32 Value { get; set; }\n}\n", ".net linq linq-to-entities expression-trees"], "5996693": ["If link has mailto in href, don't run script", "I have a script that automatically turns text emails into \"mailto\" links. But, if a \"mailto\" link already exists, would it be possible to say, \"Don't run this script on this link.\" with jQuery? Thanks!\nHere's my script:\n\n", "jQuery('body').filter(function(){\n var html = jQuery(this).html();\n var emailPattern = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}/;\n var matched_str = jQuery(this).html().match(emailPattern);\n var href = window.location.href;\n if(matched_str){\n jQuery(this).html(html.replace(emailPattern,\"<a href='mailto:\"+matched_str+\"?subject=Inquiry Through Website&body=%0A%0A%0A--%0A\"+href+\"'>\"+matched_str+\"</a>\"));\n return jQuery(this)\n }\n})\n", "if-statement hyperlink mailto"], "5903896": ["Advantage of having a secondary DNS next to client's country?", "We are considering moving one of our two DNS our clients use to the country where 90% of them live (the other will stay in the US).\nDo you think they'll notice an advantage of site loading performance? Even if it's small, we would like to know if going forward with this change will help in any way or if it's pretty useless.\n", "", "dns ip nameserver geolocation"], "5110091": ["Do I need two seperate Facebook applications for an iOS app and my site?", "I have a website that uses Facebook to authenticate users. I'm creating a mobile application that's tied to the site, and I want to offer a similar \"connect to Facebook\" functionality. Do I need to create multiple Facebook applications, each with their own unique application id for the different \"platforms\"?\nI've tried reading through the documentation, but I haven't found anything that guides me one way or the other. Would the same answer hold true for Twitter and / or Foursquare?\n", "", "ios facebook twitter titanium"], "2793278": ["mysql geographic replication", "I have been reading lots of docs, blogs,articles.. talking about Mysql Replication and i dont know how to solve it.\nWe need a failover and redundant solution to our basic data base. So the idea is to buy a new server to have some geographical failover solution.\nThe initial idea was to store one master database into server A and another master replica into server B, making a master-master replication. But whe want synchronous replication in order to ensure data consistency.\nSo we test the Mysql Cluster, but im so confused because Mysql official docs says that only should work on local networks. And the other problem is the comunications security.\nWe have 1.40 ms latency between the two servers.\nWhat should be the best option?? i mean there is no safe option for synchronous redundant data bases between diffenret data centers?\nHow big companies solve it? or it's imposible to have geographical redundancy + failover solution + data consistency\nThx All \n", "", "mysql replication cluster-computing"], "3540514": ["Does AJAX loading hurt search engine optimization?", "I am building a blog for myself. Because it is relevant, here is the link: http://www.codetunnel.com. As you can see the page loads via AJAX so that I can do some stylish loading effects, among other things. It's actually a web-terminal that accepts commands and arguments and processes them via ajax; my URL structure executes these commands based on the URL passed in so that different pages can have unique URLs even though they are loaded via ajax. I've done past projects like this but have never cared much about optimizing the site for search engines, until this one.\nWould a blog post being loaded via AJAX hurt its ability to be found by web crawlers? I'm assuming it would but I want your opinions before I decide how to move forward.\nThank you!\n", "", "asp.net-mvc ajax jquery-ajax seo seo-friendly"], "1515045": ["how can I diff two sections of the same file?", "I have a source file with two similar yet subtly different sections. I'd like to merge the two sections into one subroutine with a parameter that handles the subtle differences, but I need to be sure I'm aware of them all so I don't miss any.\nWhat I usually do in such cases is copy each of the sections to a separate file and then use tkdiff or vimdiff to highlight the differences. Is there any way to skip the intermediate files and just diff two parts of the same file?\n", "", "linux language-agnostic diff"], "168554": ["Using views to find list of users nearby using location in arguments", "I am using drupal 6.X\nI am creating an api through views and views datasource module \nin which i will add the latitude and longitude of the location in the end of the url as we define the arguments in the view so that i can get the list of users in the order of the nearest first. \n", "", "drupal geolocation drupal-views reverse"], "5984048": ["comparing two files", "I have two file\nfile1 contents are as below\n===================================================\n\n===================================================\nfile2 contents are as below\n\n===================================================\nI want difference of two as below\n\nIs it possible to write script in perl with above requirement\nany help will be much appreciated\nThanks & Regards\nMahesh\n", "OUTPUT1:---------\n orange\n india\n US\n\nxx\n\nOUTPUT2:---------\n\n orange-1\n india-1\n US-1\nxx\n", "perl comparison diff"], "4967459": ["404 Error when opening a link in the \u201cSite Pages\u201d list in SharePoint 2010", "I am very new SharePoint development and have inherited an existing SharePoint development installation on a VM Ware image. Everything seems to be working correctly with one exception, so far. \nWhen I visit the site and select \"Site Actions -> View All Site Content -> Site Pages\" I see a list of 6 pages. Two of these pages came with the installation of the SharePoint site (\"Home\" & \"How to Use This Library\"). There ae 4 pages there that are custom and were developed by the previous developer. When I click on either of the two that came with the SharePoint Site they open up as expected, however when I attempt to open any of the four new pages I get a 404 Error - \"The resource cannot be found\".\nI am assuming that there is some configuration setting that is missing or incorrectly set. Any help or guidance would be appreciated. \nThanks,\n-g\n", "", "sharepoint-enterprise"], "4977302": ["Combination problem with constraints", "You have four containers and one pitcher of water that holds 100L. Each container has different capacities with maximums of, say...70L, 45L, 33L and 11L levels respectively.\nWhat is the formula that can be used to solve the number of all possible combinations that a total (in this case, 100L of water) can be poured among a number of containers (70L, 45L, 33L 11L), each having a different maximum level?\nI have looked into the binomial coefficient, $\\displaystyle \\frac {n!}{r!(n-r)!}$, but this would solve for the number of combinations if the containers have the same maximums, not varying maximums.\nGenerating functions can solve for combinations with constraints, but what about a formula that could be plugged in straight away so that you can find just the answer to the single coefficient and total that you are looking for; not all the possible coefficients and all the possible totals for those sets. I am having trouble understanding how this can be achieved using generating functions or any other method.\nCan you draw a formula to solve the number of combinations by knowing the following: the number of sets and their maximums, and the total number that can be divided among them? \nHere is another example: ${[0-5] + [0-15] + [0-24] + [0-35] + [0-51]}$. The total must be 60. \n", "", "combinatorics group-theory binomial-coefficients permutations generating-functions"], "5921431": ["UISearchDisplayDelegate how to remove this opaque view?", "how can i programmatically show/hide this opaque view from UISearchDisplayController?\n\nProbably in or i need to set something... but what?\nthanks.\n", "searchDisplayControllerWillBeginSearch", "iphone objective-c ipad uisearchbar uisearchdisplaycontroller"], "3433134": ["Failed to load late-bound plugin: org.apache.maven.plugins:maven-resources-plugin", "We have our local Maven repository which was working fine till yesterday.\nToday we are getting the following error while building any project.\n\nWe haven't change any settings. Any idea?\n", "Failed to load late-bound plugin: org.apache.maven.plugins:maven-resources-plugin\n", "maven-2"], "5942547": ["Make Vertical Scrollbar in DataGridView not Snap to Cell Top", "So, I have a DataGridView that has multi-line data. I set the default cell style to have wrap turned on for cells so that the multi-line data is displayed rather than it all being on one line. However, when the data is larger than the DataGridView height the vertical scroll doesn't really work well. It snaps to the top of the cells such that the stuff that is beyond the height of the DataGridView is never visible. When I scroll with the scroll bar it just snaps to the top of the next cell, so I never get to see all the contents of the multi-line cell. Is there a way to add a scroll bar to the cell, or preferably a way to make the DataGridView scrollbar not snap to cell tops?\n", "", "datagridview scrollbar scroll snap"], "1887959": ["Heroku push rejected, failed to install gems via Bundler", "I am struggling to push my code to Heroku. And after searching on Google and Stack Overflow questions, I have not been able to find the solution. Here is What I get when I try \"git push heroku master\" :\n\nAnd finally:\n\nThanks for your help!\n", "Heroku receiving push\n-----> Rails app detected\n-----> Detected Rails is not set to serve static_assets\n Installing rails3_serve_static_assets... done\n-----> Gemfile detected, running Bundler version 1.0.3\n Unresolved dependencies detected; Installing...\n Fetching source index for http://rubygems.org/\n /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:300:in `open_uri_or_path': bad response Not Found 404 (http://rubygems.org/quick/Marshal.4.8/mail-2.2.6.001.gemspec.rz) (Gem::RemoteFetcher::FetchError)\n from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:172:in `fetch_path'\n.\n....\n", "ruby-on-rails rubygems heroku ruby-on-rails-3 bundler"], "2960808": ["Can't reconnect to my RDP session", "I use a VM through RDP. When I'm done for the day, I just disconnect the session and reconnect in the morning. That allows me to pick up what I was doing and not close all the applications. As I'm the only user, this generally works well.\nToday, I can't reconnect to my session from yesterday. When I RDP, I get a new session. When I run , I can see my other session:\n\n USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME\n me rdp-tcp#82 1 Active 15:00 4/22/2010 9:00 AM\n>me rdp-tcp#91 2 Active . 4/30/2010 9:00 AM\n\nIf I try to use Terminal Services Manager to remote control the other session, I get this error:\n\nSession (ID 1) remote control failed\n(Error 7044 - The request to control another session remotely was denied. )\n\nIs there any way to reconnect to this session, or do I need to just kill it?\n", "query user", "windows-server-2003 rdp"], "4459583": ["Can epoll/libevent/libev work with UDT?", "I'm building a high concurrency server which needs to handle tens of thousands of active sockets. I initially used epoll to build a event-based server and it worked well under moderate scale(several thousands of active sockets). But it seems to become unstable when I have a concurrency more than 10,000 sockets. So I'm considering about libevent(or libev) since it's a mature project and claim to be able to \"handle tens of thousands of active sockets\". \nI'm also thinking of using UDT because it's a \"reliable UDP\" and I start to have problem with TCP due to the overhead and memory usage. So a natural thought is to use libevent as my event frame work and UDT as transmission protocol. I know that UDT provides its own set of epoll operations. Does it mean that it won't be working with regular linux epoll? If so it won't be working with libevent or libev because they are built based on Linux epoll.\nIs there anyone who have worked on both UDT and epoll / libevent / libev? Can UDT work with any of them?\nAny help wold be appreciated.\nThanks.\n", "", "events epoll libevent udt libev"], "5302629": ["Keyboard Hook and Change User Input", "I want to write a software that intercepts the user input and changes it. In late windows 98 and before our language wasn't supported officially so programmers decided to invent a writing method based on ASCII characters (ArmSCII) and a font so that we could write in our language. The software is just changing the english inpur to relevant characters in ArmSCII. The program is now old. I want to write a new one. and it should be system-wide. Any suggestions how can I hook into keyboard and change the input? C , C++ or C# that doesn't matter. Im fine with all of them..\n", "", "c# c++ winapi keyboard hook"], "4928681": ["App crashes on pressing back button", "app crashes when pressing back button\nlog description:-\n[FootballScoreBoardViewController bannerViewDidLoadAd:]: message sent to deallocated instance 0x5aae9e0\nIthink this method is not called but how to sort the problem\nPlease help\nThanks in ad\n", "", "iphone objective-c iphone-sdk-4.0 iphone-sdk-3.0"], "5904538": ["How do you reliably control sub process lifetime without having nested job objects?", "The MSDN page on Job Objects explains:\n\nA process can be associated with only one job. Jobs cannot be nested. The ability to nest jobs was added in Windows 8 Consumer Preview and Windows Server 8 Beta.\n\nUnfortunately, it seems that this is just what I need. I'm dealing with a process tree like this:\n\nI try to implement the following behaviour:\n\nIf gets terminated somehow (because it crashes, or because the user decides to terminate it using the task manager, or simply because it finishes executing), it takes down all processes beneath it. I use a job object for this.\nIf or terminate for some reason, they take down all processes beneath them. Unfortunately I cannot use job objects here since job objects don't nest.\n\nAs it is, I often manage to create 'dangling' processes by killing arbitrary processes in the above tree. I try to avoid leaving any stale processes behind, but all solutions I've come up with so far rely on some sort of watchdog process which monitors other processes - but if the watchdog itself gets killed, all hope is lost.\n", "server.exe\n |\n +--+ utility.exe\n |\n +--+ launcherA.exe\n | |\n | +--+ programA.exe\n | |\n | +--+ subProcessA.exe\n |\n +--+ launcherB.exe\n |\n +--+ programB.exe\n", "c++ c winapi"], "1648873": ["What is the relationship between Mackey's theorem in character theory and Mackey's theorem in transfer theory?", "Here are the statements of the two theorems. The first statement I took from a paper I have been reading, but I believe can also be found in Isaacs' Character Theory of Finite Groups as an exercise. The second comes directly from Isaacs' Finite Group Theory.\n\nFor both statements, let $X$ be a set of representatives for the $(H,K)$-double cosets in a group $G$, where $H$ and $K$ are subgroups and $G$ is finite.\nMackey's Theorem: Let $\\theta$ and $\\varphi$ be characters of $H$ and $K$, respectively. Then $$\\langle \\theta^G, \\varphi^G\\rangle = \\sum_{x \\in X}\\langle (\\theta^x)_{H^x\\cap K},\\varphi_{H^x\\cap K}\\rangle.$$\nMackey Transfer: Let $\\Lambda:G\\rightarrow H$ be a pretransfer map, and for each element $x\\in X$, let $W_x:K\\rightarrow H^x\\cap K$ be a pretransfer map. Then for $k \\in K$, we have $$\\Lambda(k)\\equiv \\prod_{x \\in X} x W_x(k) x^{-1} \\mod{H'}.$$\n\nHere, a \"pretransfer map\" $\\lambda:A\\rightarrow B$ refers to a map whose image in the abelianization of $B$ is the transfer homomorphism from $A$ to $B/B'$. The map is given by $\\lambda(a)=\\prod_{t \\in T}ta(t\\cdot a)^{-1}$, where $T$ is a right transversal of $B$ in $A$ and $t\\cdot a$ is the representative in $T$ for the coset $H(ta)$. This is how Isaacs defines the transfer homomorphism in his book (after which he proves the transfer independent of the choice and order of transversal in the pretransfer).\nMy question is, how are these two theorems related? This post on MO gives a representation theoretic interpretation of the transfer, so it seems like the first theorem ought to be a stronger version of the second (but I cannot prove it). If this is true, can Mackey transfer be used to talk about irreducibility of induced characters? Or does that require the more general form?\n", "", "group-theory representation-theory finite-groups characters transfer-theory"], "3435119": ["Calculate the distance between two integer Lists", "I am using C# and I have two where each element in these lists represents a 3D point in space by x,y and z.\n\nEach list can contain 2000 or more points and my aim is to compare each point of list1 to all the points of list2 and if the distance is smaller than a specific number I keep a record of it. at the moment I am using foreach to compare each element of list1 to all of list2. This is quite slow because of the number of points. Do you have any suggestion to make it fast?\nmy loop is:\n\nThanks in advance for your help.\n", "list<AACoordinate>", "c# algorithm list coordinates"], "2435805": ["MIT Kerberos fails to locate TGT in MSLSA cache", "I'm struggling with a Windows application which uses MIT Kerberos for authentication.\nIf a user logs on to Windows with a domain user account, shows that he gets the expected tickets from the AD, including this one:\n\nHowever, when we try to use this ticket in our application, the Kerberos library does not seem to find that one.\nHere's a simplified version of the relevant code:\n\nBut for whatever reason, we never enter the part.\nRunning the code in the debugger, I can see that it finds several of the other tickets shown by , but for some reason it never finds the one we're interested in.\nCan anyone explain this behavior, or how to get around it? Naively, I'd expect the output from to match the results of iterating over the cache with .\nI'm relatively new to Kerberos, and inherited this code from a coworker who left, so it's possible that I'm missing some vital fundamental piece of information.\n", "klist", "windows active-directory kerberos"], "3223996": ["MVC3 Partial view method not firing", "I have a Partial view (Login, with username, password and Submit button), and the partial view is being used on my _layout (materpage).\nSo, on my _layout page, I have:\n\nMy _LoginPartial has the following code:\n\nThe Index file to display the login box looks like this:\n\nIn my AccountCOntroller, I have the following code:\n\nI have breakpoints on all methods - but they never get hit. Pressing the submit button simply changes my URL to:\n\nCan anyone spot the error I am making?\n", "<div style=\"text-align: right\">\n @Html.Partial(\"_LoginPartial\")\n</div>\n", "asp.net-mvc-3 layout partial-views"], "5504220": ["$(\\lambda-a)^{-1}$ as limits of 'polynomials'", "For a unital $C^*$-algebra $\\mathcal{A}$ the spectral permanence gives \\begin{equation}\n\\sigma_{\\mathcal{B}}(a)=\\sigma_{\\mathcal{A}}(a)\n\\end{equation} for any unital $C^*$-subalgebra $\\mathcal{B}$. \nIt is natural to look at the smallest such subalgebras, namely, the $C^*$-subalgebra generated by $1,a$ and $a^*$. Then the permanence says if $\\lambda-a$ is invertible, then $\\lambda-a$ is in the closed linear span of products of $1,a$ and $a^*$ (although order of multiplications matters here and it is not actually a polynomial).\nI am wondering whether there is some canonical way to construct these 'polynomials'. That is, given $a\\in\\mathcal{A}$ invertible, how can one find explicitly the linear span of products of $1,a$ and $a^*$ that converges to $a^{-1}$?\nThanks!\n", "", "functional-analysis banach-spaces spectral-theory banach-algebras c-star-algebras"], "3437293": ["How to make Sharepoint website running in VMware virtual machine accessible from host?", "I have a Sharepoint website that runs on IIS inside VMware Workstation guest system.\nThe host is Windows 7, whereas guest is Windows Server 2003.\nWhat I basically need is just to be able to browse the website from the host OS.\nI guess this has something to do with setting up NAT and port forwarding but I can't figure how to make it work. I tried setting Network Adapter in VM settings to NAT option but had no luck whatsoever.\nUpdate\nThere's also a different kind of problem here: my VM computer name is used by another computer in our network. I cannot change it because it would ruin Sharepoint configuration (already tried), and reconfiguring Sharepoint is something I want the least.\n", "", "windows-server-2003 networking vmware-workstation nat port-forwarding"], "3549241": ["How can I get the mount path of a USB device on OSX?", "I have a backup script that backs up some data to a USB device. The problem I have is that OSX sometimes changes the expected mount path. For example if some file is locked under the expected mount path, OSX mounts it on another path. A USB device named 'BACKUP' can be mounted at /Volumes/BACKUP-1 instead of /Volumes/BACKUP.\nIs there a way to finding out the current mount path of a USB device in the OSX Terminal? Something like 'mount_path BACKUP' (command is fake) which would then return '/Volumes/BACKUP-1' or nothing if the device was not mounted?\n", "", "osx bash usb mount"], "3052472": ["setup.py examples?", "After studying this page:\nhttp://docs.python.org/distutils/builtdist.html\nI am hoping to find some setup.py files to study so as to make my own (with the goal of making a fedora rpm file).\nCould the s.o. community point me towards some good examples?\n", "", "python rpm"], "4239952": ["Custom UIButton to drill up from table view?", "Ive put in a custom \"Back\" UIBarButtonItem, which is from an Image i made in photoshop. Ive managed to make it appear just fine, my problem is making it work.\nMy button does nothing, im assuming because i havent assigned any actions to it. I just dont know the correct syntax to do so?\nHeres my code\n\nBasically, i want my new custom backbutton to function just like the default one in a regular UITableView\nregards, \nAndyy\n", " UIImage *buttonImage = [UIImage imageNamed:@\"BackButton.png\"];\n UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];\n [backButton setBackgroundImage:buttonImage forState:UIControlStateNormal];\n backButton.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);\n\n// Im assuming this is where i need to put the action...\n //[backButton addTarget:self action:@selector(.......) forControlEvents:UIControlEventTouchUpInside];\n\n self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] \n initWithCustomView:backButton];\n", "ios uitableview uinavigationbar uibarbuttonitem"], "5171111": ["Mock svn instance for testing svnkit tests", "A project I'm working on interacts heavily with Subversion, using svnkit.\nAre there any examples on running a mock in-memory svn instance, to help facilitate testing etc?\nCheers\nMarty\n", "", "java tdd mocking svnkit"], "5309477": ["Change LockScreen image during app play audio", "I am creating an app with different live streaming URL get from a single PLIST file, I enabled the remoting control on Lock screen when the divice go to standBy using this code:\n\nThen in the detailViewController i calling this function to get infos on lock screen:\n\ni tryied to insert plus but the application crash, any idea how to fix this and if you see i used ARC compiling code.\nThanks.\n", "- (void)remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {\n\n if (receivedEvent.type == UIEventTypeRemoteControl) {\n\n switch (receivedEvent.subtype) {\n\n case UIEventSubtypeRemoteControlTogglePlayPause:[self playPause:nil];\n\n break;\n\n default: break;\n }\n }\n}\n", "ios xcode uiimageview automatic-ref-counting lockscreen"], "1543007": ["Disable / Override Menu Accelerator in Excel 2007", "I have an Excel add-in, which we are testing for upgrading to Office 2007, within which I need to override the keystroke in Excel. Normally I would do this using and works as expected in Excel 2002.\nHowever, in Excel 2007, if a user has the Developer Tab enabled, the method does not work ( selects the Developer Tab instead).\nAny ideas how I can get around this? \n", "Alt+l", "excel vba keyboard-shortcuts excel-2007"], "4455782": ["MySQL Finding Most Similar Combination Of 3 Columns/Values", "I am attempting to make a very basic image matching script in PHP, what I am doing is grabbing the RGB averages of each channel, and then matching these 3 values against results stored in the database. \nSo I have all this done, and the results setup in the DB, I am just having trouble writing my final query now to check the computed results from my active image against the stored results.\nSO the DB table looks like this right now:\n\nOriginally, I had the color average fields set as INTs, but changed them now to mess around with fulltext searches... I'm not really sure how to go about this :P\nAnyway, so my query should be something like this:\n\nAnd then ideally it would return back the 3 most similar combinations.\nSQL wizards, if you have any suggestions I would love to hear/SEE them! Thanks in advance everyone :)\n", "id (primary index) \nname\nimage\nrval (fulltext index)\ngval (fulltext index)\nbval (fulltext index)\n", "php mysql sql database query"], "5871807": ["The need for Explicit Type Conversion in C#", "Consider the following code:\n\nHere is of type and this is reasonable since Object is the base type of every Class in C#.\nHere, since the type of is defined at compile time, what is the need to explicitly use type conversion here. Can't the compiler predict on it's own that it will be of . I understand that, the Conversion type doesn't have to match the type, but for practical purpose, it will only be as useful as the type. \nCould someone explain with a small, hypothetical example, as to why the Explicit Type Conversion is necessary when a reference of type Object is being assigned to a derived class.\nFrom what I know, in C, there is no need to do perform Explicit type conversion from to any pointer and the compiler can handle it, based on the type of the pointer to which the converted value is being assigned.\n", "DerivedClass drbObj = (DerivedClass)obj;\n", "c# c type-conversion explicit"], "4636059": ["EF 4.1: Difference between .WithMany() and .WithOptional() ?", "Below are two similar fluent API configurations:\nWithMany()\n\nWithOptional()\n\nWhat I am trying to express here is: Every requires a concrete , but a can have zero, one or many Countries assigned.\nWhich of the above statements would I have to use? Or in other words: What exactly is the difference between and operators?\n", "modelBuilder.Entity<Country>()\n .HasRequired(cou => cou.Currency)\n .WithMany()\n .WillCascadeOnDelete(false); \n", "entity-framework code-first ef-code-first fluent-interface"], "5578041": ["Is there a better way to return last inserted ID for multi insert?", "I'm using PHP to add 95 new rows to my MySQL DB and return new row ID. The execution time takes around 24 seconds. If I go past 30 seconds, PHP will stop executing (default time limit 30 seconds).\nI need to return the row ID for each row inserted so that I can use it to install associated data.\nMy current solution is this:\n\nTo reduce insettion time, I'm hoping I can insert multiple rows in one query\nAccording to MySQL (scroll down to the red lind and the word IMPORTANT) it says:\n\nIf you insert multiple rows using a single INSERT statement,\n LAST_INSERT_ID() returns the value generated for the first inserted\n row only.\n\nThe solution they suggest is to create another table and inset the new ID's there, then I can fetch the new id's by a select statement at the end.\nHas anyone worked on a similar solution? Any suggestions on how I can make thisa bit more time effective?\n", " /* snippets from my class objects to illustrate my code */\n\n // This foreach takes 24 seconds on just 95 rows\n foreach($list as $row) {\n $id = $this->importRows($sid,$table)\n\n array_push($id_list,$id);\n }\n\n /* PDO insertion */\n protected function importRows($row) {\n $sql = \"INSERT INTO my_table (name, colour)\n VALUES $row['name'], $row['colour']\";\n\n $result = $this->db->exec($sql);\n return $this->db->lastInsertId();\n }\n", "php mysql pdo"], "899391": ["Python: how to set virtualenv for a crontab?", "I want to set up a crontab to run a Python script.\nSay the script is something like:\n\nIs there a way I could specify a virtualenv for that Python script to run in? In shell I'd just do:\n\nIs there something equivalent I could do in crontab to activate a virtualenv?\n", "#!/usr/bin/python\nprint \"hello world\"\n", "python cron virtualenv crontab virtualenvwrapper"], "4419332": ["regex javascript- error", "Why isn't this regular expression working? A correct email address does not pass the validation.\n\nlink:\nhttp://emprego.herobo.com/\n", "<script type=\"text/javascript\">\n$(document).ready(function() {\n\n var regex = new RegExp(/^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/i );\n\n $('#submit').click(function () { \n var name = $('input[name=name]');\n var email = $('input[name=email]');\n var website = $('input[name=website]');\n var comment = $('textarea[name=comment]'); \n if ((!regex.test(email))) {\n email.addClass('hightlight');\n return false;\n } else \n email.removeClass('hightlight'); \n }\n}\n}\n", "javascript regex validation"], "889205": ["Google Maps Circle Overlay and Vincenty Formula", "I'm using the Circle overlay as part of the V3 of the Google Maps Javascript API (i.e., see below - we have a subsequent call that actually sets radius/etc.) to display goe-spatial locations in our application. \n\nWe also have a background server process that is calculating distances of points from the center of the circle to determine whether points fall inside or outside the circle - when points fall inside we raise an alarm. There is one particular case we had recently where a point (lat=31.197163, lon=-83.87292) falls right on the border of the circle (lat=31.1998, lon=-83.8738, radius=1000ft).\nWhen using the Haversine formula for calculating distance the calculated distance is greater than the radius whereas Vincenty (more accurate) the distance is less than the radius thus causing an alarm to be generated by the back-end process that the point falls within the location.\nMy question is related to how Google Maps displays the Circle overlay. When we view it in our application it appears to fall just outside the circle (only visible when zoomed in to the greatest extent). I had read elsewhere that for calculating distance that Google's APIs use the Vincenty algorithm but for displaying their overlay do they assume a spherical shape (and thus maybe explaining why the point appears to fall outside of the circle)?\n", " var circle = new google.maps.Circle({\n fillColor: lCircleColor,\n strokeWeight: 2\n });\n", "javascript google-maps geospatial computational-geometry"], "5473524": ["What tools are available for flex code coverage?", "I have been trying to get Flex Cover to work correctly for some time but the problem we are encountering is that it only provides code coverage for classes that are currently being hit by our unit tests.\nHow do we get flex cover to provide correct instrumentation for our entire source directory?\nI have tried several different compiler parameters to include all classes with no luck.\nAlso getting the flex cover fat client to work in a CI environment consistently has never been achieved so we are left to just run Flex Cover manually.\nAt this point I don't feel like flex cover is mature enough to be used reliably.\nAre there any other tools available to get correct code coverage for flex that we should try?\n", "", "flex actionscript code-coverage flexcover"], "5024271": ["Speed up asp.net Development server", "I am running a website in ASP.Net using the development server, which is insanely slow to load a page with no apparent reason since it is fast in production. Are there any tips to speed up the ASP.net Development server or alternatives to using it? \n", "", "iis asp.net web-development visual-studio"], "3601973": ["How can one download the contents of an HTML5 web database to the client?", "I am looking for a way to save the contents of an HTML5 web database to a local file for persistence and for loading back into the web application. I'm using Firefox 3.6.8 with the HTML5 features to use a local web database. I can upload a file and read it's contents but am unable to find an elegant way to save the contents of the database to the file system. Any ideas?\nI believe there is something written in flash that can do this. I would consider this but I would prefer a straight HTML 5 version instead.\n", "", "html5 storage filesystems"], "4872511": ["How to type a slash through a letter?", "\nPossible Duplicate:\nHow to strike through obliquely, e.g. to indicate cancellation? \n\nHow can I type a slash through a letter (specifically an 'R' as in 'not related to') in math mode? Thanks.\n", "", "math-mode"], "4416663": ["Storing files in directories in an online file manager", "I have a site that allows people to upload files to their account, and they're displayed in a list. Files for all users are stored on different servers, and they move around based on how popular they are (its a file hosting site).\nI want to add the ability for users to group files into folders. I could go the conventional route and create physical folders on the hard drive, for each user on the server, and transverse them as expected. The downside to that is the user's files will be bound to a single server. If that server starts running of space (or many files get popular at the same time), it will get very tricky to mitigate it. \nWhat I thought about doing is keeping the stateless nature of files, allowing them to be stored on any of the file servers, and simply storing the folder ID (in addition to the user id who owns the file) with each file in the database. So when a user decides to move a file, it doesn't get physically moved anywhere, you just change the folder ID in the database. \nIs that a good idea? I use php and mysql.\n", "", "php file-management file-storage"], "5153727": ["How to pass a parameter from C# to a PowerShell script file?", "From the command line I can do.\n\nHow do I pass the parameter when doing this from C#?\nI've tried\n\nAnd I have tried passing values in as IEnumerable<object> in the .Invoke() but $p does not get the value.\n\n", ".\\test.ps1 1\n", "powershell"], "246629": ["\"ReferenceError: $ is not defined\" using CoffeeScript TextMate bundle with Rails 3.1", "I am trying to use this bundle with the coffee files generated for each controller. I'm just delving into this for the first time by just doing the traditional\n\nIt works fine when I view the page, and doing Command+B also displays the desired JS code. However, I can't do Command+R. I just get . I understand that it probably can't reference the jQuery file that defines , but can't for the life of me figure out how to do that. Come to think of it, I'm wondering if it's a sensible thing to want to do this...\nWhat's the best practice when using CoffeeScript and TextMate in Rails 3.1 development?\nThanks,\nDany.\n", "$ ->\n alert('Hello World!')\n", "ruby-on-rails-3.1 textmate coffeescript textmatebundles"], "654712": ["OpenGL glColorPointer repeat colors?", "Imagine that you've got one of these guys:\n\nAka GL_TRIANGLE_STRIP. If you wanna color it using different colors, you could use:\n\nWhere each \"item\" in the color array matches a vertex point in the strip. But what if the colors just alternate between two different colors? Feels unnecessary to define a color for each vertex, if there's only two \"real\" different colors. So my question is if it's possible to define a colorArray with just two colors in it, and somehow make opengl alternate between those two when it's looping over the vertex array.\nAnd yeah I'm a complete noob at opengl so maybe this is a stupid question...\n", "glColorPointer(4, GL_UNSIGNED_BYTE, 0, colorArray);\nglEnableClientState(GL_COLOR_ARRAY);\n", "opengl colors fill repeat"], "2897170": ["AssertionError in Gson EnumTypeAdapter when using Proguard Obfuscation", "My project implements a in during serialization/deserialization for preserving object's polymorphism state. Anyhow, the project works fine during development tests, but when it is released with proguard obfuscation and tested, it just crashes.\n\nMy Gson specific proguard configuration is:\n\nThe TypeAdapter i'm using is:\n\nI did a lot of search on this error specific to Gson, but couldn't find any helpful answer. However I found another question with the similar issue.\nAny help from developer's community would be appreciated.\n", "TypeAdapter", "android gson proguard"], "1850447": ["Easy Way to Share files between Linux Desktop and Windows Remote Desktop?", "Is there a way to have drag and drop access between Linux and a Windows remote desktop connection?\n", "", "windows linux remote-desktop rdesktop"], "5918727": ["C program that can expand quadratics", "I want to have a C program that allows me to input (x+1)(x+3) and other stuff like that, including x^2. So far I have a very complex system using linked lists but I think that there should be an easier solution.\nThe output from input, (x+1)(x+3) would be x^2+4x+3 printed out.\nSo far I'm passing around a struct _term with an int, char and int for coefficient,pro numeral and power. so 2x^4 would be saved as |2|'x'|3|.\nI should also mention that I'm only 16, and still in high school.\n", "", "c algorithm linked-list algebra"], "6012654": ["Solving nonlinear ODE system with continuous Newton method", "Is anyone knows how to apply continuous Newton method for solving nonlinear ODE systems? For example let the system is:\n$$\\left|\\begin{array}{cc} y'= \\frac{z}{x} \\\\ z'= \\frac{z(y+2z-1)}{x(y-1)}\\end{array}\\right.$$\n", "", "numerical-methods"], "3041284": ["Is the \"Objects First\" approach a good idea?", "Do you think programming novices should learn objects from day 1, as seen in the book \"Objects First With Java: A Practical Introduction Using BlueJ\" by David Barnes? Or do you think this is a bad idea?\nFor those unfamiliar with the book, here is a list of the topics discussed in the chapters:\n\nChapter 1 deals with the most fundamental concepts of object-orientation: objects, classes and methods. It gives a solid, hands-on introduction to these concepts without going into the details of Java syntax. It also gives a first look at some source code. We do this by using an example of graphical shapes which can be interactively drawn, and a second example of a simple laboratory class enrolment system. \nChapter 2 opens up class definitions and investigates how Java source code is written to create behavior of objects. We discuss how to define fields and implement methods. Here, we also introduce the first types of statements. The main example is an implementation of a ticket machine. We also look back to the laboratory class example from chapter 1 to investigate that a bit further. \nChapter 3 then enlarges the picture to discuss interaction of multiple objects. We see how objects can collaborate by invoking each other's methods to perform a common task. We also discuss how one object can create other objects. A digital alarm clock display is discussed that uses two number display objects to show hours and minutes. As a second major example, we examine a simulation of an email system in which messages can be sent between mail clients. \nIn Chapter 4, we continue by building more extensive structures of objects. Most importantly, we start using collections of objects. We implement an electronic notebook and an auction system to introduce collections. At the same time, we discuss iterations over collection and have a first look at loops. The first collection being used is an ArrayList. In the second half of the chapter we introduce arrays as a special form of a collection, and the for loop as another form of a loop. We discuss an implementation of a web log analyzer as an example for array use. \nChapter 5 deals with libraries and interfaces. We introduce the Java standard library and discuss some important library classes. More importantly, we explain how to read and understand the library documentation. The importance of writing documentation in software development projects is discussed, and we end by practicing how to write suitable documentation for our own classes. Random, Set and Map are examples of classes that we encounter in this chapter. We implement an Eliza-like dialogue system and a graphical simulation of a bouncing ball to apply these classes. \nChapter 6, titled Well-behaved objects, deals with a whole group of issues connected to producing correct, understandable, and maintainable classes. It covers issues ranging from writing clear, understandable code - including style and commenting - to testing and debugging. Test strategies are introduced and a number of debugging methods are discussed in detail. We use an example of a diary for appointment scheduling and an implementation of an electronic calculator to discuss these topics. \nIn Chapter 7, we discuss more formally the issues of dividing a problem domain into classes for implementation. We introduce issues of designing classes well, including concepts such as responsibility-driven design, coupling, cohesion, and refactoring. An interactive, text-based, adventure game (World of Zuul) is used for this discussion. We go through several iterations of improving the internal class structure of the game and extending its functionality, and end with a long list of proposals for extensions that may be done as student projects. \nChapters 8 and 9 introduce inheritance and polymorphism with many of the related detailed issues. We discuss a simple database of CDs and videos to illustrate the concepts. Issues of code inheritance, subtyping, polymorphic method calls and overriding are discussed in detail. \nIn Chapter 10 we implement a predator/prey simulation. This serves to discuss additional abstraction mechanisms based on inheritance, namely interfaces and abstract classes. \nChapter 11 introduces two new examples: an image viewer and a sound player. Both examples serve to discuss how to build graphical user interfaces (GUIs).\nChapter 12 then picks up the difficult issue of how to deal with errors. Several possible problems and solutions are discussed, and Java's exception handling mechanism is discussed in detail. We extend and improve an address book application to illustrate the concepts. \nChapter 13 steps back to discuss in more detail the next level of abstraction: how to structure a vaguely described problem into classes and methods. In previous chapters we have assumed that large parts of the application structure already exist, and we have made improvements. Now it is time to discuss how we can get started from a clean slate. This involves detailed discussion of what the classes should be that implement our application, how they interact, and how responsibilities should be distributed. We use class-responsibilities-collaborators (CRC) cards to approach this problem, while designing a cinema booking system. \nIn Chapter 14, we try to bring everything together and integrate many topics from the previous chapters of the book. It is a complete case study, starting with the application design, through design of the class interfaces, down to discussing many important functional and non-functional characteristics and implementation details. Topics discussed in earlier chapters (such as reliability, data structures, class design, testing, extendibility, etc.) are applied again in a new context.\n\n", "", "java learning object-oriented"], "4407903": ["ubuntu 3 monitors, 2 video cards not working", "I'm trying to get ubuntu working w/ 3 monitors. I have been given 2 video cards\nlspci | grep VGA \n\nI have had it working w/ two monitors plugged into the ATI correctly. and the nVidia monitor blank. Now I have the nVidia monitor working and one monitor from the ATI working, but I can't seem to get the last monitor to show anything. It does show the boot screen and works up until the point you are presented w/ the login screen for ubuntu, then it disappears and the nVidia monitor turns on. Might I have something wrong w/ my xorg.conf or do I need to do something more to get this to work?\nCurrently I'm seeing this error in my Xorg.0.log file, but I'm not sure where to go from here:\n\n/etc/X11/xorg.conf\n\n", "20:01:00.0 VGA compatible controller: ATI Technologies Inc RV620 LE [Radeon HD 3450]\n25:05:00.0 VGA compatible controller: nVidia Corporation NV44A [GeForce 6200] (rev a1)\n", "linux ubuntu multiple-monitors xorg"], "5230845": ["How do I rotate an image in the frequency domain?", "I've heard that it should be possible to do a lossless rotation on a jpeg image. That means you do the rotation in the frequency domain without an IDCT. I've tried to google it but haven't found anything. Could someone bring some light to this?\nWhat I mean by lossless is that I don't lose any additional information in the rotation. And of course that's probably only possible when rotating multiples of 90 degrees. \n", "", "image-processing image-manipulation jpeg jpg image-rotation"], "4122730": ["How do I distinguish a file or a folder in a drag and drop event in c#?", "I have a form that you drag and drop files into and I was wondering how can I make the application know if the data is a file or a folder. \nMy first attempt was to look for a \".\" in the data but then some folders do have a . in them. I've also tried doing a File.Exists and a Directory.Exists condition but then it only searches on the current application path and not anywhere else.\nIs there anyway I can somehow apply the .Exists in a specific directory or is there a way I can check what type of data is dragged into the form?\n", "", "c# file drag-and-drop folder"], "428662": ["root partition is full when trying to open big files", "I have big tar.gz and .rar files.\nwhen i try to open them (even to amounted partition with over 500G) my root partition is consumed, i'm guessing it's something to do with temp files but i have no idea how to open it.\nHere's my output:\n\n", "df -h", "ubuntu partition extract rar"], "5157913": ["webpage surfing with page curl animation ios", "i have a html file that contains some data,since i display this in a webview the user has to scroll down to view the information,what i want to know is whether i can provide a page curl animation to view the contents of the html so that it becomes easier for the user to read the information by swiping across pages,\nshould i use pageviewcontroller? or are there any other libraries that let me have the page curl effect on a custom(webview)? how do i proceed? is it possible to show some amount of html information on one page and then user turns to the next page? how do i achieve that,its a single html file\n", "", "html ios uiwebview uipageviewcontroller page-curl"], "4440470": ["Microsoft Speech Recognizer 6.1 Training Files", "I am developing a Speech Application in C#. The speech recognition stuff is working fine with SAPI 5.1 on Windows XP. But I now have Microsoft Speech Recognizer v 6.1 on my machine that came with Office 2003. No matter how much training I do, I see that the speech files (the .dat files under MSASR) are not getting updated ( at least from the last modified time stamp) . Can someone please let me know if there is any major change in how speech training works in Speech Recognizer v 6.1 when compared to v 5.1 ?\nThanks in advance.\nUPDATE: Someone answered the question in the Microsoft Speech Forums. Here is the link to the reply. http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.speech_tech.sdk&mid=53f6b970-3252-4ef5-91da-eaf20367c023&sloc=en-us \n", "", "c# microsoft speech-recognition sapi"], "1430765": ["Python error when renaming files in windows", "I am attempting to give all the jpg files in a folder a random name, so they appear in semi random order on my digital picture frame\nThis is the code I'm trying to use:\n\nHowever when I run it I get:\n\nEverything I've seen makes it look like my code should work, I don't know why it won't run.\nEDIT: It seems like its due to the fact that there are spaces in the name of the file I'm trying to rename\nEDIT2:I was copying the files to an SD card formatted as FAT and the folder I was running it in had the maximum number of items in it. I solved it by moving a couple of the files to a subdirectory.\n", "import os\nimport random\n\nfor filename in os.listdir(\".\"):\n hold = random.randint(1,100000)\n f=str(hold)+'.jpg'\n\n if(filename.endswith('.jpg') or (filename.endswith('.JPG'))):\n os.rename(filename,f)\n", "python rename"], "5164626": ["Erase Swing Content Pane/Panel & display a new panel", "I have created an applet where when you press the button \"Forgot Pass\" I erase the current JPanel on the applet & create a new JPanel that displays the JComponents related to Retrieving/Forgetting a password.\nI can successfully clear the JPanel using .removeAll(); BUT after I create all my new JComponents & add them to the content pane (main JPanel) the applet just goes gray & doesn't show the new JPanel & components UNLESS I resize the applet, then it repaints & works.\nI have tried putting .invalidate() after I have created all the new JComponents but that still doesn't refresh the applet?\nHow can I make my JPanel appear after I clear it with .removeAll() & add different JComponents to it?\nCode: \n\n", "public class App extends JApplet\n{\n JPanel mainPanel; \n\n public void init()\n {\n SwingUtilities.invokeAndWait( new Runnable() {\n public void run()\n {\n showLoginPanel(); // this shows fine on loading\n }\n });\n\n }\n\n public void showForgotPassPanel()\n {\n mainPanel.removeAll();\n\n mainPanel = (JPanel) getContentPane();\n Box hBox = Box.createHorizontalBox();\n Box vBox = Box.createVerticalBox();\n mainPanel.setLayout( new BorderLayout() ); \n\n ... create components\n\n ... add components to mainPanel\n\n mainPanel.invalidate(); // doesn't make new layout visible, not unless I resize the applet\n }\n}\n", "java swing"], "367705": ["TableView HeaderSection Memory Allocation", "I am using an\n\non header section in table view to divide the table in two section,when i am scrolling table view up and down memory allocation increases very fast,but instead of using above mentioned code on header section there is no memory allocation and app works fine.But there is need of using of using above code on header section,I can not remove the code from the header and i want to reduce the memory allocation also.Is there any other way to sort out the issue.\nThanks in Advance.\n", "- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section \n{ \n customView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 24.0)];//custom view \n \u00a0 \u00a0// create the button object\n \u00a0 \u00a0headerLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 3, tableView.bounds.size.width, 18)];//header label \n headerLabel.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @\"section\" ofType: @\"png\"]]]; \n customView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @\"section\" ofType: @\"png\"]]]; \n \u00a0 \u00a0headerLabel.textColor = [UIColor whiteColor];//text color of header label\u00a0 \n headerLabel.font = [UIFont fontWithName:@\"HelveticaNeue\" size:15];//font of header label \n headerLabel.font = [UIFont boldSystemFontOfSize:15]; \n \u00a0 \u00a0headerLabel.frame = CGRectMake(0.0, 0.0, 320.0, 24.0);//frame of header label\n\n if(searching)//checking searching { \n headerLabel.text = @\" \u00a0Search Results\";//searching results as a text of header label \n } \n else { \n if(section == 0)//checking which section is chosen { \n headerLabel.text = @\" \u00a0Sponsored\";//sponsored as header label\n }\n else { \n headerLabel.text = @\" \u00a0Unsponsored\";//un sponsored as header label \n }\n }\n\n if(searching)//checking searching { \n headerLabel.text = @\" \u00a0S\u00f6k resultat\";//sok resultant text as a header label \n }\n else { \n if(section == 0)//checking which section is chosen { \n headerLabel.text = @\" \u00a0Sponsrade\";//sponsorade as text of header label\n } \n else \u00a0 {\n headerLabel.text = @\" \u00a0Un Sponsrade\";//usponsrade as text of header label\n } \n } \n\n \u00a0 \u00a0[customView addSubview:headerLabel];//header label as a subview \n //NSLog(@\"endOfviewForHeaderInSection\"); \n //[headerLabel release]; \n \u00a0 \u00a0return customView;//returning custom view\n\n [customView release]; \n //NSLog(@\"endOfviewForHeaderInSection\");\n}\n", "iphone objective-c memory-allocation tableview"], "5207326": ["UpdateModelException ClassCastException in JSF 2.0", "I have a facelets page with a ui:repeat tag that outputs the rows of an HTML table and each row accepts user input. This works fines. I also have a second set of data that I output using the same page and repeater (just different data). The backing bean supporting this page is ConversationScoped.\n\nThe problem I have is when the user clicks an h:commandButton to \"continue\" to the next page. This really just redisplays the current page but the collection of the repeater has been updated to a new set of data. From my debugging, it doesn't look like I ever even get to my action method that should fire as a result of clicking the commandButton to go to the next page. The stack trace below also doesn't show any signs of hitting my code. Any thoughts on how to resolve this error?\n\n\nUpdate: the relevant bean code is this:\n\nthe relevant view code is:\n\n", "<ui:repeat value=\"#{cloneBuilderBean.pageTemplate}\" var=\"row\" varStatus=\"status\">\n <tr>\n <td>#{row.label}</td>\n <td><h:inputText value=#{row.value}/></td>\n </tr>\n</ui:repeat>\n", "jsf jsf-2 facelets el classcastexception"], "2300418": ["How to create a directory symbol like ~ for HOME?", "I've got a directory path for which I want to create a shortcut, like for a users home directory. \nI've tried the variables, and I could match for a path, but I dont want that letter. \nI'm guessing maybe with some kind of shenanigans?!\n", "~", "shortcuts folder environment-variables bashrc"], "4411321": ["Widget-centric web application frameworks", "What widget-centric/component-oriented web application framework are out there?\nBy that, I mean frameworks offering an abstraction of web-specific implementation details (HTML/XHTML, JavaScript, CSS, Ajax, WebSockets etc.), including event handling, graphics support, graceful degradation, accessibility and indexability (this excludes full-AJAX frameworks like ExtJS) ; and which handle security by using well-tested patterns. Essentially, I want to reinvent as little of the wheel of a web app as possible.\nSo far, I've only found one such framework, Wt (Web Toolkit). Are there any others, for any language? (Wt has bindings for C++ and Java, plus others with some hackery).\n", "", "frameworks application components widget"], "4394264": ["the returned SDL_cursor from SDL_GetCursor() can't be used with SDL_GetMouseState()?", "I'm trying to get the x, y, and state of my mouse in SDL. I tried using the lines\n\nBut it gives me the error\n\nC:[path]\\particletest2\\main.cpp|107|error: request for member SDL_GetCursor()', which is of non-class type `SDL_Cursor*'|\n\nIs there any way I can get this to work? It seems like a waste to create a SDL_cursor object when SDL_GetCursor() should be creating one to return for you.\nThank you in advance for any help or answers, and for taking the time to read this.\n", "int mstate, mx, my = 0;\nmstate, mx, my = SDL_GetCursor().SDL_GetMouseState();\n", "c++ mouse sdl"], "1457325": ["names into categories from Sheet1 to Sgeet 2 with large blank spaces", "I am a counselor who is new to Excel, I am having some trouble.\nI am attempting to use excel to help me see which classes are in common amoung my students. I created a sheet that has a list of thier names in the first column, the next columns has every possible class that the students are taking. In this sheet, I simple put an x in the column for the class that they are taking.\nOn sheet 2, I want to have the same column of classes with a list of students below each class that shows everyone that is going to take that same class.\nRight now I am doing this by using this formual:\n=IF(COUNTA(Sheet1!B2)=1,Sheet1!A2,\"\")\nThis gives me a list, but obviously there are a lot of blank spaces. How might I do this so that each list starts from the first row, without leaving any spaces? \n", "", "spreadsheet sheets"], "3237881": ["Is EntityFramework available for Windows 8 Store Apps?", "Is EntityFramework available for Windows 8 Store Apps?\nI'm using Visual Studio 2012 Express for Windows 8. \nI'm starting to wonder because I can't make it work. \nI installed the Entity Framework package from NuGet\nI added System.Data.Entity and System.Data.Design to the project\nBut no matter what I do, DbContext isn't recognized... \nAny ideas? \nEDIT:\nEntityFramework isn't available for Windows Store Apps. I don't understand Microsoft position on this, they suck.\nThe other solution is to use SQLite but it's not ORM. So what's the point?\n", "", "c# visual-studio-2012 entity-framework-5 windows-store-apps .net-4.5"], "2229233": ["Azure: storage transaction cost", "I want to implement a search engine site using Azure platform.\nThe application will parse from external sites 10.000.000 entry in a day and need to persist this data. I need about 40GB of repository space. \nAccording to Azure price model it seems that should be better to use Azure Table Storage instead of Azure SQL Server. But I'm afraid about the cost of storage transactions: 0.01$ for 10.000 transaction. \nIn my case it will be for a single day: (0.01$ * 10.000.000) / 10.000 = 10$/day = 300$/month! It seems too much!\nMaybe I misunderstood something? If this is true, why should I choose cloud platform? Prices are terrific!\nThanks\n", "", "transactions azure windows-azure-storage azure-storage-tables pricing"], "4064039": ["Convert PDF to JPG image with PHP", "I am using ImageMagik to try and convert the contents of a PDF to JPG, but keep getting an empty jpg. I have made sure the perms are 777 on everything for testing so I am a little lost how to continue.\nHere is the script I am running\n\n", "<?php\n\n exec('convert testfile.pdf output.jpg', $output, $return_var);\n\n?>\n", "php pdf imagemagick jpeg"], "2807947": ["What is the method to convert byte to int? C#", "I tried \n\nIt goes with a blank answer. Why does this happen? Are there other ways?\n", "byte mybyte = 32; // this is just an example.\nint a = Convert.ToInt32(mybyte);\n", "c#"], "5861336": ["Virtual addresses problem", "I am stuck on this problem which I am studying for an exam tomorrow. (I understand the concept of virtual vs. physical addresses, page frames, address bus, etc.)\nIf you're using 4K pages with 128K of RAM and a 32 bit address bus, how large could a virtual address be? How many regular page frames could you have?\nEDIT: I believe the answer is 2^32 and 2^20. I just do not know how to compute this.\n", "", "homework language-agnostic hardware paging"], "1720966": ["How do I implement collision detection between a set of Div elements?", "I have this example in jsfiddle\nI have a var as being the collision element:\n\nand then the collision:\n\nfor:\n\nThis code implements collision detection of the child divs against the container div. How would I implement collision detection to make those 3 divs collide with each other?\nI'm thinking to set up another div : but im not sure how to use it within this example.\n", "var $div = $('.container');\n", "jquery collision-detection"], "4486001": ["PHP and Databases: Views, Functions and Stored Procedures performance", "I'm working on a PHP web application with PostgreSQL. All of the SQL queries are being called from the PHP code. I've seen no Views, Functions or Stored Procedures. From what I've learned, it's always better to use these database subroutines since they are stored in the database with the advantages:\n\nEncapsulation\nAbstraction\nAccess rights (limited to DB Admin) and responsibility\nAvoid compilation\n\nI think I read something about performance improvements too. I really don't see why the team hasn't used these yet. In this particular case, I would like to know, from experience, is there any good reason to NOT use them?\nMostly when there are so many \"SELECT\" queries along the code, why not use Views?\nI am planning on refactoring the code and start coding the subroutines on the DB Server. I would like to know opinions in favor or against this. The project is rather big (many tables), and expects lots of data to be stored. The amount of data you would have in a social network with some more stuff in it, so yeah, pretty big.\n", "", "php database-design postgresql"], "4420780": ["How to redirect stdout and stderr from csh script", "For the following script\ninstall.csh:\n\n#!/bin/csh -f\ntar -zxf Python-3.1.1.tgz\ncd Python-3.1.1\n./configure\nmake\nmake install\ncd ..\nrm -rf Python-3.1.1\n\nIntended use: \n\nHow can I change the script so that I still get a install.log and the output on console without asking the user to do the redirecting?\n", "./install.csh |& tee install.log\n", "redirect csh"], "5555470": ["Root users and mysql: `sudo mysql` vs `/root/.my.cnf`", "I have a file which stores the mysql root user's password:\n\nWhen I log in as system root and enter mysql, I get a passwordless login:\n\nBut when I try to do the same just using sudo, I get access denied:\n\nHow can I get to log me in as the mysql root user, without entering a password?\n", "/root/.my.cnf", "mysql sudo root users system"], "1624246": ["ssh to local network behind a public IP (TCP forwarding)", "I want to connect (using ssh) two remote computers in a local network using a unique public IP X.X.X.X.\n\nMy public IP has restriction in port 22 so I'm using the port 1234. The router port-forwarding 1234 is enable and directed to HOST_A. Currently, I can access to HOST_B from client executing\n$ ssh -p 1234 [email protected]\nHowerver, I can not access to HOST_B and I don't understand how to use -R and -L option of ssh. I read and follow many examples in the web and I can not achieve HOST_B without login in HOST_A previously.\nI appreaciate an explanation about TCP-forwarding because I'm not sure about if it is possible to login in HOST_B using the ip X.X.X.X without configuring HOST_A.\nAn instance of my search:\nHow to setup ssh tunnel to forward ssh?\n", " |\nHOST_A---------|\n 172.1.1.2 | _____________\n |---------|ROUTER PUBLIC|-----------|INTERNET|-------------|CLIENT\n | _______________ \n | 172.1.1.1 X.X.X.X\nHOST_B---------|\n 172.1.1.3 |\n", "ssh port-forwarding ip-forwarding"], "1773349": ["Getting slmgr.vbs output, and/or Windows licensing status reports across multiple servers", "I've got a number of Windows Servers that I've recently taken ownership on, and I'm looking to do a report on how these are licensed. I know it's a mix between KMS and MAK licensing, but I'm trying to find a way of generating a report showing me the licensing status, or the equivalent output of for each server.\nAll of these machines are managed with SCCM2012, so I thought there would be a way of getting this information from there, but I can't find it.\nShort of writing a script, is there a better way of getting this data?\n", "slmgr.vbs /dli", "windows microsoft-licensing reporting"], "2830424": ["Eliminating \"phantom\" or \"ghost\" clicks on my Mac Pro", "Recently on my Mac Pro I have been experiencing phantom clicks and other strange behaviors. I have been rummaging through my system preferences to try and root out possible causes, and recently came across a strange finding in the Expos\u00e9 panel (the keyboard modifiers are there from my taking the screenshot):\n\nI have had a Logitech 2-button mouse with a mouse wheel for years, and have never had a problem with it in the past. In addition I am running OS X 10.6.8 and have not had any issues like this up to this point.\nIs this a known issue? Is the extensive mouse listing a red herring? Are there any fixes for either issue? \n", "", "mac mouse odd-behavior"], "3502707": ["How set the names of jquery-ui buttons on dialog window from variable?", "jquery-ui dialog window in javascript:\n\nThere two buttons \"Ok\" and \"Cancel\". On each button there function. Buttons names fastened hardly. There some ways to named buttons from variable?? like this:\n\nI try code above but buttons appear with names \"Button1\" and \"Button2\". \nCan I also display images in buttons but not text??? \n", "$( \"#dialog-confirm\" ).dialog({\n resizable: false,\n height:140,\n modal: true,\n buttons: {\n \"Ok\": function() {\n $( this ).dialog( \"close\" );\n },\n \"Cancel\": function() {\n $( this ).dialog( \"close\" );\n }\n }\n });\n", "jquery-ui jquery-plugins jquery-ui-dialog"], "3647852": ["Fluent Nhibernate - Mapping two entities to same table", "I'm trying to map two domain entities to the same table. We're doing a smart entity for our domain model, so we have the concept of an Editable Address and a readonly Address. I have both mapped using Classmaps, and everything seems to go fine until we try to export the schema using the SchemaExport class from NHibernate. It errors out saying the table already exists.\nI assume it's something simple that I'm just not seeing. \nAny ideas?\nThanks\nUpdate\nThere are a couple of other things I didn't mention which I should have. I appreicate those that answered so far, but they don't work for us.\nOne is that we have a single address table, not include the columns in whatever entities have an address.\nThe other is that we can't use a common base class. For editable objects, we have a super class which adds validation behaviors to the subclasses. The readonly objects don't need this behavior though and should not have these behaviors. \nI have considered an interface, but then I believe I end up in a situtation where you can cast a readonly object to this interface and then changes its values (since presumably NHibernate would use said interface to hydrate the object).\nSo if there's another way to acomplish this, or if mapping via an interface won't have the problem I described, please let me know. I'm still learning NHibernate.\nThanks again!\n", "", "c# nhibernate fluent-nhibernate nhibernate-mapping"], "5937149": ["tableView:cellForRowAtIndexPath: only returning one custom uitableviewcell", "I have been through my debugger and noticed my code will only return one customcell from my \ntableView:cellForRowAtIndexPath: method.. I don't know why or how to make it return both the customcells I want it to.. all it dose is display the same custom cell in both sections.\n\n", " - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {\n return 2;\n}\n\n// Customize the number of rows in the table view.\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {\n NSInteger rows = 0;\n switch (section) {\n case 0:\n rows = 1;\n break;\n case 1:\n rows = 1;\n break;\n }\n return rows;\n}\n\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {\n\n //Registration Button\n static NSString *CellIdentifier = @\"CustomRegCell\";\n static NSString *CellNib = @\"LogInCustomCell\";\n\n UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];\n if (cell == nil) {\n NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellNib owner:self options:nil];\n cell = (UITableViewCell *)[nib objectAtIndex:0];\n }\n\n //Registration Button\n static NSString *CellButtonIdentifier = @\"CustomSubmitCell\";\n static NSString *CellButtonNib = @\"LogInCustomCell\";\n\n UITableViewCell *cellButton = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellButtonIdentifier];\n if (cellButton == nil) {\n NSArray *nibButton = [[NSBundle mainBundle] loadNibNamed:CellButtonNib owner:self options:nil];\n cellButton = (UITableViewCell *)[nibButton objectAtIndex:0];\n }\n NSLog(@\"%i\", indexPath.section);\n if (indexPath.section == 0) {\n return cell; // jumps out of method here \n\n }\n if (indexPath.section == 1) {\n return cellButton; \n\n }\n return nil; \n}\n", "iphone ios uitableview uitableviewcell"], "4584945": ["JFreeChart - CategoryAxis step", "I have a method for generating dataset:\n\nand create BarChart:\n\nArray of doubles hold histogram data, so there are 255 values. \nWhen I display chart there are labels for\nall values from 0 - 255 on x axis. I want display only labels for several indexes (for example: 0, 10, 20, 30). I saw that in RangeAxis there is setStandardTickUnits method. But in CategoryAxis:\n\nI didn't find this. \nAny help?\n", "private CategoryDataset createDataset(double[] arr,\n String seriesName) {\n DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < arr.length; i++) {\n dataset.addValue(arr[i], \"mySeries\", new Integer(i));\n }\n\n return dataset;\n }\n", "java jfreechart"], "5961979": ["How to add a drop-down element dynamically when a radio button is checked?", "When I click the radio button, I want to display a drop-down list element dynamically in the same form. There is no button, only a radio button. I am looking for a solution using JavaScript and Ajax.\n", "", "javascript ajax dynamic drop-down-menu radio"], "5263146": ["Converting recurrence relation to summation, trivial problem", "I am reading book concrete maths, in which at some point authors speak about general method of converting recurrence relation of type $a_n T_n = b_n T_{n-1} + c_n$ .\nThen one multiplies the above relations with $s_n$ called summation factor.\nwhich makes the equation : $s_n a_n T_n = s_n b_n T_{n-1} + s_n c_n$ \nThe factor $s_n$ is chosen to make : $s_n b_n = s_{n-1} a_{n-1}$\n....\nWhat I didn't get in all this is: The relation $s_n = s_{n-1} a_{n-1} / b_n $ gets expanded to :\n$$ s_n = a_{n-1} a_{n-2} ... a_1 / b_n b_{n-1}...b_2 $$\nHow did above step happened I am wondering , why $b_n$ starts with $b_2\\ to\\ b_n $ in divisor? . Thanks\n", "", "discrete-mathematics summation"], "1870868": ["Using EGL Pixel Buffer", "I'm on embedded platform Mali400GPU, Ubuntu. I'm trying to use EGL Pixel Buffer, to copy a texture that is rendered using fragment shader to a pixel buffer so that I can do some processing on that buffer on CPU. I have done the following code but when trying use the buffer object and draw it on a quad, the quad has a distored texture, i don't know why.\nThis is in Init function\n\nIn Drawing:\n\n", "// EGL variables\nEGLDisplay eglDisplay = 0;\nEGLConfig eglConfigWindow = 0;\nEGLConfig eglConfigPbuffer = 0;\nEGLSurface eglSurfaceWindow = 0;\nEGLSurface eglSurfacePbuffer = 0;\nEGLContext eglContext = 0;\n\n\nconst EGLint attribListWindow[] =\n{\n EGL_SURFACE_TYPE, EGL_WINDOW_BIT,\n EGL_RED_SIZE, 5,\n EGL_GREEN_SIZE, 6,\n EGL_BLUE_SIZE, 5,\n EGL_ALPHA_SIZE, 0,\n EGL_DEPTH_SIZE, 16,\n EGL_STENCIL_SIZE, 0,\n EGL_NONE\n};\nconst EGLint attribListPbuffer[] =\n{\n EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,\n EGL_RED_SIZE, 5,\n EGL_GREEN_SIZE, 6,\n EGL_BLUE_SIZE, 5,\n EGL_ALPHA_SIZE, 0,\n EGL_DEPTH_SIZE, 16,\n EGL_STENCIL_SIZE, 0,\n EGL_NONE\n};\nconst EGLint srfPbufferAttr[] =\n{\n EGL_WIDTH, 1024,\n EGL_HEIGHT, 1024,\n EGL_COLORSPACE, GL_RGB,\n EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB,\n EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,\n EGL_LARGEST_PBUFFER, EGL_TRUE,\n EGL_NONE\n};\n\n EGLint iMajorVersion, iMinorVersion;\n int iConfigs;\n eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);\n eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion);\n eglChooseConfig(eglDisplay, attribListWindow,\n &eglConfigWindow, 1, &iConfigs);\n eglContext = eglCreateContext(eglDisplay,\n eglConfigWindow, NULL, NULL);\n eglSurfaceWindow = eglGetCurrentSurface(EGL_DRAW);\n eglSurfacePbuffer = eglCreatePbufferSurface(eglDisplay,\n eglConfigPbuffer,srfPbufferAttr);\n\n eglMakeCurrent(eglDisplay, eglSurfacePbuffer, eglSurfacePbuffer, eglContext);\n\n glGenTextures(1, &theSource);\n glBindTexture(GL_TEXTURE_2D, theSource);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1024,\n 1024, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);\n glTexParameterf(GL_TEXTURE_2D,\n GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n glTexParameterf(GL_TEXTURE_2D,\n GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n glTexParameterf(GL_TEXTURE_2D,\n GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n glTexParameterf(GL_TEXTURE_2D,\n GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n", "c++ opengl-es opengl-es-2.0 egl"], "5900562": ["Disable Delegate Access in Outlook / Exchange 2007", "I've found that you can disable delegate access individually, on each client, through the Add-ins menu, under Exchange Client Extensions. However, we do not want any of our users to be able to use delegate access, so would like to disable it company-wide.\nDoes anyone know of a way to do this, either through Exchange or group policy?\nBoth Exchange and the Outlook clients are version 2007.\n", "", "exchange-2007 outlook-2007"], "2823270": ["Creating a view to allow adding multiple items", "Im building an mvc3 application using EF4 to get data from a db.\nFor ease of explanation I will say I have an online recipe application that allows me to add ingredients to a recipe. An ingredient can have different quantities and different weight types.\nI have a table called Ingredients and a table called RecipeDetails. \nI am not sure the best way to do what I want but let me try explain.\nI want to add a table into my Create view that allows me easily to add new ingredients in an easy to use manor. I was thinking of a dropdown list that is populated with all ingredients and I want the ability to add quantity of weight and type of measurement e.g. tsp,KG,ml etc. \nAn example of what I am wanting to achieve.\n\nSo if I have 2 models that look like\nIngredientModel >\nIngredientID\nIngredientName\nRecipeModel >\nRecipeID\nRecipeName\nI assume my viewmodel should look like \n\nMy controller \n\nHow do create something similar to the image? do I create a partial view that contains the dropdownlist and 2 textboxes somehow bound to Ingredients in my ViewModel. Then create a for loop on my Create View that adds however many lines (partial views )for the recipe I want?\n", "public class RecipeViewModel\n{\n public RecipeModel RecipeModel { get; set; }\n public List<IngredientModel> Ingredients { get; set; }\n\n}\n", "asp.net-mvc-3"], "3904169": ["Are there any cross platform Java packages that can play, seek, and pitch shift MP3, WAV, OGG, MOD, S3M, IT, XM, and MIDI?", "Or if not all of those, at least MP3, WAV, OGG, and MIDI, and preferably noarch (works on 32 bit and 64 bit builds) I tried using Audiere's Java bindings, but they are 32 bit, and it would be a pain to have to compile it in all builds and platforms (plus I'm not familiar with compiling)\n", "", "java audio cross-platform"], "4476310": ["Silverlight Mouse Class", "I am trying to translate this code into Silverlight. Any suggestions for a replacement for the Mouse class?\n\n", " private void AssociatedObject_GotFocus(object sender, RoutedEventArgs e)\n {\n if (Mouse.LeftButton == MouseButtonState.Released && Mouse.MiddleButton == MouseButtonState.Released && Mouse.RightButton == MouseButtonState.Released && Mouse.XButton1 == MouseButtonState.Released && Mouse.XButton2 == MouseButtonState.Released)\n {\n AssociatedObject.SelectAll();\n _alreadyFocused = true;\n }\n\n }\n", "silverlight"], "3314744": ["Are Message Queues the right tool for geographically distributed deployments?", "Our scenario is as follows (which I guess is not unique): we have our database backed web apps in two different colocation facilities. One facility has the master database, the other one has the slave. \nWe want the slave facility to keep working (in limited mode if necessary) even if the master database is offline. When the master database comes backup, the data should get synchronized.\nI was thinking that I can use messages queues to send the data update instructions. The message queue in the slave server will hold its messages if there is a disconnect between the slave and master servers. When the connection comes back up the messages will flow and the master server will update the database.\nAm I missing something? Is this not a good use for message queues?\n", "", "synchronization message-queue amqp"], "2615569": ["Compile error when calling a move overloaded function with an implicitly convertible object", "This program does not compile using :\n\nCompile errors: \n\nWhy does it not compile? Why does the compiler prefer over ?\nIn addition, why would compile while both (the above program) and do not?\n", "clang++ test.cpp -std=c++0x", "c++ c++11 overloading clang move-semantics"], "614531": ["Exclusive of cost, what is the ideal monitor set up for a team of programmers?", "Given a new office, new desks, and very little limitation on per-person costs (within reason - virtual reality helmets are not likely) what is the ideal number, size, and orientation of (presumably flat-screen LCD) monitors to maximize productivity, efficiency, and accuracy in coding? \nIf it's relevant, assume .NET development for a web environment, employees in individual offices with large desks. The coders are currently IMing for most conversation, though all are on-site, and web browsing is a part of the job.\n", "", "hardware environment monitors programmers"], "2130448": ["Reflection to generate SQL in C#?", "I have my own ORM but i notice it preforms poorly when for example i get 100k results. For each iteration i reflect each type, its fields/properties and classes it uses (1 deep).\nReflecting a class 100k times get slow. Is there some kind of thing i can use to generate C# code so i dont need to use reflection? I could just rewrite the important select queries as regular sql instead of using my ORM but i thought i ask if there is a tool first.\nI am using a mysql db.\n-edit- Temp solution. dapper.net seems to have the performance i need on queries while my own orm creates tables, inserts and has addition execute features. Between the two i think i have EVERYTHING i need. (remember i need performance on selects which dapper offers, i dont need performance on inserts unless my site becomes huge)\n", "", "c# mysql orm"], "4103627": ["Threads and device orientation", "I got main that on button press starts other class named Getter and that Getter class creates 1-60 000 threads (which do network stuff), so it takes some time until they all are completed. My problem is that when I rotate my device while those threads are running, my program stops working correctly. In my main Activity I have handler that every 2 seconds gets an array from Getter class and then puts those values into local array list.\nI tried this solution:\nBackground task, progress dialog, orientation change - is there any 100% working solution?\nbut found it very complicated. So now I am wondering if there is any other solution to my problem. For instance can my threads continue running in background even if my orientation changes? If that is not possible can I programatically lock orientation to the one it was just before button was pressed, then wait until threads have completed then again make orientation to go with sensor?\n", "Activity", "android multithreading orientation"], "5246501": ["Why most wireless keyboard do not have led indicator?", "I want to buy a wireless keyboard. However, most do not have LED indicator for numlock capslock and scroll lock. I wonder why.\nMac keyboard has that. Most wireless keyboard for PC doesn't. They can just turn of all those locks when not in used right?\nI suspect it's to save power. That's what I suspected. However, it's such a small LED and only show up when the keyboards are actually in use. Also Mac keyboards have LED.\n", "", "keyboard mouse"], "279716": ["Error in Ubuntu, what does this mean?", "Got this on my machine. I was just browsing the web on Chrome and my computer froze. I recently just built this machine. I have a feeling it is a hardware problem... Possibly one of my parts arrived broken in some way....\n\n", " Starting anac(h)ronistic cron\nStopping anac(h)ronistic cron\nStopping cold plug devices\nStopping log initial device creation\nStarting enable remaining boot-time encrypted block devices\nStarting configure network device security\nStarting configure virtual network devices\nStarting save udev log and update rules\nStopping configure virtual network devices\nStopping save udev log and update rules\nChecking battery state...\nStopping System V runlevel compatibility\nStopping enable remaining boot-time encrypted block devices\n\nStopping Mount filesystems on boot\n\n91.573384] BUG: unable to handle kernel NULL pointer dereference at (null)\n91.573437] IP: [<ffffffff81313514>] strcmp+0x14/0x30\n91.573470] PGD 1f7822067 PUD 1ed7a6067 PMD 0\n91.573498] Oops: 0000 [#1] SMP\n91.573519] CPU 3\n91.573531] Modules linked in: dm_crypt bnep snd_hda_codec_realtek rfcomm bluetooth parport_pc ppdev arc4 fglrx(P) rt2800usb rt2800lib crc_ccitt rt2x00usb rt2x00lib mac0021 cfg80211 psmouse snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer send_seq_device snd joydev mac_hid mei(C) soundcore serio_raw snd_page_alloc lp parport ses enclosure usbhid hid i915 drm_kms_helper drm i2c_algo_bit mxm_umi tg_video wmi usb_storage\n91.573826]\n91.573837] Pid: 2297, comm: update-notifier Tainted: P C O 3.2.0-29-generic #46-Ubuntu To Be Filled By O.E.M. To Be Filled By O.E.M./Z77 Extreme4\n91.573912] RIP: 0010:[<ffffffff81313514>] [<ffffffff81313514>] strcmp+0x14/0x30\n91.573954] RSP: 0018:ffff8801f83f5bb8 EFLAGS: 00010246\n91.573982] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000\n91.574019] RDX: 0000000000000069 RSI: 0000000000000000 RDI: ffff88021adb26f8\n91.574056] RBP: ffff8801f83f5bb8 R08: ffff88022f2d6e80 R09: 0000000000000000\n91.574093] R10: ffff88021e7dbf00 R11: 0000000000000003 R12: ffff88021c10eb40\n91.574130] R13: 0000000000000000 R14: ffff88021adb26f8 R15: ffff8801f83f5d40\n91.574168] FS: 00007f958cf53940(0000) GS:ffff88022f2c0000(0000) kn1GS:0000000000000000\n91.574210] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n91.574240] CR2: 0000000000000000 CR3: 000000021f6d7000 CR4: 00000000000406e0\n91.574277] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n91.574314] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000000\n91.574351] Process update-notifier (pid: 2297, threadinfo ffff801f83f4000, task ffff880208fe2e00)\n91.574397] Stack:\n91.574409] ffff8801f83f5be8 ffffffff811ed509 ffff88021adb26c0 ffff88021b8b7020\n91.574453] ffff88021b461c60 fffffffffffffffe ffff8801f83f5c18 ffffffff811ed61f\n91.574496] ffff88021adb26c0 ffff88021b8b7020 ffff8801f83f5dc8 0000000000000001\n91.574539] Call Trace:\n91.574558] [<ffffffff811ed509] sysfs_find_dirent+0x59/0x110\n91.574591] [<ffffffff811ed61f] sysfs_lookup+0x5f/0x110\n91.574621] [<ffffffff81182745] d_alloc_and_lookup+0x45/0x90\n91.574654] [<ffffffff8118fe65] ? d_lookup+0x35/0x60\n91.574683] [<ffffffff811848d2] do_lookup+0x202/0x310\n91.574712] [<ffffffff8118660c] path_lookupat+0x11c/0x750\n91.574744] [<ffffffff81318db7] ? __strncpy_from_user+0x27/0x60\n91.574778] [<ffffffff81186c71] do_path_lookup+0x31/0xc0\n91.574809] [<ffffffff81187779] user_path_at_empty+0x59/0xa0\n91.574842] [<ffffffff81187822] ? do_filp_open+0x42/0xa0\n91.574872] [<ffffffff811877d1] user_path_at+0x11/0x20\n91.574902] [<ffffffff8117c80a] vfs_fstatat+0x3a/0x70\n91.574933] [<ffffffff81161cff] ? kmem_cache_free+0x2f/0x110\n91.574965] [<ffffffff8117c85e] vfs_lstat+-x31/0x70\n91.574993] [<ffffffff8117c9fa] sys_newlstat+0x1a/0x40\n91.575022] [<ffffffff81176ee1] ? do_sys_open+0x171/0x220\n91.575053] [<ffffffff8117cb1a] ? sys_readlinkat+0x7a/0xb0\n91.575086] [<ffffffff81661ec2] system_call_fastpath+0x16/0x1b\n91.575118] Code: 83 c1 01 40 84 ff 75 ef 5d c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 00 55 31 c0 48 89 e5 66 2e 0f 1f 84 00 00 00 00 00 0f b6 14 07 <3a> 14 06 75 0f 48 83 c0 01 84 d2 75 ef 31 c0 5d c3 0f 1f 00 19\n91.577243] RIP [<ffffffff81313514>] strcmp+0x14/0x30\n91.579314] RSP <ffff8801f83f5bb8>\n91.581385] CR2: 0000000000000000\n", "linux ubuntu cron freeze"], "3964593": ["Backbone Router not working using boilerplate", "Ok, I think this is something simple, however I am being to stupid to see it. Here is my code in backbone using the backbone boilerplate method\n\nI am running this of a MAMP server and when i type Localhost:8888/reel , I get the example index page that comes with boilerplate. However when I type Localhost:8888/reel/item or Localhost:8888/reel/#item I either get, page can not be found or directed back to my index page. \nMy question is what am i doing wrong. Do I need to use htaccess? This doesnt seem right. Is there a way using backbone to sort this. Sorry if this is really simple, just cant get my head around it.\n", "require([\n \"app\",\n\n // Libs\n \"jquery\",\n \"backbone\",\n\n // Modules\n \"modules/example\"\n],\n\nfunction(app, $, Backbone, Example) {\n\n // Defining the application router, you can attach sub routers here.\n var Router = Backbone.Router.extend({\n routes: {\n \"\": \"index\",\n \"item\" : 'item'\n },\n\n index: function() \n {\n console.info('Index Function');\n var tutorial = new Example.Views.Tutorial();\n\n // Attach the tutorial to the DOM\n tutorial.$el.appendTo(\"#main\");\n\n // Render the tutorial.\n tutorial.render();\n },\n\n item: function()\n {\n console.info('Item View');\n }\n });\n\n // Treat the jQuery ready function as the entry point to the application.\n // Inside this function, kick-off all initialization, everything up to this\n // point should be definitions.\n $(function() {\n // Define your master router on the application namespace and trigger all\n // navigation from this instance.\n app.router = new Router();\n\n // Trigger the initial route and enable HTML5 History API support\n Backbone.history.start({ pushState: true, root: '/reel' });\n });\n\n // All navigation that is relative should be passed through the navigate\n // method, to be processed by the router. If the link has a data-bypass\n // attribute, bypass the delegation completely.\n $(document).on(\"click\", \"a:not([data-bypass])\", function(evt) {\n // Get the anchor href and protcol\n var href = $(this).attr(\"href\");\n var protocol = this.protocol + \"//\";\n\n // Ensure the protocol is not part of URL, meaning its relative.\n if (href && href.slice(0, protocol.length) !== protocol &&\n href.indexOf(\"javascript:\") !== 0) {\n // Stop the default event to ensure the link will not cause a page\n // refresh.\n evt.preventDefault();\n\n // `Backbone.history.navigate` is sufficient for all Routers and will\n // trigger the correct events. The Router's internal `navigate` method\n // calls this anyways.\n Backbone.history.navigate(href, true);\n }\n });\n\n});\n", "backbone.js backbone-routing"], "5569954": ["FontExplorer like application for Windows", "Has anybody found a font browser solution as great as FontExplorer on Mac, for Windows?\n", "", "windows software-rec fonts"], "5591559": ["How do I prepend text to a selected line in a Rich Text Box?", "Let's say I have some batch code that prints out a hello world program in batch, and I have placed the code into a rich text box (that is in visual C# .NET):\n\nNow, I want to be able to highlight a line, or part of a line, and then comment out that highlighted line by adding a \"::\" to the front.\nSo for example, if I highlighted \"echo\", and then clicked a button, it would insert a \"::\" to the front of the line.\nHow would I do that in code?\n", "@echo off\ncls\ntitle Hello World\necho Hello World\npause\n", "c# richtextbox"], "2374118": ["When NOT to use MVP/MVC?", "Okay this is a question that I could find but very few proper arguments for/against.\nI appreciate the value these patterns provide for testability and separation of concerns. Especially in cases where we would have some sort of data store(s), that could presented to the user in different ways. \nBut consider an application where each model is only bound to 1 view. An example maybe an audio format converter, which could be just a small GUI sitting over (a) big API(s) back-end. The UI just needs basic validation (for paths and formats), and the rest is left to the back-end. \nWould the benefit of using one such pattern here justify the extra code? Personally, I see it as an unneeded overhead, but I may very well be wrong, hence the question. :-)\nEDIT:\nThe example application I wrote about here seems to have been distracting people from the main point of the question. I'm asking when MVP/MVC are NOT good. Here's a quote from the Golden 4:\n\nNo discussion of how to use design patterns would be complete without a few words on how not to use them. Design patterns should not be applied indiscriminately. Often they achieve flexibility and variability by introducing additional levels of indirection, and that can complicate a design and/or cost you some performance. A design pattern should only be applied when the flexibility it affords is actually needed.\n\nAnd that's the main point of the question. I couldn't find those few words on how not to use [MVC/MVP], so the question is an attempt for just that. As I said above, I really appreciate the value they provide, but I want to know when they are a horrid idea. No pattern is good all the way for sure?\n", "", "design-patterns mvc mvp"], "5600055": ["Interactive Heatmap / Matrix Visualization", "I would like to display on a webpage a heatmap (matrix) that I generate in R. \nThe matrix I have looks like this, but in my case the size is 300x300. \n\nBasically I am looking for an interactive clustering, which would look like this : \nhttp://online.wsj.com/article/SB125993225142676615.html#articleTabs%3Dinteractive\nhttp://mbostock.github.com/protovis/ex/matrix.html\nI would like to be able to clic on a branch which would then highlight the selected group/text, and fade out the rest of the matrix. \nI have had a look around and cannot find much. I don't even know what language I should use for this ? JSON, Flash, HTML5, javascript, google charts ?\nAny comments and advices would be extremely appreciated here. \nThanks. \n", "", "matrix visualization google-visualization"], "634417": ["Getting selenium ElementNotVisibleException with Doctype", "I am using selenium selenium-java-2.1.0.jar, selenium-server-standalone-2.1.0.jar\nOn a particular page which has HTML and flash both . I am getting \norg.openqa.selenium.ElementNotVisibleException: Cannot click on element (WARNING: The server did not provide any stacktrace information)**\nSelenium is able to find the webelement but was not able to click on it. What I observed is after removing the doctype \n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> it started working absolutely fine. Is there any fix to it because I cannot remove doctype decaration from the page.\n", "", "selenium2"], "5893587": ["How to get PayPal's user data and transaction details using paypal_permissions gem?", "I need to get Transaction data(date, valued) and user adata.Can I use this gem with some modifications as in this question?\nAlso, from documentation:\n\nFor example, if you plan to query PayPal using getBasicPersonalData and getAdvancedPersonalData, you might generate a merchant model like:\n\n\nI should use Payment Data Transfer (PDT) or TRANSACTION_DETAILS?\nIt is place,where I will write data, but how I can get data from PayPal ?\nCan anyone give me example of code ?\n", "rails generate paypal_permissions merchant email:string first_name:string last_name:string full_name:string country:string payer_id:string street1:string street2:string city:string state:string postal_code_string phone:string birth_date:string \nbundle exec\nrake db:migrate\n", "ruby-on-rails transactions report paypal-api"], "596586": ["How to use ADFS with Google Apps while still allowing gmail on mobile", "I've been asking Google but cannot come up with an answer:\nI would like to implement an ADFS server locally for my organization. This would be an SSO location for all apps, internal and DMZ and partner. In this case, Google is a partner (Apps for Buisness). We would like an ADFS page to use SAML2.0 to authenticate to Google. I know this is possible.\nThe question I have is how this affects users who add their Gmail mail and calendars to their mobile devices. Do I somehow have to sync usernames and passwords with the Googles or would it somehow still work?\n", "", "mobile gmail adfs2.0 adfs google-apps-for-education"], "612409": ["C++ Cross-Platform High-Resolution Timer", "I'm looking to implement a simple timer mechanism in C++. The code should work in Windows and Linux. The resolution should be as precise as possible (at least millisecond accuracy). This will be used to simply track the passage of time, not to implement any kind of event-driven design. What is the best tool to accomplish this?\n", "", "c++ cross-platform timer"], "2875601": ["Jitter calculation in WIreshark", "I have a query regarding the Jitter calculation method in Wireshark.\nWireshark calculates jitter according to RFC3550 (RTP):\nIf Si is the RTP timestamp from packet i, and Ri is the time of arrival in RTP timestamp units for packet i, then for two packets i and j, D may be expressed as\nD(i,j) = (Rj - Ri) - (Sj - Si) = (Rj - Sj) - (Ri - Si)\nThe interarrival jitter SHOULD be calculated continuously as each data packet i is received from source SSRC_n, using this difference D for that packet and the previous packet i-1 in order of arrival (not necessarily in sequence), according to the formula\nJ(i) = J(i-1) + (|D(i-1,i)| - J(i-1))/16\nNow, here the absolute value of inter-arrival jitter has been taken into consideration. My query is why the absolute value has been taken when the jitter could be negative also and i think if we take the negative jitter into consideration also, we will get the much actual value rather than the value we are taking at present\nAlso, when we plot the jitter distribution graph using the above method, it wont be centered around zero as we have made all the values positive and that graph wont look realistic.\nCan someone clarify my query?\n", "", "wireshark"], "5084290": ["Solving trailing slash problem for a given setup", "Considering the following rules, how can I rewrite them in order have a trailing slash? I have to mention that I can only edit the .htaccess file, so I have no access to modify the URLs in the website. \n\nSo, if someone is looking up it has to automatically redirect to .\n", "RewriteRule ^artists/(.*)-p(.*)$ /artists.php?l=$1&p=$2 [QSA,L]\nRewriteRule ^artists/(.*)$ /artists.php?l=$1 [QSA,L]\nRewriteRule ^lyrics/(.*)/(.*)$ /artists-albums.php?a=$1&b=$2 [QSA,L]\nRewriteRule ^lyrics/(.*)$ /artists-details.php?a=$1 [QSA,L]\nRewriteRule ^p-(.*)-(.*)$ /index.php?p=$1&q=$2 [QSA,L]\n", "apache .htaccess mod-rewrite"], "4244581": ["Notification service for software version updates", "There are a lot of (open source) projects that I'm interested in - dozens at least. I'd like to get a notification whenever a new version is released.\nIs there a service that does this?\n", "", "open-source versioning"], "4749115": ["RegLoadKey to a hive file from within a Shadow copy", "I'm creating a shadow copy and I want to mount a registry hive from that shadow copy using so I go over its content using the normal registry functions.\nThis usually works well except in certain machines where it doesn't work at all.\nI create the shadow copy and get its mount point - something like\n\nI then call \n\nThis call returns \nIf I use I can open this file successfully using that path so it is definitely there.\nI've made sure that the shadow copy is created with the registry writer so I don't think that's the issue.\nThere's no difference if I create the shadow copy and try this after a reboot.\nThis only happens on some machines. on most it works just fine. I'm not sure what differentiates the machines it doesn't work on.\nThe machine is a windows 2008 64-bit.\n", "RegLoadKey()", "c windows registry backup shadow-copy"], "5551192": ["When to use conversion operators?", "Considering the following example, the line gives ambiguous conversion which is handled in two ways, using the explicit cast which i think shouldn't be necessary and replacing the use of conversion operators with member functions instead. and here, my question becomes should you still use conversions operators or not at all?\n\n", "int a = objT + 5;", "c++ operators implicit-conversion"], "3231600": ["Swing form database connection", "I am new to Java and NetBeans, and I am attempting to create a form that\n\nconnects to a database using JDBC connection\nreads information from seven columns and displays them on a jTable component already on the form\n\nI already have this working. I am now trying to optimize my code and use a better architecture to separate the database connection and the user interface (UI forms) code so that I can have a separate class to perform the connection and then simply call the method from this class in the code behind the button. The problem with using NetBeans and forms is that I don't know where to instantiate this class and such. Below is a cope of the class that I have created to perform the JDBC connection\n\n}\nThis is already a file. I have a JForm, and I need to call this method behind the button. Here is how I do it in the form currently without using a connection class:\n\nHow can I use the class instead of hard coding in the connection? I have already created the class but where do I instantiate it. Do I do it in the main of the form or do I do it in the actionevent code with the following code?\n\n", "public class ConnectionManager {\nprivate static String url = \"jdbc:mysql://localhost:3306/prototypeeop\";\nprivate static String driverName = \"com.mysql.jdbc.Driver\";\nprivate static String username = \"root\";\nprivate static String password = \"triala\";\nprivate static Connection con;\nprivate static String url;\n\npublic static Connection getConnection() {\n try {\n Class.forName(driverName);\n try {\n con = DriverManager.getConnection(url, username, password);\n } catch (SQLException ex) {\n // log an exception. fro example:\n System.out.println(\"Failed to create the database connection.\");\n }\n } catch (ClassNotFoundException ex) {\n // log an exception. for example:\n System.out.println(\"Driver not found.\");\n }\n return con;\n}\n", "java database swing database-connection"], "5635537": ["How do I force the auto-generated WSDL on two load-balanced machines to match?", "We have a WCF service that is deployed to two servers. The bits are exactly the same.\nIn the auto-generated WSDL at , the node lists out a bunch of XSD's, in this format:\n\nThis is all fine and good, but the problem is the order of the XSD's is different on each load-balanced server, even though they have the same bits. This means the XSD at https://mywebsite.com/SomeService/Soap.svc?xsd=xsd0 is very different on each server, and this is obviously causing issues for those consuming the service.\nI'm aware there are code solutions to flatten the WSDL and include all the XSD's in it. However, is there any simple solution to just force the WSDL's to match? After all, it is the same bits on each machine.\n", "https://mywebsite.com/SomeService/Soap.svc?wsdl", ".net wcf xsd wsdl"], "5797717": ["using a href (html)tag along with PHP", "i have tried:\n\nfollowing javascript is in the same page:\n\nwhere delproduct is a javascript function in delete.php \nwritten like:\n\n** after ** clicking Delete a okcancel message-box appear asking conformation \n** but ** after clicking 'ok' it should execute statements inside delproduct function but it doesn't\nit gives error like: \nObject Not Found :The requested URL was not found on this server.\nwhat would be the problem?\npls help,\nthanks\n", "<?php include(\"delete.php\") ?>\n<?php \n\n ....\n ....\n ....\n\nif($result=mysql_query($sql))\n {\n\n echo \"<table><th>Id</th><th>Name</th><th>Description</th><th>Unit Price</th>\";\n while($row = mysql_fetch_array($result))\n {\n echo \"<tr><td>\".$row['Id'].\"</td><td>\".$row['Name'].\"</td><td>\".$row['Description'].\"</td><td>\".$row['UnitPrice'].\"</td> \n <td><a href='delproduct($row[Id])' onclick = 'return MsgOkCancel()'>Delete</a></td></tr>\";\n echo \"<br/>\";\n }\n }\n?>\n", "php javascript html href"], "3286178": ["Using Bvterm to connect to a WinSSHD", "I am using WinSSHD server to host a remote windows terminal.\nBitvise WinSSHD support remote terminal using BVTERM and terminal format i've never seen anywhere.\nIs there a way to connect to this using Windows software? Does anyone know of a SFTP client that supports this format?\n", "", "sftp cygwin-sshd"], "1772095": ["How do I disable all the validators on a usercontrol?", "I need to disable validation on the user control level. I am aware we can do this with properties. Is there a way to disable all at a once in code? Perhaps by going through a loop or a key? (I do not need to disable all validation at the page level, only the user control level)\n", "", "c# asp.net oop validation usercontrols"], "2185639": ["how to order 2 SQL Fields in asc and desc dynamically", "I want to Order a SQL Select Query where there's 2 fields that are in the order by. I then need to decide if one is Descending and the other as Ascending. How is this done\nI want something like:\n\nAnyone got any ideas?\nI have tried this but it seems to fail\n\nAnyone know how to sort this?\n", "Select * from Customer\nOrder By Date @asc_or_Desc_date, Name @asc_or_Desc_name\n", "sql order"], "2166835": ["Is android WebView saveState/restoreState broken in 4.0+", "I have implemented the webview saveState() restoreState() logic to restore a webview's current page and history like so:\n\nI'm testing state saving by killing the app process via DDMS while the app is in the background.\nWhen relaunching the app it is working as expected on 2.x devices but doesn't on 4.x devices. Instead I either get a blank webview or oddly, the display of the first page in the history.\nHas anyone experienced 4.x specific issues with webview?\n", "public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n\n ...\n\n if(savedInstanceState != null)\n {\n webView.restoreState(savedInstanceState);\n }\n else\n {\n webView.loadUrl(url);\n }\n}\n\n@Override\npublic void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n\n if(webView != null) webView.saveState(outState);\n}\n", "android android-webview"], "4719683": ["Remote Desktop Security", "I currently run Remote Desktop on my home computer (Vista Ultimate). It is always on so I can access things from my home computer when I am not there. I have a linksys firewall and use port forwarding to allow access to the correct ports.\nHow secure is the RDP protocol? It seems to be as secure as the username/password combination you use but I am not sure. Is there a more secure alternative that still has the same functionality?\nUPDATE: Lots of great answers. I am going to try SSH tunneling first. I will post with an update when complete.\n", "", "security windows-vista remote-desktop rdp"], "2360333": ["Project Suggestion for JAVA (University Project)", "I'm a JAVA TA(teacher assistant). We want to give a java GUI project to our student as their midterm project.\nWould you please give me some suitable suggestions based on Swing and Event-Handling ?\nBeside, our students don't know anything about more complicated subjects like File or Network or etc.\nThanks in advance \n", "", "java swing event-handling"], "3990379": ["SharePoint (MOSS 2007) Adding \"This Folder\" option to Out-of-box Search dropdown", "We want to add \"This Folder\" scope to the search dropdown in a document librady. By default, This Site and This List appear in it. One way would be to add scope, but then every time a folder is created, scope would have to be added. Is there any easier way to achieve this?\nThanks,\nMahesh\n", "", "c# sharepoint"], "1206788": ["Default input and output buffering for fopen'd files?", "So a FILE stream can have both input and output buffers. You can adjust the output stream using (I am unaware of any method to play with the input buffer size and behavior).\nAlso, by default the buffer is (not sure if this is a POSIX or C thing). It is very clear what this means for //, but what are the defaults for newly opened files? Are they buffered for both input and output? Or perhaps just one?\nIf it is buffered, does output default to block or line mode?\nEDIT: I've done some tests to see how Jonathan Leffler's answer affected real world programs. It seems that if you do a read then a write. The write will cause the unused portion of the input buffer to dropped entirely. In fact, the there will be some seeks that are done to keep things at the right file offsets. I used this simple test program:\n\nresulted in the following system calls:\n\nWhile these are clearly implementation details I found them to be very interesting as far as how the standard library could be implemented. Thanks Jonathan for your insightful answer.\n", "setvbuf", "c file stream buffer"], "5556850": ["EC2 instances login with password and keypair", "I understand that by default Amazon EC2 configures a keypair with a default instance user (user-ec2 or ubuntu) for SSH access. Also I understand that it is possible to allow password access to a specified user by (PasswordAuthentication yes). Now, it is possible to force both factors as an authentication method? Forcing the administrator to use the keypair and to use the password.\n", "", "ssh amazon-web-services amazon-ec2 passwords key"], "1811323": ["Use method flag or new method?", "If I have a method that does something and additionally logs information, should I create a new method if I don't want to log or use a flag?\n\n...vs...\n\nMy scenario is simple and I'm mainly interested in the flag parameter, which could be an enum creating many if...else if...else if scenarios within the same method. Versus just creating a new method with a different name. I'm in favor of the second solution (new method) since it allows methods to have one responsibility. Fundamentally, that is a simpler solution.\nWhat would be the reason to use the flag version?\n", "public void MethodA(string myMessage, bool logIt)\n{\n if(logIt)\n {\n //do stuff with logging\n }\n {\n //don't need to log\n }\n}\n", "design-patterns oop software-engineering methodology"], "6001925": ["Put Multiple Paragraphs on Screen in Android", "I am developing an android based mobile application. I want to put multiple paragraphs which user can see and can scroll up and down. I don't know how to add multiple paragraphs either via XML or through java code. I am working on Eclipse IDE for android development.\nI'll be thankful if anybody shed some light on it.\nRegards!\n", "", "android android-widget"], "4450026": ["Inserting two seperate fields into one record php mysql", "I have created a planner using php and jquery on my application. I have a section, where the user inputs start date and start time, and another where they input the end date and end time. The fields are all seperate, like so:\n\nWhat I want to know is once the user has inputted the above information, and submits the data to the database, instead of creating seperate columns in the table, is there anyway of inserting the and fields into one database column named as a UNIX timestamp, and also the same for the & fields.\nCan anyone give me any ideas on how I would do this?\n", "<input type=\"text\" name=\"dateFrom\" id=\"dateFrom\"> <!-- datepicker plugin -->\n<input type=\"text\" name=\"time_from\" id=\"timeFrom\"> <!-- timepicker plugin -->\n\n<input type=\"text\" name=\"dateTo\" id=\"dateTo\"> <!-- datepicker plugin -->\n<input type=\"text\" name=\"time_to\" id=\"timeTo\"> <!-- timepicker plugin -->\n", "php mysql datetime unix-timestamp"], "2740957": ["Create a global shortcut for \"New Message\" for Mail in OS X Lion", "How could I create a key shortcut in OS X Lion so when I am using Safari, I type these keys and inmediately a \"New Message\" window from Mail.app shows up?\n", "", "keyboard-shortcuts osx-lion apple-mail"], "3479005": ["Applying CSS to HTML5 Fullscreen API?", "I am trying this example for the full-screen API. Is it possible to apply CSS to the full screen element (eg. )? For example I want to display some text in the full-screen, so I would like to have its width 80% of the screen and add some padding there.\nAlso, is it possible to style an element only when it is in the full-screen mode? Thanks.\nI have tried this:\n\nThis works on chrome, but Firefox ignores the width.\n", "\"#box\"", "html css html5 css3"], "1557282": ["Track system restart", "I've written a windows service thats part of software, I deployed the service on both windows server 2003 and 2008, the client contacted me complaining that when they restarted their servers they kept restarting and this happened on the two machines with two different clients,restarting the servers with last good configuration worked, and the servers are up, I connected to one of the server and ran process monitor, I enabled boot logging then installed my service again , the problem appeared again, booting the system with last good configuration worked, looking at the boot log showed the service works properly and nothing is strange, I decided to install a virtual machine and try to repeat the action, when I did so I found that the virtual machine, reaches the login manager then after a few seconds it restarts, it keeps doing so until I boot the machine in last good configuration, there is no chance to login and run process monitor, any suggestion how to track this problem? any of the sysinternals tools could help?\nThanks in advance,\n", "", "process monitor sysinternals"], "2718537": ["How to display scrollbar in UITableView", "I want to display some kind of indication to guide user to scroll.\nUsually when we touch the UITableView scrollbar appears if needed. But I want this scrollbar indication already displayed on my tableview.\nHow is it possible to do so?\n", "", "iphone uitableview scrollbar"], "4386739": ["Optimization of AndEngine game", "I am using java + AndEngine in my game.\nDuring the game i have some freezes, i looked for the information and found some steps how to optimize game performance:\n\nAvoid GC (garbage collector) to be\ncalled in main action in the game:\na)don't create objects while gaming;\nb)don't create unnecessary objects;\nOptimize code that repeats very\noften\n\nI followed these steps, but never the less i have some freezes during the gameplay.\nNow i am creating and loading all of the textures before the game started and don't unload them, is it a bad idea ? How can i optimize the game proccess ?\nMaybe i have to make free all of the possible memory before main activity and then reload them after each level ?\n", "", "android performance freeze game-physics andengine"], "2721573": ["SQL server 2005 attach without transaction log - urgent !", "We had a crash in the sql server and the database remained in inconsistent mode.\nWe lost the transaction log file and the last generated backup is too old.\nI googled this issue but mostly relevant posts I saw refer to SQL 2000\nI saw this post\nhttp://stackoverflow.com/questions/773059/how-to-recover-database-from-mdf-in-sql-server-2005\nand run the steps:\n\nDetach database and move your mdf to save location.\nCreate new database of same name, same files, same file location and same file size.\nStop SQL server.\nSwap mdf file of just created DB to your save one.\nStart SQL. DB will go suspect.\nALTER DATABASE yourdb SET EMERGENCY\nALTER DATABASE yourdb SET SINGLE_USER\nDBCC CHECKDB (yourdb, REPAIR_ALLOW_DATA_LOSS)\nALTER DATABASE yourdb SET MULTI_USER\nALTER DATABASE yourdb SET ONLINE\n\"\n\nI got till step 8 [DBCC CHECKDB (yourdb, REPAIR_ALLOW_DATA_LOSS)] but each time I repeat the processes \"DBCC CHECKDB\" does not seems to do the job .\nI get error \"query completed with errors\" and that the \"Database 'dbname' is being recovered. Waiting until recovery is finished.\"\nAny Help will be greatly appreciated\nThanks Ron\n", "", "sql-server-2005 sql"], "2821173": ["How to add function to property?", "well, there is some properties may contains functions like that for example\nso,I don't know how to make something like that.\nAccessibilityObject is just an example \n", "", "c# oop"], "4179048": ["Query all posts in a given taxonomy", "For sure it's very simple, but I can not figure out how to do this.\nI need to query all posts that has a specific taxonomy set. Like this:\n\nI want set the field a wildcard. I know I could populate fild with an array, but the list is very very long and I'm worried about weight of the query.\n", "$query03 = array( \n'numberposts' => 5, \n'post_type' => array(\n 'video'\n ), \n'tax_query' => array(\n array(\n 'taxonomy' => 'product',\n 'field' => 'slug',\n 'terms' => **all_the_terms_in_taxonomy**\n )\n ) \n);\n", "wp-query tax-query"], "2599975": ["Secure WCF Services using WIF/STS - decorate methods with required claims?", "I am looking at securing some WCF services using WIF, and have read within the Identity Training Kit from Microsoft, within exercise 1, \"Furthermore, you can expect developers to assign conditions via Code Access Security style calls (i.e. decorating via attributes and so on). Both capabilities will require some coding support\" \n(midway through this article:\nhttp://channel9.msdn.com/Learn/Courses/IdentityTrainingCourse/WebServicesAndIdentity/WebServicesAndIdentityLab/Exercise-1-Using-Windows-Identity-Foundation-to-Handle-Authentication-and-Authorization-in-a-WCF-Ser\n)\nHowever I'm unable to find any documentation regarding how to implement a solution that makes use of this decoration approach. I don't really have any need for using the claims within the actual WCF method or business logic, but simply want to use WIF/STS to secure access to the method. Any tips on whether this is the best approach, and how to secure methods using decorations would be appreciated. \n", "", "wcf decorator wif sts-securitytokenservice"], "4454377": ["Power summation of $n^3$ or higher", "\nPossible Duplicate:\nwhy is $\\sum\\limits_{k=1}^{n} k^m$ a polynomial with degree $m+1$ in $n$ \n\nIf I want to find the formula for $$\\sum_{k=1}^n k^2$$\nI would do the next: $$(n+1)^2 = a(n+1)^3 + b(n+1)^2 + c(n+1) - an^3 - bn^2 - cn$$\nAfter calculations I will match the coefficients.\nWhat equation should I use, if I want to calculate the coefficients of the formula that gives the sum $$\\sum_{k=1}^n k^3$$ or higher?\nEDIT: Please do not refer me to other places, not trying to blaim, or to be rude, but I find your sources too complicated for me, and unable to learn from, for my level.\nIf you can please explain how am I supposed to find an equation that matches to my needs, not the equation itself, only the technique I should be working with.\nRegards, Guy\n", "", "algebra-precalculus"], "2731114": ["how to create strong api key", "I want create a secure REST API\nIf i see the google API for example, the API KEY is generated based on domain.\nfrom this i got two question :\nFirst, is that true/right using one way hash ?, if yes how if someone know the hash method and the domain, so he can generate api key and use it. and what hash method/function that i can use ?\nThe second is, how if client make a desktop application, how he can generate API KEY which accessed from desktop, now a website that have a domain url. i mean, they can generate api key because not have url.\nis there any good way ?, how to create a secured api and how to create a api key ?\nbtw i'm using PHP\nThanks\n", "", "php api"], "3505913": ["SQLException deadlocked: does the exception contains the query text executed somewhere?", "The SQLException \"was deadlocked on lock resources with another process and has been chosen as the deadlock victim\" is quite common ;-)\nDoes the exception contains the query text executed somewhere ?\nIs it possible to obtain ?\nThks\n", "", "c# tsql ado.net"], "5144424": ["Is it safe to ignore the \"Has no specification file\" warnings", "I recently ported my gem management to bundler, to get my app to play nice with heroku. Upon doing so I started to see the following errors (though my app is running fine): \n\nI have seen posts, saying that I can ignore them:\nhttp://gilesbowkett.blogspot.com/2009/03/configgem-unpacked-gem-whatever-in.html\nIs that really the case, can I safely ignore these warnings?\n", "config.gem: Unpacked gem environment.rb in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.\nconfig.gem: Unpacked gem environment.rb in vendor/gems not in a versioned directory. Giving up.\nconfig.gem: Unpacked gem ruby in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.\nconfig.gem: Unpacked gem ruby in vendor/gems not in a versioned directory. Giving up.\n", "ruby-on-rails initialization heroku bundler"], "2409685": ["segment digits in an image - Matlab", "I have an image of license plate in black and white.\nthis is how it looks:\n\nnow I want to color the background of each digit, for further work of\ncutting the numbers from the plate.\nlike this:\n\nany help will be greatly appreciated.\n", "", "matlab image-processing"], "1856954": ["How to access shared preference boolean value from another class", "I have created a radio group which contains two buttons, I can select one and save it, it works fine, still stored after closing the app. What I want to do is use the value of the radio buttons in another class. Here is my settings class which contains the shared preferences code:\n\nIn another class I am trying to check if rb0 is true or false when clicking a button:\n\nI have researched Stackoverflow and the developer documentation, but I cant seem to find out how this can be done, any advice is appreciated.\nThank you\n", "public class Settings extends Activity {\nprivate String settingsTAG = \"AppNameSettings\";\nprivate SharedPreferences prefs;\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n // TODO Auto-generated method stub\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.settings);\n prefs = getSharedPreferences(settingsTAG, 0);\n\n final RadioButton rb0 = (RadioButton) findViewById(R.id.radioInternetYes);\n final RadioButton rb1 = (RadioButton) findViewById(R.id.radioInternetNo);\n\n rb0.setChecked(prefs.getBoolean(\"rb0\", true));\n rb1.setChecked(prefs.getBoolean(\"rb1\", false)); \n Button btnSave = (Button) findViewById(R.id.btnSave);\n\n btnSave.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n prefs = getSharedPreferences(settingsTAG, 0);\n Editor editor = prefs.edit();\n\n editor.putBoolean(\"rb0\", rb0.isChecked());\n editor.putBoolean(\"rb1\", rb1.isChecked());\n editor.commit();\n\n finish();\n\n }\n } );\n\n}\n", "android sharedpreferences"], "5655666": ["Monitoring .NET ASP.NET Applications", "I have a number of applications running on top of ASP.NET I want to monitor. The main things I care about are:\n\nExceptions: We currently some custom code which will email us when an exception occurs. If the application is failing hard it will crash our outlook... I know (and use) elmah which partly solves the problem however it is still just a big table of exceptions with a pretty(ish) UI. I want something that makes sense of all of these exceptions (e.g. groups exceptions, alerts when new ones occur, tells me what the common ones are that I should fix, etc)\nLogging: We currently log to files which are then accessible via a shared folder which dev's grep & tail. Does anyone know of better ways of presenting this information. In an ideal world I want to associate it with exceptions. \nPerformance: Request times, memory usage, cpu, etc. whatever stats I can get\n\nI'm guessing this is probably going to be solved by a number of tools, has anyone got any suggestions?\n", "", "c# .net asp.net logging monitoring"], "4937503": ["JSON and whitespaces in identifiers", "Question: The JavaScript code below:\nrecords is JSON serialized data.\nI can access it right away from JavaScript by using for example \n alert(records.data[0].Phone);\n\nThe problem now is that some bright spark used a whitespace in FirstName and LastName, which means I would have to access it like\nalert(records.data[0].Last Name); Which of course is not possible. \nIs there any way to access it with the whitespace, like an escape sequence?\nI already tried omitting the whitespace, or replacing it with underscore.\nThe problem is I get the record, and I have no control over the source.\n\n", " var records = {\n\"data\" : [\n {\n \"First Name\" : \"John\",\n \"Last Name\" : \"Doe\",\n \"Email\" : \"[email protected]\",\n \"Phone\" : \"(917) 41-6598\",\n },\n {\n \"First Name\" : \"Thomas\",\n \"Last Name\" : \"Brown\",\n \"Email\" : \"[email protected]\",\n \"Phone\" : \"(917) 41-2892\",\n },\n {\n \"First Name\" : \"Albert\",\n \"Last Name\" : \"Hansen\",\n \"Email\" : \"[email protected]\",\n \"Phone\" : \"(917) 41-3769\",\n }\n]};\n\n\n\nalert(records.data[0].Email);\nalert(records.data[0].Phone);\n", "javascript json json.net json-decode json-encode"], "4232423": ["xsd:Import doesn't work in WSDL?", "When put below wsdl into my VS2010 project I got a \"Type 'urn:listing3:Phone' is not declared.\" error. Looks like the xsd:import doesn't work, why?\n\nThe error is, type Phone is declared in namespace listing3, the namespace is also imported in namespace listing2 using , but type Phone cannot be referenced in listing2. The error message is \"Type 'urn:listing3:Phone' is not declared\".\nUpdate:\nThe wsdl was generated automatically by VS2010 when adding the Java web service as a web reference. The wsdl I posted here actually is not the real wsdl but a fake one for security reason. But the structure of both wsdl and the error messages are almost same.\n", "<?xml version=\"1.0\" ?>\n<wsdl:definitions targetNamespace=\"urn:listing2\"\n xmlns:tns=\"urn:listing2\"\n xmlns:listing3=\"urn:listing3\"\n xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <wsdl:types>\n <xsd:schema targetNamespace=\"urn:listing3\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <xsd:import namespace=\"http://www.w3.org/2001/XMLSchema\"/>\n <xsd:complexType name=\"Phone\">\n <xsd:sequence>\n <xsd:element name=\"areaCode\" type=\"xsd:int\"/>\n <xsd:element name=\"exchange\" type=\"xsd:int\"/>\n <xsd:element name=\"number\" type=\"xsd:int\"/>\n </xsd:sequence>\n </xsd:complexType>\n </xsd:schema>\n <xsd:schema targetNamespace=\"urn:listing2\"\n xmlns:listing3=\"urn:listing3\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <xsd:import namespace=\"urn:listing3\"/>\n <xsd:import namespace=\"http://www.w3.org/2001/XMLSchema\"/>\n <xsd:complexType name=\"Address\">\n <xsd:sequence>\n <xsd:element name=\"streetNum\" type=\"xsd:int\"/>\n <xsd:element name=\"streetName\" type=\"xsd:string\"/>\n <xsd:element name=\"city\" type=\"xsd:string\"/>\n <xsd:element name=\"state\" type=\"xsd:string\"/>\n <xsd:element name=\"phone\" type=\"listing3:Phone\"/>\n </xsd:sequence>\n </xsd:complexType>\n </xsd:schema>\n </wsdl:types>\n\n <wsdl:message name=\"GetAddressRequest\">\n <wsdl:part name=\"name\" type=\"xsd:string\"/>\n </wsdl:message>\n <wsdl:message name=\"GetAddressResponse\">\n <wsdl:part name=\"address\" type=\"tns:Address\"/>\n </wsdl:message>\n <wsdl:message name=\"GetPhoneRequest\">\n <wsdl:part name=\"name\" type=\"xsd:string\"/>\n </wsdl:message>\n <wsdl:message name=\"GetPhoneResponse\">\n <wsdl:part name=\"phone\" type=\"listing3:Phone\"/>\n </wsdl:message>\n\n <wsdl:portType name=\"AddressBook\">\n <wsdl:operation name=\"getAddress\">\n <wsdl:input message=\"tns:GetAddressRequest\"/>\n <wsdl:output message=\"tns:GetAddressResponse\"/>\n </wsdl:operation>\n <wsdl:operation name=\"getPhone\">\n <wsdl:input message=\"tns:GetPhoneRequest\"/>\n <wsdl:output message=\"tns:GetPhoneResponse\"/>\n </wsdl:operation>\n </wsdl:portType>\n</wsdl:definitions>\n", "visual-studio-2010 xsd wsdl"], "5363268": ["Jquery Modal Window preceeds download request", "Hopefully this will be basic but if I create a Jquery click connected to a link that is supposed to download a document. However, before the download is initiated, I want the user to complete a quick profile form. \nSuppose a I use a in the html page and the following Jquery function.\n\nI can get the modal window to display and submit the form but how can I redirect the user to the download once the validation is finished? thanks in advance \n", "<a href=\"ProfileFormToBeCompleted.html\" class=\"modal\">", "jquery redirect window modal"], "2806274": ["JNI - automatically attach all newly spawned threads from process to JVM?", "I call a dll from Java using JNI. The DLL calls another thirdparty library which spawns a bunch of threads and sends callbacks to my dll. I want these callbacks to be attached to the JVM. What is the best way to do this? I think since the threads call the callback method, the callbacks aren't attached to the JVM, so I have to attach it?\nIs there no... inheritance, like all threads created by this thread will automatically attached to the JVM?\nI've looked at the documentation but I can't find it.\nThanks\n", "", "java c++ multithreading dll jni"], "5761116": ["Is there a programmatic way to update an android app on the android market?", "Are there any web service APIs available that allow the developer to upload a new build of their android app without having to manually use the android market developer GUI? I would like to configure my one click build system to also deploy to the market if possible.\n", "", "android android-market"], "1591677": ["How to convert a string to a double with 6-digit precision in C++?", "I want to know how to convert a string like to or .\nI need at least 3 digits precision (i.e. 3 digits after the decimal point, regardless of the number of digits before the point).\n", "\"1234.123456\"", "c++ floating-point double string-conversion"], "1244949": ["Specify paths to actions in aspx pages MVC", "I'm working on ASP.NET MVC application. On my master page, I have a form that I need to submit to another action. Below is the relevant code: \n\nAs you can see, when I submit the form I want to go to the \"PerformSearch\" action in the \"Stock\" controller. This works fine on my local machine hosting. But when I try to publish the site on the server, MVC doesn't recognize this path anymore. My question is how should I specify the paths to actions in aspx pages such that it will work both locally and on live. I know that I can use the \"using Html.BeginForm\" and that will solve the problem, but I really don't want to use it for other reasons and also, I always need to specify paths to actions in many other tags other that form tag. \nBy the way, changing the path to \"http://cse454db.cs.washington.edu/BestBet/Stock/PerformSearch\" \nwill make it run on the server since the given path is the exact path for where the application will live (including the virtual directory) but I know this is not the perfect solution since I have to keep changing the path back and forth whenever running it locally or live. Also, I have the same problems in specifying the paths to actions in javascript files. I know there should be an easy solution for it, but I have been looking and couldn't find anything so any help will be greatly appreciated. thanks a lot,\n", "<form id=\"form1\" action=\"/Stock/PerformSearch\" method=\"post\" runat=\"server\">\n//some other stuff \n</form>\n", "asp.net-mvc path action"], "4246203": ["Deploying Hybrid ASP.NET webform and MVC project on iis7 - MVC Routing does not work", "Hi Stackoverflow,\nIm trying to deploy a hybrid ASP.Net Webform/mvc-project onto iis7 but the mvc routing does not work.\nThis is what i have done so far:\n\nAdded all required mvc-related dlls.(i have double checked bin-catalog to make sure that everythings there on the deployed installation)\nAdded MVC wildcard by adding the IsapiModule handler to iis handler mappings.\nThe Server has .Net-Framework 3.5 SP1 installed.\nThe web site Managed pipeline mode set to classic\n\nOur project requires the app pool to be running in none-integrated pipeline, but im not sure what MVC requires of the app pool, may i run ASP.NET MVC(2) in a none-integrated managed pipeline? \nThe web application loads and i want to use the MVC-routing to load javascript but the mvc routing does not responde to the request and instead Webforms gives us a 404-response,\nthis only happens when the project has been deployed onto the server.\nDoes anyone has a idea of why the ASP.Net MVC routing does not fire?\n\nThanks and Best regards,\nMikael\n", "", "asp.net-mvc-2 iis7 asp.net-mvc-routing application-pool hybrid"], "68223": ["BAT script that sends commands to program it starts", "So I'm trying to do something like this:\n\nI know you can send Windows commands through the command line when you first start it like , but the question is can I use a .bat script to act interactively with the program it starts? By default what happens is the first line:\n\nStarts ftp, but the subsequent lines never run until exits.\nedit\nAnother way to phrase this question is \"Is it possible to use a .bat file to queue lines of text to feed to when is next checked for input?\"\n", "ftp my.ip.add.ress\n(user id)\n(password)\ncd /the/directory\nsend C:/code/project1/*\nbye\n", "windows script batch-file"], "4921323": ["How to get the first post and second post in a wordpress blog?", "is there a way I can retrieve the first and second post in wordpress...\nI have tried using get_post() but with that I have to put in a id. What if I don't know the posts id?\n", "", "plugins posts"], "4370892": ["Define Keywords in ANTLR grammar", "I want to build a simple lexical analyzer for a specific language which has reserved words like (if, else, etc.) using ANTLR. I went through several tutorials and was able to find the ways of defining all the options except reserved keywords. How to define reserved keywords in the grammar file in ANTLR ?\nThanks in advance\nShamika\n", "", "java compiler antlr"], "3132744": ["JasperReports, PrintWhenExpression and RemoveLineWhenBlank \u2192 Strange Behaviour", "I have a problem with JasperReports when using printWhenExpression and RemoveWhenBlank inside a subreport.\nTo reproduce this problem, I made a simple example using one master report and two subreport.\nThe first subreport, let's call it the static subreport, contains two Static Text components in the title band (Label 1 on the first line, Label 3 on the second), both have the Position Type attribute set to Float. The title band Split Type attribute is set to \"Immediate\".\nThe dynamic subreport have three Static text components (Label 1 on the 1st line, Label 2 on the second and Label 3 on the third), all of them have the Position Type set to Float. But Label 2 has PrintWhenExpression set to Boolean.FALSE and RemoveLineWhenBlank set to TRUE. So Label 2 is hidden and Label 3 is moved to Label 2's place under Label 1.\nSo basically the dynamic subreport and the static one have the same structure and should behave the same way when printed inside a report. But that's not the case in this little example.\nIn the master report I'm using a subreport component inside the detail band ( the split type of the detail band is set to Immediate ) and using a JREmptyDataSource with 90 empty rows. When pointing the subreport component to the static subreport, the pdf output generated by jasperreports is corrrect. But when using the dynamic subreport, jasperreports leaves an empty space (that is used when using the static subreport) at the end of the first page and jumps to the next page to print Label 3.\nIn the real case that I have a problem with, I have a subreport that contains more than 20 lines with Static Text and Text Field components, most to them with printWhenExpression set to a field or a parameter and RemoveLineWhenBlank set to TRUE. When producing the pdf output in some cases I have that specific subreport (which should occupy just\u00a0 a third of a page) spanning one page and a half with a lot of space spread between the visible lines in the subreport. And I think the combination of RemoveLineWenBlank and PrintWhenExpression is what's causing the problem.\n\u00a0\nSo what I want know is if this is a bug or just me missing something in the documentation.\nHere is a link to the post I made at the JasperReports forum, it contains the templates for the master report and the two subreports, plus two pdfs generated by jasperreports and screenshots showing the layout of the subreports: link\nThanks in advance for your help.\n", "", "jasper-reports ireport"], "5641800": ["Failing to upload Image in base64 bits via XML-RPC [Wordpress/NGG]", "I have literally tried every possible way on this but apparently I just can't figure out the right one.\nI am trying to upload images to the next-gen gallery that is installed on a wordpress blog. Everything about xml-rpc is working since I am able to do all other stuff with it. \nThe problem is that server returns an error saying the image is not a valid one. Which is quite obvious that the problem is about base64. However, for test purposes i copied and checked the base64 string and realized it is just right, it converts right to the image using an external base64 to image converter.\nThis is the line that submits the query.\n\nThe struct for newImage is;\n\nAnd this is how a new one is initialized, along with converting an image into base64\n\nAnd finally my method \"ImageToBase64(Image, ImageFomat)\";\n\n", " result = categories.newImage(1, \"admin\", \"password\", newImage);\n", "c# wordpress base64 xml-rpc nextgen-gallery"], "3475967": ["jaxb @ManyToMany @XmlID @XmlIDREF can't get the Refed objects into a the xml", "Hi i have a problem when i use a webservice \nI have an object User that contains many Roles.\nWhen i get one User(Id:3) from my webservice that contains a role and that role containes many users(id: 3 and id 2). I got an error\nCaused by: javax.xml.bind.UnmarshalException: Undefined ID \"2\".\nI assume that this is due to the User with id 2 ain't in the xml.\nMy question is how do i get this user to be populated into the xml?\n\n", "@XmlRootElement()\npublic class User implements UserInterface {\n\n @Override\n @GeneratedValue\n @Id\n @XmlID\n @XmlJavaTypeAdapter(IntegerAdapter.class)\n public Integer getId() {\n return id;\n }\n\n@Override\n@ManyToMany(targetEntity=Role.class,fetch=FetchType.EAGER)\n@XmlElement(type=Role.class)\npublic Set<RoleInterface> getRoles() {\n return roles;\n}\n\n\n}\n\n@XmlRootElement()\npublic class Role implements RoleInterface {\n @ManyToMany(targetEntity=User.class,fetch=FetchType.EAGER)\n @XmlIDREF\n @XmlList\n public Set<UserInterface> getUsers() {\n return users;\n }\n}\n", "java web-services jaxb cxf"], "2456163": ["MVC 3 versus MVC Turbine", "I have implemented my own inversion of control methodology in MVC 2. I was thinking of reviewing MVC Turbine and possibly switch to that. However, I noticed today that MVC 3 Preview 1 has been released and has new inversion of control support built in. I know it will be a while before it is released, but wanted to see if anyone knows if the new inversion of control support will basically make MVC Turbine unnecessary.\nWhat do you think?\n", "", "mvc inversion-of-control turbine"], "4230817": ["How to list local-variables in Ruby?", "\n", "def method\n a = 3\n b = 4\n\n some_method_that_gives # [a, b] \nend\n", "ruby metaprogramming local-variables"], "3949636": ["android asynctask for httpconnection", "can any one please tell me how to fix this problem .... why is it not working \n im trying to asynctask the connection to a server so it can be on separate thread\n\n", "private class SticketFunctionTask extends AsyncTask<String, Void, Void> {\n\n @Override\n protected Void doInBackground(String... string) {\n\n try {\n\n//public void SticketFunction(){\n //HttpClient\n HttpClient SpeedSticket = new DefaultHttpClient();\n //Response handler\n ResponseHandler<String> res = new BasicResponseHandler();\n\n HttpPost postMethod = new HttpPost(\"http://www.mysite.php\");\n //Log.v(\"log_tag\", \"+-+-+-+-+-+-+-+-+- Done: HTTP Post Sending Stickit to Server\");\n //Log.v(\"log_tag\", \"+-+-+-+-+-+-+-+-+- sTICKET: \" + z.getString(1) + \" \" + z.getString(2) + \" \" + z.getString(3) + \" \" + z.getString(4));\n\n try {\n List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(5);\n nameValuePairs.add(new BasicNameValuePair(\"bookName\", z.getString(1)+\"\"));\n nameValuePairs.add(new BasicNameValuePair(\"bookAuth\", z.getString(2)+\"\"));\n nameValuePairs.add(new BasicNameValuePair(\"ISBN\", z.getString(3)+\"\"));\n nameValuePairs.add(new BasicNameValuePair(\"LibNumber\", z.getString(4)+\"\"));\n //Encode and set entity\n postMethod.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.UTF_8));\n //Execute \n String response = SpeedSticket.execute(postMethod, res).replaceAll(\"<(.|\\n)*?>\",\"\");\n if (response.equals(\"Done\")){\n\n //Log.v(\"log_tag\", \"!!!!!!!!!!!!!!!!!! SticketFunction got a DONE!\");\n\n }\n else Log.v(\"log_tag\", \"!!!!!!!?????????? SticketFunction Bad or no response: \" + response);\n\n } catch (ClientProtocolException e) { \n // TODO Auto-generated catch block \n //Log.v(\"log_tag\", \"???????????????????? SticketFunction Client Exception\");\n } catch (IOException e) { \n // TODO Auto-generated catch block\n //Log.v(\"log_tag\", \"???????????????????? IO Exception\");\n } \n}\n }\n }\n", "android httpclient android-asynctask"], "5575765": ["Block skype using iptables", "Any way to block skype from our network using IPTABLES ?\n", "", "security firewall iptables skype"], "5002010": ["What is a good way to to indicate an IEnumerable is \"slow\" or \"fast\"?", "The answer to What is the expected performance of IEnumerable? says there's no way to know anyting about the performance of iterating an arbitrary IEnumerable. Each iteration could hit a database or make a web serivce call; or it might just return the next item in an array/list.\nGiven that, is there a good way to indicate \"this is fast\"? For example, with or instead of I know that going from to will be quick. (Of course, forcing the enumeration to return a list/array could create other performance concerns. also exposes editable semantics.)\nConversely, would returning instead of be a good way to indicate \"this is slow\"? Or maybe ?\nClients of have no way of knowning that the s will have dramatically different performance characteristics.\n\n", "T[]", ".net performance ienumerable iqueryable"], "5891897": ["Compress C: Disk", "I am trying to automate a Windows (Embedded Standard) 7 installation for my company and one of our requirements is that the C: drive is compressed. I have been using the command:\ncompact /C /S:C:\\ /I\nto accomplish this, but this makes the \"Documents and Settings\" directory (junction) present and viewable. Is there a way to (programmatically, ideally batch script):\n(a) Exclude junctions from the compact operation, or\n(b) Restore junctions to their previous state after compact, or\n(c) compress the disk some other way that is more consistent with how explorer.exe accomplishes it?\nThanks!\n", "", "windows compression command disk"], "2379374": ["when I click a UIButton I'm trying to find out which cells are currently selected inside a UITableView", "I have 2 UITableViews. When I click the UIButton outside of either UITableView I'm trying to determine which cells are selected in each tableview.\nAnyone have a good way of doing this? Would I loop over the cells to determine which cell is currently selected? Or is there already a method that can tell me?\nThanks a bunch!\n", "", "iphone ios uitableview uibutton"], "5170316": ["asp.net iis error", "I am using asp.net 2.0 and IIS 7 on vista 64 bit.\neverytime, when i try to open page in browser, i get following error.\nAccess is denied. \nDescription: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources. \nError message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\\example\\WebApplication1\\WebApplication1\\Default.aspx'.\n", "", "asp.net iis"], "5383596": ["split a List<Product> into SubLists<Product>", "I have a List with Categories and Products as properties, and I wish to seperate all the products pertaining to a Category in different lists.\nAt the moment I have this\n\nBut I cannot seem to get the values from the distinctCats. And I would like to get something like a normal List productList with actual values.\nThanks for your help and time\n", "Products products = new Products();\n\n products.productList.Add(new Products(\"Fruit\", \"Apples\"));\n products.productList.Add(new Products(\"Fruit\", \"Oranges\"));\n products.productList.Add(new Products(\"Fruit\", \"Bananas\"));\n products.productList.Add(new Products(\"Fruit\", \"Grapes\"));\n products.productList.Add(new Products(\"Vegetables\", \"Tomatoes\"));\n products.productList.Add(new Products(\"Vegetables\", \"Lettuce\"));\n products.productList.Add(new Products(\"Vegetables\", \"Onions\"));\n products.productList.Add(new Products(\"Dairy\", \"Milk\"));\n products.productList.Add(new Products(\"Dairy\", \"Yogurth\"));\n products.productList.Add(new Products(\"Dairy\", \"Eggs\"));\n\n List<IEnumerable<string>> distinctCats = products.productList.GroupBy(s => s.Category).Select(s => s.Select(v => v.Product)).ToList();\n", "c# linq c#-4.0 linq-to-objects"], "5124258": ["jquery slider handle not smooth and gets blocked", "My jquery ui-slider is not sliding smoothly in chrome :( while in Firefox there are no problems with it... jQuery version is 1.7.2 custom \nWhen I grab the handle sometimes it slides fine and sometimes it gets stuck that that although you released the mouse button it's still moving left-right with it until you click again...\nThe thing I've noticed is when my handle size is small (smaller than cca 40x40) I have no problem...\nMy HTML:\n\nMy obtrusive .js:\n\nMy CSS:\n\n\n\n", "<div id=\"slider_wrapper\"> \n <div id=\"left_value\">\n <span class=\"percent\">70%</span>\n <span class=\"value\">0.9</span>\n <span class=\"euro\">€</span>\n </div>\n <div id=\"slider\"></div>\n <div id=\"right_value\">\n <span class=\"percent\">1000%</span>\n <span class=\"value\">20.00</span>\n <span class=\"euro\">€</span>\n </div>\n <input type=\"hidden\" name=\"slider_value\" id=\"slider_value\" value=\"-1\" />\n</div>\n", "jquery jquery-ui"], "3240422": ["What would be the total expenses of running an in-home web server?", "I have several hosting accounts with companies, and plan to keep them. However, I would like to try my hand at creating my own home web-server, both for fun and for the learning experience. I would like to know the expenses involved, including:\n\nelectricity costs (greater than light bulb?)\ninternet costs (will I have to upgrade my internet? Or is 3-5Mbps upload speed fine for a web server with medium amount of traffic? Would I have to get a separate internet connection?)\nother unknown expenses\n\nConsider that I will configure the web server myself, so that is not an expense.\nAlso consider that I already have a computer (year-old Dell laptop, 15R) to use to be dedicated as the web server.\nNote:\nI have domain name and software already\n", "", "internet-connection webserver web-hosting"], "5580228": ["Whitespace sensitive FParsec", "I'm trying to implement a whitespace sensitive parser using FParsec, and I'm starting off with the baby step of defining a function which will parse lines of text that start with chars of whitespace.\nHere's what I have so far:\n\nMy issue is that when I run\n\nI get an error on \"you\". I was under the impression that would backtrack any state changes, and returning as my status would give me soft failure.\nHow do I get back from my parser?\n", "n", "f# fparsec"], "5973076": ["asp.net parameters in odbc", "I have a page 3 datacontrols (in order, datalist->grid->listview, the selection from one feeds into the next) works perfectly locally, using dot net connector for mysql. My webhost uses ODBC, and I had to remove [ ] from the select statements in my code and put the table names. I removed the [ ] 's and my page runs, and my 1st/datalist control shows but now my \"selected value\" of my datalist, doesn't populate my grid control. \nI imagine theres another peculiarity with the way odbc handles parameters.\nHere is my original, for my grid:\n\nexample of changes to select that allowed my page to run again:\n\nBTW,\nI also tried removing my scriptmanager & updatepanel,, and using autopostbacks instead in my controls, jik, and nothing changed so I put it back.\n", "<asp:SqlDataSource ID=\"recipegrid\" runat=\"server\"\n ConnectionString=\"<%$ ConnectionStrings:exoticingConnectionString %>\"\n ProviderName=\"<%$ ConnectionStrings:exoticingConnectionString.ProviderName %>\"\n SelectCommand=\"SELECT [Id], [Name], [Cal], [Pro], [Fat], [Carb], [Fiber], [Chol], [Sod] FROM [tblrecipes] WHERE ([filenameid] = @filenameid) ORDER BY [name]\">\n <SelectParameters>\n <asp:ControlParameter ControlID=\"DataList1\" Name=\"filenameid\"\n PropertyName=\"SelectedValue\" Type=\"Int32\" />\n </SelectParameters>\n </asp:SqlDataSource> \n", "asp.net mysql datagrid odbc selectedvalue"], "2264992": ["How to place a z-index div?", "i have a main wrapper that has a fixed width of 960px. at the top and very right hand side there is a login button. by pressing this button it will be opened a div layer directly below and also in front of the main wrapper. therfor i use the z-index: 1. the problem is that i dont know how to set a fixed position depending from the main wrapper instead of the browser-window width. now when setting left/right- position the div will be placed depending from the whole browser-window width. the main wrapper is placed by 0 auto in case of a larger resolution.\nto give an example:\ncode:\n\nexample\nif there is someone who could tell me on how to solve this i really would appreciate.\n", "#main {\n width:300px;\n height: 500px;\n background-color: #f23;\n margin: 0 auto;\n}\n#zindex{\n font-size: 11px;\n width: 50px;\n height: 50px;\n background-color: #dedede;\n position: absolute;\n right: 0;--> will place the div depending from the browser window and not main\n}\n", "html css position z-index"], "101082": ["Query to show result in the charts", "I have to implement charts in my application. Suppose i have a table structure\n\nNow user will pass start date and end date from outside as parameters like below\n\nNow user has further one more option(SAY @OPTION VARCHAR(20) ) whether he wants the results with dates split into individual dates between the start date and end date, second option he can choose to have the results with dates into the months between the start date and end date, similarly for year. \n\nSimilarly i want the results with dates splitted according the option(day,week,month,year) having count next to it.\nMy goal is to display date on xaxis and count on y axis, can you suggest me a way to implement the same.\n", " DECLARE @SONGS TABLE\n (\n [ID] INT IDENTITY,\n [SONGNAME] VARCHAR(20),\n [CREATEDDATE] DATETIME\n )\n\n\n INSERT INTO @SONGS\n SELECT 'SONG1','20091102' UNION ALL\n SELECT 'SONG2','20091103' UNION ALL\n SELECT 'SONG3','20091107' UNION ALL\n SELECT 'SONG4','20091107' UNION ALL\n SELECT 'SONG5','20091107' UNION ALL\n SELECT 'SONG6','20091109'\n", "sql-server sql-server-2005 charts"], "1899588": ["windowBackground does not change with theme", "I have two themes in my application. I have a blue theme with a blue background:\n\nI also have a white theme with a white background:\n\nEverything works fine except the background is always the white one when I set the blue theme in code.\nMy application theme is set to the white theme in my manifest:\n\nI then set the blue theme up in my ActivityBase class in onCreate:\n\n", "<style name=\"Theme.BlueTheme\" parent=\"Theme.Sherlock\">\n <item name=\"android:panelBackground\">@drawable/menu_hardkey_panel_actionbar</item>\n <item name=\"android:buttonStyle\">@style/ButtonAppTheme</item>\n <item name=\"android:windowBackground\">@drawable/bground_blue</item>\n <item name=\"android:spinnerItemStyle\">@style/SpinnerItem</item>\n <item name=\"android:editTextStyle\">@style/Widget.EditText.White</item>\n <item name=\"android:spinnerItemStyle\">@style/SpinnerItem</item>\n <item name=\"android:textViewStyle\">@style/whitestyle</item>\n\n </style>\n", "android actionbarsherlock android-theme"], "3930950": ["Dynamic variable creation language", "Which computer languages will allow code that dynamically extracts a variable name from a string, like user types in an argument \"hhh\", and the code then knows to reference a variable with the identifier: hhh? Thanks for your help.\n", "", "variables dynamic language-agnostic programming-languages"], "3503870": ["bash check mysql connect", "I'm writing a bash script to do some operations against a database on my debian squeeze Server.\nI have noticed that if I enter a wrong password for root, the prompt will be closed and I won't be asked to try again... that's not very convenient!\nSo I was trying to create a loop that attempts to connect to MYSQL and save the password for later if successful.\nI tried this, but it doesn't work.\nInstead, I receive this error:\n\nERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)\n\n\nI am not very experienced in bash scripting, any help would be awesome!\n", "read -s -p \"Enter MYSQL root password: \" mysqlRootPassword\n\nwhile [[ -n `mysql -u root -p$mysqlRootPassword` ]]; do\n read -p \"Can't connect, please retry: \" mysqlRootPassword\ndone\n", "mysql linux bash"], "4056714": ["What's the least (negative) integer value that can be exactly represented by Double type in all major x86 systems?", "What's the least (negative) integer value that can be exactly represented by Double type in all major x86 systems? Especially in (simultaneously) JVM, MySQL, MS SQL Server, .Net, PHP, Python and JavaScript (whatever corresponding type it uses).\nThe reason why I ask about this is because I'd like to choose a value to use to represent an error (to return from a function in case it couldn't be calculated successfully) - that's why I need an exact value to be 100% predictable for exact equality checks. Exceptions (try-catch) seem to work much slower - that's why I need such a thing.\n", "", "types floating-point double"], "2183930": ["wordpress | carrington theme | sort posts by title within a category", "Can you help.\nWordpress can be altered in many ways.\n\nin the loop or just before\nin the functions.php file\nin the includes/posts.php\n\nI want number 3. As the other two do not work in carringtons theme.\nI have already edited this file and it worked perfectly.\nAlas it was so long ago that i have forgot how its done.\nIt got removed when i upgraded.\nPlease help\n", "", "php wordpress wordpress-theming"], "4148046": ["l'H\u00f4pital guidelines", "Suppose we want to evaluate\n$$\\lim_{x \\to 0} \\; x \\log (x)$$\nIf we write this in the form $x/(1/\\log(x))$, then l'H\u00f4pital's rule does not work, but if we write it as $\\log(x)/(1/x)$, it does. Is there any sort of general guideline to choosing the numerator and denominator?\n", "", "calculus limit"], "3919665": ["Whats the next desktop application you would like to see moved to the web?", "I'm trying to come up with some ideas on creating a new web app.\nI want it to be a useful web app for business.\nAnyone have any itches that need to be scratched?\n", "", "website business"], "5153884": ["Algorithm for enumerating theorems of first-order theories besides resolution", "Is there a general algorithm for enumerating the theorems of any finite first-order theory with a better time complexity than simply using resolution on all first-order logic formulas?\n", "", "algorithms logic automated-theorem-proving"], "4757029": ["php mail() Goes to spam but when sent via SMTP Server it works fine?", "I am currently setting up my webserver so then i can send emails via PHP Code, the problem i have is that the emails sent via php mail() always send to my gmail spam where as when im sending emails via the SMTP Server the same VPS has on it on Gmail it dont send to spam.\nIs their anyone that can help with this?\nUpdates:\nSending Via [email protected] & [email protected] For PHP Mail() (Same happens with [email protected])\nWhen Sent Via PHP Mail() Or Webmin Email It Sends To Spam\nWhen Sent Via SMTP Server Via Gmail it sends ok\nPHP Mail Raw Message :\nhttp://pastebin.com/TP2UfDP7 (This is the [email protected])\nWebmin Email System :\nhttp://pastebin.com/2VWvDd7v\nGmail SMTP : \nhttp://pastebin.com/wgewGnmk\n", "", "php email smtp gmail postfix"], "2266379": ["Running IIS server with Coypu and SpecFlow", "I have already spending a lot of time googling for some solution but I'm helpless !\nI got an MVC application and I'm trying to do \"integration testing\" for my Views using Coypu and SpecFlow. But I don't know how I should manage IIS server for this. Is there a way to actually run the server (first start of tests) and making the server use a special \"test\" DB (for example an in-memory RavenDB) emptied after each scenario (and filled during the background).\nIs there a better or simpler way to do this?\n", "", "iis testing integration-testing specflow"], "5105847": ["How can I update the source of a binding when cancelling update in DependencyProperty's CoerceValueCallback?", "I have a control (named in the example below) and a view model that are bound through 2-way binding on their property. I want to forbid certain values for that property in the control through the use of a . \nWhen the binding pushes that invalid value (42 in this example) into the , the method discards that value and the control keeps its previous value as expected. Unfortunately, because the has not changed the binding does not update the source value in the view model.\nHow can I update the property in the view model with the value in the control when cancelling the property value change?\n\nI have tried \n\nin the method to no avail. I even tried the previous 2 lines with which was suggested in a similar stack overflow question.\nAny other ideas?\nUpdate:\n@Berryl suggested I should do that logic in the view model and I agree with him... except that I can't. I will explain the full use case I tried to simplify in the code above.\nGridView is not my control but a 3rd-party data grid from which I inherit. When a user edits a record, we pop up a window in which the user edits the record and then the view model refreshes the data and reselects the old record using its ID. Everything works well until the user uses the filtering capabilities of the grid. If the edit on the record would make the row hidden because of the filter, the following occurs:\n\nView model sets in property\nThe grid reads that new list\nThe grid filters the list\nView Model sets the property with a record that is in the \nThe grid reads that new but discards it because it is filtered out\nGrid has SelectedValue = 23 and View Model has SelectedValue = 42\nUser double-clicks on the selected row (he sees 23) to edit the record\nThe mapped to the double-click is called in the view model\nView model launches edit window with record from its property\nThe user edits record 42 but thinks it is 23.\n\n", "GridView", "wpf mvvm binding"], "849550": ["Add calendar jquery image to datepicker", "I am not sure how to add the class as a datepicker image beside the text field. I want something like this: http://jqueryui.com/demos/datepicker/#icon-trigger, but it should have the jquery calendar image.\n", "ui-icon ui-icon-calendar", "jquery jquery-ui datepicker jquery-ui-datepicker"], "1177731": ["Appending element jquery?", "heres a link to the web page s1527.mtchs.org/chat.html\nWhen you submit or hit enter, the value of my textarea is appended to a div. when this happens again, the old value in the div is deleted and appended with the new one? how do I make it so it adds another value instead of deleting the old one?\njQuery:\n\nHTML:\n\n", "var captionLength = 0;\nvar caption = \"\";\n\n$(document).ready(function()\n{\n setInterval ( \"cursorAnimation()\", 600 );\n});\n\nfunction testTypingEffect()\n{ \nif(userInput.value !== \"Message\")\n{\n caption = $(\"textarea#userInput\").val();\n $(caption).append('<div id = content></div>');\n type();\n }\n}\n\nfunction type() \n{\n $('p.caption').html(caption.substr(0, captionLength++));\n if(captionLength < caption.length+1)\n {\n setTimeout(\"type()\", 50);\n }\n else {\n captionLength = 0;\n caption = \"\";\n} \n}\nfunction testErasingEffect()\n{\n caption = $(\"p.caption\").html();\n captionLength = caption.length;\n if (captionLength>0)\n {\nerase();\n }\n else\n {\n$('p.caption').html(\"You didn't write anything to erase, but ok!\");\n setTimeout(\"testErasingEffect()\", 1000);\n }\n }\n\n function erase()\n {\n$('p.caption').html(caption.substr(0, captionLength--));\nif(captionLength >= 0)\n{\n setTimeout(\"erase()\", 50);\n}\nelse {\n captionLength = 0;\n caption = \"\";\n} \n}\n\nfunction cursorAnimation() \n{\n $(\"p.cursor\").animate(\n {\n opacity: 0\n}, 300, \"swing\").animate(\n {\n opacity: 1\n }, 300, \"swing\");\n}\n$(document).keypress(function(e) {\n if(e.which == 13) {\n testTypingEffect();\n }\n});\n", "jquery append"], "4227067": ["MYSQL query using OR and AND on same sentence", "I need help writing a query that will validate a first expression and than, if its true, will validate the following expression. Something like:\n\nTried to use subqueries with if's and exists, but no success.\nAny help? Thanks,\n", "SELECT \n name \nFROM \n names \nWHERE \n (tag_id = 1 OR tag_id = 2) AND (tag_id = 3 OR tag_id = 4)\n", "mysql subquery case exists"], "62027": ["XSL Transform impacting other Web Parts", "I have on my SharePoint page an XSL List View Web Part linked to an XSLT file via the \"XSL Link\" property. Here is the content of the XSLT:\n\nBasically, what it does is display the Title fields in a row instead of column.\nThis works fine on the Web Part itself. However as soon as I use it, some fields in other Web Parts on the page disappear. From what I've seen, the impacted fields are of type lookup.\nHas anybody seen this weird issue before? Or is there anything wrong with my XSLT that breaks the page?\n[Update] I did some more tests and the issue is specific to site lookups (lookups used in the current site but created in the parent site).\n", "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" exclude-result-prefixes=\"msxsl\" xmlns:ddwrt2=\"urn:frontpage:internal\">\n\n <xsl:output method='html' indent='yes'/>\n\n <xsl:template match='dsQueryResponse'>\n <table> \n <tr> \n <xsl:apply-templates select='Rows/Row'/>\n </tr>\n </table>\n </xsl:template>\n\n <xsl:template match='Row'>\n <td>\n <xsl:value-of select='@Button' />\n </td> \n </xsl:template>\n</xsl:stylesheet>\n", "2010 xslt site-column xslt-list-view-web-part"], "2819267": ["opencv - cvCaptureFromCAM(CV_CAP_DSHOW) capture blank frame", "I am using OpenCV 2.1 and Visual Studio 2008 in Windows. I am trying to grab the frames from CCD camera and want to display on Windows. Camera is with PAL format. Camera is detecting but showing the blank grey screen.\nI found many post related to blank screen but no one is work in my case. So post I post this question.\nBelow is my code:\n\nAbove code return frame size 320 X 240 but blank screen.\nCode is working fine for usb webcam with code \nI am using Avermedia Gold Camera Card on my board. So Do I need SDK to use this camera or is there any option to use CCD camera??\nDriver is installed correctly and check with EzCaptureVC application.\n", "#include \"stdafx.h\"\n#include \"cv.h\"\n#include \"cxcore.h\"\n#include \"highgui.h\"\n#include <iostream>\n\nint main(int argc, char* argv[])\n{ \n cvNamedWindow( \"mywindow\", CV_WINDOW_AUTOSIZE );\n\n CvCapture* capture = cvCaptureFromCAM(CV_CAP_DSHOW);\n\n if ( !capture ) {\n fprintf( stderr, \"ERROR: capture is NULL \\n\" );\n getchar();\n return -1;\n }\n\n while ( 1 ) {\n IplImage* frame = cvQueryFrame( capture );\n\n if ( !frame ) {\n fprintf( stderr, \"ERROR: frame is null...\\n\" );\n getchar();\n break;\n }\n else\n {\n fprintf( stderr, \"Size of camera frame %d X %d\\n\",frame->width,frame->height );\n }\n\n cvShowImage( \"mywindow\", frame );\n\n if ( (cvWaitKey(10) & 255) == 27 ) break;\n }\n\n // Release the capture device housekeeping\n cvReleaseCapture( &capture );\n cvDestroyWindow(\"mywindow\");\n\n return 0;\n}\n", "c++ opencv screen blank"], "2141914": ["What is the MSMQ-Container feature and why doesn't it exist on Windows 2008 R2", "I'm trying to script the setup of a web-server role for our application using PowerShell & dism.\nThe application requires the following features for MSMQ support (excluding IIS features for brevity):\n* MSMQ-Container\n* MSMQ-Server\n* MSMQ-ADIntegration\n* MSMQ-HTTP\nI can install these features using dism /Online /Enable-Feature:xxx fine on Windows 7 but when I try to install MSMQ-Container on a Windows 2008 R2 machine I get the following error:\n\nError: 0x800f080c\nFeature name MSMQ-Container is unknown.\n\nIf I leave it out then the rest MSMQ of the features install correctly on Windows 2008 R2, but then the script fails on Windows 7 with this error:\n\nError: 50\nThe operation completed but MSMQ-Server feature was not enabled.\n Ensure that the following parent feature(s) are enabled first. If they are already enabled, refer to the log file for further diagnostics.\n MSMQ-Container\n\nI guess the question is, what is MSMQ-Container and do I need it? \nIf not, then I guess I'll need customise the script to use different packages on W7 and W2k8r2..\n", "", "msmq dism"], "5559151": ["Trying to execute self extracting zip file silently in command line", "I have these self extracting zip files that I'm trying to extract on 2008/7 machines remotely. But they are coming in a way of .exe and it require user to double click and choose the extractions location. \nOn WinZip support site they saying to use the /auto flag so the command will look like that:\nC:\\deploy\\.exe /auto C:\\path\\\\\nIt starts the process in the task manager but it stuck there foever.\n\nWhen I'm opening the file in text editor it says: !This program cannot be run in DOS mode.\nSo maybe anyone of you know how I can automate the extraction of the self extraction file silently. Or maybe there is a way to run them with answer file.\nThanks\n", "", "zip executable exe self-extracting winzip"], "2424794": ["Python code reflection and modification", "Perhaps I'm not using the proper term, but I'm looking to take a block of Python code (in Python), get the token tree for the code, make some kind of modification, and re-assemble it to Python.\nFor instance, consider this block of code:\n\nI would like to be able to take this and programmatically do this:\n\nI can't imagine that there's not a library that does something like this. Thanks in advance.\nEDIT\nPerhaps I wasn't entirely clear. I'm looking for a tool to read and manipulate arbitrary code, not code that I'm writing. I'd like to be able to modify code on-the-fly. The project I'm working on is a test app: it uses the Netflix philosophy to try to randomly break the functionality of an app in as many ways as it can, running the test suite each time. When the tests don't fail, there's an indication that there's either a gap in code coverage and/or the code is dead.\n", "def x(y):\n b = 2\n if y == b:\n foo(y)\n", "python reflection ast"], "1481958": ["Not receiving signed_request in Facebook iframe-app", "I have created a Page Tab Facebook App where I want to display different content depending on the user being a fan or not. (Also called fan gate, landing page or reveal page)\nFor this I'm using the PHP SDK, in specific the following code:\n\nAnd in the content:\n\nThis works when I'm logged in with my Facebook User and when I use it on my own Page.\nMeaning the signed_request is present in both $_POST and $_REQUEST.\nHowever, when I test it with another user, there is no signed_request value in those variables..\nNotes:\n- I already took a look at my URL Settings in the App Configuration (300 Redirect and stuff) but this looks fine, and like I said with my User it's working..\n- the signed_request is not just empty, it doesn't even exist.\nDoes anybody have similar issues?\nI would not mind using the Javascript SDK instead of PHP if it works then, but I'm not very experienced in Javascript.\nEDIT:\nAs i found out you always have to have a non-secure (http) and a secure (https) URL.\nEven if you enter a secure URL as the standard URL, facebook will contact it using http and will then get redirected (depends on server configuration) to the https, which makes you lose your signed_request.\n", "<?php\nrequire 'src/facebook.php';\n\n$facebook = new Facebook(array(\n'appId' => 'APP_ID',\n'secret' => 'APP_SECRET',\n'cookie' => true,\n));\n?>\n", "facebook facebook-php-sdk"], "3170198": ["Creating a Erlang binary through NIF with data pointing to a char *", "I'm doing a C-Erlang integration using NIF and I'm having some trouble to initialize a and add a char * pointing to its data. \nI'm doing this way:\n\nAny ideas about what I'm not doing right? I'm getting a segmentation fault.\nUPDATE: I get rid of the segmentation fault. But now I can't return a Erlang binary containing a .\nUsing with the binary.data I get a String on Erlang. But when I try to use with the binary, I get things like this what do I need to do to convert? \n", "Binary", "c erlang"], "831259": ["Is there an alternative to accomplish what Assert does and have the test fully execute when it fails without using a Try Catch?", "I am writing tests for UI and am using assert statements to check if an element is present with string for the message when the assert fails. I would like the test to continue to check for other elements even if it fails to find an element. I would also like to have the useful message that shows when the asserts fails to be there at the end of the test.\n\nIs there an alternative to using assert statements or having the assert statement in a try catch for the test to continue?\n", "Assert.IsTrue(IsElementPresent(By.XPath(\"//a/img[@src='/Img1.png']\")), \"Img1 not present\");\nAssert.IsTrue(IsElementPresent(By.XPath(\"//a/img[@src='/Img2.png']\")), \"Img2 not present\");\nAssert.IsTrue(IsElementPresent(By.XPath(\"//a/img[@src='/Img3.png']\")), \"Img3 not present\");\n", "c# nunit selenium2"], "4029809": ["How is it possible to reliably send JMS message? (fail over MessageProducer.send() errors)", "Is it possible to reliably send JMS message to the destination? By reliably I mean ensuring that if e.g. call fails for some reason, it will be retried automatically. I realize that transaction session may use as last resort, but what about retrying? E.g. I have intermittent network failure in between session was established and attempted to send a message. How would help in this case?\n", "MessageProducer.send()", "java jms reliability"], "2994630": ["Simple MVC3 Question - How to retreive form values from HTTPPOST, dictionary or?", "Simple question. I have an mvc controller that has method:\n\nThe form is a non-trivial form with a simple textbox.\nQuestion - how on earth do I access the parameter values? I am not posting from a View, the post is coming externally. I'm assuming there is a collection of key/value pairs I have access to. I tried Request.Params.Get(\"simpleTextBox\"); but it returns error \"Sorry, an error occurred while processing your request.\".\nI'm sure there's a simple answer to this.\n", "[HttpPost]\npublic ActionResult SubmitAction()\n{\n // Get Post Params Here\n ... return something ...\n}\n", "asp.net asp.net-mvc-3 http-post"], "2448525": ["Communication between Erlang Gen Server's", "I am building a network router application using Erlang OTP framework.\nIn its process of running a Supervisor creates two genservers and each estagen_server:call(CurrentProcName,{BinEvent,UniqueTrxId,MdPid},infinity),blishes a tcp connection to two individual servers.\nNow while running the application , It happens that one genserver receives a duplicate event , on such a case I want that event to be processed by the second gen_server .\nFor this , i am calling gen_server:call(NextProcName,{BinEvent,UniqueTrxId,MdPid},infinity),\nThis function I am calling inside the gen_server module when the condition for duplicate event satisfies.\nNextProcName :: It is the registered name for the second gen_server\nNOTE :: the code remains the same for both gen_server's\nThe problem is I am able to duplicate events but the event is somehow not getting passed to the second gen_server :(\nPlease suggest If I am doing it in the wrong way or not.\n", "", "erlang"], "5026644": ["Have you ever had to use bit shifting in real projects?", "Have you ever had to use bit shifting in real programming projects? Most (if not all) high level languages have shift operators in them, but when would you actually need to use them?\n", "", "bit-manipulation bit-shift"], "3288474": ["Store an object in Zend Registry", "How do you store an object in a Zend_Registry instance so that each property of the object is loaded as the index and each value of the object's property is stored as the registry's value?\n", "", "php zend-framework registry"], "4991820": ["How to handle exceptions using LINQ's SubmitChanges method?", "I am adding a new record to my department table using LINQ, this what I do:\n\nThe problem is, even after using and I still get an error screen when I enter a record which already exists in the database. How to fix it? Any ideas? Some example would be great.\n", "try\n{\n dpt = new departement();\n dpt.departementcode = tbDepartementCode.Value;\n dpt.departementname = tbDepartementName.Value;\n dpt.createby = \"hendra\";\n dpt.createdate = DateTime.Now;\n dpt.updateby = \"hendra\";\n dpt.lastupdate = DateTime.Now;\n\n Linq.departements.InsertOnSubmit(dpt);\n Linq.SubmitChanges(); // error happen here, and could not catch it.\n\n Response.Redirect(\"Departement.aspx\");\n}\ncatch (ChangeConflictException ex)\n{\n Console.WriteLine(ex.Message);\n}\n", "c# asp.net linq exception"], "2185365": ["SQL insert multiple rows into a second/sub table", "I've been stuck on this all afternoon and finally give up. I need to create monthly invoices for multiple customers regularly every month.\nSo I have taken the data from [Customers - Main] table and create all the [INVOICES] rows that I need to. However, I cannot get [Customers - Invoices] to populate each invoice correctly. What should happen is that [Invoices - Stock Link] gets populated with the correct information from [Customers - Invoices]. Currently each customers items are all populating 1 invoice.\nHere is the code I've reached so far and any help would be gratefully received.\n\n", "ALTER PROCEDURE [aa test]\n\nAS \n\nINSERT INTO dbo.[INVOICES] \n(\n CompanyName, InvoiceDate, PurchaseOrderNo, Terms\n , JobNumber, PrintableNotes, Initials\n) \nSELECT dbo.[CUSTOMERS - Main].CompanyName\n , DATEADD(d, - 15, DATEADD(mm, DATEDIFF(m, 0, GETDATE()) + 1, 0)) AS Expr1\n , 'test3' AS pono, 7 AS terms, 0 AS jobno\n , 'We will attempt to collect this invoice by Direct Debit' AS printnotes\n , 'KA' AS initials \nFROM dbo.[CUSTOMERS - Main] \nINNER JOIN dbo.[CUSTOMERS - Invoices] \nON dbo.[CUSTOMERS - Main].CustID = dbo.[CUSTOMERS - Invoices].CustID \nWHERE (dbo.[CUSTOMERS - Invoices].Annual <> 1) And \n (dbo.[CUSTOMERS - Invoices].DayofMonth = 15) \nGROUP BY dbo.[CUSTOMERS - Main].CompanyName\n\nSELECT @endInvoice=MAX(InvoiceNo) FROM INVOICES \n\nINSERT INTO dbo.[INVOICES - Stock Link] (InvoiceNo, StockID, SalePrice) \nSELECT @endinvoice, StockID, Price \nFROM dbo.[CUSTOMERS - Invoices]\n", "sql sql-server sql-server-2005 insert"], "4713906": ["Number Theory and Congruency", "I have the following problem:\n$$2x+7=3 \\pmod{17}$$\nI know HOW to do this problem. It's as follows:\n$$2x=3-7\\\\\nx=-2\\equiv 15\\pmod{17}$$\nBut I have no idea WHY I'm doing that. I don't really even understand what the problem is asking, I'm just doing what the book says to do. Can someone explain what this problem is asking and what I'm finding? Thanks\n", "", "elementary-number-theory modular-arithmetic"], "3985330": ["How to find XML element by the data in it using DOM?", "I have to insert data in a XML file in a specific place. For example:\n\nI have to find 'data2' using DOM than go back and insert new elements in the 'tag2' which contains 'data2' in it. More specifically I am writing a function that gets arguments: the search key and the data to insert. \nHow can I find 'data2' and how to go back to 'tag2' on order to insert there? \n", "<tag1>\n <tag2>\n <tag3>data</tag3>\n </tag2>\n <tag2>\n <tag3>data2</tag3>\n </tag2>\n</tag1>\n", "javascript xml dom"], "4868841": ["Emacs: Is there a better PgDn/PgUp behaviour with cua-mode?", "I'd like the PgUp and PgDn keys to just move the contents of the shown file upwards or downwards, but the cursor (point in Emacs Lingo) should stay where it is (on the screen). Unfortunately the default Emacs behaviour is different. The default behaviour is difficult to describe, but if you press PgDn followed by PgUp you don't end up where you were before (!).\nThis is not a new problem and there exists a nice solution called sfp-page-up and sfp-page-down in the EmacsWiki.\n\nThere is one problem, however, in combination with cua-mode, which provides (among others) shift-selection (pressing Shift and a Cursor movement key like \u2190 or PgDn starts highlighting a selected area):\n doesn't recognise the redefined PgUp/PgDn keys, i.e. they don't start a selection. The workaround is to press first the \u2191 or \u2193 key and then continue with PgUp/PgDn.\nHow can I make play nicely with ?\n", "(defun sfp-page-up ()\n (interactive)\n (setq this-command 'previous-line)\n (previous-line\n (- (window-text-height)\n next-screen-context-lines)))\n", "emacs keyboard-shortcuts cua cua-mode"], "2150129": ["Random number generation on Spartan-3E", "I need to generate pseudo-random numbers for my genetic algorithm on a Spartan-3E FPGA and i want to implement it in verilog: could you give me any pointers on this?\n", "", "hardware random verilog fpga"], "3002638": ["Difference between define, let and set!", "Ok, this is a fairly basic question: I am following the SICP videos, and I am a bit confused about the differences between , and .\n1) According to Sussman in the video, is allowed to attach a value to avariable only once (except when in the REPL), in particular two defines in line are not allowed. Yet Guile happily runs this code\n\nand outputs 2, as expected. Things are a little bit more complicated because if I try to do this (EDIT: after the above definitions)\n\nI get an error, while\n\nis allowed. Still I don't think that this the only difference between and : what is that I am missing?\n2) The difference between and puzzles me even more. I know in theory is used to bind variables in local scope. Still, it seems to me that this works the same with , for instance I can replace\n\nwith\n\nand and work the same: in particular the variable is unbound outside as well.\nThe only way I can see this useful is that may have a shorter scope that the whole function definition. Still it seems to me that one can always add an anonymous function to create the necessary scope, and invoke it right away, much like one does in javascript. So, what is the real advantage of ?\n", "define", "scheme"], "3534455": ["Degree after BSc in Computer Science: Marketing, MBA, Techno-MBA, HCI?", "Since a year I am a graduated Computer Engineer, and am now working in named field since 2 years. However, I'd like to get a Masters in a \"softer\" field and was thinking over the following choices:\n\nMBA: Master of Business Administration, to bridge the business world with the world of computer science. Would give me an interesting job, travel potential, high salary etc.\nTechno-MBA: Sort of an MBA, but aimed at people who already have a degree in Computer Science.\nHCI: Human Computer Interaction degree, something I have been very interested in, but feel like it doesn't have the growth potential of MBA/Techno-MBA\nMarketing: My most recent brainchild is a degree in Marketing, is this at all a good idea given my background? Growth potential?\n\nMain priority: Gaining a skill, and gaining a job allowing me to use my social skills. Which path has the best \"career potential\"? (Controversial I know)\nAny thoughts? Any feedback welcome.\nEdit: DOH. Realized that the first sentence makes no sense. Was running my own semi-successful business during last year of school.\n", "", "education"], "3213550": ["VideoJS issue - dynamic video element through Javascript Issue in Firefox", "I have created dynamic video element through Javascript with asp.net.\nIn firefox, it triggers the post back event. While it works well in IE and Chrome.\nSo, firefox is the issue here. In firefox, videojs uses webm while in IE and chrome it takes .mp4.\n", "", "javascript asp.net postback"], "5174586": ["Rewrite rule depending on optional parts of the parser rule in ANTLR3", "I'm trying to modify a rule depending on it's context with as few copy/paste as possible. I'll best begin with a pseudocode variant of what I'm trying to achieve:\n\nIf is set I want the module to not match the rule but create a token in its place. I'm sure I can do this with two separate rules but is there a cleaner way with less code duplication or without splitting the rule into a number of smaller rules?\n", "module[boolean isParam]: 'module' id=identity?\n declaration+ \n update+\n 'endmodule' -> ^(MODULE ({if (isParam)} IS_PARAMETER {else} $id) declaration+ update+);\n", "antlr antlr3"], "1879751": ["openldap authentication ssh", "I'm trying to set up on a openldap server running on debian 6 the ssh authentication on a ldap-client host named ldap_client.\nHere is what ldapsearch returns on server:\n\nOn the client side, I have configured libnss-ldap and nsswitch.conf as follow;\n\nSo that the unix command id on the client (id joe) returns its uid/gid. So the user is recognized by ldap.\nBut after hours goofing around google, I have not been able to set up the authentication on the client with ssh.\nI have these lines at /etc/pam.d/commun-account, commun-auth and commun-password\n\nAnd these on /etc/pam.d/ssh\n\nI have the usePam=yes on /etc/ssh/sshd.conf.\nHere are the output of auth.log on the client:\n\nOn the server:\n ==> /var/log/syslog <==\n Dec 7 16:42:43 ldap slapd[963]: <= bdb_equality_candidates: (uid) not indexed\nand with tshark\n\nI don't understand where and how I have to configure the joe's password. Not on the local unix account of the client, so on the server; I don't know where to do that\n", "dn: dc=localnet,dc=lan\nobjectClass: dcObject\nobjectClass: organization\ndc: localnet \no: Some_Enterprise\ndescription: localnet.lan\n\ndn: ou=people,dc=localnet,dc=lan\nobjectClass: top\nobjectClass: organizationalUnit\nou: people\n\ndn: ou=groups,dc=localnet,dc=lan\nobjectClass: top\nobjectClass: organizationalUnit\nou: groups\n\ndn: uid=joe,ou=people,dc=localnet,dc=lan\nobjectClass: account\nobjectClass: posixAccount\ncn: joe\nuid: joe\nuidNumber: 10001\ngidNumber: 2000\nhomeDirectory: /home/joe\nloginShell: /bin/sh\ngecos: joe\ndescription: joe\n", "ssh debian pam-ldap"], "3082772": ["Free/Open Source Text File Editing Software Capable Of Reading Massive Files?", "I have used UtraEdit in the past, but was not entirely impressed for the price of $60 when the only aspect of it I enjoyed (over notepad++) was it's large file adaptability.\nWhat free programs are good at reading/editing massive text files?\n", "", "text open-source editor free"], "3199120": ["SQL equivalent of \"using\" for schemas?", "I'm working with a SQL Server DB that's got tables spread across multiple schemas (not my idea), so queries end up looking like this:\n\n... you get the idea.\nThis is a small inconvenience when I put queries into stored procs, etc., but when I'm doing adhoc queries, this gets to be a real pain.\nIs there some way I could \"include\" all the schemas I'm interesed in, and have them automatically addressable? (LINQPad does this).\nI'd love to be able to be able to indicate something like this:\n\n... and then query away, with those schemas included in my address space. \nIf nothing like this exists, I'll look into synonymns, but I'd prefer to do this without having to add artifacts into the DB.\n", "select col1, col2\nfrom some_ridiculously_long_schema_name.table1 t1\ninner join\n another_really_long_schema_location.table2 t2\n on...\n", "sql-server schema"], "4344250": ["Create a new column based on two existing columns in excel", "This should a very simple task, surprisingly, I am unable to find any pointers either through search or through Excel documentation. \nI have two Column in my excel spreadsheet:\n\nI want to create a third column C, which is the sum of the elements in the column A and column B as shown below:\n\nHow do I do it in one shot so I generate an entire column ?\n", "A A111 A222 B B111 B222 C\n2 11 22 3 111 222 -\n5 11 22 7 111 222 -\n1 11 22 5 111 222 -\n", "microsoft-excel microsoft-excel-2010"], "5045654": ["StreamReader ThreadSafe Issue? Possibly?", "I'm guessing this doesn't work because of the StreamReader being non thread safe, (don't know howto fix that, google is no help)\nAnyway I've been trying to figure exactly whats wrong with this code, it works 80% of the time, other times it fails to parse incoming packets and will just drop them.\nThis is a void for a http-like tcp server im writing. it works exactly like an http packet, but the \"CONTENT-LENGTH\" header tells it the length of the packets data (payload). This is where the problem is happening. Can anyone suggest to me howto improve this and fix this? because I'm completely lost.\n\n", " void InternalStart()\n {\n\n bool continueWhile = true;\n while (continueWhile)\n {\n if (SR.EndOfStream)\n {\n continueWhile = false;\n break;\n }\n if (par_ReadStatus != ReadStatusEnum.WaitingForPayload)\n {\n int charCode = SR.Peek();\n if (charCode == -1)\n {\n continueWhile = false;\n break;\n }\n string outputLine = \"\";\n outputLine = SR.ReadLine();\n ReadLine(outputLine);\n }\n else if (par_ReadStatus == ReadStatusEnum.WaitingForPayload)\n {\n int length = int.Parse(par_ParsingPacket.Attributes[\"CONTENT-LENGTH\"]);\n char[] array = new char[length];\n for (int i = 0; i < length; i++)\n {\n array.SetValue(Convert.ToChar(SR.Read()), i);\n }\n string payload = new string(array);\n ReadLine(payload);\n }\n }\n if (ReadEnd != null)\n {\n ReadEnd();\n }\n }\n", "c# error-handling thread-safety streamreader helpers"], "3517714": ["Explaining the MySQL Indexing", "On my journey exploring MySQL and its advanced features, especially regarding the performance optimization I bumped in some extremely important feature for SQL performance improvement mos of us knows just as \"Index\"\nI went on with some experimentation and found out, that I can improve my database reads, and advanced write functions from 20 to 100 times just by applying additional index, to one of the most used columns.\nNatural comes a question, if such a performance improvement is viable, why not to set up indexing for every database column, and have 2 till 100 times faster database operations?\nObviously there is a reason why this does not happen by default.\nSo, how to know what to Index and when? What are the limitations of Indexing, and how it can affect my overall system performance if I go over the head with too much Indexing.\nIs Indexing affecting my database read and write performance when used too much?\nI am using InnoDB as my primary database engine, my system runs perl + apache + mysql\nCPUs: Intel(R) Xeon(R) CPU L5520 @ 2.27GHz\nRAM: 8192 MB\n", "", "mysql performance innodb indexing"], "4180136": ["Extjs - How to select combobox in bold some options?", "There are five options assume a combobox, to highlight the last 2 tags ?\n", "", "extjs combobox highlight"], "64739": ["Eclipse - External jars need to be manually added", "I had a question that was answered with adding jfxrt.jar to standard Eclipse build path.\nI followed the suggestion, adding the jfxft.jar as an External Jar on the jdk1.7.0_10.jdk JRE i have installed (under Eclipse > Preferences > Java > Installed JREs).\nBut when I import \"javafx.application.Application\"\nIt errors with:\nAccess Restriction: The type Application is not accessible due to restriction on required library /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/jfxrt.jar\nThere are posts on this such as Access restriction: Is not accessible due to restriction on required library ..\\jre\\lib\\rt.jar\nI can fix this possibly by the suggestions in that thread (though I'm not convinced they are good solutions).\nOr I found a better solution of adding the External Jar directly to the project:\n - go to the JRE and remove the External Jar as setup above\n - Open project properties and go to Java Build Path\n - Go to Libraries tab\n - Add External JARS... and choose exactly the same jfxrt.jar\nNo access restrictions now!\nWhy does it work one way but not the other? The advantage of adding directly to the JRE configuration is that it only needs to be done once.\nThanks,\nHank\n", "", "java eclipse compiler-errors external"], "2429071": ["Confirm postback OnClientClick button ASP.NET", "\nI have tried:\n\nand \n\nAnd none of them works.\n", "<asp:Button runat=\"server\" ID=\"btnUserDelete\" Text=\"Delete\" CssClass=\"GreenLightButton\"\n OnClick=\"BtnUserDelete_Click\"\n OnClientClick=\"return UserDeleteConfirmation();\" \n meta:resourcekey=\"BtnUserDeleteResource1\" />\n", "javascript asp.net button postback"], "3305740": ["Can someone tell me how to fix this Varnish error please?", "Here's the error I get:\nMessage from VCC-compiler:\nUnterminated string at\n(input Line 39 Pos 19)\n\n------------------#############################################\nRunning VCC-compiler failed, exit 1\nVCL compilation failed\nand here's the default.vcl\n\n", "if (req.url ~ \"^/[^?]+.(jpeg|jpg|png|gif|ico|js|css|txt|gz|\n", "varnish varnish-vcl"], "642934": ["NSFetchedResultsController predicate NOT filtering part of it (using ANY, IN and BETWEEN in the same fechRequest's predicate)", "I've searched a lot here and couldn't find a solution to my situation:\nI have a TableViewController that uses NSFetchedResultsController to display data from CoreData.\nThe model has an entity \"Places\" that has a to-many relationship called \"Types\" (and an inverse one, also to-many relationship). \nIn a first TableViewController I display the objects from entity \"types\" (each place can belong to more than one type, and one type can have more than one place). When the user taps on a row it calls a new TableViewController that will show objects from entity \"Places\" related to \"Types\" using a NSFetchedResultsController.\nI know I could just use:\n\nHowever, I really want to use the NSFetchedResultsController and all its benefits.\nWell, at the NSFetchedResultsController accessor method I was able to recreate this relationship by using:\n\nThis code works fine as it returns \"Places\" that are related to the \"Types\" I want (those were hold inside the property theTypes). I use a property (theTypes), in the TableViewController to hold all \"Types\" objects one selected at the original tableViewController.\nThe problem is that the entity \"Places\" has a property named \"distance\" that I also need to use as a filter inside the NSPredicate, like this:\n\nHere's where the problem occurs: the \"distance\" filter appears to be simply ignored by the predicate at the fetchRequest. The resulted fetch always has Places that don't match the @\"distance BETWEEN {0 , %@} clause.\nCan anyone help me figure out what I am missing here?\nThanks a lot!\nDaniel\n", "NSSet = [aType valueForKey:@\"Places\"];\n", "core-data entity-relationship nsfetchedresultscontrolle nspredicate between"], "269441": ["using template in sencha", "I need to create a simple profile page . Whenever the user login successfully (s)he will be redirected to profile page , where his/her information along with photo will be displayed. i am trying below\n\nThe json data is like below\n\nI need to call URL to return json and render that on the template. \nHelp me out :)\n", "Ext.define('casta.view.Intro', {\n extend: 'Ext.tab.Panel',\n xtype:'intro',\n //need to call url and render json data to the template below \n config: {\n tpl: [\n '<tpl for=\".\">',\n '<div class=\"holder\">',\n '<div class=\"avatar\"><img src=\"{profile_image_url}\" /></div>',\n '<div class=\"h-content\">',\n '<h2>{user}</h2>',\n '<p>{text}</p>',\n '</div>',\n '</div>',\n '</tpl>'\n ] \n }\n});\n", "android iphone templates extjs sencha"], "3754023": ["How do I best archive VMWare VMs for reuse?", "I'm using VMWare ESX 3.5.\nI've just created a couple of different-flavour VMs (a Windows 2008 one and a Windows 2003 one), installed windows updates, and am generally happy with their pristine nature.\nI will want to run them now, but reuse them from their current state later. So, I want to archive off a snapshot now, to come back to when I want to spin up more.\nWhat are my options?\n\nManually zip up the directory that contains the VM and physically store that someplace else?\nSomething specific to VMWare ESX?\n\nI have allocated xGb for the virtual disk; is unused-but-allocated space still taken up on the \"real\" disk?\nNote: Backups are not my question - I'll handle that separately.\nEdit:\n\nI'm not using vSphere or vCenter; that's AFAIK not available to me as an option here (separate license? Am unfamiliar).\n\n", "", "vmware-esx snapshot"], "2452203": ["Error when changing pages with Summary Links web parts (SP2010)", "When making any changes on pages with Summary Links web part and after deployment of the site I get the message:\nAccess Denied saving Web Part properties: ether the web Part is embedded directly in the page, or you do not have sufficient permission to save properties (Web part 'Summary Links')\" \nBest regards\nTore\n", "", "deployment"], "3122289": ["drupal menu_get_object error", "I am using menu_get_object() in my module hook_nodeapi function. Due to that code I get the following error:\n\nError 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection\n without sending any data.\n\nThe code is as follows:\n\nCan anyone help me understand what's going on and how to resolve this problem, please?\n", " function mymodule_nodeapi(&$node, $op, $a3, $a4){ \n $nodex = menu_get_object();\n drupal_set_message(\"Currnet Node(test) : {$nodex->nid}\");\n }\n", "php drupal drupal-6 module error-message"], "5003315": ["What is different between root and sudo?", "A root user can have all the privileges. But a normal user can gain access like a root with su or sudo command and their own password.\nSo what's the difference?\n", "", "linux permissions root"], "3517431": ["Problem running MVC3 app in IIS 7", "I am having a problem getting a MVC 3 project running in IIS7 on a computer running Windows 7 Home-64 bit. Here is what I did.\n\nInstalled IIS 7.\nAccessed the server and got the IIS welcome page.\nCreated a directory named d:\\MySite and copied the MVC application to it. (The MVC app is just the standard app that is created when you create a new MVC3 project in visual studio. It just displays a home page and an account logon page. It runs fine inside the Visual Studio development server and I also copied it out to my hosting site and it works fine there)\nStarted IIS management console.\nStopped the default site.\nAdded a new site named \"MySite\" with a physical directory of \"d:\\Mysite\"\nChanged the application pool named MySite to use .Net Framework 4.0, Integrated pipeline\n\nWhen I access the site in the browser I get a list of the files in the d:\\MySite directory. It is as if IIS is not recognizing the contents of d:\\MySite as an MVC application.\nWhat do I need to do to resolve this? \nAs requested, here is the web.config:\n\n", " <?xml version=\"1.0\"?>\n<!--\n For more information on how to configure your ASP.NET application, please visit\n http://go.microsoft.com/fwlink/?LinkId=152368\n -->\n\n<configuration>\n <connectionStrings>\n <add name=\"ApplicationServices\"\n connectionString=\"data source=.\\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true\"\n providerName=\"System.Data.SqlClient\" />\n </connectionStrings>\n\n <appSettings>\n <add key=\"ClientValidationEnabled\" value=\"true\"/> \n <add key=\"UnobtrusiveJavaScriptEnabled\" value=\"true\"/> \n </appSettings>\n\n <system.web>\n <compilation debug=\"true\" targetFramework=\"4.0\">\n <assemblies>\n <add assembly=\"System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n <add assembly=\"System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n <add assembly=\"System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n <add assembly=\"System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n <add assembly=\"System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35\" />\n </assemblies>\n </compilation>\n\n <authentication mode=\"Forms\">\n <forms loginUrl=\"~/Account/LogOn\" timeout=\"2880\" />\n </authentication>\n\n <membership>\n <providers>\n <clear/>\n <add name=\"AspNetSqlMembershipProvider\" type=\"System.Web.Security.SqlMembershipProvider\" connectionStringName=\"ApplicationServices\"\n enablePasswordRetrieval=\"false\" enablePasswordReset=\"true\" requiresQuestionAndAnswer=\"false\" requiresUniqueEmail=\"false\"\n maxInvalidPasswordAttempts=\"5\" minRequiredPasswordLength=\"6\" minRequiredNonalphanumericCharacters=\"0\" passwordAttemptWindow=\"10\"\n applicationName=\"/\" />\n </providers>\n </membership>\n\n <profile>\n <providers>\n <clear/>\n <add name=\"AspNetSqlProfileProvider\" type=\"System.Web.Profile.SqlProfileProvider\" connectionStringName=\"ApplicationServices\" applicationName=\"/\" />\n </providers>\n </profile>\n\n <roleManager enabled=\"false\">\n <providers>\n <clear/>\n <add name=\"AspNetSqlRoleProvider\" type=\"System.Web.Security.SqlRoleProvider\" connectionStringName=\"ApplicationServices\" applicationName=\"/\" />\n <add name=\"AspNetWindowsTokenRoleProvider\" type=\"System.Web.Security.WindowsTokenRoleProvider\" applicationName=\"/\" />\n </providers>\n </roleManager>\n\n <pages>\n <namespaces>\n <add namespace=\"System.Web.Helpers\" />\n <add namespace=\"System.Web.Mvc\" />\n <add namespace=\"System.Web.Mvc.Ajax\" />\n <add namespace=\"System.Web.Mvc.Html\" />\n <add namespace=\"System.Web.Routing\" />\n <add namespace=\"System.Web.WebPages\"/>\n </namespaces>\n </pages>\n </system.web>\n\n <system.webServer>\n <validation validateIntegratedModeConfiguration=\"false\"/>\n <modules runAllManagedModulesForAllRequests=\"true\"/>\n </system.webServer>\n\n <runtime>\n <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n <dependentAssembly>\n <assemblyIdentity name=\"System.Web.Mvc\" publicKeyToken=\"31bf3856ad364e35\" />\n <bindingRedirect oldVersion=\"1.0.0.0-2.0.0.0\" newVersion=\"3.0.0.0\" />\n </dependentAssembly>\n </assemblyBinding>\n </runtime>\n</configuration>\n", "asp.net-mvc iis7 asp.net-mvc-3"], "1580955": ["Windows Vista activation after moving disk inside another machine", "I have a strange hardware problem on a workstation. I have another workstation available with exactly the same specifications and want to move the disk and RAM from the problematic machine to the free one. Windows Vista Business 64-bit is installed on the disk; we bought the 64-bit version after upgrading to 8GB RAM.\nAfter moving the disk to the other machine will I have any issues around activation or licensing on the new setup?\n", "", "windows-vista disk activation"], "1850692": ["Check out source code from Source Control Explorer and not from Solution Explorer", "We are using VS2010 and we have migrated project X from VSS to TFS2010.\nWe have two administrator users lets say admin1 (project colection admin) and admin2 (X project admin). Both admin1 and admin2 are domain users.\nThe problem is, admin1 can checkout any items on project X while admin2 receives the error below:\n\"The item '...' could not be found in your workspace, or you do not have permission to access it.\"\nadmin2 receives this error only when he tries to checkout from Solution Explorer. There is no problem when he attempts checking out from source control explorer.\nThe source control bindings of the solution is correct(I've already checked 'File -> Source Control -> Change Source Control')\nAny ideas?\nThank you,\n", "", "visual-studio-2010 version-control tfs2010"], "3536328": ["django admin - populate field with callable", "I can't find a single example of anyone doing this apart from this example, which doesn't help me other than to know where the code needs to sit.\nHow to prepopulate UserProfile fields in the Django admin?\nso this is my code\n\nIf its not obvious, im trying in the admin section to populate a dropdown with the available companies that belong to the user that is logged in. \nmy problem is that i dont know how to pass the request object to \"get_companies\". anyone know of any examples.\n", "class QuoteMaterial(models.Model):\n name = models.CharField(_('name'), max_length=255)\n content = models.TextField(_('content'),\n help_text=_('A static priced item used when doing a job. Selectable when creating a quote. '))\n price = models.DecimalField(_('price'), max_digits=6, help_text=\"not sure if this is before or after VAT yet\", decimal_places=2, default=\"0.00\")\n\n def get_companies():\n return CompanyProfile.objects.filter(user=request.user)\n\n company = models.ForeignKey(CompanyProfile, default=get_companies) \n", "python django django-admin"], "5622440": ["MVC page level security based on DB in addition to role", "I'm using [Authorize(Roles = \"Administrator\")], etc. to control access to pages, but in addition to that, my client wants more. We have Users who can create SubUsers and determine what screens they can access. For example, User 1 might indicate SubUser 1 might get screens 1-4 but not 5-8 (using numbers for simplicity here). SubUser 2 might get the odd screens, SubUser gets the even ones.\nThis doesn't seem like a Role-Based security thing. I was going to create a screen for Users to choose a SubUser, then get to another screen with checkboxes for every screen and check off the ones that SubUser can reach. Easy enough.\nMy question is, how to enforce that in the app? The obvious way is, on every single get, hit the DB, passing in that username and an ID for that screen and seeing if they have access. Is there a better way, to avoid hitting the DB for that check on every page? Since there's no session object, I can't get an array (just once) of page IDs they can access and store it in session.\n", "", "security asp.net-mvc-4"], "2763446": ["JMX client that can persist gathered information", "We've added performance measures to our application and are exposing them using\nJMX. Now we would like to gather and store performance data for analysis, in files or in a database.\nDoes anyone know of a JMX client, open source or commercial, that can persist gathered information?\n", "", "java performance jmx"], "453892": ["Dynamics CRM, Web Service, compile error assigning value to custom fields", "Hi i'm having problems assigning a value to a custom field.\n\ni've added multiple custom fields to\nour Dynamics CRM 4.0 installation.\ni've pressed publish. \nI've gone to Settings ->\nCustomization -> Download Web\nDescription Files, and downloaded the wsdl replacing my current one in the project\nI've pressed Update Web Reference\n\nIn my code I recieve the BusinessEntity\n\nI am aware that getting AllColumns is bad practice\nWhen I then try and assign a value to a custom property like this\n\nI get the following error when trying to compile\n'CrmProxy.CrmSdk.opportunity' does not contain a definition for 'custom_stringproperty' and no extension method 'custom_stringproperty' accepting a first argument of type 'CrmProxy.CrmSdk.opportunity' could be found (are you missing a \nusing directive or an assembly reference?)\nIn Reference.cs the property is there in the opportunity class, intellisense shows the actual field when i look into the o. object.\nI can't for the life of me figure out what causes this, i've removed the reference and added it again, i've cleaned the project and rebuild it. i've tried lots of things, I hope anyone here can point me in the right direction or knows the cause for this error.\n", "opportunity o = (opportunity)crmService.Retrieve(EntityName.opportunity.ToString(), guid, new AllColumns());\n", "c# dynamics-crm"], "5054568": ["How to write MySQL select query connecting two rows?", "My Table structure is given below\n\nHere I want to write a select query for user_name having car ferrari and bike suzuki. Please help me to write sql Query\n", " id user_name item brand\n\n 1 A car ferrari\n 2 A bike suzuki \n 3 B car ferrari\n 4 B bike yamaha\n", "mysql select"], "2431548": ["How to convert Exim emails downloaded via FTP so they can be imported into an email client?", "I have backup folders of emails that I downloaded from an old server running Exim. I can open all the files in a text editor and read the contents and they are in standard RFC 822 format.\nThe filenames look like this:\n\nUltimately I need to import them into a Google Apps account. It's a free account so I can't use the python apps API method which would work if I added a .txt file extension. Google has Mac Email Uploader but it requires the email to be in one of the following:\n\nApple Mail: ~/Library/Mail\nEudora: ~/Eudora Folder\n-Thunderbird: ~/Library/Thunderbird \n\nWhen I try to import the messages into Apple Mail or Thunderbird they are not recognized. I have tried adding a .mbox file extension and a .txt file extension. I have also ran this bash script but it converted them all into one big file with a .mbox extension that can't be read by any of the clients.\n\n", "1284775865.H451571P15783.pre.press-themes.com,S=840363/2,S", "email imap pop3"], "2921841": ["How do I avoid introducing global leaks when using Squire.js with RequireJS and Mocha?", "I am writing a single page JavaScript application using Backbone and Backbone.Marionette. I am using AMD modules and RequireJS to help organize my code and manage dependencies. I am also using Mocha as my testing framework for TDD/BDD.\nEverything was working fine until I wanted to introduce stubs, mocks, and spies using Sinon.JS. After a lot of searching, I came across a page on test frameworks in the RequireJS wiki and Squire.js, which seemed like it would suit my needs well. However, when I try to use Squire.js to load a module, Mocha suddenly reports global leaks for the module's dependencies. There are no leaks reported if I load the module directly using Require.JS.\nFor example, the following test code does not cause Mocha to report any leaks:\n\nHowever, converting the code to use Squire.js as follows causes Mocha to report leaks for jQuery, Backbone, and Marionette (dependencies of app.js):\n\nWhat am I doing wrong? I am totally baffled that Mocha does not report a leak with RequireJS but does with Squire.js. I also tried some of the other solutions I found in another StackOverflow question on mocking RequireJS dependencies, such as the custom function and testr.js, prior to Squire.js and had similar results. To date, I've been unable to find an example that uses Mocha, RequireJS, and Sinon.JS all together.\nI've placed my current code base on GitHub in case there is some critical information that I have left out or something. The test in question can be found in test\\spec\\test.app.js.\nAny assistance is greatly appreciated. I'd very much like to get past monkeying with my test setup and on to actually working on my app. Thanks in advance.\n", "define(['app/app'], function(app) {\n describe('App', function() {\n it('Should define a \\'header\\' region', function() {\n expect(app.headerRegion).to.exist;\n });\n\n it('Should define a \\'main\\' region', function() {\n expect(app.mainRegion).to.exist;\n });\n });\n\n return {\n name: \"App\"\n };\n});\n", "javascript mocking requirejs mocha"], "1630358": ["Cucumber duplicate class problem: AssociationTypeMismatch", "I am having a problem with Cucumber when there is a reference to self in a model callback method. \nCode example below.\nThe error is like:\nPerson(#26738680) expected, got Person(#29003170) (ActiveRecord::AssociationTypeMismatch)\n\nThe failing scenario is like:\n\nAnd the failing steps:\n\nThank you \nAdam\n", "class Person < ActiveRecord::Base\n\n\n has_one :person_profile \n accepts_nested_attributes_for : person_profile \n after_create :new_person_profile\n\n private \n\n def new_person_profile\n person_profile = PersonProfile.new( \n ...,\n :person => self # <--- this causes the error in cucumber\n ) \n self.person_profile.save\n end\n", "ruby-on-rails ruby-on-rails-3 cucumber"], "2955522": ["Splitting Fields", "This is a problem from Hungerford's book: \nLet $E$ be an intermediate field of extension $K\\subset F$ and assume that $E=K(u_1, \\cdots ,u_r)$ where $u_i$ are (some of the) roots of $f\\in K[x]$. Then $F$ is a splitting field of $f$ over $K$ if and only if $F$ is a splitting field of $f$ over E. \nThis is my attempt. \nLet $u_1, \\cdots ,v_n$ be the roots of $f$. Then since $F$ is a splitting field of $f$ over $K$, $F=K(v_1, \\cdots ,v_n)$ $\\implies$ $F=E(v_1, \\cdots ,v_n)$. So $F$ is a splitting field of $f$ over $E$ . \nConversely, suppose $v_1, \\cdots ,v_n$ are the roots of $f$ in $F$. Then $F=E(v_1, \\cdots ,v_n)=K(u_1, \\cdots ,u_r,v_1, \\cdots, v_n)$. Thus $F$ is a splitting field of $f$ over $K$. \nMy Question: First I want to know if the proof above is right. The second part of the problem asks to extend the above to splitting fields of arbitrary set of polynomials. This is where I'm lost. I'd like a little help on how to begin.\nThanks. \nUpdate: I think I've got it now. I had some difficulty with the indexing. Thanks. \n", "", "galois-theory"], "4242478": ["TikZ matrix decoration", "What I'm trying to achieve is a code structure to draw this kind of diagram:\n\nI need to decorate a two-rows matrix grouping one or more columns with a square bracket above them, and then again with a square bracket grouping one or more subgroups (there may be more than three levels of nested groups).\nAt first I tried nesting matrices with , but TikZ told me that , so I ended up with something like this\n\nwhere I first draw the matrix, then I group each column in an invisible node (with ) and then draw the square brackets as paths from/to west/east anchor point of groups, shifting coordinates on the y-axis. Which is quite unmaintainable and ugly.\nOf course the main target is to build something that could adapt to the variable width of matrix columns. Any suggestion would be very appreciated!\n", "above delimiter=\\lbrack", "tikz-pgf diagrams matrices mathtools"], "3539566": ["bundles in java?", "in symfony 2.0 and django there are bundles that contain everything for a feature (html, css, js, img, php/python).\nso if you want to delete one feature, you basically just delete that bundle and unregister it from \"main\".\nare there java frameworks for this too? or is it different in java cause java is a compiling language.\nthanks\n", "", "java php python django symfony1"], "5623730": ["Awk displays file name twice (?!)", "Greetings.\nI have files that contains eleven fields in the file name. Each file has a specific meaning. My job is to list each file name and load the info into a database table for reporting.\nMy awk code does this (files have VER suffix):\n\nIt works fine except that it does something weird with the file name ($0): it repeats it like so (the 2 last fields from the right):\n\nIf I remove \"%f\" switch from the printf statement, it seems to work but if I leave it alone and remove $0, file name never gets displayed. What am missing here? Any ideas?\nThanks for your input.\n", "find . -name \"*.VER\" -exec ls '{}' ';' -printf %f\\\\t | awk -F\"~\" '{print $1\"\\t\"$2\"\\t\"$3\"\\t\"$4\"\\t\"$5\"\\t\"$6\"\\t\"$7\"\\t\"$8\"\\t\"$9\"\\t\"$10\"\\t\"$0}' > somefile.tab\n", "awk"], "5247452": ["Does anyone know a jQuery tag-cloud-style plugin that is IE7 compliant", "I really like this plugin here: http://www.goat1000.com/tagcanvas.php\nHowever this will not work in IE7 or IE8 unless ExplorerCanvas (or whatever it's called) is installed. Does anyone know of a jQuery plugin that does the same sort of thing without relying on HTML5 Canvas? I want to make it compatible for all browsers IE7 and higher. Flash is also out of the question\nThanks for your time,\nMike\n", "", "jquery plugins jquery-plugins tags cloud"], "4465448": ["Reading xml file from java", "I am trying to create a GUI interface for user login in java swing. I am trying to store my data in an Xml file and I need to access it from java and check if the user name and password entered in the GUI matches with any of the given user details in the xml data. If it matches they are given access to the next level.\nI am trying to use SAX parser for accessing the Xml file . I am unable to understand how the SAX parser works and how it can be used for matching with the input from the GUI.\nPlease help. Thanks for all your help in advance. \n", "", "java xml saxparser"], "5665112": ["easiest way to make a POST action to a URI", "I am on windows now and What is the easiest and fastest way to make a POST action to a URI? can we do that with command lien or powershell?\n", "", "windows http command-line powershell http-post"], "1160308": ["Database of image and icon", "Does anyone have any database of image/icon to share?\nI am looking for some images to put in app, but I just have two websites that I know .... and some item I cant find easily.\nBTW, I am sharing the ones I have:\niconfinder dot com\niconsdb dot com\n", "", "database image icons share"], "49369": ["Load another XHTML into the center layout, but the application not responding after three updates", "I'm using PrimeFaces layout in my template.xhtml file, and in my index.xhtml I try to include a page dynamically into the center layout as I navigate in a tree. It works well but after the fourth click in the tree, the application isn't responding anymore. It updates the center page three times and after the fourth click it freezes.\nHere is a part of my template.xhtml:\n\nHere is a part of my index.xhtml:\n\nI think that the problem is somewhere in the ajax update, but I don't know what did I wrong.\n", "<p:layout fullPage=\"true\">\n <p:layoutUnit position=\"north\" size=\"50\">\n <ui:insert name=\"header\"></ui:insert>\n </p:layoutUnit>\n <p:layoutUnit position=\"south\" size=\"65\" resizable=\"true\" collapsible=\"true\"> \n <ui:insert name=\"footer\"></ui:insert>\n </p:layoutUnit>\n <p:layoutUnit position=\"west\" size=\"250\" header=\"TreeMenu\" resizable=\"true\" collapsible=\"true\"> \n <ui:insert name=\"treemenu\"></ui:insert>\n </p:layoutUnit>\n <p:layoutUnit position=\"center\">\n <ui:insert name=\"content\"></ui:insert>\n </p:layoutUnit>\n</p:layout>\n", "ajax jsf include primefaces"], "3067497": ["Not able to run firefox in a head-less Ubuntu server 9.10", "I need to run Firefox in my server in order to execute some Selenium tests from Hudson. I would love no to have to install a complete gui. So I installed Xvfb in order to fake the Gui (I understand it this way correct me if my assumptions are wrong).\nAfter some time trying to make it work, I'm stuck with the next situation:\n\nI'm runnig firefox without installing it from the repositories. And I'm getting a socket timeout when I try to run the selenium tests, so I guess the problem is in Firefox and Xvfb.\nI have installed already the nex package:\n\nThat in some forums suggest to be a fix, that in my case doesn't work.\nAny explanation about the problem and ways of solving it without installing a full gui, will be very helpful.\n", "$ sudo Xvfb -ac :99 &\n[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n\n$ firefox\n[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!\n[config/dbus] couldn't register object path\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\n(EE) config/hal: NewInputDeviceRequest failed (2)\nXlib: extension \"RANDR\" missing on display \":99.0\".\nGConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: /bin/dbus-launch terminated abnormally without any error message)\n", "ubuntu ubuntu-9.10 firefox headless"], "5087868": ["Render a textured rectangle with PyOpenGL", "I'm working on a project using PyOpenGL, and I'm currently attempting to get OpenGL to render a kind of splash screen. My decided solution to this is to draw a textured 2D rectangle. Unfortunately, it appears that no matter what I do, nothing is ever drawn, I just get a black screen (So I guess something is drawn, otherwise it would be a transparent window, but it's definitely not what I want). Here is the pertinent code for my class:\n\nAs I said, just that nets me with a totally black screen. It feels like I may be missing some kind of initialization or enabling, but I don't know what else I would need to enable.\nAs an aside, apparently glVertexPointer is deprecated, how would I run glDrawElements without it? Is there some kind of vertex generation you can do similar to texture generation or what?\n", "class ClassThing:\n def __init__(self):\n self.Splash = True\n glutInit(sys.argv)\n\n def TexFromPNG(self, filename):\n img = Image.open(filename)\n img_data = numpy.array(list(img.getdata()), numpy.uint8)\n\n texture = glGenTextures(1)\n glPixelStorei(GL_UNPACK_ALIGNMENT,1)\n glBindTexture(GL_TEXTURE_2D, texture)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, img.size[0], img.size[1], 0, GL_RGB, GL_UNSIGNED_BYTE, img_data)\n return texture\n\n def run(self):\n glutInitDisplayMode(GLUT_RGBA)\n\n glutInitWindowSize(256,224)\n self.window = glutCreateWindow(\"GL\")\n glutDisplayFunc(self.draw)\n\n glClearColor(0,0,0,0)\n glEnable(GL_TEXTURE_2D)\n glEnable(GL_VERTEX_ARRAY)\n\n self.MainTex = glGenTextures(1)\n self.SplashTex = self.TexFromPNG(\"Resources/Splash.png\")\n\n glutMainLoop()\n\n def draw(self):\n glClear(GL_COLOR_BUFFER_BIT)\n glLoadIdentity()\n if self.Splash:\n glBindTexture(GL_TEXTURE_2D, self.SplashTex)\n else:\n glBindTexture(GL_TEXTURE_2D, self.MainTex)\n\n glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)\n glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER)\n glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER)\n Varray = numpy.array([[0,0],[0,256],[224,256],[224,0]],numpy.uint16)\n glVertexPointer(2,GL_SHORT,0,Varray)\n indices = [0,1,2,3]\n glDrawElements(GL_QUADS,1,GL_UNSIGNED_SHORT,indices)\n\n glFlush()\nthing = ClassThing()\nthing.run()\n", "python opengl glut"], "5636869": ["Ng-switch embedded in custom directive not getting evaluated when value changes", "I created a custom directive that's basically a reusable form. Part of the form is an error message display that uses ng-switch:\n\nIn my directive's controller, I defined a function that performs verification with the server:\n\nThis function is then called by the link function on blur event of an input box.\nWhat I am noticing is that the \"Verifying\" state never shows up, but the \"Error\"/\"Success\" states work fine. It seems that Angular is processing the ng-switch directive only after my current directive has completed processing.\nIs there something I'm doing wrong? Is there a way for me to get around this behaviour so that the verifying state would show up?\n", " <div ng-switch=\"status\">\n <span ng-switch-when=\"Error\" class=\"text-error\">Error encountered</span>\n <span ng-switch-when=\"Verifying\" class=\"text-info\">Verifying</span>\n <span ng-switch-when=\"Success\" class=\"text-success\">Success</span>\n <span ng-switch-default> </span>\n </div>\n", "angularjs angularjs-directive"], "4833445": ["Enable dtrace without sudo on Mac OS X?", "How do I enable users to use dtrace on Mac OS X. I am trying to do the equivalent of strace on Linux, and I don't like running applications with elevated privileges.\nUPDATE\nOk, the best I can tell. The only way to keep a nefarious application from ruining the system by debugging it is to.\n\nAttach to the process in a separate console\nUse sudo twice\n\nSo that:\n\nI verified this with this short program:\n\nSee this discussion for more info:\nhttp://discussions.apple.com/message.jspa?messageID=6430877\n", "sudo dtruss sudo -u myusername potentially_harmful_app\n", "macosx mac sudo dtrace"], "5894394": ["Is there an XML, containing all big cities, their TimeZone offset to the UTC?", "I'm searching for an XML, which contains all major cities in the world, their offset to the UTC, and also, start and end of daylight saving times.\nThanks for your help!\n", "", "xml timezone global"], "6009479": ["Samba, Apache and SVN. Getting the permissions right", "I have two machines I work on:\n\nWindows Client (Development Machine)\nLinux Web Server (Ubuntu)\n\nOn the Linux server I have installed Apache, Samba and SVN.\nI've created a samba share that maps to the htdocs/ directory so that I can access the web files from Windows.\nThe following illustrates my workflow:\n\nFrom command line on Linux server I checkout working copies of web projects from remote server into my local Linux server's htdocs directory.\nOn the Windows machine I access these files (using samba) and edit them in my editor and test them in the web browsers\nBack on the Linux machine I checkin my work to the remote server.\n\nThe problem I have is that currently for me to be able to edit the files on the Windows box via Samba I have to change the owner of the files to nobody (apache user) and set the Samba share to use SHARE permissions.\nWhen I try to use SVN to commit and update etc. I can't because my Linux user is not 'nobody' and does not have permissions to do so. So I have to become root do an SVN [command] then change all the files back to 'nobody' so that I can't edit on Windows.\nWhat I would like to be able to do is have the web files be owned by my local Linux user which would enable SVN commands to work and for Windows (over samba) to also use this same user.\nHow can I get this to work, is there a way to get Windows and Linux users to match?\n", "", "linux apache2 permissions svn samba"], "3180540": ["Library as dependency for another library", "I have a big project compiled into libProject.so-file (shared library), I made some modules (shared libraries too) which use code from all libProject. Can I set libProject as dependence for moduleProject.so file? (gcc)\n", "", "c++ dependencies so"], "3514687": ["Populating Menu from JS Array without duplicate by JQuery", "i have a problem and I could not overcome about two days.\nI have an delimited string and i want to populate a menu via JQuery.\nMy array like this;\n\nCountry1,City1|Country1,City2|Country2,City1|Country3,City1|Country3,City2|Country3,City3\n\nand i want to use this menu structure by using JQuery function (or any other suggested way)\nI mean, when the user hover over my menu trigger a menu will pop up and all Countries will be shown and each one has own sub menu elements (Cities).\ni would like to point that, how many Countries exist and each Contry has how many cities are unknown.\nI used function to eleminate duplicated Countries but i cound not put Cities into Countries.\n\nThanks right now..\n", "append", "jquery arrays menu append populate"], "3943954": ["Is there a function variable in PHP like in JavaScript?", "In JavaScript you can have:\n\nIs there something like this in PHP?\nI know about , but it's really complicated to stuff your code in a string argument.\n", "var blabla = function(arg){\n ...\n};\n", "php function variables"], "3390962": ["Request.Form in Inline Data-Binding Code", "I've got a asp:Repeater on a page which holds < input type=\"radio\" elements. I appreciate the asp:RadioButtonList control could be used to do this, but the problem is after some radio buttons we also require a textbox which is enabled using Javascript when the associated radio button in the repeater is clicked (while all other textboxes in the repeater are disabled), hence the decision to use native HTML elements.\nProblem is with validation; if the text box is blank when posting we want to display a warning and force the user to enter text, leaving the radio button they selected checked. However the Request.Form collection doesn't appear to be populated when accessing between the <%# ... %> placeholders, and am therefore unabled to detect the selected radio button to write the \"checked\" attribute to.\nAny suggestions on how to read back from the Request.Form collection in order to check the appropriate radio button input element?\nEdit - as requested, below is the HTML markup used in the repeater:\n\nAs mentioned, nothing is returned when trying to access the Request.Form[..] collection within the <%#...#> elements trying to establish what was posted last time around.\nThanks in advance,\nChris\n", " <asp:Repeater ID=\"choiceRepeater\" runat=\"server\">\n <ItemTemplate>\n <input type=\"radio\" \n name=\"choice<%# \n ((SurveyAnswer)Container.DataItem).SurveyQuestion.SurveyQuestionID.ToString() %>\" \n id=\"answerRadio\" \n value=\"<%# ((SurveyAnswer)Container.DataItem).SurveyAnswerID %>\" \n onclick=\"enableBox(this);\" />\n <asp:Label ID=\"answerText\" \n runat=\"server\" \n Text=\"<%# ((SurveyAnswer)Container.DataItem).AnswerText %>\" />\n <span id=\"textArea\" \n runat=\"server\" \n visible=\"<%# (((SurveyAnswer)Container.DataItem).EnableTextField)%>\" >\n <input type=\"text\" \n name=\"text<%# ((SurveyAnswer)Container.DataItem).SurveyAnswerID %>\" \n id=\"text<%# ((SurveyAnswer)Container.DataItem).SurveyAnswerID %>\" \n disabled=\"disabled\" />\n </span><br />\n </ItemTemplate>\n</asp:Repeater>\n", "asp.net data-binding postback inline"], "4409752": ["windows wget & being cut off", "System Info:\nWindows 7,\nGNU Wget 1.11.4,\nPython 2.6\nThe problem:\nIm running a python script that fires a wget shortcut, the problem is that wget (even when run purely in command line from the exe) cuts off '&''s. For example when i run the code below, this is what i get:\n\nC:\\Program Files\\GnuWin32\\bin>wget.exe\n http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_type=feature\nSYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\\Program\n Files\\GnuWin32/etc/wgetrc\n--2013-01-18 12:48:43-- http://www.imdb.com/search/title?genres=action Resolving\n www.imdb.com... 72.21.215.52 Connecting to\n www.imdb.com|72.21.215.52|:80... failed: Connection refused.\n=alpha,ascThe system cannot find the file specified. \nThe system cannot find the file 51. 'title_type' is not recognized as an internal or\n external command, operable program or batch file.\n\nAs you can see, wget counts all text before the '&' as the URL in question, and windows take the last half as a new command(s). \nThere has got to be some way of allowing wget to capture that whole string as the URL.\nThanks in advance.\nEDIT:\nWhen i call the command in command line with brackets around it, it works great, however, when i run the script through python:\n\nI get the following error:\n\nSYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc\nsyswgetrc = C:\\Program Files (x86)\\GnuWin32/etc/wgetrc\n\"http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_ty\n pe=feature\": Unsupported scheme.\n\n", "subprocess.Popen(['start /B wget.lnk --directory-prefix=' + output_folder + ' --output-document=' + output_folder + 'this.html \"http://www.imdb.com/search/title?genres=action&sort=alpha,asc&start=51&title_type=feature\"'], shell=True)\n", "python windows command-line command wget"], "4159792": ["Setup a Cron Job to pick latest file and email", "Pretty simple question.\nI have a cron job that runs a mysql query everyday at midnight and produces a csv file say user_analytics_2012-03-11.csv. So everyday a new file keeps getting created with a new date stamp.\nI am trying to setup a new cron job that runs after this job and picks up the latest csv file and emails it to me.\nI've managed to do this by hardcoding the file name and it works fine:\n\nNow how do I make this setup to automatically pick up the latest file.\nThanks a lot\nEDIT\nI tried the following and it seems to work - Is this the right way to go about it.\n\n", "\nmutt -s \"Number of users logged in\" -a /tmp/user_analytics_2012-03-11.csv [email protected] < /tmp/message.txt \n", "bash cron crontab"], "5851418": ["Create a VLAN on HP Procurve switches", "New to this site, but it's pretty darn great, so I won't be a stranger here!\nStill a n00b though :-)\nNeed a walkthrough on howto create a VLAN.\nI have the ipadress space for the VLAN\nI have the subnett for the VLAN\nWhat I don't know is how to go about creating a VLAN. Can anyone advice me? Where, when, how?\nThanks in advance!\nMaclovin\n", "", "hp vlan"], "3254179": ["ruby - bundle install/update too slow", "I just installed RVM, Ruby, Rails etc. on my virtual ubuntu 12.04 32bit running in a virtualbox. Now I encounter the problem that for my first rails project or takes very long time. Even when I create a new project with rails (which includes ). \nI use only the standard gems:\n\nI tried bundle install without any gems but . After that I typed again with all gems in my gemfile. It took me 10 minutes to check for dependencies. The output of --verbose is a mix of and .\nRails version: Rails 3.2.12\nRuby version: ruby 1.9.3p392 (2013-02-22 revision 39386)\nRvm: rvm 1.18.18\nbundle version: Bundler version 1.3.2\nI already searched fot a solution, but nothing helped. Even my firewall and antivir is switched off.\n", "bundle install", "ruby-on-rails ruby rubygems bundler"], "634673": ["Java Framework for applet that plays video streams/files (mjpeg/divx/h.264)", "Can you tell me the best solution today to make an applet that plays mjpeg/divx/h.264.\nI need it to work on systems without installing any additional software (like jmf).\nThe client simply goes to a web page, loads the applet and sees the video stream/file.\nThanks for any help.\n", "", "java video applet streaming"], "5622362": ["Residue field of polynomial rings", "Let $k$ be an algebraically closed field of characteristic $p$ and $A=k[x_1,\\cdots,x_n]$ the polynomial ring over $k$ in $n$ variables.\nGiven a prime ideal $\\mathfrak{p}$ in $A$, denote by $A_\\mathfrak{p}$ the localization in $\\mathfrak{p}$ and also denote by $A(\\mathfrak{p})$ the residue field of the local ring $A_\\mathfrak{p}$, i.e. $A(\\mathfrak{p})=A_\\mathfrak{p}/\\mathfrak{p}A_\\mathfrak{p}$.\nIs there a way to describe explicitly $A(\\mathfrak{p})$? What about the case where $\\mathfrak p$ is maximal?\n", "", "commutative-algebra ring-theory"], "5924920": ["Iterator hierarchy", "Which inheritance makes more sense :\n\nor \n\nIf I say \"the derived class gives more complicated functionality than the base class\" (first of all does this statement even make sense here), which is the more basic operation : next or shift?\nEDIT : I'm actually designing interfaces for number sequences.\n", "class SequentialIterator{ \n SequentialIterator next(); \n};\nclass RandomAccessIterator : public SequentialIterator{\n RandomAccessIterator shift( int del );\n};\n", "oop class design inheritance"], "3250372": ["Can you tell if you're dreaming by pinching yourself?", "Just yesterday I read how Tyrion tries to figure out if he's sleeping by pinching himself. And this seems to be a commonly held truth which often comes back in tales.\nBut I'm not so certain. So can you tell if you're dreaming by pinching yourself? Are there any other tricks to figure out if you're dreaming or awake?\n", "", "sleep pain dreaming"], "593290": ["Creating automated uninstall script in Perl", "Could someone please show me an example of how I could do the following:\nIf I use a shell command to generate a two list of packages, for e.g:\n\nrather than using yum to \"manually\" uninstall each of the packages shown in the generated list, is there a way to placed them into a Perl loop to automatically do this?\n", "rpm -qa | grep -i packages1\nand\nrpm -qa | grep -i packages2\n", "perl"], "3523719": ["How to enable ssh on extreme summit x450e-24p and x450e-48p switch?", "How do you enable ssh on extreme summit x450e-48p and x450e-48p switch for secure login. Do I need to purchase a license for that? I haven't found any commands on switch cli.\n", "", "router switch"], "5548876": ["Evaluate $\\cos(x)$ at a particular point", "I am trying to evaluate $\\cos(x)$ at the point $x=3$ with $7$ decimal places to be correct. There is no requirement to be the most efficient but only evaluate at this point.\nCurrently, I am thinking first write $x=\\pi+x'$ where $x'=-0.14159265358979312$ and then use Taylor series $\\cos(x)=\\sum_{i=1}^n(-1)^n\\frac{x^{2n}}{(2n)!}$ to decide the best $n$ and the fact the error bound $\\frac{1}{(n+1)!}$ for $\\cos(x)$ when $x\\in[-1,1]$ to decide $n$. Using wolfram alpha I got $n=11$. Thus I need to use the first $11$ term of Taylor series of $\\cos(x)$. Is this seems a reasonable approach?\nIf I am using some programming languages which don't contain $\\pi$ as a constant, should I just define $\\pi$ first and use the above method? Is there any other approach to this?\nIf I want to evaluate $\\sin(\\cos(x))$ at the point $x=3$, should I use above method to evaluate $\\cos(x)$ first and then $\\sin(\\cos(x))$? Is there any other approach to this?\n", "", "numerical-methods"], "4521442": ["Backup on Debian interfering with other running programs", "I've got a webserver on Debian 6. The system is also always running some processes sensitive to CPU usage. When I am using some of tools like or , they are using CPU too much and my sensitive processes are experiencing trouble.\nWhen I've tried to use CPU-Limit tool it was terrible experience when server went down.\nI am looking for any lightweight backup tool that can create incremental backups.\n", "rsync", "linux backup debian cpu-usage"], "2404979": ["Django template for loop (print limited data using for loop)", "Suppose I have movies. with the help of for loop. We can print all the movies. Like below.\nIn Django template\n\nBut What should I do If I have to print only movie from list? thanks\nUPDATE: I have written this. Is there another alternative?\n\n\n\nUPDATE2 : Ive written following function in . The only problem with this if user click on next page(paginator), its displaying the previous data. Mean this data does not change. any advise?\n\n", "100", "django django-templates"], "4773409": ["Why web application running on phusion passenger is getting down frequently?", "My web application running on phusion passenger is getting down frequently but i am not able to trace out the reason.\nHere is the error i got in /var/log/httpd/error.log file\nPremature end of script headers: \nThe backend application (process 5417) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.\nLast 50 line of log:\n\n", "[Thu Oct 11 05:29:42 2012] [error] [client 11.992.88.255] Premature end of script headers: \n[ pid=22252 thr=1 file=ext/apache2/Hooks.cpp:817 time=2012-10-11 05:29:42.409 ]: The backend application (process 5488) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.\n[Thu Oct 11 05:35:16 2012] [notice] child pid 27200 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:19 2012] [notice] child pid 27196 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:19 2012] [notice] child pid 27199 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:20 2012] [notice] child pid 27203 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:20 2012] [notice] child pid 27195 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:20 2012] [notice] child pid 27205 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:28 2012] [notice] child pid 27194 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:28 2012] [notice] child pid 27206 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:35 2012] [notice] child pid 27193 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:38 2012] [notice] child pid 27204 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:38 2012] [notice] child pid 27192 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:40 2012] [notice] child pid 27202 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:42 2012] [notice] child pid 27197 exit signal Segmentation fault (11)\n[Thu Oct 11 05:35:43 2012] [notice] child pid 27198 exit signal Segmentation fault (11)\n[Thu Oct 11 05:37:31 2012] [notice] child pid 27207 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:02 2012] [notice] child pid 9225 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:02 2012] [notice] child pid 9224 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:03 2012] [notice] child pid 9229 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:04 2012] [notice] child pid 9230 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:05 2012] [notice] child pid 9231 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:06 2012] [notice] child pid 9392 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:07 2012] [notice] child pid 9395 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:08 2012] [notice] child pid 9396 exit signal Segmentation fault (11)\n[Thu Oct 11 05:39:09 2012] [notice] child pid 27201 exit signal Segmentation fault (11)\n[Thu Oct 11 05:41:55 2012] [notice] child pid 9220 exit signal Segmentation fault (11)\n[Thu Oct 11 05:45:25 2012] [notice] child pid 9223 exit signal Segmentation fault (11)\n[Thu Oct 11 05:52:40 2012] [notice] child pid 9517 exit signal Segmentation fault (11)\n[Thu Oct 11 05:54:16 2012] [notice] child pid 9525 exit signal Segmentation fault (11)\n[Thu Oct 11 05:54:17 2012] [notice] child pid 9529 exit signal Segmentation fault (11)\n[Thu Oct 11 05:54:18 2012] [notice] child pid 9531 exit signal Segmentation fault (11)\n[Thu Oct 11 05:54:19 2012] [notice] child pid 10414 exit signal Segmentation fault (11)\n/home/john/dips/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `initialize' may cause serious problems\n/home/john/dips/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `object_id' may cause serious problems\n/home/john/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `__send__' may cause serious problems\n[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility\n layer which provides a drop-in replacement for Spreadsheet::Excel\n versions <= 0.3.5.1. This code will be removed in Spreadsheet\n version 1.0.0\n\n/home/john/dips/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `initialize' may cause serious problems\n/home/john/dips/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `object_id' may cause serious problems\n/home/john/dips/apps/production/releases/20121005650832/vendor/gems/ruby/1.9/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `__send__' may cause serious problems\n[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility\n layer which provides a drop-in replacement for Spreadsheet::Excel\n versions <= 0.3.5.1. This code will be removed in Spreadsheet\n version 1.0.0\n\n enter code here\n", "ruby-on-rails ruby apache phusion-passenger"], "3460827": ["Javascript regex is not working", "Can someone rewrite this javascript. The problem now is that 1 regex is only working( that one from email)\nearlier question: link\nI got advice here but I think I put it not good in my code\n\n", "function checkform ( form )\n{\n var rex = /[^a-z]/i;\n var regex = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\n if (!regex.test(form.email.value))\n {\n alert( \"Please enter youre valid email address.\" );\n form.email.focus();\n return false ;\n }\n\n if (rex.test(form.name.value)) \n {\n alert( \"Please enter your name. no numbers or #$^& things allowed).\" );\n form.name.focus();\n return false ;\n }\n\n return true ;\n}\n", "javascript regex homework"], "5005511": ["Moq and calling back to set a class' values", "I have a mocked DTO class that has properties in it I'm setting via a callback function. This works below for me, but is there a cleaner way to go about it?\n\nI'd like to set those properties in the call if possible, but it accepts an expression and I can't do a multi-line statement in there. But my Linq knowledge isn't encyclopedic and I was wondering if there was a better to approach what I'm doing.\n", " Mock<MyDto> _MyDto = new Mock<MyDto>();\n\n _MyDto.Setup(dto => dto).Callback<MyDto>(dto => \n { \n dto.FirstName = \"John\";\n dto.LastName = \"Doe\";\n });\n", "linq moq expression-trees"], "6002541": ["SQL Server 2008 and Almost-Progressive Sum and Average?", "I have a table with several million rows, with an ID column and a DateTimeOffset column. The table simply tracks elapsed time for some operations.\nWithout touching a cursor or doing RBAR, how can I get the difference between each row, and then the average time among all rows?\nFor example, if row 1 is 12:00 and row 2 is 12:01 and row 3 is 12:03 then my result set would have row 1 with 0, row 2 with 1, and row 3 with 2. Then my next result set would have a value of 1.5.\nHelp?\nThanks.\n", "", "sql-server-2008 sum avg"], "1149774": ["How to get pixel width and height of String?", "How do you to use GetTextExtentPoint32W in Delphi 7 to get the pixel width and height of a wide string before it is output?\n", "", "delphi text canvas delphi-7"], "2922434": ["Calculating the highest possible damage achievable using 6 items from a pool of ~25", "I am writing an app in javascript to try to figure out item builds for characters in a video game. There are about 25 top-tier items, and you can carry 6 at a time. They have very different effects, which leads me to believe that while one item may seem like it isn't very good by itself, it can become much stronger when combined with others. \nQuestions:\n\nHow can I get a list of all the different distinct combinations of 6 items? How many combinations will there be? Is it just 25c6 (~134k)? Or do I need to remove duplicates? (Sorry, I've been out of math class awhile.)\nHow would you implement something like this in Javascript? Is there already a math library that can do this?\nDoes it seem possible to brute force calculate the damage of all the possible combinations and save the top item combinations? If not, is there a better algorithm to find strong combinations?\n\nEDIT:\nHere's my code based on everyone's suggestions:\n\n", "function getAllCombinations(n, k, callback)\n{\n var iterate = function(remaining, args)\n { \n var len = args.length;\n for (var i = args[len - 1]; i < n; i++)\n {\n args.splice(len);\n args[len - 1] = i;\n if (remaining)\n {\n args.push(i);\n iterate(remaining - 1, args);\n }\n else\n {\n callback.apply(null, args); \n }\n } \n }\n iterate(k - 1, [0]);\n}\n\nvar itemsCount = 25;\nvar itemSlots = 6;\ngetAllCombinations(itemsCount, itemSlots, function(a, b, c, d, e, f)\n{ \n // calculateDamage(hero, arguments);\n});\n", "binomial-coefficients"], "5892843": ["Creating my small farm by virtual machines to learn scalability issues", "I would like to create a fake server farm using virtual machines with Ubuntu server on them. I do not plan to use those as a real farm to host people websites etc.\nI recently read about scalability, the ability to add new servers to your website without having to hassle too much with the code. I would like to learn more about this, just out of curiosity, plus I'm planning a website that might require such things.\nI would like to understand clearly how load balancers work, how a MySql query or http request can be sent to any of hundreds of servers to avoid pressure on a single one.\nEven though I own a Core i7, it's clear that as I approach to 4-5 virtual machines things will collapse, so just for fun :)\nI know it will not be easy to find a \"tutorial on how to build your own server farm\". So I'm asking here. Which tools do I require? Where can I find appropriate documentation (please not the unix \"man\")? Any link that will explain things better?\nThanks in advance.\n", "", "linux virtualization load-balancing scalability web-farm"], "904573": ["WSO2 ESB Proxy-Service Import XSD error", "I want to connect ServiceManager WSDL to WSO2 esb as a target for a proxy service. I installed both SM9 and WSO2esb on the same dev system. SoapSonar will be used to check the results of my esb configuration. \nMy service definition looks the following way:\n\nUnfortunatly I can't solve the problem, that xsd files have to be transferred to the client. SoapSonar tells me by a popup window, that it wants to know, where it can find \n\nI checked the wsdl and found the following statement:\n\nSo I tried several things:\n\nI copied the WSDL inline, defined a location/key-pair and tried to define the key in the user registry\nI checked the synapse documentation ... it seems that they also had issues with this in older days. Neither of the suggestions could be configured in WS=2. I tried it in Synapse as well - same issue. I tried the proxy example of synapse (synapse.xml in the misc/proxy folder) - this works! Ah ... so it should work somehow ...\nI figured arround lots of time with the GUi of WSO2 as well as with the xml-configuration of a separate synapse installation. Nothing worked.\n\nIs there a hint or a setup guide, that solves this issue? THe samples are nice, but they are a bit too simple to derive a solution out of them. \n", " <proxy name=\"SM9Lcl1IM\" transports=\"http\" startOnLoad=\"true\" trace=\"enable\" statistics=\"enable\">\n <description>Incident Management Local SM9</description>\n <target>\n <endpoint>\n <address uri=\"http://localhost:19380/sc62server/PWS\"/>\n </endpoint>\n <outSequence>\n <send/>\n </outSequence>\n </target>\n <publishWSDL uri=\"http://localhost:19380/sc62server/PWS/IncidentManagement.wsdl\"/>\n</proxy>\n", "xsd wsdl wso2 esb"], "5125983": ["Share session info between PHP4(mod_php) and PHP5(cgi)", "I'm split as to whether this is an SO question or a SF question, so I'm starting here. \nWe have a legacy application running under PHP4(don't ask), and some other code we need to run under PHP5.\nSession data that is set on the PHP4 side doesn't seem to be visible/present when running code on the PHP5/cgi side. I'm doing a session_start, adding some session data under PHP4, and then doing a var_dump of the session from PHP5 and $_SESSION is null.\nHas anyone got this working?\nEnvironment:\nApache 2.2.x\nPHP 4.4.9 (mod_php)\nPHP 5.1.3 (cgi)\nCentos 5.6\nThanks!\n", "", "php apache php5 php4"], "1887756": ["Sharing setting between user & Runtime modification: way of changing default value?", "My question is about the user/application scope settings in VS2008 in C#: how about having persistent settings, been able to be modified by user during Runtime, and shared between all user? It seem loads of people are facing this situation that is just a mix between the scopes available:\n-Application scope settings are not meant to be modified during Runtime but are shared by all user.\n-User scope settings have the advantage to be able to be modified during Runtime but of course... are user dependent! \nWith researching, it seems some people are using \"brutal solution\": they define the targetted settings with an application scope, and hardcode opening and modification of the app.config XML file during Runtime (as long as they don't have access restriction problem??): it's seem to me a little bit messy, but why not... \n1-Path solution: Like some other, I was also thinking of keeping all the setting with a user scope and changing the storing path to share the same file between all the users. Is seems a good solution, but as I have also some \"real\" user dependant settings, it involve having two user.config files with two different path: I am not sure yet it is doable and a good practice?\n2-Changing default values: Another solution would be to change the default value of the user settings to use them as a kind of \"application scope\" (by calling reset() in program launching). If I am right, all the modified user settings are stored in the user.config file (In the user Local directory). The default user settings are stored in the app.config file under a section userSettings. I am not sure if it is possible to modify it during runtime and if so, I don't know how!! (With DefaultSettingValueAttribute !?) (To me, this section is different of the applicationSetting one that contains the application scope settings in read only during Runtime). This solution, if possible, seems to me the more practical and easy but again, not sure if best practice!!!)\nLast solution would be to store the targeted parameters in a totally different file and not using the settings systems provide by VS. But, this is another story...\nI hope my explanations were not too unclear!! \nAny comments or suggestions will be very helpful. \nCheers, Yves\n", "", "app-config application-settings appsettings settings.settings user.config"], "5136454": ["Build failed in xcode 3.2.3", "I have upgraded my iphone sdk from 3.1.3 to 3.2.3. But now i have a problem. The project i m working on is not compiling in new sdk. I have changed the target info settings also i.e. base sdk is set to iphone device 4.0. I have follwing build error:\n\nI have deleted build folder and trying to clean all targets but it does not work.\n", "Internal error occurred while creating dependency graph: ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase- 1691/pbxcore/Target.subproj/PBXTargetBuildContext.m:2061\nDetails: Assertion failed: [filePath isAbsolutePath]\nObject: <PBXTargetBuildContext:0x201779de0>\nMethod: -setHeadermapToolInvocation:forFilePath:\nThread: <NSThread: 0x20091e040>{name = (null), num = 5}\nBacktrace:\n0 0x00000001002857d8 -[PBXTargetBuildContext(DependencyGraphEvents) handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)\n1 0x00000001002dab3f _XCAssertionFailureHandler (in DevToolsCore)\n2 0x0000000100282342 -[PBXTargetBuildContext setHeadermapToolInvocation:forFilePath:] (in DevToolsCore)\n3 0x0000000100141a6b -[XCCompilerSpecification computeDependenciesForFilePath:ofType:outputDirectory:inTargetBuildContext:] (in DevToolsCore)\n4 0x0000000100381aa5 -[XCBuildRuleDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:withOutputDirectory:additionalProperties:inTargetBuildContext:] (in DevToolsCore)\n5 0x000000010015b3cd -[XCResourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:inTargetBuildContext:] (in DevToolsCore)\n6 0x000000010013d4a8 -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)\n7 0x000000010015b0e3 -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)\n8 0x000000010015b031 -[XCResourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)\n9 0x000000010012d1eb -[XCProductTypeSpecification computeDependenciesInTargetBuildContext:] (in DevToolsCore)\n10 0x0000000100128a19 -[XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)\n11 0x0000000100124ba5 -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)\n12 0x0000000100123b62 -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)\n13 0x00007fff83eed0dc __invoking___ (in CoreFoundation)\n14 0x00007fff83eecfad -[NSInvocation invoke] (in CoreFoundation)\n15 0x000000010012357a -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)\n16 0x00007fff83eed0dc __invoking___ (in CoreFoundation)\n17 0x00007fff83eecfad -[NSInvocation invoke] (in CoreFoundation)\n18 0x000000010012309b -[XCInvocationQueue _processNextInvocationInThreadSlotNumber:] (in DevToolsCore)\n19 0x0000000100122e0d -[XCInvocationQueue _processInvocationsInThreadSlotNumber:] (in DevToolsCore)\n20 0x00007fff829f9e99 __NSThread__main__ (in Foundation)\n21 0x00007fff8845ff8e _pthread_start (in libSystem.B.dylib)\n22 0x00007fff8845fe41 thread_start (in libSystem.B.dylib)\n", "iphone build assertion"], "2150515": ["How to pass multiple parameters and EventArgs properties when using EventToCommand in MVVM-Light toolkit", "I am using MVVM Light toolkit for my WPF application and I would like to know if its possible, when using EventToCommand, to pass multiple parameters to RelayCommand and Is it possible to pass properties of EventArgs instead of passing the whole EventArgs ?\nRegards,\nNabeel\n", "", "wpf mvvm mvvm-light mvvm-toolkit"], "3369462": ["How to write backslash into yaml", "I'am trying to rewrite zend framework configuration file from application.ini to application.yml format and I have some unsolvable problem for me.\nin application.ini i have this:\n\nand it works. But if I try it write to yaml file I get an error about unsupported syntax\n\nI tried so much ways to solve this, but no worked..\nAny idea?\n", "pluginPaths.Bisna\\Application\\Resource\\ = \"Bisna/Application/Resource\"\n", "zend-framework configuration yaml"], "2786735": ["Oracle 10g database lite", "I have Oracle 10g xe installed but i also need to install Oracle Database lite in it. Is there a problem or a conflict?\nthanks\n", "", "oracle10g"], "5944975": ["SimpleXML problem print key value", "I have been searching google for over an hour and am frustrated, This seems so simple. All I am trying to print is my accountId. Here is the xml i am being returned from the server:\n\nAll i want is accountId. I am using this and it doesnt print anything:\n\ni can print the entire xml array just fine with print_r though. Im not sure what i am doing wrong\n", "SimpleXMLElement Object\n(\n[accounts] => SimpleXMLElement Object\n (\n [account] => SimpleXMLElement Object\n (\n [billingStreet] => SimpleXMLElement Object\n (\n )\n\n [billingCity] => SimpleXMLElement Object\n (\n )\n\n [billingState] => SimpleXMLElement Object\n (\n )\n\n [billingPostalCode] => SimpleXMLElement Object\n (\n )\n\n [billingCountry] => SimpleXMLElement Object\n (\n )\n\n [city] => Los Angeles\n [accountId] => XXXXX\n [companyName] => SimpleXMLElement Object\n (\n )\n\n [country] => United States\n [email] => XXXXX\n [enabled] => 1\n [fax] => SimpleXMLElement Object\n (\n )\n\n [firstName] => XXXXX\n [lastName] => XXXXX\n [multiClientFolder] => 0\n [multiUser] => 0\n [phone] => XXXXX\n [postalCode] => XXXXX\n [state] => CA\n [street] => XXXXX\n [title] => SimpleXMLElement Object\n (\n )\n\n [accountType] => 0\n [subscriberLimit] => 250000\n )\n\n )\n\n[total] => 1\n[limit] => 20\n[offset] => 0\n)\n", "php simplexml"], "4027985": ["Pushing image changes to multiple servers", "I need the ability to push images out to multiple servers whenever they're updated. I've looked at Network Filesystems, but they're all but worthless due to their speed. Images can be uploaded to any one of 3 servers, and would then need to be copied to the other 2.\nAny suggestions? I'm open to try just about anything.\nEDIT: Graphics data (jpg, gif, png, etc). Linux only.\nWe're currently using rsync. But having it work back and forth is getting cumbersome. It's all local network.\n", "", "webserver replication image"], "4193911": ["windows explorer - watch a directory", "When Windows Explorer is open, I need that, when a file is dragged in a location \n\"D:\\xyz\\\" say, then dragging this file should trigger a procedure (any) to run. How is it possible?\n", "", "registry explorer"], "4523388": ["How do I lock read/write to MySQL tables so that I can select and then insert without other programs reading/writing to the database?", "I am running many instances of a webcrawler in parallel.\nEach crawler selects a domain from a table, inserts that url and a start time into a log table, and then starts crawling the domain.\nOther parallel crawlers check the log table to see what domains are already being crawled before selecting their own domain to crawl.\nI need to prevent other crawlers from selecting a domain that has just been selected by another crawler but doesn't have a log entry yet. My best guess at how to do this is to lock the database from all other read/writes while one crawler selects a domain and inserts a row in the log table (two queries).\nHow the heck does one do this? I'm afraid this is terribly complex and relies on many other things. Please help get me started.\n\nThis code seems like a good solution (see the error below, however):\n\nbut I keep getting the following mysql error:\n\nIs there a way to accomplish the same thing without this problem? I've tried a couple different ways. Including this:\n\n", "INSERT INTO crawlLog (companyId, timeStartCrawling)\nVALUES\n(\n (\n SELECT companies.id FROM companies\n LEFT OUTER JOIN crawlLog\n ON companies.id = crawlLog.companyId\n WHERE crawlLog.companyId IS NULL\n LIMIT 1\n ),\n now()\n)\n", "mysql locking web-crawler mysql-error-1093"], "703413": ["DataRelation Equivalent in Subsonic 3", "I have some code that returns data from a self referencing table (ID,ParentID) into a DataSet. It then adds a DataRelation to the DataSet and writes the DataSet to XML. This write the XML as the expected heirarchy. \nHow do I do this in Subsonic?\n", "", "subsonic"], "5221884": ["Sinatra - Overriding Rack Classes", "I have a tiny Sinatra project where I need to override . Currently I have placed this override in the main file for my application, but that seems to clutter the source as things get bigger...\n\nI'd like to move the overrides to an external file. My project structure is something along the lines of\n\nWhere can I move the overrides so that I can use them from inside ? I have tried to put them on but that didn't work at all... What's the Sinatra standards on this?\n", "Rack::Auth::Basic#valid?", "ruby sinatra rack"], "2804712": ["cannot connect to database test1", "I can connect to mysql, but I get an error saying .\nIs there anything I am missing? Any help is much appreciated.\n\n", "Could not select db", "php mysql sql"], "922468": ["Load a AQGridViewCell from XIB (not working)", "I am using class and I am trying to load a cell from an XIB. I have setup the XIB like a Custom Cell for a , but when I attempt to load the cell, it is simply blank. I was wondering if there was an easier way to get the XIB to load.\nAQGridViewCell need to load the cell from an xib\n\n", "AQGridView", "ios ipad uitableview subclass aqgridview"], "1242397": ["PreparedStatement \"eats\" my line endings", "After that:\n\nI has that in database (mysql):\n\n\"Some multiline content\"\n\nHow I can avoid that?\nPart of page source:\n\nbut must be:\n\nPS. With just \n\nall works ok.\n", "String content = \"Some \\n multiline \\n content\";\n//actually, content comes from request (tomcat application)\nstmnt.setString(2,content);\n", "java mysql sql tomcat prepared-statement"], "3957061": ["Rewritting exception for wp log-in @ pphpbb3 forum", "I was \"translate\" my old page on wordpress.\nOld url-s had .php on the and and I was redirect this url-s on new, same url-s, but without php using:\n\nOld url-s indexed by google now redirecting to new one withot problem, but when I'm trying to log-in into worpress panell located on domain/wp-login , \"loop\" is happend and no way to log in.\nSame thing happend when i'm trying to log-in into phpbb3 forum that is located domain/forum/.\nPlease,anyone can tell me is there any way to \"avoid\" mentioned rewrite for:\n and \n directories?\nThank you!!!\n", "RewriteEngine On\n\nRewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\\ /([^\\ ]+)\\.php<br/> \nRewriteRule ^/?(.*)\\.php$ /$1 [L,R=301] </code>\n", "wordpress redirect phpbb"], "687060": ["Errors in make file : *** missing separator. Stop", "I am facing errors in make file in CentOS 6.02 64 bit. I need to know what should be done to make the makefile workable. Any suggestion will be greatly helpful. My make file is pasted below: -\n\nAnd the resultant error is:\n\n", "#\n\n\n\n.SUFFIXES: .cc $(.SUFFIXES)\n\n\n\nALL = libpal.a\n\n\n\n#all = $(ALL)\n\nall: $(ALL)\n\n\n\n.cpp.o:\n\n $(C++) -o $@ -c $(PROF) $(CFLAGS) $*.cpp\n\n.cc.o:\n\n $(C++) -o $@ -c $(PROF) $(CFLAGS) $*.cc\n\n.c.o:\n\n $(CC) -o $@ -c $(PROF) $(CFLAGS) $*.c\n\n\n\ntop_srcdir = ..\n\nOPENSSL_LIB_DIR = ../../ThirdPartyLibs/openssl-0.9.8e/include\nBOOST_DIR = ../../ThirdPartyLibs/boost/stage/lib\n\nBOOST_INCLUDE_DIR = ../../ThirdPartyLibs/boost\n\n\n\n\n\nCC = gcc\n\nC++ = g++\n\nCCOPT = -Os -Wall -Wno-deprecated\n\nCCOPT_DEBUG = -Wall -g -Wno-deprecated\n\nPROF = \n\n\n\nSTATIC = -static\n\n\n\n\n\nINCLUDE = \\\n -I./usr/include/sys\n\n -I./Headers \\\n\n -I$(top_srcdir)/PAL/Headers \\\n\n -I$(top_srcdir)/BaseMulti/Headers \\\n\n -I$(top_srcdir)/NetworkMulti/Headers \\\n\n -I$(top_srcdir)/RTP/Headers \\\n\n -I$(BOOST_INCLUDE_DIR) \\\n\n -I$(OPENSSL_LIB_DIR) \\\n\n\n\nLIBDIRS = \\\n\n -L$(BOOST_DIR) \\\n\n\n\n\n\n#XXX NLAYER define / MB_DEBUG\n\nDEFINE = -D_LINUX -DDEBUGLOG -D_INDENT_DB_PRINT -fsigned-char -fno-inline -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PER_PROCESS_TIMER_SOURCE -D_PTHREADS -DUNICODE #-DDISABLE_LOG\n\n\n\nSHLIB_SUFFIX = .so\n\nSHLIB_LD = gcc -shared\n\n#The previous line had \"gcc\" instead of \"frv-uclinux-gcc\"\n\nSHLIB_LD_LIBS = \n\nSHLIB_CFLAGS = -fPIC\n\n\n\nBFLAGS = $(DEFINE) $(INCLUDE)\n\nCFLAGS = $(CCOPT) $(BFLAGS)\n\n\n\nOBJ_C =\n\n\n\nOBJ_CC = \\\n\n ./Sources/PALsystime.o \\\n\n ./Sources/PALdebug.o \\\n\n ./Sources/PALdebuglog.o \\\n\n ./Sources/PALthread.o \\\n\n ./Sources/PALcritsec.o \\\n\n ./Sources/PALprofiler.o \\\n\n ./Sources/PALserializable.o \\\n\n ./Sources/PALinet.o \\\n\n ./Sources/PALnetwork.o \\\n\n ./Sources/PALsocket.o \\\n\n ./Sources/PALlocalhostUdpEvent.o \\\n\n ./Sources/PALpollarray.o \\\n\n ./Sources/PALrandom.o \\\n\n\n\nOBJS = $(OBJ_C) $(OBJ_CC) \n\n\n\nSRCS = $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc)\n\n\n\ndebug: DEFINE += -DDEBUG\n\ndebug: BFLAGS = $(DEFINE) $(INCLUDE)\n\ndebug: CFLAGS = $(CCOPT_DEBUG) $(BFLAGS)\n\ndebug: $(OBJS)\n\n ar crsu libpal_debug.a $(OBJS)\n\n\n\nlibpal.a: $(OBJS)\n\n ar crsu libpal.a $(OBJS)\n\n\n\ncleandeps: \n\n $(RM) ./Sources/*.o .depend* core\n\n\n\nclean: cleandeps \n\n $(RM) ./libpal.a ./libpal_debug.a\n\n $(RM) $(ALL)\n", "linux makefile centos"], "1516387": ["2 or more assemblies have the same identity", "I'm using Visual Studio 2010 and creating a Windows Form in C#. Yesterday, development was going fine, i was working on connecting an access database to my datagrid. it worked several times, however when i made a new connection and tried to run it again (F5), i got a ton of errors, so a narrowed it down by deleting (and undoing) my data sources and the error still exists. This is it...\n\nWarning 1 The type 'Wincent_Warehouse_Management_Studios.Form1' in 'C:\\Users\\Wilson Kao\\documents\\visual studio 2010\\Projects\\Wincent Warehouse Management Studios\\Wincent Warehouse Management Studios\\Form1.Designer.cs' conflicts with the imported type 'Wincent_Warehouse_Management_Studios.Form1' \nWarning 7 Two or more assemblies have the same identity 'Wincent Warehouse Management Studios, Version=1.0.0.0, Culture=neutral, ProcessorArchitecture=x86'. Wincent Warehouse Management Studios\nWarning 8 Two or more files have the same target path 'C:\\Users\\Wilson Kao\\documents\\visual studio 2010\\Projects\\Wincent Warehouse Management Studios\\Wincent Warehouse Management Studios\\bin\\Debug\\Wincent Warehouse Management Studios.exe'. Wincent Warehouse Management Studios\n\nAfter the warnings, it gave me this error...\n\nNo Source Available \n No Symbols are loaded for any stackframe. The source code could not be displayed\n\nI can sort of see the problem but I'm not too sure how to solve it... I know in my program somewhere (and not my own code) I am including something that causes my program to conflict. So what I tried was I went to the bin/debug folder and deleted everything in it... and it worked. However, after the files in that directory were replenished, I got the same problem again. I'm in some desperate need for help and any sort of clue where to go will be greatly appreciated! Thanks! :) \n", "", "visual-studio-2010 debugging ado.net assemblies"], "5804781": ["What causes a theme to be inefficient?", "Someone has asked me to analyze if his theme is 'good'. I've decided to analyze it in terms of \n\nnumber of assets that the theme needs\ncompressing those assets\nensuring wp_enqueue_x is being used \nensure that loops are properly coded\n\nAm I missing anything important and obvious? I'd love to know what else you may think of, thanks!\n", "", "theme-development optimization"], "3508785": ["ORACLE SQL listagg function", "I'm not sure what's going on here, mostly because I've never used this function, but when I use the listagg function on our Oracle 11g database it gives me an ORA-00923 FROM keyword not found where expected.\nHere's my SQL\n\nI haven't a clue why this is breaking. I was following the example found here.\n", "SELECT cdm.courses_id,cde.additional_resources, listagg (dm.delivery_method_desc, ',')\nWITHIN GROUP (ORDER BY dm.delivery_method_desc) delivery_methods\nFROM tablespace.course_de_delivery_methods cdm,\n tablespace.course_distance_ed cde,\n tablespace.delivery_methods dm\nWHERE cdm.courses_id = cde.courses_id\nAND cdm.delivery_methods_id = dm.delivery_methods_id\nGROUP BY cdm.courses_id\n", "sql oracle ora-00923"], "1944602": ["whats web part and where it is used?", "Can anybody tell me what is web part and where it is used commonly ?\nWhy should'nt we use user control instead of it ...(might be this is a blunder..but i donno whats it )\nThanks in advance!\n", "", "asp.net-2.0 webparts"], "2128495": ["Minimum spec laptop for iPhone development?", "I'm looking into iPhone development. Most likely I'd be working on the move, so need a laptop to develop on. What would be the minimum spec laptop I could use to develop for the iPhone? Most likely the development would include OpenGL work.\nThanks.\n", "", "iphone opengl apple"], "4100924": ["Telerik ASP.NET MVC components licensing", "There's thread on stackoverflow about this\nhttp://stackoverflow.com/questions/5524046/is-telerik-extensions-for-asp-net-mvc-free \nIt says that it is ok for internal site, but I think it is still not clear (also in faq notice about internal site usage is gone I think).\nThey say, as long as website is internal, you should be ok with open source license, but\n1) Can I use it for site, that has closed community, I mean only logged in people will use telerik components?\n2) Can I use only for site's administration part, that means that only internal staff will access it?\nUPDATE: It looks like same question (same license type) - Using GPL libraries without modification on a commercial website, do I need to make my source code available?, but answers are completely different? \nUPDATE2: I don't wish to in any way distribute site's code.\n", "", "gpl asp.net-mvc asp.net-mvc-3"], "2749708": ["WPF solution design of slideshow application", "Been thinking about this for hours now. Im building a simple slideshow application, where the user creates slides through a web application and publishes them to a wpf \"player\". The user is allowed to create two types of slides one based on html and one based on xaml (thought this would be easy).\nWhen i get the slide to the player i have to determine how to render/load the slide. The HTML slide i convert to xaml (code i found on msdn) as a flowdocument (but now what to do with it?). The Xaml i just get in \"raw\" xaml.\nMy plan is to convert both of these to xaml, then have the slide load the xaml in someway and display it, but how? And would this setup be the proper architecture? please bear in mind that this is a small player application.\nAny help on either architecture or on how to display these are highly appreciated.\nSincerely,\nBrian\n", "", "wpf architecture"], "2434630": ["Add/remove programs in Windows XP with Python script", "I would like to add add/programs like adobe acrobat reader and other application in windows XP using Python script. Kindly looking for some help. \nThanks in advance!\nEverest.\n", "", "python windows system administration"], "4153582": ["Android: Issues transitioning to the next .java?", "I'm a little confused... After the animation, the splash screen is supposed to start an intent function to operate the next .java activity file... but when it runs after the splash screen in the emulator, it wont work. I opened Logcat and it said something to an extent of a java.lang.nullpointer and runtime exception running at the Pause feature... can anyone explain this to me? Thanks.\n\nLogcat:\n\n", "package com.unicorn.test.whee;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.animation.Animation;\nimport android.view.animation.Animation.AnimationListener;\nimport android.view.animation.AnimationUtils;\nimport android.widget.ImageView;\n\n\npublic class SplashScreenPear extends Activity {\nImageView pearfade;\n/** Called when the activity is first created. */\n\npublic void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.pear); }\n\nprivate void startAnimating(){\n Animation pearfadeact = AnimationUtils.loadAnimation(this, R.anim.fadein);\n ImageView pearfade = (ImageView) findViewById(R.id.pearish);\npearfadeact.setAnimationListener(new AnimationListener(){\n\n public void onAnimationEnd(Animation animation) {\n // The animation has ended, transition to the Main Menu screen\n startActivity(new Intent(SplashScreenPear.this, Unicorn.class));\n SplashScreenPear.this.finish(); }\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n }\n });\n\npearfade.startAnimation(pearfadeact); \n}\n\n @Override\n protected void onPause() {\n super.onPause();\n pearfade.clearAnimation(); \n }\n @Override\n protected void onResume() {\n super.onResume();\n startAnimating();\n }\n\n\n\n }\n", "android eclipse animation emulator transition"], "5183439": ["Hierarchical navigation w/ Scala in the Play! framework", "I need to implement a hierarchy of categories (basically a tree structure). As I am new to Scala, I suspect there is a very good functional approach to this problem.\nI have used nested sets in PHP/mysql before. Is there an easy way to create a tree structure that enables me to easily retrieve parent and child nodes from the tree, starting out from a database table that consists of\nid\nparent_id\nlabel\n?\nMy feeling is that this is where Scala should shine with its functional flavour.\n", "", "mysql scala tree playframework nested-sets"], "5230616": ["My machine have two Wi-fi drivers but only one device, what does it mean?", "Today I was looking my Windows add/remove programs and found two versions of installed Wi-fi device drivers( REALTEK Wireless LAN Driver 1.0.148 and REALTEK Wireless LAN Driver 1.0.174).\nOn device manager, I'm seeing only one device(RTL8191SE with 1.0.174 driver). \nMay the manufacturer commited an error on installing my wifi device driver? Should I uninstall/reinstall one of them? Is this a possible source of conflicts/problems on my system?\n", "", "windows-7 windows wireless-networking drivers"], "225696": ["HKEY_CLASSES_ROOT does not contain contents of HKEY_CURRENT_USER", "I have an MSI installer which registers an ActiveX component. The registration info is written to the hive, and all works fine and dandy.\nFor one user, however, IE is behaving as though the component is not registered. I've looked in the registry and the registration is there in . However, it doesn't appear in , which is really strange as that should be a merged view of and . \nI've also noticed that the registration appears in \n\nbut not in \n\nThe only way I can get it to work for her is to write the registration information to \n\nat which point everything works perfectly.\nAny ideas why this is?\n", "HKEY_CURRENT_USER", "msi windows-registry"], "4853416": ["c# gui hangs but still can listen and process", "why is that my c# server gui hangs? any idea where did i go wrong? thank you\nits like, the moment i click the button1, the gui hangs, but it can still process requests and listen and accept for incoming client connections.\n\n}\n", " public Form1()\n {\n InitializeComponent();\n }\n\n private void Form1_Load(object sender, EventArgs e)\n {\n\n }\n\n TcpListener listener = null;\n TcpClient client = null;\n NetworkStream stream = null;\n BinaryWriter writer = null;\n BinaryReader reader = null;\n string vouchercode;\n string username;\n string password;\n string reseller;\n string fresh;\n string result;\n\n\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n listener = new TcpListener(new IPAddress(new byte[] {127,0,0,1}), 6666);\n listener.Start();\n while (true)\n {\n label1.Text = \"waiting....\";\n using (client = listener.AcceptTcpClient())\n {\n label1.Text = \"Connection request accepted!\";\n using (stream = client.GetStream())\n {\n\n\n //some codes here ..\n }\n }\n }\n }\n\n\n catch (WebException ex)\n {\n Console.WriteLine(ex.Message);\n }\n finally\n {\n if (listener != null) listener.Stop();\n if (writer != null) writer.Close();\n if (reader != null) reader.Close();\n }\n\n\n }\n\n\n\n}\n", "c# gui blocking"], "4175746": ["jQuery glDatePicker Changing selectedDate after the calendar has rendered?", "I cannot seem to be able to change \"selectedDate\" after the calendar has rendered. Reference guide says it is possible to change calendar's options after it has rendered and it holds true for values like cssName and borderSize and selectableDateRange, but modifying \"selectedDate\" does not seem to have any effect? Is this intended or am I missing something?\nThanks.\n", "", "jquery datepicker"], "2386450": ["FTP transfer timeouts while uploading small files", "I have this problem that when I need to transfer some files (mostly small files < 100KB) the connections time out.\nWell actually it uploads one file and it fails on the next until my client reconnects to the server and the same thing happens over and over again.\nI googled the problem and some said that switching from passive mode to active mode could solve the it but it didn't work for me. Even continuously pinging the server to keep the connection alive was to no avail. \nP.S. I have root access to the server.\nUpdate: I'm running ProFTPD on a CentOS vps. I tried a few clients (FireFTP, FileZilla) all having the same problem.\n", "", "ftp timeout"], "2800898": ["Get content of the Google Docs editor", "I'm developing a Firefox extension that should work with Google Docs editor. Is there any way to retrieve the content of the opened document?\n", "", "javascript google-docs"], "2815625": ["Design tool for ASP.Net Pages", "I am looking for some tool so that I can design my web pages(layout, color etc...). Does anything exist like that? (Other than Visual Studio, Dreamweaver...)\n(I dont want to write css for now)\n", "", "c# asp.net"], "2142432": ["Piecewise functions: Got an example of a real world piecewise function?", "Looking for something beyond a contrived textbook problem concerning jelly beans or equations that do not represent anything concrete. Not just a piecewise function for its own sake. Anyone?\n", "", "functions graph"], "1425506": ["To open exe of SQL Server Management Studio", "I'm creating a windows application and here I faced a scenario that I need to open SQL Server Management Studio through C# code. Is there any way to open this SQL Server Management Studio executable through code?\nNote:\nI mean to open Sqlserver management studio.\n", "", "c# ssms"], "94918": ["Templates, polymorphism, abstract base class pointers and run-time casting", "I am wanting to implement a Memento pattern in a game for the purpose of implementing checkpoints. \nI have a list of GameObject pointers in the game. GameObject is an abstract class, which is implemented by classes like StaticObject, AnimatedObject etc...\nI would like to make my Memento class as abstract as possible, so I have templated my entire Memento system.\nmy (very barebones, for debugging purposes) Memento class is;\n\nI would put in logic to differentiate whether T is a pointer or not later.\n_state needs to be a pointer of a copy of the actual GameObject, not just a copy of the pointer itself, as that defeats the purpose of a Memento. \nThe process of what I would like to do inside the Memento template is;\n1) Pass in pointer to abstract base class.\n2) Determine type of child class it is pointing to (at runtime).\n3) Create a new child class on the heap, whose pointer is _state (from type obtained in 2).\n4) Copy data.\nThe problem I am having is 3. There seems to be no way that I can get the proper type of the child class. \ntypeid(*data) and decltype(*data) return references to the children. If I try to use auto it is a reference as well. Obviously I can't use new with a reference as the type.\nThe way around this obviously would be to new the copy of the child class outside of Memento and pass that in. However, I would be interested to know if there is a way of doing it completely in the Template class at runtime. I've been trying to see if I can get it to work for a few hours, and the stubborn part of me does not want to give up.\n", "template<class T>\nclass Memento\n{\npublic:\n Memento() { }\n\n Memento(T data)\n {\n setData(data);\n }\n void setData(T data)\n {\n //wanting this function to do complex behaviour\n }\n\n T _state;\n};\n", "c++ templates casting polymorphism rtti"], "5041899": ["jQueryMobile add click event to a button instead of changing page", "\nI am using the above code which is a jQM button with the onClick() set. The onclick is called and doSomething() is executed but after that, jQM shows the \"error loading page\" message.\nHow can I supress the error? In this case I want the jQM button but don't want it to change page.\nThanks\n", "<p><a href=\"index.html\" data-role=\"button\" data-icon=\"arrow-r\" data-iconpos=\"right\" data-theme=\"a\" onclick=\"doSomething(); return false\">VERIFY</a></p>\n", "javascript jquery jquery-mobile"], "96102": ["Estimate the surface area of a 2D shape where the only known value is the length of the enclosing boundary", "Wondering if it is possible to estimate the surface area of a 2D shape where the only known value is the length of the enclosing boundary, and that it is know the internal surface area is solid. Really have no idea if it's possible, though if it is, what would be the most simple formula that would take the enclosing boundary as an input, and output the 2D shape's surface area?\n", "", "geometry measure-theory surfaces geometric-measure-theory"], "5624939": ["Can I use a method as a lambda?", "I have an interface the defines a group of conditions. it is one of several such interfaces that will live with other models. \nThese conditions will be called by a message queue handler to determine completeness of an alert. All the alert calls will be the same, and so I seek to DRY up the enqueue calls a bit, by abstracting the the conditions into their own methods (i question if methods is the right technique). I think that by doing this I will be able to test each of these conditions.\n\nI've considered alternatives, where each of these methods act like a scope. Down that road, I'm not sure how to have be the source of , , and , which it passes to the block/proc when calling it. \n\nIt was suggested to me (offline) that a scope is a lambda, and so may be a more-suitable solution - as per @BorisStitnicky inference that pliers can be used as a hammer, but should not. I'm open to answers along this line as well.\n", "class Loan\n module AlertTriggers\n def self.included(base)\n base.extend LifecycleScopeEnqueues\n\n # this isn't right\n Loan::AlertTriggers::LifecycleScopeEnqueues.instance_method.each do |cond|\n\n class << self\n def self.cond\n ::AlertHandler.enqueue_alerts(\n {:trigger => Loan.new}, \n cond\n )\n end\n end\n\n end\n end\n end\n\n module LifecycleScopeEnqueues\n def student_awaiting_cosigner \n lambda { |interval, send_limit, excluding|\n excluding ||= ''\n Loan.awaiting_cosigner.\n where('loans.id not in (?)', excluding.map(&:id) ).\n joins(:petitions).\n where('petitions.updated_at > ?', interval.days.ago).\n where('petitions.updated_at <= ?', send_limit.days.ago) \n }\n end\n end\n", "ruby class methods lambda-functions extending"], "4055729": ["computed field to display latest addition to form or view", "I would like to find a way to get the unid of the latest document added to a certain Form(View) from another nsf file (not the current one).\nEDIT\nI made a view with first column , @Created , descending\nThen I tried :\n\nThis gives me an error :\n[TypeError] Error calling method 'GetView(string)' on an object of type 'lotus.domino.local.Database [Static Java Interface Wrapper, lotus.domino.local.Database: lotus.domino.Database]'\nAny idea ?\n", "var db:NotesDatabase = session.getDatabase(\"\", \"product/picture.nsf\");\nif (db == null) {\n return \"Database not open\";\n} else {\n var unid = db.GetView(\"pictures4\").getFirstDocument().getUniversalID();\n return unid;\n}\n", "xpages"], "3558907": ["How can I find out which library is home to a given object?", "I'm programming in FORTRAN and C on an SGI running Irix 6.5, but this should be applicable to all Unix-like systems. How do I find which library I need to link to my program when I get an \"unresolved text symbol\" link error? Here's an example of what I'm seeing from the linker:\n\nDo I just have to know which libraries are required, or is there some tool or command that can help me figure this out?\n", "ld32: ERROR 33 Unresolved text symbol \"ortho2_\" -- first referenced by ./libfoo.a\n", "c unix linker fortran sgi"], "3447564": ["Means on Banach space", "I have a question that requires a little introduction:\nI am dealing with the Banach space $\\ell_\\infty(\\mathbb{Z})$ (all bounded functions $f:\\mathbb{Z} \\rightarrow \\mathbb{C}$) with the supremum norm and I have a definition of a mean on $\\ell_\\infty(\\mathbb{Z})$ that is a linear functional $m \\in\\ell_\\infty(\\mathbb{Z})^*$ such that $m(f)\\ge 0$ for all positive $f$ and $m(1)=1$. Furthermore, a mean is invariant if $m\\circ \\tau_n = m$ for all $n\\in\\mathbb{Z}$ where $\\tau_n:\\ell_\\infty(\\mathbb{Z})\\rightarrow \\ell_\\infty(\\mathbb{Z})$, $\\tau_n(f) = f(k-n)$ for $k\\in\\mathbb{Z}$. I have shown that invariant means do exists and that for an invariant mean, $m$, $m(1_A) = 0$ where $A$ is a finite set. \nWhat I need to show is that $m(1_B)=0$ where $B=\\{n^2\\mid n\\in\\mathbb{N}\\}$. I have been told to look at the set $B_N = \\{n^2\\mid n\\ge N\\}$ for some natural number $N$, and that I should remember that the sets $S_N, S_{N}+1, \\ldots, S_{N} + 2N$ are disjoint.\nI know $m(1_{B\\backslash B_{N}}) = 0$ because $B\\backslash B_N = \\{n^2\\mid n< N\\}$ is a finite set. I also know that $1-1_{B_N}$ is positive and in $\\ell_\\infty(\\mathbb{Z})$, so $m(1-1_{B_n}) \\ge 0$ i.e. $m(1) - m(1_{B_N}) = 1-m(1_{B_N}) \\ge 0$, so $m(1_{B_N}) \\le 1$. But I don't really know where to go from here. I am not sure how to use the hints. Anyone with any ideas?\n", "", "functional-analysis"], "5908430": ["Setting true (offset) width/height of a block element with CSS?", "Setting width/height in CSS only corresponds to the content area. Is there a way to set the offset width/height (i.e. dimensions including padding/margin/borders) of an element in CSS?\nEDIT: Example ->\nI have a number of divs tagged with css class \"smallBox\"\n\nNow I want to set the padding individually on each box, while having the overall outer dimensions stay the same.\n", ".smallBox{\nwidth: 100px;\nheight: 100px;\n}\n", "html css block box-model"], "1622665": ["How can I use MBCS to support a language without codepage?", "An MFC application need an edit ctrl in dialog for edit Tamil language.\nBut I found the Tamil language does not have code page in Windows (Yes, there isn't Tamil system locale), and the Unicode option is not in my situation.\nSaw someone idea, Embedding HWND into external process using SetParent\nI wanna to create another application built with UNICODE option, embed its window to the dialog, but failed.\nCheck the MSDN, SetParent need the parent and child window in one application.\nSo, how can I implement it?\n@MSalters\nI solved it by override virtual BOOL CWinThread::PumpMessage(), force the message loop use W version API.\n\nThen CreateWindowExW(... MSFTEDIT_CLASS ...)\n", "BOOL CtamildlgApp::PumpMessage()\n{\n _AFX_THREAD_STATE *pState = AfxGetThreadState();\n\n if ( !::GetMessageW( &( pState->m_msgCur ), NULL, NULL, NULL ) )\n {\n // Note: prevents calling message loop things in 'ExitInstance'\n // will never be decremented\n return FALSE;\n }\n\n // process this message\n\n if ( pState->m_msgCur.message != WM_KICKIDLE )\n {\n ::TranslateMessage( &( pState->m_msgCur ) );\n ::DispatchMessageW( &( pState->m_msgCur ) );\n }\n\n return TRUE;\n}\n", "mfc locale"], "1763478": ["Generating SiteMap.xml in PHP using third party libraries?", "I don't want to reinvent the wheel. I just need a good PHP crawler i can launch with a cron job, obtaining a file. I know that writing a crawler is an hard task with common pitfalls. Any good library to accomplish this?\n", "SiteMap.xml", "php web-crawler sitemap"], "887690": ["1.2 in SQLite3 Database Is Actually 1.199999998", "I am attempting to store a float in my SQLite3 database using java. When I go to store the number 1.2 in the database, it is actually stored as 1.199999998 & the same occurs for every even number (1.4, 1.6, etc.).\nThis makes is really diffult to delete rows because I delete a row according to its version column(whose type =float). So this line wont work:\n\"DELETE FROM tbl WHERE version=1.2\"\nThats because there is no 1.2 but only 1.19999998. How can I make sure that when I store a float in my SQLite3 DB, that it is the exact number I input?\n", "", "sql sqlite floating-point"], "3435870": ["Maven error on first step in tutorial", "I am following a great looking tutorial at: \nOn step one after copying in the code for the pom.xml, I get 9 errors. Here is the error that shows up on line 1 of my pom.xml:\n\nI can post the other errors if necessary. I tried before this to run some simple pre-made maven projects, I believe they call them archtypes. They had similar errors. I don't understand why this is happening and I can't get some hello world thing to not throw errors immediately.\n", "http://www.objectdb.com/tutorial/jpa/eclipse/spring/project", "eclipse maven m2eclipse pom.xml"], "4889977": ["Backing up data on your Google mail account in Android", "I want to have my application periodically save a zip file to the cloud.\nSince I don't want to set my own cloud solution, I thought of doing something similar to what the application SMS Backup does. It saves your Gmail credentials and when a new sms arrives it saves it to your Gmail under a specified Label and also marks it as read.\nNow, I know how to send email from Java programmaticaly. My question is how to access Gmail only features such as assigning labels to the message and marking it as read. I imagine there must be some facilities built in to Android to allow you to manipulate the GMail account linked to the phone am i right?\n", "", "android gmail"], "2455818": ["Flex and Django for web application - Does it work well together?", "I'm building from scratch a web application that is not trivial (have some algorithms and calculations in the backend) but not too complex (it doesn't have to process lots of records during runtime.)\nWe thought about using Django for the backend in order to be able to develop the application fast with flex based GUI.\nI'm a Java developer with no experience with Django so basically I wanted to know if using Flex and Django together is a good option in terms of ease of development and maintenance? I saw that there are several libraries such as pyAMF and DjangoAMF for this purpose, but since Django is also about html templates and MVC, does flex really work well with django?\nThanks\n", "", "django flex"], "3247873": ["ASP.NET MVC 3: Helper to turn JavaScript link in to embedded / compressed html markup?", "Is there a MVC 3 helper that could compress and include linked JavaScript / CSS in the original HTML sent from the server so the client wouldn't have to go get it as a separate request?\nWe started storing linked images in the cloud while our ASP.NET code is locally hosted. It allows 100 times the requests but subsequent requests take forever. \nWe need the first html request to include everything rather than several call backs to the server. I thought if something existed to identify/compress/dotfuscate JavaScript/CSS in the original HTML sent to the client, it would be much more efficient. It could be cached too.\n", "", "javascript asp.net-mvc-3 html-helper dotfuscator"], "5062615": ["Simulating a MIDI device - Windows", "I need some advice on windows programming, MIDI and WDM. I am trying to write a small application that will sit in the sys tray and be advertised to the system as a MIDI In/Out device so that MIDI programs can send to it and it will convert the messages into a different format. I have been reading Cant's WDM book and scouring for information about writing device drivers, but don't know if I'm going down the right path.\n I don't see yet how to:-\na) register my driver as MIDI capable (do I stick a ref to it in the registery and let the OS direct MIDI calls to the functionality in a dll?)\nb) direct MIDI data through the my driver to my app, which is probably going to be too large to be a driver itself.\nAny advice on where to start would be much appreciated.\nthanks,\nPete\n", "", "windows driver device midi"], "1123438": ["activemq jmx mbeans not visible from remote host", "I got running on remote server. When I connect to it from my dev machine using (for example with ), I see only some of beans (broker , but not of queues, topics, connections etc.), where as from with in server they are all visible. \nHow it could be that some beans not visible from other machines?\n", "activemq", "java activemq jmx"], "3484365": ["Input string compressed as string", "I want to compress/transform a string as new string.\ni.e.:\ninput string:\n\noutput string after compress:\n\noutput string after decompress:\n\nThere are some compress or hash method for this transformation?\nI prefer some solution using Java or an algorithm with basic process steps.\nI already read and try to use Huffman transformation, but the compressed output are composed by bytes outbound UTF-8 charset.\nThank,\nAnd Past\n", "USERNAME/REGISTERID\n", "java string utf-8 compression huffman"], "1780182": ["window.open() firing two requests?", "I have a \n\nweb.xml maps the above URL to a JSP\nFor some reason, the JSP gets loaded twice.\nConfirmed by \n\nAnd sure enough, \"doc ready\" pops up twice.\nInstead of window.open(), if I do a $.mobile.changePage(), it works fine. (\"doc ready\" only once)\nAny ideas?\n", "window.open('<Mapped URL>');\n", "javascript java-ee"], "5168681": ["ServiceMix 4 communicate with external WebService", "Currently, I have a WebService which accepts HTTP Post requests, containing byte array of WAV files. This works completely fine. It then gives back XML results of WAV file metadata. I test this by sending curl commands and looking at the output given back. The question I have is, in my opinion, a very basic ServiceMix question. It's just this one part I'm stuck on. How would I send this curl command to ServiceMix, and have it forward it along to the external WebService? In the future, I will have numerous WebServices, that give different types of data about the WAV file, in different XML formats, and I'll want ServiceMix to handle routing and parsing the results accordingly. Before I can embark on that, I need to figure how the heck to just send a single request through ServiceMix, and to a WebService. Is it a WAR file that sits in ServiceMix deploy? An OSGi bundle? A blueprint.xml file? I truly have no idea, so any help to steer me in the right direction, would be great.\n", "", "web-services esb servicemix"], "107888": ["LINQ EF not saving to database", "I guess this is a continuation of the last question I asked: http://stackoverflow.com/questions/2587542/bulk-insert-and-update-with-ado-net-entity-framework. \nI am not getting any errors while doing inserts yet no data is actually going into my DB. My DB is a SDF file (SQL CE). Any ideas what to check?\nMy app.config looks like:\n\nTIA\n", "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <configSections>\n </configSections>\n <connectionStrings>\n <add name=\"Lab_Use_Billing.Properties.Settings.LabUseConnectionString\" \n connectionString=\"Data Source=|DataDirectory|\\Models\\LabUse.sdf\" \n providerName=\"Microsoft.SqlServerCe.Client.3.5\" />\n <add name=\"LabUseEntities\" \n connectionString=\"metadata=res://*/Models.LabUseEntities.csdl|res://*/Models.LabUseEntities.ssdl|res://*/Models.LabUseEntities.msl;\n provider=System.Data.SqlServerCe.3.5;\n provider connection string="Data Source=|DataDirectory|\\Models\\LabUse.sdf"\" \n providerName=\"System.Data.EntityClient\" />\n </connectionStrings>\n</configuration>\n", "c# entity-framework sql-server-ce"], "3122084": ["ASP NET MVC Area routing/multiple routes issue in VB", "I'm pretty inexperienced with .net and have just started learning MVC. I've hit an issue concerning multiple controllers being found:\n\"Multiple types were found that match the controller named 'reviews'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.\"\nI've recently added a new \"Admin\" area to my app and within that I have a \"ReviewController\". There is also a \"ReviewController\" within the main app folder:\nah - as a new user I can't post an image, but basically I have a \"ReviewController\" in \"Controllers\" and in \"Areas/Admin/Contollers\".\nI have 2 routes set up so far:\nDefault route in Global.asax.vb\n\nArea route in AdminAreaRegistration\n\nAfter reading around the issues I was having, I have added a number of bits of code:\nMy Admin controllers have the right namespace defined \n\nNamespace PowellCasting.Areas.Admin rather than simply PowellCasting. \nI have RegisterAllAreas set in the global\nControllerBuilder.Current.DefaultNamespaces.Add(\"PowellCasting/Controllers\") is in place to specify the default route.\n\nThe specific problem I have now is that when I go to \"/Reviews\" I get the multiple controllers error shown above, specifically:\n*The request for 'reviews' has found the following matching controllers:\nPowellCasting.PowellCasting.Areas.Admin.ReviewsController\nPowellCasting.PowellCasting.ReviewsController*\nI've enabled the route debugger and that only shows one match:\nah - as a new user I can't post an image but it shows:\nAdmin/{controller}/{action}/{id} as FALSE\nand\n{controller}/{action}/{id} as TRUE\nThis is as expected so I don't know why I'm receiving the issue.\nI have read about overloading the maproute method with the namespace, but couldn't find an example in VB (loads in c#). But I tried this:\n\nand \n\nbut without success.\nI'm sure this should be straightforward and I've tried a number of things - it very frustrating. Any help would be really appreciated.\nMy first post on here - Hi! :)\n", " Shared Sub RegisterRoutes(ByVal routes As RouteCollection)\n routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\")\n\n ' MapRoute takes the following parameters, in order: \n ' (1) Route name\n ' (2) URL with parameters\n ' (3) Parameter defaults\n\n routes.MapRoute( _\n \"Default\", _\n \"{controller}/{action}/{id}\", _\n New With {.controller = \"Home\", .action = \"Index\", .id = UrlParameter.Optional}, _\n {\"PowellCasting/Controllers\"}\n )\n\n End Sub\n\n Sub Application_Start()\n\n AreaRegistration.RegisterAllAreas()\n\n System.Data.Entity.Database.SetInitializer(New System.Data.Entity.DropCreateDatabaseIfModelChanges(Of Models.PowellCastingEntites))\n Database.SetInitializer(Of PowellCastingEntites)(New PowellCastingInitializer())\n\n RegisterGlobalFilters(GlobalFilters.Filters)\n RegisterRoutes(RouteTable.Routes)\n\n ControllerBuilder.Current.DefaultNamespaces.Add(\"PowellCasting/Controllers\")\n\n End Sub\n", "asp.net-mvc vb.net routes areas asp.net-mvc-3-areas"], "5180310": ["How to add users to SQL Server 2008 Managment Studio", "I am trying to install DotNetNuke CMS. I created a database in my Microsoft SQL Server Management Studio 2008, which I installed after installing Microsoft Visual Studio 2010. I created a login for it and a password but I am not able to log in. \nIt is giving me SQL login failed 18456. I have tried the post that exist in this site and many different sites but I am not able to log in. Please any help would be great.\nDo I need to update to SQL Server 2008?\n", "", "sql-server login sql-server-express"], "5093666": ["PHP process HTTP headers", "How do I obtain the HTTP headers in response to a POST request I made with PHP?\n", "", "php http http-headers header"], "1866608": ["Unsupported Media Type when deploying OTA Blackberry App", "I have a blackberry app that I am trying to deploy OTA (over the air).\nI have set the MIME type on my server to be:\n\nWhen I access the JAD file on my web-server through the BlackBerry Browser, I get the message\n\nand then a prompt to download the JAD. How can I resolve this?\n", "cod application/vnd.rim.cod\n\njad text/vnd.sun.j2me.app-descriptor\n\njar application/java-archive\n", "deployment blackberry jar blackberry-jde jad"], "2439951": ["How to remove the extra {} when Mapping a function to a list", "Simple question, given a list like this\n\nand suppose I have a function defined like this:\n\nAnd I want to apply this function to the list, so If I type\n\nThis gives\n\nI want it to come out as\n\nso it works.\nWhat is the best way to do this? Assume I can't modify the function foo[] definition (say it is build-in)\nOnly 2 ways I know now are\n\n(too much work), or\n\n(less typing, but need to transpose first)\nQuestion: Any other better ways to do the above? I looked at other Map and its friends, and I could not see a function to do it more directly than what I have.\n", "Clear[a, b, c, d, e, f];\nlst = {{a, b}, {c, d}, {e, f}};\n", "mathematica"], "3993935": ["Given a network flow, are there bounds on the change in weight on nodes?", "Here's my precise situation: I have a graph with nodes $V$ and edges $E$, and the nodes have some non-negative integer weights $w_i$. In one step of the protocol, I am now allowed to move weight around among nodes. This is expressed through a flow $f$ defined on the edges: $f(i,j)$ tells me how much weight I transfer from $i$ to $j$.\n\nThe flow cannot create new weight. \nThe flow must be integer.\n$f(i,j)$ is allowed to be larger than $w_i$, but after the entire flow has been applied all the $w_i$ must be non-negative again.\n\nLet $\\Delta_i$ be the total change in the weight on node $i$, with the sign convention such that $\\Delta_i$ is positive if more tasks leave node $i$ than arrive at $i$. An upper bound on $\\Delta_i$ is $w_i$, by virtue of the third condition on the flow. My question now is: Is there also a lower bound? \nA naive lower bound for each $\\Delta_i$ would be given by the sum of the $\\Delta_j$ for all neighbors of $i$, but I wonder if some network- and graph-theory can find better bounds?\nIf a good lower bound on the $\\Delta_i$ is not possible, maybe there is a good \\emph{upper} bound on the quantity \n$$\\sum_{i \\in V} \\Delta_i^2$$?\n", "", "ds.algorithms graph-theory application-of-theory network-modeling"], "4409304": ["Find the directional derivative of the function at the given point: $g(s,t) = s^2e^t$", "My answer to this problem does not match up with the book:\nFind the directional derivative of the function at the given point in the direction of the vector.\n$$\ng(s,t) = s^2e^t\\\\\nP = (2, 0)\\\\\nv = i + j\\\\\n$$\nThe answer I arrived at:\n$$\n\\nabla{g(s, t) = (2se^t, s^2e^t)}\\\\\n\\nabla{g(P) = (4, 4)}\\\\\nu = \\frac{1}{\\sqrt{2}}i + \\frac{1}{\\sqrt{2}}j\\\\\n\\nabla{g(P)}.u = \\frac{8}{\\sqrt{2}}\n$$\nHowever the book claims the answer as $\\frac{4}{\\sqrt{2}}$\nI cannot find where I went wrong.\n", "", "multivariable-calculus"], "1865874": ["How to calculate first variation of functionals defined on curve", "I wonder if someone can explain to me how one goes about to calculating the first variation of functions defined on curves. For example, if $C$ is a curve in $\\mathbb{R}^3$, and the functional $$F(C) = \\frac{1}{\\min_{x,y,z \\in C}r(x,y,z)}$$\nwhere you can assume whatever is necessary for $r$. How to calculate or go about calculating the first variation?\nSo we want to take the limit, if $\\gamma$ is another curve (but how to define it exactly?),\n$$\\lim_{\\epsilon \\to 0}\\frac{F(C+\\epsilon \\gamma) - F(C)}{\\epsilon}$$\nbut I don't know how to simplify this expression when we write it out..\nThanks\n", "", "analysis differential-geometry"], "5066579": ["MVC Model DisplayFormat for Array type attribute?", "I was wondering if I have a model class like this:\n\nIn my View I use DisplayFor, so it does show all emails, but just as one string.\n\[email protected]@[email protected]\nIs there some kind of DisplayFormat attribute that I can apply to Emails property,\nso that it would display all emails for a single contact, separated by a comma, like this:\[email protected], [email protected], [email protected]\nDont really want to use foreach(var email in Model.Email) in my view for this simple operation.\nThanks.\n", "public class Contact\n{\n public string Name { get; set; }\n public string[] Emails { get; set; }\n}\n", "c# asp.net-mvc dataannotations"], "2474709": ["How to find out the processor model on Mac and Macbooks?", "the \"About This Mac\" won't show, and the \"More Info...\" won't show...\nthis thread talks about system_profiler but it is not on this macbook with Snow Leopard:\nhttp://hintsforums.macworld.com/showthread.php?t=43422\ncan it be found out?\n", "", "mac macbook"], "1811594": ["Hide Repeater columns based on user privileges", "can somebody explain to me how to hide a repeater column based on the user privileges.\nSay I have:\n\nHow would I only display the 'Secret Info' column to logged on users?\n", "<asp:Repeater ID=\"repeater\" runat=\"server>\n <HeaderTemplate>\n <table id=\"table_id\">\n <tr>\n <th>Name</th>\n <th>Secret Info</th>\n <tr>\n </HeaderTemplate>\n <ItemTemplate>\n <tr>\n <td><asp:Label ID=\"Label1\" runat=\"server\" Text='<%# Eval(\"Name\") %>' /></td>\n <td><asp:Label ID=\"Label1\" runat=\"server\" Text='<%# Eval(\"SecretInfo\") %>' /></td>\n <tr>\n <ItemTemplate>\n <AlternatingItemTemplate>\n <tr>\n <td><asp:Label ID=\"Label1\" runat=\"server\" Text='<%# Eval(\"Name\") %>' /></td>\n <td><asp:Label ID=\"Label1\" runat=\"server\" Text='<%# Eval(\"SecretInfo\") %>' /></td>\n <tr>\n <AlternatingItemTemplate>\n <FooterTemplate>\n </table>\n </FooterTemplate>\n</asp:Repeater>\n", "c# asp.net table repeater"], "5965264": ["Add methods to a class with a private constructor?", "There is a class (specifically TypedPipe[T] in com.twitter.scalding) that has only a private constructor, and I wish to add some methods to it. It looks something like this\n\nThis is usually done by defining an implicit conversion method. However, I need access to a to define the method I want to. Is this simply impossible in Scala?\n", "class TypedPipe[+T] private ( a : Int) { \n\n}\n", "scala"], "870079": ["Outlook macro to interrupt a reply-all?", "Is it possible to create an outlook macro such that when a user presses \"Reply to All\", there is a prompt saying something like \"Your message will be sent to the following recipients: x,y,z. Are you sure? Y/N\". The key question here is if there is even a hook available to interrupt the action at all.\nNote that I am not looking to disable it or to buy an add-in.\n", "", "outlook outlook-2010"], "2419859": ["Queues implementation benchmark", "I'm starting development of a series of image processing algorithms, some of them with intensive use of queues. Do you guys know a good benchmark for those data structures?\nTo narrow the scope, I'm using C mostly, but I can use C++, stl and any library.\nI've got a few hits on data structure libraries, such as GLib and C-Generic-Library, and of course the containers of STL. Also, if any of you developed/know a faster queue than those, please advise :)\nAlso, the queue will have lots of enqueues and dequeues operations, so it better have a smart way to manage memory.\n", "", "c image-processing queue benchmarking"], "1804572": ["Break off new document from existing Word revision?", "I have a Word 2010 document that is being shared and revised among several coworkers. At the top of the document is the revision history section and all edits I make cause a strikethrough in the prior text, to show that I've modified it.\nI'd like to break off a copy of the document and make fresh mods to it without the revision strikethroughs. Is it possible to do this?\n", "", "microsoft-word microsoft-word-2010"], "4885727": ["what is the difference between functor and function?", "As it is, what is the difference between functor and function? As far as I know, they look really similar.\nAnd is functor used in set theory? I know that function is used in set theory.\nThanks.\n", "", "functions elementary-set-theory terminology category-theory"], "5134121": ["What is the correct way to check the efficiency of an UPS?", "I have a UPS made by Israeli company - Advice. I read somewhere that every few months, UPS should be checked for operability by disconnecting it from the mains, then plugging mid and high powered devices to it and testing, but for how long exactly is what I don't know.\nI use a desklamp of 25 Watts and an 85 Watts fan, each running for 30 seconds, but the question is, should I test for more than 30 seconds for more precise results?\nAdditionally, I was given a 1 year of warranty on accumulator, but since it is only after 2 years that UPS accumulators start to malfunction, I was wondering if I should ask company to change accumulator before warranty expires to get as much from 1 year warranty as possible?\nUPDATE: Here is a screenshot of options in UPS management software:\n\nAfter power failure, Windows has 300 seconds until hibernated, but why would I need shutdown delay for UPS after laptop entered hibernation state? Why for UPS to work 2 more minutes? \n", "", "power-supply ups warranty"], "5647135": ["Not hitting javascript breakpoints", "PLEASE NOTE THAT I HAVE NOW REBUILT MY MACHINE TO REMOVE THIS BUG, SO I CANNOT ANY LONGER VERIFY ANY ANSWERS.\nI'm experiencing a problem when attempting to debug javascript using Visual Studio 2008. I've recently installed IE9, but that may not be the cause.\nMy javascript is in its own separate (.js) file, but whenever I put a breakpoint on a line, it just becomes hollow and says it will not be hit. Then sure enough, it isn't.\nI've been into the IE internet options>advanced menu and unchecked the following:\n\ndisable script debugging (IE)\ndisable script debugging (Other)\n\nI've also rebooted my PC. But still the breakpoints are not hit.\nEdit: I've just noticed that there are two iexplore.exe entries in the \"attach to process\" window. That's surely not right! But how do I fix it.\n\nUpdate: \nOther things I've now tried:\n\nUninstalling IE9 and using IE8 instead.\nUnchecking \"enable third-party browser extensions\" in IE tools>options menu\n\n", "", "javascript visual-studio-2008 debugging internet-explorer-9 breakpoints"], "2210493": ["c++ vector of strings - issue with pointers", "I'm trying to write a method that gets a vector of strings and returns a pointer to a random element. Can you please tell what is the problem with the following code?\n\nThanks,\nLi\n", "string* getRandomOption(vector<string> currOptions){\n vector<string>::iterator it;\n it=currOptions.begin(); \n string* res;\n\n int nOptions = currOptions.size();\n\n if(nOptions != 1){\n int idx = rand() % (nOptions-1);\n\n while (idx!=0){\n it++;\n idx--;\n };\n\n };\n\n\n res = &(*it);\n};\n", "c++ vector"], "3604733": ["Need to delay touch for 3 finger swipe and not 1 finger swipe", "I'm working to integrate gestures into a drawing app for the iPad. For example I would like a three finger swipe left to undo a drawing step.\nI'm having issues preventing touch data from going to touchesBegan:withEvent: which causes drawing to be made to the screen when performing the gesture.\nIf I use the delayTouchesBegan property, I can prevent the three finger swipe from delivering this touch data. However, it also delays a drawing when the user is trying to draw a line that goes left. This results in the line starting far away from where the user started drawing.\nHow can I make sure that my app delays only a three finger swipe and not a single finger swipe?\n\n", "UISwipeGestureRecognizer *recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];\n\nrecognizer.numberOfTouchesRequired = 3;\nrecognizer.direction = UISwipeGestureRecognizerDirectionLeft;\nrecognizer.delaysTouchesBegan = YES;\n\n[self.view addGestureRecognizer:recognizer];\n", "ios ipad uigesturerecognizer"], "2409473": ["Grabbing JS values from hidden fields on page load", "I'm trying to implement some Google Maps stuff in .NET for a uni project.\nHowever, I'm struggling with getting my coordinates to my .NET Google Maps control.\nI figured the easiest way to do this would be to use the HTML5 geolocation API to get the coordinates of the current position, then grab these in my .NET code and use them to center the map.\nI have the following JS code:\n\nThis puts the coordinates for lat and longitude in their respective hidden textboxes, and .\nNow, I want to grab them in my code-behind .NET code. I'm trying to do it like this:\n\nHowever, this always returns an empty value. I can't seem to load the coordinate values into my .NET code. I get the values when I alert them through JS though. Is this because the Page_Load event happens before my JS gets executed? If so, how would I work around this?\nThanks\n", " $(document).ready(function () {\n if (Modernizr.geolocation) {\n navigator.geolocation.getCurrentPosition(getCoords);\n }\n else {\n // no support\n }\n\n function getCoords(position) {\n $(\"#lat\").val(position.coords.latitude);\n $(\"#long\").val(position.coords.longitude);\n }\n });\n", "c# javascript asp.net .net geolocation"], "1490806": ["Why Isn't dchar the Standard Character Type in D?", "Just browsing the digitalmars.D.learn forum, and D-related question on StackOverflow, it seems to me that a major point of mistakes for a beginner D programmer (me included) is the difference in usage and abilities of char, wchar, dchar, and the associated string types. This leads to problems such as the following:\n\nerror instantiating redBlackTree template\nCannot Slice Take!R from std.range in D?\nstd.algorithm.joiner(string[],string) - why result elements are dchar and not char?\n\nI know it must be for backwards compatibility reasons and familiarity for developers coming from C++ or C, but I think a fairly compelling argument can be made that this possible gain is offset by the problems experienced by those same developers when they try something non-trivial with a char or string and expect it to work as it would in C/C++, only to have it fail in difficult-to-debug ways.\nTo stave off a lot of these problems, I've seen experienced members of the D development community time and time again tell the inexperienced coder to use dchar to avoid such problems, which begs the question of why is a char not a 32-bit unicode character by default, with 8-bit ASCII characters relegated to achar or something similar, to be touched only if necessary?\n", "", "character-encoding character d d2"], "2125637": ["javax.persistence.Entitymanager: remove() method", "Does remove(Object entity) method of EntityManager work only on those objects got from find() method?\nI have following code snippet:\n\nBut it is not removing the particular entry from database.\nWhen I tried something like below:\n\nIt's working fine.\n", "public void deletePerson() {\n EntityManager em = getEntityManager();\n Person p = new Person(\"x\", \"y\", 200);\n em.remove(p);\n}\n", "java jpa persistence"], "832027": ["Java program for Data Processing and Matlab code for results plotting", "I am a beginner in the field of Data Mining. I have a data which i need to process before visualizing any useful results. So I do the following:\n\nPreprocess data using Java Program ( Output : txt files) (Input: FileNames)\nConvert .txt files to .xls files ( Excel file)\nImport excel file in MATLAB\nWrite Matlab Script to draw some plots on the imported data\n\nI wish to automate this process by just pressing run button and then it happens automatically.\nPlease guide me how to integrate my work so instead of doing these 4 steps each time i just provide input file names and all the work is done in one go.\nThanks!\n", "", "java matlab batch-file data-mining matlab-figure"], "4958565": ["Capturing Non-Standard Powershell CmdLet Output for Flow Control", "Currently trying to build a script utilizing cmdlets from the MS released \"Team Foundation Server Power Tools\" package.\nI'm attempting to flow command logic from the success or failure of the \"Update-TfsWorkspace\" cmdlet however I can't seem get a return code out of the call nor can I capture the output using Out-String. I'm using Powershell v1.\n\nYields a message of \"Unable to determine the workspace.\" which is the error I'm trying to catch.\n\nIs expected to give me a $true/$false indicating success/fail but doesn't work.\n\nIs expected to prevent the cmdlet from writing the message but doesn't work.\n\nIs expected to catch an error and write \"fail\" but doesn't work.\n\nIs expected to populate a $msg variable with the host output but doesn't work.\nI'm totally out of ideas here. Help would be appreciated!\n", "update-tfsworkspace \"C:\\doesnotexist\\\" -recurse -version T\n", "version-control tfs powershell"], "5556021": ["ASP .NET with google map api", "i am using google map api with asp .net for making a website, apart from C# which programming languages do i need to learn\n", "", "asp.net api google map"], "73744": ["Upload photo with only publish_actions permission", "I've seen a few apps around that only asked for access for and (not or ). They are able to somehow upload photos, I think without even being approved for User Generated Photos (ie: Instagram). \nHow do these apps do this?\n", "users_photos", "html facebook opengraph facebook-opengraph"], "5716155": ["How to remove all pins Google Maps V3?", "I am currently working on a code where we have a world map. On this map, the users position (you) is marked with a white marker. And there is so called \"drivers\" which drive around on our globe. The drivers position is taken from an API which my friend has written. But now to the problem, when our site here grabs values from all drivers which is shown on the API, it add their position. Then after 3000 ms, it grabs values again. Which means that drivers pins adds again, again and again, over each other. That due to my loop which grabs values from our API every 3000 ms. How could I use the code I got now, and make all drivers pins to be removed 100 ms before values are grabbed from my API?\nDemo: http://profusum.se/bc/map/ (Notice that the pins are getting \"greener\") \njsFiddle: http://goo.gl/8fQS1 (Shorted URL to \"jsFiddle=zMYSw\"\nNOTICE\nMy jsFiddle may not work, if so, please comment and I will update this question. \n", "", "ajax json google-maps google-maps-api-3 google-maps-markers"], "1297638": ["Inject Open XML into an Open PowerPoint Presentation", "I'm looking for a way to inject PresentationML and/or DrawingML into an open PowerPoint 2007/2010 presentation using the Open XML SDK or just . There is an article on doing this with Word, but in that example it is using the routine in Word's object model, which I cannot find an equivalant for in PowerPoint's object model.\nThe reason I'm looking to do this is if I have an item on it that the PowerPoint client does not support editing of but that Open XML does (and as a result, PowerPoint will display it). I want to set this myself via a managed-addin (VSTO) on the open presentation. An example would be the underline of text (not that I'm looking for this, but it is an example) - in PowerPoint, you cannot make the underline of text a picture , but in Open XML you can.\nDoes anyone know how to do this?\n", "System.IO.Packaging", "powerpoint openxml openxml-sdk presentationml drawingml"], "5571654": ["Teaching: How can you motivate students to comment?", "I remember when I was taught, \"comments are the most important part of code.\" Or rather, when I was told that comments are the most important part of the code. I don't think I was convinced, and I still see common cases where programmers are not convinced of the necessity of good & thorough comments. \nI am certainly convinced myself at this point - trying to read, in particular, complex formulae that call functions that call other functions that I don't understand - but I don't know how to convey this to students.\n", "", "teaching comments"], "6009923": ["How to embed additional jQuery plugins into Greasemonkey", "So I've been able to get Greasemonkey and jQuery 1.2.6 to work together without issue, but, now I'm wondering how to embed additional jQuery plugins into my Greasemonkey script, such as Eric Martin's SimpleModal plugin (http://www.ericmmartin.com/projects/simplemodal/).\nThe following code gets jQuery loaded, but I'm not sure how to get SimpleModal loaded properly:\n\nAnyone have any ideas? Thanks.\n", " var GM_JQ = document.createElement('script');\n GM_JQ.src = 'http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js';\n GM_JQ.type = 'text/javascript';\n document.getElementsByTagName('head')[0].appendChild(GM_JQ);\n\n var GM_JQ_SM = document.createElement('script');\n GM_JQ_SM.src = 'http://simplemodal.googlecode.com/files/jquery.simplemodal-1.2.2.min.js';\n GM_JQ_SM.type = 'text/javascript';\n document.getElementsByTagName('head')[0].appendChild(GM_JQ_SM);\n\n // Check if jQuery's loaded\n function GM_wait() {\n if(typeof unsafeWindow.jQuery == 'undefined') { \n window.setTimeout(GM_wait,100); \n }\n else { \n $ = unsafeWindow.jQuery; \n }\n\n }\n GM_wait();\n", "javascript jquery greasemonkey"], "639785": ["Is it possible to reset oracle E-Business suite user password using SQL query?", "i am developing an java application that change oracle E-Business suite user password when ever their password changed in Microsoft Active Directory. is there any sql query available to reset oracle E-Business suite user password.\n", "", "oracle passwords reset"], "658921": ["PHP echo out each record and get total", "I got this PHP code here...\n\n$resultArray is what is returned from my SQL query into an array.\nThe first few records of the balance colunm are..\n389.96\n6433.66\n52.52\n107.25\nhowever when I run this php code I get\n1\n5\n1\n3\nwhy is it doing this and how can I fix it?\nHere is the SQL query if it helps\n\nI did a print_r of $resultArray and got this...\n\n", "$totalBalance = 0;\n foreach($resultArray as $row) {\n foreach($row as $key =>$field) {\n echo $field['remaining'] . \"<br>\";\n }\n }\n", "php sql query for-loop foreach"], "3755802": ["Iterate listview items and modify child views", "\nThis code works if you are clicking on items that are visible on the first start of the , but if you scroll and have, lets say half visible item, throws :\n\nWhat I'm trying to do is, I have a and two buttons. And the user touches one of the items the child views (two buttons) show up, when the user touches another item, buttons on previously selected item disappear.\nWhat I'm doing wrong? Is that \"half-visible\" item (when the list is scrolled) makes the NPE? I also tried starting from \n\nbut it was the same.\n", "listView.setOnItemClickListener(new OnItemClickListener(){\n\n @Override\n public void onItemClick(AdapterView<?> parent, View viewItem, int position, long arg3) {\n\n\n for(int i =parent.getFirstVisiblePosition(); i <parent.getLastVisiblePosition(); i ++)\n {\n Log.i(\"in\", Integer.toString(i));\n View v = parent.getChildAt(i);\n\n ((Button)v.findViewById(R.id.removefav)).setVisibility(View.INVISIBLE);\n ((Button)v.findViewById(R.id.gotherefav)).setVisibility(View.INVISIBLE);\n\n\n }\n viewItem=listView.getChildAt(position);\n ((Button)viewItem.findViewById(R.id.removefav)).setVisibility(View.VISIBLE);\n ((Button)viewItem.findViewById(R.id.gotherefav)).setVisibility(View.VISIBLE);\n TextView text = (TextView)viewItem.findViewById(R.id.item);\n name = text.getText();\n", "android listview parent-child"], "2457483": ["android: Problem using schedule to call an animation", "When my app loads I have it animate a screen in. In the onAnimationEnd I call schedule to have it call a function 2 seconds later that will call an animation to animate the view out again. Currently it animates in, but the scheduler never seems to call the animate out. If I click home, then go back to the app it immediately calls the animate out. Why would, if the schedule is working, the app wait until it loses focus then gets focus back to actually trigger the function the schedule is supposed to call. Here's the code:\nThese are defined in the onCreate:\n\nThese are defined outside the onCreate within the activity class:\n\nSo basically it executes the startAnimation(slideTopIn). Then nothing happens. If i click home, then go back to the app, the startAnimation(slideTopOut) immediately executes. I'm guessing the schedule actually runs but never triggers the animation for some reason.\n", "slideTopIn = AnimationUtils.loadAnimation(this, R.anim.slide_top_in);\nslideTopIn.setAnimationListener(slideTopInListener);\nslideTopOut = AnimationUtils.loadAnimation(this, R.anim.slide_top_out);\nslideTopOut.setAnimationListener(slideTopOutListener);\n\nfreeAlertMsg.startAnimation(slideTopIn);\n", "android animation schedule"], "5605525": ["CAPTCHA checking fail no matter i input correctly", "I am using secureImage which is a simple way to implement captcha,\ni follow the guideline there to add the code, however, the checking is always invalid even i have input the correct value\nIt is the website of that plugin, within ten lines of code:\nAnd this is my code:\nin html form\n\nin verification php\n\nI have checked the post value, that is exactly what i have inputted. I would like to know which data the plugin used to compare with my input, however, i can not do this by echo the $secureimage\nThank you\n", "<img id=\"captcha\" src=\"http://www.phpcaptcha.org/securimage3/securimage_show.php?0.6905195268336684\" alt=\"CAPTCHA Image\">\n\n<input type=\"text\" class=\"required\" name=\"captcha_code\" size=\"10\" maxlength=\"6\">\n", "php captcha"], "2165969": ["Conflicting Jquery calls, cant seem to make one work with the other", "So I have read other peoples posts regarding this issue and still cannot get mine to work no matter how I organize it, so anyway.\nI have essentially a gallery with a slider and a div in which I want to replace content, at the moment only the slider works. Here is what I have in my head\n\nSo the first on is obviously my jquery call and then the next to are for the slider that I did not create but had found online.\nThen in my page I have the following code to call this up, \n\nand then below that I have all my javascript for the ajax call and slider,\n\nI have the ajax switch working in its own file without the slider, but cannot get them both to work, I feel like this has something to do with the 'jQuery.noConflict()' call but cannot figure out how to get around this, when I run it in in the javascript console no errors come up.\nAny help will be greatly appreciated\n", "<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-latest.pack.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery-ui-1.8.13.custom.min.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.thumbnailScroller.js\"></script>\n", "jquery ajax dynamic"], "3607629": ["rtp statistics of poor voice quality", "We are getting very poor quality of voice during testing of a new\nfiltering application of us.\nThe application receives packets from kernel using netfilter_queue\nlibrary. Then insert the packets into a new user managed queue and\ndoes some transformations on it, like concatenation of udp payload.\nThe network is healthy. Its inside our lab. And it does not drop\npackets or anything .\nIn our app we do not forward packet immediately. After enough packet\nreceived to increase rtp packetization time (ptime) the we forward the\nmessage over raw socket and set dscp to be 10 so that this time\npackets can escape iptable rules.\nFrom client side the RTP stream analysis shows nearly every stream as\nproblematic. summery for some streams are given below :\nStream 1:\n\nStream 2:\n\nStream 3:\n\nAny idea where should we look for the problem?\n", "Max delta = 1758.72 ms at packet no. 40506\nMax jitter = 231.07 ms. Mean jitter = 9.27 ms.\nMax skew = -2066.18 ms.\nTotal RTP packets = 468 (expected 468) Lost RTP packets = 0\n(0.00%) Sequence errors = 0\nDuration 23.45 s (-22628 ms clock drift, corresponding to 281 Hz (-96.49%)\n", "c voip wireshark rtp"], "4678841": ["What exactly do h: c: f: and ui: denote in JSF tag library?", "In JSF and Facelets tags, what exactly are these prefixes?\n\nh: \nc:\nf:\nui:\n\nFor example: etc.\n", "h:head", "java jsf java-ee servlets facelets"], "5450407": ["Delphi - Pause all playing sounds to play a specific sound on my app", "How to pause all playing sounds (Windows media palyer or another palyer) to play a specific sound in my application and then return to play the previous paused sound.\nThat is, if you want a sound is being played on a sound player like windows media player, my program pause this sound to play a specific sound, and after finishing the specific sound to play back the sound was paused. Can someone help me?\nMy delphi version is 2010. Thanks.\n", "", "delphi delphi-2010"], "4535462": ["A Haskell hash implementation that does not live in the IO monad", "I am looking for a data structure that works a bit like but that is not encumbered by the IO monad. At the moment, I am using [(key,val)]. I would like a structure that is O(log n) where n is the number of key value pairs. \nThe structure gets built infrequently compared to how often it must be read, and when it is built, I have all the key value pairs available at the same time. The keys are s if that makes a difference.\nIt would also be nice to know at what size it is worth moving away from [(key,val)].\n", "Data.HashTable", "data-structures haskell hashtable"], "2746152": ["XML Parse of Httppost cannot be resolve variable", "I am android beginner i have parsed title,link,pubdate But i want to know how to show image & video in next screen when user click on related description.and in httppost i am no getting url where i am wrong please suggest as soon as possible.\npublic String getXmlFromUrl(String url) {\n String xml = null;\n\n", " try {\n // defaultHttpClient\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpost = new HttpPost(url);\n //HttpPost httpPost = new HttpPost(url);\n HttpResponse httpResponse = httpClient.execute(httpost);\n //HttpResponse httpResponse = httpClient.execute(httpPost);\n HttpEntity httpEntity = httpResponse.getEntity();\n xml = EntityUtils.toString(httpEntity);\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // return XML\n return xml;\n}\n", "android android-intent android-widget"], "4147516": ["Is there a way to automate a series of SQL processing scripts?", "Assume I know or am able to learn any adjacent technology/language--what's the best way to go about automating a number of processing/summary SQL scripts?\nI have a number of scripts, clean-up (eg, update, delete), processing (eg, joins) and summaries post-processing, that I wrote last month but would like to automate. What's the preferred method(s) of automating the entire process as a series of sequential scripts? \nEDIT: All of this is run on MySQL dbs.\n", "", "sql mysql automation"], "606260": ["Multiplying decimals and integers ruby on rails", "Seems pretty simple, but then nothing is. \nI have two values: \n\nI want to multiply quantity by unit_price in an each (invoice) loop:\n\nThis causes the following error:\n\nDo I have to convert the values first or is there something trivial I'm missing?\nThanks\n", "t.integer \"quantity\"\nt.decimal \"unit_price\", :precision => 7, :scale => 2\n", "ruby-on-rails ruby"], "624832": ["portable virtualbox not being able to detect wireless interface", "I want to ask if anyone knows why portable virtualbox not being able to detect wireless interface.Meaning I'm not able to search for wireless connection.In terminal,after typing iwconfig and ifconfig there's no wlan.\n", "", "virtual portability wireless"], "2905282": ["How to activate application background in Photoshop CS5 on the mac?", "I am used to Photoshop CS5 on Windows where the program has a gray background. I don't see my desktop when the program is open. On the Mac t hough, Photoshop is transparent and always fullscreen. I see the desktop icons and I find this very annoying. Also, I can't attach a canvas window to the application like I can do in Photoshop on Windows.\nCan I activate an application background on in Photoshop in the Mac which will cover my desktop the way every application does when it is opened up fullscreen?\n", "", "osx adobe-photoshop"], "4867176": ["Form with dynamic id & name fields", "I have a form that looks like this :\ncat1 [int field]\ncat2 [int field]\ncat3 [int field] \nThe fact is that my categories are different each time.\nHow do i Handle this in my handler ?\nDont know how i should set my getter/setter\nHeres my jsp : \n\nI dont know what to put in my handler to get the input name = <%= itCategory.getId() %>\n", " <jsp:useBean id=\"formHandler\" scope=\"page\" class=\"com.pipo.EditStatusMappingHandler\"><%--\n--%><jsp:setProperty name=\"formHandler\" property=\"*\" /><%--\n--%></jsp:useBean>\n\n<form action=\"jsp/form/mapStatus.jsp\" method=\"POST\" name='categoryForm'> \n <ul>\n <foreach collection=\"<%= categorySet %>\" type=\"Category\" name=\"itCategory\" >\n <li>\n <label for=\"<%= itCategory.getId() %>\"><%= itCategory.getName(userLang) %></label>\n <input type=\"text\" name=\"<%= itCategory.getId() %>\" id=\"<%= itCategory.getId() %>\"/> \n </li>\n </foreach>\n </ul>\n <div class=\"modal-buttons buttons\">\n <input style=\"text-align:right;\" class='formButton mainButton' type=\"submit\"/>\n </form>\n", "java html handler"], "5556194": ["MvcScaffolding NuGet installation: \"An item with the same key has already been added\"", "I'm getting an error when installing MvcScaffolding through NuGet. Has anyone got any suggestions for how to fix the problem?\n\nI've tried uninstalling the re-installing using this command:\n\n", "PM> install-Package MvcScaffolding -Verbose\nDependency 'T4Scaffolding (\u2265 1.0.0)' already installed.\nDependency 'EntityFramework (\u2265 4.1.10311.0)' already installed.\nAdded file 'InstallationDummyFile.txt' to folder 'MvcScaffolding.1.0.0\\content'.\nAdded file 'Action.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'Action.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'ActionPost.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'ActionPost.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'MvcScaffolding.Action.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'ViewModel.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'ViewModel.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Action'.\nAdded file 'MvcScaffolding.ActionUnitTest.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\ActionUnitTest'.\nAdded file 'TestClass.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\ActionUnitTest'.\nAdded file 'TestClass.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\ActionUnitTest'.\nAdded file 'TestMethod.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\ActionUnitTest'.\nAdded file 'TestMethod.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\ActionUnitTest'.\nAdded file 'MvcScaffolding.ActionWithUnitTest.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\ActionWithUnitTest'.\nAdded file 'Create.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Create.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'CreateOrEdit.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'CreateOrEdit.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Delete.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Delete.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Details.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Details.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Edit.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Edit.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Empty.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Empty.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Index.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'Index.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'MvcScaffolding.AspxView.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\AspxView'.\nAdded file 'ControllerWithContext.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'ControllerWithContext.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'ControllerWithRepository.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'ControllerWithRepository.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'MvcScaffolding.Controller.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'MvcScaffolding.ControllerWithRepository.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\Controller'.\nAdded file 'init.ps1' to folder 'MvcScaffolding.1.0.0\\tools'.\nAdded file 'install.ps1' to folder 'MvcScaffolding.1.0.0\\tools'.\nAdded file 'Create.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Create.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Delete.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Delete.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Details.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Details.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Edit.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Edit.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Empty.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Empty.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Index.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'Index.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'MvcScaffolding.RazorView.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file '_CreateOrEdit.cs.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file '_CreateOrEdit.vb.t4' to folder 'MvcScaffolding.1.0.0\\tools\\RazorView'.\nAdded file 'registerWithMvcTooling.ps1' to folder 'MvcScaffolding.1.0.0\\tools'.\nAdded file 'MvcScaffolding.Views.ps1' to folder 'MvcScaffolding.1.0.0\\tools\\Views'.\nAdded file 'MvcScaffolding.1.0.0.nupkg' to folder 'MvcScaffolding.1.0.0'.\nSuccessfully installed 'MvcScaffolding 1.0.0'.\nExecuting script file 'C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\init.ps1'.\nAdded file 'InstallationDummyFile.txt'.\nAdded file 'InstallationDummyFile.txt' to project 'ReinsuranceManagementWebUI'\nAdded file 'packages.config'.\nAdded file 'packages.config' to project 'ReinsuranceManagementWebUI'\nSuccessfully added 'MvcScaffolding 1.0.0' to ReinsuranceManagementWebUI.\nExecuting script file 'C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1'.\nGet-ProjectItem : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:22 char:16\n+ Get-ProjectItem <<<< \"InstallationDummyFile.txt\" -Project $projectName | %{ $_.Delete() }\n + CategoryInfo : NotSpecified: (:) [Get-ProjectItem], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.GetProjectItemCmdlet\n\nSet-DefaultScaffolder : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:24 char:22\n+ Set-DefaultScaffolder <<<< -Name Controller -Scaffolder MvcScaffolding.Controller -SolutionWide -DoNotOverwriteExistingSetting\n + CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet\n\nSet-DefaultScaffolder : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:25 char:22\n+ Set-DefaultScaffolder <<<< -Name Views -Scaffolder MvcScaffolding.Views -SolutionWide -DoNotOverwriteExistingSetting\n + CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet\n\nSet-DefaultScaffolder : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:26 char:22\n+ Set-DefaultScaffolder <<<< -Name Action -Scaffolder MvcScaffolding.Action -SolutionWide -DoNotOverwriteExistingSetting\n + CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet\n\nSet-DefaultScaffolder : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:27 char:22\n+ Set-DefaultScaffolder <<<< -Name UnitTest -Scaffolder MvcScaffolding.ActionUnitTest -SolutionWide -DoNotOverwriteExistingSetting\n + CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet\n\nSet-DefaultScaffolder : An item with the same key has already been added.\nAt C:\\MyProject\\packages\\MvcScaffolding.1.0.0\\tools\\install.ps1:31 char:22\n+ Set-DefaultScaffolder <<<< -Name View -Scaffolder $viewScaffolder -SolutionWide -DoNotOverwriteExistingSetting\n + CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], ArgumentException\n + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet\n", "asp.net-mvc-3 nuget mvcscaffolding"], "5524298": ["Stop CABasicAnimation from being removed after completion", "Hey, I have this code snippet (duration is .5, amount is 1.5)\n\nHowever when this is played, the UIView grows properly, but then snaps back to its starting value. I thought the \"removedOnCompletion\" was supposed to prevent this?\n", "CABasicAnimation *grow = [CABasicAnimation animationWithKeyPath:@\"transform\"];\ngrow.duration = duration;\ngrow.repeatCount = 0;\ngrow.removedOnCompletion = NO;\ngrow.autoreverses = NO;\ngrow.fromValue = [NSValue valueWithCATransform3D:CATransform3DScale(self.layer.transform, 1.0, 1.0, 1.0)];\ngrow.toValue = [NSValue valueWithCATransform3D:CATransform3DScale(self.layer.transform, amount, amount, amount)];\ngrow.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];\n[self.layer addAnimation:grow forKey:@\"grow\"];\n", "iphone calayer caanimation cabasicanimation"], "4034097": ["Forward External Requests to Virtual Machine", "I have an Ubuntu Server virtual machine running apache installed on Fedora. How can I forward external web requests to my virtual server? \nSo I have my host (fedora) running on 142.204.142.182\nI have my virtual machine (ubuntu) running on 192.168.100.136\nHow can i make it so when someone requests 142.204.142.182 on a separate computer (from their web browser), my host forwards the request to the virtual machine and therefore pages are served from the VM. \n", "", "fedora virtual-machines forwarding"], "3930148": ["Vim: How to indent html code correctly in php file?", "In php file :\n\nI could not indent the html source code with operator .\nHow could I indent it?\n", "<?php\n...\n?>\n<html>\n\n</html>\n", "vim php html editor"], "5550213": ["getimagedata not working in firefox", "I got a problem with the HTML5 element getImageData()\nI'm using wScratchPad for a scratch tool on a website and using the percentage function in wScratchPad to determine when to remove the overlay. It's working fine on IE9, Safari & Chrome. But it throws a SECURITY ERROR in Firefox.\nI had the same problem in Chrome and IE9 too but fixed it by moving the JS, Images and HTML to the same server.\nI know it throws an error if the domain of the JS and Canvas Image is not on the same domain so I checked the document.domain of both the image and the js. It looks like the JS as the 'document.domain = domain.com' and the image has document.domain = www.domain.com.\nCould that be the problem? If so how can I fix it?\nI already saw a way to override the browser to get a alert for the user confirmation of the script but seeing as this is a high profile website this is out of the question.\nBelow the code in wScratchPad which causes the error:\n\n", "scratchPercentage: function($this)\n{\n var hits = 0;\n var imageData = $this.ctx.getImageData(0,0,$this.canvas.width,$this.canvas.height)\n\n for(var i=0, ii=imageData.data.length; i<ii; i=i+4)\n {\n if(imageData.data[i] == 0 && imageData.data[i+1] == 0 && imageData.data[i+2] == 0 && imageData.data[i+3] == 0) hits++;\n }\n\n return (hits / $this.pixels) * 100;\n},\n", "javascript jquery html5 firefox canvas"], "2804759": ["Why does Google use base64 encoded data as image src attributes?", "All times in my life, I save images on my server as files: \n\nthe originals\nthe thumbnails\nthe original with watermarks\n\n... all as files in folders.\nBut today, I'm viewing google images, and the src of images is a base64 encoded hash. What benefit does Google get from serving images in this manner? Why would someone do that instead of just serving images conventionally?\n", "", "image base64"], "5301983": ["Uploadify Script is not working when inside kohana controller", "Hello I am trying to implement the uploadify script in kohana 2.3.4, it works when i place the uploadify script on the root directory then point it out on my view file. But when I point the script to a controllr, it returns a http error. Below is the js script: \n\n", " <script type=\"text/javascript\">\n// <![CDATA[\n$(document).ready(function() {\n$('#file_upload').uploadify({\n'uploader' : '<?=url::base()?>uploadify/uploadify.swf',\n'script' : '<?=url::base()?>uploadify', /*Even tried http://localhost/directory/uploadify*/\n'cancelImg' : '<?=url::base()?>uploadify/cancel.png',\n'folder' : '<?=url::base().$directory?>',\n'multi' : true,\n'removeCompleted' : false,\n'auto' : true\n });\n });\n // ]]>\n</script>\n", "kohana uploadify"], "873570": ["Key window doesn't rotate", "I have a UIViewTable with navigation bar. When I read data I display UIViewController with ActivityIndicator on top of the table. The problem is when I rotate device this top view is not rotating, I don't know why? :(\nThis is how I add top view with ActivityIndicator:\n\nThis is how I remove it:\n\nThis is method from top view (with ActivityIndicator):\n\n", "UIView *view = [[UIApplication sharedApplication] keyWindow];\n[view addSubview:viewWithLoader.view];\n", "iphone objective-c rotation orientation uitableviewcontroller"], "292208": ["One to Many Mapping in Fluent NHibernate with Composite Ids", "I'm having problems with one to many mapping with composite key on both sides.\nHere is what I have so far:\n\nHere is database structure:\n\nI know it is not correct and I'm now out of ideas what is wrong as I have started learning NHibernate like few hours ago. Can somebody point me out what is wrong in my code ?\n", "public class OneSide\n{\n public virtual int A { get; set; }//-A,B,C,D together form primary key\n public virtual int B { get; set; }\n public virtual int C { get; set; }\n public virtual int D { get; set; }\n public virtual int OtherData { get; set; }\n public virtual IList<ManySide> Ls { get; set; }\n}\n\npublic class OneSideMap : ClassMap<OneSide>\n{\n public OneSideMap()\n {\n LazyLoad();\n\n CompositeId().KeyProperty(x => x.A).KeyProperty(x => x.B).KeyProperty(x => x.C).KeyProperty(x => x.D);\n\n Map(x => x.OtherData).Not.Nullable();\n HasMany(x => x.Ls).KeyColumns.Add(\"A\", \"B\", \"C\", \"D\").Inverse().Cascade.All();\n }\n}\n\npublic class ManySide\n{\n public virtual OneSide OneSide { get; set; }\n public virtual int A { get; set; }//-A,B,C,D,E together form primary key\n public virtual int B { get; set; }\n public virtual int C { get; set; }\n public virtual int D { get; set; }\n public virtual int E { get; set; }\n public virtual int OtherData2 { get; set; }\n}\n\npublic class ManySideMap : ClassMap<ManySide>\n{\n public ManySideMap()\n {\n LazyLoad();\n\n CompositeId().KeyReference(x => x.A).KeyReference(x => x.B).KeyReference(x => x.C).KeyReference(x => x.D).KeyProperty(x => x.E);\n\n Map(x => x.OtherData2).Not.Nullable();\n References(x => x.OneSide).Columns(\"A\", \"B\", \"C\", \"D\").Cascade.All();\n }\n}\n", "c# fluent-nhibernate nhibernate-mapping composite-key"], "4758541": ["Including boost libraries in make files", "I'm learning Boost and am having trouble with my makes files.\nHere is my basic makefile:\n\nWhen acctime.cpp has no boost filesystem elements in it this m,ake file works fine.\nAs soon as I add boost filesystem elements I obviously need to make references to the boost libray in the make file this is where I am having issues.\nThe following line works for a single file compilation:\n\nNow I'm trying to integrate this into the make file. I've tried many based on what information I can find on the web but none are working this is my latest:\n\nUnfortunately it stlill can't find the Boost libraries, can anyone help?\nthanks\nHaving read the advice of the people who've answered I've now got this:\n\nBut this still fails to link.\nThis is the error message I'm getting:\n\nFollowing orsogufo's advice (thanks! much appreciated) now have this:\n\nLooking better, but still can't quite find the library:\n\nI've double checked that location and the library is definately at:\n/usr/local/boost/boost_1_39_0/stage/lib/libboost_filesystem-gcc41-mt.a \nSTill no joy, usimg this now:\n\nGetting:\n\nIt's working with this:\n\nThanks for all your help\n", "accesstimer: acctime.o btimer.o\n g++ acctime.o btimer.o -o accesstimer\n\nacctime.o: acctime.cpp btimer.h\n g++ -c acctime.cpp \n\nbentimer.o: btimer.cpp btimer.h\n g++ -c btimer.cpp \n", "boost makefile linker"], "4190522": ["Help refactoring CSS", "Okey, guys I have following code:\n\nI want to achieve (as I tried here) using only one line for diffrent classes on in div \"adminmenu\".\nHow to rewrite this?\nCode written above is working only for first class #adminmenu li.hideshow-news, whether other following statments don't.\nDo I really need to do:\n\nThanks for help!\n", "#adminmenu li.hideshow-news, li.hideshow-users, li.hideshow-pages, li.hideshow-gallery, li.hideshow-references, li.hideshow-settings {\ndisplay: none;\nfont-size: 11px;\nbackground: #fff;\npadding: 3px; }\n", "html css rewrite"], "1792220": ["I Need to write the resulting array to a variable which is anytype and unbounded in BPEL using Java Embedded", "I need to call a Stored Procedure running in DB2.Since the Oracle DB Adapter Doesnt support DB2 , I have used Java Embedding to call the Stored Procedure . I Dont have a problem in Calling the Stored procedure using Java Embedding and getting the result Set.The problem starts when is start assinging the result set to the output variable .I use the below snipped to set the variable.\n\nIn the above mentioned Code I expect to display all the empname,number and salary details of all the employees to be assigned to output variable temp .But the output i see is only the last employee details .The remainin employee details are not shown .If i replace the variable j with either 1 or 2 or 3 etc i get the output of only that array element details whereas other details are not known .Can someone help me in getting the whole result set to a output variable .\n", "rset=statement.executeQuery(\"SELECT name, number, salary from Employee\");\nrset = statement.getResultSet();\nint j=1;\n if (rset != null)\n{\nwhile(rset.next())\n{\n name=rset.getString(\"name\");\n name=rset.getString(\"number\");\n name=rset.getString(\"salary\");\n setVariableData(\"temp\",\"payload\",\"/ns1:code1[\"+j+\"]/ns1:empname\",name); \n setVariableData(\"temp\",\"payload\",\"/ns1:code1[\"+j+\"]/ns1:empno\",number);\n setVariableData(\"temp\",\"payload\",\"/ns1:code1[\"+j+\"]/ns1:salary\",salary); \n j=j+1;\n}\n}\n", "java arrays soa bpel oracle-soa"], "655294": ["How to computer log base 2 using bitwise operators?", "I need to compute the log base 2 of a number in C but I cannot use the math library. The answer doesn't need to be exact, just to the closest int. I've thought about it and I know I could just use a while loop and keep dividing the number by 2 until it is < 2, and keep count of the iterations, but is this possible using bitwise operators?\n", "", "c logging bitwise operator-keyword"], "1852229": ["Upfront payment before accessing the form", "I wondered if someone could give me some clues or directions how to do the following feature: \nI've got a webpage with a form which a customer has to fill in.\nBefore a customer can assess the form I want him/her to make a payment of 99p as administration fee. I want to use PayPal to collect the payments. \nHow can I do it, so that once a customer makes a payment he/she will be automatically re-directed to the webpage with the form? (Does PayPal have a feature of this sort that I don't know about?)\nThank you :)\n", "", "forms paypal payment"], "4671981": ["UIAlertView shown on Home Screen", "I am aware of Apple Push Notification Service. I want to have a similar feature on my app but without the need of a server. Is there a way to have alert views pop up without the app being currently used? I want to have uialertviews shown over all other processes. There is no need for a server for this purpose because the message is not user specific. Thanks\n", "", "objective-c ios uialertview homescreen"], "5037811": ["How can I filter and copy data in Excel?", "I have a lot of data in an excel worksheet. For calculations, I would like to restrict this data to the relevant data only. That is: filter the data and put the subset in another worksheet.\nRelevant data is data that falls within a given minimum and maximum value.\nFor example:\nSuppose I want to filter column A for values between 1 and 2, and column B for values between 0 and 1. Result should become like this.\n\nIs there an easy solution for this?\nThe fact that I don't filter on exact matches apparently makes the problem more difficult.\nThanks in advance!\n", " A B C = Data\n1 0 0 0\n2 1 1 0\n3 2 0 3\n4 2 2 1\n\n A B C = Result\n1 1 1 0\n2 2 0 3\n", "excel filter"], "3310054": ["what are function pointers", "\nPossible Duplicate:\nWhat is the point of function pointers? \n\ncan anyone explain what function pointers are and why they are needed in layman terms. In c context please?\n", "", "c function-pointers"], "1272889": ["Escape the ] character", "\nPossible Duplicate:\nEnumerated list with square brackets \n\nUsing the help of this answer, I am trying to create a list in which each item is numbered by , , etc.\n\nHowever, because the character signifies the end of the , I'm getting lots of errors.\nIs there a way to \"escape\" the character so that this does not happen? Or is there a better way to make this list in the first place?\n", "[1]", "lists enumerate enumitem"], "660714": ["Writing Windows C++ server as service or console application", "This requires discussion for best practices related to server development using C++ on Windows 7 32-bit\nThe typical requirements:\n\nA program that acts like a \"server\", running in Windows in the background. It should run for days, should run automatically at each start.\nServer Handles incoming client connections via TCP socket protocol from other devices (PC,Smartphone,tablets)\nServer in-turn communicating with large number of embedded devices connected in same network via TCP and serial communications\nServer acting as bridge b/w clients (PC, smartphone, tablets) and embedded devices\n\nThe server admin can configure server through the configuration .ini file and then can start server.\nThe interface to the client end is TCP socket interface, client will send command and server inturn will reply with buffer (xml)\nMy questions:\n\nShould I write the program as a \"service\", like http://code.msdn.microsoft.com/windowsdesktop/CppWindowsService-cacf4948\nOr should i write a console application and control this executable from XYNTService http://mysite.verizon.net/XiangYangL/XYNTService.htm so that it acts like a service\nOr a console application , with it's entry in registry for starting at login, restart\n\nDoes this actually matter, which option to choose from above ? \nMany Thanks in advance.\n", "", "c++ windows windows-services client-server console-application"], "4936613": ["How to scroll 2 GridViews in a Linear Layout together?", "I have two gridviews in a linear layout. Here is my XML code:\n\nHow to make these two grid views scroll together or synchronize them ? They have two seperate scrolls when i run my application.\nThanks,\n", "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\" \n android:gravity=\"center\"\n android:orientation=\"horizontal\" >\n\n <GridView\n android:id=\"@+id/leftGrid2\"\n android:layout_width=\"416dp\"\n android:layout_height=\"1078dp\"\n android:columnWidth=\"70dp\"\n android:horizontalSpacing=\"5dp\"\n android:numColumns=\"2\"\n android:paddingRight=\"20dp\"\n android:stretchMode=\"columnWidth\"\n android:verticalSpacing=\"5dp\" >\n\n </GridView>\n\n <GridView\n android:id=\"@+id/rightGrid2\"\n android:layout_width=\"400dp\"\n android:layout_height=\"match_parent\"\n android:columnWidth=\"70dp\"\n android:horizontalSpacing=\"5dp\"\n android:numColumns=\"2\"\n android:stretchMode=\"columnWidth\"\n android:verticalSpacing=\"5dp\" >\n\n </GridView>\n </LinearLayout>\n", "android android-layout gridview scroll"], "5950476": ["How to include Jquery in the background script (not the content script) for my Firefox Jetpack Addon?", "I'm working on porting a Chrome extension over to Firefox. In the Chrome extension, the background script includes JQuery, which is used for AJAX throughout the background scripts.\nWith the Firefox Jetpack SDK, it looks like i can do:\n\nbut this only works if modulename is a firefox extension module, including the code:\n\nin order to make the module functionality available elsewhere. Obviously JQuery isn't set up as a module like this, so there's no way to require it.\nIs there some way to include JQuery in my lib/main.js file in the background of my Firefox addon, such that I get access to JQuery in my main() function?\n", "require(\"modulename\")\n", "jquery firefox-addon firefox-addon-sdk"], "3529128": ["Penetration testers say that the .ASPXAUTH cookie is insecure and is displaying session data?", "I thought the .ASPXAUTH was for user authentication? Can anyone confirm if this cookie is indeed a security risk and/or contains session information? Is it even suppose to be used or is it some debug thing?\n", "", "asp.net cookies penetration-testing .aspxauth"], "3504112": ["tocloft conditional spacing", "This is my first question on stackexchange!\nI am using the tocloft package for my thesis and my university requires doublespacing before and after the chapter titles in the ToC, but only if the chapter has sections.\nI am thinking that I will require some way to detect if the chapter has sections, or add a newline before the first section in each chapter. Can somebody suggest a way to achieve this?\n", "", "spacing table-of-contents chapters tocloft"], "2226154": ["Logging JavaScript-Errors on Server", "Im running a ASP.NET Site where I have problems to find some JavaScript-Errors just with manual testing.\nIs there a possibility to catch all JavaScript-Errors on the Client Side and log them on the Server i.e. in the EventLog (via Webservice or something like that)?\nThanks for your answers!\n", "", "asp.net javascript error-handling"], "1071659": ["Rename installed .deb with dpkg", "Is there a way to rename an installed package with ?\nContext: I have installed a library compiled for debug using checkinstall, now I wish to install the library compiled for release, for the release version I renamed the package and I would like to rename the debug package (currently know to dpkg as ) to .\n", ".deb", "ubuntu dpkg package-management"], "78526": ["How to reuse a sub-query result in a SELECT more than once", "Example:\n\nSure this is invalid (at least in Postgres) but how to achieve the same in a query without rewriting the sub-query twice?\n", "SELECT\n (SELECT SUM(...) FROM ...) as turnover,\n (SELECT SUM(...) FROM ...) as cost,\n turnover - cost as profit\n", "sql postgresql select subquery result"], "4767743": ["What is the best locking version control system?", "I am looking to implement a source version control system at my office. We develop mobile apps and therefore have a large variety of different projects that need to be controlled. I also do not want a system that merges. This in my experience causes too many headaches and as such I want a locking system whereby only one person can work on a file at the same time. What can people recommend? I'm leaning towards VisualSVN and TortoiseSVN on Windows but I'm not sure if it can be set to only locking and not merge.\n", "", "svn version-control merge locking"], "2738749": ["Windows Mobile - Emulator Error", "I'm getting the error below when trying to use the Windows Mobile 6 emulators please advise how I can fix:\n\nMicrosoft Visual Studio\nThe operation could not be completed \nOK \nUsing Windows 7, VS.Net 2008, WinMobile 6 Pro SDK\n", "", ".net compact-framework"], "1054355": ["Call alternative method in class using postsharp", "I want to be able to call a differnt method on my intercepted class by using .\nSay I have the following method in my aspect:\n\nThe is another method within the class that has been intercepted. I can do some reflection magic to get the name of what I want to be called, but I can't work out how to call that method on this instance of the class. I don't want to spin up a new instance of the class\nAny suggestions?\n", "PostSharp", "c# aop postsharp"], "3505831": ["jquery selector can't read from hidden field", "(answers aggregated into another question)\nThe following jquery 1.3.2 code works:\n\nConsole shows:\n\n[input#ixd 236434] \n[input#ixd 236434]\n\nHowever setting the input to \"hidden\" prevents the selectors working. Any clues?\n\nConsole shows:\n\n[]\n[]\n\n", "<input type=\"select\" value=\"236434\" id=\"ixd\" name='ixd' />\n\n<script>\nconsole.log( $('#ixd') );\nconsole.log( $(\"input[name='ixd']\") );\n</script>\n", "jquery forms selectors element hidden"], "4752453": ["Running a shell command to copy files from Android App", "i'm trying to get an app started so I can backup my apps to sdcard. I ran:\n\nWhen it runs I can grant super user then it says it's done but there is no file is not copied. I'm just using the eBay app as an example and test.\nThanks for any help.\nFix: thanks for the help below but i found a full fix and kinda different way of doing things here \"http://stackoverflow.com/questions/10735273/copy-folders-in-data-data-to-sdcard-viceversa?rq=1\"\n", " Process p = Runtime.getRuntime().exec(\"su\");\n Process c = Runtime.getRuntime().exec(\n \"cp /data/app/com.ebay.mobile-1.apk\"\n + Environment.getExternalStorageDirectory()\n + \"/ebay.apk\");\n Log.d(\"copy\", \"done\");\n", "android shell process command superuser"], "4040729": ["Are there equivalents to \"this\" for static variables in c#", "I was wondering if I can make my code clearer by indicating one variable is a static class variable. If it wasn't static I could use this.variableName, and everyone would look at it and immediately know that.\nI know I could adopt a naming convention like s_variableName, but that seems a little odd to me and increases the learning curve of the code.\nIs there an equivalent of \"this\" for static variables?\n", "", "c# static this"], "5081955": ["Jquery mention input : add tag on click of a link", "So i'm using this plugin https://github.com/podio/jquery-mentions-input for my comment system, everything works fine but I would like to add a function. This function would be that when I click on a link (Reply) it would add a mention/tag of the users name in the textarea at the position where the cursor is.\nDoes any one have an idea how to do this ?\nI was able to add a mention once I had already added one tag (writing the @ character). I figured out that there was an issue with the initialization of the textarea and the position of the cursor at the time when the link is clicked, but I cannot seem to figure out how to make that work.\nI added a addReply function to my the jquery file.\n\nAnd it is called with this little script that is on the same page as the textarea (values are just for testing)\n\nAfter testing around, the big problem looks like that without the @ the jquery code doesn't find where the beginning of the tag will start and therefor doesn't add it.\nI hope that someone can help me on this, it is starting to drive me crazy !!!\nThanks\nJoris\n", "// Public methods\nreturn {\n init : function (options) {\n settings = options;\n\n initTextarea();\n initAutocomplete();\n initMentionsOverlay();\n },\n\n val : function (callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n\n var value = mentionsCollection.length ? elmInputBox.data('messageText') : getInputBoxValue();\n callback.call(this, value);\n },\n\n addReply : function (id, text, type) {\n initTextarea();\n initAutocomplete();\n initMentionsOverlay();\n addMention(text, id, type);\n },\n\n reset : function () {\n elmInputBox.val('');\n mentionsCollection = [];\n updateValues();\n },\n\n getMentions : function (callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n\n callback.call(this, mentionsCollection);\n }\n};\n", "jquery input autocomplete tagging commenting"], "2748049": ["How do I change the title and link colors of a Google Custom Search Element?", "The situation:\nTake a look at this page and search \"photo\" on both:\nhttp://dev.womenandlogistics.com/testsearchengine.html\nThe top search engine refreshes the page and displays results with orange link titles and blue links. The bottom search engine displays tabbed results with blue link titles and blue links.\nI found an answer to this on the Google forums; however, I am inexperienced with AJAX so I have no idea what to do this answer. I've read through various Google documentations on custom search engines and web elements regarding this, but I still can't figure it out.\nWhat I've tried so far...\n\nAdded a class in the section (class=\"gsc-result gsc-webResult\") and added the corresponding CSS (#gsc-result gsc-webResult) on the page to see if that works, but it didn't.\nViewed the context XML file to see if I can make changes. This only affects the top search box.\n\nWhat you can do to help\n\nProvide an explanation of what I'm doing wrong\nProvide an explanation of where I should be looking\nShow me samples of code that illustrates the actual color changes and where it can be found\n\nI really appreciate your help! Thanks!\n", "", "search google element google-cse"], "3748468": ["Modify CFG in LLVM", "Could I modify the CFG in LLVM and these modifications be written in IR file? I made an LLVM pass to modify basic block and edges sequence and I ran the pass by lli -load to emit the IR, but nothing happened I think I should use some commands to manipulate the original CFG with the required one. I read in the llvmdev that the CFG is manipulated by changing the basic block terminator.However, my main point to change the edges too.\n", "", "c++ optimization llvm"], "2395705": ["Altering data in Ext.data.Model", "Below are the two models I am having:\n\nThese two models are associated with two different grids. I will select some rows from one grid (which is associated with Company model) and only the selected rows will be displayed in the second grid on a button click (which is associated with CompanyDemo model, initially this model is empty and does not have any data)\nThis is the grid with Company model:\n\nI am able to get the selected data from this grid. After getting this data, I need to replace the Industry and Desc data and replace it with Total (Acording to the model structure given above). This is how I am getting the selected rows of the grid with Company model:\nEDIT:\nTried with this bit of code:\n\nbut an exception is thrown in this line:\n\nI am not sure how to replace the two fields from 1st model and add new data in it before displaying it in the second grid.\nPlease let me know about this.\n", "Ext.define('Company', { extend: 'Ext.data.Model',\n fields: [\n {name: 'company'},\n {name: 'price', type: 'float'},\n {name: 'change', type: 'float'},\n {name: 'pctChange', type: 'float'},\n {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},\n {name: 'industry'},\n {name: 'desc'}\n ]\n});\n\nExt.define('CompanyDemo', { extend: 'Ext.data.Model',\n fields: [\n {name: 'company'},\n {name: 'price', type: 'float'},\n {name: 'change', type: 'float'},\n {name: 'pctChange', type: 'float'},\n {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},\n {name: 'total'}\n ]\n});\n", "extjs extjs4 extjs4.1"], "4473110": ["Set text in multiple text boxes in cells in a grid in C# WPF", "I'm new to C# and have set up a grid with 4 rows and 7 columns with a text box in each cell. I know how to manipulate the text boxes, but how can I iterate through the cells to access each text box? \n", "", "c# wpf textbox"], "5327358": ["After setting up the svnserve Server, what URL will the client use to access the server?", "Client ---| Internet |--- Server\nSo I have set-up an svnserver server and it is running already. I typed svsnserve.exe --daemon --root \"C:\\Documents and Settings\\Subversion Directory\" on cmd. I have also set-up a repository and I can browse it through TortoiseSVN. I am the server computer. What I want to do now is for a client computer to access the server. Only TortoiseSVN is installed to the client, no SVN server. What I want to do now is checkout the repository from the server, what do I write in the URL?\n", "", "repository svn"], "4137854": ["Thread Id differs in main() and start_routine() - Pthread", "\nOutput:\n\nWhy do the threadIDs differ?\nI missing some point here. I have done accidentally wrong, it seems.\n", "#include <pthread.h>\n#include <stdio.h>\n\nvoid* printHello (void* threadId)\n{\n pthread_t *my_tid = (pthread_t *)threadId;\n printf (\"\\nIn `printHello ()`: thread id %ld\", (long)*my_tid);\n pthread_exit (NULL);\n}\n\nint main ()\n{\n pthread_t arrayOfThreadId [5];\n int returnValue;\n unsigned int iterate;\n\n for (iterate = 0; iterate < 5; iterate++)\n {\n if (returnValue = pthread_create (&arrayOfThreadId [iterate],\n NULL,\n printHello,\n (void*) &arrayOfThreadId [iterate]) != 0)\n {\n printf (\"\\nerror: pthread_create failed with error number %d\", returnValue);\n }\n else\n {\n printf (\"\\nIn `main()`: creating thread %ld\", arrayOfThreadId [iterate]);\n }\n }\n\n printf (\"\\nBefore `return 0;` in `main()`\");\n pthread_exit (NULL);\n return 0;\n}\n", "c pointers pthreads"], "2802874": ["Domain Name from 123-reg, VPS from Linode. How to point to Google Mail for Business?", "I have bought a domain from 123-reg.co.uk and have successfully pointed it to the IP Address of my Linode VPS so that going to the domain serves up the pages from the Apache server running on the VPS.\nThe instructions I followed to do this are :\n\nNow, I am trying to get the domain's mail handled by Google Apps for Business. \nI have tried updating the MX records at Linode following this tutorial :\nhttp://library.linode.com/email/google-mail\nAnd also followed the instructions to update the MX Records in 123-reg's control panel :\n\nI am slightly confused now. Where should I be adding the MX records? In my domain registrar's control panel or in Linode's VPS? Both have options to update the MX records.\n", "", "emailserver google-apps mx-record linode"], "319929": ["Bookmark keyword for \"I'm Feeling Lucky\"", "I want to add a bookmark keyword in Firefox for Google's but the URL changes too quickly for me to copy it. \n", "I'm Feeling Lucky", "firefox bookmarks keyword feeling-lucky"], "1008685": ["Slow change activity android", "I try to change from Activity to Activity from andengine and last loaded very slow.How can i insert between image with text \"Tap to start\" when andengine activity loading ends.I use this function to change.\n\n", "startActivity(new Intent(ChangeLevelActivity.this, GameActivity.class));\noverridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);\n", "android activity andengine"], "4067962": ["How to collect google site logged in username", "I'm creating a simple Google Site that has nothing on it but a form to collect respondent's information. The reason I'm using Site instead of just a Google Drive form is because I need to offer respondents the ability to upload files. Couldn't figure out how to do it with Google Drive form.\nThe site (or form) will only be shared with users in my institution which uses GoogleApps and everyone will need to log in their GoogleApps account to view the site. I'd like to know how to capture or collect the logged in GoogleApps username viewing the site. Thanks.\n", "", "google-apps-script google-sites"], "4393388": ["Why does unserialize in PHP keep returning false?", "I've just written the easiest script in the world, but still I can't get it to work, and it's mighty strange. \nI want to use jQuery to catch some input field values and serialize them with jQuery's . I then send the serialized string to the server to unserialize it. Here's the output I get from the serializing in jQuery, this is what I send to the server.\n\nAnd here's the function,\n\nAs I said, if I go \"echo $str;\" I get \"field1=value1&field2=value2&field3=value3\", so the string should be unserializable. However, I always get the same error message and the always returns bool(false).\nHere's the error message I get from CodeIgniter, the framework I'm using for PHP.\n\nI'm using MAMP and run this locally at the moment. I read something about being OFF could cause this locally, but it's enabled. What might be wrong?\n", "serialize()", "php serialization"], "4565503": ["Tool for creating a Java daemon service on Linux", "What is the best way to create a java application that can be run using \u2018service\u2019 on Linux? I was going to use the JSW available here, but cannot use the licence on that (licence is either GPL or it costs money as far as I can tell). I\u2019d need an apache style licence.\nI\u2019m using maven to build, so it would be great if it was possible to create the service using a maven plugin, but any other suggestions would be great.\nI've seen Apache Commons Daemon, is there a maven plugin for this? Documentation seems sparse, so a working example of this would be good...\nThanks\n", "", "java linux maven-2 maven-plugin daemon"], "1166067": ["Rails 3 - How to create custom html components that are treated with CRUD operations?", "I'm using Rails 3 to create a project that will need a model called Sketch. I've already created a model, controller, and migration to handle Sketch - so far it just creates a 'sketch' object with a name for each sketch.\nMy problem is that I need to be able to attach an html5 canvas to each sketch object when it is created (or remove it when it is destroyed).\nSince 'canvas' is not a datatype that will be stored in the database (like 'string', 'integer', or 'datetime'), how do I go about creating custom html components such as this that need to be treated like any other datatype in a Rails app?\nI'm assuming that you would need to add the html components to a Model method and use a callback - like after_save - to initiate the component. But I'm not sure at all how to do this.\nNot sure if I'm describing this well enough, so here is a very simple mockup:\n\nI have the Raphael Javascript library in mind for the component that will do the sketching - if that helps.\nIf you can point me to any tutorials on this subject that would be great.\n", "", "ruby-on-rails ruby-on-rails-3 html5 ruby-on-rails-3.1 html5-canvas"], "4369671": ["Query so much slower than stored procedure?", "I have created a query which performs with aprox 2 seconds with top 100. If i create a stored procedure of this exact query it takes 12-13 seconds to run. \nWhy would that be?\n\nElements table count = 2309015 (with userid specified = 326969)\nMatches table count = 1290 (with userid specified = 498)\nsites table count = 71 (with userid specified = 9)\n\ncode\n\n", " with search (elementid, siteid, title, description, site, link, addeddate)\n as\n (\n select top(@top) \n elementid,\n elements.siteid, title, elements.description,\n site =\n case sites.description\n when '' then sites.name\n when null then sites.name\n else sites.name + ' (' + sites.description + ')'\n end, \n elements.link,\n elements.addeddate \n from elements\n left join sites on elements.siteid = sites.siteid\n where title like @search and sites.userid = @userid\n order by addeddate desc\n)\nselect search.*, isnull(matches.elementid,0) as ismatch \nfrom search\n left join matches on matches.elementid = search.elementid\n", "sql-server sql-server-2008 stored-procedures view"], "3019485": ["How to make Castle Windsor container available in other classes etc?", "My global.asax wires up all my castle registrations etc.\nWhat if I need to ask Windsor to resolve an interface directly (other than having it autowire using property injection etc. ?\nIs it possible to do:\n\nMy global.asax.cs has:\n\nI'm a bit confused how I can do this, and what kind of scope this access to Windsor will have? (I'm assuming it will only work in my asp.net application classes??)\n", "container.Resolve<ISomeThing>();\n", "asp.net-mvc castle-windsor"], "3057279": ["web 2.0 web design", "my son would like to get into web designing, but i'm a backend guy so i can't help him with any artistic or design matters.\nthere are alot of tutorials and many ways to do it.\ncan someone point us in the right direction to develop great looking web 2.0 type sites.\nfrom what i gather i think most people do the graphics in photoshop then they slice it to make it html friendly, am i correct? im looking for the mainstream way of doing it so he can easily find a job and help along the way.\nwe just need the design aspect of it, when it comes to jquery stuff i can help whim out.\nthanks,\nglenn.\n", "", "html photoshop"], "5074681": ["Session management in ASP.NET", "I have an ASP.NET application. There is a tree link of users on the main page:\n\nnagarpalika\ncorporation\ntalukapanchayat\n\nThis application runs fine on my PC.\nBut when I create the virtual directory for my application for functional testing a problem is created.\n\nIf two users on different computers click the same link (such as 'nagarpalika'), then data belonging to one user is displayed in the other user's pc.\nThe session id changes on one pc to the other one\n\nWhy is this?\n", "", "asp.net session-state"], "1475777": ["Is it possible for Encog or Neuroph to run on Android?", "I am writing an Android app that will be performing image recognition and analysis. I have heard that a neural network is one of the better ways to perform image recognition and have attempted to port the library that Mike O'Neill on CodeProject used in his outstanding handwritten digit recognition application for Win32. However, I recently was told about Encog and Neuroph, two outstanding Java libraries for neural networks/image recognition. I only need the neural network to work, I will be writing my own image recognition suite around another neural network library. Does anyone know if Encog or Neuroph can run on Android, preferably Encog?\nEDIT: I already Googled this, I'm wondering if anyone can actually attest to the library working.\n", "", "android neural-network"], "5316496": ["How do I Create an AutoCounter Column in a Table in SQL 2008 R2?", "There is nothing in the \"Data Type\" drop-down that indicates an auto-counter.\nI selected and I am assuming there is a setting somewhere else to turn it into an auto-counter.\nThe idea is to have a 100% unique ID for my primary key, and every time a row is added it gets the next available ID number assigned to it.\n\n", "int", "database sql setup data table"], "5314989": ["How to get current center point when I move view using CGAffineTransformTranslate?", "I move a view using CGAffineTransformTranslate, when I use NSlog: view.center.x, this value is not changes when I move? But I NSlog: view.frame.orgin.x, this current value always changes when I move! So, how to get current value center when I move?\n", "", "iphone frame transform nslog"], "618741": ["Recurrence relations and Generating functions - how to find the initial conditions?", "Best to ask by example. Given the recurrence relation $a_{n}=a_{n-1}+a_{n-2}$, and some given initial conditions, we can find a similar relation for the generating function for the sequence, $f(x)=\\sum_{n=0}^\\infty a_nx^n$: \n$$f(x)=xf(x)+x^2f(x)+c(x)$$\nWhere $c(x)$ is a polynomial encoding the initial conditions. My main question is how can this polynomial be computed as painlessly as possible from the initial conditions? This is interesting not only for Fibonacci but in general, of course.\nA similar, probably equivalent questions is this: If for some sequence we have a rational generating function $\\frac{p(x)}{q(x)}$ then the coefficients of $q(x)$ are exactly the coefficients of the recurrence relation for the sequence. Also, $p(x)$ is dependent on the initial conditions - but again, it's not clear to me how to compute those initial conditions from $p(x)$.\n", "", "combinatorics recurrence-relations generating-functions"], "1845801": ["How to remove background from breadCrumb", "I have this . How I can remove the background. I want just to display the links without any background.\n\nInto the manual I found that I have to change the css class in order to change the background. But how I can override the background?\nP.S\nThis is the css class responsible for background:\n\n", "breadCrumb", "css jsf jsf-2 primefaces"], "2374319": ["Jquery Calendar arrows missing", "I was trying out the Jquery Calendar on my website and it worked fine. I linked the css stylesheet from ajax.googleapis.com and the calendar was fine but too big. So i simply copied the file to my server and changed the height and the width in the file.\nBut now the arrows for moving forward and backward have gone. How do I get them back while hosting the css on my server?\nThanks\n", "", "jquery jquery-ui calendar"], "2367058": ["Node.js - express - session", "I use node.js and express, socket.io.\nI use session in Express.\nHow can I read the session and work with him in socket.io - in the part with connection?\nstore.userid is undefined.\n\nIn variable store:\nstore = \n\n", "var express = require('express')\n , stylus = require('stylus')\n , nib = require('nib')\n , sio = require('socket.io')\n , ejs = require('ejs');\n\nstore = new express.session.MemoryStore;\n\napp.configure(function () {\n\n app.use(express.bodyParser());\n app.use(express.cookieParser());\n app.use(express.session({ secret: 'secret', store: store }))\n\n app.use(stylus.middleware({ src: __dirname + '/public', compile: compile }))\n app.use(express.static(__dirname + '/public'));\n app.set('views', __dirname);\n app.set('view engine', 'ejs');\n\n //disable layout\n app.set(\"view options\", {layout: false});\n });\n\napp.get('/', function(req, res) {\n\nreq.session.userid = Math.floor(Math.random()*5000);\n\n});\n\n\nvar io = sio.listen(app)\n , nicknames = {};\nio.configure(function () {\n io.set('transports', ['websocket','flashsocket','xhr-polling']);\n});\n\n\nio.sockets.on('connection', function (socket) {\n\n socket.emit('hello', { hello: store.userid }); //store.userid is undefined\n\n });\n", "node.js"], "1179589": ["Resteasy @POST annotated method not called", "I'm using Resteasy 2.3.5. The following annotated method is never called, when I request its URL in my browser:\n\nHowever, when I replace by it works just fine (the browser returns ). What is wrong?\n", "@POST", "annotations jax-rs resteasy"], "5853298": ["Lazy-loaded primefaces datatable gets updated before SQL statements finish executing", "I have a problem when the primefaces data table gets updated before the SQL statements for updating\\removing entities from this table finish executing.\n\nThe problem is that the entity manager doesn't return anything to indicate that it had successfully executed the delete\\update query.\nI use JSF 2, Weld 1.1.5.Final, Primefaces 3.0.1, Seam persistence/transaction/solder 3.0.1.Final. \nThe server is Tomcat 7.\nHere is the code for the button that invokes the action on the controller bean:\n\nThe update doesn't happen after the first button is pressed, however the second one does update the table, both of them have identical ajax update sections.\nCode of the delete() method:\n\ndeleteById() method in the dao:\n\ndata table:\n\nLazyDataModel class:\n\nThe only solution I can think of right now would be adding the timer after calling the dao.delete(getSelEvent()) and refreshing the data model after that timer.\n", "01:08:13,255 INFO [reg.data.model.LazyEventDataModelMod] - Loading the lazy event data between 0 and 10 \n01:08:13,256 DEBUG [org.hibernate.SQL] - \n select\n count(*) as col_0_0_ \n from\n events event0_ limit ? \n01:08:13,394 DEBUG [org.hibernate.SQL] - \n delete \n from\n events \n where\n id=? \n", "sql jsf jsf-2.0 datatable primefaces"], "2395158": ["XML XQUERY Problem with NTEXT data type", "I want to use XQuery on a column of data type NTEXT (I have no choice!). I have tried converting the column to XML using but it gives the error:\n\nHere's the query\n\n(instancedata is my column) \nCan anyone think of a work around for this ?\nThanks\n", "CONVERT", "sql xquery"], "1479190": ["Is there a line length limit of language recogniton in Notepad++?", "It seems after passing column 74, Notepad++ recognizes my Fortran90 code as a comment. Characters turn into light green and are not recognized by language interpreter. Is there a way to turn it off? I am using default settings.\n", "", "notepad++"], "21981": ["Displaying the title of a BibTeX entry when using the APA document class", "When referring to a book, I can use to display the authors name and other citation information. Is there a convenient way to have the in-text citation display the title of a book?\nE.g. will display The Book Title.\n", "\\citeA[p.~10]{AuthorYear}", "bibtex apa-style"], "5789290": ["How do you add an Event Trigger to a data template for a business object?", "I have a custom class named BlinkingLight.\nI also have a static ObservableCollection BlinkingLightCollection.\nIn the UI, I have a ListBox that is bound to BlinkingLightCollection.\nIn my ListBox I want to essentially display each BlinkingLight object as a custom control that looks like box with an LED light that has an animation that makes the LED look like it just flashed on for a second then goes back to normal.\nMy BlinkingLight class has third party \"LED\" object that raises an event called 'Flash'.\nI am looking for ideas or solutions to get this to work!\nMy failed attempt:\nI created a custom control (BlinkingLightControl) that can bind to the data of my BlinkingLight class when a BlinkingLight is the DataContext of my custom control.\nI created a DataTemplate for my ListBox:\n\nNote: I can just put the xaml for my custom control into the datatemplate instead having a completely different control if that makes things easier.\nNow I want to have an EventTrigger in my BlinkingLightControl (or DataTemplate) who's RoutedEvent is the LED.Flash event. Unfortunately I can't seem to figure this part out. I've tried to create a RoutedEvent in my BlinkingLight class and just raise it whenever I handle the LED.Flash event. However my class is not a UIElement or ContentElement, and per MSDN: MSND Link\n\"The routed event owner can be any class, but routed events must be raised by and handled by UIElement or ContentElement derived classes in order to be useful. For more information about custom events, see How to: Create a Custom Routed Event.\"\nAny help would be greatly appreciated!!\nThanks,\nScott\n", "<Window.Resources>\n <DataTemplate x:Key=\"blinkingLightItemTemplate\" >\n <local:BlinkingLightControl />\n </DataTemplate>\n</Window.Resources>\n\n<ListBox ItemsSource={Binding Source={x:Static local:Data.BlinkingLightCollection}}\n ItemTemplate=\"{StaticResource blinkingLightItemTemplate}\" />\n", "c# wpf data-binding events datatemplate"], "4199277": ["How do I get rid of this 'jumpy' jQuery behavior?", "After you have held still on a button and it snaps down, then you move and the button animates up again. I'm trying to get it to animate up and stay up until you move off of it, then smoothly animate down. I do need this to work in Safari, Firefox and IE.\nThank you in advance for your help, time and consideration.\nHere is a working sample of the code.\n\n", " <html>\n <head>\n <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js\"></script>\n <script type=\"text/javascript\"><!--\n $(document).ready(function() { \n var navDuration = 500; \n var navJumpHeight = \"90px\";\n\n $('#tabs li').hover(function() {\n $(this).animate({ height : \"-=\"+navJumpHeight }, navDuration); \n }, function() {\n $(this).animate({ height : \"150px\" }, navDuration);\n }); \n });\n // --></script>\n\n <style type=\"text/css\"><!--\n /* CSS Reset */\n html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input,hr{margin:0;padding:0;line-height:1em;}\n h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th{font-size:1em;font-weight:normal;font-style:normal;line-height:1em;}\n ul,ol{list-style:none;}\n fieldset,img,hr{border:none;}\n q:before,q:after{content:'';}\n abbr,acronym{border:0;}\n caption,th{text-align:left;}\n table{border-collapse:collapse;border-spacing:0;}\n td {vertical-align:top;}\n html{font-size:100.01%;}\n body{font-size:1em;}\n a img{border: none;}\n\n body{ font-family:Arial; font-size:10px; font-weight:500; background:#ffffff no-repeat center top; } \n div.headerblock{ position:absolute; display:table-cell; text-align:center; left:0px; top:0px; width:100%; height:150px; } \n div.header{ position:relative; width:900px; height:170px; margin-left:auto; margin-right:auto; }\n div.logo { position:relative; display:table-cell; vertical-align:top; text-align:left; left:0px; top:0px; width:349px; height:170px; float:left; }\n\n\n #headerblock #header #tabs { height: 150px; overflow: hidden; padding: 0 10px; left:40; list-style: none; position: relative; filter:alpha(opacity=85); opacity:0.85; }\n #headerblock #header #tabs li, #headerblock #header #tabs li a { width: 100px; position: relative; float: left; } \n #headerblock #header #tabs li { top: 0 px; margin: 0; background: none; padding: 0; display: block; vertical-align: bottom;}\n #headerblock #header #tabs li a { display: block; color: #ffffff; font-size: 1.7em; text-decoration: none; text-transform: uppercase; height: 150px; line-height: 1.1em}\n #headerblock #header #tabs #tab_about a { background-color: #ff0000; }\n #headerblock #header #tabs #tab_services a{ background-color: #ffa500; }\n #headerblock #header #tabs #tab_contact a { background-color: #ffff00; }\n #headerblock #header #tabs #tab_learning a{ background-color: #00ff00; }\n #headerblock #header #tabs #tab_clients a { background-color: #0000ff; }\n --></style>\n </head>\n <body>\n <div class=\"headerblock\" id=\"headerblock\">\n <div class=\"header\" id=\"header\">\n <div class=\"logo\">\n \n </div>\n <ul id=\"tabs\">\n <li id=\"tab_about\"><a href=\"#\"> <br>Tab 1</a></li>\n <li id=\"tab_services\"><a href=\"#\"> <br>Tab 2</a></li>\n <li id=\"tab_contact\"><a href=\"#\"> <br>Tab 3</a></li>\n <li id=\"tab_learning\"><a href=\"#\"> <br>Tab 4</a></li>\n <li id=\"tab_clients\"><a href=\"#\"> <br>Tab 5</a></li>\n </ul>\n </div >\n</div>\n</body>\n</html>\n", "jquery html css3 navigation jquery-animate"], "1191837": ["Build a Cross Compiler", "I'm trying to compile a c++ file and generate an asm or s file to be disassembled and run in PSIM. Whenever I try to do this I get errors. I am attempting to compile to mipsI-linux. I think I've determined that my cross compiler that was given to me is not working correctly for some reason. Can anyone give me some help building a new cross compiler that will generate the correct instruction format? I'm working on a MAC.\n", "", "c++ compiler g++ mips"], "2808965": ["How to retrieve HTML table data in PHP?", "I'm creating a dynamic table where a user can add records(rows) and enter data. Table cells consists listboxes,text input,file input fields. When a user submits this data I'm getting only the last record(row) data through POST variable in PHP file. Even I tried to get the data using a hidden variable but no use. Any help is appreciated.\n", "", "php html table"], "2990": ["PHP, MYSQL: Order by date but empty dates last not first", "I fetch an array with todo titles and due dates from MySQL. I want to order it by date and have the oldest on top. But there are some todos without a date. These todos I don't want to show at first positions but rather at the bottom of my list. Unfortunately MySQL put the empty ones first.\nIs there any way I can do it in one query (can't use MySQLi, using CI's ActiveRecord). I could run a second query for all todos without dates and put them at the bottom. But I'd like to make it in one query \u2013 if possible?\n", "", "php mysql date order fetch"], "909580": ["PHP Account Activation Issues", "I wrote a login system for my website. When the user registers, the system emails an activation link to the email address the user provided. The link contains two parameters, email and key. The email parameter has the user's email address and the key parameter has the registration code so that the registration can be verified and changed from pending to confirmed. The activation page is supposed to fetch the Status column from the row that has the email parameter set in the Email column. For some reason, the script decides that any link is valid, and attempts to update the status of the account whether it exists or not.\nHere is my code:\n\nHere is a valid activation link:\n\nIt will activate that account by following the link, but it will redirect to the login page after activation if the link is not valid.\n\nEDIT:\nHere is the result of the query :\n\n", "<?php\n\n$email = $_GET['email'];\nif($email == \"\") {\n header(\"Location: http://www.zbrowntechnology.info/yard/register.php?message=Invalid Activation Link!\");\n exit;\n}\n$key = $_GET['key'];\nif($key == \"\") {\n header(\"Location: http://www.zbrowntechnology.info/yard/register.php?message=Invalid Activation Link!\");\n exit;\n}\n\n$con = mysql_connect(\"HOST\", \"USER\", \"PASS\") or die(mysql_error());\nmysql_select_db(\"zach_yardad\", $con) or die(mysql_error());\n$query1 = \"SELECT `Status` FROM Accounts WHERE `Email`='\".mysql_real_escape_string($email).\"' AND `Status`='\".mysql_real_escape_string($key).\"'\";\n$result1 = mysql_query($query1) or die(mysql_error());\nif(mysql_num_rows($result1) <= 0) {\n header(\"Location: http://www.zbrowntechnology.info/yard/register.php?message=Invalid Activation Link!\");\n exit;\n} else {\n $query = \"UPDATE Accounts SET `Status`='Confirmed' WHERE `Email`='$email'\";\n mysql_query($query) or die(mysql_error());\n header(\"Location: http://www.zbrowntechnology.info/yard/login.php?message=Registration Complete!\");\n exit;\n}\n\n?>\n", "php mysql logic activation login-system"], "3947183": ["Deny inheritance to a folder?", "How to remove inherited permissions from a folder programatically, the permissions that were inherited from the parent folder..\nor else\nuncheck checkbox \"inherit from parent the permission entires that apply to child objects......etc\" from advanced security tab..?\n", "", "c# ntfs"], "3058857": ["How to perform OCR on PDF/Image documents in SharePoint Online document library?", "I am new in SharePoint online (office 365). I want to perform OCR on PDF/Image documents which are stored in document library.\nI am doing the OCR on onprems SharePoint 2010 foundation server using farm solution.\nSteps: \n\nGet the document.\nRead the document\nIf unable to read then perform OCR and get the text inside.\nUpdate the document metadata property with the extracted property. \n\nPlease help. Please ask if not cleared.\nThanks in advance.\n", "", "sharepoint2010 ocr"], "1716656": ["Add ChartPanel to JScrollPane or create Scrollable JfreeChart", "I have single ChartPanel with StackedBarChart in it.My aim is to use JscrollPane, beacause I can have so much row for a specific category.(More than 100).In this case they are shown very thinner, bars are not shown properly. \nsetUpperMargin, setLowerMargin, setMaximumBarWidth etc. does meet my requirements.I must able to show scroll bar if bar width and heights are so thinner to be shown. I am looking for solution but not able to.\nHere are some discussions\nhere1.\nHere2\n", "", "java jfreechart bar-chart"], "641973": ["Table inside a div with max-height", "I want a scrollable table. To achieve that, I wrap a into a with a and . In addition, the has to ensure that the div adjusts its width to the underlying table.\n\nIn most browsers (Firefox, Safari, Chrome), this causes a problem: If the table is longer than 100px, vertical scroll bars are added without making the div wider, causing the text to wrap:\n\nIn IE it looks \"correct\":\n\nIs there a way to fix this?\n", "<table>", "html css table div"], "5066976": ["DataMember attribute set to field or property?", "In which way should I use DataMemeber attribute ?\nI.\n\nII. \n\nIII. \n\n", " [DataMember]\n internal protected string _FirstName=\"\";\n\n[DataMember]\npublic string FirstName { get { return _FirstName; } \ninternal protected set { _FirstName=(value!=null?value:\"\"); } }\n", "c# attributes"], "5637659": ["How to obtain one-way hash for given string in .NET?", "Is there a build in library in .NET that can compute secure one-way hash ? I mean a library that implements SHA-2 cryptographic hash function or something similar.\nIf is there is no SHA-2 implementation some weaker hash funcion would be sufficient.\nIf there are more options I prefer the most secure one.\nPlease provide a use example e.g. provide the code that returns one-way hash for string .\n\nEDIT: Please provide the example and the hash algorithm used.\n", "mySampleString", "c# .net asp.net security web-security"], "5090699": ["C++: How to build Strings / char*", "I'm new to C++. I want to make a . But I don't know how.\nIn Java is it just this:\n\nHow can I do this? I need a .\nWhere I'm focusing on is to paste the integer after the string.\n\nEdit:\nI want to use a method that takes an argument , so if I try to pass a , it gives an error.\nI don't know witch terms I should use to search for this, so maybe this questions is already asked.\nThanks, Martijn\nSolved!\nThe compiler was (is) broken. Thank you!\n", "char*", "c++ string char"], "3964182": ["How to apply MVC in Windows application?", "I applied MVC (Model View Control) in web application but I never applied MVC on Windows application.\nHow can I apply it in a Windows application? If any good link?\n", "", "windows mvc application"], "4761700": ["Spring util:map injection with @resource", "This should be simple but I don't manage to get it working.\nI have field annotated with @resource:\n\nIn applicationContext.xml I have (to be populated with Maven:\n\nBut at run time this doesn't work, the config field remains null. Any advices?\nEdit: I am using Spring 3.0 and it is an existing project so I can't tell right away if there is some bizarre config elsewhere preventing this from working.\n", "public class foo {\n @Resource(name = \"configMap\")\n private Map<String, String> config;\n}\n", "java spring annotations"], "5081186": ["Modulus operation", "regarding modulus operation\n\nsomenumber % 10 = less than 10 \nsomenumber % 15 = less than 15\nsomenumber % 23 = less than 23 \nsomenumber % 55 = less than 55 ... ...\n\nand so on, you get the point right?\nPlease explain\n", "", "math modulus"], "2829891": ["Multiple image uploader not working", "I'm attempting to create a multiple image uploader (think Coppermine) where the user clicks a button in an SWF, selects a file or multiple files, and then these files are uploaded to a directory.\nI have a PHP script that handles the uploading a file, and my Flash file iterates over the files in the and sends the file to this PHP script to upload. The directory path in the PHP script is correct, and permissions set to 777.\nThe contents of my ActionScript 3.0 class look like this:\n\nThe three methods at the bottom of the class fire JavaScript functions in my HTML page that add the file names to a file queue widget, and update the percent value next to them, and finally mark them as complete.\nHowever, when I select files, they are added to the file queue widget as expected and then nothing. The files aren't uploaded, the files in the file queue widget aren't updated, and no errors are thrown, either in the console (I'm using Chrome) or Flash when publishing my movie.\nCan any one see any mistakes in my ActionScript above?\n", "FileReferenceList", "php actionscript-3 actionscript"], "696101": ["SUM character in MYSQL", "Is it possible to use \nNote: type is a varchar type in MYSQL table column.And the possible value are 'f', 'v', 'g'.\nI want to count the total value of f in a column.\n", "SUM(FIND_IN_SET(\"f\",ftype)).", "char sum"], "2388996": ["How to simulate voting in GitHub's Issues 2.0 Tracker", "I'm considering moving my open-source project Flyway from Google Code to GitHub.\nOne of the features I really like in Google Code's Issue Tracker is the ability to vote and sort issues by the number of votes. This has allowed me to get a good feel of where current pain points lie and what the community feels needs attention or further work.\nHow can I achieve something similar on GitHub? Is there a way to maintain a democratic approach to Issue Tracking?\n", "", "github issue-tracking"], "1950186": ["Scrum: who, when and how to breaks up the stories into tasks?", "\nWho breaks up the stories into tasks? By scrum master? or by team members?\nWhen to break up the stories? before/during/after the sprint planning?\nHow to break up the stories? By technologies, e.g. data-modeling, sql, or by use cases (each story may have several use cases, and error handling).\n\nThanks.\n", "", "scrum task"], "4839553": ["WPF Button Visibility issue", "I have this binding on Visibility\n\nI want to set if and if \nIs there something like this:\n\nThanks\nSai\n", "Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\"\n", "wpf button visibility"], "2796551": ["How to create OBB files USING jobb tool Android", "I have my apk size upto 50mb so for this i am using expansion apk . on searching i came to know that there are diferent files which can be used as expansion files like zip and pdf etc. I am trying to put my data in .obb files but i don't know how to create these files and put the data in these files\nUpdated:\n*Frist:*\nLater i came to know that jobb tool is used to create obb files. Buti am confuse that where this ($ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11) commad run . Means will this ($ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11) command run on cmd. I run this ($ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 on cmd but my cmd saying jobb is not recognise as internal or external command).\nSecond :\n which type of files are put in these obb files i am talking about layouts,drawable files\n", "", "android android-expansion-files"], "4730479": ["Git subtree tags", "I want to use subtree merges to pull a remote project into a directory in my own git tree. I followed the instructions here:\nusing subtree merge\nBut I'm not sure how to checkout a tag. I imagine this is a common request - you want to pull in an external project but get a safe tagged version of the source.\nThe subtree merge solution works great, but I'm not sure how to get the tag I want? Love git, but sometimes it hurts my head....\n", "", "git tags subtree"], "2255312": ["How to write recursive query executable by SSAS?", "I have a situation when I'd need to write a recursive query to be executed as a Named Query in SSAS, I couldn't use CTE in there? Is there any alternative except for changing the Database Model?\n", "", ".net ssas"], "3489215": ["Confused on the output of 'ip addr show'", "I am trying to retrieve the ipaddress of the unix system.. ip addr show..\nand I got this as an output \n\nBut I am not clear on the output So can anyone help me in finding\nwhat can be the Ip address in the above data ?\n", "2: eth0: mtu 1500 qdisc mq state UP qlen 1000\n link/ether b8:ac:6f:65:31:e5 brd ff:ff:ff:ff:ff:ff\n inet 192.168.2.100/24 brd 192.168.2.255 scope global eth0\n inet6 fe80::baac:6fff:fe65:31e5/64 scope link\n valid_lft forever preferred_lft forever\n", "unix cmd"], "3778508": ["workflow 4 activity designer IValueConverter", "Lets say i have an activity with InArgument<int> ProductId\nI'd like to expose in the activity designer a combobox to show all Products and the user can select a product. \nI can show the list of product in the combo no problem. But how do I bind the selected product to the InArgument<int> of my custom activity? \nI suppose I need some kind of ValueConverter? Not sure how to code the value converter for this case, if anybody has an idea, suggestion, will be helpful. I have to convert the InArgument<int> to an int? and the convert back from int to InArgument<int>\nThanks,\n", "", "c# .net workflow-foundation-4 ivalueconverter"], "604840": ["Apache Forward JSP pages to tomcat", "I have Apache Server, in which my website running, but there is some jsp pages in my website. I have to forward my jsp pages and servlet to tomcat. Kindly help me so that I can make it possible.\nSorry for my bad English.\n", "", "apache2 tomcat jsp"], "5097586": ["What does HZ mean in a game?", "I doubt this is the right forum to ask this in, but I believe that this is a quite technical question. In GTA4 there is an option under the screen resolution to chose between various hertz. (e.g. there is a 1280x800 52 HZ and a 1280x800 60 HZ). What is the difference between the two? Does this cap my fps or change my display's hertz?\n", "", "display resolution"], "5041125": ["Why is my Button Click event only firing one? (SOLVED)", "Total noob to .net. Have looked around on the net and have not been able to find a relevant solution to this.\nI have created a simple .net web application that reads data from a local Access database. The connection works as it reads the first row and populates the textboxes.\nWhen I click the button it reads and populates the second row but then it stops working and will not read the next row of data. I am not getting any errors or build problems. The button just stops working! Is there something with the event handler that I am missing?\nSOLVED\nThanks for your help guys, just a lack of understanding on my part as regards not understanding page lifecycles.\nSolved by using IsPostBack to see if the page was loaded before and ViewState to store positions value across button clicks/ page reloads.\n\nCode:\n\n", "<%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"Default.aspx.cs\" Inherits=\"WebApplication6._Default\" %>\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n<head runat=\"server\">\n <title></title>\n</head>\n<body>\n <form id=\"form1\" runat=\"server\">\n <div>\n\n <asp:TextBox ID=\"TextBox1\" runat=\"server\" ontextchanged=\"TextBox1_TextChanged\"></asp:TextBox>\n <br />\n <asp:TextBox ID=\"TextBox2\" runat=\"server\"></asp:TextBox>\n <br />\n <asp:TextBox ID=\"TextBox3\" runat=\"server\"></asp:TextBox>\n <br />\n <asp:Button ID=\"Button1\" runat=\"server\" onclick=\"Button1_Click\" Text=\"Button\" EnableClientScript=\"False\"/>\n <br />\n <asp:Label ID=\"Label1\" runat=\"server\" Text=\"Label\"></asp:Label>\n\n </div>\n </form>\n</body>\n</html>\n", "c# asp.net .net button event-handling"], "4186904": ["Should TDD be applied at initial prototype stage?", "I have a question about applying tdd on early stages of development. Frequently, when starting developing a project, the client does not know exactly what the precise requirements are and consequently changes them after seeing the first prototypes. If we apply tdd from the very beginnning of the project, it turns out that a big portion of our tests (acceptance, integration, unit) will be soon either deleted or updated. Is this normal? If not, how to proceed at this initial phase of product development?\n", "", "tdd"], "2356951": ["Access 2007, why is my subform header and footer not visible in form view?", "Embarrassingly, I think I am missing something rather simple here but I just can't seem to figure this out. I'd would like a calculated field to appear in the subform header or footer, but I can't even get it visible. \nI checked the property sheet settings of the subform and it clearly states: \"Form Header--visible. Display When--always\". \nAppreciate any help in this unnecessarily frustrating matter. \n", "", "ms-access-2007"], "3640573": ["Entity Framework v5 release candidate throws exceptions when using enums in model", "I am using latest EF v5 release candidate as per announcement here.\nMy model is using mapping files via EntityTypeConfiguration ...\nWhen I attempted to replace string property on my model with an enum (drop+recreate db), I was getting this exception:\n\nI then tried decorating my MyAppDbContext with and was getting the same error...\nFinnaly I tried and I got another exception:\n\nMy Controller is an ApiController and the breaking line looks like this:\n\nBTW, I am using ASP.NET MVC 4 beta + Web API on VS 2010 (w/ .NET 4).\nAny ideas?\n", "System.NotSupportedException was unhandled by user code\n Message=The enum or spatial property 'Category' on type 'Vehicle' cannot be mapped. Use DbModelBuilderVersion 'V5_0' or later to map enum or spatial properties.\n Source=EntityFramework\n StackTrace:\n at System.Data.Entity.ModelConfiguration.Mappers.PropertyFilter.ValidatePropertiesForModelVersion(Type type, IEnumerable`1 explicitlyMappedProperties)\n at System.Data.Entity.ModelConfiguration.Mappers.PropertyFilter.GetProperties(Type type, Boolean declaredOnly, IEnumerable`1 explicitlyMappedProperties, IEnumerable`1 knownTypes)\n at System.Data.Entity.ModelConfiguration.Mappers.TypeMapper.MapStructuralElements[TStructuralTypeConfiguration](Type type, ICollection`1 annotations, Action`2 propertyMappingAction, Boolean mapDeclaredPropertiesOnly, Func`1 structuralTypeConfiguration)\n at System.Data.Entity.ModelConfiguration.Mappers.TypeMapper.MapEntityType(Type type)\n at System.Data.Entity.DbModelBuilder.<>c__DisplayClass7.<MapTypes>b__1(Type type)\n at System.Linq.Enumerable.WhereListIterator`1.MoveNext()\n at System.Data.Entity.ModelConfiguration.Utilities.IEnumerableExtensions.Each[T](IEnumerable`1 ts, Action`1 action)\n at System.Data.Entity.DbModelBuilder.MapTypes(EdmModel model)\n at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)\n at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)\n at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)\n at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)\n at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()\n at System.Data.Entity.Internal.InternalContext.Initialize()\n at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)\n at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()\n at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()\n at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\n at WebApp.Controllers.VehiclesController.Get() in C:\\WebApp\\Controllers\\VehiclesController.cs:line 35\n at lambda_method(Closure , Object , Object[] )\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.Execute(HttpControllerContext controllerContext, IDictionary`2 arguments)\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<>c__DisplayClass2.<InvokeActionAsync>b__0()\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)\n InnerException: \n", "c# entity-framework exception entity-framework-5 release-candidate"], "3070442": ["How to read a text file into a multi dimensional array in pseudocode?", "I have the multidimensional array: \n\nI have a text file containing the following:\n\n\"ABC\" Jun 50 \"DEF\" Apr 100 \"HIJ\" Jun 90 \"KLM\" Jun 55 \"NOP\" Jun 65\n\nWhere the first word is Town, the second word is month & the third word is product. It then repeats for the 4-6 words, 7-9 words, etc.\nHow would I read my text file into the multidimensional array in pseudocode?\n", "Sales (Town, Month, Product)", "multidimensional-array text-files pseudocode"], "2741902": ["How to attach JavaFX2 javadoc jar automcatically with maven?", "I have in my pom.xml the dependency to jfxrt.jar, as a system scope one:\n\nThe problem is I would also like to attach the javadoc for this jar. So I went and downloaded the javafx2 javadoc,packed it into a jar, installed it in maven using install file and using javadoc as a classifier. The resulted jar has name javafx-2.2.4-javadoc.jar. As you know the main jar has name jfxrt.jar.\n\nWhen I call mvn dependency:resolve -Dclassifier=javadoc I get:\n\nWhat am I missing?\nRegards,\nAurelian\n", "<dependency>\n <groupId>com.oracle</groupId>\n <artifactId>javafx</artifactId>\n <version>${java.fx.version}</version>\n <scope>system</scope>\n <systemPath>${javafx.abs.dir}</systemPath>\n</dependency>\n", "maven javafx-2 javadoc classifier"], "2366618": ["Standard deviation within group in SQL or SSRS (alternatively - calculating Sigma or Cpk)", "I have a serious problem with calculating Standard Deviation within subgroup in SSRS/SQl (whichever is more convenient). The real reason behind this is I need to calculate Sigma value (according to Six Sigma principles) or alternatively Cpk value (process capability), but my efforts stop at the standard deviation.\nI'm not strong with statistics but it seems that StDev and StDevP functions in SSRS (and SQL) are not calculated 'within subgroup', and I cannot find a function that could do that. Below is an excel screen shot showing the calculation steps which I would like to achieve in SQL/SSRS\nEdit: Cannot post images yet, please find it at http://i.imgur.com/TDYjY.png\nThe tricky part is calculating the sum of absolute differences between each pair of values. The order in which the values are given is significant. I forgot to mention that number 27 in denominator of Rbar (Row 7) is the sample size minus 1 (27). Below is also a table in SQL: \n\nI'm guessing that what I need could be achieved by using either RollingValue or some stored procedure in SSRS. Of course if there is a smarter way to calculate Sigma or Cpk I'll be very happy to hear about it.\nI hope the question is well formulated, if not please comment. This is very important for me so I will be grateful for any assistance :) Thanks!\n", "DECLARE @Measurements TABLE(Val FLOAT)\nINSERT INTO @Measurements (Val)(\n SELECT 485\n UNION ALL SELECT 490.6\n UNION ALL SELECT 490.6\n UNION ALL SELECT 485\n UNION ALL SELECT 485\n UNION ALL SELECT 489\n UNION ALL SELECT 485\n UNION ALL SELECT 477\n UNION ALL SELECT 477\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 485\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 485\n UNION ALL SELECT 485\n UNION ALL SELECT 477\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 484.6\n UNION ALL SELECT 482\n UNION ALL SELECT 482\n UNION ALL SELECT 482\n)\nSELECT STDEV(Val) FROM @Measurements \n", "sql sql-server-2008 reporting-services statistics ssrs-2008"], "102924": ["Gradle dependency and space in path", "i am creating a Gradle plugin\nwhen i try to set a jar path to project.dependencies compile which is having space, i am getting exception\n\nI am trying to set it in MyPlugin apply method\n\nI am trying to set JavaFX 2 jfxrt.jar which is in following path\n\nthe debug shows\n\nHow to over come space in path ?\n", "* What went wrong:\nA problem occurred evaluating root project 'visage-gradle-sample'.\n> No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection) values: [file collection]\nPossible solutions: module(java.lang.Object)\n", "groovy javafx-2 gradle"], "2748988": ["Get index of unordered list and scroll position (up and down) on click", "I have a schedule of events, the ul has a fixed height and overflow hidden, the li's also have a fixed height. Only four are visible at a time. I need to figure out how to scroll through the list, both up and down on click of the appropriate button. \nI'm sure there are plug ins out there that can do this, but for a better understanding of jQuery/JS I want to do this on my own - but need some help. HTML/CSS is here http://jsfiddle.net/DirtyBirdDesign/BJdJ7/\nI have broken this down into the following needs:\n\nLoop through and index the number of list items\nGet the current position\non each click of the 'down' button, move the position -41px\non each click of the 'up' button, move the position +41px\nanimate the transition\nLoop continuously - go from last to first when last is visible\n\nAm I missing anything on the above? How do I go about this?\nthanks for the knowledge!\n", "", "jquery"], "1498799": ["Spring locale: can't get interceptors to work", "I have a jsp file with 2 links which set a property lang to either en or de.\nI also have a message that needs to be changed in the corresponding language either english or german.\nI have the 2 property files with the codes. I made the configuration file for the locale.\nI've tried different combination of classes and properties but I can never get the message changed. \nThis is my code:\njsp file:\n\napplicationContext.locale.xml file: (this is imported in applicationContext.xml)\n\n\nI have 2 property files:\nwelcome.properties and welcome_de.properties. Both have a code test and different values to it.\nThe problem is if I set the default Locale it will always take that. If I don't set it the locale resolver will take the locale of the request. \nI can't set the locale of the response to be taken from the url parameter. \nDo you have any suggestions?\nThanks :)\n", "Language : <a href=\"?lang=en\">English</a>|<a href=\"?lang=de\">German</a>\n <h3>\n <spring:message code=\"test\" text=\"default text\" />\n </h3>\nCurrent Locale : ${pageContext.response.locale} ---- ${pageContext.request.locale}\n", "java spring configuration language locale"], "4144339": ["ASP.NET MVC Routing, Need help creating route", "My current Routing rules are\n\nI have several controllers that can only be accessed by the Admin. Currently I have a menu at:\n\nWhich lists a bunch of action links. Right now clicking any of those links redirects like this example:\n\nBut I need it to be like:\n\nThis current setup sort of works, but links on my homepage are being caught by the wrong rule and are going to, for example /Admin/Article/1 when they should be just /Article/1\nI've searched StackOverflow for the answer, and found some that come close - but I still don't understand routing well enough to make use of their answers. Any assistance is appreciated.\nEDIT\nHere are a collection of links from the homepage that are being caught by the routing rules incorrectly\n\nAlso, my Admin controller just has an index action. I have controllers for all of the other 'Admin' pages, for example my NewsController has actions for index, create, edit, delete, for listing all the news articles, and performing crud operations. Am I structuring this incorrectly?\nMy AdminController.cs\n\nThe Admin/Index this returns contains a menu with ActionLinks just like \n\nMy NewsController.cs has Actions for performing CRUD operations. I would like the url to be\n\nInstead of\n\n", "routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");\n\nroutes.MapRoute(\n \"Default\", // Route name\n \"{controller}/{action}/{id}\", // URL with parameters\n new { controller = \"Home\", action = \"Index\", id = UrlParameter.Optional } // Parameter defaults\n);\n\nroutes.MapRoute(\n \"Admin\", // Route name\n \"Admin/{controller}/{action}/{id}\", // URL with parameters\n new { controller = \"Admin\", action = \"Index\", id = UrlParameter.Optional } // Parameter defaults\n);\n", "asp.net mvc routing"], "4161945": ["knockout js - how to tell if model item has changed", "I have the following view \n\nThe problem I have is jquery mobile's list is not updating so I need to call the jqmobile list object to reapply the formatting/enhancing. Is there a model change event I can hook into to to let me know when I should be calling a view update list function\n", "<ul data-role=\"listview\" data-inset=\"true\">\n <!-- ko with: model.Item_selected --> \n<li data-role=\"list-divider\" class=\"stay\"><span>Details</span></li>\n<span title=\"Name\" data-bind=\"text: name\"></span>\n</li>etc...\n<!-- /ko -->\n </ul>\n", "knockout.js"], "2779913": ["By Clicking an html link i want to open that url in browse?", "I am opening an html page in web view and By Clicking an html link i want to open the given link in to web browser and my application should close. \n", "", "iphone uiwebview iphone-web nsurl"], "3935985": ["How does Twitter OAuth work in Android?", "I have been searching for an answer for quite some time, and I have admit that I am pretty stuck. I am attempting to implement Twitter in my application and have found it somewhat challenging. It seems the way to do it is to register my app with Twitter(I have already done so) as a Browser application. I don't know what to use for my callback url though. I really want to just return to my current activity in the application, and not be redirected to a callback url. What should I put for that? I am pretty stuck...\n", "", "android url twitter callback"], "35269": ["\\def issue (with NumericPlots?)", "So I've decided to clean my code for the many plots.\nI've basically taken out all the plot data into separate files using\n\nThen I use to load all the plotting data at once and then\n\nSo far, so good. Most plots work as expected. However it turns out there is some issue with some names.\nFor instance, using leads to the following error\n\nBut when I change the name to it compiles just fine.\nSo to sum up, LaTeX seems to be very idiosyncratic about the def name it allows. Please note that the names were working fine before I used nested input files...\nEDITED FOR EXPLANATION :\nOne of the other names was and it wasn't used.\nSo when I changed to , it had no confusion about the definition to use. Turns out, you can't use - character in the ? What other characters are forbidden?\n", "\\def\\plotname{\nx1 y1\n}\n", "macros pstricks"], "2360750": ["How to check whether the UITableViewCells are blank", "I am using indexpathforvisiblerows which gives the indexpaths of the visible rows in uitableview. How can i check for the blank cells in the returned indexpaths?.\n` NSArray *visiblePaths = [self.rootViewController.accountTableView indexPathsForVisibleRows];\nfor (NSIndexPath *indexPath in visiblePaths)\n {\n\n// getLastCallDate function\nAccount *account = [self.fetchedResultsController objectAtIndexPath:indexPath];\n NSString *lastCallDate;\n\n`\nWhile searching fetched results controller will not have the values as many as the visible rows which leads to array bound execption\n", " UITableViewCell *cell = [self.rootViewController.accountTableView cellForRowAtIndexPath:indexPath];\n // I am getting the issue when i call this function \n cell.detailTextLabel.text = [self getLastCallDate:indexPath];\n\n\n}\n", "iphone ios"], "96962": ["Change the key value in python dictionary", "Is there a straightforward way to do this?\nI want to change the key in a python dictionary.\n", "", "python dictionary sequence"], "2737770": ["Sum time in UITableView", "I have a UITableView with 7 rows, every row contains a label with time in this format HH:mm.\ni need to sum all time into every row to obtain total time.\nthanks in advance.\n", "", "uitableview time nsdate"], "5981602": ["custom permalink/shortlink with base62 encoded post ID", "I want my post-links to look like /%post_id62%_%postname%/ where %post_id62% is the post ID in base62 encoding (e.g. http://example.com/y9Rlf_test/) and my shortlinks to consist of /%post_id62% only (e.g. http://example.com/y9Rlf). This is what i've got so far (in my ) which obviously doesn't work:\n\nAny idea how to tackle the problem?\nBonus points for avoiding the -N slug suffix when there's another post with the same title created (which might be avoided actually when setting the link structure to \"/%post_id62%_%postname%/\" but in order to have the shortlink functionality it should be \"/%post_id62%\" I guess; cf. Turn off %postname% auto-incrementing?)!\nThanks!\n", "functions.php", "permalinks url-rewriting urls rewrite-rules rewrite-tag"], "1870899": ["Access the downloaded content with wget for responses with http code different than 200 OK", "I cannot find a switch in wget which would allow me to see the body of the response if the server returns a status other than 200 OK.\nFor example \n\nwill result in\n\nIs it possible access the html document which stackoverflow returns for 404 error?\nI know curl would do it, the question is how to do it with wget.\nThanks\nTymek\n", "wget 'http://stackoverflow.com/xxx'\n", "wget"], "432740": ["C++ - Initialize variable by passing reference to function?", "Is it possible to initialize a variable from a return parameter (by ref)? Say I have something like:\n\nwhere if succeeds, it returns true and fills :\n\nNow, my class Car doesn't have a 0-argument constructor, so the above code fails to compile. Is there a way to keep uninitialized until the call to ?\nSolutions I thought of are: \n\nadding a cheap 0-argument constructor to Car\nswitch to pointers (which I'd rather avoid)\n\n", "Car c; // <- don't want to create a new Car here!\nif (findCar(\"beetle\", c)) {\n ...\n}\n", "c++ pass-by-reference"], "359592": ["Phonegap Icenium image displaying wrong way round", "I've taken a photo with the camer but when I set the image data to be the src of an image element it appears on its side. I upload it to a server and it displays correctly. I suspect it is something stupid I am doing.\n", "", "phonegap camera cordova"], "5131867": ["How should joins used in mysql?", "If i have two tables like \nuser table-\"u\"\n\npass table-\"p\"\n\nas for as i learnt from tutorials I can join these 2 tables using many joins available in\nmysql as said here\nIf i have a table like\nrole table-\"r\"\n\ntoken table-\"t\"\n\ntole_token_association table-\"a\"\n\nI have to make a join such that I have to display a table which corresponds \nlike this \"rolename\" has all these tokens.How to make this? I am confused. Is it possible to make a join? I am liking mysql a lot. I wish to play with queries such that not playing. I want to get well versed. Any Suggestions Please?\n", "userid | name\n 1 | lenova\n 2 | acer\n 3 | hp\n", "sql mysql database join"], "2794685": ["Appcache manifest downloads all files but still unable to access offline unless they have been accessed online", "I have successfully created an appcache manifest that is downloading all of the website content. I have checked this through chrome dev and it's all working.\nThe issue I am having now is that even although the entire website has been cached, I am unable to access the cached pages when offline, unless I had accessed them online.\nI am using Apache and accessing the website via an iPad using safari browser.\nI have an idea that this may be due to the server not allowing access to cached pages unless they had been accessed online as some kind of security measure.\nAny ideas?\n", "", "html5"], "4810664": ["Schedule Multiple Arbitrary Events to WP Cron in WordPress", "I'm trying to schedule multiple events with the WordPress Cron API with dynamically generated action names. Only one event could be added at a time with but not more than one. \nWith a plugin called Cron View, I could confirm that the events were registered but the function was not called somehow. I'm guessing that maybe the dynamically generated action names disappear in the next page load so WordPress cannot find them. I don't know. \nThe following code is ready to run as a plugin and demonstrates the problem. Any suggestion to solve this problem would be appreciated.\n\n", "add_action()", "php wordpress cron wordpress-plugin wordpress-plugin-dev"], "1178430": ["How GDI/GDI+ works without OpenGL or DirectX", "Sorry if this is off-topic here. If so; please feel free to move it to the appropriate site.\n\nHow does GDI/GDI+ render to the graphics card (display content on the screen) without the use of a lower-level API for communicating with the GPU such as DirectX or OpenGL? How does it draw to the screen without the use of either API? Yes; I know that the image is composited and rendered on the CPU, but then it SOMEHOW has to be sent to the GPU before being displayed on the monitor. How does this work?\n", "", "opengl directx gdi+ gdi"], "42580": ["Fluent nHibernate Id is a reference", "I have a situation where two tables share the same key, let's just say ID. When I'm mapping those two tables with FluentMapping, how I do the mapping for the class where I want the ID actually to map to an object.\n\nHow do I map the Second class? Second table has also a ID, but it's a foreign key to the First table's id.\n", "public class First\n{\n public virtual int Id {get; set;}\n public virtual string Name {get; set; }\n}\n\n\npublic class Second\n{\n public virtual First First {get; set;}\n public virtual int Number {get; set; }\n}\n", "c# .net nhibernate fluent-nhibernate"], "262246": ["node.js with PostgreSQL and socket.io Error: Socket is not writable", "I've been playing around with socket.io and it seems to have been working nicely. Lately though, I installed postgreSQL to insert rows to the database everytime an event happens (and the event happens 2 or 3 times per second!)... Here's a snippet:\n\nWe get the error:\n\nAny ideas as to what's causing the problem and how it could be fixed?\nI'm using the following library for postrgreSQL\nhttps://github.com/brianc/node-postgres\n", "pg.connect(conString, function(err, dbClient) {\n io.sockets.on(\"connection\", function(client) {\n client.on(\"clientSendingPlayerData\", function(playerData) {\n dbClient.query(\"insert into actions values (1)\", function() {\n console.log(\"INSERTED ROW\");\n });\n });\n });\n});\n", "postgresql node.js websocket socket.io node-postgres"], "3928591": ["Max HDD Size for MacBook Pro Late 2011", "I wanna know what is the max hard disk size supported for a Macbook Pro late 2011 (md314). I know it should be a 2.5\" SATA I/II/II (9.5mm) HD, but don't know if it's 1TB or more. Already have a 180GB SSD + 500GB 7200rpm and I wanna replace this 500GB HD for another of 1TB or more.\nThank You!\n", "", "hard-drive macbook disk size capacity"], "4429060": ["DockPanel Suite - DockContent visibility", "A form contains a DockPanel with an instance of DockContent which has DockState=DockState.DockBottomAutoHide and it acts as a logger view - like Visual Studio's Error list panel. So, when a logging event is added to log list, DockPanel - if is not visible - is shown in next way:\n\nbut if loggerContentPanel is already visible for user, Show method make the panel to \"blink\".\nIs any way to get the state of a DockContent with DockState = DockState.DockBottomAutoHide if is visible for user? IsHidden or Visible properties doesn't help too much.\n", "{\n loggerList.AddLogEvent(event);\n loggerContentPanel.Show();\n};\n", "c# winforms dockpanel-suite"], "2145057": ["Free, hosted, issue tracker with github integration", "The Github issue tracker is not quite cutting the mustard for our (open-source, but professionally developed) project: it has the bizarre and crippling* restriction that non-owners can't assign labels or users to issues.\nSo we need a new issue tracker. We don't need a lot, but labels (for components, and to distinguish subprojects) and user assignation are pretty important. Integration with Github would be a real bonus, as would nice ease of use. It has to be hosted, and preferably free-as-in-beer (or at the very least, have no per-developer charge).\nIs there anything that fits this bill? Pivotal Tracker looks nice but is more of an agile work tracker than an issue/bug tracker. Trying Lighthouse now, but Github integration (if possible) could be fiddly.\n\nCrippling because giving someone \"ownership\" status gives them the ability to delete the entire repository: issue permissions and code permissions are not distinguished.\n\n", "", "github bug-tracking issue-tracking hosted"], "2826543": ["How does the JPA handle partial, non-disjoint inheritance (using InheritanceType.JOINED in class-per-table scenario) along with EntityManager.find()?", "I have a problem modeling/understanding partial, non-disjoint inheritance with JPA annotations.\nHere are the four tables:\n\nMy shortened entity classes are:\n\nPartial inheritance: person entities can exist without any corresponding referee, coach, or player entities\nNon-disjoint inheritance: there can be any number of corresponding sub entities, that is a person can be a referee, coach, and player at the same time, possibly any combination of the three. Each sub table can only have exactly none or one entity, but not multiple.\nNote that because the inheritance is partial, Person isn't abstract. Furthermore, there's no discriminator on Person/s because the inheritance is non-disjoint.\nIs such a model possible in Java ORMs? How would the annotations look like?\nI have problems finding instances the way I annotated the classes using:\n\nEclipseLink 2.1.1 and 2.2.0 nightly build fail completely on EntityManager.find(...), while Hibernate at least returns some of the expected instances. Note the word \"expected\" here. It's my understanding of what a JPA ORM ought to do, but I might be mistaken.\nAs you can see, Hibernate always returns sub class instances of Player, but is unable to find Coach and Referee instances if a Player instance is also available.\nA standalone JavaSE/HSQLDB/Hibernate test app can be found here:\nhttp://www.kawoolutions.com/media/persons-partial-nondisjoint-inheritance.zip\nSo, how does JPA handle this model? Is my class model correct (the data model is correct!)?\n", "CREATE TABLE Persons (\n id INTEGER NOT NULL,\n first_name VARCHAR(50) NOT NULL,\n last_name VARCHAR(50) NOT NULL,\n PRIMARY KEY (id));\n\nCREATE TABLE Referees (\n id INTEGER NOT NULL,\n license_nbr VARCHAR(10) DEFAULT NULL NULL,\n PRIMARY KEY (id),\n CONSTRAINT referees_persons_fk\n FOREIGN KEY (id)\n REFERENCES Persons (id)\n ON DELETE CASCADE\n ON UPDATE CASCADE);\n\nCREATE TABLE Coaches (\n id INTEGER NOT NULL,\n license_nbr VARCHAR(10) DEFAULT NULL NULL,\n PRIMARY KEY (id),\n CONSTRAINT coaches_persons_fk\n FOREIGN KEY (id)\n REFERENCES Persons (id)\n ON DELETE CASCADE\n ON UPDATE CASCADE);\n\nCREATE TABLE Players (\n id INTEGER NOT NULL,\n registration_nbr VARCHAR(20) DEFAULT NULL NULL,\n PRIMARY KEY (id),\n CONSTRAINT players_persons_fk\n FOREIGN KEY (id)\n REFERENCES Persons (id)\n ON DELETE CASCADE\n ON UPDATE CASCADE);\n", "hibernate inheritance jpa eclipselink"], "5200064": ["Cauchy-Schwarz inequality and three-letter identities (exercise 1.4 from \"The Cauchy-Schwarz Master Class\")", "Exercise 1.4 from a great book The Cauchy-Schwarz Master Class asks to prove the following:\nFor all positive $x$, $y$ and $z$, one has\n$$x+y+z \\leq 2 \\left(\\frac{x^2}{y+z} + \\frac{y^2}{x+z} + \\frac{z^2}{x+y}\\right).$$\nIntroduction to the exercise says:\n\nThere are many situations where Cauchy's inequality conspires with symmetry to provide results that are visually stunning.\n\nHow to prove that inequality? And how does one benefit from the \"symmetry\"? What is the general idea behind this \"conspiracy\"?\n", "", "inequality recreational-mathematics"], "392904": ["TPL return value and exception", "I have develop a library that connects and operate with devices.\nFor example:\n\nThis is ok, but now I have decided to include in my library TPL.\nThe problem I'm facing is with the logic of how to return values.\nInstead of passing an IP, you will pass a list of IP's.\nImagine you want to connect to 10 devices and 5 are ok and the other 5 are faulted I image a code like:\n\nIf someone calls this method they would only receive the exeption, in this case it can be easy but for example, if I have another method like I would have 5 devices with data and 5 devices faulted.\nWhat is the best way to return a result for the correct connections and the errors for the faulted ones? A connection can fail for several reasons.\nUPDATE\nI have tried this:\n\nAnd in the WS Client:\n\nIf i break in i can see the results:\n\nBut in I only see:\n\n", "public bool Connect(string ip)\n{\n try\n {\n // try connect to device\n }\n catch (Exception ex)\n {\n // trow custom exception\n }\n}\n", "c# .net task-parallel-library"], "4466949": ["Runtime Error R6034 in C# program", "I'm loading in C# a C++/CLI wrapper dll (to a native C++ dll) and if I compile my tool in release mode I'm getting R6034 runtime error and \n\nScheme:\nC# tool ---> reference to C++/CLI wrapper ---> static load (implicit) native C++ dll (Additional Dependencies -> lib file)\nIt seems that something is wrong with the loading process of the C++ library (but I don't have problems in Debug Mode)!\nAny hints or ideas!?\nThx\n", "A dynamic link library (DLL) initialization failed. (Exception from HRESULT: 0x8007045A).\n", "c# c++ dll c++-cli runtime-error"], "5980843": ["Generate C# project using CMake", "I'm trying to generate c# project within an existing c++ CMake code base on Windows. After some search I could find just two projects that built their own csharp compilers for cmake:\ngdcm and kde. \nI tried both of them and unfortunately the first one failed to generate a c# project, instead it created vs c++ project with cs files in it. And because of c++ flags set for linker, build always failed with errors. I experimented with the sample project they provided. I'm wondering could be it be a limitation of \"Visual Studio 8 2005\" generator?\nThe second one also seemed promising, but was primarily aimed for Mono, so I wasn't successful with it either. \nDid anyone have a positive experience with building c# projects using one of those cmake modules or may be something else? \n", "", "c# visual-studio build build-automation cmake"], "4028458": ["Default null values in stored procedures are not Null", "I have been testing a faulty procedure, and I realised that the problem is Null values being passed in are not being defaulted to the procedure value...\n\nOutput \n\nI assumed that Null values were defaulted to the value is assigned to in the stored procedure parameter, but this shows if it exists as a parameter it takes the value you pass in. Is there a setting in SQL server that can change this behaviour? \n", "Create Procedure TestVarcharMaxIsNull\n(@myVar varchar(MAX) = '')\nas\nSelect 'Hello' Where @myVar Is Null\nGo\nExec TestVarcharMaxIsNull Null\nGo\nExec TestVarcharMaxIsNull ''\nGo\nExec TestVarcharMaxIsNull \nGo\nDrop Procedure TestVarcharMaxIsNull\n", "sql sql-server stored-procedures null default"], "5135882": ["Aligning text vertically in Tikz", "I need to know the correct way of handling vertical alignment in TIKZ. Let me elaborate an example:\n\nWhich results in this:\n\nI just want to know is ther any way to force the lines into a bottom line here so that and the left would be aligned? Should I use phantom to do so or is there any thing better I am unaware of?\nThe next point is about the word \"fake\" in the top right corner. I want it over the \"2\" but I have placed it as a node. I could use to have a \"fake\" above the \"2\" but it pushes the line to the left which is not desired. And as you might have guessed I also need a line between \"fake\" and \"2\" should I use ? \n", "\\documentclass{article}\n\\usepackage{amsmath,tikz}\n\\begin{document}\n\\begin{tikzpicture}\n \\node (A1) at (0,4) {($\\overset{\\surd}{1}$ \\indent 2)};\n \\node (B1) at (0,3) {($\\overset{\\surd}{3}$ \\indent 4)};\n\n \\node (A) at (2,4) {$\\phi_1$} ;\n \\node (B) at (2,3) {$\\phi_2$} ;\n\n \\draw [->, line width=1pt] (A) -- (A1)\n node [near start, above]\n {\n \\footnotesize{R1}\n };\n\n \\node (A2) at (6,4) {$7^1$ \\indent $8^1$ \\indent $3^1$ \\indent $4^1$\\indent $\\parallel$ 2};\n \\node (B2) at (6,3) {$1^3$ \\indent $2^3$ \\indent $5^3$ \\indent $6^3$\\indent $\\parallel$ 4};\n\n %fake caption\n \\node at (8,4.5) {fake};\n\n\\end{tikzpicture}\n", "tikz-pgf"], "1798499": ["ld: library not found for -lz", "This is driving me crazy, when i try to compile on the simulator, everything is ok, but on the device i got this error:\n\nPlease help me understand the source of the problem:\n\nEDIT:\nI did import the libz.1.1.3.dylib framework:\n\nThe only libz that i got in the Linked frameworks is the \n\n", "ld: library not found for -lz\nCommand /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1\n", "objective-c ios xcode4.2"], "4487775": ["Is there an elegant work around to concatenation?", "I am writing a mad libs program for fun and to just program something. The program itself is pretty straight forward, but I find myself resorting to several concatenations due to the nature of the game where you place user given words into a sentence. Is there an elegant work around to resort to less concatenations or even eliminate them for something more efficient? I know in the end it will make no difference if I use concatenations or not, but I am curious if there is a more elegant way to write this program.\nUpdate: I am using java, but if there is a general solution to escaping concatenation that would be appreciated too.\n", "", "java string concatenation"], "2974926": ["Resharper: Ctrl-Backspace deletes just one subword of a CamelCaseWord", "When I have the text:\n\nAnd I press Ctrl-Backspace, I get:\n\nAnd I want:\n\nThis issue exists only on my work PC. It must be misconfigured. What is the setting that I can change to get the \"normal\" behavior?\nNote: I verified that this is a R# problem by suspending R#. The problem went away.\n", "new ResharperFeature\n", "visual-studio visual-studio-2010 resharper keyboard-shortcuts"], "5114226": ["UITableView visible cells not refreshing on ReloadData when changing device orientation", "I am trying to get all the cells in my UITableView to call the CellForRowAtIndexPath when I rotate the device. I call a [self.tableView reloadData] in the willRotateToInterfaceOrientation method. This gets called (i've NSLog-ed it). But when I rotate the device CellForRowAtIndexPath only gets called for new rows that need displaying. But I want to rearrange the UIImageViews in the visible cells as well. However these never get updated.\nCan anyone help?\nCheers\nNick\n", "", "uitableview refresh orientation"], "3629940": ["Android: right way to manage navigation history with an actionbar?", "With ActionBarSherlock I'm using a SherlockFragmentActivity, and a navigation by lists. So when the user selects different views (= tabs), different fragments are displayed.\nThe first problem I had was that history was not written, which meant that even after a long navigation using the list a back button was quitting. I fixed it by adding addToBackStack to the fragment transaction I use to replace the fragment.\nNow the problem I have is that it is necessary to press back twice for each tab. I believe this is because the back will go through the same path and creates again an entry in the history.\nSo what's the correct way to handle the navigation list while still writing a nice history?\n", "", "android history actionbarsherlock"], "5952935": ["Imap search criteria - imaplib (python)", "I'm using imaplib for python and I came across a strange behavior. I don't really know if this is an imap ou imaplib problem/feature, so I'm hoping anyone can give me some lights.\nDuring my project I do several searchs on my gmail boxes. Imagine that I do an imap search with the following criteria:\n((since \"date A\") (before \"date B\"))\nNow, if I have emails since \"date A\", imap(lib) does the expected thing: returns the emails since \"date A\" and before \"data B\". Lovely.\nHowever, if I have NO emails since \"date A\", imap(lib) simply ignores that and returns all emails before \"date B\" even they are not since \"data A\"!\nIs this the expected behavior for imap? I don't really think so, it makes no sense at all.\nI really need the ability to search for any given period and I'm hopping not having to pool the box before every search just to know the last email's date.\nAny idea? Am I missing something here?\n", "", "python gmail imap imaplib"], "2232239": ["how sort a vector list using collecton frameworks java", "I am trying to sort a list using the Java Collections frameworks.\nThis is my code...\n\nHere is what I have done, but I am stuck on how to proceed further...\n\nThe output should be like this (for river length)...\n\nAnd for river discharge...\n\nCould someone please help me with this problem.\n", "Vector", "java list sorting collections vector"], "3581374": ["Mock MySQL DB for PHPUnit", "I'm trying to build unit tests for my Yii project. \nProblem: MySQL database. I don't want to have to run a MySQL database every time I run the tests as it is slow, unreliable, maybe some team members don't have it set up, etc.\nThere seems to be a way to do a SQLite DB in memory and use that, but the SQL produced by Yii doesn't seem to work on SQLite the same it does on MySQL. I get loads of errors.\nIn short: I want to mock a MySQL database in memory.\nHow can I do this?\n", "", "mysql mocking phpunit"], "3968131": ["Using SharePoint 2010 webparts in a classic .net asp application", "Does anyone have an experience using SP2010 Web Parts in a classic aspx application, assuming you would reference sharepoint dlls? I am referring specifically to the search center web parts?\nThanks\n", "", ".net sharepoint"], "2316925": ["Outlook 2007: How can I auto delete older versions of a message", "I receive autonomous messages via email that provide me a dashboard view of the status of various systems in my company. I want to have outlook automatically move the newest status message to a specified folder and then delete the previous messages in that folder. What is the best way to do this?\n", "", "outlook-2007 rules"], "1805499": ["mailserver mock for integration tests inside cargo", "I've got a web application i'm currently testing on different levels (junit tests, integration tests within cargo container running a tomcat, htmlunit etc.) and i'm facing a problem now.\nWith some input information my web application is generating a zip-file i can download after the process creating it has been finished. At least there was no problem testing different use cases with htmlunit and a cargo container starting all applications and backends needed inside a single tomcat.\nThe new version of my web application is sending (javax.mail) the generated file to a configured email-address (i sent that mail manually before), but i can't figure out how to integration-test what it's sending and if it succeeded.\nIs there any mock-mailserver or sth like that i can easily run inside my cargo testing container, configure it in my application and assert all the mails it has received?\ni don't want to use a static mailserver running outside my testing area, because there are different environments these tests have to run inside (development, hudson, integration-environment etc.) and i would be dependent on its state and availability.\nif not, are there maybe any other solutions? thank you a lot.\n", "", "java integration-testing mailserver maven-cargo"], "5473710": ["How to use wicket render strategy?", "In wicket 1.5, and are being used.\nIs there anyone who can explain these render strategy in details, and give an example of how to use them when coding?\nI don't know where to add these render strategies in my code.\n", "ChildFirstHeaderRenderStrategy", "components render wicket-1.5"], "3088320": ["when should I use _mm_sfence _mm_lfence and _mm_mfence", "I read the \"Intel Optimization guide Guide For Intel Architecture\".\nHowever, I still have no idea about when should I use \n_mm_sfence()\n_mm_lfence()\n_mm_mfence()\ncould somebody give me the explanation ?\n", "", "parallel-processing sse simd"], "1466632": ["OpenLdap Password", "I am using OpenLDAP 2.4.23 on Ubuntu 11.04. Every thing is working fine. I am using other server to authenticate via LDAP and that is working well. At the connecting server I am using a configuration file like this:\n\nIs there any way I can encrypt the password used to bind to LDAP?\n", "[ldap]\nbasedn = ou=Employees,dc=example,dc=com\nbasedn_filter = personStatus=1\nbind_passwd = pass123\nbind_user = cn=admin,dc=example,dc=com\ncache_size = 100\ncache_ttl = 900\nenable = true\nglobal_perms = false\ngroup_bind = false\ngroup_rdn =\ngroupattr = cn\ngroupmember = member\ngroupmemberisdn = false\ngroupname = groupofnames\n#host = ldap.example.com\nhost = 192.168.2.127\nmanage_groups = false\nport = 389\n", "openldap"], "5056691": ["How to force delete a folder or .dll in Windows XP?", "\nPossible Duplicate:\nDeleting \"undeletable\" files in Vista \n\nI am trying to delete a folder in Windows XP but when I do, it says:\n\nDestination Folder Access Denied You need permission to perform this\n action.\n\nIs there a way to force delete this folder? I tried right-clicking the folder, and unchecking the Read-only Attributes property, but when I close the folder properties and reopen it, it is still read-only. I verified that in the Security tab, I do have full control so I should be able to delete it.\nI tried deleting the individual components of the folder and am left with 3 .dll files. When I try to delete these, they give me the same error. How should I stop and delete these .dll files?\n", "", "windows-xp folder delete dll"], "4027563": ["SSAS 2008, Translate Hierarchy members in parent-child hierarchy", "I'm creating my dimensions and parent-child hierarchies using AMO objects. One of the requirements is to translate the hierarchy members into another language.\nWhile accessing the newly created cube in the BIDS, I am able to provide translation for the attributes in Dimension Editor, but I'm not sure how do I do the same for the hierarchy. \nMy DimCompany table has a few fields, including CompanyKey, CompanyParent, CompanyName, CompanyRusName. The last one is to be used to translate attributes and hierarchy members.\nI have provided a couple of screenshots explaining the existing situation. \nUnfortunately, I can't post images, so just a couple of links here: \n\n\"English language - all fine\" http://db.tt/PjshtUKt\n\"Russian language - problems with hierarchy members\"\nhttp://db.tt/4Rf3yM2j\n\nI'd very grateful for any hints and suggestions!\nRegards,\nGaliya\n", "", "translation ssas olap"], "5490868": ["Is there a woot style site for Photo Equipment?", "Besides woot, Chain Love, Bonk Town, anything for photo?\n", "", "equipment-recommendation sales"], "4481136": ["FTP Upload Hook", "\nPossible Duplicate:\nHow to run a command when a directory's contents are updated? \n\nI need to be notified and perform other tasks when a file is uploaded onto my server. Is there any method/system call that will be triggered or anything that I can hook onto?\nI'm using vsftpd as my ftp server.\n", "", "ubuntu ftp vsftpd"], "4467568": ["How to a Co-Administrator in the new Azure portal?", "For adding adding a co-administrator the Howto refers to a \"Hosted Services, Storage Accounts & CDN\" view. But I can't find anything like this in the new portal. \nDoes anyone know how to do this in the new portal? Is there a way to login to the old portal? \n", "", "azure portal"], "917481": ["How do you run Spring 2.5.6 sample apps in Jdeveloper 11g?", "I am trying to run imageDB and jpetstore in JDeveloper 11g. It compiles fine, but it won't run, and the weblogic server throws errors. Does anyone know how to successfully run Spring 2.5.x sample applications in Jdeveloper 11g?\nI get the following error when I try jpetstore sample.\n\n", "Jul 27, 2009 5:03:20 PM org.springframework.web.context.ContextLoader initWebApplicationContext\nSEVERE: Context initialization failed\norg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing\nXML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: Could not initialize class\norg.springframework.aop.aspectj.AspectJExpressionPointcut\n", "spring weblogic oracle11g jdeveloper"], "2231318": ["Open links from non-native app in Safari app", "We are creating a non-native iPhone app that will eventually go through the phonegap process. But what I'm trying to do right now is: We have links that open in Twitter and LinkedIn, but when clicking them they open right in the same app window. Is there any way to force the links to open in the actual Safari app. It looks like this is possible with Objective-C, but I don't see how to do it with HTML. Thanks!\n", "", "iphone ios mobile-safari"], "412240": ["Skype: How to delete an account completely?", "I'm looking for a way to delete a Skype account? using Skype 5.x and Windows 7..\n", "", "windows skype"], "3968720": ["Javascript equivalent of assign by reference?", "Is there any way I can be less verbose in Javascript by pointing a local variable by to an objects property?\nFor instance in PHP I can do this:\n\nIt's not a very good example but you get the idea.\nI want to copy this behaviour in Javascript. I'm quite often having to go quite deep into objects and it's getting quite annoying having to do:\n\nIt would be a lot easier to read and a lot easier to type:\n\nI know I should really know this already, but I'm just advancing to \"advanced novice\" in Javascript.\n", "$obj->subobject->property = 'Foo';\n$property =& $obj->subobject->property;\n$property = 'Bar';\necho $obj->subobject->property;\n// output 'Bar'\n", "php javascript pointers"], "5587409": ["How often do you reevaluate and upgrade your development environment and dev. tools?", "I was curious how often other software developers reevaluated their development environments and tools. I used to work at a large corporation with rigid toolsets that everyone hated, but could do nothing about. So nobody ever really updated their development environments because we couldn't in that environment.\nNow that I'm in my own start-up I find I can spend endless time evaluating new tools and development environments, but that I really shouldn't and can't afford to. I've committed to spending 1 day a month looking at new development tools and trying them out to see if it is worth switching. \nHow often do you try out new IDE's, editors, bug tacking tools, debuggers? Or update to newer versions of your own?\n", "", "ide development-environment"], "2148203": ["Django raw_id_field style widget for list_filters", "Is there a raw_id_field style widget for use when rendering list_filter fields on Django admin changelist pages?\nWhen I add a foreign-key based field to a Django modeladmin list_filter, Django renders every row in the associated table to the right-hand panel in a select box. If that table is large (e.g. if it points to the User table) this tends to dramatically slow down load time as Django works to renders thousands of rows. Even after it finishes rendering, it can be difficult finding your selection in the huge dropdown.\n", "", "python django django-admin"], "2453260": ["Using Piezo electric sensors for Touch input... gesture profiles in C", "I'm working on a project that takes touch input from Piezo-electric sensors and turns those gestures into MIDI commands that are sent to an external device. I've worked through all of the nuances of our ADC and have managed to build it out from front to back using a simple \"tap\" as a command. A \"tap\" would look something like this\n\nAnd here's what the tap \"profile\" I built looks like for detection on our DSP chip (in C)\n\nshort tap_detect(float *x, int len){\n\n}\nSo my question is, where would I start for writing a similar \"profile\" for something like a circle? or a swipe? I'm just not sure where to start with this.\n", "/* Tap Detection Function */\n", "c hardware signal-processing gesture"], "4016429": ["Problems with Rake and Ruby on Rails", "I have been trying to run rake but it seems that ever since I updated ruby gems rake is failing.\nThis morning I ran:\n\nAnd ever since, rake has been failing with the following error:\n\nI have been reading about this problem and it seems that there is a problem with rake 0.9.x that breaks rails but when I check my rake version, I am running 0.8.7:\n\nI have tried uninstalling rake and reinstalling it, using bundler, etc and at this point I am pretty stuck. Thanks in advance.\nEdit:\nMy Rakefile (located in my app root directory)\n\n", "gem update --system\n", "ruby-on-rails database rubygems rake rakefile"], "2900398": ["Help required SIGQUIT in Bash", "/tmp/trap.sh\n\n/tmp/trap2.sh\n\nWhen I run /tmp/trap.sh, and allow it to call trap2.sh, SIGQUIT is only caught by the parent process (trap.sh). The \"echo signal caught in child\" is not echoed. I assume, then, that the child does not catch SIGQUIT.\nIs there a reason the child does not catch QUIT? It does catch INT\n", "#! /bin/bash\necho parent\ntrap signalCaught HUP INT QUIT TERM\n\nsignalCaught() {\n echo \"SIGNAL DETECTED I am the parent.\"\n}\n\nSLEEP=10\nfor i in $(seq $SLEEP -1 0); do\n echo \"$i\"\n sleep 1\ndone\n\n/tmp/trap2.sh 2>&1 | tee -ai /tmp/garbage.txt\n\necho \" --- terminating \\\"$0\\\" \"\n", "bash gnu signals"], "5110485": ["How to create a DataProvider using specific elements from an XML object in Flash AS3", "I have this XML (Flash/AS3):\n\nI want to create a DataProvider containing the elements (for use in a datagrid).\nI thought this would work:\n\nBut I get this error:\n\nWhat am I doing wrong?\n", " <channel>\n <title>...</title>\n <description>...</description>\n <item><summary>...</summary><detail>...</detail></item>\n <item><summary>...</summary><detail>...</detail></item>\n ...\n </channel>\n", "xml flash actionscript-3 dataprovider"], "3558866": ["setting size of JFrame using Dimension.setSize", "I have a gui app where I need to set the size of the main JFrame to 80% of screen\nwidth and 90% of screen height.I tried this\n\nIs this the correct way? I am not very familiar with gui app design..and I thought \nI could use the Dimension.setSize(double width, double height) this way.\nThe print statements caused this output..\n\nWell,the newheight and newwidth are not exactly 80% or 90% of the width,height values.\nAny suggestions for improvement welcome\nthanks\nmark\n", "public class JFrameDemo extends JFrame{\n public JFrameDemo(String title) throws HeadlessException {\n super(title);\n setLayout(new GridBagLayout());\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\n int height = screenSize.height;\n int width = screenSize.width;\n screenSize.setSize(width*(0.80), height*(0.90));\n int newheight = screenSize.height;\n int newwidth = screenSize.width;\n\n //Then I put some print statements in the code\n System.out.println(\"height=\"+height);\n System.out.println(\"width=\"+width);\n System.out.println(\"0.80*height=\"+(height*0.80));\n System.out.println(\"0.90*width=\"+(width*0.90));\n System.out.println(\"newheight=\"+newheight);\n System.out.println(\"newwidth=\"+newwidth);\n\n this.setSize(newwidth, newheight);\n this.addWidgets();\n this.setVisible(true);\n }\n\n ...\n}\n", "size jframe"], "592340": ["iPhone contacts not syncing with Mac OS X Address Book", "I have an iPhone 4 and Mac\u00a0OS X Lion. In iTunes I have checked Info > Sync Address book contacts.\nHowever when I add a new contact to Address Book and click on sync, I do not see the new contact on my iPhone.\nIf I add a new contact on my iPhone, even after syncing I do not see it in my Address Book.\n", "", "osx itunes sync iphone address-book"], "63414": ["Why do I constantly get ActivityNotFound exceptions?", "I'm a novice Android programmer, and to help me understand how Intents really work, I wanted to put together a small Activity which would let the user call startActivity() with any action and data they want. I tried many different combinations, including \"android.intent.action.VIEW\" and \"http://www.google.com\". No matter what combinations I use, I always get an ActivityNotFoundException. Any ideas as to why?\nThe code in my only Activity is below:\n\nThe results of adb shell logcat from the time of starting the app to just after touching 'Force close' are below.\n\n", "public class TestingIntents extends Activity \n{\n /** Called when the activity is first created. */\n @Override\n public void onCreate(Bundle savedInstanceState) \n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button goButton = (Button) findViewById(R.id.button);\n\n goButton.setOnClickListener(new ClickListener());\n }\n\n private class ClickListener implements OnClickListener\n {\n @Override\n public void onClick(View arg0) \n {\n String id = ((EditText) findViewById(R.id.intent)).getText().toString();\n String data = ((EditText) findViewById(R.id.data)).getText().toString();\n\n Builder builder = new Builder();\n builder = builder.path(data);\n\n Uri path = builder.build();\n\n Intent i = new Intent(id, path);\n startActivity(i);\n }\n }\n}\n", "android exception activity"], "1809136": ["YouTube Analytics API - How are multiple views of same video reported?", "I have a test account set up for testing out the YouTube Data & Analytics APIs. Currently there is only one video, with a length of 2:27.\nI noticed that when I watch the video in full (as an anonymous user), and then re-watch the same video (by restarting the video, not refreshing the page) in the same browser session, that some of the Analytics API reported values seem off. This is what is reported:\n\nI would have expected the values to look more like this:\n\nSeems like should be capped at 100%.\nIs this how it is expected to work, or is this a bug (I wanted to run it by the community before filing)?\n", "views: 1\nuniques: 1\naverageViewPercentage: 199\naverageViewDuration: 292\n", "youtube-api analytics"], "5701692": ["Minimum and maximum of a field in cakephp and mysql", "I am trying to build a search function for a cakephp and mysql site. Selecting different parameters like price of the product or the length triggers an ajax call which returns the number of matching results. I want to extend the returned results with the the minimum and maximum values for the lengths and prices. I tried doing this, http://bin.cakephp.org/view/1004813660 . Using the first 4 finds is too time consuming. The last one functions locally, but I get the error;\n1140 - Mixing of GROUP columns (MIN(),MAX(),,...) with no GROUP columns is illegal if there is no GROUP BY clause`\nremotely, due to ONLY_FULL_GROUP_BY being on.\nIs it possible to use the last option with some improvements, or can I switch off ONLY_FULL_GROUP_BY? \n", "", "mysql cakephp aggregate-functions max min"], "6009745": ["Validates acceptance always failing", "I can't see what I'm missing, but something's obviously not right. I might be being blind, but any thoughts appreciated\nIn model:\n\nTrying a few options:\n\n\na = Factory(:blog_agreement)\n => #\n\n\n\n", "validates :terms, :acceptance => true, :on => :update\n", "ruby-on-rails validation"], "1798564": ["Configure DRBD and Heartbeat on Cpanel", "I am working to setup a high availability cPanel server. I have two servers on same data center. The cPanel server has got 150 websites and 15 ip addresses where 1 is main shared ip and 14 other dedicated IP's. Can DRBD and Heartbeat be used to make s system where the data is properly synced and when one server goes down, the websites should start loading from the other server. Also all the IP's should be moved to the other server when one fails. Is this possible?\nIf possible will the system crashes with cpanel normal update?\n", "", "cpanel drbd heartbeat"], "3608193": ["How to ovverride UINavigationBar appearance if already customized", "In the application delegate within my application I call the following method:\n\nThis code allow to customize all the navigation bars within the application. Each bar becomes green since the image I use is green.\nNow my goal is to ovveride the above configuration for a specific navigation bar.\nIn particular, during application lifecycle, I open a modal controller using presentation style. This controller is presented within a . Since I need also to display the navigation bar attached with that , I would like to know how it is possible to customize that bar, without changing the global configuration I set in the application delegate.\nI've tried to set both the property of the navigation bar (presented modally) to and the to , but they don't work. Only barbutton items are affected.\nThank you in advance.\nP.S. I'm using iOS 5\n", "- (void)customizeAppearance \n{\n UIImage *gradientPortrait = [[UIImage imageNamed:@\"gradient_portrait\"] \n resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];\n\n UIImage *gradientLandscape = [[UIImage imageNamed:@\"gradient_landscape\"] \n resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];\n\n [[UINavigationBar appearance] setBackgroundImage:gradientPortrait \n forBarMetrics:UIBarMetricsDefault];\n [[UINavigationBar appearance] setBackgroundImage:gradientLandscape \n forBarMetrics:UIBarMetricsLandscapePhone];\n}\n", "ios ios5 uinavigationbar styling appearance"], "2822552": ["How do dynamically set layout parameters in Android?", "I have these text fields which I generated dynamically. But I can't seem to set layout parameters for them. Please tell me what I'm doing wrong.\nI'm able to generate the fields without layout parameters. However, If I use LayoutParams, it doesn't even get generated. \nThanks\nCode:\n\n", " TableLayout table = (TableLayout) findViewById(R.id.TableLayout1);\n\n TableRow tr = new TableRow(this);\n LinearLayout.LayoutParams trparams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n tr.setLayoutParams(trparams);\n\n cg[i] = new EditText(this);\n weight[i] = new EditText(this);\n cg[i].setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);\n weight[i].setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);\n\n //Here's where it goes wrong. By adding fieldparams, the text field doesn't even get generated.\n LinearLayout.LayoutParams fieldparams = new LinearLayout.LayoutParams(10, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f);\n tr.addView(cg[i], fieldparams);\n tr.addView(weight[i], fieldparams);\n\n table.addView(tr);\n", "android layout dynamic parameters edittext"], "2208924": ["In maven, how can I execute a SQL if I detect the table structure is missing?", "I'm modifying an existing maven2 project and I would like to create the database structure if I notice it is missing. \nI sort-of know how to do this in ant, I could query the database and if the table is missing I could execute the query. \nBut, maven is a different thing. I found a SQL plugin to run the script, but I don't know where or how to detect if the database structure is missing? Also where in the \"goals\" should I check for this?..\nI would put this on the test. \nCan someone point me in the right direction?\n", "", "maven-2 automated-testing executequery"], "4955527": ["UINavigationBar back button does not appear", "I have a navigationBar, with a UIImage on it's title, like this:\n\nWhen i select a row, the \"back\" button does not appear. Why?\nI have the exact same code on other's viewControllers, and it appears.\nI don't understand why...\nThanks,\nRL\n", "self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@\"top_logo.png\"]];\n", "iphone uinavigationbar uibuttonbaritem"], "4961575": ["Enable FIPS mode on CISCO Router", "Can someone please tell me how to enable/disable FIPS mode on CISCO Router?\n", "", "cisco"], "4135790": ["Added benefit of a pointer, when to use one and why", "I'm learning C++ at the moment and though I grasp the concept of pointers and references for the better part, some things are unclear.\nSay I have the following code (assume Rectangle is valid, the actual code is not important):\n\nNow, the actual Rectangle object isn't passed, merely a reference to it; it's address.\nWhy should I use the 2nd method over the first one? Why can't I pass rectTwo to changestuff, but *rectTwo? In what way does rectTwo differ from rect?\n", "#include <iostream>\n#include \"Rectangle.h\"\n\nvoid changestuff(Rectangle& rec);\n\nint main()\n{\n Rectangle rect;\n rect.set_x(50);\n rect.set_y(75);\n std::cout << \"x,y: \" << rect.get_x() << rect.get_y() << sizeof(rect) << std::endl;\n changestuff(rect);\n\n std::cout << \"x,y: \" << rect.get_x() << rect.get_y() << std::endl;\n Rectangle* rectTwo = new Rectangle();\n rectTwo->set_x(15);\n rectTwo->set_y(30);\n std::cout << \"x,y: \" << rect.get_x() << rect.get_y() << std::endl;\n changestuff(*rectTwo);\n std::cout << \"x,y: \" << rect.get_x() << rect.get_y() << std::endl;\n std::cout << rectTwo << std::endl;\n}\n\nvoid changestuff(Rectangle& rec)\n{\n rec.set_x(10);\n rec.set_y(11);\n}\n", "c++ reference pointers oop"], "3468885": ["Cursor Loader auto-requery on Spinner onSelectedItem call", "I'm using a spinner as an actionbar item (also using tab navigation with swipes). \nI have 2 listFragments (accessed via the tabs) that load data using a loader.\nI want the loader to requery every time I select a different item in the spinner (which works on the activity level).\nThat's one of the fragment's loader's call, selectedNumber is a String that should be passed from the spinner onSelectedItem to the fragment (I don't know how yet, but this should be easy).\n\nIs there a way I can force the loader to requery the content provider or i have to cancel the fragment and build another one with the new query?\n(some quick advice on how to pass the String from the activity to both the fragment would be cool) \n", " public Loader<Cursor> onCreateLoader(int id, Bundle args) {\n String selection= MyContentProvider.Data.E_NUMBER +\"=\";\n String[] selectionArgs= {numberSelected};\n\n return new CursorLoader(getActivity(), MyContentProvider.Data.CONTENT_URI_EVENTS,\n null, selection, selectionArgs,\n Data.E_ID + \" DESC\");\n}\n", "android android-fragments android-spinner android-loadermanager android-fragmentactivity"], "5182447": ["Creating and Editing word document by using a program", "I was wondering if it is possible to create a Microsoft Word Document programmatically (through Java, C#, or another language). Is it also possible to do things like adding text or changing the font?\nI know that we can start other programs from the command prompt, but what I want to do is to create the document programmatically without using the UI of Microsoft Word.\nCan this be done?\n", "", "c# java programming-languages"], "3467037": ["How to wrap an interactive tclsh session with TclDevKit?", "How can I wrap an interactive tclsh session with TclDevKit?\nWith TclPro this:\n\nwraps , and when I call it launches an interactive tclsh session. When typing from that shell it calls the wrapped file. So tells TclPro not to use any startup script.\nHow can I do the same with TclDevKit? I have tried , but it had no effect.\n", "prowrap -out shell -uses tclsh -startup \"\" some.tcl\n", "tcl wrapping interactive tcldevkit"], "5110993": ["Boost Test with CMake - undefined main", "I'm having trouble building a little program that uses Boost.Test on my Mac with a Boost installed by MacPorts at \nHere's my minimal source file, :\n\nand my :\n\nand an excerpt of from :\n\nAs you can see, it doesn't know how to link to Boost library. So I try adding to CMakeLists.txt:\n\nBut I just get:\n\nFrom lots of trial and error, I've found that manually running this works:\n\nBut after hours of fiddling, I can't get it to build from CMake. I don't care whether it links dynamically or statically, I just want it to work.\n", "/opt/local/lib/", "boost cmake boost-test"], "415738": ["Some songs in my music collection are quieter than others, what can I do?", "In my collection of music I have some songs which seem to be compressed nicely. But in addition to those I have songs which are overly quiet compared to the louder compressed songs.\nSo maybe the problem isn't compression but average volume. Would the Dynamic Range Compressor in VLC work for this type of problem or would I have better luck using external speakers and running it through a guitar compressor?\n", "", "linux audio vlc"], "2260060": ["Order By, Group By - Problems", "Ok, so here's the issue. Currently I'm using the symfony framework to develop a web app. I'm using MySQL in the backend but want to keep my queries in their doctrine format to avoid any problems if I ever need to change databases.\nIn one section of the web application I'm looking for the last comment associated by any distinct user, sorted by the date. There can be multiple comments from many users all on the same date and time, but this query should only grab the last comment based on the date.\n\nAbove is an example table. The query I run should return the data as follows.\n\nThe least amount of sub queries would obviously be better. It would be possible that the date_time could be lower on a future comment by a user.\nIt seems simple but it is proving rather difficult...\n", " comments table\n -----------------------------------------------------------------\n | comment_id | user_id | comment | date_time |\n -----------------------------------------------------------------\n | 1 | 2 | Test_1 | 2010-01-01 00:00:00 |\n | 2 | 2 | Test_2 | 2010-02-01 00:00:00 |\n | 3 | 2 | Test_3 | 2010-03-01 00:00:00 |\n | 4 | 4 | Test_4 | 2010-04-01 00:00:00 |\n | 5 | 4 | Test_5 | 2010-05-01 00:00:00 |\n | 6 | 4 | Test_6 | 2010-06-01 00:00:00 |\n | 7 | 3 | Test_7 | 2010-07-01 00:00:00 |\n | 8 | 2 | Test_8 | 2010-08-01 00:00:00 |\n | 9 | 3 | Test_9 | 2010-09-01 00:00:00 |\n -----------------------------------------------------------------\n", "sql symfony greatest-n-per-group order-by"], "2809687": ["SqlAlchemy: UPDATE and INSERT order wrong with foreign key to self", "I have a table which has a foreign key relationship with itself (on a compound primary key)\nE.g. something like the following:\n\nIn SqlAlchemy, I create a new (pending) graph object 'new_obj', and assign it to the other attribute of an existing persistent object, i.e.:\n\nWhen I commit the session, SqlAlchemy issues the UPDATE on the existing object before it issues the INSERT to create the new_obj. My database rightly complains on the UPDATE that it can't find the foreign key (as new_obj hasn't been inserted yet).\nI thought SqlAlchemy was supposed to be smart about the ordering of SQL?\nI'm using version 0.5.4\nIs there a way of manually ordering the operations?\n", "CREATE TABLE graph (\n start_id character varying(50) NOT NULL,\n end_id character varying(50) NOT NULL,\n weight integer,\n other_start_id character varying(50),\n other_end_id character varying(50),\n CONSTRAINT graph_pkey PRIMARY KEY (start_id, end_id),\n CONSTRAINT graph_other FOREIGN KEY (other_start_id, other_end_id)\n REFERENCES graph (start_id, end_id) MATCH SIMPLE\n ON UPDATE SET NULL ON DELETE SET NULL,\n)\n", "sqlalchemy"], "2375105": ["Tomcat memory consumption is more than heap + permgen space", "I am observing a mismatch in Tomcat RAM consumption between what the OS says and what jVisualVM says.\nFrom htop, the Tomcat JVM is has 993 MB of resident memory\nFrom jVisualVM, the Tomcat JVM is using\n\nHeap Max: 1,070,399,488 B\nHeap Size: 298.438.656 B\nHeap Used: variable, between 170MB and and 270MB\nPermGen Max: 268,435,456 B\nPermGen Size: 248,872,960 B\nPermGen Used: slightly variable, around 150MB\n\nFrom my understanding the OS memory consumption should be Heap Size + PermGen Size ~= 522 MB. But that's 471 MB less than what I'm observing. \nAnyone got an idea what am I missing here? \nPS: I know that my max heap is much higher than what is used, but I'm assuming that should have no effect if the JVM does not use it (i.e. Heap Size is lower).\nThanks!\nMarc\n", "", "java tomcat memory jvm"], "4893972": ["How can I deploy a scalable, reliable haproxy cluster on Amazon EC2?", "We need some more advanced functionality than ELB provides (mostly L7 inspection), but it's not obvious how to handle things like heartbeat and high availability with something like haproxy using EC2. There's a high likelihood we'd need 3 or more haproxy nodes in the cluster, so simple heartbeat between two nodes isn't going to work.\nSeems like having a heartbeat'd layer in front of the haproxy nodes would be the way to go, possibly using IPVS, but handling the configuration changes as the EC2 cluster changes (either via intentional changes, like expansion, or unintentional, like losing an EC2 node) seems non-trivial. \nPreferably the solution would span at least two Availability Zones.\nIn answer to Qs: No, sessions aren't sticky. And yes, we'll need SSL, but that could in theory be handled by another setup entirely - we're able to direct SSL traffic to a different location than non-SSL traffic.\n", "", "amazon-ec2 load-balancing haproxy amazon-web-services heartbeat"], "4760919": ["OnTopReplica alternative for Linux Mint", "OnTopReplica is a Windows application that allows you to clone a window then crop a subregion of it and keep it always on top (useful if you're trying to keep a YouTube Video always showing).\nIs there any alternative for Linux installations (specifically Ubuntu or Linux Mint)? I tried looking for some sort of Compiz plugin that could emulate this, but I'm not sure where to start...\n", "", "linux-mint always-on-top"], "5386007": ["How do I update existing STDOUT?", "I need to print a bunch of strings to STDOUT. Instead of each string going on a newline, though, I want to have just one line that gets updated with each new string.\nAny ideas?\n", "", "bash shell stdout"], "921858": ["A recursive remove directory function for PHP?", "I am using PHP to move the contents of a images subfolder\n\nGalleryName/images/\n\ninto another folder. After the move, I need to delete the GalleryName directory and everything else inside it. \nI know that won't work unless the directory is empty. I've spent a while trying to build a recursive function to starting from the top and then if it's a file and if it's a directory, then each empty directory as I go. \nSo far it's not working exactly right, and I began to think -- isn't this a ridiculously simple function that PHP should be able to do? Removing a directory?\nSo is there something I'm missing? Or is there at least a proven function that people use for this action? \nAny help would be appreciated.\nPS I trust you all here more than the comments on the php.net site -- there are hundreds of functions there but I am interested to hear if any of you here recommend one over others.\n", "rmdir()", "php recursion directory remove"], "1701572": ["android : programmatically show next view in viewpager", "I created a viewpager and everything is working fine, however I want to have a previous next button outside of viewpager which can be used to navigate inside viewpager, how can I go to next Item on viewpager without swiping manually.\n", "", "android android-viewpager"], "4441383": ["the value of __block variable is not changed", "The code below will load the value of the asset asynchronously. I wait for it using while loop.\n\nIf NSLog statement is commented like the code above, the last NSLog will not be called.\nIf NSLog statement is NOT commented, the last NSLog is called.\nThe block and the code outside the block run on different threads and both of which are not main thread.\nWhat is the reason for that?\n", " AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:aAudioLink options: nil];\n [asset loadValuesAsynchronouslyForKeys:keys \n completionHandler:^{ \n canExit = TRUE;\n }];\n\n while (canExit == FALSE) {\n // NSLog (@\"canExist = FALSE\"); \n }\n\n NSLog(@\"canExist = TRUE\");\n", "iphone multithreading thread-safety objective-c-blocks avurlasset"], "2147418": ["using show() and close() from matplotlib", "I am experiencing some problems with matplotlib.... I can't open 2 windows at once to display a image with show(), it seems that the script stops at the line i use show and doesn't continue unless I close the display manually. Is there a way to close the figure window within the scrip?\nthe following code doesn't run as I want:\n\nI expected the first window to close after 1 second and then opening the second one, but the window doesn't close until I close it myself. Am I doing something wrong, or is it the way it is supposed to be?\n", "import matplotlib.pyplot as plt\nfrom time import sleep\nfrom scipy import eye\n\nplt.imshow(eye(3))\nplt.show()\nsleep(1)\nplt.close()\nplt.imshow(eye(2))\nplt.show()\n", "python matplotlib close show"], "3485980": ["Can someone confirm: BigDecimal not rendered with pattern", "I'm having trouble rendering a BigDecimal.ZERO, can someone confirm this does not work for you too??\n\nindex.xhtml:\n\nthis should render as \"0,00\". But my output is just \"0\"!!\nJBoss AS7.0.1, latest eclipse, ie8\ntyvm!\n", "@Model\npublic class Facade {\n private BigDecimal number = BigDecimal.ZERO;\n\n\n public BigDecimal getTmp() {\n return tmp;\n }\n\n public void setTmp(BigDecimal tmp) {\n this.tmp = tmp;\n }\n}\n", "java jsf"], "3460450": ["google.maps.event.addListener in loop always show last element data", "my problem are when my for loop take information, always in infoWindow.setContent show last loop element data and also id. i looked for answer in stackoverflow and apply some solutions, but results same. marks on map showing well direction and infoWindow onclick work.\nplease help me, maybe u can see, what i do wrong. i stuck.\nthank you in advance.\nmy html code.\n\n\n\nmy jquery code\n$(window).load(function()\n {\n\n", " <div id=\"map_canvas\" class=\"left\"></div>\n\n<div id=\"addresses\" class=\"right\">\n <ul id=\"addresses_list\">\n <li id=\"address1\" data-id=\"0\" class=\"list\" address=\"St. Louis, MO\" contex=\"a <br /> <a href='#info' id='marketing_button' class='abutton'>daugiau</a>\" latlng=\"-25.363882,131.044922\">St. Louis, MO asd</li>\n <li id=\"address2\" data-id=\"1\" class=\"list\" address=\"Chicago, IL\" contex=\"adf\" latlng=\"-26.363882,121.044922\">Chicago, IL asd</li>\n <li id=\"address3\" data-id=\"2\" class=\"list\" address=\"Denver, CO\" contex=\"bb\" latlng=\"-27.363882,141.044922\">Denver, CO asd</li>\n", "events google for-loop maps"], "5888639": ["Formatting Microsoft Chart Control X Axis labels for sub-categories to be like charts generated in Excel", "I am having issues attempting to replicate a chart that has been generated in Microsoft Excel 2007 by using the Microsoft Chart Control for .Net\nThe chart is showing the TOP 5 entries for each Month (each month could have a different 5 entries) of the year and then showing a breakdown of some metrics\nI can get the data perfectly fine, the issue comes down to the fact that in the Excel chart it has formatted the X-Axis labels as shown in the following image:\n\nWhich is how we want the axis formatted so that each Month name is only listed once for the 5 sub categories that are for that month.\nBut I do not know how to reproduce this using the Microsoft Chart Control, when I use the same data for the chart control it formats the X-Axis as (ignore colors and such):\n\nI have bound the data so that the XAxis value is \"January AAA-BBB\", I'm thinking that maybe I need to separate out the Month portion into some other axis value that can be formatted/grouped separately.\nAny help would be appreciated. \n", "", "c# asp.net control charts"], "5797513": ["Error appliying hang figure caption", "I use the report class, and the package to get the result:\n\n\nand I get the error message :\n\nI put the latex command in the lyx preamble and get that error message. \nthe code works well in TeXmaker, but get the error message in Lyx. \nthe code for compile in TeXmaker : \n\nend the result is below ;\n\n", "caption", "captions lyx package-options"], "4773133": ["how to remove bottom gray bar from Three20's TTThumbsViewConroller?", "I'm using Three20 for a viewing Thumbnails of Pictures in an album. everything works fine but i'm not able to remove the Gray bar at the bottom of the Navigation Bar.\nAnyone who knows how to remove this bar?\n\n", "", "xcode uinavigationbar thumbnails three20 ttthumbsviewcontroller"], "1188762": ["How to turn off the LCD while taking long-exposure photos?", "I'm using a Canon SX210 IS with CHDK. I know that capturing long exposition photos is a \"battery draining\" process, but it could be better. Why should the LCD's backlight be on while taking the photo? It might be a bug of CHDK. Otherwise, does anybody know how to turn the backlight off??\n", "", "canon long-exposure lcd backlight chdk"], "1794729": ["Debugging my camera app only works if i put a breakpoint", "i have made a simple camera project, my problem is the next, when i run it it sends me camera error 100, if i debug it sends me the same error but if i debug it putting a breakpoint in surfaceChanged of my preview surface after resume with f8 the project works without camera error 100.\nSo i suppose that must be something with camera initialization so when i use the breakpoint it has time to initialize correctly, but I don't know how to solve this.\nAny clue about this?\nhere is my code: the breakpoint is in mCamera.StopPreview(); into surfaceChanged\n\n", "public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback {\n private static final String TAG = \"CameraPreview\";\n private SurfaceHolder mHolder;\n private Camera mCamera;\n\n\n public CameraPreview(Context context, Camera camera) {\n super(context);\n Log.d(\"Function\", \"CameraPreview constructor iniciado\");\n mCamera = camera;\n\n // Install a SurfaceHolder.Callback so we get notified when the\n // underlying surface is created and destroyed.\n mHolder = getHolder();\n mHolder.addCallback(this);\n // deprecated setting, but required on Android versions prior to 3.0\n mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);\n }\n\n public void surfaceCreated(SurfaceHolder holder) {\n // The Surface has been created, now tell the camera where to draw the preview.\n Log.d(\"Function\", \"SurfaceCreated iniciado\");\n try {\n mCamera.setPreviewDisplay(holder);\n mCamera.startPreview();\n\n } catch (IOException e) {\n Log.d(TAG, \"Error setting camera preview: \" + e.getMessage());\n }\n }\n\n public void surfaceDestroyed(SurfaceHolder holder) {\n // Surface will be destroyed when we return, so stop the preview.\n Log.d(\"Function\", \"SurfaceDestroyed iniciado\");\n\n }\n\n public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n // If your preview can change or rotate, take care of those events here.\n // Make sure to stop the preview before resizing or reformatting it.\n Log.d(\"Function\", \"surfaceChanged iniciado\");\n if (mHolder.getSurface() == null){\n // preview surface does not exist\n return;\n }\n\n // stop preview before making changes\n try {\n mCamera.stopPreview();\n } catch (Exception e){\n // ignore: tried to stop a non-existent preview\n }\n\n // set preview size and make any resize, rotate or\n // reformatting changes here\n\n\n // start preview with new settings\n try {\n mCamera.setPreviewDisplay(mHolder);\n mCamera.startPreview();\n\n } catch (Exception e){\n Log.d(TAG, \"Error starting camera preview: \" + e.getMessage());\n }\n }\n}\n\npublic class CameraActivity extends Activity {\n\nprivate Camera mCamera;\nprivate CameraPreview mPreview;\nprivate Target_Frame tFrame;\n\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n // TODO Auto-generated method stub\n super.onCreate(savedInstanceState);\n Log.d(\"Function\", \"onCreate iniciado\");\n setContentView(R.layout.camera_layout);\n\n\n\n\n mCamera=getCameraInstance();\n mPreview=new CameraPreview(this, mCamera);\n tFrame=new Target_Frame(this);\n\n //necessary to setPreviewCallbackWithBuffer\n mCamera.addCallbackBuffer(previewBuffer());\n mCamera.setPreviewCallbackWithBuffer(previewCallback); \n\n\n\n FrameLayout preview=(FrameLayout)findViewById(R.id.camera_preview);\n\n\n preview.addView(tFrame);//the first to put is the one on the bottom of the view\n preview.addView(mPreview);\n\n}\n", "android debugging camera"], "3492354": ["How to update exif of ALAsset without changing the image?", "I use of to update the exif(metadata) of an asset. \nI just want to update the metadata, but this method require an as the first parameter. I use the code below to generate , but it modified my image(I checked the file size and file hash).\n\nIs there any other method I could use to update just the exif of an ? Or any way to generate the right for method ?\n", "setImageData:metadata:completionBlock:", "ios metadata photo exif alasset"], "1827489": ["Macro for copying and increment date value in excel 2010", "I need to generate data like below in excel.\n\n2/8/2013\n2/8/2013\n2/8/2013\n2/8/2013\n2/8/2013\n2/8/2013\n2/9/2013\n2/9/2013\n2/9/2013\n2/9/2013\n2/9/2013\n2/9/2013\n2/10/2013\n2/10/2013\n2/10/2013\n2/10/2013\n2/10/2013\n\nA date value in the format and the same on 6 rows...In the 7th it should be incremented and continued till 12th row like that the sequence should be repeated.\nCould any of excel users help me in writing a formula/macro etc... for this?\nThanks in advance,\nChandu\n", "mm/dd/yyyy", "excel excel-formula excel-2010"], "3462080": ["Multiple OpenCL CPU Devices on a single host?", "Will a host ever have more than one CPU-type device? Multi-core CPUs will come up as a single device, but what about dual-socket motherboards? Will there be two separate devices in OpenCL for each processor?\nI'm trying to plan ahead with an application I'm working on.\n", "", "opencl"], "4750961": ["Filter to modify post_title after image upload?", "When I upload images, Wordpress 3.4.2 sets the Title to the base of the filename, such as \"DSCN1234\" or \"IMG_1234\". I'd like the Title to be left blank.\nThe code that sets the Title during the upload seems to be in \"wp-admin/includes/media.php\" in the function , here:\n\nIf I just change it to it fixes it, but I understand that the core code shouldn't be modified.\nIs there a filter I can use to modify the Title after it's been set by the upload handler? I tried and but they don't give me access to the data. \nThe filter does give me access to , but it's fired for every image when editing a gallery -- I just want to modify the of a single image immediately after it's uploaded. (if the user manually sets the Title to the filename afterward, I don't want to remove it.) Any other ideas?\n\nUPDATE: well, I just discovered that the is set back to the file name every time the gallery is updated (re-sorting images, etc.) And even if I use the filter to clear the , it doesn't stay cleared because when I click Save Changes, something is apparently not liking the fact that I've set the Title field to be empty even though it's a required field (red asterisk next to it). Other ideas appreciated.\nThanks!\nRussell\n", "media_handle_upload()", "images uploads filters title"], "5137164": ["Java generic parameter itself using generics?", "I'm trying to figure out how to structure a program using Java's generics, and wondering if I am doing something fundamentally wrong or just missing a simple bug in my code.\nSay I have a generic class:\n\nAnother generic class takes Handler as a generic parameter (pseudo code):\n\nAbstract implementation providing boiler-plate implementations\n\nThink of a processor as an object that dispatches requests to process data to any number of handlers. Specific instances can be variations of process pipelines, intercepting filters, event systems, etc.\nI'd like to be able to use it like the following:\n\nI can't get it to work. On paper it looks like it should be trivial, any ideas?\nThanks\n", "public interface Handler<T>{ \n public void process(T t); \n}\n", "java generics"], "5025164": ["Rails Conditional Get not behaving properly on Heroku", "I have a Rails 3.2 application, where the client side polls a resource in the server for updates. This resource is not an asset, but dynamic content. \nThe implementation strategy i chose is a Conditional Get via the fresh_when directive:\n\nSo, when the resource is still fresh (request 'If-Not-Modified' header equals the resource current ETag), the server only returns a 304 header.\n\nWhen the resource is no longer fresh, then we have status 200 and the most recent version of the resource in the response body:\n\nAt the development environment this works perfectly. The problem lies in the production environment (Heroku Cedar Stack). In this scenario, the responses are always 200 with the full object representation in the body:\n\nFrom what it looks, this request isn't reaching the Rails Controller (where the freshness is actually evaluated), but is passing through heroku's router and caching layers.\nWhat i've tried so far:\n\nDouble checked Rails (3.2.1) and Thin (1.3.1) versions in both\nenvironments.\nSetting 'config.action_controller.perform_caching = false'\nRemoving Rack::Cache middleware (config.middleware.delete\nRack::Cache)\n\nThe reason i don't want those redundant responses is because it bombs the client side app with unneeded object refreshes, causing a serious performance hit to the end user. When only a 302 header is returned from the server, the client-side javascript just sleeps for a while before polling again.\nThanks\n", "fresh_when(:etag => @etag, :public => false ) #it's a private resource, requires auth etc\n", "ruby-on-rails-3 http heroku http-etag"], "4133031": ["Vim - Trying to go to next line with right arrow key", "\nPossible Duplicate:\nAutomatically go to next line in vim \n\nDoes anybody know why Vim does not allow to go to the next line using the right arrow key but only using up/down?\nIs there a way to fix this?\nThanks in advance!\nZorgatone.\n", "", "vim text command-line editor vi"], "5004434": ["jQuery AutoComplete not working", "I got the code from here\nthe Code is not working, I have the autoComplete plugin as well, here's the fiddle link to it.\nWhat's the problem and how can I solve it?\nok this is what I've written in VS\n\nand it still doesn't work, sorry if it's a stupid mistake !\nstill doesn't work\n", "<html>\n<head>\n <title></title>\n <script src=\"script/jquery-1.6.1.min.js\" type=\"text/javascript\"></script>\n<script src=\"script/jquery.autocomplete.js\" type=\"text/javascript\"></script>\n <script src=\"script/jquery-ui-1.8.13.custom.min.js\" type=\"text/javascript\"></script>\n <script type=\"text/javascript\">\n $(function () {\n var availableTags = [\n \"ActionScript\",\n \"AppleScript\",\n \"Asp\",\n \"BASIC\",\n \"C\",\n \"C++\",\n \"Clojure\",\n \"COBOL\",\n \"ColdFusion\",\n \"Erlang\",\n \"Fortran\",\n \"Groovy\",\n \"Haskell\",\n \"Java\",\n \"JavaScript\",\n \"Lisp\",\n \"Perl\",\n \"PHP\",\n \"Python\",\n \"Ruby\",\n \"Scala\",\n \"Scheme\"\n ];\n $(\"#tags\").autocomplete({\n source: availableTags\n });\n });\n </script>\n</head>\n<body>\n <div>\n <input id=\"tags\" type=\"text\" />\n </div>\n</body>\n</html>\n", "jquery autocomplete"], "3986751": ["Can an Outlook 2010 calendar generate ical feeds to be imported by another system", "I'd like for my Drupal site to have a calendar that's synced to an external Outlook calendar. The data entry is happening on the Outlook calendar side, so I'd like for the sync to go FROM Outlook to my Drupal site.\nI have found a lot of information about this already: how to subscribe to ical feeds on Outlook (but that gets data to and not from Outlook. sigh), how to sync my Outlook calendar with google calendar, etc.\nHowever, I have not found information on how to get an iCal feed that originates from my Outlook calendar. Is that just because it can't be done or have I just not looked in the right places :-).\nAny hints would be appreciated!\n", "", "drupal calendar outlook ical outlook-2010"], "3321018": ["Building Amazon Affiliates links", "How can I generate an Amazon affiliates link (with my Tracking ID) from a regular link without using Amazon online tools ?\n", "", "amazon"], "4593112": ["How can I convert a double into HH:MM:SS in ObjectiveC", "I've got a double 0.27392 and I know it is 6:34:27 AM. This is simple in Excel, but I can't get NSDateFormatter to work its magic.\n", "", "iphone datetime converter nsdateformatter"], "2811102": ["SharePoint:AttachmentsField", "could you please help , how can I set a substitute string / first 15 characters of the attachement, or string like \"Attachment\" for AttachementsField in DVWP within the code:\n\nI checked to put text into various part of the code / within tags, however nothing gave the expected result.\n", "<xsl:element name=\"SharePoint:AttachmentsField\">\n<xsl:attribute name=\"runat\">server</xsl:attribute>\n<xsl:attribute name=\"FieldName\">Attachments</xsl:attribute>\n<xsl:attribute name=\"ControlMode\">Display</xsl:attribute>\n<xsl:attribute name=\"Visible\">true</xsl:attribute>\n<xsl:attribute name=\"ItemId\">\n<xsl:value-of select=\"@ID\"></xsl:value-of>\n </xsl:attribute>\n</xsl:element>\n", "data-view-web-part attachments"], "3256538": ["How to link to emails in Thunderbird?", "I often take personal notes in text files. Sometimes I'd like to refer to an email in one of my IMAP email boxes. Now I manually write something like , but then looking up those emails takes too much time.\nIs it possible to make a link to an email, so that Thunderbird would display that specific email?\n", "\"email in <imap_account>, <date>\"", "email thunderbird"], "1420775": ["Advantage 5400 AE_INTERNAL_ERROR", "I am getting a 5400 AE_INTERNAL_ERROR when I try to OPEN a TadsQuery after adding the SQL. When I place the same SQL directly in the TadsQuery , there is no error. Your Help File directs me to contact Advantage Technical Support so R & D can fix the problem. Technical Support suggested that I post here. \nHere is a snipit of code (suggested by Doug Johnson):\n\nHere are the system stats:\nProcessor: INTEL\u00ae Core\u21222 DUO CPU @ 2.00GHz 2.00 Ghz\nInstalled Memory: 4.00 GB\nSystem type: 64bit. \nOS: Windows 7. \nProgramming: Delphi 2010.\nAdvantage version: 9.10 64bit\nServer: Local.\nTables: Free.\nPlease advise. Thank you and have a good day.\n-Bob Andrews\n", "if (Value = '**') or (StartUp) then\nwith DM1.qadSBSort do\nbegin\n DisableControls;\nfor i := 1 to 26 do\nbegin\n if Active then Close;\n Active := False;\n HText := 'SELECT SBName, SBPath FROM poSBSorted ' +\n ' WHERE [SBName LIKE ''' + CHR(i + 64) + '''] ' +\n ' ORDER BY SBName';\n SQL.Clear();\n SQL.Text := HText;\n try\n try\n Screen.Cursor := crHourGlass;\n Open();\n\n finally\n Screen.Cursor := crDefault;\n end;\n\n except\n On E: Exception do\n begin\n if( E.Message <> 'The SQL statement did not '+\n 'generate a cursor handle. Use ' +\n 'TAdsQuery.ExecSQL to execute SQL ' +\n 'statements that are not SELECT statements' )then\n MessageDlg( E.Message, mtWarning, [ mbOK ], 0 );\n end;\n end;\n Active := True;\n", "delphi delphi-2010 advantage-database-server"], "2162778": ["Spring LDAP: Connection reset by peer", "I'm using Spring LdapTemplate class to access ldap. I'm using a pool of ldap connections (PoolingContextSource class) to avoid creating connections all the time at runtime. However, I get this exception sometimes at my application:\n\n(...)\nMy ldap classes are defined in the following xml\n\nHas anyone experienced this problem and can suggest a solution? \nI thought about using testOnReturn parameter in the pool properties instead of connection evictor used right now. When I do, I get the following warning when I run my web application in the browser:\n\nand soon after, I get this exception: \n\nThanks in advance.\n", "javax.servlet.ServletException: org.springframework.ldap.CommunicationException: Connection reset; \nnested exception is javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; \nRemaining name: 'ou=memberlist,ou=mygroups,o=mycompany.com'\n", "java spring ldap"], "3525992": ["How to set up dependencies that should be enabled only in test or dev mode in play framework?", "Currently the play framework documentation says how to setup dependencies for the whole project without dividing them between running modes. The previous method allowed this by putting something like before module definitions in the file (which still works). \nIs there a way to do it right in the file, or should it be still mixed with the old method?\n", "%test.", "playframework"], "353945": ["Random BSOD Windows 7 Ultimate x32", "Now the wife is having random BSOD's, she plays a Facebook game - BSOD, Play WoW - BSOD. I've removed memory and tried one stick at a time so the RAM is good. I game her my 500 watt PSU so not enough power isn't a problem. As far as specs: 6GB DDR3, 4 HDD's, NVIDIA 9600GTS video card AMD Phenom II Quad Core CPU (125 watt version), Windows 7 Ultimate x32 and of course an 800 watt PSU Any ideas anyone?\n", "", "windows-7 windows bsod"], "1564465": ["Is there any chance to hack codeigniter sessions?", "currently i am working with CI. i am using the CI session library it saves all session values in a cookie. is there any possibilities to hack this(session variables) by using plugin like web developer in mozilla. \n", "", "php session codeigniter session-cookies"], "653894": ["english learning software for Linux / Windows", "I'm looking for a good English training software to improve my knowledge. It should be advanced and accademic / scientific oriented. \nEDIT: more info - Actually I'm oriented in two software : Rosetta Stone and \nTellMeMore Anyone knows them?\n", "", "learning english language"], "1623745": ["Hashing function and keys", "While going through Kathy Sierra's book I stumbled across this code fragment:\n\nMaps are used to store stuff in the keys and values format. Would someone tell me what is actually stored in key when we enter \"k1\" or new Cat() as a key? Are references to these objects are stored or the value of hashcode? I am totally confused with this. Please advice.\nAnd it would be appreciated if you could point me towards further reading material. \n", "m.put(\"k1\", new Dog(\"aiko\")); // add some key/value pairs\nm.put(\"k2\", Pets.DOG);\nm.put(Pets.CAT, \"CAT key\");\nDog d1 = new Dog(\"clover\");\nm.put(d1, \"Dog key\");\nm.put(new Cat(), \"Cat key\");\n", "java hashtable"], "3581557": ["How to get loop bounds in LLVM?", "everybody. Now I want to get the loop bounds by using LLVM API.Here is the part of code as following.I don't know whether it is right to get the bounds.So, is there any other situation that I havn't thought about?\n\nNote:the version of LLVM is 3.0.\n", "typedef std::vector<Loop*> LoopNest;\ntypedef std::vector<const Value*> LoopNestBounds;\n...\nvoid getLoopNestBounds(const LoopNest &Nest, LoopNestBounds &LBounds) {\n ScalarEvolution &SE = getAnalysis<ScalarEvolution>();\n for (unsigned d = 0, n = Nestsize(); d != n; ++d) {\n if (SE.hasLoopInvariantBackedgeTakenCount(Nest[d])) {\n const SCEV *C = SE.getBackedgeTakenCount(Nest[d]);\n const SCEVConstant *CC = dyn_cast<const SCEVConstant>(C);\n LBounds.push_back(CC->getValue());\n errs() << CC->getValue()->getValue() << \" iterations\\n\";\n }\n else {\n LBounds.push_back(0);\n errs() << \"---- 0 iterations for the nest ----\" << \"\\n\";\n }\n }\n}\n", "loops llvm bounds nest"], "646839": ["Session-based login not working properly", "I am currently working on a site and i'm making a login system. I am using sessions to keep track of login status. The pages involving login until now are shown below:\n(I change pages defining post variables in the url, like this: site.domain.com/?home)\nindex.php\n\nscripts/checklogin.php\n\nBut when i go to the page and enter my info, it still doesn'tshow the logged in part. Also, when i input a incorrect login, it does not show me the text over the login form (the )\n", "/* CONNECTION TO CHECK LOGIN STATUS */\n<?php\nif (isset($_GET[\"sair\"])){\n session_start();\n session_destroy();\n}\nif (isset($_SESSION[\"user\"]) && isset($_GET[\"entrar\"])){\n mysql_connect(\"localhost\",\"dbusr\",\"password\") or die(\"Can't connect to DB\");\n mysql_select_db(\"mydb\") or die(\"Can't select DB\");\n $userinfo = $_SESSION[\"uinfo\"];\n}\n?> /* START OF THE PAGE, RANDOM UNIMPORTANT HTML */\n<?php if (!isset($_SESSION[\"user\"])) { ?> /*NOT LOGGED IN...*/\n<form id=\"loginform\" method=\"post\" action=\"scripts/checklogin.php\">\n<h2>Login</h2>\n<?php if (isset($_GET[\"falha\"])) { echo \"<span class='erro'>Nome ou senha incorretos</span>\"; }?> /*IF LOGIN ERROR*/\n<input type=\"text\" name=\"user\" autofocus placeholder=\"Apelido\"/><br />\n<input type=\"password\" name=\"pass\" placeholder=\"Senha\"/><br /> /*LOGIN FORM*/\n<input type=\"submit\" value=\"Entrar\"/>\n</form>\n<?php\n} else { /*LOGGED IN...*/\nif ($userinfo[\"sexo\"]==\"0\"){ /*GENDER*/\necho \"Bem-vindo, \".$userinfo[\"nome\"];\n} else {\necho \"Bem-vinda, \".$userinfo[\"nome\"];\n}?>\n<?php }?>\n", "php mysql html session login"], "27827": ["Can someone help me understand why my PHP css stylesheet is not working suddenly?", "I built a CSS as normal for a website. I then read that you can re-name the CSS as a PHP page with the proviso that is put on line one of the PHP page.\nThen rather than linking to the 'style.css' you can link instead to 'style.php' and no worries.\nWhen I did this, everything was working perfectly fine, flawlessly. Before anyone asks why I did it, I will explain. I also created a basic CSS tool to change various colors and fonts through a HTML forms blah, blah blah. Everything was working okej..... then POOF!\nNow the CSS is only loading partially and I have a bit of code that popped up.\nThe syntax that I am using to link to the PHP CSS is:\n\nthe errant code that appears at the very top of the page is a fragment of the stylesheet link:\n\nI haven't the foggiest clue what went wrong all of a sudden.\nCan anyone diagnose what I did to suddenly screw this up?\n", "<?php header(\"Content-type: text/css\"); ?>", "php debugging stylesheet"], "4478062": ["php merge two or more ArrayIterators by one of their values", "I have two iterators which i have to merge into one result.\nHere are data samples:\n\nI would like to merge them by the key 'period' into a summary iterator.\nThe final result should look like:\n\nIt will be best if we are not using foreach,for,while or any other loop. That's because the data will be big and we don't want to have memory issues. I was trying using and to use the inner array pointers.\nIf anyone knows a way out of this, please advise.\n", "ArrayIterator Object\n(\n[storage:ArrayIterator:private] => Array\n (\n [0] => Array\n (\n [period] => 04/04/2012 16:00:00\n [bl_subs] => 1\n [bl_unsubs] => 1\n [bl_block_total] => 1\n )\n\n [1] => Array\n (\n [period] => 04/04/2012 17:00:00\n [bl_subs] => 1\n [bl_unsubs] => 2\n [bl_block_total] => 0\n )\n\n [2] => Array\n (\n [period] => 04/04/2012 18:00:00\n [bl_subs] => 0\n [bl_unsubs] => 0\n [bl_block_total] => -1\n )\n\n [3] => Array\n (\n [period] => 04/04/2012 19:00:00\n [bl_subs] => 2\n [bl_unsubs] => 0\n [bl_block_total] => -2\n )\n\n [4] => Array\n (\n [period] => 04/04/2012 20:00:00\n [bl_subs] => 2\n [bl_unsubs] => 0\n [bl_block_total] => 1\n )\n\n )\n\n)\n\n\nArrayIterator Object\n(\n[storage:ArrayIterator:private] => Array\n (\n [0] => Array\n (\n [period] => 04/04/2012 15:00:00\n [bl_avg] => 5\n [bl_full] => 0\n )\n\n [1] => Array\n (\n [period] => 04/04/2012 17:00:00\n [bl_avg] => 0\n [bl_full] => 7\n )\n\n [2] => Array\n (\n [period] => 04/04/2012 18:00:00\n [bl_avg] => 1\n [bl_full] => 0\n )\n\n )\n\n)\n", "php arrays merge iterator"], "5218426": ["TCP both Client and Server on the same PC", "I'm trying to implement a small tcp based application in C#. I'm new to TCP programming. \nThe app is really simple. It's a client/server scenario, which support max 2 clients. One client will be an \"external\" IP, the other will be the host itself. \nEverytime a client connect to the server, it begins to receive and send packets from/to the server. \nI have set up a small console app which implements both TCP server side code and TCP client code. \nThe server use a listener binded to a specific port and wait for client connections. Once a client is connected, it spawn a new thread to handle communication with the client.\nThe client simply connect to the server and once the connection is estabilished it starts to receive and send pakcets.\nAs I said before \"the host is also client of itself\", but this leads to an issue. If the client send a packet to the server, both server and client claims to have received a packet. It is normal? Am I missing something?\nUPDATE 2 (fixing issue)\nI think I've found the issue. I need to \"reset\" the buffer once the send operation is done by the client\n\nUPDATE 1 (adding code)\nServer\n\nClient\n\n", " case SocketAsyncOperation.Send: \n\n // Put in listen mode\n\n // Buffer reset AFTER send and BEFORE receive\n _receiver.SetBuffer(new byte[4096], 0, 4096);\n\n _client.ReceiveAsync(_receiver); \n\n break;\n", "c# networking tcp connection client"], "5923024": ["WPF Datagrid Groups that appears as a row", "I am struggling for long time now with creating this GUI feature\nI want to have a datagrid with grouping, but the group header should have Editable cells, and when I edit these, all the children items should be Changed as well...\nI encounter two problems:\n\nthe Xaml does not make sense to me\ni use and change the Template to contain \nStackpanel ( ?DataGridRow? , ItemsPresenter )\nI need the Columns to be set just as the Datagrid, as you most likely suspected\nhow do i get the children, of the group? unless i create hierarchy in the ViewModel...\n - should i? \nThanks for any suggestions and help.\n\n", "<DataGrid.GroupStyle.ContainerStyle>", "c# wpf mvvm datagrid grouping"], "4991421": ["Rails Tutorial unexpected Failure/Error: get :show, :id => @user", "I'm currently going through the awesome Rails Tutorial, and after I did a git reset to return to a previous commit, something broke to my database and all of a sudden I get 5 failures when I run rspec.\n\nI'm sure this easy to fix, but I honestly dont know where to even look at. Can anyone help?\n", "Failures:\n\n 1) UsersController Get 'show' should be successfull\n Failure/Error: get :show, :id => @user\n ActionView::Template::Error:\n undefined method `gravatar_for' for #<#<Class:0xaadc884>:0xaad9990>\n # ./app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb__463664834_89565070__435144589'\n # ./spec/controllers/users_controller_spec.rb:13:in `block (3 levels) in <top (required)>'\n\n 2) UsersController Get 'show' should find the right user\n Failure/Error: get :show, :id => @user\n ActionView::Template::Error:\n undefined method `gravatar_for' for #<#<Class:0xaadc884>:0xa820ca8>\n # ./app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb__463664834_89565070__435144589'\n # ./spec/controllers/users_controller_spec.rb:18:in `block (3 levels) in <top (required)>'\n\n 3) UsersController Get 'show' should have the right title\n Failure/Error: get :show, :id => @user\n ActionView::Template::Error:\n undefined method `gravatar_for' for #<#<Class:0xaadc884>:0x9f0e7b4>\n # ./app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb__463664834_89565070__435144589'\n # ./spec/controllers/users_controller_spec.rb:23:in `block (3 levels) in <top (required)>'\n\n 4) UsersController Get 'show' should include the user's name\n Failure/Error: get :show, :id => @user\n ActionView::Template::Error:\n undefined method `gravatar_for' for #<#<Class:0xaadc884>:0xb930cc8>\n # ./app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb__463664834_89565070__435144589'\n # ./spec/controllers/users_controller_spec.rb:28:in `block (3 levels) in <top (required)>'\n\n 5) UsersController Get 'show' should have a profile image\n Failure/Error: get :show, :id => @user\n ActionView::Template::Error:\n undefined method `gravatar_for' for #<#<Class:0xaadc884>:0xb9ade94>\n # ./app/views/users/show.html.erb:5:in `_app_views_users_show_html_erb__463664834_89565070__435144589'\n # ./spec/controllers/users_controller_spec.rb:33:in `block (3 levels) in <top (required)>'\n", "ruby-on-rails tutorials rspec"], "2827799": ["TextEdit : Removing default text from untitled file", "I tried to copy a very large text into an untitled TextEdit file. Now TextEdit starts showing progress wheel, whenever I try to edit or save the untitled file. I can get rid of the wheel only by force quitting the TextEdit app, but the problem is whenever I re-launch TextEdit, it again tries to show the large text which I pasted into before force quitting it.\nCan anyone suggest me how can I remove the default text in this case.\n", "", "osx-mountain-lion textedit"], "5068486": ["How to create destination (Folder) in PHP while using move_uploaded_file()?", "I want to upload files with PHP and i use move_uplload_files to copy them to the destination folder I want, everything works fine with this :\n\nBut when I try this\n\nI will get error, and it looks like move_uploaded_files can not create folders. How can I do this ?\nBasically I am looking for a way to do it like that creates the path if not exist.\n", "if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], './uploades/'))\ndie(\"success\");\nelse\ndie(\"error\");\n", "php file-upload upload"], "4776583": ["Subfloat caption width requirements and alignment problems", "I'm having problems with conflicting width requirements for subcaptions on subfloats that are horizontal versus vertical. I've spent considerable time searching here and more broadly, poring over the package documentation, etc, and I figured out that the problem is with the widths.\nFor the subfloats that are arranged horizontally, the subcaptions need to be 3 inches wide; for the subfloats that are arranged vertically, the subcaptions need to be 5 inches wide. If I specify a 3in subcaption width, the subcaptions for the 5in images look awful. If I specify anything over a 3in subcaption width, the subcaptions for the 3in images are offset to the right and run off the page. When I was not specifying caption widths at all, the subfloat subcaptions became very narrow and weird.\nI'm not sure how to resolve this; both subfloat arrangements need to be included in the same document. I realize that a custom environment might be in order, but don't have the first idea of how to construct something for this purpose.\nHere is the example MWE (to the best of my ability, it's a first try...)\n\nAny assistance will be very much appreciated!\n", "subfig", "horizontal-alignment vertical-alignment captions subfloats"], "4137240": ["how to use .change to disable select", "i really need a quick answer for this.\nhow can i disable a select option once value has changed?\nit must be available on firstload, then after the user tries to select it first time, it is the disabled for further change. so the user can choose a value only once.\nHERE is my code which is dynamic?\n\nwhat do i put in the javascript?\nthanks in advance\n", " <TABLE id=\"dataTable\" width=\"350px\" >\n <TR>\n <TD><INPUT type=\"checkbox\" name=\"chk[]\"/></TD>\n <TD>\n <select name=\"ItemNo[]\" id=\"select\" value=\"ItemNo\" onChange=\"loadXMLDoc(this.value)\">\n <?php \n $sql2=\"select * from jewelry_system.item where NumStored !='0' order by ItemName asc\";\n $result2 = mysql_query($sql2);\n while($row2=mysql_fetch_array($result2)){\n ?>\n <option value=\"<?php echo $row2['ItemNo']?>\"> <?php echo $row2['ItemName'];?> Php:<?php echo $row2['SalePrice'];?> </option>\n <?php } ?>\n </select> \n </TD>\n </TR>\n </TABLE > \n", "javascript html attributes"], "2454615": ["MySQL Datefields: duplicate or calculate?", "We are using a table with a structure imposed upon us more than 10 years ago. We are allowed to add columns, but urged not to change existing columns.\nCertain columns are meant to represent dates, but are put in different format. Amongst others:\n\nSince we now would like to do some more complex queries, using advanced date functions, my manager proposed to duplicate those problem columns to a proper FORMATTED_OLDCOLUMNNAME column using a DATE or DATETIME format.\nIs this the way to go? Couldn't we just use the STR_TO_DATE function each time we accessed the columns? To avoid every query having to copy-paste the function, I could still work with a view or a stored procedure, but duplicating data to avoid recalculation sounds wrong.\nSolutions I see (I guess I prefer 2.2.1)\n\nAm I right to say it's better to recalculate than to store? And would a view be a good solution?\n", " * CHAR(6): YYMMDD\n * CHAR(6): DDMMYY\n * CHAR(8): YYYYMMDD\n * CHAR(8): DDMMYYYY\n * DATE\n * DATETIME\n", "mysql optimization layout"], "5013714": ["How to trigger a form submission by clicking on a check box?", "I am using jQuery 1.6 and I would like to submit a form by clicking on a check box button.\nThat is, I have the following code that submits a form\n\nand when I click on a check box which HTML code is\n\nI would like to trigger the form submission.\nHow can I do that?\n", "$jQuery('#search_form').submit(function () {\n $jQuery.get(this.action, $jQuery(this).serialize(), null, 'script');\n return false;\n});\n", "javascript jquery forms triggers submit"], "4144892": [".NET Conditional Web Services", "My C# application has three testing stages: alpha, staging and production. Each stage for my application has a sibling web service. The APIs for all three web services are the same.\nHow could my application use the appropriate sibling web service based solely on alterations to the web.config file?\nThe goal being to have very little duplicate code, and for the source for my application to be the same across all stages.\n", "", "c# web-config web-services"], "3472846": ["Heroku problems on Windows 7 (cmd)", "I just installed the heroku ruby gem on Windows 7 and received the following error when trying to create a new instance. Have been researching the cause for the past two days with no luck.\n\n", "C:\\Users\\admin\\RubymineProjects\\first_app>heroku create\nInvalid gemspec in [C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications\n/heroku-2.8.5.gemspec]: invalid date format in specification: \"2011-10-05 00:00:\n00.000000000Z\"\nC:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:926:in `report_ac\ntivate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)\n from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:244:\nin `activate_dep'\n from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:236:\nin `activate'\n from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:1307\n:in `gem'\n from C:/RailsInstaller/Ruby1.8.7/bin/heroku:18\n\nC:\\Users\\admin\\RubymineProjects\\first_app>\n", "ruby-on-rails ruby ruby-on-rails-3 heroku"], "5631440": ["How are images handled in a UIWebView", "I am looking at writing some custom UITableViewCells that have a UIWebView squirted into them. I want to have a couple of icons that will appear in the html of the uiWebview, the images are stored locally on the device. \nI would like to know if these are then treated like normal images when building for different devices. I.e. following the naming convention @2x.png for retina displays? \ndose this translate over to uiwebviews or not?\n", "", "iphone ios uiwebview uiimage"], "618064": ["xDebug launching browser on Netbeans and console", "Everytime i debug a project in Netbeans with xdebug a local xdebug session page is opened. This is not the case in Eclipse. How do i avoid it?\nWhere is the console window? (ala Eclipse).\nThanks!\n", "", "netbeans xdebug"], "1470012": ["Is there a ReSharper-like code reformat and cleanup tool for Scala?", "I'd like to automatically clean-up and reformat a Scala code file the way I can do with ReSharper in Visual Studio for C#. Can I do this with IntelliJ Idea or another tool?\n", "", "scala refactoring intellij-idea resharper automated-refactoring"], "5865327": ["When and why do products preserve pushouts?", "Let $A,B,C$\n topological spaces and then $D$\n the pushout of a diagram\n$$B\\stackrel{b}{\\leftarrow}A\\stackrel{c}{\\rightarrow}C.$$\nIt seems logical to me that for a fifth topological space $E$ the pushout of\n$$B\\times E\\stackrel{b\\times\\operatorname{id}_{E}}{\\leftarrow}A\\times E\\stackrel{c\\times\\operatorname{id}_{E}}{\\rightarrow}C\\times E$$\nis homeomorphic to the product $D\\times E$.\nHowever, several tries to come up with a simple proof ended at some point where there was no obvious next step, so to say. This makes me think that this result doesn't hold in a general setting like the above.\nOn the other hand, I don't see, why something like this should not work even in more general settings like other categories.\nCan somebody point me in the right direction here? In which (preferably very general) situation does the above hold and how would you go about giving a simple, abstract proof of it?\n", "", "abstract-algebra general-topology category-theory"], "5682440": ["Windows 2003 mandatory profile changes reverted only after workstation restarts", "I created a roaming mandatory profile, logged in as the user with the mandatory profile and made some changes to test it.\nAfter I logged off and logged in again as the user, I saw that the changes were not reverted back to the mandatory profile.\nThe profile on the server was not altered.\nI logged in as the administrator and tried to delete the profile, but when viewing it through User Profiles dialog in System Properties I am unable to make changes to it, as if the user is still logged in.\nFast User Switching service is set to 'Manual' and isn't running.\nI reset the workstation and logged it as the user with the mandatory profile and the changes reverted back as supposed.\nWhy is the profile locked even when the user is not logged in?\n", "", "windows-server-2003 user-profile"], "3403471": ["MySQL: \"Access Denied\"", "I am trying to implant facebook registration on my site. \nI used this tutorial: http://www.9lessons.info/2011/01/user-signup-using-facebook-data.html\nWhen I click 'register' and it's time for the code to insert the data into the database I get this error: \n\nWarning: mysql_connect() [function.mysql-connect]: Access denied for\n user 'USERNAME'@'HOST' (using password: YES) in\n /home/a9297472/public_html/store_user_data.php on line 44\n\n(I censored the real username and host)\nAccording to the error the host and username were right.\nHere is the process code: \n\nI double checked everything.\nThe host,username,password & db_name are the same details I use in other parts of the site and it works fine.\nWhat did I do wrong?\nThanks!\n", "<?php\ninclude('config/db_con.php');\ndefine('FACEBOOK_APP_ID', 'APP ID'); // Place your App Id here\ndefine('FACEBOOK_SECRET', 'APP SECRET'); // Place your App Secret Here\n\n// No need to change the function body\nfunction parse_signed_request($signed_request, $secret) \n{\n list($encoded_sig, $payload) = explode('.', $signed_request, 2);\n // decode the data\n $sig = base64_url_decode($encoded_sig);\n $data = json_decode(base64_url_decode($payload), true);\n if (strtoupper($data['algorithm']) !== 'HMAC-SHA256')\n {\n error_log('Unknown algorithm. Expected HMAC-SHA256');\n return null;\n }\n\n // check sig\n $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);\n if ($sig !== $expected_sig) \n {\n error_log('Bad Signed JSON signature!');\n return null;\n }\n return $data;\n}\nfunction base64_url_decode($input) \n{\n return base64_decode(strtr($input, '-_', '+/'));\n}\nif ($_REQUEST) \n{\n $response = parse_signed_request(\n $_REQUEST['signed_request'],\n FACEBOOK_SECRET\n );\n\n $name = $response[\"registration\"][\"name\"];\n $email = $response[\"registration\"][\"email\"];\n $password = $response[\"registration\"][\"password\"];\n $gender = $response[\"registration\"][\"gender\"];\n $dob = $response[\"registration\"][\"birthday\"];\n\n // Connecting to database\n mysql_connect(\"$host\", \"$username\", \"$password\")or die(\"cannot connect\");\n mysql_select_db(\"$db_name\")or die(\"cannot select DB\");\n\n // Inserting into users table\n $result = mysql_query(\"\nINSERT INTO users (\n name, email, password, gender, dob\n) VALUES (\n '$name', '$email', '$password', '$gender', '$dob')\n\");\n\n if($result){\n // User successfully stored\n }\n else\n {\n // Error in storing\n }\n}\nelse \n{\n echo '$_REQUEST is empty';\n}\n\n?>\n", "php mysql facebook registration"], "895693": ["How to use htaccess for content negotiation?", "In order for the content to be available through the same link, even if the file extension has changed, URI's shouldnt change. So i decided to use content negotiation and htaccess to achieve this. I searched the web but all i found out about is how to implement this specific to php. In my site i have not only php but also html, images and javascript files.\nHow can i use content negotiation with just htaccess?\n", "", ".htaccess uri content-negotiation"], "5655346": ["How can use mongoose/express with ringojs", "I have tried nodejs for a month, but finally, I'm don't like asynchronous-style programming. \nI just found ringojs which seems synchronous-style. I wonder if I can use mongoose and express with it?\n", "", "node.js express mongoose ringojs"], "2422540": ["Example demonstrating that to have finite fibers is not stable under base change? ", "I would like to ask some questions about algebraic geometry:\n\nCan someone provide an example of a morphism of schemes with finite fibers such that under a base change it doesn't have finite fibers? I guess it is related with the infinite extension of fields but I cannot find a precise example.\nWhen is $\\operatorname{Spec}(\\mathbb{F}_p[x,y]/(xy^2-m))$ an irreducible scheme, for $m\\in \\mathbb{Z}$?\n\n", "", "algebraic-geometry"], "2169793": ["Using named pipe to communicate between unicode and non-unicode processes on windows", "If a process with unicode enabled creates a named pipe, it must pass a LPCTSTR for the pipe name, in this case a LPCWSTR. Will a second process wihtout unicode be able to open that pipe by passing a LPCSTR for the pipe name?\nAlso, can I call CreateNamedPipeW or CreateNamedPipeA and ignore whether unicode is enabled, or do I have to call the appropriate one?\nMany thanks!\n", "", "unicode winapi pipes named"], "263184": ["How do I configure multiple Ubuntu Python installations to avoid App Engine's SSL error?", "I have Karmic Koala which has Python 2.6 installed by default.\nHowever I can't run any Python App Engine projects because they require Python 2.5 and python ssl.\nTo install ssl I installed python2.5-dev first while following some instructions I found elsewhere.\n\nHowever, I am afraid this is not good for my Ubuntu installation since Ubuntu expects to see version 2.6 of Python when you type 'python' on the command line. Instead, it says '2.5.5'. \nBut App Engine still doesn't work after all this. I continue to get an SSL-related error whenever I try to run my Python app:\n\nUPDATE1: Just checked whether SSL actually installed as a result of those commands by typing this:\n\nAs you can see, SSL is still not installed, which explains the continuing App Engine error.\nUPDATE2:\nI tried to revert to the original default version of Python by doing this:\n\nin my folder.\nNow I get Python 2.6.4 when I type 'python' on the command line.\nBut this doesn't solve my App Engine SSL issue.\nIf anyone knows how I can dig myself out of this hole, I would appreciate it.\n", "sudo apt-get install libssl-dev\nsudo apt-get install python-setuptools\nsudo apt-get install python2.5-dev \nsudo easy_install-2.5 pyopenssl\n", "python google-app-engine ssl ubuntu-9.10"], "622821": ["Excel \"External table is not in the expected format.\"", "I'm trying to read an Excel (xlsx) file using the code shown below. I get an \"External table is not in the expected format.\" error unless I have the file already open in Excel. In other words, I have to open the file in Excel first before I can read if from my C# program. The xlsx file is on a share on our network. How can I read the file without having to open it first?\nThanks\n\n", "string sql = \"SELECT * FROM [Sheet1$]\";\nstring excelConnection = \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\" + pathname + \";Extended Properties=\\\"Excel 8.0;HDR=YES;IMEX=1;\\\"\";\n\nusing (OleDbDataAdapter adaptor = new OleDbDataAdapter(sql, excelConnection)) {\n DataSet ds = new DataSet();\n adaptor.Fill(ds);\n}\n", "c# excel microsoft"], "696091": ["Complicated grouping and time difference", "So I have a log table that is putting in data like:\n\nWhat I need to do is group the records per person and calculate the amount of time it took to discharge.\nFor example:\nUnit 2002 - 0 has two different people to group, it would be:\nPerson 12394 10/28/2011 from 10:01 to 14:01 = 4 hours to discharge\nPerson 12331 11/10/2011 from 9:08 to 11:08 = 2 hours to discharge\nAny help would be greatly appreciated. \n", "LogId SiteNumber Unit IDNumber LogCode EnteredDateTime ChangeMode HowEntered\n----- ---------- ---- -------- ------- ---------------- ---------- -----------\n851 1 16 - 0 23502 BDISCHSET 2011-11-12 11:48:08.890 Discharging Soon SERIES\n866 1 16 - 0 NULL BDISCHRED 2011-11-12 21:45:11.657 Discharged SERIES \n113 2 2001 - 0 12384 BDISCHSET 2011-10-28 09:27:08.773 Discharging Soon SERIES\n125 2 2001 - 0 NULL BDISCHRED 2011-10-28 10:38:08.060 Discharged SERIES\n119 2 2002 - 0 12394 BDISCHSET 2011-10-28 10:01:12.443 Discharging Soon SERIES\n139 2 2002 - 0 NULL BDISCHRED 2011-10-28 14:01:11.120 Discharged SERIES\n776 2 2002 - 0 12331 BDISCHSET 2011-11-10 09:08:09.443 Discharging Soon SERIES\n783 2 2002 - 0 NULL BDISCHRED 2011-11-10 11:08:08.537 Discharged SERIES\n", "sql tsql"], "1261857": ["After loading a plist into my tableview how do I pass the info to a 2nd view controller? (NSDictionary)", "I loaded my pList into a table view controller that segues to a view controller. I can't figure out how to load the data corresponding to the cell tapped into a label on this view controller. The plist is an NSDictionary, by the way.\nIn viewDidLoad of the table view controller I have:\n\nI am not sure how to tell the label that the name of the recipe chosen was X so you display the ingredients for X.\nThanks for the help!\nKevin\n", " NSString *myFile = [[NSBundle mainBundle]\n pathForResource:@\"recipes\" ofType:@\"plist\"];\n\n\nrecipes = [[NSDictionary alloc] initWithContentsOfFile:myFile]; \n\ncourseKeys = [recipes allKeys];\n", "ios objective-c plist"], "1794827": ["How to use whole screen on 1024x480 Android device (Acer Iconia Smart)?", "When running manually compiled Android apps on the Acer Iconia Smart, there always remains a black bar at the bottom of the screen that is not usable by the apps. This happens for my own as well as other apps compiled from source. Pre-installed apps do not show this behavior and make use of the whole screen.\nThe device has a 1024x480 screen, but I can only make use of 855\u00d7480 pixels. This is the size reported by .\nSo far, any attempts to fix the issue have failed, including:\n\nmanually changing the display metrics (using .\nsetting all possible attributes of to in the Android manifest.\n\n is set to , corresponding to the Android 2.3.3 version on the device.\nAny ideas? Did anybody successfully deploy self-compiled apps on this device that make use of the entire screen estate?\n-Oliver\n", "getResources().getDisplayMetrics()", "gui user-interface screen android"], "939410": ["Where is Facelets?", "I am trying to use Facelets with MyFaces 1.2. It appears as though the Facelets download at http://facelets.dev.java.net no longer exists. \nDoes anyone know 1) where I can download Facelets? 2) why has Facelets been removed from this site? e.g. has it been integrated into JSF 2.0 or something?\n", "", "java facelets"], "5562163": ["HTML5: Firefox vs Safari... need help with some CSS", "This is my first HTML5 site and I never expected for Firefox and Safari to be fighting! It's usually IE that I'm mad at. The header and footer both seem to be working just fine in both browsers. But the content area is shifted all the way to the right in Safari.\nIf I add webkit css (first time having to use that as well), then Safari works fine, but then Firefox is messed up. My understanding of HTML5 was that it was going to make things more streamlined. I'm almost ready to go back to HTML4 if I can't get this figured out by tomorrow morning. Any thoughts??\nHere's my CSS:\n\nHere's my HTML:\n\n", "#content {\n display: table;\n}\n\n#mainContentInt {\n display: table-cell;\n width: 331px;\n padding-right: 10px;\n vertical-align:top;\n}\n\nasideInt {\n display: table-cell;\n width: 550px;\n margin-left:323px;\n padding-top:60px;\n margin-top:-200px; \n}\n", "css firefox html5 safari webkit"], "5945198": ["Jquery qtip ajax issue", "I am trying to post the value of an input box (In this case a imdb link) to my imdbgrabber.php page and have it return the info of that movie into a qtip box.\nEDIT: View here http://movieo.no-ip.org/ Hover the images and you will see the error.\nEverything works fine until i try and post the variable to the imdbgrabber page. This is the code.\nJavascript:\n\nHTML:\n\nand finally the php:\n\nI am sure it is a simple mistake somewhere but after hours of looking i thought i would ask the experts.\n", " var link = $(\"#link\").val();\n var imdbLink = 'link='+ link;\n\n$(\".moviebox\").qtip({\n style: { name: 'cream' },\n content: {\n method: 'GET',\n data: imdbLink,\n url: '/includes/imdbgrabber.php',\n text: '<img class=\"throbber\" src=\"/images/loading.gif\" alt=\"Loading...\" />'\n },\n position: {\n corner: {\n target: 'bottomright',\n tooltip: 'bottomleft'\n }\n }\n});\n", "php jquery ajax post get"], "4217124": ["Working method to animate box-shadow with jQuery", "Im asking this in reference to the previous thread of the same vein, which contains a number of outdated non-working solutions and as well as the jquery box-animation plugin which is restricted to one box. Does anyone know how to animate the box-shadow of multiple elements? \n", "", "jquery jquery-animate box-shadow"], "3230248": ["Xcode: Why _objc_retain can't be found?", "I have a problem when building my Xcode project.\nI am using Xcode4.3, with Base SDK = 5.0 and deployment target = 4.3\nThe strange scenario is that, I was able to build the project successfully several days ago without any error. Even for git commit it built successfully.\nHowever, when I tried to build the .xcodeproj in command line, it says something like\n\nother undefined symbols are _objc_retainAutoreleasedReturnValue, _objc_release, _objc_autoreleaseReturnValue, _objc_storeStrong and _objc_autorelease.\nI reckon that's something related to ARC...... just that the sudden failure upon building it puzzled me......\nI've also searched through websites and questions here and some mentioned about the referencing of frameworks...... Yet I've checked the connection and it seems that there's not missing of any required framework.\nSo can anyone help for I have no idea at all on this sudden failure upon building...\nMore information:\nWithin these days, I didn't change much in my codes but modified some layouts only. One big change would be allowing the application for APNS (which updated the provisioning profile and already fixed the \"Code Sign Error: provisioning profile (long string) not found.\")\nEdit:\nJust find out that this is caused by changing the coding style....\nI was using\n\nwhich caused an error looks like -- error: no visible @interface for 'NSFetchRequest' declares the selector 'initWithEntityName:' \"\nand then when I changed to use\n\nThe error mentioned in my above question appeared....\nNeed help...\n", "Undefined symbols for architecture i386:\n\"_objc_retain\", referenced from:\n", "iphone xcode sdk automatic-ref-counting nsfetchrequest"], "5114424": ["\"def Type\" declarations in groovy classes", "Suddenly I've realized that I can write \n\nMy question is - what is the difference between code provided above and classic:\n\nWhy first form even exists?\n", "class Person {\n def String name\n}\n", "groovy"], "4027870": ["How to read log4net config file and log to log file that are in inetpub/wwwroot folder?", "I'm working with a WCF web service project and using log4net, but can't get it to write to the log unless I use an external log4net config file that's in some safe directory, like C:\\temp, and create the log also in some safe directory like C:\\temp. \nWhat I mean by \"safe\" directory is really any directory that's not under C:\\users, or C:\\inetpub\\wwwroot. If I try to have the log4net config file or the log itself in the folder where my service is deployed, it just does nothing (no errors, just no log is created and nothing happens). But if I load config from a log4net config file under C:\\temp, and write my log to C:\\temp, it works fine.\nI don't want to use C:\\temp though, I want the log to be in inetpub where the service is deployed, right there with the web.config. I know this is obviously a user permissions issue, but what can be done about it?\nAlso, I can't get it to read any log4net config from the web.config file; that's why I tried using an external log4j config file in the first place.\nI've read quite a few posts here, and followed their instructions to set everything up. I just need a push in the right direction on what's best practice to store log4net config for an IIS hosted WCF webservice, and what I can do to be able to store my log in \nOne of the posts I read was this one... log4net in WCF hosted by IIS 7.5 no write log file\nHere's what I've got thus far...\nIn a AssemblyInfo.cs file I have the following. I've tried both ways of specifying a config file, and of letting it try to use web.config by not specifying a config file.\n\nIn Global.asax that I had to add manually I have the following. If I specify a file in a safe directory like C:\\temp when I call Configure() it works...\n\nAnd in my service implementation file, I have this...\n\nAny ideas?\nEDIT\nI'm using Windows 7 Pro x86 with VS2008 for my dev box and deploying on the local IIS.\n", "C:\\inetpub\\wwwroot\\<projectName>", "c# wcf web-services iis log4net"], "5630646": ["Unable to SSH to server unless a VNC connection is first established", "I have recently set up an Ubuntu 10.10 (32bit) server on a VPS host. Following the Ubuntu installer I added OpenSSH. Very little else has been installed and it's the default OpenSSH configuration.\nFor some reason I cannot SSH to the box unless I first open a TightVNC connection through the hosts administration console. As soon as the attempt to VNC to the box is made I'm able to SSH directly to the box (eg. with PuTTY). Closing TightVNC doesn't matter - I can continue to use the open SSH connection and create new sessions.\nAny ideas what the issue is and how I go about fixing it?\n", "", "ubuntu ssh vnc"], "2742374": ["What is Windows 8 core?", "I've found some references, when looking for information on WAIK installs of Windows 8 of a varient called Windows 8 core, that can be installed off the professional edition disk. There's also a mention of it on Win Super Site that says \n\nThe cheapest, called MSDN Operating Systems, costs $699 a year ($499\n renewal), and of course includes Windows 8 (Core), Windows 8 Pro, and\n Windows 8 Enterprise. You get five licenses each for Windows 8 Core\n and Pro, and one Multiple Activation Key (MAK) for Windows 8\n Enterprise.\n\nWhat is Windows 8 core? Is it the new 'home' edition or something else? What differentiates it from the pro and enterprise editions? \n", "", "windows-8"], "4236248": ["How to catch \"closing\" click event?", "Here\u2019s an example. This is Google menu.\n\nWhen you click on the gear-wheel (red cross) the menu appears. When you click anywhere beyond opened menu (green cross) the menu disappear. The question is how to catch that second closing event (green cross).\nIt\u2019s simple to open the menu.\n\nBut how to make it closed? I tried this way using \"body\" tag:\n\nBut the menu is closed immediately after it has been opened. First it becomes \u201cblock\u201d as \u201cstar\u201d is clicked. But immediately after this becomes \u201cnone\u201d as body is also clicked. How to solve it? Is it really necessary to write code for \"body\" for catching right target event?\n", "var x = document.getElementById(\"star\"); // this is id of the gear-wheel;\nvar y = document.getElementById(\"hiddenMenu\"); // this is id of the menu with display = none;\nx.onclick = function() {\n y.style.display = \"block\";\n}\n", "javascript events click onclick popupmenu"], "2273736": ["Adding a drop-down menu button to a CMFCToolbar", "I'm trying to add a menu to a CMFCToolbar. Following advice I found online, I'm doing it like this:\n\nSo the above gives me a button with a drop-down arrow. When I click the button, it does the action ID_DOTHISWHENCLICKED. When I click the drop-down arrow, I get a menu with one item in it. The item is the title of IDR_MYMENU and this has a sub-menu that is the menu I would like to be displayed. Something like this:\n[BUTTON]\nMy Menu\n\nObviously what I want to see is:\n[BUTTON]\nSubmenu Item 1\nSubmenu Item 2\nSubmenu Item 3\nSo my question is.... why aren't all of the menu items in IDR_MYMENU in the menu, instead of being in a sub-menu off of it?\nThanks.\n", "CMenu m_Menu;\n\nm_Menu.LoadMenu(IDR_MYMENU);\n\nm_Toolbar.ReplaceButton ( ID_DOTHISWHENCLICKED,\n CMFCToolBarMenuButton( ID_DOTHISWHENCLICKED, \n m_Menu, \n 10,\n nullptr,\n FALSE));\n", "mfc toolbar"], "3624288": ["List taxonomy term \"Last Name\" + \"First Name\" (taxonomy custom field) in a post loop", "I have a few custom fields for a taxonomy \"Author\". The term title is the Author's last name, and one of the custom fields is his first_name.\nNow I need, in a post loop, to list all \"Authors\" of that post by their full name. How can I do this? I'm using Ultimate CMS plugin to manage taxonomy custom fields.\nJust to be clear this is a post type \"Academic Article\" with the authors as a taxonomy.\nThank you.\n", "", "custom-field taxonomy templates"], "3169670": ["Custom Control loads a user control; Postback events are not triggered", "I have a custom control (compiled as a DLL) which loads a user control. (i.e, the custom control does a LoadControl) In the user control is a button and a textbox. I wire up the button's click event. \nI type in a value into the text box. When I click the button, the page does a postback. My user control knows that a postback occured because Page.IsPostBack = true. However, the click event of the button is never fired and my text box has also lost the value that I typed in.\nAnyone have any thoughts as to what might be going on?\nEDIT:\nI did a test on this and took SharePoint out of the picture; I was able to reproduce it so I removed all references to SharePoint.\n", "", "c# asp.net postback"], "3103292": ["I need this baby in a month - send me nine women!", "Under what circumstances - if any - does adding programmers to a team actually speed development of an already late project?\n", "", "project-management team"], "5080172": ["Creating a self truncating elliptic text ctrl: How to force paint event", "I'm trying make a static text which if too long for the sizer, will truncate itself with an ellipse and just show the text which will fit.\nWhat I've written seems to work fine when you change the size of the window which must be sending paint events, but when setting the label text I guess a paint event doesn't get fired.\nI've tried calling Refresh and Update on everything I can thing of (Frame, panel, the text itself) as well as sending a paint event to the frame but I cant get it to work correctly.\nI made a quick demo with a button to change the text label.\nEDIT: SOLVED\n\n", "import wx\nfrom wx.lib.stattext import GenStaticText as StaticText\n\nclass EllipticStaticText2(StaticText):\n def __init__(self,parent,id=wx.ID_ANY,label='',width=None,pos=wx.DefaultPosition,size=wx.DefaultSize,style=0,name=\"ellipticstatictext2\"):\n self.actual_label= label\n self.parent= parent\n self.width= width\n StaticText.__init__(self,parent,id,label,pos,size,style,name)\n self.Bind(wx.EVT_PAINT, self.OnPaint2)\n\n def SetLabel(self,label):\n self.actual_label= label\n StaticText.SetLabel(self,label)\n self.parent.Layout()\n\n def SetLabelText(self,label):\n self.actual_label= label\n StaticText.SetLabelText(self,label)\n self.parent.Layout()\n\n def OnPaint2(self,event):\n dc= wx.PaintDC(self)\n displaylabel= self.actual_label\n x,y= dc.GetTextExtent(displaylabel)\n self.w,self.h= self.GetSize()\n if x>self.w:\n while x>self.w:\n displaylabel= displaylabel[:-1]\n x,y= dc.GetTextExtent(displaylabel+\"...\")\n StaticText.SetLabel(self,displaylabel+\"...\")\n else:\n StaticText.SetLabel(self,displaylabel)\n event.Skip()\n\n\nclass CustomFrame(wx.Frame):\n def __init__(self,parent,id,name,size):\n wx.Frame.__init__(self,parent,id,name,size)\n\n self.panel = wx.Panel(self, -1)\n sizer = wx.BoxSizer(wx.VERTICAL)\n self.index= 35\n\n self.elliptic = EllipticStaticText2(self.panel, -1, r\"long string.\"*20)\n whitePanel = wx.Panel(self.panel, -1)\n whitePanel.SetBackgroundColour(wx.WHITE)\n\n sizer.Add(self.elliptic, 0, wx.ALL|wx.EXPAND, 10)\n btn= wx.Button(self.panel,-1,\"change\")\n sizer.Add(btn,0,wx.ALL|wx.EXPAND, 10)\n sizer.Add(whitePanel, 1, wx.ALL|wx.EXPAND, 10)\n\n btn.Bind(wx.EVT_BUTTON,self.button)\n\n self.panel.SetSizer(sizer)\n sizer.Layout()\n\n def button(self,event):\n self.elliptic.SetLabel(chr(self.index)*100)\n self.index+=1\n self.Refresh()\n self.panel.Refresh()\n self.elliptic.Refresh()\n\nif __name__ == \"__main__\":\n app = wx.PySimpleApp()\n\n frame = CustomFrame(None, -1, \"EllipticStaticText\", size=(700, 300))\n\n frame.CenterOnScreen()\n frame.Show()\n\n app.MainLoop()\n", "python wxpython"]}