text stringlengths 74 309k |
|---|
{"title":"How does this regex find primes?","tags":["regex","primes"],"question_text":"Possible Duplicate:\nHow to determine if a number is a prime with regex?\nThis page\nclaims that this regular expression discovers non-prime numbers (and by counter-example: primes):\n`\/^1?$|^(11+?)\\1+$\/`\nHow does this find prime... |
{"title":"Reference ASP.NET control by ID in JavaScript?","tags":["javascript","asp.net","ajax"],"question_text":"When ASP.NET controls are rendered their ids sometimes change, like if they are in a naming container.\n`Button1`\nmay actually have an id of\n`ctl00_ContentMain_Button1`\nwhen it is rendered, for example.\... |
{"title":"Can I make Visual Studio place curly braces on the same line as an if statement (in HTML)?","tags":["visual-studio-2010","formatting","views","curly-braces"],"question_text":"In Visual Studio while designing MVC views (in .aspx or .ascx files) I often use if statements. When I auto-format (Ctrl-K,D), VS wraps... |
{"title":"How to tell Xcode where my info.plist and .pch files are","tags":["xcode"],"question_text":"I renamed my project and it's files and now Xcode is still looking for the old info.plist file. Where do I set the locations of the .plist and .pch files that it needs.\nIn my Project Info window, under Packaging there... |
{"title":"Using MD5 hash on a string in cocoa?","tags":["iphone","objective-c","cocoa","cocoa-touch"],"question_text":"Possible Duplicate:\nMD5 algorithm in Objective C\nI need to hash a string using the MD5 technique in cocoa. Any frameworks that are used must be able to be accessed on the iphone. please provide code ... |
{"title":"Use custom fonts in iPhone App","tags":["iphone","ios","fonts"],"question_text":"Possible Duplicate:\nCan I embed a custom font in an iPhone application?\nHow can I customize font in my iphone app?\nIs it possible?\nHow can I give this custom font for a label ?\nCan anyone suggest a good method?\nIam trying t... |
{"title":"What is the differences between local branch, local tracking branch, remote branch and remote tracking branch","tags":["git","version-control","git-branch","git-remote"],"question_text":"I just start using git and I got really confused between different branches. Can anyone help me to figure out what is local... |
{"title":"List selectors for Objective-C object","tags":["objective-c","selector"],"question_text":"I have an object, and I want to list all the selectors to which it responds. It feels like this should be perfectly possible, but I'm having trouble finding the APIs.","answer_text":"This is a solution based on the runti... |
{"title":"How to set or get a cookie value in django","tags":["django","cookies"],"question_text":"This is my code:\n`from django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django import http\nfrom django.http import HttpResponse \ndef main(request, template... |
{"title":"gem install fails with openssl failure","tags":["ruby","osx","rubygems","openssl","cocoapods"],"question_text":"I tried to install cocoapods (\nhttp:\/\/cocoapods.org\/\n) on my OSX Mountain Lion.\n`moshe-mbp:~ moshem$ gem install cocoapods\n ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:\... |
{"title":"Regular expression to match URLs in Java","tags":["java","regex","regexbuddy"],"question_text":"I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java\n`String`\nflavor ... |
{"title":"How do I test if IOS device has telephone capabilities?","tags":["iphone","objective-c","ios"],"question_text":"I want to offer phone support in my app at the press of a button for iPhone users, and display a phone number for iPad\/iPod Touch users. Rather than detecting what device the user has, is there a b... |
{"title":"what does this ( \\S ) regex mean in javascript?","tags":["javascript","regex"],"question_text":"What does \/\\S\/ mean in regex\n`while ( cur ! = null ) {\n if ( cur. nodeType == 3 && ! \/\\S\/. test(cur. nodeValue) ) {\n element. removeChild( cur );\n } else if ( cur. nodeType == 1 ) {\n cleanWhitespace( cu... |
{"title":"How to generate a list of random numbers?","tags":["scala"],"question_text":"This might be the least important Scala question ever, but it's bothering me. How would I generate a list of n random number. What I have so far:\n`def n_rands(n : Int) = {\n var r = new scala.util.Random\n 1 to n map { _ => r.nextIn... |
{"title":"Is there a good natural language processing library","tags":["java","nlp"],"question_text":"I need to implement some NLP in my current module. I am looking for some good library that can help me here. I came across 'LingPipe' but could not completely follow on how to use it.\nBasically, we need to implement a... |
{"title":"Mystery console error with IOHIDFamily","tags":["ios","objective-c","xcode"],"question_text":"For one of my projects, this error message in Xcode's console happens every time I run a build in the iOS Simulator. It's been happening for over a year and I thought it would eventually go away with an update to Xco... |
{"title":"Macro \/ keyword which can be used to print out method name?","tags":["c++","c"],"question_text":"`__FILE__`\nand\n`__LINE__`\nare well known. There is a\n`__func__`\nsince C99.\n`#include <iostream>\nstruct Foo {\n void Do(){ std::cout << __func__ << std::endl; }\n};\nint main()\n{\n std::cout << __func__ <<... |
{"title":"How to Create the Upload File for Application Loader?","tags":["ios","upload","release","ipa","application-loader"],"question_text":"When I use Application Loader, I get to the point where it asks me to \"Choose...\" the file to be uploaded.\nIf I understand correctly, it supposes to be the appName.app file I... |
{"title":"What do Push and Pop mean for Stacks?","tags":["terminology","push","pop","infix-notation","stack"],"question_text":"long story short my lecturer is crap, and was showing us infix to prefix stacks via an overhead projector and his bigass shadow was blocking everything so i missed the important stuff\nhe was r... |
{"title":"Unobtrusive validation not working on dynamically-added partial view","tags":["asp.net-mvc","razor","partial-views","unobtrusive-validation","dynamically-generated"],"question_text":"I am currently facing a problem with validation after dynamically adding content.\nI have a view strongly typed to a model (\n`... |
{"title":"Close a MessageBox after several seconds","tags":["c#","winforms","messagebox"],"question_text":"I have a Windows Forms application VS2010 C# where I display a MessageBox for show a message.\nI have an okay button, but if they walk away, I want to timeout and close the message box after lets say 5 seconds, au... |
{"title":"In Python how can I access \"static\" class variables within class methods","tags":["python"],"question_text":"If I have the following python code:\n`class Foo(object):\n bar = 1\n def bah(self):\n print bar\nf = Foo()\nf.bah()`\nIt complains\n`NameError: global name 'bar' is not defined`\nHow can I access cl... |
{"title":"How is Java platform-independent when it needs a JVM to run?","tags":["java","cross-platform"],"question_text":"I just started learning Java and I'm confused about the topic of platform independence.\nDoesn't \"independent\" imply that Java code should run on any machine and need no special software to be ins... |
{"title":"Firefox addon to view\/edit\/create localStorage data?","tags":["firefox","firebug","firefox-addon","local-storage"],"question_text":"Is there an addon that allows you to view, edit,\n`localStorage`\ninformation?\nIf there is and it works as an extension of Firebug I will be extremely happy.\nSomething like G... |
{"title":"Difference between static in C and static in C++??","tags":["c++","c"],"question_text":"What is the difference between the static keyword in C and C++?","answer_text":"The\n`static`\nkeyword serves the same purposes in C and C++.\nWhen used at file level (outside of a function), it sets the visibility of the ... |
{"title":"Add hyperlink to textblock wpf","tags":["html","wpf","hyperlink","textblock"],"question_text":"Greetings, \nI have some text in a db and it is as follows:\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Duis\n tellus nisl, venenatis et pharetra ac, tempor sed sapien. Integer\n pellentesque blandit v... |
{"title":"How to remove duplicates from a list?","tags":["java","list","collections","duplicates"],"question_text":"I want to remove duplicates from a list but what I am doing is not working:\n`List<Customer> listCustomer = new ArrayList<Customer>(); \nfor (Customer customer: tmpListCustomer)\n{\n if (!listCustomer.con... |
{"title":"How to neutralize box-shadow?","tags":["css","css3"],"question_text":"Currently I'm using this\n`box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;`\nbut on specific size of screen I don't want box-shadow.\nHow can i override to disable the shadow?","answer_text":"Use\nCSS3:: Media Queries\nto create style base... |
{"title":"curl POST format for CURLOPT_POSTFIELDS","tags":["php","post","curl"],"question_text":"When I use\n`curl`\nvia\n`POST`\nand set\n`CURLOPT_POSTFIELD`\ndo I have to\n`urlencode`\nor any special format?\nfor example: If I want to post 2 fields, first and last:\n`first=John&last=Smith`\nwhat is the exact code\/fo... |
{"title":"Javascript Engines Advantages","tags":["javascript","v8","rhino","spidermonkey","javascript-engine"],"question_text":"I am confused about JavaScript engines right now. I know that\nV8\nwas a big deal because it compiled JavaScript to native code.\nThen I started reading about\nMozilla SpiderMonkey\n, which fr... |
{"title":"git: switch branch without detaching head","tags":["git","version-control"],"question_text":"I have a repository on github with a main branch (master) and a branch for some experimental work. I made some commits and pushed to the experimental branch and everything was fine.\nNow, on a different machine, I try... |
{"title":"How do I create 7-Zip archives with .NET?","tags":["c#",".net","compression","7zip"],"question_text":"How can I create 7-Zip archives from my C# console application? I need to be able to extract the archives using the regular, widely available\n7-Zip\nprogram.\nHere are my results with the examples provided a... |
{"title":"Implode data from a multi-dimensional array","tags":["php","arrays","implode"],"question_text":"I'm a novice at PHP and I need a quick solution to the following problem but can't seem to come up with one:\nI have a multi-dimensional array like so\n`Array\n(\n [0] => Array\n (\n [blogTags_id] => 1\n [tag_name]... |
{"title":"Difference between .ToString and \"as string\" in C#","tags":["c#","string","tostring"],"question_text":"What is the difference between using the two following statements? It appears to me that the first \"as string\" is a type cast, while the second ToString is an actual call to a method that converts the in... |
{"title":"InternalsVisibleTo attribute isn't working","tags":[".net","attributes","internalsvisibleto"],"question_text":"I am trying to use the\n`InternalsVisibleTo`\nassembly attribute to make my internal classes in a .NET class library visible to my unit test project. For some reason, I keep getting an error message ... |
{"title":"How can I determine if a given git hash exists on a given branch?","tags":["git"],"question_text":"Background: I use an automated build system which takes a git hash as input, as well as the name of the branch on which that hash exists, and builds it. However, the build system uses the hash alone to check out... |
{"title":"Optimize Nginx + PHP-FPM for faster response times (for Openx adserving)","tags":["php","nginx","openx"],"question_text":"I'm currently running Nginx + PHP-FPM for serving ads on OpenX. Currently my response times are horrible, even during times of low load. However, my CPU and Memory resources are fine, so I... |
{"title":"How to disable UITextField's edit property?","tags":["ios","uikit"],"question_text":"Possible Duplicate:\nEasy way to disable a UITextField?\nI have a UITextField. I want to disable its edit property. I just want to display a text in it.\nHow can i achieve it ?.","answer_text":"To disable editing in UITextFie... |
{"title":"when to choose mouseover() and hover() function","tags":["jquery"],"question_text":"What are the differences between jquery\n`.mouseover()`\nand\n`.hover()`\nfunction? If they are totally same why jQuery uses both?","answer_text":"From the documentation\n`.mouseover()`\n:\nsource\nBind an event handler to the... |
{"title":"Loop structure inside gnuplot?","tags":["gnuplot"],"question_text":"Is there any way to iteratively retrieve data from multiple files and plot them on the same graph in gnuplot. Suppose I have files like data1.txt, data2.txt......data1000.txt; each having the same number of columns. Now I could write somethin... |
{"title":"Conversion from Long to Double in Java","tags":["java"],"question_text":"Is there any way to convert a\n`Long`\ndata type to\n`Double`\nor\n`double`\n?\nFor example, I need to convert\n`15552451L`\nto a\n`double`\ndata type.","answer_text":"You could simply do :\n`double d = (double)15552451L;`\nOr you could ... |
{"title":"How do you convert a C++ string to an int?","tags":["c++","parsing","int","stdstring"],"question_text":"Possible Duplicate:\nHow to parse a string to an int in C++?\nHow do you convert a C++ string to an int?\nAssume you are expecting the string to have actual numbers in it (\"1\", \"345\", \"38944\", for exa... |
{"title":"copy a database within SQL Server Express?","tags":["sql-server","sql-server-express"],"question_text":"I would like to make a copy of a database I have but keep it on the same server as a test database. However, everything I have found is to use the copy database wizard (I am using MS SQL Server Express).\nT... |
{"title":"Can I undo a `git clean -fdx`?","tags":["git","git-clean"],"question_text":"I was following the instructions on\nmaking github pages\n, and forgot to move down into my git sub directory. As a result, I just nuked an entire directory of documents with\n`git clean -fdx`\n. Is there any way I can undo this terri... |
{"title":"Mercurial: multiline commit message on the command line?","tags":["command-line","mercurial"],"question_text":"How can I specify a multiline commit message for mercurial on the command line?\n`hg commit -m \"* add foo\\n* fix bar\"`\ndoes not work. The log shows:\n`changeset: 13:f2c6526e5911\ntag: tip\ndate: ... |
{"title":"How does ?#iefix solve web fonts loading in IE6-IE8?","tags":["css","internet-explorer","webfonts"],"question_text":"Lots of articles in the web like this :\nhttp:\/\/www.fontspring.com\/blog\/fixing-ie9-font-face-problems\nsuggest to add a\n`?#iefix`\nto the eot url. I was curious to know\nhow\nis this going... |
{"title":"Is there a shortcut on Android Studio to convert a text to uppercase?","tags":["android","android-studio"],"question_text":"I'm trying to find a command on Android Studio to convert a selected text to uppercase but I'm unable to do so.\nIs there any shortcut for this? I think it is a very common action on IDE... |
{"title":"How to turn off the automatic gesture to go back a view with a navigation controller?","tags":["ios","objective-c","xcode","ios7"],"question_text":"So I'm noticing all of my views are receiving the gesture to go back (pop a view) when the user swipes on the very left side of the screen (in either orientation)... |
{"title":"How to create a shortcut using Powershell","tags":["powershell","command-line","shortcut","desktop-shortcut","powershell-v5.0"],"question_text":"I want to create a shortcut with Powershell for this executable:\n`C:\\Program Files (x86)\\ColorPix\\ColorPix.exe`\nHow can this be done?","answer_text":"I don't kn... |
{"title":"Android: long click on a button -> perform actions","tags":["android"],"question_text":"I want to use the same button to perform 2 different methods.\nOne method when user single clicks it and a second method (different) when the user LONG clicks it.\nI use this for the single short click (which works great):... |
{"title":"Programmatically detecting Release\/Debug mode (.NET)","tags":[".net","debugging","release"],"question_text":"Possible Duplicate:\nHow to find out if a .NET assembly was compiled with the TRACE or DEBUG flag\nPossible Duplicate:\nHow to idenfiy if the DLL is Debug or Release build (in .NET)\nWhat's the easies... |
{"title":"Should Private\/Protected methods be under unit test?","tags":["unit-testing","tdd"],"question_text":"In TDD development, the first thing you typically do is to create your interface and then begin writing your unit tests against that interface. As you progress through the TDD process you would end-up creatin... |
{"title":"Why use weak pointer for delegation?","tags":["objective-c"],"question_text":"I can't understand why it is correct to define a delegate with weak pointer :\n`@property (nonatomic,weak) id delegate;`\nI can't realize why isn't necessary to retain a reference to the delegate... i don't want the object that i us... |
{"title":"how to align texts inside of a input?","tags":["html","css","forms","html-input"],"question_text":"For all default inputs, the texts you fill starts on the left. How do you make it start on the right?","answer_text":"Use the\ntext-align\nproperty in your CSS:\n`input { \n text-align: right; \n}`\nThis will ta... |
{"title":"PHP: Best way to extract text within parenthesis?","tags":["php","parsing","string"],"question_text":"What's the best\/most efficient way to extract text set between parenthesis? Say I wanted to get the string \"text\" from the string \"ignore everything except this (text)\" in the most efficient manner possi... |
{"title":"F# List.map equivalent in C#?","tags":["c#",".net","linq","f#"],"question_text":"Is there an equivalent to F#'s List.map function in C#? i.e. apply a function to each element in the list and return a new list containing the results.\nSomething like:\n`public static IEnumerable<TResult> Map<TSource, TResult>(t... |
{"title":"Execution order of events when pressing PrimeFaces p:commandButton","tags":["jsf","jsf-2","primefaces","action","commandbutton"],"question_text":"I am trying to execute a JSF2 bean method and show a dialog box after completion of the method on click of PrimeFaces\n`<p:commandButton>`\n.\n`<p:commandButton id=... |
{"title":"How to check if NSString is numeric or not","tags":["objective-c","nsstring"],"question_text":"Possible Duplicate:\niphone how to check that a string is numeric only\nI have one NSString, then i want check the string is number or not.\nI mean\n`NSString *val = @\"5555\" ;\nif(val isNumber ){\n return true;\n}... |
{"title":"How do I add a high-priority TODO comment in Visual Studio?","tags":["visual-studio","visual-studio-2008","comments","task","todo"],"question_text":"Adding a comment such as this:\n`\/\/ TODO: Refactor this code`\n...creates a task in the Task List that I can view etc. There is a column labeled\n`!`\nthat let... |
{"title":"Slide right to left Android Animations","tags":["android"],"question_text":"Hey I am working on an Android project that requires the slide animations on Android WebView.\nWhen the user swipes from left to right it moves to the new page, and when it does that from right to left it moves to previous page. But A... |
{"title":"Set a border for UIButton in Storyboard","tags":["ios","objective-c","uibutton","storyboard","uistoryboard"],"question_text":"I can't get a border onto my buttons in XCode 5 without setting them directly in the code. Is it possible that there's no way to do this on the storyboard without making a custom backg... |
{"title":"How to convert enum names to string in c","tags":["c","string","enums"],"question_text":"Is there a possibility to convert enumerator names to string in C?","answer_text":"Another way, making the preprocessor do the work. It also ensures your enums and strings are in sync.\n`#define FOREACH_FRUIT(FRUIT) \\\n ... |
{"title":"How to customize FBLoginVIew?","tags":["objective-c","ios","facebook","facebook-login","facebook-ios-sdk"],"question_text":"In order to connect to facebook in my ios app i'm using FBLoginVIew from\nFacebook SDK for iOS\n.\nIt shows a nice FB Login Button, but I want to use my own image and text for the login ... |
{"title":"hasattr() vs try-except block to deal with non-existent attributes","tags":["python","exception","exception-handling","attributes","hasattr"],"question_text":"`if hasattr(obj, 'attribute'):\n # do somthing`\nvs\n`try:\n # access obj.attribute\nexcept AttributeError, e:\n # deal with AttributeError`\nWhich sho... |
{"title":"Why are we not to throw these exceptions?","tags":["c#","exception-handling"],"question_text":"I came across\nthis MSDN page\nthat states:\nDo not throw System.Exception, System.SystemException,\n System.NullReferenceException, or System.IndexOutOfRangeException\n intentionally from your own source code.\nUnf... |
{"title":"How do I search git history for a disappeared line?","tags":["git"],"question_text":"I need to search the history of a specific file in a git repository to find a line that is gone. The commit message will not have any relevant text to search on. What command do I use?\nFurther details: this is the history of... |
{"title":"Can regular JavaScript be mixed with jQuery?","tags":["javascript","jquery"],"question_text":"For example, can I take this script (\nfrom mozilla tutorial\n):\n`<html>\n <head>\n <script type=\"application\/javascript\">\n function draw() {\n var canvas = document.getElementById(\"canvas\");\n if (canvas.getC... |
{"title":"Android - Build a notification, TaskStackBuilder.addParentStack not working","tags":["android","notifications"],"question_text":"I'm trying to launch an activity from a notification like the Android docs explain, but when I open the notification and then press the back button, the HomeActivity (parent) doesn'... |
{"title":"What does Ynaxdh stand for? (Yeoman)","tags":["javascript","yeoman"],"question_text":"So, I'm new to javascript automation stuff, especially yeoman (so new that I'm still delighted by the ASCII greet)\n_-----_\n | |\n |--(o)--| .--------------------------.\n `---------\u00c2\u00b4 | Welcome to Yeoman, |\n ( _... |
{"title":"The compiler is complaining about my default parameters?","tags":["c++","class","optional-parameters"],"question_text":"I'm having trouble with this piece of code , after i took this class from the main.cpp file and splitted it in to .h and .cpp the compiler started complaining about the default parameters i ... |
{"title":"What does the comma operator , do in C?","tags":["c","operators","comma-operator"],"question_text":"What does the\n`,`\noperator do in C?","answer_text":"The expression:\n`(expression1, expression2)`\nFirst expression1 is evaluated, then expression2 is evaluated, and the value of expression2 is returned for t... |
{"title":"UITabBar(Controller) - Get index of tapped?","tags":["iphone","objective-c","cocoa-touch","uitabbarcontroller"],"question_text":"I've got a tab bar application and I need to know when and what button a user taps on the tab bar as to display the appropriate notifications and such.\nIn short:\nHow would I go ab... |
{"title":"How to move a domain from Godaddy to AWS Route 53","tags":["amazon-web-services","amazon-route53"],"question_text":"Since Godaddy went down for some hours my client and I are very upset and want to change everything to AWS.\nEverything is done so far, only the domains (blablabla.com) are missing, I'm having a... |
{"title":"What does the comma operator do?","tags":["c++","c","operators","comma-operator"],"question_text":"What does the following code do in C\/C++?\n`if (blah(), 5) {\n \/\/do something\n}`","answer_text":"Comma operator is applied and the value 5 is used to determine the conditional's true\/false.\nIt will execute... |
{"title":"LinearLayout dividers are not showing","tags":["android","android-linearlayout"],"question_text":"I am working on an android project and I have a LinearLayout which contains 2 horizontal buttons using borderless button style.\nI am trying to show dividers in between each button but they are not showing up but... |
{"title":"Inject dependencies in \"run\" method of the module in Angularjs","tags":["javascript","angularjs"],"question_text":"I trying to understand how do I work with Angularjs. It looks like nice framework, but I stuck with a little problem with DI...\nHow I can inject dependecies in \"run\" method of the module? I ... |
{"title":"display:inline vs display:block","tags":["css"],"question_text":"What is the basic difference between this CSS:\n`display:inline`\nand this?\n`display:block``\nUsing these separately on an element, I get the same result.","answer_text":"display: block\nmeans that the element is displayed as a block, as paragr... |
{"title":"Python pandas plot is a no-show","tags":["python","matplotlib","pandas"],"question_text":"When I run this code\n`import pandas as pd\nimport numpy as np\ndef add_prop(group):\n births = group.births.astype(float)\n group['prop'] = births\/births.sum()\n return group\npieces = []\ncolumns = ['name', 'sex', 'bi... |
{"title":"Converting a float to std::string in C++","tags":["c++","type-conversion"],"question_text":"This is a seemingly simple problem, but I'm having difficulty coming up with an answer. I have a float value that needs to be put into a std::string, like so:\n`float val = 2.5;\nstd::string my_val = val; \/\/ error he... |
{"title":"Manually logging in a user without password","tags":["django","login","django-authentication","email-confirmation"],"question_text":"I hope you can help me figure the best way to implement a manual (server-side initiated) login\nwithout\nusing the password. Let me explain the workflow:\nUser registers\nThank ... |
{"title":"SQLAlchemy Obtain Primary Key With Autoincrement Before Commit","tags":["python","sql","sqlalchemy"],"question_text":"When I have created a table with an auto-incrementing primary key, is there a way to obtain what the primary key would be (that is, do something like reserve the primary key) without actually ... |
{"title":"Change marker size in Google maps V3","tags":["google-maps-api-3","google-maps-markers"],"question_text":"I am using\nthis explanation\nof how to color a google maps marker by setting the icon using a\nMarkerImage\n, and the coloring works well. But I can't make the scaledSize argument change the size of the ... |
{"title":"How to change the user and group permissions for a directory, by name?","tags":["python","operating-system","chown"],"question_text":"os.chown\nis exactly what I want, but I want to specify the user and group by name, not ID (I don't know what they are). How can I do that?","answer_text":"`import pwd\nimport ... |
{"title":"How do I jump to a specific line of code in XCode 4?","tags":["xcode","keyboard-shortcuts"],"question_text":"Seems like such a simple thing but I cannot for the life of me figure out how to do this.","answer_text":"CMD\n+\nL\nwill do it... This seems to have changed in XCode 4.","question_code":[],"answer_cod... |
{"title":"Difference between \"system\" and \"exec\" in Linux?","tags":["c","linux","exec","fork"],"question_text":"What is the difference between\n`system`\nand\n`exec`\nfamily commands? Especially I want to know which one of them creates child process to work?","answer_text":"`system()`\ncalls out to\n`sh`\nto handle... |
{"title":"How implement a login filter in JSF?","tags":["jsf","jsf-2","login","authorization","servlet-filters"],"question_text":"I would like to block the access of some page even if the user knows the url of some pages.\nFor example,\n`\/localhost:8080\/user\/home.xhtml`\n(need to do the login first) if not logged th... |
{"title":"Why are there extra pixels around my Android GridView?","tags":["android","gridview","imageview"],"question_text":"I have a GridView in my Android application that has a number of ImageViews in it. The space on my screen is limited and I want the images to take up as much of the available space as they can. U... |
{"title":"\"General error: 1005 Can't create table\" Using Laravel Schema Build and Foreign Keys","tags":["mysql","foreign-keys","laravel"],"question_text":"Essentially, I am having the same issue as this guy, minus the table prefix. Because I have no table prefix, his fix does not work.\nhttp:\/\/forums.laravel.com\/v... |
{"title":"Rails: how do you access RESTful helpers?","tags":["ruby-on-rails","ruby","rest","routing"],"question_text":"I'm trying to work through this\nguide to Rails routing\n, but I got stuck in section\n3.3\n:\nCreating a RESTful route will also make available a pile of helpers within your application\nand then they... |
{"title":"Eclipse\/Maven: JUnit tests not compiled when running them","tags":["eclipse","maven","junit"],"question_text":"I am working on a project using Maven and Eclipse (m2eclipse plugin). I've got problems with the JUnit tests:\nSometimes, when running them within Eclipse, they wont be compiled, but the old class f... |
{"title":"Why does Sass cache folder get created","tags":["sass"],"question_text":"I have started trying out Sass for my css work. In the directory where my Css file resides I see a '.sass-cache' folder too. Can any one tell me why is this folder created and is it safe if I delete it.\nthanks,","answer_text":"By defaul... |
{"title":"Why aren't Enumerations Iterable?","tags":["java","enumeration","iterable"],"question_text":"In Java 5 and above you have the foreach loop, which works magically on anything that implements\n`Iterable`\n:\n`for (Object o : list) {\n doStuff(o);\n}`\nHowever,\n`Enumerable`\nstill does not implement\n`Iterable`... |
{"title":"How to call std::min() when min has been defined as a macro?","tags":["c++","stl","macros"],"question_text":"How do I call\n`std::min`\nwhen\n`min`\nhas already been defined as a macro?","answer_text":"`(std::min)(x,y)`\nThe parentheses around\n`min`\nprevent macro expansion. This works with all function macr... |
{"title":"how to remove an element in lxml","tags":["python","xml","lxml"],"question_text":"I need to completely remove elements, based on the contents of an attribute, using python's lxml. Example:\n`import lxml.etree as et\nxml=\"\"\"\n<groceries>\n <fruit state=\"rotten\">apple<\/fruit>\n <fruit state=\"fresh\">pear... |
{"title":"Xcode 4 shortcut for swapping focus between editor and assistant editor","tags":["xcode","xcode4"],"question_text":"In Xcode, I am big fan of the assitant editor that shows me the corresponding .h or .m for the file that I am editing.\nIs there a shortcut that allows me to swap focus between this two windows?... |
{"title":"PHPDoc: @return void necessary?","tags":["php","return-value","phpdoc"],"question_text":"Is it really necessary do something like this:\n`\/**\n * ...\n * \n * @return void\n *\/`\nI have quite a few methods that don't have a return value, and it seems really redundant to put something like this in the commen... |
{"title":"How to get the values of an enum into a SelectList","tags":["c#","asp.net-mvc","enums"],"question_text":"Imagine I have an enumeration such as this (just as an example):\n`public enum Direction{\n Horizontal = 0,\n Vertical = 1,\n Diagonal = 2\n}`\nHow can I write a routine to get these values into a System.W... |
{"title":"Sorting a list of dot sparated numbers, like software versions","tags":["python"],"question_text":"I have a list containing version strings, such as things:\n`versions_list = [\"1.1.2\", \"1.0.0\", \"1.3.3\", \"1.0.12\", \"1.0.2\"]`\nI would like to sort it, so the result would be something like this:\n`versi... |
{"title":"How do I compute derivative using Numpy?","tags":["python","math","numpy"],"question_text":"How do I calculate the derivative of a function, for example\ny = x\n2\n+1\nusing\n`numpy`\n?\nLet's say, I want the value of derivative at x = 5...","answer_text":"You have four options\nYou can use\nFinite Difference... |
{"title":"Writing a __init__ function to be used in django model","tags":["python","django"],"question_text":"I'm trying to write an\n`__init__`\nfunction for one of my models so that I can create an object by doing\n`p = User('name','email')`\nWhen I write the model, I have\n`def __init__(self, name, email, house_id, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.