text stringlengths 74 309k |
|---|
{"title":"Why does \"pip install\" raise a SyntaxError?","tags":["python","pip"],"question_text":"I'm trying to use pip to install a package. I try to run\n`pip install`\nfrom the Python shell, but I get a\n`SyntaxError`\n. Why do I get this error? How do I use pip to install the package?\n`>>> pip install selenium\n ^... |
{"title":"How can I monitor the active thread count of a process (jvm) on linux?","tags":["linux","multithreading","jvm","monitor"],"question_text":"I would like to monitor the number of threads used by a specific jvm process on linux.\nIs there an easy way to get this information without impacting the performance of t... |
{"title":"What does a \\ (backslash) do in PHP (5.3+)?","tags":["php","namespaces"],"question_text":"What does a\n`\\`\ndo in PHP?\nI was reading the following code which has it all over the place.\nThe link\nwill bring you to one of the lines which contains it.","answer_text":"`\\`\n(backslash) is the namespace separa... |
{"title":"eclipse won't start - no java virtual machine was found","tags":["eclipse","java"],"question_text":"Eclipse was running fine yesterday (and has been since I installed it about a year ago). Now all the sudden I'm getting the following error on startup:\n`\"A Java Runtime Environment (JRE) or Java Development K... |
{"title":"How to set the environmental variable LD_LIBRARY_PATH in linux","tags":["linux","environment-variables"],"question_text":"I have first executed the command:\n`export LD_LIBRARY_PATH=\/usr\/local\/lib`\nThen I have opened\n`.bash_profile`\nfile:\n`vi ~\/.bash_profile`\n.\nIn this file, I put:\n`LD_LIBRARY_PATH... |
{"title":"How to disable Google asking permission to regularly check installed apps on my phone?","tags":["android","permissions","privacy","policy"],"question_text":"I'm developing an Android app, which I therefore endlessly build and install on my test device. Since a couple days I get with every build\/install a que... |
{"title":"What is the use of making constructor private in a class?","tags":["oop"],"question_text":"Why should we make the constructor private in class? As we always need the constructor to be public.","answer_text":"Some reasons where you may need private constructor:\nThe constructor can only be accessed from\nstati... |
{"title":"Running xcodebuild from a forked terminal","tags":["iphone","xcode","xcodebuild"],"question_text":"I'm trying to setup an automated build server for an iPhone application. I'd like to be able to have nightly adhoc beta builds so that testers can follow the development.\nI've setted up xcode successfully xcode... |
{"title":"Android ListView: get data index of visible item","tags":["android","listview"],"question_text":"I have an Android\n`ListView`\ncreated with a\n`SimpleAdapter`\nthat has more items in it than fit in the screen. After the list has been scrolled, I need to get the position in the data model of the first visible... |
{"title":"Vertically align text within input field of fixed-height without display: table or padding?","tags":["css","xhtml"],"question_text":"The line-height property usually takes care of vertical alignment, but not with inputs. Is there a way to automatically center text without playing around with padding?","answer... |
{"title":"Check if an NSString is just made out of spaces","tags":["objective-c","string","cocoa-touch","cocoa","nsstring"],"question_text":"I want to check if a particular string is just made up of spaces. It could be any number of spaces, including zero. What is the best way to determine that?","answer_text":"`NSStri... |
{"title":"Populate nested array in mongoose","tags":["node.js","mongodb","mongoose"],"question_text":"How can I populate \"components\" in the example document:\n`{\n \"__v\": 1,\n \"_id\": \"5252875356f64d6d28000001\",\n \"pages\": [\n {\n \"__v\": 1,\n \"_id\": \"5252875a56f64d6d28000002\",\n \"page\": {\n \"componen... |
{"title":"MySql difference between two timestamps in Seconds?","tags":["sql","mysql","timestamp"],"question_text":"Is it possible to calculate difference between two timestamps in Mysql and get output result in seconds? like 2010-11-29 13:16:55 - 2010-11-29 13:13:55 should give 180 seconds.\nThank you","answer_text":"I... |
{"title":"What are Python dictionary view objects?","tags":["python","view","dictionary"],"question_text":"In python 2.7, we got the\ndictionary view methods\navailable.\nNow, I know the pro and cons of the following:\n`dict.items()`\n(and\n`values`\n,\n`keys`\n): returns a list, so you can actually store the result\n`... |
{"title":"Need some clarification about beta\/alpha testing on the developer console","tags":["android","publishing","beta-testing"],"question_text":"Background\nThe Android developer console has 3 tabs for publishing the app's apk file:\nalpha, beta and production, as shown here:\nas I recall from one of Google IO lec... |
{"title":"How do I setup Public-Key Authentication?","tags":["linux","ssh"],"question_text":"How do I setup Public-Key Authentication for SSH?","answer_text":"If you have SSH installed, you should be able to run..\n`ssh-keygen`\nThen go through the steps, you'll have two files,\n`id_rsa`\nand\n`id_rsa.pub`\n(the first ... |
{"title":"TypeError: not all arguments converted during string formatting python","tags":["python","string","python-3.x","typeerror","output-formatting"],"question_text":"The program is supposed to take in two name and if they are the same length it check if they are the same word, if it's the same word it will print\n... |
{"title":"How do I make an http request using cookies on Android?","tags":["java","android","http","url","cookies"],"question_text":"I'd like to make an http request to a remote server while properly handling cookies (eg. storing cookies sent by the server, and sending those cookies when I make subsequent requests). It... |
{"title":"Why should exceptions be used conservatively?","tags":["c++","exception"],"question_text":"Possible Duplicate:\nWhy is exception handling bad?\nI often see\/hear people say that exceptions should only be used rarely, but never explain why. While that may be true, rationale is normally a glib:\n\"it's called a... |
{"title":"Using group by on two fields and count in SQL","tags":["mysql","sql"],"question_text":"I have a table in my mysql db that has two columns: group and subgroup. See below.\n`group, subGroup\n grp-A, sub-A\n grp-A, sub-A\n grp-A, sub-B \n grp-B, sub-A\n grp-B, sub-B\n grp-B, sub-B`\nI am trying to get the number... |
{"title":"Why is the app waiting for the debugger when its not connected to computer?","tags":["android"],"question_text":"It seems like every step I take in the Android world I run into problems. Im soon up to 20 questions here on StackOverflow hehe =)\nUsually, I have my HTC Hero connected to the computer via USB and... |
{"title":"When should I use `return` in es6 Arrow Functions?","tags":["javascript","function","return","ecmascript-6","arrow-functions"],"question_text":"The new\nes6 arrow functions\nsay\n`return`\nis implicit under some circumstances:\nThe expression is also the implicit return value of that function.\nIn what cases ... |
{"title":"How can I extract the file name and extension from a path in C++","tags":["c++","string","file-io"],"question_text":"I have a list of files stored in a\n`.log`\nin this syntax:\n`c:\\foto\\foto2003\\shadow.gif\nD:\\etc\\mom.jpg`\nI want to extract the name and the extension from this files. Can you give a exa... |
{"title":"Static Constants in C#","tags":["c#","string","const"],"question_text":"I have this code;\n`using System;\nnamespace Rapido\n{\n class Constants\n {\n public static const string FrameworkName = \"Rapido Framework\";\n } \n}`\nVisual Studio tells me:\n`The constant 'Rapido.Constants.FrameworkName' cannot be ma... |
{"title":"validate natural input number with ngpattern","tags":["angularjs","angularjs-validation"],"question_text":"I use\n`ng-pattern=\"\/0-9\/\"`\nto set\n`price_field`\ndo not accept\n`decimal number`\n. But when I input natural number (from 0 to 9999999),\n`ng-show`\ngets activated with\n`Not valid number!`\n.\nWh... |
{"title":"Respond.JS Not Working in IE 8","tags":["internet-explorer","css3","internet-explorer-8","media-queries","respond.js"],"question_text":"For some reason it appears that respond JS isn't working. I am using Media Queries in IE 8 to change background images for various size monitors. In IE 8 there is no backgrou... |
{"title":"Local SMTP server that can be used for testing and development - won't actually deliver mail","tags":["windows-7","smtp"],"question_text":"When I'm developing something that sends email, I sometimes don't want to actually send any email, but I do want to see what email would be sent using live data. However, ... |
{"title":"Best way to make a shell script daemon?","tags":["bash","shell"],"question_text":"I'm wondering if there is a better way to make a daemon that waits for something using only sh than:\n`#! \/bin\/sh\ntrap processUserSig SIGUSR1\nprocessUserSig() {\n echo \"doing stuff\"\n}\nwhile true; do\n sleep 1000\ndone`\n... |
{"title":"iOS 7 UISearchDisplayController search bar overlaps status bar while searching","tags":["ios","uisearchbar","ios7","statusbar","uisearchdisplaycontroller"],"question_text":"I'm updating my app for iOS 7, and I'm in the process of adjusting all my views to account for the new transparent status bar (my app wil... |
{"title":"PHP abstract properties","tags":["php","oop","abstract-class"],"question_text":"Is there any way to define abstract class properties in PHP?\n`abstract class Foo_Abstract {\n abstract public $tablename;\n}\nclass Foo extends Foo_Abstract {\n \/\/Foo must 'implement' $property\n public $tablename = 'users'; \n... |
{"title":"jQuery doesn't support postmessage event?","tags":["jquery","html5","postmessage"],"question_text":"When I use jQuery event listener to handle message event, like below:\n`$(window).on('message', function(e) {\n var data = e.data; \/\/ data = undefined\n});`\ndata is undefined! I'm sure that I have passed dat... |
{"title":"What is RPC framework and Apache Thrift?","tags":["rpc","thrift"],"question_text":"I need to learn\nApache Thrift\nfor a University project. As this\ntutorial\nsays, it is an RPC framework, and it was the only document I could find for Thrift other than\ntheir documentation\n.\nCan someone tell me what is a R... |
{"title":"NSUrlConnectionDelegate - Getting http status codes","tags":["iphone","ios","xamarin.ios","http-response-codes","nsurlconnectiondelegate"],"question_text":"in iOS, how can I receive the http status code (404,500 200 etc) for a response from a web server. I am assuming it's in the NSUrlConnectionDelegate.\nObj... |
{"title":"Java using enum with switch statement","tags":["java","enums","switch-statement"],"question_text":"I've looked at various Q&As on SO similar to this question but haven't found a solution.\nWhat I have is an enum which represents different ways to view a TV Guide...\nIn the NDroid\n`Application`\nclass\n`stati... |
{"title":"Couldn't load a xcode project because it is already opened from another project or workspace","tags":["objective-c","ios","xcode","three20"],"question_text":"I have a project that has one target dependency. The target dependency is dependent on a framework called Three20.\nThe dependency tree looks like this.... |
{"title":"How to convert Calendar to java.sql.Date in Java?","tags":["java","sql","calendar"],"question_text":"`Calendar cal;\nString sql = \"INSERT INTO ttable (dt) values (?);\"\n\/\/dt is a dateTime field in ttable\nPreparedStatement stmt = connection.prepareStatement(sql);\nstmt = setDate(1,cal); \/\/not working\ns... |
{"title":"JavaScript: undefined !== undefined?","tags":["javascript"],"question_text":"NOTE: As per\nECMAScript5.1, section 15.1.1.3\n, window.undefined is read-only.\nModern browsers implement this correctly. for example: Safari 5.1, Firefox 7, Chrome 20, etc.\nUndefined is still changeable in: Chrome 14, ...\nWhen I ... |
{"title":"Is it possible create recursively folders using shell script?","tags":["linux","bash","shell"],"question_text":"Im trying to create recursively level of directories like\n`\/folder1\/folder2\/folder3`\nIm trying this\n`mkdir folder1\/folder2\/folder3`\n, but doesnt work.\nhow can I do it?\nthanks","answer_tex... |
{"title":"Rake db:migrate - how do I undo all migrations and redo them","tags":["ruby-on-rails","database","ruby-on-rails-3","migration"],"question_text":"Is there a quick rake db:rollback command for all of the migrations?","answer_text":"While @Orlandos' response is correct,\n`rake db:reset`\ndoes not redo all migrat... |
{"title":"List<T> vs BindingList<T> Advantages\/DisAdvantages","tags":["c#",".net","winforms","data-binding","datagridview"],"question_text":"Can someone describe what the difference between the two are for my project.\nCurrently I have a\n`List<MyClass>`\nand set the BindingSource to that and a DataGridView to the Bin... |
{"title":"Implementing Singleton with an Enum (in Java)","tags":["java","design-patterns","enums","singleton"],"question_text":"I have read that it is possible to implement\n`Singleton`\nin Java using an\n`Enum`\nsuch as:\n`public enum MySingleton {\n INSTANCE; \n}`\nBut, how does the above work? Specifically, an\n`Obj... |
{"title":"Dynamically adding <li\/> to <ul\/> in jquery mobile","tags":["jquery","html5","jquery-mobile"],"question_text":"I'm trying to add list items to unordered lists in jquery mobile, but the formatting doesn't seem to be created properly.\n`<ul data-role=\"listview\" data-theme=\"c\" data-dividertheme=\"b\">\n <l... |
{"title":"How to prove that a problem is NP complete?","tags":["algorithm"],"question_text":"I have problem with scheduling. I need to prove that the problem is NP complete. What can be the methods to prove it NP complete?","answer_text":"To show a problem is NP complete, you need to:\nShow it is in NP\nIn other words,... |
{"title":"Rename ASP.NET MVC project resulting in multiple types for controller error","tags":["c#","asp.net-mvc-3"],"question_text":"This has happenned before and I can't remember how I solved it. I renamed an MVC project then did a ReSharper refactor to update the namespaces. Now when I run I get the following error ... |
{"title":"Xcode keeps building storyboard after each keystroke","tags":["ios","xcode","build","storyboard"],"question_text":"My Xcode project using a storyboard entered in a very weird state recently: Xcode keeps building the whole project and notably the storyboard after\neach keypress\n. I found no reason for this be... |
{"title":"How can I configure multiple sub domains in Express.js or Connect.js","tags":["node.js","express","subdomains","connect.js"],"question_text":"I am used to working on httpd ( Apache ) which provides a way to configure subdomains which is mapped to a directory.\nHow can I do the same thing in Connect.js\/Expres... |
{"title":"How to make an enum conform to a protocol in Swift?","tags":["enums","protocols","swift"],"question_text":"Swift documentation says that\nclasses\n,\nstructs\n, and\nenums\ncan all conform to protocols, and I can get to a point where they all conform. But I can't get the\nenum\nto behave quite like the\nclass... |
{"title":"Why does ASP.NET webforms need the Runat=\"Server\" attribute?","tags":["asp.net","runatserver"],"question_text":"Why do I have to specify\n`runat=\"server\"`\non all my ASP.NET controls when it is a mandatory attribute and\n`server`\nis the only option available in my limited knowledge of ASP.NET, and I get ... |
{"title":"How to print something without a new line in ruby","tags":["ruby"],"question_text":"`puts`\nstatement in ruby automatically adds a new line, how do I avoid it.","answer_text":"Use\n`print`\ninstead.\nYou may want to follow it up by\n`STDOUT.flush`\n.","question_code":[],"answer_code":[],"retrieval_text":"\n##... |
{"title":"Java: String concat vs StringBuilder - optimised, so what should I do?","tags":["java","string","append","concatenation","stringbuilder"],"question_text":"In\nthis answer\n, it says (implies) that String concatenation is optimised into StringBuilder operations anyway, so when I write my code, is there any rea... |
{"title":"How and why does the Haskell Cont monad work?","tags":["haskell","monads","continuations"],"question_text":"This is how the Cont monad is defined:\n`newtype Cont r a = Cont { runCont :: (a -> r) -> r }\ninstance Monad (Cont r) where\n return a = Cont ($ a)\n m >>= k = Cont $ \\c -> runCont m $ \\a -> runCont ... |
{"title":"How to add a ScrollBar to a Stackpanel","tags":["c#","wpf","stackpanel","scrollbars"],"question_text":"In my WPF application, I have a Stackpanel containing several controls inside them. How can I add a Scrollbar to this stackpanel.","answer_text":"Put it into a\n`ScrollViewer`\n.","question_code":[],"answer_... |
{"title":"Screenshot of the Nexus One from adb?","tags":["android","graphics","ffmpeg","screenshot"],"question_text":"My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB.\nSo far, I can get the framebuffer which I believe is a\n`32bit xRGB888`\nraw image by pull... |
{"title":"Google warning: Resource interpreted as Font but transferred with MIME type application\/octet-stream","tags":["css","font-face"],"question_text":"I have a warning in Google for my font-face:\nResource interpreted as Font but transferred with MIME type application\/octet-stream: \"...\/Content\/Fonts\/iconFon... |
{"title":"How to get the size of a string in Python?","tags":["python","string","string-length"],"question_text":"For example, I get a string:\n`str = \"please answer my question\"`\nI want to write it to a file.\nBut I need to know the size of the string before writing the string to the file. What function can I use t... |
{"title":"Angular UI-Router multiple views","tags":["angularjs","angular-ui-router"],"question_text":"I am using angular UI-Router. I have the following in my route config\n`.config(function config($stateProvider) {\n $stateProvider.state('newsFeedView', {\n url: '\/newsFeed',\n controller: 'newsFeedController',\n temp... |
{"title":"'Invalid update: invalid number of rows in section 0","tags":["ios","objective-c","arrays","nsmutablearray"],"question_text":"I've read all of the related posts regarding this and I am still having an error:\n`'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing se... |
{"title":"Can I develop Android on Mac?","tags":["android","osx"],"question_text":"I want to develop applications on Android. Can the SDK be installed on Mac?","answer_text":"Yes. Android development primarily takes place with Java and in Eclipse (which itself runs on Java) and therefore is cross platform.\nDownload th... |
{"title":"Rspec - Difference between let and before block","tags":["ruby-on-rails","unit-testing","rspec"],"question_text":"What is difference between let and before block in rspec?\nAnd when to use these block?\nWhat will be good approach let or before in below example\n`let(:user) { User.make !}\nlet(:account) {user.... |
{"title":"How to get parent element by specified tag name using jquery?","tags":["jquery","parent"],"question_text":"I want to get an Element's parent which has an specified tag name.\nSample code:\n`<table>\n <tr>\n <td>\n <input type='button' id='myId' \/>\n <\/td>\n <\/tr>\n<\/table>`\nNow i want something like this... |
{"title":"#import using angle brackets < > and quote marks \" \"","tags":["objective-c","syntax","import","packages"],"question_text":"I'm wondering what decides whether you're allowed to use\n`<Header.h>`\nor\n`\"Header.h\"`\nwhen you're importing files in Objective-C. So far my observation has been that you use the q... |
{"title":"Haskell's algebraic data types","tags":["data-structures","haskell","types","functional-programming","algebraic-data-types"],"question_text":"I'm trying to fully understand all of Haskell's concepts.\nIn what ways are algebraic data types similar to generic types, e.g., in C# and Java? And how are they differ... |
{"title":"How to get scrollbar position with Javascript?","tags":["javascript","browser","scroll"],"question_text":"I'm trying to detect the position of the browser scrollbar with Javascript to decide where in the page the current view is. My guess is that I have to detect where the thumb on the track is, and then the ... |
{"title":"Animated GIF in IE stopping","tags":["internet-explorer","gif","animated-gif"],"question_text":"Does anyone know a work around to make animated GIF's continue to be animated after you click a link or submit a form on the page your on in IE? This works fine in other browsers.\nThanks.","answer_text":"The accep... |
{"title":"Get file name and extension in Ruby","tags":["ruby","file"],"question_text":"I'm working on a program to download a video from YouTube, convert it to MP3 and create a directory structure for the files.\nMy code is:\n`FileUtils.cd(\"#{$musicdir}\/#{$folder}\") do\n YoutubeDlhelperLibs::Downloader.get($url)\n i... |
{"title":"No valid 'aps-environment' entitlement string found for application on app store","tags":["ios","objective-c","xcode","app-store","push"],"question_text":"So I have this app called Dripper that I put out about a month ago and then an update a couple days ago. The update added push notifications and a few litt... |
{"title":"How to use Guice's AssistedInject?","tags":["java","guice","guice-3"],"question_text":"I've read\nhttps:\/\/github.com\/google\/guice\/wiki\/AssistedInject\n, but it doesn't say how to pass in the values of the AssistedInject arguments. What would the injector.getInstance() call look like?","answer_text":"Che... |
{"title":"AngularJS - Dependency injection in services, factories, filters etc","tags":["javascript","dependency-injection","angularjs"],"question_text":"So I have some plugins and libraries I want to use in my angular app and (currently) I am simply referencing those functions\/methods as they were intended in 99% of ... |
{"title":"How do I start a program with arguments when debugging?","tags":["c#","visual-studio","visual-studio-2008","visual-studio-debugging"],"question_text":"I want to debug a program in Visual Studio 2008. The problem is that it exits if it doesn't get arguments. This is from the main method:\n`if (args == null || ... |
{"title":"jquery animate background position","tags":["jquery","jquery-animate","background-position"],"question_text":"I can't seem to get this working.\n`$('#product_family_options_dd').animate({\n height: '300px',\n width: '900px',\n backgroundPosition: '-20px 0px', \n},`\nThe height and width animate but not the ba... |
{"title":"Wix create non advertised shortcut for all users \/ per machine","tags":["wix","windows-installer","wix3","shortcuts","advertised-shortcut"],"question_text":"In WIX, how do you create a non advertised shortcut in the allusers profile? So far I've only been able to accomplish this with advertised shortcuts. I ... |
{"title":"how to add background image to activity?","tags":["android","image","background"],"question_text":"using theme or ImageView ?","answer_text":"use the\n`android:background`\nattribute in your xml. Easiest way if you want to apply it to a whole activity is to put it in the root of your layout. So if you have a ... |
{"title":"What is the optimal length for an email address in a database?","tags":["database","performance","email","database-design"],"question_text":"I am doing my first database project.\nI have had the following query in the column of\n`EMAIL_ADDRESS`\n:\n`...\nEMAIL_ADDRESS CHARACTER VARYING(20) NOT NULL, \n...`\nH... |
{"title":"Angular2 QuickStart npm start is not working correctly","tags":["angularjs","node.js","npm","angular2"],"question_text":"I know Angular2 beta has just been released but I can't reproduce the steps from their official site tutorial (\nhttps:\/\/angular.io\/docs\/ts\/latest\/quickstart.html\n). Maybe someone ha... |
{"title":"How can I set Visual Studio to use K&R style bracketing?","tags":["c#","formatting"],"question_text":"I really don't like this style of formatting:\n`Class AwesomeClass\n{\n private static void AwesomeMethod()\n {\n }\n}`\nCan I make it format my code like this?\n`Class AwesomeClass {\n private static void Aw... |
{"title":"How do I convert a String object into a Hash object?","tags":["ruby"],"question_text":"I have a string which looks like a hash:\n`\"{ :key_a => { :key_1a => 'value_1a', :key_2a => 'value_2a' }, :key_b => { :key_1b => 'value_1b' } }\"`\nHow do I get a Hash out of it? like:\n`{ :key_a => { :key_1a => 'value_1a'... |
{"title":"onClick on ViewPager not triggered","tags":["android","android-viewpager"],"question_text":"I set a click listener on a\n`ViewPager`\n, but the onClick event is never called. I guess the touch event detection of the\n`ViewPager`\nis interfering, but I can't see how to solve it...\nAnybody could help?\nThanks\... |
{"title":"Android alpha animation fadein fadeout with delays","tags":["android","animation","alpha","fadein","fadeout"],"question_text":"I want to do a very simple alpha animation but I cannot find a valid way.\nThe idea is to perform this animation over a view:\nalpha from 0 to 1 of 1 second\nhold alpha at 1 for 5 sec... |
{"title":"Using JSF as view technology of Spring MVC","tags":["spring","jsp","jsf","spring-mvc","primefaces"],"question_text":"I am currently implementing a small Spring MVC PoC, and I would like to use JSF as the view technology since most people in my company are used to a J2EE with Primefaces environment.\nDoes Spri... |
{"title":"Creating a Preference Screen with support (v21) Toolbar","tags":["android","android-actionbar","android-5.0-lollipop","android-actionbar-compat","android-toolbar"],"question_text":"I was having trouble using the new Material Design toolbar in the support library on a Preference screen.\nI have a settings.xml ... |
{"title":"Get pixel color from canvas, on mouseover","tags":["javascript","html5","canvas","getimagedata"],"question_text":"Is it possible to get the RGB value pixel under the mouse? Is there a complete example of this? Here's what I have so far:\n`<script>\nfunction draw() {\n var ctx = document.getElementById('canvas... |
{"title":"How can I write custom Exceptions?","tags":["java","exception"],"question_text":"How can I create a new\n`Exception`\ndifferent from the pre-made types?\n`public class InvalidBankFeeAmountException extends Exception{\n public InvalidBankFeeAmountException(String message){\n super(message);\n }\n }`\nIt will s... |
{"title":"Best open-source Mathematica equivalent","tags":["open-source","wolfram-mathematica","symbolic-math","computer-algebra-systems"],"question_text":"What is the best open-source equivalent for Mathematica? My requirements are:\n(most important) Must be a real computer algebra system (CAS). Notably, I don't want ... |
{"title":"How-to init a ListPreference to one of its values","tags":["android"],"question_text":"I'm trying to set a defaultValue to a ListPreference item.\nHere is an sample of my preference.xml file:\n`<ListPreference android:key=\"notification_delay\"\n android:title=\"@string\/settings_push_delay\"\n android:entrie... |
{"title":"How to read appSettings section in the web.config file?","tags":[".net","wcf","web-config","appsettings"],"question_text":"My xml looks like this. and the name is\n`web.config`\n`<?xml version=\"1.0\"?>\n<configuration>\n <appSettings> \n <add key=\"configFile\" value=\"IIS.config\"\/>\n <add key=\"RialtoDoma... |
{"title":"why there's not std::is_struct type trait?","tags":["c++","c++11","typetraits"],"question_text":"I've seen that in order to check if a type\n`T`\nis a class I can use\n`bool isClass = std::is_class<T>::value;`\nIt returns true for both classes and structs. I know that in C++ they are almost the same thing, bu... |
{"title":"How do I center an image if it's wider than its container?","tags":["css"],"question_text":"Normally, you center images with\n`display: block; margin: auto`\n, but if the image is larger than the container, it overflows to the right. How do I make it overflow to the both sides equally? The width of the contai... |
{"title":"\"From View Controller\" disappears using UIViewControllerContextTransitioning","tags":["ios","iphone","objective-c","uiview","transition"],"question_text":"I got one problem and i have described it below.\nI am using UIViewControllerContextTransitioning for custom transitions.\nI have 2 view controllers , fi... |
{"title":"Validating url with jQuery without the validate-plugin?","tags":["jquery","url","validation"],"question_text":"I need to validate a url in\nvariable\nwith jQuery, but can't use validate-plugin. Is there a simple way to do this?","answer_text":"You can use the same regex that the validation plugin does (update... |
{"title":"Graph Search vs Tree Search","tags":["search","graph","tree","a-star","depth-first-search"],"question_text":"I am curious whether there is the basic difference between\ngraph search\nand\ntree search\nversions regarding DFS, A* Searches in Artificial Intelligence?","answer_text":"Judging from the existing ans... |
{"title":"MySQL: How to insert a record for each result in a SQL query?","tags":["mysql","sql","loops","insert"],"question_text":"Say I have a select\n`SELECT DISTINCT id, customer_id, domain FROM config WHERE type = 'foo';`\nwhich returns some records.\nHow can I do an insert for reach row in the result set like\n`INS... |
{"title":"How to copy directory from source tree to binary tree?","tags":["c","copy","cmake"],"question_text":"Copying directory from source tree to binary tree. For example: How to copy www to bin folder.\n`work\n\u00e2\u0094\u009c\u00e2\u0094\u0080bin\n\u00e2\u0094\u0094\u00e2\u0094\u0080src\n \u00e2\u0094\u009c\u00e... |
{"title":"What does auto&& tell us?","tags":["c++","c++11","auto","universal-reference"],"question_text":"If you read code like\n`auto&& var = foo();`\nwhere foo is any function retuning by value of type\n`T`\n. Then\n`var`\nis an lvalue of type rvalue reference to\n`T`\n. But what does this imply for\n`var`\n? Does it... |
{"title":"Stop floating divs from wrapping","tags":["html","css-float","wrap"],"question_text":"I want to have a row of divs (cells) that don't wrap if the browser is too narrow to fit them.\nI've searched Stack, and couldn't find a working answer to what I think should be a simple css question.\nThe cells have specifi... |
{"title":"How do I PUT data to Rails using JQuery","tags":["jquery","ruby-on-rails","ajax","json"],"question_text":"I am trying to send a jquery ajax PUT request that looks like this:\n`$.ajax({\n type: \"PUT\",\n url: '\/admin\/pages\/1.json',\n data: { page : {...} },\n dataType: 'json',\n success: function(msg) {\n ... |
{"title":"Facebook share button and custom text","tags":["facebook"],"question_text":"Is there any way to make facebook share button which post custom text on the wall or news feed?","answer_text":"We use something like this [use in one line]:\n`<a title=\"send to Facebook\" \n href=\"http:\/\/www.facebook.com\/sharer.... |
{"title":"Mac user and getting WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3","tags":["ruby","osx","nokogiri","libxml2"],"question_text":"I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the sug... |
{"title":"Ask permission to access Camera Roll","tags":["objective-c","ios"],"question_text":"I have a settings view where the user can choose switch on or off the feature '\nExport to Camera Roll\n'\nWhen the user switches it on for the first time (and not when he takes the first picture), I would like the app to ask ... |
{"title":"How to grep and replace","tags":["linux","grep","replace"],"question_text":"I need to recursively search for a specified string within all files and subdirectories within a directory and replace this string with another string.\nI know that the command to find it might look like this:\n`grep 'string_to_find' ... |
{"title":"Process list on Linux via Python","tags":["python","linux"],"question_text":"How can I get running process list using Python on Linux?","answer_text":"IMO looking at the\n`\/proc`\nfilesystem is less nasty than hacking the text output of\n`ps`\n.\n`import os\npids = [pid for pid in os.listdir('\/proc') if pid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.