text stringlengths 74 309k |
|---|
{"title":"Unsupported operation: Android, Retrofit, OkHttp. Adding interceptor in OkHttpClient","tags":["java","android","retrofit","okhttp","retrofit2"],"question_text":"I am trying to add token based authentication via Retrofit 2.0-beta3 and OkHttpClient in Android using interceptors. But I get UnsupportedOperationEx... |
{"title":"Checking for the correct number of arguments","tags":["shell","scripting"],"question_text":"How do i check for the correct number of arguments (one argument). If somebody tries to invoke the script without passing in the correct number of arguments, and checking to make sure the command line argument actually... |
{"title":"What is the best way to test for an empty string in Go?","tags":["string","go","is-empty"],"question_text":"Which method is best (more idomatic) for testing non-empty strings is best (in Go)?\n`if len(mystring) > 0 { }`\nOr:\n`if mystring != \"\" { }`\nOr something else?","answer_text":"Both styles are used w... |
{"title":"How to get diff between all files inside 2 folders that are on the web?","tags":["linux","svn","git","file","diff"],"question_text":"So I want to\ncompare this folder\n`http:\/\/cloudobserver.googlecode.com\/svn\/branches\/v0.4\/Boost.Extension.Tutorial\/libs\/boost\/extension\/`\nwith\nthis\n`http:\/\/svn.bo... |
{"title":"What is () in Haskell, exactly?","tags":["haskell","types","unit-type"],"question_text":"I'm reading Learn You a Haskell, and in the monad chapters, it seems to me that\n`()`\nis being treated as a sort of 'null' for every type. When I check the type of\n`()`\nin GHCi, I get\n`>>:t ()\n() :: ()`\nwhich is an ... |
{"title":"\"Run > Stop on Objective-C exception\" in Xcode 4?","tags":["xcode","xcode4"],"question_text":"Maybe somebody knows where is the \"Run > Stop on Objective-C exception\" menu in Xcode 4? I've used it sometimes in Xcode 3, but it disappeared in the new IDE.","answer_text":"In the left side column of xcode 4:\n... |
{"title":"C# \u00e2\u0080\u0098dynamic\u00e2\u0080\u0099 cannot access properties from anonymous types declared in another assembly","tags":["dynamic","c#-4.0","anonymous-types"],"question_text":"Code below is working well as long as I have class\n`ClassSameAssembly`\nin same assembly as class\n`Program`\n.\nBut when I... |
{"title":"How to detect if a browser is Chrome using jQuery?","tags":["jquery","jquery-ui","google-chrome","jquery-selectors","cross-browser"],"question_text":"I have a bit of an issue with a function running in chrome that works properly in Safari, both webkit browsers...\nI need to customize a variable in a function ... |
{"title":"How do I drop table variables in SQL-Server? Should I even do this?","tags":["sql","sql-server","table-variable"],"question_text":"I have a table variable in a script (not a stored procedure). Two questions:\nHow do I drop the table variable? Drop Table @varName gives an \"Incorrect snytax\" error.\nShould I ... |
{"title":"What is the difference between JoinQueryOver and JoinAlias?","tags":["nhibernate","queryover"],"question_text":"I need to know what is the difference between JoinQueryOver and JoinAlias, and when to use each?\nthanks.","answer_text":"Functionally they do the same thing, create a join to another entity. The on... |
{"title":"How to use fast scroll in android?","tags":["android","android-listview","fastscroll"],"question_text":"I have a list of events which are seperated by month and year (Jun 2010, Jul 2010 etc.)\nI want to enable fast scrolling because the list is really long.\nHow do I enable fast scroll on\n`ListViews`\nin And... |
{"title":"Returning Month Name in SQL Server Query","tags":["sql","sql-server-2008"],"question_text":"Using SQL Server 2008, I have a query that is used to create a view and I'm trying to display a month's name instead of an integer.\nIn my database, the datetime is in a column called OrderDateTime. The lines in the qu... |
{"title":"Better way to generate array of all letters in the alphabet","tags":["java"],"question_text":"Right now I'm doing\n`for (char c = 'a'; c <= 'z'; c++) {\n alphabet[c - 'a'] = c;\n}`\nbut is there a better way to do it? Similar to Scala's\n`'a' to 'z'`","answer_text":"I think that this ends up a little cleaner,... |
{"title":"Entity Framework Code First - Defining Relationships\/Keys","tags":["entity-framework","entity-framework-4.1"],"question_text":"I am designing my database using code first and I need a little help I think.\nI am getting this error:\nIntroducing FOREIGN KEY constraint 'SalesOrder_Invoices' on table 'Invoices' ... |
{"title":"What's the standard way to work with dates and times in Scala? Should I use Java types or there are native Scala alternatives?","tags":["datetime","scala","jodatime"],"question_text":"What's the standard way to work with dates and times in Scala? Should I use Java types such as java.util.Date or there are nat... |
{"title":"How to change the pop-up position of the jQuery DatePicker control","tags":["javascript","jquery","jquery-ui","jquery-ui-datepicker"],"question_text":"Any idea how to get the DatePicker to appear at the end of the associated text box instead of directly below it? What tends to happen is that the text box is t... |
{"title":"How do I install an old version of Django on virtualenv?","tags":["python","django","setuptools","virtualenv"],"question_text":"This may sound like a stupid question, since the very purpose of\n`virtualenv`\nis to this exactly: Installing some specific version of a package (in this case Django) inside the vir... |
{"title":"Route alias in Rails","tags":["ruby-on-rails"],"question_text":"I have a model stories in Rails 3.\nI want to make an alias \"books\" for \"stories\" so I can have routes\n`\/books\/192`\ninstead of\n`\/stories\/192`\n, and also that all my generated links (e.g. link_to) point to books' routes instead of stor... |
{"title":"Difference between a static and a final static variable in Java","tags":["java"],"question_text":"Generally, final static members especially, variables (or static final of course, they can be used in either order without overlapping the meaning) are extensively used with interfaces in Java to define a\nprotoc... |
{"title":"Bootstrap: wider input field","tags":["twitter-bootstrap"],"question_text":"How can I make the input field wider than the default in Twitter's Bootstrap?\nI am trying to create a wider search form in the\n`hero-unit`\nclass from the\nexample\n.","answer_text":"There are various classes for different size inpu... |
{"title":"HTML table td meaning","tags":["html","html-table","semantics"],"question_text":"In HTML table, what does td stands for? I mean literally, what is it acronym for? Table division? Table data?","answer_text":"It stands for\nTable Data","question_code":[],"answer_code":[],"retrieval_text":"\n### TITLE:\nHTML tab... |
{"title":"Day Name From NSDate?","tags":["iphone","objective-c","ios4"],"question_text":"I would like to show the name of day in my iPhone application and i don't found the solution.\nThanks for help","answer_text":"`NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];\n[dateFormatter setDateFormat:@\"EEEE\... |
{"title":"How do I convert special UTF-8 chars to their iso-8859-1 equivalent using javascript?","tags":["javascript","jquery","character-encoding"],"question_text":"I'm making a javascript app which retrieves .json files with jquery and injects data into the webpage it is embedded in.\nThe .json files are encoded with... |
{"title":"JPA Criteria Tutorial","tags":["java","jpa","annotations","jpa-2.0"],"question_text":"I've been trying to find a JPA Criteria API tutorial but haven't been much successful. Do you know about any for beginners? I'd like to start using it in an Java5\/Maven app to build complex search queries.","answer_text":"T... |
{"title":"Programmatically creating Markdown tables in R with KnitR","tags":["r","markdown","knitr","rmarkdown"],"question_text":"I am just starting to learn about KnitR and the use of Markdown in generating R documents and reports. This looks to be perfect for a lot of the day to day reporting that I have to do with m... |
{"title":"Create a button programmatically and set a background image","tags":["ios","swift","ios8"],"question_text":"When I try creating a button and setting a background image in Swift:\n`let button = UIButton.buttonWithType(UIButtonType.System) as UIButton\n button.frame = CGRectMake(100, 100, 100, 100)\n button.set... |
{"title":"Difference between `mod` and `rem` in Haskell","tags":["haskell"],"question_text":"What exactly is the difference between\n`mod`\nand\n`rem`\nin Haskell?\nBoth seems to give the same results\n`*Main> mod 2 3\n2\n*Main> rem 2 3\n2\n*Main> mod 10 5\n0\n*Main> rem 10 5\n0\n*Main> mod 1 0\n*** Exception: divide b... |
{"title":"Python multiprocessing pickling error","tags":["python","multiprocessing","pickle"],"question_text":"I am sorry that I can't reproduce the error with a simpler example, and my code is too complicated to post. If I run the program in IPython shell instead of the regular python, things work out well.\nI looked ... |
{"title":"Html.DropdownListFor selected value not being set","tags":["asp.net-mvc","razor"],"question_text":"How can I set the selected value of a Html.DropDownListFor? I've been having a look online and have seen that it can be achieved by using the fourth parameter so like the below:\n`@Html.DropDownListFor(m => m, n... |
{"title":"When is std::weak_ptr useful?","tags":["c++","c++11","shared-ptr","smart-pointers","weak-ptr"],"question_text":"I started studying smart pointers of C++11 and I don't see any useful use of\n`std::weak_ptr`\n. Can someone tell me when\n`std::weak_ptr`\nis useful\/necessary?","answer_text":"`std::weak_ptr`\nis ... |
{"title":"In vim, how do I get a file to open at the same line number I closed it at last time?","tags":["vim"],"question_text":"I want to configure vim to open a file at the same place I left off at.","answer_text":"From Ubuntu's\n`\/etc\/vim\/vimrc`\nfile, this example is commented out:\n`\" Uncomment the following t... |
{"title":"How to check if a table exists in a given schema","tags":["sql","database","postgresql","information-schema","search-path"],"question_text":"Postgres 8.4 and greater database contains common tables in\n`public`\nschema and company specific tables in\n`company`\nschema.\n`company`\nschema names always start wi... |
{"title":"Determining memory usage of objects?","tags":["memory","r"],"question_text":"I'd like to work out how much RAM is being used by each of my objects inside my current workspace. Is there an easy way to do this?","answer_text":"some time ago I stole this little nugget from\nhere\n:\n`sort( sapply(ls(),function(x... |
{"title":"What does Python's eval() do? ","tags":["python","eval"],"question_text":"In the book that I am reading on Python, it keeps using the code\n`eval(input('blah'))`\nI read the documentation, and I understand it, but I still do not see how it changes the\n`input()`\nfunction.\nWhat does it do? Can someone explai... |
{"title":"Subdirectories within an iOS application","tags":["iphone","xcode","bundle"],"question_text":"Is there a way to have directories within an .app?\nAt the moment if I add a file into Xcode, regardless of what Group hierarchy it is in, the file always lands in a flat filesystem within my application bundle.","an... |
{"title":"git pull error :error: remote ref is at but expected","tags":["git","pull","git-pull"],"question_text":"Full message:\n`error: Ref refs\/remotes\/origin\/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec\nFrom github.com:{github project url}\n ! a21359c.... |
{"title":"Auto-open NERDTree in \"EVERY\" tab","tags":["vim","nerdtree"],"question_text":"Is it possible to open NERDTree in every tab with pressing\nt\nor\nT\nin NERDTree, if yes, How?","answer_text":"`autocmd VimEnter * NERDTree\nautocmd BufEnter * NERDTreeMirror`\nedit: The above command seems to open the new tab in... |
{"title":"Text box with line wrapping in matplotlib?","tags":["python","textbox","matplotlib"],"question_text":"Is it possible to display text in a box through Matplotlib,\nwith automatic line breaks\n? By using\n`pyplot.text()`\n, I was only able to print multi-line text that flows beyond the boundaries of the window,... |
{"title":"Swift extract regex matches","tags":["ios","regex","string","swift"],"question_text":"I want to extract substrings from a string that match a regex pattern.\nSo I'm looking for something like this:\n`func matchesForRegexInText(regex: String!, text: String!) -> [String] {\n ???\n}`\nSo this is what I have:\n`f... |
{"title":"Is it possible to go into ipython from code?","tags":["python","shell","debugging","ipython","pdb"],"question_text":"For my debugging needs,\n`pdb`\nis pretty good. However, it would be\nmuch\ncooler (and helpful) if I could go into\n`ipython`\n. Is this thing possible?","answer_text":"There is an\n`ipdb`\npr... |
{"title":"Custom installed font not displayed correctly in UILabel","tags":["ios","ios4","fonts","uilabel","uifont"],"question_text":"I'm trying to use a\nHelvetica Neue Condensed\nfont which I got from the Adobe Font Collection Pro Package. Unfortunately, it seems to draw incorrectly when I use it within a\n`UILabel`\... |
{"title":"How to attach back the Android emulator to ADB?","tags":["android","eclipse","android-emulator","emulator","adb"],"question_text":"After I start the emulator by hitting Debug in Eclipse, after certain time it disconnects from the ADB, but the emulator stays open. It is responsive, I can navigate and start app... |
{"title":"How to have multiple data-bind attributes on one element?","tags":["javascript","jquery","knockout.js"],"question_text":"I need to have multiple data bindings on one element. For example, I want a\n`href`\nas well as a\n`html`\ndata-binding on\none\n`a`\ntag. I have tried this,\n`<a data-bind=\"html: name\" \... |
{"title":"Python 3.2 Unable to import urllib2 (ImportError: No module named urllib2)","tags":["windows","python-3.x"],"question_text":"I am using Windows, and I get the error:\n`ImportError: No module named urllib2`\nI think\nthis\nis the solution for Linux. But how to set this in Windows?\nI am using Python 3.2 and I ... |
{"title":"@Value not resolved when using @PropertySource annotation. How to configure PropertySourcesPlaceholderConfigurer?","tags":["spring","configuration"],"question_text":"I have following configuration class:\n`@Configuration\n@PropertySource(name = \"props\", value = \"classpath:\/app-config.properties\")\n@Compo... |
{"title":"Protocol func returning Self","tags":["swift"],"question_text":"I have a protocol P that returns a copy of the object:\n`protocol P {\n func copy() -> Self\n}`\nand a class C that implements P:\n`class C : P {\n func copy() -> Self *or* C {\n return C()\n }\n}`\nHowever, whether I put the return value as C or... |
{"title":"How can I see the internal compile commands which fail in a \"go get\" installation?","tags":["go"],"question_text":"I am pulling and installing a package with dependencies, and a compilation fails, in this case not finding a file,\n`magic.h`\n. How do I see what the compilation commands and flags were? The\n... |
{"title":"Sort array returned by ActiveRecord by date (or any other column)","tags":["ruby-on-rails","ruby","arrays","activerecord"],"question_text":"How can I sort an array returned by an ActiveRecord query by a\n`created_at`\ndate column?\nThis occurs once the query has been executed.\nPlease don't tell me to do it i... |
{"title":"Callback on CSS transition","tags":["javascript","css","css3","css-transitions"],"question_text":"Is it possible to get a notification (like callback) when a CSS transition has been completed?","answer_text":"Yes, if such things are supported by the browser, then an event is triggered when the transition comp... |
{"title":"How to check if a static library is built for 64-bit?","tags":["ios","objective-c","static-libraries","lipo"],"question_text":"I just built a static library for iOS with the build setting for Architectures set to\n`$(ARCHS_STANDARD_INCLUDING_64_BIT)`\n.\nI want to make sure that the .a library is properly inc... |
{"title":"Proper Linq where clauses","tags":["c#","linq"],"question_text":"I write a fair amount of linq in my day to day life, but mostly simple statements. I have noticed that when using where clauses, there are many ways to write them and each have the same results as far as I can tell. For example;\n`from x in Coll... |
{"title":"Disable autocomplete via CSS","tags":["html","css","html-form"],"question_text":"Is it possible to use CSS to disable autocomplete on a form element (specifically a textfield)?\nI use a tag library which does not permit the autocomplete element and I would like to disable autocomplete without using Javascript... |
{"title":"How can i call Wi-Fi settings screen from my application using Android","tags":["android","wifi"],"question_text":"Normally I am getting Wi-Fi setting screen on the emulator by clicking on the\n`Settings > Wireless controls > wifi settings`\n. I need to go directly to the Wi-Fi settings screen from my program... |
{"title":"Byte order mark screws up file reading in Java","tags":["java","utf-8","byte-order-mark"],"question_text":"I'm trying to read CSV files using Java. Some of the files may have a byte order mark in the beginning, but not all. When present, the byte order gets read along with the rest of the first line, thus cau... |
{"title":"Cannot delete or update a parent row: a foreign key constraint fails","tags":["sql","mysql","mysql-error-1451"],"question_text":"When doing:\n`DELETE FROM `jobs` WHERE `job_id` =1 LIMIT 1`\nIt errors:\n`#1451 - Cannot delete or update a parent row: a foreign key constraint fails \n(paymesomething.advertisers,... |
{"title":"How do I brew update a formula?","tags":["mongodb","formula","homebrew"],"question_text":"How do i update a formula?\nI ran\n`brew update`\n. Then, running\n`brew outdated`\n, outputs:\n`mongodb (1.4.3-x86_64 < 1.6.5-x86_64)`\nThus,\n`mongodb`\nis outdated.\nHow do I upgrade it? Do I just uninstall and then i... |
{"title":"What is callback in Android?","tags":["java","android"],"question_text":"I want to understand the concept of callback. I have searched on internet about the callbacks and there are many examples using interface, and one class is calling a method of another class using that interface. But still I can't get the... |
{"title":"Should I bind to ICollectionView or ObservableCollection","tags":["c#",".net","wpf","data-binding","mvvm"],"question_text":"Should one bind\n`DataGrid`\nto the\n`ICollectionView = CollectionViewSource.GetDefaultView(collection)`\nor to the\n`ObservableCollection<T> collection;`\n???\nWhat is the best practice... |
{"title":"What is ?: in PHP 5.3?","tags":["php","php-5.3","ternary-operator","conditional-operator","language-construct"],"question_text":"Possible Duplicate:\nWhat are the PHP operators \u00e2\u0080\u009c?\u00e2\u0080\u009d and \u00e2\u0080\u009c:\u00e2\u0080\u009d called and what do they do?\nFrom\nhttp:\/\/twitto.or... |
{"title":"Apply CSS to jQuery Dialog Buttons","tags":["jquery","css","jquery-ui","button","dialog"],"question_text":"So I currently have a jQuery dialog with two buttons: Save and Close. I create the dialog using the code below:\n`$dialogDiv.dialog({\n autoOpen: false,\n modal: true,\n width: 600,\n resizable: false,\n... |
{"title":"ASP.NET removing an item from Session?","tags":["c#","asp.net",".net","session","session-variables"],"question_text":"Which method is preferred?\n`Session.Remove(\"foo\");\nSession[\"foo\"] = null;`\nIs there a difference?","answer_text":"Is there a difference?\nThere is.\n`Session.Remove(key)`\ndeletes the e... |
{"title":"Azure SDK 2.5.1 fails to Publish cloudService","tags":["azure","visual-studio-2013","azure-cloud-services","azure-sdk-.net","azure-deployment"],"question_text":"After successfully upgrading my cloud service to the new \"Azure SDK for .NET\n2.5.1\n\" I got the following error when trying packaging\/publishing.... |
{"title":"iOS - UIImageView - how to handle UIImage image orientation","tags":["ios","uiimageview","uiimage","orientation"],"question_text":"Is it possible to setup\nUIImageView\nto handle image orientation? When I set the\nUIImageView\nto image with orientation\nRIGHT\n(it is photo from camera roll), the image is rota... |
{"title":"Scalar vs. primitive data type - are they the same thing?","tags":["programming-languages","types","terminology","primitive-types","scalar"],"question_text":"In various articles I have read, there are sometimes references to primitive data types and sometimes there are references to scalars.\nMy understanding... |
{"title":"Full screen apps keep switching places","tags":["osx","osx-lion"],"question_text":"I'm getting a really annoying side effect happening in osx that I can't seem to find a way to fix: for some reason the full screen applications keep switching positions. For example, if I have Safari, Mail and Xcode open in ful... |
{"title":"android string.xml reading html tags problem","tags":["android","string"],"question_text":"In Android project's strings.xml file i have following html text\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n<string name=\"myHeadStr\"><b><u>bold, underline <\/u><\/b><\/string>\n...\n<\/resources>`\nWhe... |
{"title":"Debugging php-cli scripts with xdebug and netbeans?","tags":["command-line","netbeans","xdebug","php"],"question_text":"I have managed to initiate php-cli script debug session from the IDE itself, but I need to start the debugging session from the shell \/ command line. These are rather complex maintenance PH... |
{"title":"How to access command line parameters?","tags":["command-line","rust"],"question_text":"The\nRust tutorial\ndoes not explain how to take parameters from the command line.\n`fn main()`\nis only shown with an empty parameter list in all examples.\nWhat is the correct way of accessing command line parameters fro... |
{"title":"What's the opposite of a nbsp?","tags":["html","character","line-breaks","hyphenation"],"question_text":"A\n` `\ncharacter is a space which doesn't allow for line breaking.\n`<p>lorem ipsum here are some words and so on<\/p>\n| lorem ipsum |\n| here are some words and so |\n| on |`\nWhat's... |
{"title":"How do I undeploy a meteor application?","tags":["meteor"],"question_text":"I've deployed an application with:\n`meteor deploy a-meteor-app.meteor.com`\n.\nIs there a way for me to undeploy from meteor.com?","answer_text":"Suppose I have deployed an app on the url :-\nhttp:\/\/anotherajax.meteor.com\/\n.\nThe... |
{"title":"How can I find out what FOREIGN KEY constraint references a table in SQL Server?","tags":["sql","sql-server","sql-server-2008"],"question_text":"I am trying to drop a table but getting the following message:\nMsg 3726, Level 16, State 1, Line 3\nCould not drop object 'dbo.UserProfile' because it is referenced... |
{"title":"Excluding directories in os.walk","tags":["python"],"question_text":"I'm writing a script that descends into a directory tree (using os.walk()) and then visits each file matching a certain file extension. However, since some of the directory trees that my tool will be used on also contain sub directories that... |
{"title":"Google Maps Android API v2 Authorization failure","tags":["android","google-maps","android-maps","google-maps-android-api-2"],"question_text":"My steps:\ngot SHA1 code from debug.keystore\ncreate app in google apis console\nenabled google map api v2\ninput SHA1;my.package.name\nget API key\ncreated AndroidMan... |
{"title":"AsyncTask and Looper.prepare() error","tags":["android","android-asynctask","looper"],"question_text":"I have the following code\n`class OverlayTask extends AsyncTask<Void, Void, Void> {\n @Override\n public void onPreExecute() {\n if (sites != null) {\n myMapView.getOverlays().remove(sites);\n myMapView.inva... |
{"title":"Mutable variable is accessible from closure. How can I fix this?","tags":["javascript","closures","mutable"],"question_text":"I am using Typeahead by twitter. I am running into this warning from Intellij. This is causing the \"window.location.href\" for each link to be the last item in my list of items.\nHow ... |
{"title":"Why can't I reference System.ComponentModel.DataAnnotations?","tags":["c#","wpf","data-annotations"],"question_text":"I'm trying to use DataAnnotations in my WPF project to specify a maximum length of strings, with the following:\n`using System.ComponentModel.DataAnnotations;`\nHowever, I get the error\nThe t... |
{"title":"Does JQuery support Dictionaries (key, value) collection?","tags":["javascript","jquery","collections","dictionary"],"question_text":"Does JQuery support\n`Dictionaries`\n(key, value) collection ?\nI would like to set the following data in a structure\n`[1, false]\n[2, true]\n[3, false]`\nwith the ability to ... |
{"title":".live() vs .bind()","tags":["jquery","bind","live"],"question_text":"I want to know the main difference between\n`.live()`\nvs.\n`.bind()`\nmethods in jQuery.","answer_text":"The main difference is that\n`live`\nwill work also for the elements that will be created after the page has been loaded (i.e. by your ... |
{"title":"Validates acceptance always failing","tags":["ruby-on-rails","validation"],"question_text":"I can't see what I'm missing, but something is obviously not right.\nIn model:\n`validates :terms, :acceptance => true, :on => :update`\nTrying a few options:\n`>> a = Factory(:blog_agreement)\n=> #<BlogAgreement id: 5... |
{"title":"add #*# glob to .gitignore?","tags":["git","gitignore"],"question_text":"I want to add emacs autosave files to my .gitignore with the glob\n`#*#`\nbut of course, lines starting with a hash are comment lines.\nHow can I get this into my .gitignore without it being treated as a comment?","answer_text":"Did you ... |
{"title":"How do I make a matrix from a list of vectors in R?","tags":["r","matrix","vector"],"question_text":"Goal: from a list of vectors of equal length, create a matrix where each vector becomes a row.\nExample:\n`> a <- list()\n> for (i in 1:10) a[[i]] <- c(i,1:5)\n> a\n[[1]]\n[1] 1 1 2 3 4 5\n[[2]]\n[1] 2 1 2 3 4... |
{"title":"Why Xcode 7 shows *.tbd instead of *.dylib?","tags":["ios","xcode","dylib","xcode7"],"question_text":"Xcode 7\nIn Target > BuildPhases > Link Binary With Libraries > tap + button\nWhen choosing frameworks to add, you cannot find *.dylib, you'll see *.tbd instead.\nWhat is the reason for this?\n**For people wh... |
{"title":"Should I write equals() methods in JPA entities?","tags":["java","jpa","equals"],"question_text":"I want to check if entity is in a Collection member (\n`@OneToMany`\nor\n`@ManyToMany`\n) of another entity:\n`if (entity2.getEntities1().contains(entity1)) { }`","answer_text":"Not necessarily. There are three o... |
{"title":"Submitting HTML form using Jquery AJAX","tags":["jquery","ajax","form-submit"],"question_text":"Im trying to submit a HTML from using AJAX by using this example:\nhttp:\/\/jquery.malsup.com\/form\/\nMy html code:\n`<form id=\"formoid\" action=\"studentFormInsert.php\" title=\"\" method=\"post\">\n<div><label ... |
{"title":"How to trace the path in a Breadth-First Search?","tags":["python","algorithm","graph","breadth-first-search"],"question_text":"How do you trace the path of a Breadth-First Search, such that in the following example:\nIf searching for key\n`11`\n, return the\nshortest\nlist connecting 1 to 11.\n`[1, 4, 7, 11]... |
{"title":"why can't I set up a breakpoint in eclipse?","tags":["eclipse","breakpoints"],"question_text":"For some odd reason, I can't use breakpoints in my eclipse project. All breakpoints that I set have a diagonal line on them, above the dot in the respective line (on the left margin of the window), as if they are bl... |
{"title":"Javascript when to use prototypes","tags":["javascript","performance","prototype","function-prototypes"],"question_text":"I'd like to understand when it is appropriate to use prototype methods in js. Should they always be used (or are there cases where using them is not preferred and\/or incurs a performance ... |
{"title":"How do I create a CGRect from a CGPoint and CGSize?","tags":["ios","objective-c","quartz-graphics","cgpoint","cgrectmake"],"question_text":"I need to create a frame for a\n`UIImageView`\nfrom a varying collection of\n`CGSize`\nand\n`CGPoint`\n, both values will always be different depending on user's choices.... |
{"title":"error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj","tags":["c++","debugging","linker"],"question_text":"I have read a lot of solutions to my problem but none helped. I tried clean, rebuild. Reinstalled visual 2010 and change from professional to ultima... |
{"title":"getting only name of the class Class.getName()","tags":["java","class"],"question_text":"How can i get the name of the class\n`String.class.getName() returns java.lang.String`\nI am only interested in getting last part ie only String\nAny Api can do that?","answer_text":"`Class.getSimpleName()`","question_cod... |
{"title":"ACID and database transactions?","tags":["database","transactions","acid"],"question_text":"What is the relationship between ACID and database transaction?\nDoes ACID give database transaction or is it the same thing?\nCould someone enlighten this topic.","answer_text":"ACID\nis a set of properties that you w... |
{"title":"Operator new initializes memory to zero","tags":["c++","memory-management"],"question_text":"There is such code:\n`#include <iostream>\nint main(){\n unsigned int* wsk2 = new unsigned int(5);\n std::cout << \"wsk2: \" << wsk2 << \" \" << *wsk2 << std::endl;\n delete wsk2;\n wsk2 = new unsigned int;\n std::cou... |
{"title":"Java regex email","tags":["java","regex","email"],"question_text":"First of all, I know that using regex for email is not recommended but I gotta test this out.\nI have this regex:\n`\\b[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b`\nIn Java, I did this:\n`Pattern p = Pattern.compile(\"\\\\b[A-Z0-9._%-]+@[A-Z0-9.... |
{"title":"LINQ to Entities does not recognize the method 'System.String Format(System.String, System.Object, System.Object)'","tags":["linq","entity-framework","linq-to-entities"],"question_text":"I have this linq query:\n`private void GetReceivedInvoiceTasks(User user, List<Task> tasks)\n{\n var areaIds = user.Areas.S... |
{"title":"how to print the data in byte array as characters","tags":["java"],"question_text":"In my byte array i have the hash values of a message which consists of some negative values and also positive values. Positive values are being printed easily by using the\n`(char)byte[i]`\nstatement. Now how can i get the neg... |
{"title":"Does C# 4 optimize away namespaces in a manner that previous C# versions did not?","tags":["c#",".net-4.0","namespaces"],"question_text":"This question is for interest sake. I'm working with a third-party library and came across the following documentation on a\n`CMS.Security.Dummy`\nclass:\nDO NOT DELETE THI... |
{"title":"Deciphering the .NET clr20r3 exception parameters P1..P10","tags":[".net","exception","clr"],"question_text":"I'm trying to decipher the meaning on the P1...P10 parameters associated with a\n`clr20r3`\nthat is written to the event log when my application experiences an exception.\nThe best I've\nbeen able to ... |
{"title":"What are all codecs supported by FFmpeg?","tags":["video","ffmpeg"],"question_text":"I need a list of codecs supported by FFmpeg. Where can I find it?","answer_text":"Codecs proper:\n`ffmpeg -codecs`\nFormats:\n`ffmpeg -formats`","question_code":[],"answer_code":["ffmpeg -codecs\n","ffmpeg -formats\n"],"retri... |
{"title":"how to schedule a job for sql query to run daily?","tags":["sql","sql-server","database","sql-server-2008","sql-job"],"question_text":"I need to know how to make an sql query run daily using sql server agent jobs with minimum required configuration settings.","answer_text":"Expand the SQL Server Agent node an... |
{"title":"Changing UITextField Placeholder font","tags":["ios","objective-c","uitextfield"],"question_text":"I'm changing the placeholder text color with the following code, but when I try to add NSFontAttribute I get the compiler error\n`\"too many arguments to method call, expect 2 have 3\"`\n`UIColor *color = [UICol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.