text stringlengths 74 309k |
|---|
{"title":"How to change Format of a Cell to Text using VBA","tags":["vba","excel-vba"],"question_text":"I have a \"duration\" column in an Excel sheet. Its cell format always changes \u2014 I want convert the duration from minutes to seconds, but because of the cell formatting it always gives me different answers.\nI w... |
{"title":"How to add html special character (right-arrow) using content property of css?","tags":["html","css"],"question_text":"I am trying to add html special character using its code. Its working fine when I use it inside my div but how can I do this using css.\nI have tried as following.\n`.right-arrow:after {\n co... |
{"title":"R - do I need to add explicit new line character with print()?","tags":["r","printing","newline"],"question_text":"How do I use the new line character in R?\n`myStringVariable <- \"Very Nice ! I like\";\nmyStringVariabel <- paste(myStringVariable, \"\\n\", sep=\"\");`\nThe above code\nDOESN'T work\nP.S There'... |
{"title":"Why was function overloading added to C++?","tags":["c++","c","overloading"],"question_text":"I have a C background. I was just wondering why was function overloading added to C++? C doesn't have function overloading but C++ does, what was the need for it?\nWhat went across the mind of the language designer a... |
{"title":"Can you layer pictures on top of each other on a webpage?","tags":["jquery","html","css","flash","image"],"question_text":"I want to build a website that is a \"dress up\" game where you can click on different accessories and they will layer on top of each other.\nBecause it's a little difficult to describe, ... |
{"title":"Javascript type of custom object","tags":["javascript"],"question_text":"How can I check if my javascript object is of a certain type.\n`var SomeObject = function() { }\nvar s1 = new SomeObject();`\nIn the case above\n`typeof s1`\nwill return \"object\". That's not very helpful. Is there some way to check if ... |
{"title":"AngularJS: ngTouch 300ms Delay","tags":["javascript","angularjs","mobile","angularjs-ng-click"],"question_text":"This Plunkr has 2 links. The one on the left side is using the ng-click directive with the on angular-touch module inserted. As said in the angular touch module description for ng-click, the ng-cli... |
{"title":"UIAlertView addSubview in iOS7","tags":["ios","objective-c","uialertview","ios7"],"question_text":"Adding some controls to\n`UIAlertView`\nwas deprecated in iOS7 using\n`addSubview`\nmethod. As I know Apple promised to add\n`contentView`\nproperty.\niOS 7\nis released now and I see that this property is not a... |
{"title":"Bootstrap 3.1 visible-xs and visible-sm not working together","tags":["twitter-bootstrap"],"question_text":"I have a div that I want to show on sm and xs devices, it looks like this:\n`<div class=\"col-xs-4 col-sm-4 visible-xs visible-sm\">\n <a href=\"#\">Item 1<\/a>\n <a href=\"#\">Item 2<\/a>\n <a href=\"#... |
{"title":"PDO::fetchAll vs. PDO::fetch in a loop","tags":["php","mysql","pdo","fetch"],"question_text":"Just a quick question.\nIs there any performance difference between using PDO::fetchAll() and PDO::fetch() in a loop (for large result sets)?\nI'm fetching into objects of a user-defined class, if that makes any diff... |
{"title":"Java2D Performance Issues","tags":["java","java-2d"],"question_text":"I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues.\nHere are results of tests I ran:\nDrawing a 25x18 map with 32x32 pixel t... |
{"title":"Couldn't load template using templateUrl in Angularjs","tags":["angularjs"],"question_text":"I am just learning Angularjs, and how to use templateUrl to load a template.\nI have a simple directive:\n`var mainApp = angular.module(\"mainApp\", []);\nmainApp.directive(\"request\", function() {\n return {\n restr... |
{"title":"Convert DBContext to ObjectContext for use with GridView","tags":["gridview","entity-framework-4.1","ef-code-first","entitydatasource"],"question_text":"I have a webforms project using EF codefirst to persist data.\nI'd like to use a GridView and EntityDataSource, in order to save writing CRUD. \nIs this poss... |
{"title":"How do you concatenate the rows of a matrix into a vector?","tags":["matlab","matrix","concatenation"],"question_text":"For an m-by-m (square) array, how do you concatenate all the rows into a column vector with size m^2 ?","answer_text":"There are a couple of different ways you can collapse your matrix into ... |
{"title":"How to XML configure Spring bean for constructor injection when bean has varargs constructor","tags":["java","spring"],"question_text":"Is there a way to write a Spring bean in XML so that it uses constructor injection when that constructor has a varargs parameter type? IE, is there a way to specify an array ... |
{"title":"Types conforming to multiple protocols in swift","tags":["swift"],"question_text":"I have an Objective-C variable that conforms to multiple protocols.\n`id <NSObject, NSCopying, NSCoding> identityToken;`\nHow would I represent this type in Swift?","answer_text":"This should work:\n`var identityToken : protoco... |
{"title":"dismissmodalviewcontrolleranimated is deprecated first deprecated in ios 6","tags":["iphone"],"question_text":"I have just updated iOS 6, and run my old code, which is created in iOS 4.3. They give me number of warnings in my application.\nI used\n`presentModelViewController:`\nand then I dismiss it, but it g... |
{"title":"I screwed up the system version of Python Pip on Ubuntu 12.10","tags":["python","pip","ubuntu-12.10"],"question_text":"I wanted to update pip on my main install of Python, specifically to get the list command. Which also includes the list- updates capability.\nSo I ran:\n`sudo pip install --upgrade pip`\nAll ... |
{"title":"How do I float two divs side-by-side without specifying a width?","tags":["css"],"question_text":"I have two divs, the first doesn't have much content and the second has a lot of content. I want them to float side-by-side such that the first div is only as wide as the text and the second div fills the remaini... |
{"title":"How to use RoundedBitmapDrawable","tags":["android","android-drawable","android-bitmap"],"question_text":"Has anyone managed to use\n`RoundedBitmapDrawable`\n? Correct me if I'm wrong, but to my understanding, it makes a circular image from a regular rectangular image.\nWhat I've tried so far is this\n`Rounde... |
{"title":"Text next to brand","tags":["html","css","twitter-bootstrap","twitter-bootstrap-3"],"question_text":"How do I get the Bootstrap Brand and any accompanying text to be treated together as the brand?\nI have tried this:\n`<nav class=\"navbar navbar-default\">\n <div class=\"navbar-header\">\n <div class=\"navbar... |
{"title":"How to check if cursor exists (open status)","tags":["sql","sql-server","sql-server-2005","tsql","sql-server-2008"],"question_text":"How do I check if a cursor is open or not? Because many times I am encountering the error 'Cursor already exists'. Please let me know how can I check whether a cursor is already... |
{"title":"SQL IN Clause 1000 item limit","tags":["sql","oracle"],"question_text":"It is possible to put more than 1000 items in the SQL IN clause? We have been getting issues with our Oracle database not being able to handle it.\nIF yes, how do we put more than 1000 items in the SQL IN clause?\nIF not, what else can I ... |
{"title":"POST Variable Array and filter_input","tags":["php","arrays","variables","post","input"],"question_text":"While using\n`filter_input`\n, I'm not able to pull in a\n`POST`\narray variable. The\n`POST`\ninput:\n`type => 'container',\naction => 'edit',\ndata[display] => 1,\ndata[query_limit] => 100`\nI can acces... |
{"title":"Build hash from collection of ActiveRecord Models","tags":["ruby-on-rails","ruby","activerecord"],"question_text":"I'm trying to build a hash from a Model.\nThis is the type of hash I want to build.\n`{\"United Sates\" => \"us\", \"United Kingdom\" => \"uk\" .....}`\nI have tried so many ways now I'm just goi... |
{"title":"batch file for loop with spaces in dir name","tags":["batch-file","dos"],"question_text":"How do I modify this:\n`for \/f %%a IN ('dir \/b \/s build\\release\\*.dll') do echo \"%%a\"`\nto work when the path contains spaces?\nFor example, if this is run from\n`c:\\my folder with spaces`\nit will echo:\n`c:\\my... |
{"title":"Scala equivalent of C#\u00e2\u0080\u0099s extension methods?","tags":["scala","extension-methods"],"question_text":"In C# you can write:\n`using System.Numerics;\nnamespace ExtensionTest {\npublic static class MyExtensions {\n public static BigInteger Square(this BigInteger n) {\n return n * n;\n }\n static v... |
{"title":"How to compile C++ under Ubuntu Linux?","tags":["c++","gcc"],"question_text":"I cut&pasted the below code from\na previous question\ninto a file called \"avishay.cpp\" and then ran\n`gcc avishay.cpp`\nonly to get the following error messages from the linker. What went wrong, what should I have done?\n`carl@ca... |
{"title":"Viewing full output of PS command","tags":["linux","bash","shell","process"],"question_text":"when I run\n`ps -aux`\ncommand on my linux server, to which I connected using putty, few processes are too long to fit in my current window width. Is there an alternative?\n-- Update --\nI am sorry for downgrading,I ... |
{"title":"Mono Project: Why is mono faster than .NET?","tags":["c#",".net","mono"],"question_text":"I am surprised to observe that mono is faster than .NET. Does anyone know why is it so? I was expecting mono to be slower than .NET but wasnt the case atleast with my experiments.\nI have a windows xp laptop with .NET fr... |
{"title":"How to set the path environment variable from ant script","tags":["ant","environment-variables"],"question_text":"How to set the path environment variable from ant script","answer_text":"Is this for an\n`<exec>`\ntask?\nYou can set environment variables when you run an\n`<exec>`\ntask:\n`<exec executable=\"${... |
{"title":"Unicode Regex; Invalid XML characters","tags":["regex","unicode","pcre"],"question_text":"The list of valid XML characters is well known, as defined by the spec it's:\n`#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`\nMy question is whether or not it's possible to make a PCRE regular e... |
{"title":"Argmax of numpy array returning non-flat indices","tags":["python","multidimensional-array","numpy"],"question_text":"I'm trying to get the indices of the maximum element in a Numpy array.\nThis can be done using\n`numpy.argmax`\n. My problem is, that I would like to find the biggest element in the whole arra... |
{"title":"Compare JSON and BSON","tags":["javascript",".net","json","json.net","bson"],"question_text":"I am comparing JSON and BSON for serializing objects. These objects contain several arrays of a large number of integers. In my test the object I am serializing contain a total number of about 12.000 integers. I am o... |
{"title":"What difference does .AsNoTracking() make?","tags":["c#",".net","entity-framework","entity-framework-4.3"],"question_text":"I have a question regarding the\n`.AsNoTracking()`\nextension, as this is all quite new and quite confusing.\nI'm using a per-request context for a website.\nA lot of my entities don't c... |
{"title":"Scala: Using HashMap with a default value","tags":["oop","data-structures","scala","hashmap"],"question_text":"I have a mutable HashMap and would like to use it like a default-dictionary. The obvious method appears to be to use getOrElse and provide the default value each time as a second value. However this ... |
{"title":"Jenkins - j_acegi_security_check","tags":["authentication","tomcat","continuous-integration","installation","jenkins"],"question_text":"I am trying to setup jenkins, but I cant get the authentication to work. I am running jenkins on Tomcat6 on CentOS 6.2. I enable logging in, and everything goes fine until I ... |
{"title":"Jersey client: How to add a list as query parameter","tags":["java","rest","jersey"],"question_text":"I'm creating a Jersey client for a GET service that has a List as query parameter. According to the\ndocumentation\n, it's possible to have a List as a query parameter (this information is also at\n@QueryPara... |
{"title":"jqueryui dialog positioning","tags":["jquery","html","css","jquery-ui","jquery-ui-dialog"],"question_text":"I am using JQuery UI and would like to position my dialog horizontally centered but vertically above center, maybe by a fixed amount of pixels or a relative distance from the top of the page. Is there a... |
{"title":"C# Speech Recognition - Is this what the user said?","tags":["c#","speech-recognition","text-to-speech"],"question_text":"I have need to write an application which uses a speech recognition engine -- either the built in vista one, or a third party one -- that can display a word or phrase, and recognise when t... |
{"title":"How to have a a razor action link open in a new tab?","tags":["c#","html","razor"],"question_text":"I trying to get my link to open in a new tab (it must be in razor format):\n`<a href=\"@Url.Action(\"RunReport\", \"Performance\", new { reportView = Model.ReportView.ToString() }, new { target = \"_blank\" })\... |
{"title":"Vertical alignment of text and icon in bootstrap button","tags":["twitter-bootstrap","alignment","webfonts","font-awesome"],"question_text":"I'm having trouble vertically aligning a font-awesome icon with text within a button under the bootstrap framework. I've tried so many things including setting the line-... |
{"title":"How to hide a <option> in a <select> menu with CSS?","tags":["javascript","jquery","css","dom"],"question_text":"I've realized that Chrome, it seems, will not allow me to hide\n`<option>`\nin a\n`<select>`\n. Firefox will.\nI need to hide the\n`<option>`\ns that match a search criteria. In the Chrome web tool... |
{"title":"The difference between + and & for joining strings in VB.NET","tags":["vb.net","string"],"question_text":"What is the difference between\n`+`\nand\n`&`\nfor joining strings in VB.NET?","answer_text":"There's no difference if both operands are strings. However, if one operand is a string, and one is a number, ... |
{"title":"Xmpp Vs Websocket","tags":["java","websocket","xmpp","real-time","near-real-time"],"question_text":"I'm about to develop a website that has near real time chat. I know that it can be implemented using xmpp or websocket protocols. I know also that the xmpp protocol has been developed in 1999 , and I guess it s... |
{"title":"Why use a singleton instead of static methods?","tags":["java","design-patterns","singleton"],"question_text":"I've never found good answers to these simple questions about helper\/utility classes:\nWhy would I create a singleton (stateless) instead of using static methods?\nWhy would an object instance be ne... |
{"title":"JavaScript - Identify whether a property is defined and set to 'undefined', or undefined","tags":["javascript","object","properties","undefined"],"question_text":"Say I have the following code:\n`function One() {}\nOne.prototype.x = undefined;\nfunction Two() {}\nvar o = new One();\nvar t = new Two();`\n`o.x`... |
{"title":"Setting the User-Agent header for a WebClient request","tags":["c#","windows-phone-7"],"question_text":"What is the proper way of setting the User-Agent header for a WebClient request for Windows Phone 7?\nI found 2 options, but not sure which one is the correct one. Considering a WebClient object:\n`WebClien... |
{"title":"An interview question: About Probability","tags":["algorithm","random","probability"],"question_text":"An interview question:\nGiven a function f(x) that 1\/4 times returns 0, 3\/4 times returns 1.\nWrite a function g(x) using f(x) that 1\/2 times returns 0, 1\/2 times returns 1.\nMy implementation is:\n`func... |
{"title":"Vim: Replacing a line with another one yanked before","tags":["vim"],"question_text":"At least once per day i have the following situation:\n`A: This line should also replace line X\n...\nX: This is line should be replaced`\nI believe that I don't perform that task efficiently.\nWhat I do:\nGo to line A:\nAG\... |
{"title":"getAttribute() versus Element object properties?","tags":["javascript","html","dom"],"question_text":"Expressions like\n`Element.getAttribute(\"id\")`\nand\n`Element.id`\nreturn the same thing.\nWhich one should be used when we need attributes of an HTMLElement object?\nIs there any cross browser issue with t... |
{"title":"Redirecting EC2 elb from http to https","tags":["redirect","nginx","amazon-ec2","https","amazon-elb"],"question_text":"I want to redirect all the http request to https request on elb. I have 2 ec2 instances. I am using nginx for the server. I have tried a rewriting the nginx conf files without any success. I ... |
{"title":"Why is hierarchyviewer not working for Samsung Galaxy TAB 7.0?","tags":["android","galaxy-tab"],"question_text":"I've used hierarachyviewer earlier, but on android emulator. It works absolutely fine when I use it on the emulator. However it does not work with Samsung Galaxy TAB 7.0, with Android 2.3.4.\nThis ... |
{"title":"What command do I use to see what the ECDSA key fingerprint of my server is?","tags":["linux","security","ssh","rsa","openssh"],"question_text":"I see stuff all over Google on how to see the RSA key fingerprint, but not the ECDSA fingerprint.","answer_text":"Wait, I found it. Run the command:\n`ssh-keygen -l ... |
{"title":"Weird character zsh in emacs terminal","tags":["osx","emacs","zsh"],"question_text":"When using the terminal in emacs (M-x term) under MacOS for some reason it always posts the characters 4m before every line in zsh and always prints 2 lines containing the user info such as\n`4m--(jesus@laptop:\/dir)----\n4m-... |
{"title":"jQuery \/ Programmatically Select an Option in Select Box","tags":["jquery","json","select"],"question_text":"I'm currently using jQuery to return some JSON results. Once these results are returned, I'm using them to pre-populate fields in my form.\nHowever, I need some help in pre-selecting items in a drop d... |
{"title":"read string from .resx file in C#","tags":["c#",".net","string"],"question_text":"Hi \nHow to read the string from .resx file in c#? please send me guidelines . step by step","answer_text":"This example is from the\nMSDN page on ResourceManager.GetString()\n:\n`\/\/ Create a resource manager to retrieve resou... |
{"title":"The differences between JUnit 3 and JUnit 4","tags":["junit","junit4","junit3"],"question_text":"Could someone describe in a few words what the main differences between JUnit 3 and 4 are?","answer_text":"Java 5 annotations for setup and teardown (\n`@before`\nand\n`@after`\n)\ninstead of\n`setUp()`\nand\n`tea... |
{"title":"PHP profiling with microtime(): Negative time?","tags":["php","microtime"],"question_text":"For a very simple profiling I use\n`microtime()`\nlike this:\n`$now = microtime();\nfor (...) {\n \/\/ do something\n echo microtime() - $now;\n $now = microtime();\n}`\nNow, the output of the\n`echo`\nline seems compl... |
{"title":"Resizing buttons in Twitter-Bootstrap","tags":["css","twitter-bootstrap","button"],"question_text":"I'm developing a mobile-friendly web app which I would like to feature a dead-simple UI, including buttons so large even Andre the Giant could tap them with ease.\nThe problem is, I see no simple way of explici... |
{"title":"How to catch this error: \"Notice: Undefined offset: 0\"","tags":["php","error-handling","try-catch"],"question_text":"I want to catch this error:\n`$a[1] = 'jfksjfks';\ntry {\n $b = $a[0];\n} catch (\\Exception $e) {\n echo \"jsdlkjflsjfkjl\";\n}`\nEdit:\nin fact, I got this error on the following line:\n`$p... |
{"title":"How do you import an Eclipse project into Android Studio now?","tags":["android","eclipse","android-studio"],"question_text":"Using \"Import Project\" in Android Studio for an Eclipse project used to change the project structure and generate Gradle files, but right now (I'm using AS 0.5.3) it's only generatin... |
{"title":"Matplotlib scatter plot legend","tags":["python","matplotlib","legend","scatter-plot"],"question_text":"I created a 4D scatter plot graph to represent different temperatures in a specific area. When I create the legend, the legend shows the correct symbol and color but adds a line through it. The code I'm usi... |
{"title":"PHP object literal","tags":["php","object","literals","object-literal"],"question_text":"In PHP, I can specify array literals quite easily:\n`array(\n array(\"name\" => \"John\", \"hobby\" => \"hiking\"),\n array(\"name\" => \"Jane\", \"hobby\" => \"dancing\"),\n ...\n)`\nBut what if I want array of objects? ... |
{"title":"CSS - Is there a way to get rid of the selection rectangle after clicking a link?","tags":["css","hyperlink"],"question_text":"Is there a way to get rid of the selection rectangle when clicking a link which does not refresh the current page entirely?","answer_text":"Do you mean the dotted outline of a target?... |
{"title":"How to set Environment variables from within package.json [Node.js]","tags":["javascript","json","node.js","actionhero"],"question_text":"How to set some Environment variables from within package.json to be used with\n`npm start`\nlike commands\nhere is what i want to achieve.\npackage.json\n`{\n ...\n \"scri... |
{"title":"How does one convert a HashMap to a List in Java?","tags":["java","list","dictionary","arraylist","hashmap"],"question_text":"In Java, how does one get the values of a\n`HashMap`\nreturned as a\n`List`\n?","answer_text":"`HashMap<Integer, String> map = new HashMap<Integer, String>();\nmap.put (1, \"Mark\");\n... |
{"title":"Why compile error \"Use of unassigned local variable\"?","tags":["c#",".net","compiler-construction"],"question_text":"My code is the following\n`int tmpCnt; \nif (name == \"Dude\") \n tmpCnt++;`\nWhy is there an error\n`Use of unassigned local variable tmpCnt`\n? I know I didn't explicitly initialize it but ... |
{"title":"How to not run an example using roxygen2?","tags":["r","roxygen2"],"question_text":"I'm writing a\ngeocoding function\nright now that relies on having a Bing Maps Key. Obviously I'd rather not publish mine, and the examples fail without one.\nHow do I include an example for users to run manually, but not have... |
{"title":"BDD and TDD for node.js?","tags":["node.js","rspec","tdd","cucumber","bdd"],"question_text":"What is used for BDD and TDD with node.js?\nI'm used to use Cucumber + RSpec. What's a good combo for node.js?\nthanks","answer_text":"Update\nMocha\ngets my vote now!\nYou could have a look at the\ntesting modules se... |
{"title":"Nodejs \/ Express - Launching my app: express.createServer() is deprecated","tags":["javascript","node.js","mongodb","express","socket.io"],"question_text":"I downloaded a node app to test and play around with. I have googled around and found that Express is found to be a little outdated. Can someone help me ... |
{"title":"Gradle: How to customize Android Manifest permissions?","tags":["android","gradle"],"question_text":"For my build system, I need to build several app variants, each requesting a different set of permissions. How can this be done with Gradle, without invoking a separate script?","answer_text":"I just managed t... |
{"title":"Why we should not use protected static in java","tags":["java","oop","inheritance","static","protected"],"question_text":"I was going through this question\nIs there a way to override class variables in Java?\nThe first comment with 36 upvotes was:\nIf you ever see a\n`protected static`\n, run.\nCan anyone ex... |
{"title":"PUT vs. POST for files upload RESTful api to be built using Zend Framework","tags":["api","rest","post","upload","put"],"question_text":"I'm building a RESTful api using Zend Framework via the Zend_Rest_Route. For files upload, should I use PUT or POST to handle the process? I'm trying to be as consistent as ... |
{"title":"Using AsParallel()\/Parellel.ForEach() guidelines?","tags":["c#",".net","multithreading","parallel-processing"],"question_text":"Looking for a little advice on leveraging\n`AsParallel()`\nor\n`Parallel.ForEach()`\nto speed this up.\nSee the method I've got (simplified\/bastardized for this example) below.\nIt... |
{"title":"Change UIImageView mode iPhone\/iPad","tags":["iphone","objective-c","ipad","uiimageview"],"question_text":"If I have an UIImageView with the mode set to center for example how can I change it to something else such as aspect fit with code?","answer_text":"`imageView.contentMode = UIViewContentModeScaleAspect... |
{"title":"How to display nodejs raw Buffer data as Hex string","tags":["node.js","buffer"],"question_text":"The following code uses SerialPort module to listen to data from a bluetooth connection.\nI am expecting to see a stream of data in Hexadecimal format printed in console. But the console just shows some weird sim... |
{"title":"The anti-forgery token could not be decrypted","tags":["asp.net-mvc","asp.net-mvc-4"],"question_text":"I have a form:\n`@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {\n@Html.AntiForgeryToken()\n@Html.ValidationSummary()...`\nand action:\n`[HttpPost]\n[AllowAnonymous]\n[ValidateAntiForgeryTok... |
{"title":"rails db migration, undefined method `to_sym', can't figure out syntax","tags":["ruby-on-rails","migration"],"question_text":"the original migration looks like this:\n`class CreateUsers true do |t|\n t.string :login, :limit => 40\n t.string :name, :limit => 100, :default => '', :null => true\n t.string :email... |
{"title":".datepicker('setdate') issues, in jQuery","tags":["jquery","jquery-ui","jquery-ui-datepicker"],"question_text":"I have a function that executes a query to get some data based on a certain date range which is selected using .datepicker(). I am trying to set the datepicker's that are in the response data back t... |
{"title":"Node.js: image resizing without ImageMagick","tags":["image","node.js","image-resizing"],"question_text":"I'm developing a web app on Node.js (+ express 4) where users can set their profile image by uploading it to the server. We already limit the file mimetype and max filesize, so the user can't upload more ... |
{"title":"PHP combine two associative arrays into one array","tags":["php","arrays","multidimensional-array","associative-array"],"question_text":"`$array1 = array(\"$name1\" => \"$id1\");\n$array2 = array(\"$name2\" => \"$id2\", \"$name3\" => \"$id3\");`\nI need a new array combining all together, i.e. it would be\n`$... |
{"title":"Counter in foreach loop in C#","tags":["c#","foreach","counter"],"question_text":"Working of foreach:\nAs I know,\nforeach is a loop which iterates through a collection or array one by\n one, starting from 0 index till the\n last item of the collection.\nSo, if I have n items in an array.\n`foreach (var item ... |
{"title":"How do I write a for loop in bash","tags":["bash","iterator"],"question_text":"I'm looking for the basic loop like:\n`for(int i = 0; i < MAX; i++) {\n doSomething(i);\n}`\nbut for bash.","answer_text":"See:\nthis site\n`for i in $(seq 1 10);\n do\n echo $i\n done`","question_code":["for(int i = 0; i < MAX; i+... |
{"title":"Configure ASP.NET MVC for authentication against AD","tags":["asp.net-mvc","active-directory"],"question_text":"What are the high level steps to authenticate users of an ASP.NET MVC application against Active Directory?\nI presume something like:\nModify web.config to use Windows authentication\nConfigure web... |
{"title":"MemoryStream.Close() or MemoryStream.Dispose()","tags":["c#",".net","garbage-collection"],"question_text":"Which one do I call?\nIs it necessary to call both?\nWill the other throw an exception if I have already called one of them?","answer_text":"`Close()`\nand\n`Dispose()`\n, when called on a\n`MemoryStream... |
{"title":"How Can i INTERCEPT an Incoming SMS With A specific Text","tags":["android"],"question_text":"I want to know about intercepting an incoming sms for a specific key word EX:\"Hi\", so that I can read that sms containing \"Hi\" in it & delete it after reading the msg, & if that msg doesn't contain any such text ... |
{"title":"set colspan dynamically with jquery","tags":["jquery","table","html-table"],"question_text":"I have a simple table structure like this. What I would like to do is to dynamically merge some columns based on some condition within the for example, if td1 and td3 are empty then merge the cells and do\n`<td class=... |
{"title":"Proper .htpasswd usage","tags":["apache",".htaccess",".htpasswd"],"question_text":"Assuming a small (pages < 5) site, what is the proper usage of\n`.htaccess`\nand\n`.htpassword`\n? I recently watched\na tutorial from Nettuts+\nwhere this sample code was given:\n.htaccess\n`AuthName \"Login title\"\nAuthType ... |
{"title":"Ruby hash default value behavior","tags":["ruby","hash"],"question_text":"I'm going through Ruby Koans, and I hit #41 which I believe is this:\n`def test_default_value_is_the_same_object\n hash = Hash.new([])\n hash[:one] << \"uno\"\n hash[:two] << \"dos\"\n assert_equal [\"uno\",\"dos\"], hash[:one]\n assert... |
{"title":"Installing specific laravel version with composer create-project","tags":["php","laravel","composer-php"],"question_text":"The fastest and simplest way of installing Laravel is via composer command. From the laravel docs (\nhttp:\/\/laravel.com\/docs\/quick\n), it shows that we can install it with this:\n`com... |
{"title":"AngularJS ng-repeat with custom element inside a table is rendering strangely","tags":["javascript","html","angularjs","angularjs-directive","angularjs-ng-repeat"],"question_text":"I'm trying to re-use a portion of my HTML view in multiple places. The portion I want to re-use is table cells in an HTML table. ... |
{"title":"Android Service need to run always(Never pause or stop)","tags":["java","android","service"],"question_text":"I created a service and want to run this service always until my phone restart or force closed.\nThe service should run in background.\nSample code of created service and start services.\nStart the se... |
{"title":"Command-line Tool to find Java Heap Size and Memory Used (Linux)?","tags":["java","linux","memory","heap"],"question_text":"Is there a Command-line Tool (Linux) to check Heap Size (and Used Memory) of a Java Application?\nI have tried jmap. But it gives info. about internal memory areas like Eden\/PermGen etc... |
{"title":"What is the alternative for ~ (user's home directory) on Windows command prompt?","tags":["command","command-prompt","home-directory"],"question_text":"I'm trying to use the command prompt to move some files,\nI am used to the linux terminal where I use\n`~`\nto specify the my home directory\nI've looked ever... |
{"title":"Equivalent of 'more' or 'less' command in Powershell?","tags":["powershell"],"question_text":"Is there a way to paginate the output by piping it to some 'more' command, which is available in linux\\unix shells?","answer_text":"Yes there is:\n`some-cmdlet | out-host -paging`","question_code":[],"answer_code":[... |
{"title":"Strange ActiveRecord::AssociationTypeMismatch","tags":["ruby-on-rails","ruby"],"question_text":"I am getting a very strange error when running a spec:\n`Failure\/Error: entity = Factory.create(:entity, :name => \"Test Entity\", :creator => user)\n ActiveRecord::AssociationTypeMismatch:\n ::User(#97318850) exp... |
{"title":"Orchestrating microservices","tags":["http","orchestration","hypermedia","microservices"],"question_text":"What is the standard pattern of orchestrating microservices?\nIf a microservice only knows about it's own domain, but there is a flow of data that requires that multiple services interact in some manner,... |
{"title":"Can there be an apostrophe in an email address?","tags":["email","email-integration","email-validation"],"question_text":"Possible Duplicate:\nWhat characters are allowed in email address?\nI have an email address with an apostrophe in it and am wondering if that is valid?","answer_text":"Yes, apostrophes are... |
{"title":"Specific reason why python uses triple-quotation marks for comments?","tags":["python","coding-style","comments"],"question_text":"Why didn't python just use the traditional style of comments like C\/C++\/Java uses:\n`\/**\n * Comment lines \n * More comment lines\n *\/\n\/\/ line comments\n\/\/ line comments... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.