text stringlengths 74 309k |
|---|
{"title":"What is the purpose of type ascriptions in Scala?","tags":["scala","static-typing","ascription"],"question_text":"There's not much info in the spec on what type ascription is, and there certainly isn't anything in there about the purpose for it. Other than \"making passing varargs work\", what would I use typ... |
{"title":"PHP CURL & HTTPS","tags":["php","curl","https"],"question_text":"I found this function that does an AWESOME job (IMHO):\nhttp:\/\/nadeausoftware.com\/articles\/2007\/06\/php_tip_how_get_web_page_using_curl\n`\/**\n * Get a web file (HTML, XHTML, XML, image, etc.) from a URL. Return an\n * array containing the... |
{"title":"Is it possible to define constants in css?","tags":["css"],"question_text":"I use a few colors throughout my CSS stylesheet. For example\n`#testdiv{\n background: #123456;\n}`\nIs it possible to define that color by name so I can reference it in the css sheet like this\n`#testdiv{\n background: COLORNAME;\n}`... |
{"title":"How to use the dumped data by mongodump?","tags":["mongodb","dump","mongorestore","mongodump"],"question_text":"I have used\n`mongodump`\nto dump my database of mongodb, it created some bson files under\n`dump\/mydb`\nBut I don't know how to use them. I tried\n`mongoimport`\n, but seems it can't import bson d... |
{"title":"Python how to exit main function","tags":["python"],"question_text":"Possible Duplicates:\nTerminating a Python script\nTerminating a Python Program\nMy question is how to exit out in Python main function? I have tried '\n`return`\n' but it gave the error\n`SyntaxError: 'return' outside function`\n. Can anyon... |
{"title":"How to use not contains() in xpath?","tags":["xpath","contains"],"question_text":"I have some XML that is structured like this:\n`<whatson>\n <productions> \n <production>\n <category>Film<\/category>\n <\/production>\n <production>\n <category>Business<\/category>\n <\/production>\n <production>\n <category>... |
{"title":"Regular Expression to match a dot","tags":["python","regex"],"question_text":"Was wondering what the best way is to match \"test.this\" from \"blah blah blah test.this@gmail.com blah blah\" is? Using Python.\nI've tried\n`re.split(r\"\\b\\w.\\w@\")`\nThanks!","answer_text":"A\n`.`\nin regex is a metacharacter... |
{"title":"Inserting a hard-coded UUID via CQLsh (Cassandra)","tags":["cassandra","uuid","cql","cqlsh"],"question_text":"Would like to populate some static test data via a CQLsh script.\nThis doesn't work: (device_id is UUID)\n`insert into devices (device_id, geohash,name, external_identifier, measures, tags) \nvalues (... |
{"title":"Where can I get a list of abbreviations for timeZoneWithAbbreviation?","tags":["iphone"],"question_text":"I'd like to do some timezone calculation, using the following API:\n`NSTimeZone *some_time_zone = [NSTimeZone timeZoneWithAbbreviation:name];`\nhowever, I am not sure where to find the supported list of\n... |
{"title":"Writing test cases for django models","tags":["python","django","django-models","django-testing"],"question_text":"Half way through my current project, after suffering the pain of spending uncountable minutes on debugging, I have decided to adopt TDD. To start, I am planning to write a set of unit tests for e... |
{"title":"Getting list of Mac text-to-speech voices programmatically?","tags":["osx","text-to-speech"],"question_text":"The mac command\n`say`\ncan specify the voice used with the\n-v\nflag.\n`say -v Alex \"compile completed, put your swords down.\"`\nThe available voices can be seen in System Preferences\/Speech\/Text... |
{"title":"Why does (0 == 'Hello') return true in PHP?","tags":["php","if-statement"],"question_text":"Hey, if you have got the following code and want to check if\n`$key`\nmatches\n`Hello`\nI've found out, that the comparison always returns\n`true`\nif the variable is\n`0`\n. I've came across this when an array for a s... |
{"title":"call a function for each value in a generic c# collection","tags":["c#","linq","lambda","generics"],"question_text":"I have a collection of integer values in a List collection.\nI want to call a function for each value in the collection where one of the function's argument is a collection value. \nWithout doi... |
{"title":"PHP_AUTH_USER not set?","tags":["php","http-authentication"],"question_text":"For some reason, none of the code within\n`if (isset($_SERVER['PHP_AUTH_USER']) &&\n isset($_SERVER['PHP_AUTH_PW']))\n{\n\/\/ When the above is set, the code that is here will execute of course\n}`\nis being executed for me. When I ... |
{"title":"Why can int _$[:>=<%-!.0,}; compile?","tags":["c","syntax"],"question_text":"Today I found strange syntax like\n`int _$[:>=<%-!.0,};`\nin some old code, but in fact the code is not commented. There seems to be no report of compile errors for this line. I tested it separately and it can compile too:\n`int main... |
{"title":"Does anyone still use [goto] in C# and if so why?","tags":["c#",".net","coding-style","goto"],"question_text":"I was wondering whether anyone still uses the \"goto\" keyword syntax in C# and what possible reasons there are for doing so.\nI tend to view any statements that cause the reader to jump around the c... |
{"title":"How to print a list in Python \"nicely\"","tags":["python"],"question_text":"In PHP, I can do this:\n`echo '<pre>'\nprint_r($array);\necho '<\/pre>'`\nIn Python, I currently just do this:\n`print the_list`\nHowever, this will cause a big jumbo of data. Is there any way to print it nicely into a readable tree?... |
{"title":"How can I access a subversion repository using a local path in Windows?","tags":["windows","svn","command-line"],"question_text":"I have CollabNet Subversion server and client installed, running off of Apache that came with it. From the command line on the server, I can easily access the repository using a pa... |
{"title":"Ignoring null fields in Json.net","tags":["c#",".net","json","serialization","json.net"],"question_text":"I have some data that I have to serialize to JSON. I'm using JSON.NET. My code structure is similar to this:\n`public struct structA\n{\n public string Field1;\n public structB Field2;\n public structB Fi... |
{"title":"Display html within @html.actionlink with Twitter Bootstrap","tags":["asp.net","asp.net-mvc","asp.net-mvc-3","twitter-bootstrap"],"question_text":"I'm using Twitter Bootstrap, and trying to make my links ASP.Net MVC look nice.\nHowever, the <i class=... in the link below, is html encoded, rather than being se... |
{"title":"Why Automatically implemented properties must define both get and set accessors","tags":["c#","get","properties","set","accessor"],"question_text":"When we define a property like\n`public string Name {get; set;}`\ndot net can make our properties code. but when we use\n`public string Name {get;}\n public strin... |
{"title":"How to interrupt an Infinite Loop","tags":["java","loops","infinite-loop"],"question_text":"Though I know it'll be a bit silly to ask, still I want to inquire more about the technical perspective of it.\nA simple example of an infinite loop:\n`public class LoopInfinite {\n public static void main(String[] arg... |
{"title":"Detect doubleclick on row of TableView JavaFX","tags":["tableview","javafx-8"],"question_text":"I need to detect doubleclick on a row of a tableview. I find other questions in StackOverflow but always with doubleclick on cells.\nI need an example where user doubleclick on any part of the row and get all data ... |
{"title":"Detect key event (Enter) with JQuery in Javascript (on Linux platform)","tags":["javascript","jquery","html"],"question_text":"Update:\nI finally figured out that \"keypress\" has a better compatibility than \"keydown\" or \"keyup\" on Linux platform. I just changed \"keyup\"\/\"keydown\" to \"keypress\", so ... |
{"title":"How to debug elisp?","tags":["debugging","emacs","elisp"],"question_text":"Normally the easiest way to debug is using\n`printf`\n. What can I do to debug emacs-lisp? How can I print something to emacs editor from elisp? Or\nis there any way to debug elisp code?\nFor example, how can I check if the following c... |
{"title":"Incorrect lazy initialization","tags":["java","findbugs"],"question_text":"Findbug told me that I use incorrect lazy initialization.\n`public static Object getInstance() {\n if (instance != null) {\n return instance;\n }\n instance = new Object();\n return instance;\n}`\nI don't see anything wrong here. Is it... |
{"title":"How does shovel (<<) operator work in Ruby Hashes?","tags":["ruby","hash"],"question_text":"I was going through\nRuby Koans tutorial series\n, when I came upon this in\n`about_hashes.rb`\n:\n`def test_default_value_is_the_same_object\n hash = Hash.new([])\n hash[:one] << \"uno\"\n hash[:two] << \"dos\"\n asse... |
{"title":"how to stop a goroutine","tags":["go"],"question_text":"I have a goroutine that calls a method, and passes returned value on a channel:\n`ch := make(chan int, 100)\ngo func(){\n for {\n ch <- do_stuff()\n }\n}()`\nHow do I stop such a goroutine?","answer_text":"Typically, you pass the goroutine a (possibly se... |
{"title":"What is difference between Double.parseDouble(string) and Double.valueOf(string)?","tags":["java","data-type-conversion"],"question_text":"I want to convert\n`String`\nto a\n`Double`\ndata type. I do not know if I should use\n`parseDouble`\nor\n`valueOf`\nmethods?\nWhat is the difference between these to meth... |
{"title":"Why does it appear that my random number generator isn't random in C#?","tags":["c#","random"],"question_text":"I'm working in Microsoft Visual C# 2008 Express.\nI found this snippet of code:\n`public static int RandomNumber(int min, int max)\n {\n Random random = new Random();\n return random.Next(min, max);... |
{"title":"Upload Photo To Album with Facebook's Graph API","tags":["php","facebook"],"question_text":"I'm trying to familiarize myself with Facebook's new Graph API and so far I can fetch and write some data pretty easily.\nSomething I'm struggling to find decent documentation on is uploading images to an album.\nAccor... |
{"title":"Mac OS X 10.6.7 Java Path Current JDK confusing","tags":["java","osx"],"question_text":"I have trouble understanding (actual paths vs links) for multiple java versions on my Mac OSX. Normally in windows if I have multiple versions installed in my machine, I can just take the path of which ever version I want ... |
{"title":"How to create a dynamic array of integers","tags":["c++"],"question_text":"How to create a dynamic array of integers in C++ using the\n`new`\nkeyword?","answer_text":"`int main()\n{\n int size;\n std::cin >> size;\n int *array = new int[size];\n delete [] array;\n return 0;\n}`\nDon't forget to\n`delete`\neve... |
{"title":"Compiling four java files within one package using javac","tags":["java","command-line","javac"],"question_text":"I have four java files in my folder. They are all in the same package. Here's the package declaration\n`package com.osama.GHide`\nAll of these classes are in the same package. I want to know how c... |
{"title":"Check for null in foreach loop","tags":["c#","loops","foreach",null],"question_text":"Is there a nicer way of doing the following:\nI need a check for null to happen on file.Headers before proceeding with the loop\n`if (file.Headers != null)\n{\n foreach (var h in file.Headers)\n {\n \/\/set lots of propertie... |
{"title":"Dynamically Add C# Properties at Runtime","tags":["c#","dynamic","reflection","properties"],"question_text":"I know there are some questions that address this, but the answers usually follow along the lines of recommending a Dictionary or Collection of parameters, which doesn't work in my situation.\nI am usi... |
{"title":"How to get the location of the DLL currently executing?","tags":["c#",".net","dll","file-io"],"question_text":"I have a config file that I need to load as part of the execution of a dll I am writing.\nThe problem I am having is that the place I put the dll and config file is not the \"current location\" when ... |
{"title":"How do I describe an enumeration column in a Rails 3 migration?","tags":["ruby","ruby-on-rails-3","enums","migration"],"question_text":"How do I describe an enumeration column in a Rails 3 migration?","answer_text":"Rails 4.1\ncontains enum\nfor now!\nYou can write just\n`class User < ActiveRecord::Base\n enu... |
{"title":"Javascript String.replace with dynamic regular expressions?","tags":["javascript","regex"],"question_text":"I have the following code, which works, but I need to inject some different stuff into the regular expression object (\n`regex2`\n) at runtime. However, text.replace does not seem to like a string objec... |
{"title":"Convert short to byte[] in Java","tags":["java","byte","short"],"question_text":"How can I convert a\n`short`\n(2 bytes) to a byte array in Java, e.g.\n`short x = 233;\nbyte[] ret = new byte[2];\n...`\nit should be something like this. But not sure.\n`((0xFF << 8) & x) >> 0;`\nEDIT:\nAlso you can use:\n`java.... |
{"title":"Browse for folder dialog","tags":["java","swing","jfilechooser"],"question_text":"I need to know how to get the \"browse for folder\" dialog in java. I am aware of SWT. But I need to do in swing? Is there any solution to this?\n[As we start on eclipse it will ask for choose workspace. We can see the browse fo... |
{"title":"git pull error \"The requested URL returned error: 503 while accessing\"","tags":["git","github","bitbucket"],"question_text":"I've been facing problems accessing my git repository lately. It worked perfectly fine earlier but now I cannot run any command on CLI. I can however, access the corresponding Web Pag... |
{"title":"Mongoose Unique index not working!","tags":["mongodb","node.js","mongoose"],"question_text":"I'm trying to let MongoDB detect a duplicate value based on its index. I think this is possible in MongoDB, but through the Mongoose wrapper things appear to be broken. So for something like this:\n`User = new Schema ... |
{"title":"Does variable = null set it for garbage collection","tags":["java","performance","memory","memory-management"],"question_text":"Help me settle a dispute with a coworker:\nDoes setting a variable or collection to null in Java aid in garbage collection and reducing memory usage? If I have a long running program... |
{"title":"android - \"Exported receiver does not require permission\" on receivers meant to receive from system services","tags":["android","broadcastreceiver","android-manifest","android-permissions"],"question_text":"I have some receivers declared in my manifest :\n`<receiver <!-- no warning -->\n android:name=\".rec... |
{"title":"Groovy: how to test if a property access will be successful?","tags":["groovy","properties"],"question_text":"I have a variable Object foo, which is not null. I want to use foo.bar, but only if it won't bomb me with 'No such property: bar for class: Whatever'.\nHow should I do the following test:\n`if (#test-... |
{"title":"Why is there no Linq method to return distinct values by a predicate?","tags":["c#","linq","distinct"],"question_text":"I want to get the distinct values in a list, but not by the standard equality comparison.\nWhat I want to do is something like this:\n`return myList.Distinct( (x, y) => x.Url == y.Url );`\nI... |
{"title":"jQuery serialize does not register checkboxes","tags":["jquery","serialization"],"question_text":"I'm using jQuery.serialize to retrieve all data fields in a form.\nMy problem is that it does not retriev checkboxes that is not checked.\nIt includes this:\n`<input type=\"checkbox\" id=\"event_allDay\" name=\"e... |
{"title":"How to attach Visual Studio to a process that is not started yet?","tags":["visual-studio","debugging","process"],"question_text":"I have .NET program that can't be runned from Visual Studio for some reasons (Excel file created from an Excel 2010 template project) for which I need to debug startup events.\nIf... |
{"title":"Primitive type 'short' - casting in Java","tags":["java","casting","primitive","short"],"question_text":"I have a question about the primitive type\n`short`\nin Java. I am using JDK 1.6.\nIf I have the following:\n`short a = 2;\nshort b = 3;\nshort c = a + b;`\nthe compiler does not want to compile - it says ... |
{"title":"create custom html helpers in ruby on rails","tags":["ruby-on-rails","ruby"],"question_text":"I've starting programming on ASP.NET MVC Framework a year ago.\nRecently. I've learning Ruby On Rails Framework\nThere is \"custom html helper\" feature in ASP.NET MVC\nSo I can create my own html helper\n`<%= Html.M... |
{"title":"Auto-Layout: Get UIImageView height to calculate cell height correctly","tags":["uitableview","swift","ios8","autolayout"],"question_text":"So far I have been just using text labels within cells that should auto-size themselves. I usually put constraints to all of the edges (content view or neighbors) and add... |
{"title":"ruby on rails flash messages - :alert :error :notice and :success?","tags":["ruby-on-rails","controller","message","alert"],"question_text":"In several of my controllers, I have redirects\/flash messages\n`redirect_to products_url, :notice => \"message here\", \nredirect_to states_url, :error => \"oops!\" etc... |
{"title":"Is this interview question too hard for a php dev. job?","tags":["php"],"question_text":"We're looking for someone to help us enhance & maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smar... |
{"title":"how do i write to a python subprocess' stdin","tags":["python","subprocess","stdin","nuke"],"question_text":"I'm trying to write a python script that starts a subprocess, and writes to the subprocess stdin. I'd also like to be able to determine an action to be taken if the subprocess crashes.\nThe process I'm... |
{"title":"In Rails, display time between two dates in English","tags":["ruby-on-rails","ruby","time"],"question_text":"In a Rails project I want to find the difference between two dates and then display it in natural language. Something like\n`>> (date1 - date2).to_natural_language \n\"3 years, 2 months, 1 week, 6 days... |
{"title":"jQuery: height()\/width() and \"display:none\"","tags":["jquery","css"],"question_text":"I always thought elements that had\n`display:none`\nCSS style returned 0 for\n`height()`\nand\n`width()`\n.\nBut in this example:\nHTML\n`<div id=\"target\" style=\"display:none;\">\na\n<\/div>`\nCSS\n`alert($(\"#target\"... |
{"title":"Dynamically choosing class to inherit from","tags":["python","class","inheritance"],"question_text":"My Python knowledge is limited, I need some help on the following situation.\nAssume that I have two classes\n`A`\nand\n`B`\n, is it possible to do something like the following (conceptually) in Python:\n`impo... |
{"title":"GD! Converting a png image to jpeg and making the alpha by default white and not black","tags":["php","image-processing","image-manipulation","gd"],"question_text":"I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload ... |
{"title":"Purpose of ESI & EDI registers?","tags":["assembly","x86"],"question_text":"What is the actual purpose and use of the EDI & ESI registers in assembler?\nI know they are used for string operations for one thing.\nCan someone also give an example?","answer_text":"`SI`\n= Source Index\n`DI`\n= Destination Index\... |
{"title":"Cannot find either column \"dbo\" or the user-defined function or aggregate \"dbo.Splitfn\", or the name is ambiguous","tags":["sql-server","sql-server-2005","tsql","user-defined-functions"],"question_text":"I ve used the following split function,\n`CREATE FUNCTION dbo.Splitfn(@String varchar(8000), @Delimite... |
{"title":"Code Cleanup - tool to move all using statements inside namespace in all cs files in my solution?","tags":["c#",".net","visual-studio-2010","resharper","stylecop"],"question_text":"After writing a whole bunch of code - i am finally waking up to adding CA and StyleCop to my solution.\nBy default all files (a l... |
{"title":"Eventual consistency in plain English","tags":["nosql","computer-science","data-storage","eventual-consistency"],"question_text":"I often hear about eventual consistency in different speeches about NoSQL, data grids etc. \nIt seems that definition of eventual consistency varies in many sources (and maybe even... |
{"title":"Examples of practical javascript object oriented design patterns","tags":["javascript","jquery","design-patterns","oop"],"question_text":"What object oriented design patterns do you use in your application's javascript, and why?\nFeel free to post code, even if there is no formal design pattern attached to it... |
{"title":"\u00e2\u0080\u009cThe item you were attempting to purchase could not be found\u00e2\u0080\u009d Android in-app billing","tags":["android","in-app-purchase","in-app-billing"],"question_text":"I am receiving this error while testing my app.\nThe app is signed and uploaded to the alpha testing portion of the dev... |
{"title":"Upload resized image to S3","tags":["python","amazon-s3","python-imaging-library","boto"],"question_text":"I'm trying to upload resized image to S3:\n`fp = urllib.urlopen('http:\/example.com\/test.png')\nimg = cStringIO.StringIO(fp.read())\nim = Image.open(img)\nim2 = im.resize((500, 100), Image.NEAREST) \nAK... |
{"title":"Is there a way to restore Github 2FA without recovery codes or backup phone number?","tags":["github"],"question_text":"My android device broke and I lost access to Github 2 factor authentication codes.\nUnfortunately I didn't save the recovery codes or set up a backup phone number to receive codes by SMS, an... |
{"title":"PHP Remove JavaScript","tags":["php","javascript"],"question_text":"I am trying to remove JavaScript from the HTML.\nI can't get the regular expression to work with PHP; it's giving me an null array. Why?\n`<?php\n$var = '\n<script type=\"text\/javascript\"> \nfunction selectCode(a) \n{ \n var e = a.parentNod... |
{"title":"What is data serialization ?","tags":["php","javascript","serialization","definition"],"question_text":"First of all, I could not able to get clear definition of it from\nWikiPedia\nor even from\nserialize\nfunction in the PHP manual. I need to know some cases we need the term serialization and how things are... |
{"title":"We have to use C \"for performance reasons\"","tags":["c","linux","embedded","systems-programming"],"question_text":"In this age of many languages there seems to be a great language for just about every task and I find myself professionally struggling against a mantra of 'nothing but C is fast' where fast is ... |
{"title":"import modules from files in directory","tags":["javascript","ecmascript-6"],"question_text":"With es6, I can import several exports from a file like this:\n`import {ThingA, ThingB, ThingC} from 'lib\/things';`\nHowever, I like the organization of having one module per file. I end up with imports like this:\n... |
{"title":"is a great memory a requirement for great programming","tags":["memory"],"question_text":"Do you think having a great memory is REQUIRED to be a great programmer?\nI don't consider myself a great programmer but I do think I am decent. But my memory is REALLY bad so I find myself always having to remind myself... |
{"title":"Cron job not working in Whenever gem","tags":["ruby-on-rails","ruby","cron","whenever"],"question_text":"I have an application that contains a bunch of tasks, and every day I want to run a cron job that creates a DayTask for each Task in the database. A Task has_many DayTasks and these daytasks are what users... |
{"title":"String comparison in bash. [[: not found","tags":["bash","shell","ubuntu-11.04","string-comparison"],"question_text":"I am trying to compare strings in bash. I already found an answer on how to do it on\nstackoverflow\n. In script I am trying, I am using the code submitted by Adam in the mentioned question:\n... |
{"title":"Setting Up Node.js on Webfaction","tags":["node.js","web-applications","installation","webfaction"],"question_text":"What are the steps required for setting up a\nNode.js\napplication on\nWebfaction\nshared hosting account?","answer_text":"Introduction\nThe result of the following instructions is a Node.js ap... |
{"title":"Is main thread the same as UI thread?","tags":["android"],"question_text":"The Android doc says \"Like activities and the other components, services run in the main thread of the application process.\"\nIs the main thread here the same thing as UI thread?","answer_text":"Looks like it. Quoted from\nhttp:\/\/a... |
{"title":"Changing the mouse's i-beam cursor in Xcode 4","tags":["xcode","osx","colors","mouse-cursor"],"question_text":"With a dark color scheme in Xcode 4 the i-beam cursor (aka text selection cursor) is nearly invisible. Is there a way to change the color of this cursor, either for Xcode specifically, or failing tha... |
{"title":"Implementing OAuth 2.0 Authentication for My API","tags":["c#",".net","oauth-2.0","oauth-provider"],"question_text":"I've been using the Facebook Graph API (uses oauth 2.0 for authentication) successfully for a while now. I now need to write my own API which allows developers to connect to it in a similar fas... |
{"title":"C# keep session id over httpwebrequest","tags":["c#","session","cookies","httpwebrequest"],"question_text":"I need to preserve the same session id when navigating over a site's pages using C#.Net (like a crawler). I found a couple of methods, a http sniffer was very handy, to compare what my IE browser was se... |
{"title":"angular-ui modal with controller as syntax","tags":["angular-ui","angular-ui-bootstrap"],"question_text":"I'm using angular-ui-bootstrap-bower#0.7.0 with angular#1.2.10 and when opening a modal where the controller is an \"old fashioned\" one, everything works fine.\nHowever, when I have a controller meant to... |
{"title":"Javascript: console.log to html","tags":["javascript"],"question_text":"I would like to write the console.log output to a div layer.\nFor example:\n`document.write(console.log(5+1)); \/\/Incorrect, random example`\nCan someone give me a solution to my problem?\nThank you.\nEDIT:\nwhat i meant is, for example:... |
{"title":"Check if string contains any substring in an array in Ruby","tags":["ruby","regex","substring"],"question_text":"I am using the\nTmail library\n, and for each attachment in an email, when I do\n`attachment.content_type`\n, sometimes I get not just the content type but also the name. Examples:\n`image\/jpeg; n... |
{"title":"uitableviewcontroller select header for section","tags":["ios","uitableview"],"question_text":"I have a UITableView with multiple sections. Each section has a section header (a custom view) is there an easy way to detect when someone selects the section header? (Just like didSelectRowAtIndexPath, but for the ... |
{"title":"How to cancel scheduled job with delayed_job in Rails?","tags":["ruby-on-rails","ruby","ruby-on-rails-3","delayed-job"],"question_text":"I am scheduling a job to run in say, 10 minutes. How to properly cancel this particular job without using any kind of dirty extra fields in model and so on. Is there any cal... |
{"title":"Android AppCompat 21 Elevation","tags":["android","android-view","material-design"],"question_text":"Is there any way to add elevation to a\n`View`\nin pre-lollipop devices without wrapping them in a\n`CardView`\n?","answer_text":"`ViewCompat.setElevation(View, int)`\ncurrently creates no shims.\nThe only way... |
{"title":"JavaScript\/jQuery: replace part of string?","tags":["javascript","jquery","replace"],"question_text":"With text like this:\n`<div class=\"element\">\n<span>N\/A, Category<\/span>\n<\/div>`\nI want to get rid of every occurrence of\n`N\/A`\n.\nHere is my attempt:\n`$('.element span').each(function() {\n conso... |
{"title":"cannot convert string to Guid in C#.NET","tags":["c#","string",".net-3.5","casting","guid"],"question_text":"Why would the cast (to a System.Guid type) statement be invalid (second line in try block)? For example, suppose I have a string with a value of \"5DD52908-34FF-44F8-99B9-0038AFEFDB81\". I'd like to co... |
{"title":"Is there something like a counter variable in regular expression replace?","tags":["regex","language-agnostic"],"question_text":"If I have a lot of matches, for example in multi line mode, and I want to replace them with part of the match as well as a counter number that increments.\nI was wondering if any re... |
{"title":"How to select any Video or Movie file from UIImagePickerController","tags":["iphone","uiimagepickercontroller"],"question_text":"In my app, i need to select any video file and show the display the url for a video file in the application.\n`-(void)viewDidLoad{\n [super viewDidLoad];\n self.imgPicker = [[UIImag... |
{"title":"NuGet add reference error while installing packages","tags":[".net","visual-studio-2010","nuget"],"question_text":"I am not able to install any package by Nuget. For example when I want install entity framework I receive following error:\n`install-package EntityFramework\nSuccessfully installed 'EntityFramewo... |
{"title":"How to compare equality of lists of arrays with modern Java?","tags":["java","arrays","list","java-8","equals"],"question_text":"I have two lists of arrays.\nHow do I easily compare equality of these\nwith Java 8 and its features\n, without using external libraries? I am looking for a \"better\" (higher-level... |
{"title":"View php session variables","tags":["php","firefox","google-chrome","browser","session-variables"],"question_text":"Not sure if this belongs here or at webapps... please move if appropriate.\nI don't even know if such a thing is possible, but is there an extension or add-on for either Firefox or Chrome that w... |
{"title":"iOS - Get location of a view in a window?","tags":["iphone","objective-c","ios","uiwindow"],"question_text":"I have a UIView that displays a popup after it's been clicked.\nThe popup needs to be added to the main UIWindow to make sure that it goes on top of everything else.\nI want the position of this popup ... |
{"title":"Undefined reference error for template method","tags":["c++","templates","compilation","linker"],"question_text":"This has been driving me mad for the past hour and a half. I know it's a small thing but cannot find what's wrong (the fact that it's a rainy Friday afternoon, of course, does not help).\nI have d... |
{"title":"Why use anonymous function?","tags":["php","design-patterns","closures","anonymous-function"],"question_text":"Possible Duplicate:\nHow do you use anonymous functions in PHP?\nWhy should i use an anonymous function? I mean, what's the real deal using it?\nI just don't really get this. I mean, you use function... |
{"title":".NET: How to convert Exception to string?","tags":["c#",".net","exception","tostring"],"question_text":"When an exception is thrown (while debugging in the IDE), i have the opportunity to\nview details\nof the exception:\nBut in code if i call\n`exception.ToString()`\ni do not get to see those useful details:... |
{"title":"Run an async function in another thread","tags":["c#",".net","c#-4.0","async-ctp"],"question_text":"I'm evaluating the Async CTP.\nHow can I begin execution of an async function on another thread pool's thread?\n`static async Task Test()\n{\n \/\/ Do something, await something\n}\nstatic void Main( string[] a... |
{"title":"How to get the position of a draggable object","tags":["jquery","jquery-ui","drag-and-drop","position"],"question_text":"I'm trying to get the x and y of the draggable object using JQuery.\nThe scenario is, I'm dragging and dropping an object onto another object and want to get the position of the drag&drop o... |
{"title":"Issue when centering vertically with flexbox when heights are unknown","tags":["css3","height","overflow","center","flexbox"],"question_text":"My layout have a container\nflex-container\nand a child.\nHTML:\n`<div class=\"flex-container\">\n <div>text<\/div>\n<\/div>`\nThe container and the child have an\nunk... |
{"title":"How do I echo a blank (empty) line to the console from a Windows batch file?","tags":["windows","batch-file","echo"],"question_text":"When outputting status messages to the console from a Windows batch file, I want to output\nblank lines\nto break up the output. How do I do this?","answer_text":"Any of the be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.