text stringlengths 74 309k |
|---|
{"title":"jquery sortable placeholder height problem","tags":["jquery","jquery-ui","jquery-ui-sortable","jquery-sortable"],"question_text":"For some reason the placeholder for my sortable items is about 10px. All my sortable items have different heights. How can I change the height of each placeholder to match the item... |
{"title":"What is the difference between a 'function' and a 'procedure'?","tags":["function","terminology","procedure"],"question_text":"Generally speaking, we all hear about the \"functions\" or the \"procedures\" in programming languages. However, I just found out that I use these terms almost interchangeably (which ... |
{"title":"Explode string by one or more spaces or tabs","tags":["php","regex","explode"],"question_text":"How can I explode a string by one or more spaces or tabs?\nExample:\n`A B C D`\nI want to make this an array.","answer_text":"`$parts = preg_split('\/\\s+\/', $str);`","question_code":["A B C D\n"],"... |
{"title":"What is the function __construct used for?","tags":["php","constructor"],"question_text":"I have been noticing\n`__construct`\na lot with classes. I did a little reading and surfing the web, but I couldn't find an explanation I could understand. I am just beginning with OOP.\nI was wondering if someone could ... |
{"title":"iOS app, programmatically get build version","tags":["ios","objective-c"],"question_text":"Is there a way to programmatically get the build version of my app? I need to be able to detect when the user has updated the app through the AppStore, in order to execute some code for adjustments","answer_text":"The v... |
{"title":"Why do we need Abstract factory design pattern?","tags":["design-patterns","abstract-factory"],"question_text":"Most of the definition says:\nAn abstract factory provides an\n interface for creating families of\n related objects without specifying\n their concrete classes\nWhat is the use of Abstract Factory ... |
{"title":"check if checkbox is checked javascript","tags":["javascript","jquery-mobile","checkbox"],"question_text":"I am buildin a mobile web app with jquery mobile and\nI want to check if a checkbox is checked. Here is my code.\n`<script type=text\/javascript>\nfunction validate(){\nif (remember.checked == 1){\n aler... |
{"title":"Huge number of files generated for every AngularJS 2 project","tags":["javascript","angular2"],"question_text":"I wanted to start a simple hello world app for AngularJS 2.\nWhen I followed the instructions in the official\nquickstart\nthe installation created 32,000 files in my project.\nI figured this is som... |
{"title":"GSON - Date format","tags":["java","gson"],"question_text":"I'm trying to have a custom date format in Gson output, but\n`.setDateFormat(DateFormat.FULL)`\ndoesn't seem to work and it the same with\n`.registerTypeAdapter(Date.class, new DateSerializer())`\n.\nIt's like Gson doesn't care about the object \"Dat... |
{"title":"Android N requires the IDE to be running with Java 1.8 or later?","tags":["android","android-studio","android-n"],"question_text":"My\n`XML`\nlayout is not rendering with this error message. I am already using Java 8.\nAlso using latest build tools in Gradle.\n`android {\n compileSdkVersion 'android-N'\n buil... |
{"title":"Multiple levels of 'collection.defaultdict' in Python","tags":["python","dictionary","nested"],"question_text":"Thanks to some great folks on SO, I discovered the possibilities offered by\n`collections.defaultdict`\n, notably in readability and speed. I have put them to use with success.\nNow I would like to ... |
{"title":"Creating an index on a table variable","tags":["sql","sql-server","tsql","indexing","table-variable"],"question_text":"Can you create a index on a table variable in SQL Server 2000?\ni.e.\n`DECLARE @TEMPTABLE TABLE (\n [ID] [int] NOT NULL PRIMARY KEY\n ,[Name] [nvarchar] (255) COLLATE DATABASE_DEFAULT NULL \n... |
{"title":"Best approach to real time http streaming to HTML5 video client","tags":["html5","node.js","ffmpeg","streaming"],"question_text":"I'm really stuck trying to understand the best way to stream real time output of ffmpeg to a HTML5 client using node.js, as there are a number of variables at play and I don't have... |
{"title":"Google Maps API V3 : weird UI display glitches (with screenshot)","tags":["google-maps","google-maps-api-3"],"question_text":"Anyone with any ideas on what's causing this weird glitch with the google maps UI components, be really grateful to hear from you!\nthe map is created with:\n`var options = {\n zoom: <... |
{"title":"How to exit from Python without traceback?","tags":["python","exit","traceback"],"question_text":"I would like to know how to I exit from Python without having an traceback dump on the output.\nI still want want to be able to return an error code but I do not want to display the traceback log.\nI want to be a... |
{"title":"Prevent line-break of span element","tags":["html","css"],"question_text":"I have a\n`<span>`\nelement which I want to display without any line break. How can I do that?","answer_text":"Put this in your CSS:\n`white-space:nowrap;`\nGet more information here:\nhttp:\/\/www.w3.org\/wiki\/CSS\/Properties\/white-... |
{"title":"Git On Custom SSH Port","tags":["git","version-control","ssh","cygwin"],"question_text":"My VPS provider recommends that I leave my SSH port to the custom port number they assign it by default (not 22). The thing is the while I know I can give the port number when create a remote config, it seems like I can't... |
{"title":"How can I save an image to the camera roll?","tags":["iphone","ios","objective-c","ipad","camera"],"question_text":"I am new to Xcode (using 4.3) and am not sure how to save an image to the device's camera roll. All that I have done so far is set up an IBAction for the button to save the image. What library m... |
{"title":"JavaScript: How to join \/ combine two arrays to concatenate into one array?","tags":["javascript","arrays"],"question_text":"I'm trying to combine 2 arrays in javascript into one.\n`var lines = new Array(\"a\",\"b\",\"c\");\nlines = new Array(\"d\",\"e\",\"f\");`\nThis is a quick example, i want to be able t... |
{"title":"What is the AppDelegate for and how do I know when to use it?","tags":["objective-c","iphone"],"question_text":"I'm just beginning to work on iPhone apps. How do I know when I should be putting stuff in AppDelegate versus a custom class? Is there a rule or any type of analogy with another programming language... |
{"title":"Fragments within Fragments","tags":["android","android-fragments","android-nested-fragment"],"question_text":"I'm wondering if this is actually a bug in the Android API:\nI have a setup like so:\n`\u00e2\u0094\u008c----\u00e2\u0094\u00ac---------\u00e2\u0094\u0090\n| | |\n| 1 | 2 |\n| |\u00e2\u0094\u008c-----... |
{"title":"clear javascript console in Google Chrome","tags":["javascript","console","google-chrome"],"question_text":"I was wondering if I could clear up the console with some command..\n`console.log()`\n, can print... is there a command to clear up console?..\nI've tried to\n`console.log(console);`\nand got this funct... |
{"title":"AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https","tags":["javascript","html","angularjs","xmlhttprequest"],"question_text":"I have three files of a very simple angular js application\nindex.html\n`<!DOCTYPE html>\n<html ng-app=\"gemStore\">\n... |
{"title":"Data binding to SelectedItem in a WPF Treeview","tags":["c#","wpf","mvvm","treeview","selecteditem"],"question_text":"How can I retrieve the item that is selected in a WPF-treeview? I want to do this in XAML, because I want to bind it.\nYou might think that it is\n`SelectedItem`\nbut apparently that\ndoes not... |
{"title":"Understanding CUDA grid dimensions, block dimensions and threads organization (simple explanation)","tags":["cuda","nvidia"],"question_text":"How are threads organized to be executed by a GPU?","answer_text":"Hardware\nIf a GPU device has, for example, 4 multiprocessing units, and they can run 768 threads eac... |
{"title":"UITableView + Add content offset at top","tags":["iphone","cocoa-touch","uitableview","uikit"],"question_text":"I need to add some blank space to the top of my UITableView that does not effect the size of the content area. Shifting the content down or adding a blank cell is NOT what I want to do. Instead I ju... |
{"title":"Should I use Java date and time classes or go with a 3rd party library like Joda Time?","tags":["java","date","time","jodatime"],"question_text":"I'm creating a web based system which will be used in countries from all over the world. One type of data which must be stored is dates and times.\nWhat are the pro... |
{"title":"Difference between a Postback and a Callback","tags":["asp.net","javascript","postback","callback"],"question_text":"I keep on hearing this words '\ncallback\n' and '\npostback\n' tossed around.\nWhat is the difference between two ?\nIs postback very specific to the ASP.NET pages ?","answer_text":"A Postback ... |
{"title":"How can I check if a background image is loaded?","tags":["javascript","jquery"],"question_text":"I want to set a background image on the body tag, then run some code - like this:\n`$('body').css('background-image','http:\/\/picture.de\/image.png').load(function() {\n alert('Background image done loading');\n... |
{"title":"MVC for advanced PHP developers","tags":["php","oop","model-view-controller"],"question_text":"I need some help from more experienced programmers. I want to improve my MVC skills. But I could not find a good tutorial on Google for MVC. Google always gives \"MVC for beginners\".\nI understand what MVC is and I... |
{"title":"XCode 4 warning \"Expression result unused\u00e2\u0080\u009d for NSURLConnection","tags":["iphone","objective-c","ios","xcode","warnings"],"question_text":"I'm just trying to do my usual data transfert. I define my NSMutableURLRequest then call\n`[[NSURLConnection alloc] initWithRequest:request delegate:self]... |
{"title":"+ operator for array in PHP?","tags":["php","arrays"],"question_text":"`$test = array('hi');\n$test += array('test','oh');\nvar_dump($test);`\nWhat does\n`+`\nmean for array in PHP?","answer_text":"Quoting from the\nPHP Manual on Language Operators\nThe + operator returns the right-hand array appended to the ... |
{"title":"How to change the session timeout in PHP?","tags":["php","session","session-timeout"],"question_text":"I would like to extend the session timeout in php\nI know that it is possible to do so by modifying the php.ini file.\nBut I don't have access to it.\nSo is it possible to do it only with php code?","answer_... |
{"title":"No @XmlRootElement generated by JAXB","tags":["java","jaxb","xjc","fpml"],"question_text":"I'm trying to generate Java classes from the FpML (Finanial Products Markup Language) version 4.5. A ton of code is generated, but I cannot use it. Trying to serialize a simple document I get this:\n`javax.xml.bind.Mars... |
{"title":"Avoiding first chance exception messages when the exception is safely handled","tags":["c#",".net","exception"],"question_text":"The following bit of code catches the EOS Exception\n`using (var reader = new BinaryReader(httpRequestBodyStream)) {\n try {\n while (true) {\n bodyByteList.Add(reader.ReadByte());\... |
{"title":"Remove not alphanumeric characters from string. Having trouble with the [\\] character","tags":["javascript","regex"],"question_text":"I want to convert the following string to the provided output.\n`Input: \"\\\\test\\red\\bob\\fred\\new\"\nOutput: \"testredbobfrednew\"`\nI've not found any solution that wil... |
{"title":"CardView layout_width=\"match_parent\" does not match parent RecyclerView width","tags":["android","android-layout","android-5.0-lollipop","recyclerview","android-cardview"],"question_text":"I have a fragment with contains a RecyclerView with layout_width=\"match_parent\":\n`<android.support.v7.widget.Recycle... |
{"title":"How can I get current date in Android?","tags":["android","date","simpledateformat","android-date"],"question_text":"I wrote the following code\n`Date d = new Date();\nCharSequence s = DateFormat.format(\"MMMM d, yyyy \", d.getTime());`\nBut is asking me parameter, I want current date in string format,\nlike\... |
{"title":"Proper practice for subclassing UIView?","tags":["ios","objective-c","cocoa-touch","uiview"],"question_text":"I'm working on some custom UIView-based input controls, and I'm trying to ascertain proper practice for setting up the view. When working with a UIViewController, it's fairly simple to use the\n`loadV... |
{"title":"httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName","tags":["linux","apache","centos"],"question_text":"CentOS 5.0\nI tried to restart my apache server and got this messeage\n`httpd: Could not reliably determine the server's fully qualified domain name... |
{"title":"Random number from a range in a Bash Script","tags":["bash","shell","scripting"],"question_text":"I need to generate a random port number between\n`2000-65000`\nfrom a shell script. The problem is\n`$RANDOM`\nis only a 16-bit number, so I'm stuck!\n`PORT=$(($RANDOM%63000+2001))`\nwould work nicely if it wasn'... |
{"title":"What is output buffering?","tags":["php","output-buffering"],"question_text":"What is output buffering and why is one using it in PHP?","answer_text":"Output Buffering for Web Developers, a Beginner\u00e2\u0080\u0099s Guide\n:\nWithout output buffering (the default), your HTML is sent to the browser in pieces... |
{"title":"Why Emacs\/Vim\/Textmate? Isn't Xcode good enough?","tags":["objective-c","xcode","vim","emacs","textmate"],"question_text":"Hi I mostly do C++, Objective-C programming. And I found Xcode plus an auto completion\/macro plugin (Completion Dictionary) quite adequate.\nHowever, all people seem to praise over the... |
{"title":"gitosis vs gitolite?","tags":["git","gitosis","gitolite"],"question_text":"I am looking for installing a git server to share projects with my team. I don't want to create a user account on the server with SSH access for each developer that needs a git access.\nIt seems there is two concurrent solutions that c... |
{"title":"Ignore invalid self-signed ssl certificate in node.js with https.request?","tags":["node.js","https","ssl-certificate"],"question_text":"I'm working on a little app that logs into my local wireless router (Linksys) but I'm running into a problem with the router's self-signed ssl certificate.\nI ran wget 192.1... |
{"title":"How to pattern match using regular expression in Scala?","tags":["regex","scala","pattern-matching"],"question_text":"I would like to be able to find a match between the first letter of a word, and one of the letters in a group such as \"ABC\". In pseudocode, this might look something like:\n`case Process(wor... |
{"title":"How big should a UIBarButtonItem image be?","tags":["ios","iphone","uibarbuttonitem"],"question_text":"I'm looking to create my own custom Sort By Date and Sort By Number buttons that I plan on placing in the navigation bar as the right button.\nHow big should my image be to appropriately fill the space -- th... |
{"title":"Android - Start service on boot","tags":["java","android","broadcastreceiver","intentservice"],"question_text":"From everything I've seen on Stack Exchange and elsewhere, I have everything set up correctly to start an IntentService when Android OS boots. Unfortunately it is not starting on boot, and I'm not g... |
{"title":"What's the significance of Oct 12 1999?","tags":[".net","asp.net","cookies"],"question_text":"In the SignOut method of\nSystem.Web.Security.FormsAuthentication\n, the ASP.NET team chose to expire the FormsAuth cookie by setting the expiration date to \"Oct 12 1999\".\n`HttpCookie cookie = new HttpCookie(Forms... |
{"title":"Divide int's and round up in Objective-C","tags":["objective-c"],"question_text":"I have 2 int's. How do I divide one by the other and then round up afterwards?","answer_text":"If your ints are\n`A`\nand\n`B`\nand you want to have ceil(A\/B) just calculate\n`(A+B-1)\/B`\n.","question_code":[],"answer_code":[]... |
{"title":"How do you test a public\/private DSA keypair?","tags":["encryption","ssl","openssl","key"],"question_text":"Is there an easy way to verify that a given private key matches a given public key? I have a few *.pub, and a few *.key files, and I need to check which go with which.\nAgain, these are pub\/key files,... |
{"title":"Get button click inside UI table view cell","tags":["ios","uitableview","uibutton"],"question_text":"I have a ViewController with tableview and a separate nib for the table cell template. The Cell template has some buttons. I want to access the button click along with the index of the cell clicked inside the ... |
{"title":"What is the \"assert\" function?","tags":["c++","c","assert"],"question_text":"I've been studying OpenCV tutorials and came across the\n`assert`\nfunction; what does it do?","answer_text":"`assert`\nwill terminate the program (usually with a message quoting the assert statement) if its argument turns out to b... |
{"title":"One class per file rule in .NET?","tags":["c#",".net"],"question_text":"I follow this rule but some of my colleagues disagree with it and argue that if a class is smaller it can be left in the same file with other class(es).\nAnother argument I hear all the time is \"Even Microsoft doesn't do this, so why sho... |
{"title":"Python, compute list difference","tags":["python","list"],"question_text":"In Python, what is the best way to compute the difference between two lists?\nexample\n`A = [1,2,3,4]\nB = [2,5]\nA - B = [1,3,4]\nB - A = [5]`","answer_text":"`>>> set([1,2,3,4]) - set([2,5])\nset([1, 3, 4])\n>>> set([2,5]) - set([1,2... |
{"title":"How to get current PHP page name","tags":["php"],"question_text":"Possible Duplicate:\nGet the current script file name\nI've a file called\n`demo.php`\nwhere I don't have any GET variables in the url so If I want to hide a button if am on this page I can't use something like this :\n`if($_GET['name'] == 'val... |
{"title":"iOS Detect 3G or WiFi","tags":["ios","objective-c","wifi","reachability","3g"],"question_text":"I am not sure if this is possible, but I have this scenario.\nI have a website displayed in my UIWebView which has the link set in a UISegmentedController.\nThey website can detect if you are on wifi or on the 3g n... |
{"title":"No route matches [GET] \/assets","tags":["ruby-on-rails","ruby-on-rails-3","asset-pipeline"],"question_text":"I have a Rails app that I'm trying to test in the production environment. I ran\n`RAILS_ENV=production rake assets:precompile`\nwhich generated all of my assets in \/public\/assets. The problem is tha... |
{"title":"Append data to a POST NSURLRequest","tags":["ios","objective-c","nsurlrequest"],"question_text":"How do you append data to an existing\n`POST`\n`NSURLRequest`\n? I need to add a new parameter\n`userId=2323`\n.","answer_text":"If you don't wish to use 3rd party classes then the following is how you set the pos... |
{"title":"How can I change the image displayed in an UIImageView programmatically?","tags":["iphone","uiimageview"],"question_text":"I have an\n`IBOutlet`\nto an\n`UIImageView`\n, but when I look at the\n`UIImageView`\ndoc, I can't see any hint about how to programmatically change it. Do I have to fetch an\n`UIImage`\n... |
{"title":"Can Android Studio be used to run standard Java projects?","tags":["java","android","ide","android-studio"],"question_text":"For those times when you want to isolate the Java and give it a quick test..\nCan you run non-Android Java projects in Android studio as in Eclipse?","answer_text":"Tested on Android St... |
{"title":"Change Placeholder Text using jQuery","tags":["jquery","jquery-plugins"],"question_text":"I am using a jQuery placeholder plugin(https:\/\/github.com\/danielstocks\/jQuery-Placeholder). I need to change the placeholder text with the change in dropdown menu. But it is not changing. Here is the code:\n`$(functi... |
{"title":"Rounding BigDecimal to *always* have two decimal places","tags":["java","math","bigdecimal","rounding"],"question_text":"I'm trying to round BigDecimal values up, to two decimal places.\nI'm using\n`BigDecimal rounded = value.round(new MathContext(2, RoundingMode.CEILING));\nlogger.trace(\"rounded {} to {}\",... |
{"title":"How to Get True Size of MySQL Database?","tags":["mysql","database","size","byte","storage"],"question_text":"I would like to know how much space does my MySQL database use, in order to select a web host.\nI found the command\n`SHOW TABLE STATUS LIKE 'table_name'`\nso when I do the query, I get something like... |
{"title":"Is it possible to install another version of Python to Virtualenv?","tags":["python","virtualenv"],"question_text":"I have a shared account in a web-hosting that has Python 2.4 installed, but my code is not compatible with 2.4. Is it possible to install Python 2.6 directly to Virtualenv?\nNote: I don\u00c2\u0... |
{"title":"ValidateRequest=\"false\" doesn't work in Asp.Net 4","tags":["asp.net","asp.net-4.0","validate-request"],"question_text":"I have a form at which I use ckeditor. This form worked fine at Asp.Net 2.0 and 3.5 but now it doesn't work in Asp.Net 4+. I have ValidateRequest=\"false\" directive. Any suggestions?","an... |
{"title":"JavaScript function aliasing doesn't seem to work","tags":["javascript","function","closures","alias"],"question_text":"I was just reading\nthis question\nand wanted to try the alias method rather than the function-wrapper method, but I couldn't seem to get it to work in either Firefox 3 or 3.5beta4, or Googl... |
{"title":"Difference between parameter and argument","tags":["language-agnostic","parameters","arguments","terminology"],"question_text":"Is there a difference between a \"parameter\" and an \"argument\", or are they simply synonyms?","answer_text":"Argument is often used in the sense of \"actual argument\" vs. \"forma... |
{"title":"Determine if map contains a value for a key?","tags":["c++","stl","map"],"question_text":"What is the best way to determine if a STL map contains a value for a given key?\n`#include <map>\nusing namespace std;\nstruct Bar\n{\n int i;\n};\nint main()\n{\n map<int, Bar> m;\n Bar b = {0};\n Bar b1 = {1};\n m[0] ... |
{"title":"is it possible to evenly distribute buttons across the width of an android linearlayout","tags":["android","android-linearlayout"],"question_text":"I have a linear layout (oriented horizontally) that contains 3 buttons. I want the 3 buttons to have a fixed width and be evenly distributed across the width of t... |
{"title":"How to Truncate a string in PHP to the word closest to a certain number of characters?","tags":["php","string","function"],"question_text":"I have a code snippet written in PHP that pulls a block of text from a database and sends it out to a widget on a webpage. The original block of text can be a lengthy art... |
{"title":"Timing a command's execution in PowerShell","tags":["powershell","time"],"question_text":"Is there a simple way to time the execution of a command in PowerShell, like the 'time' command in Linux?\nI came up with this:\n`$s=Get-Date; .\\do_something.ps1 ; $e=Get-Date; ($e - $s).TotalSeconds`\nBut I would like ... |
{"title":"Why does (1 in [1,0] == True) evaluate to False?","tags":["python","syntax","operator-precedence"],"question_text":"When I was looking at answers to\nthis question\n, I found I didn't understand my own answer.\nI don't really understand how this is being parsed. Why does the second example return False?\n`>>>... |
{"title":"Why does \",,,\" == Array(4) in Javascript?","tags":["javascript"],"question_text":"Boot up your interpreter\/console and try the comparison\n`> \",,,\" == Array(4)\nTrue`\nWhy? At first I thought maybe since you could think of \",,,\" as an array of four characters with a '\\0' terminating slice, that might ... |
{"title":"Angular: Should I use this or $scope","tags":["angularjs"],"question_text":"There are two patterns in use for accessing controller functions: \"this\" and \"$scope\".\nWhich should I use and when? I understand \"this\" is set to the controller and \"$scope\" is an object in the scope chain for views. But with... |
{"title":"Custom views with Storyboard","tags":["ios","storyboard","xib"],"question_text":"In complex screens (View Controllers) I used to separate the whole thing in smaller pieces (I call them widgets). These widgets consist basically of a\n`MyWidget.h`\nand a\n`MyWidget.m`\nfile as well as a\n`MyWidget.xib`\nfile, w... |
{"title":"Page vs Window in WPF?","tags":["c#","wpf"],"question_text":"What is the difference between a Page and a Window in WPF when you are adding a new file in the Solution Explorer?","answer_text":"Pages are intended for use in Navigation applications (usually with Back and Forward buttons, e.g. Internet Explorer).... |
{"title":"Why declare a struct that only contains an array in C?","tags":["c","arrays","coding-style","struct"],"question_text":"I came across some code containing the following:\n`struct ABC {\n unsigned long array[MAX];\n} abc;`\nWhen does it make sense to use a declaration like this?","answer_text":"It allows you to... |
{"title":"C#: how to get first char of a string?","tags":["c#","string"],"question_text":"Can the first\n`char`\nof a string be retrieved by doing the following?\n`MyString.ToCharArray[0]`","answer_text":"Just\n`MyString[0]`\n. This uses the\nString.Chars\nindexer.","question_code":["MyString.ToCharArray[0]\n"],"answer... |
{"title":"How do I migrate a model out of one django app and into a new one?","tags":["django","migration","django-south"],"question_text":"I have a django app with four models in it. I realize now that one of these models should be in a separate app. I do have south installed for migrations, but I don't think this is ... |
{"title":"Could not load file or assembly 'System.Web.Http 4.0.0 after update from 2012 to 2013","tags":["c#","asp.net-web-api","odata","visual-studio-2013"],"question_text":"I did the upgrade according to.\nhttp:\/\/www.asp.net\/mvc\/tutorials\/mvc-5\/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-... |
{"title":"PHP DOMDocument loadHTML not encoding UTF-8 correctly","tags":["php","utf-8","character-encoding"],"question_text":"I'm trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me).\n`$profile = \"<div><p>various japanese characters<\/p><\/div... |
{"title":"How can I determine if a date is between two dates in Java?","tags":["java","date"],"question_text":"How can I check if a date is between two other dates, in the case where all three dates are represented by instances of\n`java.util.Date`\n?","answer_text":"This might be a bit more readable:\n`Date min, max; ... |
{"title":"Can't launch my app in Instruments: At least one target failed to launch","tags":["iphone","ios","xcode","instruments"],"question_text":"I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message:\n`Error Starting Recor... |
{"title":"How to connect to LocalDB in Visual Studio Server Explorer?","tags":["visual-studio","entity-framework-6","localdb","server-explorer","sql-server-2012-localdb"],"question_text":"I can't believe I couldn't find a working solution to this after an hour of searching. I'm following\nthis article\non Entity Framew... |
{"title":"How to turn a Ruby Hash into HTTP Params","tags":["ruby","http","hashmap","params"],"question_text":"That is pretty easy with a plain hash like\n`{:a => \"a\", :b => \"b\"}`\nwhich would translate into\n`\"a=a&b=b\"`\nbut what do you do with something more complex like\n`{:a => \"a\", :b => [\"c\", \"d\", \"e... |
{"title":"How to find the most recent file in a directory using .NET, and without looping?","tags":["c#",".net","file","loops","last-modified"],"question_text":"I need to find the most recently modified file in a directory.\nI know I can loop through every file in a folder and compare\n`File.GetLastWriteTime`\n, but is... |
{"title":"multiple packages in context:component-scan, spring config","tags":["java","spring","component-scan"],"question_text":"How can I add multiple packages in spring-servlet.xml file in\n`context:component-scan`\nelement?\nI have tried\n`<context:component-scan base-package=\"z.y.z.service\" base-package=\"x.y.z.c... |
{"title":"How can I prevent scroll bars from being hidden for OS X trackpad users in WebKit\/Blink?","tags":["css","webkit","scrollbar","osx-lion","blink"],"question_text":"WebKit\/Blink's (Safari\/Chrome) default behaviour on on Mac OS X since 10.7 (Lion) is to hide scroll bars from trackpad users when they're not in ... |
{"title":"How to generate a random string of a fixed length in golang?","tags":["string","random","go"],"question_text":"I want a random string of characters only (uppercase or lowercase), no numbers in Golang. What is the fastest and simplest way to do this in Go?","answer_text":"Paul's solution provides a simple, gen... |
{"title":"How to add a class to DOM element in JavaScript?","tags":["javascript","dom"],"question_text":"How to add a class for the\n`div`\n?\n`var new_row = document.createElement('div');`","answer_text":"`new_row.className = \"aClassName\";`\nHeres more info on MDN:\nclassName","question_code":["var new_row = documen... |
{"title":"Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin'","tags":["python","mingw","distutils","cython"],"question_text":"I'm trying to compile a python extension with cython in win 7 64-bit using mingw (64-bit).\nI'm working with Python 2.6 (Active Python 2.6.6) and... |
{"title":"How to tell PowerShell to wait for each command to end before starting the next?","tags":["powershell"],"question_text":"I have a PowerShell 1.0 script to just open a bunch of applications. The first is a virtual machine and the others are development applications. I want the virtual machine to finish booting... |
{"title":"Stack smashing detected","tags":["c","exception","stack"],"question_text":"I am executing my a.out file. After execution the program runs for some time then exits with the message:\n`**** stack smashing detected ***: .\/a.out terminated*\n*======= Backtrace: =========*\n*\/lib\/tls\/i686\/cmov\/libc.so.6(__fo... |
{"title":"Convert integer into its character equivalent in Javascript","tags":["javascript","integer","alphabet"],"question_text":"I want to convert an integer into its character equivalent based on the alphabet. For example:\n`0 => a\n1 => b\n2 => c\n3 => d`\netc. I could build an array and just look it up when I need... |
{"title":"What are the downsides to using Dependency Injection?","tags":["design-patterns","dependency-injection"],"question_text":"I'm trying to introduce DI as a pattern here at work and one of our lead developers would like to know: What - if any - are the\ndownsides\nto using the Dependency Injection pattern?\nNote... |
{"title":"Non recursive Depth first search algorithm","tags":["algorithm","tree"],"question_text":"I am looking for a Non recursive Depth first search algorithm for a non binary tree. Any help is very much appreciated.","answer_text":"DFS:\n`list nodes_to_visit = {root};\nwhile( nodes_to_visit isn't empty ) {\n current... |
{"title":"What is the easiest\/best\/most correct way to iterate through the characters of a string in Java?","tags":["java","string","iteration","character","tokenize"],"question_text":"`StringTokenizer`\n? Convert the\n`String`\nto a\n`char[]`\nand iterate over that? Something else?","answer_text":"I use a for loop t... |
{"title":"Invert colormap in matplotlib","tags":["python","matplotlib"],"question_text":"I would like to know how to simply reverse the color order of a given colormap in order to use it with plot_surface.","answer_text":"The standard colormaps also all have reversed versions. They have the same names with\n`_r`\ntacke... |
{"title":"Get Maven artifact version at runtime","tags":["java","maven-2"],"question_text":"I have noticed that in a Maven artifact's JAR, the project.version attribute is included in two files:\n`META-INF\/maven\/${groupId}\/${artifactId}\/pom.properties\nMETA-INF\/maven\/${groupId}\/${artifactId}\/pom.xml`\nIs there ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.