text
stringlengths
8
267k
meta
dict
Q: Why http authentication with htaccess get slow when password incorrect? I don't know why but when i type a wrong password it always take alot of time to come back with authentication dialog. but when i type a correct password it always go fast. htaccess: AuthUserFile c:/senha1 AuthName "Bem vindo" AuthType Basic req...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery 1.7 "unifying bind/live/delegate" The jQuery 1.7 release will "unify bind/live/delegate". What does this mean in term of the jQuery source? What are the consequences for my jQuery code? A: * *Corresponding ticket *Google Doc explaining the changes Short summary: Currently we have three different event API...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I turn a string into a list in Python? How can I turn a string (like 'hello') into a list (like [h,e,l,l,o])? A: The list() function [docs] will convert a string into a list of single-character strings. >>> list('hello') ['h', 'e', 'l', 'l', 'o'] Even without converting them to lists, strings already behav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Need to change @src of a parent iframe from within child iframe I have the following HTML markup (don't ask....) - document //main site - <iframe> //my site - <iframe> //site within my site - <frame> - <a onclick="JavaScript:parent.parent.location.href='http://bla.com;return false;'"> Basical...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Configuring an Autofac delegate factory that's defined on an abstract class I'm working on a C# project. I'm trying to get rid of a Factory class that has a large switch statement. I want to configure Autofac to be able to construct a dependency based on a parameter, thereby allowing Autofac to take the place of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: replacing backslash string in php I need to replace \b with \\b in php in order to insert into mysql table. Therefore \bhello\b becomes \\bhello\\b then inserted into mysql where it is converted back to \bhello\b. But I can't seem to figure out how. Tried preg_replace and str_replace and I always end up with an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails 3.1 asset pipeline outside view I am trying to set CarrierWave's default url inside of the CarrierWave uploader. To do this, I would like to use the asset pipeline to do the following in uploaders/image_uploader.rb: def default_url image_path('question_mark.png') end But it fails because: unde...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Highcharts won't show line through my dots This is my full code: $(document).ready(function() { var options = { chart: { renderTo: 'zb' }, title: { text: 'Test' }, tooltip: { enabled: true, formatter: function() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ListenableFutureTask / ExecutorService I've Guava in my Classpath and want to use ListenableFutures, but currently I don't know how to submit ListenableFutures or is it currently only possible to use them without an executor in the calling thread? I've read that a decorator is available in r10 which isn't out? I've ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any reason for this call to Activator.CreateInstance? I'm maintaining someone else's code and they have this section in a method: object ReportCriteriaInstance = Activator.CreateInstance( typeof(MyCompany.Utils.ReportStructure.ReportSearchCriteria)); //ReportCriteria is passed in as a method...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Solr CapitalizationFilterFactory not working I am a complete noob when it comes to solr, this is my first configuration and I am having issues getting solr data to be filtered properly. We are using solr 4.0, the 09-21-2011 snapshot. What I want is to capitalize the first letter of each word in various fields. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiple strings matching performance I have an artists table with over 100,000 records that I use to match against an array (between 1 and several thousands) of artists submitted by the user. My current query looks like this: SELECT id from artists WHERE lower(name) IN(downcase_artists) This does the job fine, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to stay on current window when the link opens in new tab? When a user clicks on a link <a href="http://www.stackoverflow.com" target="_blank">click</a> is there a way to stay on the current window instead of going to the tab ? A: <a href="www.stackoverflow.com" onclick="window.open('#','_blank');window.open(th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Word Play Question I created a function that takes a word and a string of 'forbidden' letters, and returns True if the word doesn't use any of the letter. def avoids(word,forbidden): for letter in word: if letter in forbidden: return False else: return True I want to modify this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android - Problems with tcpdump when in ad-hoc mode Currently I'm working on a project that demands using Android and tcpdump. A short description of what I do: I want sniff packets using android. I have built an android application which does this using by "tcpdump". Basically the application initiate tcpdump, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Android: How do you hide Tabs in the ActionBar? I need to temporarily hide the Tab objects I've defined for my ActionBar. There is no setVisibility method on Tab objects, so I'm at a loss as to how to accomplish this. A: I'd try setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD), to move back to the non-tab rend...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Send parameters to a running application in C# I am trying to send parameters to an application which is already in the processor. I am using Mutex to find if the application is running or not already. I need to send any command line parameter and that text is added to the listbox. But the parameter is going in but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Jquery Datatables - Make whole row a link This maybe simple, but cant seem to figure it out. Using jquery datatables how can I make each row clickable to just link to a normal page? So if someone moused over any of the row the whole row will hightlight and be clickable and link to whatever url I would want it to lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Compressing (Gzip or Deflate) Shows, Lists and views in Couchdb It seems that couchdb automatically compress all its _attachments when requested with the correct header. But unfortunately this doesn't happen for views, show or lists. Is there any way to achieve a compression before returning the result to the client...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Log Fiddler Requests to Database Real-time Is there any way to log all requests ongoing to a database or can you only log snapshots to a database? A: The following example relies upon OLEDB 4.0 which is not available for 64bit processes. You can either select another data provider (e.g. SQLServer) or you can force ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Codeigniter: how can I send a foreach statement to the view? Controller: $categorys = array( '1234' => array('Car Audio','Car Subwoofers'), '12' => array('Car Stereos') ) $category_id = $this->input->get('category_id'); $product_id = $this->input->get('modelNumber'); if (array_key_exists($category_id,$...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Serving download after form submit w/ validation I have created together a pretty simple Download Code redeemer in .php (thanks to help from here) and am having a hard time trying to figure out what the best way to serve a download is if the validation is successful. Basically - User enters invalid code -> Page is r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: PSEXEC not redirecting 7zip output I'm trying to use PSEXEC to uncompress a self extracting file (a console exe created with 7zip) in a remote machine and view the results on my screen. The remote command executes just fine, but I don't see it's output locally. This is the command I'm using: PSEXEC.exe \MACHINE_NAME...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jquery ajax not working? i have a jquery ajax post that for some reasons doesn't work: <script> var callback = function(data) { if (data['order_id']) { $.ajax({ type: 'POST', url: '<?php echo $_SERVER['PHP_SELF']; ?>', data: { myid: 123456 }, success: funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cisco switch and router programming using Arduino? So, this topic is very similar to this Cisco Switch/Router programming using Arduino?. I have an Arduino ATmega2560 and Ethernet Shield plus a Cisco 1751 router. I want to configure the router via the console or AUX port using Arduino. Fast search gave the following...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: mysqldump column type 'text' * *I am planning to move a mysql database to a different host using mysqldump. Some of the tables have columns of type 'text'. Wanted to find out if there are any issues I need to be aware of (eg. text being truncated etc.) since I haven't done this before. *Also here are the steps ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UiViewController - Pop doesn't pop I'm displaying UIControllerView subclass when a button is pressed from a another UIViewController like this: - (IBAction)openNextLevelViewController { NSLog(@"openNextlevelViewController"); [self.navigationController pushViewController:nextLevelViewController animated:YES]...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: android black screen on device test I'm using a honeycomb device to test my app and for whatever reason the app runs like it doesn't have any content layout set. It used to run fine and it all of a sudden started showing just black. Other apps run fine and even new test apps from eclipse run fine. Logcat on run: 09-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I prevent clipped portions of subviews from still taking touch events? I'm currently clipping some UIViews within a parent view like in the illustration below: The problem is that the clipped portions (the invisible portions) of the subviews are still receiving touch events that, intuitively, should be goin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Scope Problem with Visual Assert I'm trying to use Visual Assert for testing. Visual Studio says the method I want to test which is defined inside main.cpp is undefined in the Test Fixture. MyFunctionTest.cpp: #include <cfixcc.h> class ExampleTest : public cfixcc::TestFixture { private: public: void Test() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: convert x and y vector to meshgrid I have an x, y, and z vector that I am currently using to create a 3-D scatter plot. Is it possible to create a mesh plot using these three vectors? I would prefer to only use these vectors and not alter any of my previous code. A: I'm a bit confused by your terminology, but I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jCrop: Set a square selection (centred) of an uploaded image of any dimensions I would like to offer my users the ability to crop their uploaded image via jCrop. The result should be a square format. The selection should appear centred in the image, with about a 10% gap either side along the shortest dimension. C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: After an attractive non-flash PHP charting solution I've been using XML/SWF Charts (maani.us) for ages, but now want to move my charts to a non-flash setup. On the charts I have at the moment, I have lots of mouseovers, so for instance if you put the mouse over a data point you get a little pop up with more details....
{ "language": "en", "url": "https://stackoverflow.com/questions/7522657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hide element only if javascript is enabled I have a view that displays a textbox as follows: @Html.TextBoxFor(m => m.CodeGuest, new {style = "display: none"}) it is displayed via javascript (so the user clicks a checkbox). If javascript is not enabled, I must remove this line (style = "display: none") so that the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I use WordPress as a login provider in my application? I already have a website running WordPress and I have an additional service, which however isn't built on WordPress. The problem is, that the service will be used only by registered users on the WordPress website. What I would like to do, is use WordPress au...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jquery form field custom messages in an effort to improve my jquery skills i've decided to create a form and validate it. everything is working fine, but when i submit my form i only get one of the error messages that i've created. i should get all the error messages if i try to submit a blank form, why does it stop...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Remap a key press in javascript / jquery Is there an "easy" way to map a keystroke to another key when on a page? Background: We are using a custom javascript grid for handling keyboard entry in a web application. Normally, the [enter] key allows the user to move to the next line, and the [tab] key allows the users...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Help with back reference regex in Vim I am trying to write a regular expression in vi to match any whitespace character followed by any digit. Then, at each match, insert a dollar sign between the whitespace and the digit. Here is an example: A1234 12 14 B1234 B1256 A2 14 C1245 C1234 34 D1 1234K The correct regex w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Buddypress Unread message count - live update? I am using the following code to display the logged in users unread message count in a template. <?php if (messages_get_unread_count() != 0) { ?> <div id="message_count"> <div class="countspan"> <?php echo messages_get_unread_count(); ?> </div>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Interpolating an angle counter clockwise? Right now 'm using linear bezier to interpolate angles: float CardAnimation::valueAt( float valueA, float valueB, float t ) const { return (1.0f - t) * valueA + t * valueB; } .... if(m_startCard.m_angle != m_endCard.m_angle) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery with .Net So I have a very simple .Net page that uses JQuery. When I place the code directly on the page the script executes fine, but when I call from an external js page it fails. $(document).ready(function () { $("#MainContent_Button1").click(function () { alert("Hello world!"); }); }); (j...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Porting GCC app, Windows cursor stays on IDC_APPSTARTING I'm porting an application (which makes use of a launcher stub) to Windows (using MinGW GCC). Here's a minimal example that I will use as reference to demonstrate the issue. #include <process.h> int main(int argc, char *argv[]) { chdir("C:\appdir"); s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reasoning behind using a rules engines This is more of a generic question. But I am trying to understand a concept of using a tool and why one would need this tool. I keep going round and round. q)Why do we need rule engines? I have been reading up on Drools and ILOG rule engines and am still not clear on the conc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: try throw exception handling I'm having a little trouble with making the following piece of code work. I cannot write a throw exception so I don't know what else could I do. case 't': // Top of Stack try { cout << "Top() -- " << sPtr->Top() << endl; //this should run if the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Select rows which depend on conditions on n other rows - mysql I'm not sure how to correctly articulate the title, so please correct it if giving the wrong idea. Here's an example table named table1: id name1 number1 name2 number2 ... ... ... ... ... 341 A 12 T ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: RewriteRule and Wordpress Page Parameters I want to send custom parameters to my wordpress page. and have this rule. RewriteRule ^mypage/(.+)$ index.php/mypage/?url=myparameter [L] The funny thing is it works great on my local box but does not work on my online server. Rewrite is enabled and if i rewrite it to load...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I check if a command exists in a shell script? I am writing my first shell script. In my script I would like to check if a certain command exists, and if not, install the executable. How would I check if this command exists? if # Check that foobar command doesnt exist then # Now install foobar fi A: Fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "207" }
Q: What triggers a knockout.js template to update? I'm using knockout (awesome library), but I've run into a problem with templates: the DOM only changes for some of my observable objects, but not others. The behavior is kind of weird -- it's left me wondering what triggers a DOM update for a templated object in knocko...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: switch/case within a switch/case The following appears in my WinProc: if(message == WM_CREATE) { //Do WM_CREATE stuff } else { switch(message) { case WM_KEYDOWN: { switch(wParam) { case VK_LEFT: { //declare new variable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Django Multiple Caches - How to choose which cache the session goes in? I have a Django app set up to use multiple caches (I hope). Is there a way to set the session to use a specific cache, or is it stuck on 'default'? Here's what i have now: CACHES = { 'default': { 'BACKEND': 'util.backends.SmartMemca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jekyll blog on heroku I'm trying to setup a jekyll blog on heroku. This is my dir structure . ├── Gemfile ├── Gemfile.lock ├── _layouts │   └── default.html ├── _posts ├── _site │   ├── Gemfile │   ├── Gemfile.lock │   ├── config.ru │   └── index.html ├── config.ru └── index.html My Gemfile has source "http://ruby...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What am i doing wrong? create xml using php I am following this tutorial step by step http://code.google.com/apis/maps/articles/phpsqlajax.html . Actually I copy pasted the code and created the database, added the data to the table, downloaded the provided php and html files but when i actually try to run the page t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the difference between lazy loading and lazy evaluation? Is there a difference between "lazy loading" and "lazy evaluation" (both of which are tags on Stack Overflow), or are they synonymous? Response to comment: The tag wikis (which I'd looked at before asking the question) has the former referring to deferr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Counting in a FOR loop using Windows Batch script Can anyone explain this? I am able to count in a loop using the Windows command prompt, using this method: SET /A XCOUNT=0 :loop SET /A XCOUNT+=1 echo %XCOUNT% IF "%XCOUNT%" == "4" ( GOTO end ) ELSE ( GOTO loop ) :end But this method does not work (it prints ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: error: expected specifier-qualifier-list before "File" I wrote this header file for a another main program. This file declares a struct_buffer struct that is used by the main function (somewhere else). What I am trying to do is that when someone initialises a buffer with the buffer_init function, a pointer to the bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to print out ascii characters from 0 to 255 in C, displayed in a webpage through Django? I'm working on a C assignment for school. Here's the exact wording of the assignment: "Write a program that prints a list of the integers 0 through 255 and the corresponding ASCII chara...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can't get JQuery to work in MVC3 application at ALL? This is driving me crazy, at the moment I can't get what seems a very simple piece of JQuery to work in my asp.net MVC3 application. I'm just starting to learn JQuery, I have created a new MVC 3 internet application and have added the following JQuery code to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: create XML nodes based on XPath in java I have a configuration file may or may not contain a certain element whose XPath is: /configuration/server/address when I write the configuration I have to create the node if it doesn't exist. Node n = (Node)xp.evaluate("/configuration/server/address", configDocument, XPathCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Disabling default drag behavior on links in iOS Safari I am developing a web app. I am trying to disable most of the default iOS Safari behavior on links so I set the "-webkit-touch-callout" CSS property on the links to "none". However, I still notice that if I hold my finger on a link for a second or so, then drag ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why doesn't Windows Azure Diagnostics reliably log? We are having problems getting Windows Azure Diagnostics to reliably log. It seems hit-or-miss and we don't understand why. Here's our code that sometimes works, sometimes doesn't: public class WorkerRole : RoleEntryPoint { public override void Run() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What Is -[NSURL _fastCharacterContents]:? So I'm calling this in a method: -(id)initWithContentURL:(NSString *)url { if (self = [super init]) { NSLog(@"xSheetMusicViewController - %@",url); // Casting an NSString object pointer to a CFStringRef: CFStringRef cfString = (CFStringRef)url; CFURLR...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MediaRecorder crashes when record a second audio clip I am trying to record audio clips with MediaRecorder, but I keep getting these errors in my Logcat when I start, stop, and start again; the activity would also close: INFO/DEBUG(1285): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** INFO/DEBUG(128...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: are there character set restrictions or autoconversion oddities for location.hash? i want to store and retrieve data via the url hash. the user is able to make some dropdown settings on the page, which should get written into the url via the location.replace function*. for simplicity’s sake, it now works like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to access a non static member from a static method in java? I have a situation where i have to access a non static member from inside a static method. I can access it with new instance, but current state will be lost as non static member will be re-initialized. How to achieve this without losing data? A: Maybe ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use FormsAuthentication with logins stored in SQL Server DB table? I am making a new web application in ASP.NET (in C#) using FormsAuthentication for the login. A standard FormsAuthentication setup is in place currently, with usernames and passwords specified in the web.config as usual, and this setup is work...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails 3.1 is very slow in development-mode because of assets, what to do? After I added Sprockets, Rails is loading very slow in development mode, what should I do to speed it up? A: Take a look at https://github.com/wavii/rails-dev-tweaks. Rails is running all of the to_prepare hooks on every Sprockets asset req...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Restructuring Default MVC3 Project Directories And NuGet I once watched a TekPub video on MVC2 that suggested renaming Content folder as Public, Adding Scripts to this folder etc. A couple of developers I am showing MVC preferred this structure and tried it. However with the inclusion of NuGet it seems to expect th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Order navigation properties when using Include and/or Select methods with EF 4.1 Code-First? This is the second step of a question explained here: EF 4.1 code-first: How to load related data (parent-child-grandchild)?. With @Slauma's guidance, I have successfully retrieved data with this approach: var model = DbCon...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I size/match a record component while reading in its data from a Stream in Ada? Very specific question but we have some good Ada people here so I would like to hear thoughts. I’m reading data from a file used for embedded systems. The data chunks I’m working with always have a predicable header format …but...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where on a web server is the best place to store a folder containing resume files? Inside web root or outside? What's safest? Suppose that I have this filepath going /www.mywebsite.com/content/ and that 'content' is my webroot. Should I store these resume files inside a folder in the webroot like so: /www.mywebsite....
{ "language": "en", "url": "https://stackoverflow.com/questions/7522789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ModelState.IsValid with custom view result I've created a custom view result that inherits from ViewResult. In my controller I check if ModelState.IsValid and then return my custom view. I'm finding that the errors don't seem to be making it to the view. Here's my view result: public class EnrichedViewResult<T> : Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Lucene query using GetFieldQuery not getting back results? I am not sure why this is not pulling back documents: The documents being added: document.Add(new Field("project.id", projectId.ToString(), Field.Store.YES, Field.Index.NO)); document.Add(new Field("contact.id", entity.Id.ToString(), Field.St...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to work with date_select form helper without a model in Rails? I have a variable @the_date and a date_select form helper without an associated model. How to use date_select to display the appropriate HTML? The following does not work: <%= date_select "the_date", @the_date %> A: You can do: <% @the_date = Time....
{ "language": "en", "url": "https://stackoverflow.com/questions/7522799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does one use a WPF/SL Grid and GridSplitter as a bindable SplitContainer? Suppose you want to allow a user to re-size a WPF/SL Grid containing two columns. But you also want to allow the user to hide one column (a "panel") or the other column. When both columns (panels) are shown, the GridSplitter should be al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Selecting SVG and path elements with JavaScript I would like to select the last path in an SVG and remove it. I've tried a variety of methods, in pure javascript and in jquery and I don't seem to be able to access the SVG properly or its paths. HTML: <div id="thesvgwrapper"> <svg id="thesvg"...><path ....>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to find users roles stored using bitwise technique in sql? I would like to run a simple query to get all users of a particular role, the problem is user roles are stored in bitwise numbers using power of 2 pattern. For example the roles table is. 1 role one 2 role two... 4 8 16 In a user table we hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing I tried to run Xvfb in my Centos 5.7 machine to get thumbnails of websites. I follow this Xvfb + Firefox site and install Xvfb, firefox on my Gnome Centos 5.7. No problem at all for installation, yet when I try to run DISPLAY=:1 firefox-remote http://...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problems submitting form after using .getJSON to submit to another site I have a form that's being validated using jQuery Validate and then submitted to a third-party subscription site. I'm trying to get the submission posted elsewhere, too. Here's my form: <form class="" action="http://www.fakelink.com/forms/user...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is this cursor not working? Do you know why this cursor is not working? When I click on "More Results" no other results are displayed. Thanks. if n==1: query = Main.all() query.filter("tag_list", s[0]) query.order("-date") cursor = self.request.get("cursor") if cursor: query.with_cursor(curso...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: URL rewriting....what am I doing wrong? please help me with this one... I am really new to this subject. I have placed this in my .htaccess file. RewriteEngine On RewriteRule ^gallery/([0-9]+)/?$ viewgallery.php?cid=1 [NC,L] To make the link http://www.123456.com/viewgallery.php?cid=1 look like this... http://www...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: tsql query to create new table from a combination of two tables I have a table as follows: table 1 temp_id node_name variable_1 variable_2 variable_3 1 ab a b y 2 sdd a a a 3 u a s s and another table as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: cvQueryFrame() returns NULL before end of file I'm trying to process large AVI files (approx. 61000 frames, 505MB) with OpenCV, using cvCaptureFromAVI() and cvQueryFrame(). However, cvQueryFrame() returns a NULL pointer before it reaches the last frame of the avi. long int numframe = 6000; while (numframe < 6700...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the purpose of the implicit grant authorization type in OAuth 2? I don't know if I just have some kind of blind spot or what, but I've read the OAuth 2 spec many times over and perused the mailing list archives, and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tok...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "286" }
Q: How do you use a require_once header for items in a different folder? I use require_once("header.php"); for all pages of my website. Though, I feel like I can only use that code for files filed directly under the public_html folder. If I use the require_once("header.php"); code for any other files located in a direc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Iteration Problem - appending beginning and ending html I'm trying to figure out how to only append the opening and close div and ul here. I don't know how to compare the next string to the current for the ParentName: foreach (SList subList in parentList) { if (subList.SubList.Count < 1) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: dynamic container size in asp.net I am taking content from a text file to fill literal controls within my content placeholders. Sometimes there is more text than will fit in the container column. How can i make them dynamic, ie have scroll bars to see the unviewable content? A: If you style the container with this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Site.css to Debug mode, site-min.css to release mode In my view like that in debug mode to view Site.css use her, and when compiled in release mode the view using CSS-min.css site. Something like this: # if (Debug) / / CSS # elif (Release) / / CSS Min- # endif But in my view .cshtml A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Concise way to test if X is within the bounds of Y +/- small tolerance? Is there a concise way to test whether some number X is within the bounds of another number Y plus or minus some small tolerance? A: The all.equal command allows for a tolerance parameter so that differences less than the tolerance value are ig...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Jquery not working with spring MVC project I am just trying to test jquery in one of my spring MVC project. I have added jquery-1.6.4.min.js file into WebContent/js/ folder. I am using jquery-1.6.4.min.js Below is the code for my .jsp file. I don't understand where I am wrong. Is there anything else which I am not d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: contenteditable=false inside contenteditable=true block is still editable in IE8 I have the following HTML intending to make sure that the inner span isn't editable. This works in other browsers but not IE8. <div contenteditable="true"> Luke, I am your father. <span contenteditable="false">I'm your son?! Ewww!</...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: iPhone :: Objective-C - Loading a list of Images from Restful Webservice into UITableView Hihi all, I have implement a mechanism for the above (in the question title), this is how it works: * *Create an NSURLConnection and make a call to my json webservice to get a list of records with the image URL for each of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Recording an AudioTrack to a sound file I am creating PCM data (from sine waves) and piping them to the speakers using AudioTrack. I'd like to record this as a wav file (or a comparable format). I've looked at AudioRecord but it takes a source, and seems to want a microphone. Can I pipe my own PCM data into AudioRec...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: image manipulation in php or jquery? For a learn-as-I-code game that I'm designing, I have a pretty rudimentary map: http://www.dixieandtheninjas.net/dynasties/images/dynasties_map_2.jpg I want to allow manipulation of the map in some of the following ways: * *Have the code place a dot on the map where the player...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Network Status in C Right now I am able to retrieve the network status using the following code.. popen("netstat -i | grep '^e[a-z][a-z]*0[ \t]' | head -n1","r") sscanf(line,"%32s %d %*s %*s %d %d %d %d", name, &mtu, &in_packets, &in_errors, &out_packets, &out_errors);...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php include() not working I'm making a simple program to interact with a database. I have taken a username variable from the user in a file called "connect_database.php" and called it $un. I then try to access that variable in another file where I have to submit the username to a database with a query. Every vari...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Help resolving SyntaxError: Parse error I'm getting a SyntaxError: Parse Error when my browser runs the following code for an iPhone: if (window.innerWidth && window.innerWidth <= 480) { $(document).ready(function(){ $('#usernav ul').addClass('hide'); $('#usernav').append('<div class="leftButton"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Posting form data from an ASP.Net Website to a MVC Web Application I have two distinct web sites, one an ASP.Net website and the other a ASP.Net MVC web application. I want to be able to post form data (about 15 fields) from the ASP.Net website to the MVC web application. Ideally I'd like to be able to create a com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python Interpreter Not Reading Indents Properly After Turning on VIM Auto-Indenting I'm not entirely sure what has happened. I was debugging a script that worked "fine" (except for said intermittent bugs) and all of a sudden the module cannot be imported anymore. I undid all changes and still the problem exists. We...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: document.write in html/php doc writes to new page I'm trying to write a piece of text over an existing web page based on whether or not the cookie is set. The cookie part works fine, but the document.write causes the text to appear on a new blank page. <script type="text/javascript"> function getCookie(c_name) { var...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Authentication to a WCF service not maintained using SetAuthCookie and a full .net client but works with silverlight I've setup a site with forms authentication and AspNetCompatibility enabled. The actual client is a silverlight application, and works fine, however I want to unit test the application separately usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }