text stringlengths 74 309k |
|---|
{"title":"MySQL Error 1215: Cannot add foreign key constraint","tags":["mysql","foreign-keys"],"question_text":"I am trying to forward engineer my new schema onto my db server, but I can't figure out why I am getting this error. I've tried to search for the answer here, but everything I've found has said to either set ... |
{"title":"Remove characters from NSString?","tags":["objective-c","nsstring"],"question_text":"`NSString *myString = @\"A B C D E F G\";`\nI want to remove the spaces, so the new string would be \"ABCDEFG\".","answer_text":"You could use:\n`NSString *stringWithoutSpaces = [myString \n stringByReplacingOccurrencesOfStri... |
{"title":"Which websocket library to use with Node.js?","tags":["node.js","websocket","socket.io","sockjs","engine.io"],"question_text":"Currently there is a\nplethora of websocket libraries\nfor node.js, the most popular seem to be:\nhttps:\/\/github.com\/Worlize\/WebSocket-Node\nhttps:\/\/github.com\/einaros\/ws\nhtt... |
{"title":"Best way to log a Python exception","tags":["python","exception","logging","exception-handling"],"question_text":"I'm printing my exceptions to a log file currently with:\n`try:\n # coode in here\nexcept Exception, e:\n logging.error(e)`\nCould I be printing more information about the exception and the code t... |
{"title":"HTML+CSS: How to force div contents to stay in one line?","tags":["html","css"],"question_text":"I have a long text inside a\n`div`\nwith defined\n`width`\n:\nHTML:\n`<div>Stack Overflow is the BEST !!!<\/div>`\nCSS:\n`div {\n border: 1px solid black;\n width: 70px;\n}`\nHow could I force the string to stay i... |
{"title":"Checking whether a string starts with XXXX","tags":["python","string","string-comparison"],"question_text":"I would like to know how to check whether a string starts with \"hello\" in Python.\nIn Bash I usually do:\n`if [[ \"$string\" =~ ^hello ]]; then\n do something here\nfi`\nHow do I achieve the same in P... |
{"title":"bower command not found","tags":["node.js","twitter","npm"],"question_text":"I tried to install twitter bower on my Mac, and I used\n`npm install bower -g`\nThen I tried\n`bower --help`\n, and the output was\n`bower command not found`\n. Why is that?","answer_text":"Just like in this question (\nnpm global pa... |
{"title":"How can I get the last 7 characters of a PHP string?","tags":["php","string"],"question_text":"Possible Duplicate:\nPHP - cut a string after X characters\nHow would I go about grabbing the last 7 characters of the string below?\nFor example:\n`$dynamicstring = \"2490slkj409slk5409els\";\n$newstring = some_fun... |
{"title":"How to fix Terminal not loading ~\/.bashrc on OS X Lion","tags":["osx","bash","terminal","osx-lion"],"question_text":"Whenever I open a new tab in Terminal using\nCmd\n+\nT\n, it opens bash in the same directory, as the previous tab. This works fine when I'm in the\n`~`\ndirectory, but if I'm anywhere else, I... |
{"title":"How do I work with a git repository within another repository?","tags":["git","git-submodules","multiple-repositories"],"question_text":"I have a Git media repository where I'm keeping all of my JavaScript and CSS master files and scripts that I'll use on various projects.\nIf I create a new project that's in... |
{"title":"Onclick javascript to make browser go back to previous page?","tags":["javascript","html","browser","javascript-events","onclick"],"question_text":"Is there a function I can attach as a click event of a button to make the browser go back to previous page?\n`<input name=\"action\" type=\"submit\" value=\"Cance... |
{"title":"rails simple_form - hidden field - create?","tags":["ruby-on-rails","ruby-on-rails-3","form-for","hidden-field","simple-form"],"question_text":"How can you have a hidden field with simple form?\nThe following code:\n`= simple_form_for @movie do |f|\n = f.hidden :title, \"some value\"\n = f.button :submit`\nre... |
{"title":"Eclipse does not highlight matching variables","tags":["java","eclipse"],"question_text":"Eclipse does not highlight matching variables for me:\nI've already tried to change \"Mark occurrences\" via\n`Window -> Preferences -> Java -> Editor -> Mark Occurrences`\nbut it didn't work. I am not sure why this is n... |
{"title":"How to make my font bold using css?","tags":["css"],"question_text":"I'm very new to HTML and CSS and I was just wondering how I could make my font bold using CSS.\nI have a plain HTML page that imports a CSS file, and I can change the font in the CSS. But I don't know how to make the font bold, can anyone he... |
{"title":"How to wrap text of html button with fixed width","tags":["html","css","button","wrapping"],"question_text":"I just noticed that if you give a html button a fixed width, the text inside the button is never wrapped. I've tried it with word-wrap, but that cuts of the word even though there are spaces available ... |
{"title":"How do you move a file in SVN?","tags":["svn","tortoisesvn"],"question_text":"I'm using TortoiseSVN against the SourceForge SVN repository. I'd like to move a file from one folder to another in order to maintain its revision history. Is this possible? If so, how do you do it?\n(My current strategy has been to... |
{"title":"Toggle input disabled attribute using jQuery","tags":["jquery","toggle","attr"],"question_text":"Here is my code:\n`$(\"#product1 :checkbox\").click(function(){\n $(this)\n .closest('tr') \/\/ Find the parent row.\n .find(\":input[type='text']\") \/\/ Find text elements in that row.\n .attr('disabled',false).... |
{"title":"SQL left join vs multiple tables on FROM line?","tags":["sql","syntax","join"],"question_text":"Most SQL dialects accept both the following queries:\n`SELECT a.foo, b.foo\nFROM a, b\nWHERE a.x = b.x\nSELECT a.foo, b.foo\nFROM a\nLEFT JOIN b ON a.x = b.x`\nNow obviously when you need an outer join, the second ... |
{"title":"Generate C# class from XML","tags":["c#",".net","xml","xsd"],"question_text":"Can I generate a C# class from an XML file?","answer_text":"If you are working on .NET 4.5 project in VS 2012 (or newer), you can just\nSpecial Paste\nyour XML file as classes.\nCopy your XML file's content to clipboard\nIn editor, ... |
{"title":"How to create cronjob using bash","tags":["bash","shell","cron","crontab"],"question_text":"Does crontab have an argument for creating cronjobs without using the editor (crontab -e). If so, What would be the code create a cronjob from a bash script?","answer_text":"You can add to the crontab as follows:\n`#wr... |
{"title":"How can I use Server.MapPath() from global.asax?","tags":["c#","asp.net","global-asax","server.mappath","application-start"],"question_text":"I need to use\n`Server.MapPath()`\nto combine some files path that I store in the\n`web.config`\n.\nHowever, since\n`Server.MapPath()`\nrelies on the current HttpContex... |
{"title":"How do you get the current time of day?","tags":["c#","datetime"],"question_text":"How do you get the current time (not date AND time)?\nExample: 5:42:12 PM","answer_text":"`DateTime.Now.TimeOfDay`\ngives it to you as a\n`TimeSpan`\n(from midnight).\n`DateTime.Now.ToString(\"h:mm:ss tt\")`\ngives it to you as... |
{"title":"Unicode characters in Windows command line - how?","tags":["unicode","command-line","input","windows-console"],"question_text":"We have a project in TFS that has a non-English character (\u00c5\u00a1) in it. When trying to script a few build-related things we've stumbled upon a problem - we can't pass the\n\u... |
{"title":"Usage of __slots__?","tags":["python"],"question_text":"What is the purpose of\n`__slots__`\nin Python \u00e2\u0080\u0094 especially with respect to when would I want to use it and when not?","answer_text":"Quoting\nJacob Hallen\n:\nThe proper use of\n`__slots__`\nis to save space in objects. Instead of havin... |
{"title":"Generate class from database table","tags":["c#","sql","sql-server","tsql"],"question_text":"How can i generate a class from a table at a SQL Server?\nI'm not talking about using some ORM. I just need to create the entities (simple class). Something like:\n`public class Person \n{\n public string Name { get;s... |
{"title":"Any tips on how to organize Eclipse environment on multiple monitors?","tags":["eclipse","multiple-monitors","eclipse-3.4"],"question_text":"I can't find a good way of putting Eclipse windows on two monitors. Currently I just detached (clicked on a header and dragged) a few windows to a secondary monitor (pac... |
{"title":"When do I use the PHP constant \"PHP_EOL\"?","tags":["php","eol"],"question_text":"When is it a good idea to use\n`PHP_EOL`\n?\nI sometimes see this in code samples of PHP. Does this handle DOS\/Mac\/Unix endline issues?","answer_text":"Yes, PHP_EOL is ostensibly used to find the newline character in a cross-... |
{"title":"How to create a new empty branch for a new project","tags":["git","branch","git-branch"],"question_text":"We are using a git repository to store our project. We have our branches departing from the original branch. But now we want to create a small new project to track some documentation. For that we would wa... |
{"title":"MenuItemCompat.getActionView always returns null","tags":["android","searchview","android-actionbar-compat","android-search"],"question_text":"I just implemented the\n`v7 AppCompat`\nsupport library but the\n`MenuItemCompat.getActionView`\nalways return null in every Android version I tested (4.2.2, 2.3.4 ...... |
{"title":"jquery live hover","tags":["jquery","live","jquery-1.4"],"question_text":"I'm using the following jquery code to show a contextual delete button only for table rows we are hovering with our mouse. This works but not for rows that have been added with js\/ajax on the fly...\nIs there a way to make this work wi... |
{"title":"Connect to a heroku database with pgadmin","tags":["database","postgresql","heroku","pgadmin"],"question_text":"I would like to manage my heroku database with\n`pgadmin`\nclient. By now, I've been doing this with\n`psql`\n.\nWhen I use data from\n`heroku pg:credentials`\nto connect de DB using\n`pgadmin`\n, I... |
{"title":"Pretty-printing of numpy.array","tags":["python","numpy","pretty-print"],"question_text":"I'm curious, whether there is any way to print formatted numpy.arrays, e.g., in the way similar to this:\n`x = 1.23456\nprint '%.3f' % x`\nIf I want to print the numpy.array of floats, it prints several decimals, often i... |
{"title":"Append class if condition is true in Haml","tags":["ruby","haml"],"question_text":"If\n`post.published?`\n`.post\n \/ Post stuff`\nOtherwise\n`.post.gray\n \/ Post stuff`\nI've implemented this with rails helper and it seems ugly.\n`= content_tag :div, :class => \"post\" + (\" gray\" unless post.published?).t... |
{"title":"Whether a variable is undefined","tags":["jquery"],"question_text":"Possible Duplicate:\nBest way to check for \u00e2\u0080\u009cundefined\u00e2\u0080\u009d in JavaScript?\nHow do I find if a variable is undefined?\nI currently have:\n`var page_name = $(\"#pageToEdit :selected\").text();\nvar table_name = $(\... |
{"title":"Xcode 4.2 debug doesn't symbolicate stack call","tags":["ios","xcode","debug-symbols"],"question_text":"I have a problem with Xcode 4.2 debugging in an iOS 5 simulator\/device. The following code crashes, as expected:\n`NSArray *arr=[NSArray array];\n[arr objectAtIndex:100];`\nIn iOS 4, I get a useful stack t... |
{"title":"What is the LD_PRELOAD trick?","tags":["c","linux","environment-variables"],"question_text":"I came across a reference to it recently on\nproggit\nand (as of now) it is not explained.\nI suspect\nthis\nmight be it, but I don't know for sure.","answer_text":"If you set\n`LD_PRELOAD`\nto the path of a shared ob... |
{"title":"Git - go to particular revision","tags":["git","revision","revision-history"],"question_text":"I cloned a git repository of a certain project. Can I turn the files to the initial state and when I review the files go to revision 2, 3, 4 ... most recent? I'd like to have an overview of how the project was evolv... |
{"title":"How can I store my users' passwords safely?","tags":["php","security","passwords","salt","password-hash"],"question_text":"How much more safe is this than plain\nMD5\n? I've just started looking into password security. I'm pretty new to PHP.\n`$salt = 'csdnfgksdgojnmfnb';\n$password = md5($salt.$_POST['passwo... |
{"title":"Why is January month 0 in Java Calendar?","tags":["java","calendar"],"question_text":"In\n`java.util.Calendar`\n, January is defined as month 0, not month 1. Is there any specific reason to that ?\nI have seen many people getting confused about that...","answer_text":"It's just part of the horrendous mess whi... |
{"title":"How to fill background image of an UIView","tags":["iphone","objective-c","uiview","background"],"question_text":"I have an\n`UIView`\nand I set a background image in this way:\n`self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@\"sfond-appz.png\"]];`\nMy problem is that back-ima... |
{"title":"How do I get a human-readable file size in bytes abbreviation using .NET?","tags":["c#",".net","vb.net"],"question_text":"How do I get a human-readable file size in bytes abbreviation using .NET?\nExample\n:\nTake input 7,326,629 and display 6.98 MB","answer_text":"using Log to solve the problem....\n`static ... |
{"title":"How to drop rows of Pandas dataframe whose value of certain column is NaN","tags":["python","pandas","dataframe"],"question_text":"I have a df :\n`>>> df\n STK_ID EPS cash\nSTK_ID RPT_Date \n601166 20111231 601166 NaN NaN\n600036 20111231 600036 NaN 12\n600016 20111231 600016 4.3 NaN\n601009 20111231 601009 N... |
{"title":"Five equal columns in twitter bootstrap","tags":["twitter-bootstrap","twitter-bootstrap-3"],"question_text":"I want to have 5 equal columns on a page I am building and I can't seem to understand how the 5 column grid is being used here:\nhttp:\/\/web.archive.org\/web\/20120416024539\/http:\/\/domain7.com\/mob... |
{"title":"How can I override the OnBeforeUnload dialog and replace it with my own?","tags":["javascript","jquery","onbeforeunload"],"question_text":"I need to warn users about unsaved changes before they leave a page (a pretty common problem).\n`window.onbeforeunload=handler`\nThis works but it raises a default dialog ... |
{"title":"Getting the time elapsed (Objective-c)","tags":["iphone","objective-c"],"question_text":"I need to get time that elapsed between two events: for example between appearance of UIView and between user's first reaction.","answer_text":"`NSDate *start = [NSDate date];\n\/\/ do stuff...\nNSTimeInterval timeInterva... |
{"title":"(Deep) copying an array using jQuery","tags":["javascript","jquery"],"question_text":"Possible Duplicate:\nWhat is the most efficient way to clone a JavaScript object?\nI need to copy an (ordered, not associative) array of objects. I'm using jQuery. I initially tried\n`jquery.extend({}, myArray)`\nbut, natura... |
{"title":"How do I wait for an asynchronously dispatched block to finish?","tags":["objective-c","unit-testing","grand-central-dispatch"],"question_text":"I am testing some code that does asynchronous processing using Grand Central Dispatch. The testing code looks like this:\n`[object runSomeLongOperationAndDo:^{\n STA... |
{"title":"How can I style an Android Switch?","tags":["android","styling","android-theme"],"question_text":"The switch widget introduced in API 14 is styled by default with holo theme.\nI want to style it slightly different, changing its colors and shape a bit for branding reasons. How does one go about this? I know it... |
{"title":"How can I remove the search bar and footer added by the jQuery DataTables plugin?","tags":["jquery","html","datatables"],"question_text":"I am using\njQuery DataTables\n.\nI want to remove the search bar and footer (showing how many rows there are visible) that is added to the table by default. I just want to... |
{"title":"Pseudo-terminal will not be allocated because stdin is not a terminal","tags":["linux","bash","shell","ssh"],"question_text":"I am trying to write a shell script that creates some directories on a remote server and then uses scp to copy files from my local machine onto the remote. Here's what I have so far:\n... |
{"title":"Unable to set data attribute using jQuery Data() API","tags":["jquery","model-view-controller","attributes","custom-data-attribute"],"question_text":"I've got the following field on an MVC view:\n`@Html.TextBoxFor(model => model.Course.Title, new { data_helptext = \"Old Text\" })<\/span>`\nIn a seperate js fi... |
{"title":"How do I get a div to float to the bottom of its container?","tags":["html","css"],"question_text":"I have floated images and inset boxes at the top of a container using float:right (or left) many times. Recently I hit a need to float a div at the bottom right corner of another div with the normal text wrap t... |
{"title":"Random is barely random at all?","tags":["python","random","birthday-paradox"],"question_text":"I did this to test the randomness of randint:\n`>>> from random import randint\n>>>\n>>> uniques = []\n>>> for i in range(4500): # You can see I was optimistic.\n... x = randint(500, 5000)\n... if x in uniques:\n..... |
{"title":"Swipe to Dismiss for RecyclerView","tags":["android","recyclerview"],"question_text":"I used to\nSwipeToDismiss\nlibrary but now I'm trying to migrate to RecyclerView and things are not so obvious, do you know any replacements for this lib? Any ideas how to implement it from the scratch?","answer_text":"As of... |
{"title":"Get the Highlighted\/Selected text","tags":["javascript","jquery","textselection"],"question_text":"Is it possible to get the highlighted text in a paragraph of a website e.g. by using jQuery?","answer_text":"Getting the text the user has selected is relatively simple. There's no benefit to be gained by invol... |
{"title":"listing all functions in a python module","tags":["python"],"question_text":"I have a python module installed on my system and I'd like to be able to see what functions\/classes\/methods are available in it.\nI want to call the doc function on each one. In ruby I can do something like ClassName.methods to get... |
{"title":"How to export all collection in MongoDB?","tags":["mongodb","export"],"question_text":"I want to export all collection in MongoDB by the command:\n`mongoexport -d dbname -o Mongo.json`\nThe result is:\nNo collection specified!\nThe manual say, if you do not specify a , all collections will be exported.\nHowev... |
{"title":"facebook: permanent Page Access Token?","tags":["facebook","facebook-graph-api","facebook-access-token"],"question_text":"I work on a project that has facebook pages as one of its data sources. It imports some data from it periodically with no GUI involved. Then we use a web app to show the data we already ha... |
{"title":"How to recursively find and list the latest modified files in a directory with subdirectories and times?","tags":["linux","recursion","time","filesystems"],"question_text":"Operating system: Linux\nFilesystem type: ext3\nPreferred solution: bash (script\/oneliner), ruby, python\nI have several directories wit... |
{"title":"Python: How to ignore an exception and proceed?","tags":["python","exception"],"question_text":"I have a try...except block in my code and When an exception is throw. I really just want to continue with the code because in that case, everything is still able to run just fine. The problem is if you leave the e... |
{"title":"Which Boost features overlap with C++11?","tags":["c++","boost","c++11"],"question_text":"I put my C++ skills on the shelf several years ago and it seems now, when I need them again, the landscape has changed.\nWe have got C++11 now, and my understanding is that it overlaps many Boost features.\nIs there some... |
{"title":"Difference between \"expose\" and \"publish\" in docker","tags":["docker"],"question_text":"I'm experimenting with Dockerfiles, and I think I understand most of the logic. However, I don't see the difference between \"exposing\" and \"publishing\" a port in this context.\nAll the tutorials I have seen first i... |
{"title":"Disabling user selection in UIWebView","tags":["ios","uiwebview","webkit","ios4","mobile-webkit"],"question_text":"I have an app where I load content to a UIWebView and present this. I cannot disable user interaction completely because I want the user to be able to click links. I just need to disable user sel... |
{"title":"Reduce, fold or scan (Left\/Right)?","tags":["scala","scala-collections","reduce","fold"],"question_text":"When should I use\n`reduceLeft`\n,\n`reduceRight`\n,\n`foldLeft`\n,\n`foldRight`\n,\n`scanLeft`\nor\n`scanRight`\n?\nI want an intuition\/overview of their differences - possibly with some simple example... |
{"title":"How to convert string into float in javascript?","tags":["javascript","parsing","floating-point"],"question_text":"I am trying to parse two values from a datagrid.\nThe fields are numeric, and when they have a comma (ex. 554,20), I can't get the numbers after the comma.\nI've tried\n`parseInt`\nand\n`parseFlo... |
{"title":"Static\/Dynamic vs Strong\/Weak","tags":["terminology","strong-typing","static-typing","dynamic-typing","weak-typing"],"question_text":"I see these terms bandied around all over the place in programming and I have a vague notion of what they mean. A search shows me that such things have been asked all over st... |
{"title":"Why use String.Format?","tags":["c#","vb.net"],"question_text":"Why would anyone use\n`String.Format`\nin C# and VB .NET as opposed to the concatenation operators (\n`&`\nin VB, and\n`+`\nin C#)?\nWhat is the main difference? Why are everyone so interested in using\n`String.Format`\n? I am very curious.","ans... |
{"title":"How to check if AlarmManager already has an alarm set?","tags":["android","alarmmanager"],"question_text":"When my app starts, I want it to check if a particular alarm (registered via AlarmManager) is already set and running. Results from google seem to indicate that there is no way to do this. Is this still ... |
{"title":"How to handle screen orientation change when progress dialog and background thread active?","tags":["android","android-activity","android-dialog"],"question_text":"My program does some network activity in a background thread. Before starting, it pops up a progress dialog. The dialog is dismissed on the handle... |
{"title":"Node.js check if path is file or directory","tags":["node.js","path","filesystems","fs"],"question_text":"I can't seem to get any search results that explain how to do this.\nAll I want to do is be able to know if a given path is a file or a directory (folder).","answer_text":"`fs.lstatSync(path_string).isDir... |
{"title":"Is it safe to ignore the possibility of SHA collisions in practice?","tags":["hash","sha"],"question_text":"Let's say we have a billion unique images, one megabyte each.\nWe calculate the SHA-256 hash for the contents of each file.\nThe possibility of collision depends on:\nthe number of files\nthe size of th... |
{"title":"App store link for \"rate\/review this app\"","tags":["iphone","app-store"],"question_text":"I want to put a \"rate\/review this app\" feature into my app.\nIs there a way to link directly to the screen in the app store where they review the app? So the customer doesn't have to click through the main app link... |
{"title":"Understanding Fragment's setRetainInstance(boolean)","tags":["android","android-fragments"],"question_text":"Starting with the documentation:\npublic void setRetainInstance (boolean retain)\nControl whether a fragment instance is retained across Activity re-creation (such as from a configuration change). This... |
{"title":"How to run crontab job every week on Sunday","tags":["linux","crontab"],"question_text":"I'm trying to figure out how to run a crontab job every week on Sunday. I think the following should work, but I'm not sure if I understand correctly. Is the following correct?\n`5 8 * * 6`","answer_text":"Here is an expl... |
{"title":"When deleting remote git branch \"error: unable to push to unqualified destination\"","tags":["git"],"question_text":"I'm trying to delete a remote git branch with\n`git push origin :my_remote_branch`\nand getting:\n`error: unable to push to unqualified destination: my_remote_branch\nThe destination refspec n... |
{"title":"Command Line Arguments In Python","tags":["python","command-line","command-line-arguments"],"question_text":"I am originally a C programmer. I have seen numerous tricks and \"hacks\" to read many different arguments.\nWhat are some of the ways Python programmers can do this?\nRelated\nWhat\u00e2\u0080\u0099s ... |
{"title":"Is there a command like \"watch\" or \"inotifywait\" on the Mac?","tags":["osx","watch","inotify"],"question_text":"I want to watch a folder on my Mac (Snow Leopard) and then execute a script (giving it the filename of what was just moved into a folder (as a parameter... x.sh \"filename\")).\nI have a script ... |
{"title":"How do I get the 'clear' command in Cygwin?","tags":["cygwin","clear","ncurses"],"question_text":"I installed Cygwin, choosing a fairly minimal set of packages.\nIn a terminal, I tried to do 'clear' to clear the terminal, but I get\n`bash: clear: command not found`\nHow do I get this to work?","answer_text":"... |
{"title":"How to parse a string into a nullable int","tags":["c#",".net","string",".net-3.5","nullable"],"question_text":"I'm wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it can't be parsed.\nI was kind of hoping that this would work\n`int? va... |
{"title":"Eclipse, where to change the current debug line background?","tags":["eclipse","colors"],"question_text":"Can anyone point me to the preferences page that has the setting of the\nDEBUG\ncurrent line background color? I have changed almost all the colours to dark ones and still get annoyed by this almost white... |
{"title":"Static linking vs dynamic linking","tags":["c++","c","performance","static-linking","dynamic-linking"],"question_text":"Are there any compelling performance reasons to choose static linking over dynamic linking or visa versa in certain situations? I've heard or read the following, but I don't know enough on t... |
{"title":"When would you use the different git merge strategies?","tags":["git","merge","git-merge"],"question_text":"From the man page on git-merge, there are a number of merge strategies you can use.\nresolve\n- \nThis can only resolve two heads (i.e. the current branch and another branch you pulled from) using 3-way... |
{"title":"Socket File \"\/var\/pgsql_socket\/.s.PGSQL.5432\" Missing In Mountain Lion (OS X Server)","tags":["postgresql","osx-mountain-lion","postgresql-9.2","osx-server"],"question_text":"I just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQ... |
{"title":"Check if div with certain class name exists","tags":["javascript","jquery","jquery-selectors","javascript-framework"],"question_text":"Using jQuery I'm programmatically generating a bunch of\n`div`\n's like this:\n`<div class=\"mydivclass\" id=\"myid1\">Some Text1<\/div>\n<div class=\"mydivclass\" id=\"myid2\... |
{"title":"How to set NODE_ENV to production\/development in OS X","tags":["node.js"],"question_text":"For use in express.js environments. Any suggestions?","answer_text":"Before running your app, you can do this in console,\n`export NODE_ENV=production`\nOr if you are in windows you could try this:\n`SET NODE_ENV=produ... |
{"title":"HTTPS and SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, CA is OK","tags":["php","ssl","curl","openssl","ca"],"question_text":"I am using\nXAMPP\nfor development. Recently I upgraded my installation of xampp from an old version to 1.7.3.\nNow when I curl HTTPS enabled sites I get the following excepti... |
{"title":"Visual Studio jump to next error shortcut?","tags":[".net","vb.net","visual-studio","ide"],"question_text":"When a compile fails in VB.NET in Visual Studio 2008, an Error List pops up at the bottom of the screen. To jump to an error, I double click on an error in the error list.\nIs there a shortcut to automa... |
{"title":"Get MIME type from filename extension","tags":["c#","asp.net","mime"],"question_text":"How can I get the MIME type from a file extension?","answer_text":"I've found many mime types my application uses are not in the default Windows registry and others are in the registry but not in the list included with IIS.... |
{"title":"Detect the Enter key in a text input field","tags":["javascript","jquery"],"question_text":"I'm trying to do a function if enter is pressed while on specific input.\nWhat I'm I doing wrong?\n`$(document).keyup(function (e) {\n if ($(\".input1\").is(\":focus\") && (e.keyCode == 13)) {\n \/\/ Do something\n }\n... |
{"title":"updating table rows in postgres using subquery","tags":["sql","postgresql","subquery","sql-update"],"question_text":"Using postgres 8.4, My goal is to update existing table:\n`CREATE TABLE public.dummy\n(\n address_id SERIAL,\n addr1 character(40),\n addr2 character(40),\n city character(25),\n state characte... |
{"title":"Pointer vs. Reference","tags":["c++","variables","pointers","reference"],"question_text":"What would be better practice when giving a function the original variable to work with:\n`unsigned long x = 4;\nvoid func1(unsigned long& val) {\n val = 5; \n}\nfunc1(x);`\nor:\n`void func2(unsigned long* val) {\n *val ... |
{"title":"AngularJS - losing scope when using ng-include","tags":["javascript","html","angularjs","angularjs-scope","angularjs-ng-include"],"question_text":"I have this module routes:\n`var mainModule = angular.module('lpConnect', []).\n config(['$routeProvider', function ($routeProvider) {\n $routeProvider.\n when('\/... |
{"title":"Can a C++ class member function template be virtual?","tags":["c++","templates","virtual-functions","c++-faq"],"question_text":"I have heard that C++ class member function templates can't be virtual. Is this true?\nIf they can be virtual, what is an example of a scenario in which one would use such a function... |
{"title":"How to build a Horizontal ListView with RecyclerView?","tags":["android","android-layout"],"question_text":"I need to implement a horizontal listview in my Android application. I did a bit of research and came across\nHow can I make a horizontal ListView in Android?\nand\nHorizontal ListView in Android?\nhowe... |
{"title":"Really Cheap Command-Line Option Parsing in Ruby","tags":["ruby"],"question_text":"EDIT: Please,\nplease\n,\nplease\nread the two requirements listed at the bottom of this post before replying. People keep posting their new gems and libraries and whatnot, which clearly don't meet the requirements.\nSometimes ... |
{"title":"Difference between double and single curly brace in angular JS?","tags":["angularjs"],"question_text":"I am new to this angular world, i am bit confused with the use of double curly braces {{}}\nand single curly braces{} or sometime no curly brace is used to include the expression like in the directives\n`ng-... |
{"title":"Foreign key constraints: When to use ON UPDATE and ON DELETE","tags":["mysql","sql","database","foreign-keys"],"question_text":"I'm designing my database schema using MySQL Workbench, which is pretty cool because you can do diagrams and it converts them :P\nAnyways, I've decided to use InnoDB because of it's ... |
{"title":"Differences between exec and fork","tags":["c","exec","fork"],"question_text":"What are the differences between\n`fork`\nand\n`exec`\n?","answer_text":"The use of\n`fork`\nand\n`exec`\nexemplifies the spirit of UNIX in that it provides a very simple way to start new processes.\nThe\n`fork`\ncall basically mak... |
{"title":"How to copy the contents of a String to the clipboard in C#?","tags":["c#",".net","clipboard"],"question_text":"If I have some text in a String, how can I copy that to the clipboard so that the user can paste it into another window (e.g. from my application to Notepad)?","answer_text":"You can use\n`System.Wi... |
{"title":"Datepicker: How to popup datepicker when click on edittext","tags":["android"],"question_text":"I want to show datepicker popup window. I have found some examples but i am not getting it properly. I have one edittext and i want that when i click on edittext the datepicker dialog should popup and after setting... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.