text stringlengths 74 309k |
|---|
{"title":"listing objects from ManyToManyField","tags":["django","django-templates","many-to-many"],"question_text":"I am trying to print a list of all the Conferences and for each conference, print its 3 Speakers.\nIn my template I have:\n`{% if conferences %}\n <ul>\n {% for conference in conferences %}\n <li>{{ conf... |
{"title":"Why doesn't catching Exception catch RuntimeException?","tags":["java","exception","runtimeexception"],"question_text":"This is very odd to me.\n`RuntimeException`\ninherits from\n`Exception`\n, which inherits from\n`Throwable`\n.\n`catch(Exception exc) { \/* won't catch RuntimeException *\/`\nbut\n`catch(Thr... |
{"title":"Resolve promises one after another (i.e. in sequence)?","tags":["javascript","promise","q","sequential","serial-processing"],"question_text":"Consider the following code that reads an array of files in a serial\/sequential manner.\n`readFiles`\nreturns a promise, which is resolved only once all files have bee... |
{"title":"What happens when I reboot an EC2 instance?","tags":["amazon-ec2","amazon-web-services"],"question_text":"When I reboot an EC2 instance, do I get the initial image again, or is the state of the hard disk before the reboot kept?\nAnd what happens with billing, does the hour start again, or do I continue with t... |
{"title":"pythonic way to do something N times without an index variable?","tags":["coding-style","for-loop","python"],"question_text":"Every day I love python more and more.\nToday, I was writing some code like:\n`for i in xrange(N):\n do_something()`\nI had to do something N times. But each time didn't depend on the ... |
{"title":"how to fix 404 warnings for images during karma unit testing","tags":["javascript","unit-testing","angularjs","http-status-code-404","karma-runner"],"question_text":"I'm unit testing one of my directives (angularjs) using grunt\/karma\/phantomjs\/jasmine. My tests run fine\n`describe('bar foo', function () {\... |
{"title":"How to tell Maven to disregard SSL errors (and trusting all certs)?","tags":["maven","ssl-certificate"],"question_text":"I frequently need to run \"mvn\" command :\n`mvn -f pom.xml clean install -Dmaven.test.skip=false --settings \/Users\/myhome\/settings.xml -X -Djavax.net.ssl.trustStore=\/Users\/myhome\/tru... |
{"title":"Create new tmux session from inside a tmux session","tags":["tmux"],"question_text":"I'm writing a shell script that creates \/ attaches or switches to a given session, depending on whether one is inside tmux and the session exists.\nI've got everything working great except for the case requiring the creation... |
{"title":"Lazy Evaluation vs Macros","tags":["haskell","macros","lisp","scheme","lazy-evaluation"],"question_text":"I'm used to lazy evaluation from Haskell, and find myself getting irritated with eager-by-default languages now that I've used lazy evaluation properly. This is actually quite damaging, as the other langu... |
{"title":"How to automatically remove all .orig files in Mercurial working tree?","tags":["mercurial","dvcs","purge"],"question_text":"During merges mercurial leaves .orig file for any unresolved file. But after manually resolving problems and marking a file correct it does not delete the .orig file. Can it be automati... |
{"title":"How to list facebook users who like a page or interest","tags":["facebook","facebook-like","facebook-fql"],"question_text":"Possible Duplicate:\nRetrieve Facebook Fan Names\nI wanna get a list of facebook users who like a page or interest.\nFQL like '\n`SELECT user_id FROM like WHERE object_id=113970468613229... |
{"title":"How to clear the entire array?","tags":["arrays","vba","excel-vba"],"question_text":"I have an array like this:\n`Dim aFirstArray() As Variant`\nHow do I clear the entire array?\nWhat about a collection?","answer_text":"You can either use the\n`Erase`\nor\n`ReDim`\nstatements to clear the array:\n`Dim threeDi... |
{"title":"How do I write a \"tab\" in Python?","tags":["python"],"question_text":"Let's say I have a file. How do I write \"hello\" TAB \"alex\"?","answer_text":"This is the code:\n`f = open(filename, 'w')\nf.write(\"hello\\talex\")`\nThe \\t inside the string is the escape sequence for the horizontal tabulation.","que... |
{"title":"Check if list<t> contains any of another list","tags":["c#","list","c#-4.0","loops"],"question_text":"I have a list of parameters like this:\n`public class parameter\n{\n public string name {get; set;}\n public string paramtype {get; set;}\n public string source {get; set;}\n}\nIEnumerable<Parameter> paramete... |
{"title":"Is HttpClient safe to use concurrently?","tags":[".net","c#-4.0","concurrency","dotnet-httpclient"],"question_text":"In all the examples I can find of usages of HttpClient, it is used for one off calls. But what if I have a persistent client situation, where several requests can be made concurrently? Basicall... |
{"title":"Set focus to UITextField in tableCell","tags":["ios","events","uitableview","uitextfield"],"question_text":"I am creating a table view with\n`UITextField`\ns dynamically.\n`l_textField = [[UITextField alloc] initWithFrame:TextFieldFrame];\nl_textField.tag = cellRow;\nl_textField.delegate = self;\nl_textField.... |
{"title":"How to get selected item of NSOutlineView without using NSTreeController?","tags":["cocoa","pyobjc"],"question_text":"How do I get the selected item of an NSOutlineView with using my own data source.\nI see I can get selectedRow but it returns a row ID relative to the state of the outline. The only way to do ... |
{"title":"Programmatically set android:layout_centerHorizontal","tags":["android","android-layout","relativelayout"],"question_text":"In xml you can do the following:\n`<TextView\n ...\n android:layout_centerHorizontal=\"true\"\n ...\n\/>`\nHow would I, when I have the instance of\n`TextView`\n, do this programmaticall... |
{"title":"Is it better to return an ImmutableMap or a Map?","tags":["java","design-patterns","immutable-collections"],"question_text":"Let's say I'm writing a method that should return a\nMap\n. For instance:\n`public Map<String, Integer> foo() {\n return new HashMap<String, Integer>();\n}`\nAfter thinking about it for... |
{"title":"How to Block 100,000+ Individual IP addresses","tags":["php","apache","security",".htaccess"],"question_text":"Introduction\nHow do you Block large number of\n`IP address`\nfrom your web application\/server. Obviously that can easily be done in\n`PHP`\nor any programming language\n`$ipList = []; \/\/ array li... |
{"title":"Socket.IO subscribe to multiple channels","tags":["socket.io"],"question_text":"I want to build a simple chat room system on top of Socket.IO where user can create a new chat room and then people can start chatting.\nThis sound simple but as the Socket.IO 0.9.4 I'm running now, after reading a few SO posts to... |
{"title":"ManagementObject Class not showing up in System.Management namespace","tags":["c#",".net"],"question_text":"I'm trying to write some WMI in my windows form and the ManagementObject is givin me the\n\"The type or namespace name 'ManagementObject' could not be found\" Error\nHere is my un-complete code:\n`using... |
{"title":"Xcode - Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store","tags":["ios","xcode"],"question_text":"I just got this error when submitting an app to the app store.\nDoes this mean I need to set ENABLE_BITCODE for all dependencies? I tried that but then got errors saying the dependencies were... |
{"title":"Is there a performance difference between pooling connections or channels in rabbitmq?","tags":["queue","message-queue","rabbitmq","task-queue"],"question_text":"I'm a newbie with Rabbitmq(and programming) so sorry in advance if this is obvious. I am creating a pool to share between threads that are working o... |
{"title":"Auto-scaling input[type=text] to width of value?","tags":["jquery","html","css"],"question_text":"Is there a way to scale the width of an\n`<input type=\"text\">`\nto the width of the actual value?\n`input {\r\n display: block;\r\n margin: 20px;\r\n width: auto;\r\n}`\n`<input type=\"text\" value=\"I've had e... |
{"title":"Responsive grid of hexagons","tags":["html","css","css3","responsive-design","css-shapes"],"question_text":"I loaded in multiple images on my website from the internet. Is it possible to give all those images an\nhexagon shape\nin a responsive grid?\n`<div>\n <img src=\"link\" class=\"Image\">\n<\/div>\n<div>... |
{"title":"JQuery UI Autocomplete (1.8) scroll","tags":["jquery","jquery-ui","scroll","jquery-ui-autocomplete","jquery-scrollable"],"question_text":"i'm having troubles configuring the autocomplete module of JQuery-UI. I need that when the amount of data to select is big enough an scroll bar appears.\nThis is what i tri... |
{"title":"Use the README.md file as main page in Doxygen","tags":["markdown","doxygen","doxywizard"],"question_text":"The documentation of Doxygen states, that I can use PHP Markdown Extra title labelling in a markdown file, but neither\n`# Main Page # {#mainpage}`\nnor\n`# Main Page # {#index}`\nworks, but the label i... |
{"title":"JavaScript - Advantages of object literal","tags":["javascript","object-literal"],"question_text":"I've read that rather than simply writing a bunch of functions, I should use object literal.\nCan someone explain what the advantages of object literal are with examples, because I don't understand thus far.\nTh... |
{"title":"C# little endian or big endian?","tags":["c#","hardware","udp","endianness"],"question_text":"In the documentation of hardware that allows us to control it via UDP\/IP,\nI found the following fragment:\nIn this communication protocol, DWORD is a 4 bytes data, WORD is a 2 bytes data,\n BYTE is a single byte da... |
{"title":"How do you clear the focus in javascript?","tags":["javascript","focus"],"question_text":"I know this shouldn't be that hard, but I couldn't find the answer on Google.\nI want to execute a piece of javascript that will clear the focus from whatever element it is on without knowing ahead of time which element ... |
{"title":"ASP.NET MVC 4 override emitted html name and id","tags":["asp.net-mvc","asp.net-mvc-4","razor-2"],"question_text":"I'm trying to change the emitted name of the html input created by\n`@Html.HiddenFor`\n.\nThe code I'm using this:\n`@Html.HiddenFor(e => e.SomeProperty, new { @id = \"some_property\", @name = \"... |
{"title":"How do you set cache headers in Spring MVC?","tags":["java","spring","caching","spring-mvc"],"question_text":"In an annotation-based Spring MVC controller, what is the preferred way to set cache headers for a specific path?","answer_text":"I just encountered the same problem, and found a good solution already... |
{"title":"How do I write to the console in Google App Engine?","tags":["python","google-app-engine","logging"],"question_text":"Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the... |
{"title":"Very simple C# CSV reader","tags":["c#","csv"],"question_text":"I'd like to create an array from a CSV file.\nThis is about as simple as you can imagine, the CSV file will only ever have one line and these values:\n`Device, SignalStrength, Location, Time, Age.`\nI'd like to put these values into one dimension... |
{"title":"Add \"padding\" to a UITextView","tags":["ios","uitextview","padding"],"question_text":"as the title says i am trying to add padding-like behavior to a UITextView. The textview is generated when the view is pushed inside my navigation controller and the following code occurs:\n`self.textView.layer.cornerRadiu... |
{"title":"Please explain the use of JavaScript closures in loops","tags":["javascript","loops","scope","closures"],"question_text":"Possible Duplicate:\nJavascript closure inside loops - simple practical example\nI have read a number of explanations about closures and closures inside loops. I have a hard time understan... |
{"title":"Shell - How to find directory of some command?","tags":["linux","shell","command-line"],"question_text":"I know that when you are on shell, the only commands that can be used are the ones that can be found on some directory set on PATH.\nEven I don't know how to see what dirs are on my PATH variable (and this... |
{"title":"Access modal view controller parent","tags":["iphone","ios"],"question_text":"I'm presenting a ViewController modally.\nHow can I access the parent view controller ?\nMy architecture is TabBarController=>VC1=>VC2=>VC3=>MVC1, and I want to reach VC3 from MVC1.\nIn VC3, I have this code :\n`- (void) editAd{\n A... |
{"title":"How to have logarithmic bins in a Python histogram","tags":["python","numpy","matplotlib","histogram"],"question_text":"As far as I know the option Log=True in the histogram function only refers to the y-axis.\n`P.hist(d,bins=50,log=True,alpha=0.5,color='b',histtype='step')`\nI need the bins to be equally spa... |
{"title":"Grand Central Dispatch (GCD) with CoreData","tags":["iphone","core-data","objective-c-blocks","grand-central-dispatch"],"question_text":"I'm using Grand Central Dispatch (GCD) in my application to do some heavy lifting. The application is using Core-Data for data storage purposes. Here's my scenario (along wi... |
{"title":"ERROR: Google Maps API error: MissingKeyMapError","tags":["google-maps","google-maps-api-3"],"question_text":"The javascript suddenly occur:\n\"Google Maps API error: Google Maps API error: MissingKeyMapError\"","answer_text":"As per\nGoogle recent announcement\n, usage of the Google Maps APIs now requires a ... |
{"title":"MySQL does not start when upgrading OSX to Yosemite or El Capitan","tags":["mysql","osx","osx-yosemite"],"question_text":"I know similar questions exist, such as\nMySQL with MAMP does not work with OSX Yosemite 10.10\n. However, I do have MAMP, nor XAMPP installed on my computer.\nWhen I try to start mySQL fr... |
{"title":"'vector' in namespace 'std' does not name a type","tags":["c++","codeblocks"],"question_text":"I am developing a C++ application using CodeBlocks 10.05 on Debian 7.0.0.\nFor some reason, the following code\n`#include <iostream>\nstd::vector< int > delaunayDiv(const std::vector< int <T> > & vP, cv::Rect boundR... |
{"title":"Wildcard search for LINQ","tags":["c#","sql","linq","wildcard"],"question_text":"I would like to know if it is possible to do a wildcard search using LINQ.\nI see LINQ has Contains, StartsWith, EndsWith, etc.\nWhat if I want something like %Test if%it work%, how do I do it?\nRegards","answer_text":"You can us... |
{"title":"Splitting String with delimiter","tags":["string","groovy","split"],"question_text":"I am currently trying to split a string\n`1128-2`\nso that I can have two separate values ex: value1:1128 and value2:2 so that I can then use each value separately. I have tried\n`split()`\nbut with no success. Is there a spe... |
{"title":"Android Convert Px to Dp (Video Aspect Ratio)","tags":["android","screen-resolution","aspect-ratio"],"question_text":"Possible Duplicate:\nconverting pixels to dp in android\nI'm trying to convert pixels to dp. What is the formula?\nLets convert 640 and 480 into dp. The docs say this\nThe conversion of dp uni... |
{"title":"PDO error: \" SQLSTATE[HY000]: General error \" When updating database","tags":["php","pdo"],"question_text":"I am getting an error when updating a database using PDO.\nI am new to PDO so maybe the problem is a small one and I just don't understand.\nFunny thing about the error, the command works fine and the... |
{"title":"C++ const keyword - use liberally?","tags":["c++","syntax","const"],"question_text":"In the following C++ functions:\n`void MyFunction(int age, House &purchased_house)\n{\n ...\n}\nvoid MyFunction(const int age, House &purchased_house)\n{\n ...\n}`\nWhich is better?\nIn both, 'age' is passed by value. I am wo... |
{"title":"String.Join vs. StringBuilder: which is faster?","tags":[".net","performance","string","stringbuilder"],"question_text":"In a\nprevious question\nabout formatting a\n`double[][]`\nto CSV format, Marc Gravell\nsaid\nthat using\n`StringBuilder`\nwould be faster than\n`String.Join`\n. Is this true?","answer_text... |
{"title":"iPhone SDK - UIActionSheet - Dynamic Button Titles","tags":["iphone","objective-c"],"question_text":"I have a requirement in an application where I need to be able to add otherButtonTitles dynamically, dependent upon some BOOL switches that a user has specified in the settings. However, I can't seem to figure... |
{"title":"Colorize logs in eclipse console","tags":["java","eclipse","console","escaping","metadata"],"question_text":"Is there a way to colorize parts of logs in the eclipse console. I know I could send to error and standard streams and color them differently but I'm more looking someting in the lines of ANSI escape c... |
{"title":"The command \"ruby\" does nothing on my Mac","tags":["ruby","osx","terminal"],"question_text":"I can't get the Ruby interpreter to run on either of my Macs (one MacBook and one MacBook Pro, both running Snow Leopard). When I run it, by typing\n`ruby`\nin Terminal, nothing happens. It just sits there. I can ki... |
{"title":"How can I show all the localStorage saved variables?","tags":["javascript","html5","local-storage"],"question_text":"I want to acess all the localStorage variables saved on a specific page. How do I do that? I want to show it like I would show an array with the join() function","answer_text":"You could try it... |
{"title":"Access CanCan's `can?` method from a model","tags":["ruby-on-rails","cancan"],"question_text":"You can get the\n`current_user`\n's permissions from a view or controller using\n`can?`\nin this fashion:\n`<% if can? :update, @article %>\n <%= link_to \"Edit\", edit_article_path(@article) %>\n <% end %>`\nHow ca... |
{"title":"How to emulate background-size: cover on <img>?","tags":["javascript","jquery","math","background-size"],"question_text":"How can I resize and reposition the image inside a box, in such way that it covers the entire box, similar to how\n`background-size: cover`\nworks.\n`<div class=\"box\" style=\"width: 100p... |
{"title":"How do I close a SearchView programmatically?","tags":["android","searchview"],"question_text":"I currently have a SearchView in the action bar of my app. When I click the search icon, the SearchView expands and the keyboard pops up as expected. Clicking the \"X\" in the SearchView box closes the SearchView a... |
{"title":"How does Synchronous and Asynchronous communication work exactly","tags":["c","asynchronous","synchronous"],"question_text":"I was trying to understand the terms Synchronous and Asynchronous communication but i am getting confused a bit. I tried to dig a bit into\nthis\nbut there are still confusions. My ques... |
{"title":"cURL equivalent in JAVA","tags":["java","php","authentication","curl"],"question_text":"I am tasked with writing an authentication component for an open source\n`JAVA`\napp. We have an in-house authentication widget that uses\n`https`\n. I have some example\n`php`\ncode that accesses the\n`widget`\nwhich uses... |
{"title":"How do I temporarily redirect stderr in Ruby?","tags":["ruby","stderr"],"question_text":"I'd like to temporarily redirect stderr in a Ruby script for the duration of a block, ensuring that I reset it to its original value at the end of the block.\nI had trouble finding how to do this in the ruby docs.","answe... |
{"title":"Why does a string index in a javascript array not increase the length size?","tags":["javascript"],"question_text":"In the example below, the array2.length is only ten, when in my mind, it should be 13. Why does the \"string keyed\" indexes not increase the length of the array? I can store things and still ac... |
{"title":"Hotkey to end the line with a semicolon and jump to a new line in Sublime Text 2","tags":["sublimetext2","hotkeys","sublimetext"],"question_text":"I'm trying to figure out a hotkey at work. I just got this job and I am using a Mac for more or less the first time in my life.\nBack home on my Laptop, when using... |
{"title":"How do I make my code easier for the next developer to understand?","tags":["c#","coding-style","readability"],"question_text":"I've been at my very first programming job for about 8 months now and I've learned incredible amounts so far.\nUnfortunately, I'm the sole developer for a small startup company for i... |
{"title":"How to create self signed SSL certificate for test purposes?","tags":["ssl","https","ssl-certificate"],"question_text":"How to easily create self signed SSL certificate for testing purposes?","answer_text":"How to create self signed ssl certificate?\nUse\nhttp:\/\/www.cert-depot.com\n. It can create certifica... |
{"title":"Objective-C header file not recognizing custom object as a type","tags":["objective-c","import","compiler-errors"],"question_text":"I'm working on a game for iPad using cocos2d which involves a board filled with different types of tiles. I've created a custom class called\n`Tile`\nas a general template for ti... |
{"title":"Double.IsNaN test 100 times faster?","tags":["c#","floating-point",null],"question_text":"I found this in the\n.NET Source Code\n: It claims to be 100 times faster than\n`System.Double.IsNaN`\n. Is there a reason to not use this function instead of\n`System.Double.IsNaN`\n?\n`[StructLayout(LayoutKind.Explicit... |
{"title":"linq query to return distinct field values from a list of objects","tags":["c#","linq"],"question_text":"`class obj\n{\nint typeID; \/\/10 types 0-9 \nstring uniqueString; \/\/this is unique\n}`\nAssume there is list with 100 elements of obj, but only 10 unique typeIDs.\nIs it possible to do write a LINQ quer... |
{"title":"Atom text editor remove trailing whitespace on save","tags":["save","whitespace","sublimetext3","removing-whitespace","atom-editor"],"question_text":"I use\n`Sublime text`\n. Now I am trying\n`Atom`\n. When I save any file in sublime text it does not include any trailing blank line. But saving any file in\n`A... |
{"title":"Is there a built in .NET exception that indicates an illegal object state?","tags":["c#",".net","exception"],"question_text":"What exception should I throw if I encounter an illegal state - for instance, an initialization method that should only be called once being called a second time? I don't really see an... |
{"title":"How to change WSDL URL from internal machine name to public?","tags":["wcf","azure","wsdl"],"question_text":"I have a simple service that I deployed to Azure. It is accessible via:\n`http:\/\/xxxxxxxxxxxxxxxxxxxxxxx.cloudapp.net\/MyTestService.svc`\nThe URL to the WSDL uses the internal machine name instead o... |
{"title":"How can I translate a shell script to Perl?","tags":["perl","shell"],"question_text":"I have a shell script, pretty big one. Now my boss says I must rewrite it in Perl.\nIs there any way to write a Perl script and use the existing shell code as is in my Perl script. Something similar to\nInline::C\n.\nIs ther... |
{"title":"WebView, add local .CSS file to an HTML page?","tags":["android","html","css","resources","httpclient"],"question_text":"In android i'm using WebView to display a part of a webpage wich I fetched from the internet using HttpClient from Apache. To only have the part I want from the html, I use Jsoup.\n`String ... |
{"title":"How does one use Basic Authentication with Volley on Android?","tags":["android","android-volley"],"question_text":"I'm looking through examples and code but I don't see anything implemented. Is this possible at this stage?","answer_text":"For those who don't want to use Spring for Android just for that, here... |
{"title":"Detecting honest web crawlers","tags":["c#","web-crawler","bots"],"question_text":"I would like to detect (on the server side) which requests are from bots. I don't care about malicious bots at this point, just the ones that are playing nice. I've seen a few approaches that mostly involve matching the user ag... |
{"title":"Hide Tab headers in WPF TabControl","tags":["wpf","tabcontrol"],"question_text":"What is the best way to hide Tab headers when there is only a single visible Tab?\nI want to hide TabControl chrome completely, while leaving the content of the Tab visible.","answer_text":"You can use a Style applied to TabItem ... |
{"title":"Is there a numpy builtin to reject outliers from a list","tags":["python","numpy"],"question_text":"Is there a numpy builtin to do something like the following? That is, take a list\n`d`\nand return a list\n`filtered_d`\nwith any outlying elements removed based on some assumed distribution of the points in\n`... |
{"title":"Items inside GridView getting repeated when screen scrolls","tags":["android","android-layout","gridview","drawable"],"question_text":"I'm using a GridView to show a set of Categories that user can chose. Each item of the grid is consisted by an ImageView and a TextView, both retrieved from server. When an it... |
{"title":"Data directory has no read\/write permission in Android","tags":["android","android-emulator","android-manifest"],"question_text":"I m using Android 1.5 my data directory doesn't have the read\/write permissions\n`System.out.println(\"DAta can write??--->\"+Environment.getDataDirectory().canWrite());\nSystem.... |
{"title":"How do I export (and then import) a Subversion repository?","tags":["svn"],"question_text":"I'm just about wrapped up on a project where I was using a commercial SVN provider to store the source code. The web host the customer ultimately picked includes a repository as part of the hosting package, so, now tha... |
{"title":"How to create a random float in Objective-C?","tags":["objective-c","random","floating-point"],"question_text":"I'm trying to create a random float between 0.15 and 0.3 in Objective-C. The following code always returns 1:\n`int randn = (random() % 15)+15;\nfloat pscale = (float)randn \/ 100;`\nWhat am I doing... |
{"title":"How to send a HTTP OPTIONS request from the command line?","tags":["curl","wget"],"question_text":"I tried to use cURL but it seems that by default (Debian) is not compiled with HTTPS support and I dont want to build it myself.\n`wget`\nseems to have SSL support but I found no information on how to generate a... |
{"title":"Attribute Routing not working in areas","tags":["asp.net-mvc","asp.net-mvc-routing"],"question_text":"Scenario: I have a Forms area in my ASP.NET MVC 5 site.\nI'm trying to redirect to the Details Action which uses a custom route defined using the new Attribute Routing feature.\nThe RedirectToAction:\n`return... |
{"title":"Can I get && to work in Powershell?","tags":["syntax","powershell"],"question_text":"`&&`\nis notoriously hard to search for on google, but the best I've found is\nthis article\nwhich says to use\n`-and`\n.\nUnfortunately it doesn't give any more information, and I can't find out what I'm supposed to do with\... |
{"title":"django project root self discovery","tags":["django"],"question_text":"Ok so I recall there are some commands you could put in the\n`settings.py`\nfile so that basically when you move your django project to another directory it won't get foo-bar'd up.\nI know I could just do this by having a string variable e... |
{"title":"In java, What do the return values of Comparable.compareTo mean?","tags":["java"],"question_text":"What is the difference between return 0, return 1 and return -1 in compareTo() in java?..","answer_text":"Official Definition\nFrom the reference docs of\nComparable.compareTo(T)\n:\nCompares this object with th... |
{"title":"Is this time complexity actually O(n^2)?","tags":["python","string","algorithm","string-concatenation"],"question_text":"I am working on a problem out of CTCI.\nThe third problem of chapter 1 has you take a string such as\n`'Mr John Smith '`\nand asks you to replace the intermediary spaces with\n`%20`\n:\n`'M... |
{"title":"Maven Could not resolve dependencies, artifacts could not be resolved","tags":["maven","maven-3"],"question_text":"This is supposed to be a working project from my friend. He demonstrated the project right in front of me, and then I copied the project, imported it as an existing maven project (I'm using m2ecl... |
{"title":"GIT repository layout for server with multiple projects","tags":["git"],"question_text":"One of the things I like about the way I have Subversion set up is that I can have a single main repository with multiple projects. When I want to work on a project I can check out just that project. Like this\n`\\main\n ... |
{"title":"How do I uninstall a package installed using npm link?","tags":["node.js","npm"],"question_text":"When installing a node package using\n`sudo npm link`\nin the package's directory, how can I uninstall the package once I'm done with development?\n`npm link`\ninstalls the package as a symbolic link in the syste... |
{"title":"What is \"Advanced\" SQL?","tags":["sql","database"],"question_text":"Looking at a job descriptions where \"advanced SQL\" is a requirement. I can write basic queries as well as anyone, and have worked with MySQL databases in a professional setting, but what would I be getting into with these jobs, if I were ... |
{"title":"How to test nodejs backend code with Karma (testacular)","tags":["node.js","mocha","karma-runner"],"question_text":"How do I setup Karma to run my backend unit tests (written with Mocha)? If I add my backend test script to the\n`files = []`\n, it fails stating that\n`require`\nis undefined.","answer_text":"Yo... |
{"title":"undefined reference to 'std::cout'","tags":["c++","c++11","gcc","cout"],"question_text":"Shall this be the example:\n`#include <iostream>\nusing namespace std;\nint main()\n{\n cout << \"Hola, moondo.\\n\";\n}`\nIt throws the error:\n`gcc -c main.cpp gcc -o edit main.o main.o: In function `main':\nmain.cpp:(.... |
{"title":"Settings variable values in a Moq Callback() call","tags":["c#",".net","unit-testing","mocking","moq"],"question_text":"I think I may be a bit confused on the syntax of the Moq Callback methods. When I try to do something like this:\n`IFilter filter = new Filter();\nList<IFoo> objects = new List<IFoo> { new F... |
{"title":"Get the subdomain from a URL","tags":["url","parsing","dns","subdomain"],"question_text":"Getting the subdomain from a URL sounds easy at first.\n`http:\/\/www.domain.example`\nScan for the first period then return whatever came after the \"http:\/\/\" ...\nThen you remember\n`http:\/\/super.duper.domain.exam... |
{"title":"How to free up the memory in JavaScript","tags":["javascript","arrays","memory-management","html5-canvas"],"question_text":"I'm working with canvas and its ImageData object which contains a huge amount of data (millions of integers). So working with a few arrays already takes a lot of memory (up to 300MB). Is... |
{"title":"Android open ContextMenu on short click + pass item clicked details","tags":["android"],"question_text":"`lv.setOnItemClickListener(new OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView text = (TextView) view.findViewById(R.id.b... |
{"title":"What is the difference between up-casting and down-casting with respect to class variable","tags":["java","casting","class-variables","downcasting","up-casting"],"question_text":"What is the difference between up-casting and down-casting with respect to class variable?\nFor example in the following program cl... |
{"title":"How do I detect a mobile browser in a .NET MVC3 application","tags":[".net","asp.net-mvc-3","razor"],"question_text":"I'm developing a .NET MVC3 application.\nIs there a good way to detect if the user is using a mobile browser in the view (using RAZOR). \nI'm wanting to differ the display logic if it's a mobi... |
{"title":"What does \"this\" mean?","tags":["javascript","jquery"],"question_text":"In jquery, what does\n`this`\nmeans and when it is used?","answer_text":"`this`\nin JavaScript is very special and powerful. It can mean just about anything. I cover some of it\nhere\nand\nhere\n, but it's really worth finding a good tu... |
{"title":"How to make a submit button in WPF?","tags":["wpf","submit","keypress"],"question_text":"When you press\nEnter\nanywhere in a HTML\n`form`\nit triggers its\n`action`\n, that is equivalent of pressing the\n`submit`\nbutton.\nHow to make a window that when I press\nEnter\nanywhere it will trigger an event?","an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.