text stringlengths 74 309k |
|---|
{"title":"Cell spacing in UICollectionView","tags":["ios","objective-c","uicollectionview"],"question_text":"How do i set cell spacing in a section of UICollectionView? I know there is a property \"minimumInteritemSpacing\" I have set it to 5.0 still the spacing is not appearing 5.0. I have implemented the flowout dele... |
{"title":"Generate random password string with requirements in javascript","tags":["javascript"],"question_text":"I want to generate a random string that has to have 5 letters from a-z and 3 numbers.\nHow can I do this with javascript?\nI've got the following script, but it doesn't meet my requirements.\n`var chars = \... |
{"title":"Determining the path that a yum package installed to","tags":["linux","redhat","rpm","yum"],"question_text":"I've installed ffmpeg using yum under Redhat, and I'm having difficulty figuring out where (what path) it installed the package to. Is there an easy way of determining this without resorting to finding... |
{"title":"jQuery load more data on scroll","tags":["javascript","jquery","ajax","scroll"],"question_text":"im just wondering how can i implement more data on scroll only if the div.loading is visible.\nusually we look for page height and scroll height, to see if we need to load more data. but the following example is l... |
{"title":"How do you use the ellipsis slicing syntax in Python?","tags":["python","numpy","subclass","slice","ellipsis"],"question_text":"This came up in\nHidden features of Python\n, but I can't see good documentation or examples that explain how the feature works.","answer_text":"The ellipsis is used to slice higher-... |
{"title":"how to parse json data with jquery \/ javascript?","tags":["jquery","ajax","json","parsing"],"question_text":"I have a ajax call that returns some json like this:\n`$(document).ready(function () {\n $.ajax({ \n type: 'GET', \n url: 'http:\/\/example\/functions.php', \n data: { get_param: 'value' }, \n success... |
{"title":"SQL Server: Examples of PIVOTing String data","tags":["sql-server","tsql","pivot"],"question_text":"Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a query returning ... |
{"title":"Converting iPhone xib to iPad xib?","tags":["iphone","ipad","sdk","xib"],"question_text":"How do you do it? I saw one video tutorial on it, but the screen was too small. Also, other than changing the view size, are there any other major changes I would have to make to my iphone apps to convert to iPad?","answ... |
{"title":"How to send an email from JavaScript","tags":["javascript","email"],"question_text":"I want my website to have the ability to send an email without refreshing the page. So I want to use Javascript.\n`<form action=\"javascript:sendMail();\" name=\"pmForm\" id=\"pmForm\" method=\"post\">\nEnter Friend's Email:\... |
{"title":"django : using select_related and get_object_or_404 together","tags":["django","django-models"],"question_text":"Is there any way of using\nget_object_or_404\nand\nselect_related\ntogether or any other way to achieve the result of using these two together(except from putting it in try\/except)??","answer_text... |
{"title":"How to dismiss keyboard iOS programmatically","tags":["ios","keyboard","uitextfield"],"question_text":"I created a\n`UITextField`\nprogrammatically making the\n`UITextField`\na property of the viewController. I need to dismiss the keyboard with the return and the touch on the screen. I was able to get the scr... |
{"title":"Calendar date to yyyy-MM-dd format in java","tags":["java","date","calendar","converter"],"question_text":"How to convert calendar date to\n`yyyy-MM-dd`\nformat.\n`Calendar cal = Calendar.getInstance();\ncal.add(Calendar.DATE, 1);\nDate date = cal.getTime(); \nSimpleDateFormat format1 = new SimpleDateFormat(\... |
{"title":"How do I define and use an ENUM in Objective-C?","tags":["iphone","objective-c","c"],"question_text":"I declared an enum in my implementation file as shown below, and declared a variable of that type in my interface as PlayerState thePlayerState; and used the variable in my methods. But I am getting errors st... |
{"title":"How to create json by javascript for loop?","tags":["javascript","json"],"question_text":"I have\narray\nof select tag.\n`<select id='uniqueID' name=\"status\">\n <option value=\"1\">Present<\/option>\n <option value=\"2\">Absent<\/option>\n <\/select>`\nand I want to create a json object having two fields 'u... |
{"title":"Decimal precision and scale in EF Code First","tags":["c#",".net","entity-framework","ef-code-first","decimal"],"question_text":"I'm experimenting with this code-first approach, but I'm find out now that a property of type System.Decimal gets mapped to a sql column of type decimal(18, 0).\nHow do I set the pr... |
{"title":"Compare given date with today","tags":["php","date","datetime"],"question_text":"I have following\n`$var = \"2010-01-21 00:00:00.0\"`\nI'd like to compare this date against today's date (i.e. I'd like to know if this\n`$var`\nis before today or equals today or not)\nWhat function would I need to use?","answer... |
{"title":"hibernate exception: org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView","tags":["hibernate","jpa","orm","hibernate-annotations"],"question_text":"Why am I getting this exception?\n`package com.domain.idea;\nimport javax.persistence.CascadeType;\nimport javax.p... |
{"title":"Serving favicon.ico in ASP.NET MVC","tags":["asp.net","asp.net-mvc","razor","favicon"],"question_text":"What is the final\/best recommendation for how to serve favicon.ico in ASP.NET MVC?\nI am currently doing the following :\nAdding an entry to the\nvery beginning\nof my RegisterRoutes method :\n`routes.Igno... |
{"title":"npm check and update package if needed","tags":["node.js","teamcity","npm","karma-runner"],"question_text":"We need to integrate Karma test runner into TeamCity and for that I'd like to give sys-engineers small script (powershell or whatever) that would:\npick up desired version number from some config file (... |
{"title":"Classes vs. Modules in VB.NET","tags":["vb.net"],"question_text":"Is it considered an acceptable practice to use Modules instead of Classes with Shared member functions in VB.NET?\nI tend to avoid Modules, because they feel like leftover remains from Visual Basic 6.0 and don't really seem to fit in anymore. O... |
{"title":"jquery: stopPropagation vs stopImmediatePropagation","tags":["jquery"],"question_text":"Can anyone point me the differences b\/w jquery\n`event.stopPropagation()`\nand\n`event.stopImmediatePropagation()`\nmethods(possibly with example)?","answer_text":"`stopPropagation`\nwill prevent any\nparent\nhandlers fro... |
{"title":"Populating a ListView using an ArrayList?","tags":["java","android","listview","arraylist"],"question_text":"My\n`Android`\napp needs to populate the\n`ListView`\nusing the data from an\n`ArrayList`\n.\nI have trouble doing this. Can someone please help me with the code?","answer_text":"You need to do it thro... |
{"title":"How to write a UTF-8 file with Java?","tags":["java","file-io","utf-8"],"question_text":"I have some current code and the problem is its creating a 1252 codepage file, i want to force it to create a UTF-8 file\nCan anyone help me with this code, as i say it currently works... but i need to force the save on u... |
{"title":"Client on node: Uncaught ReferenceError: require is not defined","tags":["javascript","node.js","sockets","express","jade"],"question_text":"So, I am writing an application with the node\/express + jade combo.\nI have\n`client.js`\n, which is loaded on the client. In that file I have code that calls functions... |
{"title":"pandas + dataframe - select by partial string","tags":["python","pandas"],"question_text":"I have a\n`DataFrame`\nwith 4 columns of which 2 contain string values. I was wondering if there was a way to select rows based on a partial string match against a particular column?\nIn other words, a function or lambd... |
{"title":"What do pty and tty mean?","tags":["c","unix","networking","tty","vocabulary"],"question_text":"I noticed there are many mentions of\n`pty`\nand\n`tty`\nin some opensource projects, could someone can tell me what do they mean and what is the difference between them? Thanks!","answer_text":"A tty is a terminal... |
{"title":"What does a Ajax call response like 'for (;;); { json data }' mean?","tags":["ajax","json","facebook"],"question_text":"Possible Duplicate:\nWhy do people put code like \u201cthrow 1; <dont be evil>\u201d and \u201cfor(;;);\u201d in front of json responses?\nI found this kind of syntax being used on Facebook ... |
{"title":"What to learn for making Java web applications in Java EE 6?","tags":["java","java-ee","web-applications"],"question_text":"My goal is to make web applications!\nI finished reading the Books \"Headfirst - Java\" and \"Headfirst - Servlets and JSP\".\nBecause this topic (web applications) is so big and complic... |
{"title":"AngularJS resource promise","tags":["angularjs","promise","angular-resource"],"question_text":"I've got a simple controller that use $resource :\n`var Regions = $resource('mocks\/regions.json');\n $scope.regions = Regions.query();`\nI'm using this controller in a directive (in the link function)\n`var regions... |
{"title":"Static table view outside UITableViewController","tags":["ios","iphone","xcode","cocoa-touch"],"question_text":"after the new xCode update, my app doesn't validate and shows this error:\nstatic table views are only valid when embedded in UITableViewController instances\nAny chances to solve easily?","answer_t... |
{"title":"In R, why is `[` better than `subset`?","tags":["r","filter","subset","r-faq"],"question_text":"When I need to filter a data.frame, i.e., extract rows that meet certain conditions, I prefer to use the\n`subset`\nfunction:\n`subset(airquality, Month == 8 & Temp > 90)`\nrather than the\n`[`\nfunction:\n`airqual... |
{"title":"Python multiprocessing pool.map for multiple arguments","tags":["python","multiprocessing"],"question_text":"In the Python multiprocessing library, is there a variant of pool.map which support multiple arguments?\n`text = \"test\"\ndef harvester(text, case):\n X = case[0]\n return text+ str(X)\nif __name__ ==... |
{"title":"Increase max execution time for php","tags":["php",".htaccess","scripting","php-ini"],"question_text":"I have added\n`set_time_limit(0);`\nfunction to increase execution time but its executing only 2-3 minutes maximum.\n`error_reporting(E_ALL);\nerror_reporting(1);\nset_time_limit(0);`\nI want to search links... |
{"title":"How to show the text on a ImageButton?","tags":["android","imagebutton"],"question_text":"I have a ImageButton and I want show a text and a image on it. But when I try\n`<ImageButton \nandroid:text=\"OK\" \nandroid:id=\"@+id\/buttonok\" \nandroid:src=\"@drawable\/buttonok\"\nandroid:layout_width=\"match_paren... |
{"title":"How can I find where gem files are installed?","tags":["ruby","gem"],"question_text":"I can find which gem is installed by command\n`gem list`\n, but it doesn't show me where the gems are installed.\nHow can I find where the gems are and how can I know before installing a gem where it will be installed?","ans... |
{"title":"Writing a compiler in its own language","tags":["compiler-construction","bootstrapping"],"question_text":"Intuitively, it would seems that a compiler for language Foo, cannot itself be written in Foo. More specifically, the\nfirst\ncompiler for language Foo cannot be written in Foo, but any subsequent compile... |
{"title":"Java RegEx meta character (.) and ordinary dot?","tags":["java","regex"],"question_text":"In Java RegEx, how to find out the difference between\n`.`\n(dot) the meta character and the normal dot as we using in any sentence. How to handle this kind of situation for other meta characters too like (\n`*`\n,\n`+`\... |
{"title":"Do subclasses inherit private fields?","tags":["java","oop","inheritance","private"],"question_text":"This is an interview question.\nDoes subclasses inherit private\n fields?\nI answered \"No\", because we can't access them using the \"normal OOP way\". But the interviewer thinks that they are inherited, bec... |
{"title":"React, ES6 - getInitialState was defined on a plain JavaScript class","tags":["reactjs","ecmascript-6"],"question_text":"I have the follow component (\n`radioOther.jsx`\n):\n`'use strict';\n \/\/module.exports = <-- omitted in update\n class RadioOther extends React.Component {\n \/\/ omitted in update \n \/\... |
{"title":"When restoring a backup, how do I disconnect all active connections?","tags":["sql-server","sql-server-2005","backup","restore","disconnect"],"question_text":"My SQL Server 2005 doesn't restore a backup because of active connections. How can I force it?","answer_text":"You want to set your db to single user m... |
{"title":"Chrome extension: accessing localStorage in content script","tags":["google-chrome-extension","local-storage","content-script"],"question_text":"So, I have an options page where the user can define certain options and it saves it in localStorage:\n`options.html`\nNow, I also have a content script that needs t... |
{"title":"When should we use intern method of String on String constants","tags":["java","string"],"question_text":"According to\nString#intern()\n,\n`intern`\nmethod is supposed to return the String from the String pool if the String is found in String pool, otherwise a new string object will be added in String pool a... |
{"title":"Usage of forceLayout(), requestLayout() and invalidate()","tags":["android","android-layout","android-view"],"question_text":"I'm a bit confused about the roles of\n`forceLayout()`\n,\n`requestLayout()`\nand\n`invalidate()`\nmethods of the\n`View`\nclass.\nWhen shall they be called?","answer_text":"To better ... |
{"title":"pip: dealing with multiple Python versions?","tags":["python","pip"],"question_text":"Is there any way to make\n`pip`\nplay well with multiple versions of Python? For example, I want to use\n`pip`\nto explicitly install things to either my site 2.5 installation or my site 2.6 installation.\nFor example, with\... |
{"title":"\"Active Directory Users and Computers\" MMC snap-in for Windows 7?","tags":["windows-7","active-directory"],"question_text":"Is there an equivalent tool available for use in Windows 7? I just need to browse the membership of some small Active Directory groups that are deep within a huge hierarchy, so I can e... |
{"title":"Objective C: How can you rotate text for UIButton and UILabel?","tags":["iphone","objective-c","uibutton","uilabel"],"question_text":"How can you rotate text for\n`UIButton`\nand\n`UILabel`\n? 90 degrees, 180 degrees\nThanks","answer_text":"`[*yourlabelname* setTransform:CGAffineTransformMakeRotation(-M_PI \/... |
{"title":"How to add new column to MYSQL table","tags":["php","mysql","add","alter"],"question_text":"I am trying to add a new column to my MYSQL table using PHP. I am unsure how to alter my table so that the new column is created. In my assessment table I have\n`assessmentid | q1 | q2 | q3 | q4 | q5`\nSay I have a pag... |
{"title":"The purpose of Model View Projection Matrix","tags":["opengl","directx","3d"],"question_text":"For what purposes we are using Model View Projection Matrix?\nWhy do shaders require Model View Projection Matrix?","answer_text":"The model, view and projection matrices are three separate matrices. Model maps from... |
{"title":"Android App Not Install. An existing package by the same name with a conflicting signature is already installed","tags":["android","android-install-apk"],"question_text":"In my emulator, when I try to do an upgrade of my apk programmatically. I get:\n`Android App Not Install.`\n`An existing package by the sam... |
{"title":"How to fix \"Referenced assembly does not have a strong name\" error?","tags":["c#","visual-studio-2005","assemblies","signing"],"question_text":"I've added a weakly named assembly to my\nVisual\u00a0Studio\u00a02005\nproject (which is strongly named). I'm now getting the error:\n\"Referenced assembly 'xxxxxx... |
{"title":"How do I create a dynamic key to be added to a JavaScript object variable","tags":["javascript","object"],"question_text":"I'm trying something like this, but this example does not work.\n`jsObj = {};\nfor (var i = 1; i <= 10; i++) {\n jsObj{'key' + i} = 'example ' + 1;\n}`\nWhat can I do to make a dynamic ke... |
{"title":"iterating row by row through a pandas dataframe","tags":["python","pandas"],"question_text":"Possible Duplicate:\nWhat is the most efficient way to loop through dataframes with pandas?\nI'm looking to iterate row by row through a pandas DataFrame. The way I'm doing it so far is as follows:\n`for i in df.index... |
{"title":"Why do I get the error \"Unsafe code may only appear if compiling with \/unsafe\"?","tags":["c#","visual-studio-2008","windows-ce","unsafe"],"question_text":"Why do I get the following error?\nUnsafe code may only appear if compiling with \/unsafe\"?\nI work in C# and Visual Studio 2008 for programming on Win... |
{"title":"How do I get my Maven Integration tests to run","tags":["java","maven-2","testing","surefire"],"question_text":"I have a maven2 multi-module project and in each of my child modules I have JUnit tests that are named\n`Test.java`\nand\n`Integration.java`\nfor unit tests and integration tests respectively. When ... |
{"title":"How to disable all <input > inside a form with jQuery?","tags":["jquery","forms"],"question_text":"`<form id=\"target\">\n....\n<\/form>`","answer_text":"In older versions you could use\n`attr`\n. As of jQuery 1.6 you should use\n`prop`\ninstead:\n`$(\"#target :input\").prop(\"disabled\", true);`\nTo disable ... |
{"title":"Is there a way to write these ifs nicer?","tags":["python","control-structure"],"question_text":"I need to write these four\n`if`\ns in Python. Notice what it does, is changing between four possible states in a loop:\n`1,0 -> 0,1 -> -1,0 -> 0,-1`\nand back to first.\n`if [dx, dy] == [1,0]:\n dx, dy = 0, 1\nif... |
{"title":"Enable the display of line numbers in Visual Studio","tags":["visual-studio-2010","visual-studio","line-numbers"],"question_text":"Why doesn't Visual Studio have any way of showing line numbers in a source file? Is there any way to enable it, or a plugin for it? I know that the number of lines of code in a pr... |
{"title":"What is Java EE?","tags":["java-ee"],"question_text":"I realize that literally it translates to Java Enterprise Edition. But what I'm asking is what does this really mean? When a company requires Java EE experience, what are they really asking for? Experience with EJBs? Experience with Java web apps?\nI suspe... |
{"title":"What is the reason behind cbegin\/cend?","tags":["c++","c++11","iterator","const-correctness","const-iterator"],"question_text":"I wonder why\n`cbegin`\nand\n`cend`\nwere introduced in C++11?\nWhat are cases when calling these methods makes a difference from const overloads of\n`begin`\nand\n`end`\n?","answer... |
{"title":"Sending event when angular.js finished loading","tags":["angularjs","angularjs-scope"],"question_text":"Wondered what's the best way to detect the finish of page loading\/bootstrapping, when all directives done compiling\/linking.\nAny event already there? Should i overload the bootstrap function?","answer_te... |
{"title":"How to read from file or stdin in bash?","tags":["bash","loops","stdin"],"question_text":"In Perl the following code will read from file specified on command line args or from stdin?\n`while (<>) {\n print($_);\n}`\nThis is very convenient. I just want to know what's the simplest way to read from file or stdi... |
{"title":"How to write text on image in Objective-C (iOS)?","tags":["ios","iphone","uiimageview"],"question_text":"I want to make an image like this programmatically:\nI have the upper image and text with me. Should I write text on image?\nI want to make it a complete png image(image + label) and set it as the backgrou... |
{"title":"How to uglify output with Browserify in Gulp?","tags":["javascript","node.js","gulp","browserify","uglifyjs"],"question_text":"I tried to uglify output of Browserify in Gulp, but it doesn't work.\ngulpfile.js\n`var browserify = require('browserify');\nvar gulp = require('gulp');\nvar uglify = require('gulp-ug... |
{"title":"No identities were available - administrator request","tags":["ios","iphone","xcode","certificate"],"question_text":"I had problems while \"archiving\" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.\nI've taken now more than 4 hours to get rid of certific... |
{"title":"How to get the current time as datetime","tags":["datetime","swift"],"question_text":"Just started with the playground. I'm trying to create a simple app.\nI've created a date object like this:\n`var date = NSDate()`\nHow can I get the current hour? In other languages I can do something like this:\n`var hour ... |
{"title":"How to align center the text in html table row?","tags":["html","css"],"question_text":"I am using a html table. I want to align the text of\n`td`\nto the center in each cell.\nHow to align the text as horizontally and vertically center?","answer_text":"Here is an example with CSS and embedded style:\nCSS:\n`... |
{"title":"What exactly does the \"u\" do? \"git push -u origin master\" vs \"git push origin master\"","tags":["git"],"question_text":"I'm apparently terrible at using git, despite my best attempts to understand it.\nFrom\nkernel.org\nfor\n`git push`\n:\n-u\n--set-upstream\nFor every branch that is up to date or succes... |
{"title":"How to install Hibernate Tools in Eclipse?","tags":["eclipse","hibernate","eclipse-plugin","hibernate-tools"],"question_text":"What is the proper way to install Hibernate Tools in Eclipse as a plugin?\nThe\nHibernate site\ndoesn't really give any instructions.\nLooking at the Hibernate Tools binary\n`Hibernat... |
{"title":"Laravel blank white screen","tags":["php","apache","frameworks","laravel","laravel-4"],"question_text":"My laravel site was working before, I recently upgraded to Apache 2.4 and PHP 5.5.7.\nNow I'm getting a white blank screen when I go to laravel.mydomain.com, nothing in apache error logs, routes and etc. sh... |
{"title":"Difference between \"include\" and \"require\" in php","tags":["php","include","require"],"question_text":"Is there any difference between them? Is using them a matter of preference? Does using one over the other produce any advantages? Which is better for security?","answer_text":"`require`\nwill throw a PHP... |
{"title":"HTTP Basic Authentication credentials passed in URL and encryption","tags":["https","basic-authentication"],"question_text":"I have a question about HTTPS and HTTP Authentication credentials.\nSuppose I secure a url with HTTP Authentication:\n`<Directory \/var\/www\/webcallback>\nAuthType Basic\nAuthName \"Re... |
{"title":"How to create a simple divider in the new NavigationView?","tags":["android","navigation-drawer","android-support-library","android-design-library","navigationview"],"question_text":"Google introduced the\n`NavigationView`\nin the Design Support Library version 22.2.0 with which you can create a drawer very e... |
{"title":"How to check an Android device is HDPI screen or MDPI screen?","tags":["android","size","screen"],"question_text":"I want to check this to fetch different images by internet. How to do that?","answer_text":"You can check the screen density with:\n`switch (getResources().getDisplayMetrics().densityDpi) {\ncase... |
{"title":"Match All Class Selectors That Begin with?","tags":["css","match"],"question_text":"Is it possible to use a \"wildcard\" for selectors in CSS3?\neg.\n`<div class=\"myclass-one\"><\/div>\n<div class=\"myclass-two><\/div>\n<div class=\"myclass-three\"><\/div>`\n...and then magically set all above divs to red in... |
{"title":"Equals(=) vs. LIKE","tags":["sql","performance","equals","sql-like"],"question_text":"When using SQL, are there any benefits of using\n`=`\nin a\n`WHERE`\nclause instead of\n`LIKE`\n?\nWithout any special operators,\n`LIKE`\nand\n`=`\nare the same, right?","answer_text":"The equals (=) operator is a \"compari... |
{"title":"CSS Printing: Avoiding cut-in-half DIVs between pages?","tags":["css","cocoa","printing","page-break"],"question_text":"I'm writing a plug-in for a piece of software that takes a big collection of items and pops them into HTML in a WebView in Cocoa (which uses WebKit as its renderer, so basically you can assu... |
{"title":"How to make the \"<a href\" tag refer to nothing?","tags":["jquery","html"],"question_text":"How to make the \"< a href\" tag refer to nothing?\nI use jQuery, I need to make some anchor tags perform no action.\nI usually write it like this:\n`<a href=\"#\">link<\/a>`\nHowever this refers to the top of the pag... |
{"title":"XAMPP - Port 80 in use by \"Unable to open process\" with PID 4! 12","tags":["apache","xampp"],"question_text":"I have been trying to figure out how to fix this problem for two days. I'm new to this kind of thing so I would appreciate it if someone could tell me how to fix it.\nI've tried deleting skype but t... |
{"title":"GoogleSignatureVerifier signature not valid message (google play services 9.0.0)","tags":["android","google-play-services"],"question_text":"I have recently updated to the google play services library version 9.0.0, and I keep getting the following logcat message:\n`05-19 23:07:30.023 19237-19508\/? V\/Google... |
{"title":"Debug code-first Entity Framework migration codes","tags":["entity-framework","ef-code-first","entity-framework-5","code-first-migrations"],"question_text":"I'm using Entity Framework code first in my website and I'm just wondering if there is any way to debug the migration codes. You know, like setting break... |
{"title":"What is a Manifest in Scala and when do you need it?","tags":["scala","manifest"],"question_text":"Since Scala 2.7.2 there is something called\n`Manifest`\nwhich is a workaround for Java's type erasure. But how does\n`Manifest`\nwork exactly and why \/ when do you need to use it?\nThe blog post\nManifests: Re... |
{"title":"Hibernate error - QuerySyntaxException: users is not mapped [from users]","tags":["java","hibernate"],"question_text":"I'm trying to get a list of all the users from \"users\" table and I get the following error:\n`org.hibernate.hql.internal.ast.QuerySyntaxException: users is not mapped [from users]\norg.hibe... |
{"title":"Regex Named Groups in Java","tags":["java","regex"],"question_text":"It is my understanding that the\n`java.regex`\npackage does not have support for named groups (\nhttp:\/\/www.regular-expressions.info\/named.html\n) so can anyone point me towards a third-party library that does?\nI've looked at\njregex\nbu... |
{"title":"Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine","tags":["asp.net","asp.net-mvc","asp.net-mvc-3","razor","partial-views"],"question_text":"I have following section defined on my\n`_Layout.cshtml`\n`@RenderSection(\"Scripts\", false)`\nI can easily use it from ... |
{"title":"JavaScript check if anonymous object has a method","tags":["javascript","oop","prototype","anonymous-objects"],"question_text":"How can I check if an anonymous object that was created as such:\n`var myObj = { \n prop1: 'no',\n prop2: function () { return false; }\n }`\ndoes indeed have a prop2 defined?\n`prop... |
{"title":"Strip php variable, replace white spaces with dashes","tags":["php"],"question_text":"How can I convert a PHP variable from \"My company & My Name\" to \"my-company-my-name\"?\nI need to make it all lowercase, remove all special characters and replace spaces with dashes.","answer_text":"This function will cre... |
{"title":"ggplot: How to change facet labels?","tags":["r","ggplot2"],"question_text":"I have used the following ggplot command:\n`ggplot(survey,aes(x=age))+stat_bin(aes(n=nrow(h3),y=..count..\/n), binwidth=10)\n +scale_y_continuous(formatter = \"percent\", breaks=c(0, 0.1, 0.2)) \n + facet_grid(hospital ~ .) \n + opts... |
{"title":"AngularJS - wait for multiple resource queries to complete","tags":["angularjs"],"question_text":"I have a single factory defined with ngResource:\n`App.factory('Account', function($resource) {\n return $resource('url', {}, {\n query: { method: 'GET' }\n });\n});`\nI am making multiple calls to the query meth... |
{"title":"AVCaptureVideoPreviewLayer","tags":["iphone","ios4","avfoundation"],"question_text":"`AVCaptureVideoPreviewLayer *avLayer = \n [AVCaptureVideoPreviewLayer layerWithSession:session];\navLayer.frame = self.view.frame;\n[self.view.layer addSublayer:avLayer];`\nI use AVCaptureVideoPreviewLayer to display video on... |
{"title":"How to resolve \"You need to have Ruby and Sass installed and in your PATH for this task to work\" Warning?","tags":["ruby","osx","bash","terminal","sass"],"question_text":"I am in the process of setting up a new Mac for work. I have installed Grunt & Grunt CLI globally. Then I did a\n`npm install`\ninside a ... |
{"title":"How to check for changes on remote (origin) Git repository?","tags":["git"],"question_text":"Question\nWhat are the Git commands to do the following workflow?\nScenario\nI cloned from a repository and did some commits of my own to my local repository. In the meantime, my colleagues made commits to the remote ... |
{"title":"Is there a better way to run a command N times in bash?","tags":["bash"],"question_text":"I occasionally run a bash command line like this:\n`n=0; while [[ $n -lt 10 ]]; do some_command; n=$((n+1)); done`\nTo run\n`some_command`\na number of times in a row -- 10 times in this case.\nOften\n`some_command`\nis ... |
{"title":"src\/lxml\/etree_defs.h:9:31: fatal error: libxml\/xmlversion.h: No such file or directory","tags":["python-2.7","lxml","pip"],"question_text":"I am running the following comand for installing the packages in that file \"\n`pip install -r requirements.txt --download-cache=~\/tmp\/pip-cache`\n\".\nrequirement.... |
{"title":"How do I find where JDK is installed on my windows machine?","tags":["java","windows"],"question_text":"I need to know where JDK is located on my machine.\nOn running\n`Java -version`\nin\ncmd\n, it shows the version as '1.6.xx'.\nTo find the location of this SDK on my machine I tried using\n`echo %JAVA_HOME%... |
{"title":"Literal notation for Dictionary in C#?","tags":["c#","dictionary","literals"],"question_text":"I currently have a WebSocket between JavaScript and a server programmed in C#. In JavaScript, I can pass data easily using an associative array:\n`var data = {'test': 'val',\n 'test2': 'val2'};`\nTo represent this d... |
{"title":"Get source jar files attached to Eclipse for Maven-managed dependencies","tags":["eclipse","maven-2","javadoc"],"question_text":"I am using Maven (and the Maven Eclipse Integration) to manage the dependencies for my Java projects in Eclipse. The automatic download feature for JAR files from the Maven reposito... |
{"title":"Does Razor syntax provide a compelling advantage in UI markup?","tags":["asp.net-mvc","syntax","markup","razor","asp.net-mvc-3"],"question_text":"I notice Scott Guthrie is starting to\nmention Razor\na\nfair bit\non his blog but I'm just not that sure that it's a good fit for my style.\nGranted it's a fairly ... |
{"title":"How to select only the records with the highest date in LINQ","tags":["c#",".net","linq","linq-to-sql"],"question_text":"I have a table, 'lasttraces', with the following fields.\n`Id, AccountId, Version, DownloadNo, Date`\nThe data looks like this:\n`28092|15240000|1.0.7.1782|2009040004731|2009-01-20 13:10:22... |
{"title":"Finishing current activity from a fragment","tags":["android"],"question_text":"I have a fragment in an activity that I am using as a navigation drawer. It contains buttons that when clicked start new activities (startActivity from a fragment simply calls startActivity on the current activity).\nFor the life ... |
{"title":"Combining multiple @SuppressWarnings annotations - Eclipse Indigo","tags":["java","eclipse","annotations","eclipse-indigo","suppress-warnings"],"question_text":"So the issue is being able to combine multple warning suppressions so that each item doesn't need it's own\n`@SuppressWarnings`\nannotation.\nSo for ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.